@comunica/actor-query-source-dereference-link-hypermedia 4.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/LICENSE.txt +22 -0
- package/README.md +48 -0
- package/components/ActorQuerySourceDereferenceLinkDereference.jsonld +294 -0
- package/components/ActorQuerySourceDereferenceLinkHypermedia.jsonld +286 -0
- package/components/ActorQuerySourceHypermediaResolveDereference.jsonld +294 -0
- package/components/QuerySourceCachePolicyDereferenceWrapper.jsonld +60 -0
- package/components/components.jsonld +12 -0
- package/components/context.jsonld +85 -0
- package/lib/ActorQuerySourceDereferenceLinkHypermedia.d.ts +43 -0
- package/lib/ActorQuerySourceDereferenceLinkHypermedia.js +98 -0
- package/lib/ActorQuerySourceDereferenceLinkHypermedia.js.map +1 -0
- package/lib/QuerySourceCachePolicyDereferenceWrapper.d.ts +13 -0
- package/lib/QuerySourceCachePolicyDereferenceWrapper.js +34 -0
- package/lib/QuerySourceCachePolicyDereferenceWrapper.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +19 -0
- package/lib/index.js.map +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QuerySourceCachePolicyDereferenceWrapper = void 0;
|
|
4
|
+
class QuerySourceCachePolicyDereferenceWrapper {
|
|
5
|
+
cachePolicy;
|
|
6
|
+
constructor(cachePolicy) {
|
|
7
|
+
this.cachePolicy = cachePolicy;
|
|
8
|
+
}
|
|
9
|
+
storable() {
|
|
10
|
+
return this.cachePolicy.storable();
|
|
11
|
+
}
|
|
12
|
+
async satisfiesWithoutRevalidation(action) {
|
|
13
|
+
return this.cachePolicy.satisfiesWithoutRevalidation({ url: action.link.url, context: action.context });
|
|
14
|
+
}
|
|
15
|
+
responseHeaders() {
|
|
16
|
+
return this.cachePolicy.responseHeaders();
|
|
17
|
+
}
|
|
18
|
+
timeToLive() {
|
|
19
|
+
return this.cachePolicy.timeToLive();
|
|
20
|
+
}
|
|
21
|
+
async revalidationHeaders(newAction) {
|
|
22
|
+
return this.cachePolicy.revalidationHeaders({ url: newAction.link.url, context: newAction.context });
|
|
23
|
+
}
|
|
24
|
+
async revalidatedPolicy(revalidationAction, revalidationResponse) {
|
|
25
|
+
const revalidatedPolicy = await this.cachePolicy.revalidatedPolicy({ url: revalidationAction.link.url, context: revalidationAction.context }, revalidationResponse);
|
|
26
|
+
return {
|
|
27
|
+
policy: new QuerySourceCachePolicyDereferenceWrapper(revalidatedPolicy.policy),
|
|
28
|
+
modified: revalidatedPolicy.modified,
|
|
29
|
+
matches: revalidatedPolicy.matches,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.QuerySourceCachePolicyDereferenceWrapper = QuerySourceCachePolicyDereferenceWrapper;
|
|
34
|
+
//# sourceMappingURL=QuerySourceCachePolicyDereferenceWrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuerySourceCachePolicyDereferenceWrapper.js","sourceRoot":"","sources":["QuerySourceCachePolicyDereferenceWrapper.ts"],"names":[],"mappings":";;;AAIA,MAAa,wCAAwC;IAEhC;IADnB,YACmB,WAA6C;QAA7C,gBAAW,GAAX,WAAW,CAAkC;IAC7D,CAAC;IAEG,QAAQ;QACb,OAAO,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;IACrC,CAAC;IAEM,KAAK,CAAC,4BAA4B,CAAC,MAAyC;QACjF,OAAO,IAAI,CAAC,WAAW,CAAC,4BAA4B,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;IAC1G,CAAC;IAEM,eAAe;QACpB,OAAO,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE,CAAC;IAC5C,CAAC;IAEM,UAAU;QACf,OAAO,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC;IACvC,CAAC;IAEM,KAAK,CAAC,mBAAmB,CAAC,SAA4C;QAC3E,OAAO,IAAI,CAAC,WAAW,CAAC,mBAAmB,CAAC,EAAE,GAAG,EAAE,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC;IACvG,CAAC;IAEM,KAAK,CAAC,iBAAiB,CAC5B,kBAAqD,EACrD,oBAAwC;QAExC,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAChE,EAAE,GAAG,EAAE,kBAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,kBAAkB,CAAC,OAAO,EAAE,EACzE,oBAAoB,CACrB,CAAC;QACF,OAAO;YACL,MAAM,EAAE,IAAI,wCAAwC,CAAC,iBAAiB,CAAC,MAAM,CAAC;YAC9E,QAAQ,EAAE,iBAAiB,CAAC,QAAQ;YACpC,OAAO,EAAE,iBAAiB,CAAC,OAAO;SACnC,CAAC;IACJ,CAAC;CACF;AAvCD,4FAuCC","sourcesContent":["import type { IActionDereference } from '@comunica/bus-dereference';\nimport type { IActionQuerySourceDereferenceLink } from '@comunica/bus-query-source-dereference-link';\nimport type { ICachePolicy, ICacheResponseHead, IRevalidationPolicy } from '@comunica/types';\n\nexport class QuerySourceCachePolicyDereferenceWrapper implements ICachePolicy<IActionQuerySourceDereferenceLink> {\n public constructor(\n private readonly cachePolicy: ICachePolicy<IActionDereference>,\n ) {}\n\n public storable(): boolean {\n return this.cachePolicy.storable();\n }\n\n public async satisfiesWithoutRevalidation(action: IActionQuerySourceDereferenceLink): Promise<boolean> {\n return this.cachePolicy.satisfiesWithoutRevalidation({ url: action.link.url, context: action.context });\n }\n\n public responseHeaders(): Headers {\n return this.cachePolicy.responseHeaders();\n }\n\n public timeToLive(): number {\n return this.cachePolicy.timeToLive();\n }\n\n public async revalidationHeaders(newAction: IActionQuerySourceDereferenceLink): Promise<Headers> {\n return this.cachePolicy.revalidationHeaders({ url: newAction.link.url, context: newAction.context });\n }\n\n public async revalidatedPolicy(\n revalidationAction: IActionQuerySourceDereferenceLink,\n revalidationResponse: ICacheResponseHead,\n ): Promise<IRevalidationPolicy<IActionQuerySourceDereferenceLink>> {\n const revalidatedPolicy = await this.cachePolicy.revalidatedPolicy(\n { url: revalidationAction.link.url, context: revalidationAction.context },\n revalidationResponse,\n );\n return {\n policy: new QuerySourceCachePolicyDereferenceWrapper(revalidatedPolicy.policy),\n modified: revalidatedPolicy.modified,\n matches: revalidatedPolicy.matches,\n };\n }\n}\n"]}
|
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ActorQuerySourceDereferenceLinkHypermedia"), exports);
|
|
18
|
+
__exportStar(require("./QuerySourceCachePolicyDereferenceWrapper"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8EAA4D;AAC5D,6EAA2D","sourcesContent":["export * from './ActorQuerySourceDereferenceLinkHypermedia';\nexport * from './QuerySourceCachePolicyDereferenceWrapper';\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@comunica/actor-query-source-dereference-link-hypermedia",
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"description": "A dereference query-source-dereference-link actor",
|
|
5
|
+
"lsd:module": true,
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"funding": {
|
|
8
|
+
"type": "opencollective",
|
|
9
|
+
"url": "https://opencollective.com/comunica-association"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://comunica.dev/",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/comunica/comunica.git",
|
|
15
|
+
"directory": "packages/actor-query-source-dereference-link-hypermedia"
|
|
16
|
+
},
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/comunica/comunica/issues"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"comunica",
|
|
22
|
+
"actor",
|
|
23
|
+
"query-source-dereference-link",
|
|
24
|
+
"dereference"
|
|
25
|
+
],
|
|
26
|
+
"sideEffects": false,
|
|
27
|
+
"main": "lib/index.js",
|
|
28
|
+
"typings": "lib/index",
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"components",
|
|
34
|
+
"lib/**/*.d.ts",
|
|
35
|
+
"lib/**/*.js",
|
|
36
|
+
"lib/**/*.js.map"
|
|
37
|
+
],
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "yarn run build:ts && yarn run build:components",
|
|
40
|
+
"build:ts": "node \"../../node_modules/typescript/bin/tsc\"",
|
|
41
|
+
"build:components": "componentsjs-generator"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@comunica/bus-dereference": "^4.5.0",
|
|
45
|
+
"@comunica/bus-dereference-rdf": "^4.5.0",
|
|
46
|
+
"@comunica/bus-query-source-dereference-link": "^4.0.0",
|
|
47
|
+
"@comunica/bus-query-source-identify-hypermedia": "^4.5.0",
|
|
48
|
+
"@comunica/bus-rdf-metadata": "^4.5.0",
|
|
49
|
+
"@comunica/bus-rdf-metadata-accumulate": "^4.5.0",
|
|
50
|
+
"@comunica/bus-rdf-metadata-extract": "^4.5.0",
|
|
51
|
+
"@comunica/context-entries": "^4.5.0",
|
|
52
|
+
"@comunica/core": "^4.5.0",
|
|
53
|
+
"@comunica/types": "^4.5.0",
|
|
54
|
+
"readable-stream": "^4.7.0"
|
|
55
|
+
},
|
|
56
|
+
"gitHead": "fb01ead4dc1f68c06bfa1d34ecbf48380b8ea3a3"
|
|
57
|
+
}
|