Replays are bundled into the Pages deploy as gzipped static assets (B2 stays the private cold archive). Repoint all replay/card/thumbnail/live.json fetches off the empty R2 cache and the non-resolving b2.aicodebattle.com onto same-origin /data/, via a shared fetchReplayFromUrl helper that gunzips .json.gz with DecompressionStream. - new web/src/lib/replay-data.ts (REPLAY_BASE, replayUrl, fetchReplayFromUrl) - replay.ts / embed.ts / pages/embed.ts / playlist-carousel.ts use the helper - og-tags, bot-card, home, matches, bot-profile, playlists, feedback, ambient, api-types: /r2/ -> /data/ - pages.json data_paths updated; friendlier 404 message preserved - 21 web tests pass; npm run build OK Closes: bf-5cwi Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
30 lines
846 B
JSON
30 lines
846 B
JSON
{
|
|
"name": "ai-code-battle",
|
|
"description": "AI Code Battle - Competitive bot programming platform",
|
|
"domains": [
|
|
"aicodebattle.com"
|
|
],
|
|
"build": {
|
|
"command": "npm run build",
|
|
"output_dir": "dist",
|
|
"root_dir": "web"
|
|
},
|
|
"routes": {
|
|
"app": "index.html",
|
|
"replay_viewer": "replay.html"
|
|
},
|
|
"data_paths": {
|
|
"pages_data": "/data",
|
|
"replay_data": "/data/replays (gzipped static assets bundled into the deploy by the index builder)"
|
|
},
|
|
"deployment": {
|
|
"method": "wrangler pages deploy",
|
|
"git_integration": true,
|
|
"index_builder_deploys": "data/ directory only"
|
|
},
|
|
"notes": [
|
|
"SPA uses hash-based routing (no _redirects needed)",
|
|
"Index files in data/ are deployed by Rackspace index builder every ~90 min",
|
|
"Replays and per-match data are served from R2 custom domain"
|
|
]
|
|
}
|