@nocobase/plugin-workflow 1.6.0-alpha.2 → 1.6.0-alpha.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.
Files changed (50) hide show
  1. package/dist/client/4147131201cde30c.js +10 -0
  2. package/dist/client/4a2b78cd09ce676a.js +10 -0
  3. package/dist/client/FlowContext.d.ts +2 -0
  4. package/dist/client/WorkflowTasks.d.ts +17 -0
  5. package/dist/client/e73d2e9169520d3e.js +10 -0
  6. package/dist/client/index.d.ts +3 -0
  7. package/dist/client/index.js +1 -1
  8. package/dist/client/nodes/calculation.d.ts +3 -2
  9. package/dist/client/nodes/condition.d.ts +1 -0
  10. package/dist/client/nodes/create.d.ts +3 -2
  11. package/dist/client/nodes/destroy.d.ts +2 -0
  12. package/dist/client/nodes/end.d.ts +2 -0
  13. package/dist/client/nodes/index.d.ts +1 -0
  14. package/dist/client/nodes/output.d.ts +31 -0
  15. package/dist/client/nodes/query.d.ts +5 -4
  16. package/dist/client/nodes/update.d.ts +3 -2
  17. package/dist/client/triggers/schedule/ScheduleModes.d.ts +5 -2
  18. package/dist/client/triggers/schedule/index.d.ts +2 -0
  19. package/dist/client/variable.d.ts +17 -6
  20. package/dist/externalVersion.js +11 -11
  21. package/dist/locale/en-US.json +3 -1
  22. package/dist/locale/zh-CN.json +11 -7
  23. package/dist/node_modules/cron-parser/package.json +1 -1
  24. package/dist/node_modules/lru-cache/package.json +1 -1
  25. package/dist/server/Plugin.d.ts +9 -6
  26. package/dist/server/Plugin.js +116 -45
  27. package/dist/server/Processor.d.ts +5 -0
  28. package/dist/server/Processor.js +15 -6
  29. package/dist/server/actions/workflows.js +5 -2
  30. package/dist/server/collections/executions.js +9 -0
  31. package/dist/server/collections/flow_nodes.js +1 -0
  32. package/dist/server/collections/jobs.js +1 -0
  33. package/dist/server/collections/workflows.js +1 -0
  34. package/dist/server/instructions/CreateInstruction.js +1 -1
  35. package/dist/server/instructions/DestroyInstruction.js +1 -1
  36. package/dist/server/instructions/UpdateInstruction.js +1 -1
  37. package/dist/server/triggers/CollectionTrigger.d.ts +6 -6
  38. package/dist/server/triggers/CollectionTrigger.js +51 -31
  39. package/dist/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.d.ts +5 -1
  40. package/dist/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.js +53 -14
  41. package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.d.ts +1 -0
  42. package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.js +3 -0
  43. package/dist/server/triggers/ScheduleTrigger/index.d.ts +2 -2
  44. package/dist/server/triggers/ScheduleTrigger/index.js +21 -3
  45. package/dist/server/triggers/index.d.ts +4 -1
  46. package/package.json +3 -3
  47. package/dist/client/923.index.js +0 -10
  48. package/dist/client/929.index.js +0 -10
  49. package/dist/client/999.index.js +0 -10
  50. /package/dist/client/{383.index.js → 739d458621edf81f.js} +0 -0
@@ -6,7 +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
- /// <reference types="react" />
9
+ import React from 'react';
10
10
  import { SchemaInitializerItemType } from '@nocobase/client';
11
11
  import { RadioWithTooltip } from '../components/RadioWithTooltip';
12
12
  import { WorkflowVariableTextArea } from '../variable';
@@ -16,6 +16,7 @@ export default class extends Instruction {
16
16
  type: string;
17
17
  group: string;
18
18
  description: string;
19
+ icon: React.JSX.Element;
19
20
  fieldset: {
20
21
  engine: {
21
22
  type: string;
@@ -51,7 +52,7 @@ export default class extends Instruction {
51
52
  };
52
53
  };
53
54
  scope: {
54
- renderEngineReference: (key: string) => import("react").JSX.Element;
55
+ renderEngineReference: (key: string) => React.JSX.Element;
55
56
  };
56
57
  components: {
57
58
  WorkflowVariableTextArea: typeof WorkflowVariableTextArea;
@@ -16,6 +16,7 @@ export default class extends Instruction {
16
16
  type: string;
17
17
  group: string;
18
18
  description: string;
19
+ icon: React.JSX.Element;
19
20
  fieldset: {
20
21
  rejectOnFalse: {
21
22
  type: string;
@@ -6,7 +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
- /// <reference types="react" />
9
+ import React from 'react';
10
10
  import { SchemaInitializerItemType, useCollectionDataSource } from '@nocobase/client';
11
11
  import { AssignedFieldsFormSchemaConfig } from '../components/AssignedFieldsFormSchemaConfig';
12
12
  import { Instruction, useNodeSavedConfig } from '.';
@@ -20,6 +20,7 @@ export default class extends Instruction {
20
20
  type: string;
21
21
  group: string;
22
22
  description: string;
23
+ icon: React.JSX.Element;
23
24
  fieldset: {
24
25
  collection: {
25
26
  'x-disabled': string;
@@ -101,7 +102,7 @@ export default class extends Instruction {
101
102
  useNodeSavedConfig: typeof useNodeSavedConfig;
102
103
  };
103
104
  components: {
104
- CollectionFieldset: import("react").MemoExoticComponent<import("@formily/reactive-react").ReactFC<Omit<any, "ref">>>;
105
+ CollectionFieldset: React.MemoExoticComponent<import("@formily/reactive-react").ReactFC<Omit<any, "ref">>>;
105
106
  AssignedFieldsFormSchemaConfig: typeof AssignedFieldsFormSchemaConfig;
106
107
  };
107
108
  useVariables: typeof useVariables;
@@ -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 React from 'react';
9
10
  import { useCollectionDataSource } from '@nocobase/client';
10
11
  import { FilterDynamicComponent } from '../components/FilterDynamicComponent';
11
12
  import { Instruction, useNodeSavedConfig } from '.';
@@ -14,6 +15,7 @@ export default class extends Instruction {
14
15
  type: string;
15
16
  group: string;
16
17
  description: string;
18
+ icon: React.JSX.Element;
17
19
  fieldset: {
18
20
  collection: {
19
21
  'x-disabled': string;
@@ -6,12 +6,14 @@
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 React from 'react';
9
10
  import { Instruction } from '.';
10
11
  export default class extends Instruction {
11
12
  title: string;
12
13
  type: string;
13
14
  group: string;
14
15
  description: string;
16
+ icon: React.JSX.Element;
15
17
  fieldset: {
16
18
  endStatus: {
17
19
  type: string;
@@ -27,6 +27,7 @@ export declare abstract class Instruction {
27
27
  type: string;
28
28
  group: string;
29
29
  description?: string;
30
+ icon?: JSX.Element;
30
31
  /**
31
32
  * @deprecated migrate to `presetFieldset` instead
32
33
  */
@@ -0,0 +1,31 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { Instruction } from '.';
10
+ import { WorkflowVariableInput } from '../variable';
11
+ export default class extends Instruction {
12
+ title: string;
13
+ type: string;
14
+ group: string;
15
+ description: string;
16
+ fieldset: {
17
+ result: {
18
+ type: string;
19
+ title: string;
20
+ 'x-decorator': string;
21
+ 'x-component': string;
22
+ 'x-component-props': {
23
+ useTypedConstant: boolean;
24
+ };
25
+ required: boolean;
26
+ };
27
+ };
28
+ components: {
29
+ WorkflowVariableInput: typeof WorkflowVariableInput;
30
+ };
31
+ }
@@ -6,7 +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
- /// <reference types="react" />
9
+ import React from 'react';
10
10
  import { SchemaInitializerItemType, useCollectionDataSource } from '@nocobase/client';
11
11
  import { FilterDynamicComponent } from '../components/FilterDynamicComponent';
12
12
  import { WorkflowVariableInput } from '../variable';
@@ -22,6 +22,7 @@ export default class extends Instruction {
22
22
  type: string;
23
23
  group: string;
24
24
  description: string;
25
+ icon: React.JSX.Element;
25
26
  fieldset: {
26
27
  collection: {
27
28
  'x-disabled': string;
@@ -219,13 +220,13 @@ export default class extends Instruction {
219
220
  }[];
220
221
  };
221
222
  components: {
222
- ArrayItems: import("@formily/react").ReactFC<import("react").HTMLAttributes<HTMLDivElement>> & import("@formily/antd-v5").ArrayBaseMixins & {
223
- Item: import("@formily/react").ReactFC<import("react").HTMLAttributes<HTMLDivElement> & {
223
+ ArrayItems: import("@formily/react").ReactFC<React.HTMLAttributes<HTMLDivElement>> & import("@formily/antd-v5").ArrayBaseMixins & {
224
+ Item: import("@formily/react").ReactFC<React.HTMLAttributes<HTMLDivElement> & {
224
225
  type?: "divide" | "card";
225
226
  }>;
226
227
  };
227
228
  FilterDynamicComponent: typeof FilterDynamicComponent;
228
- SchemaComponentContext: import("react").Context<import("@nocobase/client").ISchemaComponentContext>;
229
+ SchemaComponentContext: React.Context<import("@nocobase/client").ISchemaComponentContext>;
229
230
  WorkflowVariableInput: typeof WorkflowVariableInput;
230
231
  RadioWithTooltip: typeof RadioWithTooltip;
231
232
  };
@@ -6,7 +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
- /// <reference types="react" />
9
+ import React from 'react';
10
10
  import { useCollectionDataSource } from '@nocobase/client';
11
11
  import { AssignedFieldsFormSchemaConfig } from '../components/AssignedFieldsFormSchemaConfig';
12
12
  import { FilterDynamicComponent } from '../components/FilterDynamicComponent';
@@ -17,6 +17,7 @@ export default class extends Instruction {
17
17
  type: string;
18
18
  group: string;
19
19
  description: string;
20
+ icon: React.JSX.Element;
20
21
  fieldset: {
21
22
  collection: {
22
23
  'x-disabled': string;
@@ -107,7 +108,7 @@ export default class extends Instruction {
107
108
  };
108
109
  components: {
109
110
  FilterDynamicComponent: typeof FilterDynamicComponent;
110
- CollectionFieldset: import("react").MemoExoticComponent<import("@formily/reactive-react").ReactFC<Omit<any, "ref">>>;
111
+ CollectionFieldset: React.MemoExoticComponent<import("@formily/reactive-react").ReactFC<Omit<any, "ref">>>;
111
112
  AssignedFieldsFormSchemaConfig: typeof AssignedFieldsFormSchemaConfig;
112
113
  RadioWithTooltip: typeof RadioWithTooltip;
113
114
  };
@@ -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 React from 'react';
9
10
  export declare const ScheduleModes: {
10
11
  [x: number]: {
11
12
  fieldset: {
@@ -63,12 +64,14 @@ export declare const ScheduleModes: {
63
64
  'x-decorator': string;
64
65
  'x-component': string;
65
66
  'x-component-props': {
66
- showTime: boolean;
67
- placeholder: string;
67
+ nullable: boolean;
68
+ changeOnSelect: boolean;
69
+ render(props: any): React.JSX.Element;
68
70
  };
69
71
  };
70
72
  data?: undefined;
71
73
  };
74
+ validate(config: any): boolean;
72
75
  } | {
73
76
  fieldset: {
74
77
  collection: {
@@ -10,6 +10,7 @@
10
10
  import { SchemaInitializerItemType, useCollectionDataSource } from '@nocobase/client';
11
11
  import { Trigger } from '..';
12
12
  import { TriggerScheduleConfig } from './TriggerScheduleConfig';
13
+ import { WorkflowVariableWrapper } from '../../variable';
13
14
  import { TriggerCollectionRecordSelect } from '../../components/TriggerCollectionRecordSelect';
14
15
  declare function useVariables(config: any, opts: any): any[];
15
16
  export default class extends Trigger {
@@ -37,6 +38,7 @@ export default class extends Trigger {
37
38
  ScheduleConfig: () => import("react").JSX.Element;
38
39
  TriggerScheduleConfig: typeof TriggerScheduleConfig;
39
40
  TriggerCollectionRecordSelect: typeof TriggerCollectionRecordSelect;
41
+ WorkflowVariableWrapper: typeof WorkflowVariableWrapper;
40
42
  };
41
43
  useVariables: typeof useVariables;
42
44
  useInitializers(config: any): SchemaInitializerItemType | null;
@@ -6,7 +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
- /// <reference types="react" />
9
+ import React from 'react';
10
10
  export type VariableOption = {
11
11
  key?: string;
12
12
  value?: string;
@@ -59,17 +59,16 @@ export declare const systemOptions: {
59
59
  value: string;
60
60
  useOptions(options: UseVariableOptions): any;
61
61
  };
62
+ /**
63
+ * @deprecated
64
+ */
62
65
  export declare const BaseTypeSets: {
63
66
  boolean: Set<string>;
64
67
  number: Set<string>;
65
68
  string: Set<string>;
66
69
  date: Set<string>;
67
70
  };
68
- export declare function useWorkflowVariableOptions(options?: UseVariableOptions): {
69
- [x: number]: any;
70
- key: any;
71
- disabled: boolean;
72
- }[];
71
+ export declare function useWorkflowVariableOptions(options?: UseVariableOptions): any[];
73
72
  export declare function getCollectionFieldOptions(options: any): VariableOption[];
74
73
  export declare function useGetCollectionFields(dataSourceName?: any): (collectionName: any) => import("@nocobase/client").CollectionFieldOptions[];
75
74
  export declare function WorkflowVariableInput({ variableOptions, ...props }: {
@@ -88,3 +87,15 @@ export declare function WorkflowVariableJSON({ variableOptions, ...props }: {
88
87
  [x: string]: any;
89
88
  variableOptions: any;
90
89
  }): JSX.Element;
90
+ /**
91
+ * @experimental
92
+ */
93
+ export declare function WorkflowVariableWrapper(props: any): JSX.Element;
94
+ /**
95
+ * @experimental
96
+ */
97
+ export declare const HideVariableContext: React.Context<boolean>;
98
+ /**
99
+ * @experimental
100
+ */
101
+ export declare function useHideVariable(): boolean;
@@ -11,24 +11,24 @@ module.exports = {
11
11
  "react": "18.2.0",
12
12
  "@formily/core": "2.3.0",
13
13
  "@formily/react": "2.3.0",
14
- "@nocobase/client": "1.6.0-alpha.2",
15
- "@nocobase/utils": "1.6.0-alpha.2",
14
+ "@nocobase/client": "1.6.0-alpha.21",
15
+ "@nocobase/utils": "1.6.0-alpha.21",
16
16
  "antd": "5.12.8",
17
17
  "@ant-design/icons": "5.2.6",
18
18
  "react-router-dom": "6.21.0",
19
19
  "react-i18next": "11.18.6",
20
20
  "@formily/shared": "2.3.2",
21
21
  "lodash": "4.17.21",
22
- "@nocobase/database": "1.6.0-alpha.2",
23
- "@nocobase/server": "1.6.0-alpha.2",
24
- "@nocobase/logger": "1.6.0-alpha.2",
25
- "@nocobase/actions": "1.6.0-alpha.2",
26
- "@nocobase/data-source-manager": "1.6.0-alpha.2",
27
- "@nocobase/evaluators": "1.6.0-alpha.2",
22
+ "sequelize": "6.35.2",
23
+ "@nocobase/database": "1.6.0-alpha.21",
24
+ "@nocobase/server": "1.6.0-alpha.21",
25
+ "@nocobase/logger": "1.6.0-alpha.21",
26
+ "@nocobase/actions": "1.6.0-alpha.21",
27
+ "@nocobase/data-source-manager": "1.6.0-alpha.21",
28
+ "@nocobase/evaluators": "1.6.0-alpha.21",
28
29
  "@formily/antd-v5": "1.1.9",
29
30
  "@formily/reactive": "2.3.0",
30
31
  "dayjs": "1.11.10",
31
- "sequelize": "6.35.2",
32
- "@nocobase/plugin-workflow-test": "1.6.0-alpha.2",
33
- "@nocobase/test": "1.6.0-alpha.2"
32
+ "@nocobase/plugin-workflow-test": "1.6.0-alpha.21",
33
+ "@nocobase/test": "1.6.0-alpha.21"
34
34
  };
@@ -94,5 +94,7 @@
94
94
  "Trigger in executed workflow cannot be modified": "Trigger in executed workflow cannot be modified",
95
95
  "Node in executed workflow cannot be modified": "Node in executed workflow cannot be modified",
96
96
  "Can not delete": "Can not delete",
97
- "The result of this node has been referenced by other nodes ({{nodes}}), please remove the usage before deleting.": "The result of this node has been referenced by other nodes ({{nodes}}), please remove the usage before deleting."
97
+ "The result of this node has been referenced by other nodes ({{nodes}}), please remove the usage before deleting.": "The result of this node has been referenced by other nodes ({{nodes}}), please remove the usage before deleting.",
98
+ "Maximum number of loop calls": "Maximum number of loop calls",
99
+ "If the number of loop calls is too large, there will be performance issues.": "If the number of loop calls is too large, there will be performance issues."
98
100
  }
@@ -31,6 +31,8 @@
31
31
  "Data operation nodes in workflow will run in a same transaction until any interruption. Any failure will cause data rollback, and will also rollback the history of the execution.":
32
32
  "工作流中的节点将在同一个事务中运行。任何失败都会导致数据回滚,同时也会回滚相应的执行历史。",
33
33
  "Auto delete history when execution is on end status": "执行结束后自动删除对应状态的历史记录",
34
+ "Maximum number of cycling triggers": "最大循环触发次数",
35
+ "The triggers of same workflow by some node (create, update and sub-flow etc.) more than this number will be ignored. Large number may cause performance issues. Please use with caution.": "由某个节点(创建、更新和子流程等)触发同一个工作流超过这个次数时将被忽略。设置过高的次数可能会导致性能问题,请谨慎使用。",
34
36
  "Trigger": "触发器",
35
37
  "Unknown trigger": "未知触发器",
36
38
  "Workflow with unknown type will cause error. Please delete it or check plugin which provide this type.": "未知类型的工作流会导致错误,请删除或检查提供该类型的插件。",
@@ -73,7 +75,7 @@
73
75
  "Preload associations": "预加载关联数据",
74
76
  "Please select the associated fields that need to be accessed in subsequent nodes. With more than two levels of to-many associations may cause performance issue, please use with caution.":
75
77
  "请选中需要在后续节点中被访问的关系字段。超过两层的对多关联可能会导致性能问题,请谨慎使用。",
76
- "Choose a record of the collection to trigger.": "选择数据表中的一行记录来触发。",
78
+ "Choose a record or primary key of a record in the collection to trigger.": "选择数据表中的一行记录或者记录的主键来触发。",
77
79
 
78
80
  "Schedule event": "定时任务",
79
81
  "Triggered according to preset time conditions. Suitable for one-time or periodic tasks, such as sending notifications and cleaning data on a schedule.": "按预设的时间条件定时触发。适用于一次性或周期性的任务,如定时发送通知、清理数据等。",
@@ -157,19 +159,19 @@
157
159
  "Node type": "节点类型",
158
160
  "Unknown node": "未知节点",
159
161
  "Node with unknown type will cause error. Please delete it or check plugin which provide this type.": "未知类型的节点会导致错误,请删除或检查提供该类型的插件。",
160
- "Calculation": "运算",
161
- "Calculation engine": "运算引擎",
162
+ "Calculation": "计算",
163
+ "Calculation engine": "计算引擎",
162
164
  "Basic": "基础",
163
- "Calculation expression": "运算表达式",
165
+ "Calculation expression": "计算表达式",
164
166
  "Expression syntax error": "表达式语法错误",
165
167
  "Syntax references: ": "语法参考:",
166
- "Calculation result": "运算结果",
168
+ "Calculation result": "计算结果",
167
169
  "True": "真",
168
170
  "False": "假",
169
171
  "concat": "连接",
170
172
  "Condition": "条件判断",
171
173
  "Based on boolean result of the calculation to determine whether to \"continue\" or \"exit\" the process, or continue on different branches of \"yes\" and \"no\".":
172
- "基于运算结果的真假来决定“继续”或“退出”流程,或者在“是”与“否”的分支上分别继续。",
174
+ "基于计算结果的真假来决定“继续”或“退出”流程,或者在“是”与“否”的分支上分别继续。",
173
175
  "Mode": "模式",
174
176
  "Continue when \"Yes\"": "“是”则继续",
175
177
  "Branch into \"Yes\" and \"No\"": "“是”和“否”分别继续",
@@ -227,5 +229,7 @@
227
229
  "Add node": "添加节点",
228
230
  "Move all downstream nodes to": "将所有下游节点移至",
229
231
  "After end of branches": "分支结束后",
230
- "Inside of branch": "分支内"
232
+ "Inside of branch": "分支内",
233
+
234
+ "Workflow todos": "流程待办"
231
235
  }
@@ -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":"2024-12-03T16:04:03.797Z"}
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":"2025-02-07T02:43:39.711Z"}
@@ -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":"2024-12-03T16:04:03.405Z"}
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":"2025-02-07T02:43:39.333Z"}
@@ -6,7 +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 { Transactionable } from '@nocobase/database';
9
+ import { Transactionable } from 'sequelize';
10
10
  import { Plugin } from '@nocobase/server';
11
11
  import { Registry } from '@nocobase/utils';
12
12
  import { Logger } from '@nocobase/logger';
@@ -15,13 +15,15 @@ import { CustomFunction } from './functions';
15
15
  import Trigger from './triggers';
16
16
  import { InstructionInterface } from './instructions';
17
17
  import type { ExecutionModel, WorkflowModel } from './types';
18
- import { Context } from '@nocobase/actions';
19
18
  type ID = number | string;
20
19
  export type EventOptions = {
21
20
  eventKey?: string;
22
21
  context?: any;
23
22
  deferred?: boolean;
24
23
  manually?: boolean;
24
+ force?: boolean;
25
+ stack?: Array<ID>;
26
+ onTriggerFail?: Function;
25
27
  [key: string]: any;
26
28
  } & Transactionable;
27
29
  export default class PluginWorkflowServer extends Plugin {
@@ -42,7 +44,7 @@ export default class PluginWorkflowServer extends Plugin {
42
44
  /**
43
45
  * @experimental
44
46
  */
45
- getLogger(workflowId: ID): Logger;
47
+ getLogger(workflowId?: ID): Logger;
46
48
  /**
47
49
  * @experimental
48
50
  * @param {WorkflowModel} workflow
@@ -70,13 +72,14 @@ export default class PluginWorkflowServer extends Plugin {
70
72
  * Start a deferred execution
71
73
  * @experimental
72
74
  */
73
- start(execution: ExecutionModel): void;
74
- createProcessor(execution: ExecutionModel, options?: {}): Processor;
75
+ start(execution: ExecutionModel): Promise<void>;
76
+ private validateEvent;
75
77
  private createExecution;
76
78
  private prepare;
77
79
  private dispatch;
80
+ createProcessor(execution: ExecutionModel, options?: {}): Processor;
78
81
  private process;
79
- execute(workflow: WorkflowModel, context: Context, options?: EventOptions): Promise<void | Processor>;
82
+ execute(workflow: WorkflowModel, values: any, options?: EventOptions): Promise<void | Processor>;
80
83
  /**
81
84
  * @experimental
82
85
  * @param {string} dataSourceName