claudekit-cli 2.5.2 → 3.0.0
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/bin/ck.js +4 -2
- package/dist/index.js +354 -515
- package/package.json +1 -1
package/bin/ck.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { spawn } from "node:child_process";
|
|
10
10
|
import { existsSync } from "node:fs";
|
|
11
11
|
import { dirname, join } from "node:path";
|
|
12
|
-
import { fileURLToPath } from "node:url";
|
|
12
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
13
13
|
|
|
14
14
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
15
15
|
|
|
@@ -39,8 +39,10 @@ const runWithNode = async (showWarning = false) => {
|
|
|
39
39
|
console.error("⚠️ Native binary failed, using Node.js fallback (slower startup)");
|
|
40
40
|
}
|
|
41
41
|
// The CLI module handles process.exit() internally after command execution
|
|
42
|
+
// Convert to file:// URL for cross-platform ESM compatibility (Windows paths require this)
|
|
43
|
+
const distUrl = pathToFileURL(distPath).href;
|
|
42
44
|
try {
|
|
43
|
-
await import(
|
|
45
|
+
await import(distUrl);
|
|
44
46
|
} catch (importErr) {
|
|
45
47
|
throw new Error(`Failed to load CLI module: ${getErrorMessage(importErr)}`);
|
|
46
48
|
}
|