Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2022-07-18 23:31:44 +0300
committerNathan Fritz <fritzy@github.com>2022-07-19 22:38:13 +0300
commit64fe64b74bc66635771ae65003ccc67be5853929 (patch)
tree8ea90ab8179b5de008a120bc2ac920459f0d5d7d
parent0c209ff035fe2abbf6b3c53bcc14219924c64bf1 (diff)
deps: @npmcli/config@4.2.0
-rw-r--r--node_modules/@npmcli/config/lib/index.js19
-rw-r--r--node_modules/@npmcli/config/package.json6
-rw-r--r--package-lock.json8
-rw-r--r--package.json2
4 files changed, 25 insertions, 10 deletions
diff --git a/node_modules/@npmcli/config/lib/index.js b/node_modules/@npmcli/config/lib/index.js
index 5b7ea68e9..8c2b181ca 100644
--- a/node_modules/@npmcli/config/lib/index.js
+++ b/node_modules/@npmcli/config/lib/index.js
@@ -698,9 +698,11 @@ class Config {
this.delete(`${nerfed}:_password`, 'user')
this.delete(`${nerfed}:username`, 'user')
this.delete(`${nerfed}:email`, 'user')
+ this.delete(`${nerfed}:certfile`, 'user')
+ this.delete(`${nerfed}:keyfile`, 'user')
}
- setCredentialsByURI (uri, { token, username, password, email }) {
+ setCredentialsByURI (uri, { token, username, password, email, certfile, keyfile }) {
const nerfed = nerfDart(uri)
const def = nerfDart(this.get('registry'))
@@ -733,6 +735,11 @@ class Config {
this.delete(`${nerfed}:-authtoken`, 'user')
this.delete(`${nerfed}:_authtoken`, 'user')
this.delete(`${nerfed}:email`, 'user')
+ if (certfile && keyfile) {
+ this.set(`${nerfed}:certfile`, certfile, 'user')
+ this.set(`${nerfed}:keyfile`, keyfile, 'user')
+ // cert/key may be used in conjunction with other credentials, thus no `else`
+ }
if (token) {
this.set(`${nerfed}:_authToken`, token, 'user')
this.delete(`${nerfed}:_password`, 'user')
@@ -750,7 +757,7 @@ class Config {
// protects against shoulder-hacks if password is memorable, I guess?
const encoded = Buffer.from(password, 'utf8').toString('base64')
this.set(`${nerfed}:_password`, encoded, 'user')
- } else {
+ } else if (!certfile || !keyfile) {
throw new Error('No credentials to set.')
}
}
@@ -765,6 +772,14 @@ class Config {
creds.email = email
}
+ const certfileReg = this.get(`${nerfed}:certfile`)
+ const keyfileReg = this.get(`${nerfed}:keyfile`)
+ if (certfileReg && keyfileReg) {
+ creds.certfile = certfileReg
+ creds.keyfile = keyfileReg
+ // cert/key may be used in conjunction with other credentials, thus no `return`
+ }
+
const tokenReg = this.get(`${nerfed}:_authToken`) ||
this.get(`${nerfed}:_authtoken`) ||
this.get(`${nerfed}:-authtoken`) ||
diff --git a/node_modules/@npmcli/config/package.json b/node_modules/@npmcli/config/package.json
index 2cc04e05b..2f561c122 100644
--- a/node_modules/@npmcli/config/package.json
+++ b/node_modules/@npmcli/config/package.json
@@ -1,6 +1,6 @@
{
"name": "@npmcli/config",
- "version": "4.1.0",
+ "version": "4.2.0",
"files": [
"bin/",
"lib/"
@@ -31,7 +31,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^3.0.1",
- "@npmcli/template-oss": "3.3.2",
+ "@npmcli/template-oss": "3.5.0",
"tap": "^16.0.1"
},
"dependencies": {
@@ -49,6 +49,6 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
- "version": "3.3.2"
+ "version": "3.5.0"
}
}
diff --git a/package-lock.json b/package-lock.json
index 65498747b..5f17c532c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -90,7 +90,7 @@
"@isaacs/string-locale-compare": "^1.1.0",
"@npmcli/arborist": "^5.0.4",
"@npmcli/ci-detect": "^2.0.0",
- "@npmcli/config": "^4.1.0",
+ "@npmcli/config": "^4.2.0",
"@npmcli/fs": "^2.1.0",
"@npmcli/map-workspaces": "^2.0.3",
"@npmcli/package-json": "^2.0.0",
@@ -867,9 +867,9 @@
}
},
"node_modules/@npmcli/config": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-4.1.0.tgz",
- "integrity": "sha512-cPQmIQ2Q0vuOfrenrA3isikdMFMAHgzlXV+EmvZ8f2JeJsU5xTU2bG7ipXECiMvPF9nM+QDnMLuIg8QLw9H4xg==",
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-4.2.0.tgz",
+ "integrity": "sha512-imWNz5dNWb2u+y41jyxL2WB389tkhu3a01Rchn16O/ur6GrnKySgOqdNG3N/9Z+mqxdISMEGKXI/POCauzz0dA==",
"inBundle": true,
"dependencies": {
"@npmcli/map-workspaces": "^2.0.2",
diff --git a/package.json b/package.json
index 80e7a4fb0..f762f7e0e 100644
--- a/package.json
+++ b/package.json
@@ -58,7 +58,7 @@
"@isaacs/string-locale-compare": "^1.1.0",
"@npmcli/arborist": "^5.0.4",
"@npmcli/ci-detect": "^2.0.0",
- "@npmcli/config": "^4.1.0",
+ "@npmcli/config": "^4.2.0",
"@npmcli/fs": "^2.1.0",
"@npmcli/map-workspaces": "^2.0.3",
"@npmcli/package-json": "^2.0.0",