fix(updater): use desktop host updater from web (#3227)

This commit is contained in:
ChangeHow
2026-09-07 20:26:59 +03:00
committed by GitHub
parent 928bb3eae0
commit 1306b1124c
8 changed files with 179 additions and 6 deletions
+10
View File
@@ -1621,6 +1621,16 @@ const spawnLocalServer = async () => {
apiBaseUrl: state.apiBaseUrl || '',
requestHeaders: sanitizeRuntimeRequestHeaders(state.requestHeaders || {}),
}),
desktopUpdater: {
check: () => handleInvoke(null, 'desktop_check_for_updates'),
install: async () => {
const updateInfo = await handleInvoke(null, 'desktop_check_for_updates');
if (!updateInfo.available) return updateInfo;
await handleInvoke(null, 'desktop_download_and_install_update');
return updateInfo;
},
restart: () => handleInvoke(null, 'desktop_restart'),
},
});
const port = handle.getPort();