@octokit/auth-oauth-app
Advanced tools
Comparing version 7.0.1 to 8.0.0-beta.1
"use strict"; | ||
var __create = Object.create; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __getProtoOf = Object.getPrototypeOf; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
@@ -20,10 +18,2 @@ var __export = (target, all) => { | ||
}; | ||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | ||
// If the importer is in node compatibility mode or this is not an ESM | ||
// file that has been converted to a CommonJS file using a Babel- | ||
// compatible transform (i.e. "__esModule" has not been set), then set | ||
// "default" to the CommonJS "module.exports" for node compatibility. | ||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | ||
mod | ||
)); | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
@@ -42,3 +32,2 @@ | ||
// pkg/dist-src/auth.js | ||
var import_btoa_lite = __toESM(require("btoa-lite")); | ||
var import_auth_oauth_user = require("@octokit/auth-oauth-user"); | ||
@@ -53,3 +42,3 @@ async function auth(state, authOptions) { | ||
headers: { | ||
authorization: `basic ${(0, import_btoa_lite.default)( | ||
authorization: `basic ${btoa( | ||
`${state.clientId}:${state.clientSecret}` | ||
@@ -84,3 +73,2 @@ )}` | ||
// pkg/dist-src/hook.js | ||
var import_btoa_lite2 = __toESM(require("btoa-lite")); | ||
var import_auth_oauth_user2 = require("@octokit/auth-oauth-user"); | ||
@@ -100,3 +88,3 @@ async function hook(state, request2, route, parameters) { | ||
} | ||
const credentials = (0, import_btoa_lite2.default)(`${state.clientId}:${state.clientSecret}`); | ||
const credentials = btoa(`${state.clientId}:${state.clientSecret}`); | ||
endpoint.headers.authorization = `basic ${credentials}`; | ||
@@ -114,3 +102,3 @@ try { | ||
// pkg/dist-src/version.js | ||
var VERSION = "7.0.1"; | ||
var VERSION = "8.0.0-beta.1"; | ||
@@ -117,0 +105,0 @@ // pkg/dist-src/index.js |
@@ -1,2 +0,1 @@ | ||
import btoa from "btoa-lite"; | ||
import { createOAuthUserAuth } from "@octokit/auth-oauth-user"; | ||
@@ -3,0 +2,0 @@ async function auth(state, authOptions) { |
@@ -1,2 +0,1 @@ | ||
import btoa from "btoa-lite"; | ||
import { requiresBasicAuth } from "@octokit/auth-oauth-user"; | ||
@@ -3,0 +2,0 @@ async function hook(state, request, route, parameters) { |
import { getUserAgent } from "universal-user-agent"; | ||
import { request } from "@octokit/request"; | ||
import { auth } from "./auth"; | ||
import { hook } from "./hook"; | ||
import { VERSION } from "./version"; | ||
import { auth } from "./auth.js"; | ||
import { hook } from "./hook.js"; | ||
import { VERSION } from "./version.js"; | ||
import { createOAuthUserAuth } from "@octokit/auth-oauth-user"; | ||
@@ -7,0 +7,0 @@ function createOAuthAppAuth(options) { |
@@ -1,4 +0,4 @@ | ||
const VERSION = "7.0.1"; | ||
const VERSION = "8.0.0-beta.1"; | ||
export { | ||
VERSION | ||
}; |
@@ -1,2 +0,2 @@ | ||
import type { OAuthAppState, GitHubAppState, AppAuthOptions, WebFlowAuthOptions, OAuthAppDeviceFlowAuthOptions, GitHubAppDeviceFlowAuthOptions, FactoryOAuthAppWebFlow, FactoryOAuthAppDeviceFlow, FactoryGitHubWebFlow, FactoryGitHubDeviceFlow, AppAuthentication, OAuthAppUserAuthentication, GitHubAppUserAuthentication, GitHubAppUserAuthenticationWithExpiration } from "./types"; | ||
import type { OAuthAppState, GitHubAppState, AppAuthOptions, WebFlowAuthOptions, OAuthAppDeviceFlowAuthOptions, GitHubAppDeviceFlowAuthOptions, FactoryOAuthAppWebFlow, FactoryOAuthAppDeviceFlow, FactoryGitHubWebFlow, FactoryGitHubDeviceFlow, AppAuthentication, OAuthAppUserAuthentication, GitHubAppUserAuthentication, GitHubAppUserAuthenticationWithExpiration } from "./types.js"; | ||
export declare function auth(state: OAuthAppState | GitHubAppState, authOptions: AppAuthOptions): Promise<AppAuthentication>; | ||
@@ -3,0 +3,0 @@ export declare function auth(state: OAuthAppState, authOptions: WebFlowAuthOptions): Promise<OAuthAppUserAuthentication>; |
import type { EndpointOptions, RequestParameters, Route, RequestInterface, OctokitResponse } from "@octokit/types"; | ||
import type { OAuthAppState, GitHubAppState } from "./types"; | ||
import type { OAuthAppState, GitHubAppState } from "./types.js"; | ||
export declare function hook(state: OAuthAppState | GitHubAppState, request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise<OctokitResponse<any>>; |
@@ -1,5 +0,5 @@ | ||
import type { OAuthAppStrategyOptions, GitHubAppStrategyOptions, OAuthAppAuthInterface, GitHubAuthInterface } from "./types"; | ||
export type { OAuthAppStrategyOptions, GitHubAppStrategyOptions, AppAuthOptions, WebFlowAuthOptions, OAuthAppDeviceFlowAuthOptions, GitHubAppDeviceFlowAuthOptions, OAuthAppAuthInterface, GitHubAuthInterface, AppAuthentication, OAuthAppUserAuthentication, GitHubAppUserAuthentication, GitHubAppUserAuthenticationWithExpiration, FactoryGitHubWebFlow, FactoryGitHubDeviceFlow, } from "./types"; | ||
import type { OAuthAppStrategyOptions, GitHubAppStrategyOptions, OAuthAppAuthInterface, GitHubAuthInterface } from "./types.js"; | ||
export type { OAuthAppStrategyOptions, GitHubAppStrategyOptions, AppAuthOptions, WebFlowAuthOptions, OAuthAppDeviceFlowAuthOptions, GitHubAppDeviceFlowAuthOptions, OAuthAppAuthInterface, GitHubAuthInterface, AppAuthentication, OAuthAppUserAuthentication, GitHubAppUserAuthentication, GitHubAppUserAuthenticationWithExpiration, FactoryGitHubWebFlow, FactoryGitHubDeviceFlow, } from "./types.js"; | ||
export { createOAuthUserAuth } from "@octokit/auth-oauth-user"; | ||
export declare function createOAuthAppAuth(options: OAuthAppStrategyOptions): OAuthAppAuthInterface; | ||
export declare function createOAuthAppAuth(options: GitHubAppStrategyOptions): GitHubAuthInterface; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "7.0.1"; | ||
export declare const VERSION = "8.0.0-beta.1"; |
@@ -6,3 +6,2 @@ // pkg/dist-src/index.js | ||
// pkg/dist-src/auth.js | ||
import btoa from "btoa-lite"; | ||
import { createOAuthUserAuth } from "@octokit/auth-oauth-user"; | ||
@@ -47,3 +46,2 @@ async function auth(state, authOptions) { | ||
// pkg/dist-src/hook.js | ||
import btoa2 from "btoa-lite"; | ||
import { requiresBasicAuth } from "@octokit/auth-oauth-user"; | ||
@@ -63,3 +61,3 @@ async function hook(state, request2, route, parameters) { | ||
} | ||
const credentials = btoa2(`${state.clientId}:${state.clientSecret}`); | ||
const credentials = btoa(`${state.clientId}:${state.clientSecret}`); | ||
endpoint.headers.authorization = `basic ${credentials}`; | ||
@@ -77,3 +75,3 @@ try { | ||
// pkg/dist-src/version.js | ||
var VERSION = "7.0.1"; | ||
var VERSION = "8.0.0-beta.1"; | ||
@@ -80,0 +78,0 @@ // pkg/dist-src/index.js |
@@ -6,3 +6,4 @@ { | ||
}, | ||
"version": "7.0.1", | ||
"type": "module", | ||
"version": "8.0.0-beta.1", | ||
"description": "GitHub OAuth App authentication for JavaScript", | ||
@@ -21,22 +22,20 @@ "repository": "github:octokit/auth-oauth-app.js", | ||
"@octokit/auth-oauth-device": "^6.0.0", | ||
"@octokit/auth-oauth-user": "^4.0.0", | ||
"@octokit/request": "^8.0.2", | ||
"@octokit/auth-oauth-user": "^5.0.0", | ||
"@octokit/request": "^9.0.0", | ||
"@octokit/types": "^12.0.0", | ||
"@types/btoa-lite": "^1.0.0", | ||
"btoa-lite": "^1.0.0", | ||
"universal-user-agent": "^6.0.0" | ||
"universal-user-agent": "^7.0.0" | ||
}, | ||
"devDependencies": { | ||
"@octokit/core": "^5.0.0", | ||
"@octokit/tsconfig": "^2.0.0", | ||
"@octokit/core": "^6.0.0", | ||
"@octokit/tsconfig": "^3.0.0", | ||
"@types/fetch-mock": "^7.3.1", | ||
"@types/jest": "^29.0.0", | ||
"esbuild": "^0.19.0", | ||
"esbuild": "^0.20.0", | ||
"fetch-mock": "npm:@gr2m/fetch-mock@9.11.0-pull-request-644.1", | ||
"glob": "^10.2.7", | ||
"jest": "^29.0.0", | ||
"prettier": "3.0.3", | ||
"prettier": "3.2.5", | ||
"semantic-release-plugin-update-version-in-files": "^1.0.0", | ||
"ts-jest": "^29.0.0", | ||
"typescript": "^5.0.0" | ||
"ts-jest": "^29.1.0", | ||
"typescript": "^5.3.0" | ||
}, | ||
@@ -43,0 +42,0 @@ "engines": { |
@@ -62,4 +62,3 @@ # auth-oauth-app.js | ||
```js | ||
const { createOAuthAppAuth } = require("@octokit/auth-oauth-app"); | ||
// or: import { createOAuthAppAuth } from "@octokit/auth-oauth-app"; | ||
import { createOAuthAppAuth } from "@octokit/auth-oauth-app"; | ||
``` | ||
@@ -207,7 +206,7 @@ | ||
```js | ||
const { Octokit } = require("@octokit/core"); | ||
const { | ||
import { Octokit } from "@octokit/core"; | ||
import { | ||
createOAuthAppAuth, | ||
createOAuthUserAuth, | ||
} = require("@octokit/auth-oauth-app"); | ||
} from "@octokit/auth-oauth-app"; | ||
``` | ||
@@ -318,3 +317,3 @@ | ||
```js | ||
const { request } = require("@octokit/request"); | ||
import { request } from "@octokit/request"; | ||
createOAuthAppAuth({ | ||
@@ -444,9 +443,9 @@ clientId: "1234567890abcdef1234", | ||
For example, you can create a new `auth` instance for for a user using [`createOAuthUserAuth`](https://github.com/octokit/auth-oauth-user.js/#readme) which implements auto-refreshing tokens, among other features. You can import `createOAuthUserAuth` directly from `@octokit/auth-oauth-app` which will ensure compatibility. | ||
For example, you can create a new `auth` instance for a user using [`createOAuthUserAuth`](https://github.com/octokit/auth-oauth-user.js/#readme) which implements auto-refreshing tokens, among other features. You can import `createOAuthUserAuth` directly from `@octokit/auth-oauth-app` which will ensure compatibility. | ||
```js | ||
const { | ||
import { | ||
createOAuthAppAuth, | ||
createOAuthUserAuth, | ||
} = require("@octokit/auth-oauth-app"); | ||
} from "@octokit/auth-oauth-app"; | ||
@@ -556,9 +555,9 @@ const appAuth = createOAuthAppAuth({ | ||
For example, you can create a new `auth` instance for for a user using [`createOAuthUserAuth`](https://github.com/octokit/auth-oauth-user.js/#readme) which implements auto-refreshing tokens, among other features. You can import `createOAuthUserAuth` directly from `@octokit/auth-oauth-app` which will ensure compatibility. | ||
For example, you can create a new `auth` instance for a user using [`createOAuthUserAuth`](https://github.com/octokit/auth-oauth-user.js/#readme) which implements auto-refreshing tokens, among other features. You can import `createOAuthUserAuth` directly from `@octokit/auth-oauth-app` which will ensure compatibility. | ||
```js | ||
const { | ||
import { | ||
createOAuthAppAuth, | ||
createOAuthUserAuth, | ||
} = require("@octokit/auth-oauth-app"); | ||
} from "@octokit/auth-oauth-app"; | ||
@@ -565,0 +564,0 @@ const appAuth = createOAuthAppAuth({ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
5
Yes
55747
432
2
1054
+ Added@octokit/auth-oauth-device@7.1.1(transitive)
+ Added@octokit/auth-oauth-user@5.1.1(transitive)
+ Added@octokit/endpoint@10.1.1(transitive)
+ Added@octokit/oauth-authorization-url@7.1.1(transitive)
+ Added@octokit/oauth-methods@5.1.2(transitive)
+ Added@octokit/request@9.1.1(transitive)
+ Added@octokit/request-error@6.1.1(transitive)
+ Addeduniversal-user-agent@7.0.2(transitive)
- Removed@types/btoa-lite@^1.0.0
- Removedbtoa-lite@^1.0.0
- Removed@octokit/auth-oauth-user@4.1.0(transitive)
- Removed@types/btoa-lite@1.0.2(transitive)
Updated@octokit/request@^9.0.0
Updateduniversal-user-agent@^7.0.0