@nocobase/plugin-workflow 2.1.0-alpha.12 → 2.1.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.
@@ -159,7 +159,10 @@ export default class extends Instruction {
159
159
  'x-decorator': string;
160
160
  'x-component': string;
161
161
  'x-component-props': {
162
- useTypedConstant: string[];
162
+ nullable: boolean;
163
+ useTypedConstant: (string | {
164
+ min: number;
165
+ })[][];
163
166
  };
164
167
  default: number;
165
168
  };
@@ -175,7 +178,10 @@ export default class extends Instruction {
175
178
  'x-decorator': string;
176
179
  'x-component': string;
177
180
  'x-component-props': {
178
- min: number;
181
+ nullable: boolean;
182
+ useTypedConstant: (string | {
183
+ min: number;
184
+ })[][];
179
185
  };
180
186
  default: number;
181
187
  };
@@ -121,7 +121,10 @@ export declare const pagination: {
121
121
  'x-decorator': string;
122
122
  'x-component': string;
123
123
  'x-component-props': {
124
- useTypedConstant: string[];
124
+ nullable: boolean;
125
+ useTypedConstant: (string | {
126
+ min: number;
127
+ })[][];
125
128
  };
126
129
  default: number;
127
130
  };
@@ -137,7 +140,10 @@ export declare const pagination: {
137
140
  'x-decorator': string;
138
141
  'x-component': string;
139
142
  'x-component-props': {
140
- min: number;
143
+ nullable: boolean;
144
+ useTypedConstant: (string | {
145
+ min: number;
146
+ })[][];
141
147
  };
142
148
  default: number;
143
149
  };
@@ -11,8 +11,8 @@ module.exports = {
11
11
  "react": "18.2.0",
12
12
  "@formily/core": "2.3.7",
13
13
  "@formily/react": "2.3.7",
14
- "@nocobase/client": "2.1.0-alpha.12",
15
- "@nocobase/utils": "2.1.0-alpha.12",
14
+ "@nocobase/client": "2.1.0-alpha.13",
15
+ "@nocobase/utils": "2.1.0-alpha.13",
16
16
  "antd": "5.24.2",
17
17
  "@ant-design/icons": "5.6.1",
18
18
  "react-router-dom": "6.30.1",
@@ -20,18 +20,18 @@ module.exports = {
20
20
  "lodash": "4.17.21",
21
21
  "@dnd-kit/core": "6.1.0",
22
22
  "@formily/shared": "2.3.7",
23
- "@nocobase/flow-engine": "2.1.0-alpha.12",
24
- "@nocobase/plugin-mobile": "2.1.0-alpha.12",
23
+ "@nocobase/flow-engine": "2.1.0-alpha.13",
24
+ "@nocobase/plugin-mobile": "2.1.0-alpha.13",
25
25
  "sequelize": "6.35.2",
26
- "@nocobase/server": "2.1.0-alpha.12",
27
- "@nocobase/database": "2.1.0-alpha.12",
28
- "@nocobase/data-source-manager": "2.1.0-alpha.12",
29
- "@nocobase/logger": "2.1.0-alpha.12",
30
- "@nocobase/evaluators": "2.1.0-alpha.12",
26
+ "@nocobase/server": "2.1.0-alpha.13",
27
+ "@nocobase/database": "2.1.0-alpha.13",
28
+ "@nocobase/data-source-manager": "2.1.0-alpha.13",
29
+ "@nocobase/logger": "2.1.0-alpha.13",
30
+ "@nocobase/evaluators": "2.1.0-alpha.13",
31
31
  "@formily/antd-v5": "1.2.3",
32
32
  "@formily/reactive": "2.3.7",
33
- "@nocobase/actions": "2.1.0-alpha.12",
33
+ "@nocobase/actions": "2.1.0-alpha.13",
34
34
  "dayjs": "1.11.13",
35
- "@nocobase/plugin-workflow-test": "2.1.0-alpha.12",
36
- "@nocobase/test": "2.1.0-alpha.12"
35
+ "@nocobase/plugin-workflow-test": "2.1.0-alpha.13",
36
+ "@nocobase/test": "2.1.0-alpha.13"
37
37
  };
@@ -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":"2026-03-25T14:11:03.340Z"}
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":"2026-03-27T05:54:00.389Z"}
@@ -1 +1 @@
1
- {"name":"joi","description":"Object schema validation","version":"17.13.3","repository":"git://github.com/hapijs/joi","main":"lib/index.js","types":"lib/index.d.ts","browser":"dist/joi-browser.min.js","files":["lib/**/*","dist/*"],"keywords":["schema","validation"],"dependencies":{"@hapi/hoek":"^9.3.0","@hapi/topo":"^5.1.0","@sideway/address":"^4.1.5","@sideway/formula":"^3.0.1","@sideway/pinpoint":"^2.0.0"},"devDependencies":{"@hapi/bourne":"2.x.x","@hapi/code":"8.x.x","@hapi/joi-legacy-test":"npm:@hapi/joi@15.x.x","@hapi/lab":"^25.1.3","@types/node":"^14.18.63","typescript":"4.3.x"},"scripts":{"prepublishOnly":"cd browser && npm install && npm run build","test":"lab -t 100 -a @hapi/code -L -Y","test-cov-html":"lab -r html -o coverage.html -a @hapi/code"},"license":"BSD-3-Clause","_lastModified":"2026-03-25T14:11:03.033Z"}
1
+ {"name":"joi","description":"Object schema validation","version":"17.13.3","repository":"git://github.com/hapijs/joi","main":"lib/index.js","types":"lib/index.d.ts","browser":"dist/joi-browser.min.js","files":["lib/**/*","dist/*"],"keywords":["schema","validation"],"dependencies":{"@hapi/hoek":"^9.3.0","@hapi/topo":"^5.1.0","@sideway/address":"^4.1.5","@sideway/formula":"^3.0.1","@sideway/pinpoint":"^2.0.0"},"devDependencies":{"@hapi/bourne":"2.x.x","@hapi/code":"8.x.x","@hapi/joi-legacy-test":"npm:@hapi/joi@15.x.x","@hapi/lab":"^25.1.3","@types/node":"^14.18.63","typescript":"4.3.x"},"scripts":{"prepublishOnly":"cd browser && npm install && npm run build","test":"lab -t 100 -a @hapi/code -L -Y","test-cov-html":"lab -r html -o coverage.html -a @hapi/code"},"license":"BSD-3-Clause","_lastModified":"2026-03-27T05:54:00.073Z"}
@@ -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":"2026-03-25T14:11:02.047Z"}
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":"2026-03-27T05:53:59.127Z"}
@@ -1 +1 @@
1
- {"name":"nodejs-snowflake","collaborators":["Utkarsh Srivastava <utkarsh@sagacious.dev>"],"description":"Generate time sortable 64 bits unique ids for distributed systems (inspired from twitter snowflake)","version":"2.0.1","license":"Apache 2.0","repository":{"type":"git","url":"https://github.com/utkarsh-pro/nodejs-snowflake.git"},"files":["nodejs_snowflake_bg.wasm","nodejs_snowflake.js","nodejs_snowflake.d.ts"],"main":"nodejs_snowflake.js","types":"nodejs_snowflake.d.ts","_lastModified":"2026-03-25T14:11:01.841Z"}
1
+ {"name":"nodejs-snowflake","collaborators":["Utkarsh Srivastava <utkarsh@sagacious.dev>"],"description":"Generate time sortable 64 bits unique ids for distributed systems (inspired from twitter snowflake)","version":"2.0.1","license":"Apache 2.0","repository":{"type":"git","url":"https://github.com/utkarsh-pro/nodejs-snowflake.git"},"files":["nodejs_snowflake_bg.wasm","nodejs_snowflake.js","nodejs_snowflake.d.ts"],"main":"nodejs_snowflake.js","types":"nodejs_snowflake.d.ts","_lastModified":"2026-03-27T05:53:58.922Z"}
@@ -6,6 +6,7 @@
6
6
  * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
+ import Joi from 'joi';
9
10
  import { Instruction } from '.';
10
11
  import type Processor from '../Processor';
11
12
  import type { FlowNodeModel, JobModel } from '../types';
@@ -15,6 +16,7 @@ export declare const BRANCH_INDEX: {
15
16
  readonly ON_FALSE: 0;
16
17
  };
17
18
  export declare class ConditionInstruction extends Instruction {
19
+ configSchema: Joi.ObjectSchema<any>;
18
20
  run(node: FlowNodeModel, prevJob: any, processor: Processor): Promise<{
19
21
  status: 1;
20
22
  result: boolean;
@@ -7,9 +7,11 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
 
10
+ var __create = Object.create;
10
11
  var __defProp = Object.defineProperty;
11
12
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
13
  var __getOwnPropNames = Object.getOwnPropertyNames;
14
+ var __getProtoOf = Object.getPrototypeOf;
13
15
  var __hasOwnProp = Object.prototype.hasOwnProperty;
14
16
  var __export = (target, all) => {
15
17
  for (var name in all)
@@ -23,6 +25,14 @@ var __copyProps = (to, from, except, desc) => {
23
25
  }
24
26
  return to;
25
27
  };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
34
+ mod
35
+ ));
26
36
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
37
  var ConditionInstruction_exports = {};
28
38
  __export(ConditionInstruction_exports, {
@@ -31,6 +41,7 @@ __export(ConditionInstruction_exports, {
31
41
  default: () => ConditionInstruction_default
32
42
  });
33
43
  module.exports = __toCommonJS(ConditionInstruction_exports);
44
+ var import_joi = __toESM(require("joi"));
34
45
  var import_evaluators = require("@nocobase/evaluators");
35
46
  var import__ = require(".");
36
47
  var import_constants = require("../constants");
@@ -41,6 +52,12 @@ const BRANCH_INDEX = {
41
52
  ON_FALSE: 0
42
53
  };
43
54
  class ConditionInstruction extends import__.Instruction {
55
+ configSchema = import_joi.default.object({
56
+ rejectOnFalse: import_joi.default.boolean().required(),
57
+ engine: import_joi.default.string().valid(...import_evaluators.evaluators.getKeys()),
58
+ calculation: import_joi.default.object(),
59
+ expression: import_joi.default.string()
60
+ });
44
61
  async run(node, prevJob, processor) {
45
62
  const { engine, calculation, expression, rejectOnFalse } = node.config || {};
46
63
  const evaluator = import_evaluators.evaluators.get(engine);
@@ -47,7 +47,11 @@ var import_utils = require("../utils");
47
47
  var import__ = require(".");
48
48
  class CreateInstruction extends import__.Instruction {
49
49
  configSchema = import_joi.default.object({
50
- collection: import_joi.default.string().required().messages({ "any.required": "Collection is not configured" })
50
+ collection: import_joi.default.string().required().messages({ "any.required": "Collection is not configured" }),
51
+ params: import_joi.default.object({
52
+ values: import_joi.default.object(),
53
+ appends: import_joi.default.array().items(import_joi.default.string())
54
+ })
51
55
  });
52
56
  validateConfig(config) {
53
57
  const errors = super.validateConfig(config);
@@ -47,7 +47,10 @@ var import_constants = require("../constants");
47
47
  var import_utils = require("../utils");
48
48
  class DestroyInstruction extends import__.Instruction {
49
49
  configSchema = import_joi.default.object({
50
- collection: import_joi.default.string().required().messages({ "any.required": "Collection is not configured" })
50
+ collection: import_joi.default.string().required().messages({ "any.required": "Collection is not configured" }),
51
+ params: import_joi.default.object({
52
+ filter: import_joi.default.object()
53
+ })
51
54
  });
52
55
  validateConfig(config) {
53
56
  const errors = super.validateConfig(config);
@@ -6,10 +6,12 @@
6
6
  * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
+ import Joi from 'joi';
9
10
  import { Instruction } from '.';
10
11
  import type Processor from '../Processor';
11
12
  import type { FlowNodeModel, JobModel } from '../types';
12
13
  export declare class MultiConditionsInstruction extends Instruction {
14
+ configSchema: Joi.ObjectSchema<any>;
13
15
  run(node: FlowNodeModel, prevJob: any, processor: Processor): Promise<JobModel>;
14
16
  resume(node: FlowNodeModel, branchJob: JobModel, processor: Processor): Promise<any>;
15
17
  private evaluateCondition;
@@ -7,9 +7,11 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
 
10
+ var __create = Object.create;
10
11
  var __defProp = Object.defineProperty;
11
12
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
13
  var __getOwnPropNames = Object.getOwnPropertyNames;
14
+ var __getProtoOf = Object.getPrototypeOf;
13
15
  var __hasOwnProp = Object.prototype.hasOwnProperty;
14
16
  var __export = (target, all) => {
15
17
  for (var name in all)
@@ -23,6 +25,14 @@ var __copyProps = (to, from, except, desc) => {
23
25
  }
24
26
  return to;
25
27
  };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
34
+ mod
35
+ ));
26
36
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
37
  var MultiConditionsInstruction_exports = {};
28
38
  __export(MultiConditionsInstruction_exports, {
@@ -30,11 +40,24 @@ __export(MultiConditionsInstruction_exports, {
30
40
  default: () => MultiConditionsInstruction_default
31
41
  });
32
42
  module.exports = __toCommonJS(MultiConditionsInstruction_exports);
43
+ var import_joi = __toESM(require("joi"));
33
44
  var import_evaluators = require("@nocobase/evaluators");
34
45
  var import__ = require(".");
35
46
  var import_constants = require("../constants");
36
47
  var import_logicCalculate = require("../logicCalculate");
37
48
  class MultiConditionsInstruction extends import__.Instruction {
49
+ configSchema = import_joi.default.object({
50
+ conditions: import_joi.default.array().items(
51
+ import_joi.default.object({
52
+ uid: import_joi.default.string(),
53
+ title: import_joi.default.string(),
54
+ engine: import_joi.default.string(),
55
+ calculation: import_joi.default.any(),
56
+ expression: import_joi.default.string()
57
+ })
58
+ ),
59
+ continueOnNoMatch: import_joi.default.boolean()
60
+ });
38
61
  async run(node, prevJob, processor) {
39
62
  const { conditions = [], continueOnNoMatch = false } = node.config || {};
40
63
  const meta = { conditions: [] };
@@ -6,10 +6,12 @@
6
6
  * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
+ import Joi from 'joi';
9
10
  import { Instruction } from '.';
10
11
  import Processor from '../Processor';
11
12
  import { FlowNodeModel } from '../types';
12
13
  export default class ExecutionResultInstruction extends Instruction {
14
+ configSchema: Joi.ObjectSchema<any>;
13
15
  run(node: FlowNodeModel, prevJob: any, processor: Processor): Promise<{
14
16
  result: any;
15
17
  status: -1;
@@ -7,9 +7,11 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
 
10
+ var __create = Object.create;
10
11
  var __defProp = Object.defineProperty;
11
12
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
13
  var __getOwnPropNames = Object.getOwnPropertyNames;
14
+ var __getProtoOf = Object.getPrototypeOf;
13
15
  var __hasOwnProp = Object.prototype.hasOwnProperty;
14
16
  var __export = (target, all) => {
15
17
  for (var name in all)
@@ -23,15 +25,27 @@ var __copyProps = (to, from, except, desc) => {
23
25
  }
24
26
  return to;
25
27
  };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
34
+ mod
35
+ ));
26
36
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
37
  var OutputInstruction_exports = {};
28
38
  __export(OutputInstruction_exports, {
29
39
  default: () => ExecutionResultInstruction
30
40
  });
31
41
  module.exports = __toCommonJS(OutputInstruction_exports);
42
+ var import_joi = __toESM(require("joi"));
32
43
  var import__ = require(".");
33
44
  var import_constants = require("../constants");
34
45
  class ExecutionResultInstruction extends import__.Instruction {
46
+ configSchema = import_joi.default.object({
47
+ value: import_joi.default.any()
48
+ });
35
49
  async run(node, prevJob, processor) {
36
50
  const { value } = node.config;
37
51
  const output = processor.getParsedValue(value, node.id);
@@ -48,7 +48,16 @@ var import_utils = require("../utils");
48
48
  var import__ = require(".");
49
49
  class QueryInstruction extends import__.Instruction {
50
50
  configSchema = import_joi.default.object({
51
- collection: import_joi.default.string().required().messages({ "any.required": "Collection is not configured" })
51
+ collection: import_joi.default.string().required().messages({ "any.required": "Collection is not configured" }),
52
+ multiple: import_joi.default.boolean(),
53
+ params: import_joi.default.object({
54
+ filter: import_joi.default.object(),
55
+ appends: import_joi.default.array().items(import_joi.default.string()),
56
+ page: import_joi.default.alternatives(import_joi.default.number(), import_joi.default.string()),
57
+ pageSize: import_joi.default.alternatives(import_joi.default.number(), import_joi.default.string()),
58
+ sort: import_joi.default.array().items(import_joi.default.object({ field: import_joi.default.string(), direction: import_joi.default.string().allow("asc", "desc") }))
59
+ }),
60
+ failOnEmpty: import_joi.default.boolean()
52
61
  });
53
62
  validateConfig(config) {
54
63
  const errors = super.validateConfig(config);
@@ -61,12 +70,7 @@ class QueryInstruction extends import__.Instruction {
61
70
  const { collection, multiple, params = {}, failOnEmpty = false } = node.config;
62
71
  const [dataSourceName, collectionName] = (0, import_data_source_manager.parseCollectionName)(collection);
63
72
  const { repository } = this.workflow.app.dataSourceManager.dataSources.get(dataSourceName).collectionManager.getCollection(collectionName);
64
- const {
65
- page = import_actions.DEFAULT_PAGE,
66
- pageSize = import_actions.DEFAULT_PER_PAGE,
67
- sort = [],
68
- ...options
69
- } = processor.getParsedValue(params, node.id);
73
+ const { page, pageSize, sort = [], ...options } = processor.getParsedValue(params, node.id);
70
74
  const appends = options.appends ? Array.from(
71
75
  options.appends.reduce((set, field) => {
72
76
  set.add(field.split(".")[0]);
@@ -76,7 +80,7 @@ class QueryInstruction extends import__.Instruction {
76
80
  ) : options.appends;
77
81
  const result = await (multiple ? repository.find : repository.findOne).call(repository, {
78
82
  ...options,
79
- ...import_actions.utils.pageArgsToLimitArgs(page, pageSize),
83
+ ...import_actions.utils.pageArgsToLimitArgs(page ?? import_actions.DEFAULT_PAGE, pageSize ?? import_actions.DEFAULT_PER_PAGE),
80
84
  sort: sort.filter((item) => item.field).map((item) => {
81
85
  var _a;
82
86
  return `${((_a = item.direction) == null ? void 0 : _a.toLowerCase()) === "desc" ? "-" : ""}${item.field}`;
@@ -47,7 +47,12 @@ var import_utils = require("../utils");
47
47
  var import__ = require(".");
48
48
  class UpdateInstruction extends import__.Instruction {
49
49
  configSchema = import_joi.default.object({
50
- collection: import_joi.default.string().required().messages({ "any.required": "Collection is not configured" })
50
+ collection: import_joi.default.string().required().messages({ "any.required": "Collection is not configured" }),
51
+ params: import_joi.default.object({
52
+ individualHooks: import_joi.default.boolean(),
53
+ filter: import_joi.default.object(),
54
+ values: import_joi.default.object()
55
+ })
51
56
  });
52
57
  validateConfig(config) {
53
58
  const errors = super.validateConfig(config);
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "description": "A powerful BPM tool that provides foundational support for business automation, with the capability to extend unlimited triggers and nodes.",
7
7
  "description.zh-CN": "一个强大的 BPM 工具,为业务自动化提供基础支持,并且可任意扩展更多的触发器和节点。",
8
8
  "description.ru-RU": "Мощный инструмент BPM, обеспечивающий базовую поддержку автоматизации бизнес-процессов с возможностью неограниченного расширения триггеров и узлов.",
9
- "version": "2.1.0-alpha.12",
9
+ "version": "2.1.0-alpha.13",
10
10
  "license": "Apache-2.0",
11
11
  "main": "./dist/server/index.js",
12
12
  "homepage": "https://docs.nocobase.com/handbook/workflow",
@@ -49,7 +49,7 @@
49
49
  "@nocobase/test": "2.x",
50
50
  "@nocobase/utils": "2.x"
51
51
  },
52
- "gitHead": "f12c4a75470590b1670ce54510b96ef94c2cd7a2",
52
+ "gitHead": "2807a8948412d9c235115a31a81a66f7c82dd173",
53
53
  "keywords": [
54
54
  "Workflow"
55
55
  ]