[feat](client): address one instance origin instead of connection modes
Apps reach every service through Maestro on one port; direct service addressing is no longer a supported deployment, and Maestro has no per-service hostname or host-port route. Replace the maestro/direct modes and the serviceRef lookup with one configured origin and the fixed paths /api/alarm/{action,auth,ws}, defaulting dev builds to 127.0.0.1:8080 through adb reverse. The old mode-specific body wrapping and the direct-mode socket branch go with it.
This commit is contained in:
+7
-7
@@ -4,17 +4,17 @@
|
||||
# Expects metro already running on 127.0.0.1:8089 (start it with `bun start`
|
||||
# in another terminal). Reverses the adb tunnels so the device reaches the
|
||||
# dev machine via 127.0.0.1, then builds, installs and launches the app:
|
||||
# - 8080 Maestro (dev default)
|
||||
# - 8088 Alarm direct mode (bypasses Maestro) — the service's host port
|
||||
# - 8080 the instance/Maestro origin (dev default; every service path lives
|
||||
# under it — the client never opens the service's own 8088)
|
||||
# - 8089 the Metro packager (this client's port)
|
||||
# Each reverse maps device 127.0.0.1:<port> -> host 127.0.0.1:<port>, so Metro
|
||||
# and the service must keep distinct numbers; 8088 belongs to the service.
|
||||
# Each reverse maps device 127.0.0.1:<port> -> host 127.0.0.1:<port>.
|
||||
#
|
||||
# If your phone is on the same LAN instead, turn "Use adb reverse" off in
|
||||
# Settings and it will fall back to the LAN host baked into src/services/connection.ts.
|
||||
# The instance address is the one thing the app configures (Settings). Leave it
|
||||
# at the default http://127.0.0.1:8080 for a USB phone with these reverses, or
|
||||
# point it at a LAN/WAN origin; there is no direct-service mode to toggle.
|
||||
set -euo pipefail
|
||||
|
||||
for port in 8080 8088 8089; do
|
||||
for port in 8080 8089; do
|
||||
adb reverse tcp:"$port" tcp:"$port" >/dev/null 2>&1 || true
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user