AGENTS.md@packages/electron · git:20260703.e20cd5a · 2026-07-03 · sha256 db6f32b14dbe4d2e
AGENTS.md@packages/electron git:20260703.e20cd5aA
Immutable. This exact content is served forever at /api/v1/blob/db6f32b14dbe4d2e.
# DOX — packages/electron Files in this directory. One row per source file. | File | Purpose | |------|---------| | `forge.config.ts` | Electron Forge config: DMG, DEB, AppImage, NSIS makers, icon, extraResources. `extraResource` `./resources/git` when present. See change: embed-git-bash-on-windows. **NSIS naming overrides** (change: fix-electron-windows-installer-and-server-bootstrap): NSIS maker's `getAppBuilderConfig` pins `productName`, `appId`, `nsis.artifactName`, `nsis.shortcutName`, `nsis.uninstallDisplayName` all to `pi-dashboard`. Without override, electron-builder's NSIS install-dir fallback reads npm `name` slash-stripped + produces `@blackbelt-technologypi-dashboard-electron`. Locked by `forge-config-naming.test.ts`. **macOS deployment-target floor** (change: add-darwin-x64-build, 6b): `packagerConfig.extendInfo.LSMinimumSystemVersion = "10.15"` pins minimum macOS version in `Info.plist`. Pairs with `MACOSX_DEPLOYMENT_TARGET=10.15` from `Make Electron distributables` step in `publish.yml` (every Mach-O declares 10.15 as `LC_BUILD_VERSION.minos`) + CI verification step that mounts DMG + asserts both match — runner-image upgrade or source-built native module cannot silently raise floor without failing job. **DMG + AppImage makers removed** (change: fix-electron-auto-update-pipeline): `@electron-forge/maker-dmg` + `@pengx17/electron-forge-maker-appimage` dropped; DMG + AppImage now built by electron-builder (see `electron-builder.yml`). Only deb maker remains in Forge. Arch-tagged DMG basename workaround (change: fix-darwin-dmg-arch-collision) + `forge-config-dmg-naming.test.ts` superseded; electron-builder `-c.mac.artifactName` template handles arch tagging. See change: fix-electron-auto-update-pipeline. **NSIS via electron-builder sidecar** (change: restore-windows-nsis-installer): Forge no longer produces Windows NSIS; per-user `Setup.exe` built by `electron-builder --win nsis` (config `packages/electron/electron-builder-nsis.json`, include `build/installer.nsh`) on `windows-latest` CI. Portable `.exe` target dropped. | | `vite.main.config.ts` | Vite config for Electron main process build. Entry `src/main.ts`, ES output `.vite/build/main.js`. Externalizes Node builtins + `node:` prefixes + `electron` + `electron-updater`. | | `vite.preload.config.ts` | Vite config for Electron preload build. Entry `src/preload.ts`, CJS output. Externalizes Node builtins + `node:` prefixes + `electron`. | | `vitest.config.ts` | Vitest config for electron package. Includes `src/**/__tests__/**/*.test.ts`, node env, `forks` pool, `maxWorkers: 1`, globalSetup from shared `setup-home.ts`. |