Socket
Socket
Sign inDemoInstall

@octokit/oauth-authorization-url

Package Overview
Dependencies
Maintainers
4
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit/oauth-authorization-url - npm Package Compare versions

Comparing version 6.0.0 to 6.0.1

dist-node/index.js.map

53

dist-node/index.js

@@ -1,5 +0,26 @@

'use strict';
"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);
Object.defineProperty(exports, '__esModule', { value: true });
// pkg/dist-src/index.js
var dist_src_exports = {};
__export(dist_src_exports, {
oauthAuthorizationUrl: () => oauthAuthorizationUrl
});
module.exports = __toCommonJS(dist_src_exports);
function oauthAuthorizationUrl(options) {

@@ -34,16 +55,9 @@ const clientType = options.clientType || "oauth-app";

let url = base;
Object.keys(map)
// Filter out keys that are null and remove the url key
.filter(k => options[k] !== null)
// Filter out empty scopes array
.filter(k => {
if (k !== "scopes") return true;
if (options.clientType === "github-app") return false;
Object.keys(map).filter((k) => options[k] !== null).filter((k) => {
if (k !== "scopes")
return true;
if (options.clientType === "github-app")
return false;
return !Array.isArray(options[k]) || options[k].length > 0;
})
// Map Array with the proper URL parameter names and change the value to a string using template strings
// @ts-ignore
.map(key => [map[key], `${options[key]}`])
// Finally, build the URL
.forEach(([key, value], index) => {
}).map((key) => [map[key], `${options[key]}`]).forEach(([key, value], index) => {
url += index === 0 ? `?` : "&";

@@ -54,4 +68,5 @@ url += `${key}=${encodeURIComponent(value)}`;

}
exports.oauthAuthorizationUrl = oauthAuthorizationUrl;
//# sourceMappingURL=index.js.map
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
oauthAuthorizationUrl
});
{
"name": "@octokit/oauth-authorization-url",
"publishConfig": {
"access": "public"
},
"version": "6.0.1",
"description": "Universal library to retrieve GitHub’s identity URL for the OAuth web flow",
"version": "6.0.0",
"license": "MIT",
"repository": "github:octokit/oauth-authorization-url.js",
"files": [
"dist-*/",
"bin/"
"dist-*/**",
"bin/**"
],
"source": "dist-src/index.js",
"types": "dist-types/index.d.ts",
"main": "dist-node/index.js",
"module": "dist-web/index.js",
"unpkg": "dist-web/index.js",
"pika": true,
"sideEffects": false,
"keywords": [

@@ -22,10 +18,9 @@ "octokit",

],
"repository": "github:octokit/oauth-authorization-url.js",
"dependencies": {},
"author": "Gregor Martynus (https://github.com/gr2m)",
"license": "MIT",
"devDependencies": {
"@pika/pack": "^0.3.7",
"@pika/plugin-build-node": "^0.9.0",
"@pika/plugin-build-web": "^0.9.0",
"@pika/plugin-ts-standard-pkg": "^0.9.0",
"@octokit/tsconfig": "^1.0.2",
"@types/jest": "^29.0.0",
"esbuild": "^0.17.19",
"glob": "^10.2.6",
"jest": "^29.0.0",

@@ -40,5 +35,7 @@ "pika-plugin-unpkg-field": "^1.0.1",

},
"publishConfig": {
"access": "public"
}
"main": "dist-node/index.js",
"browser": "dist-web/index.js",
"types": "dist-types/index.d.ts",
"module": "dist-src/index.js",
"sideEffects": false
}
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