@comunica/actor-rdf-join-inner-multi-empty 3.3.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,7 +23,7 @@ After installing, this package can be added to your engine's configuration as fo
23
23
  {
24
24
  "@context": [
25
25
  ...
26
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-inner-multi-empty/^3.0.0/components/context.jsonld"
26
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-inner-multi-empty/^4.0.0/components/context.jsonld"
27
27
  ],
28
28
  "actors": [
29
29
  ...
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-inner-multi-empty/^3.0.0/components/context.jsonld",
4
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^3.0.0/components/context.jsonld",
5
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join/^3.0.0/components/context.jsonld"
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-inner-multi-empty/^4.0.0/components/context.jsonld",
4
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^4.0.0/components/context.jsonld",
5
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join/^4.0.0/components/context.jsonld"
6
6
  ],
7
7
  "@id": "npmd:@comunica/actor-rdf-join-inner-multi-empty",
8
8
  "components": [
@@ -39,29 +39,37 @@
39
39
  "genericTypeInstances": [
40
40
  {
41
41
  "@type": "ParameterRangeGenericTypeReference",
42
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
42
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
43
43
  },
44
44
  {
45
45
  "@type": "ParameterRangeGenericTypeReference",
46
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
46
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
47
47
  },
48
48
  {
49
49
  "@type": "ParameterRangeGenericTypeReference",
50
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
50
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
51
+ },
52
+ {
53
+ "@type": "ParameterRangeGenericTypeReference",
54
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
51
55
  }
52
56
  ]
53
57
  },
54
58
  {
55
59
  "@type": "ParameterRangeGenericTypeReference",
56
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
60
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
61
+ },
62
+ {
63
+ "@type": "ParameterRangeGenericTypeReference",
64
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
57
65
  },
58
66
  {
59
67
  "@type": "ParameterRangeGenericTypeReference",
60
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
68
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
61
69
  },
62
70
  {
63
71
  "@type": "ParameterRangeGenericTypeReference",
64
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
72
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
65
73
  }
66
74
  ]
67
75
  },
@@ -71,6 +79,20 @@
71
79
  },
72
80
  "comment": "The bus this actor subscribes to."
73
81
  },
82
+ {
83
+ "@id": "carjime:components/ActorRdfJoinMultiEmpty.jsonld#ActorRdfJoinMultiEmpty_args_busFailMessage",
84
+ "range": {
85
+ "@type": "ParameterRangeUnion",
86
+ "parameterRangeElements": [
87
+ "xsd:string",
88
+ {
89
+ "@type": "ParameterRangeUndefined"
90
+ }
91
+ ]
92
+ },
93
+ "default": "RDF joining failed: none of the configured actors were able to handle the join type ${action.type}",
94
+ "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}\""
95
+ },
74
96
  {
75
97
  "@id": "carjime:components/ActorRdfJoinMultiEmpty.jsonld#ActorRdfJoinMultiEmpty_args_beforeActors",
76
98
  "range": {
@@ -84,15 +106,19 @@
84
106
  "genericTypeInstances": [
85
107
  {
86
108
  "@type": "ParameterRangeGenericTypeReference",
87
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
109
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
88
110
  },
89
111
  {
90
112
  "@type": "ParameterRangeGenericTypeReference",
91
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
113
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
92
114
  },
93
115
  {
94
116
  "@type": "ParameterRangeGenericTypeReference",
95
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
117
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
118
+ },
119
+ {
120
+ "@type": "ParameterRangeGenericTypeReference",
121
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
96
122
  }
97
123
  ]
98
124
  }
@@ -145,6 +171,12 @@
145
171
  "@id": "carjime:components/ActorRdfJoinMultiEmpty.jsonld#ActorRdfJoinMultiEmpty_args_bus"
146
172
  }
147
173
  },
174
+ {
175
+ "keyRaw": "busFailMessage",
176
+ "value": {
177
+ "@id": "carjime:components/ActorRdfJoinMultiEmpty.jsonld#ActorRdfJoinMultiEmpty_args_busFailMessage"
178
+ }
179
+ },
148
180
  {
149
181
  "keyRaw": "beforeActors",
150
182
  "value": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-inner-multi-empty/^3.0.0/components/context.jsonld"
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-inner-multi-empty/^4.0.0/components/context.jsonld"
4
4
  ],
5
5
  "@id": "npmd:@comunica/actor-rdf-join-inner-multi-empty",
6
6
  "@type": "Module",
@@ -3,7 +3,7 @@
3
3
  "https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^6.0.0/components/context.jsonld",
4
4
  {
5
5
  "npmd": "https://linkedsoftwaredependencies.org/bundles/npm/",
6
- "carjime": "npmd:@comunica/actor-rdf-join-inner-multi-empty/^3.0.0/",
6
+ "carjime": "npmd:@comunica/actor-rdf-join-inner-multi-empty/^4.0.0/",
7
7
  "ActorRdfJoinMultiEmpty": {
8
8
  "@id": "carjime:components/ActorRdfJoinMultiEmpty.jsonld#ActorRdfJoinMultiEmpty",
9
9
  "@prefix": true,
@@ -17,6 +17,9 @@
17
17
  "args_bus": {
18
18
  "@id": "carjime:components/ActorRdfJoinMultiEmpty.jsonld#ActorRdfJoinMultiEmpty_args_bus"
19
19
  },
20
+ "args_busFailMessage": {
21
+ "@id": "carjime:components/ActorRdfJoinMultiEmpty.jsonld#ActorRdfJoinMultiEmpty_args_busFailMessage"
22
+ },
20
23
  "args_beforeActors": {
21
24
  "@id": "carjime:components/ActorRdfJoinMultiEmpty.jsonld#ActorRdfJoinMultiEmpty_args_beforeActors",
22
25
  "@container": "@list"
@@ -30,6 +33,9 @@
30
33
  "bus": {
31
34
  "@id": "carjime:components/ActorRdfJoinMultiEmpty.jsonld#ActorRdfJoinMultiEmpty_args_bus"
32
35
  },
36
+ "busFailMessage": {
37
+ "@id": "carjime:components/ActorRdfJoinMultiEmpty.jsonld#ActorRdfJoinMultiEmpty_args_busFailMessage"
38
+ },
33
39
  "beforeActors": {
34
40
  "@id": "carjime:components/ActorRdfJoinMultiEmpty.jsonld#ActorRdfJoinMultiEmpty_args_beforeActors",
35
41
  "@container": "@list"
@@ -1,13 +1,13 @@
1
- import type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';
1
+ import type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs, IActorRdfJoinTestSideData } from '@comunica/bus-rdf-join';
2
2
  import { ActorRdfJoin } from '@comunica/bus-rdf-join';
3
+ import type { TestResult } from '@comunica/core';
3
4
  import type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';
4
- import type { MetadataBindings } from '@comunica/types';
5
5
  /**
6
6
  * A comunica Multi Empty RDF Join Actor.
7
7
  */
8
8
  export declare class ActorRdfJoinMultiEmpty extends ActorRdfJoin {
9
9
  constructor(args: IActorRdfJoinArgs);
10
- test(action: IActionRdfJoin): Promise<IMediatorTypeJoinCoefficients>;
10
+ test(action: IActionRdfJoin): Promise<TestResult<IMediatorTypeJoinCoefficients, IActorRdfJoinTestSideData>>;
11
11
  protected getOutput(action: IActionRdfJoin): Promise<IActorRdfJoinOutputInner>;
12
- protected getJoinCoefficients(_action: IActionRdfJoin, _metadatas: MetadataBindings[]): Promise<IMediatorTypeJoinCoefficients>;
12
+ protected getJoinCoefficients(action: IActionRdfJoin, sideData: IActorRdfJoinTestSideData): Promise<TestResult<IMediatorTypeJoinCoefficients, IActorRdfJoinTestSideData>>;
13
13
  }
@@ -2,7 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ActorRdfJoinMultiEmpty = void 0;
4
4
  const bus_rdf_join_1 = require("@comunica/bus-rdf-join");
5
- const metadata_1 = require("@comunica/metadata");
5
+ const context_entries_1 = require("@comunica/context-entries");
6
+ const core_1 = require("@comunica/core");
7
+ const utils_metadata_1 = require("@comunica/utils-metadata");
6
8
  const asynciterator_1 = require("asynciterator");
7
9
  /**
8
10
  * A comunica Multi Empty RDF Join Actor.
@@ -18,7 +20,7 @@ class ActorRdfJoinMultiEmpty extends bus_rdf_join_1.ActorRdfJoin {
18
20
  async test(action) {
19
21
  if ((await bus_rdf_join_1.ActorRdfJoin.getMetadatas(action.entries))
20
22
  .every(metadata => bus_rdf_join_1.ActorRdfJoin.getCardinality(metadata).value > 0)) {
21
- throw new Error(`Actor ${this.name} can only join entries where at least one is empty`);
23
+ return (0, core_1.failTest)(`Actor ${this.name} can only join entries where at least one is empty`);
22
24
  }
23
25
  return super.test(action);
24
26
  }
@@ -27,26 +29,26 @@ class ActorRdfJoinMultiEmpty extends bus_rdf_join_1.ActorRdfJoin {
27
29
  for (const entry of action.entries) {
28
30
  entry.output.bindingsStream.close();
29
31
  }
32
+ const dataFactory = action.context.getSafe(context_entries_1.KeysInitQuery.dataFactory);
30
33
  return {
31
34
  result: {
32
35
  bindingsStream: new asynciterator_1.ArrayIterator([], { autoStart: false }),
33
36
  metadata: async () => ({
34
- state: new metadata_1.MetadataValidationState(),
37
+ state: new utils_metadata_1.MetadataValidationState(),
35
38
  cardinality: { type: 'exact', value: 0 },
36
- canContainUndefs: false,
37
- variables: bus_rdf_join_1.ActorRdfJoin.joinVariables(await bus_rdf_join_1.ActorRdfJoin.getMetadatas(action.entries)),
39
+ variables: bus_rdf_join_1.ActorRdfJoin.joinVariables(dataFactory, await bus_rdf_join_1.ActorRdfJoin.getMetadatas(action.entries)),
38
40
  }),
39
41
  type: 'bindings',
40
42
  },
41
43
  };
42
44
  }
43
- async getJoinCoefficients(_action, _metadatas) {
44
- return {
45
+ async getJoinCoefficients(action, sideData) {
46
+ return (0, core_1.passTestWithSideData)({
45
47
  iterations: 0,
46
48
  persistedItems: 0,
47
49
  blockingItems: 0,
48
50
  requestTime: 0,
49
- };
51
+ }, sideData);
50
52
  }
51
53
  }
52
54
  exports.ActorRdfJoinMultiEmpty = ActorRdfJoinMultiEmpty;
@@ -1 +1 @@
1
- {"version":3,"file":"ActorRdfJoinMultiEmpty.js","sourceRoot":"","sources":["ActorRdfJoinMultiEmpty.ts"],"names":[],"mappings":";;;AACA,yDAAsD;AAEtD,iDAA6D;AAG7D,iDAA8C;AAE9C;;GAEG;AACH,MAAa,sBAAuB,SAAQ,2BAAY;IACtD,YAAmB,IAAuB;QACxC,KAAK,CAAC,IAAI,EAAE;YACV,WAAW,EAAE,OAAO;YACpB,YAAY,EAAE,aAAa;YAC3B,eAAe,EAAE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B,WAAW,EAAE,CAAC;SACf,CAAC;IACJ,CAAC;CACF;AAhDD,wDAgDC","sourcesContent":["import type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport { MetadataValidationState } from '@comunica/metadata';\nimport type { MetadataBindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { ArrayIterator } from 'asynciterator';\n\n/**\n * A comunica Multi Empty RDF Join Actor.\n */\nexport class ActorRdfJoinMultiEmpty extends ActorRdfJoin {\n public constructor(args: IActorRdfJoinArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'multi-empty',\n canHandleUndefs: true,\n });\n }\n\n public override async test(action: IActionRdfJoin): Promise<IMediatorTypeJoinCoefficients> {\n if ((await ActorRdfJoin.getMetadatas(action.entries))\n .every(metadata => ActorRdfJoin.getCardinality(metadata).value > 0)) {\n throw new Error(`Actor ${this.name} can only join entries where at least one is empty`);\n }\n return super.test(action);\n }\n\n protected override async getOutput(action: IActionRdfJoin): Promise<IActorRdfJoinOutputInner> {\n // Close all entries\n for (const entry of action.entries) {\n entry.output.bindingsStream.close();\n }\n\n return {\n result: {\n bindingsStream: new ArrayIterator<RDF.Bindings>([], { autoStart: false }),\n metadata: async() => ({\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: 0 },\n canContainUndefs: false,\n variables: ActorRdfJoin.joinVariables(await ActorRdfJoin.getMetadatas(action.entries)),\n }),\n type: 'bindings',\n },\n };\n }\n\n protected async getJoinCoefficients(\n _action: IActionRdfJoin,\n _metadatas: MetadataBindings[],\n ): Promise<IMediatorTypeJoinCoefficients> {\n return {\n iterations: 0,\n persistedItems: 0,\n blockingItems: 0,\n requestTime: 0,\n };\n }\n}\n"]}
1
+ {"version":3,"file":"ActorRdfJoinMultiEmpty.js","sourceRoot":"","sources":["ActorR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O,EAAE,KAAK,EAAE,CAAC,EAAE;oBACxC,SAAS,EAAE,2BAAY,CAAC,aAAa,CAAC,WAAW,EAAE,MAAM,2BAAY,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;iBACpG,CAAC;gBACF,IAAI,EAAE,UAAU;aACjB;SACF,CAAC;IACJ,CAAC;IAES,KAAK,CAAC,mBAAmB,CACjC,MAAsB,EACtB,QAAmC;QAEnC,OAAO,IAAA,2BAAoB,EAAC;YAC1B,UAAU,EAAE,CAAC;YACb,cAAc,EAAE,CAAC;YACjB,aAAa,EAAE,CAAC;YAChB,WAAW,EAAE,CAAC;SACf,EAAE,QAAQ,CAAC,CAAC;IACf,CAAC;CACF;AAlDD,wDAkDC","sourcesContent":["import type {\n IActionRdfJoin,\n IActorRdfJoinOutputInner,\n IActorRdfJoinArgs,\n IActorRdfJoinTestSideData,\n} from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { TestResult } from '@comunica/core';\nimport { passTestWithSideData, failTest } from '@comunica/core';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { ComunicaDataFactory } from '@comunica/types';\nimport { MetadataValidationState } from '@comunica/utils-metadata';\nimport type * as RDF from '@rdfjs/types';\nimport { ArrayIterator } from 'asynciterator';\n\n/**\n * A comunica Multi Empty RDF Join Actor.\n */\nexport class ActorRdfJoinMultiEmpty extends ActorRdfJoin {\n public constructor(args: IActorRdfJoinArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'multi-empty',\n canHandleUndefs: true,\n });\n }\n\n public override async test(\n action: IActionRdfJoin,\n ): Promise<TestResult<IMediatorTypeJoinCoefficients, IActorRdfJoinTestSideData>> {\n if ((await ActorRdfJoin.getMetadatas(action.entries))\n .every(metadata => ActorRdfJoin.getCardinality(metadata).value > 0)) {\n return failTest(`Actor ${this.name} can only join entries where at least one is empty`);\n }\n return super.test(action);\n }\n\n protected override async getOutput(action: IActionRdfJoin): Promise<IActorRdfJoinOutputInner> {\n // Close all entries\n for (const entry of action.entries) {\n entry.output.bindingsStream.close();\n }\n\n const dataFactory: ComunicaDataFactory = action.context.getSafe(KeysInitQuery.dataFactory);\n return {\n result: {\n bindingsStream: new ArrayIterator<RDF.Bindings>([], { autoStart: false }),\n metadata: async() => ({\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: 0 },\n variables: ActorRdfJoin.joinVariables(dataFactory, await ActorRdfJoin.getMetadatas(action.entries)),\n }),\n type: 'bindings',\n },\n };\n }\n\n protected async getJoinCoefficients(\n action: IActionRdfJoin,\n sideData: IActorRdfJoinTestSideData,\n ): Promise<TestResult<IMediatorTypeJoinCoefficients, IActorRdfJoinTestSideData>> {\n return passTestWithSideData({\n iterations: 0,\n persistedItems: 0,\n blockingItems: 0,\n requestTime: 0,\n }, sideData);\n }\n}\n"]}
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "@comunica/actor-rdf-join-inner-multi-empty",
3
- "version": "3.3.0",
3
+ "version": "4.0.1",
4
4
  "description": "A multi-empty rdf-join actor",
5
5
  "lsd:module": true,
6
6
  "license": "MIT",
7
+ "funding": {
8
+ "type": "opencollective",
9
+ "url": "https://opencollective.com/comunica-association"
10
+ },
7
11
  "homepage": "https://comunica.dev/",
8
12
  "repository": {
9
13
  "type": "git",
@@ -37,12 +41,14 @@
37
41
  "build:components": "componentsjs-generator"
38
42
  },
39
43
  "dependencies": {
40
- "@comunica/bus-rdf-join": "^3.3.0",
41
- "@comunica/mediatortype-join-coefficients": "^3.3.0",
42
- "@comunica/metadata": "^3.3.0",
43
- "@comunica/types": "^3.3.0",
44
+ "@comunica/bus-rdf-join": "^4.0.1",
45
+ "@comunica/context-entries": "^4.0.1",
46
+ "@comunica/core": "^4.0.1",
47
+ "@comunica/mediatortype-join-coefficients": "^4.0.1",
48
+ "@comunica/types": "^4.0.1",
49
+ "@comunica/utils-metadata": "^4.0.1",
44
50
  "@rdfjs/types": "*",
45
51
  "asynciterator": "^3.9.0"
46
52
  },
47
- "gitHead": "02bde397d206f1f5a523643a6a604c89e792e2f9"
53
+ "gitHead": "67831ba79e45ea1ced41fe3f83c5d6e8802dbeaa"
48
54
  }