@nocobase/plugin-workflow 1.7.0-beta.30 → 1.7.0-beta.32

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.
@@ -0,0 +1,37 @@
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
+ declare const _default: {
10
+ dumpRules: {
11
+ group: string;
12
+ };
13
+ migrationRules: string[];
14
+ name: string;
15
+ shared: boolean;
16
+ fields: ({
17
+ name: string;
18
+ type: string;
19
+ foreignKey?: undefined;
20
+ defaultValue?: undefined;
21
+ } | {
22
+ name: string;
23
+ type: string;
24
+ foreignKey: string;
25
+ defaultValue?: undefined;
26
+ } | {
27
+ type: string;
28
+ name: string;
29
+ defaultValue: {};
30
+ foreignKey?: undefined;
31
+ })[];
32
+ indexes: {
33
+ unique: boolean;
34
+ fields: string[];
35
+ }[];
36
+ };
37
+ export default _default;
@@ -24,24 +24,42 @@ var __copyProps = (to, from, except, desc) => {
24
24
  return to;
25
25
  };
26
26
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
- var workflowTasks_exports = {};
28
- __export(workflowTasks_exports, {
29
- countMine: () => countMine
27
+ var userWorkflowTasks_exports = {};
28
+ __export(userWorkflowTasks_exports, {
29
+ default: () => userWorkflowTasks_default
30
30
  });
31
- module.exports = __toCommonJS(workflowTasks_exports);
32
- var import_sequelize = require("sequelize");
33
- var import_actions = require("@nocobase/actions");
34
- async function countMine(context, next) {
35
- const repository = import_actions.utils.getRepositoryFromParams(context);
36
- context.body = await repository.countAll({
37
- where: {
38
- userId: context.state.currentUser.id,
39
- workflowId: { [import_sequelize.Op.ne]: null }
31
+ module.exports = __toCommonJS(userWorkflowTasks_exports);
32
+ var userWorkflowTasks_default = {
33
+ dumpRules: {
34
+ group: "log"
35
+ },
36
+ migrationRules: ["schema-only"],
37
+ name: "userWorkflowTasks",
38
+ shared: true,
39
+ fields: [
40
+ {
41
+ name: "userId",
42
+ type: "bigInt"
43
+ },
44
+ {
45
+ name: "user",
46
+ type: "belongsTo",
47
+ foreignKey: "userId"
48
+ },
49
+ {
50
+ name: "type",
51
+ type: "string"
52
+ },
53
+ {
54
+ type: "json",
55
+ name: "stats",
56
+ defaultValue: {}
40
57
  }
41
- }) || [];
42
- await next();
43
- }
44
- // Annotate the CommonJS export names for ESM import in node:
45
- 0 && (module.exports = {
46
- countMine
47
- });
58
+ ],
59
+ indexes: [
60
+ {
61
+ unique: true,
62
+ fields: ["userId", "type"]
63
+ }
64
+ ]
65
+ };
@@ -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.7.0-beta.30",
15
- "@nocobase/utils": "1.7.0-beta.30",
14
+ "@nocobase/client": "1.7.0-beta.32",
15
+ "@nocobase/utils": "1.7.0-beta.32",
16
16
  "antd": "5.24.2",
17
17
  "@ant-design/icons": "5.6.1",
18
18
  "react-router-dom": "6.28.1",
19
19
  "react-i18next": "11.18.6",
20
20
  "lodash": "4.17.21",
21
21
  "sequelize": "6.35.2",
22
- "@nocobase/database": "1.7.0-beta.30",
23
- "@nocobase/server": "1.7.0-beta.30",
24
- "@nocobase/data-source-manager": "1.7.0-beta.30",
25
- "@nocobase/logger": "1.7.0-beta.30",
26
- "@nocobase/evaluators": "1.7.0-beta.30",
22
+ "@nocobase/database": "1.7.0-beta.32",
23
+ "@nocobase/server": "1.7.0-beta.32",
24
+ "@nocobase/data-source-manager": "1.7.0-beta.32",
25
+ "@nocobase/logger": "1.7.0-beta.32",
26
+ "@nocobase/evaluators": "1.7.0-beta.32",
27
27
  "@formily/antd-v5": "1.2.3",
28
28
  "@formily/reactive": "2.3.0",
29
29
  "@formily/shared": "2.3.2",
30
- "@nocobase/actions": "1.7.0-beta.30",
30
+ "@nocobase/actions": "1.7.0-beta.32",
31
31
  "dayjs": "1.11.13",
32
- "@nocobase/plugin-workflow-test": "1.7.0-beta.30",
33
- "@nocobase/test": "1.7.0-beta.30"
32
+ "@nocobase/plugin-workflow-test": "1.7.0-beta.32",
33
+ "@nocobase/test": "1.7.0-beta.32"
34
34
  };
@@ -1,7 +1,11 @@
1
1
  {
2
2
  "Workflow": "Workflow",
3
3
  "Execution history": "Execution history",
4
+ "Clear all executions": "Clear all executions",
5
+ "Clear executions will not reset executed count, and started executions will not be deleted, are you sure you want to delete them all?": "Clear executions will not reset executed count, and started executions will not be deleted, are you sure you want to delete them all?",
4
6
  "Executed": "Executed",
7
+ "Sync": "Sync",
8
+ "Sync enabled status of all workflows from database": "Sync enabled status of all workflows from database",
5
9
  "Trigger type": "Trigger type",
6
10
  "Status": "Status",
7
11
  "On": "On",
@@ -9,14 +13,51 @@
9
13
  "Version": "Version",
10
14
  "Copy to new version": "Copy to new version",
11
15
  "Duplicate": "Duplicate",
16
+ "Duplicate to new workflow": "Duplicate to new workflow",
17
+ "This is a main version, delete it will cause the whole workflow to be deleted (including all other revisions).": "This is a main version, delete it will cause the whole workflow to be deleted (including all other revisions).",
18
+ "Current version will be deleted (without affecting other versions).": "Current version will be deleted (without affecting other versions).",
19
+ "Execute manually": "Execute manually",
20
+ "The trigger is not configured correctly, please check the trigger configuration.": "The trigger is not configured correctly, please check the trigger configuration.",
21
+ "This type of trigger has not been supported to be executed manually.": "This type of trigger has not been supported to be executed manually.",
22
+ "Trigger variables need to be filled for executing.": "Trigger variables need to be filled for executing.",
23
+ "A new version will be created automatically after execution if current version is not executed.": "A new version will be created automatically after execution if current version is not executed.",
24
+ "This will perform all the actions configured in the workflow. Are you sure you want to continue?": "This will perform all the actions configured in the workflow. Are you sure you want to continue?",
25
+ "Automatically create a new version after execution": "Automatically create a new version after execution",
26
+ "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
12
27
  "Loading": "Loading",
13
28
  "Load failed": "Load failed",
29
+ "Use transaction": "Use transaction",
30
+ "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.": "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.",
31
+ "Auto delete history when execution is on end status": "Auto delete history when execution is on end status",
32
+ "Maximum number of cycling triggers": "Maximum number of cycling triggers",
33
+ "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.": "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.",
14
34
  "Trigger": "Trigger",
35
+ "Unknown trigger": "Unknown trigger",
36
+ "Workflow with unknown type will cause error. Please delete it or check plugin which provide this type.": "Workflow with unknown type will cause error. Please delete it or check plugin which provide this type.",
15
37
  "Trigger variables": "Trigger variables",
16
38
  "Trigger data": "Trigger data",
17
39
  "Trigger time": "Trigger time",
18
40
  "Triggered at": "Triggered at",
41
+ "Execute mode": "Execute mode",
42
+ "Execute workflow asynchronously or synchronously based on trigger type, and could not be changed after created.": "Execute workflow asynchronously or synchronously based on trigger type, and could not be changed after created.",
43
+ "Asynchronously": "Asynchronously",
44
+ "Synchronously": "Synchronously",
45
+ "Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
46
+ "For user actions that require immediate feedback. Can not use asynchronous nodes in such mode, and it is not recommended to perform time-consuming operations under synchronous mode.": "For user actions that require immediate feedback. Can not use asynchronous nodes in such mode, and it is not recommended to perform time-consuming operations under synchronous mode.",
47
+ "Go back": "Go back",
48
+ "Bind workflows": "Bind workflows",
49
+ "Support pre-action event (local mode), post-action event (local mode), and approval event here.": "Support pre-action event (local mode), post-action event (local mode), and approval event here.",
50
+ "Workflow will be triggered directly once the button clicked, without data saving. Only supports to be bound with \"Custom action event\".": "Workflow will be triggered directly once the button clicked, without data saving. Only supports to be bound with \"Custom action event\".",
51
+ "\"Submit to workflow\" to \"Post-action event\" is deprecated, please use \"Custom action event\" instead.": "\"Submit to workflow\" to \"Post-action event\" is deprecated, please use \"Custom action event\" instead.",
52
+ "Workflow will be triggered before deleting succeeded (only supports pre-action event in local mode).": "Workflow will be triggered before deleting succeeded (only supports pre-action event in local mode).",
53
+ "Submit to workflow": "Submit to workflow",
54
+ "Add workflow": "Add workflow",
55
+ "Select workflow": "Select workflow",
56
+ "Trigger data context": "Trigger data context",
57
+ "Full form data": "Full form data",
58
+ "Select context": "Select context",
19
59
  "Collection event": "Collection event",
60
+ "Triggered when data changes in the collection, such as after adding, updating, or deleting a record. Unlike \"Post-action event\", Collection event listens for data changes rather than HTTP requests. Unless you understand the exact meaning, it is recommended to use \"Post-action event\".": "Triggered when data changes in the collection, such as after adding, updating, or deleting a record. Unlike \"Post-action event\", Collection event listens for data changes rather than HTTP requests. Unless you understand the exact meaning, it is recommended to use \"Post-action event\".",
20
61
  "Trigger on": "Trigger on",
21
62
  "After record added": "After record added",
22
63
  "After record updated": "After record updated",
@@ -25,7 +66,11 @@
25
66
  "Changed fields": "Changed fields",
26
67
  "Triggered only if one of the selected fields changes. If unselected, it means that it will be triggered when any field changes. When record is added or deleted, any field is considered to have been changed.": "Triggered only if one of the selected fields changes. If unselected, it means that it will be triggered when any field changes. When record is added or deleted, any field is considered to have been changed.",
27
68
  "Only triggers when match conditions": "Only triggers when match conditions",
69
+ "Preload associations": "Preload associations",
70
+ "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.": "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.",
71
+ "Choose a record or primary key of a record in the collection to trigger.": "Choose a record or primary key of a record in the collection to trigger.",
28
72
  "Schedule event": "Schedule event",
73
+ "Triggered according to preset time conditions. Suitable for one-time or periodic tasks, such as sending notifications and cleaning data on a schedule.": "Triggered according to preset time conditions. Suitable for one-time or periodic tasks, such as sending notifications and cleaning data on a schedule.",
29
74
  "Trigger mode": "Trigger mode",
30
75
  "Based on certain date": "Based on certain date",
31
76
  "Based on date field of collection": "Based on date field of collection",
@@ -52,49 +97,111 @@
52
97
  "By field": "By field",
53
98
  "By custom date": "By custom date",
54
99
  "Advanced": "Advanced",
100
+ "Execute on": "Execute on",
101
+ "Current time": "Current time",
55
102
  "End": "End",
56
103
  "Node result": "Node result",
57
- "Constant": "Constant",
58
- "Null": "Null",
59
- "Boolean": "Boolean",
60
- "String": "String",
104
+ "Variable key of node": "Variable key of node",
105
+ "Scope variables": "Scope variables",
61
106
  "Operator": "Operator",
62
- "Arithmetic calculation": "Arithmetic calculation",
107
+ "Calculate an expression based on a calculation engine and obtain a value as the result. Variables in the upstream nodes can be used in the expression.": "Calculate an expression based on a calculation engine and obtain a value as the result. Variables in the upstream nodes can be used in the expression.",
63
108
  "String operation": "String operation",
109
+ "System variables": "System variables",
110
+ "System time": "System time",
111
+ "Date variables": "Date variables",
112
+ "Date range": "Date range",
64
113
  "Executed at": "Executed at",
65
114
  "Queueing": "Queueing",
66
115
  "On going": "On going",
67
- "Succeeded": "Succeeded",
68
- "Failed": "Failed",
116
+ "Resolved": "Resolved",
69
117
  "Pending": "Pending",
118
+ "Failed": "Failed",
119
+ "Error": "Error",
120
+ "Aborted": "Aborted",
70
121
  "Canceled": "Canceled",
122
+ "Rejected": "Rejected",
123
+ "Retry needed": "Retry needed",
124
+ "Completed": "Completed",
125
+ "All": "All",
126
+ "View result": "View result",
127
+ "Triggered but still waiting in queue to execute.": "Triggered but still waiting in queue to execute.",
128
+ "Started and executing, maybe waiting for an async callback (manual, delay etc.).": "Started and executing, maybe waiting for an async callback (manual, delay etc.).",
129
+ "Successfully finished.": "Successfully finished.",
130
+ "Failed to satisfy node configurations.": "Failed to satisfy node configurations.",
131
+ "Some node meets error.": "Some node meets error.",
132
+ "Running of some node was aborted by program flow.": "Running of some node was aborted by program flow.",
133
+ "Manually canceled whole execution when waiting.": "Manually canceled whole execution when waiting.",
134
+ "Rejected from a manual node.": "Rejected from a manual node.",
135
+ "General failed but should do another try.": "General failed but should do another try.",
136
+ "Cancel the execution": "Cancel the execution",
137
+ "Are you sure you want to cancel the execution?": "Are you sure you want to cancel the execution?",
138
+ "Operations": "Operations",
71
139
  "This node contains branches, deleting will also be preformed to them, are you sure?": "This node contains branches, deleting will also be preformed to them, are you sure?",
72
140
  "Control": "Control",
73
141
  "Collection operations": "Collection operations",
142
+ "Manual": "Manual",
74
143
  "Extended types": "Extended types",
75
144
  "Node type": "Node type",
145
+ "Unknown node": "Unknown node",
146
+ "Node with unknown type will cause error. Please delete it or check plugin which provide this type.": "Node with unknown type will cause error. Please delete it or check plugin which provide this type.",
76
147
  "Calculation": "Calculation",
77
- "Configure calculation": "Configure calculation",
148
+ "Calculation engine": "Calculation engine",
149
+ "Basic": "Basic",
150
+ "Calculation expression": "Calculation expression",
151
+ "Expression syntax error": "Expression syntax error",
152
+ "Syntax references: ": "Syntax references: ",
78
153
  "Calculation result": "Calculation result",
79
154
  "True": "True",
80
155
  "False": "False",
81
156
  "concat": "concat",
82
157
  "Condition": "Condition",
158
+ "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\".": "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\".",
83
159
  "Mode": "Mode",
84
160
  "Continue when \"Yes\"": "Continue when \"Yes\"",
85
161
  "Branch into \"Yes\" and \"No\"": "Branch into \"Yes\" and \"No\"",
86
- "Conditions": "Conditions",
162
+ "Condition expression": "Condition expression",
163
+ "Inside of \"Yes\" branch": "Inside of \"Yes\" branch",
164
+ "Inside of \"No\" branch": "Inside of \"No\" branch",
87
165
  "Create record": "Create record",
166
+ "Add new record to a collection. You can use variables from upstream nodes to assign values to fields.": "Add new record to a collection. You can use variables from upstream nodes to assign values to fields.",
88
167
  "Update record": "Update record",
168
+ "Update records of a collection. You can use variables from upstream nodes as query conditions and field values.": "Update records of a collection. You can use variables from upstream nodes as query conditions and field values.",
169
+ "Update mode": "Update mode",
170
+ "Update in a batch": "Update in a batch",
171
+ "Update one by one": "Update one by one",
172
+ "Update all eligible data at one time, which has better performance when the amount of data is large. But association fields are not supported (unless foreign key in current collection), and the updated data will not trigger other workflows.": "Update all eligible data at one time, which has better performance when the amount of data is large. But association fields are not supported (unless foreign key in current collection), and the updated data will not trigger other workflows.",
173
+ "The updated data can trigger other workflows, and the audit log will also be recorded. But it is usually only applicable to several or dozens of pieces of data, otherwise there will be performance problems.": "The updated data can trigger other workflows, and the audit log will also be recorded. But it is usually only applicable to several or dozens of pieces of data, otherwise there will be performance problems.",
89
174
  "Query record": "Query record",
175
+ "Query records from a collection. You can use variables from upstream nodes as query conditions.": "Query records from a collection. You can use variables from upstream nodes as query conditions.",
176
+ "Allow multiple records as result": "Allow multiple records as result",
177
+ "If checked, when there are multiple records in the query result, an array will be returned as the result, which can be operated on one by one using a loop node. Otherwise, only one record will be returned.": "If checked, when there are multiple records in the query result, an array will be returned as the result, which can be operated on one by one using a loop node. Otherwise, only one record will be returned.",
178
+ "Result type": "Result type",
179
+ "Single record": "Single record",
90
180
  "Multiple records": "Multiple records",
181
+ "The result will be an object of the first matching record only, or null if no matched record.": "The result will be an object of the first matching record only, or null if no matched record.",
182
+ "The result will be an array containing matched records, or an empty one if no matching records. This can be used to be processed in a loop node.": "The result will be an array containing matched records, or an empty one if no matching records. This can be used to be processed in a loop node.",
183
+ "Exit when query result is null": "Exit when query result is null",
91
184
  "Please select collection first": "Please select collection first",
92
185
  "Only update records matching conditions": "Only update records matching conditions",
93
- "Fields that are not assigned a value will be set to the default value, and those that do not have a default value are set to null.": "Fields that are not assigned a value will be set to the default value, and those that do not have a default value are set to null.",
94
- "Trigger in executed workflow cannot be modified": "Trigger in executed workflow cannot be modified",
95
- "Node in executed workflow cannot be modified": "Node in executed workflow cannot be modified",
186
+ "Please add at least one condition": "Please add at least one condition",
187
+ "Unassigned fields will be set to default values, and those without default values will be set to null.": "Unassigned fields will be set to default values, and those without default values will be set to null.",
188
+ "Delete record": "Delete record",
189
+ "Delete records of a collection. Could use variables in workflow context as filter. All records match the filter will be deleted.": "Delete records of a collection. Could use variables in workflow context as filter. All records match the filter will be deleted.",
190
+ "Executed workflow cannot be modified. Could be copied to a new version to modify.": "Executed workflow cannot be modified. Could be copied to a new version to modify.",
96
191
  "Can not delete": "Can not delete",
97
192
  "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."
100
- }
193
+ "End process": "End process",
194
+ "End the process immediately, with set status.": "End the process immediately, with set status.",
195
+ "End status": "End status",
196
+ "Succeeded": "Succeeded",
197
+ "Test run": "Test run",
198
+ "Test run will do the actual data manipulating or API calling, please use with caution.": "Test run will do the actual data manipulating or API calling, please use with caution.",
199
+ "No variable": "No variable",
200
+ "Add node": "Add node",
201
+ "Move all downstream nodes to": "Move all downstream nodes to",
202
+ "After end of branches": "After end of branches",
203
+ "Inside of branch": "Inside of branch",
204
+ "Workflow todos": "Workflow todos",
205
+ "New version enabled": "New version enabled",
206
+ "a": "a"
207
+ }
@@ -15,7 +15,8 @@
15
15
  "Copy to new version": "复制到新版本",
16
16
  "Duplicate": "复制",
17
17
  "Duplicate to new workflow": "复制为新工作流",
18
- "Delete a main version will cause all other revisions to be deleted too.": "删除主版本将导致其他版本一并被删除。",
18
+ "This is a main version, delete it will cause the whole workflow to be deleted (including all other revisions).": "当前是主版本,删除将导致整个流程被删除(包括所有其他版本)。",
19
+ "Current version will be deleted (without affecting other versions).": "当前版本将被删除(不影响其他版本)。",
19
20
  "Execute manually": "手动执行",
20
21
  "The trigger is not configured correctly, please check the trigger configuration.": "触发器配置不正确,请检查触发器配置。",
21
22
  "This type of trigger has not been supported to be executed manually.": "该类型的触发器暂未支持手动执行。",
@@ -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":"2025-05-08T03:15:15.559Z"}
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-05-19T03:25:38.996Z"}
@@ -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":"2025-05-08T03:15:15.181Z"}
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-05-19T03:25:38.665Z"}
@@ -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":"2025-05-08T03:15:14.978Z"}
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":"2025-05-19T03:25:38.487Z"}
@@ -15,7 +15,7 @@ import Processor from './Processor';
15
15
  import { CustomFunction } from './functions';
16
16
  import Trigger from './triggers';
17
17
  import { InstructionInterface } from './instructions';
18
- import type { ExecutionModel, WorkflowModel, WorkflowTaskModel } from './types';
18
+ import type { ExecutionModel, WorkflowModel } from './types';
19
19
  type ID = number | string;
20
20
  export type EventOptions = {
21
21
  eventKey?: string;
@@ -98,6 +98,9 @@ export default class PluginWorkflowServer extends Plugin {
98
98
  /**
99
99
  * @experimental
100
100
  */
101
- toggleTaskStatus(task: WorkflowTaskModel, on: boolean, { transaction }: Transactionable): Promise<void>;
101
+ updateTasksStats(userId: number, type: string, stats: {
102
+ pending: number;
103
+ all: number;
104
+ }, { transaction }: Transactionable): Promise<void>;
102
105
  }
103
106
  export {};
@@ -61,7 +61,6 @@ var import_DestroyInstruction = __toESM(require("./instructions/DestroyInstructi
61
61
  var import_QueryInstruction = __toESM(require("./instructions/QueryInstruction"));
62
62
  var import_UpdateInstruction = __toESM(require("./instructions/UpdateInstruction"));
63
63
  var import_WorkflowRepository = __toESM(require("./repositories/WorkflowRepository"));
64
- var import_WorkflowTasksRepository = __toESM(require("./repositories/WorkflowTasksRepository"));
65
64
  class PluginWorkflowServer extends import_server.Plugin {
66
65
  instructions = new import_utils.Registry();
67
66
  triggers = new import_utils.Registry();
@@ -76,7 +75,10 @@ class PluginWorkflowServer extends import_server.Plugin {
76
75
  loggerCache;
77
76
  meter = null;
78
77
  checker = null;
79
- onBeforeSave = async (instance, { transaction }) => {
78
+ onBeforeSave = async (instance, { transaction, cycling }) => {
79
+ if (cycling) {
80
+ return;
81
+ }
80
82
  const Model = instance.constructor;
81
83
  if (!instance.key) {
82
84
  instance.set("key", (0, import_utils.uid)());
@@ -96,13 +98,12 @@ class PluginWorkflowServer extends import_server.Plugin {
96
98
  });
97
99
  if (!previous) {
98
100
  instance.set("current", true);
99
- }
100
- if (instance.current && previous) {
101
+ } else if (instance.current) {
101
102
  await previous.update(
102
103
  { enabled: false, current: null },
103
104
  {
104
105
  transaction,
105
- hooks: false
106
+ cycling: true
106
107
  }
107
108
  );
108
109
  this.toggle(previous, false, { transaction });
@@ -168,6 +169,7 @@ class PluginWorkflowServer extends import_server.Plugin {
168
169
  });
169
170
  this.getLogger("dispatcher").info("(starting) check for queueing executions");
170
171
  this.dispatch();
172
+ this.ready = true;
171
173
  };
172
174
  onBeforeStop = async () => {
173
175
  for (const workflow of this.enabledCache.values()) {
@@ -274,8 +276,7 @@ class PluginWorkflowServer extends import_server.Plugin {
274
276
  }
275
277
  async beforeLoad() {
276
278
  this.db.registerRepositories({
277
- WorkflowRepository: import_WorkflowRepository.default,
278
- WorkflowTasksRepository: import_WorkflowTasksRepository.default
279
+ WorkflowRepository: import_WorkflowRepository.default
279
280
  });
280
281
  const PluginRepo = this.db.getRepository("applicationPlugins");
281
282
  const pluginRecord = await PluginRepo.findOne({
@@ -325,15 +326,8 @@ class PluginWorkflowServer extends import_server.Plugin {
325
326
  name: "ui.workflows",
326
327
  actions: ["workflows:list"]
327
328
  });
328
- this.app.acl.allow("workflowTasks", "countMine", "loggedIn");
329
+ this.app.acl.allow("userWorkflowTasks", "listMine", "loggedIn");
329
330
  this.app.acl.allow("*", ["trigger"], "loggedIn");
330
- this.db.addMigrations({
331
- namespace: this.name,
332
- directory: import_path.default.resolve(__dirname, "migrations"),
333
- context: {
334
- plugin: this
335
- }
336
- });
337
331
  db.on("workflows.beforeSave", this.onBeforeSave);
338
332
  db.on("workflows.afterCreate", this.onAfterCreate);
339
333
  db.on("workflows.afterUpdate", this.onAfterUpdate);
@@ -679,36 +673,38 @@ class PluginWorkflowServer extends import_server.Plugin {
679
673
  /**
680
674
  * @experimental
681
675
  */
682
- async toggleTaskStatus(task, on, { transaction }) {
676
+ async updateTasksStats(userId, type, stats = { pending: 0, all: 0 }, { transaction }) {
683
677
  const { db } = this.app;
684
- const repository = db.getRepository("workflowTasks");
685
- if (on) {
686
- await repository.updateOrCreate({
687
- filterKeys: ["key", "type"],
688
- values: task,
689
- transaction
690
- });
678
+ const repository = db.getRepository("userWorkflowTasks");
679
+ let record = await repository.findOne({
680
+ filter: {
681
+ userId,
682
+ type
683
+ },
684
+ transaction
685
+ });
686
+ if (record) {
687
+ await record.update(
688
+ {
689
+ stats
690
+ },
691
+ { transaction }
692
+ );
691
693
  } else {
692
- await repository.destroy({
693
- filter: {
694
- type: task.type,
695
- key: `${task.key}`
694
+ record = await repository.create({
695
+ values: {
696
+ userId,
697
+ type,
698
+ stats
696
699
  },
697
700
  transaction
698
701
  });
699
702
  }
700
- if (task.userId) {
701
- const counts = await repository.countAll({
702
- where: {
703
- userId: task.userId,
704
- workflowId: { [import_database.Op.ne]: null }
705
- },
706
- transaction
707
- }) || [];
703
+ if (userId) {
708
704
  this.app.emit("ws:sendToTag", {
709
705
  tagKey: "userId",
710
- tagValue: `${task.userId}`,
711
- message: { type: "workflow:tasks:updated", payload: counts }
706
+ tagValue: `${userId}`,
707
+ message: { type: "workflow:tasks:updated", payload: record.get() }
712
708
  });
713
709
  }
714
710
  }
@@ -118,11 +118,13 @@ class Processor {
118
118
  execution.workflow = plugin.enabledCache.get(execution.workflowId) || await execution.getWorkflow({ transaction });
119
119
  }
120
120
  const nodes = await execution.workflow.getNodes({ transaction });
121
+ execution.workflow.nodes = nodes;
121
122
  this.makeNodes(nodes);
122
123
  const jobs = await execution.getJobs({
123
124
  order: [["id", "ASC"]],
124
125
  transaction
125
126
  });
127
+ execution.jobs = jobs;
126
128
  this.makeJobs(jobs);
127
129
  }
128
130
  async start() {
@@ -42,7 +42,7 @@ module.exports = __toCommonJS(actions_exports);
42
42
  var workflows = __toESM(require("./workflows"));
43
43
  var nodes = __toESM(require("./nodes"));
44
44
  var executions = __toESM(require("./executions"));
45
- var workflowTasks = __toESM(require("./workflowTasks"));
45
+ var userWorkflowTasks = __toESM(require("./userWorkflowTasks"));
46
46
  function make(name, mod) {
47
47
  return Object.keys(mod).reduce(
48
48
  (result, key) => ({
@@ -64,6 +64,6 @@ function actions_default({ app }) {
64
64
  test: nodes.test
65
65
  }),
66
66
  ...make("executions", executions),
67
- ...make("workflowTasks", workflowTasks)
67
+ ...make("userWorkflowTasks", userWorkflowTasks)
68
68
  });
69
69
  }
@@ -7,4 +7,4 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import { Context } from '@nocobase/actions';
10
- export declare function countMine(context: Context, next: any): Promise<void>;
10
+ export declare function listMine(context: Context, next: any): Promise<void>;