@nocobase/plugin-workflow-test 1.6.0-alpha.11 → 1.6.0-alpha.13

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.
@@ -8,11 +8,11 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "1.6.0-alpha.11",
12
- "@nocobase/utils": "1.6.0-alpha.11",
11
+ "@nocobase/client": "1.6.0-alpha.13",
12
+ "@nocobase/utils": "1.6.0-alpha.13",
13
13
  "lodash": "4.17.21",
14
- "@nocobase/test": "1.6.0-alpha.11",
15
- "@nocobase/server": "1.6.0-alpha.11",
16
- "@nocobase/data-source-manager": "1.6.0-alpha.11",
17
- "@nocobase/database": "1.6.0-alpha.11"
14
+ "@nocobase/test": "1.6.0-alpha.13",
15
+ "@nocobase/server": "1.6.0-alpha.13",
16
+ "@nocobase/data-source-manager": "1.6.0-alpha.13",
17
+ "@nocobase/database": "1.6.0-alpha.13"
18
18
  };
@@ -48,6 +48,10 @@ declare const _default: {
48
48
  };
49
49
  resume(node: any, input: any, processor: any): any;
50
50
  };
51
+ asyncResume: {
52
+ run(node: any, input: any, processor: any): Promise<any>;
53
+ resume(node: any, job: any, processor: any): any;
54
+ };
51
55
  customizedSuccess: {
52
56
  run(node: any, input: any, processor: any): {
53
57
  status: number;
@@ -93,6 +93,26 @@ var instructions_default = {
93
93
  return null;
94
94
  }
95
95
  },
96
+ asyncResume: {
97
+ async run(node, input, processor) {
98
+ const job = await processor.saveJob({
99
+ status: 0,
100
+ nodeId: node.id,
101
+ nodeKey: node.key,
102
+ upstreamId: (input == null ? void 0 : input.id) ?? null
103
+ });
104
+ setTimeout(() => {
105
+ job.set({
106
+ status: 1
107
+ });
108
+ processor.options.plugin.resume(job);
109
+ }, 100);
110
+ return null;
111
+ },
112
+ resume(node, job, processor) {
113
+ return job;
114
+ }
115
+ },
96
116
  customizedSuccess: {
97
117
  run(node, input, processor) {
98
118
  return {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@nocobase/plugin-workflow-test",
3
3
  "displayName": "Workflow: test kit",
4
4
  "displayName.zh-CN": "工作流:测试工具包",
5
- "version": "1.6.0-alpha.11",
5
+ "version": "1.6.0-alpha.13",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "dist/server/index.js",
8
8
  "types": "./dist/server/index.d.ts",
@@ -11,5 +11,5 @@
11
11
  "@nocobase/server": "1.x",
12
12
  "@nocobase/test": "1.x"
13
13
  },
14
- "gitHead": "2a07f8a9af90b3ce09229cae72a485c14df2361b"
14
+ "gitHead": "b051b9016899d0c9fd5b54543d3898edace9950b"
15
15
  }