@sap-ux/ui5-proxy-middleware 1.4.7 → 1.4.8

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,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { NextFunction } from 'express';
3
2
  import type { IncomingMessage } from 'http';
4
3
  export interface ProxyConfig {
@@ -1,6 +1,3 @@
1
- /// <reference path="../../../../types/ui5.d.ts" />
2
- /// <reference types="node" />
3
- /// <reference types="node" />
4
1
  import type { ClientRequest, IncomingMessage, ServerResponse } from 'http';
5
2
  import type { ToolsLogger } from '@sap-ux/logger';
6
3
  import { type Manifest } from '@sap-ux/project-access';
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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;
3
+ exports.filterCompressedHtmlFiles = exports.injectScripts = exports.setHtmlResponse = exports.getWebAppFolderFromYaml = exports.getYamlFile = exports.getHtmlFile = exports.hideProxyCredentials = exports.getCorporateProxyServer = exports.proxyRequestHandler = exports.proxyResponseHandler = void 0;
4
+ exports.updateProxyEnv = updateProxyEnv;
5
+ exports.resolveUI5Version = resolveUI5Version;
6
+ exports.injectUI5Url = injectUI5Url;
7
+ exports.proxyErrorHandler = proxyErrorHandler;
4
8
  const project_access_1 = require("@sap-ux/project-access");
5
9
  const ui5_config_1 = require("@sap-ux/ui5-config");
6
10
  const fs_1 = require("fs");
@@ -106,7 +110,6 @@ function updateProxyEnv(proxyFromConfig) {
106
110
  }
107
111
  }
108
112
  }
109
- exports.updateProxyEnv = updateProxyEnv;
110
113
  /**
111
114
  * Returns the name of html file, which is used to preview the application, from the URL.
112
115
  *
@@ -208,7 +211,6 @@ async function resolveUI5Version(version, log, manifest) {
208
211
  }
209
212
  return ui5Version;
210
213
  }
211
- exports.resolveUI5Version = resolveUI5Version;
212
214
  /**
213
215
  * Injects the absolute UI5 urls into the html file, which is used to preview the application.
214
216
  *
@@ -232,7 +234,6 @@ function injectUI5Url(originalHtml, ui5Configs) {
232
234
  }
233
235
  return html;
234
236
  }
235
- exports.injectUI5Url = injectUI5Url;
236
237
  /**
237
238
  * Injects scripts into the html file, which is used to preview the application.
238
239
  *
@@ -300,5 +301,4 @@ function proxyErrorHandler(err, req, logger, _res, _target) {
300
301
  logger.debug((0, i18n_1.t)('error.noCodeError', { error: JSON.stringify(err, null, 2), request: req.originalUrl }));
301
302
  }
302
303
  }
303
- exports.proxyErrorHandler = proxyErrorHandler;
304
304
  //# sourceMappingURL=utils.js.map
package/dist/i18n.js CHANGED
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.t = exports.initI18n = void 0;
6
+ exports.initI18n = initI18n;
7
+ exports.t = t;
7
8
  const i18next_1 = __importDefault(require("i18next"));
8
9
  const ui5_proxy_middleware_i18n_json_1 = __importDefault(require("./translations/ui5-proxy-middleware.i18n.json"));
9
10
  const NS = 'ui5-proxy-middleware';
@@ -23,7 +24,6 @@ async function initI18n() {
23
24
  ns: [NS]
24
25
  });
25
26
  }
26
- exports.initI18n = initI18n;
27
27
  /**
28
28
  * Helper function facading the call call to i18next.
29
29
  *
@@ -34,7 +34,6 @@ exports.initI18n = initI18n;
34
34
  function t(key, options) {
35
35
  return i18next_1.default.t(key, options);
36
36
  }
37
- exports.t = t;
38
37
  initI18n().catch(() => {
39
38
  // Ignore any errors since the middleware will still work
40
39
  });
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.7",
12
+ "version": "1.4.8",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -22,7 +22,7 @@
22
22
  ],
23
23
  "dependencies": {
24
24
  "dotenv": "16.3.1",
25
- "http-proxy-middleware": "2.0.6",
25
+ "http-proxy-middleware": "2.0.7",
26
26
  "https-proxy-agent": "5.0.1",
27
27
  "i18next": "20.6.1",
28
28
  "proxy-from-env": "1.1.0",
@@ -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.27.4"
40
+ "@sap-ux/project-access": "1.28.2"
41
41
  },
42
42
  "ui5": {
43
43
  "dependencies": []