lifion-kinesis
Advanced tools
Comparing version
@@ -10,2 +10,7 @@ ## Changelog | ||
### v1.1.4 (2019-10-23) | ||
- [`2efcf0a`](https://github.com/lifion/lifion-kinesis/commit/2efcf0ac88a490f99cb35e5263c6e12b9fd518e2): Upgrade dependencies | ||
- [`64d3a28`](https://github.com/lifion/lifion-kinesis/commit/64d3a280734f31ae694cc0a19c9a25f2de4a2bd8): Make sure the shouldParseJson flag is passed down | ||
### v1.1.3 (2019-10-21) | ||
@@ -12,0 +17,0 @@ |
@@ -48,2 +48,4 @@ /** | ||
* @param {object} options.s3 - The S3 options in the current kinesis client. | ||
* @param {string|boolean} [options.shouldParseJson] - Whether if retrieved records' data should | ||
* be parsed as JSON or not. | ||
* @param {object} options.stateStore - An instance of the state store. | ||
@@ -72,2 +74,3 @@ * @param {string} options.streamName - The name of the Kinesis stream. | ||
s3Client, | ||
shouldParseJson, | ||
stateStore, | ||
@@ -93,2 +96,3 @@ streamName, | ||
s3Client, | ||
shouldParseJson, | ||
stateStore, | ||
@@ -124,2 +128,3 @@ streamName, | ||
s3Client, | ||
shouldParseJson, | ||
stateStore, | ||
@@ -184,2 +189,3 @@ streamName, | ||
streamName, | ||
shouldParseJson, | ||
useAutoCheckpoints, | ||
@@ -199,2 +205,3 @@ usePausedPolling, | ||
s3Client, | ||
shouldParseJson, | ||
shardId, | ||
@@ -201,0 +208,0 @@ stateStore, |
@@ -205,2 +205,3 @@ /** | ||
shardId, | ||
shouldParseJson, | ||
stateStore, | ||
@@ -245,2 +246,3 @@ stopConsumer, | ||
shardId, | ||
shouldParseJson, | ||
stateStore, | ||
@@ -272,2 +274,3 @@ stopConsumer, | ||
shardId, | ||
shouldParseJson, | ||
stateStore, | ||
@@ -362,3 +365,10 @@ stopConsumer, | ||
new Parser(), | ||
new RecordsDecoder({ compression, logger, s3, s3Client, useS3ForLargeItems }), | ||
new RecordsDecoder({ | ||
compression, | ||
logger, | ||
s3, | ||
s3Client, | ||
shouldParseJson, | ||
useS3ForLargeItems | ||
}), | ||
new PostProcess({ | ||
@@ -365,0 +375,0 @@ abort, |
@@ -272,3 +272,3 @@ /** | ||
shardCount = 1, | ||
shouldParseJson, | ||
shouldParseJson = 'auto', | ||
statsInterval = 30000, | ||
@@ -336,3 +336,3 @@ streamName, | ||
shardCount: shardCountNumber >= 1 ? shardCountNumber : 1, | ||
shouldParseJson: 'auto', | ||
shouldParseJson, | ||
statsInterval: statsIntervalNumber >= 1000 ? statsIntervalNumber : 30000, | ||
@@ -339,0 +339,0 @@ streamName, |
@@ -223,2 +223,3 @@ /** | ||
shardId, | ||
shouldParseJson, | ||
stateStore, | ||
@@ -249,2 +250,3 @@ stopConsumer, | ||
s3Client, | ||
shouldParseJson, | ||
useS3ForLargeItems | ||
@@ -251,0 +253,0 @@ }), |
@@ -92,3 +92,7 @@ /** | ||
if ((shouldParseJson === 'auto' && IS_JSON_REGEX.test(data)) || shouldParseJson === true) { | ||
if ( | ||
((shouldParseJson === undefined || shouldParseJson === 'auto') && | ||
IS_JSON_REGEX.test(data)) || | ||
shouldParseJson === true | ||
) { | ||
data = JSON.parse(data); | ||
@@ -95,0 +99,0 @@ } |
{ | ||
"name": "lifion-kinesis", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "Lifion client for Amazon Kinesis Data streams", | ||
@@ -52,3 +52,3 @@ "keywords": [ | ||
"async-retry": "^1.2.3", | ||
"aws-sdk": "^2.553.0", | ||
"aws-sdk": "^2.554.0", | ||
"aws4": "^1.8.0", | ||
@@ -55,0 +55,0 @@ "fast-deep-equal": "^2.0.1", |
235890
0.37%4527
0.51%Updated