pub struct DnxConfig {Show 35 fields
pub registry_url: String,
pub auth_token: Option<String>,
pub concurrency: usize,
pub cache_dir: Option<String>,
pub prefer_offline: bool,
pub frozen: bool,
pub scoped_registries: HashMap<String, ScopedRegistry>,
pub proxy: Option<String>,
pub store_dir: Option<String>,
pub shamefully_hoist: bool,
pub hoist: bool,
pub hoist_pattern: Vec<String>,
pub public_hoist_pattern: Vec<String>,
pub auto_install_peers: bool,
pub strict_peer_dependencies: bool,
pub node_linker: String,
pub side_effects_cache: bool,
pub verify_store_integrity: bool,
pub ignore_scripts: bool,
pub enable_pre_post_scripts: bool,
pub resolution_mode: String,
pub shell_emulator: bool,
pub use_node_version: Option<String>,
pub frozen_lockfile: bool,
pub overrides: HashMap<String, String>,
pub peer_dependency_rules: PeerDependencyRules,
pub patched_dependencies: HashMap<String, String>,
pub only_built_dependencies: Vec<String>,
pub never_built_dependencies: Vec<String>,
pub workspace_patterns: Option<Vec<String>>,
pub catalog_default: HashMap<String, String>,
pub catalog_named: HashMap<String, HashMap<String, String>>,
pub pnpmfile: Option<String>,
pub global_dir: String,
pub global_bin_dir: String,
}Expand description
Dnx configuration loaded from dnx.toml, .npmrc files, and environment variables.
Fields§
§registry_url: String§auth_token: Option<String>§concurrency: usize§cache_dir: Option<String>§prefer_offline: bool§frozen: bool§scoped_registries: HashMap<String, ScopedRegistry>§proxy: Option<String>§store_dir: Option<String>§shamefully_hoist: bool§hoist: bool§hoist_pattern: Vec<String>§public_hoist_pattern: Vec<String>§auto_install_peers: bool§strict_peer_dependencies: bool§node_linker: String§side_effects_cache: bool§verify_store_integrity: bool§ignore_scripts: bool§enable_pre_post_scripts: bool§resolution_mode: String§shell_emulator: bool§use_node_version: Option<String>§frozen_lockfile: bool§overrides: HashMap<String, String>§peer_dependency_rules: PeerDependencyRules§patched_dependencies: HashMap<String, String>§only_built_dependencies: Vec<String>§never_built_dependencies: Vec<String>§workspace_patterns: Option<Vec<String>>§catalog_default: HashMap<String, String>§catalog_named: HashMap<String, HashMap<String, String>>§pnpmfile: Option<String>§global_dir: String§global_bin_dir: StringImplementations§
Source§impl DnxConfig
impl DnxConfig
Sourcepub fn load(project_dir: &Path) -> Self
pub fn load(project_dir: &Path) -> Self
Load configuration from dnx.toml, .npmrc files, and environment variables.
project_dir is the directory containing the project.
Resolution order:
- Start with defaults.
- If
dnx.tomlexists inproject_dir, populate all fields from it. - If no
dnx.toml, fall back to .npmrc parsing (home dir + project dir). - Environment variables override specific fields.
- Proxy environment variables as fallback.
- Enforce HTTPS for non-local registries.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DnxConfig
impl RefUnwindSafe for DnxConfig
impl Send for DnxConfig
impl Sync for DnxConfig
impl Unpin for DnxConfig
impl UnsafeUnpin for DnxConfig
impl UnwindSafe for DnxConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more