stack/packages
BilalG1 5423d774a2
feat(stack-cli): auto-install emulator deps on pull (#1384)
## Summary
- `stack emulator pull` now preflights VM dependencies (QEMU binaries,
socat/curl/nc/lsof/openssl/zstd, and aarch64 UEFI firmware on arm64)
before downloading.
- Missing deps are listed, then installed with user confirmation via
`brew` on macOS (bootstrapping Homebrew itself if absent) or `sudo
apt-get` on Linux.
- Skipped when `--skip-snapshot` is passed, since that path never boots
the VM.
- `gh` / `GITHUB_TOKEN` are intentionally excluded from the auto-install
set.

## Test plan
- [ ] `node packages/stack-cli/dist/index.js emulator pull` on a machine
with all deps present → no prompt, proceeds as before.
- [ ] Unlink a dep (e.g. `brew unlink zstd`) and rerun → missing dep
listed, decline prompt → exits with a clear error; accept prompt → brew
install runs and pull continues.
- [ ] `emulator pull --skip-snapshot` still bypasses the dep check.
- [ ] Linux path: missing binaries trigger `sudo apt-get update && sudo
apt-get install -y …`.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Emulator pull now detects missing host dependencies and, on
macOS/Linux with an interactive terminal and supported package tools,
shows a proposed install plan, prompts for confirmation, and can
auto-install required packages (including optional ARM64 firmware).
Homebrew will be bootstrapped if absent.
* Use --skip-snapshot to bypass the interactive dependency check and
installation.

* **Behavior**
* In non-interactive or unsupported environments, the tool falls back to
the prior preflight behavior instead of attempting installation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-27 13:01:39 -07:00
..
dashboard-ui-components chore: update package versions 2026-04-20 19:06:56 -07:00
init-stack chore: update package versions 2026-04-20 19:06:56 -07:00
js chore: update package versions 2026-04-20 19:06:56 -07:00
react chore: update package versions 2026-04-20 19:06:56 -07:00
stack chore: update package versions 2026-04-20 19:06:56 -07:00
stack-cli feat(stack-cli): auto-install emulator deps on pull (#1384) 2026-04-27 13:01:39 -07:00
stack-sc chore: update package versions 2026-04-20 19:06:56 -07:00
stack-shared fix(init-prompt): require StackProvider for all frameworks (#1374) 2026-04-24 12:27:49 -07:00
stack-ui chore: update package versions 2026-04-20 19:06:56 -07:00
template chore: update package versions 2026-04-20 19:06:56 -07:00