Skip to content

Commit

Permalink
fix: adapt for latest @octokit/auth-app
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Mar 24, 2021
1 parent d5e8fd2 commit 86f0de0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"author": "Gregor Martynus (https://twitter.com/gr2m)",
"license": "ISC",
"dependencies": {
"@octokit/auth-app": "^3.0.0",
"@octokit/auth-app": "^3.3.0",
"@octokit/auth-token": "^2.4.4",
"@octokit/auth-unauthenticated": "^2.0.2",
"@octokit/types": "^6.1.1"
Expand Down
8 changes: 4 additions & 4 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Octokit } from "@octokit/core";
import { createTokenAuth, Types as TokenAuthTypes } from "@octokit/auth-token";
import { createAppAuth, Types as AppAuthTypes } from "@octokit/auth-app";
import * as AppAuth from "@octokit/auth-app";
import { createUnauthenticatedAuth } from "@octokit/auth-unauthenticated";

type OctokitStrategyOptions = {
Expand All @@ -9,11 +9,11 @@ type OctokitStrategyOptions = {
};
export type StrategyOptions =
| (OctokitStrategyOptions & { token: string })
| (OctokitStrategyOptions & AppAuthTypes["StrategyOptions"]);
| (OctokitStrategyOptions & AppAuth.StrategyOptions);

export type AuthOptions =
| TokenAuthTypes["AuthOptions"]
| AppAuthTypes["AuthOptions"]
| AppAuth.AuthOptions
| {
type: "event-octokit";
event: {
Expand All @@ -32,7 +32,7 @@ type TokenState = OctokitStrategyOptions & {
};
type AppState = OctokitStrategyOptions & {
type: "app";
auth: ReturnType<typeof createAppAuth>;
auth: ReturnType<typeof AppAuth.createAppAuth>;
};
type UnauthenticatedState = OctokitStrategyOptions & {
type: "unauthenticated";
Expand Down

0 comments on commit 86f0de0

Please sign in to comment.