@adobe/helix-config 5.14.0 → 5.15.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 CHANGED
@@ -1,3 +1,17 @@
1
+ ## [5.15.1](https://github.com/adobe/helix-config/compare/v5.15.0...v5.15.1) (2026-09-21)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **config-view:** apply all configured metadata sources ([#412](https://github.com/adobe/helix-config/issues/412)) ([f8f5800](https://github.com/adobe/helix-config/commit/f8f580019465577a307104c1b4e2b660d6b23bb3))
7
+
8
+ # [5.15.0](https://github.com/adobe/helix-config/compare/v5.14.0...v5.15.0) (2026-09-18)
9
+
10
+
11
+ ### Features
12
+
13
+ * **config-view:** add partition option to restrict metadata ([#410](https://github.com/adobe/helix-config/issues/410)) ([7a3e729](https://github.com/adobe/helix-config/commit/7a3e72943cdfb9a20c1f2055abbe784e1c05cd4e))
14
+
1
15
  # [5.14.0](https://github.com/adobe/helix-config/compare/v5.13.1...v5.14.0) (2026-09-02)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-config",
3
- "version": "5.14.0",
3
+ "version": "5.15.1",
4
4
  "description": "Helix Config",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -44,7 +44,7 @@
44
44
  "eslint": "9.39.5",
45
45
  "husky": "9.1.7",
46
46
  "junit-report-builder": "5.1.2",
47
- "lint-staged": "17.3.0",
47
+ "lint-staged": "17.4.1",
48
48
  "mocha": "11.8.0",
49
49
  "mocha-multi-reporters": "1.5.1",
50
50
  "mocha-suppress-logs": "0.6.0",
@@ -337,9 +337,11 @@ async function loadProfile(ctx, rso, name) {
337
337
  * @param ctx
338
338
  * @param {RSO} rso
339
339
  * @param {string} scope
340
+ * @param {string} [partition] the partition to restrict to. if omitted or invalid,
341
+ * all partitions are returned.
340
342
  * @return {Promise<ConfigObject|null>}
341
343
  */
342
- async function resolveConfig(ctx, rso, scope) {
344
+ async function resolveConfig(ctx, rso, scope, partition) {
343
345
  // try to load site config from config-bus
344
346
  const key = `orgs/${rso.org}/sites/${rso.site}.json`;
345
347
  ctx.timer?.update('load-config');
@@ -379,10 +381,14 @@ async function resolveConfig(ctx, rso, scope) {
379
381
  const config = site.data;
380
382
  if (scope === SCOPE_PIPELINE) {
381
383
  ctx.timer?.update('metadata');
382
- config.metadata = {
383
- preview: await loadMetadata(ctx, config, 'preview'),
384
- live: await loadMetadata(ctx, config, 'live'),
385
- };
384
+ const metadata = {};
385
+ if (partition !== 'live') {
386
+ metadata.preview = await loadMetadata(ctx, config, 'preview');
387
+ }
388
+ if (partition !== 'preview') {
389
+ metadata.live = await loadMetadata(ctx, config, 'live');
390
+ }
391
+ config.metadata = metadata;
386
392
  }
387
393
  if (scope === SCOPE_PIPELINE || scope === SCOPE_RAW) {
388
394
  if (!config.robots) {
@@ -644,7 +650,7 @@ function computeTrustedHosts(org, site, siteConfig) {
644
650
 
645
651
  export async function getConfigResponse(ctx, opts) {
646
652
  const {
647
- ref, site, org, scope,
653
+ ref, site, org, scope, partition,
648
654
  } = opts;
649
655
  if (!VALID_SCOPES.includes(scope)) {
650
656
  return new PipelineResponse('', {
@@ -658,7 +664,7 @@ export async function getConfigResponse(ctx, opts) {
658
664
  const rso = { ref, site, org };
659
665
  let siteConfig;
660
666
  try {
661
- siteConfig = await resolveConfig(ctx, rso, scope);
667
+ siteConfig = await resolveConfig(ctx, rso, scope, partition);
662
668
  } catch (e) {
663
669
  return new PipelineResponse('', {
664
670
  status: 502,
package/src/index.d.ts CHANGED
@@ -20,6 +20,7 @@ export declare class ConfigRequestOptions {
20
20
  org: string;
21
21
  site: string;
22
22
  ref: string;
23
+ partition?: 'preview' | 'live';
23
24
  }
24
25
 
25
26
  export function getConfigResponse(ctx: ConfigContext, opts: ConfigRequestOptions): Promise<PipelineResponse>;