bingocode 1.1.143 → 1.1.144
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/.claude/settings.local.json +2 -1
- package/bin/bingo-win.cjs +17 -21
- package/bin/bingocode-win.cjs +18 -22
- package/bin/claude-win.cjs +18 -21
- package/package.json +1 -1
- package/src/server/ensureSingletonLocalServer.ts +18 -26
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"WebSearch",
|
|
11
11
|
"WebFetch(domain:www.anthropic.com)",
|
|
12
12
|
"Bash(grep -v \"node_modules\\\\|bun:\\\\|bun/\\\\|bun@\\\\|\\\\.bun\\\\|bunfig\\\\|bundl\\\\|bunny\\\\|abun\\\\|debug\\\\|comment\\\\|//.*bun\\\\|bunta\\\\|buno\")",
|
|
13
|
-
"Bash(grep:*)"
|
|
13
|
+
"Bash(grep:*)",
|
|
14
|
+
"Bash(node:*)"
|
|
14
15
|
]
|
|
15
16
|
}
|
|
16
17
|
}
|
package/bin/bingo-win.cjs
CHANGED
|
@@ -56,31 +56,27 @@ const ROOT_DIR = getProjectRoot();
|
|
|
56
56
|
}
|
|
57
57
|
})();
|
|
58
58
|
|
|
59
|
-
// 自动定位 bun
|
|
59
|
+
// 自动定位 bun.exe(纯文件系统查找,无子进程,无 DEP0190 警告)
|
|
60
60
|
function resolveBunExe() {
|
|
61
|
-
//
|
|
61
|
+
// 1. 用户指定路径
|
|
62
62
|
if (process.env.BUN_PATH && fs.existsSync(process.env.BUN_PATH)) {
|
|
63
63
|
return process.env.BUN_PATH;
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
//
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
const found = where.stdout.trim().split(/\r?\n/)[0];
|
|
81
|
-
if (found && fs.existsSync(found)) return found;
|
|
82
|
-
}
|
|
83
|
-
} catch (_) {}
|
|
65
|
+
const home = os.homedir();
|
|
66
|
+
const appData = process.env.APPDATA || path.join(home, 'AppData', 'Roaming');
|
|
67
|
+
const candidates = [
|
|
68
|
+
// npm install -g bun 的真实 exe(最常见)
|
|
69
|
+
path.join(appData, 'npm', 'node_modules', 'bun', 'bin', 'bun.exe'),
|
|
70
|
+
// bun 官方安装脚本位置
|
|
71
|
+
path.join(home, '.bun', 'bin', 'bun.exe'),
|
|
72
|
+
];
|
|
73
|
+
// 遍历 PATH 中每个目录查找 bun.exe
|
|
74
|
+
for (const dir of (process.env.PATH || '').split(path.delimiter)) {
|
|
75
|
+
candidates.push(path.join(dir, 'bun.exe'));
|
|
76
|
+
}
|
|
77
|
+
for (const c of candidates) {
|
|
78
|
+
try { if (fs.existsSync(c)) return c; } catch (_) {}
|
|
79
|
+
}
|
|
84
80
|
return null;
|
|
85
81
|
}
|
|
86
82
|
|
package/bin/bingocode-win.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const { spawn
|
|
3
|
+
const { spawn } = require('node:child_process');
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const os = require('os');
|
|
6
6
|
const fs = require('fs');
|
|
@@ -33,31 +33,27 @@ process.env.NoDefaultCurrentDirectoryInExePath = '1';
|
|
|
33
33
|
}
|
|
34
34
|
})();
|
|
35
35
|
|
|
36
|
-
// 自动定位 bun
|
|
36
|
+
// 自动定位 bun.exe(纯文件系统查找,无子进程,无 DEP0190 警告)
|
|
37
37
|
function resolveBunExe() {
|
|
38
|
-
//
|
|
38
|
+
// 1. 用户指定路径
|
|
39
39
|
if (process.env.BUN_PATH && fs.existsSync(process.env.BUN_PATH)) {
|
|
40
40
|
return process.env.BUN_PATH;
|
|
41
41
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
//
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const found = where.stdout.trim().split(/\r?\n/)[0];
|
|
58
|
-
if (found && fs.existsSync(found)) return found;
|
|
59
|
-
}
|
|
60
|
-
} catch (_) {}
|
|
42
|
+
const home = os.homedir();
|
|
43
|
+
const appData = process.env.APPDATA || path.join(home, 'AppData', 'Roaming');
|
|
44
|
+
const candidates = [
|
|
45
|
+
// npm install -g bun 的真实 exe(最常见)
|
|
46
|
+
path.join(appData, 'npm', 'node_modules', 'bun', 'bin', 'bun.exe'),
|
|
47
|
+
// bun 官方安装脚本位置
|
|
48
|
+
path.join(home, '.bun', 'bin', 'bun.exe'),
|
|
49
|
+
];
|
|
50
|
+
// 遍历 PATH 中每个目录查找 bun.exe
|
|
51
|
+
for (const dir of (process.env.PATH || '').split(path.delimiter)) {
|
|
52
|
+
candidates.push(path.join(dir, 'bun.exe'));
|
|
53
|
+
}
|
|
54
|
+
for (const c of candidates) {
|
|
55
|
+
try { if (fs.existsSync(c)) return c; } catch (_) {}
|
|
56
|
+
}
|
|
61
57
|
return null;
|
|
62
58
|
}
|
|
63
59
|
|
package/bin/claude-win.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const { spawn
|
|
3
|
+
const { spawn } = require('node:child_process');
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const os = require('os');
|
|
6
6
|
const fs = require('fs');
|
|
@@ -32,30 +32,27 @@ process.env.NoDefaultCurrentDirectoryInExePath = '1';
|
|
|
32
32
|
}
|
|
33
33
|
})();
|
|
34
34
|
|
|
35
|
-
// 自动定位 bun
|
|
35
|
+
// 自动定位 bun.exe(纯文件系统查找,无子进程,无 DEP0190 警告)
|
|
36
36
|
function resolveBunExe() {
|
|
37
|
+
// 1. 用户指定路径
|
|
37
38
|
if (process.env.BUN_PATH && fs.existsSync(process.env.BUN_PATH)) {
|
|
38
39
|
return process.env.BUN_PATH;
|
|
39
40
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
//
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const found = where.stdout.trim().split(/\r?\n/)[0];
|
|
56
|
-
if (found && fs.existsSync(found)) return found;
|
|
57
|
-
}
|
|
58
|
-
} catch (_) {}
|
|
41
|
+
const home = os.homedir();
|
|
42
|
+
const appData = process.env.APPDATA || path.join(home, 'AppData', 'Roaming');
|
|
43
|
+
const candidates = [
|
|
44
|
+
// npm install -g bun 的真实 exe(最常见)
|
|
45
|
+
path.join(appData, 'npm', 'node_modules', 'bun', 'bin', 'bun.exe'),
|
|
46
|
+
// bun 官方安装脚本位置
|
|
47
|
+
path.join(home, '.bun', 'bin', 'bun.exe'),
|
|
48
|
+
];
|
|
49
|
+
// 遍历 PATH 中每个目录查找 bun.exe
|
|
50
|
+
for (const dir of (process.env.PATH || '').split(path.delimiter)) {
|
|
51
|
+
candidates.push(path.join(dir, 'bun.exe'));
|
|
52
|
+
}
|
|
53
|
+
for (const c of candidates) {
|
|
54
|
+
try { if (fs.existsSync(c)) return c; } catch (_) {}
|
|
55
|
+
}
|
|
59
56
|
return null;
|
|
60
57
|
}
|
|
61
58
|
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// server/ensureSingletonLocalServer.ts
|
|
2
|
-
import { spawn
|
|
2
|
+
import { spawn } from 'child_process';
|
|
3
3
|
import fs from 'fs';
|
|
4
4
|
import fsp from 'fs/promises';
|
|
5
5
|
import path from 'path';
|
|
@@ -46,33 +46,25 @@
|
|
|
46
46
|
const fromEnv = process.env.BUN_PATH;
|
|
47
47
|
if (fromEnv && fs.existsSync(fromEnv)) return fromEnv;
|
|
48
48
|
|
|
49
|
-
// Windows
|
|
49
|
+
// Windows:纯文件系统查找 bun.exe,无子进程,无 DEP0190 警告
|
|
50
50
|
if (process.platform === 'win32') {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
try {
|
|
64
|
-
const where = spawnSync('where', ['bun.exe'], { encoding: 'utf-8' });
|
|
65
|
-
if (where.status === 0) {
|
|
66
|
-
const found = where.stdout.trim().split(/\r?\n/)[0];
|
|
67
|
-
if (found && fs.existsSync(found)) return found;
|
|
68
|
-
}
|
|
69
|
-
} catch (_) {}
|
|
51
|
+
const home = os.homedir();
|
|
52
|
+
const appData = process.env.APPDATA || path.join(home, 'AppData', 'Roaming');
|
|
53
|
+
const candidates = [
|
|
54
|
+
path.join(appData, 'npm', 'node_modules', 'bun', 'bin', 'bun.exe'),
|
|
55
|
+
path.join(home, '.bun', 'bin', 'bun.exe'),
|
|
56
|
+
];
|
|
57
|
+
for (const dir of (process.env.PATH || '').split(path.delimiter)) {
|
|
58
|
+
candidates.push(path.join(dir, 'bun.exe'));
|
|
59
|
+
}
|
|
60
|
+
for (const c of candidates) {
|
|
61
|
+
try { if (fs.existsSync(c)) return c; } catch (_) {}
|
|
62
|
+
}
|
|
70
63
|
} else {
|
|
71
|
-
// Linux/macOS
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
if (found) return found;
|
|
64
|
+
// Linux/macOS:遍历 PATH 查找 bun
|
|
65
|
+
for (const dir of (process.env.PATH || '').split(path.delimiter)) {
|
|
66
|
+
const c = path.join(dir, 'bun');
|
|
67
|
+
try { if (fs.existsSync(c)) return c; } catch (_) {}
|
|
76
68
|
}
|
|
77
69
|
}
|
|
78
70
|
|