mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
refactor: Update eslint related dependencies
This commit is contained in:
parent
c150da337e
commit
9657fbafb1
12
.eslintrc.js
12
.eslintrc.js
@ -24,9 +24,13 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
'@typescript-eslint/lines-between-class-members': [ 'error', { exceptAfterSingleLine: true }],
|
||||||
|
'@typescript-eslint/naming-convention': 'off',
|
||||||
'@typescript-eslint/no-empty-interface': 'off',
|
'@typescript-eslint/no-empty-interface': 'off',
|
||||||
|
'@typescript-eslint/no-invalid-void-type': 'off', // breaks with default void in Asynchandler 2nd generic
|
||||||
'@typescript-eslint/no-unnecessary-condition': 'off', // problems with optional parameters
|
'@typescript-eslint/no-unnecessary-condition': 'off', // problems with optional parameters
|
||||||
'@typescript-eslint/space-before-function-paren': [ 'error', 'never' ],
|
'@typescript-eslint/space-before-function-paren': [ 'error', 'never' ],
|
||||||
|
'@typescript-eslint/unbound-method': 'off',
|
||||||
'@typescript-eslint/unified-signatures': 'off',
|
'@typescript-eslint/unified-signatures': 'off',
|
||||||
'class-methods-use-this': 'off', // conflicts with functions from interfaces that sometimes don't require `this`
|
'class-methods-use-this': 'off', // conflicts with functions from interfaces that sometimes don't require `this`
|
||||||
'comma-dangle': ['error', 'always-multiline'],
|
'comma-dangle': ['error', 'always-multiline'],
|
||||||
@ -39,7 +43,10 @@ module.exports = {
|
|||||||
'padding-line-between-statements': 'off',
|
'padding-line-between-statements': 'off',
|
||||||
'prefer-named-capture-group': 'off',
|
'prefer-named-capture-group': 'off',
|
||||||
'tsdoc/syntax': 'error',
|
'tsdoc/syntax': 'error',
|
||||||
|
'unicorn/catch-error-name': 'off',
|
||||||
|
'unicorn/import-index': 'off',
|
||||||
'unicorn/no-fn-reference-in-iterator': 'off', // this prevents some functional programming paradigms
|
'unicorn/no-fn-reference-in-iterator': 'off', // this prevents some functional programming paradigms
|
||||||
|
'unicorn/no-object-as-default-parameter': 'off',
|
||||||
|
|
||||||
// Import
|
// Import
|
||||||
'sort-imports': 'off', // Disabled in favor of eslint-plugin-import
|
'sort-imports': 'off', // Disabled in favor of eslint-plugin-import
|
||||||
@ -49,8 +56,9 @@ module.exports = {
|
|||||||
caseInsensitive: true
|
caseInsensitive: true
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
'unused-imports/no-unused-imports-ts': 'error',
|
'import/no-duplicates': 'error',
|
||||||
'import/no-extraneous-dependencies': 'error',
|
'import/no-extraneous-dependencies': 'error',
|
||||||
'unicorn/import-index': 'off'
|
'no-duplicate-imports': 'off', // doesn't work with type imports
|
||||||
|
'unused-imports/no-unused-imports-ts': 'error'
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
665
package-lock.json
generated
665
package-lock.json
generated
@ -453,6 +453,16 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"@types/rdf-js": "^3.0.0",
|
"@types/rdf-js": "^3.0.0",
|
||||||
"htmlparser2": "^4.0.0"
|
"htmlparser2": "^4.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/rdf-js": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/rdf-js/-/rdf-js-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-1dvodNHh/YpLovHA/b046Nu+xERVt0KcYJFQH1A8S4ZcMj+stYtx4ypXw0X2/oatbREUo4JW+cjoBll3CVtwSQ==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@comunica/actor-rdf-parse-html-rdfa": {
|
"@comunica/actor-rdf-parse-html-rdfa": {
|
||||||
@ -470,6 +480,16 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"@types/rdf-js": "^3.0.0",
|
"@types/rdf-js": "^3.0.0",
|
||||||
"relative-to-absolute-iri": "^1.0.5"
|
"relative-to-absolute-iri": "^1.0.5"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/rdf-js": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/rdf-js/-/rdf-js-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-1dvodNHh/YpLovHA/b046Nu+xERVt0KcYJFQH1A8S4ZcMj+stYtx4ypXw0X2/oatbREUo4JW+cjoBll3CVtwSQ==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@comunica/actor-rdf-parse-jsonld": {
|
"@comunica/actor-rdf-parse-jsonld": {
|
||||||
@ -480,6 +500,16 @@
|
|||||||
"@types/rdf-js": "^3.0.0",
|
"@types/rdf-js": "^3.0.0",
|
||||||
"jsonld-streaming-parser": "^2.0.2",
|
"jsonld-streaming-parser": "^2.0.2",
|
||||||
"stream-to-string": "^1.2.0"
|
"stream-to-string": "^1.2.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/rdf-js": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/rdf-js/-/rdf-js-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-1dvodNHh/YpLovHA/b046Nu+xERVt0KcYJFQH1A8S4ZcMj+stYtx4ypXw0X2/oatbREUo4JW+cjoBll3CVtwSQ==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@comunica/actor-rdf-parse-n3": {
|
"@comunica/actor-rdf-parse-n3": {
|
||||||
@ -524,6 +554,16 @@
|
|||||||
"@types/rdf-js": "^3.0.0",
|
"@types/rdf-js": "^3.0.0",
|
||||||
"n3": "^1.0.0",
|
"n3": "^1.0.0",
|
||||||
"rdf-string": "^1.4.2"
|
"rdf-string": "^1.4.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/rdf-js": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/rdf-js/-/rdf-js-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-1dvodNHh/YpLovHA/b046Nu+xERVt0KcYJFQH1A8S4ZcMj+stYtx4ypXw0X2/oatbREUo4JW+cjoBll3CVtwSQ==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@comunica/bus-http": {
|
"@comunica/bus-http": {
|
||||||
@ -554,6 +594,16 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"@comunica/actor-abstract-mediatyped": "^1.15.0",
|
"@comunica/actor-abstract-mediatyped": "^1.15.0",
|
||||||
"@types/rdf-js": "^3.0.0"
|
"@types/rdf-js": "^3.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/rdf-js": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/rdf-js/-/rdf-js-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-1dvodNHh/YpLovHA/b046Nu+xERVt0KcYJFQH1A8S4ZcMj+stYtx4ypXw0X2/oatbREUo4JW+cjoBll3CVtwSQ==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@comunica/bus-rdf-parse-html": {
|
"@comunica/bus-rdf-parse-html": {
|
||||||
@ -562,6 +612,16 @@
|
|||||||
"integrity": "sha512-7F/kDrNf9X//IrO/CK4LpwM5f+mFHLa/wsPc2RubyhiFN3P3KWU6NWxjDJRT9yP85EmW4KknXWwF8AOTvbKF1A==",
|
"integrity": "sha512-7F/kDrNf9X//IrO/CK4LpwM5f+mFHLa/wsPc2RubyhiFN3P3KWU6NWxjDJRT9yP85EmW4KknXWwF8AOTvbKF1A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/rdf-js": "^3.0.0"
|
"@types/rdf-js": "^3.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/rdf-js": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/rdf-js/-/rdf-js-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-1dvodNHh/YpLovHA/b046Nu+xERVt0KcYJFQH1A8S4ZcMj+stYtx4ypXw0X2/oatbREUo4JW+cjoBll3CVtwSQ==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@comunica/bus-rdf-serialize": {
|
"@comunica/bus-rdf-serialize": {
|
||||||
@ -571,6 +631,16 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"@comunica/actor-abstract-mediatyped": "^1.15.0",
|
"@comunica/actor-abstract-mediatyped": "^1.15.0",
|
||||||
"@types/rdf-js": "^3.0.0"
|
"@types/rdf-js": "^3.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/rdf-js": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/rdf-js/-/rdf-js-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-1dvodNHh/YpLovHA/b046Nu+xERVt0KcYJFQH1A8S4ZcMj+stYtx4ypXw0X2/oatbREUo4JW+cjoBll3CVtwSQ==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@comunica/core": {
|
"@comunica/core": {
|
||||||
@ -596,6 +666,35 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@comunica/mediator-race/-/mediator-race-1.15.0.tgz",
|
"resolved": "https://registry.npmjs.org/@comunica/mediator-race/-/mediator-race-1.15.0.tgz",
|
||||||
"integrity": "sha512-MVESJnkgSoPaCkNNN8RDm0B06d0JNL4QOvRZFuFETY4/D+OwIpcEf0EGButQsDUlelAk5n/sFssLMqo2tw65SA=="
|
"integrity": "sha512-MVESJnkgSoPaCkNNN8RDm0B06d0JNL4QOvRZFuFETY4/D+OwIpcEf0EGButQsDUlelAk5n/sFssLMqo2tw65SA=="
|
||||||
},
|
},
|
||||||
|
"@eslint/eslintrc": {
|
||||||
|
"version": "0.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.1.3.tgz",
|
||||||
|
"integrity": "sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ajv": "^6.12.4",
|
||||||
|
"debug": "^4.1.1",
|
||||||
|
"espree": "^7.3.0",
|
||||||
|
"globals": "^12.1.0",
|
||||||
|
"ignore": "^4.0.6",
|
||||||
|
"import-fresh": "^3.2.1",
|
||||||
|
"js-yaml": "^3.13.1",
|
||||||
|
"lodash": "^4.17.19",
|
||||||
|
"minimatch": "^3.0.4",
|
||||||
|
"strip-json-comments": "^3.1.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"debug": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
|
||||||
|
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ms": "^2.1.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"@hutson/parse-repository-url": {
|
"@hutson/parse-repository-url": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz",
|
||||||
@ -1102,9 +1201,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@microsoft/tsdoc": {
|
"@microsoft/tsdoc": {
|
||||||
"version": "0.12.20",
|
"version": "0.12.21",
|
||||||
"resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.12.20.tgz",
|
"resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.12.21.tgz",
|
||||||
"integrity": "sha512-/b13m37QZYPV6nCOiqkFyvlQjlTNvAcQpgFZ6ZKIqtStJxNdqVo/frULubxMUMWi6p9Uo5f4BRlguv5ViFcL0A==",
|
"integrity": "sha512-j+9OJ0A0buZZaUn6NxeHUVpoa05tY2PgVs7kXJhJQiKRB0G1zQqbJxer3T7jWtzpqQWP89OBDluyIeyTsMk8Sg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@microsoft/tsdoc-config": {
|
"@microsoft/tsdoc-config": {
|
||||||
@ -1163,21 +1262,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@rdfjs/data-model": {
|
"@rdfjs/data-model": {
|
||||||
"version": "1.1.2",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rdfjs/data-model/-/data-model-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/@rdfjs/data-model/-/data-model-1.2.0.tgz",
|
||||||
"integrity": "sha512-pk/G/JLYGaXesoBLvEmoC/ic0H3B79fTyS0Ujjh5YQB2DZW+mn05ZowFFv88rjB9jf7c1XE5XSmf8jzn6U0HHA==",
|
"integrity": "sha512-6ITWcu2sr9zJqXUPDm1XJ8DRpea7PotWBIkTzuO1MCSruLOWH2ICoQOAtlJy30cT+GqH9oAQKPR+CHXejsdizA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/rdf-js": "^2.0.1"
|
"@types/rdf-js": "*"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@types/rdf-js": {
|
|
||||||
"version": "2.0.12",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/rdf-js/-/rdf-js-2.0.12.tgz",
|
|
||||||
"integrity": "sha512-NBzHFHp2vHOJkPlSqzsOrkEsD9grKn+PdFjZieIw59pc0FlRG6WEQAjQZvHzFxJlYzC6ZDCFyTA1wBvUnnzUQw==",
|
|
||||||
"requires": {
|
|
||||||
"@types/node": "*"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@sindresorhus/is": {
|
"@sindresorhus/is": {
|
||||||
@ -1303,12 +1392,6 @@
|
|||||||
"@types/express": "*"
|
"@types/express": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/eslint-visitor-keys": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz",
|
|
||||||
"integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"@types/express": {
|
"@types/express": {
|
||||||
"version": "4.17.7",
|
"version": "4.17.7",
|
||||||
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.7.tgz",
|
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.7.tgz",
|
||||||
@ -1385,9 +1468,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/jest": {
|
"@types/jest": {
|
||||||
"version": "26.0.12",
|
"version": "26.0.14",
|
||||||
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.12.tgz",
|
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.14.tgz",
|
||||||
"integrity": "sha512-vZOFjm562IPb1EmaKxMjdcouxVb1l3NqoUH4XC4tDQ2R/AWde+0HXBUhyfc6L+7vc3mJ393U+5vr3nH2CLSVVg==",
|
"integrity": "sha512-Hz5q8Vu0D288x3iWXePSn53W7hAjP0H7EQ6QvDO9c7t46mR0lNOLlfuwQ+JkVxuhygHzlzPX+0jKdA3ZgSh+Vg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"jest-diff": "^25.2.1",
|
"jest-diff": "^25.2.1",
|
||||||
@ -1439,18 +1522,18 @@
|
|||||||
"integrity": "sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY="
|
"integrity": "sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY="
|
||||||
},
|
},
|
||||||
"@types/n3": {
|
"@types/n3": {
|
||||||
"version": "1.4.3",
|
"version": "1.4.4",
|
||||||
"resolved": "https://registry.npmjs.org/@types/n3/-/n3-1.4.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/n3/-/n3-1.4.4.tgz",
|
||||||
"integrity": "sha512-NJ6GKZDE/6Q9iF9Zg+c89WHLK6VXIyVPfvPw6Z8/17ssk1Vx944XcAn0ZmPlRnvUXlGCg63NmMGzB20X46cs4A==",
|
"integrity": "sha512-xsWfwyDh0uAH0CXvwqe9vb2UEDafMjRez/pB7yZwbWpd9Olw2wdxaL32FtdHjmmFE6b9i+j249JfRyZnvWkoqg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
"@types/rdf-js": "*"
|
"@types/rdf-js": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "14.6.0",
|
"version": "14.10.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.10.3.tgz",
|
||||||
"integrity": "sha512-mikldZQitV94akrc4sCcSjtJfsTKt4p+e/s0AGscVA6XArQ9kFclP+ZiYUMnq987rc6QlYxXv/EivqlfSLxpKA=="
|
"integrity": "sha512-zdN0hor7TLkjAdKTnYW+Y22oIhUUpil5ZD1V1OFq0CR0CLKw+NdR6dkziTfkWRLo6sKzisayoj/GNpNbe4LY9Q=="
|
||||||
},
|
},
|
||||||
"@types/normalize-package-data": {
|
"@types/normalize-package-data": {
|
||||||
"version": "2.4.0",
|
"version": "2.4.0",
|
||||||
@ -1486,9 +1569,9 @@
|
|||||||
"integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA=="
|
"integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA=="
|
||||||
},
|
},
|
||||||
"@types/rdf-js": {
|
"@types/rdf-js": {
|
||||||
"version": "3.0.3",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/rdf-js/-/rdf-js-3.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/rdf-js/-/rdf-js-4.0.0.tgz",
|
||||||
"integrity": "sha512-1dvodNHh/YpLovHA/b046Nu+xERVt0KcYJFQH1A8S4ZcMj+stYtx4ypXw0X2/oatbREUo4JW+cjoBll3CVtwSQ==",
|
"integrity": "sha512-2uaR7ks0380MqzUWGOPOOk9yZIr/6MOaCcaj3ntKgd2PqNocgi8j5kSHIJTDe+5ABtTHqKMSE0v0UqrsT8ibgQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
@ -1564,58 +1647,16 @@
|
|||||||
"integrity": "sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw=="
|
"integrity": "sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw=="
|
||||||
},
|
},
|
||||||
"@typescript-eslint/eslint-plugin": {
|
"@typescript-eslint/eslint-plugin": {
|
||||||
"version": "2.34.0",
|
"version": "4.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.34.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.1.1.tgz",
|
||||||
"integrity": "sha512-4zY3Z88rEE99+CNvTbXSyovv2z9PNOVffTWD2W8QF5s2prBQtwN2zadqERcrHpcR7O/+KMI3fcTAmUUhK/iQcQ==",
|
"integrity": "sha512-Hoxyt99EA9LMmqo/5PuWWPeWeB3mKyvibfJ1Hy5SfiUpjE8Nqp+5QNd9fOkzL66+fqvIWSIE+Ett16LGMzCGnQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/experimental-utils": "2.34.0",
|
"@typescript-eslint/experimental-utils": "4.1.1",
|
||||||
|
"@typescript-eslint/scope-manager": "4.1.1",
|
||||||
|
"debug": "^4.1.1",
|
||||||
"functional-red-black-tree": "^1.0.1",
|
"functional-red-black-tree": "^1.0.1",
|
||||||
"regexpp": "^3.0.0",
|
"regexpp": "^3.0.0",
|
||||||
"tsutils": "^3.17.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@typescript-eslint/experimental-utils": {
|
|
||||||
"version": "2.34.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.34.0.tgz",
|
|
||||||
"integrity": "sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"@types/json-schema": "^7.0.3",
|
|
||||||
"@typescript-eslint/typescript-estree": "2.34.0",
|
|
||||||
"eslint-scope": "^5.0.0",
|
|
||||||
"eslint-utils": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@typescript-eslint/parser": {
|
|
||||||
"version": "2.34.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.34.0.tgz",
|
|
||||||
"integrity": "sha512-03ilO0ucSD0EPTw2X4PntSIRFtDPWjrVq7C3/Z3VQHRC7+13YB55rcJI3Jt+YgeHbjUdJPcPa7b23rXCBokuyA==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"@types/eslint-visitor-keys": "^1.0.0",
|
|
||||||
"@typescript-eslint/experimental-utils": "2.34.0",
|
|
||||||
"@typescript-eslint/typescript-estree": "2.34.0",
|
|
||||||
"eslint-visitor-keys": "^1.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@typescript-eslint/types": {
|
|
||||||
"version": "4.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.0.1.tgz",
|
|
||||||
"integrity": "sha512-S+gD3fgbkZYW2rnbjugNMqibm9HpEjqZBZkTiI3PwbbNGWmAcxolWIUwZ0SKeG4Dy2ktpKKaI/6+HGYVH8Qrlg==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"@typescript-eslint/typescript-estree": {
|
|
||||||
"version": "2.34.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz",
|
|
||||||
"integrity": "sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"debug": "^4.1.1",
|
|
||||||
"eslint-visitor-keys": "^1.1.0",
|
|
||||||
"glob": "^7.1.6",
|
|
||||||
"is-glob": "^4.0.1",
|
|
||||||
"lodash": "^4.17.15",
|
|
||||||
"semver": "^7.3.2",
|
"semver": "^7.3.2",
|
||||||
"tsutils": "^3.17.1"
|
"tsutils": "^3.17.1"
|
||||||
},
|
},
|
||||||
@ -1631,6 +1672,146 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@typescript-eslint/experimental-utils": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.1.1.tgz",
|
||||||
|
"integrity": "sha512-jzYsNciHoa4Z3c1URtmeT/bamYm8Dwfw6vuN3WHIE/BXb1iC4KveAnXDErTAZtPVxTYBaYn3n2gbt6F6D2rm1A==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/json-schema": "^7.0.3",
|
||||||
|
"@typescript-eslint/scope-manager": "4.1.1",
|
||||||
|
"@typescript-eslint/types": "4.1.1",
|
||||||
|
"@typescript-eslint/typescript-estree": "4.1.1",
|
||||||
|
"eslint-scope": "^5.0.0",
|
||||||
|
"eslint-utils": "^2.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@typescript-eslint/types": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.1.1.tgz",
|
||||||
|
"integrity": "sha512-zrBiqOKYerMTllKcn+BP+i1b7LW/EbMMYytroXMxUTvFPn1smkCu0D7lSAx29fTUO4jnwV0ljSvYQtn2vNrNxA==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@typescript-eslint/parser": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.1.1.tgz",
|
||||||
|
"integrity": "sha512-NLIhmicpKGfJbdXyQBz9j48PA6hq6e+SDOoXy7Ak6bq1ebGqbgG+fR1UIDAuay6OjQdot69c/URu2uLlsP8GQQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@typescript-eslint/scope-manager": "4.1.1",
|
||||||
|
"@typescript-eslint/types": "4.1.1",
|
||||||
|
"@typescript-eslint/typescript-estree": "4.1.1",
|
||||||
|
"debug": "^4.1.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@typescript-eslint/types": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.1.1.tgz",
|
||||||
|
"integrity": "sha512-zrBiqOKYerMTllKcn+BP+i1b7LW/EbMMYytroXMxUTvFPn1smkCu0D7lSAx29fTUO4jnwV0ljSvYQtn2vNrNxA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"debug": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
|
||||||
|
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ms": "^2.1.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@typescript-eslint/scope-manager": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.1.1.tgz",
|
||||||
|
"integrity": "sha512-0W8TTobCvIIQ2FsrYTffyZGAAFUyIbEHq5EYJb1m7Rpd005jrnOvKOo8ywCLhs/Bm17C+KsrUboBvBAARQVvyA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@typescript-eslint/types": "4.1.1",
|
||||||
|
"@typescript-eslint/visitor-keys": "4.1.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@typescript-eslint/types": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.1.1.tgz",
|
||||||
|
"integrity": "sha512-zrBiqOKYerMTllKcn+BP+i1b7LW/EbMMYytroXMxUTvFPn1smkCu0D7lSAx29fTUO4jnwV0ljSvYQtn2vNrNxA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@typescript-eslint/visitor-keys": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.1.1.tgz",
|
||||||
|
"integrity": "sha512-/EOOXbA2ferGLG6RmCHEQ0lTTLkOlXYDgblCmQk3tIU7mTPLm4gKhFMeeUSe+bcchTUsKeCk8xcpbop5Zr/8Rw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@typescript-eslint/types": "4.1.1",
|
||||||
|
"eslint-visitor-keys": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"eslint-visitor-keys": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@typescript-eslint/types": {
|
||||||
|
"version": "4.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.0.1.tgz",
|
||||||
|
"integrity": "sha512-S+gD3fgbkZYW2rnbjugNMqibm9HpEjqZBZkTiI3PwbbNGWmAcxolWIUwZ0SKeG4Dy2ktpKKaI/6+HGYVH8Qrlg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@typescript-eslint/typescript-estree": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.1.1.tgz",
|
||||||
|
"integrity": "sha512-2AUg5v0liVBsqbGxBphbJ0QbGqSRVaF5qPoTPWcxop+66vMdU1h4CCvHxTC47+Qb+Pr4l2RhXDd41JNpwcQEKw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@typescript-eslint/types": "4.1.1",
|
||||||
|
"@typescript-eslint/visitor-keys": "4.1.1",
|
||||||
|
"debug": "^4.1.1",
|
||||||
|
"globby": "^11.0.1",
|
||||||
|
"is-glob": "^4.0.1",
|
||||||
|
"lodash": "^4.17.15",
|
||||||
|
"semver": "^7.3.2",
|
||||||
|
"tsutils": "^3.17.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@typescript-eslint/types": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.1.1.tgz",
|
||||||
|
"integrity": "sha512-zrBiqOKYerMTllKcn+BP+i1b7LW/EbMMYytroXMxUTvFPn1smkCu0D7lSAx29fTUO4jnwV0ljSvYQtn2vNrNxA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@typescript-eslint/visitor-keys": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.1.1.tgz",
|
||||||
|
"integrity": "sha512-/EOOXbA2ferGLG6RmCHEQ0lTTLkOlXYDgblCmQk3tIU7mTPLm4gKhFMeeUSe+bcchTUsKeCk8xcpbop5Zr/8Rw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@typescript-eslint/types": "4.1.1",
|
||||||
|
"eslint-visitor-keys": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"debug": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
|
||||||
|
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ms": "^2.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"eslint-visitor-keys": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"@typescript-eslint/visitor-keys": {
|
"@typescript-eslint/visitor-keys": {
|
||||||
"version": "4.0.1",
|
"version": "4.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.0.1.tgz",
|
||||||
@ -1943,6 +2124,20 @@
|
|||||||
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz",
|
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz",
|
||||||
"integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA=="
|
"integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA=="
|
||||||
},
|
},
|
||||||
|
"babel-eslint": {
|
||||||
|
"version": "10.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz",
|
||||||
|
"integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@babel/code-frame": "^7.0.0",
|
||||||
|
"@babel/parser": "^7.7.0",
|
||||||
|
"@babel/traverse": "^7.7.0",
|
||||||
|
"@babel/types": "^7.7.0",
|
||||||
|
"eslint-visitor-keys": "^1.0.0",
|
||||||
|
"resolve": "^1.12.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"babel-jest": {
|
"babel-jest": {
|
||||||
"version": "26.3.0",
|
"version": "26.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.3.0.tgz",
|
||||||
@ -3216,12 +3411,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint": {
|
"eslint": {
|
||||||
"version": "7.7.0",
|
"version": "7.9.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.9.0.tgz",
|
||||||
"integrity": "sha512-1KUxLzos0ZVsyL81PnRN335nDtQ8/vZUD6uMtWbF+5zDtjKcsklIi78XoE0MVL93QvWTu+E5y44VyyCsOMBrIg==",
|
"integrity": "sha512-V6QyhX21+uXp4T+3nrNfI3hQNBDa/P8ga7LoQOenwrlEFXrEnUEE+ok1dMtaS3b6rmLXhT1TkTIsG75HMLbknA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/code-frame": "^7.0.0",
|
"@babel/code-frame": "^7.0.0",
|
||||||
|
"@eslint/eslintrc": "^0.1.3",
|
||||||
"ajv": "^6.10.0",
|
"ajv": "^6.10.0",
|
||||||
"chalk": "^4.0.0",
|
"chalk": "^4.0.0",
|
||||||
"cross-spawn": "^7.0.2",
|
"cross-spawn": "^7.0.2",
|
||||||
@ -3231,7 +3427,7 @@
|
|||||||
"eslint-scope": "^5.1.0",
|
"eslint-scope": "^5.1.0",
|
||||||
"eslint-utils": "^2.1.0",
|
"eslint-utils": "^2.1.0",
|
||||||
"eslint-visitor-keys": "^1.3.0",
|
"eslint-visitor-keys": "^1.3.0",
|
||||||
"espree": "^7.2.0",
|
"espree": "^7.3.0",
|
||||||
"esquery": "^1.2.0",
|
"esquery": "^1.2.0",
|
||||||
"esutils": "^2.0.2",
|
"esutils": "^2.0.2",
|
||||||
"file-entry-cache": "^5.0.1",
|
"file-entry-cache": "^5.0.1",
|
||||||
@ -3291,73 +3487,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-config-es": {
|
"eslint-config-es": {
|
||||||
"version": "3.19.67",
|
"version": "3.20.3",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-config-es/-/eslint-config-es-3.19.67.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-config-es/-/eslint-config-es-3.20.3.tgz",
|
||||||
"integrity": "sha512-9GTZGyRKT1L/hCBLKz0VC0YWYrlbPdMPSxnwIZiX08X4Gk6cIyK6gd8cKB2reLviAX0kLUR0WGj/oKx7nlSYTw==",
|
"integrity": "sha512-Qd2u5+S+FC3L5+qcW6i6hZO1GAjYqaSa+DE5MQcrGi+ZWU3f0gsMfAZa6PYlZiSOlNc6Dp5dA8ZyY8SVBzLXsA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/eslint-plugin": "2.26.0",
|
"@typescript-eslint/eslint-plugin": "4.1.1",
|
||||||
"@typescript-eslint/parser": "2.34.0",
|
"@typescript-eslint/parser": "4.1.1",
|
||||||
"eslint-plugin-extended": "0.2.0",
|
"eslint-plugin-extended": "0.2.0",
|
||||||
"eslint-plugin-mocha": "6.3.0",
|
"eslint-plugin-mocha": "8.0.0",
|
||||||
"eslint-plugin-react": "7.20.6",
|
"eslint-plugin-react": "7.20.6",
|
||||||
"eslint-plugin-unicorn": "17.2.0"
|
"eslint-plugin-unicorn": "21.0.0"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@typescript-eslint/eslint-plugin": {
|
|
||||||
"version": "2.26.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.26.0.tgz",
|
|
||||||
"integrity": "sha512-4yUnLv40bzfzsXcTAtZyTjbiGUXMrcIJcIMioI22tSOyAxpdXiZ4r7YQUU8Jj6XXrLz9d5aMHPQf5JFR7h27Nw==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"@typescript-eslint/experimental-utils": "2.26.0",
|
|
||||||
"functional-red-black-tree": "^1.0.1",
|
|
||||||
"regexpp": "^3.0.0",
|
|
||||||
"tsutils": "^3.17.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@typescript-eslint/experimental-utils": {
|
|
||||||
"version": "2.26.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.26.0.tgz",
|
|
||||||
"integrity": "sha512-RELVoH5EYd+JlGprEyojUv9HeKcZqF7nZUGSblyAw1FwOGNnmQIU8kxJ69fttQvEwCsX5D6ECJT8GTozxrDKVQ==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"@types/json-schema": "^7.0.3",
|
|
||||||
"@typescript-eslint/typescript-estree": "2.26.0",
|
|
||||||
"eslint-scope": "^5.0.0",
|
|
||||||
"eslint-utils": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@typescript-eslint/typescript-estree": {
|
|
||||||
"version": "2.26.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.26.0.tgz",
|
|
||||||
"integrity": "sha512-3x4SyZCLB4zsKsjuhxDLeVJN6W29VwBnYpCsZ7vIdPel9ZqLfIZJgJXO47MNUkurGpQuIBALdPQKtsSnWpE1Yg==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"debug": "^4.1.1",
|
|
||||||
"eslint-visitor-keys": "^1.1.0",
|
|
||||||
"glob": "^7.1.6",
|
|
||||||
"is-glob": "^4.0.1",
|
|
||||||
"lodash": "^4.17.15",
|
|
||||||
"semver": "^6.3.0",
|
|
||||||
"tsutils": "^3.17.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"debug": {
|
|
||||||
"version": "4.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
|
|
||||||
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"ms": "^2.1.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"semver": {
|
|
||||||
"version": "6.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
|
||||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
|
||||||
"dev": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-import-resolver-node": {
|
"eslint-import-resolver-node": {
|
||||||
@ -3371,9 +3511,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-import-resolver-typescript": {
|
"eslint-import-resolver-typescript": {
|
||||||
"version": "2.2.1",
|
"version": "2.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.3.0.tgz",
|
||||||
"integrity": "sha512-wxlVdwuWY6R5+CoesIy6n8EZX4k9lEeZGWTVBoX9g//8Xma8JMtL/p3AGnG43rRyXmIrX+/0IN8lpOPzrw1fSw==",
|
"integrity": "sha512-MHSXvmj5e0SGOOBhBbt7C+fWj1bJbtSYFAD85Xeg8nvUtuooTod2HQb8bfhE9f5QyyNxEfgzqOYFCvmdDIcCuw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.1.1",
|
||||||
@ -3517,13 +3657,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-plugin-mocha": {
|
"eslint-plugin-mocha": {
|
||||||
"version": "6.3.0",
|
"version": "8.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-6.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-8.0.0.tgz",
|
||||||
"integrity": "sha512-Cd2roo8caAyG21oKaaNTj7cqeYRWW1I2B5SfpKRp0Ip1gkfwoR1Ow0IGlPWnNjzywdF4n+kHL8/9vM6zCJUxdg==",
|
"integrity": "sha512-n67etbWDz6NQM+HnTwZHyBwz/bLlYPOxUbw7bPuCyFujv7ZpaT/Vn6KTAbT02gf7nRljtYIjWcTxK/n8a57rQQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"eslint-utils": "^2.0.0",
|
"eslint-utils": "^2.1.0",
|
||||||
"ramda": "^0.27.0"
|
"ramda": "^0.27.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-plugin-react": {
|
"eslint-plugin-react": {
|
||||||
@ -3557,55 +3697,34 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-plugin-tsdoc": {
|
"eslint-plugin-tsdoc": {
|
||||||
"version": "0.2.6",
|
"version": "0.2.7",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-tsdoc/-/eslint-plugin-tsdoc-0.2.6.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-tsdoc/-/eslint-plugin-tsdoc-0.2.7.tgz",
|
||||||
"integrity": "sha512-pU6/VVEOlC85BrUjsqZGGSRy41N+PHfWXokqjpQRWT1LSpBsAEbRpsueNYSFS+93Sx9CFD0511kjLKVySRbLbg==",
|
"integrity": "sha512-GAbNpwNfwnolagP6mCQT8wY4usifnAE/iuCz15L3BcEca0xAidctU61h7w40mOuNiSp78DYPUl5gwN89nJ8+8Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@microsoft/tsdoc": "0.12.20",
|
"@microsoft/tsdoc": "0.12.21",
|
||||||
"@microsoft/tsdoc-config": "0.13.5"
|
"@microsoft/tsdoc-config": "0.13.6"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@microsoft/tsdoc-config": {
|
|
||||||
"version": "0.13.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@microsoft/tsdoc-config/-/tsdoc-config-0.13.5.tgz",
|
|
||||||
"integrity": "sha512-KlnIdTRnPSsU9Coz9wzDAkT8JCLopP3ec1sgsgo7trwE6QLMKRpM4hZi2uzVX897SW49Q4f439auGBcQLnZQfA==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"@microsoft/tsdoc": "0.12.20",
|
|
||||||
"ajv": "~6.12.3",
|
|
||||||
"jju": "~1.4.0",
|
|
||||||
"resolve": "~1.12.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"resolve": {
|
|
||||||
"version": "1.12.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.3.tgz",
|
|
||||||
"integrity": "sha512-hF6+hAPlxjqHWrw4p1rF3Wztbgxd4AjA5VlUzY5zcTb4J8D3JK4/1RjU48pHz2PJWzGVsLB1VWZkvJzhK2CCOA==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"path-parse": "^1.0.6"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-plugin-unicorn": {
|
"eslint-plugin-unicorn": {
|
||||||
"version": "17.2.0",
|
"version": "21.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-17.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-21.0.0.tgz",
|
||||||
"integrity": "sha512-0kYjrywf0kQxevFz571KrDfYMIRZ5Kq6dDgPU1EEBFeC181r+fAaPatBScWX+/hisKJ4+eCRFebxTeVylsSYmw==",
|
"integrity": "sha512-S8v7+v4gZTQPj4pKKvexhgSUaLQSyItvxW2SVZDaX9Iu5IjlAmF2eni+L6w8a2aqshxgU8Lle4FIAVDtuejSKQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ci-info": "^2.0.0",
|
"ci-info": "^2.0.0",
|
||||||
"clean-regexp": "^1.0.0",
|
"clean-regexp": "^1.0.0",
|
||||||
"eslint-ast-utils": "^1.1.0",
|
"eslint-ast-utils": "^1.1.0",
|
||||||
"eslint-template-visitor": "^1.1.0",
|
"eslint-template-visitor": "^2.0.0",
|
||||||
|
"eslint-utils": "^2.1.0",
|
||||||
"import-modules": "^2.0.0",
|
"import-modules": "^2.0.0",
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.15",
|
||||||
|
"pluralize": "^8.0.0",
|
||||||
"read-pkg-up": "^7.0.1",
|
"read-pkg-up": "^7.0.1",
|
||||||
"regexp-tree": "^0.1.20",
|
"regexp-tree": "^0.1.21",
|
||||||
"reserved-words": "^0.1.2",
|
"reserved-words": "^0.1.2",
|
||||||
"safe-regex": "^2.1.1",
|
"safe-regex": "^2.1.1",
|
||||||
"semver": "^7.1.2"
|
"semver": "^7.3.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-plugin-unused-imports": {
|
"eslint-plugin-unused-imports": {
|
||||||
@ -3621,6 +3740,72 @@
|
|||||||
"typescript": "^3.6.3"
|
"typescript": "^3.6.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@typescript-eslint/eslint-plugin": {
|
||||||
|
"version": "2.34.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.34.0.tgz",
|
||||||
|
"integrity": "sha512-4zY3Z88rEE99+CNvTbXSyovv2z9PNOVffTWD2W8QF5s2prBQtwN2zadqERcrHpcR7O/+KMI3fcTAmUUhK/iQcQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@typescript-eslint/experimental-utils": "2.34.0",
|
||||||
|
"functional-red-black-tree": "^1.0.1",
|
||||||
|
"regexpp": "^3.0.0",
|
||||||
|
"tsutils": "^3.17.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"regexpp": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@typescript-eslint/experimental-utils": {
|
||||||
|
"version": "2.34.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.34.0.tgz",
|
||||||
|
"integrity": "sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/json-schema": "^7.0.3",
|
||||||
|
"@typescript-eslint/typescript-estree": "2.34.0",
|
||||||
|
"eslint-scope": "^5.0.0",
|
||||||
|
"eslint-utils": "^2.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"eslint-utils": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"eslint-visitor-keys": "^1.1.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@typescript-eslint/typescript-estree": {
|
||||||
|
"version": "2.34.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz",
|
||||||
|
"integrity": "sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"debug": "^4.1.1",
|
||||||
|
"eslint-visitor-keys": "^1.1.0",
|
||||||
|
"glob": "^7.1.6",
|
||||||
|
"is-glob": "^4.0.1",
|
||||||
|
"lodash": "^4.17.15",
|
||||||
|
"semver": "^7.3.2",
|
||||||
|
"tsutils": "^3.17.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"semver": {
|
||||||
|
"version": "7.3.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
|
||||||
|
"integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
"version": "4.1.0",
|
"version": "4.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
|
||||||
@ -3852,6 +4037,12 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"prelude-ls": "~1.1.2"
|
"prelude-ls": "~1.1.2"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"typescript": {
|
||||||
|
"version": "3.9.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz",
|
||||||
|
"integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==",
|
||||||
|
"dev": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -3872,27 +4063,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-template-visitor": {
|
"eslint-template-visitor": {
|
||||||
"version": "1.1.0",
|
"version": "2.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-template-visitor/-/eslint-template-visitor-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-template-visitor/-/eslint-template-visitor-2.2.1.tgz",
|
||||||
"integrity": "sha512-Lmy6QVlmFiIGl5fPi+8ACnov3sare+0Ouf7deJAGGhmUfeWJ5fVarELUxZRpsZ9sHejiJUq8626d0dn9uvcZTw==",
|
"integrity": "sha512-q3SxoBXz0XjPGkUpwGVAwIwIPIxzCAJX1uwfVc8tW3v7u/zS7WXNH3I2Mu2MDz2NgSITAyKLRaQFPHu/iyKxDQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"eslint-visitor-keys": "^1.1.0",
|
"babel-eslint": "^10.1.0",
|
||||||
"espree": "^6.1.1",
|
"eslint-visitor-keys": "^1.3.0",
|
||||||
"multimap": "^1.0.2"
|
"esquery": "^1.3.1",
|
||||||
},
|
"multimap": "^1.1.0"
|
||||||
"dependencies": {
|
|
||||||
"espree": {
|
|
||||||
"version": "6.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz",
|
|
||||||
"integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"acorn": "^7.1.1",
|
|
||||||
"acorn-jsx": "^5.2.0",
|
|
||||||
"eslint-visitor-keys": "^1.1.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-utils": {
|
"eslint-utils": {
|
||||||
@ -7247,6 +7426,16 @@
|
|||||||
"http-link-header": "^1.0.2",
|
"http-link-header": "^1.0.2",
|
||||||
"jsonld-context-parser": "^2.0.1",
|
"jsonld-context-parser": "^2.0.1",
|
||||||
"jsonparse": "^1.3.1"
|
"jsonparse": "^1.3.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/rdf-js": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/rdf-js/-/rdf-js-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-1dvodNHh/YpLovHA/b046Nu+xERVt0KcYJFQH1A8S4ZcMj+stYtx4ypXw0X2/oatbREUo4JW+cjoBll3CVtwSQ==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jsonld-streaming-serializer": {
|
"jsonld-streaming-serializer": {
|
||||||
@ -7256,6 +7445,16 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"@types/rdf-js": "^3.0.0",
|
"@types/rdf-js": "^3.0.0",
|
||||||
"jsonld-context-parser": "^2.0.0"
|
"jsonld-context-parser": "^2.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/rdf-js": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/rdf-js/-/rdf-js-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-1dvodNHh/YpLovHA/b046Nu+xERVt0KcYJFQH1A8S4ZcMj+stYtx4ypXw0X2/oatbREUo4JW+cjoBll3CVtwSQ==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jsonparse": {
|
"jsonparse": {
|
||||||
@ -7713,9 +7912,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"n3": {
|
"n3": {
|
||||||
"version": "1.6.2",
|
"version": "1.6.3",
|
||||||
"resolved": "https://registry.npmjs.org/n3/-/n3-1.6.2.tgz",
|
"resolved": "https://registry.npmjs.org/n3/-/n3-1.6.3.tgz",
|
||||||
"integrity": "sha512-9R45WRNxNPblKLbXGwR9IvtaVvdr80vRxME79fhWnqBzHb2GcP6lS77Mvf8Fx6Wpfn8PpBTdggceWsSMDGY/SA==",
|
"integrity": "sha512-dN+8pLw2h1H1WQTW9VR3T16tHPDYdQP+YKXzbcpBCMCb9ZkksUyoVRRdtFGl3vosdET+NIB5eiIgth+4Vit6Yw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"queue-microtask": "^1.1.2",
|
"queue-microtask": "^1.1.2",
|
||||||
"readable-stream": "^3.6.0"
|
"readable-stream": "^3.6.0"
|
||||||
@ -8357,6 +8556,12 @@
|
|||||||
"semver-compare": "^1.0.0"
|
"semver-compare": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"pluralize": {
|
||||||
|
"version": "8.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz",
|
||||||
|
"integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"posix-character-classes": {
|
"posix-character-classes": {
|
||||||
"version": "0.1.1",
|
"version": "0.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
|
||||||
@ -8558,6 +8763,16 @@
|
|||||||
"@comunica/mediator-race": "~1.15.0",
|
"@comunica/mediator-race": "~1.15.0",
|
||||||
"@types/rdf-js": "^3.0.0",
|
"@types/rdf-js": "^3.0.0",
|
||||||
"stream-to-string": "^1.2.0"
|
"stream-to-string": "^1.2.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/rdf-js": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/rdf-js/-/rdf-js-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-1dvodNHh/YpLovHA/b046Nu+xERVt0KcYJFQH1A8S4ZcMj+stYtx4ypXw0X2/oatbREUo4JW+cjoBll3CVtwSQ==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rdf-serialize": {
|
"rdf-serialize": {
|
||||||
@ -8603,6 +8818,16 @@
|
|||||||
"@types/rdf-js": "^3.0.0",
|
"@types/rdf-js": "^3.0.0",
|
||||||
"htmlparser2": "^4.0.0",
|
"htmlparser2": "^4.0.0",
|
||||||
"relative-to-absolute-iri": "^1.0.2"
|
"relative-to-absolute-iri": "^1.0.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/rdf-js": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/rdf-js/-/rdf-js-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-1dvodNHh/YpLovHA/b046Nu+xERVt0KcYJFQH1A8S4ZcMj+stYtx4ypXw0X2/oatbREUo4JW+cjoBll3CVtwSQ==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rdfxml-streaming-parser": {
|
"rdfxml-streaming-parser": {
|
||||||
@ -10133,9 +10358,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"ts-jest": {
|
"ts-jest": {
|
||||||
"version": "26.2.0",
|
"version": "26.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-26.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-26.3.0.tgz",
|
||||||
"integrity": "sha512-9+y2qwzXdAImgLSYLXAb/Rhq9+K4rbt0417b8ai987V60g2uoNWBBmMkYgutI7D8Zhu+IbCSHbBtrHxB9d7xyA==",
|
"integrity": "sha512-Jq2uKfx6bPd9+JDpZNMBJMdMQUC3sJ08acISj8NXlVgR2d5OqslEHOR2KHMgwymu8h50+lKIm0m0xj/ioYdW2Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/jest": "26.x",
|
"@types/jest": "26.x",
|
||||||
@ -10248,9 +10473,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"version": "3.9.7",
|
"version": "4.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.2.tgz",
|
||||||
"integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==",
|
"integrity": "sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"undefsafe": {
|
"undefsafe": {
|
||||||
|
28
package.json
28
package.json
@ -62,15 +62,15 @@
|
|||||||
"config/**/*.json"
|
"config/**/*.json"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rdfjs/data-model": "^1.1.2",
|
"@rdfjs/data-model": "^1.2.0",
|
||||||
"@types/arrayify-stream": "^1.0.0",
|
"@types/arrayify-stream": "^1.0.0",
|
||||||
"@types/async-lock": "^1.1.2",
|
"@types/async-lock": "^1.1.2",
|
||||||
"@types/cors": "^2.8.6",
|
"@types/cors": "^2.8.6",
|
||||||
"@types/express": "^4.17.6",
|
"@types/express": "^4.17.6",
|
||||||
"@types/mime-types": "^2.1.0",
|
"@types/mime-types": "^2.1.0",
|
||||||
"@types/n3": "^1.4.0",
|
"@types/n3": "^1.4.4",
|
||||||
"@types/node": "^14.0.1",
|
"@types/node": "^14.10.2",
|
||||||
"@types/rdf-js": "^3.0.0",
|
"@types/rdf-js": "^4.0.0",
|
||||||
"@types/streamify-array": "^1.0.0",
|
"@types/streamify-array": "^1.0.0",
|
||||||
"@types/uuid": "^8.3.0",
|
"@types/uuid": "^8.3.0",
|
||||||
"@types/yargs": "^15.0.5",
|
"@types/yargs": "^15.0.5",
|
||||||
@ -80,7 +80,7 @@
|
|||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"mime-types": "^2.1.27",
|
"mime-types": "^2.1.27",
|
||||||
"n3": "^1.4.0",
|
"n3": "^1.6.3",
|
||||||
"rdf-parse": "^1.5.0",
|
"rdf-parse": "^1.5.0",
|
||||||
"rdf-serialize": "^1.0.0",
|
"rdf-serialize": "^1.0.0",
|
||||||
"rdf-terms": "^1.5.1",
|
"rdf-terms": "^1.5.1",
|
||||||
@ -91,18 +91,18 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@microsoft/tsdoc-config": "^0.13.6",
|
"@microsoft/tsdoc-config": "^0.13.6",
|
||||||
"@types/jest": "^26.0.0",
|
"@types/jest": "^26.0.13",
|
||||||
"@types/rimraf": "^3.0.0",
|
"@types/rimraf": "^3.0.0",
|
||||||
"@types/supertest": "^2.0.10",
|
"@types/supertest": "^2.0.10",
|
||||||
"@typescript-eslint/eslint-plugin": "^2.33.0",
|
"@typescript-eslint/eslint-plugin": "^4.1.1",
|
||||||
"@typescript-eslint/parser": "^2.33.0",
|
"@typescript-eslint/parser": "^4.1.1",
|
||||||
"componentjs-generator": "^1.1.0",
|
"componentjs-generator": "^1.1.0",
|
||||||
"coveralls": "^3.1.0",
|
"coveralls": "^3.1.0",
|
||||||
"eslint": "^7.0.0",
|
"eslint": "^7.9.0",
|
||||||
"eslint-config-es": "^3.19.61",
|
"eslint-config-es": "^3.20.3",
|
||||||
"eslint-import-resolver-typescript": "^2.2.1",
|
"eslint-import-resolver-typescript": "^2.3.0",
|
||||||
"eslint-plugin-import": "^2.22.0",
|
"eslint-plugin-import": "^2.22.0",
|
||||||
"eslint-plugin-tsdoc": "^0.2.4",
|
"eslint-plugin-tsdoc": "^0.2.7",
|
||||||
"eslint-plugin-unused-imports": "^0.1.3",
|
"eslint-plugin-unused-imports": "^0.1.3",
|
||||||
"husky": "^4.2.5",
|
"husky": "^4.2.5",
|
||||||
"jest": "^26.0.1",
|
"jest": "^26.0.1",
|
||||||
@ -113,7 +113,7 @@
|
|||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"stream-to-string": "^1.1.0",
|
"stream-to-string": "^1.1.0",
|
||||||
"supertest": "^4.0.2",
|
"supertest": "^4.0.2",
|
||||||
"ts-jest": "^26.0.0",
|
"ts-jest": "^26.3.0",
|
||||||
"typescript": "^3.9.2"
|
"typescript": "^4.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { HttpRequest } from '../server/HttpRequest';
|
import type { HttpRequest } from '../server/HttpRequest';
|
||||||
import { AsyncHandler } from '../util/AsyncHandler';
|
import { AsyncHandler } from '../util/AsyncHandler';
|
||||||
import { Credentials } from './Credentials';
|
import type { Credentials } from './Credentials';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Responsible for extracting credentials from an incoming request.
|
* Responsible for extracting credentials from an incoming request.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { HttpRequest } from '../server/HttpRequest';
|
import type { HttpRequest } from '../server/HttpRequest';
|
||||||
import { Credentials } from './Credentials';
|
import type { Credentials } from './Credentials';
|
||||||
import { CredentialsExtractor } from './CredentialsExtractor';
|
import { CredentialsExtractor } from './CredentialsExtractor';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles where acl files are stored.
|
* Handles where acl files are stored.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Credentials } from '../authentication/Credentials';
|
import type { Credentials } from '../authentication/Credentials';
|
||||||
import { PermissionSet } from '../ldp/permissions/PermissionSet';
|
import type { PermissionSet } from '../ldp/permissions/PermissionSet';
|
||||||
import { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
||||||
import { AsyncHandler } from '../util/AsyncHandler';
|
import { AsyncHandler } from '../util/AsyncHandler';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
||||||
import { AclManager } from './AclManager';
|
import type { AclManager } from './AclManager';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates acl URIs by adding an .acl file extension.
|
* Generates acl URIs by adding an .acl file extension.
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
import { Quad, Store, Term } from 'n3';
|
import type { Quad, Term } from 'n3';
|
||||||
import { Credentials } from '../authentication/Credentials';
|
import { Store } from 'n3';
|
||||||
import { PermissionSet } from '../ldp/permissions/PermissionSet';
|
import type { Credentials } from '../authentication/Credentials';
|
||||||
import { Representation } from '../ldp/representation/Representation';
|
import type { PermissionSet } from '../ldp/permissions/PermissionSet';
|
||||||
import { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
import type { Representation } from '../ldp/representation/Representation';
|
||||||
import { ContainerManager } from '../storage/ContainerManager';
|
import type { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
||||||
import { ResourceStore } from '../storage/ResourceStore';
|
import type { ContainerManager } from '../storage/ContainerManager';
|
||||||
|
import type { ResourceStore } from '../storage/ResourceStore';
|
||||||
import { INTERNAL_QUADS } from '../util/ContentTypes';
|
import { INTERNAL_QUADS } from '../util/ContentTypes';
|
||||||
import { ForbiddenHttpError } from '../util/errors/ForbiddenHttpError';
|
import { ForbiddenHttpError } from '../util/errors/ForbiddenHttpError';
|
||||||
import { NotFoundHttpError } from '../util/errors/NotFoundHttpError';
|
import { NotFoundHttpError } from '../util/errors/NotFoundHttpError';
|
||||||
import { UnauthorizedHttpError } from '../util/errors/UnauthorizedHttpError';
|
import { UnauthorizedHttpError } from '../util/errors/UnauthorizedHttpError';
|
||||||
import { ACL, FOAF } from '../util/UriConstants';
|
import { ACL, FOAF } from '../util/UriConstants';
|
||||||
import { AclManager } from './AclManager';
|
import type { AclManager } from './AclManager';
|
||||||
import { Authorizer, AuthorizerArgs } from './Authorizer';
|
import type { AuthorizerArgs } from './Authorizer';
|
||||||
|
import { Authorizer } from './Authorizer';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles most web access control predicates such as
|
* Handles most web access control predicates such as
|
||||||
@ -113,7 +115,7 @@ export class WebAclAuthorizer extends Authorizer {
|
|||||||
const acl = await this.aclManager.getAcl(id);
|
const acl = await this.aclManager.getAcl(id);
|
||||||
const data = await this.resourceStore.getRepresentation(acl, { type: [{ value: INTERNAL_QUADS, weight: 1 }]});
|
const data = await this.resourceStore.getRepresentation(acl, { type: [{ value: INTERNAL_QUADS, weight: 1 }]});
|
||||||
return this.filterData(data, recurse ? ACL.default : ACL.accessTo, id.path);
|
return this.filterData(data, recurse ? ACL.default : ACL.accessTo, id.path);
|
||||||
} catch (error) {
|
} catch (error: unknown) {
|
||||||
if (!(error instanceof NotFoundHttpError)) {
|
if (!(error instanceof NotFoundHttpError)) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
import * as Path from 'path';
|
import * as Path from 'path';
|
||||||
import { ReadStream, WriteStream } from 'tty';
|
import type { ReadStream, WriteStream } from 'tty';
|
||||||
import { Loader, LoaderProperties } from 'componentsjs';
|
import type { LoaderProperties } from 'componentsjs';
|
||||||
|
import { Loader } from 'componentsjs';
|
||||||
import yargs from 'yargs';
|
import yargs from 'yargs';
|
||||||
import { Setup } from './Setup';
|
import type { Setup } from './Setup';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic run function for starting the server from a given config
|
* Generic run function for starting the server from a given config
|
||||||
@ -43,7 +44,7 @@ export const runCustom = function(
|
|||||||
'urn:solid-server:default:variable:base': `http://localhost:${argv.port}/`,
|
'urn:solid-server:default:variable:base': `http://localhost:${argv.port}/`,
|
||||||
'urn:solid-server:default:variable:rootFilePath': process.cwd(),
|
'urn:solid-server:default:variable:rootFilePath': process.cwd(),
|
||||||
},
|
},
|
||||||
});
|
}) as Setup;
|
||||||
return await setup.setup();
|
return await setup.setup();
|
||||||
})().then((base: string): void => {
|
})().then((base: string): void => {
|
||||||
stdout.write(`Running at ${base}\n`);
|
stdout.write(`Running at ${base}\n`);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import streamifyArray from 'streamify-array';
|
import streamifyArray from 'streamify-array';
|
||||||
import { AclManager } from '../authorization/AclManager';
|
import type { AclManager } from '../authorization/AclManager';
|
||||||
import { RepresentationMetadata } from '../ldp/representation/RepresentationMetadata';
|
import { RepresentationMetadata } from '../ldp/representation/RepresentationMetadata';
|
||||||
import { ExpressHttpServer } from '../server/ExpressHttpServer';
|
import type { ExpressHttpServer } from '../server/ExpressHttpServer';
|
||||||
import { ResourceStore } from '../storage/ResourceStore';
|
import type { ResourceStore } from '../storage/ResourceStore';
|
||||||
import { TEXT_TURTLE } from '../util/ContentTypes';
|
import { TEXT_TURTLE } from '../util/ContentTypes';
|
||||||
import { CONTENT_TYPE } from '../util/UriConstants';
|
import { CONTENT_TYPE } from '../util/UriConstants';
|
||||||
|
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
import { Credentials } from '../authentication/Credentials';
|
import type { Credentials } from '../authentication/Credentials';
|
||||||
import { CredentialsExtractor } from '../authentication/CredentialsExtractor';
|
import type { CredentialsExtractor } from '../authentication/CredentialsExtractor';
|
||||||
import { Authorizer } from '../authorization/Authorizer';
|
import type { Authorizer } from '../authorization/Authorizer';
|
||||||
import { HttpHandler } from '../server/HttpHandler';
|
import { HttpHandler } from '../server/HttpHandler';
|
||||||
import { HttpRequest } from '../server/HttpRequest';
|
import type { HttpRequest } from '../server/HttpRequest';
|
||||||
import { HttpResponse } from '../server/HttpResponse';
|
import type { HttpResponse } from '../server/HttpResponse';
|
||||||
import { RequestParser } from './http/RequestParser';
|
import type { RequestParser } from './http/RequestParser';
|
||||||
import { ResponseWriter } from './http/ResponseWriter';
|
import type { ResponseWriter } from './http/ResponseWriter';
|
||||||
import { Operation } from './operations/Operation';
|
import type { Operation } from './operations/Operation';
|
||||||
import { OperationHandler } from './operations/OperationHandler';
|
import type { OperationHandler } from './operations/OperationHandler';
|
||||||
import { ResponseDescription } from './operations/ResponseDescription';
|
import type { ResponseDescription } from './operations/ResponseDescription';
|
||||||
import { PermissionSet } from './permissions/PermissionSet';
|
import type { PermissionSet } from './permissions/PermissionSet';
|
||||||
import { PermissionsExtractor } from './permissions/PermissionsExtractor';
|
import type { PermissionsExtractor } from './permissions/PermissionsExtractor';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Collection of handlers needed for {@link AuthenticatedLdpHandler} to function.
|
* Collection of handlers needed for {@link AuthenticatedLdpHandler} to function.
|
||||||
@ -91,8 +91,12 @@ export class AuthenticatedLdpHandler extends HttpHandler {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
writeData = { response: input.response, result: await this.runHandlers(input.request) };
|
writeData = { response: input.response, result: await this.runHandlers(input.request) };
|
||||||
} catch (error) {
|
} catch (error: unknown) {
|
||||||
|
if (error instanceof Error) {
|
||||||
writeData = { response: input.response, result: error };
|
writeData = { response: input.response, result: error };
|
||||||
|
} else {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.responseWriter.handleSafe(writeData);
|
await this.responseWriter.handleSafe(writeData);
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import { HttpRequest } from '../../server/HttpRequest';
|
import type { HttpRequest } from '../../server/HttpRequest';
|
||||||
|
import type { AcceptHeader } from '../../util/AcceptParser';
|
||||||
import {
|
import {
|
||||||
AcceptHeader,
|
|
||||||
parseAccept,
|
parseAccept,
|
||||||
parseAcceptCharset,
|
parseAcceptCharset,
|
||||||
parseAcceptEncoding,
|
parseAcceptEncoding,
|
||||||
parseAcceptLanguage,
|
parseAcceptLanguage,
|
||||||
} from '../../util/AcceptParser';
|
} from '../../util/AcceptParser';
|
||||||
import { RepresentationPreference } from '../representation/RepresentationPreference';
|
import type { RepresentationPreference } from '../representation/RepresentationPreference';
|
||||||
import { RepresentationPreferences } from '../representation/RepresentationPreferences';
|
import type { RepresentationPreferences } from '../representation/RepresentationPreferences';
|
||||||
import { PreferenceParser } from './PreferenceParser';
|
import { PreferenceParser } from './PreferenceParser';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -26,7 +26,7 @@ export class AcceptPreferenceParser extends PreferenceParser {
|
|||||||
public async handle(input: HttpRequest): Promise<RepresentationPreferences> {
|
public async handle(input: HttpRequest): Promise<RepresentationPreferences> {
|
||||||
const result: RepresentationPreferences = {};
|
const result: RepresentationPreferences = {};
|
||||||
const headers:
|
const headers:
|
||||||
{ [T in keyof RepresentationPreferences]: { val?: string; func: (input: string) => AcceptHeader[] }} = {
|
{ [T in keyof RepresentationPreferences]: { val?: string; func: (inp: string) => AcceptHeader[] }} = {
|
||||||
type: { val: input.headers.accept, func: parseAccept },
|
type: { val: input.headers.accept, func: parseAccept },
|
||||||
charset: { val: input.headers['accept-charset'] as string, func: parseAcceptCharset },
|
charset: { val: input.headers['accept-charset'] as string, func: parseAcceptCharset },
|
||||||
encoding: { val: input.headers['accept-encoding'] as string, func: parseAcceptEncoding },
|
encoding: { val: input.headers['accept-encoding'] as string, func: parseAcceptEncoding },
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { HttpRequest } from '../../server/HttpRequest';
|
import type { HttpRequest } from '../../server/HttpRequest';
|
||||||
import { Operation } from '../operations/Operation';
|
import type { Operation } from '../operations/Operation';
|
||||||
import { BodyParser } from './BodyParser';
|
import type { BodyParser } from './BodyParser';
|
||||||
import { PreferenceParser } from './PreferenceParser';
|
import type { PreferenceParser } from './PreferenceParser';
|
||||||
import { RequestParser } from './RequestParser';
|
import { RequestParser } from './RequestParser';
|
||||||
import { TargetExtractor } from './TargetExtractor';
|
import type { TargetExtractor } from './TargetExtractor';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Input parsers required for a {@link BasicRequestParser}.
|
* Input parsers required for a {@link BasicRequestParser}.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { HttpResponse } from '../../server/HttpResponse';
|
import type { HttpResponse } from '../../server/HttpResponse';
|
||||||
import { HttpError } from '../../util/errors/HttpError';
|
import { HttpError } from '../../util/errors/HttpError';
|
||||||
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
||||||
import { ResponseDescription } from '../operations/ResponseDescription';
|
import type { ResponseDescription } from '../operations/ResponseDescription';
|
||||||
import { ResponseWriter } from './ResponseWriter';
|
import { ResponseWriter } from './ResponseWriter';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { TLSSocket } from 'tls';
|
import type { TLSSocket } from 'tls';
|
||||||
import { format } from 'url';
|
import { format } from 'url';
|
||||||
import { HttpRequest } from '../../server/HttpRequest';
|
import type { HttpRequest } from '../../server/HttpRequest';
|
||||||
import { ResourceIdentifier } from '../representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../representation/ResourceIdentifier';
|
||||||
import { TargetExtractor } from './TargetExtractor';
|
import { TargetExtractor } from './TargetExtractor';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { HttpRequest } from '../../server/HttpRequest';
|
import type { HttpRequest } from '../../server/HttpRequest';
|
||||||
import { AsyncHandler } from '../../util/AsyncHandler';
|
import { AsyncHandler } from '../../util/AsyncHandler';
|
||||||
import { Representation } from '../representation/Representation';
|
import type { Representation } from '../representation/Representation';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses the body of an incoming {@link HttpRequest} and converts it to a {@link Representation}.
|
* Parses the body of an incoming {@link HttpRequest} and converts it to a {@link Representation}.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Representation } from '../representation/Representation';
|
import type { Representation } from '../representation/Representation';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the changes needed for a PATCH request.
|
* Represents the changes needed for a PATCH request.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { HttpRequest } from '../../server/HttpRequest';
|
import type { HttpRequest } from '../../server/HttpRequest';
|
||||||
import { AsyncHandler } from '../../util/AsyncHandler';
|
import { AsyncHandler } from '../../util/AsyncHandler';
|
||||||
import { RepresentationPreferences } from '../representation/RepresentationPreferences';
|
import type { RepresentationPreferences } from '../representation/RepresentationPreferences';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates {@link RepresentationPreferences} based on the incoming HTTP headers in a {@link HttpRequest}.
|
* Creates {@link RepresentationPreferences} based on the incoming HTTP headers in a {@link HttpRequest}.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { HttpRequest } from '../../server/HttpRequest';
|
import type { HttpRequest } from '../../server/HttpRequest';
|
||||||
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
||||||
import { CONTENT_TYPE, HTTP, RDF } from '../../util/UriConstants';
|
import { CONTENT_TYPE, HTTP, RDF } from '../../util/UriConstants';
|
||||||
import { Representation } from '../representation/Representation';
|
import type { Representation } from '../representation/Representation';
|
||||||
import { RepresentationMetadata } from '../representation/RepresentationMetadata';
|
import { RepresentationMetadata } from '../representation/RepresentationMetadata';
|
||||||
import { BodyParser } from './BodyParser';
|
import { BodyParser } from './BodyParser';
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { HttpRequest } from '../../server/HttpRequest';
|
import type { HttpRequest } from '../../server/HttpRequest';
|
||||||
import { AsyncHandler } from '../../util/AsyncHandler';
|
import { AsyncHandler } from '../../util/AsyncHandler';
|
||||||
import { Operation } from '../operations/Operation';
|
import type { Operation } from '../operations/Operation';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts an incoming HttpRequest to an Operation.
|
* Converts an incoming HttpRequest to an Operation.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { HttpResponse } from '../../server/HttpResponse';
|
import type { HttpResponse } from '../../server/HttpResponse';
|
||||||
import { AsyncHandler } from '../../util/AsyncHandler';
|
import { AsyncHandler } from '../../util/AsyncHandler';
|
||||||
import { ResponseDescription } from '../operations/ResponseDescription';
|
import type { ResponseDescription } from '../operations/ResponseDescription';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes to the HttpResponse.
|
* Writes to the HttpResponse.
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import { PassThrough } from 'stream';
|
import { PassThrough } from 'stream';
|
||||||
import { translate } from 'sparqlalgebrajs';
|
import { translate } from 'sparqlalgebrajs';
|
||||||
import { HttpRequest } from '../../server/HttpRequest';
|
import type { HttpRequest } from '../../server/HttpRequest';
|
||||||
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
||||||
import { UnsupportedMediaTypeHttpError } from '../../util/errors/UnsupportedMediaTypeHttpError';
|
import { UnsupportedMediaTypeHttpError } from '../../util/errors/UnsupportedMediaTypeHttpError';
|
||||||
import { CONTENT_TYPE } from '../../util/UriConstants';
|
import { CONTENT_TYPE } from '../../util/UriConstants';
|
||||||
import { readableToString } from '../../util/Util';
|
import { readableToString } from '../../util/Util';
|
||||||
import { RepresentationMetadata } from '../representation/RepresentationMetadata';
|
import { RepresentationMetadata } from '../representation/RepresentationMetadata';
|
||||||
import { BodyParser } from './BodyParser';
|
import { BodyParser } from './BodyParser';
|
||||||
import { SparqlUpdatePatch } from './SparqlUpdatePatch';
|
import type { SparqlUpdatePatch } from './SparqlUpdatePatch';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link BodyParser} that supports `application/sparql-update` content.
|
* {@link BodyParser} that supports `application/sparql-update` content.
|
||||||
@ -44,8 +44,11 @@ export class SparqlUpdateBodyParser extends BodyParser {
|
|||||||
data: dataCopy,
|
data: dataCopy,
|
||||||
metadata,
|
metadata,
|
||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error: unknown) {
|
||||||
throw new UnsupportedHttpError(error);
|
if (error instanceof Error) {
|
||||||
|
throw new UnsupportedHttpError(error.message);
|
||||||
|
}
|
||||||
|
throw new UnsupportedHttpError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Algebra } from 'sparqlalgebrajs';
|
import type { Algebra } from 'sparqlalgebrajs';
|
||||||
import { Patch } from './Patch';
|
import type { Patch } from './Patch';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A specific type of {@link Patch} corresponding to a SPARQL update.
|
* A specific type of {@link Patch} corresponding to a SPARQL update.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { HttpRequest } from '../../server/HttpRequest';
|
import type { HttpRequest } from '../../server/HttpRequest';
|
||||||
import { AsyncHandler } from '../../util/AsyncHandler';
|
import { AsyncHandler } from '../../util/AsyncHandler';
|
||||||
import { ResourceIdentifier } from '../representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../representation/ResourceIdentifier';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extracts a {@link ResourceIdentifier} from an incoming {@link HttpRequest}.
|
* Extracts a {@link ResourceIdentifier} from an incoming {@link HttpRequest}.
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { ResourceStore } from '../../storage/ResourceStore';
|
import type { ResourceStore } from '../../storage/ResourceStore';
|
||||||
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
||||||
import { Operation } from './Operation';
|
import type { Operation } from './Operation';
|
||||||
import { OperationHandler } from './OperationHandler';
|
import { OperationHandler } from './OperationHandler';
|
||||||
import { ResponseDescription } from './ResponseDescription';
|
import type { ResponseDescription } from './ResponseDescription';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles DELETE {@link Operation}s.
|
* Handles DELETE {@link Operation}s.
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { ResourceStore } from '../../storage/ResourceStore';
|
import type { ResourceStore } from '../../storage/ResourceStore';
|
||||||
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
||||||
import { Operation } from './Operation';
|
import type { Operation } from './Operation';
|
||||||
import { OperationHandler } from './OperationHandler';
|
import { OperationHandler } from './OperationHandler';
|
||||||
import { ResponseDescription } from './ResponseDescription';
|
import type { ResponseDescription } from './ResponseDescription';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles GET {@link Operation}s.
|
* Handles GET {@link Operation}s.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Representation } from '../representation/Representation';
|
import type { Representation } from '../representation/Representation';
|
||||||
import { RepresentationPreferences } from '../representation/RepresentationPreferences';
|
import type { RepresentationPreferences } from '../representation/RepresentationPreferences';
|
||||||
import { ResourceIdentifier } from '../representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../representation/ResourceIdentifier';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A single REST operation.
|
* A single REST operation.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { AsyncHandler } from '../../util/AsyncHandler';
|
import { AsyncHandler } from '../../util/AsyncHandler';
|
||||||
import { Operation } from './Operation';
|
import type { Operation } from './Operation';
|
||||||
import { ResponseDescription } from './ResponseDescription';
|
import type { ResponseDescription } from './ResponseDescription';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler for a specific operation type.
|
* Handler for a specific operation type.
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { ResourceStore } from '../../storage/ResourceStore';
|
import type { ResourceStore } from '../../storage/ResourceStore';
|
||||||
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
||||||
import { Patch } from '../http/Patch';
|
import type { Patch } from '../http/Patch';
|
||||||
import { Operation } from './Operation';
|
import type { Operation } from './Operation';
|
||||||
import { OperationHandler } from './OperationHandler';
|
import { OperationHandler } from './OperationHandler';
|
||||||
import { ResponseDescription } from './ResponseDescription';
|
import type { ResponseDescription } from './ResponseDescription';
|
||||||
|
|
||||||
export class PatchOperationHandler extends OperationHandler {
|
export class PatchOperationHandler extends OperationHandler {
|
||||||
private readonly store: ResourceStore;
|
private readonly store: ResourceStore;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { ResourceStore } from '../../storage/ResourceStore';
|
import type { ResourceStore } from '../../storage/ResourceStore';
|
||||||
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
||||||
import { Operation } from './Operation';
|
import type { Operation } from './Operation';
|
||||||
import { OperationHandler } from './OperationHandler';
|
import { OperationHandler } from './OperationHandler';
|
||||||
import { ResponseDescription } from './ResponseDescription';
|
import type { ResponseDescription } from './ResponseDescription';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles POST {@link Operation}s.
|
* Handles POST {@link Operation}s.
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { ResourceStore } from '../../storage/ResourceStore';
|
import type { ResourceStore } from '../../storage/ResourceStore';
|
||||||
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
||||||
import { Operation } from './Operation';
|
import type { Operation } from './Operation';
|
||||||
import { OperationHandler } from './OperationHandler';
|
import { OperationHandler } from './OperationHandler';
|
||||||
import { ResponseDescription } from './ResponseDescription';
|
import type { ResponseDescription } from './ResponseDescription';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles PUT {@link Operation}s.
|
* Handles PUT {@link Operation}s.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Representation } from '../representation/Representation';
|
import type { Representation } from '../representation/Representation';
|
||||||
import { ResourceIdentifier } from '../representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../representation/ResourceIdentifier';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The result of executing an operation.
|
* The result of executing an operation.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
||||||
import { Operation } from '../operations/Operation';
|
import type { Operation } from '../operations/Operation';
|
||||||
import { PermissionSet } from './PermissionSet';
|
import type { PermissionSet } from './PermissionSet';
|
||||||
import { PermissionsExtractor } from './PermissionsExtractor';
|
import { PermissionsExtractor } from './PermissionsExtractor';
|
||||||
|
|
||||||
const READ_METHODS = new Set([ 'GET', 'HEAD' ]);
|
const READ_METHODS = new Set([ 'GET', 'HEAD' ]);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { AsyncHandler } from '../../util/AsyncHandler';
|
import { AsyncHandler } from '../../util/AsyncHandler';
|
||||||
import { Operation } from '../operations/Operation';
|
import type { Operation } from '../operations/Operation';
|
||||||
import { PermissionSet } from './PermissionSet';
|
import type { PermissionSet } from './PermissionSet';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verifies which permissions are requested on a given {@link Operation}.
|
* Verifies which permissions are requested on a given {@link Operation}.
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { Algebra } from 'sparqlalgebrajs';
|
import { Algebra } from 'sparqlalgebrajs';
|
||||||
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
||||||
import { SparqlUpdatePatch } from '../http/SparqlUpdatePatch';
|
import type { SparqlUpdatePatch } from '../http/SparqlUpdatePatch';
|
||||||
import { Operation } from '../operations/Operation';
|
import type { Operation } from '../operations/Operation';
|
||||||
import { Representation } from '../representation/Representation';
|
import type { Representation } from '../representation/Representation';
|
||||||
import { PermissionSet } from './PermissionSet';
|
import type { PermissionSet } from './PermissionSet';
|
||||||
import { PermissionsExtractor } from './PermissionsExtractor';
|
import { PermissionsExtractor } from './PermissionsExtractor';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Readable } from 'stream';
|
import type { Readable } from 'stream';
|
||||||
import { RepresentationMetadata } from './RepresentationMetadata';
|
import type { RepresentationMetadata } from './RepresentationMetadata';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A representation of a resource.
|
* A representation of a resource.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { RepresentationPreference } from './RepresentationPreference';
|
import type { RepresentationPreference } from './RepresentationPreference';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contains the preferences of which kind of representation is requested.
|
* Contains the preferences of which kind of representation is requested.
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import { Server } from 'http';
|
import type { Server } from 'http';
|
||||||
import cors from 'cors';
|
import cors from 'cors';
|
||||||
import express, { Express } from 'express';
|
import type { Express } from 'express';
|
||||||
import { HttpHandler } from './HttpHandler';
|
import express from 'express';
|
||||||
|
import type { HttpHandler } from './HttpHandler';
|
||||||
|
|
||||||
export class ExpressHttpServer {
|
export class ExpressHttpServer {
|
||||||
private readonly handler: HttpHandler;
|
private readonly handler: HttpHandler;
|
||||||
@ -35,8 +36,8 @@ export class ExpressHttpServer {
|
|||||||
app.use(async(request, response, done): Promise<void> => {
|
app.use(async(request, response, done): Promise<void> => {
|
||||||
try {
|
try {
|
||||||
await this.handler.handleSafe({ request, response });
|
await this.handler.handleSafe({ request, response });
|
||||||
} catch (error) {
|
} catch (error: unknown) {
|
||||||
const errMsg = `${error.name}: ${error.message}\n${error.stack}`;
|
const errMsg = error instanceof Error ? `${error.name}: ${error.message}\n${error.stack}` : 'Unknown error.';
|
||||||
process.stderr.write(errMsg);
|
process.stderr.write(errMsg);
|
||||||
response.status(500).contentType('text/plain').send(errMsg);
|
response.status(500).contentType('text/plain').send(errMsg);
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { AsyncHandler } from '../util/AsyncHandler';
|
import { AsyncHandler } from '../util/AsyncHandler';
|
||||||
import { HttpRequest } from './HttpRequest';
|
import type { HttpRequest } from './HttpRequest';
|
||||||
import { HttpResponse } from './HttpResponse';
|
import type { HttpResponse } from './HttpResponse';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An HTTP request handler.
|
* An HTTP request handler.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { IncomingMessage } from 'http';
|
import type { IncomingMessage } from 'http';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An incoming HTTP request;
|
* An incoming HTTP request;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ServerResponse } from 'http';
|
import type { ServerResponse } from 'http';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An outgoing HTTP response;
|
* An outgoing HTTP response;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ResourceStore } from './ResourceStore';
|
import type { ResourceStore } from './ResourceStore';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A {@link ResourceStore} of which all operations are atomic.
|
* A {@link ResourceStore} of which all operations are atomic.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { RepresentationMetadata } from '../ldp/representation/RepresentationMetadata';
|
import type { RepresentationMetadata } from '../ldp/representation/RepresentationMetadata';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The conditions of an HTTP conditional request.
|
* The conditions of an HTTP conditional request.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the identification of containers in which a resource is contained.
|
* Handles the identification of containers in which a resource is contained.
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import { posix } from 'path';
|
import { posix } from 'path';
|
||||||
import { types } from 'mime-types';
|
import { types } from 'mime-types';
|
||||||
import { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
||||||
import { APPLICATION_OCTET_STREAM, TEXT_TURTLE } from '../util/ContentTypes';
|
import { APPLICATION_OCTET_STREAM, TEXT_TURTLE } from '../util/ContentTypes';
|
||||||
import { ConflictHttpError } from '../util/errors/ConflictHttpError';
|
import { ConflictHttpError } from '../util/errors/ConflictHttpError';
|
||||||
import { NotFoundHttpError } from '../util/errors/NotFoundHttpError';
|
import { NotFoundHttpError } from '../util/errors/NotFoundHttpError';
|
||||||
import { trimTrailingSlashes } from '../util/Util';
|
import { trimTrailingSlashes } from '../util/Util';
|
||||||
import { FileIdentifierMapper } from './FileIdentifierMapper';
|
import type { FileIdentifierMapper } from './FileIdentifierMapper';
|
||||||
|
|
||||||
const { join: joinPath, normalize: normalizePath } = posix;
|
const { join: joinPath, normalize: normalizePath } = posix;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Supports mapping a file to an URL and back.
|
* Supports mapping a file to an URL and back.
|
||||||
|
@ -1,24 +1,25 @@
|
|||||||
import { createReadStream, createWriteStream, promises as fsPromises, Stats } from 'fs';
|
import type { Stats } from 'fs';
|
||||||
|
import { createReadStream, createWriteStream, promises as fsPromises } from 'fs';
|
||||||
import { posix } from 'path';
|
import { posix } from 'path';
|
||||||
import { Readable } from 'stream';
|
import type { Readable } from 'stream';
|
||||||
import { DataFactory } from 'n3';
|
import { DataFactory } from 'n3';
|
||||||
import type { Quad } from 'rdf-js';
|
import type { Quad } from 'rdf-js';
|
||||||
import streamifyArray from 'streamify-array';
|
import streamifyArray from 'streamify-array';
|
||||||
import { Representation } from '../ldp/representation/Representation';
|
import type { Representation } from '../ldp/representation/Representation';
|
||||||
import { RepresentationMetadata } from '../ldp/representation/RepresentationMetadata';
|
import { RepresentationMetadata } from '../ldp/representation/RepresentationMetadata';
|
||||||
import { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
||||||
import { INTERNAL_QUADS } from '../util/ContentTypes';
|
import { INTERNAL_QUADS } from '../util/ContentTypes';
|
||||||
import { ConflictHttpError } from '../util/errors/ConflictHttpError';
|
import { ConflictHttpError } from '../util/errors/ConflictHttpError';
|
||||||
import { MethodNotAllowedHttpError } from '../util/errors/MethodNotAllowedHttpError';
|
import { MethodNotAllowedHttpError } from '../util/errors/MethodNotAllowedHttpError';
|
||||||
import { NotFoundHttpError } from '../util/errors/NotFoundHttpError';
|
import { NotFoundHttpError } from '../util/errors/NotFoundHttpError';
|
||||||
import { UnsupportedMediaTypeHttpError } from '../util/errors/UnsupportedMediaTypeHttpError';
|
import { UnsupportedMediaTypeHttpError } from '../util/errors/UnsupportedMediaTypeHttpError';
|
||||||
import { InteractionController } from '../util/InteractionController';
|
import type { InteractionController } from '../util/InteractionController';
|
||||||
import { MetadataController } from '../util/MetadataController';
|
import type { MetadataController } from '../util/MetadataController';
|
||||||
import { CONTENT_TYPE, DCTERMS, HTTP, POSIX, RDF, XSD } from '../util/UriConstants';
|
import { CONTENT_TYPE, DCTERMS, HTTP, POSIX, RDF, XSD } from '../util/UriConstants';
|
||||||
import { getTypedLiteral } from '../util/UriUtil';
|
import { getTypedLiteral } from '../util/UriUtil';
|
||||||
import { ensureTrailingSlash } from '../util/Util';
|
import { ensureTrailingSlash } from '../util/Util';
|
||||||
import { ExtensionBasedMapper } from './ExtensionBasedMapper';
|
import type { ExtensionBasedMapper } from './ExtensionBasedMapper';
|
||||||
import { ResourceStore } from './ResourceStore';
|
import type { ResourceStore } from './ResourceStore';
|
||||||
|
|
||||||
const { join: joinPath } = posix;
|
const { join: joinPath } = posix;
|
||||||
|
|
||||||
@ -91,7 +92,7 @@ export class FileResourceStore implements ResourceStore {
|
|||||||
let stats;
|
let stats;
|
||||||
try {
|
try {
|
||||||
stats = await fsPromises.lstat(path);
|
stats = await fsPromises.lstat(path);
|
||||||
} catch (error) {
|
} catch {
|
||||||
throw new NotFoundHttpError();
|
throw new NotFoundHttpError();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,7 +119,7 @@ export class FileResourceStore implements ResourceStore {
|
|||||||
let stats;
|
let stats;
|
||||||
try {
|
try {
|
||||||
stats = await fsPromises.lstat(path);
|
stats = await fsPromises.lstat(path);
|
||||||
} catch (error) {
|
} catch {
|
||||||
throw new NotFoundHttpError();
|
throw new NotFoundHttpError();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,7 +180,7 @@ export class FileResourceStore implements ResourceStore {
|
|||||||
// Only delete the metadata file as auxiliary resource because this is the only file created by this store.
|
// Only delete the metadata file as auxiliary resource because this is the only file created by this store.
|
||||||
try {
|
try {
|
||||||
await fsPromises.unlink(`${path}.metadata`);
|
await fsPromises.unlink(`${path}.metadata`);
|
||||||
} catch (_) {
|
} catch {
|
||||||
// It's ok if there was no metadata file.
|
// It's ok if there was no metadata file.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -198,7 +199,7 @@ export class FileResourceStore implements ResourceStore {
|
|||||||
// Only delete the metadata file as auxiliary resource because this is the only file created by this store.
|
// Only delete the metadata file as auxiliary resource because this is the only file created by this store.
|
||||||
try {
|
try {
|
||||||
await fsPromises.unlink(joinPath(path, '.metadata'));
|
await fsPromises.unlink(joinPath(path, '.metadata'));
|
||||||
} catch (_) {
|
} catch {
|
||||||
// It's ok if there was no metadata file.
|
// It's ok if there was no metadata file.
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,7 +221,7 @@ export class FileResourceStore implements ResourceStore {
|
|||||||
try {
|
try {
|
||||||
const readMetadataStream = createReadStream(`${path}.metadata`);
|
const readMetadataStream = createReadStream(`${path}.metadata`);
|
||||||
rawMetadata = await this.metadataController.parseQuads(readMetadataStream);
|
rawMetadata = await this.metadataController.parseQuads(readMetadataStream);
|
||||||
} catch (_) {
|
} catch {
|
||||||
// Metadata file doesn't exist so lets keep `rawMetaData` an empty array.
|
// Metadata file doesn't exist so lets keep `rawMetaData` an empty array.
|
||||||
}
|
}
|
||||||
const metadata = new RepresentationMetadata(this.resourceMapper.mapFilePathToUrl(path)).addQuads(rawMetadata)
|
const metadata = new RepresentationMetadata(this.resourceMapper.mapFilePathToUrl(path)).addQuads(rawMetadata)
|
||||||
@ -253,7 +254,7 @@ export class FileResourceStore implements ResourceStore {
|
|||||||
try {
|
try {
|
||||||
const readMetadataStream = createReadStream(joinPath(path, '.metadata'));
|
const readMetadataStream = createReadStream(joinPath(path, '.metadata'));
|
||||||
rawMetadata = await this.metadataController.parseQuads(readMetadataStream);
|
rawMetadata = await this.metadataController.parseQuads(readMetadataStream);
|
||||||
} catch (_) {
|
} catch {
|
||||||
// Metadata file doesn't exist so lets keep `rawMetaData` an empty array.
|
// Metadata file doesn't exist so lets keep `rawMetaData` an empty array.
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -289,7 +290,7 @@ export class FileResourceStore implements ResourceStore {
|
|||||||
|
|
||||||
quads.push(...this.metadataController.generateResourceQuads(childURI, childStats));
|
quads.push(...this.metadataController.generateResourceQuads(childURI, childStats));
|
||||||
childURIs.push(childURI);
|
childURIs.push(childURI);
|
||||||
} catch (_) {
|
} catch {
|
||||||
// Skip the child if there is an error.
|
// Skip the child if there is an error.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -314,7 +315,7 @@ export class FileResourceStore implements ResourceStore {
|
|||||||
stats = await fsPromises.lstat(
|
stats = await fsPromises.lstat(
|
||||||
this.resourceMapper.getAbsolutePath(path, newIdentifier),
|
this.resourceMapper.getAbsolutePath(path, newIdentifier),
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch {
|
||||||
await this.createFile(path, newIdentifier, data, true, metadata);
|
await this.createFile(path, newIdentifier, data, true, metadata);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -338,7 +339,7 @@ export class FileResourceStore implements ResourceStore {
|
|||||||
this.resourceMapper.getAbsolutePath(path, newIdentifier),
|
this.resourceMapper.getAbsolutePath(path, newIdentifier),
|
||||||
);
|
);
|
||||||
throw new ConflictHttpError('Resource with that identifier already exists.');
|
throw new ConflictHttpError('Resource with that identifier already exists.');
|
||||||
} catch (error) {
|
} catch (error: unknown) {
|
||||||
if (error instanceof ConflictHttpError) {
|
if (error instanceof ConflictHttpError) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
@ -369,7 +370,7 @@ export class FileResourceStore implements ResourceStore {
|
|||||||
let stats;
|
let stats;
|
||||||
try {
|
try {
|
||||||
stats = await fsPromises.lstat(this.resourceMapper.getAbsolutePath(path));
|
stats = await fsPromises.lstat(this.resourceMapper.getAbsolutePath(path));
|
||||||
} catch (error) {
|
} catch {
|
||||||
throw new MethodNotAllowedHttpError();
|
throw new MethodNotAllowedHttpError();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -387,7 +388,7 @@ export class FileResourceStore implements ResourceStore {
|
|||||||
const fullPath = this.resourceMapper.getAbsolutePath(path, resourceName);
|
const fullPath = this.resourceMapper.getAbsolutePath(path, resourceName);
|
||||||
await this.createDataFile(fullPath, data);
|
await this.createDataFile(fullPath, data);
|
||||||
return { path: this.resourceMapper.mapFilePathToUrl(fullPath) };
|
return { path: this.resourceMapper.mapFilePathToUrl(fullPath) };
|
||||||
} catch (error) {
|
} catch (error: unknown) {
|
||||||
// Normal file has not been created so we don't want the metadata file to remain.
|
// Normal file has not been created so we don't want the metadata file to remain.
|
||||||
await fsPromises.unlink(this.resourceMapper.getAbsolutePath(path, `${resourceName}.metadata`));
|
await fsPromises.unlink(this.resourceMapper.getAbsolutePath(path, `${resourceName}.metadata`));
|
||||||
throw error;
|
throw error;
|
||||||
@ -417,7 +418,7 @@ export class FileResourceStore implements ResourceStore {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
await fsPromises.mkdir(fullPath, { recursive: allowRecursiveCreation });
|
await fsPromises.mkdir(fullPath, { recursive: allowRecursiveCreation });
|
||||||
} catch (error) {
|
} catch (error: unknown) {
|
||||||
if (error instanceof MethodNotAllowedHttpError) {
|
if (error instanceof MethodNotAllowedHttpError) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
@ -429,7 +430,7 @@ export class FileResourceStore implements ResourceStore {
|
|||||||
if (metadata) {
|
if (metadata) {
|
||||||
try {
|
try {
|
||||||
await this.createDataFile(joinPath(fullPath, '.metadata'), metadata);
|
await this.createDataFile(joinPath(fullPath, '.metadata'), metadata);
|
||||||
} catch (error) {
|
} catch (error: unknown) {
|
||||||
// Failed to create the metadata file so remove the created directory.
|
// Failed to create the metadata file so remove the created directory.
|
||||||
await fsPromises.rmdir(fullPath);
|
await fsPromises.rmdir(fullPath);
|
||||||
throw error;
|
throw error;
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import { PassThrough } from 'stream';
|
import { PassThrough } from 'stream';
|
||||||
import arrayifyStream from 'arrayify-stream';
|
import arrayifyStream from 'arrayify-stream';
|
||||||
import streamifyArray from 'streamify-array';
|
import streamifyArray from 'streamify-array';
|
||||||
import { Representation } from '../ldp/representation/Representation';
|
import type { Representation } from '../ldp/representation/Representation';
|
||||||
import { RepresentationMetadata } from '../ldp/representation/RepresentationMetadata';
|
import { RepresentationMetadata } from '../ldp/representation/RepresentationMetadata';
|
||||||
import { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
||||||
import { TEXT_TURTLE } from '../util/ContentTypes';
|
import { TEXT_TURTLE } from '../util/ContentTypes';
|
||||||
import { NotFoundHttpError } from '../util/errors/NotFoundHttpError';
|
import { NotFoundHttpError } from '../util/errors/NotFoundHttpError';
|
||||||
import { CONTENT_TYPE } from '../util/UriConstants';
|
import { CONTENT_TYPE } from '../util/UriConstants';
|
||||||
import { ensureTrailingSlash } from '../util/Util';
|
import { ensureTrailingSlash } from '../util/Util';
|
||||||
import { ResourceStore } from './ResourceStore';
|
import type { ResourceStore } from './ResourceStore';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resource store storing its data in an in-memory map.
|
* Resource store storing its data in an in-memory map.
|
||||||
@ -133,10 +133,9 @@ export class InMemoryResourceStore implements ResourceStore {
|
|||||||
* @param source - Incoming Representation.
|
* @param source - Incoming Representation.
|
||||||
*/
|
*/
|
||||||
private async copyRepresentation(source: Representation): Promise<Representation> {
|
private async copyRepresentation(source: Representation): Promise<Representation> {
|
||||||
const arr = await arrayifyStream(source.data);
|
|
||||||
return {
|
return {
|
||||||
binary: source.binary,
|
binary: source.binary,
|
||||||
data: streamifyArray([ ...arr ]),
|
data: streamifyArray(await arrayifyStream(source.data)),
|
||||||
metadata: source.metadata,
|
metadata: source.metadata,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { Readable } from 'stream';
|
import type { Readable } from 'stream';
|
||||||
import { Patch } from '../ldp/http/Patch';
|
import type { Patch } from '../ldp/http/Patch';
|
||||||
import { Representation } from '../ldp/representation/Representation';
|
import type { Representation } from '../ldp/representation/Representation';
|
||||||
import { RepresentationPreferences } from '../ldp/representation/RepresentationPreferences';
|
import type { RepresentationPreferences } from '../ldp/representation/RepresentationPreferences';
|
||||||
import { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
||||||
import { AtomicResourceStore } from './AtomicResourceStore';
|
import type { AtomicResourceStore } from './AtomicResourceStore';
|
||||||
import { Conditions } from './Conditions';
|
import type { Conditions } from './Conditions';
|
||||||
import { ResourceLocker } from './ResourceLocker';
|
import type { ResourceLocker } from './ResourceLocker';
|
||||||
import { ResourceStore } from './ResourceStore';
|
import type { ResourceStore } from './ResourceStore';
|
||||||
|
|
||||||
/** Time in ms after which reading a representation times out, causing the lock to be released. */
|
/** Time in ms after which reading a representation times out, causing the lock to be released. */
|
||||||
const READ_TIMEOUT = 1000;
|
const READ_TIMEOUT = 1000;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { Patch } from '../ldp/http/Patch';
|
import type { Patch } from '../ldp/http/Patch';
|
||||||
import { Representation } from '../ldp/representation/Representation';
|
import type { Representation } from '../ldp/representation/Representation';
|
||||||
import { RepresentationPreferences } from '../ldp/representation/RepresentationPreferences';
|
import type { RepresentationPreferences } from '../ldp/representation/RepresentationPreferences';
|
||||||
import { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
||||||
import { Conditions } from './Conditions';
|
import type { Conditions } from './Conditions';
|
||||||
import { ResourceStore } from './ResourceStore';
|
import type { ResourceStore } from './ResourceStore';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store that calls the corresponding functions of the source Store.
|
* Store that calls the corresponding functions of the source Store.
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { Patch } from '../ldp/http/Patch';
|
import type { Patch } from '../ldp/http/Patch';
|
||||||
import { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
||||||
import { Conditions } from './Conditions';
|
import type { Conditions } from './Conditions';
|
||||||
import { PassthroughStore } from './PassthroughStore';
|
import { PassthroughStore } from './PassthroughStore';
|
||||||
import { PatchHandler } from './patch/PatchHandler';
|
import type { PatchHandler } from './patch/PatchHandler';
|
||||||
import { ResourceStore } from './ResourceStore';
|
import type { ResourceStore } from './ResourceStore';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link ResourceStore} using decorator pattern for the `modifyResource` function.
|
* {@link ResourceStore} using decorator pattern for the `modifyResource` function.
|
||||||
@ -21,7 +21,7 @@ export class PatchingStore<T extends ResourceStore = ResourceStore> extends Pass
|
|||||||
public async modifyResource(identifier: ResourceIdentifier, patch: Patch, conditions?: Conditions): Promise<void> {
|
public async modifyResource(identifier: ResourceIdentifier, patch: Patch, conditions?: Conditions): Promise<void> {
|
||||||
try {
|
try {
|
||||||
return await this.source.modifyResource(identifier, patch, conditions);
|
return await this.source.modifyResource(identifier, patch, conditions);
|
||||||
} catch (error) {
|
} catch {
|
||||||
return this.patcher.handleSafe({ identifier, patch });
|
return this.patcher.handleSafe({ identifier, patch });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import { Representation } from '../ldp/representation/Representation';
|
import type { Representation } from '../ldp/representation/Representation';
|
||||||
import { RepresentationPreferences } from '../ldp/representation/RepresentationPreferences';
|
import type { RepresentationPreferences } from '../ldp/representation/RepresentationPreferences';
|
||||||
import { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
||||||
import { matchingMediaType } from '../util/Util';
|
import { matchingMediaType } from '../util/Util';
|
||||||
import { Conditions } from './Conditions';
|
import type { Conditions } from './Conditions';
|
||||||
import { RepresentationConverter } from './conversion/RepresentationConverter';
|
import type { RepresentationConverter } from './conversion/RepresentationConverter';
|
||||||
import { PassthroughStore } from './PassthroughStore';
|
import { PassthroughStore } from './PassthroughStore';
|
||||||
import { ResourceStore } from './ResourceStore';
|
import type { ResourceStore } from './ResourceStore';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store that overrides the `getRepresentation` function.
|
* Store that overrides the `getRepresentation` function.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
||||||
import { Lock } from './Lock';
|
import type { Lock } from './Lock';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows the locking of resources which is needed for non-atomic {@link ResourceStore}s.
|
* Allows the locking of resources which is needed for non-atomic {@link ResourceStore}s.
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { Patch } from '../ldp/http/Patch';
|
import type { Patch } from '../ldp/http/Patch';
|
||||||
import { Representation } from '../ldp/representation/Representation';
|
import type { Representation } from '../ldp/representation/Representation';
|
||||||
import { RepresentationPreferences } from '../ldp/representation/RepresentationPreferences';
|
import type { RepresentationPreferences } from '../ldp/representation/RepresentationPreferences';
|
||||||
import { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
||||||
import { Conditions } from './Conditions';
|
import type { Conditions } from './Conditions';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A ResourceStore represents a collection of resources.
|
* A ResourceStore represents a collection of resources.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import AsyncLock from 'async-lock';
|
import AsyncLock from 'async-lock';
|
||||||
import { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
||||||
import { Lock } from './Lock';
|
import type { Lock } from './Lock';
|
||||||
import { ResourceLocker } from './ResourceLocker';
|
import type { ResourceLocker } from './ResourceLocker';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A resource locker making use of the `async-lock` library.
|
* A resource locker making use of the `async-lock` library.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
||||||
import { ensureTrailingSlash } from '../util/Util';
|
import { ensureTrailingSlash } from '../util/Util';
|
||||||
import { ContainerManager } from './ContainerManager';
|
import type { ContainerManager } from './ContainerManager';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines containers based on URL decomposition.
|
* Determines containers based on URL decomposition.
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { Representation } from '../../ldp/representation/Representation';
|
import type { Representation } from '../../ldp/representation/Representation';
|
||||||
import { RepresentationMetadata } from '../../ldp/representation/RepresentationMetadata';
|
import { RepresentationMetadata } from '../../ldp/representation/RepresentationMetadata';
|
||||||
import { RepresentationPreferences } from '../../ldp/representation/RepresentationPreferences';
|
import type { RepresentationPreferences } from '../../ldp/representation/RepresentationPreferences';
|
||||||
import { CONTENT_TYPE } from '../../util/UriConstants';
|
import { CONTENT_TYPE } from '../../util/UriConstants';
|
||||||
import { matchingMediaType } from '../../util/Util';
|
import { matchingMediaType } from '../../util/Util';
|
||||||
import { RepresentationConverterArgs } from './RepresentationConverter';
|
import type { RepresentationConverterArgs } from './RepresentationConverter';
|
||||||
import { TypedRepresentationConverter } from './TypedRepresentationConverter';
|
import { TypedRepresentationConverter } from './TypedRepresentationConverter';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { RepresentationPreference } from '../../ldp/representation/RepresentationPreference';
|
import type { RepresentationPreference } from '../../ldp/representation/RepresentationPreference';
|
||||||
import { RepresentationPreferences } from '../../ldp/representation/RepresentationPreferences';
|
import type { RepresentationPreferences } from '../../ldp/representation/RepresentationPreferences';
|
||||||
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
||||||
import { matchingMediaType } from '../../util/Util';
|
import { matchingMediaType } from '../../util/Util';
|
||||||
import { RepresentationConverterArgs } from './RepresentationConverter';
|
import type { RepresentationConverterArgs } from './RepresentationConverter';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters out the media types from the preferred types that correspond to one of the supported types.
|
* Filters out the media types from the preferred types that correspond to one of the supported types.
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { Readable } from 'stream';
|
import type { Readable } from 'stream';
|
||||||
import rdfSerializer from 'rdf-serialize';
|
import rdfSerializer from 'rdf-serialize';
|
||||||
import { Representation } from '../../ldp/representation/Representation';
|
import type { Representation } from '../../ldp/representation/Representation';
|
||||||
import { RepresentationMetadata } from '../../ldp/representation/RepresentationMetadata';
|
import { RepresentationMetadata } from '../../ldp/representation/RepresentationMetadata';
|
||||||
import { RepresentationPreferences } from '../../ldp/representation/RepresentationPreferences';
|
import type { RepresentationPreferences } from '../../ldp/representation/RepresentationPreferences';
|
||||||
import { INTERNAL_QUADS } from '../../util/ContentTypes';
|
import { INTERNAL_QUADS } from '../../util/ContentTypes';
|
||||||
import { CONTENT_TYPE } from '../../util/UriConstants';
|
import { CONTENT_TYPE } from '../../util/UriConstants';
|
||||||
import { checkRequest, matchingTypes } from './ConversionUtil';
|
import { checkRequest, matchingTypes } from './ConversionUtil';
|
||||||
import { RepresentationConverterArgs } from './RepresentationConverter';
|
import type { RepresentationConverterArgs } from './RepresentationConverter';
|
||||||
import { TypedRepresentationConverter } from './TypedRepresentationConverter';
|
import { TypedRepresentationConverter } from './TypedRepresentationConverter';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import { StreamWriter } from 'n3';
|
import { StreamWriter } from 'n3';
|
||||||
import { Representation } from '../../ldp/representation/Representation';
|
import type { Representation } from '../../ldp/representation/Representation';
|
||||||
import { RepresentationMetadata } from '../../ldp/representation/RepresentationMetadata';
|
import { RepresentationMetadata } from '../../ldp/representation/RepresentationMetadata';
|
||||||
import { INTERNAL_QUADS, TEXT_TURTLE } from '../../util/ContentTypes';
|
import { INTERNAL_QUADS, TEXT_TURTLE } from '../../util/ContentTypes';
|
||||||
import { CONTENT_TYPE } from '../../util/UriConstants';
|
import { CONTENT_TYPE } from '../../util/UriConstants';
|
||||||
import { checkRequest } from './ConversionUtil';
|
import { checkRequest } from './ConversionUtil';
|
||||||
import { RepresentationConverter, RepresentationConverterArgs } from './RepresentationConverter';
|
import type { RepresentationConverterArgs } from './RepresentationConverter';
|
||||||
|
import { RepresentationConverter } from './RepresentationConverter';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts `internal/quads` to `text/turtle`.
|
* Converts `internal/quads` to `text/turtle`.
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { PassThrough } from 'stream';
|
import { PassThrough } from 'stream';
|
||||||
import rdfParser from 'rdf-parse';
|
import rdfParser from 'rdf-parse';
|
||||||
import { Representation } from '../../ldp/representation/Representation';
|
import type { Representation } from '../../ldp/representation/Representation';
|
||||||
import { RepresentationMetadata } from '../../ldp/representation/RepresentationMetadata';
|
import { RepresentationMetadata } from '../../ldp/representation/RepresentationMetadata';
|
||||||
import { INTERNAL_QUADS } from '../../util/ContentTypes';
|
import { INTERNAL_QUADS } from '../../util/ContentTypes';
|
||||||
import { CONTENT_TYPE } from '../../util/UriConstants';
|
import { CONTENT_TYPE } from '../../util/UriConstants';
|
||||||
import { pipeStreamsAndErrors } from '../../util/Util';
|
import { pipeStreamsAndErrors } from '../../util/Util';
|
||||||
import { checkRequest } from './ConversionUtil';
|
import { checkRequest } from './ConversionUtil';
|
||||||
import { RepresentationConverterArgs } from './RepresentationConverter';
|
import type { RepresentationConverterArgs } from './RepresentationConverter';
|
||||||
import { TypedRepresentationConverter } from './TypedRepresentationConverter';
|
import { TypedRepresentationConverter } from './TypedRepresentationConverter';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Representation } from '../../ldp/representation/Representation';
|
import type { Representation } from '../../ldp/representation/Representation';
|
||||||
import { RepresentationPreferences } from '../../ldp/representation/RepresentationPreferences';
|
import type { RepresentationPreferences } from '../../ldp/representation/RepresentationPreferences';
|
||||||
import { ResourceIdentifier } from '../../ldp/representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../../ldp/representation/ResourceIdentifier';
|
||||||
import { AsyncHandler } from '../../util/AsyncHandler';
|
import { AsyncHandler } from '../../util/AsyncHandler';
|
||||||
|
|
||||||
export interface RepresentationConverterArgs {
|
export interface RepresentationConverterArgs {
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import { PassThrough } from 'stream';
|
import { PassThrough } from 'stream';
|
||||||
import { StreamParser } from 'n3';
|
import { StreamParser } from 'n3';
|
||||||
import { Representation } from '../../ldp/representation/Representation';
|
import type { Representation } from '../../ldp/representation/Representation';
|
||||||
import { RepresentationMetadata } from '../../ldp/representation/RepresentationMetadata';
|
import { RepresentationMetadata } from '../../ldp/representation/RepresentationMetadata';
|
||||||
import { TEXT_TURTLE, INTERNAL_QUADS } from '../../util/ContentTypes';
|
import { TEXT_TURTLE, INTERNAL_QUADS } from '../../util/ContentTypes';
|
||||||
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
||||||
import { CONTENT_TYPE } from '../../util/UriConstants';
|
import { CONTENT_TYPE } from '../../util/UriConstants';
|
||||||
import { checkRequest } from './ConversionUtil';
|
import { checkRequest } from './ConversionUtil';
|
||||||
import { RepresentationConverter, RepresentationConverterArgs } from './RepresentationConverter';
|
import type { RepresentationConverterArgs } from './RepresentationConverter';
|
||||||
|
import { RepresentationConverter } from './RepresentationConverter';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts `text/turtle` to `internal/quads`.
|
* Converts `text/turtle` to `internal/quads`.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Patch } from '../../ldp/http/Patch';
|
import type { Patch } from '../../ldp/http/Patch';
|
||||||
import { ResourceIdentifier } from '../../ldp/representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../../ldp/representation/ResourceIdentifier';
|
||||||
import { AsyncHandler } from '../../util/AsyncHandler';
|
import { AsyncHandler } from '../../util/AsyncHandler';
|
||||||
|
|
||||||
export abstract class PatchHandler extends AsyncHandler<{identifier: ResourceIdentifier; patch: Patch}> {}
|
export abstract class PatchHandler extends AsyncHandler<{identifier: ResourceIdentifier; patch: Patch}> {}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
import { Readable } from 'stream';
|
import type { Readable } from 'stream';
|
||||||
import { defaultGraph } from '@rdfjs/data-model';
|
import { defaultGraph } from '@rdfjs/data-model';
|
||||||
import { Store } from 'n3';
|
import { Store } from 'n3';
|
||||||
import type { BaseQuad } from 'rdf-js';
|
import type { BaseQuad } from 'rdf-js';
|
||||||
import { someTerms } from 'rdf-terms';
|
import { someTerms } from 'rdf-terms';
|
||||||
import { Algebra } from 'sparqlalgebrajs';
|
import { Algebra } from 'sparqlalgebrajs';
|
||||||
import { SparqlUpdatePatch } from '../../ldp/http/SparqlUpdatePatch';
|
import type { SparqlUpdatePatch } from '../../ldp/http/SparqlUpdatePatch';
|
||||||
import { Representation } from '../../ldp/representation/Representation';
|
import type { Representation } from '../../ldp/representation/Representation';
|
||||||
import { RepresentationMetadata } from '../../ldp/representation/RepresentationMetadata';
|
import { RepresentationMetadata } from '../../ldp/representation/RepresentationMetadata';
|
||||||
import { ResourceIdentifier } from '../../ldp/representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../../ldp/representation/ResourceIdentifier';
|
||||||
import { INTERNAL_QUADS } from '../../util/ContentTypes';
|
import { INTERNAL_QUADS } from '../../util/ContentTypes';
|
||||||
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
||||||
import { CONTENT_TYPE } from '../../util/UriConstants';
|
import { CONTENT_TYPE } from '../../util/UriConstants';
|
||||||
import { ResourceLocker } from '../ResourceLocker';
|
import type { ResourceLocker } from '../ResourceLocker';
|
||||||
import { ResourceStore } from '../ResourceStore';
|
import type { ResourceStore } from '../ResourceStore';
|
||||||
import { PatchHandler } from './PatchHandler';
|
import { PatchHandler } from './PatchHandler';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -104,7 +104,7 @@ const transformQuotedStrings = (input: string): { result: string; replacements:
|
|||||||
const replacements: { [id: string]: string } = {};
|
const replacements: { [id: string]: string } = {};
|
||||||
const result = input.replace(/"(?:[^"\\]|\\.)*"/gu, (match): string => {
|
const result = input.replace(/"(?:[^"\\]|\\.)*"/gu, (match): string => {
|
||||||
// Not all characters allowed in quoted strings, see BNF above
|
// Not all characters allowed in quoted strings, see BNF above
|
||||||
if (!/^"(?:[\t !\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|(?:\\[\t\u0020-\u007e\u0080-\u00ff]))*"$/u.test(match)) {
|
if (!/^"(?:[\t !\u0023-\u005B\u005D-\u007E\u0080-\u00FF]|(?:\\[\t\u0020-\u007E\u0080-\u00FF]))*"$/u.test(match)) {
|
||||||
throw new UnsupportedHttpError(
|
throw new UnsupportedHttpError(
|
||||||
`Invalid quoted string in Accept header: ${match}. Check which characters are allowed`,
|
`Invalid quoted string in Accept header: ${match}. Check which characters are allowed`,
|
||||||
);
|
);
|
||||||
@ -179,7 +179,7 @@ const parseAcceptPart = (part: string, replacements: { [id: string]: string }):
|
|||||||
// Extension parameters appear after the q value
|
// Extension parameters appear after the q value
|
||||||
map = extensionParams;
|
map = extensionParams;
|
||||||
testQValue(param);
|
testQValue(param);
|
||||||
weight = parseFloat(value);
|
weight = Number.parseFloat(value);
|
||||||
} else {
|
} else {
|
||||||
// Test replaced string for easier check
|
// Test replaced string for easier check
|
||||||
// parameter = token "=" ( token / quoted-string )
|
// parameter = token "=" ( token / quoted-string )
|
||||||
@ -229,7 +229,7 @@ const parseNoParameters = (input: string): { range: string; weight: number }[] =
|
|||||||
const result = { range, weight: 1 };
|
const result = { range, weight: 1 };
|
||||||
if (qvalue) {
|
if (qvalue) {
|
||||||
testQValue(qvalue);
|
testQValue(qvalue);
|
||||||
result.weight = parseFloat(qvalue.split('=')[1]);
|
result.weight = Number.parseFloat(qvalue.split('=')[1]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}).sort((left, right): number => right.weight - left.weight);
|
}).sort((left, right): number => right.weight - left.weight);
|
||||||
|
@ -9,7 +9,7 @@ export abstract class AsyncHandler<TInput, TOutput = void> {
|
|||||||
*
|
*
|
||||||
* @returns A promise resolving if this input can be handled, rejecting with an Error if not.
|
* @returns A promise resolving if this input can be handled, rejecting with an Error if not.
|
||||||
*/
|
*/
|
||||||
public abstract canHandle (input: TInput): Promise<void>;
|
public abstract canHandle(input: TInput): Promise<void>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the given input. This should only be done if the {@link canHandle} function returned `true`.
|
* Handles the given input. This should only be done if the {@link canHandle} function returned `true`.
|
||||||
@ -17,7 +17,7 @@ export abstract class AsyncHandler<TInput, TOutput = void> {
|
|||||||
*
|
*
|
||||||
* @returns A promise resolving when the handling is finished. Return value depends on the given type.
|
* @returns A promise resolving when the handling is finished. Return value depends on the given type.
|
||||||
*/
|
*/
|
||||||
public abstract handle (input: TInput): Promise<TOutput>;
|
public abstract handle(input: TInput): Promise<TOutput>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper function that first runs the canHandle function followed by the handle function.
|
* Helper function that first runs the canHandle function followed by the handle function.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { AsyncHandler } from './AsyncHandler';
|
import type { AsyncHandler } from './AsyncHandler';
|
||||||
import { UnsupportedHttpError } from './errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from './errors/UnsupportedHttpError';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -40,7 +40,7 @@ export class CompositeAsyncHandler<TIn, TOut> implements AsyncHandler<TIn, TOut>
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
handler = await this.findHandler(input);
|
handler = await this.findHandler(input);
|
||||||
} catch (error) {
|
} catch {
|
||||||
throw new Error('All handlers failed. This might be the consequence of calling handle before canHandle.');
|
throw new Error('All handlers failed. This might be the consequence of calling handle before canHandle.');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,8 +77,12 @@ export class CompositeAsyncHandler<TIn, TOut> implements AsyncHandler<TIn, TOut>
|
|||||||
await handler.canHandle(input);
|
await handler.canHandle(input);
|
||||||
|
|
||||||
return handler;
|
return handler;
|
||||||
} catch (error) {
|
} catch (error: unknown) {
|
||||||
|
if (error instanceof Error) {
|
||||||
errors.push(error);
|
errors.push(error);
|
||||||
|
} else {
|
||||||
|
errors.push(new Error('Unknown error.'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Stats } from 'fs';
|
import type { Stats } from 'fs';
|
||||||
import { Readable } from 'stream';
|
import type { Readable } from 'stream';
|
||||||
import arrayifyStream from 'arrayify-stream';
|
import arrayifyStream from 'arrayify-stream';
|
||||||
import { DataFactory, StreamParser, StreamWriter } from 'n3';
|
import { DataFactory, StreamParser, StreamWriter } from 'n3';
|
||||||
import type { Quad } from 'rdf-js';
|
import type { Quad } from 'rdf-js';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const createSuffixFn = (prefix: string): any => (suffix: string): string => `${prefix}${suffix}`;
|
const createSuffixFn = (prefix: string): ((suf: string) => string) => (suffix: string): string => `${prefix}${suffix}`;
|
||||||
|
|
||||||
const ACL_PREFIX = createSuffixFn('http://www.w3.org/ns/auth/acl#');
|
const ACL_PREFIX = createSuffixFn('http://www.w3.org/ns/auth/acl#');
|
||||||
export const ACL = {
|
export const ACL = {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Readable, Writable } from 'stream';
|
import type { Readable, Writable } from 'stream';
|
||||||
import arrayifyStream from 'arrayify-stream';
|
import arrayifyStream from 'arrayify-stream';
|
||||||
import { UnsupportedHttpError } from './errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from './errors/UnsupportedHttpError';
|
||||||
|
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
env: {
|
env: {
|
||||||
jest: true
|
jest: true
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
'@typescript-eslint/no-unsafe-assignment': 'off',
|
||||||
|
'unicorn/no-useless-undefined': 'off',
|
||||||
|
|
||||||
|
// Need these 2 to run tests for throwing non-Error objects
|
||||||
|
'@typescript-eslint/no-throw-literal': 'off',
|
||||||
|
'no-throw-literal': 'off',
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
|
import type { HttpHandler,
|
||||||
|
ResourceStore } from '../../index';
|
||||||
import {
|
import {
|
||||||
AuthenticatedLdpHandler,
|
AuthenticatedLdpHandler,
|
||||||
BasicResponseWriter,
|
BasicResponseWriter,
|
||||||
CompositeAsyncHandler,
|
CompositeAsyncHandler,
|
||||||
HttpHandler,
|
|
||||||
MethodPermissionsExtractor,
|
MethodPermissionsExtractor,
|
||||||
RdfToQuadConverter,
|
RdfToQuadConverter,
|
||||||
ResourceStore,
|
|
||||||
UnsecureWebIdExtractor,
|
UnsecureWebIdExtractor,
|
||||||
QuadToRdfConverter,
|
QuadToRdfConverter,
|
||||||
} from '../../index';
|
} from '../../index';
|
||||||
import { ServerConfig } from './ServerConfig';
|
import type { ServerConfig } from './ServerConfig';
|
||||||
import {
|
import {
|
||||||
getFileResourceStore,
|
getFileResourceStore,
|
||||||
getConvertingStore,
|
getConvertingStore,
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
|
import type { HttpHandler,
|
||||||
|
ResourceStore } from '../../index';
|
||||||
import {
|
import {
|
||||||
AllowEverythingAuthorizer,
|
AllowEverythingAuthorizer,
|
||||||
AuthenticatedLdpHandler,
|
AuthenticatedLdpHandler,
|
||||||
BasicResponseWriter,
|
BasicResponseWriter,
|
||||||
HttpHandler,
|
|
||||||
MethodPermissionsExtractor,
|
MethodPermissionsExtractor,
|
||||||
ResourceStore,
|
|
||||||
UnsecureWebIdExtractor,
|
UnsecureWebIdExtractor,
|
||||||
} from '../../index';
|
} from '../../index';
|
||||||
import { ServerConfig } from './ServerConfig';
|
import type { ServerConfig } from './ServerConfig';
|
||||||
import { getOperationHandler, getInMemoryResourceStore, getBasicRequestParser } from './Util';
|
import { getOperationHandler, getInMemoryResourceStore, getBasicRequestParser } from './Util';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
|
import type { HttpHandler,
|
||||||
|
ResourceStore } from '../../index';
|
||||||
import {
|
import {
|
||||||
AllowEverythingAuthorizer,
|
AllowEverythingAuthorizer,
|
||||||
AuthenticatedLdpHandler,
|
AuthenticatedLdpHandler,
|
||||||
BasicResponseWriter,
|
BasicResponseWriter,
|
||||||
CompositeAsyncHandler,
|
CompositeAsyncHandler,
|
||||||
HttpHandler,
|
|
||||||
MethodPermissionsExtractor,
|
MethodPermissionsExtractor,
|
||||||
QuadToRdfConverter,
|
QuadToRdfConverter,
|
||||||
RawBodyParser,
|
RawBodyParser,
|
||||||
RdfToQuadConverter,
|
RdfToQuadConverter,
|
||||||
ResourceStore,
|
|
||||||
SparqlUpdateBodyParser,
|
SparqlUpdateBodyParser,
|
||||||
SparqlPatchPermissionsExtractor,
|
SparqlPatchPermissionsExtractor,
|
||||||
UnsecureWebIdExtractor,
|
UnsecureWebIdExtractor,
|
||||||
} from '../../index';
|
} from '../../index';
|
||||||
|
|
||||||
import { ServerConfig } from './ServerConfig';
|
import type { ServerConfig } from './ServerConfig';
|
||||||
import { getInMemoryResourceStore,
|
import { getInMemoryResourceStore,
|
||||||
getOperationHandler,
|
getOperationHandler,
|
||||||
getConvertingStore,
|
getConvertingStore,
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
|
import type { HttpHandler,
|
||||||
|
ResourceStore } from '../../index';
|
||||||
import {
|
import {
|
||||||
AuthenticatedLdpHandler,
|
AuthenticatedLdpHandler,
|
||||||
BasicResponseWriter,
|
BasicResponseWriter,
|
||||||
CompositeAsyncHandler,
|
CompositeAsyncHandler,
|
||||||
HttpHandler,
|
|
||||||
MethodPermissionsExtractor,
|
MethodPermissionsExtractor,
|
||||||
RdfToQuadConverter,
|
RdfToQuadConverter,
|
||||||
ResourceStore,
|
|
||||||
UnsecureWebIdExtractor,
|
UnsecureWebIdExtractor,
|
||||||
QuadToRdfConverter,
|
QuadToRdfConverter,
|
||||||
} from '../../index';
|
} from '../../index';
|
||||||
import { ServerConfig } from './ServerConfig';
|
import type { ServerConfig } from './ServerConfig';
|
||||||
import {
|
import {
|
||||||
getInMemoryResourceStore,
|
getInMemoryResourceStore,
|
||||||
getConvertingStore,
|
getConvertingStore,
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
|
import type { HttpHandler,
|
||||||
|
ResourceStore } from '../../index';
|
||||||
import {
|
import {
|
||||||
AllowEverythingAuthorizer,
|
AllowEverythingAuthorizer,
|
||||||
AuthenticatedLdpHandler,
|
AuthenticatedLdpHandler,
|
||||||
BasicResponseWriter,
|
BasicResponseWriter,
|
||||||
CompositeAsyncHandler,
|
CompositeAsyncHandler,
|
||||||
HttpHandler,
|
|
||||||
MethodPermissionsExtractor,
|
MethodPermissionsExtractor,
|
||||||
QuadToRdfConverter,
|
QuadToRdfConverter,
|
||||||
RawBodyParser,
|
RawBodyParser,
|
||||||
RdfToQuadConverter,
|
RdfToQuadConverter,
|
||||||
ResourceStore,
|
|
||||||
UnsecureWebIdExtractor,
|
UnsecureWebIdExtractor,
|
||||||
} from '../../index';
|
} from '../../index';
|
||||||
import { ServerConfig } from './ServerConfig';
|
import type { ServerConfig } from './ServerConfig';
|
||||||
import { getFileResourceStore, getOperationHandler, getConvertingStore, getBasicRequestParser } from './Util';
|
import { getFileResourceStore, getOperationHandler, getConvertingStore, getBasicRequestParser } from './Util';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { HttpHandler } from '../../src/server/HttpHandler';
|
import type { HttpHandler } from '../../src/server/HttpHandler';
|
||||||
|
|
||||||
export interface ServerConfig {
|
export interface ServerConfig {
|
||||||
getHttpHandler(): HttpHandler;
|
getHttpHandler: () => HttpHandler;
|
||||||
}
|
}
|
||||||
|
@ -1,28 +1,28 @@
|
|||||||
import { join } from 'path';
|
import { join } from 'path';
|
||||||
|
import type { BodyParser,
|
||||||
|
HttpRequest,
|
||||||
|
Operation,
|
||||||
|
Representation,
|
||||||
|
RepresentationConverter,
|
||||||
|
ResourceStore,
|
||||||
|
ResponseDescription } from '../../index';
|
||||||
import {
|
import {
|
||||||
AcceptPreferenceParser,
|
AcceptPreferenceParser,
|
||||||
BasicRequestParser,
|
BasicRequestParser,
|
||||||
BasicTargetExtractor,
|
BasicTargetExtractor,
|
||||||
BodyParser,
|
|
||||||
CompositeAsyncHandler,
|
CompositeAsyncHandler,
|
||||||
DeleteOperationHandler,
|
DeleteOperationHandler,
|
||||||
FileResourceStore,
|
FileResourceStore,
|
||||||
GetOperationHandler,
|
GetOperationHandler,
|
||||||
HttpRequest,
|
|
||||||
InMemoryResourceStore,
|
InMemoryResourceStore,
|
||||||
InteractionController,
|
InteractionController,
|
||||||
MetadataController,
|
MetadataController,
|
||||||
Operation,
|
|
||||||
PatchingStore,
|
PatchingStore,
|
||||||
PatchOperationHandler,
|
PatchOperationHandler,
|
||||||
PostOperationHandler,
|
PostOperationHandler,
|
||||||
PutOperationHandler,
|
PutOperationHandler,
|
||||||
RawBodyParser,
|
RawBodyParser,
|
||||||
Representation,
|
|
||||||
RepresentationConverter,
|
|
||||||
RepresentationConvertingStore,
|
RepresentationConvertingStore,
|
||||||
ResourceStore,
|
|
||||||
ResponseDescription,
|
|
||||||
SingleThreadedResourceLocker,
|
SingleThreadedResourceLocker,
|
||||||
SparqlUpdatePatchHandler,
|
SparqlUpdatePatchHandler,
|
||||||
UrlBasedAclManager,
|
UrlBasedAclManager,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { copyFileSync, mkdirSync } from 'fs';
|
import { copyFileSync, mkdirSync } from 'fs';
|
||||||
import { join } from 'path';
|
import { join } from 'path';
|
||||||
import * as rimraf from 'rimraf';
|
import * as rimraf from 'rimraf';
|
||||||
import { HttpHandler, ResourceStore } from '../../index';
|
import type { HttpHandler, ResourceStore } from '../../index';
|
||||||
import { ensureTrailingSlash } from '../../src/util/Util';
|
import { ensureTrailingSlash } from '../../src/util/Util';
|
||||||
import { AuthenticatedFileResourceStoreConfig } from '../configs/AuthenticatedFileResourceStoreConfig';
|
import { AuthenticatedFileResourceStoreConfig } from '../configs/AuthenticatedFileResourceStoreConfig';
|
||||||
import { BASE, getRootFilePath } from '../configs/Util';
|
import { BASE, getRootFilePath } from '../configs/Util';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import * as url from 'url';
|
import * as url from 'url';
|
||||||
import { namedNode, quad } from '@rdfjs/data-model';
|
import { namedNode, quad } from '@rdfjs/data-model';
|
||||||
import { Parser } from 'n3';
|
import { Parser } from 'n3';
|
||||||
import { MockResponse } from 'node-mocks-http';
|
import type { MockResponse } from 'node-mocks-http';
|
||||||
import { BasicConfig } from '../configs/BasicConfig';
|
import { BasicConfig } from '../configs/BasicConfig';
|
||||||
import { BasicHandlersConfig } from '../configs/BasicHandlersConfig';
|
import { BasicHandlersConfig } from '../configs/BasicHandlersConfig';
|
||||||
import { call } from '../util/Util';
|
import { call } from '../util/Util';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { MockResponse } from 'node-mocks-http';
|
import type { MockResponse } from 'node-mocks-http';
|
||||||
import { BasicHandlersWithAclConfig } from '../configs/BasicHandlersWithAclConfig';
|
import { BasicHandlersWithAclConfig } from '../configs/BasicHandlersWithAclConfig';
|
||||||
import { AclTestHelper } from '../util/TestHelpers';
|
import { AclTestHelper } from '../util/TestHelpers';
|
||||||
import { call } from '../util/Util';
|
import { call } from '../util/Util';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import * as rimraf from 'rimraf';
|
import * as rimraf from 'rimraf';
|
||||||
import { HttpHandler } from '../../src/server/HttpHandler';
|
import type { HttpHandler } from '../../src/server/HttpHandler';
|
||||||
import { FileResourceStoreConfig } from '../configs/FileResourceStoreConfig';
|
import { FileResourceStoreConfig } from '../configs/FileResourceStoreConfig';
|
||||||
import { BASE, getRootFilePath } from '../configs/Util';
|
import { BASE, getRootFilePath } from '../configs/Util';
|
||||||
import { FileTestHelper } from '../util/TestHelpers';
|
import { FileTestHelper } from '../util/TestHelpers';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import streamifyArray from 'streamify-array';
|
import streamifyArray from 'streamify-array';
|
||||||
import { Representation } from '../../src/ldp/representation/Representation';
|
import type { Representation } from '../../src/ldp/representation/Representation';
|
||||||
import { RepresentationMetadata } from '../../src/ldp/representation/RepresentationMetadata';
|
import { RepresentationMetadata } from '../../src/ldp/representation/RepresentationMetadata';
|
||||||
import { ChainedConverter } from '../../src/storage/conversion/ChainedConverter';
|
import { ChainedConverter } from '../../src/storage/conversion/ChainedConverter';
|
||||||
import { QuadToRdfConverter } from '../../src/storage/conversion/QuadToRdfConverter';
|
import { QuadToRdfConverter } from '../../src/storage/conversion/QuadToRdfConverter';
|
||||||
|
@ -6,7 +6,7 @@ import { BasicRequestParser } from '../../src/ldp/http/BasicRequestParser';
|
|||||||
import { BasicTargetExtractor } from '../../src/ldp/http/BasicTargetExtractor';
|
import { BasicTargetExtractor } from '../../src/ldp/http/BasicTargetExtractor';
|
||||||
import { RawBodyParser } from '../../src/ldp/http/RawBodyParser';
|
import { RawBodyParser } from '../../src/ldp/http/RawBodyParser';
|
||||||
import { RepresentationMetadata } from '../../src/ldp/representation/RepresentationMetadata';
|
import { RepresentationMetadata } from '../../src/ldp/representation/RepresentationMetadata';
|
||||||
import { HttpRequest } from '../../src/server/HttpRequest';
|
import type { HttpRequest } from '../../src/server/HttpRequest';
|
||||||
|
|
||||||
describe('A BasicRequestParser with simple input parsers', (): void => {
|
describe('A BasicRequestParser with simple input parsers', (): void => {
|
||||||
const targetExtractor = new BasicTargetExtractor();
|
const targetExtractor = new BasicTargetExtractor();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { UnsecureWebIdExtractor } from '../../../src/authentication/UnsecureWebIdExtractor';
|
import { UnsecureWebIdExtractor } from '../../../src/authentication/UnsecureWebIdExtractor';
|
||||||
import { HttpRequest } from '../../../src/server/HttpRequest';
|
import type { HttpRequest } from '../../../src/server/HttpRequest';
|
||||||
|
|
||||||
describe('An UnsecureWebIdExtractor', (): void => {
|
describe('An UnsecureWebIdExtractor', (): void => {
|
||||||
const extractor = new UnsecureWebIdExtractor();
|
const extractor = new UnsecureWebIdExtractor();
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import { namedNode, quad } from '@rdfjs/data-model';
|
import { namedNode, quad } from '@rdfjs/data-model';
|
||||||
import streamifyArray from 'streamify-array';
|
import streamifyArray from 'streamify-array';
|
||||||
import { Credentials } from '../../../src/authentication/Credentials';
|
import type { Credentials } from '../../../src/authentication/Credentials';
|
||||||
import { AclManager } from '../../../src/authorization/AclManager';
|
import type { AclManager } from '../../../src/authorization/AclManager';
|
||||||
import { WebAclAuthorizer } from '../../../src/authorization/WebAclAuthorizer';
|
import { WebAclAuthorizer } from '../../../src/authorization/WebAclAuthorizer';
|
||||||
import { PermissionSet } from '../../../src/ldp/permissions/PermissionSet';
|
import type { PermissionSet } from '../../../src/ldp/permissions/PermissionSet';
|
||||||
import { Representation } from '../../../src/ldp/representation/Representation';
|
import type { Representation } from '../../../src/ldp/representation/Representation';
|
||||||
import { ResourceIdentifier } from '../../../src/ldp/representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../../../src/ldp/representation/ResourceIdentifier';
|
||||||
import { ContainerManager } from '../../../src/storage/ContainerManager';
|
import type { ContainerManager } from '../../../src/storage/ContainerManager';
|
||||||
import { ResourceStore } from '../../../src/storage/ResourceStore';
|
import type { ResourceStore } from '../../../src/storage/ResourceStore';
|
||||||
import { ForbiddenHttpError } from '../../../src/util/errors/ForbiddenHttpError';
|
import { ForbiddenHttpError } from '../../../src/util/errors/ForbiddenHttpError';
|
||||||
import { NotFoundHttpError } from '../../../src/util/errors/NotFoundHttpError';
|
import { NotFoundHttpError } from '../../../src/util/errors/NotFoundHttpError';
|
||||||
import { UnauthorizedHttpError } from '../../../src/util/errors/UnauthorizedHttpError';
|
import { UnauthorizedHttpError } from '../../../src/util/errors/UnauthorizedHttpError';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Setup } from '../../../src/init/Setup';
|
import { Setup } from '../../../src/init/Setup';
|
||||||
import { ResourceIdentifier } from '../../../src/ldp/representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../../../src/ldp/representation/ResourceIdentifier';
|
||||||
|
|
||||||
describe('Setup', (): void => {
|
describe('Setup', (): void => {
|
||||||
let httpServer: any;
|
let httpServer: any;
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
import { CredentialsExtractor } from '../../../src/authentication/CredentialsExtractor';
|
import type { CredentialsExtractor } from '../../../src/authentication/CredentialsExtractor';
|
||||||
import { Authorizer } from '../../../src/authorization/Authorizer';
|
import type { Authorizer } from '../../../src/authorization/Authorizer';
|
||||||
import { AuthenticatedLdpHandler, AuthenticatedLdpHandlerArgs } from '../../../src/ldp/AuthenticatedLdpHandler';
|
import type { AuthenticatedLdpHandlerArgs } from '../../../src/ldp/AuthenticatedLdpHandler';
|
||||||
import { RequestParser } from '../../../src/ldp/http/RequestParser';
|
import { AuthenticatedLdpHandler } from '../../../src/ldp/AuthenticatedLdpHandler';
|
||||||
import { ResponseWriter } from '../../../src/ldp/http/ResponseWriter';
|
import type { RequestParser } from '../../../src/ldp/http/RequestParser';
|
||||||
import { Operation } from '../../../src/ldp/operations/Operation';
|
import type { ResponseWriter } from '../../../src/ldp/http/ResponseWriter';
|
||||||
import { OperationHandler } from '../../../src/ldp/operations/OperationHandler';
|
import type { Operation } from '../../../src/ldp/operations/Operation';
|
||||||
import { PermissionsExtractor } from '../../../src/ldp/permissions/PermissionsExtractor';
|
import type { OperationHandler } from '../../../src/ldp/operations/OperationHandler';
|
||||||
import { HttpRequest } from '../../../src/server/HttpRequest';
|
import type { PermissionsExtractor } from '../../../src/ldp/permissions/PermissionsExtractor';
|
||||||
import { HttpResponse } from '../../../src/server/HttpResponse';
|
import type { HttpRequest } from '../../../src/server/HttpRequest';
|
||||||
|
import type { HttpResponse } from '../../../src/server/HttpResponse';
|
||||||
import { StaticAsyncHandler } from '../../util/StaticAsyncHandler';
|
import { StaticAsyncHandler } from '../../util/StaticAsyncHandler';
|
||||||
|
|
||||||
describe('An AuthenticatedLdpHandler', (): void => {
|
describe('An AuthenticatedLdpHandler', (): void => {
|
||||||
@ -67,4 +68,13 @@ describe('An AuthenticatedLdpHandler', (): void => {
|
|||||||
|
|
||||||
await expect(handler.handle({ request: 'request' as any, response: {} as HttpResponse })).rejects.toThrow(Error);
|
await expect(handler.handle({ request: 'request' as any, response: {} as HttpResponse })).rejects.toThrow(Error);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('errors an invalid object was thrown by a handler.', async(): Promise< void> => {
|
||||||
|
args.authorizer.handle = async(): Promise<void> => {
|
||||||
|
throw 'apple';
|
||||||
|
};
|
||||||
|
const handler = new AuthenticatedLdpHandler(args);
|
||||||
|
|
||||||
|
await expect(handler.handle({ request: 'request' as any, response: {} as HttpResponse })).rejects.toEqual('apple');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { AcceptPreferenceParser } from '../../../../src/ldp/http/AcceptPreferenceParser';
|
import { AcceptPreferenceParser } from '../../../../src/ldp/http/AcceptPreferenceParser';
|
||||||
import { HttpRequest } from '../../../../src/server/HttpRequest';
|
import type { HttpRequest } from '../../../../src/server/HttpRequest';
|
||||||
|
|
||||||
describe('An AcceptPreferenceParser', (): void => {
|
describe('An AcceptPreferenceParser', (): void => {
|
||||||
const preferenceParser = new AcceptPreferenceParser();
|
const preferenceParser = new AcceptPreferenceParser();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { BasicRequestParser } from '../../../../src/ldp/http/BasicRequestParser';
|
import { BasicRequestParser } from '../../../../src/ldp/http/BasicRequestParser';
|
||||||
import { BodyParser } from '../../../../src/ldp/http/BodyParser';
|
import type { BodyParser } from '../../../../src/ldp/http/BodyParser';
|
||||||
import { PreferenceParser } from '../../../../src/ldp/http/PreferenceParser';
|
import type { PreferenceParser } from '../../../../src/ldp/http/PreferenceParser';
|
||||||
import { TargetExtractor } from '../../../../src/ldp/http/TargetExtractor';
|
import type { TargetExtractor } from '../../../../src/ldp/http/TargetExtractor';
|
||||||
import { StaticAsyncHandler } from '../../../util/StaticAsyncHandler';
|
import { StaticAsyncHandler } from '../../../util/StaticAsyncHandler';
|
||||||
|
|
||||||
describe('A BasicRequestParser', (): void => {
|
describe('A BasicRequestParser', (): void => {
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
import { EventEmitter } from 'events';
|
import { EventEmitter } from 'events';
|
||||||
import { createResponse, MockResponse } from 'node-mocks-http';
|
import type { MockResponse } from 'node-mocks-http';
|
||||||
|
import { createResponse } from 'node-mocks-http';
|
||||||
import streamifyArray from 'streamify-array';
|
import streamifyArray from 'streamify-array';
|
||||||
import { BasicResponseWriter } from '../../../../src/ldp/http/BasicResponseWriter';
|
import { BasicResponseWriter } from '../../../../src/ldp/http/BasicResponseWriter';
|
||||||
import { ResponseDescription } from '../../../../src/ldp/operations/ResponseDescription';
|
import type { ResponseDescription } from '../../../../src/ldp/operations/ResponseDescription';
|
||||||
import { RepresentationMetadata } from '../../../../src/ldp/representation/RepresentationMetadata';
|
import { RepresentationMetadata } from '../../../../src/ldp/representation/RepresentationMetadata';
|
||||||
import { UnsupportedHttpError } from '../../../../src/util/errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from '../../../../src/util/errors/UnsupportedHttpError';
|
||||||
import { CONTENT_TYPE } from '../../../../src/util/UriConstants';
|
import { CONTENT_TYPE } from '../../../../src/util/UriConstants';
|
||||||
|
@ -2,7 +2,7 @@ import arrayifyStream from 'arrayify-stream';
|
|||||||
import streamifyArray from 'streamify-array';
|
import streamifyArray from 'streamify-array';
|
||||||
import { RawBodyParser } from '../../../../src/ldp/http/RawBodyParser';
|
import { RawBodyParser } from '../../../../src/ldp/http/RawBodyParser';
|
||||||
import { RepresentationMetadata } from '../../../../src/ldp/representation/RepresentationMetadata';
|
import { RepresentationMetadata } from '../../../../src/ldp/representation/RepresentationMetadata';
|
||||||
import { HttpRequest } from '../../../../src/server/HttpRequest';
|
import type { HttpRequest } from '../../../../src/server/HttpRequest';
|
||||||
import { UnsupportedHttpError } from '../../../../src/util/errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from '../../../../src/util/errors/UnsupportedHttpError';
|
||||||
import 'jest-rdf';
|
import 'jest-rdf';
|
||||||
import { HTTP, RDF } from '../../../../src/util/UriConstants';
|
import { HTTP, RDF } from '../../../../src/util/UriConstants';
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import { namedNode, quad } from '@rdfjs/data-model';
|
import { namedNode, quad } from '@rdfjs/data-model';
|
||||||
import arrayifyStream from 'arrayify-stream';
|
import arrayifyStream from 'arrayify-stream';
|
||||||
import { Algebra } from 'sparqlalgebrajs';
|
import { Algebra } from 'sparqlalgebrajs';
|
||||||
|
import * as algebra from 'sparqlalgebrajs';
|
||||||
import streamifyArray from 'streamify-array';
|
import streamifyArray from 'streamify-array';
|
||||||
import { SparqlUpdateBodyParser } from '../../../../src/ldp/http/SparqlUpdateBodyParser';
|
import { SparqlUpdateBodyParser } from '../../../../src/ldp/http/SparqlUpdateBodyParser';
|
||||||
import { HttpRequest } from '../../../../src/server/HttpRequest';
|
import type { HttpRequest } from '../../../../src/server/HttpRequest';
|
||||||
import { UnsupportedHttpError } from '../../../../src/util/errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from '../../../../src/util/errors/UnsupportedHttpError';
|
||||||
import { UnsupportedMediaTypeHttpError } from '../../../../src/util/errors/UnsupportedMediaTypeHttpError';
|
import { UnsupportedMediaTypeHttpError } from '../../../../src/util/errors/UnsupportedMediaTypeHttpError';
|
||||||
|
|
||||||
@ -23,6 +24,16 @@ describe('A SparqlUpdateBodyParser', (): void => {
|
|||||||
.rejects.toThrow(UnsupportedHttpError);
|
.rejects.toThrow(UnsupportedHttpError);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('errors when receiving an unexpected error.', async(): Promise<void> => {
|
||||||
|
const mock = jest.spyOn(algebra, 'translate').mockImplementationOnce((): any => {
|
||||||
|
throw 'apple';
|
||||||
|
});
|
||||||
|
await expect(bodyParser.handle(streamifyArray(
|
||||||
|
[ 'DELETE DATA { <http://test.com/s> <http://test.com/p> <http://test.com/o>}' ],
|
||||||
|
) as HttpRequest)).rejects.toThrow(UnsupportedHttpError);
|
||||||
|
mock.mockRestore();
|
||||||
|
});
|
||||||
|
|
||||||
it('converts SPARQL updates to algebra.', async(): Promise<void> => {
|
it('converts SPARQL updates to algebra.', async(): Promise<void> => {
|
||||||
const result = await bodyParser.handle(streamifyArray(
|
const result = await bodyParser.handle(streamifyArray(
|
||||||
[ 'DELETE DATA { <http://test.com/s> <http://test.com/p> <http://test.com/o>}' ],
|
[ 'DELETE DATA { <http://test.com/s> <http://test.com/p> <http://test.com/o>}' ],
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { DeleteOperationHandler } from '../../../../src/ldp/operations/DeleteOperationHandler';
|
import { DeleteOperationHandler } from '../../../../src/ldp/operations/DeleteOperationHandler';
|
||||||
import { Operation } from '../../../../src/ldp/operations/Operation';
|
import type { Operation } from '../../../../src/ldp/operations/Operation';
|
||||||
import { ResourceStore } from '../../../../src/storage/ResourceStore';
|
import type { ResourceStore } from '../../../../src/storage/ResourceStore';
|
||||||
import { UnsupportedHttpError } from '../../../../src/util/errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from '../../../../src/util/errors/UnsupportedHttpError';
|
||||||
|
|
||||||
describe('A DeleteOperationHandler', (): void => {
|
describe('A DeleteOperationHandler', (): void => {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { GetOperationHandler } from '../../../../src/ldp/operations/GetOperationHandler';
|
import { GetOperationHandler } from '../../../../src/ldp/operations/GetOperationHandler';
|
||||||
import { Operation } from '../../../../src/ldp/operations/Operation';
|
import type { Operation } from '../../../../src/ldp/operations/Operation';
|
||||||
import { Representation } from '../../../../src/ldp/representation/Representation';
|
import type { Representation } from '../../../../src/ldp/representation/Representation';
|
||||||
import { ResourceStore } from '../../../../src/storage/ResourceStore';
|
import type { ResourceStore } from '../../../../src/storage/ResourceStore';
|
||||||
import { UnsupportedHttpError } from '../../../../src/util/errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from '../../../../src/util/errors/UnsupportedHttpError';
|
||||||
|
|
||||||
describe('A GetOperationHandler', (): void => {
|
describe('A GetOperationHandler', (): void => {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Operation } from '../../../../src/ldp/operations/Operation';
|
import type { Operation } from '../../../../src/ldp/operations/Operation';
|
||||||
import { PatchOperationHandler } from '../../../../src/ldp/operations/PatchOperationHandler';
|
import { PatchOperationHandler } from '../../../../src/ldp/operations/PatchOperationHandler';
|
||||||
import { ResourceStore } from '../../../../src/storage/ResourceStore';
|
import type { ResourceStore } from '../../../../src/storage/ResourceStore';
|
||||||
import { UnsupportedHttpError } from '../../../../src/util/errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from '../../../../src/util/errors/UnsupportedHttpError';
|
||||||
|
|
||||||
describe('A PatchOperationHandler', (): void => {
|
describe('A PatchOperationHandler', (): void => {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Operation } from '../../../../src/ldp/operations/Operation';
|
import type { Operation } from '../../../../src/ldp/operations/Operation';
|
||||||
import { PostOperationHandler } from '../../../../src/ldp/operations/PostOperationHandler';
|
import { PostOperationHandler } from '../../../../src/ldp/operations/PostOperationHandler';
|
||||||
import { ResourceIdentifier } from '../../../../src/ldp/representation/ResourceIdentifier';
|
import type { ResourceIdentifier } from '../../../../src/ldp/representation/ResourceIdentifier';
|
||||||
import { ResourceStore } from '../../../../src/storage/ResourceStore';
|
import type { ResourceStore } from '../../../../src/storage/ResourceStore';
|
||||||
import { UnsupportedHttpError } from '../../../../src/util/errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from '../../../../src/util/errors/UnsupportedHttpError';
|
||||||
|
|
||||||
describe('A PostOperationHandler', (): void => {
|
describe('A PostOperationHandler', (): void => {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Operation } from '../../../../src/ldp/operations/Operation';
|
import type { Operation } from '../../../../src/ldp/operations/Operation';
|
||||||
import { PutOperationHandler } from '../../../../src/ldp/operations/PutOperationHandler';
|
import { PutOperationHandler } from '../../../../src/ldp/operations/PutOperationHandler';
|
||||||
import { ResourceStore } from '../../../../src/storage/ResourceStore';
|
import type { ResourceStore } from '../../../../src/storage/ResourceStore';
|
||||||
import { UnsupportedHttpError } from '../../../../src/util/errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from '../../../../src/util/errors/UnsupportedHttpError';
|
||||||
|
|
||||||
describe('A PutOperationHandler', (): void => {
|
describe('A PutOperationHandler', (): void => {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user