@comunica/bus-function-factory 3.2.4-alpha.47.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 ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright © 2017–now Ruben Taelman, Joachim Van Herwegen
4
+ Comunica Association and Ghent University – imec, Belgium
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,30 @@
1
+ # Comunica Bus Function Factory
2
+
3
+ [![npm version](https://badge.fury.io/js/%40comunica%2Fbus-function-factory.svg)](https://www.npmjs.com/package/@comunica/bus-function-factory)
4
+
5
+ A comunica bus for function factory events.
6
+
7
+ This module is part of the [Comunica framework](https://github.com/comunica/comunica),
8
+ and should only be used by [developers that want to build their own query engine](https://comunica.dev/docs/modify/).
9
+
10
+ [Click here if you just want to query with Comunica](https://comunica.dev/docs/query/).
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ $ yarn add @comunica/bus-function-factory
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ ## Bus usage
21
+
22
+ * **Context**: `"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-function-factory/^1.0.0/components/context.jsonld"`
23
+ * **Bus name**: `ActorFunctionFactory:_default_bus`
24
+
25
+ When a mediator is required, the argument should get the `MediatorFunctionFactoryUnsafe` and manually cast it to `MediatorFunctionFactory`.
26
+ We require this work around because Components.js does not support the complex type of MediatorFunctions.
27
+
28
+ ## Creating actors on this bus
29
+
30
+ Actors extending [`ActorFunctionFactory`](TODO:jsdoc_url) are automatically subscribed to this bus.
@@ -0,0 +1,367 @@
1
+ {
2
+ "@context": [
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-function-factory/^3.0.0/components/context.jsonld",
4
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^3.0.0/components/context.jsonld"
5
+ ],
6
+ "@id": "npmd:@comunica/bus-function-factory",
7
+ "components": [
8
+ {
9
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory",
10
+ "@type": "AbstractClass",
11
+ "requireElement": "ActorFunctionFactory",
12
+ "extends": [
13
+ {
14
+ "@type": "GenericComponentExtension",
15
+ "component": "cc:components/Actor.jsonld#Actor",
16
+ "genericTypeInstances": [
17
+ "cbff:components/ActorFunctionFactory.jsonld#IActionFunctionFactory",
18
+ "cc:components/Actor.jsonld#IActorTest",
19
+ "cbff:components/ActorFunctionFactory.jsonld#IActorFunctionFactoryOutput",
20
+ {
21
+ "@type": "ParameterRangeGenericTypeReference",
22
+ "parameterRangeGenericType": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory__generic_TS"
23
+ }
24
+ ]
25
+ }
26
+ ],
27
+ "comment": "A comunica actor for function factory events. Actor types: * Input: IActionFunctions: A request to receive a function implementation for a given function name and potentially the function arguments. * Test: <none> * Output: IActorFunctionsOutput: A function implementation.",
28
+ "genericTypeParameters": [
29
+ {
30
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory__generic_TS",
31
+ "default": {
32
+ "@type": "ParameterRangeUndefined"
33
+ }
34
+ }
35
+ ],
36
+ "parameters": [
37
+ {
38
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory_args_name",
39
+ "range": "xsd:string",
40
+ "default": {
41
+ "@id": "rdf:subject"
42
+ },
43
+ "comment": "The name for this actor."
44
+ },
45
+ {
46
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory_args_bus",
47
+ "range": {
48
+ "@type": "ParameterRangeGenericComponent",
49
+ "component": "cc:components/Bus.jsonld#Bus",
50
+ "genericTypeInstances": [
51
+ {
52
+ "@type": "ParameterRangeGenericComponent",
53
+ "component": "cc:components/Actor.jsonld#Actor",
54
+ "genericTypeInstances": [
55
+ {
56
+ "@type": "ParameterRangeGenericTypeReference",
57
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
58
+ },
59
+ {
60
+ "@type": "ParameterRangeGenericTypeReference",
61
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
62
+ },
63
+ {
64
+ "@type": "ParameterRangeGenericTypeReference",
65
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
66
+ },
67
+ {
68
+ "@type": "ParameterRangeGenericTypeReference",
69
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
70
+ }
71
+ ]
72
+ },
73
+ {
74
+ "@type": "ParameterRangeGenericTypeReference",
75
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
76
+ },
77
+ {
78
+ "@type": "ParameterRangeGenericTypeReference",
79
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
80
+ },
81
+ {
82
+ "@type": "ParameterRangeGenericTypeReference",
83
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
84
+ },
85
+ {
86
+ "@type": "ParameterRangeGenericTypeReference",
87
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
88
+ }
89
+ ]
90
+ },
91
+ "default": {
92
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory_default_bus",
93
+ "@type": "cbff:components/BusFunctionFactory.jsonld#BusFunctionFactory"
94
+ },
95
+ "comment": "The bus this actor subscribes to."
96
+ },
97
+ {
98
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory_args_busFailMessage",
99
+ "range": {
100
+ "@type": "ParameterRangeUnion",
101
+ "parameterRangeElements": [
102
+ "xsd:string",
103
+ {
104
+ "@type": "ParameterRangeUndefined"
105
+ }
106
+ ]
107
+ },
108
+ "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}\""
109
+ },
110
+ {
111
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory_args_beforeActors",
112
+ "range": {
113
+ "@type": "ParameterRangeUnion",
114
+ "parameterRangeElements": [
115
+ {
116
+ "@type": "ParameterRangeArray",
117
+ "parameterRangeValue": {
118
+ "@type": "ParameterRangeGenericComponent",
119
+ "component": "cc:components/Actor.jsonld#Actor",
120
+ "genericTypeInstances": [
121
+ {
122
+ "@type": "ParameterRangeGenericTypeReference",
123
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
124
+ },
125
+ {
126
+ "@type": "ParameterRangeGenericTypeReference",
127
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
128
+ },
129
+ {
130
+ "@type": "ParameterRangeGenericTypeReference",
131
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
132
+ },
133
+ {
134
+ "@type": "ParameterRangeGenericTypeReference",
135
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
136
+ }
137
+ ]
138
+ }
139
+ },
140
+ {
141
+ "@type": "ParameterRangeUndefined"
142
+ }
143
+ ]
144
+ },
145
+ "comment": "Actor that must be registered in the bus before this actor."
146
+ }
147
+ ],
148
+ "memberFields": [
149
+ {
150
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory__member_constructor",
151
+ "memberFieldName": "constructor"
152
+ },
153
+ {
154
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory__member_run",
155
+ "memberFieldName": "run"
156
+ }
157
+ ],
158
+ "constructorArguments": [
159
+ {
160
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory_args__constructorArgument",
161
+ "fields": [
162
+ {
163
+ "keyRaw": "name",
164
+ "value": {
165
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory_args_name"
166
+ }
167
+ },
168
+ {
169
+ "keyRaw": "bus",
170
+ "value": {
171
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory_args_bus"
172
+ }
173
+ },
174
+ {
175
+ "keyRaw": "busFailMessage",
176
+ "value": {
177
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory_args_busFailMessage"
178
+ }
179
+ },
180
+ {
181
+ "keyRaw": "beforeActors",
182
+ "value": {
183
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory_args_beforeActors"
184
+ }
185
+ }
186
+ ]
187
+ }
188
+ ]
189
+ },
190
+ {
191
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#MediatorFunctionFactory",
192
+ "@type": "AbstractClass",
193
+ "requireElement": "MediatorFunctionFactory",
194
+ "extends": [
195
+ {
196
+ "@type": "GenericComponentExtension",
197
+ "component": "cc:components/Mediator.jsonld#Mediator",
198
+ "genericTypeInstances": [
199
+ {
200
+ "@type": "ParameterRangeGenericComponent",
201
+ "component": "cc:components/Actor.jsonld#Actor",
202
+ "genericTypeInstances": [
203
+ "cbff:components/ActorFunctionFactory.jsonld#IActionFunctionFactory",
204
+ "cc:components/Actor.jsonld#IActorTest",
205
+ "cbff:components/ActorFunctionFactory.jsonld#IActorFunctionFactoryOutput"
206
+ ]
207
+ },
208
+ "cbff:components/ActorFunctionFactory.jsonld#IActionFunctionFactory",
209
+ "cc:components/Actor.jsonld#IActorTest",
210
+ "cbff:components/ActorFunctionFactory.jsonld#IActorFunctionFactoryOutput"
211
+ ]
212
+ }
213
+ ],
214
+ "parameters": [
215
+ {
216
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#MediatorFunctionFactory_args_name",
217
+ "range": "xsd:string",
218
+ "default": {
219
+ "@id": "rdf:subject"
220
+ },
221
+ "comment": "The name for this mediator."
222
+ },
223
+ {
224
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#MediatorFunctionFactory_args_bus",
225
+ "range": {
226
+ "@type": "ParameterRangeGenericComponent",
227
+ "component": "cc:components/Bus.jsonld#Bus",
228
+ "genericTypeInstances": [
229
+ {
230
+ "@type": "ParameterRangeGenericTypeReference",
231
+ "parameterRangeGenericType": "npmd:@comunica/core/^3.0.0/components/Mediator.jsonld#Mediator__generic_A"
232
+ },
233
+ {
234
+ "@type": "ParameterRangeGenericTypeReference",
235
+ "parameterRangeGenericType": "npmd:@comunica/core/^3.0.0/components/Mediator.jsonld#Mediator__generic_I"
236
+ },
237
+ {
238
+ "@type": "ParameterRangeGenericTypeReference",
239
+ "parameterRangeGenericType": "npmd:@comunica/core/^3.0.0/components/Mediator.jsonld#Mediator__generic_T"
240
+ },
241
+ {
242
+ "@type": "ParameterRangeGenericTypeReference",
243
+ "parameterRangeGenericType": "npmd:@comunica/core/^3.0.0/components/Mediator.jsonld#Mediator__generic_O"
244
+ },
245
+ {
246
+ "@type": "ParameterRangeGenericTypeReference",
247
+ "parameterRangeGenericType": "npmd:@comunica/core/^3.0.0/components/Mediator.jsonld#Mediator__generic_TS"
248
+ }
249
+ ]
250
+ },
251
+ "comment": "The bus this mediator will mediate over."
252
+ }
253
+ ],
254
+ "memberFields": [
255
+ {
256
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#MediatorFunctionFactory__member_mediate",
257
+ "memberFieldName": "mediate",
258
+ "range": {
259
+ "@type": "ParameterRangeWildcard"
260
+ }
261
+ }
262
+ ],
263
+ "constructorArguments": [
264
+ {
265
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#MediatorFunctionFactory_args__constructorArgument",
266
+ "fields": [
267
+ {
268
+ "keyRaw": "name",
269
+ "value": {
270
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#MediatorFunctionFactory_args_name"
271
+ }
272
+ },
273
+ {
274
+ "keyRaw": "bus",
275
+ "value": {
276
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#MediatorFunctionFactory_args_bus"
277
+ }
278
+ }
279
+ ]
280
+ }
281
+ ]
282
+ },
283
+ {
284
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#IExpressionFunction",
285
+ "@type": "AbstractClass",
286
+ "requireElement": "IExpressionFunction",
287
+ "parameters": [],
288
+ "memberFields": [
289
+ {
290
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#IExpressionFunction__member_apply",
291
+ "memberFieldName": "apply"
292
+ },
293
+ {
294
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#IExpressionFunction__member_checkArity",
295
+ "memberFieldName": "checkArity"
296
+ }
297
+ ],
298
+ "constructorArguments": []
299
+ },
300
+ {
301
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ITermFunction",
302
+ "@type": "AbstractClass",
303
+ "requireElement": "ITermFunction",
304
+ "extends": [
305
+ "cbff:components/ActorFunctionFactory.jsonld#IExpressionFunction"
306
+ ],
307
+ "parameters": [],
308
+ "memberFields": [
309
+ {
310
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ITermFunction__member_supportsTermExpressions",
311
+ "memberFieldName": "supportsTermExpressions"
312
+ },
313
+ {
314
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ITermFunction__member_applyOnTerms",
315
+ "memberFieldName": "applyOnTerms"
316
+ }
317
+ ],
318
+ "constructorArguments": []
319
+ },
320
+ {
321
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#IActionFunctionFactory",
322
+ "@type": "AbstractClass",
323
+ "requireElement": "IActionFunctionFactory",
324
+ "extends": [
325
+ "cc:components/Actor.jsonld#IAction"
326
+ ],
327
+ "parameters": [],
328
+ "memberFields": [
329
+ {
330
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#IActionFunctionFactory__member_functionName",
331
+ "memberFieldName": "functionName"
332
+ },
333
+ {
334
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#IActionFunctionFactory__member_arguments",
335
+ "memberFieldName": "arguments"
336
+ },
337
+ {
338
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#IActionFunctionFactory__member_requireTermExpression",
339
+ "memberFieldName": "requireTermExpression"
340
+ }
341
+ ],
342
+ "constructorArguments": []
343
+ },
344
+ {
345
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#IActorFunctionFactoryOutput",
346
+ "@type": "AbstractClass",
347
+ "requireElement": "IActorFunctionFactoryOutput",
348
+ "extends": [
349
+ "cc:components/Actor.jsonld#IActorOutput",
350
+ "cbff:components/ActorFunctionFactory.jsonld#IExpressionFunction"
351
+ ],
352
+ "parameters": [],
353
+ "constructorArguments": []
354
+ },
355
+ {
356
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#IActorFunctionFactoryOutputTerm",
357
+ "@type": "AbstractClass",
358
+ "requireElement": "IActorFunctionFactoryOutputTerm",
359
+ "extends": [
360
+ "cc:components/Actor.jsonld#IActorOutput",
361
+ "cbff:components/ActorFunctionFactory.jsonld#ITermFunction"
362
+ ],
363
+ "parameters": [],
364
+ "constructorArguments": []
365
+ }
366
+ ]
367
+ }
@@ -0,0 +1,242 @@
1
+ {
2
+ "@context": [
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-function-factory/^3.0.0/components/context.jsonld",
4
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^3.0.0/components/context.jsonld"
5
+ ],
6
+ "@id": "npmd:@comunica/bus-function-factory",
7
+ "components": [
8
+ {
9
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated",
10
+ "@type": "AbstractClass",
11
+ "requireElement": "ActorFunctionFactoryDedicated",
12
+ "extends": [
13
+ "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory"
14
+ ],
15
+ "comment": "A base implementation for function factory actors for a dedicated operator.",
16
+ "parameters": [
17
+ {
18
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_functionNames",
19
+ "range": {
20
+ "@type": "ParameterRangeTuple",
21
+ "parameterRangeElements": [
22
+ "xsd:string",
23
+ {
24
+ "@type": "ParameterRangeRest",
25
+ "parameterRangeValue": {
26
+ "@type": "ParameterRangeArray",
27
+ "parameterRangeValue": "xsd:string"
28
+ }
29
+ }
30
+ ]
31
+ }
32
+ },
33
+ {
34
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_termFunction",
35
+ "range": "xsd:boolean"
36
+ },
37
+ {
38
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_name",
39
+ "range": "xsd:string",
40
+ "default": {
41
+ "@id": "rdf:subject"
42
+ },
43
+ "comment": "The name for this actor."
44
+ },
45
+ {
46
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_bus",
47
+ "range": {
48
+ "@type": "ParameterRangeGenericComponent",
49
+ "component": "cc:components/Bus.jsonld#Bus",
50
+ "genericTypeInstances": [
51
+ {
52
+ "@type": "ParameterRangeGenericComponent",
53
+ "component": "cc:components/Actor.jsonld#Actor",
54
+ "genericTypeInstances": [
55
+ {
56
+ "@type": "ParameterRangeGenericTypeReference",
57
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
58
+ },
59
+ {
60
+ "@type": "ParameterRangeGenericTypeReference",
61
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
62
+ },
63
+ {
64
+ "@type": "ParameterRangeGenericTypeReference",
65
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
66
+ },
67
+ {
68
+ "@type": "ParameterRangeGenericTypeReference",
69
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
70
+ }
71
+ ]
72
+ },
73
+ {
74
+ "@type": "ParameterRangeGenericTypeReference",
75
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
76
+ },
77
+ {
78
+ "@type": "ParameterRangeGenericTypeReference",
79
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
80
+ },
81
+ {
82
+ "@type": "ParameterRangeGenericTypeReference",
83
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
84
+ },
85
+ {
86
+ "@type": "ParameterRangeGenericTypeReference",
87
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
88
+ }
89
+ ]
90
+ },
91
+ "default": {
92
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory_default_bus",
93
+ "@type": "cbff:components/BusFunctionFactory.jsonld#BusFunctionFactory"
94
+ },
95
+ "comment": "The bus this actor subscribes to."
96
+ },
97
+ {
98
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_busFailMessage",
99
+ "range": {
100
+ "@type": "ParameterRangeUnion",
101
+ "parameterRangeElements": [
102
+ "xsd:string",
103
+ {
104
+ "@type": "ParameterRangeUndefined"
105
+ }
106
+ ]
107
+ },
108
+ "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}\""
109
+ },
110
+ {
111
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_beforeActors",
112
+ "range": {
113
+ "@type": "ParameterRangeUnion",
114
+ "parameterRangeElements": [
115
+ {
116
+ "@type": "ParameterRangeArray",
117
+ "parameterRangeValue": {
118
+ "@type": "ParameterRangeGenericComponent",
119
+ "component": "cc:components/Actor.jsonld#Actor",
120
+ "genericTypeInstances": [
121
+ {
122
+ "@type": "ParameterRangeGenericTypeReference",
123
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
124
+ },
125
+ {
126
+ "@type": "ParameterRangeGenericTypeReference",
127
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
128
+ },
129
+ {
130
+ "@type": "ParameterRangeGenericTypeReference",
131
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
132
+ },
133
+ {
134
+ "@type": "ParameterRangeGenericTypeReference",
135
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
136
+ }
137
+ ]
138
+ }
139
+ },
140
+ {
141
+ "@type": "ParameterRangeUndefined"
142
+ }
143
+ ]
144
+ },
145
+ "comment": "Actor that must be registered in the bus before this actor."
146
+ }
147
+ ],
148
+ "memberFields": [
149
+ {
150
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated__member_functionNames",
151
+ "memberFieldName": "functionNames",
152
+ "range": {
153
+ "@type": "ParameterRangeTuple",
154
+ "parameterRangeElements": [
155
+ "xsd:string",
156
+ {
157
+ "@type": "ParameterRangeRest",
158
+ "parameterRangeValue": {
159
+ "@type": "ParameterRangeArray",
160
+ "parameterRangeValue": "xsd:string"
161
+ }
162
+ }
163
+ ]
164
+ }
165
+ },
166
+ {
167
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated__member_termFunction",
168
+ "memberFieldName": "termFunction",
169
+ "range": "xsd:boolean"
170
+ },
171
+ {
172
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated__member_constructor",
173
+ "memberFieldName": "constructor"
174
+ },
175
+ {
176
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated__member_test",
177
+ "memberFieldName": "test"
178
+ }
179
+ ],
180
+ "constructorArguments": [
181
+ {
182
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args__constructorArgument",
183
+ "fields": [
184
+ {
185
+ "keyRaw": "functionNames",
186
+ "value": {
187
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_functionNames"
188
+ }
189
+ },
190
+ {
191
+ "keyRaw": "termFunction",
192
+ "value": {
193
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_termFunction"
194
+ }
195
+ },
196
+ {
197
+ "keyRaw": "name",
198
+ "value": {
199
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_name"
200
+ }
201
+ },
202
+ {
203
+ "keyRaw": "bus",
204
+ "value": {
205
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_bus"
206
+ }
207
+ },
208
+ {
209
+ "keyRaw": "busFailMessage",
210
+ "value": {
211
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_busFailMessage"
212
+ }
213
+ },
214
+ {
215
+ "keyRaw": "beforeActors",
216
+ "value": {
217
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_beforeActors"
218
+ }
219
+ }
220
+ ]
221
+ }
222
+ ]
223
+ },
224
+ {
225
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#IActorFunctionFactoryDedicatedArgs",
226
+ "@type": "AbstractClass",
227
+ "requireElement": "IActorFunctionFactoryDedicatedArgs",
228
+ "parameters": [],
229
+ "memberFields": [
230
+ {
231
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#IActorFunctionFactoryDedicatedArgs__member_functionNames",
232
+ "memberFieldName": "functionNames"
233
+ },
234
+ {
235
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#IActorFunctionFactoryDedicatedArgs__member_termFunction",
236
+ "memberFieldName": "termFunction"
237
+ }
238
+ ],
239
+ "constructorArguments": []
240
+ }
241
+ ]
242
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "@context": [
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-function-factory/^3.0.0/components/context.jsonld",
4
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^3.0.0/components/context.jsonld"
5
+ ],
6
+ "@id": "npmd:@comunica/bus-function-factory",
7
+ "components": [
8
+ {
9
+ "@id": "cbff:components/BusFunctionFactory.jsonld#BusFunctionFactory",
10
+ "@type": "Class",
11
+ "requireElement": "BusFunctionFactory",
12
+ "extends": [
13
+ {
14
+ "@type": "GenericComponentExtension",
15
+ "component": "cc:components/BusIndexed.jsonld#BusIndexed",
16
+ "genericTypeInstances": [
17
+ "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory",
18
+ "cbff:components/ActorFunctionFactory.jsonld#IActionFunctionFactory",
19
+ "cc:components/Actor.jsonld#IActorTest",
20
+ "cbff:components/ActorFunctionFactory.jsonld#IActorFunctionFactoryOutput"
21
+ ]
22
+ }
23
+ ],
24
+ "comment": "Bus inspired by BusIndexed but specific for function factory. The implementation differs. In BusIndexed, each actor is indexed only once. Here, a single actor can be indexed multiple times (max 2).",
25
+ "parameters": [
26
+ {
27
+ "@id": "cbff:components/BusFunctionFactory.jsonld#BusFunctionFactory_args_name",
28
+ "range": "xsd:string",
29
+ "default": {
30
+ "@id": "rdf:subject"
31
+ },
32
+ "comment": "The name for this bus."
33
+ }
34
+ ],
35
+ "memberFields": [
36
+ {
37
+ "@id": "cbff:components/BusFunctionFactory.jsonld#BusFunctionFactory__member_constructor",
38
+ "memberFieldName": "constructor"
39
+ }
40
+ ],
41
+ "constructorArguments": [
42
+ {
43
+ "@id": "cbff:components/BusFunctionFactory.jsonld#BusFunctionFactory_args__constructorArgument",
44
+ "fields": [
45
+ {
46
+ "keyRaw": "name",
47
+ "value": {
48
+ "@id": "cbff:components/BusFunctionFactory.jsonld#BusFunctionFactory_args_name"
49
+ }
50
+ }
51
+ ]
52
+ }
53
+ ]
54
+ }
55
+ ]
56
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "@context": [
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-function-factory/^3.0.0/components/context.jsonld"
4
+ ],
5
+ "@id": "npmd:@comunica/bus-function-factory",
6
+ "@type": "Module",
7
+ "requireName": "@comunica/bus-function-factory",
8
+ "import": [
9
+ "cbff:components/ActorFunctionFactory.jsonld",
10
+ "cbff:components/ActorFunctionFactoryDedicated.jsonld",
11
+ "cbff:components/BusFunctionFactory.jsonld"
12
+ ]
13
+ }
@@ -0,0 +1,142 @@
1
+ {
2
+ "@context": [
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^6.0.0/components/context.jsonld",
4
+ {
5
+ "npmd": "https://linkedsoftwaredependencies.org/bundles/npm/",
6
+ "cbff": "npmd:@comunica/bus-function-factory/^3.0.0/",
7
+ "ActorFunctionFactory": {
8
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory",
9
+ "@prefix": true,
10
+ "@context": {
11
+ "args_name": {
12
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory_args_name"
13
+ },
14
+ "args_bus": {
15
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory_args_bus"
16
+ },
17
+ "args_busFailMessage": {
18
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory_args_busFailMessage"
19
+ },
20
+ "args_beforeActors": {
21
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory_args_beforeActors",
22
+ "@container": "@list"
23
+ },
24
+ "name": {
25
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory_args_name"
26
+ },
27
+ "bus": {
28
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory_args_bus"
29
+ },
30
+ "busFailMessage": {
31
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory_args_busFailMessage"
32
+ },
33
+ "beforeActors": {
34
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ActorFunctionFactory_args_beforeActors",
35
+ "@container": "@list"
36
+ }
37
+ }
38
+ },
39
+ "MediatorFunctionFactory": {
40
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#MediatorFunctionFactory",
41
+ "@prefix": true,
42
+ "@context": {
43
+ "args_name": {
44
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#MediatorFunctionFactory_args_name"
45
+ },
46
+ "args_bus": {
47
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#MediatorFunctionFactory_args_bus"
48
+ },
49
+ "name": {
50
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#MediatorFunctionFactory_args_name"
51
+ },
52
+ "bus": {
53
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#MediatorFunctionFactory_args_bus"
54
+ }
55
+ }
56
+ },
57
+ "IExpressionFunction": {
58
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#IExpressionFunction",
59
+ "@prefix": true,
60
+ "@context": {}
61
+ },
62
+ "ITermFunction": {
63
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#ITermFunction",
64
+ "@prefix": true,
65
+ "@context": {}
66
+ },
67
+ "IActionFunctionFactory": {
68
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#IActionFunctionFactory",
69
+ "@prefix": true,
70
+ "@context": {}
71
+ },
72
+ "IActorFunctionFactoryOutput": {
73
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#IActorFunctionFactoryOutput",
74
+ "@prefix": true,
75
+ "@context": {}
76
+ },
77
+ "IActorFunctionFactoryOutputTerm": {
78
+ "@id": "cbff:components/ActorFunctionFactory.jsonld#IActorFunctionFactoryOutputTerm",
79
+ "@prefix": true,
80
+ "@context": {}
81
+ },
82
+ "ActorFunctionFactoryDedicated": {
83
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated",
84
+ "@prefix": true,
85
+ "@context": {
86
+ "args_functionNames": {
87
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_functionNames"
88
+ },
89
+ "args_termFunction": {
90
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_termFunction"
91
+ },
92
+ "args_name": {
93
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_name"
94
+ },
95
+ "args_bus": {
96
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_bus"
97
+ },
98
+ "args_busFailMessage": {
99
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_busFailMessage"
100
+ },
101
+ "args_beforeActors": {
102
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_beforeActors",
103
+ "@container": "@list"
104
+ },
105
+ "functionNames": {
106
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_functionNames"
107
+ },
108
+ "termFunction": {
109
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_termFunction"
110
+ },
111
+ "name": {
112
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_name"
113
+ },
114
+ "bus": {
115
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_bus"
116
+ },
117
+ "busFailMessage": {
118
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_busFailMessage"
119
+ },
120
+ "beforeActors": {
121
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#ActorFunctionFactoryDedicated_args_beforeActors",
122
+ "@container": "@list"
123
+ }
124
+ }
125
+ },
126
+ "IActorFunctionFactoryDedicatedArgs": {
127
+ "@id": "cbff:components/ActorFunctionFactoryDedicated.jsonld#IActorFunctionFactoryDedicatedArgs",
128
+ "@prefix": true,
129
+ "@context": {}
130
+ },
131
+ "BusFunctionFactory": {
132
+ "@id": "cbff:components/BusFunctionFactory.jsonld#BusFunctionFactory",
133
+ "@prefix": true,
134
+ "@context": {
135
+ "args_name": {
136
+ "@id": "cbff:components/BusFunctionFactory.jsonld#BusFunctionFactory_args_name"
137
+ }
138
+ }
139
+ }
140
+ }
141
+ ]
142
+ }
@@ -0,0 +1,62 @@
1
+ import type { IAction, IActorArgs, IActorOutput, IActorTest, Mediate } from '@comunica/core';
2
+ import { Actor, Mediator } from '@comunica/core';
3
+ import type { Expression, IEvalContext, IInternalEvaluator, TermExpression } from '@comunica/types';
4
+ import type { Algebra as Alg } from 'sparqlalgebrajs';
5
+ /**
6
+ * A comunica actor for function factory events.
7
+ *
8
+ * Actor types:
9
+ * * Input: IActionFunctions: A request to receive a function implementation for a given function name
10
+ * and potentially the function arguments.
11
+ * * Test: <none>
12
+ * * Output: IActorFunctionsOutput: A function implementation.
13
+ *
14
+ * @see IActionFunctionFactory
15
+ * @see IActorFunctionFactoryOutput
16
+ */
17
+ export declare abstract class ActorFunctionFactory<TS = undefined> extends Actor<IActionFunctionFactory, IActorTest, IActorFunctionFactoryOutput, TS> {
18
+ /**
19
+ * @param args - @defaultNested {<default_bus> a <cbff:components/BusFunctionFactory.jsonld#BusFunctionFactory>} bus
20
+ */
21
+ constructor(args: IActorFunctionFactoryArgs<TS>);
22
+ abstract run<T extends IActionFunctionFactory>(action: T): Promise<T extends {
23
+ requireTermExpression: true;
24
+ } ? IActorFunctionFactoryOutputTerm : IActorFunctionFactoryOutput>;
25
+ }
26
+ export interface IExpressionFunction {
27
+ apply: (evalContext: IEvalContext) => Promise<TermExpression>;
28
+ /**
29
+ * The arity of the function will be checked when parsing and preparing a function.
30
+ * This allows us to check if the query is correct even before we process any bindings.
31
+ */
32
+ checkArity: (args: Expression[]) => boolean;
33
+ }
34
+ export interface ITermFunction extends IExpressionFunction {
35
+ supportsTermExpressions: true;
36
+ applyOnTerms: (args: TermExpression[], exprEval: IInternalEvaluator) => TermExpression;
37
+ }
38
+ export interface IActionFunctionFactory extends IAction {
39
+ /**
40
+ * The name of the function to retrieve. Can be any string, a function name, or a URL.
41
+ */
42
+ functionName: string;
43
+ /**
44
+ * The arguments of the function, if they are known, and don't change.
45
+ */
46
+ arguments?: Alg.Expression[];
47
+ /**
48
+ * Whether the function should return a term expression.
49
+ */
50
+ requireTermExpression?: boolean;
51
+ }
52
+ export interface IActorFunctionFactoryOutput extends IActorOutput, IExpressionFunction {
53
+ }
54
+ export interface IActorFunctionFactoryOutputTerm extends IActorOutput, ITermFunction {
55
+ }
56
+ export type IActorFunctionFactoryArgs<TS = undefined> = IActorArgs<IActionFunctionFactory, IActorTest, IActorFunctionFactoryOutput, TS>;
57
+ export type MediatorFunctionFactoryUnsafe = Mediate<IActionFunctionFactory, IActorFunctionFactoryOutput>;
58
+ export declare abstract class MediatorFunctionFactory extends Mediator<Actor<IActionFunctionFactory, IActorTest, IActorFunctionFactoryOutput>, IActionFunctionFactory, IActorTest, IActorFunctionFactoryOutput> {
59
+ abstract mediate: <T extends IActionFunctionFactory>(action: T) => Promise<T extends {
60
+ requireTermExpression: true;
61
+ } ? IActorFunctionFactoryOutputTerm : IActorFunctionFactoryOutput>;
62
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MediatorFunctionFactory = exports.ActorFunctionFactory = void 0;
4
+ const core_1 = require("@comunica/core");
5
+ /**
6
+ * A comunica actor for function factory events.
7
+ *
8
+ * Actor types:
9
+ * * Input: IActionFunctions: A request to receive a function implementation for a given function name
10
+ * and potentially the function arguments.
11
+ * * Test: <none>
12
+ * * Output: IActorFunctionsOutput: A function implementation.
13
+ *
14
+ * @see IActionFunctionFactory
15
+ * @see IActorFunctionFactoryOutput
16
+ */
17
+ class ActorFunctionFactory extends core_1.Actor {
18
+ /**
19
+ * @param args - @defaultNested {<default_bus> a <cbff:components/BusFunctionFactory.jsonld#BusFunctionFactory>} bus
20
+ */
21
+ constructor(args) {
22
+ super(args);
23
+ }
24
+ }
25
+ exports.ActorFunctionFactory = ActorFunctionFactory;
26
+ class MediatorFunctionFactory extends core_1.Mediator {
27
+ }
28
+ exports.MediatorFunctionFactory = MediatorFunctionFactory;
29
+ //# sourceMappingURL=ActorFunctionFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActorFunctionFactory.js","sourceRoot":"","sources":["ActorFunctionFactory.ts"],"names":[],"mappings":";;;AACA,yCAAiD;AAIjD;;;;;;;;;;;GAWG;AACH,MAAsB,oBAAqC,SACzD,YAA0E;IAC1E;;OAEG;IACH,YAAmB,IAAmC;QACpD,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;CAIF;AAXD,oDAWC;AA2CD,MAAsB,uBAAwB,SAAQ,eAKrD;CAGA;AARD,0DAQC","sourcesContent":["import type { IAction, IActorArgs, IActorOutput, IActorTest, Mediate } from '@comunica/core';\nimport { Actor, Mediator } from '@comunica/core';\nimport type { Expression, IEvalContext, IInternalEvaluator, TermExpression } from '@comunica/types';\nimport type { Algebra as Alg } from 'sparqlalgebrajs';\n\n/**\n * A comunica actor for function factory events.\n *\n * Actor types:\n * * Input: IActionFunctions: A request to receive a function implementation for a given function name\n * and potentially the function arguments.\n * * Test: <none>\n * * Output: IActorFunctionsOutput: A function implementation.\n *\n * @see IActionFunctionFactory\n * @see IActorFunctionFactoryOutput\n */\nexport abstract class ActorFunctionFactory<TS = undefined> extends\n Actor<IActionFunctionFactory, IActorTest, IActorFunctionFactoryOutput, TS> {\n /**\n * @param args - @defaultNested {<default_bus> a <cbff:components/BusFunctionFactory.jsonld#BusFunctionFactory>} bus\n */\n public constructor(args: IActorFunctionFactoryArgs<TS>) {\n super(args);\n }\n\n public abstract override run<T extends IActionFunctionFactory>(action: T):\n Promise<T extends { requireTermExpression: true } ? IActorFunctionFactoryOutputTerm : IActorFunctionFactoryOutput>;\n}\n\nexport interface IExpressionFunction {\n apply: (evalContext: IEvalContext) => Promise<TermExpression>;\n /**\n * The arity of the function will be checked when parsing and preparing a function.\n * This allows us to check if the query is correct even before we process any bindings.\n */\n checkArity: (args: Expression[]) => boolean;\n}\n\nexport interface ITermFunction extends IExpressionFunction {\n supportsTermExpressions: true;\n applyOnTerms: (args: TermExpression[], exprEval: IInternalEvaluator) => TermExpression;\n}\nexport interface IActionFunctionFactory extends IAction {\n /**\n * The name of the function to retrieve. Can be any string, a function name, or a URL.\n */\n functionName: string;\n /**\n * The arguments of the function, if they are known, and don't change.\n */\n arguments?: Alg.Expression[];\n /**\n * Whether the function should return a term expression.\n */\n requireTermExpression?: boolean;\n}\n\nexport interface IActorFunctionFactoryOutput extends IActorOutput, IExpressionFunction {}\n\nexport interface IActorFunctionFactoryOutputTerm extends IActorOutput, ITermFunction {}\n\nexport type IActorFunctionFactoryArgs<TS = undefined> = IActorArgs<\nIActionFunctionFactory,\nIActorTest,\nIActorFunctionFactoryOutput,\nTS\n>;\n\nexport type MediatorFunctionFactoryUnsafe = Mediate<IActionFunctionFactory, IActorFunctionFactoryOutput>;\n\nexport abstract class MediatorFunctionFactory extends Mediator<\nActor<IActionFunctionFactory, IActorTest, IActorFunctionFactoryOutput>,\nIActionFunctionFactory,\nIActorTest,\nIActorFunctionFactoryOutput\n> {\n public abstract override mediate: <T extends IActionFunctionFactory>(action: T) =>\n Promise<T extends { requireTermExpression: true } ? IActorFunctionFactoryOutputTerm : IActorFunctionFactoryOutput>;\n}\n"]}
@@ -0,0 +1,18 @@
1
+ import type { IActorTest, TestResult } from '@comunica/core';
2
+ import type { IActionFunctionFactory, IActorFunctionFactoryArgs } from './ActorFunctionFactory';
3
+ import { ActorFunctionFactory } from './ActorFunctionFactory';
4
+ type StringArray = [string, ...string[]];
5
+ /**
6
+ * A base implementation for function factory actors for a dedicated operator.
7
+ */
8
+ export declare abstract class ActorFunctionFactoryDedicated extends ActorFunctionFactory {
9
+ readonly functionNames: StringArray;
10
+ readonly termFunction: boolean;
11
+ protected constructor(args: IActorFunctionFactoryDedicatedArgs);
12
+ test(action: IActionFunctionFactory): Promise<TestResult<IActorTest>>;
13
+ }
14
+ export interface IActorFunctionFactoryDedicatedArgs extends IActorFunctionFactoryArgs {
15
+ functionNames: StringArray;
16
+ termFunction: boolean;
17
+ }
18
+ export {};
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActorFunctionFactoryDedicated = void 0;
4
+ const core_1 = require("@comunica/core");
5
+ const ActorFunctionFactory_1 = require("./ActorFunctionFactory");
6
+ /**
7
+ * A base implementation for function factory actors for a dedicated operator.
8
+ */
9
+ class ActorFunctionFactoryDedicated extends ActorFunctionFactory_1.ActorFunctionFactory {
10
+ constructor(args) {
11
+ super(args);
12
+ }
13
+ async test(action) {
14
+ // Name must match, if this is a term function, all is fine, if not, look whether term-function is not requested.
15
+ if (this.functionNames.includes(action.functionName) && (this.termFunction || !action.requireTermExpression)) {
16
+ return (0, core_1.passTestVoid)();
17
+ }
18
+ return (0, core_1.failTest)(`Actor ${this.name} can not provide implementation for "${action.functionName}", only for ${this.termFunction ? '' : 'non-termExpression '}${this.functionNames.join(' and ')}.`);
19
+ }
20
+ }
21
+ exports.ActorFunctionFactoryDedicated = ActorFunctionFactoryDedicated;
22
+ //# sourceMappingURL=ActorFunctionFactoryDedicated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActorFunctionFactoryDedicated.js","sourceRoot":"","sources":["ActorFunctionFactoryDedicated.ts"],"names":[],"mappings":";;;AACA,yCAAwD;AAExD,iEAA8D;AAI9D;;GAEG;AACH,MAAsB,6BAA8B,SAAQ,2CAAoB;IAI9E,YAAsB,IAAwC;QAC5D,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,MAA8B;QAC9C,iHAAiH;QACjH,IAAI,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,EAAE,CAAC;YAC7G,OAAO,IAAA,mBAAY,GAAE,CAAC;QACxB,CAAC;QACD,OAAO,IAAA,eAAQ,EAAC,SAAS,IAAI,CAAC,IAAI,wCAAwC,MAAM,CAAC,YAAY,eAAe,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,qBAAqB,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACpM,CAAC;CACF;AAfD,sEAeC","sourcesContent":["import type { IActorTest, TestResult } from '@comunica/core';\nimport { failTest, passTestVoid } from '@comunica/core';\nimport type { IActionFunctionFactory, IActorFunctionFactoryArgs } from './ActorFunctionFactory';\nimport { ActorFunctionFactory } from './ActorFunctionFactory';\n\ntype StringArray = [ string, ...string[]];\n\n/**\n * A base implementation for function factory actors for a dedicated operator.\n */\nexport abstract class ActorFunctionFactoryDedicated extends ActorFunctionFactory {\n public readonly functionNames: StringArray;\n public readonly termFunction: boolean;\n\n protected constructor(args: IActorFunctionFactoryDedicatedArgs) {\n super(args);\n }\n\n public async test(action: IActionFunctionFactory): Promise<TestResult<IActorTest>> {\n // Name must match, if this is a term function, all is fine, if not, look whether term-function is not requested.\n if (this.functionNames.includes(action.functionName) && (this.termFunction || !action.requireTermExpression)) {\n return passTestVoid();\n }\n return failTest(`Actor ${this.name} can not provide implementation for \"${action.functionName}\", only for ${this.termFunction ? '' : 'non-termExpression '}${this.functionNames.join(' and ')}.`);\n }\n}\n\nexport interface IActorFunctionFactoryDedicatedArgs extends IActorFunctionFactoryArgs {\n functionNames: StringArray;\n termFunction: boolean;\n}\n"]}
@@ -0,0 +1,12 @@
1
+ import type { IActorTest, IBusArgs } from '@comunica/core';
2
+ import { BusIndexed } from '@comunica/core';
3
+ import type { ActorFunctionFactory, IActionFunctionFactory, IActorFunctionFactoryOutput } from './ActorFunctionFactory';
4
+ /**
5
+ * Bus inspired by BusIndexed but specific for function factory.
6
+ *
7
+ * The implementation differs. In BusIndexed, each actor is indexed only once.
8
+ * Here, a single actor can be indexed multiple times (max 2).
9
+ */
10
+ export declare class BusFunctionFactory extends BusIndexed<ActorFunctionFactory, IActionFunctionFactory, IActorTest, IActorFunctionFactoryOutput> {
11
+ constructor(args: IBusArgs);
12
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BusFunctionFactory = void 0;
4
+ const core_1 = require("@comunica/core");
5
+ /**
6
+ * Bus inspired by BusIndexed but specific for function factory.
7
+ *
8
+ * The implementation differs. In BusIndexed, each actor is indexed only once.
9
+ * Here, a single actor can be indexed multiple times (max 2).
10
+ */
11
+ class BusFunctionFactory extends core_1.BusIndexed {
12
+ constructor(args) {
13
+ super({
14
+ ...args,
15
+ actorIdentifierFields: ['functionNames'],
16
+ actionIdentifierFields: ['functionName'],
17
+ });
18
+ }
19
+ }
20
+ exports.BusFunctionFactory = BusFunctionFactory;
21
+ //# sourceMappingURL=BusFunctionFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BusFunctionFactory.js","sourceRoot":"","sources":["BusFunctionFactory.ts"],"names":[],"mappings":";;;AACA,yCAA4C;AAG5C;;;;;GAKG;AACH,MAAa,kBACX,SAAQ,iBAAiG;IACzG,YAAmB,IAAc;QAC/B,KAAK,CAAC;YACJ,GAAG,IAAI;YACP,qBAAqB,EAAE,CAAE,eAAe,CAAE;YAC1C,sBAAsB,EAAE,CAAE,cAAc,CAAE;SAC3C,CAAC,CAAC;IACL,CAAC;CACF;AATD,gDASC","sourcesContent":["import type { IActorTest, IBusArgs } from '@comunica/core';\nimport { BusIndexed } from '@comunica/core';\nimport type { ActorFunctionFactory, IActionFunctionFactory, IActorFunctionFactoryOutput } from './ActorFunctionFactory';\n\n/**\n * Bus inspired by BusIndexed but specific for function factory.\n *\n * The implementation differs. In BusIndexed, each actor is indexed only once.\n * Here, a single actor can be indexed multiple times (max 2).\n */\nexport class BusFunctionFactory\n extends BusIndexed<ActorFunctionFactory, IActionFunctionFactory, IActorTest, IActorFunctionFactoryOutput> {\n public constructor(args: IBusArgs) {\n super({\n ...args,\n actorIdentifierFields: [ 'functionNames' ],\n actionIdentifierFields: [ 'functionName' ],\n });\n }\n}\n"]}
@@ -0,0 +1,46 @@
1
+ import type { Expression, IEvalContext, IInternalEvaluator, TermExpression } from '@comunica/types';
2
+ import type { GeneralOperator, OverloadTree } from '@comunica/utils-expression-evaluator';
3
+ import type { IExpressionFunction, ITermFunction } from '../ActorFunctionFactory';
4
+ interface BaseFunctionDefinitionArgs {
5
+ arity: number | number[];
6
+ operator: GeneralOperator;
7
+ apply: (evalContext: IEvalContext) => Promise<TermExpression>;
8
+ }
9
+ export declare class ExpressionFunctionBase implements IExpressionFunction {
10
+ protected readonly arity: number | number[];
11
+ readonly operator: GeneralOperator;
12
+ readonly apply: (evalContext: IEvalContext) => Promise<TermExpression>;
13
+ constructor({ arity, operator, apply }: BaseFunctionDefinitionArgs);
14
+ checkArity(args: Expression[]): boolean;
15
+ }
16
+ interface TermSparqlFunctionArgs {
17
+ arity: number | number[];
18
+ operator: GeneralOperator;
19
+ overloads: OverloadTree;
20
+ }
21
+ /**
22
+ * Varying kinds of functions take arguments of different types on which the
23
+ * specific behaviour is dependant. Although their behaviour is often varying,
24
+ * it is always relatively simple, and better suited for synced behaviour.
25
+ * The types of their arguments are always terms, but might differ in
26
+ * their term-type (eg: iri, literal),
27
+ * their specific literal type (eg: string, integer),
28
+ * their arity (see BNODE),
29
+ * or even their specific numeric type (eg: integer, float).
30
+ *
31
+ * Examples include:
32
+ * - Arithmetic operations such as: *, -, /, +
33
+ * - Bool operators such as: =, !=, <=, <, ...
34
+ * - Functions such as: str, IRI
35
+ *
36
+ * See also: https://www.w3.org/TR/definitionTypesparql11-query/#func-rdfTerms
37
+ * and https://www.w3.org/TR/sparql11-query/#OperatorMapping
38
+ */
39
+ export declare class TermFunctionBase extends ExpressionFunctionBase implements ITermFunction {
40
+ readonly supportsTermExpressions = true;
41
+ protected readonly overloads: OverloadTree;
42
+ constructor({ arity, operator, overloads }: TermSparqlFunctionArgs);
43
+ applyOnTerms(args: TermExpression[], exprEval: IInternalEvaluator): TermExpression;
44
+ protected handleInvalidTypes(args: TermExpression[]): never;
45
+ }
46
+ export {};
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TermFunctionBase = exports.ExpressionFunctionBase = void 0;
4
+ const context_entries_1 = require("@comunica/context-entries");
5
+ const utils_expression_evaluator_1 = require("@comunica/utils-expression-evaluator");
6
+ class ExpressionFunctionBase {
7
+ constructor({ arity, operator, apply }) {
8
+ this.arity = arity;
9
+ this.operator = operator;
10
+ this.apply = apply;
11
+ }
12
+ checkArity(args) {
13
+ if (Array.isArray(this.arity)) {
14
+ return this.arity.includes(args.length);
15
+ }
16
+ if (this.arity === Number.POSITIVE_INFINITY) {
17
+ // Infinity is used to represent var-args, so it's always correct.
18
+ return true;
19
+ }
20
+ return args.length === this.arity;
21
+ }
22
+ }
23
+ exports.ExpressionFunctionBase = ExpressionFunctionBase;
24
+ /**
25
+ * Varying kinds of functions take arguments of different types on which the
26
+ * specific behaviour is dependant. Although their behaviour is often varying,
27
+ * it is always relatively simple, and better suited for synced behaviour.
28
+ * The types of their arguments are always terms, but might differ in
29
+ * their term-type (eg: iri, literal),
30
+ * their specific literal type (eg: string, integer),
31
+ * their arity (see BNODE),
32
+ * or even their specific numeric type (eg: integer, float).
33
+ *
34
+ * Examples include:
35
+ * - Arithmetic operations such as: *, -, /, +
36
+ * - Bool operators such as: =, !=, <=, <, ...
37
+ * - Functions such as: str, IRI
38
+ *
39
+ * See also: https://www.w3.org/TR/definitionTypesparql11-query/#func-rdfTerms
40
+ * and https://www.w3.org/TR/sparql11-query/#OperatorMapping
41
+ */
42
+ class TermFunctionBase extends ExpressionFunctionBase {
43
+ constructor({ arity, operator, overloads }) {
44
+ super({
45
+ arity,
46
+ operator,
47
+ apply: async ({ args, exprEval, mapping }) => this.applyOnTerms(await Promise.all(args.map(arg => exprEval.evaluatorExpressionEvaluation(arg, mapping))), exprEval),
48
+ });
49
+ this.supportsTermExpressions = true;
50
+ this.overloads = overloads;
51
+ }
52
+ applyOnTerms(args, exprEval) {
53
+ const concreteFunction = this.overloads.search(args, exprEval.context.getSafe(context_entries_1.KeysExpressionEvaluator.superTypeProvider), exprEval.context.getSafe(context_entries_1.KeysInitQuery.functionArgumentsCache)) ?? this.handleInvalidTypes(args);
54
+ return concreteFunction(exprEval)(args);
55
+ }
56
+ handleInvalidTypes(args) {
57
+ throw new utils_expression_evaluator_1.InvalidArgumentTypes(args, this.operator);
58
+ }
59
+ }
60
+ exports.TermFunctionBase = TermFunctionBase;
61
+ //# sourceMappingURL=Core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Core.js","sourceRoot":"","sources":["Core.ts"],"names":[],"mappings":";;;AAAA,+DAAmF;AAMnF,qFAC8C;AAa9C,MAAa,sBAAsB;IAKjC,YAAmB,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAA8B;QACvE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAEM,UAAU,CAAC,IAAkB;QAClC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YAC9B,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC1C,CAAC;QACD,IAAI,IAAI,CAAC,KAAK,KAAK,MAAM,CAAC,iBAAiB,EAAE,CAAC;YAC5C,kEAAkE;YAClE,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,KAAK,CAAC;IACpC,CAAC;CACF;AAtBD,wDAsBC;AAQD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAa,gBAAiB,SAAQ,sBAAsB;IAI1D,YAAmB,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAA0B;QACvE,KAAK,CAAC;YACJ,KAAK;YACL,QAAQ;YACR,KAAK,EAAE,KAAK,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAgB,EAA2B,EAAE,CAAC,IAAI,CAAC,YAAY,CACnG,MAAM,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,EACxF,QAAQ,CACT;SACF,CAAC,CAAC;QAXW,4BAAuB,GAAG,IAAI,CAAC;QAa7C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAEM,YAAY,CAAC,IAAsB,EAAE,QAA4B;QACtE,MAAM,gBAAgB,GACpB,IAAI,CAAC,SAAS,CAAC,MAAM,CACnB,IAAI,EACJ,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,yCAAuB,CAAC,iBAAiB,CAAC,EACnE,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,+BAAa,CAAC,sBAAsB,CAAC,CAC/D,IAAI,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACrC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;IAES,kBAAkB,CAAC,IAAsB;QACjD,MAAM,IAAI,iDAAoB,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtD,CAAC;CACF;AA9BD,4CA8BC","sourcesContent":["import { KeysExpressionEvaluator, KeysInitQuery } from '@comunica/context-entries';\nimport type { Expression, IEvalContext, IInternalEvaluator, TermExpression } from '@comunica/types';\nimport type {\n GeneralOperator,\n OverloadTree,\n} from '@comunica/utils-expression-evaluator';\nimport { InvalidArgumentTypes,\n} from '@comunica/utils-expression-evaluator';\nimport type { IExpressionFunction, ITermFunction } from '../ActorFunctionFactory';\n\n// ----------------------------------------------------------------------------\n// Overloaded Functions\n// ----------------------------------------------------------------------------\n\ninterface BaseFunctionDefinitionArgs {\n arity: number | number[];\n operator: GeneralOperator;\n apply: (evalContext: IEvalContext) => Promise<TermExpression>;\n}\n\nexport class ExpressionFunctionBase implements IExpressionFunction {\n protected readonly arity: number | number[];\n public readonly operator: GeneralOperator;\n public readonly apply: (evalContext: IEvalContext) => Promise<TermExpression>;\n\n public constructor({ arity, operator, apply }: BaseFunctionDefinitionArgs) {\n this.arity = arity;\n this.operator = operator;\n this.apply = apply;\n }\n\n public checkArity(args: Expression[]): boolean {\n if (Array.isArray(this.arity)) {\n return this.arity.includes(args.length);\n }\n if (this.arity === Number.POSITIVE_INFINITY) {\n // Infinity is used to represent var-args, so it's always correct.\n return true;\n }\n\n return args.length === this.arity;\n }\n}\n\ninterface TermSparqlFunctionArgs {\n arity: number | number[];\n operator: GeneralOperator;\n overloads: OverloadTree;\n}\n\n/**\n * Varying kinds of functions take arguments of different types on which the\n * specific behaviour is dependant. Although their behaviour is often varying,\n * it is always relatively simple, and better suited for synced behaviour.\n * The types of their arguments are always terms, but might differ in\n * their term-type (eg: iri, literal),\n * their specific literal type (eg: string, integer),\n * their arity (see BNODE),\n * or even their specific numeric type (eg: integer, float).\n *\n * Examples include:\n * - Arithmetic operations such as: *, -, /, +\n * - Bool operators such as: =, !=, <=, <, ...\n * - Functions such as: str, IRI\n *\n * See also: https://www.w3.org/TR/definitionTypesparql11-query/#func-rdfTerms\n * and https://www.w3.org/TR/sparql11-query/#OperatorMapping\n */\nexport class TermFunctionBase extends ExpressionFunctionBase implements ITermFunction {\n public readonly supportsTermExpressions = true;\n protected readonly overloads: OverloadTree;\n\n public constructor({ arity, operator, overloads }: TermSparqlFunctionArgs) {\n super({\n arity,\n operator,\n apply: async({ args, exprEval, mapping }: IEvalContext): Promise<TermExpression> => this.applyOnTerms(\n await Promise.all(args.map(arg => exprEval.evaluatorExpressionEvaluation(arg, mapping))),\n exprEval,\n ),\n });\n\n this.overloads = overloads;\n }\n\n public applyOnTerms(args: TermExpression[], exprEval: IInternalEvaluator): TermExpression {\n const concreteFunction =\n this.overloads.search(\n args,\n exprEval.context.getSafe(KeysExpressionEvaluator.superTypeProvider),\n exprEval.context.getSafe(KeysInitQuery.functionArgumentsCache),\n ) ?? this.handleInvalidTypes(args);\n return concreteFunction(exprEval)(args);\n }\n\n protected handleInvalidTypes(args: TermExpression[]): never {\n throw new InvalidArgumentTypes(args, this.operator);\n }\n}\n"]}
package/lib/index.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export * from './ActorFunctionFactory';
2
+ export * from './ActorFunctionFactoryDedicated';
3
+ export * from './BusFunctionFactory';
4
+ export * from './implementation/Core';
package/lib/index.js ADDED
@@ -0,0 +1,21 @@
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("./ActorFunctionFactory"), exports);
18
+ __exportStar(require("./ActorFunctionFactoryDedicated"), exports);
19
+ __exportStar(require("./BusFunctionFactory"), exports);
20
+ __exportStar(require("./implementation/Core"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,kEAAgD;AAChD,uDAAqC;AACrC,wDAAsC","sourcesContent":["export * from './ActorFunctionFactory';\nexport * from './ActorFunctionFactoryDedicated';\nexport * from './BusFunctionFactory';\nexport * from './implementation/Core';\n"]}
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@comunica/bus-function-factory",
3
+ "version": "3.2.4-alpha.47.0",
4
+ "description": "A comunica bus for function factory events.",
5
+ "lsd:module": true,
6
+ "license": "MIT",
7
+ "homepage": "https://comunica.dev/",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/comunica/comunica.git",
11
+ "directory": "packages/bus-functions"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/comunica/comunica/issues"
15
+ },
16
+ "keywords": [
17
+ "comunica",
18
+ "bus",
19
+ "functions"
20
+ ],
21
+ "sideEffects": false,
22
+ "main": "lib/index.js",
23
+ "typings": "lib/index",
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "files": [
28
+ "components",
29
+ "lib/**/*.d.ts",
30
+ "lib/**/*.js",
31
+ "lib/**/*.js.map"
32
+ ],
33
+ "scripts": {
34
+ "build": "npm run build:ts && npm run build:components",
35
+ "build:ts": "node \"../../node_modules/typescript/bin/tsc\"",
36
+ "build:components": "componentsjs-generator"
37
+ },
38
+ "dependencies": {
39
+ "@comunica/context-entries": "3.2.4-alpha.47.0",
40
+ "@comunica/core": "3.2.4-alpha.47.0",
41
+ "@comunica/types": "3.2.4-alpha.47.0",
42
+ "@comunica/utils-expression-evaluator": "3.2.4-alpha.47.0",
43
+ "sparqlalgebrajs": "^4.2.0"
44
+ },
45
+ "gitHead": "85bd4c5cf07dfc293ebbc3a1416b70e2db8bfc48"
46
+ }