@adobe/helix-html-pipeline 1.8.2 → 1.8.4
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/forms-pipe.js +1 -1
- 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.4](https://github.com/adobe/helix-html-pipeline/compare/v1.8.3...v1.8.4) (2022-10-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* trim spaces after comma ([#167](https://github.com/adobe/helix-html-pipeline/issues/167)) ([e3e579a](https://github.com/adobe/helix-html-pipeline/commit/e3e579a690c2db7068bc5eabde4e0ce0e49084a3))
|
|
7
|
+
|
|
8
|
+
## [1.8.3](https://github.com/adobe/helix-html-pipeline/compare/v1.8.2...v1.8.3) (2022-10-06)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **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)
|
|
14
|
+
|
|
1
15
|
## [1.8.2](https://github.com/adobe/helix-html-pipeline/compare/v1.8.1...v1.8.2) (2022-10-05)
|
|
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.4",
|
|
4
4
|
"description": "Helix HTML Pipeline",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"hast-util-select": "5.0.2",
|
|
37
37
|
"hast-util-to-html": "8.0.3",
|
|
38
38
|
"hast-util-to-string": "2.0.0",
|
|
39
|
-
"hastscript": "7.0
|
|
39
|
+
"hastscript": "7.1.0",
|
|
40
40
|
"mdast-util-gfm-footnote": "1.0.1",
|
|
41
41
|
"mdast-util-gfm-strikethrough": "1.0.1",
|
|
42
42
|
"mdast-util-gfm-table": "1.0.6",
|
|
@@ -69,14 +69,14 @@
|
|
|
69
69
|
"@semantic-release/git": "10.0.1",
|
|
70
70
|
"@semantic-release/npm": "9.0.1",
|
|
71
71
|
"c8": "7.12.0",
|
|
72
|
-
"eslint": "8.
|
|
72
|
+
"eslint": "8.25.0",
|
|
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.6",
|
|
77
77
|
"husky": "8.0.1",
|
|
78
78
|
"js-yaml": "4.1.0",
|
|
79
|
-
"jsdom": "20.0.
|
|
79
|
+
"jsdom": "20.0.1",
|
|
80
80
|
"junit-report-builder": "3.0.1",
|
|
81
81
|
"lint-staged": "13.0.3",
|
|
82
82
|
"mocha": "10.0.0",
|
package/src/forms-pipe.js
CHANGED
|
@@ -130,7 +130,7 @@ export async function formsPipe(state, request) {
|
|
|
130
130
|
|
|
131
131
|
const sourceLocation = resourceFetchResponse.headers.get('x-amz-meta-x-source-location');
|
|
132
132
|
const referer = request.headers.get('referer') || 'unknown';
|
|
133
|
-
const sheetNames = sheets.split(',');
|
|
133
|
+
const sheetNames = sheets.split(',').map((s) => s.trim());
|
|
134
134
|
|
|
135
135
|
if (!sourceLocation || !sheetNames.includes('incoming')) {
|
|
136
136
|
return error(log, `Target workbook at ${resourcePath} is not setup to intake data.`, 403, response);
|
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;
|