solid-server 5.8.8-22f4cfec → 5.8.8-5fdbfa12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/js/auth-buttons.mjs +20 -20
- package/common/js/index-buttons.mjs +28 -33
- package/common/js/solid.mjs +11 -11
- package/config/defaults.mjs +1 -1
- package/coverage/tmp/coverage-2275-1766876301000-0.json +1 -0
- package/coverage/tmp/{coverage-2261-1766832635310-0.json → coverage-2276-1766876279735-0.json} +1 -1
- package/eslint.config.mjs +102 -0
- package/index.mjs +8 -8
- package/lib/acl-checker.mjs +1 -3
- package/lib/create-server.mjs +2 -2
- package/lib/handlers/auth-proxy.mjs +4 -3
- package/lib/handlers/copy.mjs +0 -2
- package/lib/handlers/cors-proxy.mjs +3 -6
- package/lib/handlers/get.mjs +15 -11
- package/lib/handlers/index.mjs +0 -2
- package/lib/handlers/options.mjs +0 -2
- package/lib/ldp.mjs +2 -5
- package/lib/models/account-manager.mjs +1 -1
- package/lib/models/oidc-manager.mjs +0 -1
- package/lib/resource-mapper.mjs +1 -3
- package/lib/utils.mjs +1 -3
- package/lib/webid/lib/get.mjs +0 -1
- package/lib/webid/tls/index.mjs +0 -1
- package/package.json +26 -38
- package/solid-server-5.8.8.tgz +0 -0
- package/test/index.mjs +2 -3
- package/test/integration/account-manager-test.mjs +0 -1
- package/test/integration/account-template-test.mjs +0 -1
- package/test/integration/acl-oidc-test.mjs +1 -2
- package/test/integration/authentication-oidc-test.mjs +11 -7
- package/test/integration/authentication-oidc-with-strict-origins-turned-off-test.mjs +14 -9
- package/test/integration/capability-discovery-test.mjs +0 -1
- package/test/integration/http-copy-test.mjs +2 -2
- package/test/integration/oidc-manager-test.mjs +0 -1
- package/test/integration/quota-test.mjs +0 -1
- package/test/integration/www-account-creation-oidc-test.mjs +0 -1
- package/test/resources/accounts/db/oidc/op/clients/{_key_5319f8e8e4ea3214c2e92b252520d355.json → _key_abbf27de893abf7d05279547c22d9366.json} +1 -1
- package/test/resources/accounts/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A3457.json +1 -1
- package/test/resources/accounts-scenario/alice/db/oidc/op/clients/{_key_9c0fd8442675a1afbe5115b9ae300c65.json → _key_931f2a0c999a8f0695573844341dde0e.json} +1 -1
- package/test/resources/accounts-scenario/alice/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A7000.json +1 -1
- package/test/resources/accounts-scenario/bob/db/oidc/op/clients/{_key_f15f340b6dc71b68d20eca0d7e87a972.json → _key_8bdd350afbe0452a42fe6b3b3705d25f.json} +1 -1
- package/test/resources/accounts-scenario/bob/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A7001.json +1 -1
- package/test/resources/accounts-scenario/charlie/db/oidc/op/clients/{_key_7c634dfe325475cc8750e19c72acf6d9.json → _key_e4ed74eed3926d2f8d4d1d9661be7aea.json} +1 -1
- package/test/resources/accounts-scenario/charlie/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A5002.json +1 -1
- package/test/resources/accounts-strict-origin-off/alice/db/oidc/op/clients/{_key_3f1cecaefd21253767f6e047bd9b572f.json → _key_9d6b49e3a595c4942e1105545518362d.json} +1 -1
- package/test/resources/accounts-strict-origin-off/alice/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A7010.json +1 -1
- package/test/resources/accounts-strict-origin-off/bob/db/oidc/op/clients/{_key_a17f603b5907c97a5fac61a2eea7ecb2.json → _key_5f68117de7511ed2b2290d81c83a2d98.json} +1 -1
- package/test/resources/accounts-strict-origin-off/bob/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A7011.json +1 -1
- package/test/unit/account-template-test.mjs +0 -1
- package/test/unit/add-cert-request-test.mjs +0 -1
- package/test/unit/create-account-request-test.mjs +1 -1
- package/test/unit/email-service-test.mjs +0 -1
- package/test/unit/email-welcome-test.mjs +0 -1
- package/test/unit/esm-imports.test.mjs +0 -1
- package/test/unit/oidc-manager-test.mjs +0 -1
- package/test/unit/solid-host-test.mjs +0 -1
- package/test/unit/user-account-test.mjs +0 -1
- package/test/unit/utils-test.mjs +1 -3
- package/test/utils/index.mjs +2 -3
- package/test/utils.mjs +2 -3
- package/test/validate-turtle.mjs +0 -1
- package/coverage/tmp/coverage-2260-1766832656715-0.json +0 -1
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import js from '@eslint/js'
|
|
2
|
+
import globals from 'globals'
|
|
3
|
+
|
|
4
|
+
export default [
|
|
5
|
+
js.configs.recommended,
|
|
6
|
+
{
|
|
7
|
+
languageOptions: {
|
|
8
|
+
ecmaVersion: 2022,
|
|
9
|
+
sourceType: 'module',
|
|
10
|
+
globals: {
|
|
11
|
+
...globals.node,
|
|
12
|
+
...globals.mocha,
|
|
13
|
+
fetch: 'readonly',
|
|
14
|
+
AbortController: 'readonly',
|
|
15
|
+
Headers: 'readonly',
|
|
16
|
+
Request: 'readonly',
|
|
17
|
+
Response: 'readonly',
|
|
18
|
+
URL: 'readonly',
|
|
19
|
+
URLSearchParams: 'readonly'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
rules: {
|
|
23
|
+
// StandardJS-like rules
|
|
24
|
+
'no-unused-vars': ['error', {
|
|
25
|
+
args: 'none',
|
|
26
|
+
caughtErrors: 'none',
|
|
27
|
+
ignoreRestSiblings: true,
|
|
28
|
+
vars: 'all'
|
|
29
|
+
}],
|
|
30
|
+
'no-empty': ['error', { allowEmptyCatch: true }],
|
|
31
|
+
'no-var': 'error',
|
|
32
|
+
'prefer-const': ['error', { destructuring: 'all' }],
|
|
33
|
+
'quote-props': ['error', 'as-needed'],
|
|
34
|
+
semi: ['error', 'never'],
|
|
35
|
+
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true }],
|
|
36
|
+
'comma-dangle': ['error', 'never'],
|
|
37
|
+
'space-before-function-paren': ['error', 'always'],
|
|
38
|
+
indent: ['error', 2, {
|
|
39
|
+
SwitchCase: 1,
|
|
40
|
+
VariableDeclarator: 1,
|
|
41
|
+
outerIIFEBody: 1,
|
|
42
|
+
MemberExpression: 1,
|
|
43
|
+
FunctionDeclaration: { parameters: 1, body: 1 },
|
|
44
|
+
FunctionExpression: { parameters: 1, body: 1 },
|
|
45
|
+
CallExpression: { arguments: 1 },
|
|
46
|
+
ArrayExpression: 1,
|
|
47
|
+
ObjectExpression: 1,
|
|
48
|
+
ImportDeclaration: 1,
|
|
49
|
+
flatTernaryExpressions: false,
|
|
50
|
+
ignoreComments: false,
|
|
51
|
+
ignoredNodes: ['TemplateLiteral *', 'JSXElement', 'JSXElement > *', 'JSXAttribute', 'JSXIdentifier', 'JSXNamespacedName', 'JSXMemberExpression', 'JSXSpreadAttribute', 'JSXExpressionContainer', 'JSXOpeningElement', 'JSXClosingElement', 'JSXFragment', 'JSXOpeningFragment', 'JSXClosingFragment', 'JSXText', 'JSXEmptyExpression', 'JSXSpreadChild'],
|
|
52
|
+
offsetTernaryExpressions: true
|
|
53
|
+
}],
|
|
54
|
+
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
|
|
55
|
+
'keyword-spacing': ['error', { before: true, after: true }],
|
|
56
|
+
'object-curly-spacing': ['error', 'always'],
|
|
57
|
+
'array-bracket-spacing': ['error', 'never'],
|
|
58
|
+
'space-in-parens': ['error', 'never'],
|
|
59
|
+
'space-before-blocks': ['error', 'always'],
|
|
60
|
+
'space-infix-ops': 'error',
|
|
61
|
+
'eol-last': 'error',
|
|
62
|
+
'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 0, maxEOF: 0 }],
|
|
63
|
+
'no-trailing-spaces': 'error',
|
|
64
|
+
'comma-spacing': ['error', { before: false, after: true }],
|
|
65
|
+
'no-multi-spaces': 'error',
|
|
66
|
+
'no-mixed-operators': ['error', {
|
|
67
|
+
groups: [
|
|
68
|
+
['==', '!=', '===', '!==', '>', '>=', '<', '<='],
|
|
69
|
+
['&&', '||'],
|
|
70
|
+
['in', 'instanceof']
|
|
71
|
+
],
|
|
72
|
+
allowSamePrecedence: true
|
|
73
|
+
}],
|
|
74
|
+
'operator-linebreak': ['error', 'after', { overrides: { '?': 'before', ':': 'before', '|>': 'before' } }],
|
|
75
|
+
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
|
|
76
|
+
'arrow-spacing': ['error', { before: true, after: true }],
|
|
77
|
+
'padded-blocks': ['error', { blocks: 'never', switches: 'never', classes: 'never' }],
|
|
78
|
+
'no-use-before-define': ['error', { functions: false, classes: false, variables: false }]
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
// Browser files (client-side code)
|
|
83
|
+
files: ['common/**/*.mjs'],
|
|
84
|
+
languageOptions: {
|
|
85
|
+
globals: {
|
|
86
|
+
...globals.browser,
|
|
87
|
+
solid: 'readonly',
|
|
88
|
+
UI: 'readonly',
|
|
89
|
+
owaspPasswordStrengthTest: 'readonly'
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
ignores: [
|
|
95
|
+
'node_modules/**',
|
|
96
|
+
'coverage/**',
|
|
97
|
+
'.db/**',
|
|
98
|
+
'data/**',
|
|
99
|
+
'resources/**'
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
]
|
package/index.mjs
CHANGED
|
@@ -8,15 +8,15 @@ import startCli from './bin/lib/cli.mjs'
|
|
|
8
8
|
let exported
|
|
9
9
|
const canAttach = (ldnode && (typeof ldnode === 'object' || typeof ldnode === 'function'))
|
|
10
10
|
if (canAttach) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
try {
|
|
12
|
+
if (!ldnode.createServer) ldnode.createServer = createServer
|
|
13
|
+
if (!ldnode.startCli) ldnode.startCli = startCli
|
|
14
|
+
exported = ldnode
|
|
15
|
+
} catch (e) {
|
|
16
|
+
exported = { default: ldnode, createServer, startCli }
|
|
17
|
+
}
|
|
18
18
|
} else {
|
|
19
|
-
|
|
19
|
+
exported = { default: ldnode, createServer, startCli }
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export default exported
|
package/lib/acl-checker.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
'use strict'
|
|
2
|
-
/* eslint-disable node/no-deprecated-api */
|
|
3
2
|
|
|
4
3
|
import { dirname } from 'path'
|
|
5
4
|
import rdf from 'rdflib'
|
|
@@ -10,7 +9,6 @@ import aclCheck from '@solid/acl-check'
|
|
|
10
9
|
import Url, { URL } from 'url'
|
|
11
10
|
import { promisify } from 'util'
|
|
12
11
|
import fs from 'fs'
|
|
13
|
-
import httpFetch from 'node-fetch'
|
|
14
12
|
|
|
15
13
|
export const DEFAULT_ACL_SUFFIX = '.acl'
|
|
16
14
|
const ACL = rdf.Namespace('http://www.w3.org/ns/auth/acl#')
|
|
@@ -309,7 +307,7 @@ function fetchLocalOrRemote (mapper, serverUri) {
|
|
|
309
307
|
body = await promisify(fs.readFile)(path, { encoding: 'utf8' })
|
|
310
308
|
} else {
|
|
311
309
|
// Fetch the acl from the internet
|
|
312
|
-
const response = await
|
|
310
|
+
const response = await fetch(url)
|
|
313
311
|
body = await response.text()
|
|
314
312
|
contentType = response.headers.get('content-type')
|
|
315
313
|
}
|
package/lib/create-server.mjs
CHANGED
|
@@ -6,7 +6,6 @@ import debug from '../debug.mjs'
|
|
|
6
6
|
import allow from './allow.mjs'
|
|
7
7
|
|
|
8
8
|
const PROXY_SETTINGS = {
|
|
9
|
-
logLevel: 'silent',
|
|
10
9
|
changeOrigin: true
|
|
11
10
|
}
|
|
12
11
|
const REQUIRED_PERMISSIONS = {
|
|
@@ -31,8 +30,10 @@ function addAuthProxyHandler (app, sourcePath, target) {
|
|
|
31
30
|
const sourcePathLength = sourcePath.length
|
|
32
31
|
const settings = Object.assign({
|
|
33
32
|
target,
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
on: {
|
|
34
|
+
proxyReq: addAuthHeaders,
|
|
35
|
+
proxyReqWs: addAuthHeaders
|
|
36
|
+
},
|
|
36
37
|
pathRewrite: path => path.substr(sourcePathLength)
|
|
37
38
|
}, PROXY_SETTINGS)
|
|
38
39
|
|
package/lib/handlers/copy.mjs
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
/* eslint-disable node/no-deprecated-api */
|
|
2
|
-
|
|
3
1
|
import { createProxyMiddleware } from 'http-proxy-middleware'
|
|
4
2
|
import cors from 'cors'
|
|
5
3
|
import debug from '../debug.mjs'
|
|
6
4
|
import url from 'url'
|
|
7
5
|
import dns from 'dns'
|
|
8
|
-
import
|
|
6
|
+
import { isIP } from 'is-ip'
|
|
9
7
|
import ipRange from 'ip-range-check'
|
|
10
8
|
import validUrl from 'valid-url'
|
|
11
9
|
|
|
@@ -16,8 +14,7 @@ const CORS_SETTINGS = {
|
|
|
16
14
|
origin: true
|
|
17
15
|
}
|
|
18
16
|
const PROXY_SETTINGS = {
|
|
19
|
-
target: '
|
|
20
|
-
logLevel: 'silent',
|
|
17
|
+
target: 'http://placeholder',
|
|
21
18
|
changeOrigin: true,
|
|
22
19
|
followRedirects: true,
|
|
23
20
|
proxyTimeout: 10000,
|
|
@@ -75,7 +72,7 @@ function extractProxyConfig (req, res, next) {
|
|
|
75
72
|
|
|
76
73
|
// Parse the URL and retrieve its host's IP address
|
|
77
74
|
const { protocol, host, hostname, path } = url.parse(uri)
|
|
78
|
-
if (
|
|
75
|
+
if (isIP(hostname)) {
|
|
79
76
|
addProxyConfig(null, hostname)
|
|
80
77
|
} else {
|
|
81
78
|
dns.lookup(hostname, addProxyConfig)
|
package/lib/handlers/get.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { createRequire } from 'module'
|
|
4
4
|
import fs from 'fs'
|
|
5
|
-
import glob from 'glob'
|
|
5
|
+
import { glob, hasMagic } from 'glob'
|
|
6
6
|
import _path from 'path'
|
|
7
7
|
import $rdf from 'rdflib'
|
|
8
8
|
import Negotiator from 'negotiator'
|
|
@@ -37,7 +37,7 @@ export default async function handler (req, res, next) {
|
|
|
37
37
|
|
|
38
38
|
res.header('Accept-Patch', 'text/n3, application/sparql-update, application/sparql-update-single-match')
|
|
39
39
|
res.header('Accept-Post', '*/*')
|
|
40
|
-
if (!path.endsWith('/') && !
|
|
40
|
+
if (!path.endsWith('/') && !hasMagic(path)) res.header('Accept-Put', '*/*')
|
|
41
41
|
|
|
42
42
|
// Set live updates
|
|
43
43
|
if (ldp.live) {
|
|
@@ -48,9 +48,9 @@ export default async function handler (req, res, next) {
|
|
|
48
48
|
|
|
49
49
|
const options = {
|
|
50
50
|
hostname: req.hostname,
|
|
51
|
-
path
|
|
52
|
-
includeBody
|
|
53
|
-
possibleRDFType
|
|
51
|
+
path,
|
|
52
|
+
includeBody,
|
|
53
|
+
possibleRDFType,
|
|
54
54
|
range: req.headers.range,
|
|
55
55
|
contentType: req.headers.accept
|
|
56
56
|
}
|
|
@@ -62,7 +62,7 @@ export default async function handler (req, res, next) {
|
|
|
62
62
|
// set Accept-Put if container do not exist
|
|
63
63
|
if (err.status === 404 && path.endsWith('/')) res.header('Accept-Put', 'text/turtle')
|
|
64
64
|
// use globHandler if magic is detected
|
|
65
|
-
if (err.status === 404 &&
|
|
65
|
+
if (err.status === 404 && hasMagic(path)) {
|
|
66
66
|
debug('forwarding to glob request')
|
|
67
67
|
return globHandler(req, res, next)
|
|
68
68
|
} else {
|
|
@@ -188,8 +188,9 @@ async function globHandler (req, res, next) {
|
|
|
188
188
|
nodir: true
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
|
|
192
|
-
|
|
191
|
+
try {
|
|
192
|
+
const matches = await glob(`${folderPath}*`, globOptions)
|
|
193
|
+
if (matches.length === 0) {
|
|
193
194
|
debugGlob('No files matching the pattern')
|
|
194
195
|
return next(HTTPError(404, 'No files matching glob pattern'))
|
|
195
196
|
}
|
|
@@ -230,7 +231,10 @@ async function globHandler (req, res, next) {
|
|
|
230
231
|
|
|
231
232
|
res.send(data)
|
|
232
233
|
next()
|
|
233
|
-
})
|
|
234
|
+
} catch (err) {
|
|
235
|
+
debugGlob('Error during glob: ' + err)
|
|
236
|
+
return next(HTTPError(500, 'Error processing glob pattern'))
|
|
237
|
+
}
|
|
234
238
|
}
|
|
235
239
|
|
|
236
240
|
// TODO: get rid of this ugly hack that uses the Allow handler to check read permissions
|
|
@@ -240,7 +244,7 @@ function hasReadPermissions (file, req, res, callback) {
|
|
|
240
244
|
if (!ldp.webid) {
|
|
241
245
|
// FIXME: what is the rule that causes
|
|
242
246
|
// "Unexpected literal in error position of callback" in `npm run standard`?
|
|
243
|
-
|
|
247
|
+
|
|
244
248
|
return callback(true)
|
|
245
249
|
}
|
|
246
250
|
|
|
@@ -249,6 +253,6 @@ function hasReadPermissions (file, req, res, callback) {
|
|
|
249
253
|
res.locals.path = relativePath
|
|
250
254
|
// FIXME: what is the rule that causes
|
|
251
255
|
// "Unexpected literal in error position of callback" in `npm run standard`?
|
|
252
|
-
|
|
256
|
+
|
|
253
257
|
allow('Read')(req, res, err => callback(!err))
|
|
254
258
|
}
|
package/lib/handlers/index.mjs
CHANGED
package/lib/handlers/options.mjs
CHANGED
package/lib/ldp.mjs
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/* eslint-disable node/no-deprecated-api */
|
|
2
|
-
|
|
3
1
|
import utilPath, { join, dirname } from 'path'
|
|
4
2
|
import intoStream from 'into-stream'
|
|
5
3
|
import urlModule from 'url'
|
|
@@ -11,10 +9,9 @@ import debug from './debug.mjs'
|
|
|
11
9
|
import error from './http-error.mjs'
|
|
12
10
|
import { stringToStream, serialize, overQuota, getContentType, parse } from './utils.mjs'
|
|
13
11
|
import extend from 'extend'
|
|
14
|
-
import rimraf from 'rimraf'
|
|
12
|
+
import { rimraf } from 'rimraf'
|
|
15
13
|
import { exec } from 'child_process'
|
|
16
14
|
import * as ldpContainer from './ldp-container.mjs'
|
|
17
|
-
import fetch from 'node-fetch'
|
|
18
15
|
import { promisify } from 'util'
|
|
19
16
|
import withLock from './lock.mjs'
|
|
20
17
|
import { clearAclCache } from './acl-checker.mjs'
|
|
@@ -546,7 +543,7 @@ class LDP {
|
|
|
546
543
|
|
|
547
544
|
// Delete the directory recursively
|
|
548
545
|
try {
|
|
549
|
-
await
|
|
546
|
+
await rimraf(directory)
|
|
550
547
|
} catch (err) {
|
|
551
548
|
throw error(err, 'Failed to delete the container')
|
|
552
549
|
}
|
package/lib/resource-mapper.mjs
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/* eslint-disable node/no-deprecated-api, no-mixed-operators */
|
|
2
|
-
|
|
3
1
|
import fs from 'fs'
|
|
4
2
|
import URL from 'url'
|
|
5
3
|
import { promisify } from 'util'
|
|
@@ -196,7 +194,7 @@ class ResourceMapper {
|
|
|
196
194
|
_getContentTypeFromExtension (path) {
|
|
197
195
|
const defaultContentType = (path === '' || path.endsWith('/')) ? this._defaultContainerContentType : this._defaultContentType
|
|
198
196
|
const extension = /\.([^/.]+)$/.exec(path)
|
|
199
|
-
return extension && this._types[extension[1].toLowerCase()] || defaultContentType
|
|
197
|
+
return (extension && this._types[extension[1].toLowerCase()]) || defaultContentType
|
|
200
198
|
}
|
|
201
199
|
|
|
202
200
|
// Appends an extension for the specific content type, if needed
|
package/lib/utils.mjs
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/* eslint-disable node/no-deprecated-api */
|
|
2
|
-
|
|
3
1
|
import fs from 'fs'
|
|
4
2
|
import path from 'path'
|
|
5
3
|
import util from 'util'
|
|
@@ -291,7 +289,7 @@ export async function overQuota (root, serverUri) {
|
|
|
291
289
|
* so it needs to be rewritten.
|
|
292
290
|
*/
|
|
293
291
|
function actualSize (root) {
|
|
294
|
-
return
|
|
292
|
+
return getSize(root)
|
|
295
293
|
}
|
|
296
294
|
|
|
297
295
|
function _asyncReadfile (filename) {
|
package/lib/webid/lib/get.mjs
CHANGED
package/lib/webid/tls/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solid-server",
|
|
3
3
|
"description": "Solid server on top of the file-system",
|
|
4
|
-
"version": "5.8.8-
|
|
4
|
+
"version": "5.8.8-5fdbfa12",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Tim Berners-Lee",
|
|
7
7
|
"email": "timbl@w3.org"
|
|
@@ -59,20 +59,20 @@
|
|
|
59
59
|
"homepage": "https://github.com/solid/node-solid-server",
|
|
60
60
|
"bugs": "https://github.com/solid/node-solid-server/issues",
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@fastify/busboy": "^
|
|
62
|
+
"@fastify/busboy": "^3.2.0",
|
|
63
63
|
"@fastify/pre-commit": "^2.2.1",
|
|
64
64
|
"@solid/acl-check": "^0.4.5",
|
|
65
65
|
"@solid/oidc-auth-manager": "^0.25.0",
|
|
66
66
|
"@solid/oidc-op": "^0.12.0",
|
|
67
67
|
"@solid/oidc-rp": "^0.12.0",
|
|
68
68
|
"async-lock": "^1.4.1",
|
|
69
|
-
"body-parser": "^
|
|
69
|
+
"body-parser": "^2.2.1",
|
|
70
70
|
"bootstrap": "^3.4.1",
|
|
71
71
|
"cached-path-relative": "^1.1.0",
|
|
72
72
|
"camelize": "^1.0.1",
|
|
73
73
|
"cheerio": "^1.1.2",
|
|
74
74
|
"colorette": "^2.0.20",
|
|
75
|
-
"commander": "^
|
|
75
|
+
"commander": "^14.0.2",
|
|
76
76
|
"cors": "^2.8.5",
|
|
77
77
|
"debug": "^4.4.3",
|
|
78
78
|
"express": "^4.22.1",
|
|
@@ -83,21 +83,20 @@
|
|
|
83
83
|
"express-session": "^1.18.2",
|
|
84
84
|
"extend": "^3.0.2",
|
|
85
85
|
"from2": "^2.3.0",
|
|
86
|
-
"fs-extra": "^
|
|
87
|
-
"get-folder-size": "^
|
|
88
|
-
"glob": "^
|
|
86
|
+
"fs-extra": "^11.3.3",
|
|
87
|
+
"get-folder-size": "^5.0.0",
|
|
88
|
+
"glob": "^13.0.0",
|
|
89
89
|
"global-tunnel-ng": "^2.7.1",
|
|
90
90
|
"handlebars": "^4.7.8",
|
|
91
|
-
"http-proxy-middleware": "^
|
|
92
|
-
"inquirer": "^
|
|
93
|
-
"into-stream": "^
|
|
91
|
+
"http-proxy-middleware": "^3.0.5",
|
|
92
|
+
"inquirer": "^13.1.0",
|
|
93
|
+
"into-stream": "^9.0.0",
|
|
94
94
|
"ip-range-check": "0.2.0",
|
|
95
|
-
"is-ip": "^
|
|
95
|
+
"is-ip": "^5.0.1",
|
|
96
96
|
"li": "^1.3.0",
|
|
97
97
|
"mashlib": "^1.11.1",
|
|
98
|
-
"mime-types": "^
|
|
99
|
-
"negotiator": "^0.
|
|
100
|
-
"node-fetch": "^2.7.0",
|
|
98
|
+
"mime-types": "^3.0.2",
|
|
99
|
+
"negotiator": "^1.0.0",
|
|
101
100
|
"node-forge": "^1.3.3",
|
|
102
101
|
"node-mailer": "^0.1.1",
|
|
103
102
|
"nodemailer": "^7.0.12",
|
|
@@ -105,13 +104,13 @@
|
|
|
105
104
|
"owasp-password-strength-test": "^1.3.0",
|
|
106
105
|
"rdflib": "^2.3.2",
|
|
107
106
|
"recursive-readdir": "^2.2.3",
|
|
108
|
-
"rimraf": "^
|
|
107
|
+
"rimraf": "^6.1.2",
|
|
109
108
|
"solid-auth-client": "^2.5.6",
|
|
110
109
|
"solid-namespace": "^0.5.4",
|
|
111
110
|
"solid-ws": "^0.4.3",
|
|
112
111
|
"text-encoder-lite": "^2.0.0",
|
|
113
112
|
"the-big-username-blacklist": "^1.5.2",
|
|
114
|
-
"ulid": "^
|
|
113
|
+
"ulid": "^3.0.2",
|
|
115
114
|
"urijs": "^1.19.11",
|
|
116
115
|
"uuid": "^13.0.0",
|
|
117
116
|
"valid-url": "^1.0.9",
|
|
@@ -120,15 +119,17 @@
|
|
|
120
119
|
},
|
|
121
120
|
"devDependencies": {
|
|
122
121
|
"@cxres/structured-headers": "^2.0.0-nesting.0",
|
|
122
|
+
"@eslint/js": "^9.39.2",
|
|
123
123
|
"@solid/solid-auth-oidc": "^0.6.0",
|
|
124
124
|
"c8": "^10.1.3",
|
|
125
125
|
"chai": "^4.5.0",
|
|
126
126
|
"chai-as-promised": "7.1.2",
|
|
127
|
-
"cross-env": "
|
|
127
|
+
"cross-env": "^10.1.0",
|
|
128
128
|
"dirty-chai": "2.0.1",
|
|
129
|
-
"eslint": "^
|
|
129
|
+
"eslint": "^9.39.2",
|
|
130
|
+
"globals": "^16.5.0",
|
|
130
131
|
"localstorage-memory": "1.0.3",
|
|
131
|
-
"mocha": "^
|
|
132
|
+
"mocha": "^11.7.5",
|
|
132
133
|
"nock": "^13.5.6",
|
|
133
134
|
"node-mocks-http": "^1.17.2",
|
|
134
135
|
"prep-fetch": "^0.1.0",
|
|
@@ -136,13 +137,12 @@
|
|
|
136
137
|
"sinon": "12.0.1",
|
|
137
138
|
"sinon-chai": "3.7.0",
|
|
138
139
|
"snyk": "^1.1301.2",
|
|
139
|
-
"
|
|
140
|
-
"supertest": "^6.3.4",
|
|
140
|
+
"supertest": "^7.1.4",
|
|
141
141
|
"turtle-validator": "1.1.1",
|
|
142
|
-
"whatwg-url": "
|
|
142
|
+
"whatwg-url": "^15.1.0"
|
|
143
143
|
},
|
|
144
144
|
"pre-commit": [
|
|
145
|
-
"
|
|
145
|
+
"lint"
|
|
146
146
|
],
|
|
147
147
|
"main": "index.mjs",
|
|
148
148
|
"exports": {
|
|
@@ -154,8 +154,8 @@
|
|
|
154
154
|
"scripts": {
|
|
155
155
|
"build": "echo nothing to build",
|
|
156
156
|
"solid": "node ./bin/solid",
|
|
157
|
-
"
|
|
158
|
-
"
|
|
157
|
+
"lint": "eslint \"**/*.mjs\"",
|
|
158
|
+
"lint:fix": "eslint --fix \"**/*.mjs\"",
|
|
159
159
|
"validate": "node ./test/validate-turtle.mjs",
|
|
160
160
|
"c8": "cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 c8 --reporter=text-summary mocha --recursive test/unit/ test/integration/",
|
|
161
161
|
"mocha": "cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 mocha --recursive test/unit/ test/integration/",
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
"mocha-ldp": "cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 mocha --recursive test/integration/ldp-test.mjs",
|
|
170
170
|
"ignore:prepublishOnly": "npm test",
|
|
171
171
|
"ignore:postpublish": "git push --follow-tags",
|
|
172
|
-
"test": "npm run
|
|
172
|
+
"test": "npm run lint && npm run validate && npm run c8",
|
|
173
173
|
"test-unit": "cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 mocha test/unit/**/*.mjs --timeout 10000",
|
|
174
174
|
"test-integration": "cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 mocha test/integration/**/*.mjs --timeout 15000",
|
|
175
175
|
"test-performance": "cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 mocha test/performance/**/*.mjs --timeout 10000",
|
|
@@ -192,18 +192,6 @@
|
|
|
192
192
|
"node_modules/**"
|
|
193
193
|
]
|
|
194
194
|
},
|
|
195
|
-
"standard": {
|
|
196
|
-
"globals": [
|
|
197
|
-
"after",
|
|
198
|
-
"afterEach",
|
|
199
|
-
"before",
|
|
200
|
-
"beforeEach",
|
|
201
|
-
"describe",
|
|
202
|
-
"it",
|
|
203
|
-
"fetch",
|
|
204
|
-
"AbortController"
|
|
205
|
-
]
|
|
206
|
-
},
|
|
207
195
|
"bin": {
|
|
208
196
|
"solid": "bin/solid"
|
|
209
197
|
},
|
package/solid-server-5.8.8.tgz
CHANGED
|
Binary file
|
package/test/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import fs from 'fs-extra'
|
|
2
|
-
import
|
|
2
|
+
import { rimrafSync } from 'rimraf'
|
|
3
3
|
import path from 'path'
|
|
4
4
|
import { fileURLToPath } from 'url'
|
|
5
5
|
import OIDCProvider from '@solid/oidc-op'
|
|
@@ -7,7 +7,6 @@ import dns from 'dns'
|
|
|
7
7
|
import ldnode from '../../index.mjs'
|
|
8
8
|
// import ldnode from '../index.mjs'
|
|
9
9
|
import supertest from 'supertest'
|
|
10
|
-
import fetch from 'node-fetch'
|
|
11
10
|
import https from 'https'
|
|
12
11
|
|
|
13
12
|
const __filename = fileURLToPath(import.meta.url)
|
|
@@ -16,7 +15,7 @@ const __dirname = path.dirname(__filename)
|
|
|
16
15
|
const TEST_HOSTS = ['nic.localhost', 'tim.localhost', 'nicola.localhost']
|
|
17
16
|
|
|
18
17
|
export function rm (file) {
|
|
19
|
-
return
|
|
18
|
+
return rimrafSync(path.normalize(path.join(__dirname, '../resources/' + file)))
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
export function cleanDir (dirPath) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { assert } from 'chai'
|
|
2
2
|
import fs from 'fs-extra'
|
|
3
|
-
import fetch from 'node-fetch'
|
|
4
3
|
import path from 'path'
|
|
5
4
|
import { fileURLToPath } from 'url'
|
|
6
5
|
import { loadProvider, rm, checkDnsSettings, cleanDir } from '../utils.mjs'
|
|
@@ -33,7 +32,7 @@ function fetchRequest (method, options, callback) {
|
|
|
33
32
|
callback(null, {
|
|
34
33
|
statusCode: res.status,
|
|
35
34
|
headers: Object.fromEntries(res.headers.entries()),
|
|
36
|
-
body
|
|
35
|
+
body,
|
|
37
36
|
statusMessage: res.statusText
|
|
38
37
|
}, body)
|
|
39
38
|
})
|