@adobe/helix-config 3.9.1 → 3.9.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
+ ## [3.9.3](https://github.com/adobe/helix-config/compare/v3.9.2...v3.9.3) (2024-07-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * trigger release ([404ad83](https://github.com/adobe/helix-config/commit/404ad83057921ad5ada86873696ab8e031c4c037))
7
+
8
+ ## [3.9.2](https://github.com/adobe/helix-config/compare/v3.9.1...v3.9.2) (2024-07-22)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * always load default profile ([01597e1](https://github.com/adobe/helix-config/commit/01597e1fefd09bac056123fb43f43b713e91044a)), closes [#138](https://github.com/adobe/helix-config/issues/138)
14
+
1
15
  ## [3.9.1](https://github.com/adobe/helix-config/compare/v3.9.0...v3.9.1) (2024-07-19)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-config",
3
- "version": "3.9.1",
3
+ "version": "3.9.3",
4
4
  "description": "Helix Config",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -43,11 +43,11 @@
43
43
  "@semantic-release/npm": "12.0.1",
44
44
  "c8": "10.1.2",
45
45
  "eslint": "8.57.0",
46
- "husky": "9.0.11",
47
- "json-schema-to-typescript": "14.1.0",
46
+ "husky": "9.1.1",
47
+ "json-schema-to-typescript": "15.0.0",
48
48
  "junit-report-builder": "3.2.1",
49
49
  "lint-staged": "15.2.7",
50
- "mocha": "10.6.0",
50
+ "mocha": "10.7.0",
51
51
  "mocha-multi-reporters": "1.5.1",
52
52
  "mocha-suppress-logs": "0.5.1",
53
53
  "nock": "13.5.4",
@@ -33,6 +33,7 @@ const ROOT_PROPERTIES = {
33
33
  extends: {},
34
34
  tokens: {},
35
35
  public: {},
36
+ groups: {},
36
37
  };
37
38
 
38
39
  const FORCED_TYPES = {
@@ -231,12 +231,16 @@ async function resolveConfig(ctx, rso, scope) {
231
231
  const site = res.json();
232
232
  let profile;
233
233
 
234
- if (site.extends?.profile) {
235
- const profileKey = `orgs/${rso.org}/profiles/${site.extends.profile}.json`;
236
- res = await ctx.loader.getObject(HELIX_CONFIG_BUS, profileKey);
237
- if (res.body) {
238
- profile = res.json();
239
- }
234
+ // always load default profile if available
235
+ if (!site.extends?.profile) {
236
+ site.extends = {
237
+ profile: 'default',
238
+ };
239
+ }
240
+ const profileKey = `orgs/${rso.org}/profiles/${site.extends.profile}.json`;
241
+ res = await ctx.loader.getObject(HELIX_CONFIG_BUS, profileKey);
242
+ if (res.body) {
243
+ profile = res.json();
240
244
  }
241
245
  const config = getMergedConfig(site, profile);
242
246
  if (scope === SCOPE_PIPELINE) {
@@ -218,8 +218,10 @@ export class ConfigStore {
218
218
  [this.type]: list.map((entry) => {
219
219
  const siteKey = entry.key;
220
220
  if (siteKey.endsWith('.json')) {
221
+ const name = siteKey.split('/').pop();
221
222
  return {
222
- name: siteKey.substring(0, siteKey.length - 5),
223
+ path: `/config/${this.org}/${this.type}/${name}`,
224
+ name: name.substring(0, name.length - 5),
223
225
  };
224
226
  }
225
227
  return null;