@moostjs/event-wf 0.5.12 → 0.5.14
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 +4 -1
- package/dist/index.mjs +5 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -132,7 +132,10 @@ class MoostWf {
|
|
|
132
132
|
if (!wfSchema) {
|
|
133
133
|
wfSchema = mate.read(opts.fakeInstance)?.wfSchema;
|
|
134
134
|
}
|
|
135
|
-
const _fn =
|
|
135
|
+
const _fn = (async () => {
|
|
136
|
+
moost.setControllerContext(this.moost, 'bindHandler', targetPath);
|
|
137
|
+
return fn();
|
|
138
|
+
});
|
|
136
139
|
this.toInit.push(() => {
|
|
137
140
|
this.wfApp.flow(targetPath, wfSchema || [], opts.prefix === '/' ? '' : opts.prefix, _fn);
|
|
138
141
|
opts.logHandler(`${'[36m'}(${handler.type})${'[32m'}${targetPath}`);
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useWfState, WooksWf, createWfApp } from '@wooksjs/event-wf';
|
|
2
2
|
export { useWFContext, useWfState } from '@wooksjs/event-wf';
|
|
3
|
-
import { getMoostMate, Resolve, defineMoostEventHandler, getMoostInfact } from 'moost';
|
|
3
|
+
import { getMoostMate, Resolve, defineMoostEventHandler, getMoostInfact, setControllerContext } from 'moost';
|
|
4
4
|
import { useEventId } from '@wooksjs/event-core';
|
|
5
5
|
export { StepRetriableError } from '@prostojs/wf';
|
|
6
6
|
|
|
@@ -131,7 +131,10 @@ class MoostWf {
|
|
|
131
131
|
if (!wfSchema) {
|
|
132
132
|
wfSchema = mate.read(opts.fakeInstance)?.wfSchema;
|
|
133
133
|
}
|
|
134
|
-
const _fn =
|
|
134
|
+
const _fn = (async () => {
|
|
135
|
+
setControllerContext(this.moost, 'bindHandler', targetPath);
|
|
136
|
+
return fn();
|
|
137
|
+
});
|
|
135
138
|
this.toInit.push(() => {
|
|
136
139
|
this.wfApp.flow(targetPath, wfSchema || [], opts.prefix === '/' ? '' : opts.prefix, _fn);
|
|
137
140
|
opts.logHandler(`${'[36m'}(${handler.type})${'[32m'}${targetPath}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moostjs/event-wf",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.14",
|
|
4
4
|
"description": "@moostjs/event-wf",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"moost": "0.5.
|
|
40
|
+
"moost": "0.5.14",
|
|
41
41
|
"wooks": "^0.5.19",
|
|
42
42
|
"@wooksjs/event-core": "^0.5.19",
|
|
43
43
|
"@wooksjs/event-wf": "^0.5.19",
|