Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@octokit/oauth-app

Package Overview
Dependencies
Maintainers
0
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit/oauth-app - npm Package Compare versions

Comparing version 7.1.3 to 7.1.4

39

dist-node/index.js

@@ -5,3 +5,3 @@ // pkg/dist-src/index.js

// pkg/dist-src/version.js
var VERSION = "7.1.3";
var VERSION = "7.1.4";

@@ -289,3 +289,3 @@ // pkg/dist-src/add-event-handler.js

}) : (
// istanbul ignore next
/* v8 ignore next 4 */
await OAuthMethods6.deleteToken({

@@ -324,3 +324,3 @@ clientType: "github-app",

}) : (
// istanbul ignore next
/* v8 ignore next 4 */
await OAuthMethods7.deleteAuthorization({

@@ -420,8 +420,18 @@ clientType: "github-app",

if (route === routes.getLogin) {
const { url } = app.getWebFlowAuthorizationUrl({
state: query.state,
scopes: query.scopes ? query.scopes.split(",") : void 0,
allowSignup: query.allowSignup ? query.allowSignup === "true" : void 0,
redirectUrl: query.redirectUrl
});
const authOptions = {};
if (query.state) {
Object.assign(authOptions, { state: query.state });
}
if (query.scopes) {
Object.assign(authOptions, { scopes: query.scopes.split(",") });
}
if (query.allowSignup) {
Object.assign(authOptions, {
allowSignup: query.allowSignup === "true"
});
}
if (query.redirectUrl) {
Object.assign(authOptions, { redirectUrl: query.redirectUrl });
}
const { url } = app.getWebFlowAuthorizationUrl(authOptions);
return { status: 302, headers: { location: url } };

@@ -642,6 +652,9 @@ }

function sendResponse2(octokitResponse) {
return new Response(octokitResponse.text, {
status: octokitResponse.status,
headers: octokitResponse.headers
});
const responseOptions = {
status: octokitResponse.status
};
if (octokitResponse.headers) {
Object.assign(responseOptions, { headers: octokitResponse.headers });
}
return new Response(octokitResponse.text, responseOptions);
}

@@ -648,0 +661,0 @@

@@ -15,3 +15,3 @@ import * as OAuthMethods from "@octokit/oauth-methods";

}) : (
// istanbul ignore next
/* v8 ignore next 4 */
await OAuthMethods.deleteAuthorization({

@@ -18,0 +18,0 @@ clientType: "github-app",

@@ -15,3 +15,3 @@ import * as OAuthMethods from "@octokit/oauth-methods";

}) : (
// istanbul ignore next
/* v8 ignore next 4 */
await OAuthMethods.deleteToken({

@@ -18,0 +18,0 @@ clientType: "github-app",

@@ -55,8 +55,18 @@ import { OAuthApp } from "../index.js";

if (route === routes.getLogin) {
const { url } = app.getWebFlowAuthorizationUrl({
state: query.state,
scopes: query.scopes ? query.scopes.split(",") : void 0,
allowSignup: query.allowSignup ? query.allowSignup === "true" : void 0,
redirectUrl: query.redirectUrl
});
const authOptions = {};
if (query.state) {
Object.assign(authOptions, { state: query.state });
}
if (query.scopes) {
Object.assign(authOptions, { scopes: query.scopes.split(",") });
}
if (query.allowSignup) {
Object.assign(authOptions, {
allowSignup: query.allowSignup === "true"
});
}
if (query.redirectUrl) {
Object.assign(authOptions, { redirectUrl: query.redirectUrl });
}
const { url } = app.getWebFlowAuthorizationUrl(authOptions);
return { status: 302, headers: { location: url } };

@@ -63,0 +73,0 @@ }

function sendResponse(octokitResponse) {
return new Response(octokitResponse.text, {
status: octokitResponse.status,
headers: octokitResponse.headers
});
const responseOptions = {
status: octokitResponse.status
};
if (octokitResponse.headers) {
Object.assign(responseOptions, { headers: octokitResponse.headers });
}
return new Response(octokitResponse.text, responseOptions);
}

@@ -7,0 +10,0 @@ export {

@@ -1,4 +0,4 @@

const VERSION = "7.1.3";
const VERSION = "7.1.4";
export {
VERSION
};

@@ -31,3 +31,3 @@ import { type GetUserOctokitWithStateInterface } from "./methods/get-user-octokit.js";

static VERSION: string;
static defaults<TDefaults extends Options<ClientType>, S extends Constructor<OAuthApp<TDefaults>>>(this: S, defaults: TDefaults): {
static defaults<TDefaults extends Options<ClientType>, S extends Constructor<OAuthApp<TDefaults>>>(this: S, defaults: TDefaults): ({
new (...args: any[]): {

@@ -47,3 +47,3 @@ type: ClientTypeFromOptions<TDefaults>;

};
} & S;
} & S) & typeof this;
constructor(options: ConstructorOptions<TOptions>);

@@ -50,0 +50,0 @@ type: ClientTypeFromOptions<TOptions>;

@@ -1,2 +0,1 @@

/// <reference types="node" resolution-mode="require"/>
import type { OAuthApp } from "../../index.js";

@@ -3,0 +2,0 @@ import type { HandlerOptions } from "../types.js";

@@ -1,3 +0,2 @@

/// <reference types="node" resolution-mode="require"/>
import type { OctokitRequest } from "../types.js";
export declare function parseRequest(request: Request): OctokitRequest;

@@ -1,3 +0,2 @@

/// <reference types="node" resolution-mode="require"/>
import type { OctokitResponse } from "../types.js";
export declare function sendResponse(octokitResponse: OctokitResponse): Response;

@@ -1,6 +0,4 @@

/// <reference types="node" resolution-mode="require"/>
/// <reference types="node" resolution-mode="require"/>
import { Octokit } from "@octokit/core";
import type { Octokit } from "@octokit/core";
import type { OAuthAppUserAuthentication, GitHubAppUserAuthentication, GitHubAppUserAuthenticationWithExpiration } from "@octokit/auth-oauth-app";
import { OAuthAppOctokit } from "./oauth-app-octokit.js";
import type { OAuthAppOctokit } from "./oauth-app-octokit.js";
export type ClientType = "oauth-app" | "github-app";

@@ -44,6 +42,6 @@ export type OAuthAppOctokitClassType = typeof OAuthAppOctokit;

defaultScopes: Scope[];
allowSignup?: boolean;
baseUrl?: string;
redirectUrl?: string;
log?: typeof console;
allowSignup?: boolean | undefined;
baseUrl?: string | undefined;
redirectUrl?: string | undefined;
log?: typeof console | undefined;
Octokit: OAuthAppOctokitClassType;

@@ -50,0 +48,0 @@ octokit: OctokitInstance;

@@ -1,1 +0,1 @@

export declare const VERSION = "7.1.3";
export declare const VERSION = "7.1.4";
{
"name": "@octokit/oauth-app",
"version": "7.1.3",
"version": "7.1.4",
"description": "GitHub OAuth toolset for Node.js",

@@ -18,4 +18,4 @@ "type": "module",

"@octokit/auth-oauth-user": "^5.0.1",
"@octokit/auth-unauthenticated": "^6.0.0-beta.1",
"@octokit/core": "^6.0.0",
"@octokit/auth-unauthenticated": "^6.0.0",
"@octokit/core": "^6.1.2",
"@octokit/oauth-authorization-url": "^7.0.0",

@@ -27,15 +27,13 @@ "@octokit/oauth-methods": "^5.0.0",

"devDependencies": {
"@octokit/tsconfig": "^3.0.0",
"@types/jest": "^29.0.0",
"@types/node": "^20.0.0",
"esbuild": "^0.21.0",
"@octokit/tsconfig": "^4.0.0",
"@vitest/coverage-v8": "^2.1.1",
"esbuild": "^0.24.0",
"express": "^4.17.1",
"fetch-mock": "npm:@gr2m/fetch-mock@9.11.0-pull-request-644.1",
"glob": "^10.2.5",
"jest": "^29.0.0",
"fetch-mock": "^11.0.0",
"glob": "^11.0.0",
"nock": "^13.0.0",
"prettier": "3.3.2",
"prettier": "3.4.2",
"semantic-release-plugin-update-version-in-files": "^1.0.0",
"ts-jest": "^29.0.0",
"typescript": "^5.0.0"
"typescript": "^5.0.0",
"vitest": "^2.1.1"
},

@@ -42,0 +40,0 @@ "publishConfig": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc