@comunica/actor-query-operation-update-compositeupdate 3.2.2 → 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.
@@ -54,6 +54,10 @@
54
54
  {
55
55
  "@type": "ParameterRangeGenericTypeReference",
56
56
  "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
57
+ },
58
+ {
59
+ "@type": "ParameterRangeGenericTypeReference",
60
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
57
61
  }
58
62
  ]
59
63
  },
@@ -68,6 +72,10 @@
68
72
  {
69
73
  "@type": "ParameterRangeGenericTypeReference",
70
74
  "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
75
+ },
76
+ {
77
+ "@type": "ParameterRangeGenericTypeReference",
78
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
71
79
  }
72
80
  ]
73
81
  },
@@ -77,6 +85,20 @@
77
85
  },
78
86
  "comment": "The bus this actor subscribes to."
79
87
  },
88
+ {
89
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args_busFailMessage",
90
+ "range": {
91
+ "@type": "ParameterRangeUnion",
92
+ "parameterRangeElements": [
93
+ "xsd:string",
94
+ {
95
+ "@type": "ParameterRangeUndefined"
96
+ }
97
+ ]
98
+ },
99
+ "default": "Query operation processing failed: none of the configured actors were able to handle the operation type ${action.operation.type}",
100
+ "comment": "The message that will be configured in the bus for reporting failures. This message may be a template string that contains references to the executed `action`. For example, the following templated string is allowed: \"RDF dereferencing failed: no actors could handle ${action.handle.mediaType}\""
101
+ },
80
102
  {
81
103
  "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args_beforeActors",
82
104
  "range": {
@@ -99,6 +121,10 @@
99
121
  {
100
122
  "@type": "ParameterRangeGenericTypeReference",
101
123
  "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
124
+ },
125
+ {
126
+ "@type": "ParameterRangeGenericTypeReference",
127
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
102
128
  }
103
129
  ]
104
130
  }
@@ -147,6 +173,12 @@
147
173
  "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args_bus"
148
174
  }
149
175
  },
176
+ {
177
+ "keyRaw": "busFailMessage",
178
+ "value": {
179
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args_busFailMessage"
180
+ }
181
+ },
150
182
  {
151
183
  "keyRaw": "beforeActors",
152
184
  "value": {
@@ -17,6 +17,9 @@
17
17
  "args_bus": {
18
18
  "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args_bus"
19
19
  },
20
+ "args_busFailMessage": {
21
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args_busFailMessage"
22
+ },
20
23
  "args_beforeActors": {
21
24
  "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args_beforeActors",
22
25
  "@container": "@list"
@@ -30,6 +33,9 @@
30
33
  "bus": {
31
34
  "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args_bus"
32
35
  },
36
+ "busFailMessage": {
37
+ "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args_busFailMessage"
38
+ },
33
39
  "beforeActors": {
34
40
  "@id": "caqoucu:components/ActorQueryOperationUpdateCompositeUpdate.jsonld#ActorQueryOperationUpdateCompositeUpdate_args_beforeActors",
35
41
  "@container": "@list"
@@ -1,6 +1,6 @@
1
1
  import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';
2
2
  import { ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';
3
- import type { IActorTest } from '@comunica/core';
3
+ import type { IActorTest, TestResult } from '@comunica/core';
4
4
  import type { IActionContext, IQueryOperationResult } from '@comunica/types';
5
5
  import type { Algebra } from 'sparqlalgebrajs';
6
6
  /**
@@ -8,6 +8,6 @@ import type { Algebra } from 'sparqlalgebrajs';
8
8
  */
9
9
  export declare class ActorQueryOperationUpdateCompositeUpdate extends ActorQueryOperationTypedMediated<Algebra.CompositeUpdate> {
10
10
  constructor(args: IActorQueryOperationTypedMediatedArgs);
11
- testOperation(operation: Algebra.CompositeUpdate, context: IActionContext): Promise<IActorTest>;
11
+ testOperation(operation: Algebra.CompositeUpdate, context: IActionContext): Promise<TestResult<IActorTest>>;
12
12
  runOperation(operationOriginal: Algebra.CompositeUpdate, context: IActionContext): Promise<IQueryOperationResult>;
13
13
  }
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ActorQueryOperationUpdateCompositeUpdate = void 0;
4
4
  const bus_query_operation_1 = require("@comunica/bus-query-operation");
5
+ const utils_query_operation_1 = require("@comunica/utils-query-operation");
5
6
  /**
6
7
  * A comunica Update CompositeUpdate Query Operation Actor.
7
8
  */
@@ -10,15 +11,13 @@ class ActorQueryOperationUpdateCompositeUpdate extends bus_query_operation_1.Act
10
11
  super(args, 'compositeupdate');
11
12
  }
12
13
  async testOperation(operation, context) {
13
- bus_query_operation_1.ActorQueryOperation.throwOnReadOnly(context);
14
- return true;
14
+ return (0, utils_query_operation_1.testReadOnly)(context);
15
15
  }
16
16
  async runOperation(operationOriginal, context) {
17
17
  const execute = () => (async () => {
18
18
  // Execute update operations in sequence
19
19
  for (const operation of operationOriginal.updates) {
20
- const subResult = bus_query_operation_1.ActorQueryOperation
21
- .getSafeVoid(await this.mediatorQueryOperation.mediate({ operation, context }));
20
+ const subResult = (0, utils_query_operation_1.getSafeVoid)(await this.mediatorQueryOperation.mediate({ operation, context }));
22
21
  await subResult.execute();
23
22
  }
24
23
  })();
@@ -1 +1 @@
1
- {"version":3,"file":"ActorQueryOperationUpdateCompositeUpdate.js","sourceRoot":"","sources":["ActorQueryOperationUpdateCompositeUpdate.ts"],"names":[],"mappings":";;;AACA,uEAGuC;AAKvC;;GAEG;AACH,MAAa,wCACX,SAAQ,sDAAyD;IACjE,YAAmB,IAA2C;QAC5D,KAAK,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,aAAa,CACxB,SAAkC,EAClC,OAAuB;QAEvB,yCAAmB,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QAC7C,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,iBAA0C,EAAE,OAAuB;QAE3F,MAAM,OAAO,GAAG,GAAkB,EAAE,CAAC,CAAC,KAAK,IAAkB,EAAE;YAC7D,wCAAwC;YACxC,KAAK,MAAM,SAAS,IAAI,iBAAiB,CAAC,OAAO,EAAE,CAAC;gBAClD,MAAM,SAAS,GAAG,yCAAmB;qBAClC,WAAW,CAAC,MAAM,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;gBAClF,MAAM,SAAS,CAAC,OAAO,EAAE,CAAC;YAC5B,CAAC;QACH,CAAC,CAAC,EAAE,CAAC;QAEL,OAAO;YACL,IAAI,EAAE,MAAM;YACZ,OAAO;SACR,CAAC;IACJ,CAAC;CACF;AA9BD,4FA8BC","sourcesContent":["import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Update CompositeUpdate Query Operation Actor.\n */\nexport class ActorQueryOperationUpdateCompositeUpdate\n extends ActorQueryOperationTypedMediated<Algebra.CompositeUpdate> {\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, 'compositeupdate');\n }\n\n public async testOperation(\n operation: Algebra.CompositeUpdate,\n context: IActionContext,\n ): Promise<IActorTest> {\n ActorQueryOperation.throwOnReadOnly(context);\n return true;\n }\n\n public async runOperation(operationOriginal: Algebra.CompositeUpdate, context: IActionContext):\n Promise<IQueryOperationResult> {\n const execute = (): Promise<void> => (async(): Promise<void> => {\n // Execute update operations in sequence\n for (const operation of operationOriginal.updates) {\n const subResult = ActorQueryOperation\n .getSafeVoid(await this.mediatorQueryOperation.mediate({ operation, context }));\n await subResult.execute();\n }\n })();\n\n return {\n type: 'void',\n execute,\n };\n }\n}\n"]}
1
+ {"version":3,"file":"ActorQueryOperationUpdateCompositeUpdate.js","sourceRoot":"","sources":["ActorQueryOperationUpdateCompositeUpdate.ts"],"names":[],"mappings":";;;AACA,uEAEuC;AAGvC,2EAA4E;AAG5E;;GAEG;AACH,MAAa,wCACX,SAAQ,sDAAyD;IACjE,YAAmB,IAA2C;QAC5D,KAAK,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,aAAa,CACxB,SAAkC,EAClC,OAAuB;QAEvB,OAAO,IAAA,oCAAY,EAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,iBAA0C,EAAE,OAAuB;QAE3F,MAAM,OAAO,GAAG,GAAkB,EAAE,CAAC,CAAC,KAAK,IAAkB,EAAE;YAC7D,wCAAwC;YACxC,KAAK,MAAM,SAAS,IAAI,iBAAiB,CAAC,OAAO,EAAE,CAAC;gBAClD,MAAM,SAAS,GAAG,IAAA,mCAAW,EAAC,MAAM,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;gBACjG,MAAM,SAAS,CAAC,OAAO,EAAE,CAAC;YAC5B,CAAC;QACH,CAAC,CAAC,EAAE,CAAC;QAEL,OAAO;YACL,IAAI,EAAE,MAAM;YACZ,OAAO;SACR,CAAC;IACJ,CAAC;CACF;AA5BD,4FA4BC","sourcesContent":["import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { IActorTest, TestResult } from '@comunica/core';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport { getSafeVoid, testReadOnly } from '@comunica/utils-query-operation';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Update CompositeUpdate Query Operation Actor.\n */\nexport class ActorQueryOperationUpdateCompositeUpdate\n extends ActorQueryOperationTypedMediated<Algebra.CompositeUpdate> {\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, 'compositeupdate');\n }\n\n public async testOperation(\n operation: Algebra.CompositeUpdate,\n context: IActionContext,\n ): Promise<TestResult<IActorTest>> {\n return testReadOnly(context);\n }\n\n public async runOperation(operationOriginal: Algebra.CompositeUpdate, context: IActionContext):\n Promise<IQueryOperationResult> {\n const execute = (): Promise<void> => (async(): Promise<void> => {\n // Execute update operations in sequence\n for (const operation of operationOriginal.updates) {\n const subResult = getSafeVoid(await this.mediatorQueryOperation.mediate({ operation, context }));\n await subResult.execute();\n }\n })();\n\n return {\n type: 'void',\n execute,\n };\n }\n}\n"]}
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "@comunica/actor-query-operation-update-compositeupdate",
3
- "version": "3.2.2",
3
+ "version": "3.2.4-alpha.47.0",
4
4
  "description": "A update-compositeupdate query-operation actor",
5
5
  "lsd:module": true,
6
6
  "license": "MIT",
7
+ "funding": {
8
+ "type": "opencollective",
9
+ "url": "https://opencollective.com/comunica-association"
10
+ },
7
11
  "homepage": "https://github.com/comunica/comunica#readme",
8
12
  "repository": "https://github.com/comunica/comunica/tree/master/packages/actor-query-operation-update-compositeupdate",
9
13
  "bugs": {
@@ -33,10 +37,11 @@
33
37
  "build:components": "componentsjs-generator"
34
38
  },
35
39
  "dependencies": {
36
- "@comunica/bus-query-operation": "^3.2.2",
37
- "@comunica/core": "^3.2.1",
38
- "@comunica/types": "^3.2.1",
39
- "sparqlalgebrajs": "^4.3.7"
40
+ "@comunica/bus-query-operation": "3.2.4-alpha.47.0",
41
+ "@comunica/core": "3.2.4-alpha.47.0",
42
+ "@comunica/types": "3.2.4-alpha.47.0",
43
+ "@comunica/utils-query-operation": "3.2.4-alpha.47.0",
44
+ "sparqlalgebrajs": "^4.3.8"
40
45
  },
41
- "gitHead": "fbcc3a81f87738633ddf69ede5ca504236f7edd9"
46
+ "gitHead": "85bd4c5cf07dfc293ebbc3a1416b70e2db8bfc48"
42
47
  }