@adobe/spacecat-shared-data-access 1.52.0 → 1.53.1
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 +4 -4
- package/src/models/site/config.js +13 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-data-access-v1.53.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.53.0...@adobe/spacecat-shared-data-access-v1.53.1) (2024-11-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update external fixes ([#444](https://github.com/adobe/spacecat-shared/issues/444)) ([5e86c98](https://github.com/adobe/spacecat-shared/commit/5e86c98f274e514e8ec3032b52a128b7b394f5bc))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-data-access-v1.53.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.52.0...@adobe/spacecat-shared-data-access-v1.53.0) (2024-11-15)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Introduce configurable grouping patterns ([#439](https://github.com/adobe/spacecat-shared/issues/439)) ([bd2ad3b](https://github.com/adobe/spacecat-shared/commit/bd2ad3b39379f66ccdb8e20bfd4ef013c6230f79))
|
|
14
|
+
|
|
1
15
|
# [@adobe/spacecat-shared-data-access-v1.52.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.51.0...@adobe/spacecat-shared-data-access-v1.52.0) (2024-11-13)
|
|
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.
|
|
3
|
+
"version": "1.53.1",
|
|
4
4
|
"description": "Shared modules of the Spacecat Services - Data Access",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@adobe/spacecat-shared-dynamo": "1.3.47",
|
|
37
37
|
"@adobe/spacecat-shared-utils": "1.22.4",
|
|
38
|
-
"@aws-sdk/client-dynamodb": "3.
|
|
39
|
-
"@aws-sdk/lib-dynamodb": "3.
|
|
38
|
+
"@aws-sdk/client-dynamodb": "3.693.0",
|
|
39
|
+
"@aws-sdk/lib-dynamodb": "3.693.0",
|
|
40
40
|
"@types/joi": "17.2.3",
|
|
41
41
|
"joi": "17.13.3",
|
|
42
42
|
"uuid": "11.0.3"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"chai": "5.1.2",
|
|
46
46
|
"chai-as-promised": "8.0.0",
|
|
47
|
-
"dynamo-db-local": "9.
|
|
47
|
+
"dynamo-db-local": "9.3.0",
|
|
48
48
|
"sinon": "19.0.2",
|
|
49
49
|
"sinon-chai": "4.0.0"
|
|
50
50
|
}
|
|
@@ -31,6 +31,10 @@ export const configSchema = Joi.object({
|
|
|
31
31
|
targetURL: Joi.string().optional(),
|
|
32
32
|
})).optional(),
|
|
33
33
|
includedURLs: Joi.array().items(Joi.string()),
|
|
34
|
+
groupedURLs: Joi.array().items(Joi.object({
|
|
35
|
+
name: Joi.string(),
|
|
36
|
+
pattern: Joi.string(),
|
|
37
|
+
})).optional(),
|
|
34
38
|
}).unknown(true)).unknown(true),
|
|
35
39
|
}).unknown(true);
|
|
36
40
|
|
|
@@ -66,6 +70,7 @@ export const Config = (data = {}) => {
|
|
|
66
70
|
self.getManualOverwrites = (type) => state?.handlers?.[type]?.manualOverwrites;
|
|
67
71
|
self.getFixedURLs = (type) => state?.handlers?.[type]?.fixedURLs;
|
|
68
72
|
self.getIncludedURLs = (type) => state?.handlers?.[type]?.includedURLs;
|
|
73
|
+
self.getGroupedURLs = (type) => state?.handlers?.[type]?.groupedURLs;
|
|
69
74
|
|
|
70
75
|
self.updateSlackConfig = (channel, workspace, invitedUserCount) => {
|
|
71
76
|
state.slack = {
|
|
@@ -104,6 +109,14 @@ export const Config = (data = {}) => {
|
|
|
104
109
|
state.handlers[type].fixedURLs = fixedURLs;
|
|
105
110
|
};
|
|
106
111
|
|
|
112
|
+
self.updateGroupedURLs = (type, groupedURLs) => {
|
|
113
|
+
state.handlers = state.handlers || {};
|
|
114
|
+
state.handlers[type] = state.handlers[type] || {};
|
|
115
|
+
state.handlers[type].groupedURLs = groupedURLs;
|
|
116
|
+
|
|
117
|
+
validateConfiguration(state);
|
|
118
|
+
};
|
|
119
|
+
|
|
107
120
|
return Object.freeze(self);
|
|
108
121
|
};
|
|
109
122
|
|