@adobe/spacecat-shared-data-access 2.37.0 → 2.38.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 +1 -1
- package/src/models/site/config.js +5 -5
- package/src/models/site/site.schema.js +15 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-data-access-v2.38.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.38.0...@adobe/spacecat-shared-data-access-v2.38.1) (2025-07-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* return provided data when config error ([#862](https://github.com/adobe/spacecat-shared/issues/862)) ([eb418cd](https://github.com/adobe/spacecat-shared/commit/eb418cdf4e942f2da0b40d95cc991b9a4a34a393))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-data-access-v2.38.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.37.0...@adobe/spacecat-shared-data-access-v2.38.0) (2025-07-21)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* add pageTypes to store pattern matching for pageTypes ([#857](https://github.com/adobe/spacecat-shared/issues/857)) ([4081e8c](https://github.com/adobe/spacecat-shared/commit/4081e8cfd8571d43b9720c07caeb22ced77281d0))
|
|
14
|
+
|
|
1
15
|
# [@adobe/spacecat-shared-data-access-v2.37.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.36.1...@adobe/spacecat-shared-data-access-v2.37.0) (2025-07-21)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -258,22 +258,22 @@ export function validateConfiguration(config) {
|
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
export const Config = (data = {}) => {
|
|
261
|
-
let
|
|
261
|
+
let configData;
|
|
262
262
|
|
|
263
263
|
try {
|
|
264
|
-
|
|
264
|
+
configData = validateConfiguration(data);
|
|
265
265
|
} catch (error) {
|
|
266
266
|
const logger = getLogger();
|
|
267
267
|
if (logger && logger !== console) {
|
|
268
|
-
logger.error('Site configuration validation failed, using
|
|
268
|
+
logger.error('Site configuration validation failed, using provided data', {
|
|
269
269
|
error: error.message,
|
|
270
270
|
invalidConfig: data,
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
|
-
|
|
273
|
+
configData = { ...data };
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
-
const state = { ...
|
|
276
|
+
const state = { ...configData };
|
|
277
277
|
const self = { state };
|
|
278
278
|
self.getSlackConfig = () => state.slack;
|
|
279
279
|
self.isInternalCustomer = () => state?.slack?.workspace === 'internal';
|
|
@@ -117,6 +117,21 @@ const schema = new SchemaBuilder(Site, SiteCollection)
|
|
|
117
117
|
watch: ['authoringType', 'hlxConfig', 'deliveryConfig'],
|
|
118
118
|
set: (_, attrs) => computeExternalIds(attrs, Site.AUTHORING_TYPES).externalSiteId,
|
|
119
119
|
})
|
|
120
|
+
.addAttribute('pageTypes', {
|
|
121
|
+
type: 'list',
|
|
122
|
+
required: false,
|
|
123
|
+
items: {
|
|
124
|
+
type: 'map',
|
|
125
|
+
required: true,
|
|
126
|
+
properties: {
|
|
127
|
+
name: { type: 'string', required: true },
|
|
128
|
+
pattern: {
|
|
129
|
+
type: 'string',
|
|
130
|
+
required: true,
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
})
|
|
120
135
|
.addAllIndex(['baseURL'])
|
|
121
136
|
.addIndex(
|
|
122
137
|
{ composite: ['deliveryType'] },
|