Fix: Standardize Electron bridge and implement robust caching
- Refactored all IPC methods and parameters to snake_case for consistency with SvelteKit. - Implemented exhaustive background caching engine with download locking. - Reverted to legacy-proven flat hash storage pattern (hash.file). - Added axios for reliable stream-based binary downloads. - Updated preload and main handlers to support recursive room data fetching.
This commit is contained in:
14
dist/preload/index.js
vendored
14
dist/preload/index.js
vendored
@@ -2,9 +2,17 @@
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const electron_1 = require("electron");
|
||||
electron_1.contextBridge.exposeInMainWorld('aetherNative', {
|
||||
getSeedConfig: () => electron_1.ipcRenderer.invoke('get-seed-config'),
|
||||
getDeviceConfig: () => electron_1.ipcRenderer.invoke('get-device-config'),
|
||||
getJWT: () => electron_1.ipcRenderer.invoke('get-jwt'),
|
||||
get_seed_config: () => electron_1.ipcRenderer.invoke('get-seed-config'),
|
||||
get_device_config: () => electron_1.ipcRenderer.invoke('get-device-config'),
|
||||
get_jwt: () => electron_1.ipcRenderer.invoke('get-jwt'),
|
||||
log: (message) => console.log('[Native Log]', message),
|
||||
// Shell Handlers
|
||||
open_folder: (path) => electron_1.ipcRenderer.invoke('native:open-folder', path),
|
||||
run_command: (args) => electron_1.ipcRenderer.invoke('native:run-cmd', args),
|
||||
launch_file: (path) => electron_1.ipcRenderer.invoke('native:launch-file', path),
|
||||
// File/Cache Handlers
|
||||
check_cache: (args) => electron_1.ipcRenderer.invoke('native:check-cache', args),
|
||||
download_to_cache: (args) => electron_1.ipcRenderer.invoke('native:download-to-cache', args),
|
||||
launch_from_cache: (args) => electron_1.ipcRenderer.invoke('native:launch-from-cache', args),
|
||||
});
|
||||
//# sourceMappingURL=index.js.map
|
||||
2
dist/preload/index.js.map
vendored
2
dist/preload/index.js.map
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/preload/index.ts"],"names":[],"mappings":";;AAAA,uCAAsD;AAEtD,wBAAa,CAAC,iBAAiB,CAAC,cAAc,EAAE;IAC9C,a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