@sap-ux/ui5-proxy-middleware 1.5.6 → 1.5.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.
package/dist/i18n.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import type { TOptions } from 'i18next';
1
+ import type { i18n as i18nNext, TOptions } from 'i18next';
2
+ export declare const i18n: i18nNext;
2
3
  /**
3
4
  * Initialize i18next with the translations for this module.
4
5
  */
package/dist/i18n.js CHANGED
@@ -3,16 +3,18 @@ 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.i18n = void 0;
6
7
  exports.initI18n = initI18n;
7
8
  exports.t = t;
8
9
  const i18next_1 = __importDefault(require("i18next"));
9
10
  const ui5_proxy_middleware_i18n_json_1 = __importDefault(require("./translations/ui5-proxy-middleware.i18n.json"));
10
11
  const NS = 'ui5-proxy-middleware';
12
+ exports.i18n = i18next_1.default.createInstance();
11
13
  /**
12
14
  * Initialize i18next with the translations for this module.
13
15
  */
14
16
  async function initI18n() {
15
- await i18next_1.default.init({
17
+ await exports.i18n.init({
16
18
  resources: {
17
19
  en: {
18
20
  [NS]: ui5_proxy_middleware_i18n_json_1.default
@@ -32,7 +34,7 @@ async function initI18n() {
32
34
  * @returns {string} localized string stored for the given key
33
35
  */
34
36
  function t(key, options) {
35
- return i18next_1.default.t(key, options);
37
+ return exports.i18n.t(key, options);
36
38
  }
37
39
  initI18n().catch(() => {
38
40
  // Ignore any errors since the middleware will still work
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.5.6",
12
+ "version": "1.5.8",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -24,10 +24,10 @@
24
24
  "dotenv": "16.3.1",
25
25
  "http-proxy-middleware": "2.0.9",
26
26
  "https-proxy-agent": "5.0.1",
27
- "i18next": "20.6.1",
27
+ "i18next": "25.3.0",
28
28
  "proxy-from-env": "1.1.0",
29
29
  "@sap-ux/logger": "0.7.0",
30
- "@sap-ux/ui5-config": "0.29.0"
30
+ "@sap-ux/ui5-config": "0.29.1"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/express": "4.17.21",
@@ -35,9 +35,9 @@
35
35
  "@types/proxy-from-env": "1.0.1",
36
36
  "express": "4.21.2",
37
37
  "nock": "13.4.0",
38
- "supertest": "6.3.3",
38
+ "supertest": "7.1.4",
39
39
  "yaml": "2.2.2",
40
- "@sap-ux/project-access": "1.30.6"
40
+ "@sap-ux/project-access": "1.30.10"
41
41
  },
42
42
  "ui5": {
43
43
  "dependencies": []