v0.84.0: cairn-media-seed and local design iteration
The local design-iteration release: a cairn site's design can now be iterated fully locally, against real content and real media, with no deploy per change.
Added
- New bin,
cairn-media-seed. Seeds wrangler's local R2 simulator with every media-library object from a deployed cairn site (npx cairn-media-seed --from https://your-site.com), sovite devserves real media on every page with no deploy. It reads the committed media manifest, downloads each object with optional repeatable--headerflags for an Access-protected site, and writes it under the same content-addressed key the media route reads;--bucketoverrides the wrangler-config bucket resolution when a site declares more than one. See the reference page and the local design-iteration guide it unblocks.
Fixed
- The media delivery route works under
vite dev.createMediaRoutepassed the request'sHeadersinstance straight through as R2get'sonlyIfandrangeoptions. Production Workers accept aHeadersinstance there, but miniflare'sgetPlatformProxycan't serialize one across its RPC boundary, so every/mediaread 500'd under a consumer'svite dev. The route now derives plain, structured-clone-safeonlyIfandrangeobjects from the request's conditional andRangeheaders instead. The 206 shaping also now handles a suffix range (bytes=-n) echoed back as{ suffix }, clamping a suffix past the object size to the full window.
Consumers must: nothing. A site carrying a dev-only /media fallback middleware for the vite dev bug (the aksailingclub-org devMediaFallback) can delete it on upgrade; the route itself now works under vite dev with no workaround.