@adobe/helix-config-storage 2.13.6 → 2.14.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
+ # [2.14.0](https://github.com/adobe/helix-config-storage/compare/v2.13.6...v2.14.0) (2026-04-23)
2
+
3
+
4
+ ### Features
5
+
6
+ * **config-store:** allow subclasses to customize list entry path ([#250](https://github.com/adobe/helix-config-storage/issues/250)) ([ab94778](https://github.com/adobe/helix-config-storage/commit/ab947788680f88e72181e581871d852cd50542c1))
7
+
1
8
  ## [2.13.6](https://github.com/adobe/helix-config-storage/compare/v2.13.5...v2.13.6) (2026-04-08)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-config-storage",
3
- "version": "2.13.6",
3
+ "version": "2.14.0",
4
4
  "description": "Helix Config Storage",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -36,8 +36,8 @@
36
36
  "reporter-options": "configFile=.mocha-multi.json"
37
37
  },
38
38
  "devDependencies": {
39
- "@adobe/eslint-config-helix": "3.0.24",
40
- "@eslint/config-helpers": "0.5.3",
39
+ "@adobe/eslint-config-helix": "3.0.25",
40
+ "@eslint/config-helpers": "0.5.4",
41
41
  "@semantic-release/changelog": "6.0.3",
42
42
  "@semantic-release/git": "10.0.1",
43
43
  "@semantic-release/npm": "13.1.5",
@@ -51,7 +51,7 @@
51
51
  "mocha": "11.7.5",
52
52
  "mocha-multi-reporters": "1.5.1",
53
53
  "mocha-suppress-logs": "0.6.0",
54
- "nock": "14.0.11",
54
+ "nock": "14.0.12",
55
55
  "semantic-release": "25.0.3",
56
56
  "xml2js": "0.6.2"
57
57
  },
@@ -189,6 +189,24 @@ export class ConfigStore {
189
189
  }
190
190
  }
191
191
 
192
+ /**
193
+ * Formats the `path` for a list entry. Subclasses can override to customize
194
+ * the path or return a fully qualified URL.
195
+ * @param {string} name the config name (without the `.json` suffix)
196
+ * @returns {string} the path for the entry
197
+ */
198
+ formatSitePath(name) {
199
+ return `/config/${this.org}/${this.type}/${name}.json`;
200
+ }
201
+
202
+ /**
203
+ * Lists all configs of this store's type for the org. Each entry's `path` is
204
+ * built via {@link ConfigStore#formatSitePath}. If `listDetails` is configured
205
+ * (see {@link ConfigStore#withListDetails}), each config is fetched and the
206
+ * selected fields are merged onto the entry.
207
+ * @param {UniversalContext} ctx
208
+ * @returns {Promise<object>} an object keyed by `this.type` with the entries array
209
+ */
192
210
  async #list(ctx) {
193
211
  const storage = HelixStorage.fromContext(ctx).configBus();
194
212
  const key = `orgs/${this.org}/${this.type}/`;
@@ -196,10 +214,11 @@ export class ConfigStore {
196
214
  let entries = list.map((entry) => {
197
215
  const siteKey = entry.key;
198
216
  if (siteKey.endsWith('.json')) {
199
- const name = siteKey.split('/').pop();
217
+ const fileName = siteKey.split('/').pop();
218
+ const name = fileName.substring(0, fileName.length - 5);
200
219
  return {
201
- path: `/config/${this.org}/${this.type}/${name}`,
202
- name: name.substring(0, name.length - 5),
220
+ path: this.formatSitePath(name),
221
+ name,
203
222
  };
204
223
  }
205
224
  return null;