Bump got from 11.8.3 to 12.0.1
This commit is contained in:
parent
2a4771fad5
commit
b4d3fd3e29
3 changed files with 95 additions and 9 deletions
16
cli/api.ts
16
cli/api.ts
|
|
@ -109,13 +109,15 @@ function getPackageName(plugin: string) {
|
|||
|
||||
function existsOnNpm(plugin: string) {
|
||||
const name = getPackageName(plugin);
|
||||
return got.get<any>(registryUrl + name.toLowerCase(), {timeout: 10000, responseType: 'json'}).then((res) => {
|
||||
if (!res.body.versions) {
|
||||
return Promise.reject(res);
|
||||
} else {
|
||||
return res;
|
||||
}
|
||||
});
|
||||
return got
|
||||
.get<any>(registryUrl + name.toLowerCase(), {timeout: {request: 10000}, responseType: 'json'})
|
||||
.then((res) => {
|
||||
if (!res.body.versions) {
|
||||
return Promise.reject(res);
|
||||
} else {
|
||||
return res;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function install(plugin: string, locally?: boolean) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue