@sap-ux/ui5-proxy-middleware 1.4.18 → 1.4.19

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.
@@ -2,4 +2,6 @@ export declare const BOOTSTRAP_LINK = "resources/sap-ui-core.js";
2
2
  export declare const BOOTSTRAP_REPLACE_REGEX: RegExp;
3
3
  export declare const SANDBOX_LINK = "test-resources/sap/ushell/bootstrap/sandbox.js";
4
4
  export declare const SANDBOX_REPLACE_REGEX: RegExp;
5
+ export declare const SANDBOX2_REPLACE_REGEX: RegExp;
6
+ export declare const SANDBOX2_LINK = "resources/sap/ushell/bootstrap/sandbox2.js";
5
7
  //# sourceMappingURL=constants.d.ts.map
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SANDBOX_REPLACE_REGEX = exports.SANDBOX_LINK = exports.BOOTSTRAP_REPLACE_REGEX = exports.BOOTSTRAP_LINK = void 0;
3
+ exports.SANDBOX2_LINK = exports.SANDBOX2_REPLACE_REGEX = exports.SANDBOX_REPLACE_REGEX = exports.SANDBOX_LINK = exports.BOOTSTRAP_REPLACE_REGEX = exports.BOOTSTRAP_LINK = void 0;
4
4
  exports.BOOTSTRAP_LINK = 'resources/sap-ui-core.js';
5
5
  exports.BOOTSTRAP_REPLACE_REGEX = /src="[.{0,2}\/]*resources\/sap-ui-core\.js"/;
6
6
  exports.SANDBOX_LINK = 'test-resources/sap/ushell/bootstrap/sandbox.js';
7
7
  exports.SANDBOX_REPLACE_REGEX = /src="[.{0,2}\/]*test-resources\/sap\/ushell\/bootstrap\/sandbox\.js"/;
8
+ exports.SANDBOX2_REPLACE_REGEX = /src="[.{0,2}\/]*resources\/sap\/ushell\/bootstrap\/sandbox2\.js"/;
9
+ exports.SANDBOX2_LINK = 'resources/sap/ushell/bootstrap/sandbox2.js';
8
10
  //# sourceMappingURL=constants.js.map
@@ -226,10 +226,16 @@ function injectUI5Url(originalHtml, ui5Configs) {
226
226
  if (ui5Config.path === '/resources') {
227
227
  const resourcesUrl = `src="${ui5Url}/${constants_1.BOOTSTRAP_LINK}"`;
228
228
  html = html.replace(constants_1.BOOTSTRAP_REPLACE_REGEX, resourcesUrl);
229
+ //replace sandbox2 url as this is now part of /resources
230
+ const flpSandbox2Url = `src="${ui5Url}/${constants_1.SANDBOX2_LINK}"`;
231
+ html = html.replace(constants_1.SANDBOX2_REPLACE_REGEX, flpSandbox2Url);
229
232
  }
230
233
  if (ui5Config.path === '/test-resources') {
231
- const testResourcesUrl = `src="${ui5Url}/${constants_1.SANDBOX_LINK}"`;
232
- html = html.replace(constants_1.SANDBOX_REPLACE_REGEX, testResourcesUrl);
234
+ const flpSandboxUrl = `src="${ui5Url}/${constants_1.SANDBOX_LINK}"`;
235
+ html = html.replace(constants_1.SANDBOX_REPLACE_REGEX, flpSandboxUrl);
236
+ //replace sandbox2 url here as well although this is no longer part of /test-resources to be backwards compatible
237
+ const flpSandbox2Url = `src="${ui5Url}/${constants_1.SANDBOX2_LINK}"`;
238
+ html = html.replace(constants_1.SANDBOX2_REPLACE_REGEX, flpSandbox2Url);
233
239
  }
234
240
  }
235
241
  return html;
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%3Aui5-proxy-middleware"
11
11
  },
12
- "version": "1.4.18",
12
+ "version": "1.4.19",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",