build: 内网环境下跳过 Windows node-pty 补丁构建并关闭 GitHub 发布
Some checks failed
AI automation / Route event (push) Has been cancelled
AI automation / Hand reopened issue to maintainers (push) Has been cancelled
AI automation / Clean source issue state (push) Has been cancelled
AI automation / Reconcile handoffs (push) Has been cancelled
AI automation / Classify issue (push) Has been cancelled
AI automation / Claude Code smoke (push) Has been cancelled
AI automation / Review issue follow-up (push) Has been cancelled
AI automation / Publish issue follow-up (push) Has been cancelled
AI automation / Implement with Claude Code (push) Has been cancelled
AI automation / Publish implement PR (push) Has been cancelled
AI automation / Continue queued issue comments (push) Has been cancelled
AI automation / Codex review loop (push) Has been cancelled
AI automation / Publish Codex fix (push) Has been cancelled
AI automation / Clear Codex dispatch marker (push) Has been cancelled
AI automation / Own PR re-request Codex (push) Has been cancelled
AI automation / External PR re-request Codex (push) Has been cancelled
AI automation / Poll Codex reaction / retry (push) Has been cancelled
Star History / update (push) Has been cancelled
Some checks failed
AI automation / Route event (push) Has been cancelled
AI automation / Hand reopened issue to maintainers (push) Has been cancelled
AI automation / Clean source issue state (push) Has been cancelled
AI automation / Reconcile handoffs (push) Has been cancelled
AI automation / Classify issue (push) Has been cancelled
AI automation / Claude Code smoke (push) Has been cancelled
AI automation / Review issue follow-up (push) Has been cancelled
AI automation / Publish issue follow-up (push) Has been cancelled
AI automation / Implement with Claude Code (push) Has been cancelled
AI automation / Publish implement PR (push) Has been cancelled
AI automation / Continue queued issue comments (push) Has been cancelled
AI automation / Codex review loop (push) Has been cancelled
AI automation / Publish Codex fix (push) Has been cancelled
AI automation / Clear Codex dispatch marker (push) Has been cancelled
AI automation / Own PR re-request Codex (push) Has been cancelled
AI automation / External PR re-request Codex (push) Has been cancelled
AI automation / Poll Codex reaction / retry (push) Has been cancelled
Star History / update (push) Has been cancelled
调整 electron-builder 配置,Windows 平台仅打包 zip 格式,注释掉 NSIS 和 portable 目标; 注释掉 Windows Hello helper 资源配置以避免路径不存在导致的打包失败; 将发布配置设为 null 以关闭 GitHub 发布请求; 修改 afterPack 脚本,跳过 Windows 下 node-pty ConPTY 补丁的重建和复制,因内网无 MSVC 工具链无法完成该操作。
This commit is contained in:
@@ -341,7 +341,6 @@ function getLabels() {
|
||||
* @param {function} options.writeStorage - 写入本地存储 (key, value) => void
|
||||
*/
|
||||
function registerInspectionHandlers(ipcMain, options) {
|
||||
console.error("[RS_DEBUG] ═══ registerInspectionHandlers 被调用了 ═══");
|
||||
const { readStorage, writeStorage, sessions } = options;
|
||||
|
||||
const readFn = (key) => readStorage(key);
|
||||
@@ -873,6 +872,13 @@ function registerInspectionHandlers(ipcMain, options) {
|
||||
// 内部函数:执行一次快照(IPC handler + reportScheduler 共用)
|
||||
async function _executeSnapshot(deviceTargets, trigger = "manual") {
|
||||
const t0 = Date.now();
|
||||
// 打印唯一调用栈前几帧 —— 一眼看出是谁调的
|
||||
const stack = new Error().stack?.split("\n").slice(2, 5).join("\n ") || "";
|
||||
console.error(`[EXEC_SNAPSHOT] ════════════════════════════════════`);
|
||||
console.error(`[EXEC_SNAPSHOT] 路径: ${trigger} | 设备数: ${deviceTargets.length}`);
|
||||
console.error(`[EXEC_SNAPSHOT] 调用栈:\n ${stack}`);
|
||||
console.error(`[EXEC_SNAPSHOT] ════════════════════════════════════`);
|
||||
|
||||
console.log("[Inspection:_executeSnapshot] 目标设备数:", deviceTargets.length, "trigger:", trigger);
|
||||
|
||||
const allDevices = [];
|
||||
@@ -1098,6 +1104,11 @@ function registerInspectionHandlers(ipcMain, options) {
|
||||
return { ok: false, error: e?.message || String(e) };
|
||||
} finally {
|
||||
_isSnapshotRunning = false;
|
||||
// 手动巡检也更新 lastRunAt —— 避免手动跑完后定时 tick 还到点触发
|
||||
try {
|
||||
const cfg = reportScheduleStore.getSchedule(readFn);
|
||||
reportScheduleStore.saveSchedule(writeFn, { ...cfg, lastRunAt: Date.now() });
|
||||
} catch (_) {}
|
||||
try {
|
||||
const { webContents } = require("electron");
|
||||
for (const wc of webContents.getAllWebContents()) {
|
||||
@@ -1471,24 +1482,19 @@ function registerInspectionHandlers(ipcMain, options) {
|
||||
}
|
||||
}
|
||||
|
||||
console.error("[RS_DEBUG] ═══ 准备启动 reportScheduler ═══");
|
||||
// 自动启动 reportScheduler(Electron 进程生命周期内只启一次)
|
||||
try {
|
||||
const cfg = reportScheduleStore.getSchedule(readFn);
|
||||
console.error("[RS_DEBUG] cfg.enabled=", cfg?.enabled, "enabledDeviceIds=", JSON.stringify(cfg?.enabledDeviceIds));
|
||||
console.error("[RS_DEBUG] isRunning()=", reportScheduler.isRunning());
|
||||
if (!reportScheduler.isRunning()) {
|
||||
if (cfg?.enabled && !reportScheduler.isRunning()) {
|
||||
reportScheduler.start({
|
||||
readStorage: readFn,
|
||||
writeStorage: writeFn,
|
||||
runSnapshotFn: (deviceIds, trigger) => _runScheduledSnapshot(deviceIds, trigger),
|
||||
getAllDeviceIdsFn: () => Object.keys(_hostConfigs || {}),
|
||||
});
|
||||
console.error("[RS_DEBUG] ✅ start() 已调用完成");
|
||||
} else {
|
||||
console.error("[RS_DEBUG] ⚠️ 已在运行中");
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("[RS_DEBUG] ❌ 启动失败:", e?.message || String(e), e?.stack);
|
||||
console.error("[Inspection] reportScheduler 自动启动失败:", e?.message || String(e));
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user