@sap-ux/preview-middleware 0.25.3 → 0.25.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.
@@ -172,6 +172,11 @@ export declare class FlpSandbox {
172
172
  * to load the changes in an Adaptation project.
173
173
  */
174
174
  private removeAsyncHintsRequests;
175
+ /**
176
+ * For UI5 versions below 1.120, flexExtensionPointEnabled must be removed from the application
177
+ * dependencies manifest. Older UI5 versions cannot handle this property at bootstrap time.
178
+ */
179
+ private removeFlexExtensionPointEnabled;
175
180
  /**
176
181
  * Try finding a locate-reuse-libs script in the project.
177
182
  *
package/dist/base/flp.js CHANGED
@@ -195,6 +195,9 @@ class FlpSandbox {
195
195
  if (ui5Version.major === 1 && ui5Version.minor <= 71) {
196
196
  this.removeAsyncHintsRequests();
197
197
  }
198
+ if (ui5Version.major === 1 && ui5Version.minor < 120) {
199
+ this.removeFlexExtensionPointEnabled();
200
+ }
198
201
  const config = structuredClone(this.templateConfig);
199
202
  if (!config.ui5.libs.includes('sap.ui.rta')) {
200
203
  // sap.ui.rta needs to be added to the list of preload libs for variants management and adaptation projects
@@ -352,6 +355,9 @@ class FlpSandbox {
352
355
  ? req.protocol
353
356
  : (req.headers.referer?.substring(0, req.headers.referer.indexOf(':')) ?? 'http'), req.headers.host, this.templateConfig.baseUrl);
354
357
  this.checkDeleteConnectors(ui5Version.major, ui5Version.minor, ui5Version.isCdn);
358
+ if (ui5Version.major === 1 && ui5Version.minor < 120) {
359
+ this.removeFlexExtensionPointEnabled();
360
+ }
355
361
  //for consistency reasons, we also add the baseUrl to the HTML here, although it is only used in editor mode
356
362
  const html = (0, ejs_1.render)(this.getSandboxTemplate(ui5Version), this.templateConfig);
357
363
  this.sendResponse(res, 'text/html', 200, html);
@@ -455,6 +461,18 @@ class FlpSandbox {
455
461
  }
456
462
  }
457
463
  }
464
+ /**
465
+ * For UI5 versions below 1.120, flexExtensionPointEnabled must be removed from the application
466
+ * dependencies manifest. Older UI5 versions cannot handle this property at bootstrap time.
467
+ */
468
+ removeFlexExtensionPointEnabled() {
469
+ for (const app in this.templateConfig.apps) {
470
+ const manifest = this.templateConfig.apps[app].applicationDependencies?.manifest;
471
+ if (manifest?.['sap.ui5']?.flexExtensionPointEnabled !== undefined) {
472
+ delete manifest['sap.ui5'].flexExtensionPointEnabled;
473
+ }
474
+ }
475
+ }
458
476
  /**
459
477
  * Try finding a locate-reuse-libs script in the project.
460
478
  *
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.25.3",
12
+ "version": "0.25.4",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -29,12 +29,12 @@
29
29
  "@sap/bas-sdk": "3.13.3",
30
30
  "@sap-ux/adp-tooling": "0.18.102",
31
31
  "@sap-ux/btp-utils": "1.1.11",
32
- "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.7.22",
33
32
  "@sap-ux/feature-toggle": "0.3.7",
34
33
  "@sap-ux/logger": "0.8.3",
34
+ "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.7.22",
35
35
  "@sap-ux/project-access": "1.35.16",
36
- "@sap-ux/system-access": "0.7.2",
37
- "@sap-ux/i18n": "0.3.10"
36
+ "@sap-ux/i18n": "0.3.10",
37
+ "@sap-ux/system-access": "0.7.2"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@sap-ux-private/playwright": "0.2.13",
@@ -54,8 +54,8 @@
54
54
  "npm-run-all2": "8.0.4",
55
55
  "supertest": "7.2.2",
56
56
  "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.19.1",
57
- "@sap-ux/axios-extension": "1.25.26",
58
57
  "@sap-ux/store": "1.5.11",
58
+ "@sap-ux/axios-extension": "1.25.26",
59
59
  "@sap-ux/ui5-info": "0.13.16"
60
60
  },
61
61
  "peerDependencies": {