zapier-platform-core
Advanced tools
Comparing version
{ | ||
"name": "zapier-platform-core", | ||
"version": "16.0.0", | ||
"version": "16.1.0", | ||
"description": "The core SDK for CLI apps in the Zapier Developer Platform.", | ||
@@ -45,3 +45,3 @@ "repository": "zapier/zapier-platform", | ||
"dependencies": { | ||
"@zapier/secret-scrubber": "^1.1.1", | ||
"@zapier/secret-scrubber": "^1.1.2", | ||
"bluebird": "3.7.2", | ||
@@ -57,3 +57,3 @@ "content-disposition": "0.5.4", | ||
"semver": "7.6.3", | ||
"zapier-platform-schema": "16.0.0" | ||
"zapier-platform-schema": "16.1.0" | ||
}, | ||
@@ -60,0 +60,0 @@ "devDependencies": { |
@@ -10,5 +10,9 @@ module.exports = { | ||
triggerHasId: require('./trigger-has-id'), | ||
firehoseSubscriptionIsArray: require('./firehose_is_array'), | ||
firehoseSubscriptionKeyIsString: require('./firehose_is_string'), | ||
performBufferReturnType: require('./perform-buffer-return-type'), | ||
dynamicFieldsHaveKeys: require('./dynamic-fields-have-keys'), | ||
}; |
@@ -76,2 +76,5 @@ const _ = require('lodash'); | ||
if (fetchFunc.patchedByZapier) { | ||
// Important not to reuse logger between calls, because we always destroy | ||
// the logger at the end of a Lambda call. | ||
fetchFunc.zapierLogger = logger; | ||
return fetchFunc; | ||
@@ -86,16 +89,19 @@ } | ||
logger(`${response.status} ${requestInfo.method} ${requestInfo.url}`, { | ||
log_type: 'http', | ||
request_type: 'patched-devplatform-outbound', | ||
request_url: requestInfo.url, | ||
request_method: requestInfo.method, | ||
request_headers: requestInfo.headers, | ||
request_data: requestInfo.data, | ||
request_via_client: false, | ||
response_status_code: response.status, | ||
response_headers: Object.fromEntries(response.headers.entries()), | ||
response_content: shouldIncludeResponseContent(responseContentType) | ||
? await stringifyResponseContent(response) | ||
: '<unsupported format>', | ||
}); | ||
newFetch.zapierLogger( | ||
`${response.status} ${requestInfo.method} ${requestInfo.url}`, | ||
{ | ||
log_type: 'http', | ||
request_type: 'patched-devplatform-outbound', | ||
request_url: requestInfo.url, | ||
request_method: requestInfo.method, | ||
request_headers: requestInfo.headers, | ||
request_data: requestInfo.data, | ||
request_via_client: false, | ||
response_status_code: response.status, | ||
response_headers: Object.fromEntries(response.headers.entries()), | ||
response_content: shouldIncludeResponseContent(responseContentType) | ||
? await stringifyResponseContent(response) | ||
: '<unsupported format>', | ||
}, | ||
); | ||
} | ||
@@ -106,2 +112,3 @@ return response; | ||
newFetch.patchedByZapier = true; | ||
newFetch.zapierLogger = logger; | ||
return newFetch; | ||
@@ -108,0 +115,0 @@ }; |
@@ -7,3 +7,3 @@ /** | ||
* | ||
* zapier-platform-schema version: 16.0.0 | ||
* zapier-platform-schema version: 16.1.0 | ||
* schema-to-ts compiler version: 0.1.0 | ||
@@ -10,0 +10,0 @@ */ |
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
244359
0.45%98
1.03%7012
0.46%11
10%+ Added
- Removed