Skip to main content

@fedify/h3@2.2.0
Built and signed on GitHub Actions

Works with
This package works with Node.js, Deno, BunIt is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score100%
License
MIT
Downloads4/wk
Publisheda week ago (2.2.0)

Integrate Fedify with h3

Functions

f
integrateFederation<TContextData>(
federation: Federation<TContextData>,
contextDataFactory: ContextDataFactory<TContextData>
): EventHandler<EventHandlerRequest, EventHandlerResponse>

Integrates a Federation instance with an H3 handler.

f
onError(
error: H3Error<unknown>,
event: H3Event<EventHandlerResponse>
): Promise<void>

An error handler that responds with a 406 Not Acceptable if Fedify responded with a 406 Not Acceptable and the actual handler responded with a 404 Not Found.

Type Aliases

T
ContextDataFactory<TContextData> = (
event: H3Event<EventHandlerRequest>,
request: Request
) => Promise<TContextData> | TContextData

A factory function that creates the context data that will be passed to the Federation instance.

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@fedify/h3

Import symbol

import * as mod from "@fedify/h3";
or

Import directly with a jsr specifier

import * as mod from "jsr:@fedify/h3";