@comunica/actor-query-operation-ask 3.2.4-alpha.47.0 → 3.3.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.
|
@@ -54,10 +54,6 @@
|
|
|
54
54
|
{
|
|
55
55
|
"@type": "ParameterRangeGenericTypeReference",
|
|
56
56
|
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"@type": "ParameterRangeGenericTypeReference",
|
|
60
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
|
|
61
57
|
}
|
|
62
58
|
]
|
|
63
59
|
},
|
|
@@ -72,10 +68,6 @@
|
|
|
72
68
|
{
|
|
73
69
|
"@type": "ParameterRangeGenericTypeReference",
|
|
74
70
|
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"@type": "ParameterRangeGenericTypeReference",
|
|
78
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
|
|
79
71
|
}
|
|
80
72
|
]
|
|
81
73
|
},
|
|
@@ -85,20 +77,6 @@
|
|
|
85
77
|
},
|
|
86
78
|
"comment": "The bus this actor subscribes to."
|
|
87
79
|
},
|
|
88
|
-
{
|
|
89
|
-
"@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_busFailMessage",
|
|
90
|
-
"range": {
|
|
91
|
-
"@type": "ParameterRangeUnion",
|
|
92
|
-
"parameterRangeElements": [
|
|
93
|
-
"xsd:string",
|
|
94
|
-
{
|
|
95
|
-
"@type": "ParameterRangeUndefined"
|
|
96
|
-
}
|
|
97
|
-
]
|
|
98
|
-
},
|
|
99
|
-
"default": "Query operation processing failed: none of the configured actors were able to handle the operation type ${action.operation.type}",
|
|
100
|
-
"comment": "The message that will be configured in the bus for reporting failures. This message may be a template string that contains references to the executed `action`. For example, the following templated string is allowed: \"RDF dereferencing failed: no actors could handle ${action.handle.mediaType}\""
|
|
101
|
-
},
|
|
102
80
|
{
|
|
103
81
|
"@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_beforeActors",
|
|
104
82
|
"range": {
|
|
@@ -121,10 +99,6 @@
|
|
|
121
99
|
{
|
|
122
100
|
"@type": "ParameterRangeGenericTypeReference",
|
|
123
101
|
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"@type": "ParameterRangeGenericTypeReference",
|
|
127
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
|
|
128
102
|
}
|
|
129
103
|
]
|
|
130
104
|
}
|
|
@@ -173,12 +147,6 @@
|
|
|
173
147
|
"@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_bus"
|
|
174
148
|
}
|
|
175
149
|
},
|
|
176
|
-
{
|
|
177
|
-
"keyRaw": "busFailMessage",
|
|
178
|
-
"value": {
|
|
179
|
-
"@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_busFailMessage"
|
|
180
|
-
}
|
|
181
|
-
},
|
|
182
150
|
{
|
|
183
151
|
"keyRaw": "beforeActors",
|
|
184
152
|
"value": {
|
|
@@ -17,9 +17,6 @@
|
|
|
17
17
|
"args_bus": {
|
|
18
18
|
"@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_bus"
|
|
19
19
|
},
|
|
20
|
-
"args_busFailMessage": {
|
|
21
|
-
"@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_busFailMessage"
|
|
22
|
-
},
|
|
23
20
|
"args_beforeActors": {
|
|
24
21
|
"@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_beforeActors",
|
|
25
22
|
"@container": "@list"
|
|
@@ -33,9 +30,6 @@
|
|
|
33
30
|
"bus": {
|
|
34
31
|
"@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_bus"
|
|
35
32
|
},
|
|
36
|
-
"busFailMessage": {
|
|
37
|
-
"@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_busFailMessage"
|
|
38
|
-
},
|
|
39
33
|
"beforeActors": {
|
|
40
34
|
"@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_beforeActors",
|
|
41
35
|
"@container": "@list"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';
|
|
2
2
|
import { ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';
|
|
3
|
-
import type { IActorTest
|
|
3
|
+
import type { IActorTest } from '@comunica/core';
|
|
4
4
|
import type { IActionContext, IQueryOperationResult } from '@comunica/types';
|
|
5
5
|
import type { Algebra } from 'sparqlalgebrajs';
|
|
6
6
|
/**
|
|
@@ -8,6 +8,6 @@ import type { Algebra } from 'sparqlalgebrajs';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class ActorQueryOperationAsk extends ActorQueryOperationTypedMediated<Algebra.Ask> {
|
|
10
10
|
constructor(args: IActorQueryOperationTypedMediatedArgs);
|
|
11
|
-
testOperation(_operation: Algebra.Ask, _context: IActionContext): Promise<
|
|
11
|
+
testOperation(_operation: Algebra.Ask, _context: IActionContext): Promise<IActorTest>;
|
|
12
12
|
runOperation(operation: Algebra.Ask, context: IActionContext): Promise<IQueryOperationResult>;
|
|
13
13
|
}
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ActorQueryOperationAsk = void 0;
|
|
4
4
|
const bus_query_operation_1 = require("@comunica/bus-query-operation");
|
|
5
|
-
const core_1 = require("@comunica/core");
|
|
6
|
-
const utils_query_operation_1 = require("@comunica/utils-query-operation");
|
|
7
5
|
/**
|
|
8
6
|
* A comunica Ask Query Operation Actor.
|
|
9
7
|
*/
|
|
@@ -12,12 +10,12 @@ class ActorQueryOperationAsk extends bus_query_operation_1.ActorQueryOperationTy
|
|
|
12
10
|
super(args, 'ask');
|
|
13
11
|
}
|
|
14
12
|
async testOperation(_operation, _context) {
|
|
15
|
-
return
|
|
13
|
+
return true;
|
|
16
14
|
}
|
|
17
15
|
async runOperation(operation, context) {
|
|
18
16
|
// Call other query operations like this:
|
|
19
17
|
const output = await this.mediatorQueryOperation.mediate({ operation: operation.input, context });
|
|
20
|
-
const { bindingsStream } =
|
|
18
|
+
const { bindingsStream } = bus_query_operation_1.ActorQueryOperation.getSafeBindings(output);
|
|
21
19
|
return { type: 'boolean', execute: async () => (await bindingsStream.take(1).toArray()).length === 1 };
|
|
22
20
|
}
|
|
23
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActorQueryOperationAsk.js","sourceRoot":"","sources":["ActorQueryOperationAsk.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"ActorQueryOperationAsk.js","sourceRoot":"","sources":["ActorQueryOperationAsk.ts"],"names":[],"mappings":";;;AACA,uEAAsG;AAStG;;GAEG;AACH,MAAa,sBAAuB,SAAQ,sDAA6C;IACvF,YAAmB,IAA2C;QAC5D,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACrB,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,UAAuB,EAAE,QAAwB;QAC1E,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,SAAsB,EAAE,OAAuB;QACvE,yCAAyC;QACzC,MAAM,MAAM,GAA0B,MAAM,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAC7E,EAAE,SAAS,EAAE,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,CACxC,CAAC;QACF,MAAM,EAAE,cAAc,EAAE,GAAkC,yCAAmB,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QACtG,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,IAAG,EAAE,CAAC,CAAC,MAAM,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;IACxG,CAAC;CACF;AAjBD,wDAiBC","sourcesContent":["import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type {\n IActionContext,\n IQueryOperationResult,\n IQueryOperationResultBindings,\n} from '@comunica/types';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Ask Query Operation Actor.\n */\nexport class ActorQueryOperationAsk extends ActorQueryOperationTypedMediated<Algebra.Ask> {\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, 'ask');\n }\n\n public async testOperation(_operation: Algebra.Ask, _context: IActionContext): Promise<IActorTest> {\n return true;\n }\n\n public async runOperation(operation: Algebra.Ask, context: IActionContext): Promise<IQueryOperationResult> {\n // Call other query operations like this:\n const output: IQueryOperationResult = await this.mediatorQueryOperation.mediate(\n { operation: operation.input, context },\n );\n const { bindingsStream }: IQueryOperationResultBindings = ActorQueryOperation.getSafeBindings(output);\n return { type: 'boolean', execute: async() => (await bindingsStream.take(1).toArray()).length === 1 };\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comunica/actor-query-operation-ask",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "A ask query-operation actor",
|
|
5
5
|
"lsd:module": true,
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"funding": {
|
|
8
|
-
"type": "opencollective",
|
|
9
|
-
"url": "https://opencollective.com/comunica-association"
|
|
10
|
-
},
|
|
11
7
|
"homepage": "https://comunica.dev/",
|
|
12
8
|
"repository": {
|
|
13
9
|
"type": "git",
|
|
@@ -41,11 +37,10 @@
|
|
|
41
37
|
"build:components": "componentsjs-generator"
|
|
42
38
|
},
|
|
43
39
|
"dependencies": {
|
|
44
|
-
"@comunica/bus-query-operation": "3.
|
|
45
|
-
"@comunica/core": "3.
|
|
46
|
-
"@comunica/types": "3.
|
|
47
|
-
"
|
|
48
|
-
"sparqlalgebrajs": "^4.3.8"
|
|
40
|
+
"@comunica/bus-query-operation": "^3.3.0",
|
|
41
|
+
"@comunica/core": "^3.3.0",
|
|
42
|
+
"@comunica/types": "^3.3.0",
|
|
43
|
+
"sparqlalgebrajs": "^4.3.7"
|
|
49
44
|
},
|
|
50
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "02bde397d206f1f5a523643a6a604c89e792e2f9"
|
|
51
46
|
}
|