sailthru-client
Advanced tools
Comparing version 5.0.0 to 5.0.1
@@ -27,3 +27,3 @@ (function() { | ||
exports.VERSION = '5.0.0'; | ||
exports.VERSION = '5.0.1'; | ||
@@ -301,2 +301,3 @@ | ||
json_payload = this._json_payload(data); | ||
json_payload_to_log = json_payload; | ||
@@ -306,2 +307,3 @@ for (param in binary_data) { | ||
json_payload[param] = value; | ||
json_payload_to_log[param] = '[TRUNCATED]'; | ||
} | ||
@@ -322,3 +324,4 @@ | ||
this.log2('MultiPart Request'); | ||
this.log2('JSON Payload: ' + JSON.stringify(json_payload)); | ||
this.log2('JSON Payload: ' + JSON.stringify(json_payload_to_log)); | ||
return rest.post( | ||
@@ -325,0 +328,0 @@ _url.href + action, |
{ | ||
"name": "sailthru-client", | ||
"description": "Node.js client for Sailthru API", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "George Liao", |
@@ -453,2 +453,9 @@ (function() { | ||
exports.processJobWithFile = function(test) { | ||
var SailthruClientWithMockLog2Function = require('../lib/sailthru').createSailthruClient('abcd12345', '1324qwerty'); | ||
SailthruClientWithMockLog2Function.log2 = function(string) { | ||
if (/json payload/i.test(string)) { | ||
test.ok(/TRUNCATED/.test(string)); | ||
} | ||
} | ||
nock(/.*sailthru.com.*/) | ||
@@ -459,3 +466,3 @@ .post(/.*/, function(q) { | ||
test.expect(1); | ||
test.expect(2); | ||
@@ -470,3 +477,3 @@ var callback = function(err, res) { | ||
}; | ||
SailthruClient.processJob('import', options, 'report@example.com', 'http://example.com/post.php', ['file'], callback); | ||
SailthruClientWithMockLog2Function.processJob('import', options, 'report@example.com', 'http://example.com/post.php', ['file'], callback); | ||
}; | ||
@@ -473,0 +480,0 @@ |
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
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
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
2
53300
11
1315