@adobe/spacecat-shared-data-access 1.49.4 → 1.49.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 CHANGED
@@ -1,3 +1,17 @@
1
+ # [@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)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * 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)
7
+
8
+ # [@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)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * set correct node engine spec ([#423](https://github.com/adobe/spacecat-shared/issues/423)) ([5086ce7](https://github.com/adobe/spacecat-shared/commit/5086ce7d41bebb502cadf092e5b9a7b84b5bf103))
14
+
1
15
  # [@adobe/spacecat-shared-data-access-v1.49.4](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.49.3...@adobe/spacecat-shared-data-access-v1.49.4) (2024-11-02)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-data-access",
3
- "version": "1.49.4",
3
+ "version": "1.49.6",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "engines": {
7
- "node": "^20.0.0 <21.0.0",
8
- "npm": "^10.0.0 <11.0.0"
7
+ "node": ">=20.0.0 <23.0.0",
8
+ "npm": ">=10.0.0 <11.0.0"
9
9
  },
10
10
  "main": "src/index.js",
11
11
  "types": "src/index.d.ts",
@@ -33,8 +33,8 @@
33
33
  "access": "public"
34
34
  },
35
35
  "dependencies": {
36
- "@adobe/spacecat-shared-dynamo": "1.3.42",
37
- "@adobe/spacecat-shared-utils": "1.20.8",
36
+ "@adobe/spacecat-shared-dynamo": "1.3.44",
37
+ "@adobe/spacecat-shared-utils": "1.22.1",
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
- return handler.enabled.sites.includes(siteId) || handler.enabled.orgs.includes(orgId);
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
- return !((handler.disabled.sites && handler.disabled.sites.includes(siteId))
45
- || (handler.disabled.orgs && handler.disabled.orgs.includes(orgId)));
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;