@comunica/actor-query-operation-update-create 3.2.4-alpha.47.0 → 3.3.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.
@@ -59,10 +59,6 @@
59
59
  {
60
60
  "@type": "ParameterRangeGenericTypeReference",
61
61
  "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
62
- },
63
- {
64
- "@type": "ParameterRangeGenericTypeReference",
65
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
66
62
  }
67
63
  ]
68
64
  },
@@ -77,10 +73,6 @@
77
73
  {
78
74
  "@type": "ParameterRangeGenericTypeReference",
79
75
  "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
80
- },
81
- {
82
- "@type": "ParameterRangeGenericTypeReference",
83
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
84
76
  }
85
77
  ]
86
78
  },
@@ -90,20 +82,6 @@
90
82
  },
91
83
  "comment": "The bus this actor subscribes to."
92
84
  },
93
- {
94
- "@id": "caqouc:components/ActorQueryOperationCreate.jsonld#ActorQueryOperationCreate_args_busFailMessage",
95
- "range": {
96
- "@type": "ParameterRangeUnion",
97
- "parameterRangeElements": [
98
- "xsd:string",
99
- {
100
- "@type": "ParameterRangeUndefined"
101
- }
102
- ]
103
- },
104
- "default": "Query operation processing failed: none of the configured actors were able to handle the operation type ${action.operation.type}",
105
- "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}\""
106
- },
107
85
  {
108
86
  "@id": "caqouc:components/ActorQueryOperationCreate.jsonld#ActorQueryOperationCreate_args_beforeActors",
109
87
  "range": {
@@ -126,10 +104,6 @@
126
104
  {
127
105
  "@type": "ParameterRangeGenericTypeReference",
128
106
  "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
129
- },
130
- {
131
- "@type": "ParameterRangeGenericTypeReference",
132
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
133
107
  }
134
108
  ]
135
109
  }
@@ -189,12 +163,6 @@
189
163
  "@id": "caqouc:components/ActorQueryOperationCreate.jsonld#ActorQueryOperationCreate_args_bus"
190
164
  }
191
165
  },
192
- {
193
- "keyRaw": "busFailMessage",
194
- "value": {
195
- "@id": "caqouc:components/ActorQueryOperationCreate.jsonld#ActorQueryOperationCreate_args_busFailMessage"
196
- }
197
- },
198
166
  {
199
167
  "keyRaw": "beforeActors",
200
168
  "value": {
@@ -20,9 +20,6 @@
20
20
  "args_bus": {
21
21
  "@id": "caqouc:components/ActorQueryOperationCreate.jsonld#ActorQueryOperationCreate_args_bus"
22
22
  },
23
- "args_busFailMessage": {
24
- "@id": "caqouc:components/ActorQueryOperationCreate.jsonld#ActorQueryOperationCreate_args_busFailMessage"
25
- },
26
23
  "args_beforeActors": {
27
24
  "@id": "caqouc:components/ActorQueryOperationCreate.jsonld#ActorQueryOperationCreate_args_beforeActors",
28
25
  "@container": "@list"
@@ -39,9 +36,6 @@
39
36
  "bus": {
40
37
  "@id": "caqouc:components/ActorQueryOperationCreate.jsonld#ActorQueryOperationCreate_args_bus"
41
38
  },
42
- "busFailMessage": {
43
- "@id": "caqouc:components/ActorQueryOperationCreate.jsonld#ActorQueryOperationCreate_args_busFailMessage"
44
- },
45
39
  "beforeActors": {
46
40
  "@id": "caqouc:components/ActorQueryOperationCreate.jsonld#ActorQueryOperationCreate_args_beforeActors",
47
41
  "@container": "@list"
@@ -1,7 +1,7 @@
1
1
  import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';
2
2
  import { ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';
3
3
  import type { MediatorRdfUpdateQuads } from '@comunica/bus-rdf-update-quads';
4
- import type { IActorTest, TestResult } from '@comunica/core';
4
+ import type { IActorTest } from '@comunica/core';
5
5
  import type { IActionContext, IQueryOperationResult } from '@comunica/types';
6
6
  import type { Algebra } from 'sparqlalgebrajs';
7
7
  /**
@@ -11,7 +11,7 @@ import type { Algebra } from 'sparqlalgebrajs';
11
11
  export declare class ActorQueryOperationCreate extends ActorQueryOperationTypedMediated<Algebra.Create> {
12
12
  readonly mediatorUpdateQuads: MediatorRdfUpdateQuads;
13
13
  constructor(args: IActorQueryOperationCreateArgs);
14
- testOperation(operation: Algebra.Create, context: IActionContext): Promise<TestResult<IActorTest>>;
14
+ testOperation(operation: Algebra.Create, context: IActionContext): Promise<IActorTest>;
15
15
  runOperation(operation: Algebra.Create, context: IActionContext): Promise<IQueryOperationResult>;
16
16
  }
17
17
  export interface IActorQueryOperationCreateArgs extends IActorQueryOperationTypedMediatedArgs {
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ActorQueryOperationCreate = 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");
6
5
  /**
7
6
  * A [Query Operation](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation) actor that
8
7
  * handles SPARQL create operations.
@@ -12,7 +11,8 @@ class ActorQueryOperationCreate extends bus_query_operation_1.ActorQueryOperatio
12
11
  super(args, 'create');
13
12
  }
14
13
  async testOperation(operation, context) {
15
- return (0, utils_query_operation_1.testReadOnly)(context);
14
+ bus_query_operation_1.ActorQueryOperation.throwOnReadOnly(context);
15
+ return true;
16
16
  }
17
17
  async runOperation(operation, context) {
18
18
  // Delegate to update-quads bus
@@ -1 +1 @@
1
- {"version":3,"file":"ActorQueryOperationCreate.js","sourceRoot":"","sources":["ActorQueryOperationCreate.ts"],"names":[],"mappings":";;;AACA,uEAAiF;AAIjF,2EAA+D;AAG/D;;;GAGG;AACH,MAAa,yBAA0B,SAAQ,sDAAgD;IAG7F,YAAmB,IAAoC;QACrD,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACxB,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,SAAyB,EAAE,OAAuB;QAC3E,OAAO,IAAA,oCAAY,EAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,SAAyB,EAAE,OAAuB;QAE1E,+BAA+B;QAC/B,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC;YACzD,YAAY,EAAE;gBACZ,MAAM,EAAE,CAAE,SAAS,CAAC,MAAM,CAAE;gBAC5B,mBAAmB,EAAE,CAAC,SAAS,CAAC,MAAM;aACvC;YACD,OAAO;SACR,CAAC,CAAC;QAEH,OAAO;YACL,IAAI,EAAE,MAAM;YACZ,OAAO;SACR,CAAC;IACJ,CAAC;CACF;AA3BD,8DA2BC","sourcesContent":["import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { MediatorRdfUpdateQuads } from '@comunica/bus-rdf-update-quads';\nimport type { IActorTest, TestResult } from '@comunica/core';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport { testReadOnly } from '@comunica/utils-query-operation';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A [Query Operation](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation) actor that\n * handles SPARQL create operations.\n */\nexport class ActorQueryOperationCreate extends ActorQueryOperationTypedMediated<Algebra.Create> {\n public readonly mediatorUpdateQuads: MediatorRdfUpdateQuads;\n\n public constructor(args: IActorQueryOperationCreateArgs) {\n super(args, 'create');\n }\n\n public async testOperation(operation: Algebra.Create, context: IActionContext): Promise<TestResult<IActorTest>> {\n return testReadOnly(context);\n }\n\n public async runOperation(operation: Algebra.Create, context: IActionContext):\n Promise<IQueryOperationResult> {\n // Delegate to update-quads bus\n const { execute } = await this.mediatorUpdateQuads.mediate({\n createGraphs: {\n graphs: [ operation.source ],\n requireNonExistence: !operation.silent,\n },\n context,\n });\n\n return {\n type: 'void',\n execute,\n };\n }\n}\n\nexport interface IActorQueryOperationCreateArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * The RDF Update Quads mediator\n */\n mediatorUpdateQuads: MediatorRdfUpdateQuads;\n}\n"]}
1
+ {"version":3,"file":"ActorQueryOperationCreate.js","sourceRoot":"","sources":["ActorQueryOperationCreate.ts"],"names":[],"mappings":";;;AACA,uEAAsG;AAMtG;;;GAGG;AACH,MAAa,yBAA0B,SAAQ,sDAAgD;IAG7F,YAAmB,IAAoC;QACrD,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACxB,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,SAAyB,EAAE,OAAuB;QAC3E,yCAAmB,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QAC7C,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,SAAyB,EAAE,OAAuB;QAE1E,+BAA+B;QAC/B,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC;YACzD,YAAY,EAAE;gBACZ,MAAM,EAAE,CAAE,SAAS,CAAC,MAAM,CAAE;gBAC5B,mBAAmB,EAAE,CAAC,SAAS,CAAC,MAAM;aACvC;YACD,OAAO;SACR,CAAC,CAAC;QAEH,OAAO;YACL,IAAI,EAAE,MAAM;YACZ,OAAO;SACR,CAAC;IACJ,CAAC;CACF;AA5BD,8DA4BC","sourcesContent":["import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { MediatorRdfUpdateQuads } from '@comunica/bus-rdf-update-quads';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A [Query Operation](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation) actor that\n * handles SPARQL create operations.\n */\nexport class ActorQueryOperationCreate extends ActorQueryOperationTypedMediated<Algebra.Create> {\n public readonly mediatorUpdateQuads: MediatorRdfUpdateQuads;\n\n public constructor(args: IActorQueryOperationCreateArgs) {\n super(args, 'create');\n }\n\n public async testOperation(operation: Algebra.Create, context: IActionContext): Promise<IActorTest> {\n ActorQueryOperation.throwOnReadOnly(context);\n return true;\n }\n\n public async runOperation(operation: Algebra.Create, context: IActionContext):\n Promise<IQueryOperationResult> {\n // Delegate to update-quads bus\n const { execute } = await this.mediatorUpdateQuads.mediate({\n createGraphs: {\n graphs: [ operation.source ],\n requireNonExistence: !operation.silent,\n },\n context,\n });\n\n return {\n type: 'void',\n execute,\n };\n }\n}\n\nexport interface IActorQueryOperationCreateArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * The RDF Update Quads mediator\n */\n mediatorUpdateQuads: MediatorRdfUpdateQuads;\n}\n"]}
package/package.json CHANGED
@@ -1,13 +1,9 @@
1
1
  {
2
2
  "name": "@comunica/actor-query-operation-update-create",
3
- "version": "3.2.4-alpha.47.0",
3
+ "version": "3.3.0",
4
4
  "description": "A create 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
- },
11
7
  "homepage": "https://comunica.dev/",
12
8
  "repository": {
13
9
  "type": "git",
@@ -41,12 +37,11 @@
41
37
  "build:components": "componentsjs-generator"
42
38
  },
43
39
  "dependencies": {
44
- "@comunica/bus-query-operation": "3.2.4-alpha.47.0",
45
- "@comunica/bus-rdf-update-quads": "3.2.4-alpha.47.0",
46
- "@comunica/core": "3.2.4-alpha.47.0",
47
- "@comunica/types": "3.2.4-alpha.47.0",
48
- "@comunica/utils-query-operation": "3.2.4-alpha.47.0",
49
- "sparqlalgebrajs": "^4.3.8"
40
+ "@comunica/bus-query-operation": "^3.3.0",
41
+ "@comunica/bus-rdf-update-quads": "^3.3.0",
42
+ "@comunica/core": "^3.3.0",
43
+ "@comunica/types": "^3.3.0",
44
+ "sparqlalgebrajs": "^4.3.7"
50
45
  },
51
- "gitHead": "85bd4c5cf07dfc293ebbc3a1416b70e2db8bfc48"
46
+ "gitHead": "02bde397d206f1f5a523643a6a604c89e792e2f9"
52
47
  }