@getcoherent/cli 0.6.41 → 0.6.42

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.
Files changed (2) hide show
  1. package/dist/index.js +21 -0
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -8632,6 +8632,27 @@ async function fixCommand(opts = {}) {
8632
8632
  }
8633
8633
  }
8634
8634
  }
8635
+ const sharedDir = resolve10(projectRoot, "components", "shared");
8636
+ if (existsSync17(sharedDir) && dsm) {
8637
+ const cfgName = dsm.getConfig().name;
8638
+ if (cfgName && cfgName !== "My App") {
8639
+ try {
8640
+ for (const f of readdirSync7(sharedDir).filter((n) => n.endsWith(".tsx"))) {
8641
+ const sharedPath = join12(sharedDir, f);
8642
+ const sharedCode = readFileSync13(sharedPath, "utf-8");
8643
+ if (sharedCode.includes("My App")) {
8644
+ const updated = sharedCode.replace(/My App/g, cfgName);
8645
+ const sharedResult = safeWrite(sharedPath, updated, projectRoot, backups);
8646
+ if (sharedResult.ok) {
8647
+ fixes.push(`Replaced "My App" with "${cfgName}" in components/shared/${f}`);
8648
+ console.log(chalk15.green(` \u2714 Replaced "My App" with "${cfgName}" in components/shared/${f}`));
8649
+ }
8650
+ }
8651
+ }
8652
+ } catch {
8653
+ }
8654
+ }
8655
+ }
8635
8656
  const sidebarComponentPath2 = resolve10(projectRoot, "components", "shared", "sidebar.tsx");
8636
8657
  if (existsSync17(sidebarComponentPath2)) {
8637
8658
  const existingSidebarCode = readFileSync13(sidebarComponentPath2, "utf-8");
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.6.41",
6
+ "version": "0.6.42",
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.41"
46
+ "@getcoherent/core": "0.6.42"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/node": "^20.11.0",