Commit 1dac960
authored
feat(build): adopt electron-vite for dev + build pipeline (#228)
Closes #144
## Summary
- Adds `electron-vite ^5.0.0` as the build orchestrator at the workspace
root, replacing separate `tsc -b` / `vite` invocations with a single
three-pipeline build (main, preload, renderer)
- Introduces `electron-entry.ts` — the Electron app shell that creates
the `BrowserWindow`, wires the preload script, loads
`ELECTRON_RENDERER_URL` in dev (HMR) or the production
`out/renderer/index.html`, and starts the NestJS IPC microservice;
bootstrap failures surface via `.catch()` + `app.quit()` instead of
being silently swallowed
- Exports `bootstrap()` from `main.ts` so `electron-entry.ts` controls
call timing; wires `desktop:dev` / `desktop:build` scripts at root and
removes Epic A placeholder stubs
## Changes
```
CLAUDE.md +5 docs: desktop:dev / desktop:build commands
app/eslint.config.js +1 ignore **/out/** (electron-vite build output)
app/package.json ±4 replace echo/exit-1 stubs with electron-vite scripts
app/packages/desktop-main/package.json ±4 same
app/packages/desktop-main/src/electron-entry.ts +55 new Electron app entry
app/packages/desktop-main/src/electron-entry.test.ts +241 6 unit tests (dev/prod/bootstrap/quit/macOS/rejection)
app/packages/desktop-main/src/main.ts ±10 export bootstrap(), remove module-level call
app/packages/desktop-main/src/main.test.ts ±13 explicit bootstrap() calls; accurate descriptions
electron.vite.config.ts +40 main/preload/renderer pipelines
package.json +2 desktop:dev + desktop:build scripts
```
## Test plan
- [x] 559 unit tests pass (`npm run app:test`)
- [x] Lint passes — 0 errors (`npm run app:lint`)
- [x] TypeScript clean (`tsc --noEmit`)
- [x] `electron-vite build` exits 0 and produces `out/main`,
`out/preload`, `out/renderer`
- [ ] Manual: `npm run desktop:dev` launches Electron with HMR on
renderer saves
- [ ] Manual: editing a main-process file triggers auto-restart
<details>
<summary>🚀 Mission log</summary>
```
═══════════════════════════════════════════════════════
MISSION issue #144 — feat(build): adopt electron-vite for dev + build pipeline
═══════════════════════════════════════════════════════
pre-launch ✓ (6 tasks planned)
liftoff ✓ (6/6 passed — Apollo Borman Collins Duke Eisele Frost)
systems-check ✓ (2 repairs — Glenn Haise)
docking ✓
═══════════════════════════════════════════════════════
```
</details>
🤖 Generated via /mission1 parent f0a2aa0 commit 1dac960
18 files changed
Lines changed: 1739 additions & 337 deletions
File tree
- .github/workflows
- app
- packages
- desktop-main
- src
- services
- web
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
26 | | - | |
| 26 | + | |
| 27 | + | |
27 | 28 | | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
26 | | - | |
| 26 | + | |
| 27 | + | |
27 | 28 | | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
0 commit comments