@electron/get
Advanced tools
Comparing version 1.14.0 to 1.14.1
@@ -16,5 +16,5 @@ "use strict"; | ||
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'); | ||
utils_1.setEnv('GLOBAL_AGENT_HTTP_PROXY', env('HTTP_PROXY')); | ||
utils_1.setEnv('GLOBAL_AGENT_HTTPS_PROXY', env('HTTPS_PROXY')); | ||
utils_1.setEnv('GLOBAL_AGENT_NO_PROXY', env('NO_PROXY')); | ||
// `global-agent` works with Node.js v10 and above. | ||
@@ -21,0 +21,0 @@ require('global-agent').bootstrap(); |
@@ -25,1 +25,2 @@ export declare function withTempDirectoryIn<T>(parentDirectory: string | undefined, fn: (directory: string) => Promise<T>): Promise<T>; | ||
export declare function getEnv(prefix?: string): (name: string) => string | undefined; | ||
export declare function setEnv(key: string, value: string | undefined): void; |
@@ -99,2 +99,10 @@ "use strict"; | ||
exports.getEnv = getEnv; | ||
function setEnv(key, value) { | ||
// The `void` operator always returns `undefined`. | ||
// See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void | ||
if (value !== void 0) { | ||
process.env[key] = value; | ||
} | ||
} | ||
exports.setEnv = setEnv; | ||
//# sourceMappingURL=utils.js.map |
import * as debug from 'debug'; | ||
import { getEnv } from './utils'; | ||
import { getEnv, setEnv } from './utils'; | ||
const d = debug('@electron/get:proxy'); | ||
@@ -14,5 +14,5 @@ /** | ||
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'); | ||
setEnv('GLOBAL_AGENT_HTTP_PROXY', env('HTTP_PROXY')); | ||
setEnv('GLOBAL_AGENT_HTTPS_PROXY', env('HTTPS_PROXY')); | ||
setEnv('GLOBAL_AGENT_NO_PROXY', env('NO_PROXY')); | ||
// `global-agent` works with Node.js v10 and above. | ||
@@ -19,0 +19,0 @@ require('global-agent').bootstrap(); |
@@ -25,1 +25,2 @@ export declare function withTempDirectoryIn<T>(parentDirectory: string | undefined, fn: (directory: string) => Promise<T>): Promise<T>; | ||
export declare function getEnv(prefix?: string): (name: string) => string | undefined; | ||
export declare function setEnv(key: string, value: string | undefined): void; |
@@ -88,2 +88,9 @@ import * as childProcess from 'child_process'; | ||
} | ||
export function setEnv(key, value) { | ||
// The `void` operator always returns `undefined`. | ||
// See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void | ||
if (value !== void 0) { | ||
process.env[key] = value; | ||
} | ||
} | ||
//# sourceMappingURL=utils.js.map |
{ | ||
"name": "@electron/get", | ||
"version": "1.14.0", | ||
"version": "1.14.1", | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
92003
1316
29