Updating NPM dependencies

This commit is contained in:
Drew Heavner
2020-11-11 13:30:52 +00:00
committed by GitHub
parent 7a6fb66c63
commit bd487ef324
9068 changed files with 1400893 additions and 587661 deletions

129
node_modules/gaxios/CHANGELOG.md generated vendored
View File

@@ -1,5 +1,134 @@
# Changelog
### [4.0.1](https://www.github.com/googleapis/gaxios/compare/v4.0.0...v4.0.1) (2020-10-27)
### Bug Fixes
* prevent bonus ? with empty qs params ([#357](https://www.github.com/googleapis/gaxios/issues/357)) ([b155f76](https://www.github.com/googleapis/gaxios/commit/b155f76cbc4c234da1d99c26691296702342c205))
## [4.0.0](https://www.github.com/googleapis/gaxios/compare/v3.2.0...v4.0.0) (2020-10-21)
### ⚠ BREAKING CHANGES
* parameters in `url` and parameters provided via params will now be combined.
### Bug Fixes
* drop requirement on URL/combine url and params ([#338](https://www.github.com/googleapis/gaxios/issues/338)) ([e166bc6](https://www.github.com/googleapis/gaxios/commit/e166bc6721fd979070ab3d9c69b71ffe9ee061c7))
## [3.2.0](https://www.github.com/googleapis/gaxios/compare/v3.1.0...v3.2.0) (2020-09-14)
### Features
* add initial retry delay, and set default to 100ms ([#336](https://www.github.com/googleapis/gaxios/issues/336)) ([870326b](https://www.github.com/googleapis/gaxios/commit/870326b8245f16fafde0b0c32cfd2f277946e3a1))
## [3.1.0](https://www.github.com/googleapis/gaxios/compare/v3.0.4...v3.1.0) (2020-07-30)
### Features
* pass default adapter to adapter option ([#319](https://www.github.com/googleapis/gaxios/issues/319)) ([cf06bd9](https://www.github.com/googleapis/gaxios/commit/cf06bd9f51cbe707ed5973e390d31a091d4537c1))
### [3.0.4](https://www.github.com/googleapis/gaxios/compare/v3.0.3...v3.0.4) (2020-07-09)
### Bug Fixes
* typeo in nodejs .gitattribute ([#306](https://www.github.com/googleapis/gaxios/issues/306)) ([8514672](https://www.github.com/googleapis/gaxios/commit/8514672f9d56bc6f077dcbab050b3342d4e343c6))
### [3.0.3](https://www.github.com/googleapis/gaxios/compare/v3.0.2...v3.0.3) (2020-04-20)
### Bug Fixes
* apache license URL ([#468](https://www.github.com/googleapis/gaxios/issues/468)) ([#272](https://www.github.com/googleapis/gaxios/issues/272)) ([cf1b7cb](https://www.github.com/googleapis/gaxios/commit/cf1b7cb66e4c98405236834e63349931b4f35b90))
### [3.0.2](https://www.github.com/googleapis/gaxios/compare/v3.0.1...v3.0.2) (2020-03-24)
### Bug Fixes
* continue replacing application/x-www-form-urlencoded with application/json ([#263](https://www.github.com/googleapis/gaxios/issues/263)) ([dca176d](https://www.github.com/googleapis/gaxios/commit/dca176df0990f2c22255f9764405c496ea07ada2))
### [3.0.1](https://www.github.com/googleapis/gaxios/compare/v3.0.0...v3.0.1) (2020-03-23)
### Bug Fixes
* allow an alternate JSON content-type to be set ([#257](https://www.github.com/googleapis/gaxios/issues/257)) ([698a29f](https://www.github.com/googleapis/gaxios/commit/698a29ff3b22f30ea99ad190c4592940bef88f1f))
## [3.0.0](https://www.github.com/googleapis/gaxios/compare/v2.3.2...v3.0.0) (2020-03-19)
### ⚠ BREAKING CHANGES
* **deps:** TypeScript introduced breaking changes in generated code in 3.7.x
* drop Node 8 from engines field (#254)
### Features
* drop Node 8 from engines field ([#254](https://www.github.com/googleapis/gaxios/issues/254)) ([8c9fff7](https://www.github.com/googleapis/gaxios/commit/8c9fff7f92f70f029292c906c62d194c1d58827d))
* **deps:** updates to latest TypeScript ([#253](https://www.github.com/googleapis/gaxios/issues/253)) ([054267b](https://www.github.com/googleapis/gaxios/commit/054267bf12e1801c134e3b5cae92dcc5ea041fab))
### [2.3.2](https://www.github.com/googleapis/gaxios/compare/v2.3.1...v2.3.2) (2020-02-28)
### Bug Fixes
* update github repo in package ([#239](https://www.github.com/googleapis/gaxios/issues/239)) ([7e750cb](https://www.github.com/googleapis/gaxios/commit/7e750cbaaa59812817d725c74fb9d364c4b71096))
### [2.3.1](https://www.github.com/googleapis/gaxios/compare/v2.3.0...v2.3.1) (2020-02-13)
### Bug Fixes
* **deps:** update dependency https-proxy-agent to v5 ([#233](https://www.github.com/googleapis/gaxios/issues/233)) ([56de0a8](https://www.github.com/googleapis/gaxios/commit/56de0a824a2f9622e3e4d4bdd41adccd812a30b4))
## [2.3.0](https://www.github.com/googleapis/gaxios/compare/v2.2.2...v2.3.0) (2020-01-31)
### Features
* add promise support for onRetryAttempt and shouldRetry ([#223](https://www.github.com/googleapis/gaxios/issues/223)) ([061afa3](https://www.github.com/googleapis/gaxios/commit/061afa381a51d39823e63accf3dacd16e191f3b9))
### [2.2.2](https://www.github.com/googleapis/gaxios/compare/v2.2.1...v2.2.2) (2020-01-08)
### Bug Fixes
* **build:** add publication configuration ([#218](https://www.github.com/googleapis/gaxios/issues/218)) ([43e581f](https://www.github.com/googleapis/gaxios/commit/43e581ff4ed5e79d72f6f29748a5eebb6bff1229))
### [2.2.1](https://www.github.com/googleapis/gaxios/compare/v2.2.0...v2.2.1) (2020-01-04)
### Bug Fixes
* **deps:** update dependency https-proxy-agent to v4 ([#201](https://www.github.com/googleapis/gaxios/issues/201)) ([5cdeef2](https://www.github.com/googleapis/gaxios/commit/5cdeef288a0c5c544c0dc2659aafbb2215d06c4b))
* remove retryDelay option ([#203](https://www.github.com/googleapis/gaxios/issues/203)) ([d21e08d](https://www.github.com/googleapis/gaxios/commit/d21e08d2aada980d39bc5ca7093d54452be2d646))
## [2.2.0](https://www.github.com/googleapis/gaxios/compare/v2.1.1...v2.2.0) (2019-12-05)
### Features
* populate GaxiosResponse with raw response information (res.url) ([#189](https://www.github.com/googleapis/gaxios/issues/189)) ([53a7f54](https://www.github.com/googleapis/gaxios/commit/53a7f54cc0f20320d7a6a21a9a9f36050cec2eec))
### Bug Fixes
* don't retry a request that is aborted intentionally ([#190](https://www.github.com/googleapis/gaxios/issues/190)) ([ba9777b](https://www.github.com/googleapis/gaxios/commit/ba9777b15b5262f8288a8bb3cca49a1de8427d8e))
* **deps:** pin TypeScript below 3.7.0 ([5373f07](https://www.github.com/googleapis/gaxios/commit/5373f0793a765965a8221ecad2f99257ed1b7444))
### [2.1.1](https://www.github.com/googleapis/gaxios/compare/v2.1.0...v2.1.1) (2019-11-15)
### Bug Fixes
* **docs:** snippets are now replaced in jsdoc comments ([#183](https://www.github.com/googleapis/gaxios/issues/183)) ([8dd1324](https://www.github.com/googleapis/gaxios/commit/8dd1324256590bd2f2e9015c813950e1cd8cb330))
## [2.1.0](https://www.github.com/googleapis/gaxios/compare/v2.0.3...v2.1.0) (2019-10-09)

32
node_modules/gaxios/README.md generated vendored
View File

@@ -50,7 +50,14 @@ gaxios.request({url: '/data'}).then(...);
// The HTTP methods to be sent with the request.
headers: { 'some': 'header' },
// The data to base64 encode and send in the body of the request.
// The data to send in the body of the request. Data objects will be
// serialized as JSON.
//
// Note: if you would like to provide a Content-Type header other than
// application/json you you must provide a string or readable stream, rather
// than an object:
// data: JSON.stringify({some: 'data'})
// data: fs.readFile('./some-data.jpeg')
data: {
some: 'data'
},
@@ -80,11 +87,14 @@ gaxios.request({url: '/data'}).then(...);
timeout: 1000,
// Optional method to override making the actual HTTP request. Useful
// for writing tests.
adapter?: (options) => {
return {
data: 'your data'
}
// for writing tests and instrumentation
adapter?: async (options, defaultAdapter) => {
const res = await defaultAdapter(options);
res.data = {
...res.data,
extraProperty: 'your extra property',
};
return res;
};
// The expected return type of the request. Options are:
@@ -107,9 +117,6 @@ gaxios.request({url: '/data'}).then(...);
// The number of retries already attempted.
currentRetryAttempt?: number;
// The amount of time to initially delay the retry. Defaults to 100.
retryDelay?: number;
// The HTTP Methods that will be automatically retried.
// Defaults to ['GET','PUT','HEAD','OPTIONS','DELETE']
httpMethodsToRetry?: string[];
@@ -119,13 +126,16 @@ gaxios.request({url: '/data'}).then(...);
statusCodesToRetry?: number[][];
// Function to invoke when a retry attempt is made.
onRetryAttempt?: (err: GaxiosError) => void;
onRetryAttempt?: (err: GaxiosError) => Promise<void> | void;
// Function to invoke which determines if you should retry
shouldRetry?: (err: GaxiosError) => boolean;
shouldRetry?: (err: GaxiosError) => Promise<boolean> | boolean;
// When there is no response, the number of retries to attempt. Defaults to 2.
noResponseRetries?: number;
// The amount of time to initially delay the retry, in ms. Defaults to 100ms.
retryDelay?: number;
},
// Enables default configuration for retries.

View File

@@ -12,12 +12,16 @@ export interface Headers {
[index: string]: any;
}
export declare type GaxiosPromise<T = any> = Promise<GaxiosResponse<T>>;
export interface GaxiosXMLHttpRequest {
responseURL: string;
}
export interface GaxiosResponse<T = any> {
config: GaxiosOptions;
data: T;
status: number;
statusText: string;
headers: Headers;
request: GaxiosXMLHttpRequest;
}
/**
* Request options that are used to form the request.
@@ -27,7 +31,7 @@ export interface GaxiosOptions {
* Optional method to override making the actual HTTP request. Useful
* for writing tests.
*/
adapter?: <T = any>(options: GaxiosOptions) => GaxiosPromise<T>;
adapter?: <T = any>(options: GaxiosOptions, defaultAdapter: (options: GaxiosOptions) => GaxiosPromise<T>) => GaxiosPromise<T>;
url?: string;
baseUrl?: string;
baseURL?: string;
@@ -71,7 +75,7 @@ export interface RetryConfig {
*/
currentRetryAttempt?: number;
/**
* The amount of time to initially delay the retry. Defaults to 100.
* The amount of time to initially delay the retry, in ms. Defaults to 100ms.
*/
retryDelay?: number;
/**
@@ -87,11 +91,11 @@ export interface RetryConfig {
/**
* Function to invoke when a retry attempt is made.
*/
onRetryAttempt?: (err: GaxiosError) => void;
onRetryAttempt?: (err: GaxiosError) => Promise<void> | void;
/**
* Function to invoke which determines if you should retry
*/
shouldRetry?: (err: GaxiosError) => boolean;
shouldRetry?: (err: GaxiosError) => Promise<boolean> | boolean;
/**
* When there is no response, the number of retries to attempt. Defaults to 2.
*/

View File

@@ -1,5 +1,5 @@
"use strict";
// Copyright 2018, Google, LLC.
// Copyright 2018 Google LLC
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
@@ -12,7 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
// tslint:disable no-any
exports.GaxiosError = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
class GaxiosError extends Error {
constructor(message, options, response) {
super(message);

View File

@@ -1 +1 @@
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/common.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAMjC,wBAAwB;AAExB,MAAa,WAAqB,SAAQ,KAAK;IAI7C,YACE,OAAe,EACf,OAAsB,EACtB,QAA2B;QAE3B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;IACzC,CAAC;CACF;AAdD,kCAcC"}
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/common.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAMjC,uDAAuD;AAEvD,MAAa,WAAqB,SAAQ,KAAK;IAI7C,YACE,OAAe,EACf,OAAsB,EACtB,QAA2B;QAE3B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;IACzC,CAAC;CACF;AAdD,kCAcC"}

View File

@@ -15,6 +15,7 @@ export declare class Gaxios {
* @param opts Set of HTTP options that will be used for this HTTP request.
*/
request<T = any>(opts?: GaxiosOptions): GaxiosPromise<T>;
private _defaultAdapter;
/**
* Internal, retryable version of the `request` method.
* @param opts Set of HTTP options that will be used for this HTTP request.

View File

@@ -1,5 +1,5 @@
"use strict";
// Copyright 2018, Google, LLC.
// Copyright 2018 Google LLC
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
@@ -15,26 +15,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Gaxios = void 0;
const extend_1 = __importDefault(require("extend"));
const node_fetch_1 = __importDefault(require("node-fetch"));
const querystring_1 = __importDefault(require("querystring"));
const is_stream_1 = __importDefault(require("is-stream"));
const url_1 = __importDefault(require("url"));
const common_1 = require("./common");
const retry_1 = require("./retry");
// tslint:disable no-any
const URL = hasURL() ? window.URL : url_1.default.URL;
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable node/no-unsupported-features/node-builtins */
const fetch = hasFetch() ? window.fetch : node_fetch_1.default;
function hasWindow() {
return typeof window !== 'undefined' && !!window;
}
function hasURL() {
return hasWindow() && !!window.URL;
}
function hasFetch() {
return hasWindow() && !!window.fetch;
}
// tslint:disable-next-line variable-name
let HttpsProxyAgent;
// Figure out if we should be using a proxy. Only if it's required, load
// the https-proxy-agent module as it adds startup cost.
@@ -66,6 +62,11 @@ class Gaxios {
opts = this.validateOpts(opts);
return this._request(opts);
}
async _defaultAdapter(opts) {
const res = await fetch(opts.url, opts);
const data = await this.getResponseData(opts, res);
return this.translateResponse(opts, res, data);
}
/**
* Internal, retryable version of the `request` method.
* @param opts Set of HTTP options that will be used for this HTTP request.
@@ -74,12 +75,10 @@ class Gaxios {
try {
let translatedResponse;
if (opts.adapter) {
translatedResponse = await opts.adapter(opts);
translatedResponse = await opts.adapter(opts, this._defaultAdapter.bind(this));
}
else {
const res = await fetch(opts.url, opts);
const data = await this.getResponseData(opts, res);
translatedResponse = this.translateResponse(opts, res, data);
translatedResponse = await this._defaultAdapter(opts);
}
if (!opts.validateStatus(translatedResponse.status)) {
throw new common_1.GaxiosError(`Request failed with status code ${translatedResponse.status}`, opts, translatedResponse);
@@ -101,13 +100,16 @@ class Gaxios {
switch (opts.responseType) {
case 'stream':
return res.body;
case 'json':
case 'json': {
let data = await res.text();
try {
data = JSON.parse(data);
}
catch (e) { }
catch (_a) {
// continue
}
return data;
}
case 'arraybuffer':
return res.arrayBuffer();
case 'blob':
@@ -130,15 +132,15 @@ class Gaxios {
if (baseUrl) {
opts.url = baseUrl + opts.url;
}
const parsedUrl = new URL(opts.url);
opts.url = `${parsedUrl.origin}${parsedUrl.pathname}`;
opts.params = extend_1.default(querystring_1.default.parse(parsedUrl.search.substr(1)), // removes leading ?
opts.params);
opts.paramsSerializer = opts.paramsSerializer || this.paramsSerializer;
if (opts.params) {
parsedUrl.search = opts.paramsSerializer(opts.params);
if (opts.params && Object.keys(opts.params).length > 0) {
let additionalQueryParams = opts.paramsSerializer(opts.params);
if (additionalQueryParams.startsWith('?')) {
additionalQueryParams = additionalQueryParams.slice(1);
}
const prefix = opts.url.includes('?') ? '&' : '?';
opts.url = opts.url + prefix + additionalQueryParams;
}
opts.url = parsedUrl.href;
if (typeof options.maxContentLength === 'number') {
opts.size = options.maxContentLength;
}
@@ -152,7 +154,18 @@ class Gaxios {
}
else if (typeof opts.data === 'object') {
opts.body = JSON.stringify(opts.data);
opts.headers['Content-Type'] = 'application/json';
// Allow the user to specifiy their own content type,
// such as application/json-patch+json; for historical reasons this
// content type must currently be a json type, as we are relying on
// application/x-www-form-urlencoded (which is incompatible with
// upstream GCP APIs) being rewritten to application/json.
//
// TODO: refactor upstream dependencies to stop relying on this
// side-effect.
if (!opts.headers['Content-Type'] ||
!opts.headers['Content-Type'].includes('json')) {
opts.headers['Content-Type'] = 'application/json';
}
}
else {
opts.body = opts.data;
@@ -202,6 +215,10 @@ class Gaxios {
headers,
status: res.status,
statusText: res.statusText,
// XMLHttpRequestLike
request: {
responseURL: res.url,
},
};
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,5 @@
"use strict";
// Copyright 2018, Google, LLC.
// Copyright 2018 Google LLC
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
@@ -12,10 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.request = exports.instance = exports.Gaxios = void 0;
const gaxios_1 = require("./gaxios");
exports.Gaxios = gaxios_1.Gaxios;
Object.defineProperty(exports, "Gaxios", { enumerable: true, get: function () { return gaxios_1.Gaxios; } });
var common_1 = require("./common");
exports.GaxiosError = common_1.GaxiosError;
Object.defineProperty(exports, "GaxiosError", { enumerable: true, get: function () { return common_1.GaxiosError; } });
/**
* The default instance used when the `request` method is directly
* invoked.

View File

@@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAGjC,qCAAgC;AASxB,iBATA,eAAM,CASA;AAPd,mCAMkB;AALhB,+BAAA,WAAW,CAAA;AAQb;;;GAGG;AACU,QAAA,QAAQ,GAAG,IAAI,eAAM,EAAE,CAAC;AAErC;;;GAGG;AACI,KAAK,UAAU,OAAO,CAAI,IAAmB;IAClD,OAAO,gBAAQ,CAAC,OAAO,CAAI,IAAI,CAAC,CAAC;AACnC,CAAC;AAFD,0BAEC"}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAGjC,qCAAgC;AASxB,uFATA,eAAM,OASA;AAPd,mCAMkB;AALhB,qGAAA,WAAW,OAAA;AAQb;;;GAGG;AACU,QAAA,QAAQ,GAAG,IAAI,eAAM,EAAE,CAAC;AAErC;;;GAGG;AACI,KAAK,UAAU,OAAO,CAAI,IAAmB;IAClD,OAAO,gBAAQ,CAAC,OAAO,CAAI,IAAI,CAAC,CAAC;AACnC,CAAC;AAFD,0BAEC"}

View File

@@ -1,5 +1,5 @@
"use strict";
// Copyright 2018, Google, LLC.
// Copyright 2018 Google LLC
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
@@ -12,7 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRetryConfig = void 0;
async function getRetryConfig(err) {
var _a;
let config = getConfig(err);
if (!err || !err.config || (!config && !err.config.retry)) {
return { shouldRetry: false };
@@ -21,7 +23,6 @@ async function getRetryConfig(err) {
config.currentRetryAttempt = config.currentRetryAttempt || 0;
config.retry =
config.retry === undefined || config.retry === null ? 3 : config.retry;
config.retryDelay = config.retryDelay || 100;
config.httpMethodsToRetry = config.httpMethodsToRetry || [
'GET',
'HEAD',
@@ -52,12 +53,14 @@ async function getRetryConfig(err) {
err.config.retryConfig = config;
// Determine if we should retry the request
const shouldRetryFn = config.shouldRetry || shouldRetryRequest;
if (!shouldRetryFn(err)) {
if (!(await shouldRetryFn(err))) {
return { shouldRetry: false, config: err.config };
}
// Calculate time to wait with exponential backoff.
// Formula: (2^c - 1 / 2) * 1000
const delay = ((Math.pow(2, config.currentRetryAttempt) - 1) / 2) * 1000;
// If this is the first retry, look for a configured retryDelay.
const retryDelay = config.currentRetryAttempt ? 0 : (_a = config.retryDelay) !== null && _a !== void 0 ? _a : 100;
// Formula: retryDelay + ((2^c - 1 / 2) * 1000)
const delay = retryDelay + ((Math.pow(2, config.currentRetryAttempt) - 1) / 2) * 1000;
// We're going to retry! Incremenent the counter.
err.config.retryConfig.currentRetryAttempt += 1;
// Create a promise that invokes the retry after the backOffDelay
@@ -79,6 +82,11 @@ exports.getRetryConfig = getRetryConfig;
*/
function shouldRetryRequest(err) {
const config = getConfig(err);
// node-fetch raises an AbortError if signaled:
// https://github.com/bitinn/node-fetch#request-cancellation-with-abortsignal
if (err.name === 'AbortError') {
return false;
}
// If there's no config, or retries are disabled, return.
if (!config || config.retry === 0) {
return false;

View File

@@ -1 +1 @@
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../../src/retry.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAI1B,KAAK,UAAU,cAAc,CAAC,GAAgB;IACnD,IAAI,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;IAC5B,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;QACzD,OAAO,EAAC,WAAW,EAAE,KAAK,EAAC,CAAC;KAC7B;IACD,MAAM,GAAG,MAAM,IAAI,EAAE,CAAC;IACtB,MAAM,CAAC,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,IAAI,CAAC,CAAC;IAC7D,MAAM,CAAC,KAAK;QACV,MAAM,CAAC,KAAK,KAAK,SAAS,IAAI,MAAM,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;IACzE,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,G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;QAClB,MAAM,CAAC,kBAAmB,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,EACvE;QACA,OAAO,KAAK,CAAC;KACd;IAED,2DAA2D;IAC3D,kCAAkC;IAClC,IAAI,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,EAAE;QACvC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,KAAK,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,kBAAmB,EAAE;YACnD,MAAM,MAAM,GAAG,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC;YACnC,IAAI,MAAM,IAAI,GAAG,IAAI,MAAM,IAAI,GAAG,EAAE;gBAClC,SAAS,GAAG,IAAI,CAAC;gBACjB,MAAM;aACP;SACF;QACD,IAAI,CAAC,SAAS,EAAE;YACd,OAAO,KAAK,CAAC;SACd;KACF;IAED,0CAA0C;IAC1C,MAAM,CAAC,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,IAAI,CAAC,CAAC;IAC7D,IAAI,MAAM,CAAC,mBAAmB,IAAI,MAAM,CAAC,KAAM,EAAE;QAC/C,OAAO,KAAK,CAAC;KACd;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;GAGG;AACH,SAAS,SAAS,CAAC,GAAgB;IACjC,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE;QAC/C,OAAO,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC;KAC/B;IACD,OAAO;AACT,CAAC"}

View File

View File

@@ -1,2 +0,0 @@
"use strict";
//# sourceMappingURL=web.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":""}

85
node_modules/gaxios/package.json generated vendored
View File

@@ -1,19 +1,19 @@
{
"_from": "gaxios@^2.1.0",
"_id": "gaxios@2.1.0",
"_from": "gaxios@^4.0.0",
"_id": "gaxios@4.0.1",
"_inBundle": false,
"_integrity": "sha512-Gtpb5sdQmb82sgVkT2GnS2n+Kx4dlFwbeMYcDlD395aEvsLCSQXJJcHt7oJ2LrGxDEAeiOkK79Zv2A8Pzt6CFg==",
"_integrity": "sha512-jOin8xRZ/UytQeBpSXFqIzqU7Fi5TqgPNLlUsSB8kjJ76+FiGBfImF8KJu++c6J4jOldfJUtt0YmkRj2ZpSHTQ==",
"_location": "/gaxios",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "gaxios@^2.1.0",
"raw": "gaxios@^4.0.0",
"name": "gaxios",
"escapedName": "gaxios",
"rawSpec": "^2.1.0",
"rawSpec": "^4.0.0",
"saveSpec": null,
"fetchSpec": "^2.1.0"
"fetchSpec": "^4.0.0"
},
"_requiredBy": [
"/gcp-metadata",
@@ -21,21 +21,21 @@
"/googleapis-common",
"/gtoken"
],
"_resolved": "https://registry.npmjs.org/gaxios/-/gaxios-2.1.0.tgz",
"_shasum": "b5d04ec19bf853d4589ccc2e7d61f0f2ab62afee",
"_spec": "gaxios@^2.1.0",
"_where": "/Users/drew.heavner/Documents/Github/upload-google-play/node_modules/google-auth-library",
"_resolved": "https://registry.npmjs.org/gaxios/-/gaxios-4.0.1.tgz",
"_shasum": "bc7b205a89d883452822cc75e138620c35e3291e",
"_spec": "gaxios@^4.0.0",
"_where": "/home/codespace/workspace/upload-google-play/node_modules/google-auth-library",
"author": {
"name": "Google, LLC"
},
"bugs": {
"url": "https://github.com/JustinBeckwith/gaxios/issues"
"url": "https://github.com/googleapis/gaxios/issues"
},
"bundleDependencies": false,
"dependencies": {
"abort-controller": "^3.0.0",
"extend": "^3.0.2",
"https-proxy-agent": "^3.0.0",
"https-proxy-agent": "^5.0.0",
"is-stream": "^2.0.0",
"node-fetch": "^2.3.0"
},
@@ -43,54 +43,61 @@
"description": "A simple common HTTP client specifically for Google APIs and services.",
"devDependencies": {
"@compodoc/compodoc": "^1.1.9",
"@microsoft/api-documenter": "^7.8.10",
"@microsoft/api-extractor": "^7.8.10",
"@types/cors": "^2.8.6",
"@types/execa": "^0.9.0",
"@types/express": "^4.16.1",
"@types/extend": "^3.0.1",
"@types/mocha": "^5.2.6",
"@types/mocha": "^8.0.0",
"@types/multiparty": "0.0.32",
"@types/mv": "^2.1.0",
"@types/ncp": "^2.0.1",
"@types/nock": "^10.0.0",
"@types/node": "^11.9.5",
"@types/node-fetch": "^2.1.6",
"@types/sinon": "^7.0.7",
"@types/tmp": "0.1.0",
"assert-rejects": "^1.0.0",
"c8": "^5.0.1",
"@types/sinon": "^9.0.0",
"@types/tmp": "0.2.0",
"@types/uuid": "^8.0.0",
"c8": "^7.0.0",
"chai": "^4.2.0",
"codecov": "^3.2.0",
"execa": "^3.0.0",
"cors": "^2.8.5",
"execa": "^4.0.0",
"express": "^4.16.4",
"gts": "^1.0.0",
"gts": "^3.0.0",
"is-docker": "^2.0.0",
"karma": "^4.0.0",
"karma": "^5.0.0",
"karma-chrome-launcher": "^3.0.0",
"karma-coverage": "^2.0.0",
"karma-firefox-launcher": "^1.1.0",
"karma-mocha": "^1.3.0",
"karma-firefox-launcher": "^2.0.0",
"karma-mocha": "^2.0.0",
"karma-remap-coverage": "^0.1.5",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^4.0.0",
"linkinator": "^1.5.0",
"mocha": "^6.0.2",
"linkinator": "^2.0.0",
"mocha": "^8.0.0",
"multiparty": "^4.2.1",
"mv": "^2.1.1",
"ncp": "^2.0.0",
"nock": "^11.0.0",
"null-loader": "^3.0.0",
"puppeteer": "^1.12.2",
"sinon": "^7.2.5",
"source-map-support": "^0.5.10",
"tmp": "0.1.0",
"ts-loader": "^6.0.0",
"typescript": "~3.6.0",
"nock": "^13.0.0",
"null-loader": "^4.0.0",
"puppeteer": "^5.0.0",
"sinon": "^9.0.0",
"tmp": "0.2.1",
"ts-loader": "^8.0.0",
"typescript": "^3.8.3",
"uuid": "^8.0.0",
"webpack": "^4.29.5",
"webpack-cli": "^3.2.3"
"webpack-cli": "^4.0.0"
},
"engines": {
"node": ">=8.10.0"
"node": ">=10"
},
"files": [
"build/src"
],
"homepage": "https://github.com/JustinBeckwith/gaxios#readme",
"homepage": "https://github.com/googleapis/gaxios#readme",
"keywords": [
"google"
],
@@ -99,9 +106,11 @@
"name": "gaxios",
"repository": {
"type": "git",
"url": "git+https://github.com/JustinBeckwith/gaxios.git"
"url": "git+https://github.com/googleapis/gaxios.git"
},
"scripts": {
"api-documenter": "api-documenter yaml --input-folder=temp",
"api-extractor": "api-extractor run --local",
"browser-test": "node build/browser-test/browser-test-runner.js",
"clean": "gts clean",
"compile": "tsc -p .",
@@ -110,7 +119,9 @@
"fix": "gts fix",
"lint": "gts check",
"prebrowser-test": "npm run compile",
"precompile": "gts clean",
"predocs-test": "npm run docs",
"prelint": "cd samples; npm link ../; npm install",
"prepare": "npm run compile",
"presystem-test": "npm run compile",
"pretest": "npm run compile",
@@ -120,5 +131,5 @@
"webpack": "webpack"
},
"types": "build/src/index.d.ts",
"version": "2.1.0"
"version": "4.0.1"
}