Initial clean project import

This commit is contained in:
cat-shark
2026-06-19 18:41:41 +08:00
commit a13b804c7a
1306 changed files with 220568 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
import {ipcMain} from "electron";
import index from "./index";
// 注册所有 IPC 处理器,这样 render.ts 就不需要导入 Node.js 模块
ipcMain.handle("misc:getZipFileContent", async (_, path: string, pathInZip: string) => {
return await index.getZipFileContent(path, pathInZip);
});
ipcMain.handle("misc:unzip", async (_, zipPath: string, dest: string, option?: any) => {
return await index.unzip(zipPath, dest, option);
});
ipcMain.handle("misc:zip", async (_, zipPath: string, sourceDir: string, option?: any) => {
return await index.zip(zipPath, sourceDir, option);
});
ipcMain.handle("misc:request", async (_, requestOption: any) => {
return await index.request(requestOption);
});
export default {
...index,
};
export const MiscMain = {
...index,
};