@squiz/db-lib 1.76.0 → 1.77.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/CHANGELOG.md +6 -0
- package/lib/dynamodb/AbstractDynamoDbRepository.d.ts +1 -1
- package/lib/dynamodb/AbstractDynamoDbRepository.d.ts.map +1 -1
- package/lib/dynamodb/AbstractDynamoDbRepository.js +6 -5
- package/lib/dynamodb/AbstractDynamoDbRepository.js.map +1 -1
- package/lib/dynamodb/AbstractDynamoDbRepository.spec.d.ts.map +1 -1
- package/lib/dynamodb/AbstractDynamoDbRepository.spec.js +15 -14
- package/lib/dynamodb/AbstractDynamoDbRepository.spec.js.map +1 -1
- package/lib/dynamodb/getDynamoDbOptions.d.ts.map +1 -1
- package/lib/externalized/ExternalizedDynamoDbRepository.d.ts +151 -0
- package/lib/externalized/ExternalizedDynamoDbRepository.d.ts.map +1 -0
- package/lib/externalized/ExternalizedDynamoDbRepository.js +463 -0
- package/lib/externalized/ExternalizedDynamoDbRepository.js.map +1 -0
- package/lib/externalized/ExternalizedDynamoDbRepository.spec.d.ts +2 -0
- package/lib/externalized/ExternalizedDynamoDbRepository.spec.d.ts.map +1 -0
- package/lib/externalized/ExternalizedDynamoDbRepository.spec.js +218 -0
- package/lib/externalized/ExternalizedDynamoDbRepository.spec.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/s3/S3ExternalStorage.d.ts +66 -0
- package/lib/s3/S3ExternalStorage.d.ts.map +1 -0
- package/lib/s3/S3ExternalStorage.js +84 -0
- package/lib/s3/S3ExternalStorage.js.map +1 -0
- package/lib/s3/S3ExternalStorage.spec.d.ts +12 -0
- package/lib/s3/S3ExternalStorage.spec.d.ts.map +1 -0
- package/lib/s3/S3ExternalStorage.spec.js +130 -0
- package/lib/s3/S3ExternalStorage.spec.js.map +1 -0
- package/package.json +7 -6
- package/src/dynamodb/AbstractDynamoDbRepository.spec.ts +2 -1
- package/src/dynamodb/AbstractDynamoDbRepository.ts +3 -1
- package/src/externalized/ExternalizedDynamoDbRepository.spec.ts +274 -0
- package/src/externalized/ExternalizedDynamoDbRepository.ts +545 -0
- package/src/index.ts +4 -0
- package/src/s3/S3ExternalStorage.spec.ts +181 -0
- package/src/s3/S3ExternalStorage.ts +118 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @file ExternalizedDynamoDbRepository.ts
|
|
3
|
+
* @description This file contains the ExternalizedDynamoDbRepository class, which is used to store and retrieve externalized items from DynamoDB and S3.
|
|
4
|
+
* @author Dean Heffernan
|
|
5
|
+
* @copyright 2025 Squiz
|
|
6
|
+
*/
|
|
7
|
+
import { AbstractDynamoDbRepository, EntityDefinition, QueryOptions } from '../dynamodb/AbstractDynamoDbRepository';
|
|
8
|
+
import { DynamoDbManager, Transaction } from '../dynamodb/DynamoDbManager';
|
|
9
|
+
import { S3ExternalStorage, S3StorageLocation } from '../s3/S3ExternalStorage';
|
|
10
|
+
/**
|
|
11
|
+
* The ExternalizedDynamoDbRepository class is used to store and retrieve externalized items from DynamoDB and S3.
|
|
12
|
+
* @class ExternalizedDynamoDbRepository
|
|
13
|
+
* @extends {AbstractDynamoDbRepository<SHAPE, DATA_CLASS>}
|
|
14
|
+
* @param {string} tableName - The name of the DynamoDB table to use for storing externalized items.
|
|
15
|
+
* @param {ContentDynamodbDbManager} dbManager - The DynamoDB database manager to use for storing externalized items.
|
|
16
|
+
* @param {string} entityName - The name of the entity to store externalized items for.
|
|
17
|
+
* @param {EntityDefinition} entityDefinition - The entity definition to use for storing externalized items.
|
|
18
|
+
* @param {DATA_CLASS} classRef - The class to use for storing externalized items.
|
|
19
|
+
* @param {S3ExternalStorage} storage - The S3 storage to use for storing externalized items.
|
|
20
|
+
* @returns {ExternalizedDynamoDbRepository} A new instance of the ExternalizedDynamoDbRepository class.
|
|
21
|
+
*/
|
|
22
|
+
export declare abstract class ExternalizedDynamoDbRepository<SHAPE extends object, DATA_CLASS extends SHAPE & {
|
|
23
|
+
storageLocation?: S3StorageLocation;
|
|
24
|
+
}> extends AbstractDynamoDbRepository<SHAPE, DATA_CLASS> {
|
|
25
|
+
private readonly storage;
|
|
26
|
+
/**
|
|
27
|
+
* Creates a new instance of the ExternalizedDynamoDbRepository class.
|
|
28
|
+
* @constructor
|
|
29
|
+
* @param {string} tableName - The name of the DynamoDB table to use for storing externalized items.
|
|
30
|
+
* @param {DynamoDbManager} dbManager - The DynamoDB database manager to use for storing externalized items.
|
|
31
|
+
* @param {string} entityName - The name of the entity to store externalized items for.
|
|
32
|
+
* @param {EntityDefinition} entityDefinition - The entity definition to use for storing externalized items.
|
|
33
|
+
* @param {DATA_CLASS} classRef - The class to use for storing externalized items.
|
|
34
|
+
* @param {S3ExternalStorage} storage - The S3 storage to use for storing externalized items.
|
|
35
|
+
* @returns {ExternalizedDynamoDbRepository} A new instance of the ExternalizedDynamoDbRepository class.
|
|
36
|
+
*/
|
|
37
|
+
constructor(tableName: string, dbManager: DynamoDbManager<any>, entityName: string, entityDefinition: EntityDefinition, classRef: {
|
|
38
|
+
new (data?: Record<string, unknown>): DATA_CLASS;
|
|
39
|
+
}, storage: S3ExternalStorage);
|
|
40
|
+
/**
|
|
41
|
+
* Creates a new item in the repository.
|
|
42
|
+
* If the item exceeds DynamoDB's size limit, it will automatically externalize the content to S3.
|
|
43
|
+
* @param {DATA_CLASS} value - The value to create the item for.
|
|
44
|
+
* @param {Transaction} transaction - The transaction to use for creating the item.
|
|
45
|
+
* @param {Partial<SHAPE>} additionalValue - Additional value to use for creating the item.
|
|
46
|
+
* @param {Object} options - The options to use for creating the item.
|
|
47
|
+
* @returns {Promise<DATA_CLASS>} A promise that resolves to the created item.
|
|
48
|
+
*/
|
|
49
|
+
createItem(value: DATA_CLASS, transaction?: Transaction, additionalValue?: Partial<SHAPE>, options?: {
|
|
50
|
+
overrideExisting?: boolean;
|
|
51
|
+
}): Promise<DATA_CLASS>;
|
|
52
|
+
/**
|
|
53
|
+
* Internal method to create an item in the repository.
|
|
54
|
+
* @param {DATA_CLASS} value - The value to create the item for.
|
|
55
|
+
* @param {Transaction} transaction - The transaction to use for creating the item.
|
|
56
|
+
* @param {Partial<SHAPE>} additionalValue - Additional value to use for creating the item.
|
|
57
|
+
* @param {Object} options - The options to use for creating the item.
|
|
58
|
+
* @returns {Promise<DATA_CLASS>} A promise that resolves to the created item.
|
|
59
|
+
*/
|
|
60
|
+
private createItemInternal;
|
|
61
|
+
/**
|
|
62
|
+
* Updates an item in the repository.
|
|
63
|
+
* If the item exceeds DynamoDB's size limit, it will automatically externalize the content to S3.
|
|
64
|
+
* @param {Partial<SHAPE>} value - The value to update the item with.
|
|
65
|
+
* @returns {Promise<DATA_CLASS | undefined>} A promise that resolves to the updated item.
|
|
66
|
+
*/
|
|
67
|
+
updateItem(value: Partial<SHAPE>): Promise<DATA_CLASS | undefined>;
|
|
68
|
+
/**
|
|
69
|
+
* Internal method to update an item in the repository.
|
|
70
|
+
* @param {Partial<SHAPE>} value - The value to update the item with.
|
|
71
|
+
* @returns {Promise<DATA_CLASS | undefined>} A promise that resolves to the updated item.
|
|
72
|
+
*/
|
|
73
|
+
private updateItemInternal;
|
|
74
|
+
/**
|
|
75
|
+
* Gets an item from the repository.
|
|
76
|
+
* @param {Partial<SHAPE>} item - The item to get.
|
|
77
|
+
* @returns {Promise<DATA_CLASS | undefined>} A promise that resolves to the item.
|
|
78
|
+
*/
|
|
79
|
+
getItem(item: Partial<SHAPE>): Promise<DATA_CLASS | undefined>;
|
|
80
|
+
/**
|
|
81
|
+
* Gets items from the repository.
|
|
82
|
+
* @param {Partial<SHAPE>[]} items - The items to get.
|
|
83
|
+
* @returns {Promise<DATA_CLASS[]>} A promise that resolves to the items.
|
|
84
|
+
*/
|
|
85
|
+
getItems(items: Partial<SHAPE>[]): Promise<DATA_CLASS[]>;
|
|
86
|
+
/**
|
|
87
|
+
* Queries items from the repository.
|
|
88
|
+
* @param {Partial<SHAPE>} item - The item to query.
|
|
89
|
+
* @param {QueryOptions} options - The options to use for querying the items.
|
|
90
|
+
* @returns {Promise<DATA_CLASS[]>} A promise that resolves to the items.
|
|
91
|
+
*/
|
|
92
|
+
queryItems(item: Partial<SHAPE>, options?: QueryOptions): Promise<DATA_CLASS[]>;
|
|
93
|
+
/**
|
|
94
|
+
* Deletes an item from the repository.
|
|
95
|
+
* @param {Partial<SHAPE>} partialItem - The item to delete.
|
|
96
|
+
* @param {Transaction} transaction - The transaction to use for deleting the item.
|
|
97
|
+
* @returns {Promise<number>} A promise that resolves to the number of items deleted.
|
|
98
|
+
*/
|
|
99
|
+
deleteItem(partialItem: Partial<SHAPE>, transaction?: Transaction): Promise<number>;
|
|
100
|
+
/**
|
|
101
|
+
* Deletes items from the repository.
|
|
102
|
+
* @param {Partial<SHAPE>[]} items - The items to delete.
|
|
103
|
+
* @returns {Promise<void>} A promise that resolves when the items are deleted.
|
|
104
|
+
*/
|
|
105
|
+
deleteItems(items: Partial<SHAPE>[]): Promise<void>;
|
|
106
|
+
/**
|
|
107
|
+
* Prepares a value for storage by externalizing large content to S3.
|
|
108
|
+
* @param {DATA_CLASS} value - The value to prepare for storage.
|
|
109
|
+
* @returns {Promise<DATA_CLASS>} A promise that resolves to the prepared value for DynamoDB.
|
|
110
|
+
*/
|
|
111
|
+
prepareValueForStorage(value: DATA_CLASS): Promise<DATA_CLASS>;
|
|
112
|
+
/**
|
|
113
|
+
* Extracts only the key field values from an object based on the entity definition.
|
|
114
|
+
* Large content fields (defined in fieldsAsJsonString) are set to empty values.
|
|
115
|
+
* All other fields (key fields and small metadata) are preserved.
|
|
116
|
+
*
|
|
117
|
+
* @param {Record<string, unknown>} obj - The source object to extract key fields from.
|
|
118
|
+
* @returns {Record<string, unknown>} An object containing only the key field values.
|
|
119
|
+
*/
|
|
120
|
+
protected getKeyFieldsValues(obj: Record<string, unknown>): Record<string, unknown>;
|
|
121
|
+
/**
|
|
122
|
+
* Override parent's hydrateItem to preserve storageLocation
|
|
123
|
+
* The parent's hydrateItem creates a new instance which strips storageLocation
|
|
124
|
+
*/
|
|
125
|
+
protected hydrateItem(item: Record<string, unknown>): DATA_CLASS;
|
|
126
|
+
/**
|
|
127
|
+
* Hydrates a record from external storage.
|
|
128
|
+
* @param {DATA_CLASS} record - The record to hydrate.
|
|
129
|
+
* @returns {Promise<DATA_CLASS | undefined>} A promise that resolves to the hydrated record (without storageLocation).
|
|
130
|
+
*/
|
|
131
|
+
private hydrateFromExternalStorage;
|
|
132
|
+
/**
|
|
133
|
+
* Fetches the stored location of an item.
|
|
134
|
+
* @param {Partial<SHAPE>} partialItem - The item to fetch the stored location for.
|
|
135
|
+
* @returns {Promise<S3StorageLocation | undefined>} A promise that resolves to the stored location.
|
|
136
|
+
*/
|
|
137
|
+
private fetchStoredLocation;
|
|
138
|
+
/**
|
|
139
|
+
* Check if the error is due to DynamoDB item size limit being exceeded.
|
|
140
|
+
* @param {unknown} error - The error to check.
|
|
141
|
+
* @returns {boolean} True if the error is due to DynamoDB item size limit being exceeded, false otherwise.
|
|
142
|
+
*/
|
|
143
|
+
protected isDynamoItemSizeLimitError(error: unknown): boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Check if the message contains the DynamoDB size keyword.
|
|
146
|
+
* @param {string} message - The message to check.
|
|
147
|
+
* @returns {boolean} True if the message contains the DynamoDB size keyword, false otherwise.
|
|
148
|
+
*/
|
|
149
|
+
private hasDynamoSizeKeyword;
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=ExternalizedDynamoDbRepository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExternalizedDynamoDbRepository.d.ts","sourceRoot":"","sources":["../../src/externalized/ExternalizedDynamoDbRepository.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,YAAY,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AAE,OAAO,CAAC,KAAK,CAAC,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAKrE;;;;;OAKG;IACU,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAK5F;;;;;OAKG;IACU,UAAU,CAAC,WAAW,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,WAAW,GAAE,WAAgB,GAAG,OAAO,CAAC,MAAM,CAAC;IASpG;;;;OAIG;IACU,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAMhE;;;;OAIG;IACU,sBAAsB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IA6B3E;;;;;;;OAOG;IACH,SAAS,CAAC,kBAAkB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IA6BnF;;;OAGG;IACH,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,UAAU;IAehE;;;;OAIG;YACW,0BAA0B;IAUxC;;;;OAIG;YACW,mBAAmB;IAmBjC;;;;OAIG;IACH,SAAS,CAAC,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IA8B7D;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;CAa7B"}
|
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* @file ExternalizedDynamoDbRepository.ts
|
|
4
|
+
* @description This file contains the ExternalizedDynamoDbRepository class, which is used to store and retrieve externalized items from DynamoDB and S3.
|
|
5
|
+
* @author Dean Heffernan
|
|
6
|
+
* @copyright 2025 Squiz
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ExternalizedDynamoDbRepository = void 0;
|
|
10
|
+
// External
|
|
11
|
+
const crypto_1 = require("crypto");
|
|
12
|
+
const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
|
|
13
|
+
// Team Submodules
|
|
14
|
+
const AbstractDynamoDbRepository_1 = require("../dynamodb/AbstractDynamoDbRepository");
|
|
15
|
+
/**
|
|
16
|
+
* The ExternalizedDynamoDbRepository class is used to store and retrieve externalized items from DynamoDB and S3.
|
|
17
|
+
* @class ExternalizedDynamoDbRepository
|
|
18
|
+
* @extends {AbstractDynamoDbRepository<SHAPE, DATA_CLASS>}
|
|
19
|
+
* @param {string} tableName - The name of the DynamoDB table to use for storing externalized items.
|
|
20
|
+
* @param {ContentDynamodbDbManager} dbManager - The DynamoDB database manager to use for storing externalized items.
|
|
21
|
+
* @param {string} entityName - The name of the entity to store externalized items for.
|
|
22
|
+
* @param {EntityDefinition} entityDefinition - The entity definition to use for storing externalized items.
|
|
23
|
+
* @param {DATA_CLASS} classRef - The class to use for storing externalized items.
|
|
24
|
+
* @param {S3ExternalStorage} storage - The S3 storage to use for storing externalized items.
|
|
25
|
+
* @returns {ExternalizedDynamoDbRepository} A new instance of the ExternalizedDynamoDbRepository class.
|
|
26
|
+
*/
|
|
27
|
+
class ExternalizedDynamoDbRepository extends AbstractDynamoDbRepository_1.AbstractDynamoDbRepository {
|
|
28
|
+
/**
|
|
29
|
+
* Creates a new instance of the ExternalizedDynamoDbRepository class.
|
|
30
|
+
* @constructor
|
|
31
|
+
* @param {string} tableName - The name of the DynamoDB table to use for storing externalized items.
|
|
32
|
+
* @param {DynamoDbManager} dbManager - The DynamoDB database manager to use for storing externalized items.
|
|
33
|
+
* @param {string} entityName - The name of the entity to store externalized items for.
|
|
34
|
+
* @param {EntityDefinition} entityDefinition - The entity definition to use for storing externalized items.
|
|
35
|
+
* @param {DATA_CLASS} classRef - The class to use for storing externalized items.
|
|
36
|
+
* @param {S3ExternalStorage} storage - The S3 storage to use for storing externalized items.
|
|
37
|
+
* @returns {ExternalizedDynamoDbRepository} A new instance of the ExternalizedDynamoDbRepository class.
|
|
38
|
+
*/
|
|
39
|
+
constructor(tableName, dbManager, entityName, entityDefinition, classRef, storage) {
|
|
40
|
+
super(tableName, dbManager, entityName, entityDefinition, classRef);
|
|
41
|
+
this.storage = storage;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Creates a new item in the repository.
|
|
45
|
+
* If the item exceeds DynamoDB's size limit, it will automatically externalize the content to S3.
|
|
46
|
+
* @param {DATA_CLASS} value - The value to create the item for.
|
|
47
|
+
* @param {Transaction} transaction - The transaction to use for creating the item.
|
|
48
|
+
* @param {Partial<SHAPE>} additionalValue - Additional value to use for creating the item.
|
|
49
|
+
* @param {Object} options - The options to use for creating the item.
|
|
50
|
+
* @returns {Promise<DATA_CLASS>} A promise that resolves to the created item.
|
|
51
|
+
*/
|
|
52
|
+
async createItem(value, transaction = {}, additionalValue = {}, options = { overrideExisting: false }) {
|
|
53
|
+
try {
|
|
54
|
+
return await this.createItemInternal(value, transaction, additionalValue, options);
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
// If the item exceeds DynamoDB's size limit, externalize the content to S3 and retry
|
|
58
|
+
if (this.isDynamoItemSizeLimitError(error)) {
|
|
59
|
+
console.warn(`ExternalizedDynamoDbRepository: Item exceeded DynamoDB size limit for ${this.entityName}. Retrying with external storage.`);
|
|
60
|
+
const externalizedValue = await this.prepareValueForStorage(value);
|
|
61
|
+
return await this.createItemInternal(externalizedValue, transaction, additionalValue, options);
|
|
62
|
+
}
|
|
63
|
+
throw error;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Internal method to create an item in the repository.
|
|
68
|
+
* @param {DATA_CLASS} value - The value to create the item for.
|
|
69
|
+
* @param {Transaction} transaction - The transaction to use for creating the item.
|
|
70
|
+
* @param {Partial<SHAPE>} additionalValue - Additional value to use for creating the item.
|
|
71
|
+
* @param {Object} options - The options to use for creating the item.
|
|
72
|
+
* @returns {Promise<DATA_CLASS>} A promise that resolves to the created item.
|
|
73
|
+
*/
|
|
74
|
+
async createItemInternal(value, transaction = {}, additionalValue = {}, options = { overrideExisting: false }) {
|
|
75
|
+
let previousLocation;
|
|
76
|
+
if (options === null || options === void 0 ? void 0 : options.overrideExisting) {
|
|
77
|
+
previousLocation = await this.fetchStoredLocation({ ...value, ...additionalValue });
|
|
78
|
+
}
|
|
79
|
+
// If storageLocation exists, we need to save it directly to DynamoDB
|
|
80
|
+
// We can't use super.createItem because it strips storageLocation during model validation
|
|
81
|
+
// So we build the DynamoDB Item manually
|
|
82
|
+
let createdItem;
|
|
83
|
+
if (value.storageLocation) {
|
|
84
|
+
// Manually validate the value (without storageLocation)
|
|
85
|
+
const valueWithoutStorageLocation = { ...value };
|
|
86
|
+
delete valueWithoutStorageLocation.storageLocation;
|
|
87
|
+
new this.classRef(valueWithoutStorageLocation);
|
|
88
|
+
// Build columns from value properties
|
|
89
|
+
const columns = {};
|
|
90
|
+
for (const modelProperty of Object.keys(valueWithoutStorageLocation)) {
|
|
91
|
+
columns[modelProperty] = valueWithoutStorageLocation[modelProperty];
|
|
92
|
+
}
|
|
93
|
+
// Convert fields defined as JSON strings (like 'layouts') to JSON strings
|
|
94
|
+
this.convertSelectedValuesToJsonString(columns);
|
|
95
|
+
// Manually add storageLocation to columns (after JSON conversion)
|
|
96
|
+
columns.storageLocation = value.storageLocation;
|
|
97
|
+
// Build key fields
|
|
98
|
+
const keyFields = {
|
|
99
|
+
[this.keys.pk.attributeName]: this.getPk({ ...value, ...additionalValue }),
|
|
100
|
+
[this.keys.sk.attributeName]: this.getSk({ ...value, ...additionalValue }),
|
|
101
|
+
};
|
|
102
|
+
// Add index fields
|
|
103
|
+
for (const [_key, index] of Object.entries(this.indexes)) {
|
|
104
|
+
try {
|
|
105
|
+
keyFields[index.pk.attributeName] = this.getKey({ ...value, ...additionalValue }, index.pk.attributeName);
|
|
106
|
+
keyFields[index.sk.attributeName] = this.getKey({ ...value, ...additionalValue }, index.sk.attributeName);
|
|
107
|
+
}
|
|
108
|
+
catch (e) {
|
|
109
|
+
// Ignore optional index errors
|
|
110
|
+
if (e.name === 'MissingKeyValuesError') {
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
throw e;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
// Execute DynamoDB put
|
|
117
|
+
const putCommandInput = {
|
|
118
|
+
TableName: this.tableName,
|
|
119
|
+
Item: {
|
|
120
|
+
...keyFields,
|
|
121
|
+
...columns,
|
|
122
|
+
},
|
|
123
|
+
ConditionExpression: options.overrideExisting
|
|
124
|
+
? undefined
|
|
125
|
+
: `attribute_not_exists(${this.keys.pk.attributeName})`,
|
|
126
|
+
};
|
|
127
|
+
if (transaction.id) {
|
|
128
|
+
// Add to transaction instead of executing directly
|
|
129
|
+
this.dbManager.addWriteTransactionItem(transaction.id, {
|
|
130
|
+
Put: putCommandInput,
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
await this.client.put(putCommandInput);
|
|
135
|
+
}
|
|
136
|
+
createdItem = value;
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
// No storageLocation, use parent's method
|
|
140
|
+
// Strip storageLocation before passing to parent to avoid "Excess properties" error
|
|
141
|
+
const { storageLocation: _, ...valueWithoutStorage } = value;
|
|
142
|
+
createdItem = await super.createItem(valueWithoutStorage, transaction, additionalValue, options);
|
|
143
|
+
}
|
|
144
|
+
// Clean up old S3 file if it exists and is different from new location
|
|
145
|
+
const newLocation = createdItem.storageLocation;
|
|
146
|
+
if (previousLocation && previousLocation.key !== (newLocation === null || newLocation === void 0 ? void 0 : newLocation.key)) {
|
|
147
|
+
await this.storage.delete(previousLocation);
|
|
148
|
+
}
|
|
149
|
+
// If item was externalized, hydrate it from S3 to return full content
|
|
150
|
+
return (await this.hydrateFromExternalStorage(createdItem)) || createdItem;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Updates an item in the repository.
|
|
154
|
+
* If the item exceeds DynamoDB's size limit, it will automatically externalize the content to S3.
|
|
155
|
+
* @param {Partial<SHAPE>} value - The value to update the item with.
|
|
156
|
+
* @returns {Promise<DATA_CLASS | undefined>} A promise that resolves to the updated item.
|
|
157
|
+
*/
|
|
158
|
+
async updateItem(value) {
|
|
159
|
+
try {
|
|
160
|
+
return await this.updateItemInternal(value);
|
|
161
|
+
}
|
|
162
|
+
catch (error) {
|
|
163
|
+
// If the item exceeds DynamoDB's size limit, externalize the content to S3 and retry
|
|
164
|
+
if (this.isDynamoItemSizeLimitError(error)) {
|
|
165
|
+
console.warn(`ExternalizedDynamoDbRepository: Update exceeded DynamoDB size limit for ${this.entityName}. Retrying with external storage.`);
|
|
166
|
+
const externalizedValue = await this.prepareValueForStorage(value);
|
|
167
|
+
return await this.updateItemInternal(externalizedValue);
|
|
168
|
+
}
|
|
169
|
+
throw error;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Internal method to update an item in the repository.
|
|
174
|
+
* @param {Partial<SHAPE>} value - The value to update the item with.
|
|
175
|
+
* @returns {Promise<DATA_CLASS | undefined>} A promise that resolves to the updated item.
|
|
176
|
+
*/
|
|
177
|
+
async updateItemInternal(value) {
|
|
178
|
+
// Fetch previous storageLocation before update
|
|
179
|
+
const previousLocation = await this.fetchStoredLocation(value);
|
|
180
|
+
// If storageLocation exists in the update, we need to save it directly to DynamoDB
|
|
181
|
+
// We can't use super.updateItem because it strips storageLocation during model validation
|
|
182
|
+
let updatedItem;
|
|
183
|
+
if (value.storageLocation) {
|
|
184
|
+
// Get old value first
|
|
185
|
+
const oldValue = await super.getItem(value);
|
|
186
|
+
if (!oldValue) {
|
|
187
|
+
return undefined;
|
|
188
|
+
}
|
|
189
|
+
// Merge old and new values
|
|
190
|
+
const mergedValue = { ...oldValue, ...value };
|
|
191
|
+
// Validate merged value (without storageLocation)
|
|
192
|
+
const mergedWithoutStorageLocation = { ...mergedValue };
|
|
193
|
+
delete mergedWithoutStorageLocation.storageLocation;
|
|
194
|
+
new this.classRef(mergedWithoutStorageLocation);
|
|
195
|
+
// Convert fields defined as JSON strings (like 'layouts') to JSON strings
|
|
196
|
+
const newValueCopy = { ...value };
|
|
197
|
+
this.convertSelectedValuesToJsonString(newValueCopy);
|
|
198
|
+
this.convertSelectedValuesToJsonString(oldValue);
|
|
199
|
+
// Build UpdateExpression manually including storageLocation
|
|
200
|
+
const updateExpression = [];
|
|
201
|
+
const expressionAttributeNames = {};
|
|
202
|
+
const expressionAttributeValues = {};
|
|
203
|
+
const updatedAttributes = [];
|
|
204
|
+
for (const modelProperty of Object.keys(value)) {
|
|
205
|
+
const propValue = newValueCopy[modelProperty];
|
|
206
|
+
if (propValue === oldValue[modelProperty]) {
|
|
207
|
+
continue; // don't update unchanged properties
|
|
208
|
+
}
|
|
209
|
+
const propName = `#${modelProperty}`;
|
|
210
|
+
const propValuePlaceHolder = `:${modelProperty}`;
|
|
211
|
+
updateExpression.push(`${propName} = ${propValuePlaceHolder}`);
|
|
212
|
+
expressionAttributeNames[propName] = modelProperty;
|
|
213
|
+
expressionAttributeValues[propValuePlaceHolder] = propValue;
|
|
214
|
+
updatedAttributes.push(modelProperty);
|
|
215
|
+
}
|
|
216
|
+
if (!updatedAttributes.length) {
|
|
217
|
+
// nothing to update
|
|
218
|
+
updatedItem = mergedValue;
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
// Execute update
|
|
222
|
+
const updateCommandInput = {
|
|
223
|
+
TableName: this.tableName,
|
|
224
|
+
Key: {
|
|
225
|
+
[this.keys.pk.attributeName]: this.getPk(value),
|
|
226
|
+
[this.keys.sk.attributeName]: this.getSk(value),
|
|
227
|
+
},
|
|
228
|
+
UpdateExpression: `SET ${updateExpression.join(', ')}`,
|
|
229
|
+
ExpressionAttributeNames: expressionAttributeNames,
|
|
230
|
+
ExpressionAttributeValues: expressionAttributeValues,
|
|
231
|
+
ConditionExpression: `attribute_exists(${this.keys.pk.attributeName})`,
|
|
232
|
+
ReturnValues: 'ALL_NEW',
|
|
233
|
+
};
|
|
234
|
+
const result = await this.client.update(updateCommandInput);
|
|
235
|
+
updatedItem = result.Attributes ? this.hydrateItem(result.Attributes) : undefined;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
// No storageLocation, use parent's method
|
|
240
|
+
// Strip storageLocation before passing to parent to avoid "Excess properties" error
|
|
241
|
+
const { storageLocation: _, ...valueWithoutStorage } = value;
|
|
242
|
+
updatedItem = await super.updateItem(valueWithoutStorage);
|
|
243
|
+
}
|
|
244
|
+
if (!updatedItem) {
|
|
245
|
+
return undefined;
|
|
246
|
+
}
|
|
247
|
+
// Clean up old S3 file if it exists and is different from new location
|
|
248
|
+
const newLocation = updatedItem.storageLocation;
|
|
249
|
+
if (previousLocation && previousLocation.key !== (newLocation === null || newLocation === void 0 ? void 0 : newLocation.key)) {
|
|
250
|
+
await this.storage.delete(previousLocation);
|
|
251
|
+
}
|
|
252
|
+
// If item was externalized, hydrate it from S3 to return full content
|
|
253
|
+
return (await this.hydrateFromExternalStorage(updatedItem)) || updatedItem;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Gets an item from the repository.
|
|
257
|
+
* @param {Partial<SHAPE>} item - The item to get.
|
|
258
|
+
* @returns {Promise<DATA_CLASS | undefined>} A promise that resolves to the item.
|
|
259
|
+
*/
|
|
260
|
+
async getItem(item) {
|
|
261
|
+
const record = await super.getItem(item);
|
|
262
|
+
return await this.hydrateFromExternalStorage(record);
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Gets items from the repository.
|
|
266
|
+
* @param {Partial<SHAPE>[]} items - The items to get.
|
|
267
|
+
* @returns {Promise<DATA_CLASS[]>} A promise that resolves to the items.
|
|
268
|
+
*/
|
|
269
|
+
async getItems(items) {
|
|
270
|
+
const records = await super.getItems(items);
|
|
271
|
+
return (await Promise.all(records.map((record) => this.hydrateFromExternalStorage(record))));
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Queries items from the repository.
|
|
275
|
+
* @param {Partial<SHAPE>} item - The item to query.
|
|
276
|
+
* @param {QueryOptions} options - The options to use for querying the items.
|
|
277
|
+
* @returns {Promise<DATA_CLASS[]>} A promise that resolves to the items.
|
|
278
|
+
*/
|
|
279
|
+
async queryItems(item, options) {
|
|
280
|
+
const records = await super.queryItems(item, options);
|
|
281
|
+
return (await Promise.all(records.map((record) => this.hydrateFromExternalStorage(record))));
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Deletes an item from the repository.
|
|
285
|
+
* @param {Partial<SHAPE>} partialItem - The item to delete.
|
|
286
|
+
* @param {Transaction} transaction - The transaction to use for deleting the item.
|
|
287
|
+
* @returns {Promise<number>} A promise that resolves to the number of items deleted.
|
|
288
|
+
*/
|
|
289
|
+
async deleteItem(partialItem, transaction = {}) {
|
|
290
|
+
const location = await this.fetchStoredLocation(partialItem);
|
|
291
|
+
const deleted = await super.deleteItem(partialItem, transaction);
|
|
292
|
+
if (deleted && location) {
|
|
293
|
+
await this.storage.delete(location);
|
|
294
|
+
}
|
|
295
|
+
return deleted;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Deletes items from the repository.
|
|
299
|
+
* @param {Partial<SHAPE>[]} items - The items to delete.
|
|
300
|
+
* @returns {Promise<void>} A promise that resolves when the items are deleted.
|
|
301
|
+
*/
|
|
302
|
+
async deleteItems(items) {
|
|
303
|
+
const locations = await Promise.all(items.map((item) => this.fetchStoredLocation(item)));
|
|
304
|
+
await super.deleteItems(items);
|
|
305
|
+
await Promise.all(locations.map((location) => this.storage.delete(location)));
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Prepares a value for storage by externalizing large content to S3.
|
|
309
|
+
* @param {DATA_CLASS} value - The value to prepare for storage.
|
|
310
|
+
* @returns {Promise<DATA_CLASS>} A promise that resolves to the prepared value for DynamoDB.
|
|
311
|
+
*/
|
|
312
|
+
async prepareValueForStorage(value) {
|
|
313
|
+
const serialized = JSON.stringify(value);
|
|
314
|
+
const plainObject = JSON.parse(serialized);
|
|
315
|
+
// Remove any existing storageLocation before saving
|
|
316
|
+
delete plainObject.storageLocation;
|
|
317
|
+
// Generate reference ID from pk and sk for consistent S3 key
|
|
318
|
+
const pk = this.getPk(value);
|
|
319
|
+
const sk = this.getSk(value);
|
|
320
|
+
// Create hash of pk and sk for S3 key
|
|
321
|
+
const hash = (0, crypto_1.createHash)('sha256').update(`${pk}#${sk}`).digest('hex');
|
|
322
|
+
// Save full payload to S3
|
|
323
|
+
const { location } = await this.storage.save(this.entityName, hash, plainObject);
|
|
324
|
+
// Create minimal payload for DynamoDB with only key fields
|
|
325
|
+
// Key fields are computed from the entity definition - everything else is externalized
|
|
326
|
+
const minimalPayload = this.getKeyFieldsValues(plainObject);
|
|
327
|
+
// Add storageLocation reference
|
|
328
|
+
minimalPayload.storageLocation = location;
|
|
329
|
+
// Return minimal payload to be stored in DynamoDB
|
|
330
|
+
// DO NOT pass through constructor as it will strip storageLocation!
|
|
331
|
+
// DO NOT mutate the original value - storageLocation is an internal implementation detail
|
|
332
|
+
return minimalPayload;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Extracts only the key field values from an object based on the entity definition.
|
|
336
|
+
* Large content fields (defined in fieldsAsJsonString) are set to empty values.
|
|
337
|
+
* All other fields (key fields and small metadata) are preserved.
|
|
338
|
+
*
|
|
339
|
+
* @param {Record<string, unknown>} obj - The source object to extract key fields from.
|
|
340
|
+
* @returns {Record<string, unknown>} An object containing only the key field values.
|
|
341
|
+
*/
|
|
342
|
+
getKeyFieldsValues(obj) {
|
|
343
|
+
const result = {};
|
|
344
|
+
// Copy all properties from the source object
|
|
345
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
346
|
+
// Skip storageLocation as it's handled separately
|
|
347
|
+
if (key === 'storageLocation') {
|
|
348
|
+
continue;
|
|
349
|
+
}
|
|
350
|
+
// If this field is in fieldsAsJsonString, it's large content - set to empty
|
|
351
|
+
if (this.fieldsAsJsonString.includes(key)) {
|
|
352
|
+
// Set arrays to empty arrays, objects to empty objects
|
|
353
|
+
if (Array.isArray(value)) {
|
|
354
|
+
result[key] = [];
|
|
355
|
+
}
|
|
356
|
+
else if (value !== null && typeof value === 'object') {
|
|
357
|
+
result[key] = {};
|
|
358
|
+
}
|
|
359
|
+
// Skip primitive large fields entirely
|
|
360
|
+
continue;
|
|
361
|
+
}
|
|
362
|
+
// Keep all other fields (key fields and small metadata)
|
|
363
|
+
result[key] = value;
|
|
364
|
+
}
|
|
365
|
+
return result;
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Override parent's hydrateItem to preserve storageLocation
|
|
369
|
+
* The parent's hydrateItem creates a new instance which strips storageLocation
|
|
370
|
+
*/
|
|
371
|
+
hydrateItem(item) {
|
|
372
|
+
// Extract storageLocation before calling parent's hydrateItem
|
|
373
|
+
const storageLocation = item.storageLocation;
|
|
374
|
+
// Call parent's hydrateItem which will strip storageLocation
|
|
375
|
+
const hydrated = super.hydrateItem(item);
|
|
376
|
+
// Add storageLocation back if it existed
|
|
377
|
+
if (storageLocation) {
|
|
378
|
+
hydrated.storageLocation = storageLocation;
|
|
379
|
+
}
|
|
380
|
+
return hydrated;
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Hydrates a record from external storage.
|
|
384
|
+
* @param {DATA_CLASS} record - The record to hydrate.
|
|
385
|
+
* @returns {Promise<DATA_CLASS | undefined>} A promise that resolves to the hydrated record (without storageLocation).
|
|
386
|
+
*/
|
|
387
|
+
async hydrateFromExternalStorage(record) {
|
|
388
|
+
// If no record or no storageLocation, return record as-is
|
|
389
|
+
if (!record || !record.storageLocation) {
|
|
390
|
+
return record;
|
|
391
|
+
}
|
|
392
|
+
// Load full content from S3
|
|
393
|
+
return (await this.storage.load(record.storageLocation));
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Fetches the stored location of an item.
|
|
397
|
+
* @param {Partial<SHAPE>} partialItem - The item to fetch the stored location for.
|
|
398
|
+
* @returns {Promise<S3StorageLocation | undefined>} A promise that resolves to the stored location.
|
|
399
|
+
*/
|
|
400
|
+
async fetchStoredLocation(partialItem) {
|
|
401
|
+
var _a;
|
|
402
|
+
try {
|
|
403
|
+
const output = await this.client.get({
|
|
404
|
+
TableName: this.tableName,
|
|
405
|
+
Key: {
|
|
406
|
+
[this.keys.pk.attributeName]: this.getPk(partialItem),
|
|
407
|
+
[this.keys.sk.attributeName]: this.getSk(partialItem),
|
|
408
|
+
},
|
|
409
|
+
ProjectionExpression: 'storageLocation',
|
|
410
|
+
});
|
|
411
|
+
return (_a = output.Item) === null || _a === void 0 ? void 0 : _a.storageLocation;
|
|
412
|
+
}
|
|
413
|
+
catch (error) {
|
|
414
|
+
if (error instanceof client_dynamodb_1.ConditionalCheckFailedException) {
|
|
415
|
+
return undefined;
|
|
416
|
+
}
|
|
417
|
+
throw error;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Check if the error is due to DynamoDB item size limit being exceeded.
|
|
422
|
+
* @param {unknown} error - The error to check.
|
|
423
|
+
* @returns {boolean} True if the error is due to DynamoDB item size limit being exceeded, false otherwise.
|
|
424
|
+
*/
|
|
425
|
+
isDynamoItemSizeLimitError(error) {
|
|
426
|
+
var _a, _b, _c, _d;
|
|
427
|
+
if (!error || typeof error !== 'object') {
|
|
428
|
+
return false;
|
|
429
|
+
}
|
|
430
|
+
const err = error;
|
|
431
|
+
const cancellationReasons = ((_a = err === null || err === void 0 ? void 0 : err.CancellationReasons) !== null && _a !== void 0 ? _a : err === null || err === void 0 ? void 0 : err.cancellationReasons);
|
|
432
|
+
const validationCodes = ['ValidationException', 'TransactionCanceledException'];
|
|
433
|
+
const hasValidationCode = validationCodes.includes(err === null || err === void 0 ? void 0 : err.code) ||
|
|
434
|
+
validationCodes.includes(err === null || err === void 0 ? void 0 : err.name) ||
|
|
435
|
+
validationCodes.includes((_b = err === null || err === void 0 ? void 0 : err.originalError) === null || _b === void 0 ? void 0 : _b.code) ||
|
|
436
|
+
validationCodes.includes((_c = err === null || err === void 0 ? void 0 : err.originalError) === null || _c === void 0 ? void 0 : _c.name) ||
|
|
437
|
+
(Array.isArray(cancellationReasons) &&
|
|
438
|
+
cancellationReasons.some((reason) => { var _a; return validationCodes.includes(((_a = reason === null || reason === void 0 ? void 0 : reason.Code) !== null && _a !== void 0 ? _a : reason === null || reason === void 0 ? void 0 : reason.code)); }));
|
|
439
|
+
const hasSizeMessage = this.hasDynamoSizeKeyword(err === null || err === void 0 ? void 0 : err.message) ||
|
|
440
|
+
this.hasDynamoSizeKeyword((_d = err === null || err === void 0 ? void 0 : err.originalError) === null || _d === void 0 ? void 0 : _d.message) ||
|
|
441
|
+
(Array.isArray(cancellationReasons) &&
|
|
442
|
+
cancellationReasons.some((reason) => { var _a; return this.hasDynamoSizeKeyword(((_a = reason === null || reason === void 0 ? void 0 : reason.Message) !== null && _a !== void 0 ? _a : reason === null || reason === void 0 ? void 0 : reason.message)); }));
|
|
443
|
+
return hasValidationCode || hasSizeMessage;
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Check if the message contains the DynamoDB size keyword.
|
|
447
|
+
* @param {string} message - The message to check.
|
|
448
|
+
* @returns {boolean} True if the message contains the DynamoDB size keyword, false otherwise.
|
|
449
|
+
*/
|
|
450
|
+
hasDynamoSizeKeyword(message) {
|
|
451
|
+
if (typeof message !== 'string') {
|
|
452
|
+
return false;
|
|
453
|
+
}
|
|
454
|
+
const normalized = message.toLowerCase();
|
|
455
|
+
return (normalized.includes('item size') ||
|
|
456
|
+
normalized.includes('maximum allowed size') ||
|
|
457
|
+
normalized.includes('exceeds') ||
|
|
458
|
+
normalized.includes('400 kb') ||
|
|
459
|
+
normalized.includes('400kb'));
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
exports.ExternalizedDynamoDbRepository = ExternalizedDynamoDbRepository;
|
|
463
|
+
//# sourceMappingURL=ExternalizedDynamoDbRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExternalizedDynamoDbRepository.js","sourceRoot":"","sources":["../../src/externalized/ExternalizedDynamoDbRepository.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,WAAW;AACX,mCAAoC;AACpC,8DAA2E;AAE3E,kBAAkB;AAClB,uFAAoH;AAMpH;;;;;;;;;;;GAWG;AACH,MAAsB,8BAGpB,SAAQ,uDAA6C;IACrD;;;;;;;;;;OAUG;IACH,YACE,SAAiB,EACjB,SAA+B,EAC/B,UAAkB,EAClB,gBAAkC,EAClC,QAA8D,EAC7C,OAA0B;QAE3C,KAAK,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,gBAAgB,EAAE,QAAQ,CAAC,CAAC;QAFnD,YAAO,GAAP,OAAO,CAAmB;IAG7C,CAAC;IAED;;;;;;;;OAQG;IACI,KAAK,CAAC,UAAU,CACrB,KAAiB,EACjB,cAA2B,EAAE,EAC7B,kBAAkC,EAAE,EACpC,UAA0C,EAAE,gBAAgB,EAAE,KAAK,EAAE;QAErE,IAAI,CAAC;YACH,OAAO,MAAM,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;QACrF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,qFAAqF;YACrF,IAAI,IAAI,CAAC,0BAA0B,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC3C,OAAO,CAAC,IAAI,CACV,yEAAyE,IAAI,CAAC,UAAU,mCAAmC,CAC5H,CAAC;gBACF,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC;gBACnE,OAAO,MAAM,IAAI,CAAC,kBAAkB,CAAC,iBAAiB,EAAE,WAAW,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