Skip to content
Open

Esm #1834

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
6f6e708
mixed ESM
bourgeoa Nov 13, 2025
6e0b966
more mixed for app
bourgeoa Nov 13, 2025
78c0558
more mixed for app and test
bourgeoa Nov 13, 2025
f3f3968
index.mjs
bourgeoa Nov 13, 2025
d5d0e75
Fix line endings in bin/solid for Docker compatibility
Nov 13, 2025
13e5054
package.json
Nov 13, 2025
0357fea
.gitattributes
Nov 13, 2025
5b65f43
test/ migrated to esm in test-esm/
Nov 13, 2025
ac4eec7
ESM Migration: Convert main lib files and lib/api to ESM
Nov 13, 2025
73b2626
ESM Migration: Complete lib/api/ and lib/handlers/ conversion
Nov 13, 2025
277633e
Add ESM test command to CI workflow
bourgeoa Nov 14, 2025
562a91b
add missing test-esm/resources
Nov 20, 2025
d2ebe52
update esm and tests
Nov 20, 2025
86da28f
add missing .mjs files
Nov 22, 2025
04fef95
missing mjs file
Nov 25, 2025
f3d0a1b
add esm entry point
Nov 25, 2025
60e2f93
missing content in ldp.mjs
Nov 25, 2025
53c8278
miscellaneous updates
Nov 25, 2025
635f7b2
updates lib/api
Nov 25, 2025
ebf457f
updates to lib/srvices
Nov 25, 2025
7bd6cdd
updates to lib/models
Nov 25, 2025
aba64d9
updates to lib/payment-pointer-discovery.mjs
Nov 25, 2025
b935bdf
updates to lib/ldp-container.mjs
Nov 25, 2025
3f536ab
updates to lib/requests/auth-request.mjs
Nov 25, 2025
beb6dad
updates to lib/rdf-notification-template.mjs
Nov 25, 2025
c668ad3
updates to lib/handlers
Nov 25, 2025
5c258b2
lib/server-config.mjs
Nov 25, 2025
b370ff7
updates .mjs
Nov 30, 2025
1bf6b36
Revert "updates .mjs"
Nov 30, 2025
fd1a323
fix critical node-forge
Nov 30, 2025
f8ff940
esm account-manager and test
Dec 1, 2025
1706ce9
add default-templates/emails .mjs
Dec 2, 2025
ec340b2
update unit test to esm
Dec 2, 2025
32e473c
return to CJS utils.js
Dec 2, 2025
7afef98
update to esm only
Dec 6, 2025
21798f6
lint issues
Dec 6, 2025
128fc7c
add nyc-esm
Dec 6, 2025
be487db
some cleaning
Dec 6, 2025
89395b3
standard lint issues
Dec 8, 2025
924d4b8
Merge branch 'main' into nss2esm-hybrid
bourgeoa Dec 8, 2025
1e3025d
update require() and debug's
bourgeoa Dec 21, 2025
3f1fba3
delete patch.mjs.old
bourgeoa Dec 21, 2025
6db0f28
updates
bourgeoa Dec 22, 2025
7610c97
resources/config
bourgeoa Dec 22, 2025
23f2403
rename test-esm to test
bourgeoa Dec 23, 2025
94454d1
standard issues
bourgeoa Dec 23, 2025
951d712
remove test-esm from workflow
bourgeoa Dec 23, 2025
9424280
rm *.js to keep *.mjs
bourgeoa Dec 23, 2025
e1b12bb
update bin/solid and import index.mjs
bourgeoa Dec 23, 2025
3544e9b
c8 in CI workflow
bourgeoa Dec 23, 2025
40da84a
add missing test files
bourgeoa Dec 23, 2025
c65a248
some cleaning
bourgeoa Dec 23, 2025
bb700b5
mashlib was not loading and server OIDC listening issue
bourgeoa Dec 24, 2025
f1cbcc9
npm publish
bourgeoa Dec 24, 2025
4d031e4
Change test suite runner to ubuntu-latest
bourgeoa Dec 24, 2025
822b18b
Refactor CI workflow by removing test-suite job
bourgeoa Dec 24, 2025
9436591
oidc to include ES256/384/512
bourgeoa Dec 27, 2025
954a10d
update patch tests to rdflib@2.3.2
bourgeoa Dec 27, 2025
c012117
Merge branch 'esm' of https://github.com/nodeSolidServer/node-solid-s…
bourgeoa Dec 27, 2025
f7d9560
replace node-fetch with node:fetch and update for isIp and some lints
bourgeoa Dec 27, 2025
ad1867f
remove standard and use eslint@9
bourgeoa Dec 27, 2025
f18e73e
npm run lint in CI/CD
bourgeoa Dec 27, 2025
bf760f9
update more dependencies
bourgeoa Dec 27, 2025
1185df4
eslint.config.mjs
bourgeoa Dec 27, 2025
b387f8c
rimraf and get-folder-size at @latest
bourgeoa Dec 27, 2025
c7c332a
http-proxy-middleware@3
bourgeoa Dec 27, 2025
b278bff
http-proxy-middleware comments
bourgeoa Dec 27, 2025
7eb7ffb
rfc9207 iss == idp
bourgeoa Jan 1, 2026
95a4630
package-lock.json security issue
bourgeoa Jan 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update more dependencies
  • Loading branch information
bourgeoa committed Dec 27, 2025
commit bf760f94d2ad84b780a64cf8868b8486e944403c
16 changes: 10 additions & 6 deletions lib/handlers/get.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { createRequire } from 'module'
import fs from 'fs'
import glob from 'glob'
import { glob, hasMagic } from 'glob'
import _path from 'path'
import $rdf from 'rdflib'
import Negotiator from 'negotiator'
Expand Down Expand Up @@ -37,7 +37,7 @@ export default async function handler (req, res, next) {

res.header('Accept-Patch', 'text/n3, application/sparql-update, application/sparql-update-single-match')
res.header('Accept-Post', '*/*')
if (!path.endsWith('/') && !glob.hasMagic(path)) res.header('Accept-Put', '*/*')
if (!path.endsWith('/') && !hasMagic(path)) res.header('Accept-Put', '*/*')

// Set live updates
if (ldp.live) {
Expand All @@ -62,7 +62,7 @@ export default async function handler (req, res, next) {
// set Accept-Put if container do not exist
if (err.status === 404 && path.endsWith('/')) res.header('Accept-Put', 'text/turtle')
// use globHandler if magic is detected
if (err.status === 404 && glob.hasMagic(path)) {
if (err.status === 404 && hasMagic(path)) {
debug('forwarding to glob request')
return globHandler(req, res, next)
} else {
Expand Down Expand Up @@ -188,8 +188,9 @@ async function globHandler (req, res, next) {
nodir: true
}

glob(`${folderPath}*`, globOptions, async (err, matches) => {
if (err || matches.length === 0) {
try {
const matches = await glob(`${folderPath}*`, globOptions)
if (matches.length === 0) {
debugGlob('No files matching the pattern')
return next(HTTPError(404, 'No files matching glob pattern'))
}
Expand Down Expand Up @@ -230,7 +231,10 @@ async function globHandler (req, res, next) {

res.send(data)
next()
})
} catch (err) {
debugGlob('Error during glob: ' + err)
return next(HTTPError(500, 'Error processing glob pattern'))
}
}

// TODO: get rid of this ugly hack that uses the Allow handler to check read permissions
Expand Down
Loading
Loading