Unverified Commit 9a64794f authored by Hong Minhee's avatar Hong Minhee
Browse files

`fedify node` command

parent c9309d76
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -39,11 +39,13 @@ To be released.
     -  `new Service()` constructor now accepts `followedMessage` option.
     -  `Service.clone()` method now accepts `followedMessage` option.

 -  Add options for an AMQP driver to `fedify init` command.
 -  Added options for an AMQP driver to `fedify init` command.

     -  Added `amqp` value to the `-q`/`--message-queue` option of
        the `fedify init` command.

 -  Added `fedify node` subcommand.

 -  Added more log messages using the [LogTape] library.  Currently the below
    logger categories are used:

@@ -386,7 +388,7 @@ Released on September 26, 2024.
    it's terminated so that the peers can clean up data related to the temporary
    actor.  [[#135]]

 -  Add options for PostgreSQL drivers to `fedify init` command.
 -  Added options for PostgreSQL drivers to `fedify init` command.

     -  Added `postgres` value to the `-k`/`--kv-store` option of the `fedify
        init` command.
+3 −0
Original line number Diff line number Diff line
@@ -47,11 +47,14 @@
    "@cross/dir": "jsr:@cross/dir@^1.1.0",
    "@david/dax": "jsr:@david/dax@^0.41.0",
    "@hongminhee/localtunnel": "jsr:@hongminhee/localtunnel@^0.2.0",
    "@jimp/core": "npm:@jimp/core@^1.6.0",
    "@jimp/wasm-webp": "npm:@jimp/wasm-webp@^1.6.0",
    "@poppanator/http-constants": "npm:@poppanator/http-constants@^1.1.1",
    "@std/dotenv": "jsr:@std/dotenv@^0.225.2",
    "cli-highlight": "npm:cli-highlight@^2.1.11",
    "hono": "jsr:@hono/hono@^4.5.9",
    "hono/": "jsr:/@hono/hono@^4.5.9/",
    "jimp": "npm:jimp@^1.6.0",
    "json-preserve-indent": "npm:json-preserve-indent@^1.1.3",
    "ora": "npm:ora@^8.0.1",
    "shiki": "npm:shiki@^1.6.4"
+3 −0
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@
    "@cross/dir": "jsr:@cross/dir@^1.1.0",
    "@david/dax": "jsr:@david/dax@^0.41.0",
    "@hongminhee/localtunnel": "jsr:@hongminhee/localtunnel@^0.2.0",
    "@jimp/core": "npm:@jimp/core@^1.6.0",
    "@jimp/wasm-webp": "npm:@jimp/wasm-webp@^1.6.0",
    "@logtape/logtape": "jsr:@logtape/logtape@^0.6.2",
    "@poppanator/http-constants": "npm:@poppanator/http-constants@^1.1.1",
    "@std/dotenv": "jsr:@std/dotenv@^0.225.2",
@@ -16,6 +18,7 @@
    "cli-highlight": "npm:cli-highlight@^2.1.11",
    "hono": "jsr:@hono/hono@^4.5.9",
    "hono/": "jsr:/@hono/hono@^4.5.9/",
    "jimp": "npm:jimp@^1.6.0",
    "json-preserve-indent": "npm:json-preserve-indent@^1.1.3",
    "ora": "npm:ora@^8.0.1",
    "shiki": "npm:shiki@^1.6.4"
+1 −6
Original line number Diff line number Diff line
@@ -9,10 +9,10 @@ import {
  type ResourceDescriptor,
  respondWithObject,
} from "@fedify/fedify";
import { highlight } from "cli-highlight";
import ora from "ora";
import { getContextLoader, getDocumentLoader } from "./docloader.ts";
import { spawnTemporaryServer, type TemporaryServer } from "./tempserver.ts";
import { printJson } from "./utils.ts";

export const command = new Command()
  .arguments("<url:string>")
@@ -114,8 +114,3 @@ export const command = new Command()
      await server?.close();
    }
  });

function printJson(json: unknown): void {
  const formatted = JSON.stringify(json, null, 2);
  console.log(highlight(formatted, { language: "json" }));
}
+2 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ import { command as inbox } from "./inbox.tsx";
import { command as init } from "./init.ts";
import { recordingSink } from "./log.ts";
import { command as lookup } from "./lookup.ts";
import { command as node } from "./node.ts";
import { command as tunnel } from "./tunnel.ts";

const command = new Command()
@@ -47,6 +48,7 @@ const command = new Command()
  .command("init", init)
  .command("lookup", lookup)
  .command("inbox", inbox)
  .command("node", node)
  .command("tunnel", tunnel)
  .command("completions", new CompletionsCommand())
  .command("help", new HelpCommand().global());
Loading