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

@octokit/auth-app

Package Overview
Dependencies
Maintainers
2
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit/auth-app - npm Package Compare versions

Comparing version 2.5.1 to 2.6.0

12

dist-node/index.js

@@ -112,5 +112,5 @@ 'use strict';

async function getInstallationAuthentication(state, options, customRequest) {
const installationId = options.installationId || state.installationId;
const installationId = Number(options.installationId || state.installationId);
if (typeof installationId !== "number") {
if (!installationId) {
throw new Error("[@octokit/auth-app] installationId option is required for installation authentication.");

@@ -415,3 +415,3 @@ }

const VERSION = "2.5.1";
const VERSION = "2.6.0";

@@ -426,3 +426,7 @@ const createAppAuth = function createAppAuth(options) {

cache: getCache()
}, options);
}, options, {
id: Number(options.id)
}, options.installationId ? {
installationId: Number(options.installationId)
} : {});
return Object.assign(auth.bind(null, state), {

@@ -429,0 +433,0 @@ hook: hook.bind(null, state)

@@ -5,5 +5,4 @@ import { get, set } from "./cache";

export async function getInstallationAuthentication(state, options, customRequest) {
const installationId = (options.installationId ||
state.installationId);
if (typeof installationId !== "number") {
const installationId = Number(options.installationId || state.installationId);
if (!installationId) {
throw new Error("[@octokit/auth-app] installationId option is required for installation authentication.");

@@ -10,0 +9,0 @@ }

@@ -15,3 +15,7 @@ import { getUserAgent } from "universal-user-agent";

cache: getCache(),
}, options);
}, options, {
id: Number(options.id),
}, options.installationId
? { installationId: Number(options.installationId) }
: {});
return Object.assign(auth.bind(null, state), {

@@ -18,0 +22,0 @@ hook: hook.bind(null, state),

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

export const VERSION = "2.5.1";
export const VERSION = "2.6.0";

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

import { AuthOptions, StrategyOptionsWithDefaults, Authentication } from "./types";
export declare function auth(state: StrategyOptionsWithDefaults, options: AuthOptions): Promise<Authentication>;
import { AuthOptions, Authentication, State } from "./types";
export declare function auth(state: State, options: AuthOptions): Promise<Authentication>;

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

import { RequestInterface, InstallationAuthOptions, StrategyOptionsWithDefaults, InstallationAccessTokenAuthentication } from "./types";
export declare function getInstallationAuthentication(state: StrategyOptionsWithDefaults, options: InstallationAuthOptions, customRequest?: RequestInterface): Promise<InstallationAccessTokenAuthentication>;
import { InstallationAuthOptions, InstallationAccessTokenAuthentication, RequestInterface, State } from "./types";
export declare function getInstallationAuthentication(state: State, options: InstallationAuthOptions, customRequest?: RequestInterface): Promise<InstallationAccessTokenAuthentication>;

@@ -60,5 +60,5 @@ import * as OctokitTypes from "@octokit/types";

export declare type StrategyOptions = {
id: number;
id: number | string;
privateKey: string;
installationId?: number;
installationId?: number | string;
clientId?: string;

@@ -71,2 +71,3 @@ clientSecret?: string;

export declare type StrategyOptionsWithDefaults = StrategyOptions & {
id: number;
request: OctokitTypes.RequestInterface;

@@ -79,3 +80,3 @@ cache: Cache;

export declare type InstallationAuthOptions = {
installationId?: number;
installationId?: number | string;
repositoryIds?: number[];

@@ -97,4 +98,6 @@ permissions?: Permissions;

export declare type State = StrategyOptions & {
id: number;
installationId?: number;
request: OctokitTypes.RequestInterface;
cache: Cache;
};

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

export declare const VERSION = "2.5.1";
export declare const VERSION = "2.6.0";

@@ -99,5 +99,4 @@ import { getUserAgent } from 'universal-user-agent';

async function getInstallationAuthentication(state, options, customRequest) {
const installationId = (options.installationId ||
state.installationId);
if (typeof installationId !== "number") {
const installationId = Number(options.installationId || state.installationId);
if (!installationId) {
throw new Error("[@octokit/auth-app] installationId option is required for installation authentication.");

@@ -326,3 +325,3 @@ }

const VERSION = "2.5.1";
const VERSION = "2.6.0";

@@ -337,3 +336,7 @@ const createAppAuth = function createAppAuth(options) {

cache: getCache(),
}, options);
}, options, {
id: Number(options.id),
}, options.installationId
? { installationId: Number(options.installationId) }
: {});
return Object.assign(auth.bind(null, state), {

@@ -340,0 +343,0 @@ hook: hook.bind(null, state),

{
"name": "@octokit/auth-app",
"description": "GitHub App authentication for JavaScript",
"version": "2.5.1",
"version": "2.6.0",
"license": "MIT",

@@ -6,0 +6,0 @@ "files": [

Sorry, the diff of this file is not supported yet

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