@adobe/spacecat-shared-data-access 1.27.0 → 1.29.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 CHANGED
@@ -1,3 +1,17 @@
1
+ # [@adobe/spacecat-shared-data-access-v1.29.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.28.0...@adobe/spacecat-shared-data-access-v1.29.0) (2024-06-13)
2
+
3
+
4
+ ### Features
5
+
6
+ * opt-out brokenlinks ([#265](https://github.com/adobe/spacecat-shared/issues/265)) ([025158f](https://github.com/adobe/spacecat-shared/commit/025158f8549733ff2c45c67fc3d421a03dac66d7))
7
+
8
+ # [@adobe/spacecat-shared-data-access-v1.28.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.27.0...@adobe/spacecat-shared-data-access-v1.28.0) (2024-06-12)
9
+
10
+
11
+ ### Features
12
+
13
+ * opt-out broken-backlinks ([#263](https://github.com/adobe/spacecat-shared/issues/263)) ([14402cb](https://github.com/adobe/spacecat-shared/commit/14402cbda51bf54b2928ca1d66afac00ca2444ed))
14
+
1
15
  # [@adobe/spacecat-shared-data-access-v1.27.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.26.1...@adobe/spacecat-shared-data-access-v1.27.0) (2024-06-12)
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.27.0",
3
+ "version": "1.29.0",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -13,11 +13,15 @@
13
13
  const AuditConfigType = (data = {}) => {
14
14
  const state = {
15
15
  disabled: data.disabled || false,
16
+ excludedURLs: data.excludedURLs || [],
16
17
  };
17
18
 
18
19
  const self = {
19
20
  disabled: () => state.disabled,
20
-
21
+ getExcludedURLs: () => state.excludedURLs,
22
+ updateExcludedURLs: (excludeURLs) => {
23
+ state.excludedURLs = excludeURLs;
24
+ },
21
25
  updateDisabled: (newValue) => {
22
26
  state.disabled = newValue;
23
27
  },
@@ -29,12 +33,14 @@ const AuditConfigType = (data = {}) => {
29
33
  AuditConfigType.fromDynamoItem = (dynamoItem) => {
30
34
  const auditConfigTypeData = {
31
35
  disabled: dynamoItem.disabled,
36
+ excludedURLs: dynamoItem.excludedURLs,
32
37
  };
33
38
  return AuditConfigType(auditConfigTypeData);
34
39
  };
35
40
 
36
41
  AuditConfigType.toDynamoItem = (auditConfigType) => ({
37
42
  disabled: auditConfigType.disabled(),
43
+ excludedURLs: auditConfigType.getExcludedURLs(),
38
44
  });
39
45
 
40
46
  export default AuditConfigType;
@@ -30,6 +30,7 @@ export const configSchema = Joi.object({
30
30
  Joi.string(),
31
31
  Joi.object({
32
32
  disabled: Joi.boolean().optional(),
33
+ excludedURLs: Joi.array().items(Joi.string()).optional(),
33
34
  }).unknown(true),
34
35
  ).unknown(true),
35
36
  }).unknown(true),