@adobe/helix-config 5.15.1 → 5.15.3

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.3](https://github.com/adobe/helix-config/compare/v5.15.2...v5.15.3) (2026-09-24)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **config:** load metadata in parallel ([#419](https://github.com/adobe/helix-config/issues/419)) ([ad7b239](https://github.com/adobe/helix-config/commit/ad7b2390923208e04265195ec8f147d01517a97e))
7
+
8
+ ## [5.15.2](https://github.com/adobe/helix-config/compare/v5.15.1...v5.15.2) (2026-09-21)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * revert config-view changes to v5.14.0 state ([#413](https://github.com/adobe/helix-config/issues/413)) ([a59fc14](https://github.com/adobe/helix-config/commit/a59fc141603db4f713051b5a14fa456620293bb4)), closes [#410](https://github.com/adobe/helix-config/issues/410) [#412](https://github.com/adobe/helix-config/issues/412)
14
+
1
15
  ## [5.15.1](https://github.com/adobe/helix-config/compare/v5.15.0...v5.15.1) (2026-09-21)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-config",
3
- "version": "5.15.1",
3
+ "version": "5.15.3",
4
4
  "description": "Helix Config",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -35,7 +35,7 @@
35
35
  "reporter-options": "configFile=.mocha-multi.json"
36
36
  },
37
37
  "devDependencies": {
38
- "@adobe/eslint-config-helix": "3.0.31",
38
+ "@adobe/eslint-config-helix": "3.0.32",
39
39
  "@eslint/config-helpers": "0.7.0",
40
40
  "@semantic-release/changelog": "7.0.0",
41
41
  "@semantic-release/git": "11.0.1",
@@ -45,8 +45,8 @@
45
45
  "husky": "9.1.7",
46
46
  "junit-report-builder": "5.1.2",
47
47
  "lint-staged": "17.4.1",
48
- "mocha": "11.8.0",
49
- "mocha-multi-reporters": "1.5.1",
48
+ "mocha": "12.0.0",
49
+ "mocha-multi-reporters": "1.5.2",
50
50
  "mocha-suppress-logs": "0.6.0",
51
51
  "semantic-release": "25.0.9"
52
52
  },
@@ -55,6 +55,7 @@
55
55
  "*.cjs": "eslint"
56
56
  },
57
57
  "dependencies": {
58
+ "@adobe/helix-shared-process-queue": "3.1.9",
58
59
  "@adobe/helix-shared-server-timing": "1.0.0",
59
60
  "@adobe/helix-shared-utils": "3.0.2",
60
61
  "yaml": "2.9.0"
@@ -10,7 +10,7 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
  import { computeSurrogateKey } from '@adobe/helix-shared-utils';
13
- // eslint-disable-next-line import/no-unresolved
13
+ import processQueue from '@adobe/helix-shared-process-queue';
14
14
  import { PipelineResponse } from './PipelineResponse.js';
15
15
  import {
16
16
  SCOPE_ADMIN,
@@ -251,18 +251,32 @@ async function loadMetadata(ctx, config, partition) {
251
251
  // generate the metadata-all.json first
252
252
  const metadataConfig = new ConfigObject();
253
253
  const metadata = [];
254
- for (const path of paths) {
254
+
255
+ // remember the order of entries
256
+ const input = paths.map((path, index) => ({ index, path }));
257
+ const output = await processQueue(input, async ({ index, path }) => {
255
258
  const key = `${config.content.contentBusId}/${partition}${path}`;
256
259
  // eslint-disable-next-line no-await-in-loop
257
260
  const res = await ctx.loader.getObject(HELIX_CONTENT_BUS, key);
258
261
  if (res.body) {
259
262
  const json = res.json();
263
+ const ret = { index, headers: res.headers };
264
+
260
265
  const data = Array.isArray(json.data) ? json.data : json.default?.data;
261
266
  if (data) {
262
- metadata.push(...data);
267
+ ret.data = data;
263
268
  }
269
+ return ret;
270
+ }
271
+ return undefined;
272
+ }, 32);
273
+
274
+ output.sort(({ index: i }, { index: j }) => i - j);
275
+ for (const { data, headers } of output) {
276
+ if (data) {
277
+ metadata.push(...data);
264
278
  }
265
- metadataConfig.updateLastModified(res.headers);
279
+ metadataConfig.updateLastModified(headers);
266
280
  }
267
281
  if (!metadata.length) {
268
282
  return {};
@@ -337,11 +351,9 @@ async function loadProfile(ctx, rso, name) {
337
351
  * @param ctx
338
352
  * @param {RSO} rso
339
353
  * @param {string} scope
340
- * @param {string} [partition] the partition to restrict to. if omitted or invalid,
341
- * all partitions are returned.
342
354
  * @return {Promise<ConfigObject|null>}
343
355
  */
344
- async function resolveConfig(ctx, rso, scope, partition) {
356
+ async function resolveConfig(ctx, rso, scope) {
345
357
  // try to load site config from config-bus
346
358
  const key = `orgs/${rso.org}/sites/${rso.site}.json`;
347
359
  ctx.timer?.update('load-config');
@@ -381,14 +393,10 @@ async function resolveConfig(ctx, rso, scope, partition) {
381
393
  const config = site.data;
382
394
  if (scope === SCOPE_PIPELINE) {
383
395
  ctx.timer?.update('metadata');
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;
396
+ config.metadata = {
397
+ preview: await loadMetadata(ctx, config, 'preview'),
398
+ live: await loadMetadata(ctx, config, 'live'),
399
+ };
392
400
  }
393
401
  if (scope === SCOPE_PIPELINE || scope === SCOPE_RAW) {
394
402
  if (!config.robots) {
@@ -650,7 +658,7 @@ function computeTrustedHosts(org, site, siteConfig) {
650
658
 
651
659
  export async function getConfigResponse(ctx, opts) {
652
660
  const {
653
- ref, site, org, scope, partition,
661
+ ref, site, org, scope,
654
662
  } = opts;
655
663
  if (!VALID_SCOPES.includes(scope)) {
656
664
  return new PipelineResponse('', {
@@ -664,7 +672,7 @@ export async function getConfigResponse(ctx, opts) {
664
672
  const rso = { ref, site, org };
665
673
  let siteConfig;
666
674
  try {
667
- siteConfig = await resolveConfig(ctx, rso, scope, partition);
675
+ siteConfig = await resolveConfig(ctx, rso, scope);
668
676
  } catch (e) {
669
677
  return new PipelineResponse('', {
670
678
  status: 502,
package/src/index.d.ts CHANGED
@@ -20,7 +20,6 @@ export declare class ConfigRequestOptions {
20
20
  org: string;
21
21
  site: string;
22
22
  ref: string;
23
- partition?: 'preview' | 'live';
24
23
  }
25
24
 
26
25
  export function getConfigResponse(ctx: ConfigContext, opts: ConfigRequestOptions): Promise<PipelineResponse>;