helm-rs 0.1.2

Typed Rust API for Helm 4: swappable backends, native chart, values and release reading
Documentation
use std::path::PathBuf;

use crate::backend::Command;

/// `helm create` (`pkg/cmd/create.go`): scaffolds a chart directory and returns its path.
#[derive(Debug, Clone, PartialEq, Eq, bon::Builder)]
#[builder(on(PathBuf, into))]
pub struct Create {
    /// The `NAME` argument: the chart directory to create, named after its last component. Its
    /// parent directory must exist (Helm 4.3 does not create it).
    #[builder(start_fn)]
    pub name: PathBuf,
    /// Flag `--starter`: a starter scaffold, given by name (below `HELM_DATA_HOME/starters`) or by
    /// absolute path.
    pub starter: Option<PathBuf>,
}

impl Create {
    /// A default scaffold at `name`.
    #[must_use]
    pub fn new(name: impl Into<PathBuf>) -> Self {
        Self::builder(name).build()
    }
}

impl Command for Create {
    type Output = PathBuf;
}