@adobe/helix-html-pipeline 1.8.1 → 1.8.3
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/html-pipe.js +3 -0
- package/src/json-pipe.js +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.8.3](https://github.com/adobe/helix-html-pipeline/compare/v1.8.2...v1.8.3) (2022-10-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **html:** do not skip custom headers for 3xx responses (json) ([396f3f4](https://github.com/adobe/helix-html-pipeline/commit/396f3f457c9acec852d51e427b1ca16a367b7bb3)), closes [#153](https://github.com/adobe/helix-html-pipeline/issues/153)
|
|
7
|
+
|
|
8
|
+
## [1.8.2](https://github.com/adobe/helix-html-pipeline/compare/v1.8.1...v1.8.2) (2022-10-05)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update dependency @adobe/helix-markdown-support to v5.0.10 ([dbfcbe2](https://github.com/adobe/helix-html-pipeline/commit/dbfcbe2ba0b6a91ff7f74914abbaf6f72a08c097))
|
|
14
|
+
|
|
1
15
|
## [1.8.1](https://github.com/adobe/helix-html-pipeline/compare/v1.8.0...v1.8.1) (2022-09-28)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-html-pipeline",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.3",
|
|
4
4
|
"description": "Helix HTML Pipeline",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"loader": "esmock"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@adobe/helix-markdown-support": "5.0.
|
|
32
|
+
"@adobe/helix-markdown-support": "5.0.10",
|
|
33
33
|
"@adobe/helix-shared-utils": "2.1.0",
|
|
34
34
|
"github-slugger": "1.4.0",
|
|
35
35
|
"hast-util-raw": "7.2.2",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"mdast-util-gfm-strikethrough": "1.0.1",
|
|
42
42
|
"mdast-util-gfm-table": "1.0.6",
|
|
43
43
|
"mdast-util-gfm-task-list-item": "1.0.1",
|
|
44
|
-
"mdast-util-to-hast": "12.2.
|
|
44
|
+
"mdast-util-to-hast": "12.2.4",
|
|
45
45
|
"mdast-util-to-string": "3.1.0",
|
|
46
46
|
"micromark-extension-gfm-footnote": "1.0.4",
|
|
47
47
|
"micromark-extension-gfm-strikethrough": "1.0.4",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"remark-parse": "10.0.1",
|
|
57
57
|
"strip-markdown": "5.0.0",
|
|
58
58
|
"unified": "10.1.2",
|
|
59
|
-
"unist-util-map": "3.1.
|
|
59
|
+
"unist-util-map": "3.1.2",
|
|
60
60
|
"unist-util-remove": "3.1.0",
|
|
61
61
|
"unist-util-remove-position": "4.0.1",
|
|
62
62
|
"unist-util-select": "4.0.1",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"eslint-import-resolver-exports": "1.0.0-beta.3",
|
|
74
74
|
"eslint-plugin-header": "3.1.1",
|
|
75
75
|
"eslint-plugin-import": "2.26.0",
|
|
76
|
-
"esmock": "2.0.
|
|
76
|
+
"esmock": "2.0.4",
|
|
77
77
|
"husky": "8.0.1",
|
|
78
78
|
"js-yaml": "4.1.0",
|
|
79
79
|
"jsdom": "20.0.0",
|
package/src/html-pipe.js
CHANGED
|
@@ -80,6 +80,9 @@ export async function htmlPipe(state, req) {
|
|
|
80
80
|
// if content loading produced an error, we're done.
|
|
81
81
|
log.error(`error running pipeline: ${res.status} ${res.error}`);
|
|
82
82
|
res.headers.set('x-error', cleanupHeaderValue(res.error));
|
|
83
|
+
if (res.status < 500) {
|
|
84
|
+
await setCustomResponseHeaders(state, req, res);
|
|
85
|
+
}
|
|
83
86
|
return res;
|
|
84
87
|
}
|
|
85
88
|
|
package/src/json-pipe.js
CHANGED
|
@@ -89,6 +89,10 @@ export async function jsonPipe(state, req) {
|
|
|
89
89
|
|
|
90
90
|
// if still not found, return status
|
|
91
91
|
if (dataResponse.status !== 200) {
|
|
92
|
+
if (dataResponse.status < 500) {
|
|
93
|
+
await fetchMetadata(state, req, dataResponse);
|
|
94
|
+
await setCustomResponseHeaders(state, req, dataResponse);
|
|
95
|
+
}
|
|
92
96
|
return dataResponse;
|
|
93
97
|
}
|
|
94
98
|
const data = dataResponse.body;
|