bingocode 1.0.36 → 1.0.37
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 +27 -27
- package/bin/bingocode-win.cjs +3 -2
- package/bin/claude-win.cjs +3 -2
- package/config/bingo-defaults/settings.json +6 -7
- package/package.json +1 -1
- package/src/utils/config.ts +15 -0
- package/bingocode-1.0.33.tgz +0 -0
package/bin/bingo
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
5
|
-
export CALLER_DIR="${CALLER_DIR:-$(pwd -W 2>/dev/null || pwd)}"
|
|
6
|
-
|
|
7
|
-
# ── 首次部署:将默认 bingo 配置复制到 ~/.claude/bingo/ ──
|
|
8
|
-
_BINGO_CONFIG_DIR="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"
|
|
9
|
-
_BINGO_DIR="$_BINGO_CONFIG_DIR/bingo"
|
|
10
|
-
_BINGO_TARGET="$_BINGO_DIR/settings.json"
|
|
11
|
-
_BINGO_SRC="$ROOT_DIR/config/bingo-defaults/settings.json"
|
|
12
|
-
|
|
13
|
-
if [ ! -f "$_BINGO_TARGET" ] && [ -f "$_BINGO_SRC" ]; then
|
|
14
|
-
mkdir -p "$_BINGO_DIR"
|
|
15
|
-
cp "$_BINGO_SRC" "$_BINGO_TARGET" 2>/dev/null && \
|
|
16
|
-
echo "[bingo] 首次启动:已部署默认配置到 $_BINGO_TARGET" || true
|
|
17
|
-
fi
|
|
18
|
-
|
|
19
|
-
cd "$ROOT_DIR"
|
|
20
|
-
|
|
21
|
-
if [[ -f .env ]]; then
|
|
22
|
-
ENV_FILE_FLAG="--env-file=.env"
|
|
23
|
-
else
|
|
24
|
-
ENV_FILE_FLAG=""
|
|
25
|
-
fi
|
|
26
|
-
|
|
27
|
-
exec bun --preload ./preload.ts $ENV_FILE_FLAG ./src/entrypoints/manager.tsx "$@"
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
5
|
+
export CALLER_DIR="${CALLER_DIR:-$(pwd -W 2>/dev/null || pwd)}"
|
|
6
|
+
|
|
7
|
+
# ── 首次部署:将默认 bingo 配置复制到 ~/.claude/bingo/ ──
|
|
8
|
+
_BINGO_CONFIG_DIR="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"
|
|
9
|
+
_BINGO_DIR="$_BINGO_CONFIG_DIR/bingo"
|
|
10
|
+
_BINGO_TARGET="$_BINGO_DIR/settings.json"
|
|
11
|
+
_BINGO_SRC="$ROOT_DIR/config/bingo-defaults/settings.json"
|
|
12
|
+
|
|
13
|
+
if [ ! -f "$_BINGO_TARGET" ] && [ -f "$_BINGO_SRC" ]; then
|
|
14
|
+
mkdir -p "$_BINGO_DIR"
|
|
15
|
+
cp "$_BINGO_SRC" "$_BINGO_TARGET" 2>/dev/null && \
|
|
16
|
+
echo "[bingo] 首次启动:已部署默认配置到 $_BINGO_TARGET" || true
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
cd "$ROOT_DIR"
|
|
20
|
+
|
|
21
|
+
if [[ -f .env ]]; then
|
|
22
|
+
ENV_FILE_FLAG="--env-file=.env"
|
|
23
|
+
else
|
|
24
|
+
ENV_FILE_FLAG=""
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
exec bun --preload ./preload.ts $ENV_FILE_FLAG ./src/entrypoints/manager.tsx "$@"
|
package/bin/bingocode-win.cjs
CHANGED
|
@@ -33,10 +33,11 @@ process.env.NoDefaultCurrentDirectoryInExePath = '1';
|
|
|
33
33
|
}
|
|
34
34
|
})();
|
|
35
35
|
|
|
36
|
-
// 自动定位 bun
|
|
37
|
-
const
|
|
36
|
+
// 自动定位 bun 路径(优先用环境变量,再检查默认安装位置,最后 fallback 到 PATH)
|
|
37
|
+
const bunPath =
|
|
38
38
|
process.env.BUN_PATH ||
|
|
39
39
|
path.join(os.homedir(), '.bun', 'bin', 'bun.exe');
|
|
40
|
+
const bun = fs.existsSync(bunPath) ? bunPath : 'bun';
|
|
40
41
|
|
|
41
42
|
// 主 CLI 入口
|
|
42
43
|
const entry = path.join(__dirname, '..', 'src', 'entrypoints', 'cli.tsx');
|
package/bin/claude-win.cjs
CHANGED
|
@@ -32,10 +32,11 @@ process.env.NoDefaultCurrentDirectoryInExePath = '1';
|
|
|
32
32
|
}
|
|
33
33
|
})();
|
|
34
34
|
|
|
35
|
-
// 自动定位 bun
|
|
36
|
-
const
|
|
35
|
+
// 自动定位 bun 路径(优先用环境变量,再检查默认安装位置,最后 fallback 到 PATH)
|
|
36
|
+
const bunPath =
|
|
37
37
|
process.env.BUN_PATH ||
|
|
38
38
|
path.join(os.homedir(), '.bun', 'bin', 'bun.exe');
|
|
39
|
+
const bun = fs.existsSync(bunPath) ? bunPath : 'bun';
|
|
39
40
|
|
|
40
41
|
// 主 CLI 入口
|
|
41
42
|
const entry = path.join(__dirname, '..', 'src', 'entrypoints', 'cli.tsx');
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"ANTHROPIC_AUTH_TOKEN": "pending-provider-setup",
|
|
4
|
-
"ANTHROPIC_BASE_URL": "http://127.0.0.1:3456"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"ANTHROPIC_AUTH_TOKEN": "pending-provider-setup",
|
|
4
|
+
"ANTHROPIC_BASE_URL": "http://127.0.0.1:3456"
|
|
5
|
+
}
|
|
6
|
+
}
|
package/package.json
CHANGED
package/src/utils/config.ts
CHANGED
|
@@ -720,6 +720,21 @@ function computeTrustDialogAccepted(): boolean {
|
|
|
720
720
|
return true
|
|
721
721
|
}
|
|
722
722
|
|
|
723
|
+
// Fallback: also check the raw original CWD path directly.
|
|
724
|
+
// This handles the case where trust was saved under CWD (no .git at the time),
|
|
725
|
+
// but now .git exists so getProjectPathForConfig() returns the git root instead.
|
|
726
|
+
// Without this fallback the old trust entry would never be found, causing the
|
|
727
|
+
// trust dialog to reappear after `git init` / `git clone`.
|
|
728
|
+
const normalizedOriginalCwd = normalizePathForConfigKey(
|
|
729
|
+
resolve(getOriginalCwd()),
|
|
730
|
+
)
|
|
731
|
+
if (normalizedOriginalCwd !== projectPath) {
|
|
732
|
+
const cwdConfig = config.projects?.[normalizedOriginalCwd]
|
|
733
|
+
if (cwdConfig?.hasTrustDialogAccepted) {
|
|
734
|
+
return true
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
|
|
723
738
|
// Now check from current working directory and its parents
|
|
724
739
|
// Normalize paths for consistent JSON key lookup
|
|
725
740
|
let currentPath = normalizePathForConfigKey(getCwd())
|
package/bingocode-1.0.33.tgz
DELETED
|
Binary file
|