@adobe/spacecat-shared-data-access 1.15.4 → 1.15.6
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 +3 -3
- package/src/service/sites/accessPatterns.js +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-data-access-v1.15.6](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.15.5...@adobe/spacecat-shared-data-access-v1.15.6) (2024-02-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* return empty sites for getSitesByOrganizationIDWithLatestAudit ([1caaa39](https://github.com/adobe/spacecat-shared/commit/1caaa39f20d2c73b9a195d43c57d320fb009fba7))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-data-access-v1.15.5](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.15.4...@adobe/spacecat-shared-data-access-v1.15.5) (2024-02-12)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update external fixes ([#148](https://github.com/adobe/spacecat-shared/issues/148)) ([a32b5ce](https://github.com/adobe/spacecat-shared/commit/a32b5ce7c57e06d9b27250a8e59b666198945f72))
|
|
14
|
+
|
|
1
15
|
# [@adobe/spacecat-shared-data-access-v1.15.4](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.15.3...@adobe/spacecat-shared-data-access-v1.15.4) (2024-02-09)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/spacecat-shared-data-access",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.6",
|
|
4
4
|
"description": "Shared modules of the Spacecat Services - Data Access",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@adobe/spacecat-shared-dynamo": "1.2.5",
|
|
33
33
|
"@adobe/spacecat-shared-utils": "1.2.0",
|
|
34
|
-
"@aws-sdk/client-dynamodb": "3.
|
|
35
|
-
"@aws-sdk/lib-dynamodb": "3.
|
|
34
|
+
"@aws-sdk/client-dynamodb": "3.511.0",
|
|
35
|
+
"@aws-sdk/lib-dynamodb": "3.511.0",
|
|
36
36
|
"@types/joi": "17.2.3",
|
|
37
37
|
"joi": "17.12.1",
|
|
38
38
|
"uuid": "9.0.1"
|
|
@@ -298,7 +298,7 @@ export const getSitesByOrganizationIDWithLatestAudits = async (
|
|
|
298
298
|
const sitesMap = new Map(sites.map((site) => [site.getId(), site]));
|
|
299
299
|
const orderedSites = [];
|
|
300
300
|
|
|
301
|
-
// Append
|
|
301
|
+
// Append sites with the latest audit in the sorted order
|
|
302
302
|
latestAudits.forEach((audit) => {
|
|
303
303
|
const site = sitesMap.get(audit.getSiteId());
|
|
304
304
|
if (site) {
|
|
@@ -308,6 +308,12 @@ export const getSitesByOrganizationIDWithLatestAudits = async (
|
|
|
308
308
|
}
|
|
309
309
|
});
|
|
310
310
|
|
|
311
|
+
// Then, append the remaining sites (without a latest audit)
|
|
312
|
+
sitesMap.forEach((site) => {
|
|
313
|
+
site.setAudits([]);
|
|
314
|
+
orderedSites.push(site);
|
|
315
|
+
});
|
|
316
|
+
|
|
311
317
|
return orderedSites;
|
|
312
318
|
};
|
|
313
319
|
|