🚀 feat(_route): add dev to origin

This commit is contained in:
eshanized
2024-12-23 02:19:28 +05:30
parent 0bca0ca1d7
commit 937b1a56ab
16382 changed files with 2985935 additions and 1967 deletions

View 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
};

View File

@@ -0,0 +1,9 @@
import { Octokit, RequestError } from "./octokit.js";
import { App, OAuthApp, createNodeMiddleware } from "./app.js";
export {
App,
OAuthApp,
Octokit,
RequestError,
createNodeMiddleware
};

View 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
};

View File

@@ -0,0 +1,4 @@
const VERSION = "3.2.1";
export {
VERSION
};