Files
hyperframes/packages/cli/src/ui/progress.ts
T
Vance Ingalls 20be2ea1c2 style: apply oxfmt baseline formatting across all source files (#25)
## Summary
- Run `oxfmt .` across the entire codebase to establish formatted baseline
- 299 files changed — mechanical formatting only, no logic changes
- Double quotes, semicolons, 2-space indent, trailing commas, 100 print width

Part 3/4 of [VA-851](https://linear.app/heygen/issue/VA-851/pre-migration-configure-eslint-prettier-and-conventional-commits)

## Test plan
- [x] `pnpm format:check` — all 426 files pass
- [x] `pnpm -r typecheck` — all packages pass
- [x] `pnpm build` — all packages build
- [x] All 348 tests pass
2026-03-23 17:15:14 -07:00

19 lines
577 B
TypeScript

import { c } from "./colors.js";
const { stdout } = process;
export function renderProgress(percent: number, stage: string, row?: number): void {
const width = 25;
const filled = Math.floor(percent / (100 / width));
const empty = width - filled;
const bar = c.progress("\u2588".repeat(filled)) + c.dim("\u2591".repeat(empty));
const line = ` ${bar} ${c.bold(String(Math.round(percent)) + "%")} ${c.dim(stage)}`;
if (row !== undefined && stdout.isTTY) {
stdout.write(`\x1b[${row};1H\x1b[2K${line}`);
} else {
stdout.write(`\r\x1b[2K${line}`);
}
}