@adobe/spacecat-shared-data-access 1.49.5 → 1.49.7
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/models/configuration.js +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-data-access-v1.49.7](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.49.6...@adobe/spacecat-shared-data-access-v1.49.7) (2024-11-08)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* engine spec ([#431](https://github.com/adobe/spacecat-shared/issues/431)) ([f19600e](https://github.com/adobe/spacecat-shared/commit/f19600e74ae7ee42a97c08d5b1c30db79c8ec13d))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-data-access-v1.49.6](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.49.5...@adobe/spacecat-shared-data-access-v1.49.6) (2024-11-07)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* handle missing 'sites' and 'orgs' in enabled/disabled configuraions safely ([#424](https://github.com/adobe/spacecat-shared/issues/424)) ([5a1468f](https://github.com/adobe/spacecat-shared/commit/5a1468f92fb2b0b288cebb44576dea3f4948b462)), closes [/github.com/adobe/spacecat-shared/blob/main/packages/spacecat-shared-data-access/src/models/configuration.js#L39-L45](https://github.com//github.com/adobe/spacecat-shared/blob/main/packages/spacecat-shared-data-access/src/models/configuration.js/issues/L39-L45)
|
|
14
|
+
|
|
1
15
|
# [@adobe/spacecat-shared-data-access-v1.49.5](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.49.4...@adobe/spacecat-shared-data-access-v1.49.5) (2024-11-07)
|
|
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.49.
|
|
3
|
+
"version": "1.49.7",
|
|
4
4
|
"description": "Shared modules of the Spacecat Services - Data Access",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@adobe/spacecat-shared-dynamo": "1.3.
|
|
37
|
-
"@adobe/spacecat-shared-utils": "1.22.
|
|
36
|
+
"@adobe/spacecat-shared-dynamo": "1.3.45",
|
|
37
|
+
"@adobe/spacecat-shared-utils": "1.22.3",
|
|
38
38
|
"@aws-sdk/client-dynamodb": "3.682.0",
|
|
39
39
|
"@aws-sdk/lib-dynamodb": "3.685.0",
|
|
40
40
|
"@types/joi": "17.2.3",
|
|
@@ -37,12 +37,15 @@ const Configuration = (data = {}) => {
|
|
|
37
37
|
const orgId = site.getOrganizationId();
|
|
38
38
|
|
|
39
39
|
if (handler.enabled) {
|
|
40
|
-
|
|
40
|
+
const sites = handler.enabled.sites || [];
|
|
41
|
+
const orgs = handler.enabled.orgs || [];
|
|
42
|
+
return sites.includes(siteId) || orgs.includes(orgId);
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
if (handler.disabled) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
const sites = handler.disabled.sites || [];
|
|
47
|
+
const orgs = handler.disabled.orgs || [];
|
|
48
|
+
return !(sites.includes(siteId) || orgs.includes(orgId));
|
|
46
49
|
}
|
|
47
50
|
|
|
48
51
|
return handler.enabledByDefault;
|