euv-cli 0.50.0

Cross-platform CLI tool for the euv native UI framework supporting run, build, check, fmt, doctor, new, and Hyperlane SSE dynamic updates across all supported platforms.
Documentation
use super::*;

/// Execution options for `euv clean`.
#[derive(Clone, Data, Debug, Eq, New, PartialEq)]
pub struct CleanOptions {
    /// Project or workspace root directory to clean.
    pub(crate) root_dir: PathBuf,
    /// Whether to also execute `cargo clean` for the project target directory.
    #[get(type(copy))]
    pub(crate) all: bool,
    /// When `true`, computes reclaimable bytes without removing files.
    #[get(type(copy))]
    pub(crate) dry_run: bool,
}

/// One cleaned (or planned) build artifact or cache directory entry.
#[derive(Clone, Debug, Deserialize, Eq, Getter, New, PartialEq, Serialize)]
pub struct CleanEntry {
    /// Filesystem path of the cleaned directory or entry.
    pub(crate) path: String,
    /// Logical cache category (`dist`, `mobile-hosts`, `icon-cache`, `ota-staging`, `cargo-target`).
    pub(crate) category: String,
    /// Reclaimed (or reclaimable) disk bytes.
    #[get(type(copy))]
    pub(crate) bytes_reclaimed: u64,
    /// Whether the directory was actually deleted (`false` during `--dry-run`).
    #[get(type(copy))]
    pub(crate) removed: bool,
}

/// Structured summary report emitted by `euv clean`.
#[derive(Clone, Debug, Deserialize, Eq, Getter, New, PartialEq, Serialize)]
pub struct CleanReport {
    /// Cleaned project root directory path.
    pub(crate) root_dir: String,
    /// Whether `--dry-run` preview mode was active.
    #[get(type(copy))]
    pub(crate) dry_run: bool,
    /// Individual cache entries processed.
    pub(crate) entries: Vec<CleanEntry>,
    /// Aggregate bytes reclaimed (or reclaimable).
    #[get(type(copy))]
    pub(crate) total_bytes_reclaimed: u64,
    /// Whether `cargo clean` was executed (`--all` without `--dry-run`).
    #[get(type(copy))]
    pub(crate) cargo_clean_ran: bool,
}