@aws-lambda-powertools/kafka 2.28.1 → 2.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/lib/cjs/consumer.js +2 -2
- package/lib/esm/consumer.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -278,6 +278,7 @@ The following companies, among others, use Powertools:
|
|
|
278
278
|
* [Banxware](https://www.banxware.com)
|
|
279
279
|
* [Caylent](https://caylent.com/)
|
|
280
280
|
* [Certible](https://www.certible.com/)
|
|
281
|
+
* [Codeac](https://www.codeac.io/)
|
|
281
282
|
* [Elva](https://elva-group.com)
|
|
282
283
|
* [Flyweight](https://flyweight.io/)
|
|
283
284
|
* [FraudFalcon](https://fraudfalcon.app)
|
package/lib/cjs/consumer.js
CHANGED
|
@@ -97,6 +97,7 @@ const deserialize = ({ value, deserializer, config, schemaMetadata, }) => {
|
|
|
97
97
|
}
|
|
98
98
|
return deserializer(value, config.schema);
|
|
99
99
|
}
|
|
100
|
+
/* v8 ignore else -- @preserve */
|
|
100
101
|
if (config.type === 'protobuf') {
|
|
101
102
|
if (!config.schema) {
|
|
102
103
|
throw new errors_js_1.KafkaConsumerMissingSchemaError('Schema string is required for protobuf deserialization');
|
|
@@ -135,10 +136,9 @@ const getDeserializer = async (type) => {
|
|
|
135
136
|
*/
|
|
136
137
|
const parseSchema = (value, schema) => {
|
|
137
138
|
const result = schema['~standard'].validate(value);
|
|
138
|
-
/* v8 ignore
|
|
139
|
+
/* v8 ignore next -- @preserve */
|
|
139
140
|
if (result instanceof Promise)
|
|
140
141
|
throw new errors_js_1.KafkaConsumerParserError('Schema parsing supports only synchronous validation');
|
|
141
|
-
/* v8 ignore stop */
|
|
142
142
|
if (result.issues) {
|
|
143
143
|
throw new errors_js_1.KafkaConsumerParserError('Schema validation failed', {
|
|
144
144
|
cause: result.issues,
|
package/lib/esm/consumer.js
CHANGED
|
@@ -61,6 +61,7 @@ const deserialize = ({ value, deserializer, config, schemaMetadata, }) => {
|
|
|
61
61
|
}
|
|
62
62
|
return deserializer(value, config.schema);
|
|
63
63
|
}
|
|
64
|
+
/* v8 ignore else -- @preserve */
|
|
64
65
|
if (config.type === 'protobuf') {
|
|
65
66
|
if (!config.schema) {
|
|
66
67
|
throw new KafkaConsumerMissingSchemaError('Schema string is required for protobuf deserialization');
|
|
@@ -99,10 +100,9 @@ const getDeserializer = async (type) => {
|
|
|
99
100
|
*/
|
|
100
101
|
const parseSchema = (value, schema) => {
|
|
101
102
|
const result = schema['~standard'].validate(value);
|
|
102
|
-
/* v8 ignore
|
|
103
|
+
/* v8 ignore next -- @preserve */
|
|
103
104
|
if (result instanceof Promise)
|
|
104
105
|
throw new KafkaConsumerParserError('Schema parsing supports only synchronous validation');
|
|
105
|
-
/* v8 ignore stop */
|
|
106
106
|
if (result.issues) {
|
|
107
107
|
throw new KafkaConsumerParserError('Schema validation failed', {
|
|
108
108
|
cause: result.issues,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-lambda-powertools/kafka",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.30.0",
|
|
4
4
|
"description": "Utility to easily handle message deserialization and parsing of Kafka events in AWS Lambda functions",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Amazon Web Services",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"nodejs"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@aws-lambda-powertools/commons": "2.
|
|
30
|
+
"@aws-lambda-powertools/commons": "2.30.0",
|
|
31
31
|
"@standard-schema/spec": "^1.0.0"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|