@adobe/helix-html-pipeline 3.11.10 → 3.11.12
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 +10 -10
- package/src/json-pipe.js +1 -1
- package/src/steps/utils.js +20 -16
- package/src/utils/json-filter.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [3.11.12](https://github.com/adobe/helix-html-pipeline/compare/v3.11.11...v3.11.12) (2023-06-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* return multisheet for any multisheet query ([65d6e21](https://github.com/adobe/helix-html-pipeline/commit/65d6e21ab40611689ef59af949917805c941f116))
|
|
7
|
+
|
|
8
|
+
## [3.11.11](https://github.com/adobe/helix-html-pipeline/compare/v3.11.10...v3.11.11) (2023-06-03)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* ignore invalid urls in link rewriter ([#329](https://github.com/adobe/helix-html-pipeline/issues/329)) ([03a8e35](https://github.com/adobe/helix-html-pipeline/commit/03a8e354af1f88d0d7dc1b9ad4537c7fbf8382f3)), closes [#328](https://github.com/adobe/helix-html-pipeline/issues/328)
|
|
14
|
+
|
|
1
15
|
## [3.11.10](https://github.com/adobe/helix-html-pipeline/compare/v3.11.9...v3.11.10) (2023-06-01)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-html-pipeline",
|
|
3
|
-
"version": "3.11.
|
|
3
|
+
"version": "3.11.12",
|
|
4
4
|
"description": "Helix HTML Pipeline",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
"mdast-util-gfm-task-list-item": "1.0.2",
|
|
58
58
|
"mdast-util-to-hast": "12.3.0",
|
|
59
59
|
"mdast-util-to-string": "3.2.0",
|
|
60
|
-
"micromark-extension-gfm-footnote": "1.1.
|
|
61
|
-
"micromark-extension-gfm-strikethrough": "1.0.
|
|
62
|
-
"micromark-extension-gfm-table": "1.0.
|
|
60
|
+
"micromark-extension-gfm-footnote": "1.1.2",
|
|
61
|
+
"micromark-extension-gfm-strikethrough": "1.0.7",
|
|
62
|
+
"micromark-extension-gfm-table": "1.0.7",
|
|
63
63
|
"micromark-extension-gfm-tagfilter": "1.0.2",
|
|
64
|
-
"micromark-extension-gfm-task-list-item": "1.0.
|
|
65
|
-
"micromark-util-combine-extensions": "1.
|
|
64
|
+
"micromark-extension-gfm-task-list-item": "1.0.5",
|
|
65
|
+
"micromark-util-combine-extensions": "1.1.0",
|
|
66
66
|
"mime": "3.0.0",
|
|
67
67
|
"rehype-format": "4.0.1",
|
|
68
68
|
"rehype-parse": "8.0.4",
|
|
@@ -82,12 +82,12 @@
|
|
|
82
82
|
"@semantic-release/changelog": "6.0.3",
|
|
83
83
|
"@semantic-release/git": "10.0.1",
|
|
84
84
|
"@semantic-release/npm": "10.0.3",
|
|
85
|
-
"c8": "7.
|
|
86
|
-
"eslint": "8.
|
|
85
|
+
"c8": "7.14.0",
|
|
86
|
+
"eslint": "8.42.0",
|
|
87
87
|
"eslint-import-resolver-exports": "1.0.0-beta.5",
|
|
88
88
|
"eslint-plugin-header": "3.1.1",
|
|
89
89
|
"eslint-plugin-import": "2.27.5",
|
|
90
|
-
"esmock": "2.
|
|
90
|
+
"esmock": "2.3.1",
|
|
91
91
|
"husky": "8.0.3",
|
|
92
92
|
"js-yaml": "4.1.0",
|
|
93
93
|
"jsdom": "22.1.0",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"mocha": "10.2.0",
|
|
97
97
|
"mocha-multi-reporters": "1.5.1",
|
|
98
98
|
"remark-gfm": "3.0.1",
|
|
99
|
-
"semantic-release": "21.0.
|
|
99
|
+
"semantic-release": "21.0.3"
|
|
100
100
|
},
|
|
101
101
|
"lint-staged": {
|
|
102
102
|
"*.js": "eslint",
|
package/src/json-pipe.js
CHANGED
|
@@ -131,7 +131,7 @@ export async function jsonPipe(state, req) {
|
|
|
131
131
|
state.timer?.update('json-fetch');
|
|
132
132
|
let contentPromise = await fetchJsonContent(state, req, res);
|
|
133
133
|
if (res.status === 404) {
|
|
134
|
-
|
|
134
|
+
folderMapping(state);
|
|
135
135
|
if (state.info.unmappedPath) {
|
|
136
136
|
contentPromise = fetchJsonContent(state, req, res);
|
|
137
137
|
}
|
package/src/steps/utils.js
CHANGED
|
@@ -185,25 +185,29 @@ export function rewriteUrl(state, url) {
|
|
|
185
185
|
if (!url || !url.startsWith('https://')) {
|
|
186
186
|
return url;
|
|
187
187
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
188
|
+
try {
|
|
189
|
+
const { pathname, search, hash } = new URL(url);
|
|
190
|
+
|
|
191
|
+
if (AZURE_BLOB_REGEXP.test(url)) {
|
|
192
|
+
const filename = pathname.split('/').pop();
|
|
193
|
+
const [name, props] = hash.split('?');
|
|
194
|
+
const extension = name.split('.').pop() || 'jpg';
|
|
195
|
+
const newHash = props ? `#${props}` : '';
|
|
196
|
+
return `./media_${filename}.${extension}${newHash}`;
|
|
197
|
+
}
|
|
197
198
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
199
|
+
if (MEDIA_BLOB_REGEXP.test(url)) {
|
|
200
|
+
return `.${pathname}${hash}`;
|
|
201
|
+
}
|
|
201
202
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
203
|
+
if (HELIX_URL_REGEXP.test(url)) {
|
|
204
|
+
if (hash && pathname === state.info?.path) {
|
|
205
|
+
return hash;
|
|
206
|
+
}
|
|
207
|
+
return `${pathname}${search}${hash}`;
|
|
205
208
|
}
|
|
206
|
-
|
|
209
|
+
} catch {
|
|
210
|
+
// ignore
|
|
207
211
|
}
|
|
208
212
|
|
|
209
213
|
return url;
|
package/src/utils/json-filter.js
CHANGED
|
@@ -96,7 +96,7 @@ export default function jsonFilter(state, res, query) {
|
|
|
96
96
|
|
|
97
97
|
let body;
|
|
98
98
|
let type = 'sheet';
|
|
99
|
-
if (sheetNames.length === 1) {
|
|
99
|
+
if (sheetNames.length === 1 && requestedSheets.length < 2) {
|
|
100
100
|
body = sheets[sheetNames[0]];
|
|
101
101
|
} else {
|
|
102
102
|
type = 'multi-sheet';
|