Speed up downloads by combining multiple network connections in parallel
TypeScript bandwidth-aggregationcross-platformdesktop-appdownloaderdownloadmanagerlinuxmacosmulticonnectionparallel-downloadswindows
fix: reinstall Electron binary before dev if missing
Anmol Kapild2d4bcf760c1
diff --git a/package.json b/package.jsonindex 25b17b6..879fe3f 100644--- a/package.json+++ b/package.json@@ -13,6 +13,7 @@"typecheck:e2e": "tsc -p tsconfig.e2e.json","typecheck": "npm run typecheck:node && npm run typecheck:web && npm run typecheck:e2e","start": "electron-vite preview",+ "predev": "node scripts/ensure-electron.mjs","dev": "electron-vite dev","build": "npm run typecheck && electron-vite build","postinstall": "electron-builder install-app-deps",diff --git a/scripts/ensure-electron.mjs b/scripts/ensure-electron.mjsnew file mode 100644index 0000000..ce1ddf0--- /dev/null+++ b/scripts/ensure-electron.mjs@@ -0,0 +1,9 @@+// Electron's binary download can silently fail during `npm install` (network, interrupted install).+// Without it, `electron-vite dev` dies with "Electron uninstall". Re-run the installer if it's missing.+import { existsSync } from 'node:fs'+import { execFileSync } from 'node:child_process'++if (!existsSync('node_modules/electron/path.txt')) {+ console.log('Electron binary missing, downloading...')+ execFileSync(process.execPath, ['node_modules/electron/install.js'], { stdio: 'inherit' })+}