@medusajs/workflow-engine-inmemory 0.0.4 → 0.0.5-next-20240505114610
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DistributedTransaction, DistributedTransactionEvents, TransactionStep } from "@medusajs/orchestration";
|
|
2
2
|
import { ContainerLike, Context } from "@medusajs/types";
|
|
3
|
-
import {
|
|
3
|
+
import { type FlowRunOptions, ReturnWorkflow } from "@medusajs/workflows-sdk";
|
|
4
4
|
import { InMemoryDistributedTransactionStorage } from "../utils";
|
|
5
|
-
export type WorkflowOrchestratorRunOptions<T> = FlowRunOptions<T> & {
|
|
5
|
+
export type WorkflowOrchestratorRunOptions<T> = Omit<FlowRunOptions<T>, "container"> & {
|
|
6
6
|
transactionId?: string;
|
|
7
7
|
container?: ContainerLike;
|
|
8
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-orchestrator.d.ts","sourceRoot":"","sources":["../../src/services/workflow-orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,4BAA4B,EAE5B,eAAe,EAChB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAmB,MAAM,iBAAiB,CAAA;AAEzE,OAAO,
|
|
1
|
+
{"version":3,"file":"workflow-orchestrator.d.ts","sourceRoot":"","sources":["../../src/services/workflow-orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,4BAA4B,EAE5B,eAAe,EAChB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAmB,MAAM,iBAAiB,CAAA;AAEzE,OAAO,EACL,KAAK,cAAc,EAGnB,cAAc,EACf,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAAE,qCAAqC,EAAE,MAAM,UAAU,CAAA;AAEhE,MAAM,MAAM,8BAA8B,CAAC,CAA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O,CAAC,mBAAmB;IA2G3B,OAAO,CAAC,2BAA2B;CA+BpC"}
|
|
@@ -90,17 +90,17 @@ class WorkflowsModuleService {
|
|
|
90
90
|
return ret;
|
|
91
91
|
}
|
|
92
92
|
async getRunningTransaction(workflowId, transactionId, context = {}) {
|
|
93
|
-
return this.workflowOrchestratorService_.getRunningTransaction(workflowId, transactionId, context);
|
|
93
|
+
return await this.workflowOrchestratorService_.getRunningTransaction(workflowId, transactionId, context);
|
|
94
94
|
}
|
|
95
95
|
async setStepSuccess({ idempotencyKey, stepResponse, options, }, context = {}) {
|
|
96
|
-
return this.workflowOrchestratorService_.setStepSuccess({
|
|
96
|
+
return await this.workflowOrchestratorService_.setStepSuccess({
|
|
97
97
|
idempotencyKey,
|
|
98
98
|
stepResponse,
|
|
99
99
|
options,
|
|
100
100
|
}, context);
|
|
101
101
|
}
|
|
102
102
|
async setStepFailure({ idempotencyKey, stepResponse, options, }, context = {}) {
|
|
103
|
-
return this.workflowOrchestratorService_.setStepFailure({
|
|
103
|
+
return await this.workflowOrchestratorService_.setStepFailure({
|
|
104
104
|
idempotencyKey,
|
|
105
105
|
stepResponse,
|
|
106
106
|
options,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/workflow-engine-inmemory",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5-next-20240505114610",
|
|
4
4
|
"description": "Medusa Workflow Orchestrator module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@mikro-orm/cli": "5.9.7",
|
|
38
38
|
"cross-env": "^5.2.1",
|
|
39
39
|
"jest": "^29.6.3",
|
|
40
|
-
"medusa-test-utils": "
|
|
40
|
+
"medusa-test-utils": "1.1.45-next-20240505114610",
|
|
41
41
|
"rimraf": "^3.0.2",
|
|
42
42
|
"ts-jest": "^29.1.1",
|
|
43
43
|
"ts-node": "^10.9.1",
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"typescript": "^5.1.6"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@medusajs/modules-sdk": "
|
|
49
|
-
"@medusajs/types": "
|
|
50
|
-
"@medusajs/utils": "
|
|
51
|
-
"@medusajs/workflows-sdk": "
|
|
48
|
+
"@medusajs/modules-sdk": "1.12.12-next-20240505114610",
|
|
49
|
+
"@medusajs/types": "1.11.17-next-20240505114610",
|
|
50
|
+
"@medusajs/utils": "1.11.10-next-20240505114610",
|
|
51
|
+
"@medusajs/workflows-sdk": "0.1.7-next-20240505114610",
|
|
52
52
|
"@mikro-orm/core": "5.9.7",
|
|
53
53
|
"@mikro-orm/migrations": "5.9.7",
|
|
54
54
|
"@mikro-orm/postgresql": "5.9.7",
|