@adobe/helix-config 5.9.3 → 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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/config-legacy.js +21 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
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
|
+
|
|
1
8
|
## [5.9.3](https://github.com/adobe/helix-config/compare/v5.9.2...v5.9.3) (2026-03-04)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
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
|
*
|
|
@@ -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');
|