runRevert
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 revert.
import { routeRevert } from "#codebase/tcmts/cli/commands"; import { chooseReset, execute } from "#codebase/tcmts/cli/main"; import { revertEntry } from "#codebase/tcmts/cli/merge"; import type { Context } from "#codebase/tcmts/cli/run"; import { parse } from "@bomb.sh/router"; export async function runRevert({ cb, cmd, rest }: Context): Promise<number> { const { model } = execute(cmd, parse(routeRevert(), { argv: rest })); const r = revertEntry(cb, model.entry ?? (await chooseReset(cb))); return r.conflicts.length ? 1 : 0; }
uses
- tcmts.cli.commands.routeRevert
- tcmts.cli.main.chooseReset
- tcmts.cli.main.execute
- tcmts.cli.merge.revertEntry
- tcmts.cli.run.Context