@etohq/workflow-engine-redis 1.5.1-alpha.4 → 1.5.1-alpha.8
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/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/loaders/redis.d.ts.map +1 -1
- package/dist/loaders/redis.js +61 -15
- package/dist/loaders/redis.js.map +1 -1
- package/dist/loaders/utils.js +1 -1
- package/dist/loaders/utils.js.map +1 -1
- package/dist/migrations/Migration20231228143900.d.ts +1 -1
- package/dist/migrations/Migration20231228143900.d.ts.map +1 -1
- package/dist/migrations/Migration20231228143900.js +1 -1
- package/dist/migrations/Migration20231228143900.js.map +1 -1
- package/dist/migrations/Migration20241206123341.d.ts +1 -1
- package/dist/migrations/Migration20241206123341.d.ts.map +1 -1
- package/dist/migrations/Migration20241206123341.js +1 -1
- package/dist/migrations/Migration20241206123341.js.map +1 -1
- package/dist/migrations/Migration20250120111059.d.ts +1 -1
- package/dist/migrations/Migration20250120111059.d.ts.map +1 -1
- package/dist/migrations/Migration20250120111059.js +1 -1
- package/dist/migrations/Migration20250120111059.js.map +1 -1
- package/dist/migrations/Migration20250128174354.d.ts +1 -1
- package/dist/migrations/Migration20250128174354.d.ts.map +1 -1
- package/dist/migrations/Migration20250128174354.js +1 -1
- package/dist/migrations/Migration20250128174354.js.map +1 -1
- package/dist/migrations/Migration20250505101505.d.ts +1 -1
- package/dist/migrations/Migration20250505101505.d.ts.map +1 -1
- package/dist/migrations/Migration20250505101505.js +1 -1
- package/dist/migrations/Migration20250505101505.js.map +1 -1
- package/dist/migrations/Migration20250819110923.d.ts +6 -0
- package/dist/migrations/Migration20250819110923.d.ts.map +1 -0
- package/dist/migrations/Migration20250819110923.js +14 -0
- package/dist/migrations/Migration20250819110923.js.map +1 -0
- package/dist/migrations/Migration20250819110924.d.ts +6 -0
- package/dist/migrations/Migration20250819110924.d.ts.map +1 -0
- package/dist/migrations/Migration20250819110924.js +16 -0
- package/dist/migrations/Migration20250819110924.js.map +1 -0
- package/dist/migrations/Migration20250908080326.d.ts +6 -0
- package/dist/migrations/Migration20250908080326.d.ts.map +1 -0
- package/dist/migrations/Migration20250908080326.js +20 -0
- package/dist/migrations/Migration20250908080326.js.map +1 -0
- package/dist/models/workflow-execution.d.ts.map +1 -1
- package/dist/models/workflow-execution.js +20 -0
- package/dist/models/workflow-execution.js.map +1 -1
- package/dist/services/workflow-orchestrator.d.ts +12 -3
- package/dist/services/workflow-orchestrator.d.ts.map +1 -1
- package/dist/services/workflow-orchestrator.js +199 -104
- package/dist/services/workflow-orchestrator.js.map +1 -1
- package/dist/services/workflows-module.d.ts +11 -5
- package/dist/services/workflows-module.d.ts.map +1 -1
- package/dist/services/workflows-module.js +13 -18
- package/dist/services/workflows-module.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +108 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/workflow-orchestrator-storage.d.ts +17 -2
- package/dist/utils/workflow-orchestrator-storage.d.ts.map +1 -1
- package/dist/utils/workflow-orchestrator-storage.js +301 -182
- package/dist/utils/workflow-orchestrator-storage.js.map +1 -1
- package/package.json +5 -4
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAA;AAEhB,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;;;;AAGlD,wBAGE"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,kDAAwD;AACxD,yCAAkD;AAClD,uCAAsD;AAEtD,kBAAe,IAAA,cAAM,EAAC,eAAO,CAAC,eAAe,EAAE;IAC7C,OAAO,EAAE,kCAAsB;IAC/B,OAAO,EAAE,CAAC,mBAAS,EAAE,yBAAe,CAAU;CAC/C,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,mBAAgB;AAChB,kDAAwD;AACxD,yCAAkD;AAClD,uCAAsD;AAEtD,kBAAe,IAAA,cAAM,EAAC,eAAO,CAAC,eAAe,EAAE;IAC7C,OAAO,EAAE,kCAAsB;IAC/B,OAAO,EAAE,CAAC,mBAAS,EAAE,yBAAe,CAAU;CAC/C,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redis.d.ts","sourceRoot":"","sources":["../../src/loaders/redis.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,aAAa,EACd,MAAM,wBAAwB,CAAA;yBAM7B,gDAAgD,aAAa,EAC7D,mBAAmB,yBAAyB,KAC3C,OAAO,CAAC,IAAI,CAAC;AAHhB,
|
|
1
|
+
{"version":3,"file":"redis.d.ts","sourceRoot":"","sources":["../../src/loaders/redis.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,aAAa,EACd,MAAM,wBAAwB,CAAA;yBAM7B,gDAAgD,aAAa,EAC7D,mBAAmB,yBAAyB,KAC3C,OAAO,CAAC,IAAI,CAAC;AAHhB,wBAqIC"}
|
package/dist/loaders/redis.js
CHANGED
|
@@ -3,39 +3,78 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const awilix_1 = require("awilix");
|
|
6
|
+
const awilix_1 = require("@etohq/framework/awilix");
|
|
7
7
|
const ioredis_1 = __importDefault(require("ioredis"));
|
|
8
8
|
exports.default = async ({ container, logger, options, dataLoaderOnly }, moduleDeclaration) => {
|
|
9
|
-
const { url, options: redisOptions,
|
|
9
|
+
const { url, redisUrl, options: deprecatedRedisOptions, redisOptions: newRedisOptions, jobQueueName, queueName,
|
|
10
|
+
// Shared options
|
|
11
|
+
queueOptions, workerOptions,
|
|
12
|
+
// Per-queue options
|
|
13
|
+
mainQueueOptions, mainWorkerOptions, jobQueueOptions, jobWorkerOptions, cleanerQueueOptions, cleanerWorkerOptions, pubsub, } = options?.redis;
|
|
14
|
+
// Handle backward compatibility for deprecated options
|
|
15
|
+
const resolvedUrl = redisUrl ?? url;
|
|
16
|
+
const redisOptions = newRedisOptions ?? deprecatedRedisOptions;
|
|
17
|
+
// Log deprecation warnings
|
|
18
|
+
if (url && !redisUrl) {
|
|
19
|
+
logger?.warn("[Workflow-engine-redis] The `url` option is deprecated. Please use `redisUrl` instead for consistency with other modules.");
|
|
20
|
+
}
|
|
21
|
+
if (deprecatedRedisOptions && !newRedisOptions) {
|
|
22
|
+
logger?.warn("[Workflow-engine-redis] The `options` option is deprecated. Please use `redisOptions` instead for consistency with other modules.");
|
|
23
|
+
}
|
|
10
24
|
// TODO: get default from ENV VAR
|
|
11
|
-
if (!
|
|
12
|
-
throw Error("No `redis.url` provided in `workflowOrchestrator` module options. It is required for the Workflow Orchestrator Redis.");
|
|
25
|
+
if (!resolvedUrl) {
|
|
26
|
+
throw Error("No `redis.redisUrl` (or deprecated `redis.url`) provided in `workflowOrchestrator` module options. It is required for the Workflow Orchestrator Redis.");
|
|
13
27
|
}
|
|
14
|
-
const cnnPubSub = pubsub ?? { url, options: redisOptions };
|
|
15
|
-
const
|
|
16
|
-
const
|
|
28
|
+
const cnnPubSub = pubsub ?? { url: resolvedUrl, options: redisOptions };
|
|
29
|
+
const queueName_ = queueName ?? "eto-workflows";
|
|
30
|
+
const jobQueueName_ = jobQueueName ?? "eto-workflows-jobs";
|
|
31
|
+
// Resolve per-queue options by merging shared defaults with per-queue overrides
|
|
32
|
+
const resolvedMainQueueOptions = {
|
|
33
|
+
...(queueOptions ?? {}),
|
|
34
|
+
...(mainQueueOptions ?? {}),
|
|
35
|
+
};
|
|
36
|
+
const resolvedMainWorkerOptions = {
|
|
37
|
+
...(workerOptions ?? {}),
|
|
38
|
+
...(mainWorkerOptions ?? {}),
|
|
39
|
+
};
|
|
40
|
+
const resolvedJobQueueOptions = {
|
|
41
|
+
...(queueOptions ?? {}),
|
|
42
|
+
...(jobQueueOptions ?? {}),
|
|
43
|
+
};
|
|
44
|
+
const resolvedJobWorkerOptions = {
|
|
45
|
+
...(workerOptions ?? {}),
|
|
46
|
+
...(jobWorkerOptions ?? {}),
|
|
47
|
+
};
|
|
48
|
+
const resolvedCleanerQueueOptions = {
|
|
49
|
+
...(queueOptions ?? {}),
|
|
50
|
+
...(cleanerQueueOptions ?? {}),
|
|
51
|
+
};
|
|
52
|
+
const resolvedCleanerWorkerOptions = {
|
|
53
|
+
...(workerOptions ?? {}),
|
|
54
|
+
...(cleanerWorkerOptions ?? {}),
|
|
55
|
+
};
|
|
17
56
|
let connection;
|
|
18
57
|
let redisPublisher;
|
|
19
58
|
let redisSubscriber;
|
|
20
59
|
let workerConnection;
|
|
21
60
|
try {
|
|
22
|
-
connection = await getConnection(
|
|
23
|
-
workerConnection = await getConnection(
|
|
61
|
+
connection = await getConnection(resolvedUrl, redisOptions);
|
|
62
|
+
workerConnection = await getConnection(resolvedUrl, {
|
|
24
63
|
...(redisOptions ?? {}),
|
|
25
64
|
maxRetriesPerRequest: null,
|
|
26
65
|
});
|
|
27
|
-
logger?.info(`Connection to Redis in module 'workflow-engine-redis' established`);
|
|
66
|
+
logger?.info(`[Workflow-engine-redis] Connection to Redis in module 'workflow-engine-redis' established`);
|
|
28
67
|
}
|
|
29
68
|
catch (err) {
|
|
30
|
-
logger?.error(`An error occurred while connecting to Redis in module 'workflow-engine-redis': ${err}`);
|
|
69
|
+
logger?.error(`[Workflow-engine-redis] An error occurred while connecting to Redis in module 'workflow-engine-redis': ${err}`);
|
|
31
70
|
}
|
|
32
71
|
try {
|
|
33
72
|
redisPublisher = await getConnection(cnnPubSub.url, cnnPubSub.options);
|
|
34
73
|
redisSubscriber = await getConnection(cnnPubSub.url, cnnPubSub.options);
|
|
35
|
-
logger?.info(`Connection to Redis PubSub in module 'workflow-engine-redis' established`);
|
|
74
|
+
logger?.info(`[Workflow-engine-redis] Connection to Redis PubSub in module 'workflow-engine-redis' established`);
|
|
36
75
|
}
|
|
37
76
|
catch (err) {
|
|
38
|
-
logger?.error(`An error occurred while connecting to Redis PubSub in module 'workflow-engine-redis': ${err}`);
|
|
77
|
+
logger?.error(`[Workflow-engine-redis] An error occurred while connecting to Redis PubSub in module 'workflow-engine-redis': ${err}`);
|
|
39
78
|
}
|
|
40
79
|
container.register({
|
|
41
80
|
isWorkerMode: (0, awilix_1.asValue)(moduleDeclaration.worker_mode !== "server"),
|
|
@@ -44,8 +83,15 @@ exports.default = async ({ container, logger, options, dataLoaderOnly }, moduleD
|
|
|
44
83
|
redisWorkerConnection: (0, awilix_1.asValue)(workerConnection),
|
|
45
84
|
redisPublisher: (0, awilix_1.asValue)(redisPublisher),
|
|
46
85
|
redisSubscriber: (0, awilix_1.asValue)(redisSubscriber),
|
|
47
|
-
redisQueueName: (0, awilix_1.asValue)(
|
|
48
|
-
redisJobQueueName: (0, awilix_1.asValue)(
|
|
86
|
+
redisQueueName: (0, awilix_1.asValue)(queueName_),
|
|
87
|
+
redisJobQueueName: (0, awilix_1.asValue)(jobQueueName_),
|
|
88
|
+
// Per-queue resolved options
|
|
89
|
+
redisMainQueueOptions: (0, awilix_1.asValue)(resolvedMainQueueOptions),
|
|
90
|
+
redisMainWorkerOptions: (0, awilix_1.asValue)(resolvedMainWorkerOptions),
|
|
91
|
+
redisJobQueueOptions: (0, awilix_1.asValue)(resolvedJobQueueOptions),
|
|
92
|
+
redisJobWorkerOptions: (0, awilix_1.asValue)(resolvedJobWorkerOptions),
|
|
93
|
+
redisCleanerQueueOptions: (0, awilix_1.asValue)(resolvedCleanerQueueOptions),
|
|
94
|
+
redisCleanerWorkerOptions: (0, awilix_1.asValue)(resolvedCleanerWorkerOptions),
|
|
49
95
|
redisDisconnectHandler: (0, awilix_1.asValue)(async () => {
|
|
50
96
|
connection.disconnect();
|
|
51
97
|
workerConnection.disconnect();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redis.js","sourceRoot":"","sources":["../../src/loaders/redis.ts"],"names":[],"mappings":";;;;;AAIA,
|
|
1
|
+
{"version":3,"file":"redis.js","sourceRoot":"","sources":["../../src/loaders/redis.ts"],"names":[],"mappings":";;;;;AAIA,oDAAiD;AACjD,sDAA2B;AAG3B,kBAAe,KAAK,EAClB,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAiB,EAC7D,iBAA4C,EAC7B,EAAE;IACjB,MAAM,EACJ,GAAG,EACH,QAAQ,EACR,OAAO,EAAE,sBAAsB,EAC/B,YAAY,EAAE,eAAe,EAC7B,YAAY,EACZ,SAAS;IACT,iBAAiB;IACjB,YAAY,EACZ,aAAa;IACb,oBAAoB;IACpB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,MAAM,GACP,GAAG,OAAO,EAAE,KAA8B,CAAA;IAE3C,uDAAuD;IACvD,MAAM,WAAW,GAAG,QAAQ,IAAI,GAAG,CAAA;IACnC,MAAM,YAAY,GAAG,eAAe,IAAI,sBAAsB,CAAA;IAE9D,2BAA2B;IAC3B,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QACrB,MAAM,EAAE,IAAI,CACV,2HAA2H,CAC5H,CAAA;IACH,CAAC;IACD,IAAI,sBAAsB,IAAI,CAAC,eAAe,EAAE,CAAC;QAC/C,MAAM,EAAE,IAAI,CACV,mIAAmI,CACpI,CAAA;IACH,CAAC;IA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BAAO,EAAC,yBAAyB,CAAC;QAC1D,oBAAoB,EAAE,IAAA,gBAAO,EAAC,uBAAuB,CAAC;QACtD,qBAAqB,EAAE,IAAA,gBAAO,EAAC,wBAAwB,CAAC;QACxD,wBAAwB,EAAE,IAAA,gBAAO,EAAC,2BAA2B,CAAC;QAC9D,yBAAyB,EAAE,IAAA,gBAAO,EAAC,4BAA4B,CAAC;QAChE,sBAAsB,EAAE,IAAA,gBAAO,EAAC,KAAK,IAAI,EAAE;YACzC,UAAU,CAAC,UAAU,EAAE,CAAA;YACvB,gBAAgB,CAAC,UAAU,EAAE,CAAA;YAC7B,cAAc,CAAC,UAAU,EAAE,CAAA;YAC3B,eAAe,CAAC,UAAU,EAAE,CAAA;QAC9B,CAAC,CAAC;KACH,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,KAAK,UAAU,aAAa,CAAC,GAAG,EAAE,YAAY;IAC5C,MAAM,UAAU,GAAG,IAAI,iBAAK,CAAC,GAAG,EAAE;QAChC,WAAW,EAAE,IAAI;QACjB,GAAG,CAAC,YAAY,IAAI,EAAE,CAAC;KACxB,CAAC,CAAA;IAEF,MAAM,IAAI,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QAClC,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IACnC,CAAC,CAAC,CAAA;IAEF,OAAO,UAAU,CAAA;AACnB,CAAC"}
|
package/dist/loaders/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const awilix_1 = require("awilix");
|
|
3
|
+
const awilix_1 = require("@etohq/framework/awilix");
|
|
4
4
|
const utils_1 = require("../utils");
|
|
5
5
|
exports.default = async ({ container, dataLoaderOnly }) => {
|
|
6
6
|
container.register({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/loaders/utils.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/loaders/utils.ts"],"names":[],"mappings":";;AAAA,oDAA0D;AAC1D,oCAA6D;AAE7D,kBAAe,KAAK,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,EAAiB,EAAE;IACpE,SAAS,CAAC,QAAQ,CAAC;QACjB,kCAAkC,EAAE,IAAA,gBAAO,EACzC,0CAAkC,CACnC,CAAC,SAAS,EAAE;QACb,cAAc,EAAE,IAAA,gBAAO,EAAC,CAAC,CAAC,cAAc,CAAC;KAC1C,CAAC,CAAA;AACJ,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Migration20231228143900.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20231228143900.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Migration20231228143900.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20231228143900.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAA;AAEjE,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAyBnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAY5B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Migration20231221104256 = void 0;
|
|
4
|
-
const migrations_1 = require("@mikro-orm/migrations");
|
|
4
|
+
const migrations_1 = require("@etohq/framework/mikro-orm/migrations");
|
|
5
5
|
class Migration20231221104256 extends migrations_1.Migration {
|
|
6
6
|
async up() {
|
|
7
7
|
this.addSql(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Migration20231228143900.js","sourceRoot":"","sources":["../../src/migrations/Migration20231228143900.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"Migration20231228143900.js","sourceRoot":"","sources":["../../src/migrations/Migration20231228143900.ts"],"names":[],"mappings":";;;AAAA,sEAAiE;AAEjE,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,MAAM,CACT;;;;;;;;;;;;;;;;;;;OAmBC,CACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,IAAI;QACR,IAAI,CAAC,MAAM,CACT;;;;;;;OAOC,CACF,CAAA;IACH,CAAC;CACF;AAtCD,0DAsCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Migration20241206123341.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20241206123341.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Migration20241206123341.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20241206123341.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAA;AAEjE,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;CAuB1B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Migration20241206123341 = void 0;
|
|
4
|
-
const migrations_1 = require("@mikro-orm/migrations");
|
|
4
|
+
const migrations_1 = require("@etohq/framework/mikro-orm/migrations");
|
|
5
5
|
class Migration20241206123341 extends migrations_1.Migration {
|
|
6
6
|
async up() {
|
|
7
7
|
this.addSql(`DROP INDEX IF EXISTS "IDX_workflow_execution_id";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Migration20241206123341.js","sourceRoot":"","sources":["../../src/migrations/Migration20241206123341.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"Migration20241206123341.js","sourceRoot":"","sources":["../../src/migrations/Migration20241206123341.ts"],"names":[],"mappings":";;;AAAA,sEAAiE;AAEjE,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,MAAM,CACT;;;2DAGqD,CACtD,CAAA;QACD,IAAI,CAAC,MAAM,CACT,+HAA+H,CAChI,CAAA;QACD,IAAI,CAAC,MAAM,CACT,+GAA+G,CAChH,CAAA;QACD,IAAI,CAAC,MAAM,CACT,iIAAiI,CAClI,CAAA;QACD,IAAI,CAAC,MAAM,CACT,uIAAuI,CACxI,CAAA;QACD,IAAI,CAAC,MAAM,CACT,qHAAqH,CACtH,CAAA;IACH,CAAC;CACF;AAxBD,0DAwBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Migration20250120111059.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20250120111059.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Migration20250120111059.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20250120111059.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAElE,qBAAa,uBAAwB,SAAQ,SAAS;IAE9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAInB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAI5B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Migration20250120111059 = void 0;
|
|
4
|
-
const migrations_1 = require("@mikro-orm/migrations");
|
|
4
|
+
const migrations_1 = require("@etohq/framework/mikro-orm/migrations");
|
|
5
5
|
class Migration20250120111059 extends migrations_1.Migration {
|
|
6
6
|
async up() {
|
|
7
7
|
this.addSql('CREATE UNIQUE INDEX IF NOT EXISTS "IDX_workflow_execution_workflow_id_transaction_id_unique" ON "workflow_execution" (workflow_id, transaction_id) WHERE deleted_at IS NULL;');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Migration20250120111059.js","sourceRoot":"","sources":["../../src/migrations/Migration20250120111059.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"Migration20250120111059.js","sourceRoot":"","sources":["../../src/migrations/Migration20250120111059.ts"],"names":[],"mappings":";;;AAAA,sEAAkE;AAElE,MAAa,uBAAwB,SAAQ,sBAAS;IAEpD,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,MAAM,CAAC,8KAA8K,CAAC,CAAC;IAC9L,CAAC;IAED,KAAK,CAAC,IAAI;QACR,IAAI,CAAC,MAAM,CAAC,kFAAkF,CAAC,CAAC;IAClG,CAAC;CAEF;AAVD,0DAUC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Migration20250128174354.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20250128174354.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Migration20250128174354.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20250128174354.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAA;AAEjE,qBAAa,uBAAwB,SAAQ,SAAS;IACrC,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAgBnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAKrC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Migration20250128174354 = void 0;
|
|
4
|
-
const migrations_1 = require("@mikro-orm/migrations");
|
|
4
|
+
const migrations_1 = require("@etohq/framework/mikro-orm/migrations");
|
|
5
5
|
class Migration20250128174354 extends migrations_1.Migration {
|
|
6
6
|
async up() {
|
|
7
7
|
this.addSql(`alter table if exists "workflow_execution" add column if not exists "retention_time" integer null;`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Migration20250128174354.js","sourceRoot":"","sources":["../../src/migrations/Migration20250128174354.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"Migration20250128174354.js","sourceRoot":"","sources":["../../src/migrations/Migration20250128174354.ts"],"names":[],"mappings":";;;AAAA,sEAAiE;AAEjE,MAAa,uBAAwB,SAAQ,sBAAS;IAC3C,KAAK,CAAC,EAAE;QACf,IAAI,CAAC,MAAM,CACT,oGAAoG,CACrG,CAAA;QACD,IAAI,CAAC,MAAM,CAAC;;;;;;;;;KASX,CAAC,CAAA;IACJ,CAAC;IAEQ,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,MAAM,CACT,oFAAoF,CACrF,CAAA;IACH,CAAC;CACF;AAtBD,0DAsBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Migration20250505101505.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20250505101505.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Migration20250505101505.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20250505101505.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAA;AAGjE,qBAAa,uBAAwB,SAAQ,SAAS;IACrC,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAwCnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAkBrC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Migration20250505101505 = void 0;
|
|
4
|
-
const migrations_1 = require("@mikro-orm/migrations");
|
|
4
|
+
const migrations_1 = require("@etohq/framework/mikro-orm/migrations");
|
|
5
5
|
const ulid_1 = require("ulid");
|
|
6
6
|
class Migration20250505101505 extends migrations_1.Migration {
|
|
7
7
|
async up() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Migration20250505101505.js","sourceRoot":"","sources":["../../src/migrations/Migration20250505101505.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"Migration20250505101505.js","sourceRoot":"","sources":["../../src/migrations/Migration20250505101505.ts"],"names":[],"mappings":";;;AAAA,sEAAiE;AACjE,+BAA2B;AAE3B,MAAa,uBAAwB,SAAQ,sBAAS;IAC3C,KAAK,CAAC,EAAE;QACf,IAAI,CAAC,MAAM,CACT,qIAAqI,CACtI,CAAA;QACD,IAAI,CAAC,MAAM,CACT,kFAAkF,CACnF,CAAA;QACD,IAAI,CAAC,MAAM,CACT,0HAA0H,CAC3H,CAAA;QAED,IAAI,CAAC,MAAM,CACT,uGAAuG,IAAA,WAAI,GAAE,IAAI,CAClH,CAAA;QACD,IAAI,CAAC,MAAM,CACT,6LAA6L,CAC9L,CAAA;QACD;;;;;;;;;;;;;;WAcG;QACH,IAAI,CAAC,MAAM,CACT,iGAAiG,CAClG,CAAA;QACD,IAAI,CAAC,MAAM,CACT,8IAA8I,CAC/I,CAAA;IACH,CAAC;IAEQ,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,MAAM,CACT,yFAAyF,CAC1F,CAAA;QACD,IAAI,CAAC,MAAM,CACT,iGAAiG,CAClG,CAAA;QACD,IAAI,CAAC,MAAM,CACT,4EAA4E,CAC7E,CAAA;QAED,IAAI,CAAC,MAAM,CACT,8KAA8K,CAC/K,CAAA;QACD,IAAI,CAAC,MAAM,CACT,oIAAoI,CACrI,CAAA;IACH,CAAC;CACF;AA3DD,0DA2DC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Migration20250819110923.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20250819110923.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAElE,qBAAa,uBAAwB,SAAQ,SAAS;IAErC,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAInB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAIrC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Migration20250819110923 = void 0;
|
|
4
|
+
const migrations_1 = require("@etohq/framework/mikro-orm/migrations");
|
|
5
|
+
class Migration20250819110923 extends migrations_1.Migration {
|
|
6
|
+
async up() {
|
|
7
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_workflow_execution_run_id" ON "workflow_execution" (run_id) WHERE deleted_at IS NULL;`);
|
|
8
|
+
}
|
|
9
|
+
async down() {
|
|
10
|
+
this.addSql(`drop index if exists "IDX_workflow_execution_run_id";`);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.Migration20250819110923 = Migration20250819110923;
|
|
14
|
+
//# sourceMappingURL=Migration20250819110923.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Migration20250819110923.js","sourceRoot":"","sources":["../../src/migrations/Migration20250819110923.ts"],"names":[],"mappings":";;;AAAA,sEAAkE;AAElE,MAAa,uBAAwB,SAAQ,sBAAS;IAE3C,KAAK,CAAC,EAAE;QACf,IAAI,CAAC,MAAM,CAAC,uHAAuH,CAAC,CAAC;IACvI,CAAC;IAEQ,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,MAAM,CAAC,uDAAuD,CAAC,CAAC;IACvE,CAAC;CAEF;AAVD,0DAUC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Migration20250819110924.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20250819110924.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAA;AAEjE,qBAAa,uBAAwB,SAAQ,SAAS;IACrC,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAUnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAOrC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Migration20250819110924 = void 0;
|
|
4
|
+
const migrations_1 = require("@etohq/framework/mikro-orm/migrations");
|
|
5
|
+
class Migration20250819110924 extends migrations_1.Migration {
|
|
6
|
+
async up() {
|
|
7
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_workflow_execution_workflow_id_transaction_id" ON "workflow_execution" (workflow_id, transaction_id) WHERE deleted_at IS NULL;`);
|
|
8
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_workflow_execution_run_id" ON "workflow_execution" (run_id) WHERE deleted_at IS NULL;`);
|
|
9
|
+
}
|
|
10
|
+
async down() {
|
|
11
|
+
this.addSql(`drop index if exists "IDX_workflow_execution_workflow_id_transaction_id";`);
|
|
12
|
+
this.addSql(`drop index if exists "IDX_workflow_execution_run_id";`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.Migration20250819110924 = Migration20250819110924;
|
|
16
|
+
//# sourceMappingURL=Migration20250819110924.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Migration20250819110924.js","sourceRoot":"","sources":["../../src/migrations/Migration20250819110924.ts"],"names":[],"mappings":";;;AAAA,sEAAiE;AAEjE,MAAa,uBAAwB,SAAQ,sBAAS;IAC3C,KAAK,CAAC,EAAE;QACf,IAAI,CAAC,MAAM,CACT,gKAAgK,CACjK,CAAA;QAED,IAAI,CAAC,MAAM,CACT,uHAAuH,CACxH,CAAA;IACH,CAAC;IAEQ,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,MAAM,CACT,2EAA2E,CAC5E,CAAA;QAED,IAAI,CAAC,MAAM,CAAC,uDAAuD,CAAC,CAAA;IACtE,CAAC;CACF;AAlBD,0DAkBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Migration20250908080326.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20250908080326.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAA;AAEjE,qBAAa,uBAAwB,SAAQ,SAAS;IACrC,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAenB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAcrC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Migration20250908080326 = void 0;
|
|
4
|
+
const migrations_1 = require("@etohq/framework/mikro-orm/migrations");
|
|
5
|
+
class Migration20250908080326 extends migrations_1.Migration {
|
|
6
|
+
async up() {
|
|
7
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_workflow_execution_workflow_id_transaction_id" ON "workflow_execution" (workflow_id, transaction_id) WHERE deleted_at IS NULL;`);
|
|
8
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_workflow_execution_state_updated_at" ON "workflow_execution" (state, updated_at) WHERE deleted_at IS NULL;`);
|
|
9
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_workflow_execution_retention_time_updated_at_state" ON "workflow_execution" (retention_time, updated_at, state) WHERE deleted_at IS NULL AND retention_time IS NOT NULL;`);
|
|
10
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_workflow_execution_updated_at_retention_time" ON "workflow_execution" (updated_at, retention_time) WHERE deleted_at IS NULL AND retention_time IS NOT NULL AND state IN ('done', 'failed', 'reverted');`);
|
|
11
|
+
}
|
|
12
|
+
async down() {
|
|
13
|
+
this.addSql(`drop index if exists "IDX_workflow_execution_workflow_id_transaction_id";`);
|
|
14
|
+
this.addSql(`drop index if exists "IDX_workflow_execution_state_updated_at";`);
|
|
15
|
+
this.addSql(`drop index if exists "IDX_workflow_execution_retention_time_updated_at_state";`);
|
|
16
|
+
this.addSql(`drop index if exists "IDX_workflow_execution_updated_at_retention_time";`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.Migration20250908080326 = Migration20250908080326;
|
|
20
|
+
//# sourceMappingURL=Migration20250908080326.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Migration20250908080326.js","sourceRoot":"","sources":["../../src/migrations/Migration20250908080326.ts"],"names":[],"mappings":";;;AAAA,sEAAiE;AAEjE,MAAa,uBAAwB,SAAQ,sBAAS;IAC3C,KAAK,CAAC,EAAE;QACf,IAAI,CAAC,MAAM,CACT,gKAAgK,CACjK,CAAA;QACD,IAAI,CAAC,MAAM,CACT,4IAA4I,CAC7I,CAAA;QACD,IAAI,CAAC,MAAM,CACT,0MAA0M,CAC3M,CAAA;QACD,IAAI,CAAC,MAAM,CACT,yOAAyO,CAC1O,CAAA;IACH,CAAC;IAEQ,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,MAAM,CACT,2EAA2E,CAC5E,CAAA;QACD,IAAI,CAAC,MAAM,CACT,iEAAiE,CAClE,CAAA;QACD,IAAI,CAAC,MAAM,CACT,gFAAgF,CACjF,CAAA;QACD,IAAI,CAAC,MAAM,CACT,0EAA0E,CAC3E,CAAA;IACH,CAAC;CACF;AA9BD,0DA8BC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-execution.d.ts","sourceRoot":"","sources":["../../src/models/workflow-execution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAGjE,eAAO,MAAM,iBAAiB;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"workflow-execution.d.ts","sourceRoot":"","sources":["../../src/models/workflow-execution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAGjE,eAAO,MAAM,iBAAiB;;;;;;;;;yBAsD1B,CAAA"}
|
|
@@ -36,5 +36,25 @@ exports.WorkflowExecution = utils_1.model
|
|
|
36
36
|
on: ["state"],
|
|
37
37
|
where: "deleted_at IS NULL",
|
|
38
38
|
},
|
|
39
|
+
{
|
|
40
|
+
on: ["run_id"],
|
|
41
|
+
where: "deleted_at IS NULL",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
on: ["workflow_id", "transaction_id"],
|
|
45
|
+
where: "deleted_at IS NULL",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
on: ["state", "updated_at"],
|
|
49
|
+
where: "deleted_at IS NULL",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
on: ["retention_time", "updated_at", "state"],
|
|
53
|
+
where: "deleted_at IS NULL AND retention_time IS NOT NULL",
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
on: ["updated_at", "retention_time"],
|
|
57
|
+
where: "deleted_at IS NULL AND retention_time IS NOT NULL AND state IN ('done', 'failed', 'reverted')",
|
|
58
|
+
},
|
|
39
59
|
]);
|
|
40
60
|
//# sourceMappingURL=workflow-execution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-execution.js","sourceRoot":"","sources":["../../src/models/workflow-execution.ts"],"names":[],"mappings":";;;AAAA,kEAAiE;AACjE,kDAA8C;AAEjC,QAAA,iBAAiB,GAAG,aAAK;KACnC,MAAM,CAAC,oBAAoB,EAAE;IAC5B,EAAE,EAAE,aAAK,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;IACnC,WAAW,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,UAAU,EAAE;IACtC,cAAc,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,UAAU,EAAE;IACzC,MAAM,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,UAAU,EAAE;IACjC,SAAS,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAClC,OAA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,IAAI,CAAC,gCAAgB,CAAC;IACnC,cAAc,EAAE,aAAK,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC1C,CAAC;KACD,OAAO,CAAC;IACP;QACE,EAAE,EAAE,CAAC,IAAI,CAAC;QACV,KAAK,EAAE,oBAAoB;KAC5B;IACD;QACE,EAAE,EAAE,CAAC,aAAa,CAAC;QACnB,KAAK,EAAE,oBAAoB;KAC5B;IACD;QACE,EAAE,EAAE,CAAC,gBAAgB,CAAC;QACtB,KAAK,EAAE,oBAAoB;KAC5B;IACD;QACE,EAAE,EAAE,CAAC,aAAa,EAAE,gBAAgB,EAAE,QAAQ,CAAC;QAC/C,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,oBAAoB;KAC5B;IACD;QACE,EAAE,EAAE,CAAC,OAAO,CAAC;QACb,KAAK,EAAE,oBAAoB;KAC5B;IACD;QACE,EAAE,EAAE,CAAC,QAAQ,CAAC;QACd,KAAK,EAAE,oBAAoB;KAC5B;IACD;QACE,EAAE,EAAE,CAAC,aAAa,EAAE,gBAAgB,CAAC;QACrC,KAAK,EAAE,oBAAoB;KAC5B;IACD;QACE,EAAE,EAAE,CAAC,OAAO,EAAE,YAAY,CAAC;QAC3B,KAAK,EAAE,oBAAoB;KAC5B;IACD;QACE,EAAE,EAAE,CAAC,gBAAgB,EAAE,YAAY,EAAE,OAAO,CAAC;QAC7C,KAAK,EAAE,mDAAmD;KAC3D;IACD;QACE,EAAE,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;QACpC,KAAK,EACH,+FAA+F;KAClG;CACF,CAAC,CAAA"}
|
|
@@ -15,6 +15,10 @@ export type WorkflowOrchestratorCancelOptions = Omit<FlowCancelOptions, "transac
|
|
|
15
15
|
container?: ContainerLike;
|
|
16
16
|
};
|
|
17
17
|
type RegisterStepSuccessOptions<T> = Omit<WorkflowOrchestratorRunOptions<T>, "transactionId" | "input">;
|
|
18
|
+
type RegisterStepFailureOptions<T> = Omit<WorkflowOrchestratorRunOptions<T>, "transactionId" | "input"> & {
|
|
19
|
+
forcePermanentFailure?: boolean;
|
|
20
|
+
};
|
|
21
|
+
type RetryStepOptions<T> = Omit<WorkflowOrchestratorRunOptions<T>, "transactionId" | "input" | "resultFrom">;
|
|
18
22
|
type IdempotencyKeyParts = {
|
|
19
23
|
workflowId: string;
|
|
20
24
|
transactionId: string;
|
|
@@ -23,6 +27,7 @@ type IdempotencyKeyParts = {
|
|
|
23
27
|
};
|
|
24
28
|
type NotifyOptions = {
|
|
25
29
|
eventType: keyof DistributedTransactionEvents;
|
|
30
|
+
isFlowAsync: boolean;
|
|
26
31
|
workflowId: string;
|
|
27
32
|
transactionId?: string;
|
|
28
33
|
step?: TransactionStep;
|
|
@@ -53,8 +58,7 @@ export declare class WorkflowOrchestratorService {
|
|
|
53
58
|
protected redisPublisher: Redis;
|
|
54
59
|
protected redisSubscriber: Redis;
|
|
55
60
|
protected container_: EtoContainer;
|
|
56
|
-
private subscribers;
|
|
57
|
-
private activeStepsCount;
|
|
61
|
+
private static subscribers;
|
|
58
62
|
protected redisDistributedTransactionStorage_: RedisDistributedTransactionStorage;
|
|
59
63
|
constructor({ dataLoaderOnly, redisDistributedTransactionStorage, redisPublisher, redisSubscriber, sharedContainer, }: {
|
|
60
64
|
dataLoaderOnly: boolean;
|
|
@@ -71,6 +75,10 @@ export declare class WorkflowOrchestratorService {
|
|
|
71
75
|
run<T = unknown>(workflowIdOrWorkflow: string | ReturnWorkflow<any, any, any>, options?: WorkflowOrchestratorRunOptions<T>): Promise<any>;
|
|
72
76
|
cancel(workflowIdOrWorkflow: string | ReturnWorkflow<any, any, any>, options?: WorkflowOrchestratorCancelOptions): Promise<any>;
|
|
73
77
|
getRunningTransaction(workflowId: string, transactionId: string, context?: Context): Promise<DistributedTransactionType>;
|
|
78
|
+
retryStep<T = unknown>({ idempotencyKey, options, }: {
|
|
79
|
+
idempotencyKey: string | IdempotencyKeyParts;
|
|
80
|
+
options?: RetryStepOptions<T>;
|
|
81
|
+
}): Promise<any>;
|
|
74
82
|
setStepSuccess<T = unknown>({ idempotencyKey, stepResponse, options, }: {
|
|
75
83
|
idempotencyKey: string | IdempotencyKeyParts;
|
|
76
84
|
stepResponse: unknown;
|
|
@@ -79,11 +87,12 @@ export declare class WorkflowOrchestratorService {
|
|
|
79
87
|
setStepFailure<T = unknown>({ idempotencyKey, stepResponse, options, }: {
|
|
80
88
|
idempotencyKey: string | IdempotencyKeyParts;
|
|
81
89
|
stepResponse: unknown;
|
|
82
|
-
options?:
|
|
90
|
+
options?: RegisterStepFailureOptions<T>;
|
|
83
91
|
}): Promise<any>;
|
|
84
92
|
subscribe({ workflowId, transactionId, subscriber, subscriberId, }: SubscribeOptions): void;
|
|
85
93
|
unsubscribe({ workflowId, transactionId, subscriberOrId, }: UnsubscribeOptions): void;
|
|
86
94
|
private notify;
|
|
95
|
+
private processSubscriberNotifications;
|
|
87
96
|
private getChannelName;
|
|
88
97
|
private buildWorkflowEvents;
|
|
89
98
|
private buildIdempotencyKeyAndParts;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-orchestrator.d.ts","sourceRoot":"","sources":["../../src/services/workflow-orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,4BAA4B,EAC5B,0BAA0B,EAE1B,eAAe,EAEhB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,aAAa,EACb,OAAO,EAEP,YAAY,EACb,MAAM,wBAAwB,CAAA;AAC/B,OAAO,
|
|
1
|
+
{"version":3,"file":"workflow-orchestrator.d.ts","sourceRoot":"","sources":["../../src/services/workflow-orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,4BAA4B,EAC5B,0BAA0B,EAE1B,eAAe,EAEhB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,aAAa,EACb,OAAO,EAEP,YAAY,EACb,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAIL,gBAAgB,EACjB,MAAM,wBAAwB,CAAA;AAC/B,OA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