Build installer and management site from spec
This commit is contained in:
17
src/installer/preload.ts
Normal file
17
src/installer/preload.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { contextBridge, ipcRenderer } from 'electron'
|
||||
|
||||
contextBridge.exposeInMainWorld('installerApi', {
|
||||
getDefaults: () => ipcRenderer.invoke('installer:get-defaults'),
|
||||
loadPacks: (manifestUrl: string) => ipcRenderer.invoke('installer:load-packs', manifestUrl),
|
||||
chooseDirectory: () => ipcRenderer.invoke('installer:choose-directory'),
|
||||
detectJdk: () => ipcRenderer.invoke('installer:detect-jdk'),
|
||||
chooseJdk: () => ipcRenderer.invoke('installer:choose-jdk'),
|
||||
startInstall: (payload: unknown) => ipcRenderer.invoke('installer:start-install', payload),
|
||||
acceptEula: () => ipcRenderer.invoke('installer:accept-eula'),
|
||||
openConfigEditor: () => ipcRenderer.invoke('installer:open-config-editor'),
|
||||
configurePort: () => ipcRenderer.invoke('installer:configure-port'),
|
||||
openFolder: () => ipcRenderer.invoke('installer:open-folder'),
|
||||
createShortcut: (enabled: boolean) => ipcRenderer.invoke('installer:create-shortcut', enabled),
|
||||
runServer: (enabled: boolean) => ipcRenderer.invoke('installer:run-server', enabled),
|
||||
onLog: (handler: (entry: unknown) => void) => ipcRenderer.on('installer:log', (_event, entry) => handler(entry))
|
||||
})
|
||||
Reference in New Issue
Block a user