@sap-ux/preview-middleware 0.20.6 → 0.20.8

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.
Files changed (2) hide show
  1. package/dist/base/flp.js +4 -3
  2. package/package.json +7 -7
package/dist/base/flp.js CHANGED
@@ -339,11 +339,12 @@ class FlpSandbox {
339
339
  return;
340
340
  }
341
341
  await this.setApplicationDependencies();
342
- // inform the user if a html file exists on the filesystem
342
+ // get filepath from request. Use dummy url to extract it from originalUrl if needed
343
+ const filePath = 'query' in req ? req.path : new URL('http://dummyHost' + req.originalUrl).pathname; //NOSONAR
343
344
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
344
- const file = await this.project.byPath(this.flpConfig.path);
345
+ const file = await this.project.byPath(filePath);
345
346
  if (file) {
346
- this.logger.info(`HTML file returned at ${this.flpConfig.path} is loaded from the file system.`);
347
+ this.logger.info(`HTML file returned at ${filePath} is loaded from the file system.`);
347
348
  next();
348
349
  }
349
350
  else {
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "bugs": {
10
10
  "url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Apreview-middleware"
11
11
  },
12
- "version": "0.20.6",
12
+ "version": "0.20.8",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -25,13 +25,13 @@
25
25
  "ejs": "3.1.10",
26
26
  "mem-fs": "2.1.0",
27
27
  "mem-fs-editor": "9.4.0",
28
- "@sap-ux/adp-tooling": "0.14.2",
28
+ "@sap-ux/adp-tooling": "0.14.3",
29
29
  "@sap-ux/btp-utils": "1.1.0",
30
30
  "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.6.5",
31
31
  "@sap-ux/feature-toggle": "0.3.0",
32
32
  "@sap-ux/logger": "0.7.0",
33
- "@sap-ux/system-access": "0.6.0",
34
- "@sap-ux/project-access": "1.30.1"
33
+ "@sap-ux/project-access": "1.30.1",
34
+ "@sap-ux/system-access": "0.6.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@sap-ux-private/playwright": "0.2.0",
@@ -50,10 +50,10 @@
50
50
  "npm-run-all2": "6.2.0",
51
51
  "supertest": "6.3.3",
52
52
  "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.14.4",
53
- "@sap-ux/i18n": "0.3.0",
54
53
  "@sap-ux/axios-extension": "1.21.0",
55
- "@sap-ux/store": "1.1.0",
56
- "@sap-ux/ui5-info": "0.11.0"
54
+ "@sap-ux/i18n": "0.3.0",
55
+ "@sap-ux/ui5-info": "0.11.0",
56
+ "@sap-ux/store": "1.1.0"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "express": "4"