@comunica/actor-query-operation-ask 1.20.1-alpha.e8638e880.0 → 2.0.1-alpha.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright © 2017–2018 Ruben Taelman, Joachim Van Herwegen
4
- Ghent University – imec, Belgium
3
+ Copyright © 2017–now Ruben Taelman, Joachim Van Herwegen
4
+ Comunica Association and Ghent University – imec, Belgium
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -22,14 +22,14 @@ 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-query-operation-ask/^1.0.0/components/context.jsonld"
25
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-ask/^2.0.0/components/context.jsonld"
26
26
  ],
27
27
  "actors": [
28
28
  ...
29
29
  {
30
- "@id": "config-sets:sparql-queryoperators.json#myAskQueryOperator",
30
+ "@id": "urn:comunica:default:query-operation/actors#ask",
31
31
  "@type": "ActorQueryOperationAsk",
32
- "cbqo:mediatorQueryOperation": { "@id": "config-sets:sparql-queryoperators.json#mediatorQueryOperation" }
32
+ "mediatorQueryOperation": { "@id": "urn:comunica:default:query-operation/mediators#main" }
33
33
  }
34
34
  ]
35
35
  }
@@ -37,4 +37,4 @@ After installing, this package can be added to your engine's configuration as fo
37
37
 
38
38
  ### Config Parameters
39
39
 
40
- * `cbqo:mediatorQueryOperation`: A mediator over the [Query Operation bus](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation).
40
+ * `mediatorQueryOperation`: A mediator over the [Query Operation bus](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation).
@@ -0,0 +1,161 @@
1
+ {
2
+ "@context": [
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-ask/^2.0.0/components/context.jsonld",
4
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^2.0.0/components/context.jsonld",
5
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-operation/^2.0.0/components/context.jsonld"
6
+ ],
7
+ "@id": "npmd:@comunica/actor-query-operation-ask",
8
+ "components": [
9
+ {
10
+ "@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk",
11
+ "@type": "Class",
12
+ "requireElement": "ActorQueryOperationAsk",
13
+ "extends": [
14
+ {
15
+ "@type": "GenericComponentExtension",
16
+ "component": "cbqo:components/ActorQueryOperationTypedMediated.jsonld#ActorQueryOperationTypedMediated",
17
+ "genericTypeInstances": [
18
+ "urn:npm:sparqlalgebrajs:Ask"
19
+ ]
20
+ }
21
+ ],
22
+ "comment": "A comunica Ask Query Operation Actor.",
23
+ "parameters": [
24
+ {
25
+ "@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_mediatorQueryOperation",
26
+ "range": "cc:components/Mediator.jsonld#Mediator"
27
+ },
28
+ {
29
+ "@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_name",
30
+ "range": "xsd:string",
31
+ "default": {
32
+ "@id": "rdf:subject"
33
+ },
34
+ "comment": "The name for this actor."
35
+ },
36
+ {
37
+ "@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_bus",
38
+ "range": {
39
+ "@type": "ParameterRangeGenericComponent",
40
+ "component": "cc:components/Bus.jsonld#Bus",
41
+ "genericTypeInstances": [
42
+ {
43
+ "@type": "ParameterRangeGenericComponent",
44
+ "component": "cc:components/Actor.jsonld#Actor",
45
+ "genericTypeInstances": [
46
+ {
47
+ "@type": "ParameterRangeGenericTypeReference",
48
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
49
+ },
50
+ {
51
+ "@type": "ParameterRangeGenericTypeReference",
52
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
53
+ },
54
+ {
55
+ "@type": "ParameterRangeGenericTypeReference",
56
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
57
+ }
58
+ ]
59
+ },
60
+ {
61
+ "@type": "ParameterRangeGenericTypeReference",
62
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
63
+ },
64
+ {
65
+ "@type": "ParameterRangeGenericTypeReference",
66
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
67
+ },
68
+ {
69
+ "@type": "ParameterRangeGenericTypeReference",
70
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
71
+ }
72
+ ]
73
+ },
74
+ "default": {
75
+ "@id": "cbqo:components/ActorQueryOperation.jsonld#ActorQueryOperation_default_bus",
76
+ "@type": "cc:components/Bus.jsonld#Bus"
77
+ },
78
+ "comment": "The bus this actor subscribes to."
79
+ },
80
+ {
81
+ "@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_beforeActors",
82
+ "range": {
83
+ "@type": "ParameterRangeUnion",
84
+ "parameterRangeElements": [
85
+ {
86
+ "@type": "ParameterRangeArray",
87
+ "parameterRangeValue": {
88
+ "@type": "ParameterRangeGenericComponent",
89
+ "component": "cc:components/Actor.jsonld#Actor",
90
+ "genericTypeInstances": [
91
+ {
92
+ "@type": "ParameterRangeGenericTypeReference",
93
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
94
+ },
95
+ {
96
+ "@type": "ParameterRangeGenericTypeReference",
97
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
98
+ },
99
+ {
100
+ "@type": "ParameterRangeGenericTypeReference",
101
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
102
+ }
103
+ ]
104
+ }
105
+ },
106
+ {
107
+ "@type": "ParameterRangeUndefined"
108
+ }
109
+ ]
110
+ },
111
+ "comment": "Actor that must be registered in the bus before this actor."
112
+ }
113
+ ],
114
+ "memberFields": [
115
+ {
116
+ "@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk__member_constructor",
117
+ "memberFieldName": "constructor"
118
+ },
119
+ {
120
+ "@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk__member_testOperation",
121
+ "memberFieldName": "testOperation"
122
+ },
123
+ {
124
+ "@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk__member_runOperation",
125
+ "memberFieldName": "runOperation"
126
+ }
127
+ ],
128
+ "constructorArguments": [
129
+ {
130
+ "@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args__constructorArgument",
131
+ "fields": [
132
+ {
133
+ "keyRaw": "mediatorQueryOperation",
134
+ "value": {
135
+ "@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_mediatorQueryOperation"
136
+ }
137
+ },
138
+ {
139
+ "keyRaw": "name",
140
+ "value": {
141
+ "@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_name"
142
+ }
143
+ },
144
+ {
145
+ "keyRaw": "bus",
146
+ "value": {
147
+ "@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_bus"
148
+ }
149
+ },
150
+ {
151
+ "keyRaw": "beforeActors",
152
+ "value": {
153
+ "@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_beforeActors"
154
+ }
155
+ }
156
+ ]
157
+ }
158
+ ]
159
+ }
160
+ ]
161
+ }
@@ -1,9 +1,11 @@
1
1
  {
2
- "@context": "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-ask/^1.0.0/components/context.jsonld",
2
+ "@context": [
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-ask/^2.0.0/components/context.jsonld"
4
+ ],
3
5
  "@id": "npmd:@comunica/actor-query-operation-ask",
4
6
  "@type": "Module",
5
7
  "requireName": "@comunica/actor-query-operation-ask",
6
8
  "import": [
7
- "files-caqoa:components/Actor/QueryOperation/Ask.jsonld"
9
+ "caqoa:components/ActorQueryOperationAsk.jsonld"
8
10
  ]
9
- }
11
+ }
@@ -3,10 +3,39 @@
3
3
  "https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^4.0.0/components/context.jsonld",
4
4
  {
5
5
  "npmd": "https://linkedsoftwaredependencies.org/bundles/npm/",
6
- "caqoa": "npmd:@comunica/actor-query-operation-ask/",
7
- "files-caqoa": "caqoa:^1.0.0/",
8
-
9
- "ActorQueryOperationAsk": "caqoa:Actor/QueryOperation/Ask"
6
+ "caqoa": "npmd:@comunica/actor-query-operation-ask/^2.0.0/",
7
+ "ActorQueryOperationAsk": {
8
+ "@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk",
9
+ "@prefix": true,
10
+ "@context": {
11
+ "args_mediatorQueryOperation": {
12
+ "@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_mediatorQueryOperation"
13
+ },
14
+ "args_name": {
15
+ "@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_name"
16
+ },
17
+ "args_bus": {
18
+ "@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_bus"
19
+ },
20
+ "args_beforeActors": {
21
+ "@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_beforeActors",
22
+ "@container": "@list"
23
+ },
24
+ "mediatorQueryOperation": {
25
+ "@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_mediatorQueryOperation"
26
+ },
27
+ "name": {
28
+ "@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_name"
29
+ },
30
+ "bus": {
31
+ "@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_bus"
32
+ },
33
+ "beforeActors": {
34
+ "@id": "caqoa:components/ActorQueryOperationAsk.jsonld#ActorQueryOperationAsk_args_beforeActors",
35
+ "@container": "@list"
36
+ }
37
+ }
38
+ }
10
39
  }
11
40
  ]
12
- }
41
+ }
@@ -1,13 +1,13 @@
1
1
  import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';
2
2
  import { ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';
3
- import type { ActionContext, IActorTest } from '@comunica/core';
4
- import type { IActorQueryOperationOutputBoolean } from '@comunica/types';
3
+ import type { IActorTest } from '@comunica/core';
4
+ import type { IActionContext, IQueryOperationResult } from '@comunica/types';
5
5
  import type { Algebra } from 'sparqlalgebrajs';
6
6
  /**
7
7
  * A comunica Ask Query Operation Actor.
8
8
  */
9
9
  export declare class ActorQueryOperationAsk extends ActorQueryOperationTypedMediated<Algebra.Ask> {
10
10
  constructor(args: IActorQueryOperationTypedMediatedArgs);
11
- testOperation(pattern: Algebra.Ask, context: ActionContext): Promise<IActorTest>;
12
- runOperation(pattern: Algebra.Ask, context: ActionContext): Promise<IActorQueryOperationOutputBoolean>;
11
+ testOperation(operation: Algebra.Ask, context: IActionContext): Promise<IActorTest>;
12
+ runOperation(operation: Algebra.Ask, context: IActionContext): Promise<IQueryOperationResult>;
13
13
  }
@@ -9,12 +9,12 @@ class ActorQueryOperationAsk extends bus_query_operation_1.ActorQueryOperationTy
9
9
  constructor(args) {
10
10
  super(args, 'ask');
11
11
  }
12
- async testOperation(pattern, context) {
12
+ async testOperation(operation, context) {
13
13
  return true;
14
14
  }
15
- async runOperation(pattern, context) {
15
+ async runOperation(operation, context) {
16
16
  // Call other query operations like this:
17
- const output = await this.mediatorQueryOperation.mediate({ operation: pattern.input, context });
17
+ const output = await this.mediatorQueryOperation.mediate({ operation: operation.input, context });
18
18
  const bindings = bus_query_operation_1.ActorQueryOperation.getSafeBindings(output);
19
19
  const booleanResult = new Promise((resolve, reject) => {
20
20
  // Resolve to true if we find one element, and close immediately
package/lib/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './ActorQueryOperationAsk';
@@ -10,5 +10,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
10
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./lib/ActorQueryOperationAsk"), exports);
13
+ __exportStar(require("./ActorQueryOperationAsk"), exports);
14
14
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@comunica/actor-query-operation-ask",
3
- "version": "1.20.1-alpha.e8638e880.0",
3
+ "version": "2.0.1-alpha.5.0",
4
4
  "description": "A ask query-operation actor",
5
5
  "lsd:module": true,
6
- "main": "index.js",
7
- "typings": "index",
6
+ "main": "lib/index.js",
7
+ "typings": "lib/index",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/comunica/comunica.git",
@@ -27,43 +27,18 @@
27
27
  "files": [
28
28
  "components",
29
29
  "lib/**/*.d.ts",
30
- "lib/**/*.js",
31
- "index.d.ts",
32
- "index.js"
30
+ "lib/**/*.js"
33
31
  ],
34
32
  "dependencies": {
35
- "@comunica/types": "^1.20.1-alpha.e8638e880.0",
36
- "sparqlalgebrajs": "^2.5.5"
37
- },
38
- "peerDependencies": {
39
- "@comunica/bus-query-operation": "^1.0.0",
40
- "@comunica/core": "^1.0.0"
41
- },
42
- "devDependencies": {
43
- "@comunica/bus-query-operation": "^1.20.1-alpha.e8638e880.0",
44
- "@comunica/core": "^1.20.1-alpha.e8638e880.0"
45
- },
46
- "jest": {
47
- "globals": {
48
- "ts-jest": {
49
- "tsConfig": "../../tsconfig.json"
50
- }
51
- },
52
- "transform": {
53
- "^.+\\.ts$": "ts-jest"
54
- },
55
- "testRegex": "(/test/.*|(\\.|/)(test|spec))\\.ts$",
56
- "moduleFileExtensions": [
57
- "ts",
58
- "js"
59
- ],
60
- "collectCoverage": true
33
+ "@comunica/bus-query-operation": "2.0.1-alpha.5.0",
34
+ "@comunica/core": "2.0.1-alpha.5.0",
35
+ "@comunica/types": "2.0.1-alpha.5.0",
36
+ "sparqlalgebrajs": "^4.0.0"
61
37
  },
62
38
  "scripts": {
63
- "test": "node \"../../node_modules/jest/bin/jest.js\" ${1}",
64
- "test-watch": "node \"../../node_modules/jest/bin/jest.js\" ${1} --watch",
65
- "build": "node \"../../node_modules/typescript/bin/tsc\"",
66
- "validate": "npm ls"
39
+ "build": "npm run build:ts && npm run build:components",
40
+ "build:ts": "node \"../../node_modules/typescript/bin/tsc\"",
41
+ "build:components": "componentsjs-generator"
67
42
  },
68
- "gitHead": "e8638e880c762fd659ea781ba1ba2f5cb3e4ef2f"
43
+ "gitHead": "e2ae2e9e924bf0656df60cc99774f7e560d47695"
69
44
  }
@@ -1,21 +0,0 @@
1
- {
2
- "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-ask/^1.0.0/components/context.jsonld",
4
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-operation/^1.0.0/components/context.jsonld"
5
- ],
6
- "@id": "npmd:@comunica/actor-query-operation-ask",
7
- "components": [
8
- {
9
- "@id": "caqoa:Actor/QueryOperation/Ask",
10
- "@type": "Class",
11
- "extends": "cbqo:Actor/QueryOperationTypedMediated",
12
- "requireElement": "ActorQueryOperationAsk",
13
- "comment": "A comunica Ask Query Operation Actor.",
14
- "constructorArguments": [
15
- {
16
- "extends": "cbqo:Actor/QueryOperationTypedMediated/constructorArgumentsObject"
17
- }
18
- ]
19
- }
20
- ]
21
- }
package/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './lib/ActorQueryOperationAsk';