@nocobase/plugin-workflow 2.2.0-beta.1 → 2.2.0-beta.3

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 (42) hide show
  1. package/dist/client/618.c91be3f6e4d73501.js +10 -0
  2. package/dist/client/{67.452743ce8ec30617.js → 67.61e70b8b777f8638.js} +1 -1
  3. package/dist/client/Branch.d.ts +1 -1
  4. package/dist/client/index.js +1 -1
  5. package/dist/client/style.d.ts +1 -0
  6. package/dist/client/triggers/collection.d.ts +29 -2
  7. package/dist/externalVersion.js +13 -12
  8. package/dist/locale/de-DE.json +1 -0
  9. package/dist/locale/en-US.json +4 -0
  10. package/dist/locale/es-ES.json +1 -0
  11. package/dist/locale/fr-FR.json +1 -0
  12. package/dist/locale/hu-HU.json +1 -0
  13. package/dist/locale/id-ID.json +1 -0
  14. package/dist/locale/it-IT.json +1 -0
  15. package/dist/locale/ja-JP.json +1 -0
  16. package/dist/locale/ko-KR.json +1 -0
  17. package/dist/locale/nl-NL.json +1 -0
  18. package/dist/locale/pt-BR.json +1 -0
  19. package/dist/locale/ru-RU.json +1 -0
  20. package/dist/locale/tr-TR.json +1 -0
  21. package/dist/locale/uk-UA.json +1 -0
  22. package/dist/locale/vi-VN.json +1 -0
  23. package/dist/locale/zh-CN.json +4 -0
  24. package/dist/locale/zh-TW.json +1 -0
  25. package/dist/node_modules/cron-parser/package.json +1 -1
  26. package/dist/node_modules/joi/package.json +1 -1
  27. package/dist/node_modules/lru-cache/package.json +1 -1
  28. package/dist/node_modules/nodejs-snowflake/package.json +1 -1
  29. package/dist/server/ExecutionTimeoutManager.js +2 -2
  30. package/dist/server/Processor.d.ts +16 -0
  31. package/dist/server/Processor.js +112 -0
  32. package/dist/server/actions/nodes.js +36 -1
  33. package/dist/server/index.d.ts +1 -1
  34. package/dist/server/instructions/CreateInstruction.js +6 -2
  35. package/dist/server/instructions/DestroyInstruction.js +2 -1
  36. package/dist/server/instructions/QueryInstruction.js +2 -1
  37. package/dist/server/instructions/UpdateInstruction.js +2 -1
  38. package/dist/server/triggers/CollectionTrigger.d.ts +5 -0
  39. package/dist/server/triggers/CollectionTrigger.js +26 -1
  40. package/dist/server/utils.js +19 -26
  41. package/package.json +2 -2
  42. package/dist/client/618.19af7f84261c815d.js +0 -10
@@ -11,6 +11,7 @@ declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<
11
11
  dropdownClass: import("antd-style").SerializedStyles;
12
12
  workflowVersionDropdownClass: import("antd-style").SerializedStyles;
13
13
  executionsDropdownRowClass: import("antd-style").SerializedStyles;
14
+ workflowDetailsDescriptionClass: import("antd-style").SerializedStyles;
14
15
  branchBlockClass: import("antd-style").SerializedStyles;
15
16
  branchClass: import("antd-style").SerializedStyles;
16
17
  nodeBlockClass: import("antd-style").SerializedStyles;
@@ -6,7 +6,7 @@
6
6
  * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
- /// <reference types="react" />
9
+ import React from 'react';
10
10
  import { SchemaInitializerItemType, useCollectionDataSource } from '@nocobase/client';
11
11
  import { useWorkflowAnyExecuted } from '../hooks';
12
12
  import { Trigger } from '.';
@@ -28,6 +28,15 @@ export default class extends Trigger {
28
28
  'x-decorator': string;
29
29
  'x-component': string;
30
30
  };
31
+ rollbackOnFailure: {
32
+ type: string;
33
+ 'x-content': string;
34
+ description: string;
35
+ 'x-decorator': string;
36
+ 'x-component': string;
37
+ default: boolean;
38
+ 'x-reactions': string[];
39
+ };
31
40
  };
32
41
  fieldset: {
33
42
  collection: {
@@ -125,13 +134,31 @@ export default class extends Trigger {
125
134
  useCollection(): any;
126
135
  };
127
136
  };
137
+ syncTransactionNotice: {
138
+ type: string;
139
+ 'x-component': string;
140
+ };
141
+ rollbackOnFailure: {
142
+ type: string;
143
+ 'x-content': string;
144
+ description: string;
145
+ 'x-decorator': string;
146
+ 'x-component': string;
147
+ default: boolean;
148
+ 'x-reactions': string[];
149
+ };
128
150
  };
129
151
  scope: {
130
152
  useCollectionDataSource: typeof useCollectionDataSource;
153
+ useSyncModeVisibleReaction: (field: any) => void;
131
154
  useWorkflowAnyExecuted: typeof useWorkflowAnyExecuted;
132
155
  };
133
156
  components: {
134
- FieldsSelect: import("react").MemoExoticComponent<import("@formily/reactive-react").ReactFC<Omit<any, "ref">>>;
157
+ Alert: React.ForwardRefExoticComponent<import("antd").AlertProps & React.RefAttributes<import("antd/es/alert/Alert").AlertRef>> & {
158
+ ErrorBoundary: typeof import("antd/es/alert/ErrorBoundary").default;
159
+ };
160
+ FieldsSelect: React.MemoExoticComponent<import("@formily/react").ReactFC<Omit<any, "ref">>>;
161
+ SyncTransactionNotice: React.MemoExoticComponent<import("@formily/react").ReactFC<unknown>>;
135
162
  TriggerCollectionRecordSelect: typeof TriggerCollectionRecordSelect;
136
163
  };
137
164
  triggerFieldset: {
@@ -11,8 +11,8 @@ module.exports = {
11
11
  "react": "18.2.0",
12
12
  "@formily/core": "2.3.7",
13
13
  "@formily/react": "2.3.7",
14
- "@nocobase/client": "2.2.0-beta.1",
15
- "@nocobase/utils": "2.2.0-beta.1",
14
+ "@nocobase/client": "2.2.0-beta.3",
15
+ "@nocobase/utils": "2.2.0-beta.3",
16
16
  "antd": "5.24.2",
17
17
  "@ant-design/icons": "5.6.1",
18
18
  "react-router-dom": "6.30.1",
@@ -20,20 +20,21 @@ module.exports = {
20
20
  "lodash": "4.18.1",
21
21
  "@dnd-kit/core": "6.1.0",
22
22
  "@formily/shared": "2.3.7",
23
- "@nocobase/flow-engine": "2.2.0-beta.1",
24
- "@nocobase/plugin-mobile": "2.2.0-beta.1",
23
+ "@nocobase/flow-engine": "2.2.0-beta.3",
24
+ "@nocobase/plugin-mobile": "2.2.0-beta.3",
25
25
  "sequelize": "6.35.2",
26
- "@nocobase/server": "2.2.0-beta.1",
27
- "@nocobase/database": "2.2.0-beta.1",
28
- "@nocobase/data-source-manager": "2.2.0-beta.1",
29
- "@nocobase/logger": "2.2.0-beta.1",
30
- "@nocobase/evaluators": "2.2.0-beta.1",
26
+ "@nocobase/server": "2.2.0-beta.3",
27
+ "@nocobase/database": "2.2.0-beta.3",
28
+ "@nocobase/data-source-manager": "2.2.0-beta.3",
29
+ "@nocobase/logger": "2.2.0-beta.3",
30
+ "@nocobase/evaluators": "2.2.0-beta.3",
31
31
  "@formily/antd-v5": "1.2.3",
32
32
  "@formily/reactive": "2.3.7",
33
33
  "@emotion/css": "11.13.0",
34
34
  "@formily/json-schema": "2.3.7",
35
- "@nocobase/actions": "2.2.0-beta.1",
35
+ "@formily/reactive-react": "2.3.7",
36
+ "@nocobase/actions": "2.2.0-beta.3",
36
37
  "dayjs": "1.11.13",
37
- "@nocobase/plugin-workflow-test": "2.2.0-beta.1",
38
- "@nocobase/test": "2.2.0-beta.1"
38
+ "@nocobase/plugin-workflow-test": "2.2.0-beta.3",
39
+ "@nocobase/test": "2.2.0-beta.3"
39
40
  };
@@ -202,6 +202,7 @@
202
202
  "Syntax references: ": "Syntaxreferenzen: ",
203
203
  "System time": "Systemzeit",
204
204
  "System variables": "Systemvariablen",
205
+ "System process failed, please contact administrator.": "Systemprozess fehlgeschlagen, bitte Administrator kontaktieren.",
205
206
  "Task type {{type}} is invalid": "Task type {{type}} is invalid",
206
207
  "Test run": "Testlauf",
207
208
  "Test run will do the actual data manipulating or API calling, please use with caution.": "Testlauf führt tatsächliche Datenmanipulationen oder API-Aufrufe durch, bitte mit Vorsicht verwenden.",
@@ -208,6 +208,10 @@
208
208
  "Support pre-action event (local mode), post-action event (local mode), and approval event here.": "Support pre-action event (local mode), post-action event (local mode), and approval event here.",
209
209
  "Sync": "Sync",
210
210
  "Sync enabled status of all workflows from database": "Sync enabled status of all workflows from database",
211
+ "Synchronous collection event workflows run within the trigger transaction by default. Related data operations automatically use this transaction.": "Synchronous collection event workflows run within the trigger transaction by default. Related data operations automatically use this transaction.",
212
+ "Rollback when workflow execution fails": "Rollback when workflow execution fails",
213
+ "Only available in synchronous mode. When enabled, if the workflow execution ends with a failed status, the data operation that triggered it will fail and be rolled back.": "Only available in synchronous mode. When enabled, if the workflow execution ends with a failed status, the data operation that triggered it will fail and be rolled back.",
214
+ "System process failed, please contact administrator.": "System process failed, please contact administrator.",
211
215
  "Synchronously": "Synchronously",
212
216
  "Syntax references: ": "Syntax references: ",
213
217
  "System time": "System time",
@@ -202,6 +202,7 @@
202
202
  "Syntax references: ": "Syntax references: ",
203
203
  "System time": "System time",
204
204
  "System variables": "System variables",
205
+ "System process failed, please contact administrator.": "El proceso del sistema falló, contacte al administrador.",
205
206
  "Task type {{type}} is invalid": "Task type {{type}} is invalid",
206
207
  "Test run": "Test run",
207
208
  "Test run will do the actual data manipulating or API calling, please use with caution.": "Test run will do the actual data manipulating or API calling, please use with caution.",
@@ -202,6 +202,7 @@
202
202
  "Syntax references: ": "Syntax references: ",
203
203
  "System time": "System time",
204
204
  "System variables": "System variables",
205
+ "System process failed, please contact administrator.": "Le processus système a échoué, veuillez contacter l'administrateur.",
205
206
  "Task type {{type}} is invalid": "Task type {{type}} is invalid",
206
207
  "Test run": "Test run",
207
208
  "Test run will do the actual data manipulating or API calling, please use with caution.": "Test run will do the actual data manipulating or API calling, please use with caution.",
@@ -202,6 +202,7 @@
202
202
  "Syntax references: ": "Szintaxis referenciák: ",
203
203
  "System time": "Rendszeridő",
204
204
  "System variables": "Rendszerváltozók",
205
+ "System process failed, please contact administrator.": "A rendszerfolyamat sikertelen, forduljon az adminisztrátorhoz.",
205
206
  "Task type {{type}} is invalid": "Task type {{type}} is invalid",
206
207
  "Test run": "Teszt futtatás",
207
208
  "Test run will do the actual data manipulating or API calling, please use with caution.": "A teszt futtatás tényleges adatmanipulációt vagy API-hívást hajt végre, kérjük, használja óvatosan.",
@@ -202,6 +202,7 @@
202
202
  "Syntax references: ": "Referensi sintaks: ",
203
203
  "System time": "Waktu sistem",
204
204
  "System variables": "Variabel sistem",
205
+ "System process failed, please contact administrator.": "Proses sistem gagal, hubungi administrator.",
205
206
  "Task type {{type}} is invalid": "Task type {{type}} is invalid",
206
207
  "Test run": "Jalankan uji",
207
208
  "Test run will do the actual data manipulating or API calling, please use with caution.": "Jalankan uji akan melakukan manipulasi data atau panggilan API yang sebenarnya, harap gunakan dengan hati-hati.",
@@ -202,6 +202,7 @@
202
202
  "Syntax references: ": "Riferimenti di sintassi:",
203
203
  "System time": "Ora di sistema",
204
204
  "System variables": "Variabili di sistema",
205
+ "System process failed, please contact administrator.": "Processo di sistema non riuscito, contattare l'amministratore.",
205
206
  "Task type {{type}} is invalid": "Task type {{type}} is invalid",
206
207
  "Test run": "Test run",
207
208
  "Test run will do the actual data manipulating or API calling, please use with caution.": "Il test run farà l'effettiva manipolazione dei dati o la chiamata API, si prega di usare con cautela.",
@@ -203,6 +203,7 @@
203
203
  "Syntax references: ": "文法リファレンス:",
204
204
  "System time": "システム時間",
205
205
  "System variables": "システム変数",
206
+ "System process failed, please contact administrator.": "システム処理に失敗しました。管理者にお問い合わせください。",
206
207
  "Task type {{type}} is invalid": "Task type {{type}} is invalid",
207
208
  "Test run": "テスト実行",
208
209
  "Test run will do the actual data manipulating or API calling, please use with caution.": "テスト実行では実際のデータ操作やAPI呼び出しが行われます。十分ご注意の上ご利用ください。",
@@ -217,6 +217,7 @@
217
217
  "Syntax references: ": "문법 참조: ",
218
218
  "System time": "시스템 시간",
219
219
  "System variables": "시스템 변수",
220
+ "System process failed, please contact administrator.": "시스템 처리에 실패했습니다. 관리자에게 문의하세요.",
220
221
  "Task type {{type}} is invalid": "Task type {{type}} is invalid",
221
222
  "Test run": "테스트 실행",
222
223
  "Test run will do the actual data manipulating or API calling, please use with caution.": "테스트 실행은 실제 데이터 조작 또는 API 호출을 수행하므로 주의해서 사용하세요.",
@@ -202,6 +202,7 @@
202
202
  "Syntax references: ": "Syntax references: ",
203
203
  "System time": "System time",
204
204
  "System variables": "System variables",
205
+ "System process failed, please contact administrator.": "Systeemproces mislukt, neem contact op met administrator.",
205
206
  "Task type {{type}} is invalid": "Task type {{type}} is invalid",
206
207
  "Test run": "Test run",
207
208
  "Test run will do the actual data manipulating or API calling, please use with caution.": "Test run will do the actual data manipulating or API calling, please use with caution.",
@@ -202,6 +202,7 @@
202
202
  "Syntax references: ": "Syntax references: ",
203
203
  "System time": "System time",
204
204
  "System variables": "System variables",
205
+ "System process failed, please contact administrator.": "Falha no processo do sistema, contate o administrador.",
205
206
  "Task type {{type}} is invalid": "Task type {{type}} is invalid",
206
207
  "Test run": "Test run",
207
208
  "Test run will do the actual data manipulating or API calling, please use with caution.": "Test run will do the actual data manipulating or API calling, please use with caution.",
@@ -202,6 +202,7 @@
202
202
  "Syntax references: ": "Ссылки на синтаксис: ",
203
203
  "System time": "Системное время",
204
204
  "System variables": "Системные переменные",
205
+ "System process failed, please contact administrator.": "Системный процесс завершился с ошибкой, обратитесь к администратору.",
205
206
  "Task type {{type}} is invalid": "Task type {{type}} is invalid",
206
207
  "Test run": "Тестовый запуск",
207
208
  "Test run will do the actual data manipulating or API calling, please use with caution.": "Тестовый запуск выполнит реальные действия с данными или вызов API, используйте с осторожностью.",
@@ -202,6 +202,7 @@
202
202
  "Syntax references: ": "Syntax references: ",
203
203
  "System time": "System time",
204
204
  "System variables": "System variables",
205
+ "System process failed, please contact administrator.": "Sistem işlemi başarısız oldu, yöneticiyle iletişime geçin.",
205
206
  "Task type {{type}} is invalid": "Task type {{type}} is invalid",
206
207
  "Test run": "Test run",
207
208
  "Test run will do the actual data manipulating or API calling, please use with caution.": "Test run will do the actual data manipulating or API calling, please use with caution.",
@@ -202,6 +202,7 @@
202
202
  "Syntax references: ": "Syntax references: ",
203
203
  "System time": "System time",
204
204
  "System variables": "System variables",
205
+ "System process failed, please contact administrator.": "Системний процес завершився з помилкою, зверніться до адміністратора.",
205
206
  "Task type {{type}} is invalid": "Task type {{type}} is invalid",
206
207
  "Test run": "Test run",
207
208
  "Test run will do the actual data manipulating or API calling, please use with caution.": "Test run will do the actual data manipulating or API calling, please use with caution.",
@@ -202,6 +202,7 @@
202
202
  "Syntax references: ": "Syntax references: ",
203
203
  "System time": "System time",
204
204
  "System variables": "System variables",
205
+ "System process failed, please contact administrator.": "Quy trình hệ thống thất bại, vui lòng liên hệ quản trị viên.",
205
206
  "Task type {{type}} is invalid": "Task type {{type}} is invalid",
206
207
  "Test run": "Test run",
207
208
  "Test run will do the actual data manipulating or API calling, please use with caution.": "Test run will do the actual data manipulating or API calling, please use with caution.",
@@ -212,8 +212,12 @@
212
212
  "Support pre-action event (local mode), post-action event (local mode), and approval event here.": "此处支持“操作前事件(局部模式)”、“操作后事件(局部模式)”、“审批事件”。",
213
213
  "Sync": "同步",
214
214
  "Sync enabled status of all workflows from database": "从数据库同步所有工作流的启用状态",
215
+ "Synchronous collection event workflows run within the trigger transaction by default. Related data operations automatically use this transaction.": "同步的数据表事件工作流默认包含在触发器事务之内,相关的数据处理会自动应用该事务。",
216
+ "Rollback when workflow execution fails": "流程执行失败时回滚",
217
+ "Only available in synchronous mode. When enabled, if the workflow execution ends with a failed status, the data operation that triggered it will fail and be rolled back.": "仅在同步模式下可用。启用后,如果流程执行以失败状态结束,触发该流程的数据操作也会失败并回滚。",
215
218
  "Synchronously": "同步",
216
219
  "Syntax references: ": "语法参考:",
220
+ "System process failed, please contact administrator.": "系统处理失败,请联系管理员。",
217
221
  "System time": "系统时间",
218
222
  "System variables": "系统变量",
219
223
  "Generate snowflake ID": "生成雪花 ID",
@@ -202,6 +202,7 @@
202
202
  "Syntax references: ": "Syntax references: ",
203
203
  "System time": "System time",
204
204
  "System variables": "System variables",
205
+ "System process failed, please contact administrator.": "系統處理失敗,請聯絡管理員。",
205
206
  "Task type {{type}} is invalid": "Task type {{type}} is invalid",
206
207
  "Test run": "Test run",
207
208
  "Test run will do the actual data manipulating or API calling, please use with caution.": "Test run will do the actual data manipulating or API calling, please use with caution.",
@@ -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-06-10T23:12:28.760Z"}
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-06-15T15:31:09.027Z"}
@@ -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-06-10T23:12:28.486Z"}
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-06-15T15:31:08.759Z"}
@@ -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-06-10T23:12:27.732Z"}
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-06-15T15:31:07.981Z"}
@@ -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-06-10T23:12:27.553Z"}
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-06-15T15:31:07.812Z"}
@@ -81,10 +81,10 @@ class ExecutionTimeoutManager {
81
81
  await ((_a = this.scanning) == null ? void 0 : _a.catch(() => {
82
82
  }));
83
83
  }
84
- isExpired(execution, now = /* @__PURE__ */ new Date()) {
84
+ isExpired(execution, now = new Date(Date.now())) {
85
85
  return !!execution.expiresAt && execution.expiresAt.getTime() <= now.getTime();
86
86
  }
87
- getRemainingMs(execution, now = /* @__PURE__ */ new Date()) {
87
+ getRemainingMs(execution, now = new Date(Date.now())) {
88
88
  if (!execution.expiresAt) {
89
89
  return null;
90
90
  }
@@ -29,6 +29,12 @@ export type BackgroundAbortHandle = {
29
29
  dispose: () => void;
30
30
  throwIfAborted: () => void;
31
31
  };
32
+ export type ScopeTransaction = {
33
+ transaction: Transaction;
34
+ dataSource: string;
35
+ isolationLevel?: string;
36
+ closing?: 'commit' | 'rollback';
37
+ };
32
38
  export default class Processor {
33
39
  execution: ExecutionModel;
34
40
  options: ProcessorOptions;
@@ -58,6 +64,7 @@ export default class Processor {
58
64
  private jobsMapByNodeKey;
59
65
  private jobResultsMapByNodeKey;
60
66
  private jobsToSave;
67
+ private scopeTransactions;
61
68
  private rerunContext;
62
69
  /**
63
70
  * @experimental
@@ -111,6 +118,15 @@ export default class Processor {
111
118
  end(node: FlowNodeModel, job: JobModel): Promise<any>;
112
119
  private recall;
113
120
  exit(s?: number | true): Promise<any>;
121
+ setScopeTransaction(key: string, info: ScopeTransaction): void;
122
+ getScopeTransactionByKey(key: string): ScopeTransaction;
123
+ clearScopeTransaction(key: string): void;
124
+ markScopeTransactionClosing(key: string, action: 'commit' | 'rollback'): void;
125
+ getScopeTransaction(node: FlowNodeModel, dataSourceName?: string): Transaction | null;
126
+ isInstructionSync(node: FlowNodeModel): boolean;
127
+ private hasOpenScopeTransactions;
128
+ private markOpenScopePendingJobsAsError;
129
+ private cleanupScopeTransactions;
114
130
  /**
115
131
  * @experimental
116
132
  */
@@ -46,6 +46,7 @@ var import_utils = require("@nocobase/utils");
46
46
  var import_set = __toESM(require("lodash/set"));
47
47
  var import_constants = require("./constants");
48
48
  var import_timeout_errors = require("./timeout-errors");
49
+ const OPEN_SCOPE_PENDING_ERROR = "Pending jobs are not allowed inside an open transaction scope";
49
50
  class Processor {
50
51
  constructor(execution, options) {
51
52
  this.execution = execution;
@@ -79,6 +80,7 @@ class Processor {
79
80
  jobsMapByNodeKey = {};
80
81
  jobResultsMapByNodeKey = {};
81
82
  jobsToSave = /* @__PURE__ */ new Map();
83
+ scopeTransactions = /* @__PURE__ */ new Map();
82
84
  rerunContext = null;
83
85
  /**
84
86
  * @experimental
@@ -447,6 +449,15 @@ class Processor {
447
449
  if (s === true) {
448
450
  return;
449
451
  }
452
+ if ((s == null || s === import_constants.JOB_STATUS.PENDING) && this.hasOpenScopeTransactions()) {
453
+ this.markOpenScopePendingJobsAsError(OPEN_SCOPE_PENDING_ERROR);
454
+ s = import_constants.JOB_STATUS.ERROR;
455
+ }
456
+ const hadScopeTransactions = this.scopeTransactions.size > 0;
457
+ await this.cleanupScopeTransactions({ allowCommit: s === import_constants.JOB_STATUS.RESOLVED });
458
+ if (hadScopeTransactions && s == null && this.execution.status === import_constants.EXECUTION_STATUS.STARTED) {
459
+ s = import_constants.JOB_STATUS.ERROR;
460
+ }
450
461
  if (this.jobsToSave.size) {
451
462
  const newJobs = [];
452
463
  for (const job of this.jobsToSave.values()) {
@@ -520,6 +531,107 @@ class Processor {
520
531
  });
521
532
  return null;
522
533
  }
534
+ setScopeTransaction(key, info) {
535
+ this.scopeTransactions.set(key, info);
536
+ }
537
+ getScopeTransactionByKey(key) {
538
+ return this.scopeTransactions.get(key) ?? null;
539
+ }
540
+ clearScopeTransaction(key) {
541
+ this.scopeTransactions.delete(key);
542
+ }
543
+ markScopeTransactionClosing(key, action) {
544
+ const scopeTransaction = this.scopeTransactions.get(key);
545
+ if (scopeTransaction) {
546
+ scopeTransaction.closing = action;
547
+ }
548
+ }
549
+ getScopeTransaction(node, dataSourceName) {
550
+ for (let current = node; current; current = current.upstream) {
551
+ const scopeTransaction = this.scopeTransactions.get(current.key);
552
+ if (!scopeTransaction) {
553
+ continue;
554
+ }
555
+ if (dataSourceName && scopeTransaction.dataSource !== dataSourceName) {
556
+ continue;
557
+ }
558
+ const branchStartNode = this.findBranchStartNode(node, current);
559
+ if ((branchStartNode == null ? void 0 : branchStartNode.branchIndex) !== 1) {
560
+ continue;
561
+ }
562
+ return scopeTransaction.transaction;
563
+ }
564
+ return null;
565
+ }
566
+ isInstructionSync(node) {
567
+ return this.options.plugin.isWorkflowSync(this.execution.workflow) || Boolean(this.getScopeTransaction(node));
568
+ }
569
+ hasOpenScopeTransactions() {
570
+ for (const { transaction } of this.scopeTransactions.values()) {
571
+ if (!transaction.finished) {
572
+ return true;
573
+ }
574
+ }
575
+ return false;
576
+ }
577
+ markOpenScopePendingJobsAsError(message) {
578
+ const pendingJobs = /* @__PURE__ */ new Set();
579
+ for (const job of this.jobsToSave.values()) {
580
+ if (job.status === import_constants.JOB_STATUS.PENDING) {
581
+ pendingJobs.add(job);
582
+ }
583
+ }
584
+ for (const job of Object.values(this.jobsMapByNodeKey)) {
585
+ if (job.status === import_constants.JOB_STATUS.PENDING) {
586
+ pendingJobs.add(job);
587
+ }
588
+ }
589
+ for (const key of this.scopeTransactions.keys()) {
590
+ const job = this.jobsMapByNodeKey[key];
591
+ if ((job == null ? void 0 : job.status) === import_constants.JOB_STATUS.PENDING) {
592
+ pendingJobs.add(job);
593
+ }
594
+ }
595
+ for (const job of pendingJobs) {
596
+ job.set({
597
+ status: import_constants.JOB_STATUS.ERROR,
598
+ result: {
599
+ message
600
+ }
601
+ });
602
+ this.saveJob(job);
603
+ }
604
+ }
605
+ async cleanupScopeTransactions({ allowCommit = false } = {}) {
606
+ if (!this.scopeTransactions.size) {
607
+ return;
608
+ }
609
+ for (const [key, { transaction, dataSource, closing }] of Array.from(this.scopeTransactions.entries()).reverse()) {
610
+ const tx = transaction;
611
+ if (tx.finished) {
612
+ this.scopeTransactions.delete(key);
613
+ continue;
614
+ }
615
+ const action = closing === "commit" && allowCommit ? "commit" : "rollback";
616
+ const actionText = action === "commit" ? "committing" : "rolling back";
617
+ this.logger.warn(
618
+ `scope transaction (${key}) on data source "${dataSource}" was not closed before exit, ${actionText}`,
619
+ {
620
+ workflowId: this.execution.workflowId
621
+ }
622
+ );
623
+ try {
624
+ await tx[action]();
625
+ } catch (error) {
626
+ this.logger.error(`scope transaction (${key}) fallback ${action} failed`, {
627
+ error,
628
+ workflowId: this.execution.workflowId
629
+ });
630
+ } finally {
631
+ this.scopeTransactions.delete(key);
632
+ }
633
+ }
634
+ }
523
635
  /**
524
636
  * @experimental
525
637
  */