@adobe/helix-config 5.7.0 → 5.8.0

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 CHANGED
@@ -1,3 +1,10 @@
1
+ # [5.8.0](https://github.com/adobe/helix-config/compare/v5.7.0...v5.8.0) (2025-12-17)
2
+
3
+
4
+ ### Features
5
+
6
+ * include code bus sidekick in admin config ([#345](https://github.com/adobe/helix-config/issues/345)) ([6837ece](https://github.com/adobe/helix-config/commit/6837ece3169bc0d4863dd796e49b493fa1933859))
7
+
1
8
  # [5.7.0](https://github.com/adobe/helix-config/compare/v5.6.11...v5.7.0) (2025-11-11)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-config",
3
- "version": "5.7.0",
3
+ "version": "5.8.0",
4
4
  "description": "Helix Config",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -35,20 +35,20 @@
35
35
  "reporter-options": "configFile=.mocha-multi.json"
36
36
  },
37
37
  "devDependencies": {
38
- "@adobe/eslint-config-helix": "3.0.13",
39
- "@eslint/config-helpers": "0.4.1",
38
+ "@adobe/eslint-config-helix": "3.0.15",
39
+ "@eslint/config-helpers": "0.5.0",
40
40
  "@semantic-release/changelog": "6.0.3",
41
41
  "@semantic-release/git": "10.0.1",
42
- "@semantic-release/npm": "13.1.1",
42
+ "@semantic-release/npm": "13.1.2",
43
43
  "c8": "10.1.3",
44
44
  "eslint": "9.4.0",
45
45
  "husky": "9.1.7",
46
46
  "junit-report-builder": "5.1.1",
47
- "lint-staged": "16.2.6",
48
- "mocha": "11.7.4",
47
+ "lint-staged": "16.2.7",
48
+ "mocha": "11.7.5",
49
49
  "mocha-multi-reporters": "1.5.1",
50
50
  "mocha-suppress-logs": "0.6.0",
51
- "semantic-release": "25.0.1"
51
+ "semantic-release": "25.0.2"
52
52
  },
53
53
  "lint-staged": {
54
54
  "*.js": "eslint",
@@ -243,6 +243,20 @@ async function loadHeadHtml(ctx, config, ref) {
243
243
  return {};
244
244
  }
245
245
 
246
+ async function loadSidekickConfig(ctx, config) {
247
+ const key = `${config.code.owner}/${config.code.repo}/main/tools/sidekick/config.json`;
248
+ const res = await ctx.loader.getObject(HELIX_CODE_BUS, key);
249
+ if (res.body) {
250
+ const sidekick = new ConfigObject();
251
+ sidekick.data = JSON.parse(res.body);
252
+ sidekick.updateLastModified(res.headers);
253
+ // remove deprecated properties
254
+ delete sidekick.data.extends;
255
+ return sidekick;
256
+ }
257
+ return {};
258
+ }
259
+
246
260
  function retainProperty(obj, prop) {
247
261
  if (!obj || Array.isArray(obj)) {
248
262
  return;
@@ -338,10 +352,15 @@ async function resolveConfig(ctx, rso, scope) {
338
352
  }
339
353
  }
340
354
  if (scope === SCOPE_PIPELINE || scope === SCOPE_RAW || scope === SCOPE_DELIVERY) {
341
- // although not used in delivery, load in order to set correct last-modified
355
+ // although not used in raw, or delivery, load in order to set correct last-modified
342
356
  ctx.timer?.update('head.html');
343
357
  config.head = await loadHeadHtml(ctx, config, rso.ref);
344
358
  }
359
+ if (scope === SCOPE_ADMIN || scope === SCOPE_RAW) {
360
+ // although not used in raw, in order to set correct last-modified
361
+ ctx.timer?.update('sidekick.json');
362
+ site.sidekick = await loadSidekickConfig(ctx, config);
363
+ }
345
364
 
346
365
  return site;
347
366
  }
@@ -609,6 +628,7 @@ export async function getConfigResponse(ctx, opts) {
609
628
 
610
629
  // todo: improve
611
630
  siteConfig.updateLastModified(config.head);
631
+ siteConfig.updateLastModified(siteConfig.sidekick);
612
632
  siteConfig.updateLastModified(config.robots);
613
633
  siteConfig.updateLastModified(config.metadata?.preview);
614
634
  siteConfig.updateLastModified(config.metadata?.live);
@@ -650,6 +670,7 @@ export async function getConfigResponse(ctx, opts) {
650
670
  if (opts.scope === SCOPE_ADMIN) {
651
671
  const adminConfig = {
652
672
  ...rso,
673
+ sidekick: siteConfig.sidekick?.data,
653
674
  ...config,
654
675
  content: {
655
676
  ...config.content,