From d6e0c6d34449224ac3687daf551a0acfd15cee32 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 23 Feb 2026 15:11:36 +0900 Subject: refactor(cli): route command output through Console abstraction Replace direct println\!/eprintln\! calls with console.write(), console.info(), and console.write_stdout() across all command handlers to respect verbosity settings. Co-Authored-By: Claude Opus 4.6 --- crates/mozart/src/commands/dependency.rs | 70 ++++++++++++++++++++------------ 1 file changed, 45 insertions(+), 25 deletions(-) (limited to 'crates/mozart/src/commands/dependency.rs') diff --git a/crates/mozart/src/commands/dependency.rs b/crates/mozart/src/commands/dependency.rs index 0184f53..6dcaec8 100644 --- a/crates/mozart/src/commands/dependency.rs +++ b/crates/mozart/src/commands/dependency.rs @@ -519,9 +519,12 @@ fn sample_versions_from_constraint( /// Print results as a flat table. /// /// Columns: package name | version | link description | link constraint -pub fn print_table(results: &[DependencyResult]) { +pub fn print_table(results: &[DependencyResult], console: &mozart_core::console::Console) { if results.is_empty() { - println!("{}", mozart_core::console::info("No relationships found.")); + console.write_stdout( + &format!("{}", mozart_core::console::info("No relationships found.")), + mozart_core::console::Verbosity::Normal, + ); return; } @@ -551,15 +554,18 @@ pub fn print_table(results: &[DependencyResult]) { if !seen.insert(key) { continue; } - println!( - "{: