@nocobase/plugin-workflow 2.2.0-beta.9 → 2.3.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client-v2.d.ts +2 -0
- package/client-v2.js +1 -0
- package/dist/client/119.e7dbd037d52d1286.js +10 -0
- package/dist/client/142.fb4936d78fc80007.js +10 -0
- package/dist/client/159.cc9a0f2d92cab2c1.js +10 -0
- package/dist/client/276.69fb2aea13bc7c37.js +10 -0
- package/dist/client/346.66d060d37843d3d1.js +10 -0
- package/dist/client/382.d37fba14a6b91b0b.js +10 -0
- package/dist/client/394.a37310b78419ad7a.js +10 -0
- package/dist/client/438.6c6409d821d8c353.js +10 -0
- package/dist/client/509.88792f5bd054b2af.js +10 -0
- package/dist/client/54.d81b710f7b4c1cd5.js +10 -0
- package/dist/client/618.1aa6c21d0f2840cb.js +10 -0
- package/dist/client/635.ff6085589e23d39b.js +10 -0
- package/dist/client/67.56a3d15a55ab7d5c.js +10 -0
- package/dist/client/719.f011fde3ad54571e.js +10 -0
- package/dist/client/728.711fd4f1ed7d4e6a.js +10 -0
- package/dist/client/739.49407722fca8d236.js +10 -0
- package/dist/client/759.13aab01e6912ed8d.js +10 -0
- package/dist/client/772.1ebaef11a0ac8688.js +10 -0
- package/dist/client/782.47792ce10fc0d5fb.js +10 -0
- package/dist/client/828.6880ab21513b1968.js +10 -0
- package/dist/client/87.083467b89aaf3e53.js +10 -0
- package/dist/client/938.26493fc09ba1ccbc.js +10 -0
- package/dist/client/964.5ab736effd480a42.js +10 -0
- package/dist/client/972.dd7f074d5f12e171.js +10 -0
- package/dist/client/AddNodeContext.d.ts +1 -9
- package/dist/client/BranchContext.d.ts +2 -10
- package/dist/client/FlowContext.d.ts +10 -5
- package/dist/client/NodeClipboardContext.d.ts +12 -2
- package/dist/client/NodeDragContext.d.ts +14 -2
- package/dist/client/RemoveNodeContext.d.ts +16 -2
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/nodeVariableUtils.d.ts +7 -6
- package/dist/client/nodes/calculation.d.ts +3 -75
- package/dist/client/nodes/condition.d.ts +7 -111
- package/dist/client/nodes/create.d.ts +3 -124
- package/dist/client/nodes/destroy.d.ts +2 -57
- package/dist/client/nodes/end.d.ts +2 -23
- package/dist/client/nodes/index.d.ts +2 -91
- package/dist/client/nodes/multi-conditions.d.ts +10 -48
- package/dist/client/nodes/output.d.ts +2 -44
- package/dist/client/nodes/query.d.ts +3 -255
- package/dist/client/nodes/update.d.ts +2 -117
- package/dist/client/style.d.ts +7 -27
- package/dist/client/triggers/collection.d.ts +3 -181
- package/dist/client/triggers/index.d.ts +2 -36
- package/dist/client/triggers/schedule/index.d.ts +8 -65
- package/dist/client/utils.d.ts +4 -5
- package/dist/client/variable.d.ts +7 -53
- package/dist/client-v2/119.81195bcd0d451279.js +10 -0
- package/dist/client-v2/142.a8c8df2a9abb43c5.js +10 -0
- package/dist/client-v2/159.cb221540c286cd32.js +10 -0
- package/dist/client-v2/276.7f746d899e221e2f.js +10 -0
- package/dist/client-v2/326.bdc99ad8e7590970.js +10 -0
- package/dist/client-v2/346.8c038b3c99d4fdc9.js +10 -0
- package/dist/client-v2/382.05f5482bb512b179.js +10 -0
- package/dist/client-v2/387.5e61d648d16dbf1b.js +10 -0
- package/dist/client-v2/394.515ed058e7f72797.js +10 -0
- package/dist/client-v2/438.b7df0416b66f8f64.js +10 -0
- package/dist/client-v2/513.617697f74783a611.js +10 -0
- package/dist/client-v2/54.d3daf06e53092726.js +10 -0
- package/dist/client-v2/635.14a6f21cf4f16345.js +10 -0
- package/dist/client-v2/677.7382807126d9621a.js +10 -0
- package/dist/client-v2/719.05cf070ef89a78f4.js +10 -0
- package/dist/client-v2/728.4e8322ff8fce87b9.js +10 -0
- package/dist/client-v2/739.5b60845103064f8d.js +10 -0
- package/dist/client-v2/759.7b162ad3adf450f1.js +10 -0
- package/dist/client-v2/772.8e5148d8c1518449.js +10 -0
- package/dist/client-v2/938.717e47af39485b29.js +10 -0
- package/dist/client-v2/ExecutionCanvas.d.ts +15 -0
- package/dist/client-v2/canvas/AddNodeContext.d.ts +35 -0
- package/dist/client-v2/canvas/AddNodeContext.shared.d.ts +33 -0
- package/dist/client-v2/canvas/AddNodeSlot.d.ts +20 -0
- package/dist/client-v2/canvas/Branch.d.ts +32 -0
- package/dist/client-v2/canvas/BranchContext.d.ts +29 -0
- package/dist/client-v2/canvas/BranchRenderContext.d.ts +14 -0
- package/dist/client-v2/canvas/CanvasContent.d.ts +20 -0
- package/dist/client-v2/canvas/DownstreamBranchIndex.d.ts +20 -0
- package/dist/client-v2/canvas/Instruction.d.ts +139 -0
- package/dist/{client/triggers/schedule/EndsByField.d.ts → client-v2/canvas/JobButton.d.ts} +3 -3
- package/dist/client-v2/canvas/Node.d.ts +38 -0
- package/dist/client-v2/canvas/NodeClipboardContext.d.ts +64 -0
- package/dist/client-v2/canvas/NodeConfigDrawer.d.ts +27 -0
- package/dist/client-v2/canvas/NodeDragContext.d.ts +83 -0
- package/dist/client-v2/canvas/RemoveNodeContext.d.ts +45 -0
- package/dist/client-v2/canvas/WorkflowTypedVariableInput.d.ts +16 -0
- package/dist/client-v2/canvas/WorkflowVariableInput.d.ts +40 -0
- package/dist/client-v2/canvas/WorkflowVariableJsonTextArea.d.ts +15 -0
- package/dist/client-v2/canvas/WorkflowVariableTag.d.ts +22 -0
- package/dist/client-v2/canvas/WorkflowVariableTextArea.d.ts +18 -0
- package/dist/client-v2/canvas/adaptVariableOptionToMetaTree.d.ts +48 -0
- package/dist/client-v2/canvas/addNodeController.d.ts +70 -0
- package/dist/client-v2/canvas/collectionFieldOptions.d.ts +57 -0
- package/dist/client-v2/canvas/contexts.d.ts +86 -0
- package/dist/client-v2/canvas/dropImpact.d.ts +28 -0
- package/dist/client-v2/canvas/instructionAvailability.d.ts +26 -0
- package/dist/client-v2/canvas/nodeRenderDispatch.d.ts +79 -0
- package/dist/client-v2/canvas/nodeTree.d.ts +21 -0
- package/dist/client-v2/canvas/nodeVariableUtils.d.ts +14 -0
- package/dist/client-v2/canvas/removeNodeUtils.d.ts +31 -0
- package/dist/client-v2/canvas/style.d.ts +35 -0
- package/dist/client-v2/canvas/textAreaInsertion.d.ts +14 -0
- package/dist/client-v2/canvas/useWorkflowInstruction.d.ts +23 -0
- package/dist/client-v2/canvas/useWorkflowVariableOptions.d.ts +40 -0
- package/dist/client-v2/canvas/workflowVariableConverters.d.ts +13 -0
- package/dist/client-v2/components/Calculation.d.ts +18 -0
- package/dist/client-v2/components/ExecutionStatusIcon.d.ts +18 -0
- package/dist/{client/triggers/schedule/RepeatField.d.ts → client-v2/components/ExecutionStatusTag.d.ts} +3 -4
- package/dist/client-v2/components/ExecutionViewHeader.d.ts +29 -0
- package/dist/client-v2/components/ExecutionsDropdown.d.ts +25 -0
- package/dist/client-v2/components/FilterDynamicComponent.d.ts +28 -0
- package/dist/client-v2/components/HideVariableContext.d.ts +11 -0
- package/dist/client-v2/components/JobResultModal.d.ts +11 -0
- package/dist/client-v2/components/RadioWithTooltip.d.ts +23 -0
- package/dist/client-v2/components/SyncModeSelect.d.ts +16 -0
- package/dist/{client/triggers/schedule/OnField.d.ts → client-v2/components/SyncModeTag.d.ts} +3 -3
- package/dist/client-v2/components/TestRunButton.d.ts +36 -0
- package/dist/client-v2/components/TimeoutInput.d.ts +15 -0
- package/dist/client-v2/components/WorkflowCanvasHeader.d.ts +17 -0
- package/dist/client-v2/components/WorkflowDetailsModal.d.ts +25 -0
- package/dist/client-v2/components/WorkflowEnabledSwitch.d.ts +16 -0
- package/dist/client-v2/components/WorkflowMenu.d.ts +17 -0
- package/dist/client-v2/components/WorkflowRevisionsDropdown.d.ts +15 -0
- package/dist/client-v2/components/WorkflowVariableWrapper.d.ts +25 -0
- package/dist/client-v2/components/collection/AppendsSelect.d.ts +15 -0
- package/dist/client-v2/components/collection/AssignedFieldsEditor.d.ts +24 -0
- package/dist/client-v2/components/collection/CollectionCascader.d.ts +15 -0
- package/dist/client-v2/components/collection/FieldsSelect.d.ts +16 -0
- package/dist/client-v2/components/collection/PaginationFields.d.ts +14 -0
- package/dist/client-v2/components/collection/SortFieldsInput.d.ts +19 -0
- package/dist/client-v2/components/collection/TriggerCollectionRecordSelect.d.ts +15 -0
- package/dist/client-v2/components/collection/index.d.ts +16 -0
- package/dist/client-v2/components/collection/utils.d.ts +42 -0
- package/dist/client-v2/components/formatResultForDisplay.d.ts +17 -0
- package/dist/client-v2/components/jobStatus.d.ts +27 -0
- package/dist/client-v2/components/renderEngineReference.d.ts +10 -0
- package/dist/client-v2/components/workflowCanvas.d.ts +41 -0
- package/dist/client-v2/constants.d.ts +19 -0
- package/dist/client-v2/hooks/useWorkflowRuntimePaths.d.ts +16 -0
- package/dist/client-v2/index.d.ts +48 -0
- package/dist/client-v2/index.js +10 -0
- package/dist/client-v2/locale.d.ts +41 -0
- package/dist/{client → client-v2}/models/NodeDetailsGridModel.d.ts +1 -1
- package/dist/{client → client-v2}/models/NodeDetailsModel.d.ts +1 -1
- package/dist/{client → client-v2}/models/NodeValueModel.d.ts +1 -1
- package/dist/{client → client-v2}/models/TaskCardCommonItemModel.d.ts +1 -1
- package/dist/client-v2/models/WorkflowTasksTopbarActionModel.d.ts +18 -0
- package/dist/{client → client-v2}/models/index.d.ts +2 -0
- package/dist/client-v2/models/triggerWorkflows.d.ts +43 -0
- package/dist/client-v2/nodes/calculation.d.ts +38 -0
- package/dist/client-v2/nodes/collectionNode.d.ts +29 -0
- package/dist/client-v2/nodes/components/calculation.d.ts +11 -0
- package/dist/client-v2/nodes/components/collection.d.ts +15 -0
- package/dist/client-v2/nodes/components/condition.d.ts +25 -0
- package/dist/client-v2/nodes/components/conditionShared.d.ts +20 -0
- package/dist/client-v2/nodes/components/create.d.ts +12 -0
- package/dist/client-v2/nodes/components/destroy.d.ts +12 -0
- package/dist/{client/triggers/schedule/ScheduleConfig.d.ts → client-v2/nodes/components/end.d.ts} +1 -1
- package/dist/client-v2/nodes/components/filter.d.ts +17 -0
- package/dist/client-v2/nodes/components/multi-conditions.d.ts +13 -0
- package/dist/client-v2/nodes/components/multiConditionsShared.d.ts +20 -0
- package/dist/client-v2/nodes/components/output.d.ts +10 -0
- package/dist/client-v2/nodes/components/query.d.ts +12 -0
- package/dist/client-v2/nodes/components/update.d.ts +12 -0
- package/dist/client-v2/nodes/condition.d.ts +46 -0
- package/dist/client-v2/nodes/create.d.ts +30 -0
- package/dist/client-v2/nodes/destroy.d.ts +24 -0
- package/dist/client-v2/nodes/end.d.ts +21 -0
- package/dist/client-v2/nodes/multi-conditions.d.ts +34 -0
- package/dist/client-v2/nodes/output.d.ts +29 -0
- package/dist/client-v2/nodes/query.d.ts +32 -0
- package/dist/client-v2/nodes/update.d.ts +25 -0
- package/dist/client-v2/pages/ExecutionHistoryDrawer.d.ts +13 -0
- package/dist/client-v2/pages/ExecutionViewPage.d.ts +10 -0
- package/dist/client-v2/pages/WorkflowCanvasPage.d.ts +10 -0
- package/dist/client-v2/pages/WorkflowCategoryTabs.d.ts +25 -0
- package/dist/client-v2/pages/WorkflowFormDrawer.d.ts +40 -0
- package/dist/client-v2/pages/WorkflowPane.d.ts +10 -0
- package/dist/client-v2/pages/WorkflowTasksPage.d.ts +10 -0
- package/dist/client-v2/plugin.d.ts +119 -0
- package/dist/client-v2/taskCenter.d.ts +105 -0
- package/dist/client-v2/triggers/ExecuteWorkflowButton.d.ts +35 -0
- package/dist/client-v2/triggers/TriggerConfig.d.ts +22 -0
- package/dist/client-v2/triggers/TriggerExecutionButton.d.ts +13 -0
- package/dist/client-v2/triggers/collection/CollectionConfig.d.ts +14 -0
- package/dist/client-v2/triggers/collection/TriggerCollectionConfig.d.ts +11 -0
- package/dist/client-v2/triggers/collection/constants.d.ts +28 -0
- package/dist/client-v2/triggers/collection/index.d.ts +40 -0
- package/dist/client-v2/triggers/index.d.ts +63 -0
- package/dist/client-v2/triggers/schedule/EndsByField.d.ts +17 -0
- package/dist/client-v2/triggers/schedule/OnField.d.ts +20 -0
- package/dist/client-v2/triggers/schedule/RepeatField.d.ts +23 -0
- package/dist/client-v2/triggers/schedule/ScheduleConfig.d.ts +17 -0
- package/dist/client-v2/triggers/schedule/ScheduleModes.d.ts +41 -0
- package/dist/{client → client-v2}/triggers/schedule/TriggerScheduleConfig.d.ts +1 -0
- package/dist/{client → client-v2}/triggers/schedule/constants.d.ts +8 -5
- package/dist/client-v2/triggers/schedule/index.d.ts +40 -0
- package/dist/client-v2/triggers/schedule/locale/Cron.zh-CN.d.ts +11 -0
- package/dist/client-v2/utils/contextSingleton.d.ts +9 -0
- package/dist/common/collections/workflows.d.ts +16 -0
- package/dist/common/collections/workflows.js +5 -0
- package/dist/common/defaultWorkflowFilter.d.ts +21 -0
- package/dist/common/defaultWorkflowFilter.js +38 -0
- package/dist/common/executionStatus.d.ts +44 -0
- package/dist/common/executionStatus.js +133 -0
- package/dist/externalVersion.js +16 -13
- package/dist/locale/de-DE.json +15 -1
- package/dist/locale/en-US.json +26 -1
- package/dist/locale/es-ES.json +15 -1
- package/dist/locale/fr-FR.json +15 -1
- package/dist/locale/hu-HU.json +15 -1
- package/dist/locale/id-ID.json +15 -1
- package/dist/locale/it-IT.json +15 -1
- package/dist/locale/ja-JP.json +15 -1
- package/dist/locale/ko-KR.json +15 -1
- package/dist/locale/nl-NL.json +15 -1
- package/dist/locale/pt-BR.json +15 -1
- package/dist/locale/ru-RU.json +15 -1
- package/dist/locale/tr-TR.json +15 -1
- package/dist/locale/uk-UA.json +15 -1
- package/dist/locale/vi-VN.json +15 -1
- package/dist/locale/zh-CN.json +25 -1
- package/dist/locale/zh-TW.json +21 -1
- package/dist/node_modules/cron-parser/package.json +1 -1
- package/dist/node_modules/joi/package.json +1 -1
- package/dist/node_modules/lru-cache/package.json +1 -1
- package/dist/node_modules/nodejs-snowflake/package.json +1 -1
- package/dist/server/Dispatcher.d.ts +3 -2
- package/dist/server/Dispatcher.js +39 -18
- package/dist/server/ExecutionTimeoutManager.js +2 -1
- package/dist/server/Plugin.d.ts +1 -1
- package/dist/server/actions/workflows.d.ts +1 -0
- package/dist/server/actions/workflows.js +17 -2
- package/dist/server/migrations/20260713000000-remove-workflow-validation.d.ts +13 -0
- package/dist/server/migrations/20260713000000-remove-workflow-validation.js +56 -0
- package/dist/server/triggers/CollectionTrigger.d.ts +1 -1
- package/dist/server/triggers/CollectionTrigger.js +3 -0
- package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.d.ts +1 -1
- package/dist/server/triggers/index.d.ts +1 -1
- package/dist/server/types/Workflow.d.ts +1 -0
- package/dist/server/utils.d.ts +1 -1
- package/dist/server/utils.js +14 -1
- package/dist/swagger/index.d.ts +1 -0
- package/dist/swagger/index.js +4 -2
- package/package.json +4 -2
- package/dist/client/618.c91be3f6e4d73501.js +0 -10
- package/dist/client/67.61e70b8b777f8638.js +0 -10
- package/dist/client/964.5e11e1820fece37b.js +0 -10
- package/dist/client/triggers/schedule/ScheduleModes.d.ts +0 -170
- package/dist/client/triggers/schedule/locale/Cron.zh-CN.d.ts +0 -42
package/dist/locale/zh-TW.json
CHANGED
|
@@ -102,6 +102,9 @@
|
|
|
102
102
|
"Executed at": "Executed at",
|
|
103
103
|
"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.",
|
|
104
104
|
"Execution history": "Execution history",
|
|
105
|
+
"Version ID": "Version ID",
|
|
106
|
+
"Parent execution ID": "Parent execution ID",
|
|
107
|
+
"Triggered manually": "Triggered manually",
|
|
105
108
|
"Timeout settings": "逾時設定",
|
|
106
109
|
"0 means unlimited. If you set any other value and the execution is still not completed when the timeout is reached, the execution plan will be terminated and the remaining nodes will not be executed. Time spent in queue is not counted; timing starts only after it first enters a processor.": "0 表示不限制,設定其他任意值在到期仍未執行完成時,執行計畫將被終止,剩餘節點不再執行。處於佇列中的執行計畫不計時,僅在首次進入處理器後開始計時。",
|
|
107
110
|
"Exit when query result is null": "Exit when query result is null",
|
|
@@ -111,6 +114,7 @@
|
|
|
111
114
|
"Failed to satisfy node configurations.": "Failed to satisfy node configurations.",
|
|
112
115
|
"False": "False",
|
|
113
116
|
"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.",
|
|
117
|
+
"Failed to save trigger": "保存觸發器失敗",
|
|
114
118
|
"First condition": "First condition",
|
|
115
119
|
"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.",
|
|
116
120
|
"From left to right, attempt each branch sequentially based on the configured conditions. Only branches that meet the conditions will be executed. Otherwise, the next branch will be attempted. If none of the branches meet the conditions, it can either exit the process or continue to the next node based on configuration.": "From left to right, attempt each branch sequentially based on the configured conditions. Only branches that meet the conditions will be executed. Otherwise, the next branch will be attempted. If none of the branches meet the conditions, it can either exit the process or continue to the next node based on configuration.",
|
|
@@ -183,6 +187,7 @@
|
|
|
183
187
|
"Scope variables": "Scope variables",
|
|
184
188
|
"Seconds": "秒",
|
|
185
189
|
"Select context": "Select context",
|
|
190
|
+
"Select field": "選擇欄位",
|
|
186
191
|
"Select users": "Select users",
|
|
187
192
|
"Select workflow": "Select workflow",
|
|
188
193
|
"Single record": "Single record",
|
|
@@ -251,7 +256,10 @@
|
|
|
251
256
|
"When no condition matches": "When no condition matches",
|
|
252
257
|
"Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
|
|
253
258
|
"Workflow": "Workflow",
|
|
259
|
+
"Workflow title": "工作流名稱",
|
|
260
|
+
"Workflow not executed": "工作流未執行",
|
|
254
261
|
"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>",
|
|
262
|
+
"Workflow was not triggered because the current request did not meet the trigger requirements.": "目前請求未滿足觸發要求,工作流未觸發。",
|
|
255
263
|
"Workflow of execution is not existed": "Workflow of execution is not existed",
|
|
256
264
|
"Workflow tasks": "Workflow tasks",
|
|
257
265
|
"Workflow todos": "Workflow todos",
|
|
@@ -266,5 +274,17 @@
|
|
|
266
274
|
"Impacted dependent node variables": "引用目前節點變數的節點",
|
|
267
275
|
"Keep variable references": "保留變數引用",
|
|
268
276
|
"Keeping variable references requires manual adjustment, otherwise workflow may fail.": "已保留變數引用,請手動調整,否則工作流執行可能出錯。",
|
|
269
|
-
"Failed to update node variables": "更新節點變數失敗"
|
|
277
|
+
"Failed to update node variables": "更新節點變數失敗",
|
|
278
|
+
"Unsupported node": "Unsupported node",
|
|
279
|
+
"This node type is not available in the new canvas yet.": "This node type is not available in the new canvas yet.",
|
|
280
|
+
"This node's configuration has not been migrated to the new canvas yet.": "This node's configuration has not been migrated to the new canvas yet.",
|
|
281
|
+
"This trigger type is not available in the new canvas yet.": "此觸發器類型尚未在新畫布中支援。",
|
|
282
|
+
"This trigger's configuration has not been migrated to the new canvas yet.": "此觸發器的配置尚未遷移到新畫布。",
|
|
283
|
+
"Node title": "Node title",
|
|
284
|
+
"Trigger title": "觸發器標題",
|
|
285
|
+
"Failed to add node": "Failed to add node",
|
|
286
|
+
"Failed to delete node": "Failed to delete node",
|
|
287
|
+
"Failed to save node": "Failed to save node",
|
|
288
|
+
"Failed to run": "Failed to run",
|
|
289
|
+
"Copied node": "Copied node"
|
|
270
290
|
}
|
|
@@ -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-07-
|
|
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-07-16T12:58:10.170Z"}
|
|
@@ -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-07-
|
|
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-07-16T12:58:09.879Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"lru-cache","description":"A cache object that deletes the least-recently-used items.","version":"11.3.5","author":"Isaac Z. Schlueter <i@izs.me>","keywords":["mru","lru","cache"],"sideEffects":false,"scripts":{"build":"npm run prepare","prepare":"tshy && bash scripts/build.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig ./.tshy/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","lint":"oxlint --fix src test","postsnap":"npm run lint","postlint":"npm run format"},"main":"./dist/commonjs/index.min.js","types":"./dist/commonjs/index.d.ts","tshy":{"esmDialects":["node","browser"],"exports":{"./raw":"./src/index.ts",".":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.min.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.min.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.min.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.min.js"}}},"selfLink":false},"repository":{"type":"git","url":"git+ssh://git@github.com/isaacs/node-lru-cache.git"},"devDependencies":{"benchmark":"^2.1.4","esbuild":"^0.25.9","marked":"^4.2.12","mkdirp":"^3.0.1","oxlint":"^1.58.0","oxlint-tsgolint":"^0.19.0","prettier":"^3.8.1","tap":"^21.6.3","tshy":"^4.1.1","typedoc":"^0.28.18"},"license":"BlueOak-1.0.0","files":["dist"],"engines":{"node":"20 || >=22"},"exports":{"./raw":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},".":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.min.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.min.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.min.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.min.js"}}},"type":"module","module":"./dist/esm/index.min.js","_lastModified":"2026-07-
|
|
1
|
+
{"name":"lru-cache","description":"A cache object that deletes the least-recently-used items.","version":"11.3.5","author":"Isaac Z. Schlueter <i@izs.me>","keywords":["mru","lru","cache"],"sideEffects":false,"scripts":{"build":"npm run prepare","prepare":"tshy && bash scripts/build.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig ./.tshy/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","lint":"oxlint --fix src test","postsnap":"npm run lint","postlint":"npm run format"},"main":"./dist/commonjs/index.min.js","types":"./dist/commonjs/index.d.ts","tshy":{"esmDialects":["node","browser"],"exports":{"./raw":"./src/index.ts",".":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.min.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.min.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.min.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.min.js"}}},"selfLink":false},"repository":{"type":"git","url":"git+ssh://git@github.com/isaacs/node-lru-cache.git"},"devDependencies":{"benchmark":"^2.1.4","esbuild":"^0.25.9","marked":"^4.2.12","mkdirp":"^3.0.1","oxlint":"^1.58.0","oxlint-tsgolint":"^0.19.0","prettier":"^3.8.1","tap":"^21.6.3","tshy":"^4.1.1","typedoc":"^0.28.18"},"license":"BlueOak-1.0.0","files":["dist"],"engines":{"node":"20 || >=22"},"exports":{"./raw":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},".":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.min.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.min.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.min.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.min.js"}}},"type":"module","module":"./dist/esm/index.min.js","_lastModified":"2026-07-16T12:58:09.110Z"}
|
|
@@ -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-07-
|
|
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-07-16T12:58:08.932Z"}
|
|
@@ -26,7 +26,7 @@ export type EventOptions = {
|
|
|
26
26
|
force?: boolean;
|
|
27
27
|
stack?: Array<number | string>;
|
|
28
28
|
parentExecutionId?: number | string;
|
|
29
|
-
onTriggerFail?:
|
|
29
|
+
onTriggerFail?: (workflow: WorkflowModel, context: object, options: EventOptions, error?: unknown) => void | Promise<void>;
|
|
30
30
|
[key: string]: any;
|
|
31
31
|
} & Transactionable;
|
|
32
32
|
export default class Dispatcher {
|
|
@@ -42,7 +42,7 @@ export default class Dispatcher {
|
|
|
42
42
|
readonly onQueueExecution: QueueEventOptions['process'];
|
|
43
43
|
setReady(ready: boolean): void;
|
|
44
44
|
getEventsCount(): number;
|
|
45
|
-
trigger(workflow: WorkflowModel, context: object, options?: EventOptions): void | Promise<Processor | null>;
|
|
45
|
+
trigger(workflow: WorkflowModel, context: object, options?: EventOptions): void | Promise<Processor | null | void>;
|
|
46
46
|
private saveEvent;
|
|
47
47
|
resume(job: JobModel): Promise<void>;
|
|
48
48
|
start(execution: ExecutionModel): Promise<void>;
|
|
@@ -51,6 +51,7 @@ export default class Dispatcher {
|
|
|
51
51
|
run(pending: Pending): Promise<void>;
|
|
52
52
|
private triggerSync;
|
|
53
53
|
private validateEvent;
|
|
54
|
+
private handleTriggerFail;
|
|
54
55
|
private createExecution;
|
|
55
56
|
private prepare;
|
|
56
57
|
private acquireExecution;
|
|
@@ -71,7 +71,7 @@ class Dispatcher {
|
|
|
71
71
|
if (!this.ready) {
|
|
72
72
|
logger.warn(`app is not ready, event of workflow ${workflow.id} will be ignored`);
|
|
73
73
|
logger.debug(`ignored event data:`, context);
|
|
74
|
-
return;
|
|
74
|
+
return this.handleTriggerFail(workflow, context, options, new Error("app is not ready"));
|
|
75
75
|
}
|
|
76
76
|
if (!options.force && !options.manually && !workflow.enabled) {
|
|
77
77
|
logger.warn(`workflow ${workflow.id} is not enabled, event will be ignored`);
|
|
@@ -88,7 +88,7 @@ class Dispatcher {
|
|
|
88
88
|
}
|
|
89
89
|
if (context == null) {
|
|
90
90
|
logger.warn(`workflow ${workflow.id} event data context is null, event will be ignored`);
|
|
91
|
-
return;
|
|
91
|
+
return this.handleTriggerFail(workflow, context, options, new Error("event context is null"));
|
|
92
92
|
}
|
|
93
93
|
if (options.manually || this.plugin.isWorkflowSync(workflow)) {
|
|
94
94
|
return this.triggerSync(workflow, context, options);
|
|
@@ -303,8 +303,15 @@ class Dispatcher {
|
|
|
303
303
|
}
|
|
304
304
|
return valid;
|
|
305
305
|
}
|
|
306
|
-
async
|
|
306
|
+
async handleTriggerFail(workflow, context, options, error) {
|
|
307
307
|
var _a;
|
|
308
|
+
try {
|
|
309
|
+
await ((_a = options.onTriggerFail) == null ? void 0 : _a.call(options, workflow, context, options, error));
|
|
310
|
+
} catch (triggerFailError) {
|
|
311
|
+
this.plugin.getLogger(workflow.id).error(`trigger failure callback failed`, { error: triggerFailError });
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
async createExecution(workflow, context, options) {
|
|
308
315
|
const { deferred } = options;
|
|
309
316
|
let stack = options.stack;
|
|
310
317
|
if (options.parentExecutionId && !stack) {
|
|
@@ -313,21 +320,34 @@ class Dispatcher {
|
|
|
313
320
|
});
|
|
314
321
|
stack = parentExecution ? [...parentExecution.stack ?? [], parentExecution.id] : [];
|
|
315
322
|
}
|
|
316
|
-
|
|
323
|
+
let valid;
|
|
324
|
+
try {
|
|
325
|
+
valid = await this.validateEvent(workflow, context, { ...options, stack });
|
|
326
|
+
} catch (error) {
|
|
327
|
+
await this.handleTriggerFail(workflow, context, options, error);
|
|
328
|
+
throw error;
|
|
329
|
+
}
|
|
317
330
|
if (!valid) {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
+
const error = new Error("event is not valid");
|
|
332
|
+
await this.handleTriggerFail(workflow, context, options, error);
|
|
333
|
+
throw error;
|
|
334
|
+
}
|
|
335
|
+
let execution;
|
|
336
|
+
try {
|
|
337
|
+
execution = await workflow.createExecution({
|
|
338
|
+
context,
|
|
339
|
+
key: workflow.key,
|
|
340
|
+
eventKey: options.eventKey ?? (0, import_node_crypto.randomUUID)(),
|
|
341
|
+
stack,
|
|
342
|
+
parentExecutionId: options.parentExecutionId ?? null,
|
|
343
|
+
dispatched: deferred ?? false,
|
|
344
|
+
status: deferred ? import_constants.EXECUTION_STATUS.STARTED : import_constants.EXECUTION_STATUS.QUEUEING,
|
|
345
|
+
manually: options.manually
|
|
346
|
+
});
|
|
347
|
+
} catch (error) {
|
|
348
|
+
await this.handleTriggerFail(workflow, context, options, error);
|
|
349
|
+
throw error;
|
|
350
|
+
}
|
|
331
351
|
this.plugin.getLogger(workflow.id).info(`execution of workflow ${workflow.id} created as ${execution.id}`);
|
|
332
352
|
if (!workflow.stats) {
|
|
333
353
|
workflow.stats = await workflow.getStats();
|
|
@@ -527,7 +547,8 @@ class Dispatcher {
|
|
|
527
547
|
}
|
|
528
548
|
return processor;
|
|
529
549
|
};
|
|
530
|
-
const
|
|
550
|
+
const lockManager = this.plugin.app.lockManager;
|
|
551
|
+
const lock = await lockManager.tryAcquire((0, import_utils.getExecutionLockKey)(execution.id), 6e4);
|
|
531
552
|
try {
|
|
532
553
|
return await lock.runExclusive(run, 6e4);
|
|
533
554
|
} catch (error) {
|
|
@@ -108,7 +108,8 @@ class ExecutionTimeoutManager {
|
|
|
108
108
|
}
|
|
109
109
|
async abortExecutionIfExpiredWithLock(executionOrId) {
|
|
110
110
|
const executionId = typeof executionOrId === "object" ? executionOrId.id : executionOrId;
|
|
111
|
-
const
|
|
111
|
+
const lockManager = this.plugin.app.lockManager;
|
|
112
|
+
const lock = await lockManager.tryAcquire((0, import_utils.getExecutionLockKey)(executionId), EXECUTION_LOCK_TIMEOUT);
|
|
112
113
|
return lock.runExclusive(async () => {
|
|
113
114
|
const execution = await this.plugin.db.getRepository("executions").findOne({
|
|
114
115
|
filterByTk: executionId
|
package/dist/server/Plugin.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ export default class PluginWorkflowServer extends Plugin {
|
|
|
74
74
|
*/
|
|
75
75
|
load(): Promise<void>;
|
|
76
76
|
private toggle;
|
|
77
|
-
trigger(workflow: WorkflowModel, context: object, options?: EventOptions): void | Promise<Processor | null>;
|
|
77
|
+
trigger(workflow: WorkflowModel, context: object, options?: EventOptions): void | Promise<Processor | null | void>;
|
|
78
78
|
run(pending: Parameters<Dispatcher['run']>[0]): Promise<void>;
|
|
79
79
|
dispatch(): void;
|
|
80
80
|
resume(job: any): Promise<void>;
|
|
@@ -12,6 +12,7 @@ export declare class WorkflowValidationError extends Error {
|
|
|
12
12
|
errors: Record<string, string>;
|
|
13
13
|
constructor(errors: Record<string, string>);
|
|
14
14
|
}
|
|
15
|
+
export declare function list(context: Context, next: any): Promise<void>;
|
|
15
16
|
export declare function create(context: Context, next: any): Promise<void>;
|
|
16
17
|
export declare function update(context: Context, next: any): Promise<void>;
|
|
17
18
|
export declare function destroy(context: Context, next: any): Promise<void>;
|
|
@@ -40,6 +40,7 @@ __export(workflows_exports, {
|
|
|
40
40
|
create: () => create,
|
|
41
41
|
destroy: () => destroy,
|
|
42
42
|
execute: () => execute,
|
|
43
|
+
list: () => list,
|
|
43
44
|
revision: () => revision,
|
|
44
45
|
sync: () => sync,
|
|
45
46
|
update: () => update
|
|
@@ -72,9 +73,14 @@ function validateWorkflow(context, plugin, { type, config }) {
|
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
75
|
}
|
|
76
|
+
async function list(context, next) {
|
|
77
|
+
return import_actions.default.list(context, next);
|
|
78
|
+
}
|
|
75
79
|
async function create(context, next) {
|
|
76
80
|
const plugin = context.app.pm.get(import_Plugin.default);
|
|
77
|
-
const
|
|
81
|
+
const values = { ...context.action.params.values || {} };
|
|
82
|
+
delete values.invalid;
|
|
83
|
+
context.action.mergeParams({ values }, { values: "overwrite" });
|
|
78
84
|
validateWorkflow(context, plugin, values);
|
|
79
85
|
return import_actions.default.create(context, next);
|
|
80
86
|
}
|
|
@@ -139,10 +145,12 @@ async function destroy(context, next) {
|
|
|
139
145
|
async function revision(context, next) {
|
|
140
146
|
const repository = import_actions.utils.getRepositoryFromParams(context);
|
|
141
147
|
const { filterByTk, filter = {}, values = {} } = context.action.params;
|
|
148
|
+
const revisionValues = { ...values };
|
|
149
|
+
delete revisionValues.invalid;
|
|
142
150
|
context.body = await repository.revision({
|
|
143
151
|
filterByTk,
|
|
144
152
|
filter,
|
|
145
|
-
values,
|
|
153
|
+
values: revisionValues,
|
|
146
154
|
context
|
|
147
155
|
});
|
|
148
156
|
await next();
|
|
@@ -184,6 +192,12 @@ async function execute(context, next) {
|
|
|
184
192
|
let processor;
|
|
185
193
|
try {
|
|
186
194
|
processor = await plugin.execute(workflow, values, { manually: true });
|
|
195
|
+
if (processor === null) {
|
|
196
|
+
context.body = {
|
|
197
|
+
execution: null
|
|
198
|
+
};
|
|
199
|
+
return next();
|
|
200
|
+
}
|
|
187
201
|
if (!processor) {
|
|
188
202
|
return context.throw(400, "workflow not triggered");
|
|
189
203
|
}
|
|
@@ -220,6 +234,7 @@ async function execute(context, next) {
|
|
|
220
234
|
create,
|
|
221
235
|
destroy,
|
|
222
236
|
execute,
|
|
237
|
+
list,
|
|
223
238
|
revision,
|
|
224
239
|
sync,
|
|
225
240
|
update
|
|
@@ -0,0 +1,13 @@
|
|
|
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 { Migration } from '@nocobase/server';
|
|
10
|
+
export default class extends Migration {
|
|
11
|
+
on: string;
|
|
12
|
+
up(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var remove_workflow_validation_exports = {};
|
|
28
|
+
__export(remove_workflow_validation_exports, {
|
|
29
|
+
default: () => remove_workflow_validation_default
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(remove_workflow_validation_exports);
|
|
32
|
+
var import_server = require("@nocobase/server");
|
|
33
|
+
class remove_workflow_validation_default extends import_server.Migration {
|
|
34
|
+
on = "afterSync";
|
|
35
|
+
async up() {
|
|
36
|
+
const { db } = this.context;
|
|
37
|
+
const workflows = db.getCollection("workflows");
|
|
38
|
+
const tableInfo = workflows.getTableNameWithSchema();
|
|
39
|
+
await db.sequelize.transaction(async (transaction) => {
|
|
40
|
+
const tableExists = await this.queryInterface.tableExists(tableInfo, { transaction });
|
|
41
|
+
if (!tableExists) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const describeTable = this.queryInterface.describeTable.bind(this.queryInterface);
|
|
45
|
+
const columns = await describeTable(tableInfo, { transaction });
|
|
46
|
+
if (!columns.validation) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
await this.queryInterface.removeColumn(tableInfo, "validation", { transaction });
|
|
50
|
+
if (db.sequelize.getDialect() === "sqlite") {
|
|
51
|
+
const syncOptions = { hooks: false, transaction };
|
|
52
|
+
await workflows.model.sync(syncOptions);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -30,7 +30,7 @@ export default class CollectionTrigger extends Trigger {
|
|
|
30
30
|
code?: string;
|
|
31
31
|
};
|
|
32
32
|
prepare(workflow: WorkflowModel, data: Model | Record<string, any> | string | number, options: any): Promise<{
|
|
33
|
-
data: any
|
|
33
|
+
data: string | number | Record<string, any> | Model<any, any>;
|
|
34
34
|
}>;
|
|
35
35
|
on(workflow: WorkflowModel): void;
|
|
36
36
|
off(workflow: WorkflowModel): void;
|
|
@@ -305,6 +305,9 @@ class CollectionTrigger extends import__.default {
|
|
|
305
305
|
// }
|
|
306
306
|
async execute(workflow, values, options) {
|
|
307
307
|
const ctx = await this.prepare(workflow, values == null ? void 0 : values.data, options);
|
|
308
|
+
if (!ctx) {
|
|
309
|
+
return null;
|
|
310
|
+
}
|
|
308
311
|
const [dataSourceName] = (0, import_data_source_manager.parseCollectionName)(workflow.config.collection);
|
|
309
312
|
const { transaction } = options;
|
|
310
313
|
return this.workflow.trigger(workflow, ctx, {
|
|
@@ -20,5 +20,5 @@ export default class StaticScheduleTrigger {
|
|
|
20
20
|
trigger(workflow: WorkflowModel, time: number): Promise<void>;
|
|
21
21
|
on(workflow: any): void;
|
|
22
22
|
off(workflow: any): void;
|
|
23
|
-
execute(workflow: any, values: any, options: any): void | Promise<import("../..").Processor>;
|
|
23
|
+
execute(workflow: any, values: any, options: any): void | Promise<void | import("../..").Processor>;
|
|
24
24
|
}
|
|
@@ -26,6 +26,6 @@ export declare abstract class Trigger {
|
|
|
26
26
|
[key: string]: string;
|
|
27
27
|
};
|
|
28
28
|
sync?: boolean;
|
|
29
|
-
execute?(workflow: WorkflowModel, values: any, options: Transactionable): void | Processor | Promise<void | Processor>;
|
|
29
|
+
execute?(workflow: WorkflowModel, values: any, options: Transactionable): void | Processor | null | Promise<void | Processor | null>;
|
|
30
30
|
}
|
|
31
31
|
export default Trigger;
|
package/dist/server/utils.d.ts
CHANGED
|
@@ -32,5 +32,5 @@ export declare function getWorkflowExecutionLogMeta(workflow: WorkflowModel, pro
|
|
|
32
32
|
lastJobStatus: number;
|
|
33
33
|
};
|
|
34
34
|
export declare function abortExecution(plugin: PluginWorkflowServer, execution: ExecutionModel, options?: AbortOptions): Promise<boolean>;
|
|
35
|
-
export declare function toJSON(data:
|
|
35
|
+
export declare function toJSON<T>(data: T): T;
|
|
36
36
|
export {};
|
package/dist/server/utils.js
CHANGED
|
@@ -164,6 +164,16 @@ async function abortExecution(plugin, execution, options = {}) {
|
|
|
164
164
|
throw error;
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
+
function getHiddenFieldNames(model) {
|
|
168
|
+
const { collection } = model.constructor;
|
|
169
|
+
if (!(collection == null ? void 0 : collection.fields)) {
|
|
170
|
+
return [];
|
|
171
|
+
}
|
|
172
|
+
return Array.from(collection.fields.values()).filter((field) => {
|
|
173
|
+
var _a;
|
|
174
|
+
return (_a = field == null ? void 0 : field.options) == null ? void 0 : _a.hidden;
|
|
175
|
+
}).map((field) => field.options.name).filter((name) => typeof name === "string");
|
|
176
|
+
}
|
|
167
177
|
function toJSON(data) {
|
|
168
178
|
if (Array.isArray(data)) {
|
|
169
179
|
return data.map(toJSON);
|
|
@@ -171,7 +181,10 @@ function toJSON(data) {
|
|
|
171
181
|
if (!(data instanceof import_database.Model) || !data) {
|
|
172
182
|
return data;
|
|
173
183
|
}
|
|
174
|
-
const result = data.get();
|
|
184
|
+
const result = { ...data.get() };
|
|
185
|
+
for (const fieldName of getHiddenFieldNames(data)) {
|
|
186
|
+
delete result[fieldName];
|
|
187
|
+
}
|
|
175
188
|
Object.keys(data.constructor.associations).forEach((key) => {
|
|
176
189
|
if (result[key] != null && typeof result[key] === "object") {
|
|
177
190
|
result[key] = toJSON(result[key]);
|
package/dist/swagger/index.d.ts
CHANGED
package/dist/swagger/index.js
CHANGED
|
@@ -394,7 +394,8 @@ var swagger_default = {
|
|
|
394
394
|
"**autoRevision:** When set to `1`, if the workflow has never been executed",
|
|
395
395
|
"(`executed === 0`), a new revision is created automatically after execution.",
|
|
396
396
|
"",
|
|
397
|
-
"**Returns:** `{ execution: { id, status }, newVersionId? }
|
|
397
|
+
"**Returns:** `{ execution: { id, status } | null, newVersionId? }`.",
|
|
398
|
+
"`execution` is `null` when the request is valid but no execution is started."
|
|
398
399
|
].join("\n"),
|
|
399
400
|
parameters: [
|
|
400
401
|
{
|
|
@@ -433,6 +434,7 @@ var swagger_default = {
|
|
|
433
434
|
properties: {
|
|
434
435
|
execution: {
|
|
435
436
|
type: "object",
|
|
437
|
+
nullable: true,
|
|
436
438
|
properties: {
|
|
437
439
|
id: { type: "integer", description: "Execution ID" },
|
|
438
440
|
status: { type: "integer", description: "Execution status code" }
|
|
@@ -449,7 +451,7 @@ var swagger_default = {
|
|
|
449
451
|
}
|
|
450
452
|
},
|
|
451
453
|
400: {
|
|
452
|
-
description: "Bad Request. Request body or `filterByTk` is missing/invalid
|
|
454
|
+
description: "Bad Request. Request body or `filterByTk` is missing/invalid."
|
|
453
455
|
},
|
|
454
456
|
404: { description: "Not Found. Workflow does not exist." }
|
|
455
457
|
}
|
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.
|
|
9
|
+
"version": "2.3.0-alpha.1",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"main": "./dist/server/index.js",
|
|
12
12
|
"homepage": "https://docs.nocobase.com/handbook/workflow",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"@formily/core": "2.x",
|
|
19
19
|
"@formily/react": "2.x",
|
|
20
20
|
"@types/ejs": "^3.1.1",
|
|
21
|
+
"ahooks": "^3.7.2",
|
|
21
22
|
"antd": "5.x",
|
|
22
23
|
"classnames": "^2.3.1",
|
|
23
24
|
"cron-parser": "4.4.0",
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
"peerDependencies": {
|
|
37
38
|
"@nocobase/actions": "2.x",
|
|
38
39
|
"@nocobase/client": "2.x",
|
|
40
|
+
"@nocobase/client-v2": "2.x",
|
|
39
41
|
"@nocobase/database": "2.x",
|
|
40
42
|
"@nocobase/evaluators": "2.x",
|
|
41
43
|
"@nocobase/logger": "2.x",
|
|
@@ -49,7 +51,7 @@
|
|
|
49
51
|
"@nocobase/test": "2.x",
|
|
50
52
|
"@nocobase/utils": "2.x"
|
|
51
53
|
},
|
|
52
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "2377df8ceb12549149017f7f14a61207bf6e49a2",
|
|
53
55
|
"keywords": [
|
|
54
56
|
"Workflow"
|
|
55
57
|
]
|