Skip to main content

Module adapters

Module adapters 

Source

Modules§

bun
bundler
cargo_adapter
cocoapods
composer
dart
go
gradle
maven
mix
mix_build
npm
pdm
pipenv
pnpm
poetry
swift
terraform
uv
venv
yarn

Structs§

BinaryCheckStatus
Information describing status of a required package manager binary.
BloatDir
Information about a bloat directory that can be pruned.
DirSizeBreakdown
A directory’s size split by what deleting it would actually free.
DriftReport
Packages sitting in a manager’s environment directory that its lockfile does not record — installs a post-prune restore would not bring back.
EnforcePolicy
What an adapter is allowed to do while enforcing a lockfile on this pass.

Constants§

ADAPTER_GROUPS
The adapters, grouped by the language they belong to.

Traits§

PackageManager
The core trait that every package manager adapter must implement.

Functions§

adapter_binary
The executable that restores for a given adapter.
adapter_group
The language group name belongs to, or "Other" if it somehow belongs to none.
all_adapter_names
Every adapter name, in registry order, for error messages and pickers.
binary_available
Check whether a package manager binary is present and runnable.
capture_command_with_timeout
Run a command and hand back what it printed on stdout, bounded by timeout.
detect_adapters
Detect which adapters apply to a given project directory.
dir_size
Calculate the total size of a directory recursively (in bytes).
dir_size_with_hardlinks
dir_size, but hardlink-aware.
enforce_two_tier
The one rule every adapter enforces, given the manager’s two spellings of the check.
get_all_adapters
Returns all registered package manager adapters.
install_hint
How to install the manager behind adapter, if there is a one-line answer.
is_adapter_name
Whether name is a real adapter name, for validating what the user typed.
lock_sync_or_verify
Two-tier lockfile enforcement using default timeout.
lock_sync_or_verify_with_timeout
Two-tier lockfile enforcement with configurable timeout.
lock_verify_or_generate
Lockfile enforcement for ecosystems whose “sync” command rewrites source manifests.
opt_in_adapter_names
The adapters that need their own enable_* switch as well as not being disabled.
refuse_if_manifest_stale
The lockfile-freshness proof for managers that have no read-only check of their own.
resolve_program
Resolve a program name into something Command::new can actually spawn.
run_command_with_timeout
Helper: run a command with a configurable timeout.
scan_required_binaries
Scan only the package manager binaries needed by candidate repos.
try_run_command
Helper: attempt a command but return true/false instead of Err.