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

@octokit/auth-oauth-app

Package Overview
Dependencies
Maintainers
3
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit/auth-oauth-app - npm Package Compare versions

Comparing version 4.3.4 to 5.0.0

123

dist-node/index.js

@@ -12,92 +12,2 @@ 'use strict';

function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) {
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
}
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
}
return target;
}
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
return target;
}
function _objectWithoutProperties(source, excluded) {
if (source == null) return {};
var target = _objectWithoutPropertiesLoose(source, excluded);
var key, i;
if (Object.getOwnPropertySymbols) {
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
for (i = 0; i < sourceSymbolKeys.length; i++) {
key = sourceSymbolKeys[i];
if (excluded.indexOf(key) >= 0) continue;
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
target[key] = source[key];
}
}
return target;
}
const _excluded = ["type"];
async function auth(state, authOptions) {

@@ -117,21 +27,24 @@ if (authOptions.type === "oauth-app") {

if ("factory" in authOptions) {
const _authOptions$state = _objectSpread2(_objectSpread2({}, authOptions), state),
options = _objectWithoutProperties(_authOptions$state, _excluded); // @ts-expect-error TODO: `option` cannot be never, is this a bug?
const {
type,
...options
} = { ...authOptions,
...state
}; // @ts-expect-error TODO: `option` cannot be never, is this a bug?
return authOptions.factory(options);
}
const common = _objectSpread2({
const common = {
clientId: state.clientId,
clientSecret: state.clientSecret,
request: state.request
}, authOptions); // TS: Look what you made me do
request: state.request,
...authOptions
}; // TS: Look what you made me do
const userAuth = state.clientType === "oauth-app" ? await authOauthUser.createOAuthUserAuth(_objectSpread2(_objectSpread2({}, common), {}, {
const userAuth = state.clientType === "oauth-app" ? await authOauthUser.createOAuthUserAuth({ ...common,
clientType: state.clientType
})) : await authOauthUser.createOAuthUserAuth(_objectSpread2(_objectSpread2({}, common), {}, {
}) : await authOauthUser.createOAuthUserAuth({ ...common,
clientType: state.clientType
}));
});
return userAuth();

@@ -164,3 +77,3 @@ }

const VERSION = "4.3.4";
const VERSION = "5.0.0";

@@ -183,8 +96,8 @@ function createOAuthAppAuth(options) {

Object.defineProperty(exports, 'createOAuthUserAuth', {
enumerable: true,
get: function () {
return authOauthUser.createOAuthUserAuth;
}
enumerable: true,
get: function () {
return authOauthUser.createOAuthUserAuth;
}
});
exports.createOAuthAppAuth = createOAuthAppAuth;
//# sourceMappingURL=index.js.map

2

dist-src/version.js

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

export const VERSION = "4.3.4";
export const VERSION = "5.0.0";

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

export declare const VERSION = "4.3.4";
export declare const VERSION = "5.0.0";

@@ -69,3 +69,3 @@ import { getUserAgent } from 'universal-user-agent';

const VERSION = "4.3.4";
const VERSION = "5.0.0";

@@ -72,0 +72,0 @@ function createOAuthAppAuth(options) {

{
"name": "@octokit/auth-oauth-app",
"description": "GitHub OAuth App authentication for JavaScript",
"version": "4.3.4",
"version": "5.0.0",
"license": "MIT",

@@ -44,2 +44,5 @@ "files": [

},
"engines": {
"node": ">= 14"
},
"publishConfig": {

@@ -46,0 +49,0 @@ "access": "public"

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