Skip to content

Epic: v4.1 usability layer over the pure fetch() core #128

Description

@gmoon

v4.1 — a usability layer on top of the pure fetch() core

v4.0 made the right correctness call: it replaced v3's response-mutating,
404-swallowing proxy.get(req, res) with a pure proxy.fetch(req) that
throws typed errors. But it threw out v3's ergonomics without a replacement,
and quietly narrowed header passthrough.

v4.1 keeps the honest core and rebuilds the missing usability as thin,
opt-in layers
— each built on the one below, none polluting fetch():

fetch()      pure primitive — get a key, throw typed errors   (unchanged)
  └─ pipe() / middleware()   one-call ergonomics, honest status codes
  └─ staticSite()            index + error documents (S3 website parity)

Tracked work

Design principles

  • The purity guarantee lives in fetch(); every convenience consumes it and
    never leaks response-writing or S3 error classification back into the core.
  • Config for website behavior rides on a dedicated factory (staticSite()),
    not the constructor (Option 2) — so index/error-document logic stays in the
    layer.
  • All examples are exercised by the smoke gate against a real bucket.

Implementation for all three is ready on a branch; PRs to follow.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementepicTracking issue for a multi-issue effort

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions