@sap-ux/ui5-proxy-middleware 1.1.11 → 1.1.13

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.
@@ -1,7 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  import type { ClientRequest, IncomingMessage, ServerResponse } from 'http';
3
3
  import type { ToolsLogger } from '@sap-ux/logger';
4
- import type { Manifest } from '@sap-ux/ui5-config';
4
+ import type { Manifest } from '@sap-ux/project-access';
5
5
  import type { NextFunction, Request, Response } from 'express';
6
6
  import type { ProxyConfig } from './types';
7
7
  import type { Url } from 'url';
@@ -26,7 +26,7 @@ const dotenv_1 = __importDefault(require("dotenv"));
26
26
  function createProxyOptions(logger, config) {
27
27
  return {
28
28
  secure: config.secure !== undefined ? !!config.secure : true,
29
- logLevel: !!config.debug ? 'debug' : 'info',
29
+ logLevel: config.debug ? 'debug' : 'info',
30
30
  logProvider: () => logger
31
31
  };
32
32
  }
@@ -40,7 +40,8 @@ function createRequestHandler(routes) {
40
40
  return (req, res, next) => {
41
41
  for (const route of routes) {
42
42
  if (req.path.startsWith(route.route)) {
43
- return route.handler(req, res, next);
43
+ route.handler(req, res, next);
44
+ return;
44
45
  }
45
46
  }
46
47
  next();
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.1.11",
12
+ "version": "1.1.13",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -21,18 +21,18 @@
21
21
  "!dist/**/*.map"
22
22
  ],
23
23
  "dependencies": {
24
- "@sap-ux/logger": "0.3.0",
25
- "@sap-ux/ui5-config": "0.15.1",
24
+ "@sap-ux/logger": "0.3.1",
25
+ "@sap-ux/ui5-config": "0.15.3",
26
26
  "dotenv": "16.0.0",
27
27
  "http-proxy-middleware": "2.0.1",
28
28
  "https-proxy-agent": "5.0.0",
29
29
  "i18next": "20.3.2"
30
30
  },
31
31
  "devDependencies": {
32
+ "@sap-ux/project-access": "1.0.0",
32
33
  "@types/express": "4.17.13",
33
34
  "express": "4.17.2",
34
35
  "nock": "13.2.4",
35
- "supertest": "6.2.2",
36
36
  "@types/supertest": "2.0.12",
37
37
  "yaml": "2.0.0-10"
38
38
  },
@@ -44,7 +44,7 @@
44
44
  "node": ">= 14.16.0 < 15.0.0 || >=16.1.0 < 17.0.0 || >=18.0.0 < 19.0.0"
45
45
  },
46
46
  "scripts": {
47
- "build": "pnpm clean && tsc",
47
+ "build": "pnpm clean && tsc -p tsconfig-build.json",
48
48
  "clean": "rimraf dist",
49
49
  "format": "prettier --write '**/*.{js,json,ts,yaml,yml}' --ignore-path ../../.prettierignore",
50
50
  "lint": "eslint . --ext .ts",