@muxcodecli/cli 1.15.14 → 1.15.15
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/muxcode +10 -6
- package/package.json +2 -2
package/bin/muxcode
CHANGED
|
@@ -3,20 +3,24 @@ const { spawnSync } = require("child_process")
|
|
|
3
3
|
const path = require("path")
|
|
4
4
|
const fs = require("fs")
|
|
5
5
|
|
|
6
|
-
// Tenta encontrar bun: primeiro @oven-sh/bun, depois PATH
|
|
7
6
|
function findBun() {
|
|
7
|
+
// 1. bun npm package
|
|
8
8
|
try {
|
|
9
|
-
const
|
|
10
|
-
if (fs.existsSync(
|
|
9
|
+
const p = path.join(path.dirname(require.resolve("bun/package.json")), "bin", "bun")
|
|
10
|
+
if (fs.existsSync(p)) return p
|
|
11
|
+
} catch {}
|
|
12
|
+
// 2. bun no PATH
|
|
13
|
+
const cmd = process.platform === "win32" ? "where bun" : "which bun"
|
|
14
|
+
try {
|
|
15
|
+
const { execSync } = require("child_process")
|
|
16
|
+
return execSync(cmd, { encoding: "utf8" }).trim().split("\n")[0].trim()
|
|
11
17
|
} catch {}
|
|
12
|
-
const { execSync } = require("child_process")
|
|
13
|
-
try { return execSync("which bun || where bun", { encoding: "utf8" }).trim().split("\n")[0] } catch {}
|
|
14
18
|
return null
|
|
15
19
|
}
|
|
16
20
|
|
|
17
21
|
const bun = findBun()
|
|
18
22
|
if (!bun) {
|
|
19
|
-
console.error("
|
|
23
|
+
console.error("muxcode requires bun. Install: npm install -g bun")
|
|
20
24
|
process.exit(1)
|
|
21
25
|
}
|
|
22
26
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muxcodecli/cli",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.15",
|
|
4
4
|
"description": "MuxCode \u2014 AI coding assistant CLI",
|
|
5
5
|
"author": "madking \u00d7 MarbleCeo | MarbleCorp <markett2333@gmail.com>",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -42,6 +42,6 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"
|
|
45
|
+
"bun": ">=1.0.0"
|
|
46
46
|
}
|
|
47
47
|
}
|