baton-event-relay
Advanced tools
Comparing version 1.0.0 to 1.0.1
11
index.js
@@ -18,2 +18,3 @@ 'use strict'; | ||
const body = JSON.parse(content.request.body ? content.request.body.split('\\\"').join('\"') : undefined); | ||
// console.log(body); | ||
@@ -24,3 +25,3 @@ const t = { | ||
event: { | ||
Records: body.Records.map((r, i) => ({ | ||
Records: body.Records ? body.Records.map((r, i) => ({ | ||
eventSource: 'aws:kinesis', | ||
@@ -31,3 +32,9 @@ kinesis: { | ||
} | ||
})) | ||
})) : [{ | ||
eventSource: 'aws:kinesis', | ||
kinesis: { | ||
sequenceNumber: '1', | ||
data: body.Data, | ||
} | ||
}] | ||
} | ||
@@ -34,0 +41,0 @@ }; |
{ | ||
"name": "baton-event-relay", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"author": "John Gilbert <john.gilbert@danteinc.com> (danteinc.com)", | ||
@@ -5,0 +5,0 @@ "license": "ISC", |
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
4003
83