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.
This commit is contained in:
Joel Brock
2026-10-30 17:43:03 -07:00
parent fadf1ccd50
commit f85a6fb9b7
9 changed files with 121 additions and 9326 deletions
+3 -1
View File
@@ -1,4 +1,4 @@
const CACHE_NAME = 'tortugotchi-v17';
const CACHE_NAME = 'tortugotchi-v18';
const ASSETS = [
'./',
'./index.html',
@@ -7,6 +7,8 @@ const ASSETS = [
'./manifest.json',
'./icon-192.png',
'./icon-512.png',
'./fonts/outfit-latin.woff2',
'./fonts/outfit-latin-ext.woff2',
'./media/turtvox001_another_day_in_the_deep_blue.m4a',
'./media/turtvox002_best_human_ever.m4a',
'./media/turtvox003_bitten_shell_but_ok.m4a',