@octokit/auth-oauth-app
Advanced tools
Comparing version 8.0.0 to 8.0.1
@@ -1,32 +0,7 @@ | ||
"use strict"; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __export = (target, all) => { | ||
for (var name in all) | ||
__defProp(target, name, { get: all[name], enumerable: true }); | ||
}; | ||
var __copyProps = (to, from, except, desc) => { | ||
if (from && typeof from === "object" || typeof from === "function") { | ||
for (let key of __getOwnPropNames(from)) | ||
if (!__hasOwnProp.call(to, key) && key !== except) | ||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | ||
} | ||
return to; | ||
}; | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
// pkg/dist-src/index.js | ||
var dist_src_exports = {}; | ||
__export(dist_src_exports, { | ||
createOAuthAppAuth: () => createOAuthAppAuth, | ||
createOAuthUserAuth: () => import_auth_oauth_user3.createOAuthUserAuth | ||
}); | ||
module.exports = __toCommonJS(dist_src_exports); | ||
var import_universal_user_agent = require("universal-user-agent"); | ||
var import_request = require("@octokit/request"); | ||
import { getUserAgent } from "universal-user-agent"; | ||
import { request } from "@octokit/request"; | ||
// pkg/dist-src/auth.js | ||
var import_auth_oauth_user = require("@octokit/auth-oauth-user"); | ||
import { createOAuthUserAuth } from "@octokit/auth-oauth-user"; | ||
async function auth(state, authOptions) { | ||
@@ -59,6 +34,6 @@ if (authOptions.type === "oauth-app") { | ||
}; | ||
const userAuth = state.clientType === "oauth-app" ? await (0, import_auth_oauth_user.createOAuthUserAuth)({ | ||
const userAuth = state.clientType === "oauth-app" ? await createOAuthUserAuth({ | ||
...common, | ||
clientType: state.clientType | ||
}) : await (0, import_auth_oauth_user.createOAuthUserAuth)({ | ||
}) : await createOAuthUserAuth({ | ||
...common, | ||
@@ -71,3 +46,3 @@ clientType: state.clientType | ||
// pkg/dist-src/hook.js | ||
var import_auth_oauth_user2 = require("@octokit/auth-oauth-user"); | ||
import { requiresBasicAuth } from "@octokit/auth-oauth-user"; | ||
async function hook(state, request2, route, parameters) { | ||
@@ -81,3 +56,3 @@ let endpoint = request2.endpoint.merge( | ||
} | ||
if (state.clientType === "github-app" && !(0, import_auth_oauth_user2.requiresBasicAuth)(endpoint.url)) { | ||
if (state.clientType === "github-app" && !requiresBasicAuth(endpoint.url)) { | ||
throw new Error( | ||
@@ -100,12 +75,12 @@ `[@octokit/auth-oauth-app] GitHub Apps cannot use their client ID/secret for basic authentication for endpoints other than "/applications/{client_id}/**". "${endpoint.method} ${endpoint.url}" is not supported.` | ||
// pkg/dist-src/version.js | ||
var VERSION = "8.0.0"; | ||
var VERSION = "8.0.1"; | ||
// pkg/dist-src/index.js | ||
var import_auth_oauth_user3 = require("@octokit/auth-oauth-user"); | ||
import { createOAuthUserAuth as createOAuthUserAuth2 } from "@octokit/auth-oauth-user"; | ||
function createOAuthAppAuth(options) { | ||
const state = Object.assign( | ||
{ | ||
request: import_request.request.defaults({ | ||
request: request.defaults({ | ||
headers: { | ||
"user-agent": `octokit-auth-oauth-app.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` | ||
"user-agent": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}` | ||
} | ||
@@ -121,6 +96,5 @@ }), | ||
} | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
export { | ||
createOAuthAppAuth, | ||
createOAuthUserAuth | ||
}); | ||
createOAuthUserAuth2 as createOAuthUserAuth | ||
}; |
@@ -1,4 +0,4 @@ | ||
const VERSION = "8.0.0"; | ||
const VERSION = "8.0.1"; | ||
export { | ||
VERSION | ||
}; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "8.0.0"; | ||
export declare const VERSION = "8.0.1"; |
@@ -72,3 +72,3 @@ // pkg/dist-src/index.js | ||
// pkg/dist-src/version.js | ||
var VERSION = "8.0.0"; | ||
var VERSION = "8.0.1"; | ||
@@ -75,0 +75,0 @@ // pkg/dist-src/index.js |
@@ -7,3 +7,3 @@ { | ||
"type": "module", | ||
"version": "8.0.0", | ||
"version": "8.0.1", | ||
"description": "GitHub OAuth App authentication for JavaScript", | ||
@@ -48,7 +48,19 @@ "repository": "github:octokit/auth-oauth-app.js", | ||
], | ||
"main": "dist-node/index.js", | ||
"browser": "dist-web/index.js", | ||
"types": "dist-types/index.d.ts", | ||
"module": "dist-src/index.js", | ||
"exports": { | ||
".": { | ||
"node": { | ||
"types": "./dist-types/index.d.ts", | ||
"import": "./dist-node/index.js" | ||
}, | ||
"browser": { | ||
"types": "./dist-types/web.d.ts", | ||
"import": "./dist-web/index.js" | ||
}, | ||
"default": { | ||
"types": "./dist-types/index.d.ts", | ||
"import": "./dist-node/index.js" | ||
} | ||
} | ||
}, | ||
"sideEffects": false | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
54646
407