alipay-sdk
Advanced tools
Comparing version 1.0.16 to 1.0.18
@@ -6,3 +6,3 @@ declare module 'alipay-sdk' { | ||
// 请求执行 | ||
execute(method: string, bizContext?: Object, publicArgs?: Object, validateSign?: boolean): Promise<AlipaySdkCommonResult>; | ||
execute(method: string, bizContext?: Object, publicArgs?: Object, validateSign?: boolean, log?: object): Promise<AlipaySdkCommonResult>; | ||
// 签名 | ||
@@ -9,0 +9,0 @@ sign(params: Object, needEncode?: boolean): string; |
@@ -63,5 +63,6 @@ 'use strict'; | ||
* @param {Boolean} validateSign 是否验签 | ||
* @param {object} log 可选日志记录对象 | ||
* @return {Promise} 请求执行结果 | ||
*/ | ||
execute(method, bizContext, publicArgs, validateSign) { | ||
execute(method, bizContext, publicArgs, validateSign, log) { | ||
publicArgs = publicArgs || {}; | ||
@@ -92,2 +93,3 @@ // 默认不验签 | ||
.then(ret => { | ||
log && log.info('execute method: %s , params: %s, got resonse: %s', method, JSON.stringify(params), JSON.stringify(ret)); | ||
if (ret.status === 200) { | ||
@@ -109,3 +111,6 @@ const data = ret.data[method.replace(/\./g, '_') + '_response']; | ||
}) | ||
.catch(reject); | ||
.catch((err) => { | ||
log && log.error('execute method: %s , params: %s, got error: %s', method, JSON.stringify(params), JSON.stringify(err)); | ||
reject(err); | ||
}); | ||
}); | ||
@@ -112,0 +117,0 @@ } |
{ | ||
"name": "alipay-sdk", | ||
"version": "1.0.16", | ||
"version": "1.0.18", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
7946
7
195
2