dd-timer/src/infrastructure/update/GiteaUpdateAdapter.ts
POL Mickaël c71ad151e0 feat: infrastructure Electron + persistence + electron-updater
- LocalStorageRepository avec migrations de données
- Notifications Windows + ntfy mobile
- WebAudioAlarm avec 4 sons
- Migration electron-updater avec latest.yml + sha512
- Support ELECTRON_USER_DATA_DIR pour isolation E2E
- Icône Windows native (.ico)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 05:43:04 +02:00

17 lines
503 B
TypeScript

import type { UpdatePort, UpdateInfo } from '@domain/ports/UpdatePort';
export class GiteaUpdateAdapter implements UpdatePort {
async checkForUpdates(): Promise<UpdateInfo | null> {
// Delegated to main process via IPC in the actual Electron app
// This is a placeholder — the real check happens in main.ts
return null;
}
downloadAndInstall(info: UpdateInfo): void {
const api = (window as any).electronAPI;
if (api?.installUpdate) {
api.installUpdate();
}
}
}