@wooksjs/event-wf 0.4.16 → 0.4.17

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.cjs CHANGED
@@ -81,8 +81,8 @@ class WooksWf extends wooks.WooksAdapterBase {
81
81
  start(schemaId, inputContext, input, spy, cleanup) {
82
82
  return this._start(schemaId, inputContext, undefined, input, spy, cleanup);
83
83
  }
84
- resume(schemaId, state, input, spy, cleanup) {
85
- return this._start(schemaId, state.context, state.indexes, input, spy, cleanup);
84
+ resume(state, input, spy, cleanup) {
85
+ return this._start(state.schemaId, state.context, state.indexes, input, spy, cleanup);
86
86
  }
87
87
  async _start(schemaId, inputContext, indexes, input, spy, cleanup) {
88
88
  const resume = !!indexes?.length;
@@ -120,7 +120,7 @@ class WooksWf extends wooks.WooksAdapterBase {
120
120
  }
121
121
  restoreCtx();
122
122
  if (resume) {
123
- result = await this.wf.resume(id, { context: inputContext, indexes }, input, _spy);
123
+ result = await this.wf.resume({ schemaId: id, context: inputContext, indexes }, input, _spy);
124
124
  break;
125
125
  }
126
126
  else {
package/dist/index.d.ts CHANGED
@@ -117,7 +117,8 @@ declare class WooksWf<T> extends WooksAdapterBase {
117
117
  }): _prostojs_router.TProstoRouterPathHandle<Record<string, string | string[]>>;
118
118
  flow(id: string, schema: TWorkflowSchema<T>, prefix?: string, init?: () => void | Promise<void>): _prostojs_router.TProstoRouterPathHandle<Record<string, string | string[]>>;
119
119
  start<I>(schemaId: string, inputContext: T, input?: I, spy?: TWorkflowSpy<T, I>, cleanup?: () => void): Promise<TFlowOutput<T, I>>;
120
- resume<I>(schemaId: string, state: {
120
+ resume<I>(state: {
121
+ schemaId: string;
121
122
  indexes: number[];
122
123
  context: T;
123
124
  }, input?: I, spy?: TWorkflowSpy<T, I>, cleanup?: () => void): Promise<TFlowOutput<T, I>>;
package/dist/index.mjs CHANGED
@@ -79,8 +79,8 @@ class WooksWf extends WooksAdapterBase {
79
79
  start(schemaId, inputContext, input, spy, cleanup) {
80
80
  return this._start(schemaId, inputContext, undefined, input, spy, cleanup);
81
81
  }
82
- resume(schemaId, state, input, spy, cleanup) {
83
- return this._start(schemaId, state.context, state.indexes, input, spy, cleanup);
82
+ resume(state, input, spy, cleanup) {
83
+ return this._start(state.schemaId, state.context, state.indexes, input, spy, cleanup);
84
84
  }
85
85
  async _start(schemaId, inputContext, indexes, input, spy, cleanup) {
86
86
  const resume = !!indexes?.length;
@@ -118,7 +118,7 @@ class WooksWf extends WooksAdapterBase {
118
118
  }
119
119
  restoreCtx();
120
120
  if (resume) {
121
- result = await this.wf.resume(id, { context: inputContext, indexes }, input, _spy);
121
+ result = await this.wf.resume({ schemaId: id, context: inputContext, indexes }, input, _spy);
122
122
  break;
123
123
  }
124
124
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wooksjs/event-wf",
3
- "version": "0.4.16",
3
+ "version": "0.4.17",
4
4
  "description": "@wooksjs/event-wf",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -33,12 +33,12 @@
33
33
  "author": "Artem Maltsev",
34
34
  "license": "MIT",
35
35
  "peerDependencies": {
36
- "wooks": "0.4.16",
37
- "@wooksjs/event-core": "0.4.16"
36
+ "wooks": "0.4.17",
37
+ "@wooksjs/event-core": "0.4.17"
38
38
  },
39
39
  "dependencies": {
40
40
  "@prostojs/logger": "^0.4.0",
41
- "@prostojs/wf": "^0.0.12"
41
+ "@prostojs/wf": "^0.0.14"
42
42
  },
43
43
  "bugs": {
44
44
  "url": "https://github.com/wooksjs/wooksjs/issues"