runFind

tcmts.cli.run.runFind · #rvctb6md · term · runs on the server

uses tcmts.cli.main.execute, which uses tcmts.cli.help.usageError, which uses tcmts.cli.help.usageOf, which uses tcmts.cli.style.bold, which uses node:util

Runs tcm find.

import { routeFind } from "#codebase/tcmts/cli/commands";
import { execute, find } from "#codebase/tcmts/cli/main";
import type { Context } from "#codebase/tcmts/cli/run";
import { ask } from "#codebase/tcmts/cli/ui";
import { parse } from "@bomb.sh/router";

export async function runFind({ cb, cmd, rest }: Context): Promise<number> {
  const { model } = execute(cmd, parse(routeFind(), { argv: rest }));
  find(
    cb,
    model.query.length
      ? model.query.join(" ")
      : await ask("find <query>", "Search for", "a name, or :<type> like :(xs: T[]) => T"),
  );
  return 0;
}

uses

used by