Merge pull request #518 from actions/dependabot/npm_and_yarn/octokit-2.1.0
Bump octokit from 2.0.19 to 2.1.0
This commit is contained in:
79
dist/index.js
generated
vendored
79
dist/index.js
generated
vendored
@@ -36104,6 +36104,7 @@ __export(dist_src_exports, {
|
||||
App: () => App,
|
||||
OAuthApp: () => OAuthApp,
|
||||
Octokit: () => Octokit,
|
||||
RequestError: () => import_request_error.RequestError,
|
||||
createNodeMiddleware: () => import_app2.createNodeMiddleware
|
||||
});
|
||||
module.exports = __toCommonJS(dist_src_exports);
|
||||
@@ -36116,9 +36117,10 @@ var import_plugin_retry = __nccwpck_require__(8519);
|
||||
var import_plugin_throttling = __nccwpck_require__(9968);
|
||||
|
||||
// pkg/dist-src/version.js
|
||||
var VERSION = "2.0.19";
|
||||
var VERSION = "2.1.0";
|
||||
|
||||
// pkg/dist-src/octokit.js
|
||||
var import_request_error = __nccwpck_require__(4991);
|
||||
var Octokit = import_core.Octokit.plugin(
|
||||
import_plugin_rest_endpoint_methods.restEndpointMethods,
|
||||
import_plugin_paginate_rest.paginateRest,
|
||||
@@ -37748,7 +37750,7 @@ async function errorRequest(state, octokit, error, options) {
|
||||
|
||||
// pkg/dist-src/wrap-request.js
|
||||
var import_light = __toESM(__nccwpck_require__(1174));
|
||||
var import_request_error = __nccwpck_require__(537);
|
||||
var import_request_error = __nccwpck_require__(4991);
|
||||
async function wrapRequest(state, octokit, request, options) {
|
||||
const limiter = new import_light.default();
|
||||
limiter.on("failed", function(error, info) {
|
||||
@@ -37811,6 +37813,79 @@ retry.VERSION = VERSION;
|
||||
0 && (0);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 4991:
|
||||
/***/ ((__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 deprecation = __nccwpck_require__(8932);
|
||||
var once = _interopDefault(__nccwpck_require__(1223));
|
||||
|
||||
const logOnceCode = once(deprecation => console.warn(deprecation));
|
||||
const logOnceHeaders = 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);
|
||||
}
|
||||
this.name = "HttpError";
|
||||
this.status = statusCode;
|
||||
let headers;
|
||||
if ("headers" in options && typeof options.headers !== "undefined") {
|
||||
headers = options.headers;
|
||||
}
|
||||
if ("response" in options) {
|
||||
this.response = options.response;
|
||||
headers = options.response.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;
|
||||
// deprecations
|
||||
Object.defineProperty(this, "code", {
|
||||
get() {
|
||||
logOnceCode(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`."));
|
||||
return statusCode;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(this, "headers", {
|
||||
get() {
|
||||
logOnceHeaders(new deprecation.Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`."));
|
||||
return headers || {};
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
exports.RequestError = RequestError;
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 1223:
|
||||
|
||||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
22
package-lock.json
generated
22
package-lock.json
generated
@@ -16,7 +16,7 @@
|
||||
"ansi-styles": "^6.2.1",
|
||||
"got": "^13.0.0",
|
||||
"nodemon": "^2.0.22",
|
||||
"octokit": "^2.0.19",
|
||||
"octokit": "^2.1.0",
|
||||
"packageurl-js": "^1.0.2",
|
||||
"spdx-expression-parse": "^3.0.1",
|
||||
"spdx-satisfies": "^5.0.1",
|
||||
@@ -6597,9 +6597,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/octokit": {
|
||||
"version": "2.0.19",
|
||||
"resolved": "https://registry.npmjs.org/octokit/-/octokit-2.0.19.tgz",
|
||||
"integrity": "sha512-hSloK4MK78QGbAuBrtIir0bsxMoRVZE5CkwKSbSRH9lqv2hx9EwhCxtPqEF+BtHqLXkXdfUaGkJMyMBotYno+A==",
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/octokit/-/octokit-2.1.0.tgz",
|
||||
"integrity": "sha512-Pxi6uKTjBRZWgAwsw1NgHdRlL+QASCN35OYS7X79o7PtBME0CLXEroZmPtEwlWZbPTP+iDbEy2wCbSOgm0uGIQ==",
|
||||
"dependencies": {
|
||||
"@octokit/app": "^13.1.5",
|
||||
"@octokit/core": "^4.2.1",
|
||||
@@ -6608,6 +6608,7 @@
|
||||
"@octokit/plugin-rest-endpoint-methods": "^7.1.1",
|
||||
"@octokit/plugin-retry": "^4.1.3",
|
||||
"@octokit/plugin-throttling": "^5.2.2",
|
||||
"@octokit/request-error": "^v3.0.3",
|
||||
"@octokit/types": "^9.2.2"
|
||||
},
|
||||
"engines": {
|
||||
@@ -6664,6 +6665,19 @@
|
||||
"@octokit/core": ">=3"
|
||||
}
|
||||
},
|
||||
"node_modules/octokit/node_modules/@octokit/request-error": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-3.0.3.tgz",
|
||||
"integrity": "sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ==",
|
||||
"dependencies": {
|
||||
"@octokit/types": "^9.0.0",
|
||||
"deprecation": "^2.0.0",
|
||||
"once": "^1.4.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
}
|
||||
},
|
||||
"node_modules/octokit/node_modules/@octokit/types": {
|
||||
"version": "9.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.2.3.tgz",
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
"ansi-styles": "^6.2.1",
|
||||
"got": "^13.0.0",
|
||||
"nodemon": "^2.0.22",
|
||||
"octokit": "^2.0.19",
|
||||
"octokit": "^2.1.0",
|
||||
"packageurl-js": "^1.0.2",
|
||||
"spdx-expression-parse": "^3.0.1",
|
||||
"spdx-satisfies": "^5.0.1",
|
||||
|
||||
Reference in New Issue
Block a user