solid-server 5.8.8-8d509db1 → 5.8.8-cf5c6504

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.
Files changed (48) hide show
  1. package/coverage/tmp/coverage-2262-1766863845657-0.json +1 -0
  2. package/coverage/tmp/{coverage-2255-1766613179053-0.json → coverage-2263-1766863823325-0.json} +1 -1
  3. package/lib/acl-checker.mjs +2 -3
  4. package/lib/create-server.mjs +2 -2
  5. package/lib/handlers/copy.mjs +1 -1
  6. package/lib/handlers/cors-proxy.mjs +3 -3
  7. package/lib/handlers/get.mjs +3 -3
  8. package/lib/handlers/index.mjs +1 -1
  9. package/lib/handlers/options.mjs +1 -1
  10. package/lib/ldp.mjs +1 -2
  11. package/lib/models/account-manager.mjs +1 -1
  12. package/lib/resource-mapper.mjs +1 -1
  13. package/lib/utils.mjs +1 -1
  14. package/lib/webid/lib/get.mjs +0 -1
  15. package/lib/webid/tls/index.mjs +0 -1
  16. package/package.json +25 -26
  17. package/solid-server-5.8.8.tgz +0 -0
  18. package/test/index.mjs +0 -1
  19. package/test/integration/acl-oidc-test.mjs +1 -2
  20. package/test/integration/authentication-oidc-test.mjs +10 -6
  21. package/test/integration/authentication-oidc-with-strict-origins-turned-off-test.mjs +14 -9
  22. package/test/integration/http-copy-test.mjs +2 -2
  23. package/test/integration/patch-test.mjs +29 -12
  24. package/test/resources/accounts/db/oidc/op/clients/{_key_30860bb5cf6ba07e80ed7b2e7178c7ad.json → _key_3f892a91ab2dac850570901929cc6a9c.json} +1 -1
  25. package/test/resources/accounts/db/oidc/op/provider.json +345 -1
  26. package/test/resources/accounts/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A3457.json +1 -1
  27. package/test/resources/accounts-acl/db/oidc/op/provider.json +345 -1
  28. package/test/resources/accounts-scenario/alice/db/oidc/op/clients/{_key_e46bcfe080c59f5cbb53a559d6a272cb.json → _key_efaffd7535dd61bd581fbfe33713dfa9.json} +1 -1
  29. package/test/resources/accounts-scenario/alice/db/oidc/op/provider.json +345 -1
  30. package/test/resources/accounts-scenario/alice/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A7000.json +1 -1
  31. package/test/resources/accounts-scenario/bob/db/oidc/op/clients/{_key_e7fd102ec26a3dcd5916751e01a62315.json → _key_58c33ea4afe682387a8e2665092a8ba8.json} +1 -1
  32. package/test/resources/accounts-scenario/bob/db/oidc/op/provider.json +345 -1
  33. package/test/resources/accounts-scenario/bob/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A7001.json +1 -1
  34. package/test/resources/accounts-scenario/charlie/db/oidc/op/clients/{_key_0eec962830f849876695b69df76a3137.json → _key_88014cc2f59908a10060f0916456aac6.json} +1 -1
  35. package/test/resources/accounts-scenario/charlie/db/oidc/op/provider.json +345 -1
  36. package/test/resources/accounts-scenario/charlie/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A5002.json +1 -1
  37. package/test/resources/accounts-strict-origin-off/alice/db/oidc/op/clients/{_key_7d536a1f8c6eb86f41261e171a8af79a.json → _key_f8e11854cb1e266a1587f32d263321b6.json} +1 -1
  38. package/test/resources/accounts-strict-origin-off/alice/db/oidc/op/provider.json +345 -1
  39. package/test/resources/accounts-strict-origin-off/alice/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A7010.json +1 -1
  40. package/test/resources/accounts-strict-origin-off/bob/db/oidc/op/clients/{_key_0ed30b9e076814c6f6445582302487c2.json → _key_315f6739a055308310c995d740690dd3.json} +1 -1
  41. package/test/resources/accounts-strict-origin-off/bob/db/oidc/op/provider.json +345 -1
  42. package/test/resources/accounts-strict-origin-off/bob/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A7011.json +1 -1
  43. package/test/unit/create-account-request-test.mjs +1 -1
  44. package/test/unit/utils-test.mjs +1 -3
  45. package/test/utils/index.mjs +0 -1
  46. package/test/utils.mjs +0 -1
  47. package/test/validate-turtle.mjs +0 -1
  48. package/coverage/tmp/coverage-2254-1766613200322-0.json +0 -1
@@ -1,5 +1,5 @@
1
1
  'use strict'
2
- /* eslint-disable node/no-deprecated-api */
2
+ /* eslint-disable n/no-deprecated-api */
3
3
 
4
4
  import { dirname } from 'path'
5
5
  import rdf from 'rdflib'
@@ -10,7 +10,6 @@ import aclCheck from '@solid/acl-check'
10
10
  import Url, { URL } from 'url'
11
11
  import { promisify } from 'util'
12
12
  import fs from 'fs'
13
- import httpFetch from 'node-fetch'
14
13
 
15
14
  export const DEFAULT_ACL_SUFFIX = '.acl'
16
15
  const ACL = rdf.Namespace('http://www.w3.org/ns/auth/acl#')
@@ -309,7 +308,7 @@ function fetchLocalOrRemote (mapper, serverUri) {
309
308
  body = await promisify(fs.readFile)(path, { encoding: 'utf8' })
310
309
  } else {
311
310
  // Fetch the acl from the internet
312
- const response = await httpFetch(url)
311
+ const response = await fetch(url)
313
312
  body = await response.text()
314
313
  contentType = response.headers.get('content-type')
315
314
  }
@@ -65,8 +65,8 @@ function createServer (argv, app) {
65
65
  }
66
66
 
67
67
  const credentials = Object.assign({
68
- key: key,
69
- cert: cert
68
+ key,
69
+ cert
70
70
  }, argv)
71
71
 
72
72
  if (ldp.webid && ldp.auth === 'tls') {
@@ -1,4 +1,4 @@
1
- /* eslint-disable node/no-deprecated-api */
1
+ /* eslint-disable n/no-deprecated-api */
2
2
 
3
3
  import debug from '../debug.mjs'
4
4
  import HTTPError from '../http-error.mjs'
@@ -1,11 +1,11 @@
1
- /* eslint-disable node/no-deprecated-api */
1
+ /* eslint-disable n/no-deprecated-api */
2
2
 
3
3
  import { createProxyMiddleware } from 'http-proxy-middleware'
4
4
  import cors from 'cors'
5
5
  import debug from '../debug.mjs'
6
6
  import url from 'url'
7
7
  import dns from 'dns'
8
- import isIp from 'is-ip'
8
+ import { isIP } from 'is-ip'
9
9
  import ipRange from 'ip-range-check'
10
10
  import validUrl from 'valid-url'
11
11
 
@@ -75,7 +75,7 @@ function extractProxyConfig (req, res, next) {
75
75
 
76
76
  // Parse the URL and retrieve its host's IP address
77
77
  const { protocol, host, hostname, path } = url.parse(uri)
78
- if (isIp(hostname)) {
78
+ if (isIP(hostname)) {
79
79
  addProxyConfig(null, hostname)
80
80
  } else {
81
81
  dns.lookup(hostname, addProxyConfig)
@@ -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: path,
52
- includeBody: includeBody,
53
- possibleRDFType: possibleRDFType,
51
+ path,
52
+ includeBody,
53
+ possibleRDFType,
54
54
  range: req.headers.range,
55
55
  contentType: req.headers.accept
56
56
  }
@@ -1,4 +1,4 @@
1
- /* eslint-disable node/no-deprecated-api */
1
+ /* eslint-disable n/no-deprecated-api */
2
2
 
3
3
  import path from 'path'
4
4
  import debugModule from 'debug'
@@ -1,4 +1,4 @@
1
- /* eslint-disable node/no-deprecated-api */
1
+ /* eslint-disable n/no-deprecated-api */
2
2
 
3
3
  import { addLink } from '../header.mjs'
4
4
  import url from 'url'
package/lib/ldp.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /* eslint-disable node/no-deprecated-api */
1
+ /* eslint-disable n/no-deprecated-api */
2
2
 
3
3
  import utilPath, { join, dirname } from 'path'
4
4
  import intoStream from 'into-stream'
@@ -14,7 +14,6 @@ import extend from 'extend'
14
14
  import rimraf from 'rimraf'
15
15
  import { exec } from 'child_process'
16
16
  import * as ldpContainer from './ldp-container.mjs'
17
- import fetch from 'node-fetch'
18
17
  import { promisify } from 'util'
19
18
  import withLock from './lock.mjs'
20
19
  import { clearAclCache } from './acl-checker.mjs'
@@ -258,7 +258,7 @@ class AccountManager {
258
258
  const emailData = {
259
259
  to: userAccount.email,
260
260
  webId: userAccount.webId,
261
- deleteUrl: deleteUrl
261
+ deleteUrl
262
262
  }
263
263
  return this.emailService.sendWithTemplate('delete-account.mjs', emailData)
264
264
  })
@@ -1,4 +1,4 @@
1
- /* eslint-disable node/no-deprecated-api, no-mixed-operators */
1
+ /* eslint-disable n/no-deprecated-api, no-mixed-operators */
2
2
 
3
3
  import fs from 'fs'
4
4
  import URL from 'url'
package/lib/utils.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /* eslint-disable node/no-deprecated-api */
1
+ /* eslint-disable n/no-deprecated-api */
2
2
 
3
3
  import fs from 'fs'
4
4
  import path from 'path'
@@ -1,4 +1,3 @@
1
- import fetch from 'node-fetch'
2
1
  import { URL } from 'url'
3
2
 
4
3
  export default function get (webid, callback) {
@@ -1,4 +1,3 @@
1
-
2
1
  import * as verifyModule from '../lib/verify.mjs'
3
2
  import * as generateModule from './generate.mjs'
4
3
 
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-8d509db1",
4
+ "version": "5.8.8-cf5c6504",
5
5
  "author": {
6
6
  "name": "Tim Berners-Lee",
7
7
  "email": "timbl@w3.org"
@@ -62,25 +62,25 @@
62
62
  "@fastify/busboy": "^1.2.1",
63
63
  "@fastify/pre-commit": "^2.2.1",
64
64
  "@solid/acl-check": "^0.4.5",
65
- "@solid/oidc-auth-manager": "^0.24.5",
66
- "@solid/oidc-op": "^0.11.7",
67
- "@solid/oidc-rp": "^0.11.8",
65
+ "@solid/oidc-auth-manager": "^0.25.0",
66
+ "@solid/oidc-op": "^0.12.0",
67
+ "@solid/oidc-rp": "^0.12.0",
68
68
  "async-lock": "^1.4.1",
69
- "body-parser": "^1.20.3",
69
+ "body-parser": "^1.20.4",
70
70
  "bootstrap": "^3.4.1",
71
71
  "cached-path-relative": "^1.1.0",
72
72
  "camelize": "^1.0.1",
73
- "cheerio": "^1.0.0",
73
+ "cheerio": "^1.1.2",
74
74
  "colorette": "^2.0.20",
75
75
  "commander": "^8.3.0",
76
76
  "cors": "^2.8.5",
77
77
  "debug": "^4.4.3",
78
- "express": "^4.21.2",
78
+ "express": "^4.22.1",
79
79
  "express-accept-events": "^0.3.0",
80
80
  "express-handlebars": "^5.3.5",
81
81
  "express-negotiate-events": "^0.3.0",
82
82
  "express-prep": "^0.6.4",
83
- "express-session": "^1.18.1",
83
+ "express-session": "^1.18.2",
84
84
  "extend": "^3.0.2",
85
85
  "from2": "^2.3.0",
86
86
  "fs-extra": "^10.1.0",
@@ -88,22 +88,21 @@
88
88
  "glob": "^7.2.3",
89
89
  "global-tunnel-ng": "^2.7.1",
90
90
  "handlebars": "^4.7.8",
91
- "http-proxy-middleware": "^2.0.7",
92
- "inquirer": "^8.2.6",
91
+ "http-proxy-middleware": "^2.0.9",
92
+ "inquirer": "^8.2.7",
93
93
  "into-stream": "^5.1.1",
94
94
  "ip-range-check": "0.2.0",
95
- "is-ip": "^2.0.0",
95
+ "is-ip": "^5.0.1",
96
96
  "li": "^1.3.0",
97
97
  "mashlib": "^1.11.1",
98
- "mime-types": "^2.1.35",
99
- "negotiator": "^0.6.4",
100
- "node-fetch": "^2.7.0",
101
- "node-forge": "^1.3.2",
98
+ "mime-types": "^3.0.2",
99
+ "negotiator": "^1.0.0",
100
+ "node-forge": "^1.3.3",
102
101
  "node-mailer": "^0.1.1",
103
- "nodemailer": "^7.0.10",
102
+ "nodemailer": "^7.0.12",
104
103
  "oidc-op-express": "^0.0.3",
105
104
  "owasp-password-strength-test": "^1.3.0",
106
- "rdflib": "^2.3.0",
105
+ "rdflib": "^2.3.2",
107
106
  "recursive-readdir": "^2.2.3",
108
107
  "rimraf": "^3.0.2",
109
108
  "solid-auth-client": "^2.5.6",
@@ -111,16 +110,16 @@
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": "^2.3.0",
113
+ "ulid": "^3.0.2",
115
114
  "urijs": "^1.19.11",
116
115
  "uuid": "^13.0.0",
117
116
  "valid-url": "^1.0.9",
118
- "validator": "^13.12.0",
117
+ "validator": "^13.15.26",
119
118
  "vhost": "^3.0.2"
120
119
  },
121
120
  "devDependencies": {
122
121
  "@cxres/structured-headers": "^2.0.0-nesting.0",
123
- "@solid/solid-auth-oidc": "^0.5.7",
122
+ "@solid/solid-auth-oidc": "^0.6.0",
124
123
  "c8": "^10.1.3",
125
124
  "chai": "^4.5.0",
126
125
  "chai-as-promised": "7.1.2",
@@ -128,18 +127,18 @@
128
127
  "dirty-chai": "2.0.1",
129
128
  "eslint": "^7.32.0",
130
129
  "localstorage-memory": "1.0.3",
131
- "mocha": "^10.8.2",
130
+ "mocha": "^11.7.5",
132
131
  "nock": "^13.5.6",
133
- "node-mocks-http": "^1.16.2",
132
+ "node-mocks-http": "^1.17.2",
134
133
  "prep-fetch": "^0.1.0",
135
134
  "randombytes": "2.1.0",
136
135
  "sinon": "12.0.1",
137
136
  "sinon-chai": "3.7.0",
138
- "snyk": "^1.1295.3",
139
- "standard": "16.0.4",
140
- "supertest": "^6.3.4",
137
+ "snyk": "^1.1301.2",
138
+ "standard": "^17.1.2",
139
+ "supertest": "^7.1.4",
141
140
  "turtle-validator": "1.1.1",
142
- "whatwg-url": "11.0.0"
141
+ "whatwg-url": "^15.1.0"
143
142
  },
144
143
  "pre-commit": [
145
144
  "standard"
Binary file
package/test/index.mjs CHANGED
@@ -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)
@@ -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: body,
35
+ body,
37
36
  statusMessage: res.statusText
38
37
  }, body)
39
38
  })
@@ -6,7 +6,6 @@ import { UserStore } from '@solid/oidc-auth-manager'
6
6
  import UserAccount from '../../lib/models/user-account.mjs'
7
7
  import SolidAuthOIDC from '@solid/solid-auth-oidc'
8
8
 
9
- import fetch from 'node-fetch'
10
9
  import localStorage from 'localstorage-memory'
11
10
  import { URL, URLSearchParams } from 'whatwg-url'
12
11
  import { cleanDir, cp } from '../utils.mjs'
@@ -642,7 +641,7 @@ describe('Authentication API (OIDC)', () => {
642
641
  // Since user is not logged in, /authorize redirects to /login
643
642
  expect(res.status).to.equal(302)
644
643
 
645
- loginUri = new URL(res.headers.get('location'))
644
+ loginUri = new URL(res.headers.get('location'), aliceServerUri)
646
645
  expect(loginUri.toString().startsWith(aliceServerUri + '/login'))
647
646
  .to.be.true()
648
647
 
@@ -686,8 +685,11 @@ describe('Authentication API (OIDC)', () => {
686
685
  })
687
686
  .then(res => {
688
687
  expect(res.status).to.equal(302)
689
- postLoginUri = res.headers.get('location')
690
- cookie = res.headers.get('set-cookie')
688
+ const location = res.headers.get('location')
689
+ postLoginUri = new URL(location, aliceServerUri).toString()
690
+ // Native fetch: get first set-cookie header
691
+ const setCookieHeaders = res.headers.getSetCookie ? res.headers.getSetCookie() : [res.headers.get('set-cookie')]
692
+ cookie = setCookieHeaders[0]
691
693
 
692
694
  // Successful login gets redirected back to /authorize and then
693
695
  // back to app
@@ -712,7 +714,8 @@ describe('Authentication API (OIDC)', () => {
712
714
  })
713
715
  .then(res => {
714
716
  expect(res.status).to.equal(302)
715
- postSharingUri = res.headers.get('location')
717
+ const location = res.headers.get('location')
718
+ postSharingUri = new URL(location, aliceServerUri).toString()
716
719
  // cookie = res.headers.get('set-cookie')
717
720
 
718
721
  // Successful login gets redirected back to /authorize and then
@@ -724,7 +727,8 @@ describe('Authentication API (OIDC)', () => {
724
727
  .then(res => {
725
728
  // User gets redirected back to original app
726
729
  expect(res.status).to.equal(302)
727
- callbackUri = res.headers.get('location')
730
+ const location = res.headers.get('location')
731
+ callbackUri = location.startsWith('http') ? location : new URL(location, aliceServerUri).toString()
728
732
  expect(callbackUri.startsWith('https://app.example.com#'))
729
733
  })
730
734
  })
@@ -6,7 +6,6 @@ import { UserStore } from '@solid/oidc-auth-manager'
6
6
  import UserAccount from '../../lib/models/user-account.mjs'
7
7
  import SolidAuthOIDC from '@solid/solid-auth-oidc'
8
8
 
9
- import fetch from 'node-fetch'
10
9
  import localStorage from 'localstorage-memory'
11
10
  import { URL, URLSearchParams } from 'whatwg-url'
12
11
  import { cleanDir, cp } from '../utils.mjs'
@@ -463,7 +462,7 @@ describe('Authentication API (OIDC) - With strict origins turned off', () => {
463
462
  // Since user is not logged in, /authorize redirects to /login
464
463
  expect(res.status).to.equal(302)
465
464
 
466
- loginUri = new URL(res.headers.get('location'))
465
+ loginUri = new URL(res.headers.get('location'), aliceServerUri)
467
466
  expect(loginUri.toString().startsWith(aliceServerUri + '/login'))
468
467
  .to.be.true()
469
468
 
@@ -507,8 +506,11 @@ describe('Authentication API (OIDC) - With strict origins turned off', () => {
507
506
  })
508
507
  .then(res => {
509
508
  expect(res.status).to.equal(302)
510
- postLoginUri = res.headers.get('location')
511
- cookie = res.headers.get('set-cookie')
509
+ const location = res.headers.get('location')
510
+ postLoginUri = new URL(location, aliceServerUri).toString()
511
+ // Native fetch: get first set-cookie header
512
+ const setCookieHeaders = res.headers.getSetCookie ? res.headers.getSetCookie() : [res.headers.get('set-cookie')]
513
+ cookie = setCookieHeaders[0]
512
514
 
513
515
  // Successful login gets redirected back to /authorize and then
514
516
  // back to app
@@ -533,20 +535,23 @@ describe('Authentication API (OIDC) - With strict origins turned off', () => {
533
535
  })
534
536
  .then(res => {
535
537
  expect(res.status).to.equal(302)
536
- const postLoginUri = res.headers.get('location')
537
- const cookie = res.headers.get('set-cookie')
538
+ const location = res.headers.get('location')
539
+ const postSharingUri = new URL(location, aliceServerUri).toString()
540
+ const setCookieHeaders = res.headers.getSetCookie ? res.headers.getSetCookie() : [res.headers.get('set-cookie')]
541
+ const cookieFromSharing = setCookieHeaders[0] || cookie
538
542
 
539
543
  // Successful login gets redirected back to /authorize and then
540
544
  // back to app
541
- expect(postLoginUri.startsWith(aliceServerUri + '/authorize'))
545
+ expect(postSharingUri.startsWith(aliceServerUri + '/authorize'))
542
546
  .to.be.true()
543
547
 
544
- return fetch(postLoginUri, { redirect: 'manual', headers: { cookie } })
548
+ return fetch(postSharingUri, { redirect: 'manual', headers: { cookie: cookieFromSharing } })
545
549
  })
546
550
  .then(res => {
547
551
  // User gets redirected back to original app
548
552
  expect(res.status).to.equal(302)
549
- callbackUri = res.headers.get('location')
553
+ const location = res.headers.get('location')
554
+ callbackUri = location.startsWith('http') ? location : new URL(location, aliceServerUri).toString()
550
555
  expect(callbackUri.startsWith('https://app.example.com#'))
551
556
  })
552
557
  })
@@ -52,8 +52,8 @@ describe('HTTP COPY API', function () {
52
52
 
53
53
  function createOptions (method, url, user) {
54
54
  const options = {
55
- method: method,
56
- url: url,
55
+ method,
56
+ url,
57
57
  headers: {}
58
58
  }
59
59
  if (user) {
@@ -93,7 +93,8 @@ describe('PATCH through text/n3', () => {
93
93
  }, { // expected:
94
94
  status: 201,
95
95
  text: 'Patch applied successfully',
96
- result: '@prefix : </new.ttl#>.\n@prefix tim: </>.\n\ntim:x tim:y tim:z.\n\n'
96
+ // result: '@prefix : </new.ttl#>.\n@prefix tim: </>.\n\ntim:x tim:y tim:z.\n\n'
97
+ result: '@prefix : </new.ttl#>.\n\n</x> </y> </z>.\n\n'
97
98
  }))
98
99
 
99
100
  describe('on a non-existent JSON-LD file', describePatch({
@@ -105,7 +106,7 @@ describe('PATCH through text/n3', () => {
105
106
  status: 201,
106
107
  text: 'Patch applied successfully',
107
108
  // result: '{\n "@id": "/x",\n "/y": {\n "@id": "/z"\n }\n}'
108
- result: `{
109
+ /* result: `{
109
110
  "@context": {
110
111
  "tim": "https://tim.localhost:7777/"
111
112
  },
@@ -113,6 +114,12 @@ describe('PATCH through text/n3', () => {
113
114
  "tim:y": {
114
115
  "@id": "tim:z"
115
116
  }
117
+ }` */
118
+ result: `{
119
+ "@id": "https://tim.localhost:7777/x",
120
+ "https://tim.localhost:7777/y": {
121
+ "@id": "https://tim.localhost:7777/z"
122
+ }
116
123
  }`
117
124
  }))
118
125
 
@@ -140,7 +147,8 @@ describe('PATCH through text/n3', () => {
140
147
  }, { // expected:
141
148
  status: 201,
142
149
  text: 'Patch applied successfully',
143
- result: '@prefix : </new.n3#>.\n@prefix tim: </>.\n\ntim:x tim:y tim:z.\n\n'
150
+ // result: '@prefix : </new.n3#>.\n@prefix tim: </>.\n\ntim:x tim:y tim:z.\n\n'
151
+ result: '@prefix : </new.n3#>.\n\n</x> </y> </z>.\n\n'
144
152
  }))
145
153
 
146
154
  describe('on an N3 file that has an invalid uri (*.acl)', describePatch({
@@ -179,7 +187,8 @@ describe('PATCH through text/n3', () => {
179
187
  }, { // expected:
180
188
  status: 200,
181
189
  text: 'Patch applied successfully',
182
- result: '@prefix : </append-only.ttl#>.\n@prefix tim: </>.\n\ntim:a tim:b tim:c.\n\ntim:d tim:e tim:f.\n\ntim:x tim:y tim:z.\n\n'
190
+ // result: '@prefix : </append-only.ttl#>.\n@prefix tim: </>.\n\ntim:a tim:b tim:c.\n\ntim:d tim:e tim:f.\n\ntim:x tim:y tim:z.\n\n'
191
+ result: '@prefix : </append-only.ttl#>.\n\n</a> </b> </c>.\n\n</d> </e> </f>.\n\n</x> </y> </z>.\n\n'
183
192
  }))
184
193
 
185
194
  describe('on a resource with write-only access', describePatch({
@@ -189,7 +198,8 @@ describe('PATCH through text/n3', () => {
189
198
  }, { // expected:
190
199
  status: 200,
191
200
  text: 'Patch applied successfully',
192
- result: '@prefix : </write-only.ttl#>.\n@prefix tim: </>.\n\ntim:a tim:b tim:c.\n\ntim:d tim:e tim:f.\n\ntim:x tim:y tim:z.\n\n'
201
+ // result: '@prefix : </write-only.ttl#>.\n@prefix tim: </>.\n\ntim:a tim:b tim:c.\n\ntim:d tim:e tim:f.\n\ntim:x tim:y tim:z.\n\n'
202
+ result: '@prefix : </write-only.ttl#>.\n\n</a> </b> </c>.\n\n</d> </e> </f>.\n\n</x> </y> </z>.\n\n'
193
203
  }))
194
204
 
195
205
  describe('on a resource with parent folders that do not exist', describePatch({
@@ -200,7 +210,8 @@ describe('PATCH through text/n3', () => {
200
210
  }, {
201
211
  status: 201,
202
212
  text: 'Patch applied successfully',
203
- result: '@prefix : <#>.\n@prefix fol: <./>.\n\nfol:x fol:y fol:z.\n\n'
213
+ // result: '@prefix : <#>.\n@prefix fol: <./>.\n\nfol:x fol:y fol:z.\n\n'
214
+ result: '@prefix : <#>.\n\n<x> <y> <z>.\n\n'
204
215
  }))
205
216
  })
206
217
 
@@ -258,7 +269,8 @@ describe('PATCH through text/n3', () => {
258
269
  }, { // expected:
259
270
  status: 200,
260
271
  text: 'Patch applied successfully',
261
- result: '@prefix : </read-append.ttl#>.\n@prefix tim: </>.\n\ntim:a tim:b tim:c; tim:y tim:z.\n\ntim:d tim:e tim:f.\n\n'
272
+ // result: '@prefix : </read-append.ttl#>.\n@prefix tim: </>.\n\ntim:a tim:b tim:c; tim:y tim:z.\n\ntim:d tim:e tim:f.\n\n'
273
+ result: '@prefix : </read-append.ttl#>.\n\n</a> </b> </c>; </y> </z>.\n\n</d> </e> </f>.\n\n'
262
274
  }))
263
275
 
264
276
  describe('with a non-matching WHERE clause', describePatch({
@@ -281,7 +293,8 @@ describe('PATCH through text/n3', () => {
281
293
  }, { // expected:
282
294
  status: 200,
283
295
  text: 'Patch applied successfully',
284
- result: '@prefix : </read-write.ttl#>.\n@prefix tim: </>.\n\ntim:a tim:b tim:c; tim:y tim:z.\n\ntim:d tim:e tim:f.\n\n'
296
+ // result: '@prefix : </read-write.ttl#>.\n@prefix tim: </>.\n\ntim:a tim:b tim:c; tim:y tim:z.\n\ntim:d tim:e tim:f.\n\n'
297
+ result: '@prefix : </read-write.ttl#>.\n\n</a> </b> </c>; </y> </z>.\n\n</d> </e> </f>.\n\n'
285
298
  }))
286
299
 
287
300
  describe('with a non-matching WHERE clause', describePatch({
@@ -354,7 +367,8 @@ describe('PATCH through text/n3', () => {
354
367
  }, { // expected:
355
368
  status: 200,
356
369
  text: 'Patch applied successfully',
357
- result: '@prefix : </read-write.ttl#>.\n@prefix tim: </>.\n\ntim:d tim:e tim:f.\n\n'
370
+ // result: '@prefix : </read-write.ttl#>.\n@prefix tim: </>.\n\ntim:d tim:e tim:f.\n\n'
371
+ result: '@prefix : </read-write.ttl#>.\n\n</d> </e> </f>.\n\n'
358
372
  }))
359
373
 
360
374
  describe('with a patch for non-existing data', describePatch({
@@ -374,7 +388,8 @@ describe('PATCH through text/n3', () => {
374
388
  }, { // expected:
375
389
  status: 200,
376
390
  text: 'Patch applied successfully',
377
- result: '@prefix : </read-write.ttl#>.\n@prefix tim: </>.\n\ntim:d tim:e tim:f.\n\n'
391
+ // result: '@prefix : </read-write.ttl#>.\n@prefix tim: </>.\n\ntim:d tim:e tim:f.\n\n'
392
+ result: '@prefix : </read-write.ttl#>.\n\n</d> </e> </f>.\n\n'
378
393
  }))
379
394
 
380
395
  describe('with a non-matching WHERE clause', describePatch({
@@ -463,7 +478,8 @@ describe('PATCH through text/n3', () => {
463
478
  }, { // expected:
464
479
  status: 200,
465
480
  text: 'Patch applied successfully',
466
- result: '@prefix : </read-write.ttl#>.\n@prefix tim: </>.\n\ntim:d tim:e tim:f.\n\ntim:x tim:y tim:z.\n\n'
481
+ // result: '@prefix : </read-write.ttl#>.\n@prefix tim: </>.\n\ntim:d tim:e tim:f.\n\ntim:x tim:y tim:z.\n\n'
482
+ result: '@prefix : </read-write.ttl#>.\n\n</d> </e> </f>.\n\n</x> </y> </z>.\n\n'
467
483
  }))
468
484
 
469
485
  describe('with a patch for non-existing data', describePatch({
@@ -485,7 +501,8 @@ describe('PATCH through text/n3', () => {
485
501
  }, { // expected:
486
502
  status: 200,
487
503
  text: 'Patch applied successfully',
488
- result: '@prefix : </read-write.ttl#>.\n@prefix tim: </>.\n\ntim:a tim:y tim:z.\n\ntim:d tim:e tim:f.\n\n'
504
+ // result: '@prefix : </read-write.ttl#>.\n@prefix tim: </>.\n\ntim:a tim:y tim:z.\n\ntim:d tim:e tim:f.\n\n'
505
+ result: '@prefix : </read-write.ttl#>.\n\n</a> </y> </z>.\n\n</d> </e> </f>.\n\n'
489
506
  }))
490
507
 
491
508
  describe('with a non-matching WHERE clause', describePatch({
@@ -1 +1 @@
1
- {"redirect_uris":["https://localhost:3457/api/oidc/rp/https%3A%2F%2Flocalhost%3A3457"],"client_id":"30860bb5cf6ba07e80ed7b2e7178c7ad","client_secret":"1c1e6e8931bbc9b4eee4cd8ae84fe8e5","response_types":["code","id_token token","code id_token token"],"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"application_type":"web","client_name":"Solid OIDC RP for https://localhost:3457","id_token_signed_response_alg":"RS256","token_endpoint_auth_method":"client_secret_basic","default_max_age":86400,"post_logout_redirect_uris":["https://localhost:3457/goodbye"]}
1
+ {"redirect_uris":["https://localhost:3457/api/oidc/rp/https%3A%2F%2Flocalhost%3A3457"],"client_id":"3f892a91ab2dac850570901929cc6a9c","client_secret":"a0fd33274acf7897112f954e96ae1500","response_types":["code","id_token token","code id_token token"],"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"application_type":"web","client_name":"Solid OIDC RP for https://localhost:3457","id_token_signed_response_alg":"RS256","token_endpoint_auth_method":"client_secret_basic","default_max_age":86400,"post_logout_redirect_uris":["https://localhost:3457/goodbye"]}