@moostjs/event-wf 0.3.17 → 0.3.19
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 -0
- package/dist/index.d.ts +10 -10
- package/dist/index.mjs +1 -1
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -135,6 +135,10 @@ Object.defineProperty(exports, "useWFContext", {
|
|
|
135
135
|
enumerable: true,
|
|
136
136
|
get: function () { return eventWf.useWFContext; }
|
|
137
137
|
});
|
|
138
|
+
Object.defineProperty(exports, "useWfState", {
|
|
139
|
+
enumerable: true,
|
|
140
|
+
get: function () { return eventWf.useWfState; }
|
|
141
|
+
});
|
|
138
142
|
Object.defineProperty(exports, "StepRetriableError", {
|
|
139
143
|
enumerable: true,
|
|
140
144
|
get: function () { return wf.StepRetriableError; }
|
package/dist/index.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { TMoostAdapter, Moost, TMoostAdapterOptions } from 'moost';
|
|
2
2
|
import { WooksWf, TWooksWfOptions } from '@wooksjs/event-wf';
|
|
3
|
-
export { useWFContext } from '@wooksjs/event-wf';
|
|
3
|
+
export { useWFContext, useWfState } from '@wooksjs/event-wf';
|
|
4
4
|
import { TWorkflowSpy, TFlowOutput, TWorkflowSchema } from '@prostojs/wf';
|
|
5
5
|
export { StepRetriableError, TFlowOutput, TWorkflowSchema } from '@prostojs/wf';
|
|
6
6
|
|
|
7
7
|
interface TWfHandlerMeta {
|
|
8
8
|
path: string;
|
|
9
9
|
}
|
|
10
|
-
declare class MoostWf<T> implements TMoostAdapter<TWfHandlerMeta> {
|
|
11
|
-
protected opts?: WooksWf<T> | TWooksWfOptions | undefined;
|
|
10
|
+
declare class MoostWf<T = any, IR = any> implements TMoostAdapter<TWfHandlerMeta> {
|
|
11
|
+
protected opts?: WooksWf<T, IR> | TWooksWfOptions | undefined;
|
|
12
12
|
private readonly debug?;
|
|
13
|
-
protected wfApp: WooksWf<T>;
|
|
14
|
-
constructor(opts?: WooksWf<T> | TWooksWfOptions | undefined, debug?: boolean | undefined);
|
|
13
|
+
protected wfApp: WooksWf<T, IR>;
|
|
14
|
+
constructor(opts?: WooksWf<T, IR> | TWooksWfOptions | undefined, debug?: boolean | undefined);
|
|
15
15
|
onNotFound(): Promise<unknown>;
|
|
16
16
|
protected moost?: Moost;
|
|
17
17
|
protected toInit: (() => void)[];
|
|
18
18
|
onInit(moost: Moost): void;
|
|
19
|
-
getWfApp(): WooksWf<T>;
|
|
20
|
-
attachSpy<I>(fn: TWorkflowSpy<T, I>): () => void;
|
|
21
|
-
detachSpy<I>(fn: TWorkflowSpy<T, I>): void;
|
|
22
|
-
start<I>(schemaId: string, initialContext: T, input?: I): Promise<TFlowOutput<T, I>>;
|
|
19
|
+
getWfApp(): WooksWf<T, IR>;
|
|
20
|
+
attachSpy<I>(fn: TWorkflowSpy<T, I, IR>): () => void;
|
|
21
|
+
detachSpy<I>(fn: TWorkflowSpy<T, I, IR>): void;
|
|
22
|
+
start<I>(schemaId: string, initialContext: T, input?: I): Promise<TFlowOutput<T, I, IR>>;
|
|
23
23
|
resume<I>(state: {
|
|
24
24
|
schemaId: string;
|
|
25
25
|
context: T;
|
|
26
26
|
indexes: number[];
|
|
27
|
-
}, input?: I): Promise<TFlowOutput<T, I>>;
|
|
27
|
+
}, input?: I): Promise<TFlowOutput<T, I, IR>>;
|
|
28
28
|
bindHandler<T extends object = object>(opts: TMoostAdapterOptions<TWfHandlerMeta, T>): void;
|
|
29
29
|
}
|
|
30
30
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getMoostMate, getMoostInfact, defineMoostEventHandler, Resolve } from 'moost';
|
|
2
2
|
import { WooksWf, createWfApp, useWfState } from '@wooksjs/event-wf';
|
|
3
|
-
export { useWFContext } from '@wooksjs/event-wf';
|
|
3
|
+
export { useWFContext, useWfState } from '@wooksjs/event-wf';
|
|
4
4
|
import { useEventId } from '@wooksjs/event-core';
|
|
5
5
|
export { StepRetriableError } from '@prostojs/wf';
|
|
6
6
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moostjs/event-wf",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.19",
|
|
4
4
|
"description": "@moostjs/event-wf",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"moost": "0.3.
|
|
41
|
-
"wooks": "^0.4.
|
|
42
|
-
"@wooksjs/event-core": "^0.4.
|
|
43
|
-
"@wooksjs/event-wf": "^0.4.
|
|
40
|
+
"moost": "0.3.19",
|
|
41
|
+
"wooks": "^0.4.22",
|
|
42
|
+
"@wooksjs/event-core": "^0.4.22",
|
|
43
|
+
"@wooksjs/event-wf": "^0.4.22",
|
|
44
44
|
"@prostojs/infact": "^0.1.13",
|
|
45
45
|
"@prostojs/mate": "^0.2.1",
|
|
46
|
-
"@prostojs/wf": "^0.0.
|
|
46
|
+
"@prostojs/wf": "^0.0.15"
|
|
47
47
|
},
|
|
48
48
|
"homepage": "https://github.com/moostjs/moostjs/tree/main/packages/event-wf#readme"
|
|
49
49
|
}
|