@nocobase/plugin-workflow 0.17.0-alpha.3 → 0.17.0-alpha.4

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 (118) hide show
  1. package/dist/client/WorkflowPane.d.ts +2 -0
  2. package/dist/client/components/index.d.ts +5 -0
  3. package/dist/client/hooks/useTriggerWorkflowActionProps.d.ts +3 -0
  4. package/dist/client/index.d.ts +14 -6
  5. package/dist/client/index.js +136 -186
  6. package/dist/client/nodes/calculation.d.ts +8 -62
  7. package/dist/client/nodes/condition.d.ts +9 -9
  8. package/dist/client/nodes/create.d.ts +3 -5
  9. package/dist/client/nodes/destroy.d.ts +3 -4
  10. package/dist/client/nodes/index.d.ts +2 -6
  11. package/dist/client/nodes/query.d.ts +3 -5
  12. package/dist/client/nodes/update.d.ts +4 -4
  13. package/dist/client/triggers/collection.d.ts +3 -4
  14. package/dist/client/triggers/index.d.ts +2 -11
  15. package/dist/client/triggers/schedule/index.d.ts +3 -4
  16. package/dist/client/utils.d.ts +1 -0
  17. package/dist/externalVersion.js +11 -13
  18. package/dist/locale/en-US.json +1 -32
  19. package/dist/locale/es-ES.json +1 -32
  20. package/dist/locale/fr-FR.json +1 -32
  21. package/dist/locale/ja-JP.json +0 -5
  22. package/dist/locale/pt-BR.json +1 -32
  23. package/dist/locale/ru-RU.json +0 -5
  24. package/dist/locale/tr-TR.json +0 -5
  25. package/dist/locale/zh-CN.json +42 -114
  26. package/dist/node_modules/cron-parser/package.json +1 -1
  27. package/dist/node_modules/lru-cache/package.json +1 -1
  28. package/dist/server/Plugin.d.ts +12 -2
  29. package/dist/server/Plugin.js +31 -7
  30. package/dist/server/Processor.d.ts +1 -1
  31. package/dist/server/index.d.ts +1 -1
  32. package/dist/server/index.js +2 -0
  33. package/dist/server/instructions/CalculationInstruction.d.ts +15 -0
  34. package/dist/server/instructions/{calculation.js → CalculationInstruction.js} +13 -6
  35. package/dist/server/instructions/ConditionInstruction.d.ts +19 -0
  36. package/dist/server/instructions/{condition.js → ConditionInstruction.js} +11 -7
  37. package/dist/server/instructions/CreateInstruction.d.ts +10 -0
  38. package/dist/server/instructions/{create.js → CreateInstruction.js} +13 -6
  39. package/dist/server/instructions/DestroyInstruction.d.ts +10 -0
  40. package/dist/server/instructions/{destroy.js → DestroyInstruction.js} +13 -6
  41. package/dist/server/instructions/{update.d.ts → QueryInstruction.d.ts} +5 -4
  42. package/dist/server/instructions/{query.js → QueryInstruction.js} +13 -6
  43. package/dist/server/instructions/{aggregate.d.ts → UpdateInstruction.d.ts} +5 -4
  44. package/dist/server/instructions/{update.js → UpdateInstruction.js} +13 -6
  45. package/dist/server/instructions/index.d.ts +10 -14
  46. package/dist/server/instructions/index.js +9 -39
  47. package/dist/server/migrations/20231122143143-split-to-plugins.d.ts +4 -0
  48. package/dist/server/migrations/20231122143143-split-to-plugins.js +87 -0
  49. package/dist/server/triggers/{collection.d.ts → CollectionTrigger.d.ts} +1 -1
  50. package/dist/server/triggers/{collection.js → CollectionTrigger.js} +15 -5
  51. package/dist/server/triggers/{schedule.d.ts → ScheduleTrigger.d.ts} +2 -1
  52. package/dist/server/triggers/{schedule.js → ScheduleTrigger.js} +5 -5
  53. package/dist/server/triggers/index.d.ts +2 -6
  54. package/dist/server/triggers/index.js +1 -21
  55. package/package.json +3 -2
  56. package/dist/client/WorkflowProvider.d.ts +0 -5
  57. package/dist/client/components/Duration.d.ts +0 -5
  58. package/dist/client/components/DynamicExpression.d.ts +0 -6
  59. package/dist/client/components/NullRender.d.ts +0 -1
  60. package/dist/client/interfaces/expression.d.ts +0 -3
  61. package/dist/client/nodes/aggregate.d.ts +0 -196
  62. package/dist/client/nodes/delay.d.ts +0 -35
  63. package/dist/client/nodes/loop.d.ts +0 -33
  64. package/dist/client/nodes/manual/AssigneesSelect.d.ts +0 -6
  65. package/dist/client/nodes/manual/DetailsBlockProvider.d.ts +0 -2
  66. package/dist/client/nodes/manual/FormBlockInitializer.d.ts +0 -2
  67. package/dist/client/nodes/manual/FormBlockProvider.d.ts +0 -2
  68. package/dist/client/nodes/manual/ModeConfig.d.ts +0 -5
  69. package/dist/client/nodes/manual/SchemaConfig.d.ts +0 -49
  70. package/dist/client/nodes/manual/WorkflowTodo.d.ts +0 -5
  71. package/dist/client/nodes/manual/WorkflowTodoBlockInitializer.d.ts +0 -2
  72. package/dist/client/nodes/manual/forms/create.d.ts +0 -3
  73. package/dist/client/nodes/manual/forms/custom.d.ts +0 -5
  74. package/dist/client/nodes/manual/forms/update.d.ts +0 -3
  75. package/dist/client/nodes/manual/index.d.ts +0 -86
  76. package/dist/client/nodes/manual/utils.d.ts +0 -2
  77. package/dist/client/nodes/parallel.d.ts +0 -32
  78. package/dist/client/nodes/request.d.ts +0 -183
  79. package/dist/client/nodes/sql.d.ts +0 -35
  80. package/dist/client/triggers/form.d.ts +0 -52
  81. package/dist/server/fields/expression-field.d.ts +0 -7
  82. package/dist/server/fields/expression-field.js +0 -32
  83. package/dist/server/fields/index.d.ts +0 -1
  84. package/dist/server/fields/index.js +0 -28
  85. package/dist/server/instructions/aggregate.js +0 -54
  86. package/dist/server/instructions/calculation.d.ts +0 -3
  87. package/dist/server/instructions/condition.d.ts +0 -6
  88. package/dist/server/instructions/create.d.ts +0 -8
  89. package/dist/server/instructions/delay.d.ts +0 -15
  90. package/dist/server/instructions/delay.js +0 -104
  91. package/dist/server/instructions/destroy.d.ts +0 -8
  92. package/dist/server/instructions/loop.d.ts +0 -15
  93. package/dist/server/instructions/loop.js +0 -94
  94. package/dist/server/instructions/manual/actions.d.ts +0 -2
  95. package/dist/server/instructions/manual/actions.js +0 -94
  96. package/dist/server/instructions/manual/collecions/jobs.d.ts +0 -19
  97. package/dist/server/instructions/manual/collecions/jobs.js +0 -39
  98. package/dist/server/instructions/manual/collecions/users.d.ts +0 -15
  99. package/dist/server/instructions/manual/collecions/users.js +0 -37
  100. package/dist/server/instructions/manual/collecions/users_jobs.d.ts +0 -3
  101. package/dist/server/instructions/manual/collecions/users_jobs.js +0 -70
  102. package/dist/server/instructions/manual/forms/create.d.ts +0 -5
  103. package/dist/server/instructions/manual/forms/create.js +0 -41
  104. package/dist/server/instructions/manual/forms/index.d.ts +0 -6
  105. package/dist/server/instructions/manual/forms/index.js +0 -38
  106. package/dist/server/instructions/manual/forms/update.d.ts +0 -6
  107. package/dist/server/instructions/manual/forms/update.js +0 -41
  108. package/dist/server/instructions/manual/index.d.ts +0 -29
  109. package/dist/server/instructions/manual/index.js +0 -179
  110. package/dist/server/instructions/parallel.d.ts +0 -12
  111. package/dist/server/instructions/parallel.js +0 -124
  112. package/dist/server/instructions/query.d.ts +0 -9
  113. package/dist/server/instructions/request.d.ts +0 -18
  114. package/dist/server/instructions/request.js +0 -92
  115. package/dist/server/instructions/sql.d.ts +0 -12
  116. package/dist/server/instructions/sql.js +0 -43
  117. package/dist/server/triggers/form.d.ts +0 -11
  118. package/dist/server/triggers/form.js +0 -116
@@ -2,9 +2,9 @@
2
2
  "Workflow": "工作流",
3
3
  "Execution history": "执行历史",
4
4
  "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?": "清空执行记录不会重置执行次数,且执行中的也不会被删除,确定要删除所有执行记录吗?",
5
+ "Clear executions will not reset executed count, and started executions will not be deleted, are you sure you want to delete them all?":
6
+ "清空执行记录不会重置执行次数,且执行中的也不会被删除,确定要删除所有执行记录吗?",
6
7
  "Executed": "已执行",
7
- "Sync": "同步",
8
8
  "Sync enabled status of all workflows from database": "从数据库同步所有工作流的启用状态",
9
9
  "Trigger type": "触发方式",
10
10
  "Status": "状态",
@@ -18,19 +18,15 @@
18
18
  "Loading": "加载中",
19
19
  "Load failed": "加载失败",
20
20
  "Use transaction": "启用事务",
21
- "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.": "工作流中的节点将在同一个事务中运行。任何失败都会导致数据回滚,同时也会回滚相应的执行历史。",
21
+ "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.":
22
+ "工作流中的节点将在同一个事务中运行。任何失败都会导致数据回滚,同时也会回滚相应的执行历史。",
22
23
  "Auto delete history when execution is on end status": "执行结束后自动删除对应状态的历史记录",
23
24
  "Trigger": "触发器",
24
25
  "Trigger variables": "触发器变量",
25
26
  "Trigger data": "触发数据",
26
27
  "Trigger time": "触发时间",
27
28
  "Triggered at": "触发时间",
28
- "Form event": "表单事件",
29
- "Event triggers when submitted a workflow bound form action.": "在提交绑定工作流的表单操作按钮后触发。",
30
- "Form data model": "表单数据模型",
31
- "Use a collection to match form data.": "使用一个数据表来匹配表单数据。",
32
- "Associations to use": "待使用的关系数据",
33
- "User submitted form": "提交表单的用户",
29
+
34
30
  "Bind workflows": "绑定工作流",
35
31
  "Workflow will be triggered after submitting succeeded.": "提交成功后触发工作流。",
36
32
  "Workflow will be triggered after saving succeeded.": "保存成功后触发工作流。",
@@ -42,17 +38,20 @@
42
38
  "Full form data": "完整表单数据",
43
39
  "Select context": "选择上下文",
44
40
  "Collection event": "数据表事件",
45
- "Event will be triggered on collection data row created, updated or deleted.": "当数据表中的数据被新增、更新或删除时触发。",
41
+ "Event will be triggered on collection data row created, updated or deleted.":
42
+ "当数据表中的数据被新增、更新或删除时触发。",
46
43
  "Trigger on": "触发时机",
47
44
  "After record added": "新增数据后",
48
45
  "After record updated": "更新数据后",
49
46
  "After record added or updated": "新增或更新数据后",
50
47
  "After record deleted": "删除数据后",
51
48
  "Changed fields": "发生变动的字段",
52
- "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.": "只有被选中的某个字段发生变动时才会触发。如果不选择,则表示任何字段变动时都会触发。新增或删除数据时,任意字段都被认为发生变动。",
49
+ "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.":
50
+ "只有被选中的某个字段发生变动时才会触发。如果不选择,则表示任何字段变动时都会触发。新增或删除数据时,任意字段都被认为发生变动。",
53
51
  "Only triggers when match conditions": "满足以下条件才触发",
54
52
  "Preload associations": "预加载关联数据",
55
- "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.": "请选中需要在后续节点中被访问的关系字段。超过两层的对多关联可能会导致性能问题,请谨慎使用。",
53
+ "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.":
54
+ "请选中需要在后续节点中被访问的关系字段。超过两层的对多关联可能会导致性能问题,请谨慎使用。",
56
55
  "Schedule event": "定时任务",
57
56
  "Event will be scheduled and triggered base on time conditions.": "基于时间条件进行定时触发的事件。",
58
57
  "Trigger mode": "触发模式",
@@ -85,11 +84,13 @@
85
84
  "Node result": "节点数据",
86
85
  "Variable key of node": "节点变量标识",
87
86
  "Calculator": "运算",
88
- "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. The expression can be static or dynamic one from an expression collections.": "基于计算引擎对一个表达式进行计算,并获得一个值作为结果。表达式中可以使用上游节点里的变量。表达式可以是静态的,也可以是表达式表中的动态表达式。",
87
+ "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. The expression can be static or dynamic one from an expression collections.":
88
+ "基于计算引擎对一个表达式进行计算,并获得一个值作为结果。表达式中可以使用上游节点里的变量。表达式可以是静态的,也可以是表达式表中的动态表达式。",
89
89
  "String operation": "字符串",
90
90
  "System variables": "系统变量",
91
91
  "System time": "系统时间",
92
92
  "Date variables": "日期变量",
93
+
93
94
  "Executed at": "执行于",
94
95
  "Queueing": "队列中",
95
96
  "On going": "进行中",
@@ -101,8 +102,10 @@
101
102
  "Canceled": "已取消",
102
103
  "Rejected": "已拒绝",
103
104
  "Retry needed": "需重试",
105
+
104
106
  "Triggered but still waiting in queue to execute.": "已触发但仍在队列中等待执行。",
105
- "Started and executing, maybe waiting for an async callback (manual, delay etc.).": "已开始执行,可能在等待异步回调(人工、延时等)。",
107
+ "Started and executing, maybe waiting for an async callback (manual, delay etc.).":
108
+ "已开始执行,可能在等待异步回调(人工、延时等)。",
106
109
  "Successfully finished.": "成功完成。",
107
110
  "Failed to satisfy node configurations.": "未满足节点配置造成的失败。",
108
111
  "Some node meets error.": "某个节点出错。",
@@ -110,25 +113,16 @@
110
113
  "Manually canceled whole execution when waiting.": "等待时被手动取消整个执行。",
111
114
  "Rejected from a manual node.": "被人工节点拒绝继续。",
112
115
  "General failed but should do another try.": "执行失败,需重试。",
113
- "Continue the process": "继续流程",
114
- "Terminate the process": "终止流程",
115
- "Save temporarily": "暂存",
116
+
116
117
  "Operations": "操作",
117
- "This node contains branches, deleting will also be preformed to them, are you sure?": "节点包含分支,将同时删除其所有分支下的子节点,确定继续?",
118
+ "This node contains branches, deleting will also be preformed to them, are you sure?":
119
+ "节点包含分支,将同时删除其所有分支下的子节点,确定继续?",
118
120
  "Control": "流程控制",
119
121
  "Collection operations": "数据表操作",
120
122
  "Manual": "人工处理",
121
- "Could be used for manually submitting data, and determine whether to continue or exit. Workflow will generate a todo item for assigned user when it reaches a manual node, and continue processing after user submits the form.": "可用于人工提交数据,并决定是否继续或退出流程。工作流在执行到人工节点时会为被指派的用户生成待办事项,直到用户提交对应表单后继续处理该流程。",
122
- "Values preset in this form will override user submitted ones when continue or reject.": "表单中预设的字段值会在用户提交继续或拒绝时覆盖相应字段的值。",
123
123
  "Extended types": "扩展类型",
124
124
  "Node type": "节点类型",
125
125
  "Calculation": "运算",
126
- "Expression type": "表达式类型",
127
- "Static": "静态",
128
- "Dynamic": "动态",
129
- "Select dynamic expression": "选择动态表达式",
130
- "Select the dynamic expression queried from the upstream node. You need to query it from an expression collection.": "从上游节点中选择查询出来的动态表达式。你需要从动态表达式类型的数据表中查询。",
131
- "Variable datasource": "变量数据源",
132
126
  "Calculation engine": "运算引擎",
133
127
  "Basic": "基础",
134
128
  "Calculation expression": "运算表达式",
@@ -139,110 +133,44 @@
139
133
  "False": "假",
140
134
  "concat": "连接",
141
135
  "Condition": "条件判断",
142
- "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\".": "基于运算结果的真假来决定“继续”或“退出”流程,或者在“是”与“否”的分支上分别继续。",
136
+ "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\".":
137
+ "基于运算结果的真假来决定“继续”或“退出”流程,或者在“是”与“否”的分支上分别继续。",
143
138
  "Mode": "模式",
144
139
  "Continue when \"Yes\"": "“是”则继续",
145
140
  "Branch into \"Yes\" and \"No\"": "“是”和“否”分别继续",
146
141
  "Condition expression": "条件表达式",
147
- "Parallel branch": "分支",
148
- "Run multiple branch processes in parallel.": "并行运行多个分支流程。",
149
- "Add branch": "增加分支",
150
- "All succeeded": "全部成功",
151
- "Any succeeded": "任意成功",
152
- "Any succeeded or failed": "任意成功或失败",
153
- "Continue after all branches succeeded": "全部分支都成功后才能继续",
154
- "Continue after any branch succeeded": "任意分支成功后就继续",
155
- "Continue after any branch succeeded, or exit after any branch failed.": "任意分支成功就继续流程,或者任意分支失败就退出流程。",
156
- "Loop": "循环",
157
- "Loop target": "循环对象",
158
- "Loop index": "当前索引",
159
- "Loop length": "循环长度",
160
- "By using a loop node, you can perform the same operation on multiple sets of data. The source of these sets can be either multiple records from a query node or multiple associated records of a single record. Loop node can also be used for iterating a certain number of times or for looping through each character in a string. However, excessive looping may cause performance issues, so use with caution.": "使用循环节点可以对多条数据进行同样的操作,多条数据的来源可以是查询节点的多条结果,或者一条数据的多条关系数据。也可以用于一定次数的循环,或者对字符串中每一个字符的循环处理。循环次数过高可能引起性能问题,请谨慎使用。",
161
- "Scope variables": "局域变量",
162
- "A single number will be treated as a loop count, a single string will be treated as an array of characters, and other non-array values will be converted to arrays. The loop node ends when the loop count is reached, or when the array loop is completed. You can also add condition nodes to the loop to terminate it.": "单一数字值将被视为循环次数,单一字符串值将被视为字符数组,其他非数组值将被转换为数组。达到循环次数,或者将数组循环完成后,循环节点结束。你也可以在循环中添加条件节点,以终止循环。",
163
- "Delay": "延时",
164
- "Delay a period of time and then continue or exit the process. Can be used to set wait or timeout times in parallel branches.": "延时一段时间,然后继续或退出流程。可以用于并行分支中等待其他分支或设置超时时间。",
165
- "Duration": "时长",
166
- "End Status": "到时状态",
167
- "Select status": "选择状态",
168
- "Succeed and continue": "通过并继续",
169
- "Fail and exit": "失败并退出",
170
- "Assignee": "负责人",
171
- "Assignees": "负责人",
172
- "User interface": "操作界面",
173
- "Configure user interface": "配置界面",
174
- "View user interface": "查看界面",
175
- "Separately": "分别处理",
176
- "Each user has own task": "每个人处理各自的任务",
177
- "Collaboratively": "协作处理",
178
- "Everyone shares one task": "所有人共享同一个任务",
179
- "Negotiation": "协商机制",
180
- "All pass": "全部通过",
181
- "Everyone should pass": "每个人通过才通过",
182
- "Any pass": "任意通过",
183
- "Anyone pass": "任何一人通过即通过",
184
- "Field name existed in form": "表单中已有对应标识的字段",
185
- "Custom form": "自定义表单",
186
- "Data record": "数据记录",
187
- "Create record form": "新增数据表单",
188
- "Update record form": "更新数据表单",
189
- "Filter settings": "筛选设置",
190
142
  "Create record": "新增数据",
191
- "Add new record to a collection. You can use variables from upstream nodes to assign values to fields.": "向一个数据表中添加新的数据。可以使用上游节点里的变量为字段赋值。",
143
+ "Add new record to a collection. You can use variables from upstream nodes to assign values to fields.":
144
+ "向一个数据表中添加新的数据。可以使用上游节点里的变量为字段赋值。",
192
145
  "Update record": "更新数据",
193
- "Update records of a collection. You can use variables from upstream nodes as query conditions and field values.": "更新一个数据表中的数据。可以使用上游节点里的变量作为查询条件和数据值。",
146
+ "Update records of a collection. You can use variables from upstream nodes as query conditions and field values.":
147
+ "更新一个数据表中的数据。可以使用上游节点里的变量作为查询条件和数据值。",
194
148
  "Update mode": "更新模式",
195
149
  "Update in a batch": "批量更新",
196
150
  "Update one by one": "逐条更新",
197
- "Update all eligible data at one time, which has better performance when the amount of data is large. But the updated data will not trigger other workflows, and will not record audit logs.": "一次性更新所有符合条件的数据,在数据量较大时有比较好的性能;但被更新的数据不会触发其他工作流,也不会记录更新日志。",
198
- "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.": "被更新的数据可以再次触发其他工作流,也会记录更新日志;但通常只适用于数条或数十条数据,否则会有性能问题。",
151
+ "Update all eligible data at one time, which has better performance when the amount of data is large. But the updated data will not trigger other workflows, and will not record audit logs.":
152
+ "一次性更新所有符合条件的数据,在数据量较大时有比较好的性能;但被更新的数据不会触发其他工作流,也不会记录更新日志。",
153
+ "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.":
154
+ "被更新的数据可以再次触发其他工作流,也会记录更新日志;但通常只适用于数条或数十条数据,否则会有性能问题。",
199
155
  "Query record": "查询数据",
200
- "Query records from a collection. You can use variables from upstream nodes as query conditions.": "查询一个数据表中的数据。可以使用上游节点里的变量作为查询条件。",
156
+ "Query records from a collection. You can use variables from upstream nodes as query conditions.":
157
+ "查询一个数据表中的数据。可以使用上游节点里的变量作为查询条件。",
201
158
  "Allow multiple records as result": "允许结果是多条数据",
202
- "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.": "选中后,当查询结果有多条记录时,会返回数组作为结果,可以使用循环节点对它逐条操作;否则,仅返回一条数据。",
159
+ "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.":
160
+ "选中后,当查询结果有多条记录时,会返回数组作为结果,可以使用循环节点对它逐条操作;否则,仅返回一条数据。",
203
161
  "Exit when query result is null": "查询结果为空时,退出流程",
204
162
  "Please select collection first": "请先选择数据表",
205
163
  "Only update records matching conditions": "只更新满足条件的数据",
206
164
  "Please add at least one condition": "请添加至少一个条件",
207
- "Unassigned fields will be set to default values, and those without default values will be set to null.": "未被赋值的字段将被设置为默认值,没有默认值的设置为空值。",
165
+ "Unassigned fields will be set to default values, and those without default values will be set to null.":
166
+ "未被赋值的字段将被设置为默认值,没有默认值的设置为空值。",
167
+
208
168
  "Delete record": "删除数据",
209
- "Delete records of a collection. Could use variables in workflow context as filter. All records match the filter will be deleted.": "删除一个数据表中的数据。可以使用上游节点里的变量作为过滤条件。所有满足条件的数据都将被删除。",
210
- "Aggregate": "聚合查询",
211
- "Counting, summing, finding maximum, minimum, and average values for multiple records of a collection or associated data of a record.": "对一个数据表里的多条数据或者一条数据里的关系数据进行统计、求和、求最大值、最小值、平均值。",
212
- "Aggregator function": "聚合函数",
213
- "Target type": "目标类型",
214
- "Data of collection": "数据表数据",
215
- "Data of associated collection": "关联数据表数据",
216
- "Field to aggregate": "聚合字段",
217
- "Distinct": "去重",
218
- "Query result": "查询结果",
169
+ "Delete records of a collection. Could use variables in workflow context as filter. All records match the filter will be deleted.":
170
+ "删除一个数据表中的数据。可以使用上游节点里的变量作为过滤条件。所有满足条件的数据都将被删除。",
171
+
219
172
  "Executed workflow cannot be modified": "已经执行过的工作流不能被修改",
220
173
  "Can not delete": "无法删除",
221
- "The result of this node has been referenced by other nodes ({{nodes}}), please remove the usage before deleting.": "该节点的执行结果已被其他节点({{nodes}})引用,删除前请先移除引用。",
222
- "HTTP request": "HTTP 请求",
223
- "Send HTTP request to a URL. You can use the variables in the upstream nodes as request headers, parameters and request body.": "向指定 URL 发送 HTTP 请求。可以使用上游节点里的变量作为请求头、参数和请求体。",
224
- "HTTP method": "HTTP 方法",
225
- "URL": "地址",
226
- "Headers": "请求头",
227
- "Add request header": "添加请求头",
228
- "Parameters": "参数",
229
- "Add parameter": "添加参数",
230
- "Body": "请求体",
231
- "Use variable": "使用变量",
232
- "Format": "格式化",
233
- "Insert": "插入",
234
- "Timeout config": "超时设置",
235
- "ms": "毫秒",
236
- "Input request data": "输入请求数据",
237
- "Only support standard JSON data": "仅支持标准 JSON 数据",
238
- "\"Content-Type\" only support \"application/json\", and no need to specify": "\"Content-Type\" 请求头仅支持 \"application/json\",无需填写",
239
- "Ignore failed request and continue workflow": "忽略失败的请求并继续工作流",
240
- "Workflow todos": "工作流待办",
241
- "Task": "任务",
242
- "Dynamic expression": "动态表达式",
243
- "An expression for calculation in each rows": "每行数据计算规则不同时使用",
244
- "Unconfigured": "未配置",
245
- "SQL action": "SQL 操作",
246
- "Execute a SQL statement in database": "在数据库中执行一个 SQL 语句",
247
- "Usage of SQL query result is not supported yet.": "SQL 执行的结果暂不支持使用。"
174
+ "The result of this node has been referenced by other nodes ({{nodes}}), please remove the usage before deleting.":
175
+ "该节点的执行结果已被其他节点({{nodes}})引用,删除前请先移除引用。"
248
176
  }
@@ -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":"2023-12-06T09:29:05.471Z"}
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":"2023-12-12T06:32:41.891Z"}
@@ -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":"2023-12-06T09:29:05.191Z"}
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":"2023-12-12T06:32:41.574Z"}
@@ -3,8 +3,8 @@ import { Registry } from '@nocobase/utils';
3
3
  import { Logger } from '@nocobase/logger';
4
4
  import Processor from './Processor';
5
5
  import { CustomFunction } from './functions';
6
- import { Instruction } from './instructions';
7
- import { Trigger } from './triggers';
6
+ import type Trigger from './triggers';
7
+ import type Instruction from './instructions';
8
8
  import type { ExecutionModel, WorkflowModel } from './types';
9
9
  type ID = number | string;
10
10
  export default class WorkflowPlugin extends Plugin {
@@ -18,6 +18,16 @@ export default class WorkflowPlugin extends Plugin {
18
18
  private loggerCache;
19
19
  getLogger(workflowId: ID): Logger;
20
20
  onBeforeSave: (instance: WorkflowModel, options: any) => Promise<void>;
21
+ initTriggers<T extends Trigger>(more?: {
22
+ [key: string]: T | {
23
+ new (p: Plugin): T;
24
+ };
25
+ }): void;
26
+ initInstructions<T extends Instruction>(more?: {
27
+ [key: string]: T | {
28
+ new (p: Plugin): T;
29
+ };
30
+ }): void;
21
31
  load(): Promise<void>;
22
32
  toggle(workflow: WorkflowModel, enable?: boolean): void;
23
33
  trigger(workflow: WorkflowModel, context: object, options?: {
@@ -40,10 +40,15 @@ var import_logger = require("@nocobase/logger");
40
40
  var import_Processor = __toESM(require("./Processor"));
41
41
  var import_actions = __toESM(require("./actions"));
42
42
  var import_constants = require("./constants");
43
- var import_fields = __toESM(require("./fields"));
44
43
  var import_functions = __toESM(require("./functions"));
45
- var import_instructions = __toESM(require("./instructions"));
46
- var import_triggers = __toESM(require("./triggers"));
44
+ var import_CollectionTrigger = __toESM(require("./triggers/CollectionTrigger"));
45
+ var import_ScheduleTrigger = __toESM(require("./triggers/ScheduleTrigger"));
46
+ var import_CalculationInstruction = __toESM(require("./instructions/CalculationInstruction"));
47
+ var import_ConditionInstruction = __toESM(require("./instructions/ConditionInstruction"));
48
+ var import_CreateInstruction = __toESM(require("./instructions/CreateInstruction"));
49
+ var import_DestroyInstruction = __toESM(require("./instructions/DestroyInstruction"));
50
+ var import_QueryInstruction = __toESM(require("./instructions/QueryInstruction"));
51
+ var import_UpdateInstruction = __toESM(require("./instructions/UpdateInstruction"));
47
52
  class WorkflowPlugin extends import_server.Plugin {
48
53
  instructions = new import_utils.Registry();
49
54
  triggers = new import_utils.Registry();
@@ -62,7 +67,7 @@ class WorkflowPlugin extends import_server.Plugin {
62
67
  }
63
68
  const logger = (0, import_logger.createLogger)({
64
69
  transports: [
65
- "console",
70
+ ...process.env.NODE_ENV !== "production" ? ["console"] : [],
66
71
  new import_winston.default.transports.File({
67
72
  filename: (0, import_logger.getLoggerFilePath)("workflows", date, `${workflowId}.log`),
68
73
  level: (0, import_logger.getLoggerLevel)()
@@ -111,12 +116,31 @@ class WorkflowPlugin extends import_server.Plugin {
111
116
  this.toggle(previous, false);
112
117
  }
113
118
  };
119
+ initTriggers(more = {}) {
120
+ const { triggers } = this;
121
+ triggers.register("collection", new import_CollectionTrigger.default(this));
122
+ triggers.register("schedule", new import_ScheduleTrigger.default(this));
123
+ for (const [name, trigger] of Object.entries(more)) {
124
+ triggers.register(name, typeof trigger === "function" ? new trigger(this) : trigger);
125
+ }
126
+ }
127
+ initInstructions(more = {}) {
128
+ const { instructions } = this;
129
+ instructions.register("calculation", new import_CalculationInstruction.default(this));
130
+ instructions.register("condition", new import_ConditionInstruction.default(this));
131
+ instructions.register("create", new import_CreateInstruction.default(this));
132
+ instructions.register("destroy", new import_DestroyInstruction.default(this));
133
+ instructions.register("query", new import_QueryInstruction.default(this));
134
+ instructions.register("update", new import_UpdateInstruction.default(this));
135
+ for (const [name, instruction] of Object.entries({ ...more })) {
136
+ instructions.register(name, typeof instruction === "function" ? new instruction(this) : instruction);
137
+ }
138
+ }
114
139
  async load() {
115
140
  const { db, options } = this;
116
- (0, import_fields.default)(this);
117
141
  (0, import_actions.default)(this);
118
- (0, import_triggers.default)(this, options.triggers);
119
- (0, import_instructions.default)(this, options.instructions);
142
+ this.initTriggers(options.triggers);
143
+ this.initInstructions(options.instructions);
120
144
  (0, import_functions.default)(this, options.functions);
121
145
  this.loggerCache = new import_lru_cache.default({
122
146
  max: 20,
@@ -1,6 +1,6 @@
1
1
  import { Transaction, Transactionable } from '@nocobase/database';
2
2
  import { Logger } from '@nocobase/logger';
3
- import Plugin from '.';
3
+ import type Plugin from './Plugin';
4
4
  import type { ExecutionModel, FlowNodeModel, JobModel } from './types';
5
5
  export interface ProcessorOptions extends Transactionable {
6
6
  plugin: Plugin;
@@ -1,6 +1,6 @@
1
1
  export * from './utils';
2
2
  export * from './constants';
3
- export type * from './instructions';
3
+ export * from './instructions';
4
4
  export { Trigger } from './triggers';
5
5
  export { default as Processor } from './Processor';
6
6
  export { default } from './Plugin';
@@ -35,6 +35,7 @@ __export(server_exports, {
35
35
  module.exports = __toCommonJS(server_exports);
36
36
  __reExport(server_exports, require("./utils"), module.exports);
37
37
  __reExport(server_exports, require("./constants"), module.exports);
38
+ __reExport(server_exports, require("./instructions"), module.exports);
38
39
  var import_triggers = require("./triggers");
39
40
  var import_Processor = __toESM(require("./Processor"));
40
41
  var import_Plugin = __toESM(require("./Plugin"));
@@ -45,5 +46,6 @@ __reExport(server_exports, require("./types"), module.exports);
45
46
  Trigger,
46
47
  ...require("./utils"),
47
48
  ...require("./constants"),
49
+ ...require("./instructions"),
48
50
  ...require("./types")
49
51
  });
@@ -0,0 +1,15 @@
1
+ import { Instruction } from '.';
2
+ import type Processor from '../Processor';
3
+ import type { FlowNodeModel } from '../types';
4
+ export interface CalculationConfig {
5
+ dynamic?: boolean | string;
6
+ engine?: string;
7
+ expression?: string;
8
+ }
9
+ export declare class CalculationInstruction extends Instruction {
10
+ run(node: FlowNodeModel, prevJob: any, processor: Processor): Promise<{
11
+ result: any;
12
+ status: number;
13
+ }>;
14
+ }
15
+ export default CalculationInstruction;
@@ -15,15 +15,17 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var calculation_exports = {};
19
- __export(calculation_exports, {
20
- default: () => calculation_default
18
+ var CalculationInstruction_exports = {};
19
+ __export(CalculationInstruction_exports, {
20
+ CalculationInstruction: () => CalculationInstruction,
21
+ default: () => CalculationInstruction_default
21
22
  });
22
- module.exports = __toCommonJS(calculation_exports);
23
+ module.exports = __toCommonJS(CalculationInstruction_exports);
23
24
  var import_evaluators = require("@nocobase/evaluators");
24
25
  var import_utils = require("@nocobase/utils");
26
+ var import__ = require(".");
25
27
  var import_constants = require("../constants");
26
- var calculation_default = {
28
+ class CalculationInstruction extends import__.Instruction {
27
29
  async run(node, prevJob, processor) {
28
30
  const { dynamic = false } = node.config || {};
29
31
  let { engine = "math.js", expression = "" } = node.config;
@@ -48,4 +50,9 @@ var calculation_default = {
48
50
  };
49
51
  }
50
52
  }
51
- };
53
+ }
54
+ var CalculationInstruction_default = CalculationInstruction;
55
+ // Annotate the CommonJS export names for ESM import in node:
56
+ 0 && (module.exports = {
57
+ CalculationInstruction
58
+ });
@@ -0,0 +1,19 @@
1
+ import { Registry } from '@nocobase/utils';
2
+ import { Instruction } from '.';
3
+ import type Processor from '../Processor';
4
+ import type { FlowNodeModel, JobModel } from '../types';
5
+ type Comparer = (a: any, b: any) => boolean;
6
+ export declare const calculators: Registry<Comparer>;
7
+ export declare class ConditionInstruction extends Instruction {
8
+ run(node: FlowNodeModel, prevJob: any, processor: Processor): Promise<{
9
+ status: number;
10
+ result: boolean;
11
+ nodeId: number;
12
+ upstreamId: any;
13
+ } | {
14
+ result: any;
15
+ status: number;
16
+ }>;
17
+ resume(node: FlowNodeModel, branchJob: JobModel, processor: Processor): Promise<any>;
18
+ }
19
+ export default ConditionInstruction;
@@ -15,14 +15,16 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var condition_exports = {};
19
- __export(condition_exports, {
18
+ var ConditionInstruction_exports = {};
19
+ __export(ConditionInstruction_exports, {
20
+ ConditionInstruction: () => ConditionInstruction,
20
21
  calculators: () => calculators,
21
- default: () => condition_default
22
+ default: () => ConditionInstruction_default
22
23
  });
23
- module.exports = __toCommonJS(condition_exports);
24
+ module.exports = __toCommonJS(ConditionInstruction_exports);
24
25
  var import_evaluators = require("@nocobase/evaluators");
25
26
  var import_utils = require("@nocobase/utils");
27
+ var import__ = require(".");
26
28
  var import_constants = require("../constants");
27
29
  const calculators = new import_utils.Registry();
28
30
  function equal(a, b) {
@@ -96,7 +98,7 @@ function logicCalculate(calculation) {
96
98
  }
97
99
  return calculate(calculation);
98
100
  }
99
- var condition_default = {
101
+ class ConditionInstruction extends import__.Instruction {
100
102
  async run(node, prevJob, processor) {
101
103
  const { engine, calculation, expression, rejectOnFalse } = node.config || {};
102
104
  const evaluator = import_evaluators.evaluators.get(engine);
@@ -131,7 +133,7 @@ var condition_default = {
131
133
  const savedJob = await processor.saveJob(job);
132
134
  await processor.run(branchNode, savedJob);
133
135
  return null;
134
- },
136
+ }
135
137
  async resume(node, branchJob, processor) {
136
138
  const job = processor.findBranchParentJob(branchJob, node);
137
139
  if (branchJob.status === import_constants.JOB_STATUS.RESOLVED) {
@@ -139,8 +141,10 @@ var condition_default = {
139
141
  }
140
142
  return processor.exit(branchJob.status);
141
143
  }
142
- };
144
+ }
145
+ var ConditionInstruction_default = ConditionInstruction;
143
146
  // Annotate the CommonJS export names for ESM import in node:
144
147
  0 && (module.exports = {
148
+ ConditionInstruction,
145
149
  calculators
146
150
  });
@@ -0,0 +1,10 @@
1
+ import type Processor from '../Processor';
2
+ import type { FlowNodeModel } from '../types';
3
+ import { Instruction } from '.';
4
+ export declare class CreateInstruction extends Instruction {
5
+ run(node: FlowNodeModel, input: any, processor: Processor): Promise<{
6
+ result: object;
7
+ status: number;
8
+ }>;
9
+ }
10
+ export default CreateInstruction;
@@ -15,14 +15,16 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var create_exports = {};
19
- __export(create_exports, {
20
- default: () => create_default
18
+ var CreateInstruction_exports = {};
19
+ __export(CreateInstruction_exports, {
20
+ CreateInstruction: () => CreateInstruction,
21
+ default: () => CreateInstruction_default
21
22
  });
22
- module.exports = __toCommonJS(create_exports);
23
+ module.exports = __toCommonJS(CreateInstruction_exports);
23
24
  var import_constants = require("../constants");
24
25
  var import_utils = require("../utils");
25
- var create_default = {
26
+ var import__ = require(".");
27
+ class CreateInstruction extends import__.Instruction {
26
28
  async run(node, input, processor) {
27
29
  const { collection, params: { appends = [], ...params } = {} } = node.config;
28
30
  const { repository, model } = node.constructor.database.getCollection(collection);
@@ -53,4 +55,9 @@ var create_default = {
53
55
  status: import_constants.JOB_STATUS.RESOLVED
54
56
  };
55
57
  }
56
- };
58
+ }
59
+ var CreateInstruction_default = CreateInstruction;
60
+ // Annotate the CommonJS export names for ESM import in node:
61
+ 0 && (module.exports = {
62
+ CreateInstruction
63
+ });
@@ -0,0 +1,10 @@
1
+ import { Instruction } from '.';
2
+ import type Processor from '../Processor';
3
+ import type { FlowNodeModel } from '../types';
4
+ export declare class DestroyInstruction extends Instruction {
5
+ run(node: FlowNodeModel, input: any, processor: Processor): Promise<{
6
+ result: any;
7
+ status: number;
8
+ }>;
9
+ }
10
+ export default DestroyInstruction;
@@ -15,13 +15,15 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var destroy_exports = {};
19
- __export(destroy_exports, {
20
- default: () => destroy_default
18
+ var DestroyInstruction_exports = {};
19
+ __export(DestroyInstruction_exports, {
20
+ DestroyInstruction: () => DestroyInstruction,
21
+ default: () => DestroyInstruction_default
21
22
  });
22
- module.exports = __toCommonJS(destroy_exports);
23
+ module.exports = __toCommonJS(DestroyInstruction_exports);
24
+ var import__ = require(".");
23
25
  var import_constants = require("../constants");
24
- var destroy_default = {
26
+ class DestroyInstruction extends import__.Instruction {
25
27
  async run(node, input, processor) {
26
28
  const { collection, params = {} } = node.config;
27
29
  const repo = node.constructor.database.getRepository(collection);
@@ -38,4 +40,9 @@ var destroy_default = {
38
40
  status: import_constants.JOB_STATUS.RESOLVED
39
41
  };
40
42
  }
41
- };
43
+ }
44
+ var DestroyInstruction_default = DestroyInstruction;
45
+ // Annotate the CommonJS export names for ESM import in node:
46
+ 0 && (module.exports = {
47
+ DestroyInstruction
48
+ });