@atlashub/smartstack-cli 4.57.0 → 4.58.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/dist/index.js +40 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -116756,7 +116756,8 @@ EndGlobal
|
|
|
116756
116756
|
"Program.cs",
|
|
116757
116757
|
"appsettings.json",
|
|
116758
116758
|
"appsettings.Development.json",
|
|
116759
|
-
(0, import_path7.join)("Properties", "launchSettings.json")
|
|
116759
|
+
(0, import_path7.join)("Properties", "launchSettings.json"),
|
|
116760
|
+
`${projectName}.Api.http`
|
|
116760
116761
|
];
|
|
116761
116762
|
for (const placeholder of apiPlaceholders) {
|
|
116762
116763
|
const placeholderPath = (0, import_path7.join)(apiDir, placeholder);
|
|
@@ -117198,7 +117199,7 @@ ${projectName}/
|
|
|
117198
117199
|
\u2502 \u2514\u2500\u2500 ${projectName}.Api/ # Web API controllers and configuration
|
|
117199
117200
|
\u251C\u2500\u2500 web/
|
|
117200
117201
|
\u2502 \u2514\u2500\u2500 ${projectName.toLowerCase()}-web/ # React frontend (Vite + TypeScript + Tailwind)
|
|
117201
|
-
\u251C\u2500\u2500 docker-
|
|
117202
|
+
\u251C\u2500\u2500 docker-images/ # Dockerfiles (backend + frontend)
|
|
117202
117203
|
\u2514\u2500\u2500 tests/ # Unit and integration tests
|
|
117203
117204
|
\`\`\`
|
|
117204
117205
|
|
|
@@ -117655,6 +117656,36 @@ Thumbs.db
|
|
|
117655
117656
|
logSafeWriteResult(webClaudeMd_relPath, webClaudeMd_result);
|
|
117656
117657
|
recordFile(state, "frontend", webClaudeMd_relPath, webClaudeMd_result.hash);
|
|
117657
117658
|
}
|
|
117659
|
+
const testFrontendDir = (0, import_path7.join)(TEMPLATES_DIR2, "test-frontend");
|
|
117660
|
+
if (await import_fs_extra6.default.pathExists(testFrontendDir)) {
|
|
117661
|
+
await import_fs_extra6.default.ensureDir((0, import_path7.join)(webDir, "src", "test", "msw"));
|
|
117662
|
+
const vitestContent = await import_fs_extra6.default.readFile((0, import_path7.join)(testFrontendDir, "vitest.config.ts"), "utf-8");
|
|
117663
|
+
const vitest_relPath = `${webRelPrefix}/vitest.config.ts`;
|
|
117664
|
+
const vitest_result = await safeWriteFile(
|
|
117665
|
+
(0, import_path7.join)(webDir, "vitest.config.ts"),
|
|
117666
|
+
vitestContent,
|
|
117667
|
+
findKnownHash(state, "frontend", vitest_relPath)
|
|
117668
|
+
);
|
|
117669
|
+
logSafeWriteResult(vitest_relPath, vitest_result);
|
|
117670
|
+
recordFile(state, "frontend", vitest_relPath, vitest_result.hash);
|
|
117671
|
+
const testFiles = [
|
|
117672
|
+
{ src: "setup.ts", dest: "src/test/setup.ts" },
|
|
117673
|
+
{ src: "test-utils.tsx", dest: "src/test/test-utils.tsx" },
|
|
117674
|
+
{ src: "msw/handlers.ts", dest: "src/test/msw/handlers.ts" },
|
|
117675
|
+
{ src: "msw/server.ts", dest: "src/test/msw/server.ts" }
|
|
117676
|
+
];
|
|
117677
|
+
for (const { src, dest } of testFiles) {
|
|
117678
|
+
const content = await import_fs_extra6.default.readFile((0, import_path7.join)(testFrontendDir, src), "utf-8");
|
|
117679
|
+
const relPath = `${webRelPrefix}/${dest}`;
|
|
117680
|
+
const result = await safeWriteFile(
|
|
117681
|
+
(0, import_path7.join)(webDir, dest),
|
|
117682
|
+
content,
|
|
117683
|
+
findKnownHash(state, "frontend", relPath)
|
|
117684
|
+
);
|
|
117685
|
+
logSafeWriteResult(relPath, result);
|
|
117686
|
+
recordFile(state, "frontend", relPath, result.hash);
|
|
117687
|
+
}
|
|
117688
|
+
}
|
|
117658
117689
|
logger.success("React frontend created at: " + webDir);
|
|
117659
117690
|
}
|
|
117660
117691
|
async function createDockerFiles(config, state, dryRun) {
|
|
@@ -117662,10 +117693,10 @@ async function createDockerFiles(config, state, dryRun) {
|
|
|
117662
117693
|
const projectDir = config.projectDir ?? ((0, import_path7.isAbsolute)(name) ? name : (0, import_path7.join)(process.cwd(), name));
|
|
117663
117694
|
const projectName = (0, import_path7.basename)(name);
|
|
117664
117695
|
if (!dryRun) {
|
|
117665
|
-
await import_fs_extra6.default.ensureDir((0, import_path7.join)(projectDir, "docker-
|
|
117696
|
+
await import_fs_extra6.default.ensureDir((0, import_path7.join)(projectDir, "docker-images"));
|
|
117666
117697
|
}
|
|
117667
117698
|
const backendDockerfile = await loadTemplate("Dockerfile.backend.template", projectName);
|
|
117668
|
-
const backendRelPath = "docker-
|
|
117699
|
+
const backendRelPath = "docker-images/Dockerfile.backend";
|
|
117669
117700
|
if (dryRun) {
|
|
117670
117701
|
logger.info(`Would create ${backendRelPath}`);
|
|
117671
117702
|
} else {
|
|
@@ -117678,7 +117709,7 @@ async function createDockerFiles(config, state, dryRun) {
|
|
|
117678
117709
|
recordFile(state, "docker", backendRelPath, backendResult.hash);
|
|
117679
117710
|
}
|
|
117680
117711
|
const frontendDockerfile = await loadTemplate("Dockerfile.frontend.template", projectName);
|
|
117681
|
-
const frontendRelPath = "docker-
|
|
117712
|
+
const frontendRelPath = "docker-images/Dockerfile.frontend";
|
|
117682
117713
|
if (dryRun) {
|
|
117683
117714
|
logger.info(`Would create ${frontendRelPath}`);
|
|
117684
117715
|
} else {
|
|
@@ -118072,7 +118103,7 @@ var initCommand = new Command("init").description("Initialize a new SmartStack p
|
|
|
118072
118103
|
try {
|
|
118073
118104
|
let cliVersion = "0.0.0";
|
|
118074
118105
|
try {
|
|
118075
|
-
const pkgPath = (0, import_path7.join)((0, import_path7.dirname)(
|
|
118106
|
+
const pkgPath = (0, import_path7.join)((0, import_path7.dirname)(__dirname), "package.json");
|
|
118076
118107
|
const pkg2 = JSON.parse(await import_fs_extra6.default.readFile(pkgPath, "utf-8"));
|
|
118077
118108
|
cliVersion = pkg2.version || "0.0.0";
|
|
118078
118109
|
} catch {
|
|
@@ -118137,8 +118168,8 @@ var initCommand = new Command("init").description("Initialize a new SmartStack p
|
|
|
118137
118168
|
` 3. Start dev server: ${source_default.cyan("npm run dev")}`,
|
|
118138
118169
|
"",
|
|
118139
118170
|
source_default.yellow("Docker:"),
|
|
118140
|
-
` Build backend: ${source_default.cyan(`docker build -t smartstack-${projectNameLower}-backend:latest -f docker-
|
|
118141
|
-
` Build frontend: ${source_default.cyan(`docker build -t smartstack-${projectNameLower}-frontend:latest -f docker-
|
|
118171
|
+
` Build backend: ${source_default.cyan(`docker build -t smartstack-${projectNameLower}-backend:latest -f docker-images/Dockerfile.backend .`)}`,
|
|
118172
|
+
` Build frontend: ${source_default.cyan(`docker build -t smartstack-${projectNameLower}-frontend:latest -f docker-images/Dockerfile.frontend .`)}`,
|
|
118142
118173
|
"",
|
|
118143
118174
|
source_default.yellow("Ralph (AI Automation):"),
|
|
118144
118175
|
` 1. Check MCP servers: ${source_default.cyan("smartstack check-mcp")}`,
|
|
@@ -129094,7 +129125,7 @@ Processing module: ${source_default.bold(moduleName)}`));
|
|
|
129094
129125
|
}
|
|
129095
129126
|
let cliVersion = "unknown";
|
|
129096
129127
|
try {
|
|
129097
|
-
const pkg2 = import_fs_extra15.default.readJsonSync((0, import_path16.join)(__dirname, "..", "
|
|
129128
|
+
const pkg2 = import_fs_extra15.default.readJsonSync((0, import_path16.join)(__dirname, "..", "package.json"));
|
|
129098
129129
|
cliVersion = pkg2.version ?? "unknown";
|
|
129099
129130
|
} catch {
|
|
129100
129131
|
}
|