@sap-ux/cf-deploy-config-sub-generator 0.2.28 → 0.2.30

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,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
  */
@@ -3,17 +3,23 @@ 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 cf_deploy_config_sub_generator_i18n_json_1 = __importDefault(require("../translations/cf-deploy-config-sub-generator.i18n.json"));
10
11
  const inquirer_common_1 = require("@sap-ux/inquirer-common");
11
12
  const cfAppRouterGenNs = 'cf-deploy-config-generator';
13
+ exports.i18n = i18next_1.default.createInstance();
12
14
  /**
13
15
  * Initialize i18next with the translations for this module.
14
16
  */
15
17
  async function initI18n() {
16
- await i18next_1.default.init({ lng: 'en', fallbackLng: 'en' }, () => i18next_1.default.addResourceBundle('en', cfAppRouterGenNs, cf_deploy_config_sub_generator_i18n_json_1.default));
18
+ await exports.i18n.init({
19
+ lng: 'en',
20
+ fallbackLng: 'en'
21
+ });
22
+ exports.i18n.addResourceBundle('en', cfAppRouterGenNs, cf_deploy_config_sub_generator_i18n_json_1.default);
17
23
  (0, inquirer_common_1.addi18nResourceBundle)();
18
24
  }
19
25
  /**
@@ -27,7 +33,7 @@ function t(key, options) {
27
33
  if (!options?.ns) {
28
34
  options = Object.assign(options ?? {}, { ns: cfAppRouterGenNs });
29
35
  }
30
- return i18next_1.default.t(key, options);
36
+ return exports.i18n.t(key, options);
31
37
  }
32
38
  initI18n().catch(() => {
33
39
  // Needed for lint
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sap-ux/cf-deploy-config-sub-generator",
3
3
  "description": "Generators for configuring Cloud Foundry deployment configuration",
4
- "version": "0.2.28",
4
+ "version": "0.2.30",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -21,16 +21,16 @@
21
21
  "dependencies": {
22
22
  "@sap-devx/yeoman-ui-types": "1.14.4",
23
23
  "hasbin": "1.2.3",
24
- "i18next": "23.5.1",
24
+ "i18next": "25.3.0",
25
25
  "yeoman-generator": "5.10.0",
26
- "@sap-ux/cf-deploy-config-writer": "0.3.11",
27
26
  "@sap-ux/btp-utils": "1.1.0",
28
- "@sap-ux/cf-deploy-config-inquirer": "0.3.22",
29
- "@sap-ux/deploy-config-generator-shared": "0.1.15",
30
- "@sap-ux/fiori-generator-shared": "0.12.14",
31
- "@sap-ux/inquirer-common": "0.7.19",
27
+ "@sap-ux/cf-deploy-config-writer": "0.3.13",
28
+ "@sap-ux/cf-deploy-config-inquirer": "0.3.24",
29
+ "@sap-ux/deploy-config-generator-shared": "0.1.17",
32
30
  "@sap-ux/feature-toggle": "0.3.0",
33
- "@sap-ux/project-access": "1.30.5"
31
+ "@sap-ux/fiori-generator-shared": "0.12.16",
32
+ "@sap-ux/inquirer-common": "0.7.21",
33
+ "@sap-ux/project-access": "1.30.6"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/hasbin": "1.2.2",