Skip to main content

Module s3

Module s3 

Source
Expand description

Dev-tier S3 surface (R490-F7).

An FS-backed s3s-fs endpoint that mesofact-dev hosts so a workload’s @mesofact/runtime R2Adapter can resolve against a local bucket during bun run dev instead of real Cloudflare R2. This fills the “build→PUT→read” contract that the R255-S5 spike explicitly left unexercised at tier 1 — that spike only ruled on the static-asset browser-GET path (still serve-off-disk); the runtime r2 adapter is a separate consumer that does speak the S3 API.

Design notes:

  • Anonymous. Bound to 127.0.0.1 on a dynamic port, this is a single-tenant loopback dev appliance — no SigV4 verification. The R2Adapter still signs with aws4fetch using whatever dummy creds the workload injects; s3s ignores the signature when no auth is configured.
  • Bucket = a pre-created dir under the state root. s3s-fs treats top-level dirs under its root as buckets, so creating <root>/<bucket>/ up front is enough for PutObject to land.
  • Out of scope here (handed off): seeding the bucket from dist/, and injecting coords into the in-process V8 SSR runtime (which can’t inherit process.env the way the build subprocess does). See R490-F7.

Structs§

DevS3
Coordinates of a running dev S3 surface, handed to consumers (build-child env, discovery file) so they can point an S3 client at it.

Constants§

DEFAULT_BUCKET
Default dev bucket name. Workloads point [sources.r2] bucket here in dev.