Skip to content

v2.6.1

Latest

Choose a tag to compare

@github-actions github-actions released this 22 Sep 09:19

serverstruct

2.6.0

Minor Changes

  • dbab422: Add onStart and onRequestOk hooks to traceMiddleware, and a ctx.durationMs argument measuring request duration on onRequestOk/onRequestError/onRequestEnd.

2.5.0

Minor Changes

  • 661e845: Add hooks option to traceMiddleware (onRequestStart, onRequestEnd, onRequestError) so callers can hook other instrumentation, like metrics or logging, into the request span lifecycle.
  • 22e82a3: Add skip option to traceMiddleware to bypass tracing entirely for matching requests.

2.4.2

Patch Changes

  • a9f6363: Fix traceMiddleware marking spans as errors for thrown 4xx HTTPErrors instead of only 5xx. Spans are also now named {method} {route} instead of {method} {pathname}.

2.4.1

Patch Changes

  • 4e44f03: Render the Scalar API reference as trusted HTML with current H3 releases.

2.4.0

Minor Changes

  • f2e152b: Add route options for router.document docs and reference routes

2.3.0

Minor Changes

  • 09841cf: Add custom error message for missing context value
  • 9121a54: Add schemas() for defining route schemas

2.2.0

Minor Changes

  • 8687fd7: Support router.mount() mounting multiple sub-apps at once using box

2.1.0

Minor Changes

  • 45cd71f: Add router.document() for serving OpenAPI docs

2.0.0

Major Changes

  • 3aadc73: Remove deprecated OpenApiPaths.routes() — use router.route() instead
  • 3aadc73: Remove deprecated createRouter — use useRouter instead
  • 3aadc73: Upgrade to getbox@v2

1.4.0

Minor Changes

  • 597d6f1: Replace OpenApiPaths.routes with OpenApiRouter.route and deprecate OpenApiPaths.routes
  • 597d6f1: Replace createRouter with useRouter and deprecate createRouter

1.3.0

Minor Changes

  • 11e53bd: Add route function for defining standalone OpenAPI routes

Patch Changes

  • a97a191: Use transient for controller, handler, eventHandler, middleware and route constructors

1.2.0

Minor Changes

  • 0031700: Add OpenAPI Integration
  • 0031700: Add OpenTelemetry Integration
  • 0031700: Re-export serve function H3

1.1.0

Minor Changes

  • 2d657d5: Add handler, eventHandler and middleware functions

    Add request-scoped Context with the context function.

1.0.0

Major Changes

0.4.0

Minor Changes

  • 84d056e: Migrate from hono and hollywood-di to h3 and getbox.

    Replace createModule() with application(fn, box?) and controller(fn).

0.3.0

Minor Changes

  • bffca37: Rename createRoute to createModule

0.2.0

Minor Changes

  • fa4e3da: Replace createController/createModule API with createRoute

0.1.1

Patch Changes

  • 609146c: Bump CI node version to v18