mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 17:22:18 +03:00
35 lines
662 B
TypeScript
35 lines
662 B
TypeScript
|
import type { AppAdapter } from 'electron-updater/out/AppAdapter';
|
||
|
|
||
|
/**
|
||
|
* For testing and same as:
|
||
|
* https://github.com/electron-userland/electron-builder/blob/master/packages/electron-updater/src/ElectronAppAdapter.ts
|
||
|
*/
|
||
|
export class MockedAppAdapter implements AppAdapter {
|
||
|
version: string;
|
||
|
name = 'AFFiNE-testing';
|
||
|
isPackaged = true;
|
||
|
appUpdateConfigPath = '';
|
||
|
userDataPath = '';
|
||
|
baseCachePath = '';
|
||
|
|
||
|
constructor(version: string) {
|
||
|
this.version = version;
|
||
|
}
|
||
|
|
||
|
whenReady() {
|
||
|
return Promise.resolve();
|
||
|
}
|
||
|
|
||
|
relaunch() {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
quit() {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
onQuit(_handler: (exitCode: number) => void) {
|
||
|
return;
|
||
|
}
|
||
|
}
|