Upgrade octokit to v4.1.2
This commit is contained in:
parent
dbbcbe019d
commit
c1745a9831
1214 changed files with 160765 additions and 0 deletions
37
node_modules/@octokit/auth-app/dist-src/requires-app-auth.js
generated
vendored
Normal file
37
node_modules/@octokit/auth-app/dist-src/requires-app-auth.js
generated
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
const PATHS = [
|
||||
"/app",
|
||||
"/app/hook/config",
|
||||
"/app/hook/deliveries",
|
||||
"/app/hook/deliveries/{delivery_id}",
|
||||
"/app/hook/deliveries/{delivery_id}/attempts",
|
||||
"/app/installations",
|
||||
"/app/installations/{installation_id}",
|
||||
"/app/installations/{installation_id}/access_tokens",
|
||||
"/app/installations/{installation_id}/suspended",
|
||||
"/app/installation-requests",
|
||||
"/marketplace_listing/accounts/{account_id}",
|
||||
"/marketplace_listing/plan",
|
||||
"/marketplace_listing/plans",
|
||||
"/marketplace_listing/plans/{plan_id}/accounts",
|
||||
"/marketplace_listing/stubbed/accounts/{account_id}",
|
||||
"/marketplace_listing/stubbed/plan",
|
||||
"/marketplace_listing/stubbed/plans",
|
||||
"/marketplace_listing/stubbed/plans/{plan_id}/accounts",
|
||||
"/orgs/{org}/installation",
|
||||
"/repos/{owner}/{repo}/installation",
|
||||
"/users/{username}/installation"
|
||||
];
|
||||
function routeMatcher(paths) {
|
||||
const regexes = paths.map(
|
||||
(p) => p.split("/").map((c) => c.startsWith("{") ? "(?:.+?)" : c).join("/")
|
||||
);
|
||||
const regex = `^(?:${regexes.map((r) => `(?:${r})`).join("|")})$`;
|
||||
return new RegExp(regex, "i");
|
||||
}
|
||||
const REGEX = routeMatcher(PATHS);
|
||||
function requiresAppAuth(url) {
|
||||
return !!url && REGEX.test(url.split("?")[0]);
|
||||
}
|
||||
export {
|
||||
requiresAppAuth
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue