Commit Graph

12 Commits

Author SHA1 Message Date
Matt Isenhower
21a4f5d85c Route backend file access through storage and auth seams
Prepare the shared updater and social code to run against R2 in a Worker
while keeping the local Node runner working:

- Add app/common/storage with public, private, and archive areas keyed like
  the R2 objects. FilesystemStorage maps them onto dist/ and storage/ for
  Node; BucketStorage wraps R2 bindings. Storage is configured once per
  process; only image existence is cached, so JSON reads are always fresh.
- Move ValueCache, DataUpdater (data, calendars, archive snapshots),
  ImageProcessor, LocalizationProcessor, festival updaters, status
  generators, social translations, ImageWriter, and Buffer/Threads image
  hosting onto storage. Query hashes are a JSON import.
- Add app/splatnet/auth.mjs: the existing bullet-token code behind auth(),
  so the Worker can route token requests to per-region Durable Objects.
  warmCaches uses auth().refresh().
- Remove the S3/R2 sync, vfs, the dual upload, the sync commands, and
  s3-sync-client. Local runs no longer read from or write to remote buckets.
- Give every test fresh in-memory storage via app/test/setup.mjs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 16:03:33 -08:00
Matt Isenhower
44ea3051c4 Add JSON cache purging after R2 uploads 2026-09-26 09:56:44 -07:00
Matt Isenhower
70e81bbc38 Generate canonical asset URLs upstream
Some checks failed
Deploy / deploy-frontend (push) Has been cancelled
Deploy / deploy-backend (push) Has been cancelled
2026-08-30 10:20:12 -07:00
Matt Isenhower
ea15246740 Add dual Spaces and R2 uploader 2026-08-29 17:52:28 -07:00
Matt Isenhower
6dac044a69 Make VFS load lazily
VFS now loads on first has()/getMtime() call rather than requiring
explicit initialization in sync/index.mjs. This ensures it works
regardless of entry point (sync:download, splatnet:quick, etc.).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 09:55:13 -08:00
Matt Isenhower
41c9f9a315 Add VFS layer to avoid downloading files only needed for existence checks
Uses S3 ListObjectsV2 to build an in-memory file listing at startup,
allowing exists() and olderThan() to resolve from the listing instead
of requiring files on disk. sync:download now skips assets/splatnet/,
data/xrank/, data/festivals.ranking.*, and status-screenshots/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 09:26:05 -08:00
Matt Isenhower
6dc7fd0bdb Download private storage before pulling data from Splatnet
Some checks are pending
Build frontend / build (20.x) (push) Waiting to run
Deploy / deploy-frontend (push) Waiting to run
Deploy / deploy-backend (push) Waiting to run
Fix code styles / build (push) Waiting to run
2024-12-14 16:02:49 -08:00
Matt Isenhower
1b153f777c Cleanup 2024-11-21 22:08:57 -08:00
Matt Isenhower
a134856713 Exclude storage/archive
Some checks are pending
Deploy / deploy-frontend (push) Waiting to run
Deploy / deploy-backend (push) Waiting to run
2024-11-20 23:50:55 -08:00
Matt Isenhower
8054490839 Exclude the archive dir
Some checks failed
Deploy / deploy-frontend (push) Has been cancelled
Deploy / deploy-backend (push) Has been cancelled
2024-11-18 21:09:36 -08:00
Matt Isenhower
10b3b72fc2 Fix jsdoc 2024-11-17 20:18:22 -08:00
Matt Isenhower
cb76f65783 Add S3 syncer 2024-11-17 19:35:00 -08:00