Latest Results
refactor: replace Pages class with composable Hono middleware architecture
Major architectural refactor of the rendering pipeline:
- Add 'path' field to RouteData (standard router path syntax like /blog/:slug)
generated at all creation sites via getRoutePath()
- Create standalone renderers: PageRenderer (uses createSSRResult + renderPage
directly), EndpointRenderer (uses renderEndpoint with APIContext from Hono
context), RedirectRenderer
- Create prepareForRender() shared orchestration function (query stripping,
pathname computation, component loading, RenderContext creation, cache,
error pages, session, response cleanup)
- Create ssr-result.ts with createSSRResult() and createAstroGlobal() extracted
from RenderContext
- Extract hono-app.ts factory: createAstroApp() and createAstroMiddleware()
accept deps as parameters, no virtual module dependency
- hono.ts is now a thin wrapper that pre-binds virtual module deps and exports
individual middleware: context(), astro(), pages(), actions(), redirects(),
rewrite(), i18n() — composable by users in src/app.ts
- createAstroMiddleware composes all middleware via nested Hono app
- Move form action execution into actions() Hono middleware
- Move user middleware into Hono userMiddleware() wrapper
- Move rewrite loop detection into rewrite() Hono middleware
- Move trailing slash redirects into Hono middleware
- Add URL normalization (security: double-slash collapse) in context factory
- BaseApp.render() auto-creates default Hono app via factory when no user
app is provided; production path uses setUserApp() from prod.ts
- Remove renderWithAstro, renderError, mergeResponses from BaseApp
- Remove Pages class entirely
- Delete pages.test.js (covered by App-level tests)
- Update all test route data to include path field
- Conditional middleware composition (redirects/i18n only when needed)
- Route sync via ASTRO_APP_DEPS symbol for dev module caching Latest Branches
0%
okxint:fix/style-case-sensitivity 0%
0%
remove-deprecated-cf-function © 2026 CodSpeed Technology