18 lines
1.1 KiB
TypeScript
18 lines
1.1 KiB
TypeScript
import { contextBridge, ipcRenderer } from 'electron';
|
|
|
|
contextBridge.exposeInMainWorld('electronAPI', {
|
|
scanDirectory: (path: string) => ipcRenderer.invoke('scan-directory', path),
|
|
disableUpdates: () => ipcRenderer.invoke('disable-updates'),
|
|
cleanSystem: () => ipcRenderer.invoke('clean-system'),
|
|
purgePath: (path: string) => ipcRenderer.invoke('purge-path', path),
|
|
cleanupDocker: () => ipcRenderer.invoke('cleanup-docker'),
|
|
cleanupTmp: () => ipcRenderer.invoke('cleanup-tmp'),
|
|
cleanupXcode: () => ipcRenderer.invoke('cleanup-xcode'),
|
|
cleanupTurnkey: () => ipcRenderer.invoke('cleanup-turnkey'),
|
|
deepDiveScan: () => ipcRenderer.invoke('deep-dive-scan'),
|
|
getDiskUsage: () => ipcRenderer.invoke('get-disk-usage'),
|
|
deepestScan: (path?: string) => ipcRenderer.invoke('deepest-scan', path),
|
|
updateTrayTitle: (title: string) => ipcRenderer.invoke('update-tray-title', title),
|
|
getAppIcon: (path: string) => ipcRenderer.invoke('get-app-icon', path),
|
|
updateTrayIcon: (dataUrl: string) => ipcRenderer.invoke('update-tray-icon', dataUrl),
|
|
});
|