@solidxai/core 0.1.13-beta.2 → 0.1.13-beta.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 (134) hide show
  1. package/dist/commands/seed.command.d.ts +2 -0
  2. package/dist/commands/seed.command.d.ts.map +1 -1
  3. package/dist/commands/seed.command.js +21 -0
  4. package/dist/commands/seed.command.js.map +1 -1
  5. package/dist/entities/saved-filters.entity.js +3 -3
  6. package/dist/entities/saved-filters.entity.js.map +1 -1
  7. package/dist/entities/workflow-trigger-execution.entity.js +1 -1
  8. package/dist/entities/workflow-trigger-execution.entity.js.map +1 -1
  9. package/dist/index.d.ts +2 -0
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +2 -0
  12. package/dist/index.js.map +1 -1
  13. package/dist/interfaces.d.ts +1 -0
  14. package/dist/interfaces.d.ts.map +1 -1
  15. package/dist/interfaces.js.map +1 -1
  16. package/dist/seeders/module-metadata-seeder.service.d.ts.map +1 -1
  17. package/dist/seeders/module-metadata-seeder.service.js +44 -27
  18. package/dist/seeders/module-metadata-seeder.service.js.map +1 -1
  19. package/dist/seeders/seed-data/solid-core-metadata.json +80 -67
  20. package/dist/services/workflow/nodes/execution-fail.node.d.ts +6 -0
  21. package/dist/services/workflow/nodes/execution-fail.node.d.ts.map +1 -0
  22. package/dist/services/workflow/nodes/execution-fail.node.js +81 -0
  23. package/dist/services/workflow/nodes/execution-fail.node.js.map +1 -0
  24. package/dist/services/workflow/nodes/for-each.node.d.ts +2 -0
  25. package/dist/services/workflow/nodes/for-each.node.d.ts.map +1 -1
  26. package/dist/services/workflow/nodes/for-each.node.js +114 -5
  27. package/dist/services/workflow/nodes/for-each.node.js.map +1 -1
  28. package/dist/services/workflow/nodes/if.node.d.ts.map +1 -1
  29. package/dist/services/workflow/nodes/if.node.js +7 -0
  30. package/dist/services/workflow/nodes/if.node.js.map +1 -1
  31. package/dist/services/workflow/nodes/log-write.node.d.ts.map +1 -1
  32. package/dist/services/workflow/nodes/log-write.node.js +2 -0
  33. package/dist/services/workflow/nodes/log-write.node.js.map +1 -1
  34. package/dist/services/workflow/nodes/loop-until.node.d.ts +12 -0
  35. package/dist/services/workflow/nodes/loop-until.node.d.ts.map +1 -0
  36. package/dist/services/workflow/nodes/loop-until.node.js +281 -0
  37. package/dist/services/workflow/nodes/loop-until.node.js.map +1 -0
  38. package/dist/services/workflow/nodes/parallel.node.d.ts.map +1 -1
  39. package/dist/services/workflow/nodes/parallel.node.js +7 -0
  40. package/dist/services/workflow/nodes/parallel.node.js.map +1 -1
  41. package/dist/services/workflow/nodes/sequential.node.d.ts.map +1 -1
  42. package/dist/services/workflow/nodes/sequential.node.js +7 -0
  43. package/dist/services/workflow/nodes/sequential.node.js.map +1 -1
  44. package/dist/services/workflow/nodes/switch.node.d.ts.map +1 -1
  45. package/dist/services/workflow/nodes/switch.node.js +7 -0
  46. package/dist/services/workflow/nodes/switch.node.js.map +1 -1
  47. package/dist/services/workflow/workflow-definition-validator.service.d.ts.map +1 -1
  48. package/dist/services/workflow/workflow-definition-validator.service.js +5 -2
  49. package/dist/services/workflow/workflow-definition-validator.service.js.map +1 -1
  50. package/dist/services/workflow/workflow-expression.service.d.ts.map +1 -1
  51. package/dist/services/workflow/workflow-expression.service.js +5 -0
  52. package/dist/services/workflow/workflow-expression.service.js.map +1 -1
  53. package/dist/services/workflow/workflow-node-registry.service.d.ts +2 -1
  54. package/dist/services/workflow/workflow-node-registry.service.d.ts.map +1 -1
  55. package/dist/services/workflow/workflow-node-registry.service.js +7 -0
  56. package/dist/services/workflow/workflow-node-registry.service.js.map +1 -1
  57. package/dist/services/workflow/workflow-runtime.service.d.ts +8 -0
  58. package/dist/services/workflow/workflow-runtime.service.d.ts.map +1 -1
  59. package/dist/services/workflow/workflow-runtime.service.js +197 -32
  60. package/dist/services/workflow/workflow-runtime.service.js.map +1 -1
  61. package/dist/solid-core.module.d.ts.map +1 -1
  62. package/dist/solid-core.module.js +4 -0
  63. package/dist/solid-core.module.js.map +1 -1
  64. package/dist/types/workflow-dsl.types.d.ts +14 -0
  65. package/dist/types/workflow-dsl.types.d.ts.map +1 -1
  66. package/dist/types/workflow-dsl.types.js.map +1 -1
  67. package/dist-tests/api/authenticate.spec.js +119 -0
  68. package/dist-tests/api/authenticate.spec.js.map +1 -0
  69. package/dist-tests/api/crud-service.findOne.cityMaster.spec.js +97 -0
  70. package/dist-tests/api/crud-service.findOne.cityMaster.spec.js.map +1 -0
  71. package/dist-tests/api/ping.spec.js +21 -0
  72. package/dist-tests/api/ping.spec.js.map +1 -0
  73. package/dist-tests/helpers/auth.js +41 -0
  74. package/dist-tests/helpers/auth.js.map +1 -0
  75. package/dist-tests/helpers/env.js +11 -0
  76. package/dist-tests/helpers/env.js.map +1 -0
  77. package/docs/agent-builder/notebook-lm-prompt-for-agent-builder.md +136 -0
  78. package/docs/agent-builder/team-ready-note-agent-builder.md +305 -0
  79. package/docs/agent-hub-grooming.md +301 -0
  80. package/docs/dashboards/AGENTIC_DASHBOARD_IMPLEMENTATION_PLAN.md +438 -0
  81. package/docs/dashboards/dashboard-curl-smoke-tests.txt +146 -0
  82. package/docs/dashboards/delete-legacy-dashboard-metadata.sql +172 -0
  83. package/docs/datasource-introspection-ddl-analysis.md +326 -0
  84. package/docs/datasource-introspection-implementation-plan.md +306 -0
  85. package/docs/grouping-enhancements.md +89 -0
  86. package/docs/java-spring/README.md +3 -0
  87. package/docs/java-spring/solid-core-module-deep-dive-report.md +1317 -0
  88. package/docs/module-package-import-handoff.md +691 -0
  89. package/docs/seed-changes.md +65 -0
  90. package/docs/test-data-workflow.md +200 -0
  91. package/docs/type-declaration-import-issue.md +24 -0
  92. package/docs/workflow/business-automation-example-notes.md +309 -0
  93. package/docs/workflow/control-flow-node-addition-sop.md +324 -0
  94. package/docs/workflow/data-engineering-pipeline-example-notes.md +330 -0
  95. package/docs/workflow/foreach-example-notes.md +187 -0
  96. package/docs/workflow/hello-world-example-notes.md +271 -0
  97. package/docs/workflow/kestra-concepts-plugins-blueprints.md +315 -0
  98. package/docs/workflow/loop-until-example-notes.md +198 -0
  99. package/docs/workflow/microservices-and-apis-example-notes.md +264 -0
  100. package/docs/workflow/samples.md +25 -0
  101. package/docs/workflow/what-is-kestra.md +79 -0
  102. package/docs/workflow/workflow-core-module-handoff-summary.md +191 -0
  103. package/docs/workflow/workflow-module-brd.md +185 -0
  104. package/docs/workflow/workflow-module-domain-model.md +252 -0
  105. package/docs/workflow/workflow-module-metadata-dsl.md +302 -0
  106. package/docs/workflow/workflow-module-technical-spec.md +293 -0
  107. package/docs/workflow/workflow-node-type-contracts.md +635 -0
  108. package/docs/workflow/workflow-node-ui-metadata-contract.md +1262 -0
  109. package/docs/workflow/workflow-solidx-model-field-spec.md +284 -0
  110. package/package.json +1 -1
  111. package/src/commands/seed.command.ts +19 -0
  112. package/src/entities/saved-filters.entity.ts +3 -3
  113. package/src/entities/workflow-trigger-execution.entity.ts +1 -1
  114. package/src/index.ts +2 -0
  115. package/src/interfaces.ts +1 -0
  116. package/src/seeders/module-metadata-seeder.service.ts +50 -36
  117. package/src/seeders/seed-data/solid-core-metadata.json +80 -67
  118. package/src/services/workflow/nodes/execution-fail.node.ts +82 -0
  119. package/src/services/workflow/nodes/for-each.node.ts +140 -6
  120. package/src/services/workflow/nodes/if.node.ts +7 -0
  121. package/src/services/workflow/nodes/log-write.node.ts +2 -0
  122. package/src/services/workflow/nodes/loop-until.node.ts +343 -0
  123. package/src/services/workflow/nodes/parallel.node.ts +7 -0
  124. package/src/services/workflow/nodes/sequential.node.ts +7 -0
  125. package/src/services/workflow/nodes/switch.node.ts +7 -0
  126. package/src/services/workflow/workflow-definition-validator.service.ts +5 -2
  127. package/src/services/workflow/workflow-expression.service.ts +5 -0
  128. package/src/services/workflow/workflow-node-registry.service.ts +11 -0
  129. package/src/services/workflow/workflow-runtime.service.ts +274 -39
  130. package/src/solid-core.module.ts +4 -0
  131. package/src/types/workflow-dsl.types.ts +43 -0
  132. package/.claude/settings.local.json +0 -16
  133. package/CLAUDE.md +0 -26
  134. package/src/services/1.js +0 -6
@@ -0,0 +1,284 @@
1
+ # Workflow SolidX Model Field Specification
2
+
3
+ This document translates the agreed workflow-management domain model into SolidX model and field definitions.
4
+
5
+ It is intended as the final field-level design pass before using the SolidX model MCP tools.
6
+
7
+ ## SolidX Field Types
8
+
9
+ The local `@solidxai/core` package defines these field types in `SolidFieldType`:
10
+
11
+ - `int`
12
+ - `bigint`
13
+ - `decimal`
14
+ - `shortText`
15
+ - `longText`
16
+ - `richText`
17
+ - `json`
18
+ - `boolean`
19
+ - `date`
20
+ - `datetime`
21
+ - `time`
22
+ - `relation`
23
+ - `mediaSingle`
24
+ - `mediaMultiple`
25
+ - `email`
26
+ - `password`
27
+ - `selectionStatic`
28
+ - `selectionDynamic`
29
+ - `computed`
30
+ - `uuid`
31
+
32
+ Useful relation metadata:
33
+
34
+ - `relationType`: `many-to-one`, `one-to-many`, `many-to-many`
35
+ - `relationCascade`: `set null`, `restrict`, `cascade`
36
+
37
+ ## Modeling Philosophy
38
+
39
+ - Workflow definitions store their canonical DSL in YAML text.
40
+ - Workflow definitions are metadata-backed: manually created workflows should also be persisted back to the module metadata JSON so developers can commit and share them.
41
+ - Workflow execution data is normalized enough to support monitoring, filtering, and debugging.
42
+ - Workflow version history is not a separate model in v1.
43
+ - `definitionVersion` and `definitionChecksum` live on both definition and execution records.
44
+ - `WorkflowBlueprint` is intentionally deferred for now.
45
+
46
+ ## Model: `workflowDefinition`
47
+
48
+ Purpose: stores the current reusable workflow definition.
49
+
50
+ Suggested table name: `wm_workflow_definition`
51
+
52
+ | Field | SolidX Type | Required | Notes |
53
+ | --- | --- | --- | --- |
54
+ | `key` | `shortText` | Yes | Stable workflow key. Should be unique. |
55
+ | `moduleMetadata` | `relation` | Yes | Many-to-one to SolidX `moduleMetadata`; identifies the owning module/package for metadata persistence. |
56
+ | `displayName` | `shortText` | Yes | Human-facing name. |
57
+ | `namespace` | `shortText` | No | Dot-path grouping, e.g. `ops.monitoring`. |
58
+ | `description` | `longText` | No | Workflow description. |
59
+ | `status` | `selectionStatic` | Yes | `draft`, `active`, `inactive`, `archived`. |
60
+ | `definitionVersion` | `shortText` | No | Human-managed or seed-managed version string. |
61
+ | `definitionChecksum` | `shortText` | No | Hash of canonical `definitionYaml`. |
62
+ | `definitionYaml` | `longText` | Yes | Canonical workflow DSL YAML used for sharing, seeding, validation, and execution. |
63
+ | `tags` | `json` | No | Array of tags. |
64
+
65
+ Recommended indexes/search fields:
66
+
67
+ - `key`
68
+ - `moduleMetadata`
69
+ - `displayName`
70
+ - `namespace`
71
+ - `status`
72
+ - `definitionChecksum`
73
+
74
+ Recommended user key:
75
+
76
+ - `key`
77
+
78
+ Metadata persistence notes:
79
+
80
+ - `key` acts as the workflow user key and metadata identity.
81
+ - A TypeORM subscriber or workflow persistence service should synchronize workflow definition changes back to the owning module metadata JSON.
82
+ - Since UI-created workflows are also metadata-backed, separate `sourceType`, `seedSource`, `seedKey`, `seedVersion`, and `isSeeded` fields are not needed.
83
+
84
+ ## Model: `workflowExecution`
85
+
86
+ Purpose: stores one run of a workflow definition.
87
+
88
+ Suggested table name: `wm_workflow_execution`
89
+
90
+ | Field | SolidX Type | Required | Notes |
91
+ | --- | --- | --- | --- |
92
+ | `executionIdentifier` | `computed` | Yes | System-generated readable execution id. Recommended provider: `SequenceNumComputedFieldProvider`. |
93
+ | `workflowDefinition` | `relation` | Yes | Many-to-one to `workflowDefinition`. |
94
+ | `workflowKey` | `shortText` | Yes | Snapshot of definition key for easier querying. |
95
+ | `workflowDisplayName` | `shortText` | No | Snapshot of display name. |
96
+ | `status` | `selectionStatic` | Yes | `created`, `running`, `success`, `failed`, `cancelled`. |
97
+ | `triggerType` | `selectionStatic` | Yes | `manual`, `schedule`, `webhook`, `flow`, `polling`, `event`. |
98
+ | `triggerExecution` | `relation` | No | Many-to-one to `workflowTriggerExecution`; nullable for manual runs. |
99
+ | `startedAt` | `datetime` | No | Execution start time. |
100
+ | `finishedAt` | `datetime` | No | Execution end time. |
101
+ | `durationMs` | `bigint` | No | Runtime duration. |
102
+ | `inputPayload` | `json` | No | Runtime inputs supplied to the execution. |
103
+ | `outputPayload` | `json` | No | Flow-level outputs. |
104
+ | `definitionVersion` | `shortText` | No | Version used by this execution. |
105
+ | `definitionChecksum` | `shortText` | No | Checksum used by this execution. |
106
+ | `definitionSnapshot` | `longText` | Yes | Exact workflow YAML used for this run. |
107
+ | `errorSummary` | `longText` | No | Human-readable failure summary. |
108
+ | `errorDetails` | `json` | No | Structured error payload. |
109
+ | `requestedByUserId` | `bigint` | No | User id or actor id if available. |
110
+
111
+ Recommended indexes/search fields:
112
+
113
+ - `executionIdentifier`
114
+ - `workflowKey`
115
+ - `status`
116
+ - `triggerType`
117
+ - `startedAt`
118
+ - `finishedAt`
119
+ - `definitionChecksum`
120
+
121
+ Recommended computed field configuration:
122
+
123
+ - `type`: `computed`
124
+ - `computedFieldValueProvider`: `SequenceNumComputedFieldProvider`
125
+ - `computedFieldValueProviderCtxt`: `{"sequenceName":"workflowExecution","mode":"counter"}`
126
+ - `computedFieldValueType`: `string`
127
+ - `computedFieldTriggerConfig`: after insert for `workflowExecution`
128
+
129
+ Recommended model sequence:
130
+
131
+ - `sequenceName`: `workflowExecution`
132
+ - `prefix`: `WFE`
133
+ - `separator`: `-`
134
+ - `padding`: `8`
135
+ - Example output: `WFE-00000001`
136
+
137
+ ## Model: `workflowStepExecution`
138
+
139
+ Purpose: stores runtime state for one workflow node execution.
140
+
141
+ Suggested table name: `wm_workflow_step_execution`
142
+
143
+ | Field | SolidX Type | Required | Notes |
144
+ | --- | --- | --- | --- |
145
+ | `workflowExecution` | `relation` | Yes | Many-to-one to `workflowExecution`. |
146
+ | `parentStepExecution` | `relation` | No | Self many-to-one for nested/control execution. |
147
+ | `nodeId` | `shortText` | Yes | Node id from workflow YAML. |
148
+ | `nodeName` | `shortText` | No | Snapshot of node name. |
149
+ | `nodeKind` | `selectionStatic` | Yes | `task`, `control`, `subflow`. |
150
+ | `nodeType` | `shortText` | Yes | e.g. `http.request`, `if`. |
151
+ | `status` | `selectionStatic` | Yes | `pending`, `running`, `success`, `failed`, `skipped`. |
152
+ | `attemptNumber` | `int` | Yes | Defaults to 1. |
153
+ | `branchId` | `shortText` | No | For `parallel` branch context. |
154
+ | `iterationIndex` | `int` | No | For `forEach` context. |
155
+ | `startedAt` | `datetime` | No | Step start time. |
156
+ | `finishedAt` | `datetime` | No | Step end time. |
157
+ | `durationMs` | `bigint` | No | Step runtime duration. |
158
+ | `inputContext` | `json` | No | Resolved node input context. |
159
+ | `outputPayload` | `json` | No | Node outputs. |
160
+ | `errorSummary` | `longText` | No | Human-readable failure summary. |
161
+ | `errorDetails` | `json` | No | Structured error payload. |
162
+
163
+ Recommended indexes/search fields:
164
+
165
+ - `workflowExecution`
166
+ - `nodeId`
167
+ - `nodeType`
168
+ - `status`
169
+ - `startedAt`
170
+
171
+ ## Model: `workflowExecutionLog`
172
+
173
+ Purpose: stores execution and step logs as queryable records.
174
+
175
+ Suggested table name: `wm_workflow_execution_log`
176
+
177
+ | Field | SolidX Type | Required | Notes |
178
+ | --- | --- | --- | --- |
179
+ | `workflowExecution` | `relation` | Yes | Many-to-one to `workflowExecution`. |
180
+ | `workflowStepExecution` | `relation` | No | Many-to-one to `workflowStepExecution`; nullable for execution-level logs. |
181
+ | `level` | `selectionStatic` | Yes | `debug`, `info`, `warn`, `error`. |
182
+ | `message` | `longText` | Yes | Log message. |
183
+ | `metadata` | `json` | No | Structured log metadata. |
184
+ | `loggedAt` | `datetime` | Yes | Timestamp of log event. |
185
+
186
+ Recommended indexes/search fields:
187
+
188
+ - `workflowExecution`
189
+ - `workflowStepExecution`
190
+ - `level`
191
+ - `loggedAt`
192
+
193
+ ## Model: `workflowExecutionArtifact`
194
+
195
+ Purpose: stores references to files or large artifacts produced during execution.
196
+
197
+ Suggested table name: `wm_workflow_execution_artifact`
198
+
199
+ | Field | SolidX Type | Required | Notes |
200
+ | --- | --- | --- | --- |
201
+ | `workflowExecution` | `relation` | Yes | Many-to-one to `workflowExecution`. |
202
+ | `workflowStepExecution` | `relation` | No | Many-to-one to `workflowStepExecution`. |
203
+ | `artifactKey` | `shortText` | Yes | Stable artifact key within the execution. |
204
+ | `displayName` | `shortText` | No | Human-facing name. |
205
+ | `artifactType` | `selectionStatic` | Yes | `file`, `json`, `text`, `binary`, `uri`. |
206
+ | `media` | `mediaSingle` | No | SolidX media attachment for stored file artifacts. |
207
+ | `uri` | `longText` | No | External artifact URI if not stored in media. |
208
+ | `contentType` | `shortText` | No | MIME type if known. |
209
+ | `sizeBytes` | `bigint` | No | Artifact size. |
210
+ | `metadata` | `json` | No | Structured artifact metadata. |
211
+ | `createdAtRuntime` | `datetime` | No | Runtime artifact creation timestamp. |
212
+
213
+ Recommended indexes/search fields:
214
+
215
+ - `workflowExecution`
216
+ - `workflowStepExecution`
217
+ - `artifactKey`
218
+ - `artifactType`
219
+
220
+ ## Model: `workflowTriggerExecution`
221
+
222
+ Purpose: records trigger events that started or attempted to start workflow executions.
223
+
224
+ Suggested table name: `wm_workflow_trigger_execution`
225
+
226
+ | Field | SolidX Type | Required | Notes |
227
+ | --- | --- | --- | --- |
228
+ | `workflowDefinition` | `relation` | Yes | Many-to-one to `workflowDefinition`. |
229
+ | `triggerId` | `shortText` | Yes | Trigger id from workflow YAML. |
230
+ | `triggerType` | `selectionStatic` | Yes | `schedule`, `webhook`, `flow`, `polling`, `event`. |
231
+ | `status` | `selectionStatic` | Yes | `received`, `accepted`, `ignored`, `failed`. |
232
+ | `firedAt` | `datetime` | Yes | Trigger fire time. |
233
+ | `inputPayload` | `json` | No | Inputs supplied by trigger. |
234
+ | `triggerPayload` | `json` | No | Raw trigger/event payload. |
235
+ | `workflowExecution` | `relation` | No | Many-to-one to `workflowExecution`; nullable if ignored/failed before execution creation. |
236
+ | `errorSummary` | `longText` | No | Human-readable failure summary. |
237
+ | `errorDetails` | `json` | No | Structured error payload. |
238
+
239
+ Recommended indexes/search fields:
240
+
241
+ - `workflowDefinition`
242
+ - `triggerId`
243
+ - `triggerType`
244
+ - `status`
245
+ - `firedAt`
246
+
247
+ ## Deferred Model: `workflowBlueprint`
248
+
249
+ `WorkflowBlueprint` is intentionally ignored for now.
250
+
251
+ When reintroduced, it should likely include:
252
+
253
+ - `key`
254
+ - `displayName`
255
+ - `description`
256
+ - `tags`
257
+ - `definitionYaml`
258
+ - `source`
259
+ - `sourceVersion`
260
+
261
+ ## Relation Summary
262
+
263
+ - `workflowDefinition` has many `workflowExecution`
264
+ - `workflowDefinition` has many `workflowTriggerExecution`
265
+ - `moduleMetadata` has many `workflowDefinition`
266
+ - `workflowExecution` has many `workflowStepExecution`
267
+ - `workflowExecution` has many `workflowExecutionLog`
268
+ - `workflowExecution` has many `workflowExecutionArtifact`
269
+ - `workflowTriggerExecution` may link to one created `workflowExecution`
270
+ - `workflowStepExecution` may have many child `workflowStepExecution` records via `parentStepExecution`
271
+ - `workflowStepExecution` has many `workflowExecutionLog`
272
+ - `workflowStepExecution` has many `workflowExecutionArtifact`
273
+
274
+ ## MCP Modeling Readiness Checklist
275
+
276
+ Before calling the SolidX model MCP tools, confirm:
277
+
278
+ - Use `workflow-builder` as the module key.
279
+ - Use the six active models above.
280
+ - Use `longText` for `definitionYaml` and `definitionSnapshot`; parse them as YAML in the workflow services to keep the workflow engine DB agnostic.
281
+ - Use `selectionStatic` for status/type enum fields.
282
+ - Use `relation` fields for cross-model links.
283
+ - Add a many-to-one relation from `workflowDefinition` to SolidX `moduleMetadata`.
284
+ - Keep `WorkflowBlueprint` deferred.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidxai/core",
3
- "version": "0.1.13-beta.2",
3
+ "version": "0.1.13-beta.4",
4
4
  "description": "This module is a NestJS module containing all the required core providers required by a Solid application",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -7,6 +7,7 @@ interface SeedCommandOptions {
7
7
  seeder?: string;
8
8
  modulesToSeed?: string;
9
9
  prune?: boolean;
10
+ skipHooks?: boolean;
10
11
  }
11
12
 
12
13
  @Command({ name: 'seed', description: 'Install seed data for a given module' })
@@ -28,6 +29,7 @@ export class SeedCommand extends CommandRunner {
28
29
  modulesToSeed,
29
30
  pruneMetadata: false,
30
31
  seedGlobalMetadata: true,
32
+ skipHooks: false,
31
33
  };
32
34
  this.logger.log(`Modules to seed: ${modulesToSeed.join(', ')}`);
33
35
  } else {
@@ -39,10 +41,22 @@ export class SeedCommand extends CommandRunner {
39
41
  modulesToSeed: null,
40
42
  pruneMetadata: false,
41
43
  seedGlobalMetadata: true,
44
+ skipHooks: false,
42
45
  };
43
46
  parsedConf.pruneMetadata = true;
44
47
  }
45
48
 
49
+ if (options?.skipHooks) {
50
+ parsedConf = parsedConf ?? {
51
+ modulesToSeed: null,
52
+ pruneMetadata: false,
53
+ seedGlobalMetadata: true,
54
+ skipHooks: false,
55
+ };
56
+ parsedConf.skipHooks = true;
57
+ this.logger.log('Skipping pre-seed and post-seed hooks.');
58
+ }
59
+
46
60
  const seeder = this.solidRegistry
47
61
  .getSeeders()
48
62
  .filter((seeder) => seeder.name === options.seeder)
@@ -74,4 +88,9 @@ export class SeedCommand extends CommandRunner {
74
88
  parsePrune(): boolean {
75
89
  return true;
76
90
  }
91
+
92
+ @Option({ flags: '--skip-hooks', description: 'Skip emitting pre-seed and post-seed lifecycle hooks/events.' })
93
+ parseSkipHooks(): boolean {
94
+ return true;
95
+ }
77
96
  }
@@ -18,17 +18,17 @@ export class SavedFilters extends CommonEntity {
18
18
  isPrivate: boolean = false;
19
19
 
20
20
  @Index()
21
- @ManyToOne(() => User, { onDelete: "CASCADE", nullable: true })
21
+ @ManyToOne(() => User, { nullable: true })
22
22
  @JoinColumn()
23
23
  user: User;
24
24
 
25
25
  @Index()
26
- @ManyToOne(() => ModelMetadata, { onDelete: "CASCADE", nullable: false })
26
+ @ManyToOne(() => ModelMetadata, { nullable: false })
27
27
  @JoinColumn()
28
28
  model: ModelMetadata;
29
29
 
30
30
  @Index()
31
- @ManyToOne(() => ViewMetadata, { onDelete: "CASCADE", nullable: false })
31
+ @ManyToOne(() => ViewMetadata, { nullable: false })
32
32
  @JoinColumn()
33
33
  view: ViewMetadata;
34
34
 
@@ -35,7 +35,7 @@ export class WorkflowTriggerExecution extends CommonEntity {
35
35
  status: string = "received";
36
36
 
37
37
  @Index()
38
- @Column({ type: "boolean", nullable: true, default: false })
38
+ @Column({ nullable: true, default: false })
39
39
  matched: boolean = false;
40
40
 
41
41
  @Index()
package/src/index.ts CHANGED
@@ -248,10 +248,12 @@ export * from './services/workflow/workflow-expression.service'
248
248
  export * from './services/workflow/workflow-invocation.service'
249
249
  export * from './services/workflow/workflow-node-registry.service'
250
250
  export * from './services/workflow/workflow-runtime.service'
251
+ export * from './services/workflow/nodes/execution-fail.node'
251
252
  export * from './services/workflow/nodes/for-each.node'
252
253
  export * from './services/workflow/nodes/http-request.node'
253
254
  export * from './services/workflow/nodes/if.node'
254
255
  export * from './services/workflow/nodes/log-write.node'
256
+ export * from './services/workflow/nodes/loop-until.node'
255
257
  export * from './services/workflow/nodes/parallel.node'
256
258
  export * from './services/workflow/nodes/sequential.node'
257
259
  export * from './services/workflow/nodes/solidx-crud.nodes'
package/src/interfaces.ts CHANGED
@@ -272,6 +272,7 @@ export interface ModuleMetadataSeederOptions {
272
272
  modulesToSeed: string[] | null;
273
273
  pruneMetadata: boolean;
274
274
  seedGlobalMetadata: boolean;
275
+ skipHooks: boolean;
275
276
  }
276
277
 
277
278
  export interface ModuleMetadataSeederEventPayload {
@@ -148,24 +148,30 @@ export class ModuleMetadataSeederService {
148
148
  let modulesToSeed: string[] | null = null;
149
149
  const requestedModulesToSeed = Array.isArray(conf?.modulesToSeed) ? [...conf.modulesToSeed] : null;
150
150
  const shouldSeedGlobalMetadata = conf?.seedGlobalMetadata !== false;
151
+ const skipHooks = Boolean(conf?.skipHooks);
151
152
  const seedOptions: ModuleMetadataSeederEventPayload['options'] = {
152
153
  modulesToSeed: requestedModulesToSeed,
153
154
  pruneMetadata: Boolean(conf?.pruneMetadata),
154
155
  seedGlobalMetadata: shouldSeedGlobalMetadata,
156
+ skipHooks,
155
157
  };
156
158
  const seedRunId = uuidv4();
157
159
  const startedAt = new Date();
158
160
  const seededModuleNames: string[] = [];
159
161
 
160
- this.emitModuleMetadataSeederEvent(
161
- EventType.MODULE_METADATA_SEEDER_STARTED,
162
- {
163
- seedRunId,
164
- options: seedOptions,
165
- startedAt: startedAt.toISOString(),
166
- currentStep,
167
- },
168
- );
162
+ if (skipHooks) {
163
+ console.log('▶ Skipping pre-seed hooks (--skip-hooks).');
164
+ } else {
165
+ this.emitModuleMetadataSeederEvent(
166
+ EventType.MODULE_METADATA_SEEDER_STARTED,
167
+ {
168
+ seedRunId,
169
+ options: seedOptions,
170
+ startedAt: startedAt.toISOString(),
171
+ currentStep,
172
+ },
173
+ );
174
+ }
169
175
 
170
176
  try {
171
177
  this.enablePruning = Boolean(conf?.pruneMetadata);
@@ -323,37 +329,45 @@ export class ModuleMetadataSeederService {
323
329
  // Add a console log indicating seeding is finished. This needs to be console.log so that it looks proper when this code is run via CLI.
324
330
  console.log(`✔ Seeding completed.`);
325
331
  //this.logger.log(`All Seeders finished`);
326
- await this.emitModuleMetadataSeederFinishedEvent(
327
- EventType.MODULE_METADATA_SEEDER_FINISHED,
328
- {
329
- seedRunId,
330
- options: seedOptions,
331
- startedAt: startedAt.toISOString(),
332
- finishedAt: new Date().toISOString(),
333
- durationMs: Date.now() - startedAt.getTime(),
334
- success: true,
335
- seededModuleNames,
336
- currentStep,
337
- },
338
- );
332
+ if (skipHooks) {
333
+ console.log('▶ Skipping post-seed hooks (--skip-hooks).');
334
+ } else {
335
+ await this.emitModuleMetadataSeederFinishedEvent(
336
+ EventType.MODULE_METADATA_SEEDER_FINISHED,
337
+ {
338
+ seedRunId,
339
+ options: seedOptions,
340
+ startedAt: startedAt.toISOString(),
341
+ finishedAt: new Date().toISOString(),
342
+ durationMs: Date.now() - startedAt.getTime(),
343
+ success: true,
344
+ seededModuleNames,
345
+ currentStep,
346
+ },
347
+ );
348
+ }
339
349
 
340
350
  //FIXME: Handle displaying the created users credentials in a better way.
341
351
  // this.logger.log(`Newly created username is: ${usersDetail?.length > 0 ? usersDetail[0]?.username : ''} and password is ${usersDetail?.length > 0 ? usersDetail[0]?.password : ''}`);
342
352
  } catch (error: any) {
343
- await this.emitModuleMetadataSeederFinishedEvent(
344
- EventType.MODULE_METADATA_SEEDER_FINISHED,
345
- {
346
- seedRunId,
347
- options: seedOptions,
348
- startedAt: startedAt.toISOString(),
349
- finishedAt: new Date().toISOString(),
350
- durationMs: Date.now() - startedAt.getTime(),
351
- success: false,
352
- seededModuleNames,
353
- currentStep,
354
- errorMessage: error?.message,
355
- },
356
- );
353
+ if (skipHooks) {
354
+ console.log('▶ Skipping post-seed hooks (--skip-hooks).');
355
+ } else {
356
+ await this.emitModuleMetadataSeederFinishedEvent(
357
+ EventType.MODULE_METADATA_SEEDER_FINISHED,
358
+ {
359
+ seedRunId,
360
+ options: seedOptions,
361
+ startedAt: startedAt.toISOString(),
362
+ finishedAt: new Date().toISOString(),
363
+ durationMs: Date.now() - startedAt.getTime(),
364
+ success: false,
365
+ seededModuleNames,
366
+ currentStep,
367
+ errorMessage: error?.message,
368
+ },
369
+ );
370
+ }
357
371
  this.logSeedFailureForCli(error, {
358
372
  moduleName: currentModule,
359
373
  step: currentStep,