Skip to main content
Home
This release is 1 version behind 1.6.2 — the latest version of @fedify/fedify. Jump to latest

Built and signed on GitHub Actions

An ActivityPub/fediverse server framework

This package works with Node.js, Deno, Bun
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
94%
Published
2 weeks ago (1.6.1)
interface Federation

An object that registers federation-related business logic and dispatches requests to the appropriate handlers.

It also provides a middleware interface for handling requests before your web framework's router; see Federation.fetch.

Type Parameters

TContextData

The context data to pass to the Context.

Methods

Manually start the task queue.

This method is useful when you set the manuallyStartQueue option to true in the createFederation function.

processQueuedTask(
contextData: TContextData,
message: Message,
): Promise<void>

Processes a queued message task. This method handles different types of tasks such as fanout, outbox, and inbox messages.

Note that you usually do not need to call this method directly unless you are deploying your federated application on a platform that does not support long-running processing, such as Cloudflare Workers.

Create a new context.

Create a new context for a request.

Handles a request related to federation. If a request is not related to federation, the onNotFound or onNotAcceptable callback is called.

Usually, this method is called from a server's request handler or a web framework's middleware.

New Ticket: 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/fedify

Import symbol

import { type Federation } from "@fedify/fedify/federation";
or

Import directly with a jsr specifier

import { type Federation } from "jsr:@fedify/fedify/federation";

Add Package

pnpm i jsr:@fedify/fedify
or (using pnpm 10.8 or older)
pnpm dlx jsr add @fedify/fedify

Import symbol

import { type Federation } from "@fedify/fedify/federation";

Add Package

yarn add jsr:@fedify/fedify
or (using Yarn 4.8 or older)
yarn dlx jsr add @fedify/fedify

Import symbol

import { type Federation } from "@fedify/fedify/federation";

Add Package

vlt install jsr:@fedify/fedify

Import symbol

import { type Federation } from "@fedify/fedify/federation";

Add Package

npx jsr add @fedify/fedify

Import symbol

import { type Federation } from "@fedify/fedify/federation";

Add Package

bunx jsr add @fedify/fedify

Import symbol

import { type Federation } from "@fedify/fedify/federation";