@solidxai/core 0.1.13-beta.10 → 0.1.13-beta.12

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 (105) hide show
  1. package/CHANGELOG.md +1115 -0
  2. package/dist/commands/run-tests.command.d.ts +2 -0
  3. package/dist/commands/run-tests.command.d.ts.map +1 -1
  4. package/dist/commands/run-tests.command.js +20 -3
  5. package/dist/commands/run-tests.command.js.map +1 -1
  6. package/dist/entities/dashboard-user-layout.entity.js +2 -2
  7. package/dist/entities/dashboard-user-layout.entity.js.map +1 -1
  8. package/dist/entities/view-metadata.entity.js.map +1 -1
  9. package/dist/entities/workflow-execution-artifact.entity.d.ts.map +1 -1
  10. package/dist/entities/workflow-execution-artifact.entity.js +4 -3
  11. package/dist/entities/workflow-execution-artifact.entity.js.map +1 -1
  12. package/dist/entities/workflow-execution-log.entity.d.ts.map +1 -1
  13. package/dist/entities/workflow-execution-log.entity.js +4 -3
  14. package/dist/entities/workflow-execution-log.entity.js.map +1 -1
  15. package/dist/entities/workflow-execution.entity.d.ts.map +1 -1
  16. package/dist/entities/workflow-execution.entity.js +3 -2
  17. package/dist/entities/workflow-execution.entity.js.map +1 -1
  18. package/dist/entities/workflow-secret.entity.d.ts.map +1 -1
  19. package/dist/entities/workflow-secret.entity.js +3 -2
  20. package/dist/entities/workflow-secret.entity.js.map +1 -1
  21. package/dist/entities/workflow-step-execution.entity.d.ts.map +1 -1
  22. package/dist/entities/workflow-step-execution.entity.js +3 -2
  23. package/dist/entities/workflow-step-execution.entity.js.map +1 -1
  24. package/dist/entities/workflow-trigger-execution.entity.d.ts.map +1 -1
  25. package/dist/entities/workflow-trigger-execution.entity.js +6 -5
  26. package/dist/entities/workflow-trigger-execution.entity.js.map +1 -1
  27. package/dist/helpers/typeorm-db-helper.d.ts.map +1 -1
  28. package/dist/helpers/typeorm-db-helper.js +9 -0
  29. package/dist/helpers/typeorm-db-helper.js.map +1 -1
  30. package/dist/testing/reporter/console-reporter.d.ts +3 -0
  31. package/dist/testing/reporter/console-reporter.d.ts.map +1 -1
  32. package/dist/testing/reporter/console-reporter.js +2 -0
  33. package/dist/testing/reporter/console-reporter.js.map +1 -1
  34. package/dist/testing/reporter/progress-reporter.d.ts +64 -0
  35. package/dist/testing/reporter/progress-reporter.d.ts.map +1 -0
  36. package/dist/testing/reporter/progress-reporter.js +224 -0
  37. package/dist/testing/reporter/progress-reporter.js.map +1 -0
  38. package/dist/testing/reporter/reporter.types.d.ts +3 -0
  39. package/dist/testing/reporter/reporter.types.d.ts.map +1 -1
  40. package/dist/testing/reporter/reporter.types.js.map +1 -1
  41. package/dist/testing/runner/run-from-metadata.d.ts.map +1 -1
  42. package/dist/testing/runner/run-from-metadata.js +1 -0
  43. package/dist/testing/runner/run-from-metadata.js.map +1 -1
  44. package/dist-tests/api/authenticate.spec.js +119 -0
  45. package/dist-tests/api/authenticate.spec.js.map +1 -0
  46. package/dist-tests/api/crud-service.findOne.cityMaster.spec.js +97 -0
  47. package/dist-tests/api/crud-service.findOne.cityMaster.spec.js.map +1 -0
  48. package/dist-tests/api/ping.spec.js +21 -0
  49. package/dist-tests/api/ping.spec.js.map +1 -0
  50. package/dist-tests/helpers/auth.js +41 -0
  51. package/dist-tests/helpers/auth.js.map +1 -0
  52. package/dist-tests/helpers/env.js +11 -0
  53. package/dist-tests/helpers/env.js.map +1 -0
  54. package/docs/agent-builder/notebook-lm-prompt-for-agent-builder.md +136 -0
  55. package/docs/agent-builder/team-ready-note-agent-builder.md +305 -0
  56. package/docs/agent-hub-grooming.md +301 -0
  57. package/docs/dashboards/AGENTIC_DASHBOARD_IMPLEMENTATION_PLAN.md +438 -0
  58. package/docs/dashboards/dashboard-curl-smoke-tests.txt +146 -0
  59. package/docs/dashboards/delete-legacy-dashboard-metadata.sql +172 -0
  60. package/docs/datasource-introspection-ddl-analysis.md +326 -0
  61. package/docs/datasource-introspection-implementation-plan.md +306 -0
  62. package/docs/grouping-enhancements.md +89 -0
  63. package/docs/java-spring/README.md +3 -0
  64. package/docs/java-spring/solid-core-module-deep-dive-report.md +1317 -0
  65. package/docs/module-package-import-handoff.md +691 -0
  66. package/docs/seed-changes.md +65 -0
  67. package/docs/test-data-workflow.md +200 -0
  68. package/docs/type-declaration-import-issue.md +24 -0
  69. package/docs/workflow/business-automation-example-notes.md +309 -0
  70. package/docs/workflow/control-flow-node-addition-sop.md +324 -0
  71. package/docs/workflow/data-engineering-pipeline-example-notes.md +330 -0
  72. package/docs/workflow/foreach-example-notes.md +187 -0
  73. package/docs/workflow/hello-world-example-notes.md +271 -0
  74. package/docs/workflow/kestra-concepts-plugins-blueprints.md +315 -0
  75. package/docs/workflow/loop-until-example-notes.md +198 -0
  76. package/docs/workflow/microservices-and-apis-example-notes.md +264 -0
  77. package/docs/workflow/samples.md +25 -0
  78. package/docs/workflow/what-is-kestra.md +79 -0
  79. package/docs/workflow/workflow-core-module-handoff-summary.md +191 -0
  80. package/docs/workflow/workflow-module-brd.md +185 -0
  81. package/docs/workflow/workflow-module-domain-model.md +252 -0
  82. package/docs/workflow/workflow-module-metadata-dsl.md +302 -0
  83. package/docs/workflow/workflow-module-technical-spec.md +293 -0
  84. package/docs/workflow/workflow-node-type-contracts.md +635 -0
  85. package/docs/workflow/workflow-node-ui-metadata-contract.md +1262 -0
  86. package/docs/workflow/workflow-solidx-model-field-spec.md +284 -0
  87. package/package.json +1 -1
  88. package/src/commands/run-tests.command.ts +17 -3
  89. package/src/entities/dashboard-user-layout.entity.ts +2 -2
  90. package/src/entities/view-metadata.entity.ts +2 -2
  91. package/src/entities/workflow-execution-artifact.entity.ts +4 -3
  92. package/src/entities/workflow-execution-log.entity.ts +4 -3
  93. package/src/entities/workflow-execution.entity.ts +3 -2
  94. package/src/entities/workflow-secret.entity.ts +3 -2
  95. package/src/entities/workflow-step-execution.entity.ts +3 -2
  96. package/src/entities/workflow-trigger-execution.entity.ts +6 -5
  97. package/src/helpers/typeorm-db-helper.ts +12 -1
  98. package/src/testing/README.md +2 -1
  99. package/src/testing/reporter/console-reporter.ts +4 -0
  100. package/src/testing/reporter/progress-reporter.ts +251 -0
  101. package/src/testing/reporter/reporter.types.ts +3 -0
  102. package/src/testing/runner/run-from-metadata.ts +1 -0
  103. package/.claude/settings.local.json +0 -16
  104. package/CLAUDE.md +0 -26
  105. package/src/services/1.js +0 -6
@@ -0,0 +1,251 @@
1
+ import * as readline from "readline";
2
+ import type { StepPhase } from "../contracts/runtime-context.types";
3
+ import type { OpStep, ScenarioSpec } from "../contracts/testing-metadata.types";
4
+ import type { SolidTestSpecResult } from "../contracts/test-spec.types";
5
+ import type { Reporter } from "./reporter.types";
6
+
7
+ const ANSI_BOLD = "\u001b[1m";
8
+ const ANSI_BOLD_OFF = "\u001b[22m";
9
+ const ANSI_DIM = "\u001b[2m";
10
+ const ANSI_GREEN = "\u001b[32m";
11
+ const ANSI_COLOR_OFF = "\u001b[39m";
12
+ const ANSI_RED = "\u001b[31m";
13
+ const ANSI_INVERSE = "\u001b[7m";
14
+ const ANSI_INVERSE_OFF = "\u001b[27m";
15
+
16
+ export class ProgressReporter implements Reporter {
17
+ private startedAt = Date.now();
18
+ private total = 0;
19
+ private completed = 0;
20
+ private passed = 0;
21
+ private failed = 0;
22
+ private timer?: NodeJS.Timeout;
23
+ private rendered = false;
24
+
25
+ constructor(private readonly delegate: Reporter) {}
26
+
27
+ onRunStart(args: { total: number }): void {
28
+ this.total = args.total;
29
+ this.startedAt = Date.now();
30
+ this.completed = 0;
31
+ this.passed = 0;
32
+ this.failed = 0;
33
+ this.delegate.onRunStart?.(args);
34
+ this.startTimer();
35
+ this.renderFooter();
36
+ }
37
+
38
+ onScenarioStart(scenario: ScenarioSpec): void {
39
+ this.withFooterPaused(() => this.delegate.onScenarioStart(scenario));
40
+ }
41
+
42
+ onScenarioEnd(
43
+ scenario: ScenarioSpec,
44
+ result: { ok: boolean; error?: unknown; durationMs: number },
45
+ ): void {
46
+ this.completed += 1;
47
+ if (result.ok) {
48
+ this.passed += 1;
49
+ } else {
50
+ this.failed += 1;
51
+ }
52
+ this.withFooterPaused(() => this.delegate.onScenarioEnd(scenario, result));
53
+ }
54
+
55
+ onStepStart(args: {
56
+ scenarioId: string;
57
+ phase: StepPhase;
58
+ step: OpStep;
59
+ }): void {
60
+ this.withFooterPaused(() => this.delegate.onStepStart(args));
61
+ }
62
+
63
+ onStepEnd(args: {
64
+ scenarioId: string;
65
+ phase: StepPhase;
66
+ step: OpStep;
67
+ ok: boolean;
68
+ error?: unknown;
69
+ durationMs: number;
70
+ }): void {
71
+ this.withFooterPaused(() => this.delegate.onStepEnd(args));
72
+ }
73
+
74
+ onSpecResult(args: {
75
+ scenarioId: string;
76
+ specId: string;
77
+ stepName?: string;
78
+ result: SolidTestSpecResult;
79
+ }): void {
80
+ this.withFooterPaused(() => this.delegate.onSpecResult?.(args));
81
+ }
82
+
83
+ attach(args: {
84
+ scenarioId: string;
85
+ name: string;
86
+ contentType: string;
87
+ data: Buffer | string;
88
+ }): void {
89
+ this.withFooterPaused(() => this.delegate.attach?.(args));
90
+ }
91
+
92
+ onRunEnd(args: {
93
+ ok: boolean;
94
+ total: number;
95
+ passed: number;
96
+ failed: number;
97
+ durationMs: number;
98
+ }): void {
99
+ this.completed = args.passed + args.failed;
100
+ this.passed = args.passed;
101
+ this.failed = args.failed;
102
+ this.total = args.total;
103
+ this.stopTimer();
104
+ this.withFooterPaused(() => this.delegate.onRunEnd?.(args), false);
105
+ }
106
+
107
+ private startTimer(): void {
108
+ this.stopTimer();
109
+ if (!this.isInteractive()) {
110
+ return;
111
+ }
112
+ this.timer = setInterval(() => this.renderFooter(), 1_000);
113
+ this.timer.unref?.();
114
+ }
115
+
116
+ private stopTimer(): void {
117
+ if (!this.timer) {
118
+ return;
119
+ }
120
+ clearInterval(this.timer);
121
+ this.timer = undefined;
122
+ }
123
+
124
+ private withFooterPaused(callback: () => void, renderAfter = true): void {
125
+ this.clearFooter();
126
+ callback();
127
+ if (renderAfter) {
128
+ this.renderFooter();
129
+ }
130
+ }
131
+
132
+ private renderFooter(): void {
133
+ if (!this.isInteractive()) {
134
+ return;
135
+ }
136
+
137
+ const terminalWidth = process.stdout.columns || 80;
138
+ const elapsed = formatElapsed(Date.now() - this.startedAt);
139
+ const progressText = `${this.completed}/${this.total}`;
140
+ const resultText = `${ANSI_GREEN}${this.passed} passed${ANSI_COLOR_OFF}${ANSI_DIM} | ${ANSI_BOLD_OFF}${this.failed ? ANSI_RED : ANSI_DIM}${this.failed} failed${this.failed ? ANSI_COLOR_OFF : ANSI_BOLD_OFF}`;
141
+ const footer = [
142
+ `${ANSI_BOLD}Tests${ANSI_BOLD_OFF}: ${this.renderProgressBar(terminalWidth)} ${progressText}`,
143
+ `${ANSI_BOLD}Elapsed${ANSI_BOLD_OFF}: ${elapsed}`,
144
+ resultText,
145
+ ].join(`${ANSI_DIM} | ${ANSI_BOLD_OFF}`);
146
+
147
+ readline.clearLine(process.stdout, 0);
148
+ readline.cursorTo(process.stdout, 0);
149
+ process.stdout.write(truncateAnsiText(`${ANSI_INVERSE} ${footer} ${ANSI_INVERSE_OFF}`, terminalWidth));
150
+ this.rendered = true;
151
+ }
152
+
153
+ private clearFooter(): void {
154
+ if (!this.rendered || !this.isInteractive()) {
155
+ return;
156
+ }
157
+ readline.clearLine(process.stdout, 0);
158
+ readline.cursorTo(process.stdout, 0);
159
+ this.rendered = false;
160
+ }
161
+
162
+ private renderProgressBar(terminalWidth: number): string {
163
+ const width = terminalWidth >= 120 ? 30 : terminalWidth >= 90 ? 22 : 14;
164
+ const ratio = this.total > 0 ? Math.min(1, this.completed / this.total) : 0;
165
+ const filled = Math.round(width * ratio);
166
+ const empty = Math.max(0, width - filled);
167
+ return `[${ANSI_GREEN}${"=".repeat(filled)}${ANSI_COLOR_OFF}${" ".repeat(empty)}]`;
168
+ }
169
+
170
+ private isInteractive(): boolean {
171
+ return Boolean(process.stdout.isTTY || process.env.SOLIDCTL_TEST_PROGRESS === "1");
172
+ }
173
+ }
174
+
175
+ function formatElapsed(durationMs: number): string {
176
+ const totalSeconds = Math.max(0, Math.floor(durationMs / 1000));
177
+ const minutes = Math.floor(totalSeconds / 60);
178
+ const seconds = totalSeconds % 60;
179
+ if (minutes < 60) {
180
+ return `${minutes}:${seconds.toString().padStart(2, "0")}`;
181
+ }
182
+ const hours = Math.floor(minutes / 60);
183
+ const remainingMinutes = minutes % 60;
184
+ return `${hours}:${remainingMinutes.toString().padStart(2, "0")}:${seconds.toString().padStart(2, "0")}`;
185
+ }
186
+
187
+ function truncateAnsiText(text: string, maxWidth: number): string {
188
+ if (maxWidth <= 0) {
189
+ return "";
190
+ }
191
+
192
+ let visibleWidth = 0;
193
+ let index = 0;
194
+ let output = "";
195
+ let hasEscape = false;
196
+
197
+ while (index < text.length) {
198
+ if (text[index] === "\u001b") {
199
+ const match = /\u001b\[[0-9;]*m/.exec(text.slice(index));
200
+ if (!match) {
201
+ break;
202
+ }
203
+ output += match[0];
204
+ hasEscape = true;
205
+ index += match[0].length;
206
+ continue;
207
+ }
208
+
209
+ if (visibleWidth >= maxWidth) {
210
+ break;
211
+ }
212
+
213
+ output += text[index];
214
+ visibleWidth += 1;
215
+ index += 1;
216
+ }
217
+
218
+ if (index < text.length && maxWidth >= 1) {
219
+ output = trimAnsiText(output, maxWidth - 1) + "…";
220
+ }
221
+
222
+ if (hasEscape && !output.endsWith(ANSI_INVERSE_OFF)) {
223
+ output += ANSI_INVERSE_OFF;
224
+ }
225
+
226
+ return output;
227
+ }
228
+
229
+ function trimAnsiText(text: string, maxWidth: number): string {
230
+ let visibleWidth = 0;
231
+ let index = 0;
232
+ let output = "";
233
+
234
+ while (index < text.length && visibleWidth < maxWidth) {
235
+ if (text[index] === "\u001b") {
236
+ const match = /\u001b\[[0-9;]*m/.exec(text.slice(index));
237
+ if (!match) {
238
+ break;
239
+ }
240
+ output += match[0];
241
+ index += match[0].length;
242
+ continue;
243
+ }
244
+
245
+ output += text[index];
246
+ visibleWidth += 1;
247
+ index += 1;
248
+ }
249
+
250
+ return output;
251
+ }
@@ -3,6 +3,9 @@ import type { OpStep, ScenarioSpec } from "../contracts/testing-metadata.types";
3
3
  import type { SolidTestSpecResult } from "../contracts/test-spec.types";
4
4
 
5
5
  export interface Reporter {
6
+ onRunStart?(args: {
7
+ total: number;
8
+ }): void;
6
9
  onScenarioStart(scenario: ScenarioSpec): void;
7
10
  onScenarioEnd(
8
11
  scenario: ScenarioSpec,
@@ -67,6 +67,7 @@ export async function runFromMetadata(opts: RunnerOptions): Promise<void> {
67
67
 
68
68
  const resources = new SimpleResourceStore();
69
69
  const reporter = opts.reporter ?? new ConsoleReporter();
70
+ reporter.onRunStart?.({ total: scenarios.length });
70
71
  const api = new ApiAdapter(opts.api);
71
72
  const { PlaywrightAdapter } = await import("../adapters/ui/playwright-adapter");
72
73
  const ui = new PlaywrightAdapter(opts.ui);
@@ -1,16 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(node -e:*)",
5
- "WebFetch(domain:docs.solidxai.com)",
6
- "WebFetch(domain:github.com)",
7
- "Read(//Users/oswald/projects/Solid_Starters/solidctl/**)",
8
- "Read(//Users/oswald/projects/Solid_Starters/**)",
9
- "Bash(find /Users/oswald/projects/Solid_Starters/solid-core-module -type d -name migration* -o -name *database*)",
10
- "Bash(node verify-imports.js)"
11
- ],
12
- "additionalDirectories": [
13
- "/Users/oswald/projects/Solid_Starters/solidctl"
14
- ]
15
- }
16
- }
package/CLAUDE.md DELETED
@@ -1,26 +0,0 @@
1
- # This is the SolidX API project.
2
- This is included as a dependency in consuming projects.
3
-
4
- # SolidX UI
5
- # The corresponding UI project is at the below path:
6
- /Users/oswald/projects/Solid_Starters/solid-core-ui
7
-
8
- # SolidX Docs
9
- # The documentation project is at the below path:
10
- /Users/oswald/projects/solidxai-docs
11
-
12
- # SolidX Agent
13
- # The agent project which has the skills for helping users configure, build and use SolidX is at the below path:
14
- /Users/oswald/projects/Solid_Starters/agent
15
-
16
- # SolidX Control Plane Commands
17
- # The control plane commands for managing SolidX instances are in the below path:
18
- /Users/oswald/projects/Solid_Starters/solidctl
19
-
20
- # Testing reference project
21
- # This is the reference library management project that is used for testing and development of SolidX features. It is located at the below path:
22
- /Users/oswald/projects/Solid_Starters/solid-library-management
23
-
24
- # Code Builder project
25
- # This is the project that contains the code builder which generates code based on user input and templates. It is located at the below path:
26
- /Users/oswald/projects/Solid_Starters/solid-code-builder
package/src/services/1.js DELETED
@@ -1,6 +0,0 @@
1
- 1. Do i need to create a storeStreams method for aws service too?
2
- - Handle later
3
- 2. queues handling -> if queues is enabled by default, i.e triggerExport(exportTransactionEntity.id).
4
- - startExport should either return the data or return the transaction id
5
- 3. How to handle scenarios wherein, nested related exist.(do i need to only get the userkey)
6
- - show the userKey