@versori/run 0.5.0 → 0.5.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.
- package/esm/mod.d.ts +1 -1
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +1 -1
- package/esm/src/connection/VanillaConnectionFactory.d.ts +16 -0
- package/esm/src/connection/VanillaConnectionFactory.d.ts.map +1 -0
- package/esm/src/connection/VanillaConnectionFactory.js +35 -0
- package/esm/src/context/ActivationImpl.d.ts +2 -1
- package/esm/src/context/ActivationImpl.d.ts.map +1 -1
- package/esm/src/context/Context.d.ts +2 -1
- package/esm/src/context/Context.d.ts.map +1 -1
- package/esm/src/context/ContextProvider.d.ts +8 -8
- package/esm/src/context/ContextProvider.d.ts.map +1 -1
- package/esm/src/context/ContextProvider.js +1 -1
- package/esm/src/context/VanillaContext.d.ts +63 -0
- package/esm/src/context/VanillaContext.d.ts.map +1 -0
- package/esm/src/context/VanillaContext.js +313 -0
- package/esm/src/context/WorkflowClient.d.ts +2 -2
- package/esm/src/context/WorkflowClient.d.ts.map +1 -1
- package/esm/src/dsl/http/mod.d.ts +1 -1
- package/esm/src/dsl/http/mod.d.ts.map +1 -1
- package/esm/src/dsl/http/types.d.ts +20 -134
- package/esm/src/dsl/http/types.d.ts.map +1 -1
- package/esm/src/dsl/http/versori/configloader.d.ts.map +1 -1
- package/esm/src/dsl/http/versori/configloader.js +3 -0
- package/esm/src/dsl/http/versori/webhookmiddleware.d.ts +1 -1
- package/esm/src/dsl/http/versori/webhookmiddleware.d.ts.map +1 -1
- package/esm/src/dsl/tasks/HttpTask.d.ts +4 -4
- package/esm/src/dsl/tasks/HttpTask.d.ts.map +1 -1
- package/esm/src/dsl/triggers/ScheduleTrigger.d.ts +2 -2
- package/esm/src/dsl/triggers/ScheduleTrigger.d.ts.map +1 -1
- package/esm/src/interpreter/durable/DurableInterpreter.d.ts +1 -0
- package/esm/src/interpreter/durable/DurableInterpreter.d.ts.map +1 -1
- package/esm/src/interpreter/durable/DurableInterpreter.js +24 -7
- package/esm/src/interpreter/durable/Queue.d.ts +1 -1
- package/esm/src/interpreter/durable/Queue.js +1 -1
- package/esm/src/interpreter/durable/compilers/durableworkflow.d.ts.map +1 -1
- package/esm/src/interpreter/durable/compilers/durableworkflow.js +2 -1
- package/esm/src/interpreter/durable/compilers/fn.d.ts.map +1 -1
- package/esm/src/interpreter/durable/compilers/fn.js +7 -4
- package/esm/src/interpreter/durable/compilers/webhook.d.ts.map +1 -1
- package/esm/src/interpreter/durable/compilers/webhook.js +7 -6
- package/esm/src/interpreter/memory/MemoryInterpreter.d.ts +3 -2
- package/esm/src/interpreter/memory/MemoryInterpreter.d.ts.map +1 -1
- package/esm/src/interpreter/memory/MemoryInterpreter.js +24 -7
- package/esm/src/interpreter/memory/compilers/fn.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/fn.js +7 -4
- package/esm/src/interpreter/memory/compilers/schedule.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/webhook.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/webhook.js +7 -6
- package/esm/src/interpreter/mod.d.ts +1 -0
- package/esm/src/interpreter/mod.d.ts.map +1 -1
- package/esm/src/interpreter/mod.js +1 -0
- package/esm/src/interpreter/vanilla/ExecutionError.d.ts +25 -0
- package/esm/src/interpreter/vanilla/ExecutionError.d.ts.map +1 -0
- package/esm/src/interpreter/vanilla/ExecutionError.js +46 -0
- package/esm/src/interpreter/vanilla/ObservableCompiler.d.ts +38 -0
- package/esm/src/interpreter/vanilla/ObservableCompiler.d.ts.map +1 -0
- package/esm/src/interpreter/vanilla/ObservableCompiler.js +95 -0
- package/esm/src/interpreter/vanilla/VanillaInterpreter.d.ts +96 -0
- package/esm/src/interpreter/vanilla/VanillaInterpreter.d.ts.map +1 -0
- package/esm/src/interpreter/vanilla/VanillaInterpreter.js +435 -0
- package/esm/src/interpreter/vanilla/compilers/background.d.ts +4 -0
- package/esm/src/interpreter/vanilla/compilers/background.d.ts.map +1 -0
- package/esm/src/interpreter/vanilla/compilers/background.js +34 -0
- package/esm/src/interpreter/vanilla/compilers/catch.d.ts +4 -0
- package/esm/src/interpreter/vanilla/compilers/catch.d.ts.map +1 -0
- package/esm/src/interpreter/vanilla/compilers/catch.js +75 -0
- package/esm/src/interpreter/vanilla/compilers/chain.d.ts +3 -0
- package/esm/src/interpreter/vanilla/compilers/chain.d.ts.map +1 -0
- package/esm/src/interpreter/vanilla/compilers/chain.js +21 -0
- package/esm/src/interpreter/vanilla/compilers/durableworkflow.d.ts +8 -0
- package/esm/src/interpreter/vanilla/compilers/durableworkflow.d.ts.map +1 -0
- package/esm/src/interpreter/vanilla/compilers/durableworkflow.js +91 -0
- package/esm/src/interpreter/vanilla/compilers/fn.d.ts +4 -0
- package/esm/src/interpreter/vanilla/compilers/fn.d.ts.map +1 -0
- package/esm/src/interpreter/vanilla/compilers/fn.js +37 -0
- package/esm/src/interpreter/vanilla/compilers/http.d.ts +4 -0
- package/esm/src/interpreter/vanilla/compilers/http.d.ts.map +1 -0
- package/esm/src/interpreter/vanilla/compilers/http.js +54 -0
- package/esm/src/interpreter/vanilla/compilers/mod.d.ts +2 -0
- package/esm/src/interpreter/vanilla/compilers/mod.d.ts.map +1 -0
- package/esm/src/interpreter/vanilla/compilers/mod.js +13 -0
- package/esm/src/interpreter/vanilla/compilers/parallel.d.ts +4 -0
- package/esm/src/interpreter/vanilla/compilers/parallel.d.ts.map +1 -0
- package/esm/src/interpreter/vanilla/compilers/parallel.js +31 -0
- package/esm/src/interpreter/vanilla/compilers/schedule.d.ts +4 -0
- package/esm/src/interpreter/vanilla/compilers/schedule.d.ts.map +1 -0
- package/esm/src/interpreter/vanilla/compilers/schedule.js +76 -0
- package/esm/src/interpreter/vanilla/compilers/serial.d.ts +4 -0
- package/esm/src/interpreter/vanilla/compilers/serial.d.ts.map +1 -0
- package/esm/src/interpreter/vanilla/compilers/serial.js +28 -0
- package/esm/src/interpreter/vanilla/compilers/types.d.ts +15 -0
- package/esm/src/interpreter/vanilla/compilers/types.d.ts.map +1 -0
- package/esm/src/interpreter/vanilla/compilers/types.js +13 -0
- package/esm/src/interpreter/vanilla/compilers/unpack.d.ts +4 -0
- package/esm/src/interpreter/vanilla/compilers/unpack.d.ts.map +1 -0
- package/esm/src/interpreter/vanilla/compilers/unpack.js +34 -0
- package/esm/src/interpreter/vanilla/compilers/webhook.d.ts +4 -0
- package/esm/src/interpreter/vanilla/compilers/webhook.d.ts.map +1 -0
- package/esm/src/interpreter/vanilla/compilers/webhook.js +261 -0
- package/esm/src/interpreter/vanilla/mod.d.ts +3 -0
- package/esm/src/interpreter/vanilla/mod.d.ts.map +1 -0
- package/esm/src/interpreter/vanilla/mod.js +14 -0
- package/esm/src/issues/Issues.d.ts.map +1 -1
- package/esm/src/observability/logging/ConsoleLogger.d.ts +1 -1
- package/esm/src/observability/logging/ConsoleLogger.d.ts.map +1 -1
- package/esm/src/observability/logging/ConsoleLogger.js +11 -1
- package/esm/src/services/platform/generated/core/pathSerializer.gen.d.ts +2 -2
- package/package.json +1 -1
- package/script/mod.d.ts +1 -1
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +2 -1
- package/script/src/connection/VanillaConnectionFactory.d.ts +16 -0
- package/script/src/connection/VanillaConnectionFactory.d.ts.map +1 -0
- package/script/src/connection/VanillaConnectionFactory.js +40 -0
- package/script/src/context/ActivationImpl.d.ts +2 -1
- package/script/src/context/ActivationImpl.d.ts.map +1 -1
- package/script/src/context/Context.d.ts +2 -1
- package/script/src/context/Context.d.ts.map +1 -1
- package/script/src/context/ContextProvider.d.ts +8 -8
- package/script/src/context/ContextProvider.d.ts.map +1 -1
- package/script/src/context/ContextProvider.js +1 -1
- package/script/src/context/VanillaContext.d.ts +63 -0
- package/script/src/context/VanillaContext.d.ts.map +1 -0
- package/script/src/context/VanillaContext.js +319 -0
- package/script/src/context/WorkflowClient.d.ts +2 -2
- package/script/src/context/WorkflowClient.d.ts.map +1 -1
- package/script/src/dsl/http/mod.d.ts +1 -1
- package/script/src/dsl/http/mod.d.ts.map +1 -1
- package/script/src/dsl/http/types.d.ts +20 -134
- package/script/src/dsl/http/types.d.ts.map +1 -1
- package/script/src/dsl/http/versori/configloader.d.ts.map +1 -1
- package/script/src/dsl/http/versori/configloader.js +3 -0
- package/script/src/dsl/http/versori/webhookmiddleware.d.ts +1 -1
- package/script/src/dsl/http/versori/webhookmiddleware.d.ts.map +1 -1
- package/script/src/dsl/tasks/HttpTask.d.ts +4 -4
- package/script/src/dsl/tasks/HttpTask.d.ts.map +1 -1
- package/script/src/dsl/triggers/ScheduleTrigger.d.ts +2 -2
- package/script/src/dsl/triggers/ScheduleTrigger.d.ts.map +1 -1
- package/script/src/interpreter/durable/DurableInterpreter.d.ts +1 -0
- package/script/src/interpreter/durable/DurableInterpreter.d.ts.map +1 -1
- package/script/src/interpreter/durable/DurableInterpreter.js +24 -7
- package/script/src/interpreter/durable/Queue.d.ts +1 -1
- package/script/src/interpreter/durable/Queue.js +1 -1
- package/script/src/interpreter/durable/compilers/durableworkflow.d.ts.map +1 -1
- package/script/src/interpreter/durable/compilers/durableworkflow.js +2 -1
- package/script/src/interpreter/durable/compilers/fn.d.ts.map +1 -1
- package/script/src/interpreter/durable/compilers/fn.js +7 -4
- package/script/src/interpreter/durable/compilers/webhook.d.ts.map +1 -1
- package/script/src/interpreter/durable/compilers/webhook.js +7 -6
- package/script/src/interpreter/memory/MemoryInterpreter.d.ts +3 -2
- package/script/src/interpreter/memory/MemoryInterpreter.d.ts.map +1 -1
- package/script/src/interpreter/memory/MemoryInterpreter.js +24 -7
- package/script/src/interpreter/memory/compilers/fn.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/fn.js +7 -4
- package/script/src/interpreter/memory/compilers/schedule.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/webhook.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/webhook.js +7 -6
- package/script/src/interpreter/mod.d.ts +1 -0
- package/script/src/interpreter/mod.d.ts.map +1 -1
- package/script/src/interpreter/mod.js +2 -1
- package/script/src/interpreter/vanilla/ExecutionError.d.ts +25 -0
- package/script/src/interpreter/vanilla/ExecutionError.d.ts.map +1 -0
- package/script/src/interpreter/vanilla/ExecutionError.js +50 -0
- package/script/src/interpreter/vanilla/ObservableCompiler.d.ts +38 -0
- package/script/src/interpreter/vanilla/ObservableCompiler.d.ts.map +1 -0
- package/script/src/interpreter/vanilla/ObservableCompiler.js +99 -0
- package/script/src/interpreter/vanilla/VanillaInterpreter.d.ts +96 -0
- package/script/src/interpreter/vanilla/VanillaInterpreter.d.ts.map +1 -0
- package/script/src/interpreter/vanilla/VanillaInterpreter.js +442 -0
- package/script/src/interpreter/vanilla/compilers/background.d.ts +4 -0
- package/script/src/interpreter/vanilla/compilers/background.d.ts.map +1 -0
- package/script/src/interpreter/vanilla/compilers/background.js +37 -0
- package/script/src/interpreter/vanilla/compilers/catch.d.ts +4 -0
- package/script/src/interpreter/vanilla/compilers/catch.d.ts.map +1 -0
- package/script/src/interpreter/vanilla/compilers/catch.js +78 -0
- package/script/src/interpreter/vanilla/compilers/chain.d.ts +3 -0
- package/script/src/interpreter/vanilla/compilers/chain.d.ts.map +1 -0
- package/script/src/interpreter/vanilla/compilers/chain.js +24 -0
- package/script/src/interpreter/vanilla/compilers/durableworkflow.d.ts +8 -0
- package/script/src/interpreter/vanilla/compilers/durableworkflow.d.ts.map +1 -0
- package/script/src/interpreter/vanilla/compilers/durableworkflow.js +95 -0
- package/script/src/interpreter/vanilla/compilers/fn.d.ts +4 -0
- package/script/src/interpreter/vanilla/compilers/fn.d.ts.map +1 -0
- package/script/src/interpreter/vanilla/compilers/fn.js +40 -0
- package/script/src/interpreter/vanilla/compilers/http.d.ts +4 -0
- package/script/src/interpreter/vanilla/compilers/http.d.ts.map +1 -0
- package/script/src/interpreter/vanilla/compilers/http.js +57 -0
- package/script/src/interpreter/vanilla/compilers/mod.d.ts +2 -0
- package/script/src/interpreter/vanilla/compilers/mod.d.ts.map +1 -0
- package/script/src/interpreter/vanilla/compilers/mod.js +14 -0
- package/script/src/interpreter/vanilla/compilers/parallel.d.ts +4 -0
- package/script/src/interpreter/vanilla/compilers/parallel.d.ts.map +1 -0
- package/script/src/interpreter/vanilla/compilers/parallel.js +34 -0
- package/script/src/interpreter/vanilla/compilers/schedule.d.ts +4 -0
- package/script/src/interpreter/vanilla/compilers/schedule.d.ts.map +1 -0
- package/script/src/interpreter/vanilla/compilers/schedule.js +79 -0
- package/script/src/interpreter/vanilla/compilers/serial.d.ts +4 -0
- package/script/src/interpreter/vanilla/compilers/serial.d.ts.map +1 -0
- package/script/src/interpreter/vanilla/compilers/serial.js +31 -0
- package/script/src/interpreter/vanilla/compilers/types.d.ts +15 -0
- package/script/src/interpreter/vanilla/compilers/types.d.ts.map +1 -0
- package/script/src/interpreter/vanilla/compilers/types.js +14 -0
- package/script/src/interpreter/vanilla/compilers/unpack.d.ts +4 -0
- package/script/src/interpreter/vanilla/compilers/unpack.d.ts.map +1 -0
- package/script/src/interpreter/vanilla/compilers/unpack.js +37 -0
- package/script/src/interpreter/vanilla/compilers/webhook.d.ts +4 -0
- package/script/src/interpreter/vanilla/compilers/webhook.d.ts.map +1 -0
- package/script/src/interpreter/vanilla/compilers/webhook.js +267 -0
- package/script/src/interpreter/vanilla/mod.d.ts +3 -0
- package/script/src/interpreter/vanilla/mod.d.ts.map +1 -0
- package/script/src/interpreter/vanilla/mod.js +30 -0
- package/script/src/issues/Issues.d.ts.map +1 -1
- package/script/src/observability/logging/ConsoleLogger.d.ts +1 -1
- package/script/src/observability/logging/ConsoleLogger.d.ts.map +1 -1
- package/script/src/observability/logging/ConsoleLogger.js +11 -1
- package/script/src/services/platform/generated/core/pathSerializer.gen.d.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpTask.d.ts","sourceRoot":"","sources":["../../../../src/src/dsl/tasks/HttpTask.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,KAA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,CAAC,aAAa,CAAC;IAI7E,WAAW,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE;QACtC,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,cAAc,CAAC,EAAE,MAAM,CAAC;KAC3B,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;IAIzB,QAAQ,CAAC,WAAW,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhD,OAAO,IAAI,OAAO,CAAC,OAAO,GAAG,SAAS;IAItC,cAAc,IAAI,iBAAiB;CAGtC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,IAAI,CAAC,EAAE,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,EAAE,UAAU,GAAG,OAAO,EAC1D,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,WAAW,CAAC,UAAU,CAAC,EAC7B,EAAE,EAAE,eAAe,CAAC,EAAE,EAAE,GAAG,EAAE,UAAU,CAAC,GACzC,IAAI,CAAC,EAAE,EAAE,GAAG,CAAC,CAEf"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ActivationInterface } from '../http/types.js';
|
|
2
2
|
import { Taskable } from '../Task.js';
|
|
3
3
|
import { Trigger, TriggerType } from '../Trigger.js';
|
|
4
4
|
import { Workflow } from '../Workflow.js';
|
|
@@ -15,7 +15,7 @@ export type PrebuiltPredicate = 'all';
|
|
|
15
15
|
* ActivationPredicate determines which user activations should trigger the workflow. Can be either a built-in
|
|
16
16
|
* predicate like 'all', or a custom function that receives an activation and returns a boolean.
|
|
17
17
|
*/
|
|
18
|
-
export type ActivationPredicate = PrebuiltPredicate | ((a?:
|
|
18
|
+
export type ActivationPredicate = PrebuiltPredicate | ((a?: ActivationInterface) => boolean);
|
|
19
19
|
export declare class ScheduleTrigger implements Trigger<ScheduleData> {
|
|
20
20
|
id: string;
|
|
21
21
|
[TriggerType]: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduleTrigger.d.ts","sourceRoot":"","sources":["../../../../src/src/dsl/triggers/ScheduleTrigger.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ScheduleTrigger.d.ts","sourceRoot":"","sources":["../../../../src/src/dsl/triggers/ScheduleTrigger.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAgB,MAAM,gBAAgB,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAEjD;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC;AAEtC;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,mBAAmB,KAAK,OAAO,CAAC,CAAC;AAE7F,qBAAa,eAAgB,YAAW,OAAO,CAAC,YAAY,CAAC;IACzD,EAAE,EAAE,MAAM,CAAC;IAEX,CAAC,WAAW,CAAC,EAAE,MAAM,CAAc;IAEnC,QAAQ,EAAE,MAAM,CAAC;IAEjB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;gBAE9B,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,mBAAmB,CAAC,EAAE,mBAAmB;IAMnF,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAC,YAAY,EAAE,EAAE,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC;IAIxD,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,GAAG,QAAQ,CAAC,EAAE,CAAC;CAGvC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,QAAQ,CACpB,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,EAChB,mBAAmB,CAAC,EAAE,mBAAmB,GAC1C,QAAQ,CAAC,YAAY,CAAC,CAExB"}
|
|
@@ -39,6 +39,7 @@ export type DurableInterpreterOptions = {
|
|
|
39
39
|
skipVersoriCredentials?: boolean;
|
|
40
40
|
};
|
|
41
41
|
type Registration = {
|
|
42
|
+
triggerName: string;
|
|
42
43
|
trigger$: Observable<ContextImpl<any, void>>;
|
|
43
44
|
task$: ContextOperatorFunction<any, any, any>;
|
|
44
45
|
localAbortController: AbortController;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DurableInterpreter.d.ts","sourceRoot":"","sources":["../../../../src/src/interpreter/durable/DurableInterpreter.ts"],"names":[],"mappings":"AAaA,OAAsB,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAG3D,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAgB,EAAqB,MAAM,EAAE,MAAM,SAAS,CAAC;AAE7D,OAAO,EAA+B,UAAU,EAAM,YAAY,EAAO,MAAM,MAAM,CAAC;AAEtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAuB,MAAM,kCAAkC,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAarE,OAAO,EAAE,QAAQ,EAAgB,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAa,MAAM,wBAAwB,CAAC;AAK7D,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAmB,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,E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,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IA2MtB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CASxB"}
|
|
@@ -189,7 +189,7 @@ class DurableInterpreter {
|
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
static async newInstance(options = {}) {
|
|
192
|
-
const log = options.logger || new ConsoleLogger_js_1.ConsoleLogger(
|
|
192
|
+
const log = options.logger || new ConsoleLogger_js_1.ConsoleLogger();
|
|
193
193
|
const compiler = options.compiler || new ObservableCompiler_js_1.ObservableCompiler();
|
|
194
194
|
const serviceName = Deno.env.get(constants_js_1.envVarProjectId) || 'example-service';
|
|
195
195
|
const environmentID = Deno.env.get(constants_js_1.envVarEnvId) || 'development';
|
|
@@ -246,7 +246,10 @@ class DurableInterpreter {
|
|
|
246
246
|
if (!(workflow instanceof Workflow_js_1.WorkflowImpl)) {
|
|
247
247
|
throw new Error('workflow is not an instance of WorkflowImpl');
|
|
248
248
|
}
|
|
249
|
-
|
|
249
|
+
const triggerName = 'id' in workflow.trigger && typeof workflow.trigger.id === 'string'
|
|
250
|
+
? workflow.trigger.id
|
|
251
|
+
: workflow.trigger.constructor.name;
|
|
252
|
+
this.log.info('DurableInterpreter.register', { workflow, triggerName });
|
|
250
253
|
const compilerContext = {
|
|
251
254
|
compiler: this.compiler,
|
|
252
255
|
log: this.log,
|
|
@@ -265,11 +268,12 @@ class DurableInterpreter {
|
|
|
265
268
|
const trigger$ = this.compiler.compileTrigger(compilerContext, workflow.trigger, combinedSignal);
|
|
266
269
|
const task$ = this.compiler.compileTask(compilerContext, workflow.task);
|
|
267
270
|
const registration = {
|
|
271
|
+
triggerName,
|
|
268
272
|
trigger$,
|
|
269
273
|
task$,
|
|
270
274
|
localAbortController,
|
|
271
275
|
sigintListener: () => {
|
|
272
|
-
this.log.info('Received SIGINT, shutting down workflow');
|
|
276
|
+
this.log.info('Received SIGINT, shutting down workflow', { triggerName });
|
|
273
277
|
localAbortController.abort();
|
|
274
278
|
},
|
|
275
279
|
};
|
|
@@ -297,16 +301,22 @@ class DurableInterpreter {
|
|
|
297
301
|
Deno.addSignalListener('SIGINT', registration.sigintListener);
|
|
298
302
|
registration.subscription = registration.trigger$
|
|
299
303
|
.pipe((0, rxjs_1.tap)((ctx) => {
|
|
300
|
-
ctx.log.info('DurableInterpreter.executionStarted', {
|
|
304
|
+
ctx.log.info('DurableInterpreter.executionStarted', {
|
|
305
|
+
triggerName: registration.triggerName,
|
|
306
|
+
});
|
|
301
307
|
}), (0, rxjs_1.mergeMap)((ctx) => (0, rxjs_1.of)(ctx).pipe(registration.task$, (0, rxjs_1.catchError)((err) => {
|
|
302
308
|
ctx.log.error('DurableInterpreter.executionError', {
|
|
309
|
+
triggerName: registration.triggerName,
|
|
303
310
|
error: err instanceof Error ? err.toString() : err,
|
|
304
311
|
});
|
|
305
312
|
try {
|
|
306
313
|
ctx.options.onError?.(ctx.withData(err));
|
|
307
314
|
}
|
|
308
315
|
catch (err) {
|
|
309
|
-
ctx.log.error('DurableInterpreter.onErrorError: failed to call onError handler', {
|
|
316
|
+
ctx.log.error('DurableInterpreter.onErrorError: failed to call onError handler', {
|
|
317
|
+
triggerName: registration.triggerName,
|
|
318
|
+
error: err instanceof Error ? err.toString() : err,
|
|
319
|
+
});
|
|
310
320
|
ctx.options.onError?.(ctx.withData({
|
|
311
321
|
message: 'Internal server error',
|
|
312
322
|
error: err instanceof Error ? err.toString() : err,
|
|
@@ -318,13 +328,17 @@ class DurableInterpreter {
|
|
|
318
328
|
next: (ctx) => {
|
|
319
329
|
const durationMs = Date.now() - ctx.startTime.getTime();
|
|
320
330
|
ctx.log.info('DurableInterpreter.executionCompleted', {
|
|
331
|
+
triggerName: registration.triggerName,
|
|
321
332
|
durationMs,
|
|
322
333
|
});
|
|
323
334
|
try {
|
|
324
335
|
ctx.options.onSuccess?.(ctx);
|
|
325
336
|
}
|
|
326
337
|
catch (err) {
|
|
327
|
-
ctx.log.error('DurableInterpreter.onSuccessError: failed to call onSuccess handler', {
|
|
338
|
+
ctx.log.error('DurableInterpreter.onSuccessError: failed to call onSuccess handler', {
|
|
339
|
+
triggerName: registration.triggerName,
|
|
340
|
+
error: err instanceof Error ? err.toString() : err,
|
|
341
|
+
});
|
|
328
342
|
ctx.options.onSuccess?.(ctx.withData({
|
|
329
343
|
message: 'Internal server error',
|
|
330
344
|
error: err instanceof Error ? err.toString() : err,
|
|
@@ -334,12 +348,15 @@ class DurableInterpreter {
|
|
|
334
348
|
},
|
|
335
349
|
error: (err) => {
|
|
336
350
|
this.log.error('DurableInterpreter.error', {
|
|
351
|
+
triggerName: registration.triggerName,
|
|
337
352
|
error: err instanceof Error ? err.toString() : err,
|
|
338
353
|
});
|
|
339
354
|
Deno.removeSignalListener('SIGINT', registration.sigintListener);
|
|
340
355
|
},
|
|
341
356
|
complete: () => {
|
|
342
|
-
this.log.info('DurableInterpreter.workflowCompleted'
|
|
357
|
+
this.log.info('DurableInterpreter.workflowCompleted', {
|
|
358
|
+
triggerName: registration.triggerName,
|
|
359
|
+
});
|
|
343
360
|
Deno.removeSignalListener('SIGINT', registration.sigintListener);
|
|
344
361
|
},
|
|
345
362
|
});
|
|
@@ -48,7 +48,7 @@ class QueueImpl {
|
|
|
48
48
|
}
|
|
49
49
|
static fromEnv(log) {
|
|
50
50
|
const baseUrl = Deno.env.get(constants_js_1.envVarSDKApiBaseURL);
|
|
51
|
-
const _log = log || new mod_js_1.ConsoleLogger(
|
|
51
|
+
const _log = log || new mod_js_1.ConsoleLogger();
|
|
52
52
|
const projectId = Deno.env.get(constants_js_1.envVarProjectId) || 'default-project';
|
|
53
53
|
const environmentId = Deno.env.get(constants_js_1.envVarEnvId) || 'default-environment';
|
|
54
54
|
if (!baseUrl) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"durableworkflow.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/durable/compilers/durableworkflow.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAW,WAAW,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EACH,mBAAmB,EACnB,sBAAsB,EACzB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,wBAAgB,sBAAsB,CAClC,GAAG,EAAE,sBAAsB,EAC3B,OAAO,EAAE,sBAAsB,EAC/B,MAAM,EAAE,WAAW,GACpB,UAAU,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"durableworkflow.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/durable/compilers/durableworkflow.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAW,WAAW,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EACH,mBAAmB,EACnB,sBAAsB,EACzB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,wBAAgB,sBAAsB,CAClC,GAAG,EAAE,sBAAsB,EAC3B,OAAO,EAAE,sBAAsB,EAC/B,MAAM,EAAE,WAAW,GACpB,UAAU,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC,CA2F9C;AAED,eAAO,MAAM,uBAAuB,EAAE,eAAe,CAAC,mBAAmB,EAAE,sBAAsB,CAIhG,CAAC"}
|
|
@@ -44,7 +44,8 @@ function compileDurableWorkflow(ctx, trigger, signal) {
|
|
|
44
44
|
continue;
|
|
45
45
|
}
|
|
46
46
|
for (const wf of wfs.workflows) {
|
|
47
|
-
const
|
|
47
|
+
const payload = wf.payload ? atob(wf.payload) : '{}';
|
|
48
|
+
const data = JSON.parse(payload);
|
|
48
49
|
let activation;
|
|
49
50
|
if (wf.metadata?.activationId) {
|
|
50
51
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fn.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/durable/compilers/fn.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAEtD,OAAO,EAA2B,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"fn.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/durable/compilers/fn.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAEtD,OAAO,EAA2B,YAAY,EAAE,MAAM,YAAY,CAAC;AAiCnE,eAAO,MAAM,UAAU,EAAE,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAG/D,CAAC"}
|
|
@@ -22,12 +22,15 @@ function compileFn(compilerCtx, task) {
|
|
|
22
22
|
return await compilerCtx.tracer.startActiveSpan(`fn-${task.id}`, async (span) => {
|
|
23
23
|
span.setAttribute('task.id', task.id);
|
|
24
24
|
span.setAttribute('execution.id', ctx.executionId);
|
|
25
|
-
|
|
25
|
+
try {
|
|
26
|
+
if (typeof ctx.idx === 'number') {
|
|
27
|
+
return ctx.withData(await task._fn(ctx, ctx.idx));
|
|
28
|
+
}
|
|
29
|
+
return ctx.withData(await task._fn(ctx));
|
|
30
|
+
}
|
|
31
|
+
finally {
|
|
26
32
|
span.end();
|
|
27
|
-
return ctx.withData(await task._fn(ctx, ctx.idx));
|
|
28
33
|
}
|
|
29
|
-
span.end();
|
|
30
|
-
return ctx.withData(await task._fn(ctx));
|
|
31
34
|
});
|
|
32
35
|
}));
|
|
33
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/durable/compilers/webhook.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAGtF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAuD7C,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,WAAW,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/durable/compilers/webhook.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAGtF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAuD7C,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,WAAW,EAAE,cAAc,CAySxE,CAAC"}
|
|
@@ -102,12 +102,13 @@ exports.webhookCompiler = {
|
|
|
102
102
|
},
|
|
103
103
|
request: req,
|
|
104
104
|
});
|
|
105
|
+
const routeMiddleware = [];
|
|
105
106
|
if (!trigger.options.request?.rawBody) {
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
routeMiddleware.push(express_1.default.json({ limit: '50mb', type: ['application/json', '*/*+json'] }));
|
|
108
|
+
routeMiddleware.push((0, express_xml_bodyparser_1.default)(xml2jsDefaults));
|
|
108
109
|
}
|
|
109
110
|
else {
|
|
110
|
-
|
|
111
|
+
routeMiddleware.push(express_1.default.raw({ type: '*/*', limit: '50mb' }));
|
|
111
112
|
}
|
|
112
113
|
return new rxjs_1.Observable((subscriber) => {
|
|
113
114
|
if (!ctx.webhookRouter) {
|
|
@@ -124,7 +125,7 @@ exports.webhookCompiler = {
|
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
127
|
// endpoint for sans user because I'm not quite sure how the dynamic routing works
|
|
127
|
-
ctx.webhookRouter[method](`/${trigger.id}`, (0, webhookmiddleware_js_1.createStaticWebhookMiddleware)({
|
|
128
|
+
ctx.webhookRouter[method](`/${trigger.id}`, ...routeMiddleware, (0, webhookmiddleware_js_1.createStaticWebhookMiddleware)({
|
|
128
129
|
id: trigger.id,
|
|
129
130
|
connName: trigger.options.connection,
|
|
130
131
|
organisationId: ctx.organisationId,
|
|
@@ -160,7 +161,7 @@ exports.webhookCompiler = {
|
|
|
160
161
|
});
|
|
161
162
|
});
|
|
162
163
|
// this endpoint will trigger the workflow for each activation given by the external user ID
|
|
163
|
-
ctx.webhookRouter[method](`/${trigger.id}/users/:userId`, (0, webhookmiddleware_js_1.createUserIdDynamicWebhookMiddleware)({
|
|
164
|
+
ctx.webhookRouter[method](`/${trigger.id}/users/:userId`, ...routeMiddleware, (0, webhookmiddleware_js_1.createUserIdDynamicWebhookMiddleware)({
|
|
164
165
|
id: trigger.id,
|
|
165
166
|
connName: trigger.options.connection,
|
|
166
167
|
organisationId: ctx.organisationId,
|
|
@@ -216,7 +217,7 @@ exports.webhookCompiler = {
|
|
|
216
217
|
});
|
|
217
218
|
});
|
|
218
219
|
// this endpoint will trigger the workflow only for the activation given by its ID
|
|
219
|
-
ctx.webhookRouter[method](`/${trigger.id}/activations/:activationId`, (0, webhookmiddleware_js_1.createActIdDynamicWebhookMiddleware)({
|
|
220
|
+
ctx.webhookRouter[method](`/${trigger.id}/activations/:activationId`, ...routeMiddleware, (0, webhookmiddleware_js_1.createActIdDynamicWebhookMiddleware)({
|
|
220
221
|
id: trigger.id,
|
|
221
222
|
organisationId: ctx.organisationId,
|
|
222
223
|
environmentId: Deno.env.get(constants_js_1.envVarEnvId) ?? '',
|
|
@@ -4,7 +4,7 @@ import { Router } from 'express';
|
|
|
4
4
|
import { Observable, Subscription } from 'rxjs';
|
|
5
5
|
import { DirectConnectionFactory } from '../../connection/DirectConnectionFactory.js';
|
|
6
6
|
import { ContextImpl } from '../../context/Context.js';
|
|
7
|
-
import { ContextProvider } from '../../context/ContextProvider.js';
|
|
7
|
+
import { ContextProvider, ContextProviderImpl } from '../../context/ContextProvider.js';
|
|
8
8
|
import { ConfigReader, CronProvider } from '../../dsl/http/types.js';
|
|
9
9
|
import { Workflow } from '../../dsl/Workflow.js';
|
|
10
10
|
import { IssueAPI } from '../../issues/Issues.js';
|
|
@@ -26,7 +26,7 @@ export type MemoryInterpreterOptions = {
|
|
|
26
26
|
/**
|
|
27
27
|
* Custom context provider. Advanced use only.
|
|
28
28
|
*/
|
|
29
|
-
contextProvider?:
|
|
29
|
+
contextProvider?: ContextProviderImpl;
|
|
30
30
|
/**
|
|
31
31
|
* Abort signal to cancel workflow execution.
|
|
32
32
|
*/
|
|
@@ -37,6 +37,7 @@ export type MemoryInterpreterOptions = {
|
|
|
37
37
|
skipVersoriCredentials?: boolean;
|
|
38
38
|
};
|
|
39
39
|
type Registration = {
|
|
40
|
+
triggerName: string;
|
|
40
41
|
trigger$: Observable<ContextImpl<any, void>>;
|
|
41
42
|
task$: ContextOperatorFunction<any, any, any>;
|
|
42
43
|
localAbortController: AbortController;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemoryInterpreter.d.ts","sourceRoot":"","sources":["../../../../src/src/interpreter/memory/MemoryInterpreter.ts"],"names":[],"mappings":"AAaA,OAAsB,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAG3D,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAgB,EAAqB,MAAM,EAAE,MAAM,SAAS,CAAC;AAE7D,OAAO,EAA+B,UAAU,EAAM,YAAY,EAAO,MAAM,MAAM,CAAC;AAEtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"MemoryInterpreter.d.ts","sourceRoot":"","sources":["../../../../src/src/interpreter/memory/MemoryInterpreter.ts"],"names":[],"mappings":"AAaA,OAAsB,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAG3D,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAgB,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AO,CAAC,IAAI,CAAC;IA2MtB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CASxB"}
|
|
@@ -173,7 +173,7 @@ class MemoryInterpreter {
|
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
static async newInstance(options = {}) {
|
|
176
|
-
const log = options.logger || new ConsoleLogger_js_1.ConsoleLogger(
|
|
176
|
+
const log = options.logger || new ConsoleLogger_js_1.ConsoleLogger();
|
|
177
177
|
const compiler = options.compiler || new ObservableCompiler_js_1.ObservableCompiler();
|
|
178
178
|
const serviceName = Deno.env.get(constants_js_1.envVarProjectId) || 'example-service';
|
|
179
179
|
const environmentID = Deno.env.get(constants_js_1.envVarEnvId) || 'development';
|
|
@@ -229,7 +229,10 @@ class MemoryInterpreter {
|
|
|
229
229
|
if (!(workflow instanceof Workflow_js_1.WorkflowImpl)) {
|
|
230
230
|
throw new Error('workflow is not an instance of WorkflowImpl');
|
|
231
231
|
}
|
|
232
|
-
|
|
232
|
+
const triggerName = 'id' in workflow.trigger && typeof workflow.trigger.id === 'string'
|
|
233
|
+
? workflow.trigger.id
|
|
234
|
+
: workflow.trigger.constructor.name;
|
|
235
|
+
this.log.info('MemoryInterpreter.register', { workflow, triggerName });
|
|
233
236
|
const compilerContext = {
|
|
234
237
|
compiler: this.compiler,
|
|
235
238
|
log: this.log,
|
|
@@ -247,11 +250,12 @@ class MemoryInterpreter {
|
|
|
247
250
|
const trigger$ = this.compiler.compileTrigger(compilerContext, workflow.trigger, combinedSignal);
|
|
248
251
|
const task$ = this.compiler.compileTask(compilerContext, workflow.task);
|
|
249
252
|
const registration = {
|
|
253
|
+
triggerName,
|
|
250
254
|
trigger$,
|
|
251
255
|
task$,
|
|
252
256
|
localAbortController,
|
|
253
257
|
sigintListener: () => {
|
|
254
|
-
this.log.info('Received SIGINT, shutting down workflow');
|
|
258
|
+
this.log.info('Received SIGINT, shutting down workflow', { triggerName });
|
|
255
259
|
localAbortController.abort();
|
|
256
260
|
},
|
|
257
261
|
};
|
|
@@ -279,16 +283,22 @@ class MemoryInterpreter {
|
|
|
279
283
|
Deno.addSignalListener('SIGINT', registration.sigintListener);
|
|
280
284
|
registration.subscription = registration.trigger$
|
|
281
285
|
.pipe((0, rxjs_1.tap)((ctx) => {
|
|
282
|
-
ctx.log.info('MemoryInterpreter.executionStarted', {
|
|
286
|
+
ctx.log.info('MemoryInterpreter.executionStarted', {
|
|
287
|
+
triggerName: registration.triggerName,
|
|
288
|
+
});
|
|
283
289
|
}), (0, rxjs_1.mergeMap)((ctx) => (0, rxjs_1.of)(ctx).pipe(registration.task$, (0, rxjs_1.catchError)((err) => {
|
|
284
290
|
ctx.log.error('MemoryInterpreter.executionError', {
|
|
291
|
+
triggerName: registration.triggerName,
|
|
285
292
|
error: err instanceof Error ? err.toString() : err,
|
|
286
293
|
});
|
|
287
294
|
try {
|
|
288
295
|
ctx.options.onError?.(ctx.withData(err));
|
|
289
296
|
}
|
|
290
297
|
catch (err) {
|
|
291
|
-
ctx.log.error('MemoryInterpreter.onError Error: failed to call onError handler', {
|
|
298
|
+
ctx.log.error('MemoryInterpreter.onError Error: failed to call onError handler', {
|
|
299
|
+
triggerName: registration.triggerName,
|
|
300
|
+
error: err instanceof Error ? err.toString() : err,
|
|
301
|
+
});
|
|
292
302
|
ctx.options.onError?.(ctx.withData({
|
|
293
303
|
message: 'Internal server error',
|
|
294
304
|
error: err instanceof Error ? err.toString() : err,
|
|
@@ -300,13 +310,17 @@ class MemoryInterpreter {
|
|
|
300
310
|
next: (ctx) => {
|
|
301
311
|
const durationMs = Date.now() - ctx.startTime.getTime();
|
|
302
312
|
ctx.log.info('MemoryInterpreter.executionCompleted', {
|
|
313
|
+
triggerName: registration.triggerName,
|
|
303
314
|
durationMs,
|
|
304
315
|
});
|
|
305
316
|
try {
|
|
306
317
|
ctx.options.onSuccess?.(ctx);
|
|
307
318
|
}
|
|
308
319
|
catch (err) {
|
|
309
|
-
ctx.log.error('MemoryInterpreter.onSuccessError: failed to call onSuccess handler', {
|
|
320
|
+
ctx.log.error('MemoryInterpreter.onSuccessError: failed to call onSuccess handler', {
|
|
321
|
+
triggerName: registration.triggerName,
|
|
322
|
+
error: err instanceof Error ? err.toString() : err,
|
|
323
|
+
});
|
|
310
324
|
ctx.options.onSuccess?.(ctx.withData({
|
|
311
325
|
message: 'Internal server error',
|
|
312
326
|
error: err instanceof Error ? err.toString() : err,
|
|
@@ -316,12 +330,15 @@ class MemoryInterpreter {
|
|
|
316
330
|
},
|
|
317
331
|
error: (err) => {
|
|
318
332
|
this.log.error('MemoryInterpreter.error', {
|
|
333
|
+
triggerName: registration.triggerName,
|
|
319
334
|
error: err instanceof Error ? err.toString() : err,
|
|
320
335
|
});
|
|
321
336
|
Deno.removeSignalListener('SIGINT', registration.sigintListener);
|
|
322
337
|
},
|
|
323
338
|
complete: () => {
|
|
324
|
-
this.log.info('MemoryInterpreter.workflowCompleted'
|
|
339
|
+
this.log.info('MemoryInterpreter.workflowCompleted', {
|
|
340
|
+
triggerName: registration.triggerName,
|
|
341
|
+
});
|
|
325
342
|
Deno.removeSignalListener('SIGINT', registration.sigintListener);
|
|
326
343
|
},
|
|
327
344
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fn.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/memory/compilers/fn.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAEtD,OAAO,EAA2B,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"fn.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/memory/compilers/fn.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAEtD,OAAO,EAA2B,YAAY,EAAE,MAAM,YAAY,CAAC;AAiCnE,eAAO,MAAM,UAAU,EAAE,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAG/D,CAAC"}
|
|
@@ -22,12 +22,15 @@ function compileFn(compilerCtx, task) {
|
|
|
22
22
|
return await compilerCtx.tracer.startActiveSpan(`fn-${task.id}`, async (span) => {
|
|
23
23
|
span.setAttribute('task.id', task.id);
|
|
24
24
|
span.setAttribute('execution.id', ctx.executionId);
|
|
25
|
-
|
|
25
|
+
try {
|
|
26
|
+
if (typeof ctx.idx === 'number') {
|
|
27
|
+
return ctx.withData(await task._fn(ctx, ctx.idx));
|
|
28
|
+
}
|
|
29
|
+
return ctx.withData(await task._fn(ctx));
|
|
30
|
+
}
|
|
31
|
+
finally {
|
|
26
32
|
span.end();
|
|
27
|
-
return ctx.withData(await task._fn(ctx, ctx.idx));
|
|
28
33
|
}
|
|
29
|
-
span.end();
|
|
30
|
-
return ctx.withData(await task._fn(ctx));
|
|
31
34
|
});
|
|
32
35
|
}));
|
|
33
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/memory/compilers/schedule.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAEzF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/memory/compilers/schedule.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAEzF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAyI7C,eAAO,MAAM,gBAAgB,EAAE,eAAe,CAAC,YAAY,EAAE,eAAe,CAG3E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/memory/compilers/webhook.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAGtF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAuD7C,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,WAAW,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/memory/compilers/webhook.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAGtF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAuD7C,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,WAAW,EAAE,cAAc,CA0SxE,CAAC"}
|
|
@@ -102,12 +102,13 @@ exports.webhookCompiler = {
|
|
|
102
102
|
},
|
|
103
103
|
request: req,
|
|
104
104
|
});
|
|
105
|
+
const routeMiddleware = [];
|
|
105
106
|
if (!trigger.options.request?.rawBody) {
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
routeMiddleware.push(express_1.default.json({ limit: '50mb', type: ['application/json', '*/*+json'] }));
|
|
108
|
+
routeMiddleware.push((0, express_xml_bodyparser_1.default)(xml2jsDefaults));
|
|
108
109
|
}
|
|
109
110
|
else {
|
|
110
|
-
|
|
111
|
+
routeMiddleware.push(express_1.default.raw({ type: '*/*', limit: '50mb' }));
|
|
111
112
|
}
|
|
112
113
|
return new rxjs_1.Observable((subscriber) => {
|
|
113
114
|
if (!ctx.webhookRouter) {
|
|
@@ -124,7 +125,7 @@ exports.webhookCompiler = {
|
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
127
|
// endpoint for sans user because I'm not quite sure how the dynamic routing works
|
|
127
|
-
ctx.webhookRouter[method](`/${trigger.id}`, (0, webhookmiddleware_js_1.createStaticWebhookMiddleware)({
|
|
128
|
+
ctx.webhookRouter[method](`/${trigger.id}`, ...routeMiddleware, (0, webhookmiddleware_js_1.createStaticWebhookMiddleware)({
|
|
128
129
|
id: trigger.id,
|
|
129
130
|
organisationId: ctx.organisationId,
|
|
130
131
|
environmentId: Deno.env.get(constants_js_1.envVarEnvId) ?? '',
|
|
@@ -160,7 +161,7 @@ exports.webhookCompiler = {
|
|
|
160
161
|
});
|
|
161
162
|
});
|
|
162
163
|
// this endpoint will trigger the workflow for each activation given by the external user ID
|
|
163
|
-
ctx.webhookRouter[method](`/${trigger.id}/users/:userId`, (0, webhookmiddleware_js_1.createUserIdDynamicWebhookMiddleware)({
|
|
164
|
+
ctx.webhookRouter[method](`/${trigger.id}/users/:userId`, ...routeMiddleware, (0, webhookmiddleware_js_1.createUserIdDynamicWebhookMiddleware)({
|
|
164
165
|
id: trigger.id,
|
|
165
166
|
connName: trigger.options.connection,
|
|
166
167
|
organisationId: ctx.organisationId,
|
|
@@ -216,7 +217,7 @@ exports.webhookCompiler = {
|
|
|
216
217
|
});
|
|
217
218
|
});
|
|
218
219
|
// this endpoint will trigger the workflow only for the activation given by its ID
|
|
219
|
-
ctx.webhookRouter[method](`/${trigger.id}/activations/:activationId`, (0, webhookmiddleware_js_1.createActIdDynamicWebhookMiddleware)({
|
|
220
|
+
ctx.webhookRouter[method](`/${trigger.id}/activations/:activationId`, ...routeMiddleware, (0, webhookmiddleware_js_1.createActIdDynamicWebhookMiddleware)({
|
|
220
221
|
id: trigger.id,
|
|
221
222
|
organisationId: ctx.organisationId,
|
|
222
223
|
environmentId: Deno.env.get(constants_js_1.envVarEnvId) ?? '',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/src/interpreter/mod.ts"],"names":[],"mappings":"AAaA;;;;;;;;;;;;GAYG;AACH,cAAc,iBAAiB,CAAC;AAChC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/src/interpreter/mod.ts"],"names":[],"mappings":"AAaA;;;;;;;;;;;;GAYG;AACH,cAAc,iBAAiB,CAAC;AAChC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC"}
|
|
@@ -38,7 +38,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
38
38
|
return result;
|
|
39
39
|
};
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
exports.durable = void 0;
|
|
41
|
+
exports.vanilla = exports.durable = void 0;
|
|
42
42
|
/**
|
|
43
43
|
* The interpreter module provides the functionality for registering and executing workflows.
|
|
44
44
|
*
|
|
@@ -54,3 +54,4 @@ exports.durable = void 0;
|
|
|
54
54
|
*/
|
|
55
55
|
__exportStar(require("./memory/mod.js"), exports);
|
|
56
56
|
exports.durable = __importStar(require("./durable/mod.js"));
|
|
57
|
+
exports.vanilla = __importStar(require("./vanilla/mod.js"));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Context } from '../../context/Context.js';
|
|
2
|
+
/**
|
|
3
|
+
* ExecutionError wraps errors that occur during durable workflow execution, providing access to the context at the
|
|
4
|
+
* time of the error. This is used with the {@link VanillaInterpreter}.
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
export declare class ExecutionError extends Error {
|
|
8
|
+
/**
|
|
9
|
+
* The workflow context at the time the error occurred.
|
|
10
|
+
*/
|
|
11
|
+
ctx: Context<any>;
|
|
12
|
+
/**
|
|
13
|
+
* Create a new ExecutionError.
|
|
14
|
+
*
|
|
15
|
+
* @param ctx The workflow context at the time of the error.
|
|
16
|
+
* @param message The error message.
|
|
17
|
+
* @param opts Optional error options.
|
|
18
|
+
*/
|
|
19
|
+
constructor(ctx: Context<any>, message: string, opts?: ErrorOptions);
|
|
20
|
+
toJSON(): {
|
|
21
|
+
name: string;
|
|
22
|
+
message: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=ExecutionError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExecutionError.d.ts","sourceRoot":"","sources":["../../../../src/src/interpreter/vanilla/ExecutionError.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEnD;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACrC;;OAEG;IACH,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IAElB;;;;;;OAMG;gBACS,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,YAAY;IAOnE,MAAM;;;;CAMT"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2025 Versori Group Inc
|
|
4
|
+
*
|
|
5
|
+
* Use of this software is governed by the Business Source License 1.1
|
|
6
|
+
* included in the LICENSE file at the root of this repository.
|
|
7
|
+
*
|
|
8
|
+
* Change Date: 2029-01-01
|
|
9
|
+
* Change License: Apache License, Version 2.0
|
|
10
|
+
*
|
|
11
|
+
* As of the Change Date, in accordance with the Business Source License,
|
|
12
|
+
* use of this software will be governed by the Apache License, Version 2.0.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ExecutionError = void 0;
|
|
16
|
+
/**
|
|
17
|
+
* ExecutionError wraps errors that occur during durable workflow execution, providing access to the context at the
|
|
18
|
+
* time of the error. This is used with the {@link VanillaInterpreter}.
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
class ExecutionError extends Error {
|
|
22
|
+
/**
|
|
23
|
+
* Create a new ExecutionError.
|
|
24
|
+
*
|
|
25
|
+
* @param ctx The workflow context at the time of the error.
|
|
26
|
+
* @param message The error message.
|
|
27
|
+
* @param opts Optional error options.
|
|
28
|
+
*/
|
|
29
|
+
constructor(ctx, message, opts) {
|
|
30
|
+
super(message, opts);
|
|
31
|
+
/**
|
|
32
|
+
* The workflow context at the time the error occurred.
|
|
33
|
+
*/
|
|
34
|
+
Object.defineProperty(this, "ctx", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
configurable: true,
|
|
37
|
+
writable: true,
|
|
38
|
+
value: void 0
|
|
39
|
+
});
|
|
40
|
+
this.name = 'ExecutionError';
|
|
41
|
+
this.ctx = ctx;
|
|
42
|
+
}
|
|
43
|
+
toJSON() {
|
|
44
|
+
return {
|
|
45
|
+
name: this.name,
|
|
46
|
+
message: this.message,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.ExecutionError = ExecutionError;
|