@npmcli/config
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -599,15 +599,15 @@ // TODO: set the scope config from package.json or explicit cli config | ||
// you can set always-auth for a single registry, or as a default | ||
const alwaysAuthReg = this[_get](`${nerfed}:always-auth`) | ||
const alwaysAuthReg = this.get(`${nerfed}:always-auth`) | ||
if (alwaysAuthReg !== undefined) | ||
creds.alwaysAuth = !!alwaysAuthReg | ||
else | ||
creds.alwaysAuth = this[_get]('always-auth') | ||
creds.alwaysAuth = this.get('always-auth') | ||
const email = this[_get](`${nerfed}:email`) || this[_get]('email') | ||
const email = this.get(`${nerfed}:email`) || this.get('email') | ||
if (email) | ||
creds.email = email | ||
const tokenReg = this[_get](`${nerfed}:_authToken`) || | ||
this[_get](`${nerfed}:-authtoken`) || | ||
nerfed === nerfDart(this[_get]('registry')) && this[_get]('_authToken') | ||
const tokenReg = this.get(`${nerfed}:_authToken`) || | ||
this.get(`${nerfed}:-authtoken`) || | ||
nerfed === nerfDart(this.get('registry')) && this.get('_authToken') | ||
@@ -619,4 +619,4 @@ if (tokenReg) { | ||
const userReg = this[_get](`${nerfed}:username`) | ||
const passReg = this[_get](`${nerfed}:_password`) | ||
const userReg = this.get(`${nerfed}:username`) | ||
const passReg = this.get(`${nerfed}:_password`) | ||
if (userReg && passReg) { | ||
@@ -632,8 +632,8 @@ creds.username = userReg | ||
// default registry. | ||
const defaultNerf = nerfDart(this[_get]('registry')) | ||
const defaultNerf = nerfDart(this.get('registry')) | ||
if (nerfed !== defaultNerf) | ||
return creds | ||
const userDef = this[_get]('username') | ||
const passDef = this[_get]('_password') | ||
const userDef = this.get('username') | ||
const passDef = this.get('_password') | ||
if (userDef && passDef) { | ||
@@ -649,3 +649,3 @@ creds.username = userDef | ||
// registry, if set. | ||
const auth = this[_get]('_auth') | ||
const auth = this.get('_auth') | ||
if (!auth) | ||
@@ -652,0 +652,0 @@ return creds |
{ | ||
"name": "@npmcli/config", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "lib" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41951