@adobe/helix-html-pipeline 6.12.6 → 6.12.8
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 +4 -4
- package/src/steps/fetch-404.js +18 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [6.12.8](https://github.com/adobe/helix-html-pipeline/compare/v6.12.7...v6.12.8) (2024-06-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add unmapped surrogate key for 404.html ([#633](https://github.com/adobe/helix-html-pipeline/issues/633)) ([8d36aa2](https://github.com/adobe/helix-html-pipeline/commit/8d36aa286330af8be2dfbabb28fce2db8b479b30)), closes [#632](https://github.com/adobe/helix-html-pipeline/issues/632)
|
|
7
|
+
|
|
8
|
+
## [6.12.7](https://github.com/adobe/helix-html-pipeline/compare/v6.12.6...v6.12.7) (2024-06-21)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* contentbus-id as surrogate key for 404 response ([e0ac46c](https://github.com/adobe/helix-html-pipeline/commit/e0ac46c0a0ac095bdfa69bf3bd151aaee2ee8224))
|
|
14
|
+
|
|
1
15
|
## [6.12.6](https://github.com/adobe/helix-html-pipeline/compare/v6.12.5...v6.12.6) (2024-06-19)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-html-pipeline",
|
|
3
|
-
"version": "6.12.
|
|
3
|
+
"version": "6.12.8",
|
|
4
4
|
"description": "Helix HTML Pipeline",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@adobe/mdast-util-gridtables": "4.0.6",
|
|
49
49
|
"@adobe/remark-gridtables": "3.0.6",
|
|
50
50
|
"github-slugger": "2.0.0",
|
|
51
|
-
"hast-util-raw": "9.0.
|
|
51
|
+
"hast-util-raw": "9.0.4",
|
|
52
52
|
"hast-util-select": "6.0.2",
|
|
53
53
|
"hast-util-to-html": "9.0.1",
|
|
54
54
|
"hast-util-to-string": "3.0.0",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"rehype-parse": "9.0.0",
|
|
62
62
|
"remark-parse": "11.0.0",
|
|
63
63
|
"strip-markdown": "6.0.0",
|
|
64
|
-
"unified": "11.0.
|
|
64
|
+
"unified": "11.0.5",
|
|
65
65
|
"unist-util-map": "4.0.0",
|
|
66
66
|
"unist-util-remove": "4.0.0",
|
|
67
67
|
"unist-util-remove-position": "5.0.0",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"eslint-import-resolver-exports": "1.0.0-beta.5",
|
|
81
81
|
"eslint-plugin-header": "3.1.1",
|
|
82
82
|
"eslint-plugin-import": "2.29.1",
|
|
83
|
-
"esmock": "2.6.
|
|
83
|
+
"esmock": "2.6.6",
|
|
84
84
|
"husky": "9.0.11",
|
|
85
85
|
"js-yaml": "4.1.0",
|
|
86
86
|
"jsdom": "24.1.0",
|
package/src/steps/fetch-404.js
CHANGED
|
@@ -21,7 +21,9 @@ import { getPathKey } from './set-x-surrogate-key-header.js';
|
|
|
21
21
|
* @returns {Promise<void>}
|
|
22
22
|
*/
|
|
23
23
|
export default async function fetch404(state, req, res) {
|
|
24
|
-
const {
|
|
24
|
+
const {
|
|
25
|
+
owner, repo, ref, contentBusId,
|
|
26
|
+
} = state;
|
|
25
27
|
const ret = await state.s3Loader.getObject('helix-code-bus', `${owner}/${repo}/${ref}/404.html`);
|
|
26
28
|
if (ret.status === 200) {
|
|
27
29
|
// override last-modified if source-last-modified is set
|
|
@@ -38,5 +40,19 @@ export default async function fetch404(state, req, res) {
|
|
|
38
40
|
|
|
39
41
|
// set 404 keys in any case
|
|
40
42
|
const pathKey = await getPathKey(state);
|
|
41
|
-
|
|
43
|
+
const keys = [
|
|
44
|
+
pathKey,
|
|
45
|
+
contentBusId,
|
|
46
|
+
`${ref}--${repo}--${owner}_404`,
|
|
47
|
+
`${ref}--${repo}--${owner}_code`,
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
if (state.info.unmappedPath) {
|
|
51
|
+
keys.push(await getPathKey({
|
|
52
|
+
contentBusId,
|
|
53
|
+
info: { path: state.info.unmappedPath },
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
res.headers.set('x-surrogate-key', keys.join(' '));
|
|
42
58
|
}
|