Skip to content

Commit 64fe64b

Browse files
wraithgarfritzy
authored andcommitted
deps: @npmcli/[email protected]
1 parent 0c209ff commit 64fe64b

File tree

4 files changed

+25
-10
lines changed

4 files changed

+25
-10
lines changed

node_modules/@npmcli/config/lib/index.js

+17-2
Original file line numberDiff line numberDiff line change
@@ -698,9 +698,11 @@ class Config {
698698
this.delete(`${nerfed}:_password`, 'user')
699699
this.delete(`${nerfed}:username`, 'user')
700700
this.delete(`${nerfed}:email`, 'user')
701+
this.delete(`${nerfed}:certfile`, 'user')
702+
this.delete(`${nerfed}:keyfile`, 'user')
701703
}
702704

703-
setCredentialsByURI (uri, { token, username, password, email }) {
705+
setCredentialsByURI (uri, { token, username, password, email, certfile, keyfile }) {
704706
const nerfed = nerfDart(uri)
705707
const def = nerfDart(this.get('registry'))
706708

@@ -733,6 +735,11 @@ class Config {
733735
this.delete(`${nerfed}:-authtoken`, 'user')
734736
this.delete(`${nerfed}:_authtoken`, 'user')
735737
this.delete(`${nerfed}:email`, 'user')
738+
if (certfile && keyfile) {
739+
this.set(`${nerfed}:certfile`, certfile, 'user')
740+
this.set(`${nerfed}:keyfile`, keyfile, 'user')
741+
// cert/key may be used in conjunction with other credentials, thus no `else`
742+
}
736743
if (token) {
737744
this.set(`${nerfed}:_authToken`, token, 'user')
738745
this.delete(`${nerfed}:_password`, 'user')
@@ -750,7 +757,7 @@ class Config {
750757
// protects against shoulder-hacks if password is memorable, I guess?
751758
const encoded = Buffer.from(password, 'utf8').toString('base64')
752759
this.set(`${nerfed}:_password`, encoded, 'user')
753-
} else {
760+
} else if (!certfile || !keyfile) {
754761
throw new Error('No credentials to set.')
755762
}
756763
}
@@ -765,6 +772,14 @@ class Config {
765772
creds.email = email
766773
}
767774

775+
const certfileReg = this.get(`${nerfed}:certfile`)
776+
const keyfileReg = this.get(`${nerfed}:keyfile`)
777+
if (certfileReg && keyfileReg) {
778+
creds.certfile = certfileReg
779+
creds.keyfile = keyfileReg
780+
// cert/key may be used in conjunction with other credentials, thus no `return`
781+
}
782+
768783
const tokenReg = this.get(`${nerfed}:_authToken`) ||
769784
this.get(`${nerfed}:_authtoken`) ||
770785
this.get(`${nerfed}:-authtoken`) ||

node_modules/@npmcli/config/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@npmcli/config",
3-
"version": "4.1.0",
3+
"version": "4.2.0",
44
"files": [
55
"bin/",
66
"lib/"
@@ -31,7 +31,7 @@
3131
},
3232
"devDependencies": {
3333
"@npmcli/eslint-config": "^3.0.1",
34-
"@npmcli/template-oss": "3.3.2",
34+
"@npmcli/template-oss": "3.5.0",
3535
"tap": "^16.0.1"
3636
},
3737
"dependencies": {
@@ -49,6 +49,6 @@
4949
},
5050
"templateOSS": {
5151
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
52-
"version": "3.3.2"
52+
"version": "3.5.0"
5353
}
5454
}

package-lock.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"@isaacs/string-locale-compare": "^1.1.0",
9191
"@npmcli/arborist": "^5.0.4",
9292
"@npmcli/ci-detect": "^2.0.0",
93-
"@npmcli/config": "^4.1.0",
93+
"@npmcli/config": "^4.2.0",
9494
"@npmcli/fs": "^2.1.0",
9595
"@npmcli/map-workspaces": "^2.0.3",
9696
"@npmcli/package-json": "^2.0.0",
@@ -867,9 +867,9 @@
867867
}
868868
},
869869
"node_modules/@npmcli/config": {
870-
"version": "4.1.0",
871-
"resolved": "https://registry.npmjs.org/@npmcli/config/-/config-4.1.0.tgz",
872-
"integrity": "sha512-cPQmIQ2Q0vuOfrenrA3isikdMFMAHgzlXV+EmvZ8f2JeJsU5xTU2bG7ipXECiMvPF9nM+QDnMLuIg8QLw9H4xg==",
870+
"version": "4.2.0",
871+
"resolved": "https://registry.npmjs.org/@npmcli/config/-/config-4.2.0.tgz",
872+
"integrity": "sha512-imWNz5dNWb2u+y41jyxL2WB389tkhu3a01Rchn16O/ur6GrnKySgOqdNG3N/9Z+mqxdISMEGKXI/POCauzz0dA==",
873873
"inBundle": true,
874874
"dependencies": {
875875
"@npmcli/map-workspaces": "^2.0.2",

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"@isaacs/string-locale-compare": "^1.1.0",
5959
"@npmcli/arborist": "^5.0.4",
6060
"@npmcli/ci-detect": "^2.0.0",
61-
"@npmcli/config": "^4.1.0",
61+
"@npmcli/config": "^4.2.0",
6262
"@npmcli/fs": "^2.1.0",
6363
"@npmcli/map-workspaces": "^2.0.3",
6464
"@npmcli/package-json": "^2.0.0",

0 commit comments

Comments
 (0)