@comunica/actor-query-operation-update-compositeupdate 1.22.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
@@ -23,14 +23,14 @@ 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-query-operation-update-compositeupdate/^1.0.0/components/context.jsonld"
26
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-update-compositeupdate/^2.0.0/components/context.jsonld"
27
27
  ],
28
28
  "actors": [
29
29
  ...
30
30
  {
31
- "@id": "config-sets:sparql-queryoperator-update.json#myCompositeUpdateOperator",
31
+ "@id": "urn:comunica:default:query-operation/actors#update-composite",
32
32
  "@type": "ActorQueryOperationUpdateCompositeUpdate",
33
- "cbqo:mediatorQueryOperation": { "@id": "config-sets:sparql-queryoperators.json#mediatorQueryOperation" }
33
+ "mediatorQueryOperation": { "@id": "urn:comunica:default:query-operation/mediators#main" }
34
34
  }
35
35
  ]
36
36
  }
@@ -38,4 +38,4 @@ After installing, this package can be added to your engine's configuration as fo
38
38
 
39
39
  ### Config Parameters
40
40
 
41
- * `cbqo:mediatorQueryOperation`: A mediator over the [Query Operation bus](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation).
41
+ * `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-update-compositeupdate/^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-update-compositeupdate",
8
+ "components": [
9
+ {
10
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate",
11
+ "@type": "Class",
12
+ "requireElement": "ActorQueryOperationUpdateCompositeUpdate",
13
+ "extends": [
14
+ {
15
+ "@type": "GenericComponentExtension",
16
+ "component": "cbqo:components/ActorQueryOperationTypedMediated.jsonld#ActorQueryOperationTypedMediated",
17
+ "genericTypeInstances": [
18
+ "urn:npm:sparqlalgebrajs:CompositeUpdate"
19
+ ]
20
+ }
21
+ ],
22
+ "comment": "A comunica Update CompositeUpdate Query Operation Actor.",
23
+ "parameters": [
24
+ {
25
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args_mediatorQueryOperation",
26
+ "range": "cc:components/Mediator.jsonld#Mediator"
27
+ },
28
+ {
29
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args_name",
30
+ "range": "xsd:string",
31
+ "default": {
32
+ "@id": "rdf:subject"
33
+ },
34
+ "comment": "The name for this actor."
35
+ },
36
+ {
37
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_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": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_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": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate__member_constructor",
117
+ "memberFieldName": "constructor"
118
+ },
119
+ {
120
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate__member_testOperation",
121
+ "memberFieldName": "testOperation"
122
+ },
123
+ {
124
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate__member_runOperation",
125
+ "memberFieldName": "runOperation"
126
+ }
127
+ ],
128
+ "constructorArguments": [
129
+ {
130
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args__constructorArgument",
131
+ "fields": [
132
+ {
133
+ "keyRaw": "mediatorQueryOperation",
134
+ "value": {
135
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args_mediatorQueryOperation"
136
+ }
137
+ },
138
+ {
139
+ "keyRaw": "name",
140
+ "value": {
141
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args_name"
142
+ }
143
+ },
144
+ {
145
+ "keyRaw": "bus",
146
+ "value": {
147
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args_bus"
148
+ }
149
+ },
150
+ {
151
+ "keyRaw": "beforeActors",
152
+ "value": {
153
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_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-update-compositeupdate/^1.0.0/components/context.jsonld",
2
+ "@context": [
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-update-compositeupdate/^2.0.0/components/context.jsonld"
4
+ ],
3
5
  "@id": "npmd:@comunica/actor-query-operation-update-compositeupdate",
4
6
  "@type": "Module",
5
7
  "requireName": "@comunica/actor-query-operation-update-compositeupdate",
6
8
  "import": [
7
- "files-caqouc:components/Actor/QueryOperation/UpdateCompositeUpdate.jsonld"
9
+ "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld"
8
10
  ]
9
- }
11
+ }
@@ -1,12 +1,41 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^1.0.0/components/context.jsonld",
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^4.0.0/components/context.jsonld",
4
4
  {
5
5
  "npmd": "https://linkedsoftwaredependencies.org/bundles/npm/",
6
- "caqouc": "npmd:@comunica/actor-query-operation-update-compositeupdate/",
7
- "files-caqouc": "caqouc:^1.0.0/",
8
-
9
- "ActorQueryOperationUpdateCompositeUpdate": "caqouc:Actor/QueryOperation/UpdateCompositeUpdate"
6
+ "caqoucu": "npmd:@comunica/actor-query-operation-update-compositeupdate/^2.0.0/",
7
+ "ActorQueryOperationUpdateCompositeUpdate": {
8
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate",
9
+ "@prefix": true,
10
+ "@context": {
11
+ "args_mediatorQueryOperation": {
12
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args_mediatorQueryOperation"
13
+ },
14
+ "args_name": {
15
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args_name"
16
+ },
17
+ "args_bus": {
18
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args_bus"
19
+ },
20
+ "args_beforeActors": {
21
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args_beforeActors",
22
+ "@container": "@list"
23
+ },
24
+ "mediatorQueryOperation": {
25
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args_mediatorQueryOperation"
26
+ },
27
+ "name": {
28
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args_name"
29
+ },
30
+ "bus": {
31
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args_bus"
32
+ },
33
+ "beforeActors": {
34
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args_beforeActors",
35
+ "@container": "@list"
36
+ }
37
+ }
38
+ }
10
39
  }
11
40
  ]
12
- }
41
+ }
@@ -1,12 +1,13 @@
1
- import type { IActorQueryOperationOutput, IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';
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';
3
+ import type { IActorTest } from '@comunica/core';
4
+ import type { IActionContext, IQueryOperationResult } from '@comunica/types';
4
5
  import type { Algebra } from 'sparqlalgebrajs';
5
6
  /**
6
7
  * A comunica Update CompositeUpdate Query Operation Actor.
7
8
  */
8
9
  export declare class ActorQueryOperationUpdateCompositeUpdate extends ActorQueryOperationTypedMediated<Algebra.CompositeUpdate> {
9
10
  constructor(args: IActorQueryOperationTypedMediatedArgs);
10
- testOperation(pattern: Algebra.CompositeUpdate, context: ActionContext): Promise<IActorTest>;
11
- runOperation(pattern: Algebra.CompositeUpdate, context: ActionContext): Promise<IActorQueryOperationOutput>;
11
+ testOperation(operation: Algebra.CompositeUpdate, context: IActionContext): Promise<IActorTest>;
12
+ runOperation(operationOriginal: Algebra.CompositeUpdate, context: IActionContext): Promise<IQueryOperationResult>;
12
13
  }
@@ -9,22 +9,22 @@ class ActorQueryOperationUpdateCompositeUpdate extends bus_query_operation_1.Act
9
9
  constructor(args) {
10
10
  super(args, 'compositeupdate');
11
11
  }
12
- async testOperation(pattern, context) {
12
+ async testOperation(operation, context) {
13
13
  bus_query_operation_1.ActorQueryOperation.throwOnReadOnly(context);
14
14
  return true;
15
15
  }
16
- async runOperation(pattern, context) {
16
+ async runOperation(operationOriginal, context) {
17
17
  const updateResult = (async () => {
18
18
  // Execute update operations in sequence
19
- for (const operation of pattern.updates) {
19
+ for (const operation of operationOriginal.updates) {
20
20
  const subResult = bus_query_operation_1.ActorQueryOperation
21
- .getSafeUpdate(await this.mediatorQueryOperation.mediate({ operation, context }));
22
- await subResult.updateResult;
21
+ .getSafeVoid(await this.mediatorQueryOperation.mediate({ operation, context }));
22
+ await subResult.voidResult;
23
23
  }
24
24
  })();
25
25
  return {
26
- type: 'update',
27
- updateResult,
26
+ type: 'void',
27
+ voidResult: updateResult,
28
28
  };
29
29
  }
30
30
  }
package/lib/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './ActorQueryOperationUpdateCompositeUpdate';
@@ -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/ActorQueryOperationUpdateCompositeUpdate"), exports);
13
+ __exportStar(require("./ActorQueryOperationUpdateCompositeUpdate"), exports);
14
14
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@comunica/actor-query-operation-update-compositeupdate",
3
- "version": "1.22.0",
3
+ "version": "2.0.1-alpha.5.0",
4
4
  "description": "A update-compositeupdate 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": "https://github.com/comunica/comunica/tree/master/packages/actor-query-operation-update-compositeupdate",
9
9
  "publishConfig": {
10
10
  "access": "public"
@@ -23,42 +23,17 @@
23
23
  "files": [
24
24
  "components",
25
25
  "lib/**/*.d.ts",
26
- "lib/**/*.js",
27
- "index.d.ts",
28
- "index.js"
26
+ "lib/**/*.js"
29
27
  ],
30
28
  "dependencies": {
29
+ "@comunica/bus-query-operation": "2.0.1-alpha.5.0",
30
+ "@comunica/core": "2.0.1-alpha.5.0",
31
31
  "@rdfjs/types": "*"
32
32
  },
33
- "peerDependencies": {
34
- "@comunica/bus-query-operation": "^1.19.2",
35
- "@comunica/core": "^1.19.2"
36
- },
37
- "devDependencies": {
38
- "@comunica/bus-query-operation": "^1.22.0",
39
- "@comunica/core": "^1.22.0"
40
- },
41
- "jest": {
42
- "globals": {
43
- "ts-jest": {
44
- "tsConfig": "../../tsconfig.json"
45
- }
46
- },
47
- "transform": {
48
- "^.+\\.ts$": "ts-jest"
49
- },
50
- "testRegex": "(/test/.*|(\\.|/)(test|spec))\\.ts$",
51
- "moduleFileExtensions": [
52
- "ts",
53
- "js"
54
- ],
55
- "collectCoverage": true
56
- },
57
33
  "scripts": {
58
- "test": "node \"../../node_modules/jest/bin/jest.js\" ${1}",
59
- "test-watch": "node \"../../node_modules/jest/bin/jest.js\" ${1} --watch",
60
- "build": "node \"../../node_modules/typescript/bin/tsc\"",
61
- "validate": "npm ls"
34
+ "build": "npm run build:ts && npm run build:components",
35
+ "build:ts": "node \"../../node_modules/typescript/bin/tsc\"",
36
+ "build:components": "componentsjs-generator"
62
37
  },
63
- "gitHead": "0a249ba341022eb2f1b9922fcf549a9564671d9f"
38
+ "gitHead": "e2ae2e9e924bf0656df60cc99774f7e560d47695"
64
39
  }
@@ -1,21 +0,0 @@
1
- {
2
- "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-update-compositeupdate/^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-update-compositeupdate",
7
- "components": [
8
- {
9
- "@id": "caqouc:Actor/QueryOperation/UpdateCompositeUpdate",
10
- "@type": "Class",
11
- "extends": "cbqo:Actor/QueryOperationTypedMediated",
12
- "requireElement": "ActorQueryOperationUpdateCompositeUpdate",
13
- "comment": "A comunica Update CompositeUpdate 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/ActorQueryOperationUpdateCompositeUpdate';