@stackweld/core 0.2.1 → 0.3.1
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/LICENSE +21 -0
- package/README.md +54 -0
- package/dist/__tests__/compatibility-scorer.test.d.ts +1 -1
- package/dist/__tests__/rules-engine.test.d.ts +1 -1
- package/dist/__tests__/scaffold-orchestrator.test.d.ts +1 -1
- package/dist/__tests__/stack-engine.test.d.ts +1 -1
- package/dist/db/database.d.ts +1 -1
- package/dist/engine/compatibility-scorer.d.ts +16 -19
- package/dist/engine/compose-generator.d.ts +21 -23
- package/dist/engine/cost-estimator.d.ts +13 -13
- package/dist/engine/env-analyzer.d.ts +14 -14
- package/dist/engine/health-checker.d.ts +12 -12
- package/dist/engine/health-checker.js +14 -6
- package/dist/engine/infra-generator.d.ts +14 -17
- package/dist/engine/migration-planner.d.ts +18 -22
- package/dist/engine/performance-profiler.d.ts +13 -13
- package/dist/engine/preferences.d.ts +7 -7
- package/dist/engine/runtime-manager.d.ts +46 -56
- package/dist/engine/runtime-manager.js +24 -10
- package/dist/engine/scaffold-orchestrator.js +42 -6
- package/dist/engine/stack-detector.d.ts +10 -10
- package/dist/engine/stack-differ.d.ts +15 -15
- package/dist/engine/stack-differ.js +76 -72
- package/dist/engine/stack-serializer.d.ts +8 -8
- package/dist/engine/tech-installer.d.ts +12 -12
- package/dist/engine/tech-installer.js +3 -2
- package/dist/types/project.d.ts +19 -19
- package/dist/types/project.js +1 -1
- package/dist/types/stack.d.ts +18 -18
- package/dist/types/stack.js +1 -1
- package/dist/types/technology.d.ts +28 -37
- package/dist/types/technology.js +1 -1
- package/dist/types/template.d.ts +22 -22
- package/dist/types/template.js +1 -1
- package/dist/types/validation.d.ts +12 -12
- package/dist/types/validation.js +1 -1
- package/package.json +16 -10
- package/.turbo/turbo-build.log +0 -4
- package/.turbo/turbo-lint.log +0 -498
- package/.turbo/turbo-test.log +0 -21
- package/.turbo/turbo-typecheck.log +0 -4
- package/dist/__tests__/compatibility-scorer.test.d.ts.map +0 -1
- package/dist/__tests__/compatibility-scorer.test.js.map +0 -1
- package/dist/__tests__/rules-engine.test.d.ts.map +0 -1
- package/dist/__tests__/rules-engine.test.js.map +0 -1
- package/dist/__tests__/scaffold-orchestrator.test.d.ts.map +0 -1
- package/dist/__tests__/scaffold-orchestrator.test.js.map +0 -1
- package/dist/__tests__/stack-engine.test.d.ts.map +0 -1
- package/dist/__tests__/stack-engine.test.js.map +0 -1
- package/dist/db/database.d.ts.map +0 -1
- package/dist/db/database.js.map +0 -1
- package/dist/db/index.d.ts.map +0 -1
- package/dist/db/index.js.map +0 -1
- package/dist/engine/compatibility-scorer.d.ts.map +0 -1
- package/dist/engine/compatibility-scorer.js.map +0 -1
- package/dist/engine/compose-generator.d.ts.map +0 -1
- package/dist/engine/compose-generator.js.map +0 -1
- package/dist/engine/cost-estimator.d.ts.map +0 -1
- package/dist/engine/cost-estimator.js.map +0 -1
- package/dist/engine/env-analyzer.d.ts.map +0 -1
- package/dist/engine/env-analyzer.js.map +0 -1
- package/dist/engine/health-checker.d.ts.map +0 -1
- package/dist/engine/health-checker.js.map +0 -1
- package/dist/engine/index.d.ts.map +0 -1
- package/dist/engine/index.js.map +0 -1
- package/dist/engine/infra-generator.d.ts.map +0 -1
- package/dist/engine/infra-generator.js.map +0 -1
- package/dist/engine/migration-planner.d.ts.map +0 -1
- package/dist/engine/migration-planner.js.map +0 -1
- package/dist/engine/performance-profiler.d.ts.map +0 -1
- package/dist/engine/performance-profiler.js.map +0 -1
- package/dist/engine/plugin-loader.d.ts.map +0 -1
- package/dist/engine/plugin-loader.js.map +0 -1
- package/dist/engine/preferences.d.ts.map +0 -1
- package/dist/engine/preferences.js.map +0 -1
- package/dist/engine/rules-engine.d.ts.map +0 -1
- package/dist/engine/rules-engine.js.map +0 -1
- package/dist/engine/runtime-manager.d.ts.map +0 -1
- package/dist/engine/runtime-manager.js.map +0 -1
- package/dist/engine/scaffold-orchestrator.d.ts.map +0 -1
- package/dist/engine/scaffold-orchestrator.js.map +0 -1
- package/dist/engine/stack-detector.d.ts.map +0 -1
- package/dist/engine/stack-detector.js.map +0 -1
- package/dist/engine/stack-differ.d.ts.map +0 -1
- package/dist/engine/stack-differ.js.map +0 -1
- package/dist/engine/stack-engine.d.ts.map +0 -1
- package/dist/engine/stack-engine.js.map +0 -1
- package/dist/engine/stack-serializer.d.ts.map +0 -1
- package/dist/engine/stack-serializer.js.map +0 -1
- package/dist/engine/standards-linter.d.ts.map +0 -1
- package/dist/engine/standards-linter.js.map +0 -1
- package/dist/engine/tech-installer.d.ts.map +0 -1
- package/dist/engine/tech-installer.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/types/project.d.ts.map +0 -1
- package/dist/types/project.js.map +0 -1
- package/dist/types/stack.d.ts.map +0 -1
- package/dist/types/stack.js.map +0 -1
- package/dist/types/technology.d.ts.map +0 -1
- package/dist/types/technology.js.map +0 -1
- package/dist/types/template.d.ts.map +0 -1
- package/dist/types/template.js.map +0 -1
- package/dist/types/validation.d.ts.map +0 -1
- package/dist/types/validation.js.map +0 -1
- package/src/__tests__/compatibility-scorer.test.ts +0 -264
- package/src/__tests__/rules-engine.test.ts +0 -170
- package/src/__tests__/scaffold-orchestrator.test.ts +0 -161
- package/src/__tests__/stack-engine.test.ts +0 -328
- package/src/db/database.ts +0 -112
- package/src/db/index.ts +0 -1
- package/src/engine/compatibility-scorer.ts +0 -222
- package/src/engine/compose-generator.ts +0 -134
- package/src/engine/cost-estimator.ts +0 -498
- package/src/engine/env-analyzer.ts +0 -156
- package/src/engine/health-checker.ts +0 -421
- package/src/engine/index.ts +0 -17
- package/src/engine/infra-generator.ts +0 -837
- package/src/engine/migration-planner.ts +0 -496
- package/src/engine/performance-profiler.ts +0 -354
- package/src/engine/plugin-loader.ts +0 -216
- package/src/engine/preferences.ts +0 -85
- package/src/engine/rules-engine.ts +0 -204
- package/src/engine/runtime-manager.ts +0 -207
- package/src/engine/scaffold-orchestrator.ts +0 -1052
- package/src/engine/stack-detector.ts +0 -345
- package/src/engine/stack-differ.ts +0 -118
- package/src/engine/stack-engine.ts +0 -258
- package/src/engine/stack-serializer.ts +0 -95
- package/src/engine/standards-linter.ts +0 -210
- package/src/engine/tech-installer.ts +0 -650
- package/src/index.ts +0 -78
- package/src/types/index.ts +0 -10
- package/src/types/project.ts +0 -36
- package/src/types/stack.ts +0 -32
- package/src/types/technology.ts +0 -58
- package/src/types/template.ts +0 -37
- package/src/types/validation.ts +0 -22
- package/tsconfig.json +0 -10
- 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
|
+
[](https://github.com/mundowise/Stackweld/releases)
|
|
4
|
+
[](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
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=compatibility-scorer.test.d.ts.map
|
|
2
|
+
//# sourceMappingURL=compatibility-scorer.test.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=rules-engine.test.d.ts.map
|
|
2
|
+
//# sourceMappingURL=rules-engine.test.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=scaffold-orchestrator.test.d.ts.map
|
|
2
|
+
//# sourceMappingURL=scaffold-orchestrator.test.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=stack-engine.test.d.ts.map
|
|
2
|
+
//# sourceMappingURL=stack-engine.test.d.ts.map
|
package/dist/db/database.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ import Database from "better-sqlite3";
|
|
|
6
6
|
export declare function getDatabase(dbPath?: string): Database.Database;
|
|
7
7
|
export declare function closeDatabase(): void;
|
|
8
8
|
export declare function getDefaultDbPath(): string;
|
|
9
|
-
//# sourceMappingURL=database.d.ts.map
|
|
9
|
+
//# sourceMappingURL=database.d.ts.map
|
|
@@ -4,34 +4,31 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { Technology } from "../types/index.js";
|
|
6
6
|
export interface CompatibilityResult {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
score: number;
|
|
8
|
+
grade: "S" | "A" | "B" | "C" | "D" | "F";
|
|
9
|
+
factors: CompatibilityFactor[];
|
|
10
|
+
recommendation: string;
|
|
11
11
|
}
|
|
12
12
|
export interface CompatibilityFactor {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
label: string;
|
|
14
|
+
points: number;
|
|
15
|
+
description: string;
|
|
16
16
|
}
|
|
17
17
|
export interface StackScoreResult {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
overall: number;
|
|
19
|
+
grade: string;
|
|
20
|
+
pairs: Array<{
|
|
21
|
+
a: string;
|
|
22
|
+
b: string;
|
|
23
|
+
score: number;
|
|
24
|
+
}>;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* Score the compatibility between two technologies (0-100).
|
|
28
28
|
*/
|
|
29
|
-
export declare function scoreCompatibility(
|
|
30
|
-
techA: Technology,
|
|
31
|
-
techB: Technology,
|
|
32
|
-
): CompatibilityResult;
|
|
29
|
+
export declare function scoreCompatibility(techA: Technology, techB: Technology): CompatibilityResult;
|
|
33
30
|
/**
|
|
34
31
|
* Score an entire stack by evaluating all unique pairs.
|
|
35
32
|
*/
|
|
36
33
|
export declare function scoreStack(technologies: Technology[]): StackScoreResult;
|
|
37
|
-
//# sourceMappingURL=compatibility-scorer.d.ts.map
|
|
34
|
+
//# sourceMappingURL=compatibility-scorer.d.ts.map
|
|
@@ -3,33 +3,31 @@
|
|
|
3
3
|
* No disk I/O — returns structured data for preview or writing.
|
|
4
4
|
*/
|
|
5
5
|
export interface ComposePreviewResult {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
yaml: string;
|
|
7
|
+
services: string[];
|
|
8
|
+
ports: Record<string, number>;
|
|
9
|
+
volumes: string[];
|
|
10
10
|
}
|
|
11
11
|
interface ComposeTechnology {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
category?: string;
|
|
15
|
+
dockerImage?: string;
|
|
16
|
+
defaultPort?: number;
|
|
17
|
+
envVars?: Record<string, string>;
|
|
18
|
+
healthCheck?: {
|
|
19
|
+
endpoint?: string;
|
|
20
|
+
command?: string;
|
|
21
|
+
interval?: string;
|
|
22
|
+
timeout?: string;
|
|
23
|
+
retries?: number;
|
|
24
|
+
};
|
|
25
|
+
port?: number;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* Generate a docker-compose.yml preview from a list of technologies.
|
|
29
29
|
* Only includes technologies that have a `dockerImage`.
|
|
30
30
|
*/
|
|
31
|
-
export declare function generateComposePreview(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
): ComposePreviewResult;
|
|
35
|
-
//# sourceMappingURL=compose-generator.d.ts.map
|
|
31
|
+
export declare function generateComposePreview(technologies: ComposeTechnology[], projectName: string): ComposePreviewResult;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=compose-generator.d.ts.map
|
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { Technology } from "../types/technology.js";
|
|
5
5
|
export interface CostItem {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
service: string;
|
|
7
|
+
provider: string;
|
|
8
|
+
monthlyCost: string;
|
|
9
|
+
notes: string;
|
|
10
10
|
}
|
|
11
11
|
export interface CostEstimate {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
monthly: {
|
|
13
|
+
min: number;
|
|
14
|
+
max: number;
|
|
15
|
+
currency: string;
|
|
16
|
+
};
|
|
17
|
+
breakdown: CostItem[];
|
|
18
|
+
tier: "free" | "budget" | "standard" | "premium";
|
|
19
|
+
notes: string[];
|
|
20
20
|
}
|
|
21
21
|
export declare function estimateCost(technologies: Technology[]): CostEstimate;
|
|
22
|
-
//# sourceMappingURL=cost-estimator.d.ts.map
|
|
22
|
+
//# sourceMappingURL=cost-estimator.d.ts.map
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
* Environment Analyzer — Sync .env files and detect dangerous values.
|
|
3
3
|
*/
|
|
4
4
|
export interface EnvVar {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
key: string;
|
|
6
|
+
value: string;
|
|
7
|
+
line: number;
|
|
8
8
|
}
|
|
9
9
|
export interface EnvSyncResult {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
missing: string[];
|
|
11
|
+
extra: string[];
|
|
12
|
+
dangerous: EnvDangerousVar[];
|
|
13
|
+
total: {
|
|
14
|
+
example: number;
|
|
15
|
+
actual: number;
|
|
16
|
+
};
|
|
17
17
|
}
|
|
18
18
|
export interface EnvDangerousVar {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
key: string;
|
|
20
|
+
value: string;
|
|
21
|
+
reason: string;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* Parse a .env file content into an array of key/value pairs.
|
|
@@ -33,4 +33,4 @@ export declare function syncEnv(exampleContent: string, actualContent: string):
|
|
|
33
33
|
* Detect environment variables with insecure or placeholder values.
|
|
34
34
|
*/
|
|
35
35
|
export declare function checkDangerous(vars: EnvVar[]): EnvDangerousVar[];
|
|
36
|
-
//# sourceMappingURL=env-analyzer.d.ts.map
|
|
36
|
+
//# sourceMappingURL=env-analyzer.d.ts.map
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
* Stack Health Monitor — Checks project health across multiple dimensions.
|
|
3
3
|
*/
|
|
4
4
|
export interface HealthReport {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
overall: "healthy" | "warning" | "critical";
|
|
6
|
+
checks: HealthCheck[];
|
|
7
|
+
summary: {
|
|
8
|
+
passed: number;
|
|
9
|
+
warnings: number;
|
|
10
|
+
critical: number;
|
|
11
|
+
};
|
|
12
12
|
}
|
|
13
13
|
export interface HealthCheck {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
name: string;
|
|
15
|
+
status: "pass" | "warn" | "fail";
|
|
16
|
+
message: string;
|
|
17
|
+
suggestion?: string;
|
|
18
18
|
}
|
|
19
19
|
export declare function checkProjectHealth(projectPath: string): HealthReport;
|
|
20
|
-
//# sourceMappingURL=health-checker.d.ts.map
|
|
20
|
+
//# sourceMappingURL=health-checker.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Stack Health Monitor — Checks project health across multiple dimensions.
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { execFileSync } from "node:child_process";
|
|
5
5
|
import * as fs from "node:fs";
|
|
6
6
|
import * as path from "node:path";
|
|
7
7
|
// ─── Helpers ──────────────────────────────────────────
|
|
@@ -18,18 +18,26 @@ function readFileContent(filePath) {
|
|
|
18
18
|
}
|
|
19
19
|
function execQuiet(command, cwd) {
|
|
20
20
|
try {
|
|
21
|
-
|
|
21
|
+
const parts = command.split(/\s+/).filter(Boolean);
|
|
22
|
+
return execFileSync(parts[0], parts.slice(1), { stdio: "pipe", timeout: 10000, cwd })
|
|
23
|
+
.toString()
|
|
24
|
+
.trim();
|
|
22
25
|
}
|
|
23
26
|
catch {
|
|
24
27
|
return null;
|
|
25
28
|
}
|
|
26
29
|
}
|
|
27
30
|
function getDirSizeMB(dirPath) {
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
try {
|
|
32
|
+
const result = execFileSync("du", ["-sm", dirPath], { stdio: "pipe", timeout: 10000 })
|
|
33
|
+
.toString()
|
|
34
|
+
.trim();
|
|
35
|
+
const match = result.match(/^(\d+)/);
|
|
36
|
+
return match ? parseInt(match[1], 10) : null;
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
30
39
|
return null;
|
|
31
|
-
|
|
32
|
-
return match ? parseInt(match[1], 10) : null;
|
|
40
|
+
}
|
|
33
41
|
}
|
|
34
42
|
// ─── Individual Checks ───────────────────────────────
|
|
35
43
|
function checkLockFile(projectPath) {
|
|
@@ -4,23 +4,20 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export type DeployTarget = "vps" | "aws" | "gcp";
|
|
6
6
|
export interface InfraOutput {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
target: DeployTarget;
|
|
8
|
+
files: Array<{
|
|
9
|
+
path: string;
|
|
10
|
+
content: string;
|
|
11
|
+
}>;
|
|
12
|
+
instructions: string[];
|
|
13
13
|
}
|
|
14
14
|
interface InfraTechnology {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
category: string;
|
|
18
|
+
dockerImage?: string;
|
|
19
|
+
defaultPort?: number;
|
|
20
20
|
}
|
|
21
|
-
export declare function generateInfra(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
target: DeployTarget,
|
|
25
|
-
): InfraOutput;
|
|
26
|
-
//# sourceMappingURL=infra-generator.d.ts.map
|
|
21
|
+
export declare function generateInfra(technologies: InfraTechnology[], projectName: string, target: DeployTarget): InfraOutput;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=infra-generator.d.ts.map
|
|
@@ -3,32 +3,28 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { Technology } from "../types/technology.js";
|
|
5
5
|
export interface MigrationStep {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
order: number;
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
commands?: string[];
|
|
10
|
+
files?: string[];
|
|
11
11
|
}
|
|
12
12
|
export interface MigrationPlan {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
from: {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
};
|
|
17
|
+
to: {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
};
|
|
21
|
+
steps: MigrationStep[];
|
|
22
|
+
difficulty: "easy" | "moderate" | "hard" | "expert";
|
|
23
|
+
estimatedTime: string;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Generate a migration plan between two technologies.
|
|
27
27
|
* Uses known migration paths when available, otherwise generates generic steps.
|
|
28
28
|
*/
|
|
29
|
-
export declare function planMigration(
|
|
30
|
-
|
|
31
|
-
toId: string,
|
|
32
|
-
techs: Technology[],
|
|
33
|
-
): MigrationPlan;
|
|
34
|
-
//# sourceMappingURL=migration-planner.d.ts.map
|
|
29
|
+
export declare function planMigration(fromId: string, toId: string, techs: Technology[]): MigrationPlan;
|
|
30
|
+
//# sourceMappingURL=migration-planner.d.ts.map
|
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { Technology, TechnologyCategory } from "../types/technology.js";
|
|
5
5
|
export interface TechPerformance {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
category: TechnologyCategory;
|
|
9
|
+
perf: "fast" | "moderate" | "heavy";
|
|
10
|
+
note: string;
|
|
11
11
|
}
|
|
12
12
|
export interface PerformanceProfile {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
stackName: string;
|
|
14
|
+
rating: "blazing" | "fast" | "moderate" | "heavy";
|
|
15
|
+
estimatedReqPerSec: string;
|
|
16
|
+
estimatedColdStart: string;
|
|
17
|
+
estimatedMemory: string;
|
|
18
|
+
notes: string[];
|
|
19
|
+
techProfiles: TechPerformance[];
|
|
20
20
|
}
|
|
21
21
|
export declare function profilePerformance(technologies: Technology[]): PerformanceProfile;
|
|
22
|
-
//# sourceMappingURL=performance-profiler.d.ts.map
|
|
22
|
+
//# sourceMappingURL=performance-profiler.d.ts.map
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* Preferences — Persistent user preferences stored in SQLite.
|
|
3
3
|
*/
|
|
4
4
|
export interface UserPreferences {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
editor: string;
|
|
6
|
+
packageManager: string;
|
|
7
|
+
shell: string;
|
|
8
|
+
dockerMode: string;
|
|
9
|
+
defaultProfile: string;
|
|
10
|
+
theme: string;
|
|
11
11
|
}
|
|
12
12
|
/** Get all preferences, merged with defaults. */
|
|
13
13
|
export declare function getPreferences(): UserPreferences;
|
|
@@ -21,4 +21,4 @@ export declare function resetPreferences(): void;
|
|
|
21
21
|
export declare function getPreferenceKeys(): (keyof UserPreferences)[];
|
|
22
22
|
/** Get default values. */
|
|
23
23
|
export declare function getDefaultPreferences(): UserPreferences;
|
|
24
|
-
//# sourceMappingURL=preferences.d.ts.map
|
|
24
|
+
//# sourceMappingURL=preferences.d.ts.map
|
|
@@ -4,62 +4,52 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { RuntimeState, ServiceStatus, Technology } from "../types/index.js";
|
|
6
6
|
export interface RuntimeOptions {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
composePath: string;
|
|
8
|
+
projectDir: string;
|
|
9
9
|
}
|
|
10
10
|
export declare class RuntimeManager {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
opts: RuntimeOptions
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
*/
|
|
55
|
-
getRuntimeState(projectId: string, opts: RuntimeOptions): RuntimeState;
|
|
56
|
-
/**
|
|
57
|
-
* Check if docker compose file exists at path.
|
|
58
|
-
*/
|
|
59
|
-
composeExists(projectDir: string): string | null;
|
|
60
|
-
/**
|
|
61
|
-
* Check if Docker is available.
|
|
62
|
-
*/
|
|
63
|
-
isDockerAvailable(): boolean;
|
|
11
|
+
private technologies;
|
|
12
|
+
constructor(technologies: Technology[]);
|
|
13
|
+
/**
|
|
14
|
+
* Start all services with docker compose up.
|
|
15
|
+
*/
|
|
16
|
+
up(opts: RuntimeOptions, detach?: boolean): {
|
|
17
|
+
success: boolean;
|
|
18
|
+
output: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Stop all services.
|
|
22
|
+
*/
|
|
23
|
+
down(opts: RuntimeOptions, volumes?: boolean): {
|
|
24
|
+
success: boolean;
|
|
25
|
+
output: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Get status of all services in the compose file.
|
|
29
|
+
*/
|
|
30
|
+
status(opts: RuntimeOptions): ServiceStatus[];
|
|
31
|
+
/**
|
|
32
|
+
* Get logs for a specific service or all services.
|
|
33
|
+
*/
|
|
34
|
+
logs(opts: RuntimeOptions, service?: string, tail?: number, follow?: boolean): string;
|
|
35
|
+
/**
|
|
36
|
+
* Wait for all services to be healthy.
|
|
37
|
+
*/
|
|
38
|
+
waitForHealthy(opts: RuntimeOptions, timeoutMs?: number, intervalMs?: number): Promise<{
|
|
39
|
+
healthy: boolean;
|
|
40
|
+
services: ServiceStatus[];
|
|
41
|
+
}>;
|
|
42
|
+
/**
|
|
43
|
+
* Build RuntimeState from current container status.
|
|
44
|
+
*/
|
|
45
|
+
getRuntimeState(projectId: string, opts: RuntimeOptions): RuntimeState;
|
|
46
|
+
/**
|
|
47
|
+
* Check if docker compose file exists at path.
|
|
48
|
+
*/
|
|
49
|
+
composeExists(projectDir: string): string | null;
|
|
50
|
+
/**
|
|
51
|
+
* Check if Docker is available.
|
|
52
|
+
*/
|
|
53
|
+
isDockerAvailable(): boolean;
|
|
64
54
|
}
|
|
65
|
-
//# sourceMappingURL=runtime-manager.d.ts.map
|
|
55
|
+
//# sourceMappingURL=runtime-manager.d.ts.map
|