Upgrade octokit to v4.1.2
This commit is contained in:
parent
dbbcbe019d
commit
c1745a9831
1214 changed files with 160765 additions and 0 deletions
11
node_modules/octokit/dist-src/app.js
generated
vendored
Normal file
11
node_modules/octokit/dist-src/app.js
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { App as DefaultApp } from "@octokit/app";
|
||||
import { OAuthApp as DefaultOAuthApp } from "@octokit/oauth-app";
|
||||
import { Octokit } from "./octokit.js";
|
||||
const App = DefaultApp.defaults({ Octokit });
|
||||
const OAuthApp = DefaultOAuthApp.defaults({ Octokit });
|
||||
import { createNodeMiddleware } from "@octokit/app";
|
||||
export {
|
||||
App,
|
||||
OAuthApp,
|
||||
createNodeMiddleware
|
||||
};
|
||||
9
node_modules/octokit/dist-src/index.js
generated
vendored
Normal file
9
node_modules/octokit/dist-src/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { Octokit, RequestError } from "./octokit.js";
|
||||
import { App, OAuthApp, createNodeMiddleware } from "./app.js";
|
||||
export {
|
||||
App,
|
||||
OAuthApp,
|
||||
Octokit,
|
||||
RequestError,
|
||||
createNodeMiddleware
|
||||
};
|
||||
43
node_modules/octokit/dist-src/octokit.js
generated
vendored
Normal file
43
node_modules/octokit/dist-src/octokit.js
generated
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
import { Octokit as OctokitCore } from "@octokit/core";
|
||||
import { paginateRest } from "@octokit/plugin-paginate-rest";
|
||||
import { paginateGraphQL } from "@octokit/plugin-paginate-graphql";
|
||||
import { restEndpointMethods } from "@octokit/plugin-rest-endpoint-methods";
|
||||
import { retry } from "@octokit/plugin-retry";
|
||||
import { throttling } from "@octokit/plugin-throttling";
|
||||
import { VERSION } from "./version.js";
|
||||
import { RequestError } from "@octokit/request-error";
|
||||
const Octokit = OctokitCore.plugin(
|
||||
restEndpointMethods,
|
||||
paginateRest,
|
||||
paginateGraphQL,
|
||||
retry,
|
||||
throttling
|
||||
).defaults({
|
||||
userAgent: `octokit.js/${VERSION}`,
|
||||
throttle: {
|
||||
onRateLimit,
|
||||
onSecondaryRateLimit
|
||||
}
|
||||
});
|
||||
function onRateLimit(retryAfter, options, octokit) {
|
||||
octokit.log.warn(
|
||||
`Request quota exhausted for request ${options.method} ${options.url}`
|
||||
);
|
||||
if (options.request.retryCount === 0) {
|
||||
octokit.log.info(`Retrying after ${retryAfter} seconds!`);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
function onSecondaryRateLimit(retryAfter, options, octokit) {
|
||||
octokit.log.warn(
|
||||
`SecondaryRateLimit detected for request ${options.method} ${options.url}`
|
||||
);
|
||||
if (options.request.retryCount === 0) {
|
||||
octokit.log.info(`Retrying after ${retryAfter} seconds!`);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
export {
|
||||
Octokit,
|
||||
RequestError
|
||||
};
|
||||
4
node_modules/octokit/dist-src/version.js
generated
vendored
Normal file
4
node_modules/octokit/dist-src/version.js
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
const VERSION = "4.1.2";
|
||||
export {
|
||||
VERSION
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue