update electron to v43
This commit is contained in:
parent
68ac0beedf
commit
fb6c8b6ee9
5385 changed files with 513060 additions and 123058 deletions
14
electron/node_modules/builder-util/out/nodeHttpExecutor.js
generated
vendored
14
electron/node_modules/builder-util/out/nodeHttpExecutor.js
generated
vendored
|
|
@ -1,11 +1,13 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.httpExecutor = exports.NodeHttpExecutor = void 0;
|
||||
exports.buildGotProxyAgent = buildGotProxyAgent;
|
||||
const builder_util_runtime_1 = require("builder-util-runtime");
|
||||
const http_1 = require("http");
|
||||
const http_proxy_agent_1 = require("http-proxy-agent");
|
||||
const https = require("https");
|
||||
const https_proxy_agent_1 = require("https-proxy-agent");
|
||||
const stringUtil_1 = require("./stringUtil");
|
||||
class NodeHttpExecutor extends builder_util_runtime_1.HttpExecutor {
|
||||
// noinspection JSMethodCanBeStatic
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
|
|
@ -21,4 +23,16 @@ class NodeHttpExecutor extends builder_util_runtime_1.HttpExecutor {
|
|||
}
|
||||
exports.NodeHttpExecutor = NodeHttpExecutor;
|
||||
exports.httpExecutor = new NodeHttpExecutor();
|
||||
function buildGotProxyAgent() {
|
||||
// Use Array.find so a whitespace-only uppercase var doesn't block the lowercase fallback.
|
||||
const httpsProxy = [process.env.HTTPS_PROXY, process.env.https_proxy].find(v => !(0, stringUtil_1.isEmptyOrSpaces)(v));
|
||||
const httpProxy = [process.env.HTTP_PROXY, process.env.http_proxy].find(v => !(0, stringUtil_1.isEmptyOrSpaces)(v));
|
||||
if (!httpsProxy && !httpProxy) {
|
||||
return undefined;
|
||||
}
|
||||
return {
|
||||
...(httpProxy ? { http: new http_proxy_agent_1.HttpProxyAgent(httpProxy) } : {}),
|
||||
...(httpsProxy ? { https: new https_proxy_agent_1.HttpsProxyAgent(httpsProxy) } : {}),
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=nodeHttpExecutor.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue