import { app, BrowserWindow, ipcMain, desktopCapturer, protocol, net } from 'electron'; import path from 'path'; import { fileURLToPath, pathToFileURL } from 'url'; import fs from 'fs'; import { spawn } from 'child_process'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); // We need to read package.json for version and upgrade link const pkgPath = path.join(__dirname, 'package.json'); const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8')); // Register custom protocol BEFORE app is ready to ensure localStorage persistence // FIX: Added stream: true to allow