mirror of
https://github.com/stablyai/orca.git
synced 2026-11-15 10:27:33 +00:00
* feat(serve): add bind address option * fix(serve): validate service bind address * fix(serve): validate bind flag values * fix(serve): reject scoped bind addresses * docs(serve): document bind option paths * docs(serve): note that --mobile-pairing needs an all-interfaces bind * fix(serve): move bind address parsing to shared so the packaged CLI can load it The packaged CLI ships out/cli and out/shared but not out/main/orcad, so cli/runtime/serve-bind-flag.js failed the packaged runtime-import check (and would fail to load) when it imported main/orcad/orcad-bind-address. Move the module, unchanged, to src/shared and point orcad, Electron serve and the CLI at it. * test(serve): pin down the default listener and the --bind startup paths - Extract the Electron serve listener pin into resolveServePinnedBindHost and test that serve without --bind stays unpinned (all interfaces, as before), an explicit --bind pins it from either argv form, and the orcad browser sidecar stays on loopback. - Golden the orcad and Electron serve argv without --bind against the pre---bind output. - Test that the CLI passes bind only when given and refuses --bind with --mobile-pairing before launching. - Guard that serve-bind-flag and the shared serve validation load only CLI and shared modules, which is what the packaged CLI ships. --------- Co-authored-by: lw <13579959+bertramlongwuyan@user.noreply.gitee.com> Co-authored-by: Neil <neil@stably.ai> Co-authored-by: xuanchangfeng <210147232+xuanchangfeng@users.noreply.github.com>