@comunica/bus-function-factory 4.0.1-alpha.48.0 → 4.0.2

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.
@@ -105,6 +105,7 @@
105
105
  }
106
106
  ]
107
107
  },
108
+ "default": "Creation of function evaluator failed: no configured actor was able to evaluate function ${action.functionName}",
108
109
  "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
  },
110
111
  {
@@ -105,6 +105,7 @@
105
105
  }
106
106
  ]
107
107
  },
108
+ "default": "Creation of function evaluator failed: no configured actor was able to evaluate function ${action.functionName}",
108
109
  "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
  },
110
111
  {
@@ -16,7 +16,9 @@ import type { Algebra as Alg } from 'sparqlalgebrajs';
16
16
  */
17
17
  export declare abstract class ActorFunctionFactory<TS = undefined> extends Actor<IActionFunctionFactory, IActorTest, IActorFunctionFactoryOutput, TS> {
18
18
  /**
19
- * @param args - @defaultNested {<default_bus> a <cbff:components/BusFunctionFactory.jsonld#BusFunctionFactory>} bus
19
+ * @param args -
20
+ * \ @defaultNested {<default_bus> a <cbff:components/BusFunctionFactory.jsonld#BusFunctionFactory>} bus
21
+ * \ @defaultNested {Creation of function evaluator failed: no configured actor was able to evaluate function ${action.functionName}} busFailMessage
20
22
  */
21
23
  constructor(args: IActorFunctionFactoryArgs<TS>);
22
24
  abstract run<T extends IActionFunctionFactory>(action: T): Promise<T extends {
@@ -15,9 +15,13 @@ const core_1 = require("@comunica/core");
15
15
  * @see IActorFunctionFactoryOutput
16
16
  */
17
17
  class ActorFunctionFactory extends core_1.Actor {
18
+ /* eslint-disable max-len */
18
19
  /**
19
- * @param args - @defaultNested {<default_bus> a <cbff:components/BusFunctionFactory.jsonld#BusFunctionFactory>} bus
20
+ * @param args -
21
+ * \ @defaultNested {<default_bus> a <cbff:components/BusFunctionFactory.jsonld#BusFunctionFactory>} bus
22
+ * \ @defaultNested {Creation of function evaluator failed: no configured actor was able to evaluate function ${action.functionName}} busFailMessage
20
23
  */
24
+ /* eslint-enable max-len */
21
25
  constructor(args) {
22
26
  super(args);
23
27
  }
@@ -1 +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"]}
1
+ {"version":3,"file":"ActorFunctionFactory.js","sourceRoot":"","sources":["ActorFunctionFactory.ts"],"names":[],"mappings":";;;AACA,yCAAiD;AAIjD;;;;;;;;;;;GAWG;AACH,MAAsB,oBAAqC,SACzD,YAA0E;IAC1E,4BAA4B;IAC5B;;;;OAIG;IACH,2BAA2B;IAC3B,YAAmB,IAAmC;QACpD,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;CAIF;AAfD,oDAeC;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 /* eslint-disable max-len */\n /**\n * @param args -\n * \\ @defaultNested {<default_bus> a <cbff:components/BusFunctionFactory.jsonld#BusFunctionFactory>} bus\n * \\ @defaultNested {Creation of function evaluator failed: no configured actor was able to evaluate function ${action.functionName}} busFailMessage\n */\n /* eslint-enable max-len */\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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comunica/bus-function-factory",
3
- "version": "4.0.1-alpha.48.0",
3
+ "version": "4.0.2",
4
4
  "description": "A comunica bus for function factory events.",
5
5
  "lsd:module": true,
6
6
  "license": "MIT",
@@ -36,11 +36,11 @@
36
36
  "build:components": "componentsjs-generator"
37
37
  },
38
38
  "dependencies": {
39
- "@comunica/context-entries": "4.0.1-alpha.48.0",
40
- "@comunica/core": "4.0.1-alpha.48.0",
41
- "@comunica/types": "4.0.1-alpha.48.0",
42
- "@comunica/utils-expression-evaluator": "4.0.1-alpha.48.0",
39
+ "@comunica/context-entries": "^4.0.2",
40
+ "@comunica/core": "^4.0.2",
41
+ "@comunica/types": "^4.0.2",
42
+ "@comunica/utils-expression-evaluator": "^4.0.2",
43
43
  "sparqlalgebrajs": "^4.2.0"
44
44
  },
45
- "gitHead": "4cc37905eab2c94a2e1d9cee0f51c53604f07da1"
45
+ "gitHead": "b60deab76821557f8d027208ab743d3c66fc60ea"
46
46
  }