pub struct Options {
pub repo_config: Option<PathBuf>,
pub credential_config: Option<PathBuf>,
pub repo_config_yarn: Option<PathBuf>,
pub credential_config_yarn: Option<PathBuf>,
pub repo_config_bun: Option<PathBuf>,
pub local_credential: bool,
pub token: Option<String>,
pub allow_all_domains: bool,
pub yarn: Option<bool>,
pub bun: Option<bool>,
pub bun_env: bool,
pub print_token: bool,
}Expand description
Configuration options for configuring Node authentication.
Fields§
§repo_config: Option<PathBuf>Path to the .npmrc file to read registry configs from.
Defaults to project-level .npmrc if present, otherwise user-level ~/.npmrc.
credential_config: Option<PathBuf>Path to the .npmrc file to write credentials to.
Defaults to user-level ~/.npmrc.
repo_config_yarn: Option<PathBuf>Path to the .yarnrc.yml file to read registry configs from.
Defaults to project-level .yarnrc.yml if present, otherwise user-level ~/.yarnrc.yml.
credential_config_yarn: Option<PathBuf>Path to the .yarnrc.yml file to write credentials to.
Defaults to user-level ~/.yarnrc.yml.
repo_config_bun: Option<PathBuf>Path to the project bunfig.toml used to discover Bun registry configuration.
Defaults to ./bunfig.toml.
local_credential: boolForces writing credentials to the current directory’s .npmrc.
token: Option<String>Explicit OAuth2 access token to use instead of querying ADC or gcloud.
allow_all_domains: boolAllow all HTTPS registry domains to receive the auth token (not only *-npm.pkg.dev).
yarn: Option<bool>Explicitly enable (Some(true)) or disable (Some(false)) updating .yarnrc.yml.
When None, Yarn updating is auto-detected based on .yarnrc.yml presence.
bun: Option<bool>Explicitly enable (Some(true)) or disable (Some(false)) reading bunfig.toml.
When None, Bun support is auto-detected from ./bunfig.toml.
bun_env: boolWrite Bun’s token to .env.local and reference it from the project bunfig.toml.
print_token: boolOnly retrieve and print the access token to standard output without modifying files.