Skip to content

airlock 0.3.0

Latest

Choose a tag to compare

@Dawsson Dawsson released this 18 Feb 18:49
  • airlock.mount(basePath) — returns a WinterCG-compatible (request, env) => Response handler with basePath prefix stripping built in; works with Cloudflare Workers, Hono, Elysia, Bun.serve, or any fetch-based runtime
  • Adapter and adminToken factory support — pass (env) => adapter instead of a static instance so Cloudflare Worker bindings can be resolved per-request
  • CloudflareAdapter.forEnv(config) — static factory that automatically falls back to MemoryAdapter (with a console.info) when Cloudflare bindings are missing, eliminating crashes in local dev
  • CloudflareAdapter constructor now throws a descriptive error at construction time when kv or r2 is undefined, instead of a cryptic TypeError on first request