Repository navigation
fix(packaging): unpack the orcad serve-selection entry so orca serve can run it - #27404
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The change unpacks the orcad serve-selection entry at the path used by the packaged launcher. The matcher test and runtime dependency packaging checks address the identified launch requirements, leaving no concrete merge blocker. Pre-merge checks |
|
ELI5
On an installed Orca,
orca serveasks the app a quick question first: "should this server run on orcad?" The file that answers was left inside the app's sealed archive, where the command-line tool cannot open it. So everyorca serveprinted a "Cannot find module" error and quietly fell back to the older Electron server.What Changed
orca servestart loggedCannot find module '.../app.asar.unpacked/out/main/orcad/orcad-local-serve-selection-entry.js'and ran on Electron serve, which binds all interfaces.orca serveuses orcad when this machine can.Mechanism: the CLI runs
out/main/orcad/orcad-local-serve-selection-entry.jsfromapp.asar.unpackedwithELECTRON_RUN_AS_NODE=1, and that mode cannot read insideapp.asar. The electron-builderasarUnpacklist now includes that file. Its imports already resolve: the shared chunks are under the unpackedout/main/chunks/**, and@orca/process-hostships inresources/node_modules.Why
This is the same fix already applied to the other entries the CLI or scanner runs under
ELECTRON_RUN_AS_NODE(daemon, parcel watcher, the foreign SQLite reader). I unpacked only this one file rather than all ofout/main/orcad/**, because the other files in that folder are loaded only by the Electron main process, and asar handles those paths.Linked Issue
Fixes #27307
Visual Proof
N/A. Packaging-only change with no UI.
Testing
New test in
config/scripts/electron-builder-config.test.mjs: it reads the entry name fromsrc/shared/orcad-local-serve-selection.ts, the same constant the CLI uses, and runs electron-builder's ownFileMatcheroverasarUnpack. It failed before the config change and passes after it.pnpm tc, oxlint,pnpm run check:code-quality:changedandpnpm lintpass.Review
Agent skill upstream boundary
Notes
Applies the same way on all platforms (one config list). SSH hosts are unaffected because they deploy orcad from the template, not from this entry.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)