- Implemented get_device_info for OS/Network telemetry. - Added run_cmd_sync using execSync for blocking-style commands. - Implemented kill_processes (plural) to support multiple process termination. - Standardized open_local_file_v2 and all bridge methods to snake_case. - Synchronized preload and main handlers with SvelteKit relay expectations.
20 lines
1.1 KiB
TypeScript
20 lines
1.1 KiB
TypeScript
import { contextBridge, ipcRenderer } from 'electron';
|
|
|
|
contextBridge.exposeInMainWorld('aetherNative', {
|
|
get_seed_config: () => ipcRenderer.invoke('get-seed-config'),
|
|
get_device_config: () => ipcRenderer.invoke('get-device-config'),
|
|
get_jwt: () => ipcRenderer.invoke('get-jwt'),
|
|
get_device_info: () => ipcRenderer.invoke('get-device-info'),
|
|
|
|
open_folder: (path: string) => ipcRenderer.invoke('native:open-folder', path),
|
|
run_cmd: (args: any) => ipcRenderer.invoke('native:run-cmd', args),
|
|
run_cmd_sync: (args: any) => ipcRenderer.invoke('native:run-cmd-sync', args),
|
|
run_osascript: (script: string) => ipcRenderer.invoke('native:run-osascript', script),
|
|
kill_processes: (args: any) => ipcRenderer.invoke('native:kill-processes', args),
|
|
open_local_file_v2: (path: string) => ipcRenderer.invoke('native:open-local-file-v2', path),
|
|
|
|
check_cache: (args: any) => ipcRenderer.invoke('native:check-cache', args),
|
|
download_to_cache: (args: any) => ipcRenderer.invoke('native:download-to-cache', args),
|
|
launch_from_cache: (args: any) => ipcRenderer.invoke('native:launch-from-cache', args),
|
|
});
|