hermes-agent/apps/desktop/scripts
Teknium f8098c6b6f
fix(desktop): resolve electronDist to the actual electron install location (#48081)
After the June lockfile regeneration (#46652) floated electron and reshuffled
npm workspace hoisting, the desktop pack fails with "The specified electronDist
does not exist". apps/desktop/package.json pointed electronDist at the repo
root (../../node_modules/electron/dist) while npm now installs electron nested
under apps/desktop/node_modules/electron. The two contradict, so a clean
install can never package the app (Windows + macOS).

- electronDist -> node_modules/electron/dist (resolved relative to apps/desktop,
  i.e. the workspace-local install npm actually produces).
- hermes_cli/main.py, scripts/install.sh, scripts/install.ps1: add a runtime
  electron-dir resolver that prefers apps/desktop/node_modules/electron and
  falls back to the root hoist, so dist checks + the mirror re-download work
  under either npm layout.
- patch-electron-builder-mac-binary.cjs: try the workspace-local Electron.app
  before the root hoist in the macOS binary-restore fallback (sibling site no
  PR touched).
- test: assert build.electronDist resolves to where the lockfile installs
  electron, so a future hoist change (root <-> nested) can't silently break it.

Salvages the overlapping work in #48003 (sitkarev), #48012 (omegazheng), and
#48033 (james47kjv).

Co-authored-by: sitkarev <59806492+sitkarev@users.noreply.github.com>
Co-authored-by: omegazheng <zheng@omegasys.eu>
Co-authored-by: james47kjv <220877172+james47kjv@users.noreply.github.com>
2026-06-17 18:08:01 -05:00
..
after-pack.cjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
assert-dist-built.cjs fix(desktop): fail loudly instead of blank-paging when the renderer bundle is missing (#41729) 2026-06-07 22:04:39 -07:00
assert-dist-built.test.cjs fix(desktop): fail loudly instead of blank-paging when the renderer bundle is missing (#41729) 2026-06-07 22:04:39 -07:00
assert-root-install.cjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
before-build.cjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
before-pack.cjs fix(desktop): recover from corrupt cached Electron download on build 2026-06-04 07:17:33 -07:00
before-pack.test.cjs fix(desktop): recover from corrupt cached Electron download on build 2026-06-04 07:17:33 -07:00
click-session.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
dev-no-hmr.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
diag-jump.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
diag-scroll-reset.mjs fix(desktop): stop chat scroll jumping by disabling native scroll anchoring 2026-06-02 23:08:01 -05:00
eval.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
leak-typing.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
measure-jump.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
measure-latency.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
measure-real-stream.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
measure-submit.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
measure-synthetic-stream.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
notarize-artifact.cjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
notarize.cjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
patch-electron-builder-mac-binary.cjs fix(desktop): resolve electronDist to the actual electron install location (#48081) 2026-06-17 18:08:01 -05:00
probe-renderer.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
probe-thread.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
profile-long-stream.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
profile-real-stream.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
profile-synth-stream.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
profile-typing-lag.md Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
profile-typing.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
reload-renderer.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
reload.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
set-exe-identity.cjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
stage-native-deps.cjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
test-desktop.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
write-build-stamp.cjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00