@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 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)
@@ -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 start */
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,
@@ -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 start */
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.28.1",
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.28.1",
30
+ "@aws-lambda-powertools/commons": "2.30.0",
31
31
  "@standard-schema/spec": "^1.0.0"
32
32
  },
33
33
  "peerDependencies": {