Skip to content

Support multiple URLs for -t/--traverse in cli command fedify lookup #408

@sij411

Description

@sij411

Summary

Implements multiple URLs support for -t/--traverse option in fedify lookup.

Problem

fedify lookup --traverse only fetches single collection url.

Proposed Solution

In line 278,

 // FIXME: Implement -t, --traverse when multiple URLs are provided
  if (command.urls.length < 1) {
    printError(message`At least one URL or actor handle must be provided.`);
    process.exit(1);
  } else if (command.traverse && command.urls.length > 1) {
    printError(
      message`The -t/--traverse option cannot be used with multiple arguments.`,
    );
    process.exit(1);
  }

modify this block to not to throw error when traverse option and multiple urls are given.

In line 390-474,

  if (command.traverse) {
    const url = command.urls[0];
    let collection: APObject | null;

modify the block to fetch objects from each given urls.

Alternatives Considered

No response

Scope / Dependencies

packages/cli/src/lookup.ts

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions