4 Commits
Author SHA1 Message Date
Ethan Stoner 899ca4f56e fix: bound CCTV media bodies with an idle deadline
The media relay only deadlined the wait for upstream response headers. Once
headers arrived the timer stopped, so an upstream that answered and then sent
nothing held both the client response and the upstream socket open for as long
as the camera host allowed. The declared Content-Length ceiling was the only
body bound, and a chunked or length-less body had none.

A 30-second idle deadline now measures the gap between upstream chunks and
tears the stream down through the existing release path. Because a paused pipe
also stops upstream bytes arriving, the deadline reschedules itself whenever
the response is still waiting to drain, so a viewer on a slow link is not read
as a dead camera. Live feeds that keep delivering frames are unaffected.
2026-09-20 20:38:59 -07:00
Ethan Stoner 59a20e2d18 fix(cctv): cap buffered snapshot downloads
Adapt the streamed snapshot size cap contributed in public PR #82 to the CCTV media module.
2026-09-12 16:34:51 -07:00
Ethan Stoner 6d83bb6008 fix(data): keep node:fs out of the browser-built data modules (#83)
naturalEarthRegions.js and neighborhoodPolygons.js each carried an
isNode branch that dynamically imported node:fs to read their bundled JSON
packs, because a plain dynamic JSON import needs an import attribute in
Node. Vite only warns about externalizing node:fs for the browser, so both
warnings survived every production build and the runtime boundary rested on
an environment guard.

Give both loaders the import attribute instead. Vite bundles the JSON as a
module exactly as before (the emitted regions/marine/san-francisco chunks
are byte-identical), Node loads the same files under node:test, and the
isNode split disappears.

Add a source-boundary test so a node: import cannot silently return to a
browser-built module.

Closes #34
2026-08-31 15:25:02 -05:00
Ethan Stoner ac927de71a chore: normalize line endings to LF via .gitattributes (#81) 2026-08-31 15:24:57 -05:00