Files
leleka/crates/deploy/src/app.rs
T
Pavlo RatushnyiandClaude Sonnet 5.5 e2e8b78abf leleka-deploy: one env_settings reader, no dyn, supervisor and flows read time through the Clock port, explicit imports
glob-super-import 15 -> 0, env-read 41 -> 0 outside crates/deploy/src/env_settings.rs (typed accessors: home, PATH, tokens presence, route, distro; the LELEKA_* lookup is a fn pointer EnvLookup), dyn-trait 17 -> 0 (impl Fn / impl FnMut), instant-now 28 -> 0 (ServiceSupervisor holds an AnyClock, command flows use SystemClock of leleka-obs). Doc headers of the generated files are real sentences.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 19:40:18 +01:00

55 lines
1.6 KiB
Rust

//! Command implementations behind `main`: `up`, `preflight`, `status`, `down`, `profiles`.
use crate::{
cli::{Command, Environment, ReconfigureArgs, USAGE, UpOptions, parse},
plan::{Context, Mode, Step, StepState, UnitScopeTag, gather, plan_steps, render_plan},
preflight::Report,
profile::{BUILTIN, Profile},
steps::{self, gather_fs, say},
supervisor,
};
use serde_json::{Value, json};
use std::path::PathBuf;
/// Where `--persist` writes after a successful runtime change.
pub struct PersistTarget<'a> {
pub paths: &'a crate::layout::Paths,
pub settings: &'a serde_json::Map<String, Value>,
/// A supervisor runs: it records the change in the configuration it holds.
pub supervised: bool,
}
#[cfg(test)]
mod version_tests;
#[cfg(test)]
mod machine_tests;
#[cfg(test)]
mod status_tests;
mod entry;
mod install_flow;
mod machine_view;
mod preflight_report;
mod quick_health;
mod settings_change;
mod status_report;
mod stop_flow;
mod verify_flow;
pub use entry::{main_native, main_with, version_text};
pub use install_flow::{powershell_try, run_up, summary, summary_json, up};
pub use machine_view::render_machine;
#[cfg(unix)]
use preflight_report::seal_probe;
#[cfg(not(unix))]
use preflight_report::seal_probe;
use preflight_report::{json_plan, preflight, print_report};
use settings_change::reconfigure;
pub use settings_change::{render_effective, render_settings, send_reconfigure};
pub use status_report::{StatusReport, age_text, print_status, render_supervisor};
use status_report::{installed_scope, status, unix_now};
use stop_flow::down;
#[cfg(windows)]
pub use stop_flow::stop_foreground;
use verify_flow::verify;