@aws-lambda-powertools/batch
Advanced tools
Comparing version
@@ -11,4 +11,2 @@ import type { DynamoDBRecord, KinesisStreamRecord, SQSRecord } from 'aws-lambda'; | ||
* to collect failed records and build the partial failure response. | ||
* | ||
* @abstract | ||
*/ | ||
@@ -15,0 +13,0 @@ declare abstract class BasePartialBatchProcessor extends BasePartialProcessor { |
@@ -13,4 +13,2 @@ "use strict"; | ||
* to collect failed records and build the partial failure response. | ||
* | ||
* @abstract | ||
*/ | ||
@@ -17,0 +15,0 @@ class BasePartialBatchProcessor extends BasePartialProcessor_js_1.BasePartialProcessor { |
@@ -14,4 +14,2 @@ import type { BaseRecord, BatchProcessingOptions, EventSourceDataClassTypes, FailureResponse, SuccessResponse } from './types.js'; | ||
* handle records that succeed or fail processing. | ||
* | ||
* @abstract | ||
*/ | ||
@@ -50,4 +48,2 @@ declare abstract class BasePartialProcessor { | ||
* You can use this as a hook to run any cleanup logic after processing the records. | ||
* | ||
* @abstract | ||
*/ | ||
@@ -71,4 +67,2 @@ abstract clean(): void; | ||
* You can use this as a hook to run any setup logic before processing the records. | ||
* | ||
* @abstract | ||
*/ | ||
@@ -97,4 +91,2 @@ abstract prepare(): void; | ||
* | ||
* @abstract | ||
* | ||
* @param record Record to be processed | ||
@@ -115,4 +107,2 @@ */ | ||
* | ||
* @abstract | ||
* | ||
* @param record Record to be processed | ||
@@ -119,0 +109,0 @@ */ |
@@ -16,4 +16,2 @@ "use strict"; | ||
* handle records that succeed or fail processing. | ||
* | ||
* @abstract | ||
*/ | ||
@@ -80,5 +78,9 @@ class BasePartialProcessor { | ||
* so we call the method early to throw the error early thus failing fast. | ||
* | ||
* The type casting is necessary to ensure that we have test coverage for the | ||
* block of code that throws the error, without having to change the return type | ||
* of the method. This is because this call will always throw an error. | ||
*/ | ||
if (this.constructor.name === 'BatchProcessorSync') { | ||
await this.processRecord(this.records[0]); | ||
return (await this.processRecord(this.records[0])); | ||
} | ||
@@ -85,0 +87,0 @@ this.prepare(); |
@@ -11,4 +11,2 @@ import type { DynamoDBRecord, KinesisStreamRecord, SQSRecord } from 'aws-lambda'; | ||
* to collect failed records and build the partial failure response. | ||
* | ||
* @abstract | ||
*/ | ||
@@ -15,0 +13,0 @@ declare abstract class BasePartialBatchProcessor extends BasePartialProcessor { |
@@ -10,4 +10,2 @@ import { BasePartialProcessor } from './BasePartialProcessor.js'; | ||
* to collect failed records and build the partial failure response. | ||
* | ||
* @abstract | ||
*/ | ||
@@ -14,0 +12,0 @@ class BasePartialBatchProcessor extends BasePartialProcessor { |
@@ -14,4 +14,2 @@ import type { BaseRecord, BatchProcessingOptions, EventSourceDataClassTypes, FailureResponse, SuccessResponse } from './types.js'; | ||
* handle records that succeed or fail processing. | ||
* | ||
* @abstract | ||
*/ | ||
@@ -50,4 +48,2 @@ declare abstract class BasePartialProcessor { | ||
* You can use this as a hook to run any cleanup logic after processing the records. | ||
* | ||
* @abstract | ||
*/ | ||
@@ -71,4 +67,2 @@ abstract clean(): void; | ||
* You can use this as a hook to run any setup logic before processing the records. | ||
* | ||
* @abstract | ||
*/ | ||
@@ -97,4 +91,2 @@ abstract prepare(): void; | ||
* | ||
* @abstract | ||
* | ||
* @param record Record to be processed | ||
@@ -115,4 +107,2 @@ */ | ||
* | ||
* @abstract | ||
* | ||
* @param record Record to be processed | ||
@@ -119,0 +109,0 @@ */ |
@@ -13,4 +13,2 @@ /** | ||
* handle records that succeed or fail processing. | ||
* | ||
* @abstract | ||
*/ | ||
@@ -77,5 +75,9 @@ class BasePartialProcessor { | ||
* so we call the method early to throw the error early thus failing fast. | ||
* | ||
* The type casting is necessary to ensure that we have test coverage for the | ||
* block of code that throws the error, without having to change the return type | ||
* of the method. This is because this call will always throw an error. | ||
*/ | ||
if (this.constructor.name === 'BatchProcessorSync') { | ||
await this.processRecord(this.records[0]); | ||
return (await this.processRecord(this.records[0])); | ||
} | ||
@@ -82,0 +84,0 @@ this.prepare(); |
{ | ||
"name": "@aws-lambda-powertools/batch", | ||
"version": "2.7.0", | ||
"version": "2.8.0", | ||
"description": "The batch processing package for the Powertools for AWS Lambda (TypeScript) library.", | ||
@@ -5,0 +5,0 @@ "author": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
168196
0.12%3694
-0.65%