lean_ctx/cli/addon_cmd/
mod.rs1use std::path::Path;
9
10use super::addon_deps::{
11 addon_self_ref, install_declared_deps, refresh_pack_dependencies, resolve_declared_deps,
12};
13use super::prompt;
14use crate::core::addons::manifest::AddonManifest;
15use crate::core::addons::revocation::RevocationList;
16use crate::core::addons::store::{ArtifactReceipt, InstalledStore};
17use crate::core::addons::{artifact_install, bootstrap, install, registry};
18
19mod authoring;
20mod commands;
21mod display;
22mod management;
23
24#[allow(unreachable_pub, unused_imports)]
25pub use authoring::*;
26pub use commands::*;
27#[allow(unreachable_pub, unused_imports)]
28pub use display::*;
29#[allow(unreachable_pub, unused_imports)]
30pub use management::*;
31
32pub(super) fn flag_value(args: &[String], flag: &str) -> Option<String> {
34 args.iter()
35 .position(|a| a == flag)
36 .and_then(|i| args.get(i + 1))
37 .map(|s| s.trim().to_string())
38 .filter(|s| !s.is_empty())
39}