@nocobase/plugin-workflow 0.21.0-alpha.9 → 1.0.0-alpha.10

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 (162) hide show
  1. package/dist/client/AddButton.d.ts +8 -0
  2. package/dist/client/Branch.d.ts +8 -0
  3. package/dist/client/CanvasContent.d.ts +8 -0
  4. package/dist/client/ExecutionCanvas.d.ts +8 -0
  5. package/dist/client/ExecutionContextProvider.d.ts +8 -0
  6. package/dist/client/ExecutionLink.d.ts +8 -0
  7. package/dist/client/ExecutionPage.d.ts +8 -0
  8. package/dist/client/ExecutionResourceProvider.d.ts +8 -0
  9. package/dist/client/FlowContext.d.ts +8 -0
  10. package/dist/client/WorkflowCanvas.d.ts +8 -0
  11. package/dist/client/WorkflowLink.d.ts +8 -0
  12. package/dist/client/WorkflowPage.d.ts +8 -0
  13. package/dist/client/WorkflowPane.d.ts +8 -0
  14. package/dist/client/components/CheckboxGroupWithTooltip.d.ts +8 -0
  15. package/dist/client/components/CollectionBlockInitializer.d.ts +8 -0
  16. package/dist/client/components/CollectionFieldset.d.ts +8 -0
  17. package/dist/client/components/DetailsBlockProvider.d.ts +8 -0
  18. package/dist/client/components/DrawerDescription.d.ts +8 -0
  19. package/dist/client/components/DrawerForm.d.ts +8 -0
  20. package/dist/client/components/ExecutionStatus.d.ts +8 -0
  21. package/dist/client/components/FieldsSelect.d.ts +8 -0
  22. package/dist/client/components/FilterDynamicComponent.d.ts +8 -0
  23. package/dist/client/components/OpenDrawer.d.ts +8 -0
  24. package/dist/client/components/RadioWithTooltip.d.ts +8 -0
  25. package/dist/client/components/SimpleDesigner.d.ts +8 -0
  26. package/dist/client/components/StatusButton.d.ts +8 -0
  27. package/dist/client/components/TriggerOptionRender.d.ts +8 -0
  28. package/dist/client/components/ValueBlock.d.ts +8 -0
  29. package/dist/client/components/index.d.ts +8 -0
  30. package/dist/client/components/renderEngineReference.d.ts +8 -0
  31. package/dist/client/constants.d.ts +8 -0
  32. package/dist/client/hooks/index.d.ts +8 -0
  33. package/dist/client/hooks/useGetAriaLabelOfAddButton.d.ts +8 -0
  34. package/dist/client/hooks/useRefreshActionProps.d.ts +8 -0
  35. package/dist/client/hooks/useTriggerWorkflowActionProps.d.ts +14 -0
  36. package/dist/client/hooks/useWorkflowExecuted.d.ts +8 -0
  37. package/dist/client/index.d.ts +8 -0
  38. package/dist/client/index.js +29 -20
  39. package/dist/client/locale/index.d.ts +8 -0
  40. package/dist/client/nodes/calculation.d.ts +8 -0
  41. package/dist/client/nodes/condition.d.ts +8 -0
  42. package/dist/client/nodes/create.d.ts +8 -0
  43. package/dist/client/nodes/destroy.d.ts +8 -0
  44. package/dist/client/nodes/end.d.ts +8 -0
  45. package/dist/client/nodes/index.d.ts +8 -0
  46. package/dist/client/nodes/query.d.ts +8 -0
  47. package/dist/client/nodes/update.d.ts +8 -0
  48. package/dist/client/schemas/collection.d.ts +8 -0
  49. package/dist/client/schemas/executions.d.ts +8 -0
  50. package/dist/client/schemas/workflows.d.ts +8 -0
  51. package/dist/client/settings/customizeSubmitToWorkflowActionSettings.d.ts +8 -0
  52. package/dist/client/style.d.ts +8 -0
  53. package/dist/client/triggers/collection.d.ts +8 -0
  54. package/dist/client/triggers/index.d.ts +8 -0
  55. package/dist/client/triggers/schedule/EndsByField.d.ts +8 -0
  56. package/dist/client/triggers/schedule/OnField.d.ts +8 -0
  57. package/dist/client/triggers/schedule/RepeatField.d.ts +8 -0
  58. package/dist/client/triggers/schedule/ScheduleConfig.d.ts +8 -0
  59. package/dist/client/triggers/schedule/constants.d.ts +8 -0
  60. package/dist/client/triggers/schedule/index.d.ts +8 -0
  61. package/dist/client/triggers/schedule/locale/Cron.zh-CN.d.ts +8 -0
  62. package/dist/client/utils.d.ts +8 -0
  63. package/dist/client/variable.d.ts +8 -0
  64. package/dist/externalVersion.js +19 -10
  65. package/dist/index.d.ts +8 -0
  66. package/dist/index.js +9 -0
  67. package/dist/locale/zh-CN.json +4 -3
  68. package/dist/node_modules/cron-parser/package.json +1 -1
  69. package/dist/node_modules/lru-cache/package.json +1 -1
  70. package/dist/server/Plugin.d.ts +15 -3
  71. package/dist/server/Plugin.js +62 -33
  72. package/dist/server/Processor.d.ts +8 -0
  73. package/dist/server/Processor.js +9 -0
  74. package/dist/server/actions/executions.d.ts +8 -0
  75. package/dist/server/actions/executions.js +9 -0
  76. package/dist/server/actions/index.d.ts +8 -0
  77. package/dist/server/actions/index.js +9 -0
  78. package/dist/server/actions/nodes.d.ts +8 -0
  79. package/dist/server/actions/nodes.js +9 -0
  80. package/dist/server/actions/workflows.d.ts +8 -0
  81. package/dist/server/actions/workflows.js +9 -0
  82. package/dist/server/collections/executions.d.ts +8 -0
  83. package/dist/server/collections/executions.js +14 -0
  84. package/dist/server/collections/flow_nodes.d.ts +8 -0
  85. package/dist/server/collections/flow_nodes.js +9 -0
  86. package/dist/server/collections/jobs.d.ts +8 -0
  87. package/dist/server/collections/jobs.js +9 -0
  88. package/dist/server/collections/workflows.d.ts +8 -0
  89. package/dist/server/collections/workflows.js +9 -0
  90. package/dist/server/constants.d.ts +8 -0
  91. package/dist/server/constants.js +9 -0
  92. package/dist/server/functions/index.d.ts +8 -0
  93. package/dist/server/functions/index.js +9 -0
  94. package/dist/server/index.d.ts +8 -0
  95. package/dist/server/index.js +9 -0
  96. package/dist/server/instructions/CalculationInstruction.d.ts +8 -0
  97. package/dist/server/instructions/CalculationInstruction.js +9 -0
  98. package/dist/server/instructions/ConditionInstruction.d.ts +8 -0
  99. package/dist/server/instructions/ConditionInstruction.js +9 -0
  100. package/dist/server/instructions/CreateInstruction.d.ts +8 -0
  101. package/dist/server/instructions/CreateInstruction.js +9 -0
  102. package/dist/server/instructions/DestroyInstruction.d.ts +8 -0
  103. package/dist/server/instructions/DestroyInstruction.js +9 -0
  104. package/dist/server/instructions/EndInstruction.d.ts +8 -0
  105. package/dist/server/instructions/EndInstruction.js +9 -0
  106. package/dist/server/instructions/QueryInstruction.d.ts +8 -0
  107. package/dist/server/instructions/QueryInstruction.js +9 -0
  108. package/dist/server/instructions/UpdateInstruction.d.ts +8 -0
  109. package/dist/server/instructions/UpdateInstruction.js +9 -0
  110. package/dist/server/instructions/index.d.ts +8 -0
  111. package/dist/server/instructions/index.js +9 -0
  112. package/dist/server/migrations/20221129153547-calculation-variables.d.ts +8 -0
  113. package/dist/server/migrations/20221129153547-calculation-variables.js +9 -0
  114. package/dist/server/migrations/20230221032941-change-request-body-type.d.ts +8 -0
  115. package/dist/server/migrations/20230221032941-change-request-body-type.js +9 -0
  116. package/dist/server/migrations/20230221071831-calculation-expression.d.ts +8 -0
  117. package/dist/server/migrations/20230221071831-calculation-expression.js +9 -0
  118. package/dist/server/migrations/20230221121203-condition-calculation.d.ts +8 -0
  119. package/dist/server/migrations/20230221121203-condition-calculation.js +9 -0
  120. package/dist/server/migrations/20230221162902-jsonb-to-json.d.ts +8 -0
  121. package/dist/server/migrations/20230221162902-jsonb-to-json.js +9 -0
  122. package/dist/server/migrations/20230411034722-manual-multi-form.d.ts +8 -0
  123. package/dist/server/migrations/20230411034722-manual-multi-form.js +9 -0
  124. package/dist/server/migrations/20230612021134-manual-collection-block.d.ts +8 -0
  125. package/dist/server/migrations/20230612021134-manual-collection-block.js +9 -0
  126. package/dist/server/migrations/20230710115902-manual-action-values.d.ts +8 -0
  127. package/dist/server/migrations/20230710115902-manual-action-values.js +9 -0
  128. package/dist/server/migrations/20230809113132-workflow-options.d.ts +8 -0
  129. package/dist/server/migrations/20230809113132-workflow-options.js +9 -0
  130. package/dist/server/migrations/20231024172342-add-node-key.d.ts +8 -0
  131. package/dist/server/migrations/20231024172342-add-node-key.js +9 -0
  132. package/dist/server/migrations/20231122143143-split-to-plugins.d.ts +8 -0
  133. package/dist/server/migrations/20231122143143-split-to-plugins.js +9 -0
  134. package/dist/server/migrations/20240115220721-add-node-key-to-job.d.ts +8 -0
  135. package/dist/server/migrations/20240115220721-add-node-key-to-job.js +9 -0
  136. package/dist/server/triggers/CollectionTrigger.d.ts +8 -0
  137. package/dist/server/triggers/CollectionTrigger.js +9 -0
  138. package/dist/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.d.ts +8 -0
  139. package/dist/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.js +21 -6
  140. package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.d.ts +13 -7
  141. package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.js +12 -2
  142. package/dist/server/triggers/ScheduleTrigger/index.d.ts +8 -3
  143. package/dist/server/triggers/ScheduleTrigger/index.js +22 -12
  144. package/dist/server/triggers/ScheduleTrigger/utils.d.ts +8 -0
  145. package/dist/server/triggers/ScheduleTrigger/utils.js +9 -0
  146. package/dist/server/triggers/index.d.ts +8 -0
  147. package/dist/server/triggers/index.js +9 -0
  148. package/dist/server/types/Execution.d.ts +8 -0
  149. package/dist/server/types/Execution.js +9 -0
  150. package/dist/server/types/FlowNode.d.ts +8 -0
  151. package/dist/server/types/FlowNode.js +9 -0
  152. package/dist/server/types/Job.d.ts +8 -0
  153. package/dist/server/types/Job.js +9 -0
  154. package/dist/server/types/Workflow.d.ts +8 -0
  155. package/dist/server/types/Workflow.js +9 -0
  156. package/dist/server/types/index.d.ts +8 -0
  157. package/dist/server/types/index.js +9 -0
  158. package/dist/server/utils.d.ts +8 -0
  159. package/dist/server/utils.js +9 -0
  160. package/dist/swagger/index.d.ts +8 -0
  161. package/dist/swagger/index.js +9 -0
  162. package/package.json +15 -15
@@ -1,3 +1,11 @@
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
+ */
1
9
  export declare const NAMESPACE = "workflow";
2
10
  export declare function lang(key: string, options?: {}): string;
3
11
  export declare function useWorkflowTranslation(): import("react-i18next").UseTranslationResponse<"workflow", undefined>;
@@ -1,3 +1,11 @@
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
+ */
1
9
  /// <reference types="react" />
2
10
  import { SchemaInitializerItemType } from '@nocobase/client';
3
11
  import { RadioWithTooltip } from '../components/RadioWithTooltip';
@@ -1,3 +1,11 @@
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
+ */
1
9
  import React from 'react';
2
10
  import { Instruction } from '.';
3
11
  import { RadioWithTooltip } from '../components/RadioWithTooltip';
@@ -1,3 +1,11 @@
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
+ */
1
9
  /// <reference types="react" />
2
10
  import { SchemaInitializerItemType, useCollectionDataSource } from '@nocobase/client';
3
11
  import { Instruction } from '.';
@@ -1,3 +1,11 @@
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
+ */
1
9
  import { useCollectionDataSource } from '@nocobase/client';
2
10
  import { FilterDynamicComponent } from '../components/FilterDynamicComponent';
3
11
  import { Instruction } from '.';
@@ -1,3 +1,11 @@
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
+ */
1
9
  import { Instruction } from '.';
2
10
  export default class extends Instruction {
3
11
  title: string;
@@ -1,3 +1,11 @@
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
+ */
1
9
  import { ISchema } from '@formily/react';
2
10
  import React from 'react';
3
11
  import { SchemaInitializerItemType } from '@nocobase/client';
@@ -1,3 +1,11 @@
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
+ */
1
9
  /// <reference types="react" />
2
10
  import { SchemaInitializerItemType, useCollectionDataSource } from '@nocobase/client';
3
11
  import { FilterDynamicComponent } from '../components/FilterDynamicComponent';
@@ -1,3 +1,11 @@
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
+ */
1
9
  import React from 'react';
2
10
  import { useCollectionDataSource } from '@nocobase/client';
3
11
  import { FilterDynamicComponent } from '../components/FilterDynamicComponent';
@@ -1,3 +1,11 @@
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
+ */
1
9
  export declare const collection: {
2
10
  type: string;
3
11
  title: string;
@@ -1,3 +1,11 @@
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
+ */
1
9
  export declare const executionCollection: {
2
10
  name: string;
3
11
  fields: {
@@ -1,2 +1,10 @@
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
+ */
1
9
  import { ISchema } from '@formily/react';
2
10
  export declare const workflowSchema: ISchema;
@@ -1,2 +1,10 @@
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
+ */
1
9
  import { SchemaSettings } from '@nocobase/client';
2
10
  export declare const customizeSubmitToWorkflowActionSettings: SchemaSettings<{}>;
@@ -1,3 +1,11 @@
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
+ */
1
9
  declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
10
  workflowPageClass: import("antd-style").SerializedStyles;
3
11
  dropdownClass: import("antd-style").SerializedStyles;
@@ -1,3 +1,11 @@
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
+ */
1
9
  /// <reference types="react" />
2
10
  import { SchemaInitializerItemType, useCollectionDataSource } from '@nocobase/client';
3
11
  import { useWorkflowAnyExecuted } from '../hooks';
@@ -1,3 +1,11 @@
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
+ */
1
9
  import React from 'react';
2
10
  import { ISchema } from '@formily/react';
3
11
  import { SchemaInitializerItemType } from '@nocobase/client';
@@ -1,3 +1,11 @@
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
+ */
1
9
  import React from 'react';
2
10
  export declare function EndsByField({ value, onChange }: {
3
11
  value: any;
@@ -1,3 +1,11 @@
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
+ */
1
9
  import React from 'react';
2
10
  export declare function OnField({ value: propsValue, onChange }: {
3
11
  value: any;
@@ -1,3 +1,11 @@
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
+ */
1
9
  import React from 'react';
2
10
  export declare function RepeatField({ value, onChange }: {
3
11
  value?: any;
@@ -1,2 +1,10 @@
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
+ */
1
9
  import React from 'react';
2
10
  export declare const ScheduleConfig: () => React.JSX.Element;
@@ -1,3 +1,11 @@
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
+ */
1
9
  export declare const SCHEDULE_MODE: {
2
10
  STATIC: number;
3
11
  DATE_FIELD: number;
@@ -1,3 +1,11 @@
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
+ */
1
9
  /// <reference types="react" />
2
10
  import { SchemaInitializerItemType, useCollectionDataSource } from '@nocobase/client';
3
11
  import { Trigger } from '..';
@@ -1,3 +1,11 @@
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
+ */
1
9
  declare const _default: {
2
10
  everyText: string;
3
11
  emptyMonths: string;
@@ -1,3 +1,11 @@
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
+ */
1
9
  export declare function linkNodes(nodes: any): void;
2
10
  export declare function traverseSchema(schema: any, fn: any): void;
3
11
  export declare function getWorkflowDetailPath(id: string | number): string;
@@ -1,3 +1,11 @@
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
+ */
1
9
  /// <reference types="react" />
2
10
  export type VariableOption = {
3
11
  key?: string;
@@ -1,24 +1,33 @@
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
+
1
10
  module.exports = {
2
11
  "react": "18.2.0",
3
12
  "antd": "5.12.8",
4
13
  "@ant-design/icons": "5.2.6",
5
- "@nocobase/client": "0.21.0-alpha.9",
14
+ "@nocobase/client": "1.0.0-alpha.10",
6
15
  "react-router-dom": "6.21.0",
7
- "@nocobase/utils": "0.21.0-alpha.9",
16
+ "@nocobase/utils": "1.0.0-alpha.10",
8
17
  "react-i18next": "11.18.6",
9
18
  "@formily/core": "2.3.0",
10
19
  "@formily/react": "2.3.0",
11
- "@nocobase/database": "0.21.0-alpha.9",
12
- "@nocobase/server": "0.21.0-alpha.9",
13
- "@nocobase/logger": "0.21.0-alpha.9",
14
- "@nocobase/evaluators": "0.21.0-alpha.9",
20
+ "@nocobase/database": "1.0.0-alpha.10",
21
+ "@nocobase/server": "1.0.0-alpha.10",
22
+ "@nocobase/logger": "1.0.0-alpha.10",
23
+ "@nocobase/evaluators": "1.0.0-alpha.10",
15
24
  "@formily/shared": "2.3.0",
16
25
  "lodash": "4.17.21",
17
26
  "@formily/antd-v5": "1.1.9",
18
- "@nocobase/actions": "0.21.0-alpha.9",
19
- "@nocobase/data-source-manager": "0.21.0-alpha.9",
27
+ "@nocobase/actions": "1.0.0-alpha.10",
28
+ "@nocobase/data-source-manager": "1.0.0-alpha.10",
20
29
  "sequelize": "6.35.2",
21
- "@nocobase/plugin-workflow-test": "0.21.0-alpha.9",
22
- "@nocobase/test": "0.21.0-alpha.9",
30
+ "@nocobase/plugin-workflow-test": "1.0.0-alpha.10",
31
+ "@nocobase/test": "1.0.0-alpha.10",
23
32
  "dayjs": "1.11.10"
24
33
  };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,10 @@
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
+ */
1
9
  export * from './server';
2
10
  export { default } from './server';
package/dist/index.js CHANGED
@@ -1,3 +1,12 @@
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
+
1
10
  var __create = Object.create;
2
11
  var __defProp = Object.defineProperty;
3
12
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -35,10 +35,11 @@
35
35
  "Will be executed in the background as a queued task.": "将作为队列任务在后台执行。",
36
36
  "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.":
37
37
  "适用于需要即时反馈的用户操作。不能在此模式下使用异步节点,并且不建议在同步模式下执行耗时的操作。",
38
-
38
+ "Go back": "返回",
39
39
  "Bind workflows": "绑定工作流",
40
40
  "Workflow will be triggered before or after submitting succeeded based on workflow type.": "工作流会基于其类型在提交成功之前或之后触发。",
41
- "Workflow will be triggered directly once the button clicked, without data saving. Only supports \"Post-action event\" for now.": "按钮点击后直接触发工作流,但不会保存数据。目前仅支持“操作后事件”。",
41
+ "Workflow will be triggered directly once the button clicked, without data saving. Only supports to be bound with \"Custom action event\".": "按钮点击后直接触发工作流,但不会保存数据。仅支持绑定“自定义操作事件”。",
42
+ "\"Submit to workflow\" to \"Post-action event\" is deprecated, please use \"Custom action event\" instead.": "“提交至工作流”到“操作后事件”的方式已被弃用,请使用“自定义操作事件”代替。",
42
43
  "Workflow will be triggered before deleting succeeded.": "删除成功之前触发工作流。",
43
44
  "Submit to workflow": "提交至工作流",
44
45
  "Add workflow": "添加工作流",
@@ -183,7 +184,7 @@
183
184
  "Delete records of a collection. Could use variables in workflow context as filter. All records match the filter will be deleted.":
184
185
  "删除一个数据表中的数据。可以使用上游节点里的变量作为过滤条件。所有满足条件的数据都将被删除。",
185
186
 
186
- "Executed workflow cannot be modified": "已经执行过的工作流不能被修改",
187
+ "Executed workflow cannot be modified. Could be copied to a new version to modify.": "已经执行过的工作流不能被修改,可通过复制到新版本后再修改。",
187
188
  "Can not delete": "无法删除",
188
189
  "The result of this node has been referenced by other nodes ({{nodes}}), please remove the usage before deleting.":
189
190
  "该节点的执行结果已被其他节点({{nodes}})引用,删除前请先移除引用。",
@@ -1 +1 @@
1
- {"name":"cron-parser","version":"4.4.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^1.28.0"},"devDependencies":{"eslint":"^8.2.0","sinon":"^10.0.0","tap":"^16.0.1","tsd":"^0.19.0"},"engines":{"node":">=0.8"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"_lastModified":"2024-04-16T15:08:03.502Z"}
1
+ {"name":"cron-parser","version":"4.4.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^1.28.0"},"devDependencies":{"eslint":"^8.2.0","sinon":"^10.0.0","tap":"^16.0.1","tsd":"^0.19.0"},"engines":{"node":">=0.8"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"_lastModified":"2024-05-11T01:11:48.915Z"}
@@ -1 +1 @@
1
- {"name":"lru-cache","description":"A cache object that deletes the least-recently-used items.","version":"8.0.5","author":"Isaac Z. Schlueter <i@izs.me>","keywords":["mru","lru","cache"],"sideEffects":false,"scripts":{"build":"npm run prepare","preprepare":"rm -rf dist","prepare":"tsc -p tsconfig.json && tsc -p tsconfig-esm.json","postprepare":"bash fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"c8 tap","snap":"c8 tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig tsconfig-esm.json ./src/*.ts","benchmark-results-typedoc":"bash scripts/benchmark-results-typedoc.sh","prebenchmark":"npm run prepare","benchmark":"make -C benchmark","preprofile":"npm run prepare","profile":"make -C benchmark profile"},"main":"./dist/cjs/index-cjs.js","module":"./dist/mjs/index.js","types":"./dist/mjs/index.d.ts","exports":{"./min":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.min.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.min.js"}},".":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index-cjs.js"}}},"repository":"git://github.com/isaacs/node-lru-cache.git","devDependencies":{"@size-limit/preset-small-lib":"^7.0.8","@types/node":"^17.0.31","@types/tap":"^15.0.6","benchmark":"^2.1.4","c8":"^7.11.2","clock-mock":"^1.0.6","esbuild":"^0.17.11","eslint-config-prettier":"^8.5.0","marked":"^4.2.12","mkdirp":"^2.1.5","prettier":"^2.6.2","size-limit":"^7.0.8","tap":"^16.3.4","ts-node":"^10.7.0","tslib":"^2.4.0","typedoc":"^0.23.24","typescript":"^4.6.4"},"license":"ISC","files":["dist"],"engines":{"node":">=16.14"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tap":{"coverage":false,"node-arg":["--expose-gc","--no-warnings","--loader","ts-node/esm"],"ts":false},"size-limit":[{"path":"./dist/mjs/index.js"}],"_lastModified":"2024-04-16T15:08:03.189Z"}
1
+ {"name":"lru-cache","description":"A cache object that deletes the least-recently-used items.","version":"8.0.5","author":"Isaac Z. Schlueter <i@izs.me>","keywords":["mru","lru","cache"],"sideEffects":false,"scripts":{"build":"npm run prepare","preprepare":"rm -rf dist","prepare":"tsc -p tsconfig.json && tsc -p tsconfig-esm.json","postprepare":"bash fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"c8 tap","snap":"c8 tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig tsconfig-esm.json ./src/*.ts","benchmark-results-typedoc":"bash scripts/benchmark-results-typedoc.sh","prebenchmark":"npm run prepare","benchmark":"make -C benchmark","preprofile":"npm run prepare","profile":"make -C benchmark profile"},"main":"./dist/cjs/index-cjs.js","module":"./dist/mjs/index.js","types":"./dist/mjs/index.d.ts","exports":{"./min":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.min.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.min.js"}},".":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index-cjs.js"}}},"repository":"git://github.com/isaacs/node-lru-cache.git","devDependencies":{"@size-limit/preset-small-lib":"^7.0.8","@types/node":"^17.0.31","@types/tap":"^15.0.6","benchmark":"^2.1.4","c8":"^7.11.2","clock-mock":"^1.0.6","esbuild":"^0.17.11","eslint-config-prettier":"^8.5.0","marked":"^4.2.12","mkdirp":"^2.1.5","prettier":"^2.6.2","size-limit":"^7.0.8","tap":"^16.3.4","ts-node":"^10.7.0","tslib":"^2.4.0","typedoc":"^0.23.24","typescript":"^4.6.4"},"license":"ISC","files":["dist"],"engines":{"node":">=16.14"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tap":{"coverage":false,"node-arg":["--expose-gc","--no-warnings","--loader","ts-node/esm"],"ts":false},"size-limit":[{"path":"./dist/mjs/index.js"}],"_lastModified":"2024-05-11T01:11:48.559Z"}
@@ -1,3 +1,11 @@
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
+ */
1
9
  import { Transactionable } from '@nocobase/database';
2
10
  import { Plugin } from '@nocobase/server';
3
11
  import { Registry } from '@nocobase/utils';
@@ -8,6 +16,11 @@ import Trigger from './triggers';
8
16
  import { InstructionInterface } from './instructions';
9
17
  import type { ExecutionModel, WorkflowModel } from './types';
10
18
  type ID = number | string;
19
+ type EventOptions = {
20
+ eventKey?: string;
21
+ context?: any;
22
+ [key: string]: any;
23
+ } & Transactionable;
11
24
  export default class PluginWorkflowServer extends Plugin {
12
25
  instructions: Registry<InstructionInterface>;
13
26
  triggers: Registry<Trigger>;
@@ -20,6 +33,7 @@ export default class PluginWorkflowServer extends Plugin {
20
33
  private eventsCount;
21
34
  private loggerCache;
22
35
  private meter;
36
+ private checker;
23
37
  private onBeforeSave;
24
38
  /**
25
39
  * @experimental
@@ -44,9 +58,7 @@ export default class PluginWorkflowServer extends Plugin {
44
58
  */
45
59
  load(): Promise<void>;
46
60
  private toggle;
47
- trigger(workflow: WorkflowModel, context: object, options?: {
48
- [key: string]: any;
49
- } & Transactionable): void | Promise<Processor | null>;
61
+ trigger(workflow: WorkflowModel, context: object, options?: EventOptions): void | Promise<Processor | null>;
50
62
  private triggerSync;
51
63
  resume(job: any): Promise<void>;
52
64
  createProcessor(execution: ExecutionModel, options?: {}): Processor;
@@ -1,3 +1,12 @@
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
+
1
10
  var __create = Object.create;
2
11
  var __defProp = Object.defineProperty;
3
12
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -31,6 +40,7 @@ __export(Plugin_exports, {
31
40
  });
32
41
  module.exports = __toCommonJS(Plugin_exports);
33
42
  var import_path = __toESM(require("path"));
43
+ var import_crypto = require("crypto");
34
44
  var import_lru_cache = __toESM(require("lru-cache"));
35
45
  var import_database = require("@nocobase/database");
36
46
  var import_server = require("@nocobase/server");
@@ -60,6 +70,7 @@ class PluginWorkflowServer extends import_server.Plugin {
60
70
  eventsCount = 0;
61
71
  loggerCache;
62
72
  meter = null;
73
+ checker = null;
63
74
  onBeforeSave = async (instance, options) => {
64
75
  const Model = instance.constructor;
65
76
  if (instance.enabled) {
@@ -223,6 +234,9 @@ class PluginWorkflowServer extends import_server.Plugin {
223
234
  workflows.forEach((workflow) => {
224
235
  this.toggle(workflow);
225
236
  });
237
+ this.checker = setInterval(() => {
238
+ this.dispatch();
239
+ }, 3e5);
226
240
  });
227
241
  this.app.on("afterStart", () => {
228
242
  this.app.setMaintainingMessage("check for not started executions");
@@ -244,6 +258,9 @@ class PluginWorkflowServer extends import_server.Plugin {
244
258
  if (this.executing) {
245
259
  await this.executing;
246
260
  }
261
+ if (this.checker) {
262
+ clearInterval(this.checker);
263
+ }
247
264
  });
248
265
  }
249
266
  toggle(workflow, enable) {
@@ -327,14 +344,23 @@ class PluginWorkflowServer extends import_server.Plugin {
327
344
  }
328
345
  return null;
329
346
  }
330
- const execution = await workflow.createExecution(
331
- {
332
- context,
333
- key: workflow.key,
334
- status: import_constants.EXECUTION_STATUS.QUEUEING
335
- },
336
- { transaction }
337
- );
347
+ let execution;
348
+ try {
349
+ execution = await workflow.createExecution(
350
+ {
351
+ context,
352
+ key: workflow.key,
353
+ eventKey: options.eventKey ?? (0, import_crypto.randomUUID)(),
354
+ status: import_constants.EXECUTION_STATUS.QUEUEING
355
+ },
356
+ { transaction }
357
+ );
358
+ } catch (err) {
359
+ if (!options.transaction) {
360
+ await transaction.rollback();
361
+ }
362
+ throw err;
363
+ }
338
364
  this.getLogger(workflow.id).info(`execution of workflow ${workflow.id} created as ${execution.id}`);
339
365
  await workflow.increment(["executed", "allExecuted"], { transaction });
340
366
  if (this.db.options.dialect !== "postgres") {
@@ -397,32 +423,35 @@ class PluginWorkflowServer extends import_server.Plugin {
397
423
  }
398
424
  this.executing = (async () => {
399
425
  let next = null;
400
- if (this.pending.length) {
401
- next = this.pending.shift();
402
- this.getLogger(next[0].workflowId).info(`pending execution (${next[0].id}) ready to process`);
403
- } else {
404
- const execution = await this.db.getRepository("executions").findOne({
405
- filter: {
406
- status: import_constants.EXECUTION_STATUS.QUEUEING,
407
- "workflow.enabled": true,
408
- "workflow.id": {
409
- [import_database.Op.not]: null
410
- }
411
- },
412
- appends: ["workflow"],
413
- sort: "createdAt"
414
- });
415
- if (execution) {
416
- this.getLogger(execution.workflowId).info(`execution (${execution.id}) fetched from db`);
417
- next = [execution];
426
+ try {
427
+ if (this.pending.length) {
428
+ next = this.pending.shift();
429
+ this.getLogger(next[0].workflowId).info(`pending execution (${next[0].id}) ready to process`);
430
+ } else {
431
+ const execution = await this.db.getRepository("executions").findOne({
432
+ filter: {
433
+ status: import_constants.EXECUTION_STATUS.QUEUEING,
434
+ "workflow.enabled": true,
435
+ "workflow.id": {
436
+ [import_database.Op.not]: null
437
+ }
438
+ },
439
+ appends: ["workflow"],
440
+ sort: "id"
441
+ });
442
+ if (execution) {
443
+ this.getLogger(execution.workflowId).info(`execution (${execution.id}) fetched from db`);
444
+ next = [execution];
445
+ }
446
+ }
447
+ if (next) {
448
+ await this.process(...next);
449
+ }
450
+ } finally {
451
+ this.executing = null;
452
+ if (next) {
453
+ this.dispatch();
418
454
  }
419
- }
420
- if (next) {
421
- await this.process(...next);
422
- }
423
- this.executing = null;
424
- if (next) {
425
- this.dispatch();
426
455
  }
427
456
  })();
428
457
  }