@adobe/helix-config-storage 2.13.5 → 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 +14 -0
- package/package.json +5 -5
- package/src/config-store.js +22 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
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
|
+
|
|
8
|
+
## [2.13.6](https://github.com/adobe/helix-config-storage/compare/v2.13.5...v2.13.6) (2026-04-08)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update dependency @adobe/helix-shared-process-queue to v3.1.8 ([#246](https://github.com/adobe/helix-config-storage/issues/246)) ([c195e67](https://github.com/adobe/helix-config-storage/commit/c195e674a39faa9cc99bc8bcf4ac3de5f034fed2))
|
|
14
|
+
|
|
1
15
|
## [2.13.5](https://github.com/adobe/helix-config-storage/compare/v2.13.4...v2.13.5) (2026-04-06)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-config-storage",
|
|
3
|
-
"version": "2.
|
|
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.
|
|
40
|
-
"@eslint/config-helpers": "0.5.
|
|
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.
|
|
54
|
+
"nock": "14.0.12",
|
|
55
55
|
"semantic-release": "25.0.3",
|
|
56
56
|
"xml2js": "0.6.2"
|
|
57
57
|
},
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@adobe/fetch": "^4.2.0",
|
|
64
64
|
"@adobe/helix-shared-config": "^11.1.4",
|
|
65
65
|
"@adobe/helix-shared-git": "^3.0.18",
|
|
66
|
-
"@adobe/helix-shared-process-queue": "3.1.
|
|
66
|
+
"@adobe/helix-shared-process-queue": "3.1.8",
|
|
67
67
|
"@adobe/helix-shared-storage": "^1.4.0",
|
|
68
68
|
"@adobe/helix-shared-string": "^2.1.0",
|
|
69
69
|
"@adobe/helix-shared-utils": "^3.0.2",
|
package/src/config-store.js
CHANGED
|
@@ -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
|
|
217
|
+
const fileName = siteKey.split('/').pop();
|
|
218
|
+
const name = fileName.substring(0, fileName.length - 5);
|
|
200
219
|
return {
|
|
201
|
-
path:
|
|
202
|
-
name
|
|
220
|
+
path: this.formatSitePath(name),
|
|
221
|
+
name,
|
|
203
222
|
};
|
|
204
223
|
}
|
|
205
224
|
return null;
|