Loading .vscode/settings.json +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ }, "cSpell.words": [ "activitypub", "apidoc", "bccs", "btos", "cfworker", Loading CHANGES.md +7 −0 Original line number Diff line number Diff line Loading @@ -14,7 +14,14 @@ To be released. - Added `Federation.setNodeInfoDispatcher()` method. - Added `Context.getNodeInfoUri()` method. - Added `NodeInfo` interface. - Added `Software` interface. - Added `Protocol` type. - Added `Services` interface. - Added `InboundService` type. - Added `OutboundService` type. - Added `Usage` interface. - Added `NodeInfoDispatcher` type. - Added `nodeInfoToJson()` function. [NodeInfo]: https://nodeinfo.diaspora.software/ [#1]: https://github.com/dahlia/fedify/issues/1 Loading deno.json +1 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ ".": "./mod.ts", "./federation": "./federation/mod.ts", "./httpsig": "./httpsig/mod.ts", "./nodeinfo": "./nodeinfo/mod.ts", "./runtime": "./runtime/mod.ts", "./vocab": "./vocab/mod.ts", "./webfinger": "./webfinger/mod.ts" Loading nodeinfo/handler.ts +2 −2 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ import { NodeInfoDispatcher } from "../federation/callback.ts"; import { RequestContext } from "../federation/context.ts"; import { RouterError } from "../federation/router.ts"; import { Link, ResourceDescriptor } from "../webfinger/jrd.ts"; import { toJson } from "./types.ts"; import { nodeInfoToJson } from "./types.ts"; /** * Parameters for {@link handleNodeInfo}. Loading Loading @@ -32,7 +32,7 @@ export async function handleNodeInfo<TContextData>( ): Promise<Response> { const promise = nodeInfoDispatcher(context); const nodeInfo = promise instanceof Promise ? await promise : promise; const json = toJson(nodeInfo); const json = nodeInfoToJson(nodeInfo); return new Response(JSON.stringify(json), { headers: { "Content-Type": "application/json;" + Loading nodeinfo/mod.ts +1 −1 Original line number Diff line number Diff line Loading @@ -4,4 +4,4 @@ * * @module */ export { type NodeInfo } from "./types.ts"; export * from "./types.ts"; Loading
.vscode/settings.json +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ }, "cSpell.words": [ "activitypub", "apidoc", "bccs", "btos", "cfworker", Loading
CHANGES.md +7 −0 Original line number Diff line number Diff line Loading @@ -14,7 +14,14 @@ To be released. - Added `Federation.setNodeInfoDispatcher()` method. - Added `Context.getNodeInfoUri()` method. - Added `NodeInfo` interface. - Added `Software` interface. - Added `Protocol` type. - Added `Services` interface. - Added `InboundService` type. - Added `OutboundService` type. - Added `Usage` interface. - Added `NodeInfoDispatcher` type. - Added `nodeInfoToJson()` function. [NodeInfo]: https://nodeinfo.diaspora.software/ [#1]: https://github.com/dahlia/fedify/issues/1 Loading
deno.json +1 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ ".": "./mod.ts", "./federation": "./federation/mod.ts", "./httpsig": "./httpsig/mod.ts", "./nodeinfo": "./nodeinfo/mod.ts", "./runtime": "./runtime/mod.ts", "./vocab": "./vocab/mod.ts", "./webfinger": "./webfinger/mod.ts" Loading
nodeinfo/handler.ts +2 −2 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ import { NodeInfoDispatcher } from "../federation/callback.ts"; import { RequestContext } from "../federation/context.ts"; import { RouterError } from "../federation/router.ts"; import { Link, ResourceDescriptor } from "../webfinger/jrd.ts"; import { toJson } from "./types.ts"; import { nodeInfoToJson } from "./types.ts"; /** * Parameters for {@link handleNodeInfo}. Loading Loading @@ -32,7 +32,7 @@ export async function handleNodeInfo<TContextData>( ): Promise<Response> { const promise = nodeInfoDispatcher(context); const nodeInfo = promise instanceof Promise ? await promise : promise; const json = toJson(nodeInfo); const json = nodeInfoToJson(nodeInfo); return new Response(JSON.stringify(json), { headers: { "Content-Type": "application/json;" + Loading
nodeinfo/mod.ts +1 −1 Original line number Diff line number Diff line Loading @@ -4,4 +4,4 @@ * * @module */ export { type NodeInfo } from "./types.ts"; export * from "./types.ts";