@netlify/functions
Advanced tools
Comparing version 0.7.3-streaming.4 to 0.7.3-streaming.5
@@ -5,3 +5,3 @@ { | ||
"types": "./src/main.d.ts", | ||
"version": "0.7.3-streaming.4", | ||
"version": "0.7.3-streaming.5", | ||
"description": "JavaScript utilities for Netlify Functions", | ||
@@ -8,0 +8,0 @@ "files": [ |
@@ -42,2 +42,3 @@ /* eslint-disable no-underscore-dangle , promise/prefer-await-to-callbacks, */ | ||
write(data, encoding, callback) { | ||
console.log('writing', data) | ||
if (!this._metadataSent) { | ||
@@ -63,10 +64,11 @@ super.write(this._getMetadata()) | ||
(event, context, callback) => { | ||
const requestId = event.headers['x-nf-request-id'] | ||
if (!requestId) { | ||
console.log({ event }) | ||
const callbackUrl = event.queryStringParameters.callbackURL | ||
if (!callbackUrl) { | ||
return { | ||
statusCode: 422, | ||
body: 'Missing request id', | ||
body: 'Missing callback URL', | ||
} | ||
} | ||
const callbackUrl = `https://ntl-functions-streaming.herokuapp.com/.stream/${requestId}` | ||
@@ -73,0 +75,0 @@ /** @type {StreamingResponse} */ |
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
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
272
14142