pub(crate) struct Adapters<R, N> {
cargo: CargoAdapter<R>,
npm: NpmPublisher<N>,
}Expand description
Every supported ecosystem adapter, dispatching units by target kind.
Fields§
§cargo: CargoAdapter<R>§npm: NpmPublisher<N>Implementations§
Source§impl<R, N> Adapters<R, N>
impl<R, N> Adapters<R, N>
Sourcepub(crate) fn authenticated(
self,
cargo_authorization: Token,
npm_token: Token,
) -> Self
pub(crate) fn authenticated( self, cargo_authorization: Token, npm_token: Token, ) -> Self
Publish Cargo crates with cargo_authorization as the whole
Authorization value and npm packages with npm_token.
Source§impl Adapters<NoRegistry, NoRegistry>
impl Adapters<NoRegistry, NoRegistry>
Sourcepub(crate) const fn without_registry() -> Self
pub(crate) const fn without_registry() -> Self
Adapters for discovery and planning, which never publish.
Source§impl<R, N> Adapters<R, N>
impl<R, N> Adapters<R, N>
Sourcepub(crate) fn resolve(
&self,
root: &RepositoryRoot,
configured: &BTreeMap<String, ReleaseUnitState>,
) -> Result<Vec<Unit>, ResolveError>
pub(crate) fn resolve( &self, root: &RepositoryRoot, configured: &BTreeMap<String, ReleaseUnitState>, ) -> Result<Vec<Unit>, ResolveError>
Units of every ecosystem from the configured release units.
Sourcepub(crate) fn complete_versions(
&self,
root: &RepositoryRoot,
units: &[Unit],
explicit: &BTreeMap<String, Version>,
automatic: &BTreeMap<String, Version>,
) -> Result<BTreeMap<String, Version>, ResolveError>
pub(crate) fn complete_versions( &self, root: &RepositoryRoot, units: &[Unit], explicit: &BTreeMap<String, Version>, automatic: &BTreeMap<String, Version>, ) -> Result<BTreeMap<String, Version>, ResolveError>
Fan explicit and automatic version proposals out to whatever grouping the ecosystem has. Explicit targets win over automatic ones.
Sourcepub(crate) fn plan_edits(
&self,
root: &RepositoryRoot,
units: &[Unit],
versions: &BTreeMap<String, Proposed>,
context: &EditContext<'_>,
edits: &mut PlannedEdits,
) -> Result<(), ResolveError>
pub(crate) fn plan_edits( &self, root: &RepositoryRoot, units: &[Unit], versions: &BTreeMap<String, Proposed>, context: &EditContext<'_>, edits: &mut PlannedEdits, ) -> Result<(), ResolveError>
Plan the edits for the proposed units, contributing to the shared
transaction. The requirement changes need no consumer check here, see
Adapters::check_consumers. entries holds the changelog entries by
unit.
Sourcepub(crate) fn plan_pin_edits<B: AssetBuilder>(
root: &RepositoryRoot,
units: &[Unit],
released_now: &BTreeMap<String, Proposed>,
builder: &B,
worktree: &Path,
edits: &mut PlannedEdits,
) -> Result<(), ResolveError>
pub(crate) fn plan_pin_edits<B: AssetBuilder>( root: &RepositoryRoot, units: &[Unit], released_now: &BTreeMap<String, Proposed>, builder: &B, worktree: &Path, edits: &mut PlannedEdits, ) -> Result<(), ResolveError>
Write the new version and the asset digests of the released
dependencies into the units that pin them. The assets are built from
worktree, so the edits of the dependencies must be applied first.
Sourcepub(crate) fn check_consumers(
&self,
root: &RepositoryRoot,
units: &[Unit],
versions: &BTreeMap<String, Proposed>,
) -> Result<(), ResolveError>
pub(crate) fn check_consumers( &self, root: &RepositoryRoot, units: &[Unit], versions: &BTreeMap<String, Proposed>, ) -> Result<(), ResolveError>
Reject proposals that change a dependency entry for consumers without a proposal.
Groups of units that cannot be released apart.
Sourcepub(crate) fn local_plan(
&self,
root: &RepositoryRoot,
units: &[Unit],
unit: &Unit,
target_version: &Version,
date: &str,
) -> Result<LocalPlan, ResolveError>
pub(crate) fn local_plan( &self, root: &RepositoryRoot, units: &[Unit], unit: &Unit, target_version: &Version, date: &str, ) -> Result<LocalPlan, ResolveError>
Plan a local release of unit; units are all resolved units.
Source§impl<R, N> Adapters<R, N>
impl<R, N> Adapters<R, N>
Sourcepub(crate) fn prepare(
worktree: &RepositoryRoot,
units: &[Unit],
) -> Result<Vec<PathBuf>, ResolveError>
pub(crate) fn prepare( worktree: &RepositoryRoot, units: &[Unit], ) -> Result<Vec<PathBuf>, ResolveError>
Refresh generated files in a proposal worktree after its edits are applied, returning repository paths that need staging. Callers must run this after writing proposed manifest changes, so a generated file such as a lockfile reflects the bumped versions.