Started

tcmts.cli.run.Started · #5zy3x4gk · type

What every command's handler is given (dispatch works it out, then calls the command's handler, from handlers), before the codebase is opened.

export interface Started {
  /** the command, as typed: a handler for several tells them apart by it */
  cmd: string;
  /** its arguments, after its name */
  rest: string[];
  /** where tcm was started */
  cwd: string;
  /** a scratch file's path (a session's are in its directory; with none given, the codebase's scratch.ts) */
  scratch: (f?: string, fallback?: string) => string;
  /** where the kept builds are (tcm's repository's dist/), if anywhere */
  kept: string | undefined;
  /** this tcm's hash: `dispatch`'s own, which covers every command */
  tcmHash: string | undefined;
}

used by