@octokit/auth-oauth-app
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -113,3 +113,3 @@ 'use strict'; | ||
const VERSION = "2.1.0"; | ||
const VERSION = "2.2.0"; | ||
@@ -116,0 +116,0 @@ function createOAuthAppAuth(options) { |
@@ -1,1 +0,1 @@ | ||
export const VERSION = "2.1.0"; | ||
export const VERSION = "2.2.0"; |
@@ -1,30 +0,2 @@ | ||
import { State, AuthOptions } from "./types"; | ||
export declare function auth(state: State, authOptions: AuthOptions): Promise<{ | ||
type: string; | ||
token: string; | ||
tokenType: string; | ||
scopes: string[]; | ||
clientId?: undefined; | ||
clientSecret?: undefined; | ||
headers?: undefined; | ||
query?: undefined; | ||
} | { | ||
type: string; | ||
clientId: string; | ||
clientSecret: string; | ||
headers: { | ||
authorization: string; | ||
} | { | ||
authorization?: undefined; | ||
}; | ||
query: { | ||
client_id?: undefined; | ||
client_secret?: undefined; | ||
} | { | ||
client_id: string; | ||
client_secret: string; | ||
}; | ||
token?: undefined; | ||
tokenType?: undefined; | ||
scopes?: undefined; | ||
}>; | ||
import { State, AuthOptions, Authentication } from "./types"; | ||
export declare function auth(state: State, authOptions: AuthOptions): Promise<Authentication>; |
@@ -1,32 +0,9 @@ | ||
import { StrategyOptions } from "./types"; | ||
export declare function createOAuthAppAuth(options: StrategyOptions): ((authOptions: import("./types").AuthOptions) => Promise<{ | ||
type: string; | ||
token: string; | ||
tokenType: string; | ||
scopes: string[]; | ||
clientId?: undefined; | ||
clientSecret?: undefined; | ||
headers?: undefined; | ||
query?: undefined; | ||
} | { | ||
type: string; | ||
clientId: string; | ||
clientSecret: string; | ||
headers: { | ||
authorization: string; | ||
} | { | ||
authorization?: undefined; | ||
}; | ||
query: { | ||
client_id?: undefined; | ||
client_secret?: undefined; | ||
} | { | ||
client_id: string; | ||
client_secret: string; | ||
}; | ||
token?: undefined; | ||
tokenType?: undefined; | ||
scopes?: undefined; | ||
}>) & { | ||
import { StrategyOptions, AuthOptions, Authentication } from "./types"; | ||
export declare type Types = { | ||
StrategyOptions: StrategyOptions; | ||
AuthOptions: AuthOptions; | ||
Authentication: Authentication; | ||
}; | ||
export declare function createOAuthAppAuth(options: StrategyOptions): ((authOptions: AuthOptions) => Promise<Authentication>) & { | ||
hook: (request: import("@octokit/types").RequestInterface, route: string | import("@octokit/types").EndpointOptions, parameters?: import("@octokit/types").RequestParameters | undefined) => Promise<import("@octokit/types").OctokitResponse<any>>; | ||
}; |
@@ -8,2 +8,3 @@ import * as OctokitTypes from "@octokit/types"; | ||
export declare type RequestInterface = OctokitTypes.RequestInterface; | ||
export declare type StrategyInterface = OctokitTypes.StrategyInterface<[StrategyOptions], [AuthOptions], Authentication>; | ||
export declare type StrategyOptions = { | ||
@@ -28,2 +29,19 @@ clientId: string; | ||
}; | ||
export declare type TokenAuthentication = TokenWithScopes & { | ||
type: "token"; | ||
tokenType: "oauth"; | ||
}; | ||
export declare type appAuthentication = { | ||
type: "oauth-app"; | ||
clientId: string; | ||
clientSecret: string; | ||
headers: { | ||
authorization?: string; | ||
}; | ||
query: { | ||
client_id?: string; | ||
client_secret?: string; | ||
}; | ||
}; | ||
export declare type Authentication = TokenAuthentication | appAuthentication; | ||
export declare type State = StrategyOptions & { | ||
@@ -30,0 +48,0 @@ request: RequestInterface; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "2.1.0"; | ||
export declare const VERSION = "2.2.0"; |
@@ -104,3 +104,3 @@ import { getUserAgent } from 'universal-user-agent'; | ||
const VERSION = "2.1.0"; | ||
const VERSION = "2.2.0"; | ||
@@ -107,0 +107,0 @@ function createOAuthAppAuth(options) { |
{ | ||
"name": "@octokit/auth-oauth-app", | ||
"description": "GitHub OAuth App authentication for JavaScript", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"license": "MIT", | ||
@@ -26,3 +26,3 @@ "files": [ | ||
"@octokit/request": "^5.3.0", | ||
"@octokit/types": "^1.0.0", | ||
"@octokit/types": "^2.0.0", | ||
"@types/btoa-lite": "^1.0.0", | ||
@@ -52,3 +52,3 @@ "btoa-lite": "^1.0.0", | ||
"main": "dist-node/index.js", | ||
"deno": "dist-web/index.js" | ||
"module": "dist-web/index.js" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49699
408
+ Added@octokit/types@2.16.2(transitive)
+ Added@types/node@22.9.0(transitive)
+ Addedundici-types@6.19.8(transitive)
- Removed@octokit/types@1.1.0(transitive)
- Removed@types/node@12.20.55(transitive)
Updated@octokit/types@^2.0.0