main

tcmts.cli.main.main · #d7klyild · term · runs on the server

uses process

import { dispatch, Printed } from "#codebase/tcmts/cli/main";

export async function main(argv: string[]): Promise<number> {
  // code from the codebase that runs in this process (server functions under tcm dev, say) reports errors at
  // its definitions, not its generated modules
  process.setSourceMapsEnabled(true);
  try {
    return await dispatch(argv);
  } catch (e) {
    if (!(e instanceof Printed)) throw e;
    console.log(e.text);
    return 0;
  }
}

uses

used by