@serverless/platform-sdk
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -20,2 +20,6 @@ 'use strict'; | ||
var _httpsProxyAgent = require('https-proxy-agent'); | ||
var _httpsProxyAgent2 = _interopRequireDefault(_httpsProxyAgent); | ||
var _utils = require('./utils'); | ||
@@ -25,2 +29,4 @@ | ||
var _url = require('url'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -34,2 +40,10 @@ | ||
function configureFetchDefaults() { | ||
// Use HTTPS Proxy (Optional) | ||
var proxy = process.env.proxy || process.env.HTTP_PROXY || process.env.http_proxy || process.env.HTTPS_PROXY || process.env.https_proxy; | ||
var agentOptions = {}; | ||
if (proxy) { | ||
Object.assign(agentOptions, (0, _url.parse)(proxy)); | ||
} | ||
var ca = process.env.ca || process.env.HTTPS_CA || process.env.https_ca; | ||
@@ -59,9 +73,14 @@ | ||
if (caCerts.length > 0) { | ||
var caOptions = { | ||
Object.assign(agentOptions, { | ||
rejectUnauthorized: true, | ||
ca: caCerts | ||
// Update the agent -- http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/node-registering-certs.html | ||
};agent = new _https2.default.Agent(caOptions); | ||
}); | ||
} | ||
if (proxy) { | ||
agent = new _httpsProxyAgent2.default(agentOptions); | ||
} else if (agentOptions.ca) { | ||
agent = new _https2.default.Agent(agentOptions); | ||
} | ||
headers = { | ||
@@ -68,0 +87,0 @@ 'Content-Type': 'application/json', |
{ | ||
"name": "@serverless/platform-sdk", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Serverless Platform SDK", | ||
@@ -33,2 +33,3 @@ "author": "Serverless, Inc.", | ||
"express": "^4.16.3", | ||
"https-proxy-agent": "^2.2.2", | ||
"is-docker": "^1.1.0", | ||
@@ -35,0 +36,0 @@ "isomorphic-fetch": "^2.2.1", |
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
Network access
Supply chain riskThis module accesses the network.
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 5 instances 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
187460
2078
15
21
2
+ Addedhttps-proxy-agent@^2.2.2
+ Addedagent-base@4.3.0(transitive)
+ Addeddebug@3.2.7(transitive)
+ Addedes6-promise@4.2.8(transitive)
+ Addedes6-promisify@5.0.0(transitive)
+ Addedhttps-proxy-agent@2.2.4(transitive)