@sap-ux/ui5-proxy-middleware 1.4.0 → 1.4.2

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,7 +2,7 @@
2
2
  /// <reference types="node" />
3
3
  import type { ClientRequest, IncomingMessage, ServerResponse } from 'http';
4
4
  import type { ToolsLogger } from '@sap-ux/logger';
5
- import type { Manifest } from '@sap-ux/project-access';
5
+ import { type Manifest } from '@sap-ux/project-access';
6
6
  import type { NextFunction, Request, Response } from 'express';
7
7
  import type { ProxyConfig } from './types';
8
8
  import type { Url } from 'url';
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.proxyErrorHandler = exports.filterCompressedHtmlFiles = exports.injectScripts = exports.injectUI5Url = exports.resolveUI5Version = exports.setHtmlResponse = exports.getWebAppFolderFromYaml = exports.getYamlFile = exports.getHtmlFile = exports.updateProxyEnv = exports.hideProxyCredentials = exports.getCorporateProxyServer = exports.proxyRequestHandler = exports.proxyResponseHandler = void 0;
4
+ const project_access_1 = require("@sap-ux/project-access");
4
5
  const ui5_config_1 = require("@sap-ux/ui5-config");
5
6
  const fs_1 = require("fs");
6
7
  const path_1 = require("path");
@@ -199,8 +200,7 @@ async function resolveUI5Version(version, log, manifest) {
199
200
  ui5VersionLocation = (0, exports.getYamlFile)(process.argv);
200
201
  }
201
202
  else {
202
- const minUI5Version = manifest?.['sap.ui5']?.dependencies?.minUI5Version;
203
- ui5Version = minUI5Version && !isNaN(parseFloat(minUI5Version)) ? minUI5Version : '';
203
+ ui5Version = (manifest && (0, project_access_1.getMinimumUI5Version)(manifest)) || '';
204
204
  ui5VersionLocation = 'manifest.json';
205
205
  }
206
206
  if (log) {
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.0",
12
+ "version": "1.4.2",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -27,7 +27,7 @@
27
27
  "i18next": "20.6.1",
28
28
  "proxy-from-env": "1.1.0",
29
29
  "@sap-ux/logger": "0.6.0",
30
- "@sap-ux/ui5-config": "0.23.0"
30
+ "@sap-ux/ui5-config": "0.23.1"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/express": "4.17.21",
@@ -37,7 +37,7 @@
37
37
  "nock": "13.4.0",
38
38
  "supertest": "6.3.3",
39
39
  "yaml": "2.2.2",
40
- "@sap-ux/project-access": "1.23.0"
40
+ "@sap-ux/project-access": "1.25.7"
41
41
  },
42
42
  "ui5": {
43
43
  "dependencies": []