@adobe/helix-html-pipeline 2.0.3 → 2.0.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 CHANGED
@@ -1,3 +1,11 @@
1
+ ## [2.0.4](https://github.com/adobe/helix-html-pipeline/compare/v2.0.3...v2.0.4) (2022-05-31)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * fix glob matching for mapped pages ([c43e359](https://github.com/adobe/helix-html-pipeline/commit/c43e3590f9b564f988dfd35daeb5000e458dea71))
7
+ * rename mappedPath to unmappedPath ([12e0066](https://github.com/adobe/helix-html-pipeline/commit/12e0066c8da51ffcb16f8ac7e78306fae1a1cd93))
8
+
1
9
  ## [2.0.3](https://github.com/adobe/helix-html-pipeline/compare/v2.0.2...v2.0.3) (2022-05-30)
2
10
 
3
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-html-pipeline",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "Helix HTML Pipeline",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
package/src/index.d.ts CHANGED
@@ -65,6 +65,11 @@ declare interface PathInfo {
65
65
  * original extension as passed via request
66
66
  */
67
67
  originalExtension: string;
68
+
69
+ /**
70
+ * original path as passed before folder mapping
71
+ */
72
+ unmappedPath: string;
68
73
  }
69
74
 
70
75
  declare interface S3Loader {
@@ -157,7 +157,7 @@ export default function extractMetaData(state, req) {
157
157
  // extract global metadata from spreadsheet, and overlay
158
158
  // with local metadata from document
159
159
  const metaConfig = Object.assign(
160
- filterGlobalMetadata(state.metadata, state.info.path),
160
+ filterGlobalMetadata(state.metadata, state.info.unmappedPath || state.info.path),
161
161
  getLocalMetadata(hast),
162
162
  );
163
163
 
@@ -48,6 +48,7 @@ export default function folderMapping(state) {
48
48
  const mapped = mapPath(folders, path);
49
49
  if (mapped) {
50
50
  state.info = getPathInfo(mapped);
51
+ state.info.unmappedPath = path;
51
52
  if (getExtension(mapped)) {
52
53
  // special case: use code-bus
53
54
  state.content.sourceBus = 'code';
package/src/utils/path.js CHANGED
@@ -37,6 +37,7 @@ export function getPathInfo(path) {
37
37
  originalExtension: '',
38
38
  originalPath: path,
39
39
  originalFilename: segs.pop(),
40
+ unmappedPath: '',
40
41
  };
41
42
 
42
43
  // path -> web path (no .html, no index)