new build

This commit is contained in:
Trent Jones
2020-05-28 11:25:42 -05:00
parent 84f259d626
commit 27fa13ebc8

488
dist/index.js vendored
View File

@@ -704,12 +704,7 @@ function getPromiseCtor(promiseCtor) {
//# sourceMappingURL=Observable.js.map
/***/ }),
/* 34 */
/***/ (function(module) {
module.exports = require("https");
/***/ }),
/* 34 */,
/* 35 */,
/* 36 */,
/* 37 */,
@@ -921,7 +916,7 @@ var skip_1 = __webpack_require__(230);
exports.skip = skip_1.skip;
var skipLast_1 = __webpack_require__(744);
exports.skipLast = skipLast_1.skipLast;
var skipUntil_1 = __webpack_require__(497);
var skipUntil_1 = __webpack_require__(120);
exports.skipUntil = skipUntil_1.skipUntil;
var skipWhile_1 = __webpack_require__(101);
exports.skipWhile = skipWhile_1.skipWhile;
@@ -2520,13 +2515,21 @@ const windowsRelease = release => {
const ver = (version || [])[0];
// Server 2008, 2012 and 2016 versions are ambiguous with desktop versions and must be detected at runtime.
// Server 2008, 2012, 2016, and 2019 versions are ambiguous with desktop versions and must be detected at runtime.
// If `release` is omitted or we're on a Windows system, and the version number is an ambiguous version
// then use `wmic` to get the OS caption: https://msdn.microsoft.com/en-us/library/aa394531(v=vs.85).aspx
// If the resulting caption contains the year 2008, 2012 or 2016, it is a server version, so return a server OS name.
// If `wmic` is obsoloete (later versions of Windows 10), use PowerShell instead.
// If the resulting caption contains the year 2008, 2012, 2016 or 2019, it is a server version, so return a server OS name.
if ((!release || release === os.release()) && ['6.1', '6.2', '6.3', '10.0'].includes(ver)) {
const stdout = execa.sync('wmic', ['os', 'get', 'Caption']).stdout || '';
const year = (stdout.match(/2008|2012|2016/) || [])[0];
let stdout;
try {
stdout = execa.sync('powershell', ['(Get-CimInstance -ClassName Win32_OperatingSystem).caption']).stdout || '';
} catch (_) {
stdout = execa.sync('wmic', ['os', 'get', 'Caption']).stdout || '';
}
const year = (stdout.match(/2008|2012|2016|2019/) || [])[0];
if (year) {
return `Server ${year}`;
}
@@ -3801,7 +3804,74 @@ module.exports.default = macosRelease;
/***/ }),
/* 119 */,
/* 120 */,
/* 120 */
/***/ (function(__unusedmodule, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var OuterSubscriber_1 = __webpack_require__(565);
var InnerSubscriber_1 = __webpack_require__(668);
var subscribeToResult_1 = __webpack_require__(591);
function skipUntil(notifier) {
return function (source) { return source.lift(new SkipUntilOperator(notifier)); };
}
exports.skipUntil = skipUntil;
var SkipUntilOperator = (function () {
function SkipUntilOperator(notifier) {
this.notifier = notifier;
}
SkipUntilOperator.prototype.call = function (destination, source) {
return source.subscribe(new SkipUntilSubscriber(destination, this.notifier));
};
return SkipUntilOperator;
}());
var SkipUntilSubscriber = (function (_super) {
__extends(SkipUntilSubscriber, _super);
function SkipUntilSubscriber(destination, notifier) {
var _this = _super.call(this, destination) || this;
_this.hasValue = false;
var innerSubscriber = new InnerSubscriber_1.InnerSubscriber(_this, undefined, undefined);
_this.add(innerSubscriber);
_this.innerSubscription = innerSubscriber;
var innerSubscription = subscribeToResult_1.subscribeToResult(_this, notifier, undefined, undefined, innerSubscriber);
if (innerSubscription !== innerSubscriber) {
_this.add(innerSubscription);
_this.innerSubscription = innerSubscription;
}
return _this;
}
SkipUntilSubscriber.prototype._next = function (value) {
if (this.hasValue) {
_super.prototype._next.call(this, value);
}
};
SkipUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
this.hasValue = true;
if (this.innerSubscription) {
this.innerSubscription.unsubscribe();
}
};
SkipUntilSubscriber.prototype.notifyComplete = function () {
};
return SkipUntilSubscriber;
}(OuterSubscriber_1.OuterSubscriber));
//# sourceMappingURL=skipUntil.js.map
/***/ }),
/* 121 */,
/* 122 */,
/* 123 */,
@@ -4829,7 +4899,7 @@ var EverySubscriber = (function (_super) {
var net = __webpack_require__(631);
var tls = __webpack_require__(16);
var http = __webpack_require__(605);
var https = __webpack_require__(34);
var https = __webpack_require__(211);
var events = __webpack_require__(614);
var assert = __webpack_require__(357);
var util = __webpack_require__(669);
@@ -6225,32 +6295,9 @@ exports.toArray = toArray;
/* 209 */,
/* 210 */,
/* 211 */
/***/ (function(__unusedmodule, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var osName = _interopDefault(__webpack_require__(2));
function getUserAgent() {
try {
return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;
} catch (error) {
if (/wmic os get Caption/.test(error.message)) {
return "Windows <version undetectable>";
}
return "<environment undetectable>";
}
}
exports.getUserAgent = getUserAgent;
//# sourceMappingURL=index.js.map
/***/ (function(module) {
module.exports = require("https");
/***/ }),
/* 212 */,
@@ -6437,8 +6484,8 @@ exports.QueueAction = QueueAction;
Object.defineProperty(exports, "__esModule", { value: true });
const rxjs_1 = __webpack_require__(931);
const graphql_1 = __webpack_require__(898);
const operators_1 = __webpack_require__(43);
const graphql_1 = __webpack_require__(767);
const mutation = `
mutation deletePackageVersion($packageVersionId: String!) {
deletePackageVersion(input: {packageVersionId: $packageVersionId}) {
@@ -6446,10 +6493,9 @@ const mutation = `
}
}`;
function deletePackageVersion(packageVersionId, token) {
return rxjs_1.from(graphql_1.graphql(mutation, {
return rxjs_1.from(graphql_1.graphql(token, mutation, {
packageVersionId,
headers: {
authorization: `token ${token}`,
Accept: 'application/vnd.github.package-deletes-preview+json'
}
})).pipe(operators_1.catchError((err) => {
@@ -7500,7 +7546,7 @@ var AuditSubscriber = (function (_super) {
module.exports = authenticationRequestError;
const { RequestError } = __webpack_require__(463);
const { RequestError } = __webpack_require__(497);
function authenticationRequestError(state, error, options) {
if (!error.headers) throw error;
@@ -7568,7 +7614,7 @@ function authenticationRequestError(state, error, options) {
module.exports = parseOptions;
const { Deprecation } = __webpack_require__(692);
const { getUserAgent } = __webpack_require__(796);
const { getUserAgent } = __webpack_require__(619);
const once = __webpack_require__(969);
const pkg = __webpack_require__(215);
@@ -8485,7 +8531,7 @@ exports.Notification = Notification;
module.exports = validate;
const { RequestError } = __webpack_require__(463);
const { RequestError } = __webpack_require__(497);
const get = __webpack_require__(854);
const set = __webpack_require__(883);
@@ -8640,7 +8686,7 @@ function validate(octokit, options) {
module.exports = authenticationRequestError;
const { RequestError } = __webpack_require__(463);
const { RequestError } = __webpack_require__(497);
function authenticationRequestError(state, error, options) {
/* istanbul ignore next */
@@ -8816,7 +8862,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
var Stream = _interopDefault(__webpack_require__(413));
var http = _interopDefault(__webpack_require__(605));
var Url = _interopDefault(__webpack_require__(835));
var https = _interopDefault(__webpack_require__(34));
var https = _interopDefault(__webpack_require__(211));
var zlib = _interopDefault(__webpack_require__(761));
// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js
@@ -10739,7 +10785,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var isPlainObject = _interopDefault(__webpack_require__(626));
var universalUserAgent = __webpack_require__(562);
var universalUserAgent = __webpack_require__(796);
function lowercaseKeys(object) {
if (!object) {
@@ -11089,7 +11135,7 @@ function withDefaults(oldDefaults, newDefaults) {
});
}
const VERSION = "5.5.3";
const VERSION = "6.0.1";
const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url.
// So we use RequestParameters and add method as additional required property.
@@ -12733,13 +12779,15 @@ class GitHub extends rest_1.Octokit {
static getOctokitOptions(args) {
const token = args[0];
const options = Object.assign({}, args[1]); // Shallow clone - don't mutate the object provided by the caller
// Base URL - GHES or Dotcom
options.baseUrl = options.baseUrl || this.getApiBaseUrl();
// Auth
const auth = GitHub.getAuthString(token, options);
if (auth) {
options.auth = auth;
}
// Proxy
const agent = GitHub.getProxyAgent(options);
const agent = GitHub.getProxyAgent(options.baseUrl, options);
if (agent) {
// Shallow clone - don't mutate the object provided by the caller
options.request = options.request ? Object.assign({}, options.request) : {};
@@ -12750,6 +12798,7 @@ class GitHub extends rest_1.Octokit {
}
static getGraphQL(args) {
const defaults = {};
defaults.baseUrl = this.getGraphQLBaseUrl();
const token = args[0];
const options = args[1];
// Authorization
@@ -12760,7 +12809,7 @@ class GitHub extends rest_1.Octokit {
};
}
// Proxy
const agent = GitHub.getProxyAgent(options);
const agent = GitHub.getProxyAgent(defaults.baseUrl, options);
if (agent) {
defaults.request = { agent };
}
@@ -12776,17 +12825,31 @@ class GitHub extends rest_1.Octokit {
}
return typeof options.auth === 'string' ? options.auth : `token ${token}`;
}
static getProxyAgent(options) {
static getProxyAgent(destinationUrl, options) {
var _a;
if (!((_a = options.request) === null || _a === void 0 ? void 0 : _a.agent)) {
const serverUrl = 'https://api.github.com';
if (httpClient.getProxyUrl(serverUrl)) {
if (httpClient.getProxyUrl(destinationUrl)) {
const hc = new httpClient.HttpClient();
return hc.getAgent(serverUrl);
return hc.getAgent(destinationUrl);
}
}
return undefined;
}
static getApiBaseUrl() {
return process.env['GITHUB_API_URL'] || 'https://api.github.com';
}
static getGraphQLBaseUrl() {
let url = process.env['GITHUB_GRAPHQL_URL'] || 'https://api.github.com/graphql';
// Shouldn't be a trailing slash, but remove if so
if (url.endsWith('/')) {
url = url.substr(0, url.length - 1);
}
// Remove trailing "/graphql"
if (url.toUpperCase().endsWith('/GRAPHQL')) {
url = url.substr(0, url.length - '/graphql'.length);
}
return url;
}
}
exports.GitHub = GitHub;
//# sourceMappingURL=github.js.map
@@ -13299,67 +13362,61 @@ exports.isArray = (function () { return Array.isArray || (function (x) { return
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var deprecation = __webpack_require__(692);
var once = _interopDefault(__webpack_require__(969));
const logOnce = once(deprecation => console.warn(deprecation));
/**
* Error with extra properties to help with debugging
*/
class RequestError extends Error {
constructor(message, statusCode, options) {
super(message); // Maintains proper stack trace (only available on V8)
/* istanbul ignore next */
if (Error.captureStackTrace) {
Error.captureStackTrace(this, this.constructor);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var OuterSubscriber_1 = __webpack_require__(565);
var InnerSubscriber_1 = __webpack_require__(668);
var subscribeToResult_1 = __webpack_require__(591);
function skipUntil(notifier) {
return function (source) { return source.lift(new SkipUntilOperator(notifier)); };
this.name = "HttpError";
this.status = statusCode;
Object.defineProperty(this, "code", {
get() {
logOnce(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`."));
return statusCode;
}
});
this.headers = options.headers || {}; // redact request credentials without mutating original request options
const requestCopy = Object.assign({}, options.request);
if (options.request.headers.authorization) {
requestCopy.headers = Object.assign({}, options.request.headers, {
authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]")
});
}
requestCopy.url = requestCopy.url // client_id & client_secret can be passed as URL query parameters to increase rate limit
// see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications
.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") // OAuth tokens can be passed as URL query parameters, although it is not recommended
// see https://developer.github.com/v3/#oauth2-token-sent-in-a-header
.replace(/\baccess_token=\w+/g, "access_token=[REDACTED]");
this.request = requestCopy;
}
}
exports.skipUntil = skipUntil;
var SkipUntilOperator = (function () {
function SkipUntilOperator(notifier) {
this.notifier = notifier;
}
SkipUntilOperator.prototype.call = function (destination, source) {
return source.subscribe(new SkipUntilSubscriber(destination, this.notifier));
};
return SkipUntilOperator;
}());
var SkipUntilSubscriber = (function (_super) {
__extends(SkipUntilSubscriber, _super);
function SkipUntilSubscriber(destination, notifier) {
var _this = _super.call(this, destination) || this;
_this.hasValue = false;
var innerSubscriber = new InnerSubscriber_1.InnerSubscriber(_this, undefined, undefined);
_this.add(innerSubscriber);
_this.innerSubscription = innerSubscriber;
var innerSubscription = subscribeToResult_1.subscribeToResult(_this, notifier, undefined, undefined, innerSubscriber);
if (innerSubscription !== innerSubscriber) {
_this.add(innerSubscription);
_this.innerSubscription = innerSubscription;
}
return _this;
}
SkipUntilSubscriber.prototype._next = function (value) {
if (this.hasValue) {
_super.prototype._next.call(this, value);
}
};
SkipUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
this.hasValue = true;
if (this.innerSubscription) {
this.innerSubscription.unsubscribe();
}
};
SkipUntilSubscriber.prototype.notifyComplete = function () {
};
return SkipUntilSubscriber;
}(OuterSubscriber_1.OuterSubscriber));
//# sourceMappingURL=skipUntil.js.map
exports.RequestError = RequestError;
//# sourceMappingURL=index.js.map
/***/ }),
/* 498 */,
@@ -14129,7 +14186,7 @@ exports.publishReplay = publishReplay;
Object.defineProperty(exports, "__esModule", { value: true });
const url = __webpack_require__(835);
const http = __webpack_require__(605);
const https = __webpack_require__(34);
const https = __webpack_require__(211);
const pm = __webpack_require__(950);
let tunnel;
var HttpCodes;
@@ -14155,6 +14212,7 @@ var HttpCodes;
HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout";
HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict";
HttpCodes[HttpCodes["Gone"] = 410] = "Gone";
HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests";
HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError";
HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented";
HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway";
@@ -14179,8 +14237,18 @@ function getProxyUrl(serverUrl) {
return proxyUrl ? proxyUrl.href : '';
}
exports.getProxyUrl = getProxyUrl;
const HttpRedirectCodes = [HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, HttpCodes.SeeOther, HttpCodes.TemporaryRedirect, HttpCodes.PermanentRedirect];
const HttpResponseRetryCodes = [HttpCodes.BadGateway, HttpCodes.ServiceUnavailable, HttpCodes.GatewayTimeout];
const HttpRedirectCodes = [
HttpCodes.MovedPermanently,
HttpCodes.ResourceMoved,
HttpCodes.SeeOther,
HttpCodes.TemporaryRedirect,
HttpCodes.PermanentRedirect
];
const HttpResponseRetryCodes = [
HttpCodes.BadGateway,
HttpCodes.ServiceUnavailable,
HttpCodes.GatewayTimeout
];
const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];
const ExponentialBackoffCeiling = 10;
const ExponentialBackoffTimeSlice = 5;
@@ -14305,18 +14373,22 @@ class HttpClient {
*/
async request(verb, requestUrl, data, headers) {
if (this._disposed) {
throw new Error("Client has already been disposed.");
throw new Error('Client has already been disposed.');
}
let parsedUrl = url.parse(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) ? this._maxRetries + 1 : 1;
let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1
? this._maxRetries + 1
: 1;
let numTries = 0;
let response;
while (numTries < maxTries) {
response = await this.requestRaw(info, data);
// Check if it's an authentication challenge
if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) {
if (response &&
response.message &&
response.message.statusCode === HttpCodes.Unauthorized) {
let authenticationHandler;
for (let i = 0; i < this.handlers.length; i++) {
if (this.handlers[i].canHandleAuthentication(response)) {
@@ -14334,21 +14406,32 @@ class HttpClient {
}
}
let redirectsRemaining = this._maxRedirects;
while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1
&& this._allowRedirects
&& redirectsRemaining > 0) {
const redirectUrl = response.message.headers["location"];
while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 &&
this._allowRedirects &&
redirectsRemaining > 0) {
const redirectUrl = response.message.headers['location'];
if (!redirectUrl) {
// if there's no location to redirect to, we won't
break;
}
let parsedRedirectUrl = url.parse(redirectUrl);
if (parsedUrl.protocol == 'https:' && parsedUrl.protocol != parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) {
throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.");
if (parsedUrl.protocol == 'https:' &&
parsedUrl.protocol != parsedRedirectUrl.protocol &&
!this._allowRedirectDowngrade) {
throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');
}
// we need to finish reading the response before reassigning response
// which will leak the open socket.
await response.readBody();
// strip authorization header if redirected to a different hostname
if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {
for (let header in headers) {
// header names are case insensitive
if (header.toLowerCase() === 'authorization') {
delete headers[header];
}
}
}
// let's make the request with the new redirectUrl
info = this._prepareRequest(verb, parsedRedirectUrl, headers);
response = await this.requestRaw(info, data);
@@ -14399,8 +14482,8 @@ class HttpClient {
*/
requestRawWithCallback(info, data, onResult) {
let socket;
if (typeof (data) === 'string') {
info.options.headers["Content-Length"] = Buffer.byteLength(data, 'utf8');
if (typeof data === 'string') {
info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');
}
let callbackCalled = false;
let handleResult = (err, res) => {
@@ -14413,7 +14496,7 @@ class HttpClient {
let res = new HttpClientResponse(msg);
handleResult(null, res);
});
req.on('socket', (sock) => {
req.on('socket', sock => {
socket = sock;
});
// If we ever get disconnected, we want the socket to timeout eventually
@@ -14428,10 +14511,10 @@ class HttpClient {
// res should have headers
handleResult(err, null);
});
if (data && typeof (data) === 'string') {
if (data && typeof data === 'string') {
req.write(data, 'utf8');
}
if (data && typeof (data) !== 'string') {
if (data && typeof data !== 'string') {
data.on('close', function () {
req.end();
});
@@ -14458,31 +14541,34 @@ class HttpClient {
const defaultPort = usingSsl ? 443 : 80;
info.options = {};
info.options.host = info.parsedUrl.hostname;
info.options.port = info.parsedUrl.port ? parseInt(info.parsedUrl.port) : defaultPort;
info.options.path = (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');
info.options.port = info.parsedUrl.port
? parseInt(info.parsedUrl.port)
: defaultPort;
info.options.path =
(info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');
info.options.method = method;
info.options.headers = this._mergeHeaders(headers);
if (this.userAgent != null) {
info.options.headers["user-agent"] = this.userAgent;
info.options.headers['user-agent'] = this.userAgent;
}
info.options.agent = this._getAgent(info.parsedUrl);
// gives handlers an opportunity to participate
if (this.handlers) {
this.handlers.forEach((handler) => {
this.handlers.forEach(handler => {
handler.prepareRequest(info.options);
});
}
return info;
}
_mergeHeaders(headers) {
const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {});
const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});
if (this.requestOptions && this.requestOptions.headers) {
return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers));
}
return lowercaseKeys(headers || {});
}
_getExistingOrDefaultHeader(additionalHeaders, header, _default) {
const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {});
const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});
let clientHeader;
if (this.requestOptions && this.requestOptions.headers) {
clientHeader = lowercaseKeys(this.requestOptions.headers)[header];
@@ -14520,7 +14606,7 @@ class HttpClient {
proxyAuth: proxyUrl.auth,
host: proxyUrl.hostname,
port: proxyUrl.port
},
}
};
let tunnelAgent;
const overHttps = proxyUrl.protocol === 'https:';
@@ -14547,7 +14633,9 @@ class HttpClient {
// we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
// http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
// we have to cast it to any and change it directly
agent.options = Object.assign(agent.options || {}, { rejectUnauthorized: false });
agent.options = Object.assign(agent.options || {}, {
rejectUnauthorized: false
});
}
return agent;
}
@@ -14608,7 +14696,7 @@ class HttpClient {
msg = contents;
}
else {
msg = "Failed request: (" + statusCode + ")";
msg = 'Failed request: (' + statusCode + ')';
}
let err = new Error(msg);
// attach statusCode and body obj (if available) to the error object
@@ -15115,35 +15203,7 @@ function defaultErrorFactory() {
/***/ }),
/* 560 */,
/* 561 */,
/* 562 */
/***/ (function(__unusedmodule, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var osName = _interopDefault(__webpack_require__(2));
function getUserAgent() {
try {
return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;
} catch (error) {
if (/wmic os get Caption/.test(error.message)) {
return "Windows <version undetectable>";
}
return "<environment undetectable>";
}
}
exports.getUserAgent = getUserAgent;
//# sourceMappingURL=index.js.map
/***/ }),
/* 562 */,
/* 563 */
/***/ (function(module, __unusedexports, __webpack_require__) {
@@ -16100,9 +16160,9 @@ exports.zip = zip;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const graphql_1 = __webpack_require__(898);
const rxjs_1 = __webpack_require__(931);
const operators_1 = __webpack_require__(43);
const graphql_1 = __webpack_require__(767);
const query = `
query getVersions($owner: String!, $repo: String!, $package: String!, $last: Int!) {
repository(owner: $owner, name: $repo) {
@@ -16124,13 +16184,12 @@ const query = `
}
}`;
function queryForOldestVersions(owner, repo, packageName, numVersions, token) {
return rxjs_1.from(graphql_1.graphql(query, {
return rxjs_1.from(graphql_1.graphql(token, query, {
owner,
repo,
package: packageName,
last: numVersions,
headers: {
authorization: `token ${token}`,
Accept: 'application/vnd.github.packages-preview+json'
}
})).pipe(operators_1.catchError((err) => {
@@ -16394,7 +16453,35 @@ exports.EmptyError = EmptyErrorImpl;
//# sourceMappingURL=EmptyError.js.map
/***/ }),
/* 619 */,
/* 619 */
/***/ (function(__unusedmodule, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var osName = _interopDefault(__webpack_require__(2));
function getUserAgent() {
try {
return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;
} catch (error) {
if (/wmic os get Caption/.test(error.message)) {
return "Windows <version undetectable>";
}
throw error;
}
}
exports.getUserAgent = getUserAgent;
//# sourceMappingURL=index.js.map
/***/ }),
/* 620 */
/***/ (function(__unusedmodule, exports, __webpack_require__) {
@@ -18341,12 +18428,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var endpoint = __webpack_require__(385);
var universalUserAgent = __webpack_require__(211);
var universalUserAgent = __webpack_require__(796);
var isPlainObject = _interopDefault(__webpack_require__(548));
var nodeFetch = _interopDefault(__webpack_require__(369));
var requestError = __webpack_require__(463);
const VERSION = "5.3.2";
const VERSION = "5.4.2";
function getBufferResponse(response) {
return response.arrayBuffer();
@@ -18646,7 +18733,39 @@ exports.AsapScheduler = AsapScheduler;
//# sourceMappingURL=AsapScheduler.js.map
/***/ }),
/* 767 */,
/* 767 */
/***/ (function(__unusedmodule, exports, __webpack_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const github_1 = __webpack_require__(469);
/**
* Sends a GraphQL query request based on endpoint options
*
* @param {string} token Auth token
* @param {string} query GraphQL query. Example: `'query { viewer { login } }'`.
* @param {object} parameters URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
*/
function graphql(token, query, parameters) {
return __awaiter(this, void 0, void 0, function* () {
const github = new github_1.GitHub(token);
return yield github.graphql(query, parameters);
});
}
exports.graphql = graphql;
/***/ }),
/* 768 */
/***/ (function(module) {
@@ -18993,7 +19112,7 @@ function getUserAgent() {
return "Windows <version undetectable>";
}
throw error;
return "<environment undetectable>";
}
}
@@ -35615,7 +35734,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
var request = __webpack_require__(753);
var universalUserAgent = __webpack_require__(796);
const VERSION = "4.3.1";
const VERSION = "4.4.0";
class GraphqlError extends Error {
constructor(request, response) {
@@ -35634,7 +35753,7 @@ class GraphqlError extends Error {
}
const NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query"];
const NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query", "mediaType"];
function graphql(request, query, options) {
options = typeof query === "string" ? options = Object.assign({
query
@@ -36266,12 +36385,10 @@ function getProxyUrl(reqUrl) {
}
let proxyVar;
if (usingSsl) {
proxyVar = process.env["https_proxy"] ||
process.env["HTTPS_PROXY"];
proxyVar = process.env['https_proxy'] || process.env['HTTPS_PROXY'];
}
else {
proxyVar = process.env["http_proxy"] ||
process.env["HTTP_PROXY"];
proxyVar = process.env['http_proxy'] || process.env['HTTP_PROXY'];
}
if (proxyVar) {
proxyUrl = url.parse(proxyVar);
@@ -36283,7 +36400,7 @@ function checkBypass(reqUrl) {
if (!reqUrl.hostname) {
return false;
}
let noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || '';
let noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';
if (!noProxy) {
return false;
}
@@ -36304,7 +36421,10 @@ function checkBypass(reqUrl) {
upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);
}
// Compare request host against noproxy
for (let upperNoProxyItem of noProxy.split(',').map(x => x.trim().toUpperCase()).filter(x => x)) {
for (let upperNoProxyItem of noProxy
.split(',')
.map(x => x.trim().toUpperCase())
.filter(x => x)) {
if (upperReqHosts.some(x => x === upperNoProxyItem)) {
return true;
}