Expand description
Safe preflight selection for npm-compatible package registries.
The planner never executes a package manager. It runs fresh, anonymous probes before a registry-fetching command starts and returns the one environment override the caller may apply to that single process.
Structs§
Enums§
Functions§
- manager_
for_ command - Resolve an executable name to a package-manager family. Yarn is only classified when its major version is known; callers must otherwise pass it through unchanged.
- plan
- Build a one-shot registry plan. Each call performs fresh concurrent probes; the selected URL is the first healthy candidate in configured order.
- registry_
env - Environment variable injected into the one package-manager process after a successful plan. pnpm intentionally uses its own variable; pnpm 11 does not honor npm_config_registry for this purpose.
- should_
plan - Return whether this invocation may resolve or fetch npm packages. This is a deliberately explicit allow-list so routine commands never make probes.