@sap-ux/preview-middleware 0.16.175 → 0.17.0

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 +8 -0
  2. package/package.json +3 -3
package/dist/base/flp.js CHANGED
@@ -238,6 +238,14 @@ class FlpSandbox {
238
238
  this.router.use(config_1.PREVIEW_URL.client.path, (0, express_1.static)(config_1.PREVIEW_URL.client.local));
239
239
  // add route for the sandbox html
240
240
  this.router.get(this.config.path, (async (req, res, next) => {
241
+ // karma (connect API) has no request query property
242
+ if (req.query && !req.query['sap-ui-xx-viewCache']) {
243
+ // Redirect to the same URL but add the necessary parameter
244
+ const params = structuredClone(req.query);
245
+ params['sap-ui-xx-viewCache'] = 'false';
246
+ res.redirect(302, `${this.config.path}?${new URLSearchParams(params)}`);
247
+ return;
248
+ }
241
249
  await this.setApplicationDependencies();
242
250
  // inform the user if a html file exists on the filesystem
243
251
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
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.16.175",
12
+ "version": "0.17.0",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -27,9 +27,9 @@
27
27
  "mem-fs-editor": "9.4.0",
28
28
  "@sap-ux/logger": "0.6.0",
29
29
  "@sap-ux/feature-toggle": "0.2.3",
30
- "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.5.33",
31
- "@sap-ux/adp-tooling": "0.12.112",
32
30
  "@sap-ux/btp-utils": "0.17.2",
31
+ "@sap-ux/adp-tooling": "0.12.112",
32
+ "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.5.33",
33
33
  "@sap-ux/project-access": "1.29.0"
34
34
  },
35
35
  "devDependencies": {