@sap-ux/preview-middleware 0.16.88 → 0.16.89

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/README.md CHANGED
@@ -128,7 +128,7 @@ server:
128
128
  ```
129
129
  This mount path can be used with a run script that looks as follows.
130
130
  ```Json
131
- "start-variants-management": "ui5 serve --open \"test/variant-editor.html.html?fiori-tools-rta-mode=true&sap-ui-rta-skip-flex-validation=true#app-preview\""
131
+ "start-variants-management": "ui5 serve --open \"test/variant-editor.html.html#app-preview\""
132
132
  ```
133
133
 
134
134
  ### Test Suites
package/dist/base/flp.js CHANGED
@@ -170,7 +170,16 @@ class FlpSandbox {
170
170
  }
171
171
  this.router.use(`${path}editor`, (0, express_1.static)(cpe));
172
172
  }
173
- this.router.get(previewUrl, (_req, res) => {
173
+ this.router.get(previewUrl, (req, res) => {
174
+ if (!req.query['fiori-tools-rta-mode']) {
175
+ // Redirect to the same URL but add the necessary parameter
176
+ const params = JSON.parse(JSON.stringify(req.query));
177
+ params['sap-ui-xx-viewCache'] = 'false';
178
+ params['fiori-tools-rta-mode'] = 'true';
179
+ params['sap-ui-rta-skip-flex-validation'] = 'true';
180
+ res.redirect(302, `${previewUrl}?${new URLSearchParams(params)}`);
181
+ return;
182
+ }
174
183
  const html = this.generateSandboxForEditor(rta, editor).replace('</body>', `</body>\n<!-- livereload disabled for editor </body>-->`);
175
184
  this.sendResponse(res, 'text/html', 200, html);
176
185
  });
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.88",
12
+ "version": "0.16.89",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -26,8 +26,8 @@
26
26
  "mem-fs": "2.1.0",
27
27
  "mem-fs-editor": "9.4.0",
28
28
  "@sap-ux/logger": "0.6.0",
29
- "@sap-ux/btp-utils": "0.15.2",
30
29
  "@sap-ux/feature-toggle": "0.2.2",
30
+ "@sap-ux/btp-utils": "0.15.2",
31
31
  "@sap-ux/adp-tooling": "0.12.60",
32
32
  "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.5.20",
33
33
  "@sap-ux/project-access": "1.28.2"
@@ -47,8 +47,8 @@
47
47
  "@sap-ux-private/playwright": "0.1.0",
48
48
  "dotenv": "16.3.1",
49
49
  "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.11.16",
50
- "@sap-ux/store": "0.9.2",
51
50
  "@sap-ux/axios-extension": "1.16.7",
51
+ "@sap-ux/store": "0.9.2",
52
52
  "@sap-ux/ui5-info": "0.8.1",
53
53
  "@sap-ux/i18n": "0.2.0"
54
54
  },