@nocobase/plugin-workflow 0.18.0-alpha.8 → 0.19.0-alpha.1
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/client/components/DrawerForm.d.ts +5 -0
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +23 -23
- package/dist/externalVersion.js +11 -11
- package/dist/locale/zh-CN.json +1 -1
- package/dist/node_modules/cron-parser/package.json +1 -1
- package/dist/node_modules/lru-cache/package.json +1 -1
- package/dist/server/Plugin.d.ts +3 -1
- package/dist/server/Plugin.js +21 -15
- package/dist/server/actions/workflows.js +1 -1
- package/dist/server/collections/executions.js +4 -2
- package/dist/server/collections/flow_nodes.js +2 -2
- package/dist/server/collections/jobs.js +4 -2
- package/dist/server/collections/workflows.js +7 -3
- package/dist/server/migrations/20221129153547-calculation-variables.d.ts +1 -0
- package/dist/server/migrations/20221129153547-calculation-variables.js +1 -0
- package/dist/server/migrations/20230221032941-change-request-body-type.d.ts +1 -0
- package/dist/server/migrations/20230221032941-change-request-body-type.js +1 -0
- package/dist/server/migrations/20230221071831-calculation-expression.d.ts +1 -0
- package/dist/server/migrations/20230221071831-calculation-expression.js +1 -0
- package/dist/server/migrations/20230221121203-condition-calculation.d.ts +1 -0
- package/dist/server/migrations/20230221121203-condition-calculation.js +1 -0
- package/dist/server/migrations/20230221162902-jsonb-to-json.d.ts +1 -0
- package/dist/server/migrations/20230221162902-jsonb-to-json.js +1 -0
- package/dist/server/migrations/20230411034722-manual-multi-form.d.ts +1 -0
- package/dist/server/migrations/20230411034722-manual-multi-form.js +1 -0
- package/dist/server/migrations/20230612021134-manual-collection-block.d.ts +1 -0
- package/dist/server/migrations/20230612021134-manual-collection-block.js +1 -0
- package/dist/server/migrations/20230710115902-manual-action-values.d.ts +1 -0
- package/dist/server/migrations/20230710115902-manual-action-values.js +1 -0
- package/dist/server/migrations/20230809113132-workflow-options.d.ts +1 -0
- package/dist/server/migrations/20230809113132-workflow-options.js +1 -0
- package/dist/server/migrations/20231024172342-add-node-key.d.ts +1 -0
- package/dist/server/migrations/20231024172342-add-node-key.js +2 -1
- package/dist/server/migrations/20231122143143-split-to-plugins.d.ts +1 -0
- package/dist/server/migrations/20231122143143-split-to-plugins.js +1 -0
- package/package.json +3 -3
package/dist/externalVersion.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
"react": "18.2.0",
|
|
3
|
-
"antd": "5.12.
|
|
3
|
+
"antd": "5.12.8",
|
|
4
4
|
"@ant-design/icons": "5.2.6",
|
|
5
|
-
"@nocobase/client": "0.
|
|
5
|
+
"@nocobase/client": "0.19.0-alpha.1",
|
|
6
6
|
"react-router-dom": "6.21.0",
|
|
7
|
-
"@nocobase/utils": "0.
|
|
7
|
+
"@nocobase/utils": "0.19.0-alpha.1",
|
|
8
8
|
"react-i18next": "11.18.6",
|
|
9
|
-
"@nocobase/database": "0.
|
|
10
|
-
"@nocobase/server": "0.
|
|
11
|
-
"@nocobase/logger": "0.
|
|
12
|
-
"@nocobase/evaluators": "0.
|
|
9
|
+
"@nocobase/database": "0.19.0-alpha.1",
|
|
10
|
+
"@nocobase/server": "0.19.0-alpha.1",
|
|
11
|
+
"@nocobase/logger": "0.19.0-alpha.1",
|
|
12
|
+
"@nocobase/evaluators": "0.19.0-alpha.1",
|
|
13
13
|
"@formily/react": "2.3.0",
|
|
14
|
-
"@formily/core": "2.3.0",
|
|
15
14
|
"lodash": "4.17.21",
|
|
15
|
+
"@formily/core": "2.3.0",
|
|
16
16
|
"@formily/antd-v5": "1.1.9",
|
|
17
|
-
"@nocobase/actions": "0.
|
|
17
|
+
"@nocobase/actions": "0.19.0-alpha.1",
|
|
18
18
|
"sequelize": "6.35.2",
|
|
19
|
-
"@nocobase/plugin-workflow-test": "0.
|
|
20
|
-
"@nocobase/test": "0.
|
|
19
|
+
"@nocobase/plugin-workflow-test": "0.19.0-alpha.1",
|
|
20
|
+
"@nocobase/test": "0.19.0-alpha.1",
|
|
21
21
|
"dayjs": "1.11.10"
|
|
22
22
|
};
|
package/dist/locale/zh-CN.json
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"Bind workflows": "绑定工作流",
|
|
31
31
|
"Workflow will be triggered after submitting succeeded.": "提交成功后触发工作流。",
|
|
32
32
|
"Workflow will be triggered after saving succeeded.": "保存成功后触发工作流。",
|
|
33
|
-
"Workflow will be triggered directly once the button clicked.": "
|
|
33
|
+
"Workflow will be triggered directly once the button clicked, without data saving.": "按钮点击后直接触发工作流,但不会保存数据。",
|
|
34
34
|
"Submit to workflow": "提交至工作流",
|
|
35
35
|
"Add workflow": "添加工作流",
|
|
36
36
|
"Select workflow": "选择工作流",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"cron-parser","version":"4.4.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^1.28.0"},"devDependencies":{"eslint":"^8.2.0","sinon":"^10.0.0","tap":"^16.0.1","tsd":"^0.19.0"},"engines":{"node":">=0.8"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"_lastModified":"
|
|
1
|
+
{"name":"cron-parser","version":"4.4.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^1.28.0"},"devDependencies":{"eslint":"^8.2.0","sinon":"^10.0.0","tap":"^16.0.1","tsd":"^0.19.0"},"engines":{"node":">=0.8"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"_lastModified":"2024-01-08T11:43:52.754Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"lru-cache","description":"A cache object that deletes the least-recently-used items.","version":"8.0.5","author":"Isaac Z. Schlueter <i@izs.me>","keywords":["mru","lru","cache"],"sideEffects":false,"scripts":{"build":"npm run prepare","preprepare":"rm -rf dist","prepare":"tsc -p tsconfig.json && tsc -p tsconfig-esm.json","postprepare":"bash fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"c8 tap","snap":"c8 tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig tsconfig-esm.json ./src/*.ts","benchmark-results-typedoc":"bash scripts/benchmark-results-typedoc.sh","prebenchmark":"npm run prepare","benchmark":"make -C benchmark","preprofile":"npm run prepare","profile":"make -C benchmark profile"},"main":"./dist/cjs/index-cjs.js","module":"./dist/mjs/index.js","types":"./dist/mjs/index.d.ts","exports":{"./min":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.min.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.min.js"}},".":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index-cjs.js"}}},"repository":"git://github.com/isaacs/node-lru-cache.git","devDependencies":{"@size-limit/preset-small-lib":"^7.0.8","@types/node":"^17.0.31","@types/tap":"^15.0.6","benchmark":"^2.1.4","c8":"^7.11.2","clock-mock":"^1.0.6","esbuild":"^0.17.11","eslint-config-prettier":"^8.5.0","marked":"^4.2.12","mkdirp":"^2.1.5","prettier":"^2.6.2","size-limit":"^7.0.8","tap":"^16.3.4","ts-node":"^10.7.0","tslib":"^2.4.0","typedoc":"^0.23.24","typescript":"^4.6.4"},"license":"ISC","files":["dist"],"engines":{"node":">=16.14"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tap":{"coverage":false,"node-arg":["--expose-gc","--no-warnings","--loader","ts-node/esm"],"ts":false},"size-limit":[{"path":"./dist/mjs/index.js"}],"_lastModified":"
|
|
1
|
+
{"name":"lru-cache","description":"A cache object that deletes the least-recently-used items.","version":"8.0.5","author":"Isaac Z. Schlueter <i@izs.me>","keywords":["mru","lru","cache"],"sideEffects":false,"scripts":{"build":"npm run prepare","preprepare":"rm -rf dist","prepare":"tsc -p tsconfig.json && tsc -p tsconfig-esm.json","postprepare":"bash fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"c8 tap","snap":"c8 tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig tsconfig-esm.json ./src/*.ts","benchmark-results-typedoc":"bash scripts/benchmark-results-typedoc.sh","prebenchmark":"npm run prepare","benchmark":"make -C benchmark","preprofile":"npm run prepare","profile":"make -C benchmark profile"},"main":"./dist/cjs/index-cjs.js","module":"./dist/mjs/index.js","types":"./dist/mjs/index.d.ts","exports":{"./min":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.min.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.min.js"}},".":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index-cjs.js"}}},"repository":"git://github.com/isaacs/node-lru-cache.git","devDependencies":{"@size-limit/preset-small-lib":"^7.0.8","@types/node":"^17.0.31","@types/tap":"^15.0.6","benchmark":"^2.1.4","c8":"^7.11.2","clock-mock":"^1.0.6","esbuild":"^0.17.11","eslint-config-prettier":"^8.5.0","marked":"^4.2.12","mkdirp":"^2.1.5","prettier":"^2.6.2","size-limit":"^7.0.8","tap":"^16.3.4","ts-node":"^10.7.0","tslib":"^2.4.0","typedoc":"^0.23.24","typescript":"^4.6.4"},"license":"ISC","files":["dist"],"engines":{"node":">=16.14"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tap":{"coverage":false,"node-arg":["--expose-gc","--no-warnings","--loader","ts-node/esm"],"ts":false},"size-limit":[{"path":"./dist/mjs/index.js"}],"_lastModified":"2024-01-08T11:43:52.410Z"}
|
package/dist/server/Plugin.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import Trigger from './triggers';
|
|
|
7
7
|
import { InstructionInterface } from './instructions';
|
|
8
8
|
import type { ExecutionModel, WorkflowModel } from './types';
|
|
9
9
|
type ID = number | string;
|
|
10
|
-
export default class
|
|
10
|
+
export default class PluginWorkflowServer extends Plugin {
|
|
11
11
|
instructions: Registry<InstructionInterface>;
|
|
12
12
|
triggers: Registry<Trigger>;
|
|
13
13
|
functions: Registry<CustomFunction>;
|
|
@@ -15,7 +15,9 @@ export default class WorkflowPlugin extends Plugin {
|
|
|
15
15
|
private executing;
|
|
16
16
|
private pending;
|
|
17
17
|
private events;
|
|
18
|
+
private eventsCount;
|
|
18
19
|
private loggerCache;
|
|
20
|
+
private meter;
|
|
19
21
|
getLogger(workflowId: ID): Logger;
|
|
20
22
|
onBeforeSave: (instance: WorkflowModel, options: any) => Promise<void>;
|
|
21
23
|
registerTrigger<T extends Trigger>(type: string, trigger: T | {
|
package/dist/server/Plugin.js
CHANGED
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
28
|
var Plugin_exports = {};
|
|
29
29
|
__export(Plugin_exports, {
|
|
30
|
-
default: () =>
|
|
30
|
+
default: () => PluginWorkflowServer
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(Plugin_exports);
|
|
33
33
|
var import_path = __toESM(require("path"));
|
|
@@ -47,7 +47,7 @@ var import_CreateInstruction = __toESM(require("./instructions/CreateInstruction
|
|
|
47
47
|
var import_DestroyInstruction = __toESM(require("./instructions/DestroyInstruction"));
|
|
48
48
|
var import_QueryInstruction = __toESM(require("./instructions/QueryInstruction"));
|
|
49
49
|
var import_UpdateInstruction = __toESM(require("./instructions/UpdateInstruction"));
|
|
50
|
-
class
|
|
50
|
+
class PluginWorkflowServer extends import_server.Plugin {
|
|
51
51
|
instructions = new import_utils.Registry();
|
|
52
52
|
triggers = new import_utils.Registry();
|
|
53
53
|
functions = new import_utils.Registry();
|
|
@@ -55,7 +55,9 @@ class WorkflowPlugin extends import_server.Plugin {
|
|
|
55
55
|
executing = null;
|
|
56
56
|
pending = [];
|
|
57
57
|
events = [];
|
|
58
|
+
eventsCount = 0;
|
|
58
59
|
loggerCache;
|
|
60
|
+
meter = null;
|
|
59
61
|
getLogger(workflowId) {
|
|
60
62
|
const now = /* @__PURE__ */ new Date();
|
|
61
63
|
const date = `${now.getFullYear()}-${`0${now.getMonth() + 1}`.slice(-2)}-${`0${now.getDate()}`.slice(-2)}`;
|
|
@@ -159,6 +161,11 @@ class WorkflowPlugin extends import_server.Plugin {
|
|
|
159
161
|
logger.end();
|
|
160
162
|
}
|
|
161
163
|
});
|
|
164
|
+
this.meter = this.app.telemetry.metric.getMeter();
|
|
165
|
+
const counter = this.meter.createObservableGauge("workflow.events.counter");
|
|
166
|
+
counter.addCallback((result) => {
|
|
167
|
+
result.observe(this.eventsCount);
|
|
168
|
+
});
|
|
162
169
|
this.app.acl.registerSnippet({
|
|
163
170
|
name: `pm.${this.name}.workflows`,
|
|
164
171
|
actions: [
|
|
@@ -175,9 +182,7 @@ class WorkflowPlugin extends import_server.Plugin {
|
|
|
175
182
|
actions: ["workflows:list"]
|
|
176
183
|
});
|
|
177
184
|
this.app.acl.allow("workflows", ["trigger"], "loggedIn");
|
|
178
|
-
await
|
|
179
|
-
directory: import_path.default.resolve(__dirname, "collections")
|
|
180
|
-
});
|
|
185
|
+
await this.importCollections(import_path.default.resolve(__dirname, "collections"));
|
|
181
186
|
this.db.addMigrations({
|
|
182
187
|
namespace: this.name,
|
|
183
188
|
directory: import_path.default.resolve(__dirname, "migrations"),
|
|
@@ -248,6 +253,7 @@ class WorkflowPlugin extends import_server.Plugin {
|
|
|
248
253
|
return;
|
|
249
254
|
}
|
|
250
255
|
this.events.push([workflow, context, options]);
|
|
256
|
+
this.eventsCount = this.events.length;
|
|
251
257
|
logger.info(`new event triggered, now events: ${this.events.length}`);
|
|
252
258
|
logger.debug(`event data:`, {
|
|
253
259
|
data: context
|
|
@@ -286,8 +292,8 @@ class WorkflowPlugin extends import_server.Plugin {
|
|
|
286
292
|
return null;
|
|
287
293
|
}
|
|
288
294
|
}
|
|
289
|
-
|
|
290
|
-
const
|
|
295
|
+
return this.db.sequelize.transaction(async (transaction) => {
|
|
296
|
+
const execution = await workflow.createExecution(
|
|
291
297
|
{
|
|
292
298
|
context,
|
|
293
299
|
key: workflow.key,
|
|
@@ -295,6 +301,7 @@ class WorkflowPlugin extends import_server.Plugin {
|
|
|
295
301
|
},
|
|
296
302
|
{ transaction }
|
|
297
303
|
);
|
|
304
|
+
this.getLogger(workflow.id).info(`execution of workflow ${workflow.id} created as ${execution.id}`);
|
|
298
305
|
await workflow.increment(["executed", "allExecuted"], { transaction });
|
|
299
306
|
if (this.db.options.dialect !== "postgres") {
|
|
300
307
|
await workflow.reload({ transaction });
|
|
@@ -310,17 +317,13 @@ class WorkflowPlugin extends import_server.Plugin {
|
|
|
310
317
|
transaction
|
|
311
318
|
}
|
|
312
319
|
);
|
|
313
|
-
|
|
314
|
-
return
|
|
320
|
+
execution.workflow = workflow;
|
|
321
|
+
return execution;
|
|
315
322
|
});
|
|
316
|
-
this.getLogger(workflow.id).info(`execution of workflow ${workflow.id} created as ${execution.id}`);
|
|
317
|
-
if (!this.executing && !this.pending.length) {
|
|
318
|
-
this.pending.push([execution]);
|
|
319
|
-
}
|
|
320
|
-
return execution;
|
|
321
323
|
}
|
|
322
324
|
prepare = async () => {
|
|
323
325
|
const event = this.events.shift();
|
|
326
|
+
this.eventsCount = this.events.length;
|
|
324
327
|
if (!event) {
|
|
325
328
|
this.getLogger("dispatcher").warn(`events queue is empty, no need to prepare`);
|
|
326
329
|
return;
|
|
@@ -328,7 +331,10 @@ class WorkflowPlugin extends import_server.Plugin {
|
|
|
328
331
|
const logger = this.getLogger(event[0].id);
|
|
329
332
|
logger.info(`preparing execution for event`);
|
|
330
333
|
try {
|
|
331
|
-
await this.createExecution(event);
|
|
334
|
+
const execution = await this.createExecution(event);
|
|
335
|
+
if (!this.executing && !this.pending.length) {
|
|
336
|
+
this.pending.push([execution]);
|
|
337
|
+
}
|
|
332
338
|
} catch (err) {
|
|
333
339
|
logger.error(`failed to create execution: ${err.message}`, err);
|
|
334
340
|
}
|
|
@@ -41,7 +41,7 @@ async function update(context, next) {
|
|
|
41
41
|
const repository = import_actions.utils.getRepositoryFromParams(context);
|
|
42
42
|
const { filterByTk, values } = context.action.params;
|
|
43
43
|
context.action.mergeParams({
|
|
44
|
-
whitelist: ["title", "description", "enabled", "config", "options"]
|
|
44
|
+
whitelist: ["title", "description", "enabled", "triggerTitle", "config", "options"]
|
|
45
45
|
});
|
|
46
46
|
if (Object.keys(values).includes("config")) {
|
|
47
47
|
const workflow = await repository.findById(filterByTk);
|
|
@@ -21,9 +21,11 @@ __export(executions_exports, {
|
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(executions_exports);
|
|
23
23
|
var executions_default = {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
dumpRules: {
|
|
25
|
+
group: "log"
|
|
26
|
+
},
|
|
26
27
|
name: "executions",
|
|
28
|
+
shared: true,
|
|
27
29
|
fields: [
|
|
28
30
|
{
|
|
29
31
|
type: "belongsTo",
|
|
@@ -21,9 +21,9 @@ __export(flow_nodes_exports, {
|
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(flow_nodes_exports);
|
|
23
23
|
var flow_nodes_default = {
|
|
24
|
-
|
|
25
|
-
duplicator: "required",
|
|
24
|
+
dumpRules: "required",
|
|
26
25
|
name: "flow_nodes",
|
|
26
|
+
shared: true,
|
|
27
27
|
fields: [
|
|
28
28
|
{
|
|
29
29
|
type: "uid",
|
|
@@ -21,9 +21,11 @@ __export(jobs_exports, {
|
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(jobs_exports);
|
|
23
23
|
var jobs_default = {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
dumpRules: {
|
|
25
|
+
group: "log"
|
|
26
|
+
},
|
|
26
27
|
name: "jobs",
|
|
28
|
+
shared: true,
|
|
27
29
|
fields: [
|
|
28
30
|
{
|
|
29
31
|
type: "belongsTo",
|
|
@@ -22,9 +22,9 @@ __export(workflows_exports, {
|
|
|
22
22
|
module.exports = __toCommonJS(workflows_exports);
|
|
23
23
|
function workflows_default() {
|
|
24
24
|
return {
|
|
25
|
-
|
|
26
|
-
duplicator: "required",
|
|
25
|
+
dumpRules: "required",
|
|
27
26
|
name: "workflows",
|
|
27
|
+
shared: true,
|
|
28
28
|
fields: [
|
|
29
29
|
{
|
|
30
30
|
name: "key",
|
|
@@ -50,7 +50,11 @@ function workflows_default() {
|
|
|
50
50
|
required: true
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
|
-
type: "
|
|
53
|
+
type: "string",
|
|
54
|
+
name: "triggerTitle"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
type: "jsonb",
|
|
54
58
|
name: "config",
|
|
55
59
|
required: true,
|
|
56
60
|
defaultValue: {}
|
|
@@ -49,6 +49,7 @@ function migrateConfig(config) {
|
|
|
49
49
|
return Object.keys(config).reduce((memo, key) => ({ ...memo, [key]: migrateConfig(config[key]) }), {});
|
|
50
50
|
}
|
|
51
51
|
class calculation_variables_default extends import_server.Migration {
|
|
52
|
+
appVersion = "<=0.8.0-alpha.13";
|
|
52
53
|
async up() {
|
|
53
54
|
const match = await this.app.version.satisfies("<=0.8.0-alpha.13");
|
|
54
55
|
if (!match) {
|
|
@@ -79,6 +79,7 @@ function migrateConfig({ calculation, ...config } = {}) {
|
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
class calculation_expression_default extends import_server.Migration {
|
|
82
|
+
appVersion = "<0.9.0-alpha.3";
|
|
82
83
|
async up() {
|
|
83
84
|
const match = await this.app.version.satisfies("<0.9.0-alpha.3");
|
|
84
85
|
if (!match) {
|
|
@@ -60,6 +60,7 @@ function migrateConfig({ group: { type = "and", calculations = [] } }) {
|
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
class condition_calculation_default extends import_server.Migration {
|
|
63
|
+
appVersion = "<0.9.0-alpha.3";
|
|
63
64
|
async up() {
|
|
64
65
|
const match = await this.app.version.satisfies("<0.9.0-alpha.3");
|
|
65
66
|
if (!match) {
|
|
@@ -23,6 +23,7 @@ module.exports = __toCommonJS(jsonb_to_json_exports);
|
|
|
23
23
|
var import_database = require("@nocobase/database");
|
|
24
24
|
var import_server = require("@nocobase/server");
|
|
25
25
|
class jsonb_to_json_default extends import_server.Migration {
|
|
26
|
+
appVersion = "<0.9.0-alpha.3";
|
|
26
27
|
async up() {
|
|
27
28
|
const match = await this.app.version.satisfies("<0.9.0-alpha.3");
|
|
28
29
|
if (!match) {
|
|
@@ -167,6 +167,7 @@ function migrateUsedConfig(config, manualForms) {
|
|
|
167
167
|
return config;
|
|
168
168
|
}
|
|
169
169
|
class manual_multi_form_default extends import_server.Migration {
|
|
170
|
+
appVersion = "<0.9.1-alpha.3";
|
|
170
171
|
async up() {
|
|
171
172
|
const match = await this.app.version.satisfies("<0.9.1-alpha.3");
|
|
172
173
|
if (!match) {
|
|
@@ -106,6 +106,7 @@ function migrateSchema(schema = {}) {
|
|
|
106
106
|
return schema;
|
|
107
107
|
}
|
|
108
108
|
class manual_collection_block_default extends import_server.Migration {
|
|
109
|
+
appVersion = "<0.9.4-alpha.3";
|
|
109
110
|
async up() {
|
|
110
111
|
const match = await this.app.version.satisfies("<0.9.4-alpha.3");
|
|
111
112
|
if (!match) {
|
|
@@ -58,6 +58,7 @@ function migrateConfig(config) {
|
|
|
58
58
|
return config;
|
|
59
59
|
}
|
|
60
60
|
class manual_action_values_default extends import_server.Migration {
|
|
61
|
+
appVersion = "<0.11.0-alpha.2";
|
|
61
62
|
async up() {
|
|
62
63
|
const match = await this.app.version.satisfies("<0.11.0-alpha.2");
|
|
63
64
|
if (!match) {
|
|
@@ -22,6 +22,7 @@ __export(workflow_options_exports, {
|
|
|
22
22
|
module.exports = __toCommonJS(workflow_options_exports);
|
|
23
23
|
var import_server = require("@nocobase/server");
|
|
24
24
|
class workflow_options_default extends import_server.Migration {
|
|
25
|
+
appVersion = "<0.14.0-alpha.8";
|
|
25
26
|
async up() {
|
|
26
27
|
const match = await this.app.version.satisfies("<0.14.0-alpha.8");
|
|
27
28
|
if (!match) {
|
|
@@ -20,9 +20,9 @@ __export(add_node_key_exports, {
|
|
|
20
20
|
default: () => add_node_key_default
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(add_node_key_exports);
|
|
23
|
-
var import_sequelize = require("sequelize");
|
|
24
23
|
var import_server = require("@nocobase/server");
|
|
25
24
|
var import_utils = require("@nocobase/utils");
|
|
25
|
+
var import_sequelize = require("sequelize");
|
|
26
26
|
function migrateNodeConfig(config = {}, nodesMap) {
|
|
27
27
|
Object.keys(config).forEach((key) => {
|
|
28
28
|
const valueType = typeof config[key];
|
|
@@ -39,6 +39,7 @@ function migrateNodeConfig(config = {}, nodesMap) {
|
|
|
39
39
|
return config;
|
|
40
40
|
}
|
|
41
41
|
class add_node_key_default extends import_server.Migration {
|
|
42
|
+
appVersion = "<0.14.0-alpha.8";
|
|
42
43
|
async up() {
|
|
43
44
|
const match = await this.app.version.satisfies("<0.14.0-alpha.8");
|
|
44
45
|
if (!match) {
|
|
@@ -22,6 +22,7 @@ __export(split_to_plugins_exports, {
|
|
|
22
22
|
module.exports = __toCommonJS(split_to_plugins_exports);
|
|
23
23
|
var import_server = require("@nocobase/server");
|
|
24
24
|
class split_to_plugins_default extends import_server.Migration {
|
|
25
|
+
appVersion = "<0.17.0-alpha.4";
|
|
25
26
|
async up() {
|
|
26
27
|
const match = await this.app.version.satisfies("<0.17.0-alpha.4");
|
|
27
28
|
if (!match) {
|
package/package.json
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
"displayName.zh-CN": "工作流",
|
|
5
5
|
"description": "A powerful workflow plugin designed to support business process management and automation.",
|
|
6
6
|
"description.zh-CN": "工作流插件,为业务流程管理和自动化提供支持。",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.19.0-alpha.1",
|
|
8
8
|
"license": "AGPL-3.0",
|
|
9
9
|
"main": "./dist/server/index.js",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@nocobase/plugin-workflow-test": "0.
|
|
11
|
+
"@nocobase/plugin-workflow-test": "0.19.0-alpha.1"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@ant-design/icons": "5.x",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"@nocobase/test": "0.x",
|
|
44
44
|
"@nocobase/utils": "0.x"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "64601944412fc4d2e2bd05f4b982118dd28247dc"
|
|
47
47
|
}
|