|
|
|
@ -2786,12 +2786,11 @@ function copyFile(srcFile, destFile, force) {
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 443:
|
|
|
|
|
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
|
|
|
|
/***/ (function(__unusedmodule, exports) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
|
|
const url = __webpack_require__(835);
|
|
|
|
|
function getProxyUrl(reqUrl) {
|
|
|
|
|
let usingSsl = reqUrl.protocol === 'https:';
|
|
|
|
|
let proxyUrl;
|
|
|
|
@ -2806,7 +2805,7 @@ function getProxyUrl(reqUrl) {
|
|
|
|
|
proxyVar = process.env['http_proxy'] || process.env['HTTP_PROXY'];
|
|
|
|
|
}
|
|
|
|
|
if (proxyVar) {
|
|
|
|
|
proxyUrl = url.parse(proxyVar);
|
|
|
|
|
proxyUrl = new URL(proxyVar);
|
|
|
|
|
}
|
|
|
|
|
return proxyUrl;
|
|
|
|
|
}
|
|
|
|
@ -6598,13 +6597,6 @@ const minSatisfying = (versions, range, options) => {
|
|
|
|
|
module.exports = minSatisfying
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 835:
|
|
|
|
|
/***/ (function(module) {
|
|
|
|
|
|
|
|
|
|
module.exports = require("url");
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 842:
|
|
|
|
@ -7010,7 +7002,6 @@ exports.getRelease = (version) => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
|
|
const url = __webpack_require__(835);
|
|
|
|
|
const http = __webpack_require__(605);
|
|
|
|
|
const https = __webpack_require__(211);
|
|
|
|
|
const pm = __webpack_require__(443);
|
|
|
|
@ -7059,7 +7050,7 @@ var MediaTypes;
|
|
|
|
|
* @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
|
|
|
|
|
*/
|
|
|
|
|
function getProxyUrl(serverUrl) {
|
|
|
|
|
let proxyUrl = pm.getProxyUrl(url.parse(serverUrl));
|
|
|
|
|
let proxyUrl = pm.getProxyUrl(new URL(serverUrl));
|
|
|
|
|
return proxyUrl ? proxyUrl.href : '';
|
|
|
|
|
}
|
|
|
|
|
exports.getProxyUrl = getProxyUrl;
|
|
|
|
@ -7078,6 +7069,15 @@ const HttpResponseRetryCodes = [
|
|
|
|
|
const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];
|
|
|
|
|
const ExponentialBackoffCeiling = 10;
|
|
|
|
|
const ExponentialBackoffTimeSlice = 5;
|
|
|
|
|
class HttpClientError extends Error {
|
|
|
|
|
constructor(message, statusCode) {
|
|
|
|
|
super(message);
|
|
|
|
|
this.name = 'HttpClientError';
|
|
|
|
|
this.statusCode = statusCode;
|
|
|
|
|
Object.setPrototypeOf(this, HttpClientError.prototype);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
exports.HttpClientError = HttpClientError;
|
|
|
|
|
class HttpClientResponse {
|
|
|
|
|
constructor(message) {
|
|
|
|
|
this.message = message;
|
|
|
|
@ -7096,7 +7096,7 @@ class HttpClientResponse {
|
|
|
|
|
}
|
|
|
|
|
exports.HttpClientResponse = HttpClientResponse;
|
|
|
|
|
function isHttps(requestUrl) {
|
|
|
|
|
let parsedUrl = url.parse(requestUrl);
|
|
|
|
|
let parsedUrl = new URL(requestUrl);
|
|
|
|
|
return parsedUrl.protocol === 'https:';
|
|
|
|
|
}
|
|
|
|
|
exports.isHttps = isHttps;
|
|
|
|
@ -7201,7 +7201,7 @@ class HttpClient {
|
|
|
|
|
if (this._disposed) {
|
|
|
|
|
throw new Error('Client has already been disposed.');
|
|
|
|
|
}
|
|
|
|
|
let parsedUrl = url.parse(requestUrl);
|
|
|
|
|
let parsedUrl = new URL(requestUrl);
|
|
|
|
|
let info = this._prepareRequest(verb, parsedUrl, headers);
|
|
|
|
|
// Only perform retries on reads since writes may not be idempotent.
|
|
|
|
|
let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1
|
|
|
|
@ -7240,7 +7240,7 @@ class HttpClient {
|
|
|
|
|
// if there's no location to redirect to, we won't
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
let parsedRedirectUrl = url.parse(redirectUrl);
|
|
|
|
|
let parsedRedirectUrl = new URL(redirectUrl);
|
|
|
|
|
if (parsedUrl.protocol == 'https:' &&
|
|
|
|
|
parsedUrl.protocol != parsedRedirectUrl.protocol &&
|
|
|
|
|
!this._allowRedirectDowngrade) {
|
|
|
|
@ -7356,7 +7356,7 @@ class HttpClient {
|
|
|
|
|
* @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
|
|
|
|
|
*/
|
|
|
|
|
getAgent(serverUrl) {
|
|
|
|
|
let parsedUrl = url.parse(serverUrl);
|
|
|
|
|
let parsedUrl = new URL(serverUrl);
|
|
|
|
|
return this._getAgent(parsedUrl);
|
|
|
|
|
}
|
|
|
|
|
_prepareRequest(method, requestUrl, headers) {
|
|
|
|
@ -7429,7 +7429,7 @@ class HttpClient {
|
|
|
|
|
maxSockets: maxSockets,
|
|
|
|
|
keepAlive: this._keepAlive,
|
|
|
|
|
proxy: {
|
|
|
|
|
proxyAuth: proxyUrl.auth,
|
|
|
|
|
proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`,
|
|
|
|
|
host: proxyUrl.hostname,
|
|
|
|
|
port: proxyUrl.port
|
|
|
|
|
}
|
|
|
|
@ -7524,12 +7524,8 @@ class HttpClient {
|
|
|
|
|
else {
|
|
|
|
|
msg = 'Failed request: (' + statusCode + ')';
|
|
|
|
|
}
|
|
|
|
|
let err = new Error(msg);
|
|
|
|
|
// attach statusCode and body obj (if available) to the error object
|
|
|
|
|
err['statusCode'] = statusCode;
|
|
|
|
|
if (response.result) {
|
|
|
|
|
err['result'] = response.result;
|
|
|
|
|
}
|
|
|
|
|
let err = new HttpClientError(msg, statusCode);
|
|
|
|
|
err.result = response.result;
|
|
|
|
|
reject(err);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|