同步完整源码至远程:扁平化重构现状 + 未入库源文件
- 补入库: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:
1 parent
5c0be49217
commit
2c0bfafd8d
269 files changed
+10372
-16435
No files matched your search
@@ -1,3 +1,3 @@
|
||||
fn main() {
|
||||
opsxdb_desktop_lib::run();
|
||||
opsxdb_lib::run();
|
||||
}
|
||||
@@ -52,7 +52,7 @@ fn version_major(v: &str) -> &str {
|
||||
v.split('.').next().unwrap_or("")
|
||||
}
|
||||
|
||||
/// GET /health 并解析版本;失败或非 200 返回 None。
|
||||
/// GET /health 并核对服务身份与版本;不能复用同族其他产品的端口。
|
||||
fn health_version(addr: &str) -> Option<String> {
|
||||
let resp = reqwest::blocking::Client::builder()
|
||||
.timeout(Duration::from_secs(1))
|
||||
@@ -65,6 +65,9 @@ fn health_version(addr: &str) -> Option<String> {
|
||||
return None;
|
||||
}
|
||||
let v: serde_json::Value = resp.json().ok()?;
|
||||
if v.get("service")?.as_str()? != "opsxdb" {
|
||||
return None;
|
||||
}
|
||||
v.get("version")?.as_str().map(|s| s.to_string())
|
||||
}
|
||||
|
||||
@@ -120,9 +123,8 @@ fn candidate_bins(app: &AppHandle) -> Vec<PathBuf> {
|
||||
out.push(exe.join(&bin));
|
||||
out.push(exe.join("binaries").join(&bin));
|
||||
}
|
||||
// 开发态:仓库 apps/server/bin
|
||||
out.push(PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../server/bin").join(&bin));
|
||||
out.push(PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../../apps/server/bin").join(&bin));
|
||||
// 开发态:根目录 server/bin
|
||||
out.push(PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../server/bin").join(&bin));
|
||||
out
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user