@versori/run 0.4.7 → 0.5.0-alpha.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/src/connection/internal/CredentialHolder.d.ts.map +1 -1
- package/esm/src/connection/internal/CredentialHolder.js +1 -1
- package/esm/src/connection/internal/FetchBuilder.d.ts +9 -2
- package/esm/src/connection/internal/FetchBuilder.d.ts.map +1 -1
- package/esm/src/connection/internal/FetchBuilder.js +120 -4
- package/esm/src/connection/internal/OutboundConnectionFactory.d.ts.map +1 -1
- package/esm/src/connection/internal/OutboundConnectionFactory.js +2 -2
- package/esm/src/context/Context.d.ts +1 -0
- package/esm/src/context/Context.d.ts.map +1 -1
- package/esm/src/context/Context.js +3 -0
- package/esm/src/context/ContextProvider.d.ts +1 -1
- package/esm/src/context/ContextProvider.d.ts.map +1 -1
- package/esm/src/context/ContextProvider.js +2 -1
- package/esm/src/dsl/Workflow.d.ts.map +1 -1
- package/esm/src/dsl/Workflow.js +2 -0
- package/esm/src/dsl/http/types.d.ts +2 -0
- 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 +1 -1
- package/esm/src/dsl/http/versori/cronapi.d.ts +2 -3
- package/esm/src/dsl/http/versori/cronapi.d.ts.map +1 -1
- package/esm/src/dsl/http/versori/cronapi.js +14 -15
- package/esm/src/dsl/http/versori/kvapi/core/OpenAPI.js +1 -1
- package/esm/src/dsl/http/versori/webhookmiddleware.d.ts.map +1 -1
- package/esm/src/dsl/http/versori/webhookmiddleware.js +77 -38
- package/esm/src/dsl/triggers/WebhookTrigger.d.ts.map +1 -1
- package/esm/src/dsl/triggers/WebhookTrigger.js +3 -1
- package/esm/src/internal/InternalAuth.d.ts +0 -1
- package/esm/src/internal/InternalAuth.d.ts.map +1 -1
- package/esm/src/internal/InternalAuth.js +1 -14
- package/esm/src/internal/constants.d.ts +3 -1
- package/esm/src/internal/constants.d.ts.map +1 -1
- package/esm/src/internal/constants.js +4 -1
- package/esm/src/internal/supervisor.d.ts +27 -0
- package/esm/src/internal/supervisor.d.ts.map +1 -0
- package/esm/src/internal/supervisor.js +179 -0
- package/esm/src/interpreter/durable/DurableInterpreter.d.ts +8 -2
- package/esm/src/interpreter/durable/DurableInterpreter.d.ts.map +1 -1
- package/esm/src/interpreter/durable/DurableInterpreter.js +44 -13
- package/esm/src/interpreter/durable/ObservableCompiler.d.ts +6 -1
- package/esm/src/interpreter/durable/ObservableCompiler.d.ts.map +1 -1
- package/esm/src/interpreter/durable/Queue.js +1 -1
- package/esm/src/interpreter/durable/compilers/catch.d.ts.map +1 -1
- package/esm/src/interpreter/durable/compilers/catch.js +6 -7
- package/esm/src/interpreter/durable/compilers/fn.d.ts.map +1 -1
- package/esm/src/interpreter/durable/compilers/fn.js +19 -4
- package/esm/src/interpreter/durable/compilers/http.d.ts.map +1 -1
- package/esm/src/interpreter/durable/compilers/http.js +40 -7
- package/esm/src/interpreter/durable/compilers/schedule.d.ts.map +1 -1
- package/esm/src/interpreter/durable/compilers/schedule.js +2 -1
- package/esm/src/interpreter/durable/compilers/webhook.d.ts.map +1 -1
- package/esm/src/interpreter/durable/compilers/webhook.js +14 -4
- package/esm/src/interpreter/memory/MemoryInterpreter.d.ts +7 -1
- package/esm/src/interpreter/memory/MemoryInterpreter.d.ts.map +1 -1
- package/esm/src/interpreter/memory/MemoryInterpreter.js +43 -12
- package/esm/src/interpreter/memory/ObservableCompiler.d.ts +6 -1
- package/esm/src/interpreter/memory/ObservableCompiler.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/catch.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/catch.js +8 -7
- package/esm/src/interpreter/memory/compilers/fn.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/fn.js +20 -16
- package/esm/src/interpreter/memory/compilers/http.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/http.js +40 -6
- package/esm/src/interpreter/memory/compilers/schedule.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/schedule.js +4 -1
- package/esm/src/interpreter/memory/compilers/webhook.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/webhook.js +22 -7
- package/esm/src/issues/Issues.js +1 -1
- package/esm/src/observability/logging/ConsoleLogger.d.ts.map +1 -1
- package/package.json +3 -1
- package/script/src/connection/internal/CredentialHolder.d.ts.map +1 -1
- package/script/src/connection/internal/CredentialHolder.js +1 -1
- package/script/src/connection/internal/FetchBuilder.d.ts +9 -2
- package/script/src/connection/internal/FetchBuilder.d.ts.map +1 -1
- package/script/src/connection/internal/FetchBuilder.js +143 -4
- package/script/src/connection/internal/OutboundConnectionFactory.d.ts.map +1 -1
- package/script/src/connection/internal/OutboundConnectionFactory.js +2 -2
- package/script/src/context/Context.d.ts +1 -0
- package/script/src/context/Context.d.ts.map +1 -1
- package/script/src/context/Context.js +3 -0
- package/script/src/context/ContextProvider.d.ts +1 -1
- package/script/src/context/ContextProvider.d.ts.map +1 -1
- package/script/src/context/ContextProvider.js +2 -1
- package/script/src/dsl/Workflow.d.ts.map +1 -1
- package/script/src/dsl/Workflow.js +2 -0
- package/script/src/dsl/http/types.d.ts +2 -0
- 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 +1 -1
- package/script/src/dsl/http/versori/cronapi.d.ts +2 -3
- package/script/src/dsl/http/versori/cronapi.d.ts.map +1 -1
- package/script/src/dsl/http/versori/cronapi.js +14 -15
- package/script/src/dsl/http/versori/kvapi/core/OpenAPI.js +1 -1
- package/script/src/dsl/http/versori/webhookmiddleware.d.ts.map +1 -1
- package/script/src/dsl/http/versori/webhookmiddleware.js +77 -38
- package/script/src/dsl/triggers/WebhookTrigger.d.ts.map +1 -1
- package/script/src/dsl/triggers/WebhookTrigger.js +3 -1
- package/script/src/internal/InternalAuth.d.ts +0 -1
- package/script/src/internal/InternalAuth.d.ts.map +1 -1
- package/script/src/internal/InternalAuth.js +0 -13
- package/script/src/internal/constants.d.ts +3 -1
- package/script/src/internal/constants.d.ts.map +1 -1
- package/script/src/internal/constants.js +5 -2
- package/script/src/internal/supervisor.d.ts +27 -0
- package/script/src/internal/supervisor.d.ts.map +1 -0
- package/script/src/internal/supervisor.js +187 -0
- package/script/src/interpreter/durable/DurableInterpreter.d.ts +8 -2
- package/script/src/interpreter/durable/DurableInterpreter.d.ts.map +1 -1
- package/script/src/interpreter/durable/DurableInterpreter.js +49 -18
- package/script/src/interpreter/durable/ObservableCompiler.d.ts +6 -1
- package/script/src/interpreter/durable/ObservableCompiler.d.ts.map +1 -1
- package/script/src/interpreter/durable/Queue.js +1 -1
- package/script/src/interpreter/durable/compilers/catch.d.ts.map +1 -1
- package/script/src/interpreter/durable/compilers/catch.js +6 -7
- package/script/src/interpreter/durable/compilers/fn.d.ts.map +1 -1
- package/script/src/interpreter/durable/compilers/fn.js +19 -4
- package/script/src/interpreter/durable/compilers/http.d.ts.map +1 -1
- package/script/src/interpreter/durable/compilers/http.js +40 -7
- package/script/src/interpreter/durable/compilers/schedule.d.ts.map +1 -1
- package/script/src/interpreter/durable/compilers/schedule.js +2 -1
- package/script/src/interpreter/durable/compilers/webhook.d.ts.map +1 -1
- package/script/src/interpreter/durable/compilers/webhook.js +14 -4
- package/script/src/interpreter/memory/MemoryInterpreter.d.ts +7 -1
- package/script/src/interpreter/memory/MemoryInterpreter.d.ts.map +1 -1
- package/script/src/interpreter/memory/MemoryInterpreter.js +42 -11
- package/script/src/interpreter/memory/ObservableCompiler.d.ts +6 -1
- package/script/src/interpreter/memory/ObservableCompiler.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/catch.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/catch.js +8 -7
- package/script/src/interpreter/memory/compilers/fn.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/fn.js +20 -16
- package/script/src/interpreter/memory/compilers/http.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/http.js +40 -6
- package/script/src/interpreter/memory/compilers/schedule.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/schedule.js +4 -1
- package/script/src/interpreter/memory/compilers/webhook.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/webhook.js +22 -7
- package/script/src/issues/Issues.js +1 -1
- package/script/src/observability/logging/ConsoleLogger.d.ts.map +1 -1
- package/esm/src/dsl/http/versori/constants.d.ts +0 -20
- package/esm/src/dsl/http/versori/constants.d.ts.map +0 -1
- package/esm/src/dsl/http/versori/constants.js +0 -37
- package/esm/src/internal/cli.d.ts +0 -2
- package/esm/src/internal/cli.d.ts.map +0 -1
- package/esm/src/internal/cli.js +0 -32
- package/script/src/dsl/http/versori/constants.d.ts +0 -20
- package/script/src/dsl/http/versori/constants.d.ts.map +0 -1
- package/script/src/dsl/http/versori/constants.js +0 -40
- package/script/src/internal/cli.d.ts +0 -2
- package/script/src/internal/cli.d.ts.map +0 -1
- package/script/src/internal/cli.js +0 -35
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebhookTrigger.d.ts","sourceRoot":"","sources":["../../../../src/src/dsl/triggers/WebhookTrigger.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEnD,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;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAEhD;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG;IACvC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAElB;;OA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;IAE1B;;OAEG;IACH,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAElC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IAElF;;OAEG;IACH,OAAO,CAAC,EAAE,qBAAqB,CAAC;CACnC,CAAC;AAEF,qBAAa,cAAe,YAAW,OAAO,CAAC,WAAW,CAAC;IACvD,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,cAAc,CAAC;IAExB,CAAC,WAAW,CAAC,EAAE,MAAM,CAAa;gBAEtB,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB;IAOpD,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC;CAK1D;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,WAAW,CAAC,CAElF"}
|
|
@@ -40,9 +40,11 @@ class WebhookTrigger {
|
|
|
40
40
|
});
|
|
41
41
|
this.id = id;
|
|
42
42
|
this.options = options;
|
|
43
|
+
this.then = this.then.bind(this);
|
|
43
44
|
}
|
|
44
45
|
then(task) {
|
|
45
|
-
|
|
46
|
+
const actualTask = (0, ensureTask_js_1.ensureTask)(task);
|
|
47
|
+
return new Workflow_js_1.WorkflowImpl(this, actualTask);
|
|
46
48
|
}
|
|
47
49
|
}
|
|
48
50
|
exports.WebhookTrigger = WebhookTrigger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternalAuth.d.ts","sourceRoot":"","sources":["../../../src/src/internal/InternalAuth.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InternalAuth.d.ts","sourceRoot":"","sources":["../../../src/src/internal/InternalAuth.ts"],"names":[],"mappings":"AAoBA,KAAK,kBAAkB,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAEpD,qBAAa,YAAY;IACrB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,aAAa,CAAS;IAE9B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,SAAS,CAAS;;IA2BpB,aAAa,IAAI,OAAO,CAAC,kBAAkB,CAAC;CAsBrD"}
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
*/
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.InternalAuth = void 0;
|
|
16
|
-
const cli_js_1 = require("./cli.js");
|
|
17
16
|
const constants_js_1 = require("./constants.js");
|
|
18
17
|
class InternalAuth {
|
|
19
18
|
constructor() {
|
|
@@ -35,12 +34,6 @@ class InternalAuth {
|
|
|
35
34
|
writable: true,
|
|
36
35
|
value: void 0
|
|
37
36
|
});
|
|
38
|
-
Object.defineProperty(this, "runLocal", {
|
|
39
|
-
enumerable: true,
|
|
40
|
-
configurable: true,
|
|
41
|
-
writable: true,
|
|
42
|
-
value: void 0
|
|
43
|
-
});
|
|
44
37
|
Object.defineProperty(this, "accessToken", {
|
|
45
38
|
enumerable: true,
|
|
46
39
|
configurable: true,
|
|
@@ -58,18 +51,12 @@ class InternalAuth {
|
|
|
58
51
|
this.tokenEndpoint = Deno.env.get(constants_js_1.envVarTokenEndpoint) || '';
|
|
59
52
|
this.accessToken = '';
|
|
60
53
|
this.expiresAt = 0;
|
|
61
|
-
this.runLocal = Deno.env.get(constants_js_1.envVarLocalRun) === 'true';
|
|
62
54
|
if (Deno.env.get(constants_js_1.envVarInternalToken)) {
|
|
63
55
|
this.accessToken = Deno.env.get(constants_js_1.envVarInternalToken) || '';
|
|
64
56
|
this.expiresAt = Date.now() + 365 * 24 * 60 * 60 * 1000; // expires in 1 year
|
|
65
57
|
console.log(`Using static token provided by ${constants_js_1.envVarInternalToken}`);
|
|
66
58
|
return;
|
|
67
59
|
}
|
|
68
|
-
if (this.runLocal) {
|
|
69
|
-
console.info('Running in local mode using cookie for authentication');
|
|
70
|
-
this.accessToken = (0, cli_js_1.getVersoriCookie)();
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
60
|
if (!this.clientId || !this.clientSecret || !this.tokenEndpoint) {
|
|
74
61
|
const missingVars = [];
|
|
75
62
|
if (!this.clientId)
|
|
@@ -10,11 +10,13 @@ export declare const envVarSelfRefURL = "RUN_SELF_REF_URL";
|
|
|
10
10
|
export declare const envVarCredsBaseURL = "RUN_CREDENTIALS_SERVICE_INTERNAL_URL";
|
|
11
11
|
export declare const envVarOtelTracesURL = "RUN_OTEL_TRACES_URL";
|
|
12
12
|
export declare const envVarVersion = "RUN_SERVICE_VERSION";
|
|
13
|
+
export declare const envReadyCheckURL = "READY_CHECK_URL";
|
|
14
|
+
export declare const envPort = "PORT";
|
|
15
|
+
export declare const envCronPort = "CRON_PORT";
|
|
13
16
|
export declare const envVarConfigFile = "RUN_CONFIG_FILE";
|
|
14
17
|
export declare const envVarClientId = "RUN_CLIENT_ID";
|
|
15
18
|
export declare const envVarClientSecret = "RUN_CLIENT_SECRET";
|
|
16
19
|
export declare const envVarTokenEndpoint = "RUN_TOKEN_ENDPOINT";
|
|
17
20
|
export declare const envVarInternalToken = "RUN_INTERNAL_TOKEN";
|
|
18
|
-
export declare const envVarLocalRun = "RUN_LOCAL";
|
|
19
21
|
export declare const cronPort = 3001;
|
|
20
22
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/src/internal/constants.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,WAAW,wBAAwB,CAAC;AACjD,eAAO,MAAM,WA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,MAAM,mBAAmB,uBAAuB,CAAC;AACxD,eAAO,MAAM,mBAAmB,uBAAuB,CAAC;AAMxD,eAAO,MAAM,QAAQ,OAAO,CAAC"}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* use of this software will be governed by the Apache License, Version 2.0.
|
|
13
13
|
*/
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.cronPort = exports.
|
|
15
|
+
exports.cronPort = exports.envVarInternalToken = exports.envVarTokenEndpoint = exports.envVarClientSecret = exports.envVarClientId = exports.envVarConfigFile = exports.envCronPort = exports.envPort = exports.envReadyCheckURL = exports.envVarVersion = exports.envVarOtelTracesURL = exports.envVarCredsBaseURL = exports.envVarSelfRefURL = exports.envVarSDKApiBaseURL = exports.envVarCronApiBaseURL = exports.envVarPlatformApiBaseURL = exports.envVarOrgSlug = exports.envVarProjectId = exports.envVarEnvironmentName = exports.envVarEnvId = exports.envVarOrgId = void 0;
|
|
16
16
|
// This file contains constants used in the Versori DSL HTTP client.
|
|
17
17
|
exports.envVarOrgId = 'RUN_ORGANISATION_ID';
|
|
18
18
|
exports.envVarEnvId = 'RUN_ENVIRONMENT_ID';
|
|
@@ -26,6 +26,9 @@ exports.envVarSelfRefURL = 'RUN_SELF_REF_URL';
|
|
|
26
26
|
exports.envVarCredsBaseURL = 'RUN_CREDENTIALS_SERVICE_INTERNAL_URL';
|
|
27
27
|
exports.envVarOtelTracesURL = 'RUN_OTEL_TRACES_URL';
|
|
28
28
|
exports.envVarVersion = 'RUN_SERVICE_VERSION';
|
|
29
|
+
exports.envReadyCheckURL = 'READY_CHECK_URL';
|
|
30
|
+
exports.envPort = 'PORT';
|
|
31
|
+
exports.envCronPort = 'CRON_PORT';
|
|
29
32
|
// The following environment variables are used for the config file
|
|
30
33
|
exports.envVarConfigFile = 'RUN_CONFIG_FILE';
|
|
31
34
|
// The following environment variables are used for internal authentication
|
|
@@ -34,6 +37,6 @@ exports.envVarClientSecret = 'RUN_CLIENT_SECRET';
|
|
|
34
37
|
exports.envVarTokenEndpoint = 'RUN_TOKEN_ENDPOINT';
|
|
35
38
|
exports.envVarInternalToken = 'RUN_INTERNAL_TOKEN';
|
|
36
39
|
// The following are for running locally
|
|
37
|
-
|
|
40
|
+
// export const envVarLocalRun = 'RUN_LOCAL';
|
|
38
41
|
// please no changerino
|
|
39
42
|
exports.cronPort = 3001; // The port on which the cron API communicates with the service
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ExportResult } from '@opentelemetry/core';
|
|
2
|
+
import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-node';
|
|
3
|
+
import { Span } from '@opentelemetry/api';
|
|
4
|
+
export declare const enabled: boolean;
|
|
5
|
+
type Webhooks = Map<string, {
|
|
6
|
+
method: string;
|
|
7
|
+
path: string;
|
|
8
|
+
options: any;
|
|
9
|
+
}>;
|
|
10
|
+
type Crons = Map<string, string>;
|
|
11
|
+
type MockConnection = {
|
|
12
|
+
name: string;
|
|
13
|
+
id?: string;
|
|
14
|
+
baseUrl?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function registerWebhooks(webhooks: Webhooks): Promise<void>;
|
|
17
|
+
export declare function sendTaskStartEvent(taskId: string, span: Span): Promise<void>;
|
|
18
|
+
export declare function registerCrons(crons: Crons): Promise<void>;
|
|
19
|
+
export declare function mockAPIRequest(info: RequestInfo | URL, cnx?: MockConnection, options?: RequestInit): Promise<Response>;
|
|
20
|
+
export declare class Fake implements SpanExporter {
|
|
21
|
+
constructor();
|
|
22
|
+
export(spans: ReadableSpan[], resultCallback: (result: ExportResult) => void): void;
|
|
23
|
+
shutdown(): Promise<void>;
|
|
24
|
+
forceFlush(): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=supervisor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supervisor.d.ts","sourceRoot":"","sources":["../../../src/src/internal/supervisor.ts"],"names":[],"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I,CAAC;CAG9B"}
|
|
@@ -0,0 +1,187 @@
|
|
|
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.Fake = exports.enabled = void 0;
|
|
16
|
+
exports.registerWebhooks = registerWebhooks;
|
|
17
|
+
exports.sendTaskStartEvent = sendTaskStartEvent;
|
|
18
|
+
exports.registerCrons = registerCrons;
|
|
19
|
+
exports.mockAPIRequest = mockAPIRequest;
|
|
20
|
+
const core_1 = require("@opentelemetry/core");
|
|
21
|
+
const ConsoleLogger_js_1 = require("../observability/logging/ConsoleLogger.js");
|
|
22
|
+
const supervisorURL = function () {
|
|
23
|
+
return Deno.env.get('RUN_SUPERVISOR_URL') || '';
|
|
24
|
+
}();
|
|
25
|
+
exports.enabled = function () {
|
|
26
|
+
return Deno.env.get('RUN_SUPERVISOR_URL') ? true : false;
|
|
27
|
+
}();
|
|
28
|
+
const flows = function () {
|
|
29
|
+
try {
|
|
30
|
+
const _cwd = Deno.cwd();
|
|
31
|
+
const flowsFile = Deno.readTextFileSync(_cwd + '/versori-flow.json');
|
|
32
|
+
const flows = JSON.parse(flowsFile);
|
|
33
|
+
const nodes = {};
|
|
34
|
+
for (const node of flows.nodes) {
|
|
35
|
+
nodes[node.id] = {
|
|
36
|
+
description: node.data.description,
|
|
37
|
+
steps: node.data.steps,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return nodes;
|
|
41
|
+
}
|
|
42
|
+
catch (err) {
|
|
43
|
+
return {};
|
|
44
|
+
}
|
|
45
|
+
}();
|
|
46
|
+
const logger = new ConsoleLogger_js_1.ConsoleLogger('debug');
|
|
47
|
+
async function registerWebhooks(webhooks) {
|
|
48
|
+
if (!exports.enabled) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
try {
|
|
52
|
+
await fetch(`${supervisorURL}/register-webhooks`, {
|
|
53
|
+
method: "POST",
|
|
54
|
+
body: JSON.stringify(Object.fromEntries(webhooks)),
|
|
55
|
+
headers: {
|
|
56
|
+
"Content-Type": "application/json",
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
catch (err) {
|
|
61
|
+
logger.error('Failed to register webhooks with supervisor', { error: err });
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
async function sendTaskStartEvent(taskId, span) {
|
|
65
|
+
if (!exports.enabled) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const data = {
|
|
69
|
+
taskId,
|
|
70
|
+
spanId: span.spanContext().spanId,
|
|
71
|
+
traceId: span.spanContext().traceId,
|
|
72
|
+
startTime: new Date().toISOString(), // assuming current time as start time
|
|
73
|
+
};
|
|
74
|
+
try {
|
|
75
|
+
await fetch(`${supervisorURL}/tasks/start`, {
|
|
76
|
+
method: "POST",
|
|
77
|
+
body: JSON.stringify(data),
|
|
78
|
+
headers: {
|
|
79
|
+
"Content-Type": "application/json",
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
catch (err) {
|
|
84
|
+
logger.error('Failed to send task start event to supervisor', { error: err });
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
async function registerCrons(crons) {
|
|
88
|
+
if (!exports.enabled) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
try {
|
|
92
|
+
await fetch(`${supervisorURL}/register-schedulers`, {
|
|
93
|
+
method: "POST",
|
|
94
|
+
body: JSON.stringify(Object.fromEntries(crons)),
|
|
95
|
+
headers: {
|
|
96
|
+
"Content-Type": "application/json",
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
catch (err) {
|
|
101
|
+
logger.error('Failed to register crons with supervisor', { error: err });
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
async function mockAPIRequest(info, cnx, options) {
|
|
105
|
+
if (!exports.enabled) {
|
|
106
|
+
return new Response();
|
|
107
|
+
}
|
|
108
|
+
const mockRequest = {
|
|
109
|
+
url: info.toString(),
|
|
110
|
+
payload: options?.body || '',
|
|
111
|
+
method: options?.method || "GET",
|
|
112
|
+
headers: options?.headers,
|
|
113
|
+
connection: cnx?.name,
|
|
114
|
+
connectionId: cnx?.id,
|
|
115
|
+
};
|
|
116
|
+
try {
|
|
117
|
+
const response = await fetch(`${supervisorURL}/ai/fake-fetch-call`, {
|
|
118
|
+
method: "POST",
|
|
119
|
+
body: JSON.stringify(mockRequest),
|
|
120
|
+
headers: {
|
|
121
|
+
"Content-Type": "application/json",
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
if (!response.ok) {
|
|
125
|
+
logger.error('Failed to mock api request', { response });
|
|
126
|
+
return new Response();
|
|
127
|
+
}
|
|
128
|
+
const text = await response.text();
|
|
129
|
+
return new Response(text);
|
|
130
|
+
}
|
|
131
|
+
catch (err) {
|
|
132
|
+
logger.error('Failed to mock api request', { error: err });
|
|
133
|
+
return new Response();
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
function printableSpan(s) {
|
|
137
|
+
let span = {
|
|
138
|
+
name: s.name,
|
|
139
|
+
startTime: (0, core_1.hrTimeToTimeStamp)(s.startTime),
|
|
140
|
+
endTime: (0, core_1.hrTimeToTimeStamp)(s.endTime),
|
|
141
|
+
duration: (0, core_1.hrTimeToMilliseconds)(s.duration),
|
|
142
|
+
attributes: s.attributes,
|
|
143
|
+
status: s.status,
|
|
144
|
+
ended: s.ended,
|
|
145
|
+
events: s.events,
|
|
146
|
+
parentSpanContext: s.parentSpanContext,
|
|
147
|
+
spanContext: s.spanContext(),
|
|
148
|
+
};
|
|
149
|
+
const nodeDetail = flows[span.attributes['task.id']]; // I know I have coded all of those as string
|
|
150
|
+
if (nodeDetail) {
|
|
151
|
+
span.attributes['description'] = nodeDetail.description;
|
|
152
|
+
span.attributes['steps'] = nodeDetail.steps;
|
|
153
|
+
}
|
|
154
|
+
return span;
|
|
155
|
+
}
|
|
156
|
+
class Fake {
|
|
157
|
+
constructor() {
|
|
158
|
+
this.export = this.export.bind(this);
|
|
159
|
+
this.shutdown = this.shutdown.bind(this);
|
|
160
|
+
this.forceFlush = this.forceFlush.bind(this);
|
|
161
|
+
}
|
|
162
|
+
export(spans, resultCallback) {
|
|
163
|
+
const ss = spans.map(printableSpan);
|
|
164
|
+
try {
|
|
165
|
+
fetch(`${supervisorURL}/receive-spans`, {
|
|
166
|
+
method: "POST",
|
|
167
|
+
body: JSON.stringify({ spans: ss }),
|
|
168
|
+
headers: {
|
|
169
|
+
"Content-Type": "application/json",
|
|
170
|
+
},
|
|
171
|
+
}).catch((err) => {
|
|
172
|
+
logger.error('Failed to send spans to supervisor', { error: err });
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
catch (err) {
|
|
176
|
+
logger.error('Failed to send spans to supervisor', { error: err });
|
|
177
|
+
}
|
|
178
|
+
resultCallback({ code: core_1.ExportResultCode.SUCCESS });
|
|
179
|
+
}
|
|
180
|
+
shutdown() {
|
|
181
|
+
return Promise.resolve();
|
|
182
|
+
}
|
|
183
|
+
forceFlush() {
|
|
184
|
+
return Promise.resolve();
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
exports.Fake = Fake;
|
|
@@ -45,6 +45,11 @@ type Registration = {
|
|
|
45
45
|
sigintListener: () => void;
|
|
46
46
|
subscription?: Subscription;
|
|
47
47
|
};
|
|
48
|
+
type WebhookRegistry = Map<string, {
|
|
49
|
+
method: string;
|
|
50
|
+
path: string;
|
|
51
|
+
options: any;
|
|
52
|
+
}>;
|
|
48
53
|
/**
|
|
49
54
|
* DurableInterpreter is an interpreter for executing Versori workflows with support for durable, queue-based workflow
|
|
50
55
|
* execution. It supports all trigger types including the {@link workflow} trigger which allows workflows to be started
|
|
@@ -75,7 +80,8 @@ export declare class DurableInterpreter {
|
|
|
75
80
|
private readonly contextProvider;
|
|
76
81
|
private readonly webhookRouter;
|
|
77
82
|
private readonly cronRouter;
|
|
78
|
-
private
|
|
83
|
+
private cronRegistry;
|
|
84
|
+
private webhookRegistry;
|
|
79
85
|
private readonly platformApi;
|
|
80
86
|
private readonly cnxFetchFactory;
|
|
81
87
|
private readonly cronProvider;
|
|
@@ -89,7 +95,7 @@ export declare class DurableInterpreter {
|
|
|
89
95
|
private cronServer?;
|
|
90
96
|
private shutdownServer?;
|
|
91
97
|
private isShuttingDown;
|
|
92
|
-
constructor(log: Logger, compiler: ObservableCompiler, contextProvider: ContextProvider, webhookRouter: Router, cronRouter: Router, cronRegistry: Map<string, string>, platformApi: PlatformApi, cnxFetchFactory: DirectConnectionFactory, cronProvider: CronProvider, tracer: Tracer, issue: IssueAPI, cfgReader: ConfigReader, queueProvider: QueueAPI, otelSDK?: NodeSDK | undefined);
|
|
98
|
+
constructor(log: Logger, compiler: ObservableCompiler, contextProvider: ContextProvider, webhookRouter: Router, cronRouter: Router, cronRegistry: Map<string, string>, webhookRegistry: WebhookRegistry, platformApi: PlatformApi, cnxFetchFactory: DirectConnectionFactory, cronProvider: CronProvider, tracer: Tracer, issue: IssueAPI, cfgReader: ConfigReader, queueProvider: QueueAPI, otelSDK?: NodeSDK | undefined);
|
|
93
99
|
static newInstance(options?: DurableInterpreterOptions): Promise<DurableInterpreter>;
|
|
94
100
|
register<O>(workflow: Workflow<O>, options?: DurableInterpreterOptions): Registration;
|
|
95
101
|
start(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DurableInterpreter.d.ts","sourceRoot":"","sources":["../../../../src/src/interpreter/durable/DurableInterpreter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DurableInterpreter.d.ts","sourceRoot":"","sources":["../../../../src/src/interpreter/durable/DurableInterpreter.ts"],"names":[],"mappings":"AAYA,OAAsB,EAAQ,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAGjE,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;AAGrE,OAAO,EAAE,QAAQ,EAAgB,MAAM,uBAAuB,CAAC;AAe/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,EAA0B,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAa,MAAM,YAAY,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACpC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAE9B;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAElC;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IAErB;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAA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OAAO,CAAC,cAAc,CAAS;gBAGV,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,kBAAkB,EAC5B,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAC3B,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EACjC,eAAe,EAAE,eAAe,EACvB,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,uBAAuB,EACxC,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,QAAQ,EACf,SAAS,EAAE,YAAY,EACvB,aAAa,EAAE,QAAQ,EACvB,OAAO,CAAC,EAAE,OAAO,YAAA;WAWzB,WAAW,CAAC,OAAO,GAAE,yBAA8B,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAgH9F,QAAQ,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,yBAAyB;IAqDhE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IA+N5B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CASxB"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DurableInterpreter = void 0;
|
|
2
7
|
/*
|
|
3
8
|
* Copyright (c) 2025 Versori Group Inc
|
|
4
9
|
*
|
|
@@ -11,11 +16,6 @@
|
|
|
11
16
|
* As of the Change Date, in accordance with the Business Source License,
|
|
12
17
|
* use of this software will be governed by the Apache License, Version 2.0.
|
|
13
18
|
*/
|
|
14
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
|
-
};
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.DurableInterpreter = void 0;
|
|
19
19
|
const api_1 = __importDefault(require("@opentelemetry/api"));
|
|
20
20
|
const exporter_trace_otlp_proto_1 = require("@opentelemetry/exporter-trace-otlp-proto");
|
|
21
21
|
const resources_1 = require("@opentelemetry/resources");
|
|
@@ -26,9 +26,10 @@ const CredentialsProvider_js_1 = require("../../connection/CredentialsProvider.j
|
|
|
26
26
|
const DirectConnectionFactory_js_1 = require("../../connection/DirectConnectionFactory.js");
|
|
27
27
|
const ContextProvider_js_1 = require("../../context/ContextProvider.js");
|
|
28
28
|
const configloader_js_1 = require("../../dsl/http/versori/configloader.js");
|
|
29
|
-
const constants_js_1 = require("../../dsl/http/versori/constants.js");
|
|
30
29
|
const cronapi_js_1 = require("../../dsl/http/versori/cronapi.js");
|
|
31
30
|
const Workflow_js_1 = require("../../dsl/Workflow.js");
|
|
31
|
+
const constants_js_1 = require("../../internal/constants.js");
|
|
32
|
+
const supervisor_js_1 = require("../../internal/supervisor.js");
|
|
32
33
|
const Issues_js_1 = require("../../issues/Issues.js");
|
|
33
34
|
const MemoryKeyValueProvider_js_1 = require("../../kv/memory/MemoryKeyValueProvider.js");
|
|
34
35
|
const SDKKeyValueProvider_js_1 = require("../../kv/sdk/SDKKeyValueProvider.js");
|
|
@@ -36,8 +37,8 @@ const ConsoleLogger_js_1 = require("../../observability/logging/ConsoleLogger.js
|
|
|
36
37
|
const PlatformApi_js_1 = require("../../services/platform/PlatformApi.js");
|
|
37
38
|
const ObservableCompiler_js_1 = require("./ObservableCompiler.js");
|
|
38
39
|
const Queue_js_1 = require("./Queue.js");
|
|
39
|
-
function getKVProvider(
|
|
40
|
-
if (
|
|
40
|
+
function getKVProvider() {
|
|
41
|
+
if (supervisor_js_1.enabled) {
|
|
41
42
|
return Promise.resolve(new MemoryKeyValueProvider_js_1.MemoryKeyValueProvider());
|
|
42
43
|
}
|
|
43
44
|
return SDKKeyValueProvider_js_1.SDKKeyValueProvider.fromEnv();
|
|
@@ -67,7 +68,7 @@ function getKVProvider(runLocal) {
|
|
|
67
68
|
* ```
|
|
68
69
|
*/
|
|
69
70
|
class DurableInterpreter {
|
|
70
|
-
constructor(log, compiler, contextProvider, webhookRouter, cronRouter, cronRegistry, platformApi, cnxFetchFactory, cronProvider, tracer, issue, cfgReader, queueProvider, otelSDK) {
|
|
71
|
+
constructor(log, compiler, contextProvider, webhookRouter, cronRouter, cronRegistry, webhookRegistry, platformApi, cnxFetchFactory, cronProvider, tracer, issue, cfgReader, queueProvider, otelSDK) {
|
|
71
72
|
Object.defineProperty(this, "log", {
|
|
72
73
|
enumerable: true,
|
|
73
74
|
configurable: true,
|
|
@@ -104,6 +105,12 @@ class DurableInterpreter {
|
|
|
104
105
|
writable: true,
|
|
105
106
|
value: cronRegistry
|
|
106
107
|
});
|
|
108
|
+
Object.defineProperty(this, "webhookRegistry", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
configurable: true,
|
|
111
|
+
writable: true,
|
|
112
|
+
value: webhookRegistry
|
|
113
|
+
});
|
|
107
114
|
Object.defineProperty(this, "platformApi", {
|
|
108
115
|
enumerable: true,
|
|
109
116
|
configurable: true,
|
|
@@ -202,7 +209,6 @@ class DurableInterpreter {
|
|
|
202
209
|
const otelTracesURL = Deno.env.get(constants_js_1.envVarOtelTracesURL);
|
|
203
210
|
let otelSDK;
|
|
204
211
|
const configReader = configloader_js_1.VersoriConfigReader.fromEnv(log);
|
|
205
|
-
const runLocal = Deno.env.get(constants_js_1.envVarLocalRun) === 'true';
|
|
206
212
|
await waitForReady(log);
|
|
207
213
|
// Do NOT change those attributes, they are used by the API to filter on
|
|
208
214
|
const resource = (0, resources_1.resourceFromAttributes)({
|
|
@@ -224,6 +230,15 @@ class DurableInterpreter {
|
|
|
224
230
|
log.info('Starting OpenTelemetry SDK');
|
|
225
231
|
otelSDK.start();
|
|
226
232
|
}
|
|
233
|
+
else if (supervisor_js_1.enabled) {
|
|
234
|
+
otelSDK = new sdk_node_1.NodeSDK({
|
|
235
|
+
traceExporter: new supervisor_js_1.Fake(),
|
|
236
|
+
serviceName: serviceName,
|
|
237
|
+
resource: resource,
|
|
238
|
+
});
|
|
239
|
+
log.info('Starting Testing OpenTelemetry SDK');
|
|
240
|
+
otelSDK.start();
|
|
241
|
+
}
|
|
227
242
|
const tracer = api_1.default.trace.getTracer(serviceName, version);
|
|
228
243
|
const queueProvider = await Queue_js_1.QueueImpl.fromEnv(log);
|
|
229
244
|
const connectionFactory = DirectConnectionFactory_js_1.DirectConnectionFactory.fromEnv(log);
|
|
@@ -231,14 +246,14 @@ class DurableInterpreter {
|
|
|
231
246
|
if (options.contextProvider) {
|
|
232
247
|
// no need to set up a key-value provider if options.contextProvider is already
|
|
233
248
|
// initialised.
|
|
234
|
-
return new DurableInterpreter(log, compiler, options.contextProvider, express_1.default.Router(), express_1.default.Router(), new Map(), PlatformApi_js_1.PlatformApiImpl.fromEnv(), connectionFactory, cronapi_js_1.CronAPIClient.fromEnv(), tracer, issuesProvider, configReader, queueProvider, otelSDK);
|
|
249
|
+
return new DurableInterpreter(log, compiler, options.contextProvider, express_1.default.Router(), express_1.default.Router(), new Map(), new Map(), PlatformApi_js_1.PlatformApiImpl.fromEnv(), connectionFactory, cronapi_js_1.CronAPIClient.fromEnv(), tracer, issuesProvider, configReader, queueProvider, otelSDK);
|
|
235
250
|
}
|
|
236
|
-
const kvp = await getKVProvider(
|
|
251
|
+
const kvp = await getKVProvider();
|
|
237
252
|
const platformApi = PlatformApi_js_1.PlatformApiImpl.fromEnv();
|
|
238
253
|
const organisationId = Deno.env.get(constants_js_1.envVarOrgId) || 'development';
|
|
239
254
|
const environmentId = Deno.env.get(constants_js_1.envVarEnvId) || 'development';
|
|
240
255
|
const ctxProvider = new ContextProvider_js_1.ContextProviderImpl(log, kvp, new CredentialsProvider_js_1.CredentialsProviderImpl(connectionFactory.credentials, connectionFactory.tokens, connectionFactory.oauth1, configReader, platformApi), platformApi, organisationId, environmentId, issuesProvider);
|
|
241
|
-
return new DurableInterpreter(log, compiler, ctxProvider, express_1.default.Router(), express_1.default.Router(), new Map(), PlatformApi_js_1.PlatformApiImpl.fromEnv(), connectionFactory, cronapi_js_1.CronAPIClient.fromEnv(), tracer, issuesProvider, configReader, queueProvider, otelSDK);
|
|
256
|
+
return new DurableInterpreter(log, compiler, ctxProvider, express_1.default.Router(), express_1.default.Router(), new Map(), new Map(), PlatformApi_js_1.PlatformApiImpl.fromEnv(), connectionFactory, cronapi_js_1.CronAPIClient.fromEnv(), tracer, issuesProvider, configReader, queueProvider, otelSDK);
|
|
242
257
|
}
|
|
243
258
|
register(workflow, options) {
|
|
244
259
|
const localAbortController = new AbortController();
|
|
@@ -255,6 +270,7 @@ class DurableInterpreter {
|
|
|
255
270
|
tracer: this.tracer,
|
|
256
271
|
contextProvider: this.contextProvider,
|
|
257
272
|
webhookRouter: this.webhookRouter,
|
|
273
|
+
webhookRegistry: this.webhookRegistry,
|
|
258
274
|
queueProvider: this.queueProvider,
|
|
259
275
|
cronRouter: this.cronRouter,
|
|
260
276
|
cronRegistry: this.cronRegistry,
|
|
@@ -278,9 +294,9 @@ class DurableInterpreter {
|
|
|
278
294
|
this.registeredWorkflows.push(registration);
|
|
279
295
|
return registration;
|
|
280
296
|
}
|
|
281
|
-
start() {
|
|
282
|
-
const port = Deno.env.get(
|
|
283
|
-
const cronPort = Deno.env.get(
|
|
297
|
+
async start() {
|
|
298
|
+
const port = Deno.env.get(constants_js_1.envPort) || 3000;
|
|
299
|
+
const cronPort = Deno.env.get(constants_js_1.envCronPort) || 3001;
|
|
284
300
|
const webhookApp = (0, express_1.default)();
|
|
285
301
|
const cronApp = (0, express_1.default)();
|
|
286
302
|
cronApp.use(express_1.default.json());
|
|
@@ -304,11 +320,17 @@ class DurableInterpreter {
|
|
|
304
320
|
ctx.log.error('DurableInterpreter.executionError', {
|
|
305
321
|
error: err instanceof Error ? err.toString() : err,
|
|
306
322
|
});
|
|
323
|
+
this.tracer.startActiveSpan('done', (span) => {
|
|
324
|
+
span.setAttribute('error.message', err instanceof Error ? err.toString() : err);
|
|
325
|
+
span.setAttribute('execution.id', ctx.executionId);
|
|
326
|
+
span.setAttribute('result', 'fail');
|
|
327
|
+
span.end();
|
|
328
|
+
});
|
|
307
329
|
try {
|
|
308
330
|
ctx.options.onError?.(ctx.withData(err));
|
|
309
331
|
}
|
|
310
332
|
catch (err) {
|
|
311
|
-
ctx.log.error('DurableInterpreter.
|
|
333
|
+
ctx.log.error('DurableInterpreter.onError Error: failed to call onError handler', { error: err instanceof Error ? err.toString() : err });
|
|
312
334
|
ctx.options.onError?.(ctx.withData({
|
|
313
335
|
message: 'Internal server error',
|
|
314
336
|
error: err instanceof Error ? err.toString() : err,
|
|
@@ -323,6 +345,11 @@ class DurableInterpreter {
|
|
|
323
345
|
durationMs,
|
|
324
346
|
data: ctx.data,
|
|
325
347
|
});
|
|
348
|
+
this.tracer.startActiveSpan('done', (span) => {
|
|
349
|
+
span.setAttribute('execution.id', ctx.executionId);
|
|
350
|
+
span.setAttribute('result', 'pass');
|
|
351
|
+
span.end();
|
|
352
|
+
});
|
|
326
353
|
try {
|
|
327
354
|
ctx.options.onSuccess?.(ctx);
|
|
328
355
|
}
|
|
@@ -370,6 +397,9 @@ class DurableInterpreter {
|
|
|
370
397
|
});
|
|
371
398
|
throw new Error('Unable to register scheduler tasks with central cron provider');
|
|
372
399
|
}
|
|
400
|
+
// register with supervisor
|
|
401
|
+
await (0, supervisor_js_1.registerCrons)(this.cronRegistry);
|
|
402
|
+
await (0, supervisor_js_1.registerWebhooks)(this.webhookRegistry);
|
|
373
403
|
this.webhookServer = webhookApp.listen(port, () => {
|
|
374
404
|
this.log.info(`Express server listening on port ${port}`);
|
|
375
405
|
});
|
|
@@ -389,6 +419,7 @@ class DurableInterpreter {
|
|
|
389
419
|
if (this.cronServer) {
|
|
390
420
|
this.cronServer.close();
|
|
391
421
|
}
|
|
422
|
+
this.otelSDK?.shutdown();
|
|
392
423
|
// Remove all signal listeners
|
|
393
424
|
for (const registration of this.registeredWorkflows) {
|
|
394
425
|
Deno.removeSignalListener('SIGINT', registration.sigintListener);
|
|
@@ -442,7 +473,7 @@ class DurableInterpreter {
|
|
|
442
473
|
}
|
|
443
474
|
exports.DurableInterpreter = DurableInterpreter;
|
|
444
475
|
async function waitForReady(log) {
|
|
445
|
-
const readyCheckUrl = Deno.env.get(
|
|
476
|
+
const readyCheckUrl = Deno.env.get(constants_js_1.envReadyCheckURL);
|
|
446
477
|
if (!readyCheckUrl) {
|
|
447
478
|
return Promise.resolve();
|
|
448
479
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Tracer } from '@opentelemetry/api';
|
|
2
2
|
import { Router } from 'express';
|
|
3
3
|
import { Observable, OperatorFunction } from 'rxjs';
|
|
4
|
+
import { ConnectionFactory } from '../../connection/types.js';
|
|
4
5
|
import { ContextImpl } from '../../context/Context.js';
|
|
5
6
|
import { ContextProvider } from '../../context/ContextProvider.js';
|
|
6
7
|
import { ConfigReader } from '../../dsl/http/types.js';
|
|
@@ -11,7 +12,6 @@ import { Logger } from '../../observability/logging/Logger.js';
|
|
|
11
12
|
import { PlatformApi } from '../../services/platform/mod.js';
|
|
12
13
|
import { ContextOperatorFunction, TaskCompiler, TriggerCompiler } from './compilers/types.js';
|
|
13
14
|
import { QueueAPI } from './Queue.js';
|
|
14
|
-
import { ConnectionFactory } from '../../connection/types.js';
|
|
15
15
|
export type DurableCompilerContext = {
|
|
16
16
|
compiler: ObservableCompiler;
|
|
17
17
|
log: Logger;
|
|
@@ -22,6 +22,11 @@ export type DurableCompilerContext = {
|
|
|
22
22
|
queueProvider: QueueAPI;
|
|
23
23
|
issueProvider: IssueAPI;
|
|
24
24
|
webhookRouter: Router;
|
|
25
|
+
webhookRegistry: Map<string, {
|
|
26
|
+
method: string;
|
|
27
|
+
path: string;
|
|
28
|
+
options: any;
|
|
29
|
+
}>;
|
|
25
30
|
cronRouter: Router;
|
|
26
31
|
configReader: ConfigReader;
|
|
27
32
|
cronRegistry: Map<string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObservableCompiler.d.ts","sourceRoot":"","sources":["../../../../src/src/interpreter/durable/ObservableCompiler.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,MAAM,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAY,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAe,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAU7D,OAAO,EAAE,uBAAuB,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAG9F,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"ObservableCompiler.d.ts","sourceRoot":"","sources":["../../../../src/src/interpreter/durable/ObservableCompiler.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,MAAM,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,0B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AAE,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,EAAE,GAAG,CAAC,IAAI,CACrF,GAAG,EAAE,sBAAsB,EAC3B,IAAI,EAAE,CAAC,KACN,gBAAgB,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;AAE/B,qBAAa,kBAAkB;IAC3B,OAAO,CAAC,aAAa,CAAkD;IACvE,OAAO,CAAC,gBAAgB,CAAgD;;IAkBxE,WAAW,CAAC,EAAE,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,EAAE,KAAK,GAAG,IAAI,EACzC,GAAG,EAAE,sBAAsB,EAC3B,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,GAAG,CAAC,GACpB,uBAAuB,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC;IAe1C,cAAc,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,EAC3D,GAAG,EAAE,sBAAsB,EAC3B,OAAO,EAAE,CAAC,EACV,MAAM,EAAE,WAAW,GACpB,UAAU,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAerC,YAAY,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,SAAS,IAAI,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;IAKjF,eAAe,CAAC,GAAG,EAAE,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,eAAe,CAAC,GAAG,EAAE,CAAC,CAAC;CAIjF"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.MockQueue = exports.QueueImpl = void 0;
|
|
16
|
-
const constants_js_1 = require("../../
|
|
16
|
+
const constants_js_1 = require("../../internal/constants.js");
|
|
17
17
|
const mod_js_1 = require("../../mod.js");
|
|
18
18
|
class QueueImpl {
|
|
19
19
|
constructor(baseUrl, projectId, environmentId, log) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catch.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/durable/compilers/catch.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAG5D,OAAO,EAA2B,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"catch.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/durable/compilers/catch.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAG5D,OAAO,EAA2B,YAAY,EAAE,MAAM,YAAY,CAAC;AAoFnE,eAAO,MAAM,aAAa,EAAE,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,CAGrE,CAAC"}
|