Security hardening: drop npm deps and self-host Outfit font #2

Merged
joelbrock merged 2 commits from security/cve-review-hardening into main 2026-10-30 17:59:28 -07:00
2 Commits
Author SHA1 Message Date
Joel Brock f85a6fb9b7 Security hardening: drop npm deps and self-host Outfit font
- Remove package.json / package-lock.json. The only dependency was
  claude-flow (dev tooling, never loaded by the game), which pulled in
  49 known vulnerabilities (2 critical, 28 high) and could be installed
  by the Cloudflare Pages build.
- Self-host the Outfit variable font (latin + latin-ext woff2, SIL OFL)
  in fonts/ instead of loading it from Google Fonts. This removes the
  last third-party origins from the CSP (style-src / font-src are now
  'self' only), stops sending visitor IPs to Google, and makes the font
  work offline.
- Precache the font files in the service worker and bump CACHE_NAME to
  tortugotchi-v18.
2026-10-30 17:43:03 -07:00
Joel Brock fadf1ccd50 Suspend gameplay when unfocused and fix playmate voice mismatches
Pause the ocean decay/aging/hazard loops and ambient audio whenever the tab is
hidden or the window loses focus, and resume untouched on return. Remove the
offline catch-up decay so a turtle left alone freezes instead of dying, letting
turtles live and grow over a long real-world span.

Gate the playmate greeting/farewell voice clips (letsPlay/swimSafe) to the
green species whose text they match; loggerhead and leatherback play silently.
Also keep glub out of the ambient loop while a voice line plays. Bump SW to v17.
2026-06-22 15:14:40 -07:00