@versori/run 0.5.10 → 0.7.0-alpha.10
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/deps/jsr.io/@std/fmt/1.0.10/colors.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fmt/{1.0.9 → 1.0.10}/colors.js +2 -2
- package/esm/deps/jsr.io/@std/log/0.224.14/console_handler.js +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 +124 -3
- package/esm/src/context/Context.d.ts +5 -0
- package/esm/src/context/Context.d.ts.map +1 -1
- package/esm/src/context/Context.js +6 -0
- 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/triggers/WebhookTrigger.d.ts.map +1 -1
- package/esm/src/dsl/triggers/WebhookTrigger.js +3 -1
- package/esm/src/internal/constants.d.ts +3 -0
- package/esm/src/internal/constants.d.ts.map +1 -1
- package/esm/src/internal/constants.js +3 -0
- package/esm/src/internal/supervisor.d.ts +23 -0
- package/esm/src/internal/supervisor.d.ts.map +1 -0
- package/esm/src/internal/supervisor.js +267 -0
- package/esm/src/interpreter/durable/DurableInterpreter.d.ts +10 -3
- package/esm/src/interpreter/durable/DurableInterpreter.d.ts.map +1 -1
- package/esm/src/interpreter/durable/DurableInterpreter.js +65 -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 +3 -1
- package/esm/src/interpreter/durable/compilers/fn.d.ts.map +1 -1
- package/esm/src/interpreter/durable/compilers/fn.js +29 -6
- package/esm/src/interpreter/durable/compilers/http.d.ts.map +1 -1
- package/esm/src/interpreter/durable/compilers/http.js +45 -11
- package/esm/src/interpreter/durable/compilers/schedule.d.ts.map +1 -1
- package/esm/src/interpreter/durable/compilers/schedule.js +4 -3
- package/esm/src/interpreter/durable/compilers/webhook.d.ts.map +1 -1
- package/esm/src/interpreter/durable/compilers/webhook.js +2 -0
- package/esm/src/interpreter/memory/MemoryInterpreter.d.ts +8 -1
- package/esm/src/interpreter/memory/MemoryInterpreter.d.ts.map +1 -1
- package/esm/src/interpreter/memory/MemoryInterpreter.js +56 -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 +5 -0
- package/esm/src/interpreter/memory/compilers/fn.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/fn.js +29 -18
- package/esm/src/interpreter/memory/compilers/http.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/http.js +44 -10
- package/esm/src/interpreter/memory/compilers/schedule.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/schedule.js +61 -4
- package/esm/src/interpreter/memory/compilers/webhook.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/webhook.js +9 -3
- package/esm/src/interpreter/vanilla/VanillaInterpreter.d.ts +2 -1
- package/esm/src/interpreter/vanilla/VanillaInterpreter.d.ts.map +1 -1
- package/esm/src/interpreter/vanilla/VanillaInterpreter.js +41 -9
- package/esm/src/interpreter/vanilla/compilers/schedule.js +1 -1
- package/esm/src/issues/Issues.d.ts.map +1 -1
- package/esm/src/issues/Issues.js +6 -1
- package/esm/src/observability/logging/ConsoleLogger.d.ts.map +1 -1
- package/package.json +3 -1
- package/script/deps/jsr.io/@std/fmt/1.0.10/colors.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/fmt/{1.0.9 → 1.0.10}/colors.js +2 -2
- package/script/deps/jsr.io/@std/log/0.224.14/console_handler.js +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 +147 -3
- package/script/src/context/Context.d.ts +5 -0
- package/script/src/context/Context.d.ts.map +1 -1
- package/script/src/context/Context.js +6 -0
- 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/triggers/WebhookTrigger.d.ts.map +1 -1
- package/script/src/dsl/triggers/WebhookTrigger.js +3 -1
- package/script/src/internal/constants.d.ts +3 -0
- package/script/src/internal/constants.d.ts.map +1 -1
- package/script/src/internal/constants.js +4 -1
- package/script/src/internal/supervisor.d.ts +23 -0
- package/script/src/internal/supervisor.d.ts.map +1 -0
- package/script/src/internal/supervisor.js +275 -0
- package/script/src/interpreter/durable/DurableInterpreter.d.ts +10 -3
- package/script/src/interpreter/durable/DurableInterpreter.d.ts.map +1 -1
- package/script/src/interpreter/durable/DurableInterpreter.js +70 -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 +3 -1
- package/script/src/interpreter/durable/compilers/fn.d.ts.map +1 -1
- package/script/src/interpreter/durable/compilers/fn.js +28 -5
- package/script/src/interpreter/durable/compilers/http.d.ts.map +1 -1
- package/script/src/interpreter/durable/compilers/http.js +45 -11
- package/script/src/interpreter/durable/compilers/schedule.d.ts.map +1 -1
- package/script/src/interpreter/durable/compilers/schedule.js +4 -3
- package/script/src/interpreter/durable/compilers/webhook.d.ts.map +1 -1
- package/script/src/interpreter/durable/compilers/webhook.js +2 -0
- package/script/src/interpreter/memory/MemoryInterpreter.d.ts +8 -1
- package/script/src/interpreter/memory/MemoryInterpreter.d.ts.map +1 -1
- package/script/src/interpreter/memory/MemoryInterpreter.js +55 -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 +5 -0
- package/script/src/interpreter/memory/compilers/fn.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/fn.js +28 -17
- package/script/src/interpreter/memory/compilers/http.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/http.js +44 -10
- package/script/src/interpreter/memory/compilers/schedule.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/schedule.js +61 -4
- package/script/src/interpreter/memory/compilers/webhook.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/webhook.js +9 -3
- package/script/src/interpreter/vanilla/VanillaInterpreter.d.ts +2 -1
- package/script/src/interpreter/vanilla/VanillaInterpreter.d.ts.map +1 -1
- package/script/src/interpreter/vanilla/VanillaInterpreter.js +41 -9
- package/script/src/interpreter/vanilla/compilers/schedule.js +1 -1
- package/script/src/issues/Issues.d.ts.map +1 -1
- package/script/src/issues/Issues.js +6 -1
- package/script/src/observability/logging/ConsoleLogger.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/fmt/1.0.9/colors.d.ts.map +0 -1
- package/esm/src/dsl/http/versori/constants.d.ts +0 -21
- package/esm/src/dsl/http/versori/constants.d.ts.map +0 -1
- package/esm/src/dsl/http/versori/constants.js +0 -38
- package/script/deps/jsr.io/@std/fmt/1.0.9/colors.d.ts.map +0 -1
- package/script/src/dsl/http/versori/constants.d.ts +0 -21
- package/script/src/dsl/http/versori/constants.d.ts.map +0 -1
- package/script/src/dsl/http/versori/constants.js +0 -41
- /package/esm/deps/jsr.io/@std/fmt/{1.0.9 → 1.0.10}/colors.d.ts +0 -0
- /package/script/deps/jsr.io/@std/fmt/{1.0.9 → 1.0.10}/colors.d.ts +0 -0
|
@@ -14,19 +14,32 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.httpCompiler = void 0;
|
|
16
16
|
const rxjs_1 = require("rxjs");
|
|
17
|
-
const operators_1 = require("rxjs/operators");
|
|
18
17
|
const DynamicFetchFactory_js_1 = require("../../../connection/DynamicFetchFactory.js");
|
|
18
|
+
const FetchBuilder_js_1 = require("../../../connection/internal/FetchBuilder.js");
|
|
19
19
|
const StaticFetchFactory_js_1 = require("../../../connection/StaticFetchFactory.js");
|
|
20
20
|
const HttpTask_js_1 = require("../../../dsl/tasks/HttpTask.js");
|
|
21
|
+
const supervisor_js_1 = require("../../../internal/supervisor.js");
|
|
21
22
|
function compileHttp(compilerCtx, task) {
|
|
22
23
|
const cnxMap = compilerCtx.configReader.getCnxMapping(task.opts.connection);
|
|
23
24
|
let fetchFactory;
|
|
24
25
|
if (!cnxMap) {
|
|
25
|
-
compilerCtx.log.
|
|
26
|
-
|
|
26
|
+
compilerCtx.log.warn(`Connection ${task.opts.connection} not found, using default fetch with no credentials`);
|
|
27
|
+
if (supervisor_js_1.enabled) {
|
|
28
|
+
// missing connection map and we are in supervised mode, so we use the fake fetcher
|
|
29
|
+
fetchFactory = Promise.resolve(new StaticFetchFactory_js_1.StaticFetchFactory(new FetchBuilder_js_1.FetchBuilder(globalThis.fetch, { name: task.opts.connection }).buildSupervisedFetch()));
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
// missing connection map and not in supervised mode, so we use global fetch
|
|
33
|
+
fetchFactory = Promise.resolve(new StaticFetchFactory_js_1.StaticFetchFactory(globalThis.fetch));
|
|
34
|
+
}
|
|
27
35
|
}
|
|
28
36
|
else if (cnxMap.dynamic) {
|
|
29
|
-
|
|
37
|
+
if (cnxMap.mockWithAI) {
|
|
38
|
+
fetchFactory = Promise.resolve(new StaticFetchFactory_js_1.StaticFetchFactory(new FetchBuilder_js_1.FetchBuilder(globalThis.fetch, { name: task.opts.connection }).buildSupervisedFetch()));
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
fetchFactory = Promise.resolve(new DynamicFetchFactory_js_1.DynamicFetchFactory(compilerCtx.cnxFactory, compilerCtx.platformApi, compilerCtx.organisationId, cnxMap.templateId));
|
|
42
|
+
}
|
|
30
43
|
}
|
|
31
44
|
else {
|
|
32
45
|
fetchFactory = compilerCtx.platformApi.getConnection({
|
|
@@ -36,8 +49,21 @@ function compileHttp(compilerCtx, task) {
|
|
|
36
49
|
},
|
|
37
50
|
throwOnError: true,
|
|
38
51
|
})
|
|
39
|
-
.then(({ data }) =>
|
|
40
|
-
.
|
|
52
|
+
.then(({ data }) => {
|
|
53
|
+
if (cnxMap.mockWithAI) {
|
|
54
|
+
// use the fake fetcher that calls the supervisor to generate a mock reponse
|
|
55
|
+
return new StaticFetchFactory_js_1.StaticFetchFactory(new FetchBuilder_js_1.FetchBuilder(globalThis.fetch, data).buildSupervisedFetch());
|
|
56
|
+
}
|
|
57
|
+
return Promise.all([compilerCtx.cnxFactory.fetcher(data), data.baseUrl ?? ''])
|
|
58
|
+
.then(([fetcher, baseUrl]) => new StaticFetchFactory_js_1.StaticFetchFactory(fetcher, baseUrl));
|
|
59
|
+
})
|
|
60
|
+
.catch((err) => {
|
|
61
|
+
compilerCtx.log.error(`Failed to get connection ${task.opts.connection}`, err);
|
|
62
|
+
if (supervisor_js_1.enabled) {
|
|
63
|
+
return new StaticFetchFactory_js_1.StaticFetchFactory(new FetchBuilder_js_1.FetchBuilder(globalThis.fetch, { name: task.opts.connection }).build());
|
|
64
|
+
}
|
|
65
|
+
throw err;
|
|
66
|
+
});
|
|
41
67
|
}
|
|
42
68
|
async function http(ctx) {
|
|
43
69
|
const [fetch, baseUrl] = await fetchFactory.then((ff) => Promise.all([ff.fetcher(ctx), ff.baseUrl(ctx)]));
|
|
@@ -45,19 +71,27 @@ function compileHttp(compilerCtx, task) {
|
|
|
45
71
|
const result = await task.fn(httpContext);
|
|
46
72
|
return ctx.withData(result);
|
|
47
73
|
}
|
|
48
|
-
return (src) => src.pipe((0,
|
|
49
|
-
complete: () => compilerCtx.log.debug('http.complete'),
|
|
50
|
-
}), (0, rxjs_1.mergeMap)((ctx) => {
|
|
74
|
+
return (src) => src.pipe((0, rxjs_1.mergeMap)((ctx) => {
|
|
51
75
|
return compilerCtx.tracer.startActiveSpan(`http-${task.id}`, async (span) => {
|
|
76
|
+
ctx = await (0, supervisor_js_1.sendTaskStartEvent)(task.id, ctx, span);
|
|
52
77
|
span.setAttribute('task.id', task.id);
|
|
53
78
|
span.setAttribute('task.type', 'http');
|
|
79
|
+
span.setAttribute('type', 'task');
|
|
54
80
|
span.setAttribute('execution.id', ctx.executionId);
|
|
55
81
|
span.setAttribute('connection.name', task.opts.connection);
|
|
82
|
+
span.setAttribute('workflow.id', ctx.options.workflowId || 'unknown-workflow');
|
|
83
|
+
const spanContext = span.spanContext();
|
|
56
84
|
try {
|
|
57
|
-
|
|
85
|
+
const newCtx = await http(ctx.withLogger(ctx.log.child({ spanId: spanContext.spanId, traceId: spanContext.traceId })));
|
|
86
|
+
if (supervisor_js_1.enabled) {
|
|
87
|
+
span.setAttribute('response.body', JSON.stringify(newCtx.data));
|
|
88
|
+
}
|
|
89
|
+
span.setAttribute('status', 'pass');
|
|
90
|
+
return newCtx;
|
|
58
91
|
}
|
|
59
92
|
catch (error) {
|
|
60
93
|
if (error instanceof Error) {
|
|
94
|
+
span.setAttribute('status', 'fail');
|
|
61
95
|
span.recordException(error);
|
|
62
96
|
}
|
|
63
97
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/memory/compilers/schedule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/memory/compilers/schedule.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AASzF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA+M7C,eAAO,MAAM,gBAAgB,EAAE,eAAe,CAAC,YAAY,EAAE,eAAe,CAG3E,CAAC"}
|
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.scheduleCompiler = void 0;
|
|
16
16
|
const rxjs_1 = require("rxjs");
|
|
17
|
-
const constants_js_1 = require("../../../dsl/http/versori/constants.js");
|
|
18
17
|
const ScheduleTrigger_js_1 = require("../../../dsl/triggers/ScheduleTrigger.js");
|
|
18
|
+
const constants_js_1 = require("../../../internal/constants.js");
|
|
19
|
+
const supervisor_js_1 = require("../../../internal/supervisor.js");
|
|
19
20
|
function compileSchedule(ctx, trigger, signal) {
|
|
20
21
|
return new rxjs_1.Observable((subscriber) => {
|
|
21
22
|
// Add HTTP endpoint for manual triggering
|
|
@@ -28,8 +29,43 @@ function compileSchedule(ctx, trigger, signal) {
|
|
|
28
29
|
const orgId = Deno.env.get(constants_js_1.envVarOrgId) || 'example-org';
|
|
29
30
|
const client = ctx.platformApi;
|
|
30
31
|
ctx.cronRegistry.set(trigger.id, trigger.schedule);
|
|
31
|
-
async function handleSchedule(
|
|
32
|
+
async function handleSchedule(req, res, span) {
|
|
32
33
|
try {
|
|
34
|
+
// run for a single activation
|
|
35
|
+
const activationId = req.params.activationId;
|
|
36
|
+
if (activationId) {
|
|
37
|
+
const { data: activation } = await client.getActivation({
|
|
38
|
+
path: {
|
|
39
|
+
organisation_id: ctx.organisationId,
|
|
40
|
+
environment_id: environmentId,
|
|
41
|
+
activation_id: activationId,
|
|
42
|
+
},
|
|
43
|
+
throwOnError: false,
|
|
44
|
+
});
|
|
45
|
+
if (!activation) {
|
|
46
|
+
res.status(412).json({
|
|
47
|
+
status: 'error',
|
|
48
|
+
message: `No activation found for ID: ${activationId}`,
|
|
49
|
+
});
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const executionCtx = ctx.contextProvider.create(activation, {}, { workflowId: trigger.id });
|
|
53
|
+
span.setAttribute('execution.id', executionCtx.executionId);
|
|
54
|
+
await (0, supervisor_js_1.sendTaskStartEvent)(trigger.id, executionCtx, span);
|
|
55
|
+
try {
|
|
56
|
+
ctx.log.info(`Running schedule ${trigger.id} for activation ${activationId}`);
|
|
57
|
+
subscriber.next(executionCtx);
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
executionCtx.log.error('execution error inside schedule', { error });
|
|
61
|
+
}
|
|
62
|
+
res.status(200).json({
|
|
63
|
+
status: 'triggered',
|
|
64
|
+
executionId: executionCtx.executionId,
|
|
65
|
+
});
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
// run for static activation only
|
|
33
69
|
if (trigger.activationPredicate === undefined) {
|
|
34
70
|
const { data: activation } = await client.listActivations({
|
|
35
71
|
path: {
|
|
@@ -48,8 +84,9 @@ function compileSchedule(ctx, trigger, signal) {
|
|
|
48
84
|
});
|
|
49
85
|
return;
|
|
50
86
|
}
|
|
51
|
-
const executionCtx = ctx.contextProvider.create(activation[0], {});
|
|
87
|
+
const executionCtx = ctx.contextProvider.create(activation[0], {}, { workflowId: trigger.id });
|
|
52
88
|
span.setAttribute('execution.id', executionCtx.executionId);
|
|
89
|
+
await (0, supervisor_js_1.sendTaskStartEvent)(trigger.id, executionCtx, span);
|
|
53
90
|
try {
|
|
54
91
|
subscriber.next(executionCtx);
|
|
55
92
|
}
|
|
@@ -62,6 +99,7 @@ function compileSchedule(ctx, trigger, signal) {
|
|
|
62
99
|
});
|
|
63
100
|
return;
|
|
64
101
|
}
|
|
102
|
+
// run for all activations
|
|
65
103
|
const { data: activations } = await client.listActivations({
|
|
66
104
|
path: {
|
|
67
105
|
organisation_id: ctx.organisationId,
|
|
@@ -80,8 +118,9 @@ function compileSchedule(ctx, trigger, signal) {
|
|
|
80
118
|
return;
|
|
81
119
|
}
|
|
82
120
|
activations.forEach((activation) => {
|
|
83
|
-
const executionCtx = ctx.contextProvider.create(activation, {});
|
|
121
|
+
const executionCtx = ctx.contextProvider.create(activation, {}, { workflowId: trigger.id });
|
|
84
122
|
try {
|
|
123
|
+
ctx.log.info(`Running schedule ${trigger.id} for activation ${activation.id}`);
|
|
85
124
|
subscriber.next(executionCtx);
|
|
86
125
|
}
|
|
87
126
|
catch (error) {
|
|
@@ -99,11 +138,29 @@ function compileSchedule(ctx, trigger, signal) {
|
|
|
99
138
|
await ctx.tracer.startActiveSpan(`schedule-${trigger.id}`, async (span) => {
|
|
100
139
|
span.setAttribute('task.id', trigger.id);
|
|
101
140
|
span.setAttribute('task.type', 'schedule');
|
|
141
|
+
span.setAttribute('type', 'task');
|
|
142
|
+
span.setAttribute('schedule', trigger.schedule);
|
|
143
|
+
span.setAttribute('project.id', projectId);
|
|
144
|
+
span.setAttribute('environment.id', environmentId);
|
|
145
|
+
span.setAttribute('environment.name', environmentName);
|
|
146
|
+
span.setAttribute('org.id', orgId);
|
|
147
|
+
span.setAttribute('workflow.id', trigger.id);
|
|
148
|
+
await handleSchedule(req, res, span);
|
|
149
|
+
span.end();
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
ctx.cronRouter.post(`/cron/${trigger.id}/activations/:activationId`, async (req, res) => {
|
|
153
|
+
await ctx.tracer.startActiveSpan(`schedule-${trigger.id}`, async (span) => {
|
|
154
|
+
span.setAttribute('task.id', trigger.id);
|
|
155
|
+
span.setAttribute('activation.id', req.params.activationId);
|
|
156
|
+
span.setAttribute('task.type', 'schedule');
|
|
157
|
+
span.setAttribute('type', 'task');
|
|
102
158
|
span.setAttribute('schedule', trigger.schedule);
|
|
103
159
|
span.setAttribute('project.id', projectId);
|
|
104
160
|
span.setAttribute('environment.id', environmentId);
|
|
105
161
|
span.setAttribute('environment.name', environmentName);
|
|
106
162
|
span.setAttribute('org.id', orgId);
|
|
163
|
+
span.setAttribute('workflow.id', trigger.id);
|
|
107
164
|
await handleSchedule(req, res, span);
|
|
108
165
|
span.end();
|
|
109
166
|
});
|
|
@@ -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;
|
|
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;AAItF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAuD7C,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,WAAW,EAAE,cAAc,CAmTxE,CAAC"}
|
|
@@ -24,6 +24,7 @@ const rxjs_1 = require("rxjs");
|
|
|
24
24
|
const webhookmiddleware_js_1 = require("../../../dsl/http/versori/webhookmiddleware.js");
|
|
25
25
|
const WebhookTrigger_js_1 = require("../../../dsl/triggers/WebhookTrigger.js");
|
|
26
26
|
const constants_js_1 = require("../../../internal/constants.js");
|
|
27
|
+
const supervisor_js_1 = require("../../../internal/supervisor.js");
|
|
27
28
|
const xml2jsDefaults = {
|
|
28
29
|
explicitArray: false,
|
|
29
30
|
normalize: false,
|
|
@@ -90,6 +91,7 @@ exports.webhookCompiler = {
|
|
|
90
91
|
onError = trigger.options.response.onError;
|
|
91
92
|
}
|
|
92
93
|
const ctxOptionsFn = (req, res) => ({
|
|
94
|
+
workflowId: trigger.id,
|
|
93
95
|
onSuccess: (ctx) => {
|
|
94
96
|
if (isSync) {
|
|
95
97
|
sendResponse(res, onSuccess(ctx));
|
|
@@ -110,6 +112,7 @@ exports.webhookCompiler = {
|
|
|
110
112
|
else {
|
|
111
113
|
routeMiddleware.push(express_1.default.raw({ type: '*/*', limit: '50mb' }));
|
|
112
114
|
}
|
|
115
|
+
ctx.webhookRegistry.set(trigger.id, { method, path: `/${trigger.id}`, options: trigger.options });
|
|
113
116
|
return new rxjs_1.Observable((subscriber) => {
|
|
114
117
|
if (!ctx.webhookRouter) {
|
|
115
118
|
throw new Error('Router not available in compiler context');
|
|
@@ -135,12 +138,13 @@ exports.webhookCompiler = {
|
|
|
135
138
|
cfgReader: ctx.configReader,
|
|
136
139
|
log: ctx.log,
|
|
137
140
|
}), async (req, res) => {
|
|
138
|
-
await ctx.tracer.startActiveSpan(`webhook-${trigger.id}`, (span) => {
|
|
141
|
+
await ctx.tracer.startActiveSpan(`webhook-${trigger.id}`, async (span) => {
|
|
139
142
|
span.setAttribute('task.id', trigger.id);
|
|
140
143
|
span.setAttribute('task.type', 'webhook');
|
|
141
144
|
const staticActivation = res.locals.activation;
|
|
142
145
|
const executionCtx = ctx.contextProvider.create(staticActivation, req.body, ctxOptionsFn(req, res));
|
|
143
146
|
span.setAttribute('execution.id', executionCtx.executionId);
|
|
147
|
+
await (0, supervisor_js_1.sendTaskStartEvent)(trigger.id, executionCtx, span);
|
|
144
148
|
try {
|
|
145
149
|
subscriber.next(executionCtx);
|
|
146
150
|
if (isAsync) {
|
|
@@ -171,7 +175,7 @@ exports.webhookCompiler = {
|
|
|
171
175
|
cfgReader: ctx.configReader,
|
|
172
176
|
log: ctx.log,
|
|
173
177
|
}), async (req, res) => {
|
|
174
|
-
await ctx.tracer.startActiveSpan(`webhook-${trigger.id}`, (span) => {
|
|
178
|
+
await ctx.tracer.startActiveSpan(`webhook-${trigger.id}`, async (span) => {
|
|
175
179
|
span.setAttribute('task.id', trigger.id);
|
|
176
180
|
span.setAttribute('task.type', 'webhook');
|
|
177
181
|
span.setAttribute('user.id', req.params.userId);
|
|
@@ -192,6 +196,7 @@ exports.webhookCompiler = {
|
|
|
192
196
|
}
|
|
193
197
|
const executionCtx = ctx.contextProvider.create(activation, req.body, ctxOptionsFn(req, res));
|
|
194
198
|
span.setAttribute('execution.id', executionCtx.executionId);
|
|
199
|
+
await (0, supervisor_js_1.sendTaskStartEvent)(trigger.id, executionCtx, span);
|
|
195
200
|
const errors = [];
|
|
196
201
|
try {
|
|
197
202
|
subscriber.next(executionCtx);
|
|
@@ -227,7 +232,7 @@ exports.webhookCompiler = {
|
|
|
227
232
|
cfgReader: ctx.configReader,
|
|
228
233
|
log: ctx.log,
|
|
229
234
|
}), async (req, res) => {
|
|
230
|
-
await ctx.tracer.startActiveSpan(`webhook-${trigger.id}`, (span) => {
|
|
235
|
+
await ctx.tracer.startActiveSpan(`webhook-${trigger.id}`, async (span) => {
|
|
231
236
|
span.setAttribute('task.id', trigger.id);
|
|
232
237
|
span.setAttribute('task.type', 'webhook');
|
|
233
238
|
span.setAttribute('activation.id', req.params.activationId);
|
|
@@ -246,6 +251,7 @@ exports.webhookCompiler = {
|
|
|
246
251
|
}
|
|
247
252
|
const activationCtx = ctx.contextProvider.create(activation, req.body, ctxOptionsFn(req, res));
|
|
248
253
|
span.setAttribute('execution.id', activationCtx.executionId);
|
|
254
|
+
await (0, supervisor_js_1.sendTaskStartEvent)(trigger.id, activationCtx, span);
|
|
249
255
|
try {
|
|
250
256
|
subscriber.next(activationCtx);
|
|
251
257
|
if (isAsync) {
|
|
@@ -86,9 +86,10 @@ export declare class VanillaInterpreter {
|
|
|
86
86
|
private cronServer?;
|
|
87
87
|
private shutdownServer?;
|
|
88
88
|
private isShuttingDown;
|
|
89
|
+
private wfRegistration;
|
|
89
90
|
constructor(log: Logger, compiler: ObservableCompiler, contextProvider: ContextProvider, webhookRouter: Router, cronRouter: Router, cronRegistry: Map<string, string>, cnxFetchFactory: DefaultConnectionFactory, cronProvider: CronProvider, tracer: Tracer, cfgReader: ConfigReader, queueProvider: QueueAPI, otelSDK?: NodeSDK | undefined);
|
|
90
91
|
static newInstance(options?: VanillaInterpreterOptions): Promise<VanillaInterpreter>;
|
|
91
|
-
register<O>(workflow: Workflow<O>, options?: VanillaInterpreterOptions): Registration;
|
|
92
|
+
register<O>(workflow: Workflow<O>, options?: VanillaInterpreterOptions): Registration | void;
|
|
92
93
|
start(): Promise<void>;
|
|
93
94
|
stop(): Promise<void>;
|
|
94
95
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VanillaInterpreter.d.ts","sourceRoot":"","sources":["../../../../src/src/interpreter/vanilla/VanillaInterpreter.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;AACtF,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,YA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MAAM,EAAE,MAAM,EACd,SAAS,EAAE,YAAY,EACvB,aAAa,EAAE,QAAQ,EACvB,OAAO,CAAC,EAAE,OAAO,YAAA;WASzB,WAAW,CAAC,OAAO,GAAE,yBAA8B,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAoG9F,QAAQ,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,yBAAyB,GAAG,YAAY,GAAG,IAAI;IAkEtF,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IA2M5B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CASxB"}
|
|
@@ -25,8 +25,10 @@ const rxjs_1 = require("rxjs");
|
|
|
25
25
|
const VanillaConnectionFactory_js_1 = require("../../connection/VanillaConnectionFactory.js");
|
|
26
26
|
const VanillaContext_js_1 = require("../../context/VanillaContext.js");
|
|
27
27
|
const configloader_js_1 = require("../../dsl/http/versori/configloader.js");
|
|
28
|
-
const constants_js_1 = require("../../
|
|
28
|
+
const constants_js_1 = require("../../internal/constants.js");
|
|
29
|
+
const supervisor_js_1 = require("../../internal/supervisor.js");
|
|
29
30
|
const cronapi_js_1 = require("../../dsl/http/versori/cronapi.js");
|
|
31
|
+
const DurableTrigger_js_1 = require("../../dsl/triggers/DurableTrigger.js");
|
|
30
32
|
const Workflow_js_1 = require("../../dsl/Workflow.js");
|
|
31
33
|
const Issues_js_1 = require("../../issues/Issues.js");
|
|
32
34
|
const MemoryKeyValueProvider_js_1 = require("../../kv/memory/MemoryKeyValueProvider.js");
|
|
@@ -34,8 +36,8 @@ const SDKKeyValueProvider_js_1 = require("../../kv/sdk/SDKKeyValueProvider.js");
|
|
|
34
36
|
const ConsoleLogger_js_1 = require("../../observability/logging/ConsoleLogger.js");
|
|
35
37
|
const Queue_js_1 = require("../durable/Queue.js");
|
|
36
38
|
const ObservableCompiler_js_1 = require("./ObservableCompiler.js");
|
|
37
|
-
function getKVProvider(
|
|
38
|
-
if (
|
|
39
|
+
function getKVProvider() {
|
|
40
|
+
if (supervisor_js_1.enabled) {
|
|
39
41
|
return Promise.resolve(new MemoryKeyValueProvider_js_1.MemoryKeyValueProvider());
|
|
40
42
|
}
|
|
41
43
|
return SDKKeyValueProvider_js_1.SDKKeyValueProvider.fromEnv();
|
|
@@ -167,6 +169,13 @@ class VanillaInterpreter {
|
|
|
167
169
|
writable: true,
|
|
168
170
|
value: false
|
|
169
171
|
});
|
|
172
|
+
// Workflow registration promises only used when supervisor is enabled
|
|
173
|
+
Object.defineProperty(this, "wfRegistration", {
|
|
174
|
+
enumerable: true,
|
|
175
|
+
configurable: true,
|
|
176
|
+
writable: true,
|
|
177
|
+
value: []
|
|
178
|
+
});
|
|
170
179
|
if (typeof this.log === 'undefined') {
|
|
171
180
|
throw new Error('VanillaInterpreter should not be instantiated directly. Use VanillaInterpreter.newInstance() instead.');
|
|
172
181
|
}
|
|
@@ -183,7 +192,6 @@ class VanillaInterpreter {
|
|
|
183
192
|
const otelTracesURL = Deno.env.get(constants_js_1.envVarOtelTracesURL);
|
|
184
193
|
let otelSDK;
|
|
185
194
|
const configReader = configloader_js_1.VersoriConfigReader.fromEnv(log);
|
|
186
|
-
const runLocal = Deno.env.get(constants_js_1.envVarLocalRun) === 'true';
|
|
187
195
|
await waitForReady(log);
|
|
188
196
|
// Do NOT change these attributes, they are used by the API to filter on
|
|
189
197
|
const resource = (0, resources_1.resourceFromAttributes)({
|
|
@@ -205,6 +213,15 @@ class VanillaInterpreter {
|
|
|
205
213
|
log.info('Starting OpenTelemetry SDK');
|
|
206
214
|
otelSDK.start();
|
|
207
215
|
}
|
|
216
|
+
else if (supervisor_js_1.enabled) {
|
|
217
|
+
otelSDK = new sdk_node_1.NodeSDK({
|
|
218
|
+
traceExporter: new supervisor_js_1.Fake(),
|
|
219
|
+
serviceName: serviceName,
|
|
220
|
+
resource: resource,
|
|
221
|
+
});
|
|
222
|
+
log.info('Starting Testing OpenTelemetry SDK');
|
|
223
|
+
otelSDK.start();
|
|
224
|
+
}
|
|
208
225
|
const tracer = api_1.default.trace.getTracer(serviceName, version);
|
|
209
226
|
const queueProvider = await Queue_js_1.QueueImpl.fromEnv(log);
|
|
210
227
|
const connectionFactory = new VanillaConnectionFactory_js_1.DefaultConnectionFactory();
|
|
@@ -212,7 +229,7 @@ class VanillaInterpreter {
|
|
|
212
229
|
if (options.contextProvider) {
|
|
213
230
|
return new VanillaInterpreter(log, compiler, options.contextProvider, express_1.default.Router(), express_1.default.Router(), new Map(), connectionFactory, cronapi_js_1.CronAPIClient.fromEnv(), tracer, configReader, queueProvider, otelSDK);
|
|
214
231
|
}
|
|
215
|
-
const kvp = await getKVProvider(
|
|
232
|
+
const kvp = await getKVProvider();
|
|
216
233
|
const organisationId = Deno.env.get(constants_js_1.envVarOrgId) || 'development';
|
|
217
234
|
const environmentId = Deno.env.get(constants_js_1.envVarEnvId) || 'development';
|
|
218
235
|
const ctxProvider = new VanillaContext_js_1.VanillaContextProvider(log, kvp, organisationId, environmentId, issuesProvider, queueProvider);
|
|
@@ -226,6 +243,16 @@ class VanillaInterpreter {
|
|
|
226
243
|
if (!(workflow instanceof Workflow_js_1.WorkflowImpl)) {
|
|
227
244
|
throw new Error('workflow is not an instance of WorkflowImpl');
|
|
228
245
|
}
|
|
246
|
+
const triggerName = 'id' in workflow.trigger && typeof workflow.trigger.id === 'string'
|
|
247
|
+
? workflow.trigger.id
|
|
248
|
+
: workflow.trigger.constructor.name;
|
|
249
|
+
if (supervisor_js_1.enabled && workflow.trigger instanceof DurableTrigger_js_1.DurableWorkflowTrigger) {
|
|
250
|
+
this.log.info('Skipping durable workflow trigger registration (supervisor mode)', {
|
|
251
|
+
triggerName,
|
|
252
|
+
});
|
|
253
|
+
this.wfRegistration.push((0, supervisor_js_1.registerWorkflow)(workflow));
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
229
256
|
const compilerContext = {
|
|
230
257
|
compiler: this.compiler,
|
|
231
258
|
log: this.log,
|
|
@@ -241,9 +268,6 @@ class VanillaInterpreter {
|
|
|
241
268
|
};
|
|
242
269
|
const trigger$ = this.compiler.compileTrigger(compilerContext, workflow.trigger, combinedSignal);
|
|
243
270
|
const task$ = this.compiler.compileTask(compilerContext, workflow.task);
|
|
244
|
-
const triggerName = 'id' in workflow.trigger && typeof workflow.trigger.id === 'string'
|
|
245
|
-
? workflow.trigger.id
|
|
246
|
-
: workflow.trigger.constructor.name;
|
|
247
271
|
const registration = {
|
|
248
272
|
triggerName,
|
|
249
273
|
trigger$,
|
|
@@ -255,9 +279,12 @@ class VanillaInterpreter {
|
|
|
255
279
|
},
|
|
256
280
|
};
|
|
257
281
|
this.registeredWorkflows.push(registration);
|
|
282
|
+
if (supervisor_js_1.enabled) {
|
|
283
|
+
this.wfRegistration.push((0, supervisor_js_1.registerWorkflow)(workflow));
|
|
284
|
+
}
|
|
258
285
|
return registration;
|
|
259
286
|
}
|
|
260
|
-
start() {
|
|
287
|
+
async start() {
|
|
261
288
|
const port = Deno.env.get('PORT') || 3000;
|
|
262
289
|
const cronPort = Deno.env.get('CRON_PORT') || 3001;
|
|
263
290
|
const webhookApp = (0, express_1.default)();
|
|
@@ -366,6 +393,7 @@ class VanillaInterpreter {
|
|
|
366
393
|
if (this.cronServer) {
|
|
367
394
|
this.cronServer.close();
|
|
368
395
|
}
|
|
396
|
+
this.otelSDK?.shutdown();
|
|
369
397
|
for (const registration of this.registeredWorkflows) {
|
|
370
398
|
Deno.removeSignalListener('SIGINT', registration.sigintListener);
|
|
371
399
|
if (registration.subscription) {
|
|
@@ -378,6 +406,10 @@ class VanillaInterpreter {
|
|
|
378
406
|
}
|
|
379
407
|
};
|
|
380
408
|
Deno.addSignalListener('SIGINT', this.shutdownServer);
|
|
409
|
+
if (supervisor_js_1.enabled) {
|
|
410
|
+
await Promise.all(this.wfRegistration);
|
|
411
|
+
await (0, supervisor_js_1.signalReady)();
|
|
412
|
+
}
|
|
381
413
|
return new Promise((resolve) => {
|
|
382
414
|
let serversClosed = 0;
|
|
383
415
|
const totalServers = [this.webhookServer, this.cronServer].filter(Boolean).length;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.scheduleCompiler = void 0;
|
|
16
16
|
const rxjs_1 = require("rxjs");
|
|
17
|
-
const constants_js_1 = require("../../../
|
|
17
|
+
const constants_js_1 = require("../../../internal/constants.js");
|
|
18
18
|
const ScheduleTrigger_js_1 = require("../../../dsl/triggers/ScheduleTrigger.js");
|
|
19
19
|
const ObservableCompiler_js_1 = require("../ObservableCompiler.js");
|
|
20
20
|
function compileSchedule(ctx, trigger, signal) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Issues.d.ts","sourceRoot":"","sources":["../../../src/src/issues/Issues.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Issues.d.ts","sourceRoot":"","sources":["../../../src/src/issues/Issues.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,MAAM,WAAW,GAAG;IACtB,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC3B,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA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,OAAO,CAAC;QACtB,cAAc,CAAC,EAAE,MAAM,CAAC;KAC3B,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;YAWX,MAAM;CAiEvB;AAED,qBAAa,UAAW,YAAW,QAAQ;IACvC,WAAW,CAAC,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAI1C,WAAW,CAAC,CAAC,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE;QACnC,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,cAAc,CAAC,EAAE,MAAM,CAAC;KAC3B,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;CAG5B"}
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.MockIssues = exports.IssueImpl = void 0;
|
|
16
16
|
const node_crypto_1 = require("node:crypto");
|
|
17
|
-
const constants_js_1 = require("../
|
|
17
|
+
const constants_js_1 = require("../internal/constants.js");
|
|
18
|
+
const supervisor_js_1 = require("../internal/supervisor.js");
|
|
18
19
|
class IssueImpl {
|
|
19
20
|
constructor(log) {
|
|
20
21
|
Object.defineProperty(this, "baseUrl", {
|
|
@@ -110,6 +111,10 @@ class IssueImpl {
|
|
|
110
111
|
issue.annotations['environmentId'] = this.environmentId;
|
|
111
112
|
issue.annotations['organisationId'] = this.organisationId;
|
|
112
113
|
try {
|
|
114
|
+
if (supervisor_js_1.enabled) {
|
|
115
|
+
this.log.info('Issue to be submitted', { issue: issue });
|
|
116
|
+
return Promise.resolve(null);
|
|
117
|
+
}
|
|
113
118
|
const response = await fetch(`${this.baseUrl}/v1/issues/submit`, {
|
|
114
119
|
method: 'POST',
|
|
115
120
|
headers: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConsoleLogger.d.ts","sourceRoot":"","sources":["../../../../src/src/observability/logging/ConsoleLogger.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,GAAG,MAAM,+CAA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GAAG,MAAM,CAElD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjD;AAcD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,MAAM,CAuB9D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,MAAM,CAuBhE;AAWD;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEpD"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export declare const envVarOrgId = "RUN_ORGANISATION_ID";
|
|
2
|
-
export declare const envVarEnvId = "RUN_ENVIRONMENT_ID";
|
|
3
|
-
export declare const envVarEnvironmentName = "RUN_ENVIRONMENT";
|
|
4
|
-
export declare const envVarProjectId = "RUN_SERVICE_ID";
|
|
5
|
-
export declare const envVarOrgSlug = "RUN_ORGANISATION_SLUG";
|
|
6
|
-
export declare const envVarPlatformApiBaseURL = "RUN_PLATFORM_API_INTERNAL_URL";
|
|
7
|
-
export declare const envVarCronApiBaseURL = "RUN_CRON_API_INTERNAL_URL";
|
|
8
|
-
export declare const envVarSDKApiBaseURL = "RUN_SDK_API_URL";
|
|
9
|
-
export declare const envVarSelfRefURL = "RUN_SELF_REF_URL";
|
|
10
|
-
export declare const envVarCredsBaseURL = "RUN_CREDENTIALS_SERVICE_INTERNAL_URL";
|
|
11
|
-
export declare const envVarOtelTracesURL = "RUN_OTEL_TRACES_URL";
|
|
12
|
-
export declare const envVarVersion = "RUN_SERVICE_VERSION";
|
|
13
|
-
export declare const envVarConfigFile = "RUN_CONFIG_FILE";
|
|
14
|
-
export declare const envVarClientId = "RUN_CLIENT_ID";
|
|
15
|
-
export declare const envVarClientSecret = "RUN_CLIENT_SECRET";
|
|
16
|
-
export declare const envVarTokenEndpoint = "RUN_TOKEN_ENDPOINT";
|
|
17
|
-
export declare const envVarInternalToken = "RUN_INTERNAL_TOKEN";
|
|
18
|
-
export declare const envVarJwt = "RUN_VERSORI_JWT";
|
|
19
|
-
export declare const envVarLocalRun = "RUN_LOCAL";
|
|
20
|
-
export declare const cronPort = 3001;
|
|
21
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/src/dsl/http/versori/constants.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,WAAW,wBAAwB,CAAC;AACjD,eAAO,MAAM,WAAW,uBAAuB,CAAC;AAChD,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;AACvD,eAAO,MAAM,eAAe,mBAAmB,CAAC;AAChD,eAAO,MAAM,aAAa,0BAA0B,CAAC;AACrD,eAAO,MAAM,wBAAwB,kCAAkC,CAAC;AACxE,eAAO,MAAM,oBAAoB,8BAA8B,CAAC;AAChE,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AACrD,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,kBAAkB,yCAAyC,CAAC;AACzE,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AACzD,eAAO,MAAM,aAAa,wBAAwB,CAAC;AAEnD,eAAO,MAAM,gBAAgB,oBAAoB,CAAC;AAGlD,eAAO,MAAM,cAAc,kBAAkB,CAAC;AAC9C,eAAO,MAAM,kBAAkB,sBAAsB,CAAC;AACtD,eAAO,MAAM,mBAAmB,uBAAuB,CAAC;AACxD,eAAO,MAAM,mBAAmB,uBAAuB,CAAC;AACxD,eAAO,MAAM,SAAS,oBAAoB,CAAC;AAG3C,eAAO,MAAM,cAAc,cAAc,CAAC;AAG1C,eAAO,MAAM,QAAQ,OAAO,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2025 Versori Group Inc
|
|
3
|
-
*
|
|
4
|
-
* Use of this software is governed by the Business Source License 1.1
|
|
5
|
-
* included in the LICENSE file at the root of this repository.
|
|
6
|
-
*
|
|
7
|
-
* Change Date: 2029-01-01
|
|
8
|
-
* Change License: Apache License, Version 2.0
|
|
9
|
-
*
|
|
10
|
-
* As of the Change Date, in accordance with the Business Source License,
|
|
11
|
-
* use of this software will be governed by the Apache License, Version 2.0.
|
|
12
|
-
*/
|
|
13
|
-
//TODO(@teo): remove this file, it is implemented in the src/internal/constants.ts directory now.
|
|
14
|
-
// This file contains constants used in the Versori DSL HTTP client.
|
|
15
|
-
export const envVarOrgId = 'RUN_ORGANISATION_ID';
|
|
16
|
-
export const envVarEnvId = 'RUN_ENVIRONMENT_ID';
|
|
17
|
-
export const envVarEnvironmentName = 'RUN_ENVIRONMENT';
|
|
18
|
-
export const envVarProjectId = 'RUN_SERVICE_ID';
|
|
19
|
-
export const envVarOrgSlug = 'RUN_ORGANISATION_SLUG';
|
|
20
|
-
export const envVarPlatformApiBaseURL = 'RUN_PLATFORM_API_INTERNAL_URL';
|
|
21
|
-
export const envVarCronApiBaseURL = 'RUN_CRON_API_INTERNAL_URL';
|
|
22
|
-
export const envVarSDKApiBaseURL = 'RUN_SDK_API_URL';
|
|
23
|
-
export const envVarSelfRefURL = 'RUN_SELF_REF_URL';
|
|
24
|
-
export const envVarCredsBaseURL = 'RUN_CREDENTIALS_SERVICE_INTERNAL_URL';
|
|
25
|
-
export const envVarOtelTracesURL = 'RUN_OTEL_TRACES_URL';
|
|
26
|
-
export const envVarVersion = 'RUN_SERVICE_VERSION';
|
|
27
|
-
// The following environment variables are used for the config file
|
|
28
|
-
export const envVarConfigFile = 'RUN_CONFIG_FILE';
|
|
29
|
-
// The following environment variables are used for internal authentication
|
|
30
|
-
export const envVarClientId = 'RUN_CLIENT_ID';
|
|
31
|
-
export const envVarClientSecret = 'RUN_CLIENT_SECRET';
|
|
32
|
-
export const envVarTokenEndpoint = 'RUN_TOKEN_ENDPOINT';
|
|
33
|
-
export const envVarInternalToken = 'RUN_INTERNAL_TOKEN';
|
|
34
|
-
export const envVarJwt = 'RUN_VERSORI_JWT';
|
|
35
|
-
// The following are for running locally
|
|
36
|
-
export const envVarLocalRun = 'RUN_LOCAL';
|
|
37
|
-
// please no changerino
|
|
38
|
-
export const cronPort = 3001; // The port on which the cron API communicates with the service
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/fmt/1.0.9/colors.ts"],"names":[],"mappings":"AAoEA,qEAAqE;AACrE,MAAM,WAAW,GAAG;IAClB,0BAA0B;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,4BAA4B;IAC5B,CAAC,EAAE,MAAM,CAAC;IACV,2BAA2B;IAC3B,CAAC,EAAE,MAAM,CAAC;CACX;AAID;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,QAM7C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AA0BD;;;;;;;;;;;;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C,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,MAAM,CAuB9D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,MAAM,CAuBhE;AAWD;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEpD"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export declare const envVarOrgId = "RUN_ORGANISATION_ID";
|
|
2
|
-
export declare const envVarEnvId = "RUN_ENVIRONMENT_ID";
|
|
3
|
-
export declare const envVarEnvironmentName = "RUN_ENVIRONMENT";
|
|
4
|
-
export declare const envVarProjectId = "RUN_SERVICE_ID";
|
|
5
|
-
export declare const envVarOrgSlug = "RUN_ORGANISATION_SLUG";
|
|
6
|
-
export declare const envVarPlatformApiBaseURL = "RUN_PLATFORM_API_INTERNAL_URL";
|
|
7
|
-
export declare const envVarCronApiBaseURL = "RUN_CRON_API_INTERNAL_URL";
|
|
8
|
-
export declare const envVarSDKApiBaseURL = "RUN_SDK_API_URL";
|
|
9
|
-
export declare const envVarSelfRefURL = "RUN_SELF_REF_URL";
|
|
10
|
-
export declare const envVarCredsBaseURL = "RUN_CREDENTIALS_SERVICE_INTERNAL_URL";
|
|
11
|
-
export declare const envVarOtelTracesURL = "RUN_OTEL_TRACES_URL";
|
|
12
|
-
export declare const envVarVersion = "RUN_SERVICE_VERSION";
|
|
13
|
-
export declare const envVarConfigFile = "RUN_CONFIG_FILE";
|
|
14
|
-
export declare const envVarClientId = "RUN_CLIENT_ID";
|
|
15
|
-
export declare const envVarClientSecret = "RUN_CLIENT_SECRET";
|
|
16
|
-
export declare const envVarTokenEndpoint = "RUN_TOKEN_ENDPOINT";
|
|
17
|
-
export declare const envVarInternalToken = "RUN_INTERNAL_TOKEN";
|
|
18
|
-
export declare const envVarJwt = "RUN_VERSORI_JWT";
|
|
19
|
-
export declare const envVarLocalRun = "RUN_LOCAL";
|
|
20
|
-
export declare const cronPort = 3001;
|
|
21
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/src/dsl/http/versori/constants.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,WAAW,wBAAwB,CAAC;AACjD,eAAO,MAAM,WAAW,uBAAuB,CAAC;AAChD,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;AACvD,eAAO,MAAM,eAAe,mBAAmB,CAAC;AAChD,eAAO,MAAM,aAAa,0BAA0B,CAAC;AACrD,eAAO,MAAM,wBAAwB,kCAAkC,CAAC;AACxE,eAAO,MAAM,oBAAoB,8BAA8B,CAAC;AAChE,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AACrD,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,kBAAkB,yCAAyC,CAAC;AACzE,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AACzD,eAAO,MAAM,aAAa,wBAAwB,CAAC;AAEnD,eAAO,MAAM,gBAAgB,oBAAoB,CAAC;AAGlD,eAAO,MAAM,cAAc,kBAAkB,CAAC;AAC9C,eAAO,MAAM,kBAAkB,sBAAsB,CAAC;AACtD,eAAO,MAAM,mBAAmB,uBAAuB,CAAC;AACxD,eAAO,MAAM,mBAAmB,uBAAuB,CAAC;AACxD,eAAO,MAAM,SAAS,oBAAoB,CAAC;AAG3C,eAAO,MAAM,cAAc,cAAc,CAAC;AAG1C,eAAO,MAAM,QAAQ,OAAO,CAAC"}
|