同步完整源码至远程:扁平化重构现状 + 未入库源文件

- 补入库:server/internal/db/dump.go、redis 分页/扫描预算测试、opsxdb-mcp main_test、
  packages/opsxdb-mcp package-lock、docs 审计与对比文档等 37 个新文件
- 含结构扁平化进行中的 80 处修改与 155 处旧结构删除(server/ src/ src-tauri/ 为当前有效源)
- 构建产物(bin/target/dist)与签名私钥仍按规则排除
This commit is contained in:
logan committed 2026-10-16 03:47:33 +08:00
1 parent 5c0be49217
commit 2c0bfafd8d
269 files changed
+10372 -16435

No files matched your search

+8 -25
View File
@@ -2,18 +2,14 @@
# shellcheck shell=bash
# .noindex:避免 Spotlight 把临时 Dock 壳当成可打开的历史 App
TAURI_DIR="$SCRIPT_DIR/apps/desktop/src-tauri"
TAURI_DIR="$SCRIPT_DIR/src-tauri"
GUI_APP_DIR="$TAURI_DIR/target/gui-app.noindex"
GUI_APP="$GUI_APP_DIR/OpsxDB.app"
ICONS_DIR="$TAURI_DIR/icons"
REL_APP="$TAURI_DIR/target/release/bundle/macos/OpsxDB.app"
DBG_APP="$TAURI_DIR/target/debug/bundle/macos/OpsxDB.app"
REL_BIN="$TAURI_DIR/target/release/OpsxDB"
[ -x "$REL_BIN" ] || REL_BIN="$SCRIPT_DIR/src-tauri/target/release/OpsxDB"
DBG_BIN_A="$TAURI_DIR/target/debug/OpsxDB"
[ -x "$DBG_BIN_A" ] || DBG_BIN_A="$SCRIPT_DIR/src-tauri/target/debug/OpsxDB"
DBG_BIN_B="$TAURI_DIR/target/debug/opsxdb-desktop"
[ -x "$DBG_BIN_B" ] || DBG_BIN_B="$SCRIPT_DIR/src-tauri/target/debug/opsxdb-desktop"
REL_BIN="$TAURI_DIR/target/release/opsxdb"
DBG_BIN="$TAURI_DIR/target/debug/opsxdb"
GUI_DEV_NEEDS_VITE=0
_gui_write_plist() {
@@ -44,7 +40,7 @@ _gui_wrap_bin() {
local sidecar=""
for sidecar in \
"$(dirname "$src")/opsxdb-server" \
"$SCRIPT_DIR/apps/server/bin/opsxdb-server" \
"$SCRIPT_DIR/server/bin/opsxdb-server" \
"$SCRIPT_DIR/src-tauri/target/debug/opsxdb-server"
do
if [ -x "$sidecar" ]; then
@@ -64,17 +60,9 @@ ensure_gui_dev_app() {
return 1
fi
mkdir -p "$GUI_APP_DIR"
if [ -d "$DBG_APP" ]; then
if [ -x "$DBG_BIN" ]; then
rm -rf "$GUI_APP"
cp -R "$DBG_APP" "$GUI_APP"
GUI_DEV_NEEDS_VITE=1
elif [ -x "$DBG_BIN_A" ]; then
rm -rf "$GUI_APP"
_gui_wrap_bin "$DBG_BIN_A"
GUI_DEV_NEEDS_VITE=1
elif [ -x "$DBG_BIN_B" ]; then
rm -rf "$GUI_APP"
_gui_wrap_bin "$DBG_BIN_B"
_gui_wrap_bin "$DBG_BIN"
GUI_DEV_NEEDS_VITE=1
elif [ -d "$REL_APP" ]; then
rm -rf "$GUI_APP"
@@ -88,9 +76,6 @@ ensure_gui_dev_app() {
fi
mkdir -p "$GUI_APP/Contents/Resources"
cp "$icon" "$GUI_APP/Contents/Resources/icon.icns"
if [ -x "$GUI_APP/Contents/MacOS/opsxdb-desktop" ] && [ ! -x "$GUI_APP/Contents/MacOS/OpsxDB" ]; then
mv "$GUI_APP/Contents/MacOS/opsxdb-desktop" "$GUI_APP/Contents/MacOS/OpsxDB"
fi
/usr/libexec/PlistBuddy -c "Set :CFBundleDisplayName OpsxDB" "$GUI_APP/Contents/Info.plist" 2>/dev/null || true
/usr/libexec/PlistBuddy -c "Set :CFBundleName OpsxDB" "$GUI_APP/Contents/Info.plist" 2>/dev/null || true
/usr/libexec/PlistBuddy -c "Set :CFBundleExecutable OpsxDB" "$GUI_APP/Contents/Info.plist" 2>/dev/null || true
@@ -105,11 +90,9 @@ ensure_gui_dev_app() {
kill_opsxdb_gui() {
stop_detached "$DESKTOP_LABEL"
pkill -f "$SCRIPT_DIR/apps/desktop/src-tauri/target/debug/OpsxDB" 2>/dev/null || true
pkill -f "$SCRIPT_DIR/apps/desktop/src-tauri/target/debug/opsxdb-desktop" 2>/dev/null || true
pkill -f "$SCRIPT_DIR/src-tauri/target/debug/opsxdb" 2>/dev/null || true
pkill -f "$SCRIPT_DIR/src-tauri/target/debug/opsxdb-desktop" 2>/dev/null || true
pkill -f "$SCRIPT_DIR/src-tauri/target/debug/OpsxDB" 2>/dev/null || true
pkill -f "$SCRIPT_DIR/apps/desktop/node_modules/.bin/tauri" 2>/dev/null || true
pkill -f "$SCRIPT_DIR/node_modules/.bin/tauri" 2>/dev/null || true
pkill -f "$GUI_APP" 2>/dev/null || true
pkill -f "$SCRIPT_DIR/src-tauri/target/gui-app.noindex/OpsxDB.app" 2>/dev/null || true
pkill -x OpsxDB 2>/dev/null || true