youzanyun-sdk-nodejs
Advanced tools
Comparing version 2.0.0-beta.4 to 2.0.0-beta.5
@@ -75,2 +75,4 @@ "use strict"; | ||
res = this._doRequest(Object.assign(options, { | ||
url: `${requestUrl.pathname}${requestUrl.search}`, | ||
baseURL: this.proxyHost, | ||
headers | ||
@@ -77,0 +79,0 @@ })); |
{ | ||
"name": "youzanyun-sdk-nodejs", | ||
"version": "2.0.0-beta.4", | ||
"version": "2.0.0-beta.5", | ||
"description": "有赞云 nodejs sdk", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -12,12 +12,16 @@ const https = require('https'); | ||
const envProxyToken = env['YOUZAN_PROXY_TOKEN'] || env['youzan_proxy_token']; | ||
const envNonProxyHosts = (env['YOUZAN_PROXY_NONPROXYHOSTS'] || env['youzan_proxy_nonProxyHosts'] || '').split(','); | ||
const envNonProxyHosts = ( | ||
env['YOUZAN_PROXY_NONPROXYHOSTS'] || | ||
env['youzan_proxy_nonProxyHosts'] || | ||
'' | ||
).split(','); | ||
class HttpClient { | ||
constructor({ | ||
enableProxy = envEnableProxy, | ||
proxyHost = envProxyHost, | ||
proxyToken = envProxyToken, | ||
nonProxyHosts = envNonProxyHosts, | ||
rejectUnauthorized, | ||
} = {}) { | ||
enableProxy = envEnableProxy, | ||
proxyHost = envProxyHost, | ||
proxyToken = envProxyToken, | ||
nonProxyHosts = envNonProxyHosts, | ||
rejectUnauthorized, | ||
} = {}) { | ||
this.enableProxy = enableProxy; | ||
@@ -65,2 +69,4 @@ this.proxyHost = proxyHost; | ||
Object.assign(options, { | ||
url: `${requestUrl.pathname}${requestUrl.search}`, | ||
baseURL: this.proxyHost, | ||
headers, | ||
@@ -67,0 +73,0 @@ }), |
@@ -8,3 +8,3 @@ process.env.OPENSDK_CLIENTID = 'a4a06f27443a541400'; | ||
const sdk = require('./src'); | ||
const sdk = require('./lib'); | ||
@@ -11,0 +11,0 @@ const http_main_handler = async () => { |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
34504
966
3