@adobe/helix-config 5.9.2 → 5.9.4
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/.nycrc.json +3 -3
- package/CHANGELOG.md +14 -0
- package/package.json +3 -3
- package/src/config-legacy.js +22 -3
package/.nycrc.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [5.9.4](https://github.com/adobe/helix-config/compare/v5.9.3...v5.9.4) (2026-03-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* read head from branch code ([#361](https://github.com/adobe/helix-config/issues/361)) ([64a357d](https://github.com/adobe/helix-config/commit/64a357d41226a646c75af0d75aff464f58f4737b))
|
|
7
|
+
|
|
8
|
+
## [5.9.3](https://github.com/adobe/helix-config/compare/v5.9.2...v5.9.3) (2026-03-04)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* read helix-config from main ([#360](https://github.com/adobe/helix-config/issues/360)) ([0f976ae](https://github.com/adobe/helix-config/commit/0f976aedd9ea70facc09268e2293caefe32a059a))
|
|
14
|
+
|
|
1
15
|
## [5.9.2](https://github.com/adobe/helix-config/compare/v5.9.1...v5.9.2) (2026-02-17)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-config",
|
|
3
|
-
"version": "5.9.
|
|
3
|
+
"version": "5.9.4",
|
|
4
4
|
"description": "Helix Config",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"reporter-options": "configFile=.mocha-multi.json"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@adobe/eslint-config-helix": "3.0.
|
|
38
|
+
"@adobe/eslint-config-helix": "3.0.21",
|
|
39
39
|
"@eslint/config-helpers": "0.5.2",
|
|
40
40
|
"@semantic-release/changelog": "6.0.3",
|
|
41
41
|
"@semantic-release/git": "10.0.1",
|
|
42
|
-
"@semantic-release/npm": "13.1.
|
|
42
|
+
"@semantic-release/npm": "13.1.4",
|
|
43
43
|
"c8": "10.1.3",
|
|
44
44
|
"eslint": "9.4.0",
|
|
45
45
|
"husky": "9.1.7",
|
package/src/config-legacy.js
CHANGED
|
@@ -18,6 +18,24 @@ import { prune, toArray } from './utils.js';
|
|
|
18
18
|
|
|
19
19
|
const HELIX_CODE_BUS = 'helix-code-bus';
|
|
20
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Retrieves the head.html from the code bus
|
|
23
|
+
* @param ctx
|
|
24
|
+
* @param rso
|
|
25
|
+
* @returns {Promise<ConfigObject|{}>}
|
|
26
|
+
*/
|
|
27
|
+
async function fetchHeadHtml(ctx, rso) {
|
|
28
|
+
const key = `${rso.org}/${rso.site}/${rso.ref}/head.html`;
|
|
29
|
+
const res = await ctx.loader.getObject(HELIX_CODE_BUS, key);
|
|
30
|
+
if (res.body) {
|
|
31
|
+
const head = new ConfigObject();
|
|
32
|
+
head.html = res.body;
|
|
33
|
+
head.updateLastModified(res.headers);
|
|
34
|
+
return head;
|
|
35
|
+
}
|
|
36
|
+
return {};
|
|
37
|
+
}
|
|
38
|
+
|
|
21
39
|
/**
|
|
22
40
|
* Retrieves the helix-config.json which is an aggregate from fstab.yaml and head.html.
|
|
23
41
|
*
|
|
@@ -26,7 +44,7 @@ const HELIX_CODE_BUS = 'helix-code-bus';
|
|
|
26
44
|
* @returns {Promise<ConfigObject|null>} the helix-config or {@code null} if optional and not found.
|
|
27
45
|
*/
|
|
28
46
|
async function fetchHelixConfig(ctx, rso) {
|
|
29
|
-
const key = `${rso.org}/${rso.site}
|
|
47
|
+
const key = `${rso.org}/${rso.site}/main/helix-config.json`;
|
|
30
48
|
const res = await ctx.loader.getObject(HELIX_CODE_BUS, key);
|
|
31
49
|
if (!res.body) {
|
|
32
50
|
return null;
|
|
@@ -128,6 +146,8 @@ export async function resolveLegacyConfig(ctx, rso, scope) {
|
|
|
128
146
|
} else {
|
|
129
147
|
delete source.contentBusId;
|
|
130
148
|
}
|
|
149
|
+
|
|
150
|
+
const head = await fetchHeadHtml(ctx, rso);
|
|
131
151
|
const config = {
|
|
132
152
|
version: 1,
|
|
133
153
|
legacy: true,
|
|
@@ -144,8 +164,7 @@ export async function resolveLegacyConfig(ctx, rso, scope) {
|
|
|
144
164
|
source,
|
|
145
165
|
},
|
|
146
166
|
folders: fstab.folders ?? {},
|
|
147
|
-
|
|
148
|
-
head: helixConfig.head?.data ?? helixConfig.head ?? {},
|
|
167
|
+
head,
|
|
149
168
|
};
|
|
150
169
|
cfg.data = config;
|
|
151
170
|
ctx.timer?.update('legacy-config-all');
|