@aigne/cli 1.5.1-2 → 1.5.1-4
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/dist/bunwrapper.js +5 -6
- package/package.json +1 -2
package/dist/bunwrapper.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { spawnSync } from "node:child_process";
|
|
2
3
|
import { argv } from "node:process";
|
|
3
|
-
import { $ } from "zx/core";
|
|
4
|
-
$.verbose = false;
|
|
5
4
|
if (!getBunVersion()) {
|
|
6
|
-
|
|
5
|
+
spawnSync("npx", ["-y", "bun", ...argv.slice(2)], { stdio: "inherit" });
|
|
7
6
|
}
|
|
8
7
|
else {
|
|
9
|
-
|
|
8
|
+
spawnSync("bun", argv.slice(2), { stdio: "inherit" });
|
|
10
9
|
}
|
|
11
10
|
function getBunVersion() {
|
|
12
11
|
try {
|
|
13
|
-
const { stdout } =
|
|
14
|
-
return stdout.toString().trim();
|
|
12
|
+
const { stdout } = spawnSync("bun", ["--version"], { stdio: "pipe" });
|
|
13
|
+
return stdout.toString().trim() || undefined;
|
|
15
14
|
}
|
|
16
15
|
catch {
|
|
17
16
|
return false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/cli",
|
|
3
|
-
"version": "1.5.1-
|
|
3
|
+
"version": "1.5.1-4",
|
|
4
4
|
"description": "cli for AIGNE framework",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -50,7 +50,6 @@
|
|
|
50
50
|
"pretty-error": "^4.0.0",
|
|
51
51
|
"tar": "^7.4.3",
|
|
52
52
|
"zod": "^3.24.2",
|
|
53
|
-
"zx": "^8.5.2",
|
|
54
53
|
"@aigne/core": "^1.10.0"
|
|
55
54
|
},
|
|
56
55
|
"devDependencies": {
|