CodeVetter · Repo Unpack · System map
honojs/hono
The public entrypoint exports Hono and supporting types, while HonoBase owns registration and dispatch. Request and Context wrap standard web objects, and runtime adapters translate platform boundaries. Storage behavior inspected here belongs to optional cache and SSG facilities. Distribution includes npm ESM/CJS/declarations, JSR source exports, and separate adapter packages.
- src/index.ts exports Hono, Context, HonoRequest types, handler/environment types, and typed client inference utilities.
- The default Hono extends HonoBase and uses SmartRouter with RegExpRouter followed by TrieRouter unless options.router is supplied.
- HonoBase supplies dynamically initialized HTTP method registration, on(), use(), route metadata, and the fetch application boundary.
- Context owns bindings, request-local variable storage, response state and execution context; it lazily constructs HonoRequest.
- The root package distributes dist with ESM, CommonJS and declaration entrypoints; Vite emits these as three unbundled outputs.
- The pnpm workspace contains the root and adapters packages; @hono/aws-lambda and @hono/bun expose ESM dist entrypoints and require hono >=4.13.9 as a peer.
- Optional persistence uses the runtime Cache API for responses and an injected FileSystemModule for generated files.
- Root scripts define type-check-plus-Vitest testing, runtime-specific tests, adapter tests, and Vite-plus packaging with publint.
- Release automation distinguishes v* root tags from @hono/* adapter tags, stages npm publication with provenance, and separately publishes JSR packages.