Struct node_maintainer::NodeMaintainerOptions
source · pub struct NodeMaintainerOptions { /* private fields */ }Implementations§
source§impl NodeMaintainerOptions
impl NodeMaintainerOptions
pub fn new() -> Self
pub fn cache(self, cache: impl AsRef<Path>) -> Self
pub fn concurrency(self, concurrency: usize) -> Self
pub fn kdl_lock( self, kdl_lock: impl IntoKdl ) -> Result<Self, NodeMaintainerError>
pub fn npm_lock( self, npm_lock: impl AsRef<str> ) -> Result<Self, NodeMaintainerError>
pub fn registry(self, registry: Url) -> Self
pub fn scope_registry(self, scope: impl AsRef<str>, registry: Url) -> Self
pub fn root(self, path: impl AsRef<Path>) -> Self
pub fn default_tag(self, tag: impl AsRef<str>) -> Self
sourcepub fn prefer_copy(self, prefer_copy: bool) -> Self
pub fn prefer_copy(self, prefer_copy: bool) -> Self
When extracting tarballs, prefer to copy files to their destination as separate, standalone files instead of hard linking them. Full copies will still happen when hard linking fails. Furthermore, on filesystems that support Copy-on-Write (zfs, btrfs, APFS (macOS), etc), this option will use that feature for all copies.
sourcepub fn validate(self, validate: bool) -> Self
pub fn validate(self, validate: bool) -> Self
When this is true, node-maintainer will validate integrity hashes for
all files extracted from the cache, as well as verify that any files
in the existing node_modules are unmodified. If verification fails,
the packages will be reinstalled.
pub fn on_resolution_added<F>(self, f: F) -> Selfwhere F: Fn() + Send + Sync + 'static,
pub fn on_resolve_progress<F>(self, f: F) -> Selfwhere F: Fn(&Package) + Send + Sync + 'static,
pub fn on_extract_progress<F>(self, f: F) -> Selfwhere F: Fn(&Package) + Send + Sync + 'static,
pub async fn resolve_manifest( self, root: CorgiManifest ) -> Result<NodeMaintainer, NodeMaintainerError>
pub async fn resolve_spec( self, root_spec: impl AsRef<str> ) -> Result<NodeMaintainer, NodeMaintainerError>
Trait Implementations§
source§impl Clone for NodeMaintainerOptions
impl Clone for NodeMaintainerOptions
source§fn clone(&self) -> NodeMaintainerOptions
fn clone(&self) -> NodeMaintainerOptions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more