bingocode 1.1.138 → 1.1.139

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/bingo-win.cjs CHANGED
@@ -62,18 +62,18 @@ function resolveBunExe() {
62
62
  if (process.env.BUN_PATH && fs.existsSync(process.env.BUN_PATH)) {
63
63
  return process.env.BUN_PATH;
64
64
  }
65
- // ~/.bun/bin/bun.exe
66
- const homeBun = path.join(os.homedir(), '.bun', 'bin', 'bun.exe');
67
- if (fs.existsSync(homeBun)) return homeBun;
68
- // npm 全局目录 bun.exe
65
+ // npm install -g bun 的真实位置:{npm prefix -g}/node_modules/bun/bin/bun.exe
69
66
  try {
70
67
  const npmPrefix = spawnSync('npm', ['prefix', '-g'], { shell: true, encoding: 'utf-8' });
71
68
  if (npmPrefix.status === 0) {
72
- const npmBun = path.join(npmPrefix.stdout.trim(), 'bun.exe');
69
+ const npmBun = path.join(npmPrefix.stdout.trim(), 'node_modules', 'bun', 'bin', 'bun.exe');
73
70
  if (fs.existsSync(npmBun)) return npmBun;
74
71
  }
75
72
  } catch (_) {}
76
- // where bun(PATH 搜索)
73
+ // ~/.bun/bin/bun.exebun 官方安装脚本的位置)
74
+ const homeBun = path.join(os.homedir(), '.bun', 'bin', 'bun.exe');
75
+ if (fs.existsSync(homeBun)) return homeBun;
76
+ // where bun.exe(PATH 兜底搜索)
77
77
  try {
78
78
  const where = spawnSync('where', ['bun.exe'], { shell: true, encoding: 'utf-8' });
79
79
  if (where.status === 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bingocode",
3
- "version": "1.1.138",
3
+ "version": "1.1.139",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "claude": "bin/claude-win.cjs",