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:
@@ -11,6 +11,14 @@ export interface AetherNativeBridge {
|
||||
getDeviceConfig: () => Promise<any>;
|
||||
getJWT: () => Promise<string | null>;
|
||||
log: (message: string) => void;
|
||||
// Shell Handlers
|
||||
openFolder: (path: string) => Promise<{success: boolean, error?: string}>;
|
||||
runCommand: (cmd: string) => Promise<{success: boolean, stdout: string, stderr: string, error?: string}>;
|
||||
launchFile: (path: string) => Promise<{success: boolean, error?: string}>;
|
||||
// File/Cache Handlers
|
||||
checkCache: (args: {cacheRoot: string, hash: string}) => Promise<boolean>;
|
||||
downloadToCache: (args: {url: string, cacheRoot: string, hash: string, apiKey: string}) => Promise<{success: boolean, path?: string, error?: string}>;
|
||||
launchFromCache: (args: {cacheRoot: string, hash: string, tempRoot: string, filename: string}) => Promise<{success: boolean, error?: string}>;
|
||||
}
|
||||
|
||||
declare global {
|
||||
|
||||
Reference in New Issue
Block a user