Files
AFFiNE-Mirror/apps/electron/layers/main/src/updater/index.ts
2023-06-02 12:56:52 +08:00

19 lines
486 B
TypeScript

import { app } from 'electron';
import type { NamespaceHandlers } from '../type';
import { checkForUpdatesAndNotify, quitAndInstall } from './electron-updater';
export const updaterHandlers = {
currentVersion: async () => {
return app.getVersion();
},
quitAndInstall: async () => {
return quitAndInstall();
},
checkForUpdatesAndNotify: async () => {
return checkForUpdatesAndNotify(true);
},
} satisfies NamespaceHandlers;
export * from './electron-updater';