2026-08-07 — src/ moved onto the library template's layout
bindings/ and services/ were sitting at the top of src/, beside constants/, exceptions/, types/, and
utils/. The library template puts a library's own code under core/ and keeps those four as its only siblings, so
this repository was reading as a layout of its own rather than the house one.
Moved
| From | To |
|---|---|
src/bindings/ |
src/core/bindings/ |
src/services/ |
src/core/services/ |
test/bindings/ |
test/core/bindings/ |
test/services/ |
test/core/services/ |
Added src/core/index.ts, the barrel for the domain layer, carrying the one-way import table the template's own
core/index.ts carries.
middlewares/ stayed where it was. It is a second published entry, and the only directory allowed to import hono —
keeping it beside core/ rather than inside it means the directory boundary and the package boundary are the same line,
which is what the ESLint rule already keys on.
Nothing about the public API moved: src/index.ts re-exports the same names, and @bayudwiyansatria/cloudflare and
@bayudwiyansatria/cloudflare/middlewares resolve exactly as before. Internally, @/bindings/* and @/services/*
became @/core/bindings/* and @/core/services/* — 49 import specifiers.
Documentation caught up
docs/reference/bindings.md was folded in from the application this package was extracted from and had never had its
paths rewritten. It still described src/core/cloudflare/bindings/, src/core/system/config/, and src/services/, and
linked to three pages that do not exist here — architecture/overview.md, request-flow.md, configuration.md. Its
"Adding a binding of your own" walkthrough also showed resolve() being called from a constructor default, which is
exactly the pattern that made the package unimportable a day earlier. All of it now matches the code: settings in
types/, defaults in constants/Defaults.ts, and the accessor taking its name through lazySettings.
AGENTS.md and docs/reference/directory-structure.md were updated for the new layout, along with two stale paths in
AGENTS.md pointing at src/config/lazySettings.ts and test/config/lazySettings.spec.ts, which have lived under
utils/ since the restructure.
README.md gained the standard section spine — Overview, what is included, project structure, available scripts, the
docs site, governance, authors, licence — and docker/docker-compose.docs.yaml was still naming its project, image, and
container after the template it was forked from.
Aligned with the kernel
@bayudwiyansatria/core 1.0.0 shipped a rule for grouping inside a layer, and this package now follows it: a subject
with more than one shape to its name gets a directory; a lone shape stays flat.
| Moved | To |
|---|---|
D1Settings.ts, D1Statement.ts, D1WriteResult.ts |
types/d1/ |
HyperdriveSettings.ts, HyperdriveCredentials.ts |
types/hyperdrive/ |
The other nine settings shapes stay flat — AISettings is the only AI shape there is. Exported names are unchanged;
@/types still resolves all of them.
The packaging scripts were aligned too:
build:coverage→build:docs:coverage. It only ever existed forbuild:static, and the old name suggested it built the library.build:staticno longer runsnpm run buildfirst. Nothing the site serves comes out oflib/— TypeDoc readssrc/, HonKit readsdocs/, Jest reads both.build:allstill runs the library build.docker/docs.Dockerfilefollows:build:docs,build:docs:coverage,build:docs:book, with the Rollup step gone. The image is still gated on the tests and on TypeDoc's validation.docker/nginx/index.htmlwas still the template's landing page — title, description, keywords, Open Graph, Twitter card, and three JSON-LD blocks all naming the inherited scaffold. Rewritten for this package.- Added
wrangler.json, matching the kernel's: a Pages config for the documentation site indist/, not for the package. Its binding arrays are empty — a docs site binds nothing.
Verification
Lint, typecheck, 47 specs across four suites, both build entries with the externality assertion, the TypeDoc gate, and the HonKit book all pass. The gate is what caught the relative documentation links whose depth changed in the move.