Merge pull request #305 from actions/dependabot/npm_and_yarn/octokit-2.0.10
Bump octokit from 2.0.9 to 2.0.10
This commit is contained in:
+6
-93
@@ -24154,12 +24154,12 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
var core = __nccwpck_require__(8267);
|
||||
var pluginPaginateRest = __nccwpck_require__(3932);
|
||||
var pluginRestEndpointMethods = __nccwpck_require__(3779);
|
||||
var pluginRetry = __nccwpck_require__(8519);
|
||||
var pluginRetry = __nccwpck_require__(6298);
|
||||
var pluginThrottling = __nccwpck_require__(2506);
|
||||
var app = __nccwpck_require__(4389);
|
||||
var oauthApp = __nccwpck_require__(3493);
|
||||
|
||||
const VERSION = "2.0.9";
|
||||
const VERSION = "2.0.10";
|
||||
|
||||
const Octokit = core.Octokit.plugin(pluginRestEndpointMethods.restEndpointMethods, pluginPaginateRest.paginateRest, pluginRetry.retry, pluginThrottling.throttling).defaults({
|
||||
userAgent: `octokit.js/${VERSION}`,
|
||||
@@ -24167,22 +24167,19 @@ const Octokit = core.Octokit.plugin(pluginRestEndpointMethods.restEndpointMethod
|
||||
onRateLimit,
|
||||
onSecondaryRateLimit
|
||||
}
|
||||
}); // istanbul ignore next no need to test internals of the throttle plugin
|
||||
|
||||
});
|
||||
// istanbul ignore next no need to test internals of the throttle plugin
|
||||
function onRateLimit(retryAfter, options, octokit) {
|
||||
octokit.log.warn(`Request quota exhausted for request ${options.method} ${options.url}`);
|
||||
|
||||
if (options.request.retryCount === 0) {
|
||||
// only retries once
|
||||
octokit.log.info(`Retrying after ${retryAfter} seconds!`);
|
||||
return true;
|
||||
}
|
||||
} // istanbul ignore next no need to test internals of the throttle plugin
|
||||
|
||||
|
||||
}
|
||||
// istanbul ignore next no need to test internals of the throttle plugin
|
||||
function onSecondaryRateLimit(retryAfter, options, octokit) {
|
||||
octokit.log.warn(`SecondaryRateLimit detected for request ${options.method} ${options.url}`);
|
||||
|
||||
if (options.request.retryCount === 0) {
|
||||
// only retries once
|
||||
octokit.log.info(`Retrying after ${retryAfter} seconds!`);
|
||||
@@ -26182,90 +26179,6 @@ exports.restEndpointMethods = restEndpointMethods;
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 8519:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
|
||||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
||||
|
||||
var Bottleneck = _interopDefault(__nccwpck_require__(1174));
|
||||
|
||||
// @ts-ignore
|
||||
async function errorRequest(octokit, state, error, options) {
|
||||
if (!error.request || !error.request.request) {
|
||||
// address https://github.com/octokit/plugin-retry.js/issues/8
|
||||
throw error;
|
||||
} // retry all >= 400 && not doNotRetry
|
||||
|
||||
|
||||
if (error.status >= 400 && !state.doNotRetry.includes(error.status)) {
|
||||
const retries = options.request.retries != null ? options.request.retries : state.retries;
|
||||
const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2);
|
||||
throw octokit.retry.retryRequest(error, retries, retryAfter);
|
||||
} // Maybe eventually there will be more cases here
|
||||
|
||||
|
||||
throw error;
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
|
||||
async function wrapRequest(state, request, options) {
|
||||
const limiter = new Bottleneck(); // @ts-ignore
|
||||
|
||||
limiter.on("failed", function (error, info) {
|
||||
const maxRetries = ~~error.request.request.retries;
|
||||
const after = ~~error.request.request.retryAfter;
|
||||
options.request.retryCount = info.retryCount + 1;
|
||||
|
||||
if (maxRetries > info.retryCount) {
|
||||
// Returning a number instructs the limiter to retry
|
||||
// the request after that number of milliseconds have passed
|
||||
return after * state.retryAfterBaseValue;
|
||||
}
|
||||
});
|
||||
return limiter.schedule(request, options);
|
||||
}
|
||||
|
||||
const VERSION = "3.0.9";
|
||||
function retry(octokit, octokitOptions) {
|
||||
const state = Object.assign({
|
||||
enabled: true,
|
||||
retryAfterBaseValue: 1000,
|
||||
doNotRetry: [400, 401, 403, 404, 422],
|
||||
retries: 3
|
||||
}, octokitOptions.retry);
|
||||
|
||||
if (state.enabled) {
|
||||
octokit.hook.error("request", errorRequest.bind(null, octokit, state));
|
||||
octokit.hook.wrap("request", wrapRequest.bind(null, state));
|
||||
}
|
||||
|
||||
return {
|
||||
retry: {
|
||||
retryRequest: (error, retries, retryAfter) => {
|
||||
error.request.request = Object.assign({}, error.request.request, {
|
||||
retries: retries,
|
||||
retryAfter: retryAfter
|
||||
});
|
||||
return error;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
retry.VERSION = VERSION;
|
||||
|
||||
exports.VERSION = VERSION;
|
||||
exports.retry = retry;
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 2506:
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Generated
+9
-55
@@ -16,7 +16,7 @@
|
||||
"ansi-styles": "^6.2.1",
|
||||
"got": "^12.5.2",
|
||||
"nodemon": "^2.0.20",
|
||||
"octokit": "^2.0.9",
|
||||
"octokit": "^2.0.10",
|
||||
"yaml": "^2.1.3",
|
||||
"zod": "^3.19.1"
|
||||
},
|
||||
@@ -6595,16 +6595,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/octokit": {
|
||||
"version": "2.0.9",
|
||||
"resolved": "https://registry.npmjs.org/octokit/-/octokit-2.0.9.tgz",
|
||||
"integrity": "sha512-+4XOeV1pvr5aVdlrj/WGl8VE6yJHt/XAPr/x4+gRQFp1p8l0Wu/w3ZIvlIpnPJFx5yiHrVWHd5syPLWOip89LQ==",
|
||||
"version": "2.0.10",
|
||||
"resolved": "https://registry.npmjs.org/octokit/-/octokit-2.0.10.tgz",
|
||||
"integrity": "sha512-sI15RZVaV9iyqLLEky4i++tMM48Fo9a80zrpOXMdAtbomznBLDi/moi9mAjJg7Ii+EaSEyaWOVIh3M/Vk/a5mw==",
|
||||
"dependencies": {
|
||||
"@octokit/app": "^13.0.5",
|
||||
"@octokit/core": "^4.0.4",
|
||||
"@octokit/oauth-app": "^4.0.6",
|
||||
"@octokit/plugin-paginate-rest": "^5.0.0",
|
||||
"@octokit/plugin-rest-endpoint-methods": "^6.0.0",
|
||||
"@octokit/plugin-retry": "^3.0.9",
|
||||
"@octokit/plugin-retry": "^4.0.3",
|
||||
"@octokit/plugin-throttling": "^4.0.1",
|
||||
"@octokit/types": "^8.0.0"
|
||||
},
|
||||
@@ -6765,28 +6765,6 @@
|
||||
"@octokit/openapi-types": "^13.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/octokit/node_modules/@octokit/plugin-retry": {
|
||||
"version": "3.0.9",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-3.0.9.tgz",
|
||||
"integrity": "sha512-r+fArdP5+TG6l1Rv/C9hVoty6tldw6cE2pRHNGmFPdyfrc696R6JjrQ3d7HdVqGwuzfyrcaLAKD7K8TX8aehUQ==",
|
||||
"dependencies": {
|
||||
"@octokit/types": "^6.0.3",
|
||||
"bottleneck": "^2.15.3"
|
||||
}
|
||||
},
|
||||
"node_modules/octokit/node_modules/@octokit/plugin-retry/node_modules/@octokit/openapi-types": {
|
||||
"version": "12.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz",
|
||||
"integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ=="
|
||||
},
|
||||
"node_modules/octokit/node_modules/@octokit/plugin-retry/node_modules/@octokit/types": {
|
||||
"version": "6.41.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz",
|
||||
"integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==",
|
||||
"dependencies": {
|
||||
"@octokit/openapi-types": "^12.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/octokit/node_modules/@octokit/plugin-throttling": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-4.3.0.tgz",
|
||||
@@ -13321,16 +13299,16 @@
|
||||
}
|
||||
},
|
||||
"octokit": {
|
||||
"version": "2.0.9",
|
||||
"resolved": "https://registry.npmjs.org/octokit/-/octokit-2.0.9.tgz",
|
||||
"integrity": "sha512-+4XOeV1pvr5aVdlrj/WGl8VE6yJHt/XAPr/x4+gRQFp1p8l0Wu/w3ZIvlIpnPJFx5yiHrVWHd5syPLWOip89LQ==",
|
||||
"version": "2.0.10",
|
||||
"resolved": "https://registry.npmjs.org/octokit/-/octokit-2.0.10.tgz",
|
||||
"integrity": "sha512-sI15RZVaV9iyqLLEky4i++tMM48Fo9a80zrpOXMdAtbomznBLDi/moi9mAjJg7Ii+EaSEyaWOVIh3M/Vk/a5mw==",
|
||||
"requires": {
|
||||
"@octokit/app": "^13.0.5",
|
||||
"@octokit/core": "^4.0.4",
|
||||
"@octokit/oauth-app": "^4.0.6",
|
||||
"@octokit/plugin-paginate-rest": "^5.0.0",
|
||||
"@octokit/plugin-rest-endpoint-methods": "^6.0.0",
|
||||
"@octokit/plugin-retry": "^3.0.9",
|
||||
"@octokit/plugin-retry": "^4.0.3",
|
||||
"@octokit/plugin-throttling": "^4.0.1",
|
||||
"@octokit/types": "^8.0.0"
|
||||
},
|
||||
@@ -13474,30 +13452,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"@octokit/plugin-retry": {
|
||||
"version": "3.0.9",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-3.0.9.tgz",
|
||||
"integrity": "sha512-r+fArdP5+TG6l1Rv/C9hVoty6tldw6cE2pRHNGmFPdyfrc696R6JjrQ3d7HdVqGwuzfyrcaLAKD7K8TX8aehUQ==",
|
||||
"requires": {
|
||||
"@octokit/types": "^6.0.3",
|
||||
"bottleneck": "^2.15.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@octokit/openapi-types": {
|
||||
"version": "12.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz",
|
||||
"integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ=="
|
||||
},
|
||||
"@octokit/types": {
|
||||
"version": "6.41.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz",
|
||||
"integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==",
|
||||
"requires": {
|
||||
"@octokit/openapi-types": "^12.11.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@octokit/plugin-throttling": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-4.3.0.tgz",
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@
|
||||
"ansi-styles": "^6.2.1",
|
||||
"got": "^12.5.2",
|
||||
"nodemon": "^2.0.20",
|
||||
"octokit": "^2.0.9",
|
||||
"octokit": "^2.0.10",
|
||||
"yaml": "^2.1.3",
|
||||
"zod": "^3.19.1"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user