@adobe/spacecat-shared-data-access 1.41.6 → 1.41.8

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.41.8](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.41.7...@adobe/spacecat-shared-data-access-v1.41.8) (2024-08-20)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add only unique site/org ids in enabled/disabled for a handler ([#322](https://github.com/adobe/spacecat-shared/issues/322)) ([abb01c9](https://github.com/adobe/spacecat-shared/commit/abb01c914f1d77d2adf06c0de80c977945d597bb))
7
+
8
+ # [@adobe/spacecat-shared-data-access-v1.41.7](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.41.6...@adobe/spacecat-shared-data-access-v1.41.7) (2024-08-20)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * move metrics-store and s3 in shared utils ([#327](https://github.com/adobe/spacecat-shared/issues/327)) ([bff367c](https://github.com/adobe/spacecat-shared/commit/bff367cf05f9b7d802a7b8c24bc81abbf0e2665c))
14
+
1
15
  # [@adobe/spacecat-shared-data-access-v1.41.6](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.41.5...@adobe/spacecat-shared-data-access-v1.41.6) (2024-08-20)
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.41.6",
3
+ "version": "1.41.8",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -38,10 +38,10 @@
38
38
  "uuid": "10.0.0"
39
39
  },
40
40
  "devDependencies": {
41
- "chai": "4.5.0",
41
+ "chai": "5.1.1",
42
42
  "chai-as-promised": "8.0.0",
43
43
  "dynamo-db-local": "8.0.0",
44
44
  "sinon": "18.0.0",
45
- "sinon-chai": "3.7.0"
45
+ "sinon-chai": "4.0.0"
46
46
  }
47
47
  }
package/src/index.d.ts CHANGED
@@ -84,6 +84,7 @@ export interface Audit {
84
84
  getScores: () => object;
85
85
  }
86
86
 
87
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
87
88
  export interface Config {
88
89
 
89
90
  }
@@ -69,11 +69,11 @@ const Configuration = (data = {}) => {
69
69
  handler.disabled.orgs = handler.disabled.orgs?.filter((id) => id !== orgId) || [];
70
70
  } else {
71
71
  handler.enabled = handler.enabled || { orgs: [] };
72
- handler.enabled.orgs = [...(handler.enabled?.orgs || []), orgId];
72
+ handler.enabled.orgs = Array.from(new Set([...(handler.enabled?.orgs || []), orgId]));
73
73
  }
74
74
  } else if (handler.enabledByDefault) {
75
75
  handler.disabled = handler.disabled || { orgs: [] };
76
- handler.disabled.orgs = [...(handler.disabled?.orgs || []), orgId];
76
+ handler.disabled.orgs = Array.from(new Set([...(handler.disabled?.orgs || []), orgId]));
77
77
  } else {
78
78
  handler.enabled.orgs = handler.enabled.orgs?.filter((id) => id !== orgId) || [];
79
79
  }
@@ -88,11 +88,11 @@ const Configuration = (data = {}) => {
88
88
  handler.disabled.sites = handler.disabled.sites?.filter((id) => id !== siteId) || [];
89
89
  } else {
90
90
  handler.enabled = handler.enabled || { sites: [] };
91
- handler.enabled.sites = [...(handler.enabled.sites || []), siteId];
91
+ handler.enabled.sites = Array.from(new Set([...(handler.enabled.sites || []), siteId]));
92
92
  }
93
93
  } else if (handler.enabledByDefault) {
94
94
  handler.disabled = handler.disabled || { sites: [] };
95
- handler.disabled.sites = [...(handler.disabled.sites || []), siteId];
95
+ handler.disabled.sites = Array.from(new Set([...(handler.disabled.sites || []), siteId]));
96
96
  } else {
97
97
  handler.enabled.sites = handler.enabled.sites?.filter((id) => id !== siteId) || [];
98
98
  }