@simon-says-build/harbormaster 0.14.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/harbormaster +15 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -155,6 +155,16 @@ env, under the caller's explicit `--fn-env`. `exec`: on top of the caller's
|
|
|
155
155
|
ambient env, so a key exported in some shell can't leak into the suite.
|
|
156
156
|
`python3 test/project_env.py`.
|
|
157
157
|
|
|
158
|
+
## A lease never reads the hosting config it doesn't start (0.14.1)
|
|
159
|
+
|
|
160
|
+
A lease whose `--only` leaves hosting out boots from a config with no
|
|
161
|
+
`hosting` block. firebase-tools 15.33 reads `hosting` even when it starts no
|
|
162
|
+
hosting emulator, and a web-framework target (`"source": "."`, Next.js)
|
|
163
|
+
makes it refuse every emulator without the `webframeworks` experiment.
|
|
164
|
+
Tapuat's lease on simon-linux-1 died there on 2026-10-21; 15.28 on the
|
|
165
|
+
studio never checked. An `--only` that asks for hosting, or no `--only`,
|
|
166
|
+
keeps it. `python3 test/injected_config.py`.
|
|
167
|
+
|
|
158
168
|
## An idle simulator nobody leases is shut down (0.13.0)
|
|
159
169
|
|
|
160
170
|
The world sweep (every `FBPORTS_SWEEP_INTERVAL`, 5 min) now shuts down a
|
package/harbormaster
CHANGED
|
@@ -84,7 +84,7 @@ import uuid
|
|
|
84
84
|
from datetime import datetime, timezone
|
|
85
85
|
from pathlib import Path
|
|
86
86
|
|
|
87
|
-
VERSION = "0.14.
|
|
87
|
+
VERSION = "0.14.1"
|
|
88
88
|
|
|
89
89
|
# Overridable for tests / parallel installs; default is the shared user daemon.
|
|
90
90
|
# The dir keeps the old "firebase-ports" name: pre-rename binaries still installed
|
|
@@ -361,11 +361,21 @@ def _service_ports(ports):
|
|
|
361
361
|
return {s: p for s, p in ports.items() if s not in ("ui", "hub", "logging")}
|
|
362
362
|
|
|
363
363
|
|
|
364
|
-
def _write_injected_config(cwd, ports):
|
|
364
|
+
def _write_injected_config(cwd, ports, only=None):
|
|
365
365
|
"""Set ports on the emulators the portless firebase.json DECLARES (+ hub/logging).
|
|
366
|
-
Never adds emulators the project doesn't use. Returns the temp config basename.
|
|
366
|
+
Never adds emulators the project doesn't use. Returns the temp config basename.
|
|
367
|
+
|
|
368
|
+
With an --only that leaves hosting out, the `hosting` block goes too: no
|
|
369
|
+
emulator a lease starts serves it, and firebase-tools still READS it. A
|
|
370
|
+
web-framework target (`"source": "."`, a Next.js app) makes 15.33 refuse to
|
|
371
|
+
start ANY emulator without the webframeworks experiment — Tapuat's run
|
|
372
|
+
20261021-130009-exploration-everyday-user died there on simon-linux-1 while
|
|
373
|
+
15.28 on the studio never checked."""
|
|
367
374
|
cfg = json.loads((Path(cwd) / "firebase.json").read_text())
|
|
368
375
|
emu = cfg.setdefault("emulators", {})
|
|
376
|
+
if only and "hosting" not in only:
|
|
377
|
+
cfg.pop("hosting", None)
|
|
378
|
+
emu.pop("hosting", None)
|
|
369
379
|
for svc in [k for k in emu if k != "singleProjectMode"]:
|
|
370
380
|
if svc in ports and isinstance(emu[svc], dict):
|
|
371
381
|
emu[svc]["port"] = ports[svc]
|
|
@@ -775,7 +785,7 @@ class Broker:
|
|
|
775
785
|
|
|
776
786
|
def _boot(self, cwd, block, only, project_id, label, on_spawn=None, extra_env=None):
|
|
777
787
|
all_ports = _block_ports(block)
|
|
778
|
-
tmp = _write_injected_config(cwd, all_ports)
|
|
788
|
+
tmp = _write_injected_config(cwd, all_ports, only)
|
|
779
789
|
# Readiness/liveness track ONLY the data services actually started (respect
|
|
780
790
|
# --only, else the project's declared emulators; skip ui/hub/logging) — else
|
|
781
791
|
# we'd wait forever for ports (functions, pubsub, …) that never open.
|
|
@@ -1841,7 +1851,7 @@ def main():
|
|
|
1841
1851
|
me = os.getpid() # this process owns the reservation for the run
|
|
1842
1852
|
res = ok(_call("POST", "/allocate", {"owner_pid": me, "owner_start": _proc_start(me), "label": "exec"}), "exec")
|
|
1843
1853
|
base, lid = res["base"], res["leaseId"]
|
|
1844
|
-
tmp = _write_injected_config(cwd, _block_ports(base))
|
|
1854
|
+
tmp = _write_injected_config(cwd, _block_ports(base), only)
|
|
1845
1855
|
try:
|
|
1846
1856
|
run = ["firebase", "emulators:exec", "--config", tmp]
|
|
1847
1857
|
if only:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simon-says-build/harbormaster",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"description": "A localhost daemon that leases each caller its own port block — isolated Firebase emulator sandboxes, Metro/Expo ports, private iOS simulators — reaped when the caller exits. No port collisions, no shared instances, no pkill.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"harbormaster": "harbormaster",
|