@adobe/helix-html-pipeline 5.12.5 → 5.12.7
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 +2 -2
- package/src/json-pipe.js +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [5.12.7](https://github.com/adobe/helix-html-pipeline/compare/v5.12.6...v5.12.7) (2024-09-27)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update dependency @adobe/helix-markdown-support to v7.1.6 ([9a6f227](https://github.com/adobe/helix-html-pipeline/commit/9a6f227fa3998be24cad2cec418177c99444b5d9))
|
|
7
|
+
|
|
8
|
+
## [5.12.6](https://github.com/adobe/helix-html-pipeline/compare/v5.12.5...v5.12.6) (2024-09-25)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* set code and content surrogate keys for json 404 ([#692](https://github.com/adobe/helix-html-pipeline/issues/692)) ([#698](https://github.com/adobe/helix-html-pipeline/issues/698)) ([d334099](https://github.com/adobe/helix-html-pipeline/commit/d334099f806eddcf84181a4c354de0e8b02ced0a)), closes [#688](https://github.com/adobe/helix-html-pipeline/issues/688)
|
|
14
|
+
|
|
1
15
|
## [5.12.5](https://github.com/adobe/helix-html-pipeline/compare/v5.12.4...v5.12.5) (2024-09-23)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-html-pipeline",
|
|
3
|
-
"version": "5.12.
|
|
3
|
+
"version": "5.12.7",
|
|
4
4
|
"description": "Helix HTML Pipeline",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"node": ">=16.x"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@adobe/helix-markdown-support": "7.1.
|
|
46
|
+
"@adobe/helix-markdown-support": "7.1.6",
|
|
47
47
|
"@adobe/helix-shared-utils": "3.0.2",
|
|
48
48
|
"@adobe/mdast-util-gridtables": "4.0.6",
|
|
49
49
|
"@adobe/remark-gridtables": "3.0.6",
|
package/src/json-pipe.js
CHANGED
|
@@ -87,7 +87,8 @@ async function fetchJsonContent(state, req, res) {
|
|
|
87
87
|
|
|
88
88
|
updateLastModified(state, res, extractLastModified(ret.headers));
|
|
89
89
|
} else {
|
|
90
|
-
|
|
90
|
+
// also add code surrogate key in case json is later added to code bus (#688)
|
|
91
|
+
state.content.sourceBus = 'code|content';
|
|
91
92
|
res.status = ret.status === 404 ? 404 : 502;
|
|
92
93
|
res.error = `failed to load ${state.info.resourcePath}: ${ret.status}`;
|
|
93
94
|
}
|
|
@@ -95,16 +96,15 @@ async function fetchJsonContent(state, req, res) {
|
|
|
95
96
|
|
|
96
97
|
async function computeSurrogateKeys(state) {
|
|
97
98
|
const keys = [];
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
: `${state.contentBusId}${state.info.path}`;
|
|
101
|
-
|
|
102
|
-
keys.push(await computeSurrogateKey(pathKey));
|
|
103
|
-
if (state.content?.sourceBus === 'content') {
|
|
104
|
-
keys.push(state.contentBusId);
|
|
105
|
-
} else {
|
|
99
|
+
if (state.content.sourceBus.includes('code')) {
|
|
100
|
+
keys.push(await computeSurrogateKey(`${state.ref}--${state.repo}--${state.owner}${state.info.path}`));
|
|
106
101
|
keys.push(`${state.ref}--${state.repo}--${state.owner}_code`);
|
|
107
102
|
}
|
|
103
|
+
if (state.content.sourceBus.includes('content')) {
|
|
104
|
+
keys.push(await computeSurrogateKey(`${state.contentBusId}${state.info.path}`));
|
|
105
|
+
keys.push(state.contentBusId);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
108
|
return keys;
|
|
109
109
|
}
|
|
110
110
|
|