@getcoherent/cli 0.6.36 → 0.6.37
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 +21 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -8532,6 +8532,27 @@ async function fixCommand(opts = {}) {
|
|
|
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 appLayoutPath = resolve10(projectRoot, "app", "(app)", "layout.tsx");
|
|
8536
|
+
if (existsSync16(appLayoutPath) && dsm) {
|
|
8537
|
+
let appLayoutCode = readFileSync12(appLayoutPath, "utf-8");
|
|
8538
|
+
const configName = dsm.getConfig().name;
|
|
8539
|
+
if (configName && configName !== "My App" && appLayoutCode.includes("My App")) {
|
|
8540
|
+
appLayoutCode = appLayoutCode.replace(/My App/g, configName);
|
|
8541
|
+
writeFileSync10(appLayoutPath, appLayoutCode, "utf-8");
|
|
8542
|
+
fixes.push(`Replaced "My App" with "${configName}" in (app)/layout.tsx`);
|
|
8543
|
+
console.log(chalk15.green(` \u2714 Replaced "My App" with "${configName}" in (app)/layout.tsx`));
|
|
8544
|
+
}
|
|
8545
|
+
}
|
|
8546
|
+
const sidebarComponentPath = resolve10(projectRoot, "components", "shared", "sidebar.tsx");
|
|
8547
|
+
if (existsSync16(sidebarComponentPath)) {
|
|
8548
|
+
let sidebarCode = readFileSync12(sidebarComponentPath, "utf-8");
|
|
8549
|
+
if (sidebarCode.includes("SidebarTrigger")) {
|
|
8550
|
+
sidebarCode = sidebarCode.replace(/\s*SidebarTrigger,?\n?/g, "\n").replace(/\s*<SidebarTrigger\s*\/>\s*\n?/g, "\n").replace(/flex items-center justify-between/g, "flex items-center");
|
|
8551
|
+
writeFileSync10(sidebarComponentPath, sidebarCode, "utf-8");
|
|
8552
|
+
fixes.push("Removed duplicate SidebarTrigger from sidebar component");
|
|
8553
|
+
console.log(chalk15.green(" \u2714 Removed duplicate SidebarTrigger from sidebar component"));
|
|
8554
|
+
}
|
|
8555
|
+
}
|
|
8535
8556
|
const rootPagePath = resolve10(projectRoot, "app", "page.tsx");
|
|
8536
8557
|
const publicPagePath = resolve10(projectRoot, "app", "(public)", "page.tsx");
|
|
8537
8558
|
if (existsSync16(rootPagePath) && !existsSync16(publicPagePath)) {
|
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.37",
|
|
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.37"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/node": "^20.11.0",
|