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

@octokit/oauth-app

Package Overview
Dependencies
Maintainers
4
Versions
67
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 4.2.2 to 4.2.3

4

dist-node/index.js

@@ -44,3 +44,3 @@ "use strict";

// pkg/dist-src/version.js
var VERSION = "4.2.2";
var VERSION = "4.2.3";

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

text: `<h1>Token created successfully</h1>
<p>Your token is: <strong>${token2}</strong>. Copy it now as it cannot be shown again.</p>`

@@ -475,0 +475,0 @@ };

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

import {
createOAuthUserAuth
} from "@octokit/auth-oauth-user";
import { createOAuthUserAuth } from "@octokit/auth-oauth-user";
import { emitEvent } from "../emit-event";

@@ -5,0 +3,0 @@ async function getUserOctokitWithState(state, options) {

@@ -5,2 +5,3 @@ import { parseRequest } from "./api-gateway-v2-parse-request";

import { onUnhandledRequestDefault } from "../on-unhandled-request-default";
import { OAuthApp } from "../../index";
async function onUnhandledRequestDefaultAWSAPIGatewayV2(event) {

@@ -20,3 +21,3 @@ const request = parseRequest(event);

}
onUnhandledRequest ?? (onUnhandledRequest = onUnhandledRequestDefaultAWSAPIGatewayV2);
onUnhandledRequest ??= onUnhandledRequestDefaultAWSAPIGatewayV2;
return async function(event) {

@@ -23,0 +24,0 @@ const request = parseRequest(event);

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

import { OAuthApp } from "../index";
import fromEntries from "fromentries";

@@ -78,3 +79,3 @@ async function handleRequest(app, { pathPrefix = "/api/github/oauth" }, request) {

text: `<h1>Token created successfully</h1>
<p>Your token is: <strong>${token2}</strong>. Copy it now as it cannot be shown again.</p>`

@@ -81,0 +82,0 @@ };

@@ -5,2 +5,3 @@ import { parseRequest } from "./parse-request";

import { handleRequest } from "../handle-request";
import { OAuthApp } from "../../index";
function onUnhandledRequestDefaultNode(request, response) {

@@ -20,3 +21,3 @@ const octokitRequest = parseRequest(request);

}
onUnhandledRequest ?? (onUnhandledRequest = onUnhandledRequestDefaultNode);
onUnhandledRequest ??= onUnhandledRequestDefaultNode;
return async function(request, response, next) {

@@ -23,0 +24,0 @@ const octokitRequest = parseRequest(request);

@@ -5,2 +5,3 @@ import { parseRequest } from "./parse-request";

import { onUnhandledRequestDefault } from "../on-unhandled-request-default";
import { OAuthApp } from "../../index";
async function onUnhandledRequestDefaultWebWorker(request) {

@@ -20,3 +21,3 @@ const octokitRequest = parseRequest(request);

}
onUnhandledRequest ?? (onUnhandledRequest = onUnhandledRequestDefaultWebWorker);
onUnhandledRequest ??= onUnhandledRequestDefaultWebWorker;
return async function(request) {

@@ -23,0 +24,0 @@ const octokitRequest = parseRequest(request);

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

const VERSION = "4.2.2";
const VERSION = "4.2.3";
export {
VERSION
};

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

import { EventHandler, EventAndActionName, State, ClientType, Options } from "./types";
import type { EventHandler, EventAndActionName, State, ClientType, Options } from "./types";
export declare function addEventHandler(state: State, eventName: EventAndActionName | EventAndActionName[], eventHandler: EventHandler<Options<ClientType>>): void;

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

import { State, EventHandlerContext, ClientType, Options } from "./types";
import type { State, EventHandlerContext, ClientType, Options } from "./types";
export declare function emitEvent(state: State, context: EventHandlerContext<Options<ClientType>>): Promise<void>;

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

import { GetUserOctokitWithStateInterface } from "./methods/get-user-octokit";
import { GetWebFlowAuthorizationUrlInterface } from "./methods/get-web-flow-authorization-url";
import { CreateTokenInterface } from "./methods/create-token";
import { CheckTokenInterface } from "./methods/check-token";
import { ResetTokenInterface } from "./methods/reset-token";
import { RefreshTokenInterface } from "./methods/refresh-token";
import { ScopeTokenInterface } from "./methods/scope-token";
import { DeleteTokenInterface } from "./methods/delete-token";
import { DeleteAuthorizationInterface } from "./methods/delete-authorization";
import { type GetUserOctokitWithStateInterface } from "./methods/get-user-octokit";
import { type GetWebFlowAuthorizationUrlInterface } from "./methods/get-web-flow-authorization-url";
import { type CreateTokenInterface } from "./methods/create-token";
import { type CheckTokenInterface } from "./methods/check-token";
import { type ResetTokenInterface } from "./methods/reset-token";
import { type RefreshTokenInterface } from "./methods/refresh-token";
import { type ScopeTokenInterface } from "./methods/scope-token";
import { type DeleteTokenInterface } from "./methods/delete-token";
import { type DeleteAuthorizationInterface } from "./methods/delete-authorization";
import type { AddEventHandler, ClientType, ClientTypeFromOptions, ConstructorOptions, OctokitTypeFromOptions, Options } from "./types";

@@ -11,0 +11,0 @@ export type { HandlerOptions, OctokitRequest, OctokitResponse, } from "./middleware/types";

import * as OAuthMethods from "@octokit/oauth-methods";
import { ClientType, State } from "../types";
import type { ClientType, State } from "../types";
export type CheckTokenOptions = {

@@ -4,0 +4,0 @@ token: string;

import * as OAuthAppAuth from "@octokit/auth-oauth-app";
import { ClientType, State } from "../types";
import type { ClientType, State } from "../types";
export type CreateTokenWebFlowOptions = Omit<OAuthAppAuth.WebFlowAuthOptions, "type">;

@@ -4,0 +4,0 @@ export type CreateTokenOAuthAppDeviceFlowOptions = Omit<OAuthAppAuth.OAuthAppDeviceFlowAuthOptions, "type">;

import * as OAuthMethods from "@octokit/oauth-methods";
import { State } from "../types";
import type { State } from "../types";
export type DeleteAuthorizationOptions = {

@@ -4,0 +4,0 @@ token: string;

import * as OAuthMethods from "@octokit/oauth-methods";
import { State } from "../types";
import type { State } from "../types";
export type DeleteTokenOptions = {

@@ -4,0 +4,0 @@ token: string;

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

import { OAuthAppStrategyOptionsWebFlow, OAuthAppStrategyOptionsDeviceFlow, OAuthAppStrategyOptionsExistingAuthentication, GitHubAppStrategyOptionsWebFlow, GitHubAppStrategyOptionsDeviceFlow, GitHubAppStrategyOptionsExistingAuthentication, GitHubAppStrategyOptionsExistingAuthenticationWithExpiration } from "@octokit/auth-oauth-user";
import { State, OctokitInstance, ClientType } from "../types";
import type { OAuthAppStrategyOptionsWebFlow, OAuthAppStrategyOptionsDeviceFlow, OAuthAppStrategyOptionsExistingAuthentication, GitHubAppStrategyOptionsWebFlow, GitHubAppStrategyOptionsDeviceFlow, GitHubAppStrategyOptionsExistingAuthentication, GitHubAppStrategyOptionsExistingAuthenticationWithExpiration } from "@octokit/auth-oauth-user";
import type { State, OctokitInstance, ClientType } from "../types";
type StateOptions = "clientType" | "clientId" | "clientSecret" | "request";

@@ -4,0 +4,0 @@ export type GetUserOctokitOAuthAppOptions = Omit<OAuthAppStrategyOptionsWebFlow, StateOptions> | Omit<OAuthAppStrategyOptionsDeviceFlow, StateOptions> | Omit<OAuthAppStrategyOptionsExistingAuthentication, StateOptions>;

import * as OAuthMethods from "@octokit/oauth-methods";
import { ClientType, State } from "../types";
import type { ClientType, State } from "../types";
type StateOptions = "clientType" | "clientId" | "clientSecret" | "request";

@@ -4,0 +4,0 @@ export type GetWebFlowAuthorizationUrlOAuthAppOptions = Omit<OAuthMethods.GetWebFlowAuthorizationUrlOAuthAppOptions, StateOptions>;

import * as OAuthMethods from "@octokit/oauth-methods";
import { State } from "../types";
import type { State } from "../types";
export type RefreshTokenOptions = {

@@ -4,0 +4,0 @@ refreshToken: string;

import * as OAuthMethods from "@octokit/oauth-methods";
import { ClientType, State } from "../types";
import type { ClientType, State } from "../types";
export type ResetTokenOptions = {

@@ -4,0 +4,0 @@ token: string;

import * as OAuthMethods from "@octokit/oauth-methods";
import { State } from "../types";
import type { State } from "../types";
type StateOptions = "clientType" | "clientId" | "clientSecret" | "request";

@@ -4,0 +4,0 @@ export type ScopeTokenOptions = Omit<OAuthMethods.ScopeTokenOptions, StateOptions>;

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

import { OctokitRequest } from "../types";
import type { OctokitRequest } from "../types";
import type { APIGatewayProxyEventV2 } from "aws-lambda";
export declare function parseRequest(request: APIGatewayProxyEventV2): OctokitRequest;

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

import { OctokitResponse } from "../types";
import type { OctokitResponse } from "../types";
import type { APIGatewayProxyStructuredResultV2 } from "aws-lambda";
export declare function sendResponse(octokitResponse: OctokitResponse): APIGatewayProxyStructuredResultV2;

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

import { HandlerOptions } from "../types";
import type { HandlerOptions } from "../types";
import { OAuthApp } from "../../index";
import { ClientType, Options } from "../../types";
import type { ClientType, Options } from "../../types";
import type { APIGatewayProxyEventV2, APIGatewayProxyStructuredResultV2 } from "aws-lambda";

@@ -5,0 +5,0 @@ export declare function createAWSLambdaAPIGatewayV2Handler(app: OAuthApp<Options<ClientType>>, { pathPrefix, onUnhandledRequest, }?: HandlerOptions & {

import { OAuthApp } from "../index";
import { HandlerOptions, OctokitRequest, OctokitResponse } from "./types";
import { ClientType, Options } from "../types";
import type { HandlerOptions, OctokitRequest, OctokitResponse } from "./types";
import type { ClientType, Options } from "../types";
export declare function handleRequest(app: OAuthApp<Options<ClientType>>, { pathPrefix }: HandlerOptions, request: OctokitRequest): Promise<OctokitResponse | null>;
type IncomingMessage = any;
type ServerResponse = any;
import { OAuthApp } from "../../index";
import { HandlerOptions } from "../types";
import { ClientType, Options } from "../../types";
import type { HandlerOptions } from "../types";
import type { ClientType, Options } from "../../types";
export declare function createNodeMiddleware(app: OAuthApp<Options<ClientType>>, { pathPrefix, onUnhandledRequest, }?: HandlerOptions & {

@@ -7,0 +7,0 @@ onUnhandledRequest?: (request: IncomingMessage, response: ServerResponse) => void;

type IncomingMessage = any;
import { OctokitRequest } from "../types";
import type { OctokitRequest } from "../types";
export declare function parseRequest(request: IncomingMessage): OctokitRequest;
export {};
type ServerResponse = any;
import { OctokitResponse } from "../types";
import type { OctokitResponse } from "../types";
export declare function sendResponse(octokitResponse: OctokitResponse, response: ServerResponse): void;
export {};

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

import { OctokitRequest, OctokitResponse } from "./types";
import type { OctokitRequest, OctokitResponse } from "./types";
export declare function onUnhandledRequestDefault(request: OctokitRequest): OctokitResponse;
import { OAuthApp } from "../../index";
import { HandlerOptions } from "../types";
import { ClientType, Options } from "../../types";
import type { HandlerOptions } from "../types";
import type { ClientType, Options } from "../../types";
export declare function createWebWorkerHandler<T extends Options<ClientType>>(app: OAuthApp<T>, { pathPrefix, onUnhandledRequest, }?: HandlerOptions & {

@@ -5,0 +5,0 @@ onUnhandledRequest?: (request: Request) => Response | Promise<Response>;

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

import { OctokitRequest } from "../types";
import type { OctokitRequest } from "../types";
export declare function parseRequest(request: Request): OctokitRequest;

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

import { OctokitResponse } from "../types";
import type { OctokitResponse } from "../types";
export declare function sendResponse(octokitResponse: OctokitResponse): Response;
import { Octokit } from "@octokit/core";
import { OAuthAppUserAuthentication, GitHubAppUserAuthentication, GitHubAppUserAuthenticationWithExpiration } from "@octokit/auth-oauth-app";
import type { OAuthAppUserAuthentication, GitHubAppUserAuthentication, GitHubAppUserAuthenticationWithExpiration } from "@octokit/auth-oauth-app";
import { OAuthAppOctokit } from "./oauth-app-octokit";

@@ -4,0 +4,0 @@ export type ClientType = "oauth-app" | "github-app";

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

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

@@ -19,3 +19,3 @@ "repository": "github:octokit/oauth-app.js",

"@octokit/core": "^4.0.0",
"@octokit/oauth-authorization-url": "^5.0.0",
"@octokit/oauth-authorization-url": "^6.0.0",
"@octokit/oauth-methods": "^2.0.0",

@@ -27,7 +27,7 @@ "@types/aws-lambda": "^8.10.83",

"devDependencies": {
"@octokit/tsconfig": "^1.0.2",
"@octokit/tsconfig": "^2.0.0",
"@types/jest": "^29.0.0",
"@types/node": "^18.0.0",
"@types/node-fetch": "^2.5.4",
"esbuild": "^0.17.19",
"esbuild": "^0.18.0",
"express": "^4.17.1",

@@ -34,0 +34,0 @@ "fetch-mock": "^9.0.0",

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