@oclif/plugin-update
Advanced tools
Comparing version 4.4.13-dev.2 to 4.4.13
@@ -5,7 +5,6 @@ import { Config, ux } from '@oclif/core'; | ||
import fileSize from 'filesize'; | ||
import { HTTPError, got } from 'got'; | ||
import { got } from 'got'; | ||
import { existsSync } from 'node:fs'; | ||
import { mkdir, readFile, readdir, rm, stat, symlink, utimes, writeFile } from 'node:fs/promises'; | ||
import { basename, dirname, join } from 'node:path'; | ||
import { ProxyAgent } from 'proxy-agent'; | ||
import { Extractor } from './tar.js'; | ||
@@ -18,19 +17,2 @@ import { ls, wait } from './util.js'; | ||
}; | ||
async function httpGet(url) { | ||
debug(`[${url}] GET`); | ||
return got | ||
.get(url, { | ||
agent: { https: new ProxyAgent() }, | ||
}) | ||
.then((res) => { | ||
debug(`[${url}] ${res.statusCode}`); | ||
return res; | ||
}) | ||
.catch((error) => { | ||
debug(`[${url}] ${error.response?.statusCode ?? error.code}`); | ||
// constructing a new HTTPError here will produce a more actionable stack trace | ||
debug(new HTTPError(error.response)); | ||
throw error; | ||
}); | ||
} | ||
export class Updater { | ||
@@ -48,3 +30,3 @@ config; | ||
try { | ||
const { body } = await httpGet(newIndexUrl); | ||
const { body } = await got.get(newIndexUrl); | ||
return typeof body === 'string' ? JSON.parse(body) : body; | ||
@@ -267,3 +249,3 @@ } | ||
const url = config.s3Url(s3Key); | ||
const { body } = await httpGet(url); | ||
const { body } = await got.get(url); | ||
if (typeof body === 'string') { | ||
@@ -334,6 +316,3 @@ return JSON.parse(body); | ||
})); | ||
debug(`Streaming ${gzUrl} to ${output}`); | ||
const stream = got.stream(gzUrl, { | ||
agent: { https: new ProxyAgent() }, | ||
}); | ||
const stream = got.stream(gzUrl); | ||
stream.pause(); | ||
@@ -368,3 +347,3 @@ const baseDir = manifest.baseDir ?? | ||
try { | ||
const { body } = await httpGet(`${config.npmRegistry ?? 'https://registry.npmjs.org'}/${config.pjson.name}`); | ||
const { body } = await got.get(`${config.npmRegistry ?? 'https://registry.npmjs.org'}/${config.pjson.name}`); | ||
const tags = body['dist-tags']; | ||
@@ -371,0 +350,0 @@ const tag = Object.keys(tags).find((v) => tags[v] === version) ?? channel; |
@@ -99,3 +99,3 @@ { | ||
}, | ||
"version": "4.4.13-dev.2" | ||
"version": "4.4.13" | ||
} |
{ | ||
"name": "@oclif/plugin-update", | ||
"version": "4.4.13-dev.2", | ||
"version": "4.4.13", | ||
"author": "Salesforce", | ||
@@ -9,7 +9,6 @@ "bugs": "https://github.com/oclif/plugin-update/issues", | ||
"@oclif/core": "^4", | ||
"ansis": "^3.2.1", | ||
"ansis": "^3.3.2", | ||
"debug": "^4.3.5", | ||
"filesize": "^6.1.0", | ||
"got": "^13", | ||
"proxy-agent": "^6.4.0", | ||
"semver": "^7.6.3", | ||
@@ -16,0 +15,0 @@ "tar-fs": "^2.1.1", |
@@ -58,3 +58,3 @@ # @oclif/plugin-update | ||
_See code: [src/commands/update.ts](https://github.com/oclif/plugin-update/blob/v4.4.13-dev.2/src/commands/update.ts)_ | ||
_See code: [src/commands/update.ts](https://github.com/oclif/plugin-update/blob/v4.4.13/src/commands/update.ts)_ | ||
<!-- commandsstop --> | ||
@@ -61,0 +61,0 @@ |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
9
0
7
15
35515
831
+ Added@inquirer/figures@1.0.7(transitive)
+ Added@oclif/core@4.0.31(transitive)
+ Addedes-abstract@1.23.3(transitive)
- Removedproxy-agent@^6.4.0
- Removed@inquirer/figures@1.0.8(transitive)
- Removed@oclif/core@4.0.32(transitive)
- Removed@tootallnate/quickjs-emscripten@0.23.0(transitive)
- Removedagent-base@7.1.1(transitive)
- Removedast-types@0.13.4(transitive)
- Removedbasic-ftp@5.0.5(transitive)
- Removeddata-uri-to-buffer@6.0.2(transitive)
- Removeddegenerator@5.0.1(transitive)
- Removedes-abstract@1.23.4(transitive)
- Removedescodegen@2.1.0(transitive)
- Removedesprima@4.0.1(transitive)
- Removedestraverse@5.3.0(transitive)
- Removedesutils@2.0.3(transitive)
- Removedfs-extra@11.2.0(transitive)
- Removedget-uri@6.0.3(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedhttp-proxy-agent@7.0.2(transitive)
- Removedhttps-proxy-agent@7.0.5(transitive)
- Removedip-address@9.0.5(transitive)
- Removedjsbn@1.1.0(transitive)
- Removedjsonfile@6.1.0(transitive)
- Removedlru-cache@7.18.3(transitive)
- Removednetmask@2.0.2(transitive)
- Removedpac-proxy-agent@7.0.2(transitive)
- Removedpac-resolver@7.0.1(transitive)
- Removedproxy-agent@6.4.0(transitive)
- Removedproxy-from-env@1.1.0(transitive)
- Removedsmart-buffer@4.2.0(transitive)
- Removedsocks@2.8.3(transitive)
- Removedsocks-proxy-agent@8.0.4(transitive)
- Removedsource-map@0.6.1(transitive)
- Removedsprintf-js@1.1.3(transitive)
- Removedtslib@2.8.1(transitive)
- Removeduniversalify@2.0.1(transitive)
Updatedansis@^3.3.2