Unverified Commit e1d199d3 authored by Hong Minhee's avatar Hong Minhee
Browse files

Export more symbols from nodeinfo

parent fc3a3707
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
  },
  "cSpell.words": [
    "activitypub",
    "apidoc",
    "bccs",
    "btos",
    "cfworker",
+7 −0
Original line number Diff line number Diff line
@@ -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
+1 −0
Original line number Diff line number Diff line
@@ -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"
+2 −2
Original line number Diff line number Diff line
@@ -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}.
@@ -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;" +
+1 −1
Original line number Diff line number Diff line
@@ -4,4 +4,4 @@
 *
 * @module
 */
export { type NodeInfo } from "./types.ts";
export * from "./types.ts";
Loading