@getcoherent/cli 0.6.35 → 0.6.36
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.
|
@@ -2230,6 +2230,12 @@ async function regenerateLayout(config, projectRoot, options = {
|
|
|
2230
2230
|
await mkdirAsync(resolve3(projectRoot, "app", "(public)"), { recursive: true });
|
|
2231
2231
|
await writeFileAsync(publicLayoutPath, buildPublicLayoutCodeForSidebar(), "utf-8");
|
|
2232
2232
|
}
|
|
2233
|
+
const rootPagePath = resolve3(projectRoot, "app", "page.tsx");
|
|
2234
|
+
const publicPagePath = resolve3(projectRoot, "app", "(public)", "page.tsx");
|
|
2235
|
+
if (existsSync5(rootPagePath) && !existsSync5(publicPagePath)) {
|
|
2236
|
+
const { renameSync } = await import("fs");
|
|
2237
|
+
renameSync(rootPagePath, publicPagePath);
|
|
2238
|
+
}
|
|
2233
2239
|
const themeTogglePath = resolve3(projectRoot, "components", "shared", "theme-toggle.tsx");
|
|
2234
2240
|
if (!existsSync5(themeTogglePath)) {
|
|
2235
2241
|
await mkdirAsync(resolve3(projectRoot, "components", "shared"), { recursive: true });
|
package/dist/index.js
CHANGED
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
warnIfVolatile,
|
|
39
39
|
warnInlineDuplicates,
|
|
40
40
|
writeFile
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-TD2ZYIIC.js";
|
|
42
42
|
import {
|
|
43
43
|
COHERENT_REQUIRED_PACKAGES,
|
|
44
44
|
ensureUseClientIfNeeded,
|
|
@@ -8480,7 +8480,7 @@ async function fixCommand(opts = {}) {
|
|
|
8480
8480
|
}
|
|
8481
8481
|
try {
|
|
8482
8482
|
const { loadPlan: loadPlan2 } = await import("./plan-generator-625ZNUZF.js");
|
|
8483
|
-
const { ensurePlanGroupLayouts: ensurePlanGroupLayouts2 } = await import("./code-generator-
|
|
8483
|
+
const { ensurePlanGroupLayouts: ensurePlanGroupLayouts2 } = await import("./code-generator-D3ZHOO4M.js");
|
|
8484
8484
|
const plan = loadPlan2(projectRoot);
|
|
8485
8485
|
if (plan) {
|
|
8486
8486
|
if (!dsm) {
|
|
@@ -8526,15 +8526,24 @@ async function fixCommand(opts = {}) {
|
|
|
8526
8526
|
const publicExists = existsSync16(publicLayoutPath);
|
|
8527
8527
|
const needsPublicLayout = !publicExists || !readFileSync12(publicLayoutPath, "utf-8").includes("<Header");
|
|
8528
8528
|
if (needsPublicLayout) {
|
|
8529
|
-
const { buildPublicLayoutCodeForSidebar } = await import("./code-generator-
|
|
8529
|
+
const { buildPublicLayoutCodeForSidebar } = await import("./code-generator-D3ZHOO4M.js");
|
|
8530
8530
|
mkdirSync7(resolve10(projectRoot, "app", "(public)"), { recursive: true });
|
|
8531
8531
|
writeFileSync10(publicLayoutPath, buildPublicLayoutCodeForSidebar(), "utf-8");
|
|
8532
8532
|
fixes.push("Added Header/Footer to (public) layout");
|
|
8533
8533
|
console.log(chalk15.green(" \u2714 Added Header/Footer to (public) layout"));
|
|
8534
8534
|
}
|
|
8535
|
+
const rootPagePath = resolve10(projectRoot, "app", "page.tsx");
|
|
8536
|
+
const publicPagePath = resolve10(projectRoot, "app", "(public)", "page.tsx");
|
|
8537
|
+
if (existsSync16(rootPagePath) && !existsSync16(publicPagePath)) {
|
|
8538
|
+
const { renameSync } = await import("fs");
|
|
8539
|
+
mkdirSync7(resolve10(projectRoot, "app", "(public)"), { recursive: true });
|
|
8540
|
+
renameSync(rootPagePath, publicPagePath);
|
|
8541
|
+
fixes.push("Moved app/page.tsx \u2192 app/(public)/page.tsx (sidebar mode)");
|
|
8542
|
+
console.log(chalk15.green(" \u2714 Moved app/page.tsx \u2192 app/(public)/page.tsx (gets Header/Footer)"));
|
|
8543
|
+
}
|
|
8535
8544
|
const themeTogglePath = resolve10(projectRoot, "components", "shared", "theme-toggle.tsx");
|
|
8536
8545
|
if (!existsSync16(themeTogglePath)) {
|
|
8537
|
-
const { generateThemeToggleCode } = await import("./code-generator-
|
|
8546
|
+
const { generateThemeToggleCode } = await import("./code-generator-D3ZHOO4M.js");
|
|
8538
8547
|
mkdirSync7(resolve10(projectRoot, "components", "shared"), { recursive: true });
|
|
8539
8548
|
writeFileSync10(themeTogglePath, generateThemeToggleCode(), "utf-8");
|
|
8540
8549
|
fixes.push("Generated ThemeToggle component (components/shared/theme-toggle.tsx)");
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.6.
|
|
6
|
+
"version": "0.6.36",
|
|
7
7
|
"description": "CLI interface for Coherent Design Method",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"main": "./dist/index.js",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"ora": "^7.0.1",
|
|
44
44
|
"prompts": "^2.4.2",
|
|
45
45
|
"zod": "^3.22.4",
|
|
46
|
-
"@getcoherent/core": "0.6.
|
|
46
|
+
"@getcoherent/core": "0.6.36"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/node": "^20.11.0",
|