showInstallProgress
uses @clack/prompts's exports, which uses node:fs
Package installs (which tcm runs as it needs them) as spinners on a terminal, not lines of text.
import { setProgress } from "#codebase/tcmts/loader/packages"; import * as p from "@clack/prompts"; export function showInstallProgress() { if (!process.stderr.isTTY || process.env.CI) return; setProgress({ start(message) { // the install blocks the event loop, so no animation or timer: the line, then what happened and how long it took const s = p.spinner({ output: process.stderr, withGuide: false }); s.start(message); return { stop: (done) => s.stop(done), fail: (why) => s.error(why) }; }, }); }