@nimoh-digital-solutions/create-nimoh-app 1.1.0 → 1.1.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/dist/index.cjs +15 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5211,6 +5211,7 @@ async function scaffoldBackend(opts) {
|
|
|
5211
5211
|
logStep("Running nimoh-base init (answer the remaining prompts)");
|
|
5212
5212
|
console.log("");
|
|
5213
5213
|
const nimohBase = venvBin(venvDir, "nimoh-base");
|
|
5214
|
+
const slug = toPythonSlug(projectName);
|
|
5214
5215
|
try {
|
|
5215
5216
|
const { code } = await spawnInteractive(
|
|
5216
5217
|
nimohBase,
|
|
@@ -5223,6 +5224,10 @@ async function scaffoldBackend(opts) {
|
|
|
5223
5224
|
} finally {
|
|
5224
5225
|
safeUnlink(configPath);
|
|
5225
5226
|
}
|
|
5227
|
+
const nestedDir = import_path.default.join(backendDir, slug);
|
|
5228
|
+
if (exists(nestedDir)) {
|
|
5229
|
+
hoistDirectory(nestedDir, backendDir);
|
|
5230
|
+
}
|
|
5226
5231
|
logOk("Backend scaffolded");
|
|
5227
5232
|
}
|
|
5228
5233
|
function venvBin(venvDir, name) {
|
|
@@ -5242,6 +5247,15 @@ function writeTempConfig(projectName, portOffset) {
|
|
|
5242
5247
|
writeText(configPath, yaml);
|
|
5243
5248
|
return configPath;
|
|
5244
5249
|
}
|
|
5250
|
+
function hoistDirectory(srcDir, destDir) {
|
|
5251
|
+
for (const entry of import_fs2.default.readdirSync(srcDir)) {
|
|
5252
|
+
const src = import_path.default.join(srcDir, entry);
|
|
5253
|
+
const dest = import_path.default.join(destDir, entry);
|
|
5254
|
+
if (exists(dest)) continue;
|
|
5255
|
+
import_fs2.default.renameSync(src, dest);
|
|
5256
|
+
}
|
|
5257
|
+
import_fs2.default.rmSync(srcDir, { recursive: true, force: true });
|
|
5258
|
+
}
|
|
5245
5259
|
function safeUnlink(absPath) {
|
|
5246
5260
|
try {
|
|
5247
5261
|
if (exists(absPath)) import_fs2.default.unlinkSync(absPath);
|
|
@@ -5344,7 +5358,7 @@ function initRootGit(projectRoot) {
|
|
|
5344
5358
|
function printBanner() {
|
|
5345
5359
|
console.log("");
|
|
5346
5360
|
console.log(" \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557");
|
|
5347
|
-
console.log(` \u2551 create-nimoh-app v${"1.1.
|
|
5361
|
+
console.log(` \u2551 create-nimoh-app v${"1.1.1"} \u2551`);
|
|
5348
5362
|
console.log(" \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D");
|
|
5349
5363
|
console.log("");
|
|
5350
5364
|
console.log(" Full-stack project scaffolder");
|
package/package.json
CHANGED