feat: add click-based colorized output with progress events and build timer

- Add click as explicit dependency (already bundled with typer)
- Replace typer.echo calls with click.echo + click.style for colorized output
- Add BuildEvent enum and ProgressCallback to builder for decoupled progress reporting
- Remove direct typer dependency from builder module
- Show per-target status with colored labels (skip/ok/fail/...)
- Display elapsed build time in summary
- Colorize graph and clean command output
- Update CLI tests to match new output format
This commit is contained in:
Konstantin Fickel 2026-02-14 21:25:38 +01:00
parent 6a9d7efd5d
commit ee6c411f3c
Signed by: kfickel
GPG key ID: A793722F9933C1A5
5 changed files with 141 additions and 26 deletions

View file

@ -77,7 +77,7 @@ class TestBuildCommand:
result = runner.invoke(app, ["build"])
assert result.exit_code == 0
assert "Built 2 target(s)" in result.output
assert "2 built" in result.output
def test_build_with_skipped(self, cli_project: Path) -> None:
build_result = BuildResult(
@ -95,7 +95,7 @@ class TestBuildCommand:
result = runner.invoke(app, ["build"])
assert result.exit_code == 0
assert "Skipped 2 target(s) (up to date)" in result.output
assert "2 skipped" in result.output
def test_build_with_failures(self, cli_project: Path) -> None:
build_result = BuildResult(
@ -115,7 +115,7 @@ class TestBuildCommand:
result = runner.invoke(app, ["build"])
assert result.exit_code == 1
assert "Failed 1 target(s)" in result.output
assert "1 failed" in result.output
def test_build_specific_target(self, cli_project: Path) -> None:
build_result = BuildResult(built=["output.txt"], skipped=[], failed={})