@stackweld/core 0.2.0 → 0.3.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.
Files changed (108) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +54 -0
  3. package/package.json +16 -10
  4. package/.turbo/turbo-build.log +0 -4
  5. package/.turbo/turbo-lint.log +0 -498
  6. package/.turbo/turbo-test.log +0 -21
  7. package/.turbo/turbo-typecheck.log +0 -4
  8. package/dist/__tests__/compatibility-scorer.test.d.ts.map +0 -1
  9. package/dist/__tests__/compatibility-scorer.test.js.map +0 -1
  10. package/dist/__tests__/rules-engine.test.d.ts.map +0 -1
  11. package/dist/__tests__/rules-engine.test.js.map +0 -1
  12. package/dist/__tests__/scaffold-orchestrator.test.d.ts.map +0 -1
  13. package/dist/__tests__/scaffold-orchestrator.test.js.map +0 -1
  14. package/dist/__tests__/stack-engine.test.d.ts.map +0 -1
  15. package/dist/__tests__/stack-engine.test.js.map +0 -1
  16. package/dist/db/database.d.ts.map +0 -1
  17. package/dist/db/database.js.map +0 -1
  18. package/dist/db/index.d.ts.map +0 -1
  19. package/dist/db/index.js.map +0 -1
  20. package/dist/engine/compatibility-scorer.d.ts.map +0 -1
  21. package/dist/engine/compatibility-scorer.js.map +0 -1
  22. package/dist/engine/compose-generator.d.ts.map +0 -1
  23. package/dist/engine/compose-generator.js.map +0 -1
  24. package/dist/engine/cost-estimator.d.ts.map +0 -1
  25. package/dist/engine/cost-estimator.js.map +0 -1
  26. package/dist/engine/env-analyzer.d.ts.map +0 -1
  27. package/dist/engine/env-analyzer.js.map +0 -1
  28. package/dist/engine/health-checker.d.ts.map +0 -1
  29. package/dist/engine/health-checker.js.map +0 -1
  30. package/dist/engine/index.d.ts.map +0 -1
  31. package/dist/engine/index.js.map +0 -1
  32. package/dist/engine/infra-generator.d.ts.map +0 -1
  33. package/dist/engine/infra-generator.js.map +0 -1
  34. package/dist/engine/migration-planner.d.ts.map +0 -1
  35. package/dist/engine/migration-planner.js.map +0 -1
  36. package/dist/engine/performance-profiler.d.ts.map +0 -1
  37. package/dist/engine/performance-profiler.js.map +0 -1
  38. package/dist/engine/plugin-loader.d.ts.map +0 -1
  39. package/dist/engine/plugin-loader.js.map +0 -1
  40. package/dist/engine/preferences.d.ts.map +0 -1
  41. package/dist/engine/preferences.js.map +0 -1
  42. package/dist/engine/rules-engine.d.ts.map +0 -1
  43. package/dist/engine/rules-engine.js.map +0 -1
  44. package/dist/engine/runtime-manager.d.ts.map +0 -1
  45. package/dist/engine/runtime-manager.js.map +0 -1
  46. package/dist/engine/scaffold-orchestrator.d.ts.map +0 -1
  47. package/dist/engine/scaffold-orchestrator.js.map +0 -1
  48. package/dist/engine/stack-detector.d.ts.map +0 -1
  49. package/dist/engine/stack-detector.js.map +0 -1
  50. package/dist/engine/stack-differ.d.ts.map +0 -1
  51. package/dist/engine/stack-differ.js.map +0 -1
  52. package/dist/engine/stack-engine.d.ts.map +0 -1
  53. package/dist/engine/stack-engine.js.map +0 -1
  54. package/dist/engine/stack-serializer.d.ts.map +0 -1
  55. package/dist/engine/stack-serializer.js.map +0 -1
  56. package/dist/engine/standards-linter.d.ts.map +0 -1
  57. package/dist/engine/standards-linter.js.map +0 -1
  58. package/dist/engine/tech-installer.d.ts.map +0 -1
  59. package/dist/engine/tech-installer.js.map +0 -1
  60. package/dist/index.d.ts.map +0 -1
  61. package/dist/index.js.map +0 -1
  62. package/dist/types/index.d.ts.map +0 -1
  63. package/dist/types/index.js.map +0 -1
  64. package/dist/types/project.d.ts.map +0 -1
  65. package/dist/types/project.js.map +0 -1
  66. package/dist/types/stack.d.ts.map +0 -1
  67. package/dist/types/stack.js.map +0 -1
  68. package/dist/types/technology.d.ts.map +0 -1
  69. package/dist/types/technology.js.map +0 -1
  70. package/dist/types/template.d.ts.map +0 -1
  71. package/dist/types/template.js.map +0 -1
  72. package/dist/types/validation.d.ts.map +0 -1
  73. package/dist/types/validation.js.map +0 -1
  74. package/src/__tests__/compatibility-scorer.test.ts +0 -264
  75. package/src/__tests__/rules-engine.test.ts +0 -170
  76. package/src/__tests__/scaffold-orchestrator.test.ts +0 -161
  77. package/src/__tests__/stack-engine.test.ts +0 -328
  78. package/src/db/database.ts +0 -112
  79. package/src/db/index.ts +0 -1
  80. package/src/engine/compatibility-scorer.ts +0 -222
  81. package/src/engine/compose-generator.ts +0 -134
  82. package/src/engine/cost-estimator.ts +0 -498
  83. package/src/engine/env-analyzer.ts +0 -156
  84. package/src/engine/health-checker.ts +0 -421
  85. package/src/engine/index.ts +0 -17
  86. package/src/engine/infra-generator.ts +0 -837
  87. package/src/engine/migration-planner.ts +0 -496
  88. package/src/engine/performance-profiler.ts +0 -354
  89. package/src/engine/plugin-loader.ts +0 -216
  90. package/src/engine/preferences.ts +0 -85
  91. package/src/engine/rules-engine.ts +0 -204
  92. package/src/engine/runtime-manager.ts +0 -207
  93. package/src/engine/scaffold-orchestrator.ts +0 -1052
  94. package/src/engine/stack-detector.ts +0 -345
  95. package/src/engine/stack-differ.ts +0 -118
  96. package/src/engine/stack-engine.ts +0 -258
  97. package/src/engine/stack-serializer.ts +0 -95
  98. package/src/engine/standards-linter.ts +0 -210
  99. package/src/engine/tech-installer.ts +0 -650
  100. package/src/index.ts +0 -78
  101. package/src/types/index.ts +0 -10
  102. package/src/types/project.ts +0 -36
  103. package/src/types/stack.ts +0 -32
  104. package/src/types/technology.ts +0 -58
  105. package/src/types/template.ts +0 -37
  106. package/src/types/validation.ts +0 -22
  107. package/tsconfig.json +0 -10
  108. package/tsconfig.tsbuildinfo +0 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-2026 Orlando Fernandez / XPlus Technologies LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # @stackweld/core
2
+
3
+ [![Version](https://img.shields.io/badge/version-0.3.0-blue.svg)](https://github.com/mundowise/Stackweld/releases)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+
6
+ The core engine for Stackweld. Handles stack persistence, compatibility rules, scaffolding orchestration, Docker lifecycle, and all analysis modules.
7
+
8
+ This package is an internal dependency — you do not use it directly. Install `@stackweld/cli` instead.
9
+
10
+ ## What it contains
11
+
12
+ ```
13
+ src/
14
+ db/ SQLite persistence layer (better-sqlite3)
15
+ docker/ Docker Compose generation and runtime manager
16
+ engine/ All analysis and intelligence modules:
17
+ compatibility, env-sync, detect, compose-preview,
18
+ health, migration, diff, share, infra, lint,
19
+ benchmark, cost, learn, plugin
20
+ scaffold/ Scaffold orchestrator + tech installer
21
+ types/ Shared TypeScript types
22
+ index.ts Public API surface
23
+ ```
24
+
25
+ ### Key exports
26
+
27
+ ```typescript
28
+ import {
29
+ StackEngine, // Create, save, load, delete stacks (SQLite)
30
+ RulesEngine, // Validate technology combinations, resolve dependencies
31
+ ScaffoldOrchestrator,// Run official CLI tools (create-next-app, django-admin...)
32
+ TechInstaller, // Install per-technology extras (Prisma, NextAuth, Vitest...)
33
+ DockerManager, // docker compose up/down/status/logs
34
+ scoreCompatibility, // Score two technologies (0-100)
35
+ checkProjectHealth, // Audit an existing project directory
36
+ planMigration, // Step-by-step migration plan between technologies
37
+ estimateCost, // Monthly hosting cost estimate across providers
38
+ detectStack, // Detect stack from existing project files
39
+ generateInfra, // Generate Dockerfile + nginx / CloudFormation / Terraform
40
+ } from '@stackweld/core';
41
+ ```
42
+
43
+ ## Requirements
44
+
45
+ - Node.js >= 22.0.0
46
+ - Docker + Docker Compose (for runtime operations)
47
+
48
+ ## Repository
49
+
50
+ [github.com/mundowise/Stackweld](https://github.com/mundowise/Stackweld)
51
+
52
+ ## License
53
+
54
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackweld/core",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Core engine for Stackweld — rules, scaffold orchestrator, runtime manager, tech installer, and SQLite persistence.",
5
5
  "license": "MIT",
6
6
  "author": "Orlando Fernandez <hello@xplustechnologies.com>",
@@ -17,14 +17,12 @@
17
17
  ".": "./dist/index.js",
18
18
  "./*": "./dist/*.js"
19
19
  },
20
- "scripts": {
21
- "build": "tsc -b",
22
- "dev": "tsc -b --watch",
23
- "test": "vitest run --passWithNoTests",
24
- "typecheck": "tsc --noEmit",
25
- "lint": "biome check src/",
26
- "clean": "rm -rf dist .turbo"
27
- },
20
+ "files": [
21
+ "dist/**/*.js",
22
+ "dist/**/*.d.ts",
23
+ "README.md",
24
+ "LICENSE"
25
+ ],
28
26
  "dependencies": {
29
27
  "ajv": "^8.17.0",
30
28
  "better-sqlite3": "^11.0.0",
@@ -35,5 +33,13 @@
35
33
  "@types/better-sqlite3": "^7.6.0",
36
34
  "typescript": "^5.9.0",
37
35
  "vitest": "^4.1.2"
36
+ },
37
+ "scripts": {
38
+ "build": "tsc -b",
39
+ "dev": "tsc -b --watch",
40
+ "test": "vitest run --passWithNoTests",
41
+ "typecheck": "tsc --noEmit",
42
+ "lint": "biome check src/",
43
+ "clean": "rm -rf dist .turbo"
38
44
  }
39
- }
45
+ }
@@ -1,4 +0,0 @@
1
-
2
- > @stackweld/core@0.2.0 build /home/orlando/Desktop/XPlus-Finance/PROYECTOS_NUEVOS/Stackweld/stackweld/packages/core
3
- > tsc -b
4
-
@@ -1,498 +0,0 @@
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.
@@ -1,21 +0,0 @@
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
-  RUN  v4.1.2 /home/orlando/Desktop/XPlus-Finance/PROYECTOS_NUEVOS/Stackweld/stackweld/packages/core
7
-
8
- ✓ src/__tests__/rules-engine.test.ts (7 tests) 8ms
9
- ✓ dist/__tests__/rules-engine.test.js (7 tests) 19ms
10
- ✓ src/__tests__/scaffold-orchestrator.test.ts (7 tests) 26ms
11
- ✓ dist/__tests__/scaffold-orchestrator.test.js (7 tests) 23ms
12
- ✓ src/__tests__/compatibility-scorer.test.ts (13 tests) 12ms
13
- ✓ dist/__tests__/compatibility-scorer.test.js (13 tests) 18ms
14
- ✓ dist/__tests__/stack-engine.test.js (21 tests) 357ms
15
- ✓ src/__tests__/stack-engine.test.ts (21 tests) 359ms
16
-
17
-  Test Files  8 passed (8)
18
-  Tests  96 passed (96)
19
-  Start at  09:04:49
20
-  Duration  1.07s (transform 1.60s, setup 0ms, import 2.17s, tests 822ms, environment 1ms)
21
-
@@ -1,4 +0,0 @@
1
-
2
- > @stackpilot/core@0.1.0 typecheck /home/orlando/Desktop/XPlus-Finance/PROYECTOS_NUEVOS/StackPilot/stackpilot/packages/core
3
- > tsc --noEmit
4
-
@@ -1 +0,0 @@
1
- {"version":3,"file":"compatibility-scorer.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/compatibility-scorer.test.ts"],"names":[],"mappings":""}