@squiz/db-lib 1.70.0 → 1.71.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +12 -0
- package/package.json +4 -4
- package/src/dynamodb/AbstractDynamoDbRepository.spec.ts +0 -1
- package/src/dynamodb/AbstractDynamoDbRepository.ts +2 -0
- package/src/dynamodb/DynamoDbManager.ts +3 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/lib/AbstractRepository.d.ts +0 -55
- package/lib/AbstractRepository.integration.spec.d.ts +0 -1
- package/lib/ConnectionManager.d.ts +0 -25
- package/lib/Migrator.d.ts +0 -24
- package/lib/PostgresErrorCodes.d.ts +0 -268
- package/lib/Repositories.d.ts +0 -2
- package/lib/dynamodb/AbstractDynamoDbRepository.d.ts +0 -161
- package/lib/dynamodb/AbstractDynamoDbRepository.spec.d.ts +0 -26
- package/lib/dynamodb/DynamoDbManager.d.ts +0 -18
- package/lib/dynamodb/getDynamoDbOptions.d.ts +0 -12
- package/lib/error/DuplicateItemError.d.ts +0 -5
- package/lib/error/InvalidDataFormatError.d.ts +0 -5
- package/lib/error/InvalidDbSchemaError.d.ts +0 -5
- package/lib/error/MissingKeyValuesError.d.ts +0 -5
- package/lib/error/TransactionError.d.ts +0 -5
- package/lib/getConnectionInfo.d.ts +0 -5
- package/lib/index.d.ts +0 -14
- package/lib/index.js +0 -58594
- package/lib/index.js.map +0 -7
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@squiz/db-lib",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.71.1",
|
4
4
|
"description": "",
|
5
5
|
"main": "lib/index.js",
|
6
6
|
"private": false,
|
@@ -32,9 +32,9 @@
|
|
32
32
|
"typescript": "4.9.4"
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
|
-
"@aws-sdk/client-dynamodb": "^3.
|
36
|
-
"@aws-sdk/client-secrets-manager": "3.
|
37
|
-
"@aws-sdk/lib-dynamodb": "^3.
|
35
|
+
"@aws-sdk/client-dynamodb": "^3.651.1",
|
36
|
+
"@aws-sdk/client-secrets-manager": "3.651.1",
|
37
|
+
"@aws-sdk/lib-dynamodb": "^3.651.1",
|
38
38
|
"@opentelemetry/api": "^1.6.0",
|
39
39
|
"@squiz/dx-common-lib": "^1.66.4",
|
40
40
|
"@squiz/dx-logger-lib": "^1.64.0",
|
@@ -307,6 +307,8 @@ export abstract class AbstractDynamoDbRepository<SHAPE extends object, DATA_CLAS
|
|
307
307
|
};
|
308
308
|
|
309
309
|
if (transaction.id?.length) {
|
310
|
+
// For transaction block, don't worry if the item being deleted does not exist
|
311
|
+
delete deleteCommandInput.ConditionExpression;
|
310
312
|
// this command will be executed together with
|
311
313
|
// other db write commands in the "transaction block"
|
312
314
|
this.dbManager.addWriteTransactionItem(transaction.id, {
|
@@ -49,6 +49,9 @@ export class DynamoDbManager<TRepositories> {
|
|
49
49
|
if (this.transactionItems[transactionId] === undefined) {
|
50
50
|
throw new TransactionError(`No items in transaction '${transactionId}' to execute`);
|
51
51
|
}
|
52
|
+
if (!this.transactionItems[transactionId].length) {
|
53
|
+
return;
|
54
|
+
}
|
52
55
|
|
53
56
|
return tracer.startActiveSpan(
|
54
57
|
'executeTransaction',
|