From a898f5ea6af9a93c4a7550825884af464cb0a86d Mon Sep 17 00:00:00 2001 From: jaxoncreed Date: Fri, 18 Oct 2019 16:52:19 -0400 Subject: [PATCH 01/15] Remove confusing 2 from message --- lib/requests/sharing-request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/requests/sharing-request.js b/lib/requests/sharing-request.js index f534f3110..64e16658b 100644 --- a/lib/requests/sharing-request.js +++ b/lib/requests/sharing-request.js @@ -146,7 +146,7 @@ class SharingRequest extends AuthRequest { // Ensure the user arrived here by logging in if (!this.session.subject || !this.session.subject._id) { this.response.status(401) - this.response.send('User not logged in 2') + this.response.send('User not logged in') return false } return true From 23da604e3661f7fde849dbbfa1369b9fe813a586 Mon Sep 17 00:00:00 2001 From: jaxoncreed Date: Mon, 21 Oct 2019 16:40:44 -0400 Subject: [PATCH 02/15] Fix error when content type is not provided --- lib/ldp.js | 2 +- test/integration/http-test.js | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/lib/ldp.js b/lib/ldp.js index 76663685b..fcc40dbf7 100644 --- a/lib/ldp.js +++ b/lib/ldp.js @@ -158,7 +158,7 @@ class LDP { // HACK: the middleware in webid-oidc.js uses body-parser, thus ending the stream of data // for JSON bodies. So, the stream needs to be reset - if (contentType.includes('application/json')) { + if (contentType && contentType.includes('application/json')) { stream = intoStream(JSON.stringify(stream.body)) } diff --git a/test/integration/http-test.js b/test/integration/http-test.js index f1e70a1e3..51f3984f5 100644 --- a/test/integration/http-test.js +++ b/test/integration/http-test.js @@ -559,6 +559,29 @@ describe('HTTP APIs', function () { .expect(hasHeader('acl', suffixAcl)) .expect(201, done) }) + it('should create new resource even if body is empty', function (done) { + server.post('/post-tests/') + .set('slug', 'post-resource-empty') + .set('content-type', 'text/turtle') + .expect(hasHeader('describedBy', suffixMeta)) + .expect(hasHeader('acl', suffixAcl)) + .expect('location', /.*\.ttl/) + .expect(201, done) + }) + it('should error with 415 if the body is empty and no content type is provided', function (done) { + server.post('/post-tests/') + .set('slug', 'post-resource-empty-fail') + .expect(415, done) + }) + it('should create a resource if parsable rdf is provided but with no content-type header', function (done) { + server.post('/post-tests/') + .set('slug', 'post-resource-rdf-no-content-type') + .send(postRequest1Body) + .expect(hasHeader('describedBy', suffixMeta)) + .expect(hasHeader('acl', suffixAcl)) + .expect('location', '/post-tests/post-resource-rdf-no-content-type') + .expect(201, done) + }) it('should create new resource even if no trailing / is in the target', function (done) { server.post('') From bb2309d17baf6275d5de52ca2b1b4a6de71c06c3 Mon Sep 17 00:00:00 2001 From: jaxoncreed Date: Tue, 22 Oct 2019 15:22:11 -0400 Subject: [PATCH 03/15] Updated test to properly reflect not sending a content-type --- test/integration/http-test.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/integration/http-test.js b/test/integration/http-test.js index 51f3984f5..1df460360 100644 --- a/test/integration/http-test.js +++ b/test/integration/http-test.js @@ -573,14 +573,12 @@ describe('HTTP APIs', function () { .set('slug', 'post-resource-empty-fail') .expect(415, done) }) - it('should create a resource if parsable rdf is provided but with no content-type header', function (done) { + it('should error with 415 if the body is provided but there is no content-type header', function (done) { server.post('/post-tests/') .set('slug', 'post-resource-rdf-no-content-type') .send(postRequest1Body) - .expect(hasHeader('describedBy', suffixMeta)) - .expect(hasHeader('acl', suffixAcl)) - .expect('location', '/post-tests/post-resource-rdf-no-content-type') - .expect(201, done) + .set('content-type', '') + .expect(415, done) }) it('should create new resource even if no trailing / is in the target', function (done) { From 364be6b296f65b325de35ce3adc71a7f2b3a0e2c Mon Sep 17 00:00:00 2001 From: jaxoncreed Date: Wed, 23 Oct 2019 13:12:10 -0400 Subject: [PATCH 04/15] Resource mapper properly encodes special characters in the uri --- lib/resource-mapper.js | 5 ++++- test/unit/resource-mapper-test.js | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/resource-mapper.js b/lib/resource-mapper.js index bb5f6349c..36a7a645b 100644 --- a/lib/resource-mapper.js +++ b/lib/resource-mapper.js @@ -78,7 +78,10 @@ class ResourceMapper { // Determine the URL by chopping off everything after the dollar sign const pathname = this._removeDollarExtension(path) - const url = `${this.resolveUrl(hostname)}${encodeURI(pathname)}` + console.log(pathname) + const url = `${this.resolveUrl(hostname)}${ + pathname.split('/').map((component) => encodeURIComponent(component)).join('/') + }` return { url, contentType: this._getContentTypeByExtension(path) } } diff --git a/test/unit/resource-mapper-test.js b/test/unit/resource-mapper-test.js index fc22521e3..42c9865a8 100644 --- a/test/unit/resource-mapper-test.js +++ b/test/unit/resource-mapper-test.js @@ -478,6 +478,13 @@ describe('ResourceMapper', () => { url: 'http://localhost/space/foo%20bar%20bar.html', contentType: 'text/html' }) + + itMapsFile(mapper, 'a file with even stranger disallowed IRI characters', + { path: `${rootPath}space/Blog discovery for the future? · Issue #96 · scripting:Scripting-News · GitHub.pdf` }, + { + url: 'http://localhost/space/Blog%20discovery%20for%20the%20future%3F%20%C2%B7%20Issue%20%2396%20%C2%B7%20scripting%3AScripting-News%20%C2%B7%20GitHub.pdf', + contentType: 'application/pdf' + }) }) describe('A ResourceMapper instance for a multi-host setup', () => { From 508bc867d3cb6e878dd4af51bce7b9e6b2f10535 Mon Sep 17 00:00:00 2001 From: jaxoncreed Date: Wed, 23 Oct 2019 13:43:04 -0400 Subject: [PATCH 05/15] Use path.sep --- lib/resource-mapper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/resource-mapper.js b/lib/resource-mapper.js index 36a7a645b..492ff451f 100644 --- a/lib/resource-mapper.js +++ b/lib/resource-mapper.js @@ -4,6 +4,7 @@ const { promisify } = require('util') const { types, extensions } = require('mime-types') const readdir = promisify(fs.readdir) const HTTPError = require('./http-error') +const pathUtil = require('path') /* * A ResourceMapper maintains the mapping between HTTP URLs and server filenames, @@ -78,9 +79,8 @@ class ResourceMapper { // Determine the URL by chopping off everything after the dollar sign const pathname = this._removeDollarExtension(path) - console.log(pathname) const url = `${this.resolveUrl(hostname)}${ - pathname.split('/').map((component) => encodeURIComponent(component)).join('/') + pathname.split(pathUtil.sep).map((component) => encodeURIComponent(component)).join('/') }` return { url, contentType: this._getContentTypeByExtension(path) } } From 6f6f03aaa596b3af7535690680e81c86d8925898 Mon Sep 17 00:00:00 2001 From: bourgeoa Date: Wed, 23 Oct 2019 22:09:29 +0200 Subject: [PATCH 06/15] Add failing test for .mp3 extension. --- test/unit/resource-mapper-test.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/unit/resource-mapper-test.js b/test/unit/resource-mapper-test.js index fc22521e3..b0c7b7630 100644 --- a/test/unit/resource-mapper-test.js +++ b/test/unit/resource-mapper-test.js @@ -119,6 +119,17 @@ describe('ResourceMapper', () => { contentType: 'text/n3' }) + itMapsUrl(mapper, 'a URL with a file extension having more than one possible content type', + { + url: 'http://localhost/space/foo.mp3', + contentType: 'audio/mp3', + createIfNotExists: true + }, + { + path: `${rootPath}space/foo.mp3`, + contentType: 'audio/mp3' + }) + // GET/HEAD/POST/DELETE/PATCH base cases itMapsUrl(mapper, 'a URL of a non-existing file', From 750edb177af37552bf0b37d412c8d838c36259c6 Mon Sep 17 00:00:00 2001 From: Ruben Verborgh Date: Wed, 23 Oct 2019 23:43:45 +0200 Subject: [PATCH 07/15] Only add extension if it changes the content type. --- lib/resource-mapper.js | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/lib/resource-mapper.js b/lib/resource-mapper.js index bb5f6349c..54514cfa6 100644 --- a/lib/resource-mapper.js +++ b/lib/resource-mapper.js @@ -33,7 +33,7 @@ class ResourceMapper { this._defaultContentType = defaultContentType this._types = { ...types, ...overrideTypes } this._indexFilename = indexFilename - this._indexContentType = this._getContentTypeByExtension(indexFilename) + this._indexContentType = this._getContentTypeFromExtension(indexFilename) // If the host needs to be replaced on every call, pre-split the root URL if (includeHost) { @@ -79,7 +79,7 @@ class ResourceMapper { // Determine the URL by chopping off everything after the dollar sign const pathname = this._removeDollarExtension(path) const url = `${this.resolveUrl(hostname)}${encodeURI(pathname)}` - return { url, contentType: this._getContentTypeByExtension(path) } + return { url, contentType: this._getContentTypeFromExtension(path) } } // Maps the request for a given resource and representation format to a server file @@ -94,7 +94,7 @@ class ResourceMapper { let isFolder = filePath.endsWith('/') let isIndex = searchIndex && filePath.endsWith('/') - // Create the path for a new ressource + // Create the path for a new resource let path if (createIfNotExists) { path = filePath @@ -106,8 +106,8 @@ class ResourceMapper { path += this._indexFilename } // If the extension is not correct for the content type, append the correct extension - if (!isFolder && this._getContentTypeByExtension(path) !== contentType) { - path += `$${contentType in extensions ? `.${extensions[contentType][0]}` : '.unknown'}` + if (!isFolder) { + path = this._addContentTypeExtension(path, contentType) } // Determine the path of an existing file } else { @@ -136,7 +136,7 @@ class ResourceMapper { } } path = `${folder}${match}` - contentType = this._getContentTypeByExtension(match) + contentType = this._getContentTypeFromExtension(match) } return { path, contentType: contentType || this._defaultContentType } } @@ -157,11 +157,25 @@ class ResourceMapper { } // Gets the expected content type based on the extension of the path - _getContentTypeByExtension (path) { + _getContentTypeFromExtension (path) { const extension = /\.([^/.]+)$/.exec(path) return extension && this._types[extension[1].toLowerCase()] || this._defaultContentType } + // Appends an extension for the specific content type, if needed + _addContentTypeExtension (path, contentType) { + // If we would guess the wrong content type from the extension, try appending a better one + const contentTypeFromExtension = this._getContentTypeFromExtension(path) + if (contentTypeFromExtension !== contentType) { + // Some extensions fit multiple content types, so only switch if there's an improvement + const newExtension = contentType in extensions ? extensions[contentType][0] : 'unknown' + if (this._types[newExtension] !== contentTypeFromExtension) { + path += `$.${newExtension}` + } + } + return path + } + // Removes possible trailing slashes from a path _removeTrailingSlash (path) { return path.replace(/\/+$/, '') From 30f12166ae623fffbd9cf681bfdc6ff876b2b513 Mon Sep 17 00:00:00 2001 From: jaxoncreed Date: Wed, 23 Oct 2019 13:12:10 -0400 Subject: [PATCH 08/15] Resource mapper properly encodes special characters in the uri --- lib/resource-mapper.js | 5 ++++- test/unit/resource-mapper-test.js | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/resource-mapper.js b/lib/resource-mapper.js index bb5f6349c..36a7a645b 100644 --- a/lib/resource-mapper.js +++ b/lib/resource-mapper.js @@ -78,7 +78,10 @@ class ResourceMapper { // Determine the URL by chopping off everything after the dollar sign const pathname = this._removeDollarExtension(path) - const url = `${this.resolveUrl(hostname)}${encodeURI(pathname)}` + console.log(pathname) + const url = `${this.resolveUrl(hostname)}${ + pathname.split('/').map((component) => encodeURIComponent(component)).join('/') + }` return { url, contentType: this._getContentTypeByExtension(path) } } diff --git a/test/unit/resource-mapper-test.js b/test/unit/resource-mapper-test.js index fc22521e3..42c9865a8 100644 --- a/test/unit/resource-mapper-test.js +++ b/test/unit/resource-mapper-test.js @@ -478,6 +478,13 @@ describe('ResourceMapper', () => { url: 'http://localhost/space/foo%20bar%20bar.html', contentType: 'text/html' }) + + itMapsFile(mapper, 'a file with even stranger disallowed IRI characters', + { path: `${rootPath}space/Blog discovery for the future? · Issue #96 · scripting:Scripting-News · GitHub.pdf` }, + { + url: 'http://localhost/space/Blog%20discovery%20for%20the%20future%3F%20%C2%B7%20Issue%20%2396%20%C2%B7%20scripting%3AScripting-News%20%C2%B7%20GitHub.pdf', + contentType: 'application/pdf' + }) }) describe('A ResourceMapper instance for a multi-host setup', () => { From 89ba51ef987daa2361857529921b5fccace93199 Mon Sep 17 00:00:00 2001 From: jaxoncreed Date: Wed, 23 Oct 2019 13:43:04 -0400 Subject: [PATCH 09/15] Use path.sep --- lib/resource-mapper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/resource-mapper.js b/lib/resource-mapper.js index 36a7a645b..492ff451f 100644 --- a/lib/resource-mapper.js +++ b/lib/resource-mapper.js @@ -4,6 +4,7 @@ const { promisify } = require('util') const { types, extensions } = require('mime-types') const readdir = promisify(fs.readdir) const HTTPError = require('./http-error') +const pathUtil = require('path') /* * A ResourceMapper maintains the mapping between HTTP URLs and server filenames, @@ -78,9 +79,8 @@ class ResourceMapper { // Determine the URL by chopping off everything after the dollar sign const pathname = this._removeDollarExtension(path) - console.log(pathname) const url = `${this.resolveUrl(hostname)}${ - pathname.split('/').map((component) => encodeURIComponent(component)).join('/') + pathname.split(pathUtil.sep).map((component) => encodeURIComponent(component)).join('/') }` return { url, contentType: this._getContentTypeByExtension(path) } } From 8e9820d4347832697e312ecc3d5e6b37d4b41813 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Wed, 6 Nov 2019 20:31:56 +0000 Subject: [PATCH 10/15] Fixed user not logged in 2 --- lib/create-app.js | 1 + lib/requests/sharing-request.js | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/create-app.js b/lib/create-app.js index 5cff5d5a9..6bb8c09ea 100644 --- a/lib/create-app.js +++ b/lib/create-app.js @@ -296,6 +296,7 @@ function initAuthentication (app, argv) { */ function sessionSettings (secureCookies, host) { let sessionSettings = { + name: 'solid.auth', secret: uuid.v1(), saveUninitialized: false, resave: false, diff --git a/lib/requests/sharing-request.js b/lib/requests/sharing-request.js index 64e16658b..01052eeba 100644 --- a/lib/requests/sharing-request.js +++ b/lib/requests/sharing-request.js @@ -82,6 +82,8 @@ class SharingRequest extends AuthRequest { } else { request.renderForm(null, req, appOrigin) } + } else { + request.redirectPostSharing() } } @@ -119,6 +121,8 @@ class SharingRequest extends AuthRequest { // Redirect once that's all done request.redirectPostSharing() + } else { + request.redirectPostSharing() } } @@ -144,12 +148,7 @@ class SharingRequest extends AuthRequest { isUserLoggedIn () { // Ensure the user arrived here by logging in - if (!this.session.subject || !this.session.subject._id) { - this.response.status(401) - this.response.send('User not logged in') - return false - } - return true + return !!(this.session.subject && this.session.subject._id) } getAppUrl () { From 7e5ef824a13546dcf652759ac0de0b45c145e370 Mon Sep 17 00:00:00 2001 From: jaxoncreed Date: Wed, 6 Nov 2019 15:51:00 -0500 Subject: [PATCH 11/15] Fix tests for new cookie name --- lib/create-app.js | 2 +- test/integration/authentication-oidc-test.js | 12 ++++++------ ...ation-oidc-with-strict-origins-turned-off-test.js | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/create-app.js b/lib/create-app.js index 6bb8c09ea..0d7a365a2 100644 --- a/lib/create-app.js +++ b/lib/create-app.js @@ -296,7 +296,7 @@ function initAuthentication (app, argv) { */ function sessionSettings (secureCookies, host) { let sessionSettings = { - name: 'solid.auth', + name: 'nssidp.sid', secret: uuid.v1(), saveUninitialized: false, resave: false, diff --git a/test/integration/authentication-oidc-test.js b/test/integration/authentication-oidc-test.js index 76422fc0f..77a74abb0 100644 --- a/test/integration/authentication-oidc-test.js +++ b/test/integration/authentication-oidc-test.js @@ -137,7 +137,7 @@ describe('Authentication API (OIDC)', () => { }) it('should set the cookie', () => { - expect(cookie).to.match(/connect.sid=\S{65,100}/) + expect(cookie).to.match(/nssidp.sid=\S{65,100}/) }) it('should set the cookie with HttpOnly', () => { @@ -247,7 +247,7 @@ describe('Authentication API (OIDC)', () => { describe('with malicious cookie but without origin', () => { let response before(done => { - var malcookie = cookie.replace(/connect\.sid=(\S+)/, 'connect.sid=l33th4x0rzp0wn4g3;') + var malcookie = cookie.replace(/nssidp\.sid=(\S+)/, 'nssidp.sid=l33th4x0rzp0wn4g3;') alice.get('/private-for-alice.txt') .set('Cookie', malcookie) .end((err, res) => { @@ -353,7 +353,7 @@ describe('Authentication API (OIDC)', () => { describe('with malicious cookie but with globally configured origin', () => { let response before(done => { - var malcookie = cookie.replace(/connect\.sid=(\S+)/, 'connect.sid=l33th4x0rzp0wn4g3;') + var malcookie = cookie.replace(/nssidp\.sid=(\S+)/, 'nssidp.sid=l33th4x0rzp0wn4g3;') alice.get('/private-for-alice.txt') .set('Cookie', malcookie) .set('Origin', 'https://apps.solid.invalid') @@ -407,7 +407,7 @@ describe('Authentication API (OIDC)', () => { describe('with malicious cookie and our origin', () => { let response before(done => { - var malcookie = cookie.replace(/connect\.sid=(\S+)/, 'connect.sid=l33th4x0rzp0wn4g3;') + var malcookie = cookie.replace(/nssidp\.sid=(\S+)/, 'nssidp.sid=l33th4x0rzp0wn4g3;') alice.get('/private-for-alice.txt') .set('Cookie', malcookie) .set('Origin', aliceServerUri) @@ -425,7 +425,7 @@ describe('Authentication API (OIDC)', () => { describe('with malicious cookie and a non-matching origin', () => { let response before(done => { - var malcookie = cookie.replace(/connect\.sid=(\S+)/, 'connect.sid=l33th4x0rzp0wn4g3;') + var malcookie = cookie.replace(/nssidp\.sid=(\S+)/, 'nssidp.sid=l33th4x0rzp0wn4g3;') alice.get('/private-for-owner.txt') .set('Cookie', malcookie) .set('Origin', bobServerUri) @@ -455,7 +455,7 @@ describe('Authentication API (OIDC)', () => { describe('with trusted app and malicious cookie', () => { before(done => { - var malcookie = cookie.replace(/connect\.sid=(\S+)/, 'connect.sid=l33th4x0rzp0wn4g3;') + var malcookie = cookie.replace(/nssidp\.sid=(\S+)/, 'nssidp.sid=l33th4x0rzp0wn4g3;') alice.get('/private-for-alice.txt') .set('Cookie', malcookie) .set('Origin', trustedAppUri) diff --git a/test/integration/authentication-oidc-with-strict-origins-turned-off-test.js b/test/integration/authentication-oidc-with-strict-origins-turned-off-test.js index 104e103b9..e2a5cf489 100644 --- a/test/integration/authentication-oidc-with-strict-origins-turned-off-test.js +++ b/test/integration/authentication-oidc-with-strict-origins-turned-off-test.js @@ -134,7 +134,7 @@ describe('Authentication API (OIDC) - With strict origins turned off', () => { }) it('should set the cookie', () => { - expect(cookie).to.match(/connect.sid=\S{65,100}/) + expect(cookie).to.match(/nssidp.sid=\S{65,100}/) }) it('should set the cookie with HttpOnly', () => { @@ -286,7 +286,7 @@ describe('Authentication API (OIDC) - With strict origins turned off', () => { let malcookie before(() => { // How Mallory might set their cookie: - malcookie = cookie.replace(/connect\.sid=(\S+)/, 'connect.sid=l33th4x0rzp0wn4g3;') + malcookie = cookie.replace(/nssidp\.sid=(\S+)/, 'nssidp.sid=l33th4x0rzp0wn4g3;') }) describe('and no origin set', () => { before(done => { From 1593a4c6cb2392ee01291fc89c53ac4d1683f6e6 Mon Sep 17 00:00:00 2001 From: jaxoncreed Date: Wed, 6 Nov 2019 16:57:35 -0500 Subject: [PATCH 12/15] Fixed 1321 allowing for ranked accept mime types when requesting index.html --- lib/handlers/get.js | 2 +- test/integration/http-test.js | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/handlers/get.js b/lib/handlers/get.js index dfc9549bd..9ce9c614a 100644 --- a/lib/handlers/get.js +++ b/lib/handlers/get.js @@ -45,7 +45,7 @@ async function handler (req, res, next) { let ret try { - ret = await ldp.get(options, req.accepts('html')) + ret = await ldp.get(options, req.accepts(['html', 'turtle', 'rdf+xml', 'n3', 'ld+json']) === 'html') } catch (err) { // use globHandler if magic is detected if (err.status === 404 && glob.hasMagic(path)) { diff --git a/test/integration/http-test.js b/test/integration/http-test.js index 1df460360..972e2cf6e 100644 --- a/test/integration/http-test.js +++ b/test/integration/http-test.js @@ -379,6 +379,20 @@ describe('HTTP APIs', function () { .expect('content-type', /text\/html/) .end(done) }) + it('should return turtle if requesting a conatiner that has index.html with conteent-type text/turtle', (done) => { + server.get('/sampleContainer/') + .set('accept', 'text/turtle') + .expect(200) + .expect('content-type', /text\/turtle/) + .end(done) + }) + it('should return turtle if requesting a container that conatins an index.html file with a content type where some rdf format is ranked higher than html', (done) => { + server.get('/sampleContainer/') + .set('accept', 'image/*;q=0.9, */*;q=0.1, application/rdf+xml;q=0.9, application/xhtml+xml, text/xml;q=0.5, application/xml;q=0.5, text/html;q=0.9, text/plain;q=0.5, text/n3;q=1.0, text/turtle;q=1') + .expect(200) + .expect('content-type', /text\/turtle/) + .end(done) + }) it('should still redirect to the right container URI if missing / and HTML is requested', function (done) { server.get('/sampleContainer') From ca65cf32bea1c4b522d76d813ad8af0c4867566f Mon Sep 17 00:00:00 2001 From: Arne Hassel Date: Thu, 7 Nov 2019 10:48:32 +0100 Subject: [PATCH 13/15] Bump deps: mashlib --- package-lock.json | 276 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 138 insertions(+), 140 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6d0ba4f66..fb07ca5d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -118,9 +118,9 @@ "dev": true }, "@babel/polyfill": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.6.0.tgz", - "integrity": "sha512-q5BZJI0n/B10VaQQvln1IlDK3BTBJFbADx7tv+oXDPIDZuTo37H5Adb9jhlXm/fEN4Y7/64qD9mnrJJG7rmaTw==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.7.0.tgz", + "integrity": "sha512-/TS23MVvo34dFmf8mwCisCbWGrfhbiWZSwBo6HkADTBhUa2Q/jWltyY/tpofz/b6/RIhqaqQcquptCirqIhOaQ==", "requires": { "core-js": "^2.6.5", "regenerator-runtime": "^0.13.2" @@ -2144,9 +2144,9 @@ "integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=" }, "caniuse-lite": { - "version": "1.0.30001002", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001002.tgz", - "integrity": "sha512-pRuxPE8wdrWmVPKcDmJJiGBxr6lFJq4ivdSeo9FTmGj5Rb8NX3Mby2pARG57MXF15hYAhZ0nHV5XxT2ig4bz3g==" + "version": "1.0.30001008", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001008.tgz", + "integrity": "sha512-b8DJyb+VVXZGRgJUa30cbk8gKHZ3LOZTBLaUEEVr2P4xpmFigOCc62CO4uzquW641Ouq1Rm9N+rWLWdSYDaDIw==" }, "canonicalize": { "version": "1.0.1", @@ -3218,9 +3218,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "electron-to-chromium": { - "version": "1.3.292", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.292.tgz", - "integrity": "sha512-hqkem5ANpt6mxVXmhAmlbdG8iicuyM/jEYgmP1tiHPeOLyZoTyGUzrDmJS/xyrrZy9frkW1uQcubicu7f6DS5g==" + "version": "1.3.305", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.305.tgz", + "integrity": "sha512-jBEhRZ3eeJWf3eAnGYB1vDy09uBQpZWshC5fxiiIRofA9L3vkpa3SxsXleVS2MvuYir15oTVxzWPsOwj7KBzUw==" }, "elliptic": { "version": "6.5.0", @@ -4044,9 +4044,9 @@ "integrity": "sha512-4vx/aaY6j/j3Lw3fbCHNWP0pPaTCew3F6F3hYyl/tHs/ndmV1q7NW9T5yuJ2XAGwdQrP+6Wu20x06U4APo/iQQ==" }, "jsonld": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/jsonld/-/jsonld-1.8.0.tgz", - "integrity": "sha512-a3bwbR0wqFstxKsGoimUIIKBdfJ+yb9kWK+WK7MpVyvfYtITMpUtF3sNoN1wG/W+jGDgya0ACRh++jtTozxtyQ==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/jsonld/-/jsonld-1.8.1.tgz", + "integrity": "sha512-f0rusl5v8aPKS3jApT5fhYsdTC/JpyK1PoJ+ZtYYtZXoyb1J0Z///mJqLwrfL/g4NueFSqPymDYIi1CcSk7b8Q==", "requires": { "canonicalize": "^1.0.1", "rdf-canonize": "^1.0.2", @@ -4063,9 +4063,9 @@ } }, "n3": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/n3/-/n3-1.2.1.tgz", - "integrity": "sha512-5va8zsh02owDul7+5bj35cGOzWU7DeJHwQK3F8NDKtiYqPgWcFTg/zLxJs1JeRF2n6j5PI/eR9DCokS7nLrevA==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/n3/-/n3-1.3.0.tgz", + "integrity": "sha512-qTbZPDpEc/+dUHMpC/WUi4bQbFdnKsb2ra/bE+pWdSvshzQeZLhCYtKQk4kQytTn2b625//eDBZYNda2wBjcfw==" }, "rdflib": { "version": "1.0.6", @@ -5248,9 +5248,9 @@ "integrity": "sha512-4vx/aaY6j/j3Lw3fbCHNWP0pPaTCew3F6F3hYyl/tHs/ndmV1q7NW9T5yuJ2XAGwdQrP+6Wu20x06U4APo/iQQ==" }, "jsonld": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/jsonld/-/jsonld-1.8.0.tgz", - "integrity": "sha512-a3bwbR0wqFstxKsGoimUIIKBdfJ+yb9kWK+WK7MpVyvfYtITMpUtF3sNoN1wG/W+jGDgya0ACRh++jtTozxtyQ==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/jsonld/-/jsonld-1.8.1.tgz", + "integrity": "sha512-f0rusl5v8aPKS3jApT5fhYsdTC/JpyK1PoJ+ZtYYtZXoyb1J0Z///mJqLwrfL/g4NueFSqPymDYIi1CcSk7b8Q==", "requires": { "canonicalize": "^1.0.1", "rdf-canonize": "^1.0.2", @@ -5267,9 +5267,9 @@ } }, "n3": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/n3/-/n3-1.2.1.tgz", - "integrity": "sha512-5va8zsh02owDul7+5bj35cGOzWU7DeJHwQK3F8NDKtiYqPgWcFTg/zLxJs1JeRF2n6j5PI/eR9DCokS7nLrevA==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/n3/-/n3-1.3.0.tgz", + "integrity": "sha512-qTbZPDpEc/+dUHMpC/WUi4bQbFdnKsb2ra/bE+pWdSvshzQeZLhCYtKQk4kQytTn2b625//eDBZYNda2wBjcfw==" }, "rdflib": { "version": "1.0.6", @@ -5782,15 +5782,15 @@ } }, "mashlib": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/mashlib/-/mashlib-1.1.6.tgz", - "integrity": "sha512-tlLemXpGyITMcGH7Cqsdv9HbiOHqaR5amegkOOPtw7eekdknb33bcFLCeeoZMzG13l8yhT8P4aAZnKi5AQZgfA==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/mashlib/-/mashlib-1.1.7.tgz", + "integrity": "sha512-2siUfcuxslMxHvTlhGrl4Oj3/P+72BFVYQt5itT0MUWC2aICpqF4K04Nq1Q9u9kOd9ORmW6+IR38CLQU15qPVw==", "requires": { "normalize.css": "^8.0.1", - "rdflib": "^1.0.6", + "rdflib": "^1.0.4", "solid-namespace": "^0.2.0", - "solid-panes": "^2.0.3", - "solid-ui": "^1.2.4" + "solid-panes": "^2.0.4", + "solid-ui": "^1.2.5" }, "dependencies": { "async": { @@ -5799,9 +5799,9 @@ "integrity": "sha512-4vx/aaY6j/j3Lw3fbCHNWP0pPaTCew3F6F3hYyl/tHs/ndmV1q7NW9T5yuJ2XAGwdQrP+6Wu20x06U4APo/iQQ==" }, "jsonld": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/jsonld/-/jsonld-1.8.0.tgz", - "integrity": "sha512-a3bwbR0wqFstxKsGoimUIIKBdfJ+yb9kWK+WK7MpVyvfYtITMpUtF3sNoN1wG/W+jGDgya0ACRh++jtTozxtyQ==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/jsonld/-/jsonld-1.8.1.tgz", + "integrity": "sha512-f0rusl5v8aPKS3jApT5fhYsdTC/JpyK1PoJ+ZtYYtZXoyb1J0Z///mJqLwrfL/g4NueFSqPymDYIi1CcSk7b8Q==", "requires": { "canonicalize": "^1.0.1", "rdf-canonize": "^1.0.2", @@ -5818,9 +5818,9 @@ } }, "n3": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/n3/-/n3-1.2.1.tgz", - "integrity": "sha512-5va8zsh02owDul7+5bj35cGOzWU7DeJHwQK3F8NDKtiYqPgWcFTg/zLxJs1JeRF2n6j5PI/eR9DCokS7nLrevA==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/n3/-/n3-1.3.0.tgz", + "integrity": "sha512-qTbZPDpEc/+dUHMpC/WUi4bQbFdnKsb2ra/bE+pWdSvshzQeZLhCYtKQk4kQytTn2b625//eDBZYNda2wBjcfw==" }, "rdflib": { "version": "1.0.6", @@ -5877,9 +5877,9 @@ "integrity": "sha512-4vx/aaY6j/j3Lw3fbCHNWP0pPaTCew3F6F3hYyl/tHs/ndmV1q7NW9T5yuJ2XAGwdQrP+6Wu20x06U4APo/iQQ==" }, "jsonld": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/jsonld/-/jsonld-1.8.0.tgz", - "integrity": "sha512-a3bwbR0wqFstxKsGoimUIIKBdfJ+yb9kWK+WK7MpVyvfYtITMpUtF3sNoN1wG/W+jGDgya0ACRh++jtTozxtyQ==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/jsonld/-/jsonld-1.8.1.tgz", + "integrity": "sha512-f0rusl5v8aPKS3jApT5fhYsdTC/JpyK1PoJ+ZtYYtZXoyb1J0Z///mJqLwrfL/g4NueFSqPymDYIi1CcSk7b8Q==", "requires": { "canonicalize": "^1.0.1", "rdf-canonize": "^1.0.2", @@ -5896,9 +5896,9 @@ } }, "n3": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/n3/-/n3-1.2.1.tgz", - "integrity": "sha512-5va8zsh02owDul7+5bj35cGOzWU7DeJHwQK3F8NDKtiYqPgWcFTg/zLxJs1JeRF2n6j5PI/eR9DCokS7nLrevA==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/n3/-/n3-1.3.0.tgz", + "integrity": "sha512-qTbZPDpEc/+dUHMpC/WUi4bQbFdnKsb2ra/bE+pWdSvshzQeZLhCYtKQk4kQytTn2b625//eDBZYNda2wBjcfw==" }, "rdflib": { "version": "1.0.6", @@ -8994,9 +8994,9 @@ } }, "jsonld": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/jsonld/-/jsonld-1.8.0.tgz", - "integrity": "sha512-a3bwbR0wqFstxKsGoimUIIKBdfJ+yb9kWK+WK7MpVyvfYtITMpUtF3sNoN1wG/W+jGDgya0ACRh++jtTozxtyQ==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/jsonld/-/jsonld-1.8.1.tgz", + "integrity": "sha512-f0rusl5v8aPKS3jApT5fhYsdTC/JpyK1PoJ+ZtYYtZXoyb1J0Z///mJqLwrfL/g4NueFSqPymDYIi1CcSk7b8Q==", "requires": { "canonicalize": "^1.0.1", "rdf-canonize": "^1.0.2", @@ -9006,9 +9006,9 @@ } }, "n3": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/n3/-/n3-1.2.1.tgz", - "integrity": "sha512-5va8zsh02owDul7+5bj35cGOzWU7DeJHwQK3F8NDKtiYqPgWcFTg/zLxJs1JeRF2n6j5PI/eR9DCokS7nLrevA==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/n3/-/n3-1.3.0.tgz", + "integrity": "sha512-qTbZPDpEc/+dUHMpC/WUi4bQbFdnKsb2ra/bE+pWdSvshzQeZLhCYtKQk4kQytTn2b625//eDBZYNda2wBjcfw==" }, "xmldom": { "version": "0.1.19", @@ -9043,9 +9043,9 @@ } }, "solid-panes": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/solid-panes/-/solid-panes-2.0.3.tgz", - "integrity": "sha512-65nqSO7dpmpiwRhqLFLcu2tHdJOf8ZiPmxDPbXRzSwqDi2dBZTWf7TmYt3+ArYMBtdqJLa9w5sM4mzdQYANZsw==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/solid-panes/-/solid-panes-2.0.4.tgz", + "integrity": "sha512-xRLUcPfp115xqDMGkYK7DMxN0r7TTMGGbRF2gKmsojn9l1P8c6Ro5tUl3WPLLtR7yGc5oOJIhQWMjj4sa6rSpQ==", "requires": { "@babel/polyfill": "^7.4.4", "@solid/better-simple-slideshow": "^0.1.0", @@ -9060,22 +9060,45 @@ "pane-registry": "^1.0.4", "rdflib": "^1.0.6", "solid-namespace": "^0.2.0", - "solid-ui": "^1.2.4", + "solid-ui": "^1.2.5", "source-pane": "^1.0.3", "ts-lint": "^4.5.1", "tslint": "^5.19.0", "tslint-config-standard": "^8.0.1" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, "async": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/async/-/async-3.1.0.tgz", "integrity": "sha512-4vx/aaY6j/j3Lw3fbCHNWP0pPaTCew3F6F3hYyl/tHs/ndmV1q7NW9T5yuJ2XAGwdQrP+6Wu20x06U4APo/iQQ==" }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "diff": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz", + "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==" + }, "jsonld": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/jsonld/-/jsonld-1.8.0.tgz", - "integrity": "sha512-a3bwbR0wqFstxKsGoimUIIKBdfJ+yb9kWK+WK7MpVyvfYtITMpUtF3sNoN1wG/W+jGDgya0ACRh++jtTozxtyQ==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/jsonld/-/jsonld-1.8.1.tgz", + "integrity": "sha512-f0rusl5v8aPKS3jApT5fhYsdTC/JpyK1PoJ+ZtYYtZXoyb1J0Z///mJqLwrfL/g4NueFSqPymDYIi1CcSk7b8Q==", "requires": { "canonicalize": "^1.0.1", "rdf-canonize": "^1.0.2", @@ -9092,9 +9115,9 @@ } }, "n3": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/n3/-/n3-1.2.1.tgz", - "integrity": "sha512-5va8zsh02owDul7+5bj35cGOzWU7DeJHwQK3F8NDKtiYqPgWcFTg/zLxJs1JeRF2n6j5PI/eR9DCokS7nLrevA==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/n3/-/n3-1.3.0.tgz", + "integrity": "sha512-qTbZPDpEc/+dUHMpC/WUi4bQbFdnKsb2ra/bE+pWdSvshzQeZLhCYtKQk4kQytTn2b625//eDBZYNda2wBjcfw==" }, "rdflib": { "version": "1.0.6", @@ -9115,19 +9138,40 @@ "resolved": "https://registry.npmjs.org/solid-namespace/-/solid-namespace-0.2.0.tgz", "integrity": "sha512-yQGQlTNDVtcMfzLz7OwL6Z8lJy9rN1ep0MgX28DPcja0DtA5pu1MzTpBVD9kvXl9X6eSEX73I7IYt0cUim0DrA==" }, - "ts-lint": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/ts-lint/-/ts-lint-4.5.1.tgz", - "integrity": "sha1-nCK3t7hitnMk3RvSE6hFwDp/uMA=", + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "requires": { - "babel-code-frame": "^6.20.0", - "colors": "^1.1.2", - "diff": "^3.0.1", - "findup-sync": "~0.3.0", + "has-flag": "^3.0.0" + } + }, + "tslint": { + "version": "5.20.1", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.20.1.tgz", + "integrity": "sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg==", + "requires": { + "@babel/code-frame": "^7.0.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^4.0.1", "glob": "^7.1.1", - "optimist": "~0.6.0", - "resolve": "^1.1.7", - "tsutils": "^1.1.0" + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.8.0", + "tsutils": "^2.29.0" + } + }, + "tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "requires": { + "tslib": "^1.8.1" } } } @@ -9193,9 +9237,9 @@ } }, "solid-ui": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/solid-ui/-/solid-ui-1.2.4.tgz", - "integrity": "sha512-gD20WmykMy5fmAHIcDPn6vqCkOmYgp1IcUFzV2pnb5kMpqPW5FOJJAhn8y3je5V3fGeFfpGFkruM76d6jHYCrA==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/solid-ui/-/solid-ui-1.2.5.tgz", + "integrity": "sha512-ZL70bU6Sw3Kwec2Piuu7miGaGvKmS89M2uzfb8rwkaB7nU1+v88mFbGl42PRcK16pS0eFrcR3g21+ydQ90xOmQ==", "requires": { "@babel/runtime": "^7.6.2", "escape-html": "^1.0.3", @@ -9208,9 +9252,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.6.3.tgz", - "integrity": "sha512-kq6anf9JGjW8Nt5rYfEuGRaEAaH1mkv3Bbu6rYvLOpPh/RusSJXuKPEAoZ7L7gybZkchE8+NV5g9vKF4AGAtsA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.7.2.tgz", + "integrity": "sha512-JONRbXbTXc9WQE2mAZd1p0Z3DZ/6vaQIkgYMSTP3KjRCyd7rCZCcfhCyX+YjwcKxcZ82UrxbRD358bpExNgrjw==", "requires": { "regenerator-runtime": "^0.13.2" } @@ -9221,9 +9265,9 @@ "integrity": "sha512-4vx/aaY6j/j3Lw3fbCHNWP0pPaTCew3F6F3hYyl/tHs/ndmV1q7NW9T5yuJ2XAGwdQrP+6Wu20x06U4APo/iQQ==" }, "jsonld": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/jsonld/-/jsonld-1.8.0.tgz", - "integrity": "sha512-a3bwbR0wqFstxKsGoimUIIKBdfJ+yb9kWK+WK7MpVyvfYtITMpUtF3sNoN1wG/W+jGDgya0ACRh++jtTozxtyQ==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/jsonld/-/jsonld-1.8.1.tgz", + "integrity": "sha512-f0rusl5v8aPKS3jApT5fhYsdTC/JpyK1PoJ+ZtYYtZXoyb1J0Z///mJqLwrfL/g4NueFSqPymDYIi1CcSk7b8Q==", "requires": { "canonicalize": "^1.0.1", "rdf-canonize": "^1.0.2", @@ -9240,9 +9284,9 @@ } }, "n3": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/n3/-/n3-1.2.1.tgz", - "integrity": "sha512-5va8zsh02owDul7+5bj35cGOzWU7DeJHwQK3F8NDKtiYqPgWcFTg/zLxJs1JeRF2n6j5PI/eR9DCokS7nLrevA==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/n3/-/n3-1.3.0.tgz", + "integrity": "sha512-qTbZPDpEc/+dUHMpC/WUi4bQbFdnKsb2ra/bE+pWdSvshzQeZLhCYtKQk4kQytTn2b625//eDBZYNda2wBjcfw==" }, "node-uuid": { "version": "1.4.8", @@ -10183,72 +10227,26 @@ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", "dev": true }, + "ts-lint": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/ts-lint/-/ts-lint-4.5.1.tgz", + "integrity": "sha1-nCK3t7hitnMk3RvSE6hFwDp/uMA=", + "requires": { + "babel-code-frame": "^6.20.0", + "colors": "^1.1.2", + "diff": "^3.0.1", + "findup-sync": "~0.3.0", + "glob": "^7.1.1", + "optimist": "~0.6.0", + "resolve": "^1.1.7", + "tsutils": "^1.1.0" + } + }, "tslib": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" }, - "tslint": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.20.0.tgz", - "integrity": "sha512-2vqIvkMHbnx8acMogAERQ/IuINOq6DFqgF8/VDvhEkBqQh/x6SP0Y+OHnKth9/ZcHQSroOZwUQSN18v8KKF0/g==", - "requires": { - "@babel/code-frame": "^7.0.0", - "builtin-modules": "^1.1.1", - "chalk": "^2.3.0", - "commander": "^2.12.1", - "diff": "^4.0.1", - "glob": "^7.1.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.29.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "diff": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz", - "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==" - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - }, - "tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", - "requires": { - "tslib": "^1.8.1" - } - } - } - }, "tslint-config-standard": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/tslint-config-standard/-/tslint-config-standard-8.0.1.tgz", diff --git a/package.json b/package.json index 345be15a4..1c31107ba 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "ip-range-check": "0.0.2", "is-ip": "^2.0.0", "li": "^1.0.1", - "mashlib": "^1.1.6", + "mashlib": "^1.1.7", "mime-types": "^2.1.11", "mkdir-recursive": "^0.4.0", "negotiator": "^0.6.0", From a2882cf5cc44964af63374c02263c32940620fe9 Mon Sep 17 00:00:00 2001 From: bourgeoa Date: Thu, 7 Nov 2019 22:41:13 +0100 Subject: [PATCH 14/15] PUT copy body for contentType application/json --- lib/ldp.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/ldp.js b/lib/ldp.js index 76663685b..ea1c2b2a6 100644 --- a/lib/ldp.js +++ b/lib/ldp.js @@ -156,12 +156,6 @@ class LDP { } // const { url: putUrl } = await this.resourceMapper.mapFileToUrl({ path: resourceUrl, hostname }) - // HACK: the middleware in webid-oidc.js uses body-parser, thus ending the stream of data - // for JSON bodies. So, the stream needs to be reset - if (contentType.includes('application/json')) { - stream = intoStream(JSON.stringify(stream.body)) - } - await ldp.put(resourceUrl, stream, contentType) return URL.parse(originalUrl).path } @@ -240,6 +234,11 @@ class LDP { // Directory created, now write the file return withLock(path, { mustExist: false }, () => new Promise((resolve, reject) => { + // HACK: the middleware in webid-oidc.js uses body-parser, thus ending the stream of data + // for JSON bodies. So, the stream needs to be reset + if (contentType.includes('application/json')) { + stream = intoStream(JSON.stringify(stream.body)) + } const file = stream.pipe(fs.createWriteStream(path)) file.on('error', function () { reject(error(500, 'Error writing data')) From d3a8321d5e596a739b111d1b7ca228a1dc1471ce Mon Sep 17 00:00:00 2001 From: jaxoncreed Date: Wed, 13 Nov 2019 12:09:26 -0500 Subject: [PATCH 15/15] Bump to version 5.2.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1c31107ba..b4ad7225d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "solid-server", "description": "Solid server on top of the file-system", - "version": "5.2.1", + "version": "5.2.2", "author": { "name": "Tim Berners-Lee", "email": "timbl@w3.org"