@adobe/helix-config-storage 2.10.9 → 2.12.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,17 @@
1
+ # [2.12.0](https://github.com/adobe/helix-config-storage/compare/v2.11.0...v2.12.0) (2026-03-11)
2
+
3
+
4
+ ### Features
5
+
6
+ * **config-store:** allow withListDetails to accept a callback function ([#230](https://github.com/adobe/helix-config-storage/issues/230)) ([fcde78a](https://github.com/adobe/helix-config-storage/commit/fcde78aa4b55fdf0072597527206967807251090))
7
+
8
+ # [2.11.0](https://github.com/adobe/helix-config-storage/compare/v2.10.9...v2.11.0) (2026-03-10)
9
+
10
+
11
+ ### Features
12
+
13
+ * **validation:** restrict cdn.prod.host to 2nd–4th level DNS names ([#229](https://github.com/adobe/helix-config-storage/issues/229)) ([f55ef5e](https://github.com/adobe/helix-config-storage/commit/f55ef5e91c6f3c03f0e4393874f187e202953e5f))
14
+
1
15
  ## [2.10.9](https://github.com/adobe/helix-config-storage/compare/v2.10.8...v2.10.9) (2026-03-02)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-config-storage",
3
- "version": "2.10.9",
3
+ "version": "2.12.0",
4
4
  "description": "Helix Config Storage",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -161,12 +161,19 @@ export class ConfigStore {
161
161
  }
162
162
 
163
163
  /**
164
- * shows the details of the config list, like the source and code urls.
165
- * @param v
164
+ * Controls the details included in config list entries.
165
+ * When `true`, each entry includes the `content` and `code` fields from the config.
166
+ * When a function, it is called with the full config object and its return value is
167
+ * merged into the list entry, allowing callers to select arbitrary fields.
168
+ * @param {boolean|function(Object): Object} v
166
169
  * @returns {ConfigStore}
167
170
  */
168
171
  withListDetails(v) {
169
- this.listDetails = v;
172
+ if (typeof v === 'function') {
173
+ this.listDetails = v;
174
+ } else {
175
+ this.listDetails = ({ code, content }) => ({ code, content });
176
+ }
170
177
  return this;
171
178
  }
172
179
 
@@ -201,9 +208,7 @@ export class ConfigStore {
201
208
  if (this.listDetails) {
202
209
  entries = await processQueue(entries, async (entry) => {
203
210
  const json = JSON.parse(await storage.get(`/orgs/${this.org}/${this.type}/${entry.name}.json`));
204
- entry.content = json.content;
205
- entry.code = json.code;
206
- return entry;
211
+ return Object.assign(entry, this.listDetails(json));
207
212
  });
208
213
  }
209
214
  return {
@@ -11,7 +11,8 @@
11
11
  },
12
12
  "host": {
13
13
  "description": "production host",
14
- "type": "string"
14
+ "type": "string",
15
+ "pattern": "^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.){1,3}[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$"
15
16
  },
16
17
  "route": {
17
18
  "description": "Routes on the CDN that are rendered with Franklin",
@@ -11,7 +11,8 @@
11
11
  },
12
12
  "host": {
13
13
  "description": "production host",
14
- "type": "string"
14
+ "type": "string",
15
+ "pattern": "^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.){1,3}[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$"
15
16
  },
16
17
  "route": {
17
18
  "description": "Routes on the CDN that are rendered with Franklin",
@@ -11,7 +11,8 @@
11
11
  },
12
12
  "host": {
13
13
  "description": "production host",
14
- "type": "string"
14
+ "type": "string",
15
+ "pattern": "^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.){1,3}[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$"
15
16
  },
16
17
  "route": {
17
18
  "description": "Routes on the CDN that are rendered with Franklin",
@@ -12,7 +12,8 @@
12
12
  },
13
13
  "host": {
14
14
  "description": "production host",
15
- "type": "string"
15
+ "type": "string",
16
+ "pattern": "^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.){1,3}[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$"
16
17
  },
17
18
  "route": {
18
19
  "description": "Routes on the CDN that are rendered with Franklin",
@@ -11,7 +11,8 @@
11
11
  },
12
12
  "host": {
13
13
  "description": "production host",
14
- "type": "string"
14
+ "type": "string",
15
+ "pattern": "^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.){1,3}[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$"
15
16
  },
16
17
  "envId": {
17
18
  "description": "environment id",
@@ -28,7 +28,8 @@
28
28
  "properties": {
29
29
  "host": {
30
30
  "description": "production host",
31
- "type": "string"
31
+ "type": "string",
32
+ "pattern": "^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.){1,3}[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$"
32
33
  }
33
34
  },
34
35
  "required": [