@sap-ux/backend-proxy-middleware-cf 0.1.8 → 0.1.10

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.
@@ -3,7 +3,7 @@ import type { ToolsLogger } from '@sap-ux/logger';
3
3
  import type { ConnectivityProxyInfo, SshTunnelOptions, EffectiveOptions } from '../types';
4
4
  /**
5
5
  * Start an SSH tunnel to the connectivity proxy if needed.
6
- * Skips if running in BAS, if the port is already in use, or if no connectivity service is present.
6
+ * Skips if the port is already in use or if no connectivity service is present.
7
7
  * Errors are logged as warnings; the middleware continues without the tunnel.
8
8
  *
9
9
  * @param connectivityInfo - Original connectivity proxy host and port from VCAP_SERVICES.
@@ -7,7 +7,6 @@ exports.startSshTunnelIfNeeded = startSshTunnelIfNeeded;
7
7
  exports.setupSshTunnel = setupSshTunnel;
8
8
  const node_net_1 = __importDefault(require("node:net"));
9
9
  const node_child_process_1 = require("node:child_process");
10
- const btp_utils_1 = require("@sap-ux/btp-utils");
11
10
  const adp_tooling_1 = require("@sap-ux/adp-tooling");
12
11
  const destination_check_1 = require("./destination-check");
13
12
  /**
@@ -103,7 +102,7 @@ function registerCleanup(tunnelProcess, logger) {
103
102
  }
104
103
  /**
105
104
  * Start an SSH tunnel to the connectivity proxy if needed.
106
- * Skips if running in BAS, if the port is already in use, or if no connectivity service is present.
105
+ * Skips if the port is already in use or if no connectivity service is present.
107
106
  * Errors are logged as warnings; the middleware continues without the tunnel.
108
107
  *
109
108
  * @param connectivityInfo - Original connectivity proxy host and port from VCAP_SERVICES.
@@ -114,10 +113,6 @@ function registerCleanup(tunnelProcess, logger) {
114
113
  */
115
114
  async function startSshTunnelIfNeeded(connectivityInfo, tunnelAppName, logger, options) {
116
115
  try {
117
- if ((0, btp_utils_1.isAppStudio)()) {
118
- logger.debug('Running in BAS, SSH tunnel not needed.');
119
- return undefined;
120
- }
121
116
  const localPort = options?.localPort ?? connectivityInfo.port;
122
117
  if (await isPortInUse(localPort)) {
123
118
  logger.info(`Port ${localPort} already in use, assuming SSH tunnel is already running.`);
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%3Abackend-proxy-middleware-cf"
11
11
  },
12
- "version": "0.1.8",
12
+ "version": "0.1.10",
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
  "http-proxy-middleware": "3.0.5",
28
28
  "mime-types": "^2.1.35",
29
29
  "portfinder": "^1.0.32",
30
- "@sap-ux/adp-tooling": "0.18.118",
30
+ "@sap-ux/adp-tooling": "0.18.119",
31
31
  "@sap-ux/btp-utils": "1.1.14",
32
32
  "@sap-ux/logger": "0.8.5"
33
33
  },