diff --git a/forge.config.ts b/forge.config.ts index f9d1e4e..c8473b1 100644 --- a/forge.config.ts +++ b/forge.config.ts @@ -78,7 +78,7 @@ const config: ForgeConfig = { name: 'AntigravityManager', }, draft: true, - prerelease: true, + prerelease: false, }, }, ], diff --git a/src/main.ts b/src/main.ts index 40c4667..423b45d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -223,6 +223,16 @@ process.on('unhandledRejection', (reason) => { app .whenReady() + .then(async () => { + logger.info('Step: Initialize CloudAccountRepo'); + try { + await CloudAccountRepo.init(); + } catch (e) { + logger.error('Startup: Failed to initialize CloudAccountRepo', e); + // We might want to exit here or show a dialog, but for now we proceed + // though functionality will be broken. + } + }) .then(() => { logger.info('Step: setupORPC'); return setupORPC(); @@ -242,9 +252,6 @@ app .then(async () => { // Initialize Cloud Monitor if enabled try { - // Initialize DB & Migrate to Encrypted Storage - await CloudAccountRepo.init(); - // Start OAuth Server AuthServer.start();