claudekit-cli 4.0.0-dev.7 → 4.0.0-dev.8

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/cli-manifest.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "4.0.0-dev.7",
3
- "generatedAt": "2026-05-10T14:28:28.796Z",
2
+ "version": "4.0.0-dev.8",
3
+ "generatedAt": "2026-05-10T18:19:29.722Z",
4
4
  "commands": {
5
5
  "agents": {
6
6
  "name": "agents",
package/dist/index.js CHANGED
@@ -62842,7 +62842,7 @@ var package_default;
62842
62842
  var init_package = __esm(() => {
62843
62843
  package_default = {
62844
62844
  name: "claudekit-cli",
62845
- version: "4.0.0-dev.7",
62845
+ version: "4.0.0-dev.8",
62846
62846
  description: "CLI tool for bootstrapping and updating ClaudeKit projects",
62847
62847
  type: "module",
62848
62848
  repository: {
@@ -64837,6 +64837,9 @@ function buildInitCommand(isGlobal, kit, beta, yes) {
64837
64837
  parts.push("--beta");
64838
64838
  return parts.join(" ");
64839
64839
  }
64840
+ function resolveCkExecutable(platformName = process.platform) {
64841
+ return platformName === "win32" ? "ck.cmd" : "ck";
64842
+ }
64840
64843
  async function fetchLatestReleaseTag(kit, beta) {
64841
64844
  try {
64842
64845
  const { GitHubClient: GitHubClient2 } = await Promise.resolve().then(() => (init_github_client(), exports_github_client));
@@ -64945,7 +64948,10 @@ async function promptKitUpdate(beta, yes, deps) {
64945
64948
  const displayCmd = `ck ${args.join(" ")}`;
64946
64949
  logger.info(`Running: ${displayCmd}`);
64947
64950
  const spawnFn = deps?.spawnInitFn ?? ((spawnArgs) => new Promise((resolve30) => {
64948
- const child = spawn2("ck", spawnArgs, { stdio: "inherit", shell: true });
64951
+ const child = spawn2(resolveCkExecutable(), spawnArgs, {
64952
+ stdio: "inherit",
64953
+ shell: false
64954
+ });
64949
64955
  child.on("close", (code) => resolve30(code ?? 1));
64950
64956
  child.on("error", (err) => {
64951
64957
  logger.verbose(`Failed to spawn ck init: ${err.message}`);
@@ -98993,39 +98999,82 @@ class TarExtractor {
98993
98999
  }
98994
99000
 
98995
99001
  // src/domains/installation/extraction/zip-extractor.ts
98996
- init_environment();
98997
99002
  init_logger();
98998
99003
  var import_extract_zip = __toESM(require_extract_zip(), 1);
98999
99004
  import { execFile as execFile10 } from "node:child_process";
99000
99005
  import { copyFile as copyFile5, mkdir as mkdir29, readdir as readdir25, rm as rm11, stat as stat16 } from "node:fs/promises";
99001
99006
  import { join as join102 } from "node:path";
99007
+ import { promisify as promisify15 } from "node:util";
99008
+
99009
+ // src/domains/installation/extraction/native-zip-commands.ts
99010
+ var NATIVE_EXTRACT_TIMEOUT_MS = 120000;
99011
+ function getNativeZipCommands(archivePath, destDir, platformName = process.platform) {
99012
+ if (platformName === "darwin") {
99013
+ return [
99014
+ {
99015
+ label: "native unzip",
99016
+ command: "unzip",
99017
+ args: ["-o", "-q", archivePath, "-d", destDir]
99018
+ }
99019
+ ];
99020
+ }
99021
+ if (platformName === "win32") {
99022
+ return [
99023
+ {
99024
+ label: "Windows tar.exe",
99025
+ command: "tar.exe",
99026
+ args: ["-xf", archivePath, "-C", destDir]
99027
+ },
99028
+ {
99029
+ label: "PowerShell Expand-Archive",
99030
+ command: "powershell.exe",
99031
+ args: [
99032
+ "-NoProfile",
99033
+ "-NonInteractive",
99034
+ "-Command",
99035
+ "Expand-Archive -LiteralPath $args[0] -DestinationPath $args[1] -Force",
99036
+ archivePath,
99037
+ destDir
99038
+ ]
99039
+ }
99040
+ ];
99041
+ }
99042
+ return [];
99043
+ }
99044
+
99045
+ // src/domains/installation/extraction/zip-extractor.ts
99046
+ var execFileAsync7 = promisify15(execFile10);
99047
+
99002
99048
  class ZipExtractor {
99003
- async tryNativeUnzip(archivePath, destDir) {
99004
- if (!isMacOS()) {
99049
+ async tryNativeExtraction(archivePath, destDir) {
99050
+ const commands = getNativeZipCommands(archivePath, destDir);
99051
+ if (commands.length === 0) {
99005
99052
  return false;
99006
99053
  }
99007
- return new Promise((resolve37) => {
99008
- mkdir29(destDir, { recursive: true }).then(() => {
99009
- execFile10("unzip", ["-o", "-q", archivePath, "-d", destDir], (error, _stdout, stderr) => {
99010
- if (error) {
99011
- logger.debug(`Native unzip failed: ${stderr || error.message}`);
99012
- resolve37(false);
99013
- return;
99014
- }
99015
- logger.debug("Native unzip succeeded");
99016
- resolve37(true);
99054
+ for (const nativeCommand of commands) {
99055
+ try {
99056
+ await rm11(destDir, { recursive: true, force: true });
99057
+ await mkdir29(destDir, { recursive: true });
99058
+ await execFileAsync7(nativeCommand.command, nativeCommand.args, {
99059
+ timeout: NATIVE_EXTRACT_TIMEOUT_MS,
99060
+ windowsHide: true
99017
99061
  });
99018
- }).catch((err) => {
99019
- logger.debug(`Failed to create directory for native unzip: ${err.message}`);
99020
- resolve37(false);
99021
- });
99022
- });
99062
+ logger.debug(`${nativeCommand.label} succeeded`);
99063
+ return true;
99064
+ } catch (err) {
99065
+ const error = err;
99066
+ logger.debug(`${nativeCommand.label} failed: ${error.stderr || error.message}`);
99067
+ }
99068
+ }
99069
+ await rm11(destDir, { recursive: true, force: true });
99070
+ await mkdir29(destDir, { recursive: true });
99071
+ return false;
99023
99072
  }
99024
99073
  async extract(archivePath, destDir, shouldExclude, sizeTracker) {
99025
99074
  const tempExtractDir = `${destDir}-temp`;
99026
99075
  await mkdir29(tempExtractDir, { recursive: true });
99027
99076
  try {
99028
- const nativeSuccess = await this.tryNativeUnzip(archivePath, tempExtractDir);
99077
+ const nativeSuccess = await this.tryNativeExtraction(archivePath, tempExtractDir);
99029
99078
  if (!nativeSuccess) {
99030
99079
  logger.debug("Using extract-zip library");
99031
99080
  let extractedCount = 0;
@@ -99128,9 +99177,11 @@ class DownloadManager {
99128
99177
  }
99129
99178
  const spinner = createSpinner("Extracting files...").start();
99130
99179
  const slowExtractionWarning = setTimeout(() => {
99131
- spinner.text = "Extracting files... (this may take a while on macOS)";
99180
+ spinner.text = "Extracting files... this may take a while";
99132
99181
  if (isMacOS()) {
99133
99182
  logger.debug("Slow extraction detected on macOS - Spotlight indexing may be interfering");
99183
+ } else if (isWindows()) {
99184
+ logger.debug("Slow extraction detected on Windows - antivirus scanning may be interfering");
99134
99185
  }
99135
99186
  }, SLOW_EXTRACTION_THRESHOLD_MS);
99136
99187
  try {
@@ -105491,8 +105542,8 @@ async function detectAccessibleKits() {
105491
105542
  // src/domains/github/preflight-checker.ts
105492
105543
  init_logger();
105493
105544
  import { exec as exec8 } from "node:child_process";
105494
- import { promisify as promisify15 } from "node:util";
105495
- var execAsync8 = promisify15(exec8);
105545
+ import { promisify as promisify16 } from "node:util";
105546
+ var execAsync8 = promisify16(exec8);
105496
105547
  function createSuccessfulPreflightResult() {
105497
105548
  return {
105498
105549
  success: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudekit-cli",
3
- "version": "4.0.0-dev.7",
3
+ "version": "4.0.0-dev.8",
4
4
  "description": "CLI tool for bootstrapping and updating ClaudeKit projects",
5
5
  "type": "module",
6
6
  "repository": {