@getcoherent/cli 0.6.29 → 0.6.31

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Sergei Kovtun
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -2209,14 +2209,10 @@ async function regenerateLayout(config, projectRoot, options = {
2209
2209
  if (navType === "sidebar" || navType === "both") {
2210
2210
  if (await canOverwriteShared(projectRoot, "components/shared/sidebar.tsx", hashes)) {
2211
2211
  const sidebarCode = generator.generateSharedSidebarCode();
2212
- await generateSharedComponent(projectRoot, {
2213
- name: "AppSidebar",
2214
- type: "layout",
2215
- code: sidebarCode,
2216
- description: "Application sidebar using shadcn/ui Sidebar components",
2217
- usedIn: ["app/(app)/layout.tsx"],
2218
- overwrite: true
2219
- });
2212
+ const sidebarPath = resolve3(projectRoot, "components", "shared", "sidebar.tsx");
2213
+ const { mkdir: mkdir4, writeFile: writeFile4 } = await import("fs/promises");
2214
+ await mkdir4(resolve3(projectRoot, "components", "shared"), { recursive: true });
2215
+ await writeFile4(sidebarPath, sidebarCode, "utf-8");
2220
2216
  }
2221
2217
  }
2222
2218
  }
@@ -10,7 +10,7 @@ import {
10
10
  regeneratePage,
11
11
  scanAndInstallSharedDeps,
12
12
  validateAndFixGeneratedCode
13
- } from "./chunk-KUXMS2EF.js";
13
+ } from "./chunk-HAOCJBHP.js";
14
14
  import "./chunk-RKXLSNDV.js";
15
15
  import "./chunk-5AHG4NNX.js";
16
16
  import "./chunk-NP2CGABX.js";
package/dist/index.js CHANGED
@@ -38,7 +38,7 @@ import {
38
38
  warnIfVolatile,
39
39
  warnInlineDuplicates,
40
40
  writeFile
41
- } from "./chunk-KUXMS2EF.js";
41
+ } from "./chunk-HAOCJBHP.js";
42
42
  import {
43
43
  COHERENT_REQUIRED_PACKAGES,
44
44
  ensureUseClientIfNeeded,
@@ -8444,7 +8444,7 @@ async function fixCommand(opts = {}) {
8444
8444
  }
8445
8445
  try {
8446
8446
  const { loadPlan: loadPlan2 } = await import("./plan-generator-QKBYJB4A.js");
8447
- const { ensurePlanGroupLayouts: ensurePlanGroupLayouts2 } = await import("./code-generator-LTS6F77G.js");
8447
+ const { ensurePlanGroupLayouts: ensurePlanGroupLayouts2 } = await import("./code-generator-4PGW3SWR.js");
8448
8448
  const plan = loadPlan2(projectRoot);
8449
8449
  if (plan) {
8450
8450
  await ensurePlanGroupLayouts2(projectRoot, plan);
@@ -8458,19 +8458,13 @@ async function fixCommand(opts = {}) {
8458
8458
  dsm = new DesignSystemManager9(project.configPath);
8459
8459
  await dsm.load();
8460
8460
  }
8461
- const { PageGenerator, generateSharedComponent: generateSharedComponent6 } = await import("@getcoherent/core");
8461
+ const { PageGenerator } = await import("@getcoherent/core");
8462
8462
  const generator = new PageGenerator(dsm.getConfig());
8463
8463
  const sidebarCode = generator.generateSharedSidebarCode();
8464
- await generateSharedComponent6(projectRoot, {
8465
- name: "AppSidebar",
8466
- type: "layout",
8467
- code: sidebarCode,
8468
- description: "Application sidebar using shadcn/ui Sidebar components",
8469
- usedIn: ["app/(app)/layout.tsx"],
8470
- overwrite: true
8471
- });
8472
- fixes.push("Generated AppSidebar shared component");
8473
- console.log(chalk15.green(" \u2714 Generated AppSidebar shared component"));
8464
+ mkdirSync7(resolve10(projectRoot, "components", "shared"), { recursive: true });
8465
+ writeFileSync10(sidebarPath, sidebarCode, "utf-8");
8466
+ fixes.push("Generated AppSidebar component (components/shared/sidebar.tsx)");
8467
+ console.log(chalk15.green(" \u2714 Generated AppSidebar component"));
8474
8468
  }
8475
8469
  }
8476
8470
  } catch {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.6.29",
6
+ "version": "0.6.31",
7
7
  "description": "CLI interface for Coherent Design Method",
8
8
  "type": "module",
9
9
  "main": "./dist/index.js",
@@ -33,15 +33,8 @@
33
33
  ],
34
34
  "author": "Coherent Design Method",
35
35
  "license": "MIT",
36
- "scripts": {
37
- "dev": "tsup --watch",
38
- "build": "tsup",
39
- "typecheck": "tsc --noEmit",
40
- "test": "vitest"
41
- },
42
36
  "dependencies": {
43
37
  "@anthropic-ai/sdk": "^0.32.0",
44
- "@getcoherent/core": "workspace:*",
45
38
  "chalk": "^5.3.0",
46
39
  "chokidar": "^4.0.1",
47
40
  "commander": "^11.1.0",
@@ -49,7 +42,8 @@
49
42
  "open": "^10.1.0",
50
43
  "ora": "^7.0.1",
51
44
  "prompts": "^2.4.2",
52
- "zod": "^3.22.4"
45
+ "zod": "^3.22.4",
46
+ "@getcoherent/core": "0.6.31"
53
47
  },
54
48
  "devDependencies": {
55
49
  "@types/node": "^20.11.0",
@@ -58,5 +52,11 @@
58
52
  "react": "^19.2.4",
59
53
  "tsup": "^8.0.1",
60
54
  "typescript": "^5.3.3"
55
+ },
56
+ "scripts": {
57
+ "dev": "tsup --watch",
58
+ "build": "tsup",
59
+ "typecheck": "tsc --noEmit",
60
+ "test": "vitest"
61
61
  }
62
- }
62
+ }