@stackweld/core 0.2.0
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.
- package/.turbo/turbo-build.log +4 -0
- package/.turbo/turbo-lint.log +498 -0
- package/.turbo/turbo-test.log +21 -0
- package/.turbo/turbo-typecheck.log +4 -0
- package/dist/__tests__/compatibility-scorer.test.d.ts +2 -0
- package/dist/__tests__/compatibility-scorer.test.d.ts.map +1 -0
- package/dist/__tests__/compatibility-scorer.test.js +226 -0
- package/dist/__tests__/compatibility-scorer.test.js.map +1 -0
- package/dist/__tests__/rules-engine.test.d.ts +2 -0
- package/dist/__tests__/rules-engine.test.d.ts.map +1 -0
- package/dist/__tests__/rules-engine.test.js +161 -0
- package/dist/__tests__/rules-engine.test.js.map +1 -0
- package/dist/__tests__/scaffold-orchestrator.test.d.ts +2 -0
- package/dist/__tests__/scaffold-orchestrator.test.d.ts.map +1 -0
- package/dist/__tests__/scaffold-orchestrator.test.js +149 -0
- package/dist/__tests__/scaffold-orchestrator.test.js.map +1 -0
- package/dist/__tests__/stack-engine.test.d.ts +2 -0
- package/dist/__tests__/stack-engine.test.d.ts.map +1 -0
- package/dist/__tests__/stack-engine.test.js +278 -0
- package/dist/__tests__/stack-engine.test.js.map +1 -0
- package/dist/db/database.d.ts +9 -0
- package/dist/db/database.d.ts.map +1 -0
- package/dist/db/database.js +106 -0
- package/dist/db/database.js.map +1 -0
- package/dist/db/index.d.ts +2 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +2 -0
- package/dist/db/index.js.map +1 -0
- package/dist/engine/compatibility-scorer.d.ts +37 -0
- package/dist/engine/compatibility-scorer.d.ts.map +1 -0
- package/dist/engine/compatibility-scorer.js +178 -0
- package/dist/engine/compatibility-scorer.js.map +1 -0
- package/dist/engine/compose-generator.d.ts +35 -0
- package/dist/engine/compose-generator.d.ts.map +1 -0
- package/dist/engine/compose-generator.js +95 -0
- package/dist/engine/compose-generator.js.map +1 -0
- package/dist/engine/cost-estimator.d.ts +22 -0
- package/dist/engine/cost-estimator.d.ts.map +1 -0
- package/dist/engine/cost-estimator.js +451 -0
- package/dist/engine/cost-estimator.js.map +1 -0
- package/dist/engine/env-analyzer.d.ts +36 -0
- package/dist/engine/env-analyzer.d.ts.map +1 -0
- package/dist/engine/env-analyzer.js +111 -0
- package/dist/engine/env-analyzer.js.map +1 -0
- package/dist/engine/health-checker.d.ts +20 -0
- package/dist/engine/health-checker.d.ts.map +1 -0
- package/dist/engine/health-checker.js +377 -0
- package/dist/engine/health-checker.js.map +1 -0
- package/dist/engine/index.d.ts +11 -0
- package/dist/engine/index.d.ts.map +1 -0
- package/dist/engine/index.js +7 -0
- package/dist/engine/index.js.map +1 -0
- package/dist/engine/infra-generator.d.ts +26 -0
- package/dist/engine/infra-generator.d.ts.map +1 -0
- package/dist/engine/infra-generator.js +751 -0
- package/dist/engine/infra-generator.js.map +1 -0
- package/dist/engine/migration-planner.d.ts +34 -0
- package/dist/engine/migration-planner.d.ts.map +1 -0
- package/dist/engine/migration-planner.js +427 -0
- package/dist/engine/migration-planner.js.map +1 -0
- package/dist/engine/performance-profiler.d.ts +22 -0
- package/dist/engine/performance-profiler.d.ts.map +1 -0
- package/dist/engine/performance-profiler.js +292 -0
- package/dist/engine/performance-profiler.js.map +1 -0
- package/dist/engine/plugin-loader.d.ts +36 -0
- package/dist/engine/plugin-loader.d.ts.map +1 -0
- package/dist/engine/plugin-loader.js +157 -0
- package/dist/engine/plugin-loader.js.map +1 -0
- package/dist/engine/preferences.d.ts +24 -0
- package/dist/engine/preferences.d.ts.map +1 -0
- package/dist/engine/preferences.js +62 -0
- package/dist/engine/preferences.js.map +1 -0
- package/dist/engine/rules-engine.d.ts +31 -0
- package/dist/engine/rules-engine.d.ts.map +1 -0
- package/dist/engine/rules-engine.js +179 -0
- package/dist/engine/rules-engine.js.map +1 -0
- package/dist/engine/runtime-manager.d.ts +65 -0
- package/dist/engine/runtime-manager.d.ts.map +1 -0
- package/dist/engine/runtime-manager.js +181 -0
- package/dist/engine/runtime-manager.js.map +1 -0
- package/dist/engine/scaffold-orchestrator.d.ts +103 -0
- package/dist/engine/scaffold-orchestrator.d.ts.map +1 -0
- package/dist/engine/scaffold-orchestrator.js +934 -0
- package/dist/engine/scaffold-orchestrator.js.map +1 -0
- package/dist/engine/stack-detector.d.ts +21 -0
- package/dist/engine/stack-detector.d.ts.map +1 -0
- package/dist/engine/stack-detector.js +313 -0
- package/dist/engine/stack-detector.js.map +1 -0
- package/dist/engine/stack-differ.d.ts +26 -0
- package/dist/engine/stack-differ.d.ts.map +1 -0
- package/dist/engine/stack-differ.js +80 -0
- package/dist/engine/stack-differ.js.map +1 -0
- package/dist/engine/stack-engine.d.ts +54 -0
- package/dist/engine/stack-engine.d.ts.map +1 -0
- package/dist/engine/stack-engine.js +186 -0
- package/dist/engine/stack-engine.js.map +1 -0
- package/dist/engine/stack-serializer.d.ts +32 -0
- package/dist/engine/stack-serializer.d.ts.map +1 -0
- package/dist/engine/stack-serializer.js +75 -0
- package/dist/engine/stack-serializer.js.map +1 -0
- package/dist/engine/standards-linter.d.ts +34 -0
- package/dist/engine/standards-linter.d.ts.map +1 -0
- package/dist/engine/standards-linter.js +162 -0
- package/dist/engine/standards-linter.js.map +1 -0
- package/dist/engine/tech-installer.d.ts +37 -0
- package/dist/engine/tech-installer.d.ts.map +1 -0
- package/dist/engine/tech-installer.js +508 -0
- package/dist/engine/tech-installer.js.map +1 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/project.d.ts +33 -0
- package/dist/types/project.d.ts.map +1 -0
- package/dist/types/project.js +6 -0
- package/dist/types/project.js.map +1 -0
- package/dist/types/stack.d.ts +29 -0
- package/dist/types/stack.d.ts.map +1 -0
- package/dist/types/stack.js +6 -0
- package/dist/types/stack.js.map +1 -0
- package/dist/types/technology.d.ts +47 -0
- package/dist/types/technology.d.ts.map +1 -0
- package/dist/types/technology.js +6 -0
- package/dist/types/technology.js.map +1 -0
- package/dist/types/template.d.ts +34 -0
- package/dist/types/template.d.ts.map +1 -0
- package/dist/types/template.js +6 -0
- package/dist/types/template.js.map +1 -0
- package/dist/types/validation.d.ts +20 -0
- package/dist/types/validation.d.ts.map +1 -0
- package/dist/types/validation.js +5 -0
- package/dist/types/validation.js.map +1 -0
- package/package.json +39 -0
- package/src/__tests__/compatibility-scorer.test.ts +264 -0
- package/src/__tests__/rules-engine.test.ts +170 -0
- package/src/__tests__/scaffold-orchestrator.test.ts +161 -0
- package/src/__tests__/stack-engine.test.ts +328 -0
- package/src/db/database.ts +112 -0
- package/src/db/index.ts +1 -0
- package/src/engine/compatibility-scorer.ts +222 -0
- package/src/engine/compose-generator.ts +134 -0
- package/src/engine/cost-estimator.ts +498 -0
- package/src/engine/env-analyzer.ts +156 -0
- package/src/engine/health-checker.ts +421 -0
- package/src/engine/index.ts +17 -0
- package/src/engine/infra-generator.ts +837 -0
- package/src/engine/migration-planner.ts +496 -0
- package/src/engine/performance-profiler.ts +354 -0
- package/src/engine/plugin-loader.ts +216 -0
- package/src/engine/preferences.ts +85 -0
- package/src/engine/rules-engine.ts +204 -0
- package/src/engine/runtime-manager.ts +207 -0
- package/src/engine/scaffold-orchestrator.ts +1052 -0
- package/src/engine/stack-detector.ts +345 -0
- package/src/engine/stack-differ.ts +118 -0
- package/src/engine/stack-engine.ts +258 -0
- package/src/engine/stack-serializer.ts +95 -0
- package/src/engine/standards-linter.ts +210 -0
- package/src/engine/tech-installer.ts +650 -0
- package/src/index.ts +78 -0
- package/src/types/index.ts +10 -0
- package/src/types/project.ts +36 -0
- package/src/types/stack.ts +32 -0
- package/src/types/technology.ts +58 -0
- package/src/types/template.ts +37 -0
- package/src/types/validation.ts +22 -0
- package/tsconfig.json +10 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,498 @@
|
|
|
1
|
+
|
|
2
|
+
> @stackpilot/core@0.1.0 lint /home/orlando/Desktop/XPlus-Finance/PROYECTOS_NUEVOS/StackPilot/stackpilot/packages/core
|
|
3
|
+
> biome check src/
|
|
4
|
+
|
|
5
|
+
src/__tests__/stack-engine.test.ts:2:21 lint/style/useNodejsImportProtocol FIXABLE ━━━━━━━━━━━━━━━
|
|
6
|
+
|
|
7
|
+
i A Node.js builtin module should be imported with the node: protocol.
|
|
8
|
+
|
|
9
|
+
1 │ import { describe, it, expect, beforeEach, afterEach } from "vitest";
|
|
10
|
+
> 2 │ import * as fs from "fs";
|
|
11
|
+
│ ^^^^
|
|
12
|
+
3 │ import * as path from "path";
|
|
13
|
+
4 │ import * as os from "os";
|
|
14
|
+
|
|
15
|
+
i Using the node: protocol is more explicit and signals that the imported module belongs to Node.js.
|
|
16
|
+
|
|
17
|
+
i Unsafe fix: Add the node: protocol.
|
|
18
|
+
|
|
19
|
+
1 1 │ import { describe, it, expect, beforeEach, afterEach } from "vitest";
|
|
20
|
+
2 │ - import·*·as·fs·from·"fs";
|
|
21
|
+
2 │ + import·*·as·fs·from·"node:fs";
|
|
22
|
+
3 3 │ import * as path from "path";
|
|
23
|
+
4 4 │ import * as os from "os";
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
src/__tests__/stack-engine.test.ts:3:23 lint/style/useNodejsImportProtocol FIXABLE ━━━━━━━━━━━━━━━
|
|
27
|
+
|
|
28
|
+
i A Node.js builtin module should be imported with the node: protocol.
|
|
29
|
+
|
|
30
|
+
1 │ import { describe, it, expect, beforeEach, afterEach } from "vitest";
|
|
31
|
+
2 │ import * as fs from "fs";
|
|
32
|
+
> 3 │ import * as path from "path";
|
|
33
|
+
│ ^^^^^^
|
|
34
|
+
4 │ import * as os from "os";
|
|
35
|
+
5 │ import { RulesEngine } from "../engine/rules-engine.js";
|
|
36
|
+
|
|
37
|
+
i Using the node: protocol is more explicit and signals that the imported module belongs to Node.js.
|
|
38
|
+
|
|
39
|
+
i Unsafe fix: Add the node: protocol.
|
|
40
|
+
|
|
41
|
+
1 1 │ import { describe, it, expect, beforeEach, afterEach } from "vitest";
|
|
42
|
+
2 2 │ import * as fs from "fs";
|
|
43
|
+
3 │ - import·*·as·path·from·"path";
|
|
44
|
+
3 │ + import·*·as·path·from·"node:path";
|
|
45
|
+
4 4 │ import * as os from "os";
|
|
46
|
+
5 5 │ import { RulesEngine } from "../engine/rules-engine.js";
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
src/__tests__/stack-engine.test.ts:4:21 lint/style/useNodejsImportProtocol FIXABLE ━━━━━━━━━━━━━━━
|
|
50
|
+
|
|
51
|
+
i A Node.js builtin module should be imported with the node: protocol.
|
|
52
|
+
|
|
53
|
+
2 │ import * as fs from "fs";
|
|
54
|
+
3 │ import * as path from "path";
|
|
55
|
+
> 4 │ import * as os from "os";
|
|
56
|
+
│ ^^^^
|
|
57
|
+
5 │ import { RulesEngine } from "../engine/rules-engine.js";
|
|
58
|
+
6 │ import { StackEngine } from "../engine/stack-engine.js";
|
|
59
|
+
|
|
60
|
+
i Using the node: protocol is more explicit and signals that the imported module belongs to Node.js.
|
|
61
|
+
|
|
62
|
+
i Unsafe fix: Add the node: protocol.
|
|
63
|
+
|
|
64
|
+
2 2 │ import * as fs from "fs";
|
|
65
|
+
3 3 │ import * as path from "path";
|
|
66
|
+
4 │ - import·*·as·os·from·"os";
|
|
67
|
+
4 │ + import·*·as·os·from·"node:os";
|
|
68
|
+
5 5 │ import { RulesEngine } from "../engine/rules-engine.js";
|
|
69
|
+
6 6 │ import { StackEngine } from "../engine/stack-engine.js";
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
src/__tests__/stack-engine.test.ts:101:41 lint/complexity/useLiteralKeys FIXABLE ━━━━━━━━━━━━━━━━━
|
|
73
|
+
|
|
74
|
+
i The computed expression can be simplified without the use of a string literal.
|
|
75
|
+
|
|
76
|
+
100 │ expect(validation.valid).toBe(true);
|
|
77
|
+
> 101 │ expect(validation.portAssignments["postgresql"]).toBe(5432);
|
|
78
|
+
│ ^^^^^^^^^^^^
|
|
79
|
+
102 │ expect(validation.portAssignments["redis"]).toBe(6379);
|
|
80
|
+
103 │ });
|
|
81
|
+
|
|
82
|
+
i Unsafe fix: Use a literal key instead.
|
|
83
|
+
|
|
84
|
+
99 99 │
|
|
85
|
+
100 100 │ expect(validation.valid).toBe(true);
|
|
86
|
+
101 │ - ······expect(validation.portAssignments["postgresql"]).toBe(5432);
|
|
87
|
+
101 │ + ······expect(validation.portAssignments.postgresql).toBe(5432);
|
|
88
|
+
102 102 │ expect(validation.portAssignments["redis"]).toBe(6379);
|
|
89
|
+
103 103 │ });
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
src/__tests__/stack-engine.test.ts:102:41 lint/complexity/useLiteralKeys FIXABLE ━━━━━━━━━━━━━━━━━
|
|
93
|
+
|
|
94
|
+
i The computed expression can be simplified without the use of a string literal.
|
|
95
|
+
|
|
96
|
+
100 │ expect(validation.valid).toBe(true);
|
|
97
|
+
101 │ expect(validation.portAssignments["postgresql"]).toBe(5432);
|
|
98
|
+
> 102 │ expect(validation.portAssignments["redis"]).toBe(6379);
|
|
99
|
+
│ ^^^^^^^
|
|
100
|
+
103 │ });
|
|
101
|
+
104 │
|
|
102
|
+
|
|
103
|
+
i Unsafe fix: Use a literal key instead.
|
|
104
|
+
|
|
105
|
+
100 100 │ expect(validation.valid).toBe(true);
|
|
106
|
+
101 101 │ expect(validation.portAssignments["postgresql"]).toBe(5432);
|
|
107
|
+
102 │ - ······expect(validation.portAssignments["redis"]).toBe(6379);
|
|
108
|
+
102 │ + ······expect(validation.portAssignments.redis).toBe(6379);
|
|
109
|
+
103 103 │ });
|
|
110
|
+
104 104 │
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
src/db/database.ts:7:23 lint/style/useNodejsImportProtocol FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
114
|
+
|
|
115
|
+
i A Node.js builtin module should be imported with the node: protocol.
|
|
116
|
+
|
|
117
|
+
6 │ import Database from "better-sqlite3";
|
|
118
|
+
> 7 │ import * as path from "path";
|
|
119
|
+
│ ^^^^^^
|
|
120
|
+
8 │ import * as fs from "fs";
|
|
121
|
+
9 │
|
|
122
|
+
|
|
123
|
+
i Using the node: protocol is more explicit and signals that the imported module belongs to Node.js.
|
|
124
|
+
|
|
125
|
+
i Unsafe fix: Add the node: protocol.
|
|
126
|
+
|
|
127
|
+
5 5 │
|
|
128
|
+
6 6 │ import Database from "better-sqlite3";
|
|
129
|
+
7 │ - import·*·as·path·from·"path";
|
|
130
|
+
7 │ + import·*·as·path·from·"node:path";
|
|
131
|
+
8 8 │ import * as fs from "fs";
|
|
132
|
+
9 9 │
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
src/db/database.ts:8:21 lint/style/useNodejsImportProtocol FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
136
|
+
|
|
137
|
+
i A Node.js builtin module should be imported with the node: protocol.
|
|
138
|
+
|
|
139
|
+
6 │ import Database from "better-sqlite3";
|
|
140
|
+
7 │ import * as path from "path";
|
|
141
|
+
> 8 │ import * as fs from "fs";
|
|
142
|
+
│ ^^^^
|
|
143
|
+
9 │
|
|
144
|
+
10 │ const SCHEMA = `
|
|
145
|
+
|
|
146
|
+
i Using the node: protocol is more explicit and signals that the imported module belongs to Node.js.
|
|
147
|
+
|
|
148
|
+
i Unsafe fix: Add the node: protocol.
|
|
149
|
+
|
|
150
|
+
6 6 │ import Database from "better-sqlite3";
|
|
151
|
+
7 7 │ import * as path from "path";
|
|
152
|
+
8 │ - import·*·as·fs·from·"fs";
|
|
153
|
+
8 │ + import·*·as·fs·from·"node:fs";
|
|
154
|
+
9 9 │
|
|
155
|
+
10 10 │ const SCHEMA = `
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
src/__tests__/stack-engine.test.ts:74:14 lint/style/noNonNullAssertion FIXABLE ━━━━━━━━━━━━━━━━━━━
|
|
159
|
+
|
|
160
|
+
! Forbidden non-null assertion.
|
|
161
|
+
|
|
162
|
+
72 │ const retrieved = engine.get(stack.id);
|
|
163
|
+
73 │ expect(retrieved).not.toBeNull();
|
|
164
|
+
> 74 │ expect(retrieved!.name).toBe("test-stack");
|
|
165
|
+
│ ^^^^^^^^^^
|
|
166
|
+
75 │ });
|
|
167
|
+
76 │
|
|
168
|
+
|
|
169
|
+
i Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator
|
|
170
|
+
|
|
171
|
+
72 72 │ const retrieved = engine.get(stack.id);
|
|
172
|
+
73 73 │ expect(retrieved).not.toBeNull();
|
|
173
|
+
74 │ - ······expect(retrieved!.name).toBe("test-stack");
|
|
174
|
+
74 │ + ······expect(retrieved?.name).toBe("test-stack");
|
|
175
|
+
75 75 │ });
|
|
176
|
+
76 76 │
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
src/__tests__/stack-engine.test.ts:159:14 lint/style/noNonNullAssertion FIXABLE ━━━━━━━━━━━━━━━━━━
|
|
180
|
+
|
|
181
|
+
! Forbidden non-null assertion.
|
|
182
|
+
|
|
183
|
+
157 │ const retrieved = engine.get(created.id);
|
|
184
|
+
158 │ expect(retrieved).not.toBeNull();
|
|
185
|
+
> 159 │ expect(retrieved!.id).toBe(created.id);
|
|
186
|
+
│ ^^^^^^^^^^
|
|
187
|
+
160 │ expect(retrieved!.name).toBe("get-test");
|
|
188
|
+
161 │ expect(retrieved!.description).toBe("Testing get");
|
|
189
|
+
|
|
190
|
+
i Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator
|
|
191
|
+
|
|
192
|
+
157 157 │ const retrieved = engine.get(created.id);
|
|
193
|
+
158 158 │ expect(retrieved).not.toBeNull();
|
|
194
|
+
159 │ - ······expect(retrieved!.id).toBe(created.id);
|
|
195
|
+
159 │ + ······expect(retrieved?.id).toBe(created.id);
|
|
196
|
+
160 160 │ expect(retrieved!.name).toBe("get-test");
|
|
197
|
+
161 161 │ expect(retrieved!.description).toBe("Testing get");
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
src/__tests__/stack-engine.test.ts:160:14 lint/style/noNonNullAssertion FIXABLE ━━━━━━━━━━━━━━━━━━
|
|
201
|
+
|
|
202
|
+
! Forbidden non-null assertion.
|
|
203
|
+
|
|
204
|
+
158 │ expect(retrieved).not.toBeNull();
|
|
205
|
+
159 │ expect(retrieved!.id).toBe(created.id);
|
|
206
|
+
> 160 │ expect(retrieved!.name).toBe("get-test");
|
|
207
|
+
│ ^^^^^^^^^^
|
|
208
|
+
161 │ expect(retrieved!.description).toBe("Testing get");
|
|
209
|
+
162 │ });
|
|
210
|
+
|
|
211
|
+
i Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator
|
|
212
|
+
|
|
213
|
+
158 158 │ expect(retrieved).not.toBeNull();
|
|
214
|
+
159 159 │ expect(retrieved!.id).toBe(created.id);
|
|
215
|
+
160 │ - ······expect(retrieved!.name).toBe("get-test");
|
|
216
|
+
160 │ + ······expect(retrieved?.name).toBe("get-test");
|
|
217
|
+
161 161 │ expect(retrieved!.description).toBe("Testing get");
|
|
218
|
+
162 162 │ });
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
src/__tests__/stack-engine.test.ts:161:14 lint/style/noNonNullAssertion FIXABLE ━━━━━━━━━━━━━━━━━━
|
|
222
|
+
|
|
223
|
+
! Forbidden non-null assertion.
|
|
224
|
+
|
|
225
|
+
159 │ expect(retrieved!.id).toBe(created.id);
|
|
226
|
+
160 │ expect(retrieved!.name).toBe("get-test");
|
|
227
|
+
> 161 │ expect(retrieved!.description).toBe("Testing get");
|
|
228
|
+
│ ^^^^^^^^^^
|
|
229
|
+
162 │ });
|
|
230
|
+
163 │
|
|
231
|
+
|
|
232
|
+
i Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator
|
|
233
|
+
|
|
234
|
+
159 159 │ expect(retrieved!.id).toBe(created.id);
|
|
235
|
+
160 160 │ expect(retrieved!.name).toBe("get-test");
|
|
236
|
+
161 │ - ······expect(retrieved!.description).toBe("Testing·get");
|
|
237
|
+
161 │ + ······expect(retrieved?.description).toBe("Testing·get");
|
|
238
|
+
162 162 │ });
|
|
239
|
+
163 163 │
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
src/__tests__/stack-engine.test.ts:179:14 lint/style/noNonNullAssertion FIXABLE ━━━━━━━━━━━━━━━━━━
|
|
243
|
+
|
|
244
|
+
! Forbidden non-null assertion.
|
|
245
|
+
|
|
246
|
+
178 │ const retrieved = engine.get(created.id);
|
|
247
|
+
> 179 │ expect(retrieved!.technologies.length).toBe(2);
|
|
248
|
+
│ ^^^^^^^^^^
|
|
249
|
+
180 │ const ids = retrieved!.technologies.map((t) => t.technologyId);
|
|
250
|
+
181 │ expect(ids).toContain("postgresql");
|
|
251
|
+
|
|
252
|
+
i Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator
|
|
253
|
+
|
|
254
|
+
177 177 │
|
|
255
|
+
178 178 │ const retrieved = engine.get(created.id);
|
|
256
|
+
179 │ - ······expect(retrieved!.technologies.length).toBe(2);
|
|
257
|
+
179 │ + ······expect(retrieved?.technologies.length).toBe(2);
|
|
258
|
+
180 180 │ const ids = retrieved!.technologies.map((t) => t.technologyId);
|
|
259
|
+
181 181 │ expect(ids).toContain("postgresql");
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
src/engine/compatibility-scorer.ts:6:27 lint/correctness/noUnusedImports FIXABLE ━━━━━━━━━━━━━━━━━
|
|
263
|
+
|
|
264
|
+
! Several of these imports are unused.
|
|
265
|
+
|
|
266
|
+
4 │ */
|
|
267
|
+
5 │
|
|
268
|
+
> 6 │ import type { Technology, TechnologyCategory } from "../types/index.js";
|
|
269
|
+
│ ^^^^^^^^^^^^^^^^^^
|
|
270
|
+
7 │
|
|
271
|
+
8 │ export interface CompatibilityResult {
|
|
272
|
+
|
|
273
|
+
i Unused imports might be the result of an incomplete refactoring.
|
|
274
|
+
|
|
275
|
+
i Unsafe fix: Remove the unused imports.
|
|
276
|
+
|
|
277
|
+
6 │ import·type·{·Technology,·TechnologyCategory·}·from·"../types/index.js";
|
|
278
|
+
│ -------------------
|
|
279
|
+
|
|
280
|
+
src/__tests__/scaffold-orchestrator.test.ts:1:1 assist/source/organizeImports FIXABLE ━━━━━━━━━━━━
|
|
281
|
+
|
|
282
|
+
× The imports and exports are not sorted.
|
|
283
|
+
|
|
284
|
+
> 1 │ import { describe, it, expect } from "vitest";
|
|
285
|
+
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
286
|
+
2 │ import { ScaffoldOrchestrator } from "../engine/scaffold-orchestrator.js";
|
|
287
|
+
3 │ import type { StackDefinition, Technology } from "../types/index.js";
|
|
288
|
+
|
|
289
|
+
i Safe fix: Organize Imports (Biome)
|
|
290
|
+
|
|
291
|
+
1 │ - import·{·describe,·it,·expect·}·from·"vitest";
|
|
292
|
+
1 │ + import·{·describe,·expect,·it·}·from·"vitest";
|
|
293
|
+
2 2 │ import { ScaffoldOrchestrator } from "../engine/scaffold-orchestrator.js";
|
|
294
|
+
3 3 │ import type { StackDefinition, Technology } from "../types/index.js";
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
src/__tests__/scaffold-orchestrator.test.ts format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
298
|
+
|
|
299
|
+
× Formatter would have printed the following content:
|
|
300
|
+
|
|
301
|
+
141 141 │
|
|
302
|
+
142 142 │ it("generates devcontainer.json", () => {
|
|
303
|
+
143 │ - ····const·devcontainer·=·JSON.parse(
|
|
304
|
+
144 │ - ······orchestrator.generateDevcontainer(mockStack,·mockTechs),
|
|
305
|
+
145 │ - ····);
|
|
306
|
+
143 │ + ····const·devcontainer·=·JSON.parse(orchestrator.generateDevcontainer(mockStack,·mockTechs));
|
|
307
|
+
146 144 │ expect(devcontainer.name).toBe("Test Stack");
|
|
308
|
+
147 145 │ expect(devcontainer.forwardPorts).toContain(3000);
|
|
309
|
+
148 146 │ expect(devcontainer.forwardPorts).toContain(5432);
|
|
310
|
+
149 │ - ····expect(devcontainer.features).toHaveProperty(
|
|
311
|
+
150 │ - ······"ghcr.io/devcontainers/features/node:1",
|
|
312
|
+
151 │ - ····);
|
|
313
|
+
147 │ + ····expect(devcontainer.features).toHaveProperty("ghcr.io/devcontainers/features/node:1");
|
|
314
|
+
152 148 │ expect(devcontainer.features).toHaveProperty(
|
|
315
|
+
153 149 │ "ghcr.io/devcontainers/features/docker-in-docker:2",
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
src/__tests__/stack-engine.test.ts:1:1 assist/source/organizeImports FIXABLE ━━━━━━━━━━━━━━━━━━━━━
|
|
319
|
+
|
|
320
|
+
× The imports and exports are not sorted.
|
|
321
|
+
|
|
322
|
+
> 1 │ import { describe, it, expect, beforeEach, afterEach } from "vitest";
|
|
323
|
+
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
324
|
+
2 │ import * as fs from "fs";
|
|
325
|
+
3 │ import * as path from "path";
|
|
326
|
+
|
|
327
|
+
i Safe fix: Organize Imports (Biome)
|
|
328
|
+
|
|
329
|
+
1 │ - import·{·describe,·it,·expect,·beforeEach,·afterEach·}·from·"vitest";
|
|
330
|
+
2 │ - import·*·as·fs·from·"fs";
|
|
331
|
+
1 │ + import·*·as·fs·from·"fs";
|
|
332
|
+
2 │ + import·*·as·os·from·"os";
|
|
333
|
+
3 3 │ import * as path from "path";
|
|
334
|
+
4 │ - import·*·as·os·from·"os";
|
|
335
|
+
5 │ - import·{·RulesEngine·}·from·"../engine/rules-engine.js";
|
|
336
|
+
6 │ - import·{·StackEngine·}·from·"../engine/stack-engine.js";
|
|
337
|
+
7 │ - import·{·getDatabase,·closeDatabase·}·from·"../db/database.js";
|
|
338
|
+
4 │ + import·{·afterEach,·beforeEach,·describe,·expect,·it·}·from·"vitest";
|
|
339
|
+
5 │ + import·{·closeDatabase,·getDatabase·}·from·"../db/database.js";
|
|
340
|
+
6 │ + import·{·RulesEngine·}·from·"../engine/rules-engine.js";
|
|
341
|
+
7 │ + import·{·StackEngine·}·from·"../engine/stack-engine.js";
|
|
342
|
+
8 8 │ import type { Technology } from "../types/technology.js";
|
|
343
|
+
9 9 │
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
src/db/database.ts:6:1 assist/source/organizeImports FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
347
|
+
|
|
348
|
+
× The imports and exports are not sorted.
|
|
349
|
+
|
|
350
|
+
4 │ */
|
|
351
|
+
5 │
|
|
352
|
+
> 6 │ import Database from "better-sqlite3";
|
|
353
|
+
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
354
|
+
7 │ import * as path from "path";
|
|
355
|
+
8 │ import * as fs from "fs";
|
|
356
|
+
|
|
357
|
+
i Safe fix: Organize Imports (Biome)
|
|
358
|
+
|
|
359
|
+
5 5 │
|
|
360
|
+
6 6 │ import Database from "better-sqlite3";
|
|
361
|
+
7 │ - import·*·as·path·from·"path";
|
|
362
|
+
8 │ - import·*·as·fs·from·"fs";
|
|
363
|
+
7 │ + import·*·as·fs·from·"fs";
|
|
364
|
+
8 │ + import·*·as·path·from·"path";
|
|
365
|
+
9 9 │
|
|
366
|
+
10 10 │ const SCHEMA = `
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
src/db/index.ts:1:1 assist/source/organizeImports FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
370
|
+
|
|
371
|
+
× The imports and exports are not sorted.
|
|
372
|
+
|
|
373
|
+
> 1 │ export { getDatabase, closeDatabase, getDefaultDbPath } from "./database.js";
|
|
374
|
+
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
375
|
+
2 │
|
|
376
|
+
|
|
377
|
+
i Safe fix: Organize Imports (Biome)
|
|
378
|
+
|
|
379
|
+
1 │ - export·{·getDatabase,·closeDatabase,·getDefaultDbPath·}·from·"./database.js";
|
|
380
|
+
1 │ + export·{·closeDatabase,·getDatabase,·getDefaultDbPath·}·from·"./database.js";
|
|
381
|
+
2 2 │
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
src/engine/compatibility-scorer.ts format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
385
|
+
|
|
386
|
+
× Formatter would have printed the following content:
|
|
387
|
+
|
|
388
|
+
96 96 │ label: "Suggested pairing",
|
|
389
|
+
97 97 │ points: 25,
|
|
390
|
+
98 │ - ······description:·aSuggestsB·&&·bSuggestsA
|
|
391
|
+
99 │ - ········?·`${techA.name}·and·${techB.name}·mutually·recommend·each·other`
|
|
392
|
+
100 │ - ········:·aSuggestsB
|
|
393
|
+
101 │ - ··········?·`${techA.name}·suggests·${techB.name}`
|
|
394
|
+
102 │ - ··········:·`${techB.name}·suggests·${techA.name}`,
|
|
395
|
+
98 │ + ······description:
|
|
396
|
+
99 │ + ········aSuggestsB·&&·bSuggestsA
|
|
397
|
+
100 │ + ··········?·`${techA.name}·and·${techB.name}·mutually·recommend·each·other`
|
|
398
|
+
101 │ + ··········:·aSuggestsB
|
|
399
|
+
102 │ + ············?·`${techA.name}·suggests·${techB.name}`
|
|
400
|
+
103 │ + ············:·`${techB.name}·suggests·${techA.name}`,
|
|
401
|
+
103 104 │ });
|
|
402
|
+
104 105 │ score += 25;
|
|
403
|
+
······· │
|
|
404
|
+
136 137 │ label: "Incompatible",
|
|
405
|
+
137 138 │ points: -50,
|
|
406
|
+
138 │ - ······description:·aIncompatB·&&·bIncompatA
|
|
407
|
+
139 │ - ········?·`${techA.name}·and·${techB.name}·are·mutually·incompatible`
|
|
408
|
+
140 │ - ········:·aIncompatB
|
|
409
|
+
141 │ - ··········?·`${techA.name}·lists·${techB.name}·as·incompatible`
|
|
410
|
+
142 │ - ··········:·`${techB.name}·lists·${techA.name}·as·incompatible`,
|
|
411
|
+
139 │ + ······description:
|
|
412
|
+
140 │ + ········aIncompatB·&&·bIncompatA
|
|
413
|
+
141 │ + ··········?·`${techA.name}·and·${techB.name}·are·mutually·incompatible`
|
|
414
|
+
142 │ + ··········:·aIncompatB
|
|
415
|
+
143 │ + ············?·`${techA.name}·lists·${techB.name}·as·incompatible`
|
|
416
|
+
144 │ + ············:·`${techB.name}·lists·${techA.name}·as·incompatible`,
|
|
417
|
+
143 145 │ });
|
|
418
|
+
144 146 │ score -= 50;
|
|
419
|
+
······· │
|
|
420
|
+
149 151 │ techA.category === techB.category &&
|
|
421
|
+
150 152 │ techA.id !== techB.id &&
|
|
422
|
+
151 │ - ····runtimeA·&&·runtimeB·&&·runtimeA·===·runtimeB
|
|
423
|
+
153 │ + ····runtimeA·&&
|
|
424
|
+
154 │ + ····runtimeB·&&
|
|
425
|
+
155 │ + ····runtimeA·===·runtimeB
|
|
426
|
+
152 156 │ ) {
|
|
427
|
+
153 157 │ factors.push({
|
|
428
|
+
······· │
|
|
429
|
+
208 212 │ }
|
|
430
|
+
209 213 │
|
|
431
|
+
210 │ - ··const·overall·=·pairs.length·>·0
|
|
432
|
+
211 │ - ····?·Math.round(pairs.reduce((sum,·p)·=>·sum·+·p.score,·0)·/·pairs.length)
|
|
433
|
+
212 │ - ····:·100;
|
|
434
|
+
214 │ + ··const·overall·=
|
|
435
|
+
215 │ + ····pairs.length·>·0·?·Math.round(pairs.reduce((sum,·p)·=>·sum·+·p.score,·0)·/·pairs.length)·:·100;
|
|
436
|
+
213 216 │
|
|
437
|
+
214 217 │ return {
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
src/engine/index.ts:1:1 assist/source/organizeImports FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
441
|
+
|
|
442
|
+
× The imports and exports are not sorted.
|
|
443
|
+
|
|
444
|
+
> 1 │ export { RulesEngine } from "./rules-engine.js";
|
|
445
|
+
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
446
|
+
2 │ export { StackEngine } from "./stack-engine.js";
|
|
447
|
+
3 │ export { ScaffoldOrchestrator } from "./scaffold-orchestrator.js";
|
|
448
|
+
|
|
449
|
+
i Safe fix: Organize Imports (Biome)
|
|
450
|
+
|
|
451
|
+
1 │ - export·{·RulesEngine·}·from·"./rules-engine.js";
|
|
452
|
+
2 │ - export·{·StackEngine·}·from·"./stack-engine.js";
|
|
453
|
+
3 │ - export·{·ScaffoldOrchestrator·}·from·"./scaffold-orchestrator.js";
|
|
454
|
+
4 │ - export·type·{·ScaffoldOutput·}·from·"./scaffold-orchestrator.js";
|
|
455
|
+
1 │ + export·type·{·UserPreferences·}·from·"./preferences.js";
|
|
456
|
+
2 │ + export·{
|
|
457
|
+
3 │ + ··getDefaultPreferences,
|
|
458
|
+
4 │ + ··getPreference,
|
|
459
|
+
5 │ + ··getPreferenceKeys,
|
|
460
|
+
6 │ + ··getPreferences,
|
|
461
|
+
7 │ + ··resetPreferences,
|
|
462
|
+
8 │ + ··setPreference,
|
|
463
|
+
9 │ + }·from·"./preferences.js";
|
|
464
|
+
10 │ + export·{·RulesEngine·}·from·"./rules-engine.js";
|
|
465
|
+
11 │ + export·type·{·RuntimeOptions·}·from·"./runtime-manager.js";
|
|
466
|
+
5 12 │ export { RuntimeManager } from "./runtime-manager.js";
|
|
467
|
+
6 │ - export·type·{·RuntimeOptions·}·from·"./runtime-manager.js";
|
|
468
|
+
7 │ - export·{
|
|
469
|
+
8 │ - ··getPreferences,
|
|
470
|
+
9 │ - ··getPreference,
|
|
471
|
+
10 │ - ··setPreference,
|
|
472
|
+
11 │ - ··resetPreferences,
|
|
473
|
+
12 │ - ··getPreferenceKeys,
|
|
474
|
+
13 │ - ··getDefaultPreferences,
|
|
475
|
+
14 │ - }·from·"./preferences.js";
|
|
476
|
+
15 │ - export·type·{·UserPreferences·}·from·"./preferences.js";
|
|
477
|
+
16 │ - export·{·installTechnologies·}·from·"./tech-installer.js";
|
|
478
|
+
17 │ - export·type·{·InstallContext,·InstallResult·}·from·"./tech-installer.js";
|
|
479
|
+
13 │ + export·type·{·ScaffoldOutput·}·from·"./scaffold-orchestrator.js";
|
|
480
|
+
14 │ + export·{·ScaffoldOrchestrator·}·from·"./scaffold-orchestrator.js";
|
|
481
|
+
15 │ + export·{·StackEngine·}·from·"./stack-engine.js";
|
|
482
|
+
16 │ + export·type·{·InstallContext,·InstallResult·}·from·"./tech-installer.js";
|
|
483
|
+
17 │ + export·{·installTechnologies·}·from·"./tech-installer.js";
|
|
484
|
+
18 18 │
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
The number of diagnostics exceeds the limit allowed. Use --max-diagnostics to increase it.
|
|
488
|
+
Diagnostics not shown: 92.
|
|
489
|
+
Checked 33 files in 60ms. No fixes applied.
|
|
490
|
+
Found 32 errors.
|
|
491
|
+
Found 30 warnings.
|
|
492
|
+
Found 50 infos.
|
|
493
|
+
check ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
494
|
+
|
|
495
|
+
× Some errors were emitted while running checks.
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
ELIFECYCLE Command failed with exit code 1.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
> @stackweld/core@0.2.0 test /home/orlando/Desktop/XPlus-Finance/PROYECTOS_NUEVOS/Stackweld/stackweld/packages/core
|
|
3
|
+
> vitest run --passWithNoTests
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
[1m[46m RUN [49m[22m [36mv4.1.2 [39m[90m/home/orlando/Desktop/XPlus-Finance/PROYECTOS_NUEVOS/Stackweld/stackweld/packages/core[39m
|
|
7
|
+
|
|
8
|
+
[32m✓[39m src/__tests__/rules-engine.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
9
|
+
[32m✓[39m dist/__tests__/rules-engine.test.js [2m([22m[2m7 tests[22m[2m)[22m[32m 19[2mms[22m[39m
|
|
10
|
+
[32m✓[39m src/__tests__/scaffold-orchestrator.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 26[2mms[22m[39m
|
|
11
|
+
[32m✓[39m dist/__tests__/scaffold-orchestrator.test.js [2m([22m[2m7 tests[22m[2m)[22m[32m 23[2mms[22m[39m
|
|
12
|
+
[32m✓[39m src/__tests__/compatibility-scorer.test.ts [2m([22m[2m13 tests[22m[2m)[22m[32m 12[2mms[22m[39m
|
|
13
|
+
[32m✓[39m dist/__tests__/compatibility-scorer.test.js [2m([22m[2m13 tests[22m[2m)[22m[32m 18[2mms[22m[39m
|
|
14
|
+
[32m✓[39m dist/__tests__/stack-engine.test.js [2m([22m[2m21 tests[22m[2m)[22m[33m 357[2mms[22m[39m
|
|
15
|
+
[32m✓[39m src/__tests__/stack-engine.test.ts [2m([22m[2m21 tests[22m[2m)[22m[33m 359[2mms[22m[39m
|
|
16
|
+
|
|
17
|
+
[2m Test Files [22m [1m[32m8 passed[39m[22m[90m (8)[39m
|
|
18
|
+
[2m Tests [22m [1m[32m96 passed[39m[22m[90m (96)[39m
|
|
19
|
+
[2m Start at [22m 09:04:49
|
|
20
|
+
[2m Duration [22m 1.07s[2m (transform 1.60s, setup 0ms, import 2.17s, tests 822ms, environment 1ms)[22m
|
|
21
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compatibility-scorer.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/compatibility-scorer.test.ts"],"names":[],"mappings":""}
|