Commit 078398c3 authored by ChanHaeng Lee's avatar ChanHaeng Lee
Browse files

Improve `fedify webfinger` command to take multiple inputs

parent cd3035ec
Loading
Loading
Loading
Loading
+23 −21
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ import ora from "ora";
import { printJson } from "./utils.ts";

export const command = new Command()
  .arguments("<resource:string>")
  .arguments("<...resources:string>")
  .description(
    "Look up a WebFinger resource by resource. The argument can be multiple.",
  )
@@ -17,7 +17,8 @@ export const command = new Command()
    "-p, --allow-private-address",
    "Allow private IP addresses in the URL.",
  )
  .action(async (options, resource: string) => {
  .action(async (options, ...resources: string[]) => {
    for (const resource of resources) {
      const spinner = ora({ // Create a spinner for the lookup process
        text: `Looking up WebFinger for ${resource}`,
        discardStdin: false,
@@ -40,6 +41,7 @@ export const command = new Command()
          );
        }
      }
    }
  });

/**