@adobe/helix-config 5.13.1 → 5.15.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/.nycrc.json +3 -3
- package/CHANGELOG.md +14 -0
- package/package.json +6 -6
- package/src/config-view.js +15 -7
- package/src/index.d.ts +1 -0
package/.nycrc.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [5.15.0](https://github.com/adobe/helix-config/compare/v5.14.0...v5.15.0) (2026-09-18)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **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))
|
|
7
|
+
|
|
8
|
+
# [5.14.0](https://github.com/adobe/helix-config/compare/v5.13.1...v5.14.0) (2026-09-02)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* include IMS groups in roles ([#405](https://github.com/adobe/helix-config/issues/405)) ([e229fdb](https://github.com/adobe/helix-config/commit/e229fdb8bf850574192543b9ebd5879546a98a0f))
|
|
14
|
+
|
|
1
15
|
## [5.13.1](https://github.com/adobe/helix-config/compare/v5.13.0...v5.13.1) (2026-08-14)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-config",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.15.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.
|
|
38
|
+
"@adobe/eslint-config-helix": "3.0.31",
|
|
39
39
|
"@eslint/config-helpers": "0.7.0",
|
|
40
40
|
"@semantic-release/changelog": "7.0.0",
|
|
41
41
|
"@semantic-release/git": "11.0.1",
|
|
42
42
|
"@semantic-release/npm": "13.1.5",
|
|
43
43
|
"c8": "12.0.0",
|
|
44
|
-
"eslint": "9.
|
|
44
|
+
"eslint": "9.39.5",
|
|
45
45
|
"husky": "9.1.7",
|
|
46
46
|
"junit-report-builder": "5.1.2",
|
|
47
|
-
"lint-staged": "17.
|
|
48
|
-
"mocha": "11.
|
|
47
|
+
"lint-staged": "17.4.1",
|
|
48
|
+
"mocha": "11.8.0",
|
|
49
49
|
"mocha-multi-reporters": "1.5.1",
|
|
50
50
|
"mocha-suppress-logs": "0.6.0",
|
|
51
|
-
"semantic-release": "25.0.
|
|
51
|
+
"semantic-release": "25.0.9"
|
|
52
52
|
},
|
|
53
53
|
"lint-staged": {
|
|
54
54
|
"*.js": "eslint",
|
package/src/config-view.js
CHANGED
|
@@ -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,13 @@ 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
|
-
|
|
384
|
-
|
|
385
|
-
}
|
|
384
|
+
config.metadata = {};
|
|
385
|
+
if (partition !== 'live') {
|
|
386
|
+
config.metadata.preview = await loadMetadata(ctx, config, 'preview');
|
|
387
|
+
}
|
|
388
|
+
if (partition !== 'preview') {
|
|
389
|
+
config.metadata.live = await loadMetadata(ctx, config, 'live');
|
|
390
|
+
}
|
|
386
391
|
}
|
|
387
392
|
if (scope === SCOPE_PIPELINE || scope === SCOPE_RAW) {
|
|
388
393
|
if (!config.robots) {
|
|
@@ -561,6 +566,9 @@ async function computeSiteAdminRoles(ctx, siteConfig, admin, orgConfig, configGr
|
|
|
561
566
|
}
|
|
562
567
|
// add entry in list so that admin can purge the config when modified
|
|
563
568
|
users.add(`/${reference}`);
|
|
569
|
+
} else if (entry.indexOf('/') > 0) {
|
|
570
|
+
// ims group reference
|
|
571
|
+
users.add(entry);
|
|
564
572
|
}
|
|
565
573
|
}
|
|
566
574
|
roles[roleName] = Array.from(users);
|
|
@@ -641,7 +649,7 @@ function computeTrustedHosts(org, site, siteConfig) {
|
|
|
641
649
|
|
|
642
650
|
export async function getConfigResponse(ctx, opts) {
|
|
643
651
|
const {
|
|
644
|
-
ref, site, org, scope,
|
|
652
|
+
ref, site, org, scope, partition,
|
|
645
653
|
} = opts;
|
|
646
654
|
if (!VALID_SCOPES.includes(scope)) {
|
|
647
655
|
return new PipelineResponse('', {
|
|
@@ -655,7 +663,7 @@ export async function getConfigResponse(ctx, opts) {
|
|
|
655
663
|
const rso = { ref, site, org };
|
|
656
664
|
let siteConfig;
|
|
657
665
|
try {
|
|
658
|
-
siteConfig = await resolveConfig(ctx, rso, scope);
|
|
666
|
+
siteConfig = await resolveConfig(ctx, rso, scope, partition);
|
|
659
667
|
} catch (e) {
|
|
660
668
|
return new PipelineResponse('', {
|
|
661
669
|
status: 502,
|
package/src/index.d.ts
CHANGED