Socket
Socket
Sign inDemoInstall

@electron/get

Package Overview
Dependencies
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@electron/get - npm Package Compare versions

Comparing version 1.13.1 to 1.14.0

6

dist/cjs/proxy.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const debug = require("debug");
const utils_1 = require("./utils");
const d = debug('@electron/get:proxy');

@@ -13,2 +14,7 @@ /**

if (MAJOR_NODEJS_VERSION >= 10) {
// See: https://github.com/electron/get/pull/214#discussion_r798845713
const env = utils_1.getEnv('GLOBAL_AGENT_');
process.env.GLOBAL_AGENT_HTTP_PROXY = env('HTTP_PROXY');
process.env.GLOBAL_AGENT_HTTPS_PROXY = env('HTTPS_PROXY');
process.env.GLOBAL_AGENT_NO_PROXY = env('NO_PROXY');
// `global-agent` works with Node.js v10 and above.

@@ -15,0 +21,0 @@ require('global-agent').bootstrap();

@@ -20,1 +20,6 @@ export declare function withTempDirectoryIn<T>(parentDirectory: string | undefined, fn: (directory: string) => Promise<T>): Promise<T>;

export declare function isOfficialLinuxIA32Download(platform: string, arch: string, version: string, mirrorOptions?: object): boolean;
/**
* Find the value of a environment variable which may or may not have the
* prefix, in a case-insensitive manner.
*/
export declare function getEnv(prefix?: string): (name: string) => string | undefined;

@@ -83,2 +83,18 @@ "use strict";

exports.isOfficialLinuxIA32Download = isOfficialLinuxIA32Download;
/**
* Find the value of a environment variable which may or may not have the
* prefix, in a case-insensitive manner.
*/
function getEnv(prefix = '') {
const envsLowerCase = {};
for (const envKey in process.env) {
envsLowerCase[envKey.toLowerCase()] = process.env[envKey];
}
return (name) => {
return (envsLowerCase[`${prefix}${name}`.toLowerCase()] ||
envsLowerCase[name.toLowerCase()] ||
undefined);
};
}
exports.getEnv = getEnv;
//# sourceMappingURL=utils.js.map
import * as debug from 'debug';
import { getEnv } from './utils';
const d = debug('@electron/get:proxy');

@@ -11,2 +12,7 @@ /**

if (MAJOR_NODEJS_VERSION >= 10) {
// See: https://github.com/electron/get/pull/214#discussion_r798845713
const env = getEnv('GLOBAL_AGENT_');
process.env.GLOBAL_AGENT_HTTP_PROXY = env('HTTP_PROXY');
process.env.GLOBAL_AGENT_HTTPS_PROXY = env('HTTPS_PROXY');
process.env.GLOBAL_AGENT_NO_PROXY = env('NO_PROXY');
// `global-agent` works with Node.js v10 and above.

@@ -13,0 +19,0 @@ require('global-agent').bootstrap();

@@ -20,1 +20,6 @@ export declare function withTempDirectoryIn<T>(parentDirectory: string | undefined, fn: (directory: string) => Promise<T>): Promise<T>;

export declare function isOfficialLinuxIA32Download(platform: string, arch: string, version: string, mirrorOptions?: object): boolean;
/**
* Find the value of a environment variable which may or may not have the
* prefix, in a case-insensitive manner.
*/
export declare function getEnv(prefix?: string): (name: string) => string | undefined;

@@ -73,2 +73,17 @@ import * as childProcess from 'child_process';

}
/**
* Find the value of a environment variable which may or may not have the
* prefix, in a case-insensitive manner.
*/
export function getEnv(prefix = '') {
const envsLowerCase = {};
for (const envKey in process.env) {
envsLowerCase[envKey.toLowerCase()] = process.env[envKey];
}
return (name) => {
return (envsLowerCase[`${prefix}${name}`.toLowerCase()] ||
envsLowerCase[name.toLowerCase()] ||
undefined);
};
}
//# sourceMappingURL=utils.js.map

2

package.json
{
"name": "@electron/get",
"version": "1.13.1",
"version": "1.14.0",
"description": "Utility for downloading artifacts from different versions of Electron",

@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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