@adobe/helix-shared-config 11.0.15 → 11.1.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 +2 -2
- package/src/IndexConfig.js +1 -0
- package/src/MountConfig.js +1 -0
- package/src/SchemaDerivedConfig.js +3 -1
- package/src/SitemapConfig.js +1 -0
- package/src/ValidationError.js +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/helix-shared-config-v11.1.1](https://github.com/adobe/helix-shared/compare/@adobe/helix-shared-config-v11.1.0...@adobe/helix-shared-config-v11.1.1) (2025-03-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update external fixes ([#1075](https://github.com/adobe/helix-shared/issues/1075)) ([d1fa8e7](https://github.com/adobe/helix-shared/commit/d1fa8e75e929d20fb409022dc22041f5d3d5777f))
|
|
7
|
+
|
|
8
|
+
# [@adobe/helix-shared-config-v11.1.0](https://github.com/adobe/helix-shared/compare/@adobe/helix-shared-config-v11.0.15...@adobe/helix-shared-config-v11.1.0) (2025-02-22)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* add type to validation error ([#1065](https://github.com/adobe/helix-shared/issues/1065)) ([ae0b8a9](https://github.com/adobe/helix-shared/commit/ae0b8a9cc9b0380aa202c877080d755f7913322f))
|
|
14
|
+
|
|
1
15
|
# [@adobe/helix-shared-config-v11.0.15](https://github.com/adobe/helix-shared/compare/@adobe/helix-shared-config-v11.0.14...@adobe/helix-shared-config-v11.0.15) (2025-01-20)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-shared-config",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.1.1",
|
|
4
4
|
"description": "Shared modules of the Helix Project - config",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"cookie": "1.0.2",
|
|
46
46
|
"fs-extra": "11.3.0",
|
|
47
47
|
"ignore": "7.0.3",
|
|
48
|
-
"lru-cache": "11.0
|
|
48
|
+
"lru-cache": "11.1.0",
|
|
49
49
|
"yaml": "2.7.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
package/src/IndexConfig.js
CHANGED
package/src/MountConfig.js
CHANGED
|
@@ -27,12 +27,14 @@ export class SchemaDerivedConfig extends BaseConfig {
|
|
|
27
27
|
*/
|
|
28
28
|
constructor({
|
|
29
29
|
filename,
|
|
30
|
+
type,
|
|
30
31
|
schemas,
|
|
31
32
|
handlers,
|
|
32
33
|
}) {
|
|
33
34
|
super(filename);
|
|
34
35
|
|
|
35
36
|
this._content = null;
|
|
37
|
+
this._type = type;
|
|
36
38
|
|
|
37
39
|
// ensure that sub classes don't accidentally override this properties.
|
|
38
40
|
Object.defineProperties(this, {
|
|
@@ -67,7 +69,7 @@ export class SchemaDerivedConfig extends BaseConfig {
|
|
|
67
69
|
if (res) {
|
|
68
70
|
return res;
|
|
69
71
|
}
|
|
70
|
-
throw new ValidationError(ajv.errorsText(), ajv.errors);
|
|
72
|
+
throw new ValidationError(this._type, ajv.errorsText(), ajv.errors);
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
/**
|
package/src/SitemapConfig.js
CHANGED
package/src/ValidationError.js
CHANGED
|
@@ -13,13 +13,14 @@
|
|
|
13
13
|
|
|
14
14
|
export class ValidationError extends Error {
|
|
15
15
|
constructor(
|
|
16
|
+
type,
|
|
16
17
|
msg,
|
|
17
18
|
errors = [],
|
|
18
19
|
mapError = ValidationError.mapError,
|
|
19
20
|
prettyname = ValidationError.prettyname,
|
|
20
21
|
) {
|
|
21
22
|
const detail = errors.map((e) => mapError(e, prettyname)).join('\n');
|
|
22
|
-
super(`Invalid configuration:
|
|
23
|
+
super(`Invalid ${type} configuration:
|
|
23
24
|
${detail}
|
|
24
25
|
|
|
25
26
|
${msg}`);
|