change sqlite backend; upgrade electron; fix ipc file cannot listen in macOS

This commit is contained in:
geekgeekrun
2026-01-21 02:56:42 +08:00
parent c23d590052
commit afe8a820c1
7 changed files with 494 additions and 587 deletions
+3 -12
View File
@@ -38,18 +38,9 @@ if (!ipcSocketName) {
process.env.GEEKGEEKRUND_PIPE_NAME = `geekgeekrun-d_${randomUUID()}`
ipcSocketName = process.env.GEEKGEEKRUND_PIPE_NAME
}
let ipcSocketPath
if (process.platform === 'win32') {
ipcSocketPath = `\\\\.\\pipe\\${ipcSocketName}`
}
else {
ipcSocketPath = path.join(tmpdir(), `${ipcSocketName}.sock`)
if (process.platform === 'darwin' && !fs.existsSync(ipcSocketPath)) {
fs.writeFileSync(ipcSocketPath, '')
// 设置权限(Unix
fs.chmodSync(ipcSocketPath, 0o777)
}
}
const ipcSocketPath = process.platform === 'win32'
? `\\\\.\\pipe\\${ipcSocketName}`
: path.join(tmpdir(), `${ipcSocketName}.sock`)
const workers = new Map(); // workerId -> { process, status, restartCount, socket, latestScreenshot, latestScreenshotAt }
const guiClients = new Set(); // GUI客户端连接集合