mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
chore(deps): update arrayify-stream to v2
This commit is contained in:
parent
982d57e1d2
commit
e4f1e2aa0c
55
package-lock.json
generated
55
package-lock.json
generated
@ -11,7 +11,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@comunica/actor-init-sparql": "^1.22.3",
|
"@comunica/actor-init-sparql": "^1.22.3",
|
||||||
"@solid/access-token-verifier": "^1.1.3",
|
"@solid/access-token-verifier": "^1.1.3",
|
||||||
"@types/arrayify-stream": "^1.0.0",
|
|
||||||
"@types/async-lock": "^1.1.3",
|
"@types/async-lock": "^1.1.3",
|
||||||
"@types/bcrypt": "^5.0.0",
|
"@types/bcrypt": "^5.0.0",
|
||||||
"@types/cors": "^2.8.12",
|
"@types/cors": "^2.8.12",
|
||||||
@ -33,7 +32,7 @@
|
|||||||
"@types/uuid": "^8.3.4",
|
"@types/uuid": "^8.3.4",
|
||||||
"@types/ws": "^8.2.2",
|
"@types/ws": "^8.2.2",
|
||||||
"@types/yargs": "^17.0.8",
|
"@types/yargs": "^17.0.8",
|
||||||
"arrayify-stream": "^1.0.0",
|
"arrayify-stream": "^2.0.0",
|
||||||
"async-lock": "^1.3.0",
|
"async-lock": "^1.3.0",
|
||||||
"bcrypt": "^5.0.1",
|
"bcrypt": "^5.0.1",
|
||||||
"componentsjs": "^4.5.0",
|
"componentsjs": "^4.5.0",
|
||||||
@ -2070,6 +2069,11 @@
|
|||||||
"@comunica/core": "^1.2.0"
|
"@comunica/core": "^1.2.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@comunica/actor-query-operation-sparql-endpoint/node_modules/arrayify-stream": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/arrayify-stream/-/arrayify-stream-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-RP80ep76Lbew2wWN5ogrl2NluTnBVYYh2K3NNCcWfcmmUB7nBcNBctiJeEZAixp3I1vQ9H88iHZ9MbHSdkuupQ=="
|
||||||
|
},
|
||||||
"node_modules/@comunica/actor-query-operation-sparql-endpoint/node_modules/sparqlalgebrajs": {
|
"node_modules/@comunica/actor-query-operation-sparql-endpoint/node_modules/sparqlalgebrajs": {
|
||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/sparqlalgebrajs/-/sparqlalgebrajs-3.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/sparqlalgebrajs/-/sparqlalgebrajs-3.0.3.tgz",
|
||||||
@ -4260,14 +4264,6 @@
|
|||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/arrayify-stream": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/arrayify-stream/-/arrayify-stream-1.0.0.tgz",
|
|
||||||
"integrity": "sha512-rTx+OXoOJxoscixxecOqaEABaN6Qh/BNImDBnytLVrDI+glba4LJ7RS9JGRcc7auLtdFcM4s8+fdN6pb/K24OA==",
|
|
||||||
"dependencies": {
|
|
||||||
"@types/node": "*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@types/async-lock": {
|
"node_modules/@types/async-lock": {
|
||||||
"version": "1.1.3",
|
"version": "1.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/async-lock/-/async-lock-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/async-lock/-/async-lock-1.1.3.tgz",
|
||||||
@ -5593,9 +5589,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/arrayify-stream": {
|
"node_modules/arrayify-stream": {
|
||||||
"version": "1.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/arrayify-stream/-/arrayify-stream-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/arrayify-stream/-/arrayify-stream-2.0.0.tgz",
|
||||||
"integrity": "sha512-RP80ep76Lbew2wWN5ogrl2NluTnBVYYh2K3NNCcWfcmmUB7nBcNBctiJeEZAixp3I1vQ9H88iHZ9MbHSdkuupQ=="
|
"integrity": "sha512-Z2NRtxpWQIz3NRA2bEZOziIungBH+fpsFFEolc5u8uVRheYitvsDNvejlfyh/hjZ9VyS9Ba62oY0zc5oa6Wu7g=="
|
||||||
},
|
},
|
||||||
"node_modules/arrify": {
|
"node_modules/arrify": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
@ -11314,6 +11310,12 @@
|
|||||||
"manual-git-changelog": "bin/cli.js"
|
"manual-git-changelog": "bin/cli.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/manual-git-changelog/node_modules/arrayify-stream": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/arrayify-stream/-/arrayify-stream-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-RP80ep76Lbew2wWN5ogrl2NluTnBVYYh2K3NNCcWfcmmUB7nBcNBctiJeEZAixp3I1vQ9H88iHZ9MbHSdkuupQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/map-obj": {
|
"node_modules/map-obj": {
|
||||||
"version": "4.1.0",
|
"version": "4.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.1.0.tgz",
|
||||||
@ -16678,6 +16680,11 @@
|
|||||||
"sparqlalgebrajs": "^3.0.0"
|
"sparqlalgebrajs": "^3.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"arrayify-stream": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/arrayify-stream/-/arrayify-stream-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-RP80ep76Lbew2wWN5ogrl2NluTnBVYYh2K3NNCcWfcmmUB7nBcNBctiJeEZAixp3I1vQ9H88iHZ9MbHSdkuupQ=="
|
||||||
|
},
|
||||||
"sparqlalgebrajs": {
|
"sparqlalgebrajs": {
|
||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/sparqlalgebrajs/-/sparqlalgebrajs-3.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/sparqlalgebrajs/-/sparqlalgebrajs-3.0.3.tgz",
|
||||||
@ -18383,14 +18390,6 @@
|
|||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/arrayify-stream": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/arrayify-stream/-/arrayify-stream-1.0.0.tgz",
|
|
||||||
"integrity": "sha512-rTx+OXoOJxoscixxecOqaEABaN6Qh/BNImDBnytLVrDI+glba4LJ7RS9JGRcc7auLtdFcM4s8+fdN6pb/K24OA==",
|
|
||||||
"requires": {
|
|
||||||
"@types/node": "*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@types/async-lock": {
|
"@types/async-lock": {
|
||||||
"version": "1.1.3",
|
"version": "1.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/async-lock/-/async-lock-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/async-lock/-/async-lock-1.1.3.tgz",
|
||||||
@ -19448,9 +19447,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"arrayify-stream": {
|
"arrayify-stream": {
|
||||||
"version": "1.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/arrayify-stream/-/arrayify-stream-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/arrayify-stream/-/arrayify-stream-2.0.0.tgz",
|
||||||
"integrity": "sha512-RP80ep76Lbew2wWN5ogrl2NluTnBVYYh2K3NNCcWfcmmUB7nBcNBctiJeEZAixp3I1vQ9H88iHZ9MbHSdkuupQ=="
|
"integrity": "sha512-Z2NRtxpWQIz3NRA2bEZOziIungBH+fpsFFEolc5u8uVRheYitvsDNvejlfyh/hjZ9VyS9Ba62oY0zc5oa6Wu7g=="
|
||||||
},
|
},
|
||||||
"arrify": {
|
"arrify": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
@ -23825,6 +23824,14 @@
|
|||||||
"git-raw-commits": "^2.0.0",
|
"git-raw-commits": "^2.0.0",
|
||||||
"git-semver-tags": "^2.0.0",
|
"git-semver-tags": "^2.0.0",
|
||||||
"minimist": "^1.2.0"
|
"minimist": "^1.2.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"arrayify-stream": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/arrayify-stream/-/arrayify-stream-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-RP80ep76Lbew2wWN5ogrl2NluTnBVYYh2K3NNCcWfcmmUB7nBcNBctiJeEZAixp3I1vQ9H88iHZ9MbHSdkuupQ==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"map-obj": {
|
"map-obj": {
|
||||||
|
@ -77,7 +77,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@comunica/actor-init-sparql": "^1.22.3",
|
"@comunica/actor-init-sparql": "^1.22.3",
|
||||||
"@solid/access-token-verifier": "^1.1.3",
|
"@solid/access-token-verifier": "^1.1.3",
|
||||||
"@types/arrayify-stream": "^1.0.0",
|
|
||||||
"@types/async-lock": "^1.1.3",
|
"@types/async-lock": "^1.1.3",
|
||||||
"@types/bcrypt": "^5.0.0",
|
"@types/bcrypt": "^5.0.0",
|
||||||
"@types/cors": "^2.8.12",
|
"@types/cors": "^2.8.12",
|
||||||
@ -99,7 +98,7 @@
|
|||||||
"@types/uuid": "^8.3.4",
|
"@types/uuid": "^8.3.4",
|
||||||
"@types/ws": "^8.2.2",
|
"@types/ws": "^8.2.2",
|
||||||
"@types/yargs": "^17.0.8",
|
"@types/yargs": "^17.0.8",
|
||||||
"arrayify-stream": "^1.0.0",
|
"arrayify-stream": "^2.0.0",
|
||||||
"async-lock": "^1.3.0",
|
"async-lock": "^1.3.0",
|
||||||
"bcrypt": "^5.0.1",
|
"bcrypt": "^5.0.1",
|
||||||
"componentsjs": "^4.5.0",
|
"componentsjs": "^4.5.0",
|
||||||
|
@ -125,7 +125,7 @@ export class SparqlDataAccessor implements DataAccessor {
|
|||||||
}
|
}
|
||||||
const { name, parent } = this.getRelatedNames(identifier);
|
const { name, parent } = this.getRelatedNames(identifier);
|
||||||
|
|
||||||
const triples = await arrayifyStream(data) as Quad[];
|
const triples = await arrayifyStream<Quad>(data);
|
||||||
const def = defaultGraph();
|
const def = defaultGraph();
|
||||||
if (triples.some((triple): boolean => !def.equals(triple.graph))) {
|
if (triples.some((triple): boolean => !def.equals(triple.graph))) {
|
||||||
throw new NotImplementedHttpError('Only triples in the default graph are supported.');
|
throw new NotImplementedHttpError('Only triples in the default graph are supported.');
|
||||||
|
@ -23,7 +23,7 @@ export async function fetchDataset(url: string): Promise<Representation> {
|
|||||||
return (async(): Promise<Representation> => {
|
return (async(): Promise<Representation> => {
|
||||||
try {
|
try {
|
||||||
const quadStream = (await rdfDereferencer.dereference(url)).quads as Readable;
|
const quadStream = (await rdfDereferencer.dereference(url)).quads as Readable;
|
||||||
const quadArray = await arrayifyStream(quadStream) as Quad[];
|
const quadArray = await arrayifyStream<Quad>(quadStream);
|
||||||
return new BasicRepresentation(quadArray, { path: url }, INTERNAL_QUADS, false);
|
return new BasicRepresentation(quadArray, { path: url }, INTERNAL_QUADS, false);
|
||||||
} catch {
|
} catch {
|
||||||
throw new BadRequestHttpError(`Could not parse resource at URL (${url})!`);
|
throw new BadRequestHttpError(`Could not parse resource at URL (${url})!`);
|
||||||
|
@ -22,7 +22,7 @@ const logger = getLoggerFor('StreamUtil');
|
|||||||
* @returns The joined string.
|
* @returns The joined string.
|
||||||
*/
|
*/
|
||||||
export async function readableToString(stream: Readable): Promise<string> {
|
export async function readableToString(stream: Readable): Promise<string> {
|
||||||
return (await arrayifyStream(stream)).join('');
|
return (await arrayifyStream<string>(stream)).join('');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -283,7 +283,7 @@ describe('A DataAccessorBasedStore', (): void => {
|
|||||||
expect(accessor.data[result.path].metadata.contentType).toBeUndefined();
|
expect(accessor.data[result.path].metadata.contentType).toBeUndefined();
|
||||||
|
|
||||||
const { data, metadata } = await store.getRepresentation(result);
|
const { data, metadata } = await store.getRepresentation(result);
|
||||||
const quads: Quad[] = await arrayifyStream(data);
|
const quads = await arrayifyStream<Quad>(data);
|
||||||
expect(metadata.get(DC.terms.modified)?.value).toBe(now.toISOString());
|
expect(metadata.get(DC.terms.modified)?.value).toBe(now.toISOString());
|
||||||
expect(quads.some((entry): boolean => entry.subject.value === result.path &&
|
expect(quads.some((entry): boolean => entry.subject.value === result.path &&
|
||||||
entry.object.value === 'http://test.com/coolContainer')).toBeTruthy();
|
entry.object.value === 'http://test.com/coolContainer')).toBeTruthy();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user