@sap-ux/preview-middleware 0.18.14 → 0.18.16

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.
@@ -160,7 +160,7 @@ function sanitizeRtaConfig(deprecatedRtaConfig, logger) {
160
160
  * and its options, such as the layers it applies to and its service URL, if applicable.
161
161
  */
162
162
  function getFlexSettings() {
163
- const localConnectorPath = 'custom.connectors.WorkspaceConnector';
163
+ const localConnectorPath = 'open/ux/preview/client/flp/WorkspaceConnector';
164
164
  return [
165
165
  { connector: 'LrepConnector', layers: [], url: '/sap/bc/lrep' },
166
166
  {
@@ -70,6 +70,13 @@ export declare class FlpSandbox {
70
70
  * @private
71
71
  */
72
72
  private getDeveloperModeConfig;
73
+ /**
74
+ * Overrides the custom connector to a non-existing dummy value.
75
+ * This is needed for UI5 versions 1.71 and below.
76
+ *
77
+ * @private
78
+ */
79
+ private overrideCustomConnector;
73
80
  /**
74
81
  * Generates the FLP sandbox for an editor.
75
82
  *
package/dist/base/flp.js CHANGED
@@ -125,6 +125,16 @@ class FlpSandbox {
125
125
  ]);
126
126
  }
127
127
  }
128
+ /**
129
+ * Overrides the custom connector to a non-existing dummy value.
130
+ * This is needed for UI5 versions 1.71 and below.
131
+ *
132
+ * @private
133
+ */
134
+ overrideCustomConnector() {
135
+ (this.templateConfig.ui5.flex?.[1]).applyConnector = 'FioriToolsNonexistentConnector';
136
+ (this.templateConfig.ui5.flex?.[1]).writeConnector = 'FioriToolsNonexistentConnector';
137
+ }
128
138
  /**
129
139
  * Generates the FLP sandbox for an editor.
130
140
  *
@@ -154,6 +164,9 @@ class FlpSandbox {
154
164
  };
155
165
  config.features = feature_toggle_1.FeatureToggleAccess.getAllFeatureToggles();
156
166
  const ui5Version = await this.getUi5Version(req.protocol, req.headers.host, req['ui5-patched-router']?.baseUrl);
167
+ if (ui5Version.major === 1 && ui5Version.minor <= 71) {
168
+ this.overrideCustomConnector();
169
+ }
157
170
  if (editor.developerMode === true) {
158
171
  config.ui5.bootstrapOptions = serializeUi5Configuration(this.getDeveloperModeConfig(ui5Version.major));
159
172
  }
@@ -23,8 +23,6 @@ sap.ui.define(["../utils/version"], function (___utils_version) {
23
23
  sap.ui.require(['open/ux/preview/client/flp/enableFakeConnector'], function (enableFakeConnector) {
24
24
  enableFakeConnector();
25
25
  });
26
- } else {
27
- sap.ui.define('custom.connectors.WorkspaceConnector', ['open/ux/preview/client/flp/WorkspaceConnector'], connector => connector, true);
28
26
  }
29
27
  }
30
28
  return initConnectors;
@@ -15,12 +15,5 @@ export default async function initConnectors(): Promise<void> {
15
15
  sap.ui.require(['open/ux/preview/client/flp/enableFakeConnector'], function (enableFakeConnector: () => void) {
16
16
  enableFakeConnector();
17
17
  });
18
- } else {
19
- sap.ui.define(
20
- 'custom.connectors.WorkspaceConnector',
21
- ['open/ux/preview/client/flp/WorkspaceConnector'],
22
- (connector: object) => connector,
23
- true
24
- );
25
18
  }
26
19
  }
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.18.14",
12
+ "version": "0.18.16",
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.13.13",
29
- "@sap-ux/btp-utils": "1.0.1",
30
- "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.6.1",
28
+ "@sap-ux/adp-tooling": "0.13.14",
29
+ "@sap-ux/btp-utils": "1.0.2",
31
30
  "@sap-ux/feature-toggle": "0.2.3",
32
31
  "@sap-ux/logger": "0.6.0",
33
- "@sap-ux/project-access": "1.29.15",
34
- "@sap-ux/system-access": "0.5.32"
32
+ "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.6.1",
33
+ "@sap-ux/system-access": "0.5.33",
34
+ "@sap-ux/project-access": "1.29.16"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@sap-ux-private/playwright": "0.1.0",
@@ -49,11 +49,11 @@
49
49
  "nock": "13.4.0",
50
50
  "npm-run-all2": "6.2.0",
51
51
  "supertest": "6.3.3",
52
- "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.13.1",
53
- "@sap-ux/axios-extension": "1.19.0",
52
+ "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.13.2",
53
+ "@sap-ux/axios-extension": "1.19.1",
54
54
  "@sap-ux/i18n": "0.2.3",
55
55
  "@sap-ux/store": "1.0.0",
56
- "@sap-ux/ui5-info": "0.9.0"
56
+ "@sap-ux/ui5-info": "0.9.1"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "express": "4"