@shadowclone/cli 0.0.26 → 0.0.28
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/shadowclone.mjs +6 -4
- package/dist/shadowclone.js +382 -355
- package/evals.md +1 -1
- package/package.json +1 -1
- package/plugins/shadowclone/.claude-plugin/plugin.json +1 -1
- package/plugins/shadowclone/.codex-plugin/plugin.json +1 -1
- package/plugins/shadowclone/plugin.json +1 -1
- package/skills/shadowclone-review/SKILL.md +7 -4
package/bin/shadowclone.mjs
CHANGED
|
@@ -11,6 +11,10 @@ const packageDirectory = path.dirname(
|
|
|
11
11
|
);
|
|
12
12
|
const bundle = path.join(packageDirectory, "dist", "shadowclone.js");
|
|
13
13
|
|
|
14
|
+
function runs(command) {
|
|
15
|
+
return spawnSync(command, ["--version"], { stdio: "ignore" }).status === 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
14
18
|
function bundledBunPath() {
|
|
15
19
|
try {
|
|
16
20
|
const manifestPath = require.resolve("bun/package.json");
|
|
@@ -24,16 +28,14 @@ function bundledBunPath() {
|
|
|
24
28
|
|
|
25
29
|
const candidate = path.join(path.dirname(manifestPath), relative);
|
|
26
30
|
|
|
27
|
-
return existsSync(candidate) ? candidate : null;
|
|
31
|
+
return existsSync(candidate) && runs(candidate) ? candidate : null;
|
|
28
32
|
} catch {
|
|
29
33
|
return null;
|
|
30
34
|
}
|
|
31
35
|
}
|
|
32
36
|
|
|
33
37
|
function bunOnPath() {
|
|
34
|
-
return
|
|
35
|
-
? "bun"
|
|
36
|
-
: null;
|
|
38
|
+
return runs("bun") ? "bun" : null;
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
const runtime = bundledBunPath() ?? bunOnPath();
|