pub mod display;
pub mod style;
pub use display::{PlainDisplay, TtyDisplay};
pub use style::Theme;
use crate::pipeline::StepResult;
use std::path::{Path, PathBuf};
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
pub enum Verbosity {
Quiet,
Normal,
Verbose,
Debug,
}
pub struct DisplayConfig {
pub is_tty: bool,
pub no_clear: bool,
pub verbosity: Verbosity,
}
pub enum BrowseAction {
Noop,
Redraw,
Quit,
Rerun,
RerunFailed,
}
pub trait Display: Send {
fn run_started(&mut self, step_names: &[String]);
fn step_running(&mut self, name: &str);
fn step_finished(&mut self, result: &StepResult);
fn steps_skipped(&mut self, names: &[String]);
fn run_cancelled(&mut self);
fn run_finished(&mut self, results: &[StepResult]);
fn set_trigger(&mut self, _paths: &[PathBuf]) {}
fn banner(&mut self, _root: &Path, _config_path: &Path, _step_count: usize) {}
fn tick(&mut self) {}
fn enter_browse_mode(&mut self) {}
fn exit_browse_mode(&mut self) {}
fn handle_key(&mut self, _key: crossterm::event::KeyEvent) -> BrowseAction {
BrowseAction::Noop
}
fn browse_redraw_if_active(&mut self) {}
fn hook_output(&mut self, _text: &str) {}
fn hook_started(&mut self) {}
fn hook_finished(&mut self) {}
}