@comunica/actor-dereference-file 4.5.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/components/ActorDereferenceFile.jsonld +15 -15
- package/components/components.jsonld +1 -1
- package/components/context.jsonld +1 -1
- package/lib/ActorDereferenceFile.d.ts +0 -0
- package/lib/ActorDereferenceFile.js +1 -0
- package/lib/ActorDereferenceFile.js.map +1 -1
- package/lib/index.d.ts +0 -0
- package/lib/index.js +0 -0
- package/lib/index.js.map +0 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ After installing, this package can be added to your engine's configuration as fo
|
|
|
22
22
|
{
|
|
23
23
|
"@context": [
|
|
24
24
|
...
|
|
25
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-dereference-file/^
|
|
25
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-dereference-file/^5.0.0/components/context.jsonld"
|
|
26
26
|
],
|
|
27
27
|
"actors": [
|
|
28
28
|
...
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@context": [
|
|
3
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-dereference-file/^
|
|
4
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference/^
|
|
5
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-dereference-file/^5.0.0/components/context.jsonld",
|
|
4
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference/^5.0.0/components/context.jsonld",
|
|
5
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^5.0.0/components/context.jsonld"
|
|
6
6
|
],
|
|
7
7
|
"@id": "npmd:@comunica/actor-dereference-file",
|
|
8
8
|
"components": [
|
|
@@ -35,37 +35,37 @@
|
|
|
35
35
|
"genericTypeInstances": [
|
|
36
36
|
{
|
|
37
37
|
"@type": "ParameterRangeGenericTypeReference",
|
|
38
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
38
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"@type": "ParameterRangeGenericTypeReference",
|
|
42
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
42
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"@type": "ParameterRangeGenericTypeReference",
|
|
46
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
46
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"@type": "ParameterRangeGenericTypeReference",
|
|
50
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
50
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
|
|
51
51
|
}
|
|
52
52
|
]
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"@type": "ParameterRangeGenericTypeReference",
|
|
56
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
56
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
"@type": "ParameterRangeGenericTypeReference",
|
|
60
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
60
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
"@type": "ParameterRangeGenericTypeReference",
|
|
64
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
64
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
"@type": "ParameterRangeGenericTypeReference",
|
|
68
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
68
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
|
|
69
69
|
}
|
|
70
70
|
]
|
|
71
71
|
},
|
|
@@ -102,19 +102,19 @@
|
|
|
102
102
|
"genericTypeInstances": [
|
|
103
103
|
{
|
|
104
104
|
"@type": "ParameterRangeGenericTypeReference",
|
|
105
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
105
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
"@type": "ParameterRangeGenericTypeReference",
|
|
109
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
109
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
110
110
|
},
|
|
111
111
|
{
|
|
112
112
|
"@type": "ParameterRangeGenericTypeReference",
|
|
113
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
113
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
114
114
|
},
|
|
115
115
|
{
|
|
116
116
|
"@type": "ParameterRangeGenericTypeReference",
|
|
117
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
117
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
|
|
118
118
|
}
|
|
119
119
|
]
|
|
120
120
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@context": [
|
|
3
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-dereference-file/^
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-dereference-file/^5.0.0/components/context.jsonld"
|
|
4
4
|
],
|
|
5
5
|
"@id": "npmd:@comunica/actor-dereference-file",
|
|
6
6
|
"@type": "Module",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^6.0.0/components/context.jsonld",
|
|
4
4
|
{
|
|
5
5
|
"npmd": "https://linkedsoftwaredependencies.org/bundles/npm/",
|
|
6
|
-
"cadf": "npmd:@comunica/actor-dereference-file/^
|
|
6
|
+
"cadf": "npmd:@comunica/actor-dereference-file/^5.0.0/",
|
|
7
7
|
"ActorDereferenceFile": {
|
|
8
8
|
"@id": "cadf:components/ActorDereferenceFile.jsonld#ActorDereferenceFile",
|
|
9
9
|
"@prefix": true,
|
|
File without changes
|
|
@@ -33,6 +33,7 @@ class ActorDereferenceFile extends bus_dereference_1.ActorDereference {
|
|
|
33
33
|
data: (0, node_fs_1.createReadStream)(getPath(url)),
|
|
34
34
|
// This should always be after the creation of the read stream
|
|
35
35
|
requestTime: Date.now() - requestTimeStart,
|
|
36
|
+
status: 200,
|
|
36
37
|
exists: true,
|
|
37
38
|
url: ActorDereferenceFile.isURI(url) ? url : (0, node_url_1.pathToFileURL)(url).href,
|
|
38
39
|
baseIRI: context.get(context_entries_1.KeysInitQuery.fileBaseIRI),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActorDereferenceFile.js","sourceRoot":"","sources":["ActorDereferenceFile.ts"],"names":[],"mappings":";;;AAAA,qCAAkE;AAClE,uCAAwD;AAExD,+DAA6D;AAC7D,+DAA0D;AAE1D,yCAAwD;AAExD;;GAEG;AACH,MAAa,oBAAqB,SAAQ,kCAAgB;IACxD,YAAmB,IAA2B;QAC5C,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAsB;QAC3C,IAAI,CAAC;YACH,IAAA,oBAAU,EAAC,OAAO,CAAC,GAAG,CAAC,EAAE,mBAAS,CAAC,IAAI,CAAC,CAAC;QAC3C,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,4DAA4D;YAC5D,OAAO,IAAA,eAAQ,EAAC,mDAAmD,KAAK,GAAG,CAAC,CAAC;QAC/E,CAAC;QACD,OAAO,IAAA,mBAAY,GAAE,CAAC;IACxB,CAAC;IAEO,MAAM,CAAC,KAAK,CAAC,GAAW;QAC9B,MAAM,QAAQ,GAAG,gBAAgB,CAAC;QAClC,OAAO,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;IACrC,CAAC;IAEM,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,OAAO,EAAsB;QACnD,MAAM,gBAAgB,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACpC,OAAO;YACL,IAAI,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nD,MAAM,gBAAgB,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACpC,OAAO;YACL,IAAI,EAAE,IAAA,0BAAgB,EAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YACpC,8DAA8D;YAC9D,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,gBAAgB;YAC1C,MAAM,EAAE,GAAG;YACX,MAAM,EAAE,IAAI;YACZ,GAAG,EAAE,oBAAoB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAA,wBAAa,EAAC,GAAG,CAAC,CAAC,IAAI;YACpE,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,+BAAa,CAAC,WAAW,CAAC;SAChD,CAAC;IACJ,CAAC;CACF;AAhCD,oDAgCC;AAED,MAAM,OAAO,GAAG,CAAC,GAAW,EAAU,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAA,wBAAa,EAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC","sourcesContent":["import { accessSync, createReadStream, constants } from 'node:fs';\nimport { fileURLToPath, pathToFileURL } from 'node:url';\nimport type { IActionDereference, IActorDereferenceArgs, IActorDereferenceOutput } from '@comunica/bus-dereference';\nimport { ActorDereference } from '@comunica/bus-dereference';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { IActorTest, TestResult } from '@comunica/core';\nimport { failTest, passTestVoid } from '@comunica/core';\n\n/**\n * A comunica File Dereference Actor.\n */\nexport class ActorDereferenceFile extends ActorDereference {\n public constructor(args: IActorDereferenceArgs) {\n super(args);\n }\n\n public async test({ url }: IActionDereference): Promise<TestResult<IActorTest>> {\n try {\n accessSync(getPath(url), constants.F_OK);\n } catch (error: unknown) {\n // eslint-disable-next-line ts/restrict-template-expressions\n return failTest(`This actor only works on existing local files. (${error})`);\n }\n return passTestVoid();\n }\n\n private static isURI(str: string): boolean {\n const URIRegex = /\\w[\\w+.-]*:.*/u;\n return URIRegex.exec(str) !== null;\n }\n\n public async run({ url, context }: IActionDereference): Promise<IActorDereferenceOutput> {\n const requestTimeStart = Date.now();\n return {\n data: createReadStream(getPath(url)),\n // This should always be after the creation of the read stream\n requestTime: Date.now() - requestTimeStart,\n status: 200,\n exists: true,\n url: ActorDereferenceFile.isURI(url) ? url : pathToFileURL(url).href,\n baseIRI: context.get(KeysInitQuery.fileBaseIRI),\n };\n }\n}\n\nconst getPath = (url: string): string => url.startsWith('file://') ? fileURLToPath(url) : url;\n"]}
|
package/lib/index.d.ts
CHANGED
|
File without changes
|
package/lib/index.js
CHANGED
|
File without changes
|
package/lib/index.js.map
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comunica/actor-dereference-file",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "A file dereference actor",
|
|
5
5
|
"lsd:module": true,
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"build:components": "componentsjs-generator"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@comunica/bus-dereference": "^
|
|
45
|
-
"@comunica/context-entries": "^
|
|
46
|
-
"@comunica/core": "^
|
|
44
|
+
"@comunica/bus-dereference": "^5.0.0",
|
|
45
|
+
"@comunica/context-entries": "^5.0.0",
|
|
46
|
+
"@comunica/core": "^5.0.0"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "0b1756fdb9bef014133432489627c1bd71779bd0"
|
|
49
49
|
}
|