Commit 6af58cf0 authored by Hasang Cho's avatar Hasang Cho
Browse files

fix(nodeinfo.ts): use formatObjectForOutput instead of Deno.inspect to change color settings

parent 6402dd6f
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ import * as colors from "@std/fmt/colors";
import { isICO, parseICO } from "icojs";
import { defaultFormats, defaultPlugins, intToRGBA } from "jimp";
import ora from "ora";
import { formatObjectForOutput } from "./mod.ts";
import { printJson } from "./utils.ts";

const logger = getLogger(["fedify", "cli", "nodeinfo"]);
@@ -212,9 +213,7 @@ export const command = new Command()
      for (const [key, value] of Object.entries(nodeInfo.metadata)) {
        layout[next()] += `  ${colors.dim(key + ":")} ${
          indent(
            typeof value === "string"
              ? value
              : Deno.inspect(value, { colors: true }),
            typeof value === "string" ? value : formatObjectForOutput(value),
            defaultWidth + 4 + key.length,
          )
        }`;