Loading CHANGES.md +11 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,15 @@ To be released. - The `Context.sendActivity()` method's first parameter now accepts `SenderKeyPair[]` as well. - In the future, `Federation` class will become an interface. For the forward compatibility, the following changes are made: - Added `createFederation()` function. - Added `CreateFederationOptions` interface. - Deprecated `new Federation()` constructor. Use `createFederation()` function instead. - Deprecated `FederationParameters` interface. - Added `Arrive` class to Activity Vocabulary API. [[#65], [#68] by Randy Wressell] Loading Loading @@ -718,3 +727,5 @@ Version 0.1.0 ------------- Initial release. Released on March 8, 2024. <!-- cSpell: ignore Wressell --> cli/inbox.tsx +2 −2 Original line number Diff line number Diff line Loading @@ -7,8 +7,8 @@ import { type Actor, Application, type Context, createFederation, Endpoints, Federation, Follow, generateCryptoKeyPair, getActorHandle, Loading Loading @@ -111,7 +111,7 @@ export const command = new Command() printServerInfo(fedCtx); }); const federation = new Federation<number>({ const federation = createFederation<number>({ kv: new MemoryKvStore(), queue: new InProcessMessageQueue(), documentLoader: await getDocumentLoader(), Loading docs/manual/actor.md +2 −2 Original line number Diff line number Diff line Loading @@ -33,9 +33,9 @@ the following: The below example shows how to register an actor dispatcher: ~~~~ typescript{7-15} import { Federation, Person } from "@fedify/fedify"; import { createFederation, Person } from "@fedify/fedify"; const federation = new Federation({ const federation = createFederation({ // Omitted for brevity; see the related section for details. }); Loading docs/manual/federation.md +4 −4 Original line number Diff line number Diff line Loading @@ -22,13 +22,13 @@ The key features of the `Federation` object are as follows: - Maintaining a queue of [outgoing activities](./send.md) - Registering a [NodeInfo dispatcher](./nodeinfo.md) You can create a `Federation` object by calling the constructor function with an optional configuration object: You can create a `Federation` object by calling `createFederation()` function with a configuration object: ~~~~ typescript import { Federation, MemoryKvStore } from "@fedify/fedify"; import { createFederation, MemoryKvStore } from "@fedify/fedify"; const federation = new Federation<void>({ const federation = createFederation<void>({ kv: new MemoryKvStore(), // Omitted for brevity; see the following sections for details. }); Loading docs/manual/inbox.md +3 −3 Original line number Diff line number Diff line Loading @@ -34,9 +34,9 @@ With Fedify, you can register an inbox listener for both types of inboxes at a time. The following shows how to register an inbox listener: ~~~~ typescript{7-18} import { Federation, Follow } from "@fedify/fedify"; import { createFederation, Follow } from "@fedify/fedify"; const federation = new Federation({ const federation = createFederation({ // Omitted for brevity; see the related section for details. }); Loading Loading @@ -85,7 +85,7 @@ multiple inbox listeners for different activity types. The `Context.documentLoader` property carries a `DocumentLoader` object that you can use to fetch a remote document. If a request is made to a shared inbox, the `Context.documentLoader` property is set to the default `documentLoader` that is specified in the `new Federation()` constructor. However, if a request that is specified in the `createFederation()` function. However, if a request is made to a personal inbox, the `Context.documentLoader` property is set to an authenticated `DocumentLoader` object that is identified by the inbox owner's key. Loading Loading
CHANGES.md +11 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,15 @@ To be released. - The `Context.sendActivity()` method's first parameter now accepts `SenderKeyPair[]` as well. - In the future, `Federation` class will become an interface. For the forward compatibility, the following changes are made: - Added `createFederation()` function. - Added `CreateFederationOptions` interface. - Deprecated `new Federation()` constructor. Use `createFederation()` function instead. - Deprecated `FederationParameters` interface. - Added `Arrive` class to Activity Vocabulary API. [[#65], [#68] by Randy Wressell] Loading Loading @@ -718,3 +727,5 @@ Version 0.1.0 ------------- Initial release. Released on March 8, 2024. <!-- cSpell: ignore Wressell -->
cli/inbox.tsx +2 −2 Original line number Diff line number Diff line Loading @@ -7,8 +7,8 @@ import { type Actor, Application, type Context, createFederation, Endpoints, Federation, Follow, generateCryptoKeyPair, getActorHandle, Loading Loading @@ -111,7 +111,7 @@ export const command = new Command() printServerInfo(fedCtx); }); const federation = new Federation<number>({ const federation = createFederation<number>({ kv: new MemoryKvStore(), queue: new InProcessMessageQueue(), documentLoader: await getDocumentLoader(), Loading
docs/manual/actor.md +2 −2 Original line number Diff line number Diff line Loading @@ -33,9 +33,9 @@ the following: The below example shows how to register an actor dispatcher: ~~~~ typescript{7-15} import { Federation, Person } from "@fedify/fedify"; import { createFederation, Person } from "@fedify/fedify"; const federation = new Federation({ const federation = createFederation({ // Omitted for brevity; see the related section for details. }); Loading
docs/manual/federation.md +4 −4 Original line number Diff line number Diff line Loading @@ -22,13 +22,13 @@ The key features of the `Federation` object are as follows: - Maintaining a queue of [outgoing activities](./send.md) - Registering a [NodeInfo dispatcher](./nodeinfo.md) You can create a `Federation` object by calling the constructor function with an optional configuration object: You can create a `Federation` object by calling `createFederation()` function with a configuration object: ~~~~ typescript import { Federation, MemoryKvStore } from "@fedify/fedify"; import { createFederation, MemoryKvStore } from "@fedify/fedify"; const federation = new Federation<void>({ const federation = createFederation<void>({ kv: new MemoryKvStore(), // Omitted for brevity; see the following sections for details. }); Loading
docs/manual/inbox.md +3 −3 Original line number Diff line number Diff line Loading @@ -34,9 +34,9 @@ With Fedify, you can register an inbox listener for both types of inboxes at a time. The following shows how to register an inbox listener: ~~~~ typescript{7-18} import { Federation, Follow } from "@fedify/fedify"; import { createFederation, Follow } from "@fedify/fedify"; const federation = new Federation({ const federation = createFederation({ // Omitted for brevity; see the related section for details. }); Loading Loading @@ -85,7 +85,7 @@ multiple inbox listeners for different activity types. The `Context.documentLoader` property carries a `DocumentLoader` object that you can use to fetch a remote document. If a request is made to a shared inbox, the `Context.documentLoader` property is set to the default `documentLoader` that is specified in the `new Federation()` constructor. However, if a request that is specified in the `createFederation()` function. However, if a request is made to a personal inbox, the `Context.documentLoader` property is set to an authenticated `DocumentLoader` object that is identified by the inbox owner's key. Loading