Upgrade octokit to v4.1.2
This commit is contained in:
parent
dbbcbe019d
commit
c1745a9831
1214 changed files with 160765 additions and 0 deletions
23
node_modules/@octokit/auth-app/dist-src/auth.js
generated
vendored
Normal file
23
node_modules/@octokit/auth-app/dist-src/auth.js
generated
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import { getAppAuthentication } from "./get-app-authentication.js";
|
||||
import { getInstallationAuthentication } from "./get-installation-authentication.js";
|
||||
async function auth(state, authOptions) {
|
||||
switch (authOptions.type) {
|
||||
case "app":
|
||||
return getAppAuthentication(state);
|
||||
case "oauth-app":
|
||||
return state.oauthApp({ type: "oauth-app" });
|
||||
case "installation":
|
||||
authOptions;
|
||||
return getInstallationAuthentication(state, {
|
||||
...authOptions,
|
||||
type: "installation"
|
||||
});
|
||||
case "oauth-user":
|
||||
return state.oauthApp(authOptions);
|
||||
default:
|
||||
throw new Error(`Invalid auth type: ${authOptions.type}`);
|
||||
}
|
||||
}
|
||||
export {
|
||||
auth
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue