Skip to content

@xtandard/kit/adapters/hono

@xtandard/kit/adapters/hono — mount a panel on a Hono app, and read waitUntil safely on every runtime (no runtime hono import).

Optional peer: hono (the app is passed in).

import { … } from "@xtandard/kit/adapters/hono";
Name Summary
mountPanel Route path (default "*", everything) to fetch on app, for every method. Returns the app, so it chains. With a sub-path, mount both the path and everything below it: mountPanel(app, fetch, "/webhooks").
toHonoHandler A Hono handler that forwards the raw request to fetch.
waitUntilOf The context’s waitUntil, bound and safe to call, or undefined on runtimes without one. Hono’s c.executionCtx getter throws outside Workers, and waitUntil must be called as a method (li bf20268), so read it here.
Name Summary
HonoAppLike The part of a Hono app mountPanel uses.
HonoContextLike The part of a Hono context the helpers read.
WaitUntil Something that can keep work alive past the response (Workers’ ExecutionContext).