mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-16 13:03:31 +08:00
Electron's sidecar runs outside app.asar, so H5 static files must be available as normal unpacked files. Point the sidecar at the unpacked renderer dist and keep a server fallback for stale app.asar-style paths. Constraint: Packaged Bun sidecars cannot read app.asar paths with ordinary fs stat calls. Rejected: Serve H5 from app.asar directly | the external sidecar is not Electron and does not get asar filesystem support. Confidence: high Scope-risk: narrow Directive: Keep package-smoke checking app.asar.unpacked/dist/index.html before changing asarUnpack or H5 dist paths. Tested: bun test src/server/__tests__/h5-access-auth.test.ts src/server/__tests__/h5-access-policy.test.ts Tested: bun test desktop/electron/services/sidecarManager.test.ts scripts/quality-gate/package-smoke/index.test.ts Tested: bun run check:server Tested: cd desktop && bun run check:electron Tested: git diff --check Tested: SKIP_INSTALL=1 SIGN_BUILD=0 MAC_TARGETS=dmg desktop/scripts/build-macos-arm64.sh Tested: packaged sidecar curl /?serverUrl=...&h5Token=... returned HTTP 200 Not-tested: Gatekeeper notarization for the local ad-hoc DMG