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::*;

/// Live inspection snapshot collected from a running `DevAutomationBridge`.
#[derive(Clone, Data, Debug, Default, Deserialize, Eq, New, PartialEq, Serialize)]
pub struct LiveInspectReport {
    /// Target `DevAutomationBridge` base HTTP URL.
    pub(crate) url: String,
    /// Whether the bridge responded over HTTP.
    #[get(type(copy))]
    pub(crate) reachable: bool,
    /// Health status reported by `/ai/health` (or `"unreachable"`).
    pub(crate) health_status: String,
    /// Reported AI Schema protocol/version identifier, if present.
    #[new(skip)]
    pub(crate) protocol_version: String,
    /// Active UI route reported by the live application snapshot.
    #[new(skip)]
    pub(crate) active_route: String,
    /// Number of semantic scene nodes reported in the live snapshot.
    #[new(skip)]
    #[get(type(copy))]
    pub(crate) node_count: usize,
    /// Total detected 9-rule layout anomalies.
    #[new(skip)]
    #[get(type(copy))]
    pub(crate) anomaly_count: usize,
    /// Human-readable descriptions of each detected layout anomaly.
    #[new(skip)]
    pub(crate) anomalies: Vec<String>,
    /// Optional connection or HTTP diagnostic error.
    #[new(skip)]
    pub(crate) error: Option<String>,
}

/// File path and byte length record inside a `DistInspectReport`.
#[derive(Clone, Debug, Deserialize, Eq, Getter, New, PartialEq, Serialize)]
pub struct DistFileStat {
    /// Relative POSIX path beneath `dist_dir`.
    pub(crate) path: String,
    /// File byte size on disk.
    #[get(type(copy))]
    pub(crate) size_bytes: u64,
}

/// Audit summary of a local release artifact directory (`euv-release.json`, SHA-256, zero-JS check, sizes).
#[derive(Clone, Data, Debug, Default, Deserialize, Eq, New, PartialEq, Serialize)]
pub struct DistInspectReport {
    /// Audited distribution directory path.
    pub(crate) dist_dir: String,
    /// Total regular files scanned.
    #[get(type(copy))]
    pub(crate) file_count: usize,
    /// Aggregate size in bytes across all regular files.
    #[get(type(copy))]
    pub(crate) total_bytes: u64,
    /// Largest files ordered descending by byte size.
    #[new(skip)]
    pub(crate) largest_files: Vec<DistFileStat>,
    /// Any forbidden external `.js`, `.mjs`, or `.d.ts` files discovered.
    #[new(skip)]
    pub(crate) js_files: Vec<String>,
    /// `true` when zero external `.js`/`.mjs`/`.d.ts` files exist.
    #[new(skip)]
    #[get(type(copy))]
    pub(crate) zero_js_compliant: bool,
    /// Whether `euv-release.json` exists in `dist_dir`.
    #[new(skip)]
    #[get(type(copy))]
    pub(crate) manifest_present: bool,
    /// Semantic version declared inside `euv-release.json`, if present.
    #[new(skip)]
    pub(crate) manifest_version: Option<String>,
    /// Whether `euv-release.json` passed format, file existence, size, and SHA-256 verification.
    #[new(skip)]
    #[get(type(copy))]
    pub(crate) manifest_verified: bool,
    /// Any manifest or integrity errors discovered during verification.
    #[new(skip)]
    pub(crate) manifest_errors: Vec<String>,
}