@nocobase/plugin-workflow-test 2.0.0-beta.2 → 2.0.0-beta.21

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": "2.0.0-beta.2",
12
- "@nocobase/utils": "2.0.0-beta.2",
11
+ "@nocobase/client": "2.0.0-beta.21",
12
+ "@nocobase/utils": "2.0.0-beta.21",
13
13
  "lodash": "4.17.21",
14
- "@nocobase/test": "2.0.0-beta.2",
15
- "@nocobase/server": "2.0.0-beta.2",
16
- "@nocobase/data-source-manager": "2.0.0-beta.2",
17
- "@nocobase/database": "2.0.0-beta.2"
14
+ "@nocobase/test": "2.0.0-beta.21",
15
+ "@nocobase/server": "2.0.0-beta.21",
16
+ "@nocobase/data-source-manager": "2.0.0-beta.21",
17
+ "@nocobase/database": "2.0.0-beta.21"
18
18
  };
@@ -14,6 +14,9 @@ declare const _default: {
14
14
  status: number;
15
15
  result: any;
16
16
  };
17
+ duplicateConfig(node: any, { origin }: {
18
+ origin: any;
19
+ }): any;
17
20
  test(config?: {}): {
18
21
  status: number;
19
22
  result: any;
@@ -39,6 +39,16 @@ var instructions_default = {
39
39
  result: config.path == null ? result : import_utils.lodash.get(result, config.path)
40
40
  };
41
41
  },
42
+ duplicateConfig(node, { origin }) {
43
+ var _a;
44
+ if ((_a = origin == null ? void 0 : origin.config) == null ? void 0 : _a.duplicateFlag) {
45
+ return {
46
+ ...origin.config,
47
+ duplicated: true
48
+ };
49
+ }
50
+ return (origin == null ? void 0 : origin.config) ?? node.config;
51
+ },
42
52
  test(config = {}) {
43
53
  return {
44
54
  status: 1,
@@ -108,11 +118,15 @@ var instructions_default = {
108
118
  nodeKey: node.key,
109
119
  upstreamId: (input == null ? void 0 : input.id) ?? null
110
120
  });
121
+ const plugin = processor.options.plugin;
111
122
  setTimeout(() => {
123
+ if (!plugin.app || plugin.app.stopped) {
124
+ return;
125
+ }
112
126
  job.set({
113
127
  status: 1
114
128
  });
115
- processor.options.plugin.resume(job);
129
+ plugin.resume(job);
116
130
  }, node.config.duration ?? 100);
117
131
  return null;
118
132
  },
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "displayName": "Workflow: test kit",
4
4
  "displayName.ru-RU": "Рабочий процесс: Набор тестов",
5
5
  "displayName.zh-CN": "工作流:测试工具包",
6
- "version": "2.0.0-beta.2",
6
+ "version": "2.0.0-beta.21",
7
7
  "license": "AGPL-3.0",
8
8
  "main": "dist/server/index.js",
9
9
  "types": "./dist/server/index.d.ts",
@@ -15,5 +15,5 @@
15
15
  "nocobase": {
16
16
  "internal": true
17
17
  },
18
- "gitHead": "b77a33ee933ae6e09d2d5dce017ca15d8552d57b"
18
+ "gitHead": "3ea30685d9592934ec578c0b5e8def60a7fcc3c2"
19
19
  }