pub struct ResolveCtx<'a> {
pub project_aube_config: &'a [(String, String)],
pub project_npmrc: &'a [(String, String)],
pub user_aube_config: &'a [(String, String)],
pub user_npmrc: &'a [(String, String)],
pub workspace_yaml: &'a BTreeMap<String, Value>,
pub env: &'a [(String, String)],
pub cli: &'a [(String, String)],
pub embedder_defaults: &'a [(String, String)],
}Expand description
Bundle of source inputs consumed by the per-setting typed
accessors in resolved. Each field is a borrowed view so
callers can reuse the same owned values across many lookups
without cloning.
File-source fields are split by scope (user vs project) so the
resolver can apply the locality principle — project-scope entries
outrank user-scope entries, and within a scope aube’s own config
outranks .npmrc. See the module-level docs for the full chain.
Fields§
§project_aube_config: &'a [(String, String)]Project-scope aube config (<cwd>/.config/aube/config.toml).
Highest-precedence file source by default — a project may pin
settings here as an alternative to committing them into the
project .npmrc shared with npm/pnpm/yarn.
project_npmrc: &'a [(String, String)]Project-scope .npmrc (<cwd>/.npmrc) plus any
npmrcAuthFile it points at, in load order.
user_aube_config: &'a [(String, String)]User-scope aube config (~/.config/aube/config.toml). Aube’s
authoritative store for user-level settings written via
aube config set — outranks ~/.npmrc so leftover entries in
a shared .npmrc don’t silently shadow what aube wrote.
user_npmrc: &'a [(String, String)]User-scope .npmrc (~/.npmrc or NPM_CONFIG_USERCONFIG) plus
pnpm’s global auth.ini, in load order.
workspace_yaml: &'a BTreeMap<String, Value>Raw top-level map from pnpm-workspace.yaml /
aube-workspace.yaml, as returned by
aube_manifest::workspace::load_raw.
env: &'a [(String, String)]Captured environment variables relevant to settings. In
production this is populated by capture_env; tests build a
literal slice. sources.env alias order defines priority; within
one alias, lookups iterate from the end so later entries win.
cli: &'a [(String, String)]Parsed CLI flag values for the command being executed. Each
entry is a (flag_name, value) pair where flag_name matches
a sources.cli alias declared in settings.toml. Values
should already be normalized to the raw form the type-specific
parser expects ("true"/"false" for bools, etc).
embedder_defaults: &'a [(String, String)]Lowest-priority defaults supplied by an embedder. An embedding host
(a tool that drives aube’s command layer as a library) feeds setting
defaults here through the normal settings path; every user- and
project-level source overrides them. Standalone aube leaves this
empty, so the per-setting built-in defaults from settings.toml
apply unchanged. Keyed by the same canonical setting names as the
file sources.
Implementations§
Source§impl<'a> ResolveCtx<'a>
impl<'a> ResolveCtx<'a>
Sourcepub fn files_only(
npmrc: &'a [(String, String)],
workspace_yaml: &'a BTreeMap<String, Value>,
) -> Self
pub fn files_only( npmrc: &'a [(String, String)], workspace_yaml: &'a BTreeMap<String, Value>, ) -> Self
Construct a context that only sees the merged-.npmrc and
workspace-yaml file sources. Convenience for tests and call
sites that don’t need scope splitting or env/cli plumbing.
The supplied .npmrc slice is treated as project-scope so its
values win over the (empty) user-scope sources — matching
the install-time precedence callers used to rely on before the
split.
Auto Trait Implementations§
impl<'a> Freeze for ResolveCtx<'a>
impl<'a> RefUnwindSafe for ResolveCtx<'a>
impl<'a> Send for ResolveCtx<'a>
impl<'a> Sync for ResolveCtx<'a>
impl<'a> Unpin for ResolveCtx<'a>
impl<'a> UnsafeUnpin for ResolveCtx<'a>
impl<'a> UnwindSafe for ResolveCtx<'a>
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
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>
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>
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