The package's main published surface. package.json#exports points here and
TypeDoc documents from here, so a symbol is API when it appears below and
internal when it does not.
The Hono middleware is not here. It sits behind the
./middlewares subpath so hono stays an optional peer
dependency; that module explains why.
What belongs here
The platform side of the seam @bayudwiyansatria/core defines. The kernel
says what an application needs — a cache, relational storage, a queue — and
this package says what Cloudflare provides for it:
core/bindings/ — one accessor per binding,
over Binding. An accessor holds the binding's name, not the
binding, and resolves it from the Env passed to each call, which is what
makes one module-scope instance safe across requests.
core/services/ — one capability service per
accessor. KVService is a CacheStore, D1Service a
DataStore, so business logic depends on the capability and never names
Cloudflare.
core/observability/ —
RequestCorrelation, the header that carries one request id across a
Service Binding hop, and — from constants/ — events, the names
the cross-cutting log lines are filed under. Everything else about
observability is Cloudflare's own and is not reimplemented here.
CloudflareEnv — the environment contract a consuming Worker extends.
Public API of the Cloudflare adapters.
Remarks
The package's main published surface.
package.json#exportspoints here and TypeDoc documents from here, so a symbol is API when it appears below and internal when it does not.The Hono middleware is not here. It sits behind the
./middlewaressubpath sohonostays an optional peer dependency; that module explains why.What belongs here
The platform side of the seam
@bayudwiyansatria/coredefines. The kernel says what an application needs — a cache, relational storage, a queue — and this package says what Cloudflare provides for it:core/bindings/— one accessor per binding, over Binding. An accessor holds the binding's name, not the binding, and resolves it from theEnvpassed to each call, which is what makes one module-scope instance safe across requests.core/services/— one capability service per accessor. KVService is aCacheStore, D1Service aDataStore, so business logic depends on the capability and never names Cloudflare.constants/— cloudflareDefaults, the binding-backed half of the configuration surface.core/observability/— RequestCorrelation, the header that carries one request id across a Service Binding hop, and — fromconstants/— events, the names the cross-cutting log lines are filed under. Everything else about observability is Cloudflare's own and is not reimplemented here.Quick start
Exports
Bindingand the eighteen accessors over itcloudflareDefaultsand the twenty settings shapesevents,RequestCorrelationCloudflareEnv,CloudflareRequestMetadataMissingBindingErrorAuthor
Bayu Dwiyan Satria
Version
1.3.0
Since
1.0.0