Fix: region loader finds the manifest in prod (dist/) — completes P1 region ownership (v0.20.0) #35

Merged
kamilkrzywda merged 2 commits from fix/16-p1-region-keys-prod into master 2026-10-14 11:35:22 +02:00
2 Commits
Author SHA1 Message Date
kamilkrzywda 6949739956 Bump to v0.20.0 (region loader prod-path fix)
CI / build + unit + e2e (pull_request) Successful in 1m31s
2026-10-14 09:32:29 +00:00
kamilkrzywda cf7d3cb122 Fix region loader to find the manifest in prod (dist/) — dev-vs-prod path (v0.20.0, completes #16 P1)
v0.19.0's region-level ownership did not activate in the production image:
server/regions.ts loadRegions only looked in public/, but the Docker image keeps
only dist/ (Vite copies public/* -> dist/ at build), so the loader found nothing
and expandCountriesToKeys degraded to a no-op — fresh games kept raw ISO_A3 codes
instead of region keys (the client's own /region-keys.json fetch still worked,
since the client is served from dist/).

loadRegions now probes public/ (dev) then dist/ (prod, == clientDir) and uses the
first directory holding both files. A new test covers the prod-only (dist/), dev
(public/), and empty-root (no data) layouts.
2026-10-14 09:32:29 +00:00