Skip to main content

Crate typub_ui

Crate typub_ui 

Source
Expand description

Unified UI module for CLI output

Following rust-cli standards:

  • Data → stdout, logs/errors → stderr
  • Respects NO_COLOR environment variable
  • TTY detection before coloring
  • Uses owo-colors for styling
  • Uses indicatif for progress bars

Per [[ADR-0004]], this crate re-exports typub-log for convenience and provides IndicatifReporter implementing ProgressReporter.

Modules§

i18n

Macros§

debug
Constructs an event at the debug level.
error
Constructs an event at the error level.
info
Constructs an event at the info level.
trace
Constructs an event at the trace level.
warn
Constructs an event at the warn level.

Structs§

FnReporter
A progress reporter that wraps a closure.
IndicatifReporter
A progress reporter using indicatif progress bars.
MultiProgress
Progress tracker for multi-step operations
NullReporter
A progress reporter that discards all reports.
Table
Print a simple table (data goes to stdout)

Traits§

ProgressReporter
Trait for reporting progress during long-running operations.

Functions§

debug
Print a debug message (only in verbose mode, to stderr)
error
Print an error message (to stderr)
header
Print a header/section title (to stderr)
info
Print an info message (to stderr for logging)
init
Initialize the CLI logging subscriber.
is_verbose
Check if verbose mode is enabled
item
Print a sub-item with label and value (to stderr)
log_asset_analysis
Display asset analysis in a formatted table.
log_dry_run
Log dry run
log_publish_start
Log start of publish operation
log_publish_success
Log successful publish
log_skip
Log skipped operation
platform_status
Print platform status line (to stderr)
progress_bar
Create a progress bar for known-length operations
spinner
Create a spinner for operations with unknown duration
spinner_error
Finish spinner with error
spinner_success
Finish spinner with success
step
Print a step in a multi-step process (to stderr)
success
Print a success message (to stderr for logging)
warn
Print a warning message (to stderr)