@adobe/spacecat-shared-data-access 2.9.0 → 2.9.2
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 +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-data-access-v2.9.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.9.1...@adobe/spacecat-shared-data-access-v2.9.2) (2025-02-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add limit param ([#631](https://github.com/adobe/spacecat-shared/issues/631)) ([72faa3c](https://github.com/adobe/spacecat-shared/commit/72faa3cb0a0037558a6dd11372b923562c884668))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-data-access-v2.9.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.9.0...@adobe/spacecat-shared-data-access-v2.9.1) (2025-02-26)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* import-schema backwards compatibility ([#630](https://github.com/adobe/spacecat-shared/issues/630)) ([9ef74bf](https://github.com/adobe/spacecat-shared/commit/9ef74bfc89b0ccb9d27d34e5a10eef182b9ee527)), closes [#626](https://github.com/adobe/spacecat-shared/issues/626)
|
|
14
|
+
|
|
1
15
|
# [@adobe/spacecat-shared-data-access-v2.9.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.8.4...@adobe/spacecat-shared-data-access-v2.9.0) (2025-02-25)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -30,13 +30,15 @@ export const IMPORT_SOURCES = {
|
|
|
30
30
|
const IMPORT_BASE_KEYS = {
|
|
31
31
|
destinations: Joi.array().items(Joi.string().valid(IMPORT_DESTINATIONS.DEFAULT)).required(),
|
|
32
32
|
sources: Joi.array().items(Joi.string().valid(...Object.values(IMPORT_SOURCES))).required(),
|
|
33
|
-
|
|
33
|
+
// not required for now due backward compatibility
|
|
34
|
+
enabled: Joi.boolean().default(true),
|
|
34
35
|
};
|
|
35
36
|
|
|
36
37
|
export const IMPORT_TYPE_SCHEMAS = {
|
|
37
38
|
[IMPORT_TYPES.ORGANIC_KEYWORDS]: Joi.object({
|
|
38
39
|
type: Joi.string().valid(IMPORT_TYPES.ORGANIC_KEYWORDS).required(),
|
|
39
40
|
...IMPORT_BASE_KEYS,
|
|
41
|
+
limit: Joi.number().integer().min(1).max(100),
|
|
40
42
|
pageUrl: Joi.string().uri(),
|
|
41
43
|
}),
|
|
42
44
|
[IMPORT_TYPES.ORGANIC_TRAFFIC]: Joi.object({
|
|
@@ -118,7 +120,7 @@ export function validateConfiguration(config) {
|
|
|
118
120
|
const { error, value } = configSchema.validate(config);
|
|
119
121
|
|
|
120
122
|
if (error) {
|
|
121
|
-
throw new Error(`Configuration validation error: ${error.message}
|
|
123
|
+
throw new Error(`Configuration validation error: ${error.message}`, { cause: error });
|
|
122
124
|
}
|
|
123
125
|
|
|
124
126
|
return value; // Validated and sanitized configuration
|