claudekit-cli 3.5.0 → 3.5.2

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 +59 -12
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7411,7 +7411,7 @@ var require_umd = __commonJS((exports, module) => {
7411
7411
  }
7412
7412
  return 0;
7413
7413
  };
7414
- const compareVersions2 = (v1, v2) => {
7414
+ const compareVersions3 = (v1, v2) => {
7415
7415
  const n1 = validateAndParse(v1);
7416
7416
  const n2 = validateAndParse(v2);
7417
7417
  const p1 = n1.pop();
@@ -7428,7 +7428,7 @@ var require_umd = __commonJS((exports, module) => {
7428
7428
  };
7429
7429
  const compare = (v1, v2, operator) => {
7430
7430
  assertValidOperator(operator);
7431
- const res = compareVersions2(v1, v2);
7431
+ const res = compareVersions3(v1, v2);
7432
7432
  return operatorResMap[operator].includes(res);
7433
7433
  };
7434
7434
  const operatorResMap = {
@@ -7485,7 +7485,7 @@ var require_umd = __commonJS((exports, module) => {
7485
7485
  const validate = (version) => typeof version === "string" && /^[v\d]/.test(version) && semver.test(version);
7486
7486
  const validateStrict = (version) => typeof version === "string" && /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/.test(version);
7487
7487
  exports2.compare = compare;
7488
- exports2.compareVersions = compareVersions2;
7488
+ exports2.compareVersions = compareVersions3;
7489
7489
  exports2.satisfies = satisfies;
7490
7490
  exports2.validate = validate;
7491
7491
  exports2.validateStrict = validateStrict;
@@ -14750,7 +14750,7 @@ var cac = (name = "") => new CAC(name);
14750
14750
  // package.json
14751
14751
  var package_default = {
14752
14752
  name: "claudekit-cli",
14753
- version: "3.5.0",
14753
+ version: "3.5.2",
14754
14754
  description: "CLI tool for bootstrapping and updating ClaudeKit projects",
14755
14755
  type: "module",
14756
14756
  repository: {
@@ -15408,6 +15408,21 @@ async function installDependency(dependency, method) {
15408
15408
  // src/lib/health-checks/system-checker.ts
15409
15409
  init_logger();
15410
15410
  var execAsync3 = promisify3(exec3);
15411
+ var MIN_GH_CLI_VERSION = "2.20.0";
15412
+ function compareVersions2(a3, b3) {
15413
+ const partsA = a3.split(".").map(Number);
15414
+ const partsB = b3.split(".").map(Number);
15415
+ const maxLen = Math.max(partsA.length, partsB.length);
15416
+ for (let i = 0;i < maxLen; i++) {
15417
+ const numA = partsA[i] ?? 0;
15418
+ const numB = partsB[i] ?? 0;
15419
+ if (numA < numB)
15420
+ return -1;
15421
+ if (numA > numB)
15422
+ return 1;
15423
+ }
15424
+ return 0;
15425
+ }
15411
15426
 
15412
15427
  class SystemChecker {
15413
15428
  group = "system";
@@ -15527,12 +15542,25 @@ class SystemChecker {
15527
15542
  try {
15528
15543
  const { stdout } = await execAsync3("gh --version");
15529
15544
  const match = stdout.match(/(\d+\.\d+\.\d+)/);
15545
+ const version = match?.[1];
15546
+ if (version && compareVersions2(version, MIN_GH_CLI_VERSION) < 0) {
15547
+ return {
15548
+ id: "gh-cli-version",
15549
+ name: "GitHub CLI",
15550
+ group: "system",
15551
+ status: "warn",
15552
+ message: `v${version} (outdated)`,
15553
+ details: `Minimum required: v${MIN_GH_CLI_VERSION}`,
15554
+ suggestion: this.getGhUpgradeInstructions(),
15555
+ autoFixable: false
15556
+ };
15557
+ }
15530
15558
  return {
15531
15559
  id: "gh-cli-version",
15532
15560
  name: "GitHub CLI",
15533
15561
  group: "system",
15534
15562
  status: "pass",
15535
- message: match ? `v${match[1]}` : "Installed",
15563
+ message: version ? `v${version}` : "Installed",
15536
15564
  autoFixable: true,
15537
15565
  fix: undefined
15538
15566
  };
@@ -15549,6 +15577,13 @@ class SystemChecker {
15549
15577
  };
15550
15578
  }
15551
15579
  }
15580
+ getGhUpgradeInstructions() {
15581
+ return `Upgrade GitHub CLI to v${MIN_GH_CLI_VERSION}+:
15582
+ macOS: brew upgrade gh
15583
+ Windows: winget upgrade GitHub.cli
15584
+ Linux: sudo apt update && sudo apt upgrade gh
15585
+ Or visit: https://cli.github.com`;
15586
+ }
15552
15587
  createGhCliFix() {
15553
15588
  return {
15554
15589
  id: "install-gh-cli",
@@ -16092,6 +16127,7 @@ class ClaudekitChecker {
16092
16127
  return results;
16093
16128
  }
16094
16129
  async checkCliInstallMethod() {
16130
+ if (false) {}
16095
16131
  const pm = await PackageManagerDetector.detect();
16096
16132
  const pmVersion = await PackageManagerDetector.getVersion(pm);
16097
16133
  const displayName = PackageManagerDetector.getDisplayName(pm);
@@ -28958,7 +28994,7 @@ class FileMerger {
28958
28994
  }
28959
28995
  logger.debug(`Copying user config file (first-time setup): ${normalizedRelativePath}`);
28960
28996
  }
28961
- if (normalizedRelativePath === "settings.json") {
28997
+ if (normalizedRelativePath === "settings.json" || normalizedRelativePath === ".claude/settings.json") {
28962
28998
  await this.processSettingsJson(file, destPath);
28963
28999
  this.trackInstalledFile(normalizedRelativePath);
28964
29000
  copiedCount++;
@@ -28977,14 +29013,15 @@ class FileMerger {
28977
29013
  let processedContent = content;
28978
29014
  if (this.isGlobal) {
28979
29015
  const homeVar = isWindows5 ? "%USERPROFILE%" : "$HOME";
28980
- processedContent = content.replace(/\$CLAUDE_PROJECT_DIR/g, homeVar);
29016
+ processedContent = this.transformClaudePaths(content, homeVar);
28981
29017
  if (processedContent !== content) {
28982
- logger.debug(`Replaced $CLAUDE_PROJECT_DIR with ${homeVar} in settings.json for global installation`);
29018
+ logger.debug(`Transformed .claude/ paths to ${homeVar}/.claude/ in settings.json for global installation`);
28983
29019
  }
28984
- } else if (isWindows5) {
28985
- processedContent = content.replace(/\$CLAUDE_PROJECT_DIR/g, "%CLAUDE_PROJECT_DIR%").replace(/\$HOME/g, "%USERPROFILE%");
29020
+ } else {
29021
+ const projectDirVar = isWindows5 ? '"%CLAUDE_PROJECT_DIR%"' : '"$CLAUDE_PROJECT_DIR"';
29022
+ processedContent = this.transformClaudePaths(content, projectDirVar);
28986
29023
  if (processedContent !== content) {
28987
- logger.debug("Converted Unix env var syntax to Windows syntax in settings.json");
29024
+ logger.debug(`Transformed .claude/ paths to ${projectDirVar}/.claude/ in settings.json for local installation`);
28988
29025
  }
28989
29026
  }
28990
29027
  await import_fs_extra6.writeFile(destFile, processedContent, "utf-8");
@@ -28993,6 +29030,16 @@ class FileMerger {
28993
29030
  await import_fs_extra6.copy(sourceFile, destFile, { overwrite: true });
28994
29031
  }
28995
29032
  }
29033
+ transformClaudePaths(content, prefix) {
29034
+ let transformed = content;
29035
+ const jsonSafePrefix = prefix.includes('"') ? prefix.replace(/"/g, "\\\"") : prefix;
29036
+ transformed = transformed.replace(/(node\s+)(?:\.\/)?\.claude\//g, `$1${jsonSafePrefix}/.claude/`);
29037
+ if (prefix.includes("HOME") || prefix.includes("USERPROFILE")) {
29038
+ transformed = transformed.replace(/\$CLAUDE_PROJECT_DIR/g, prefix);
29039
+ transformed = transformed.replace(/%CLAUDE_PROJECT_DIR%/g, prefix);
29040
+ }
29041
+ return transformed;
29042
+ }
28996
29043
  async getFiles(dir, baseDir = dir) {
28997
29044
  const files = [];
28998
29045
  const entries = await import_fs_extra6.readdir(dir, { encoding: "utf8" });
@@ -32279,7 +32326,7 @@ import { promisify as promisify6 } from "node:util";
32279
32326
  // package.json
32280
32327
  var package_default2 = {
32281
32328
  name: "claudekit-cli",
32282
- version: "3.5.0",
32329
+ version: "3.5.2",
32283
32330
  description: "CLI tool for bootstrapping and updating ClaudeKit projects",
32284
32331
  type: "module",
32285
32332
  repository: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudekit-cli",
3
- "version": "3.5.0",
3
+ "version": "3.5.2",
4
4
  "description": "CLI tool for bootstrapping and updating ClaudeKit projects",
5
5
  "type": "module",
6
6
  "repository": {