@adobe/helix-config 5.12.0 → 5.13.1
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 +3 -3
- package/src/SitemapIndexConfig.js +28 -0
- package/src/config-view.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [5.13.1](https://github.com/adobe/helix-config/compare/v5.13.0...v5.13.1) (2026-08-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* remove node-only helix-shared-config dependency ([#401](https://github.com/adobe/helix-config/issues/401)) ([2e9fa1d](https://github.com/adobe/helix-config/commit/2e9fa1d85e762861e277762102986a83f4eae320)), closes [#399](https://github.com/adobe/helix-config/issues/399)
|
|
7
|
+
|
|
8
|
+
# [5.13.0](https://github.com/adobe/helix-config/compare/v5.12.0...v5.13.0) (2026-08-13)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* include content source to pipeine scope ([#400](https://github.com/adobe/helix-config/issues/400)) ([f29e790](https://github.com/adobe/helix-config/commit/f29e790146ab9333ec13cb612935c23d06504ee4))
|
|
14
|
+
|
|
1
15
|
# [5.12.0](https://github.com/adobe/helix-config/compare/v5.11.0...v5.12.0) (2026-08-13)
|
|
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.13.1",
|
|
4
4
|
"description": "Helix Config",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"*.cjs": "eslint"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@adobe/helix-shared-config": "11.2.0",
|
|
59
58
|
"@adobe/helix-shared-server-timing": "1.0.0",
|
|
60
|
-
"@adobe/helix-shared-utils": "3.0.2"
|
|
59
|
+
"@adobe/helix-shared-utils": "3.0.2",
|
|
60
|
+
"yaml": "2.9.0"
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
import YAML from 'yaml';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Parses the `index` list from a `sitemap.yaml` source.
|
|
16
|
+
*
|
|
17
|
+
* Note: this is a lightweight, local replacement for `SitemapConfig` from
|
|
18
|
+
* `@adobe/helix-shared-config`, which cannot be used here because its base
|
|
19
|
+
* class imports node builtins (`fs`, `path`) that are not available in a
|
|
20
|
+
* Cloudflare Worker.
|
|
21
|
+
*
|
|
22
|
+
* @param {string} source the `sitemap.yaml` source
|
|
23
|
+
* @returns {string[]|undefined} the sitemap index list, or `undefined` if not configured
|
|
24
|
+
*/
|
|
25
|
+
export function parseSitemapIndex(source) {
|
|
26
|
+
const cfg = YAML.parse(source);
|
|
27
|
+
return Array.isArray(cfg?.index) ? cfg.index : undefined;
|
|
28
|
+
}
|
package/src/config-view.js
CHANGED
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
import { SitemapConfig } from '@adobe/helix-shared-config';
|
|
13
12
|
import { computeSurrogateKey } from '@adobe/helix-shared-utils';
|
|
14
13
|
// eslint-disable-next-line import/no-unresolved
|
|
15
14
|
import { PipelineResponse } from './PipelineResponse.js';
|
|
@@ -24,6 +23,7 @@ import {
|
|
|
24
23
|
} from './utils.js';
|
|
25
24
|
import { ConfigObject } from './config-object.js';
|
|
26
25
|
import { ModifiersConfig } from './ModifiersConfig.js';
|
|
26
|
+
import { parseSitemapIndex } from './SitemapIndexConfig.js';
|
|
27
27
|
import { StatusCodeError } from './status-code-error.js';
|
|
28
28
|
|
|
29
29
|
/**
|
|
@@ -226,8 +226,7 @@ async function fetchSitemapIndex(ctx, rso, config) {
|
|
|
226
226
|
const sitemap = new ConfigObject();
|
|
227
227
|
if (res.body) {
|
|
228
228
|
try {
|
|
229
|
-
|
|
230
|
-
sitemap.index = sitemapConfig.index;
|
|
229
|
+
sitemap.index = parseSitemapIndex(res.body);
|
|
231
230
|
sitemap.updateLastModified(res.headers);
|
|
232
231
|
} catch (e) {
|
|
233
232
|
ctx.log.warn(`[${rso.org}/${rso.site}] Unable to process ${key}: ${e.message}`);
|
|
@@ -794,6 +793,7 @@ export async function getConfigResponse(ctx, opts) {
|
|
|
794
793
|
repo: config.code.repo,
|
|
795
794
|
...rso,
|
|
796
795
|
contentBusId: config.content.contentBusId,
|
|
796
|
+
contentSource: config.content.source,
|
|
797
797
|
headers: config.headers,
|
|
798
798
|
head: config.head,
|
|
799
799
|
metadata: config.metadata,
|