pub struct EmitOptions {
pub endpoint: String,
pub scope: Option<String>,
pub inline_token: bool,
pub api_key: Option<String>,
pub emit_netrc: bool,
}Expand description
Options controlling emit shape.
Fields§
§endpoint: StringBase App endpoint, e.g., https://cleanapp.clnstrt.dev. Trailing slash
is tolerated.
scope: Option<String>Optional npm scope (e.g., @my-org). Only applies to npm emit.
inline_token: boolIf true, embed api_key literal in the emitted config (use for CI
runners without env-var support). If false, emit
${CLEANLIBRARY_API_KEY} shell-expansion for the ecosystems that can
expand it (npm/go/crates/maven). For pypi the placeholder does not
work — pip does not expand ${VAR} in pip.conf (CLEANLIB-758) —
so the pypi emitter always uses the resolved key from api_key on
this path and errors with ProxyConfigError::PypiRequiresResolvedKey
when the key is missing (unless Self::emit_netrc is set).
api_key: Option<String>API-key value to embed. For npm/go/crates/maven this is used only when
inline_token = true. For pypi it is used unconditionally (see
inline_token and CLEANLIB-758).
emit_netrc: boolCLEANLIB-758 (Infra co-review c795783): pypi-only, opt-in via
cleanlib config init --ecosystem pypi --emit-netrc. Emits a
credential-free pip.conf (the URL carries no userinfo) plus a
companion ~/.netrc block carrying the API key — pip reads .netrc
natively (no ${VAR} expansion needed), and moves the secret out of
pip.conf for customers whose policy disallows credentials in
application configs. Ignored for non-pypi ecosystems.