@adobe/spacecat-shared-data-access 2.80.1 → 2.81.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 +14 -0
- package/package.json +1 -1
- package/src/models/audit/audit.model.js +1 -0
- package/src/service/index.js +22 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-data-access-v2.81.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.80.2...@adobe/spacecat-shared-data-access-v2.81.0) (2025-11-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **COMOPT-880:** add PRODUCT_METATAGS_AUTO_FIX audit type ([#1112](https://github.com/adobe/spacecat-shared/issues/1112)) ([b4e61db](https://github.com/adobe/spacecat-shared/commit/b4e61dbfa9b0d7c18a30d9ac025cfaa05c7d5bc0))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-data-access-v2.80.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.80.1...@adobe/spacecat-shared-data-access-v2.80.2) (2025-11-10)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **dynamo-db:** prevent connection storms in Lambda by caching client instances ([#1110](https://github.com/adobe/spacecat-shared/issues/1110)) ([f854100](https://github.com/adobe/spacecat-shared/commit/f85410088a2290dbab8d8956c16137e99e47147b))
|
|
14
|
+
|
|
1
15
|
# [@adobe/spacecat-shared-data-access-v2.80.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.80.0...@adobe/spacecat-shared-data-access-v2.80.1) (2025-11-08)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -68,6 +68,7 @@ class Audit extends BaseModel {
|
|
|
68
68
|
PRERENDER: 'prerender',
|
|
69
69
|
PRODUCT_METATAGS: 'product-metatags',
|
|
70
70
|
PRODUCT_METATAGS_AUTO_SUGGEST: 'product-metatags-auto-suggest',
|
|
71
|
+
PRODUCT_METATAGS_AUTO_FIX: 'product-metatags-auto-fix',
|
|
71
72
|
SUMMARIZATION: 'summarization',
|
|
72
73
|
PAGE_TYPE_DETECTION: 'page-type-detection',
|
|
73
74
|
FAQS: 'faqs',
|
package/src/service/index.js
CHANGED
|
@@ -22,14 +22,29 @@ export * from '../errors/index.js';
|
|
|
22
22
|
export * from '../models/index.js';
|
|
23
23
|
export * from '../util/index.js';
|
|
24
24
|
|
|
25
|
+
let defaultDynamoDBClient;
|
|
26
|
+
const documentClientCache = new WeakMap();
|
|
27
|
+
|
|
25
28
|
const createRawClient = (client = undefined) => {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
const rawClient = client || (() => {
|
|
30
|
+
if (!defaultDynamoDBClient) {
|
|
31
|
+
defaultDynamoDBClient = new DynamoDB();
|
|
32
|
+
}
|
|
33
|
+
return defaultDynamoDBClient;
|
|
34
|
+
})();
|
|
35
|
+
|
|
36
|
+
let documentClient = documentClientCache.get(rawClient);
|
|
37
|
+
if (!documentClient) {
|
|
38
|
+
documentClient = DynamoDBDocument.from(instrumentAWSClient(rawClient), {
|
|
39
|
+
marshallOptions: {
|
|
40
|
+
convertEmptyValues: true,
|
|
41
|
+
removeUndefinedValues: true,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
documentClientCache.set(rawClient, documentClient);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return documentClient;
|
|
33
48
|
};
|
|
34
49
|
|
|
35
50
|
const createElectroService = (client, config, log) => {
|