@sap-ux/flp-config-inquirer 0.3.38 → 0.3.40

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,5 +1,6 @@
1
- import type { TOptions } from 'i18next';
1
+ import type { i18n as i18nNext, TOptions } from 'i18next';
2
2
  export declare const FLP_CONFIG_NAMESPACE = "flp-config-inquirer";
3
+ export declare const i18n: i18nNext;
3
4
  /**
4
5
  * Adds the `flp-config-inquirer` resource bundle to i18next.
5
6
  * May be required to load i18n translations after initialising in the consumer module.
package/dist/i18n.js CHANGED
@@ -3,7 +3,7 @@ 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.FLP_CONFIG_NAMESPACE = void 0;
6
+ exports.i18n = exports.FLP_CONFIG_NAMESPACE = void 0;
7
7
  exports.addi18nResourceBundle = addi18nResourceBundle;
8
8
  exports.initI18n = initI18n;
9
9
  exports.t = t;
@@ -11,18 +11,22 @@ const i18next_1 = __importDefault(require("i18next"));
11
11
  const project_input_validator_1 = require("@sap-ux/project-input-validator");
12
12
  const flp_config_inquirer_i18n_json_1 = __importDefault(require("./translations/flp-config-inquirer.i18n.json"));
13
13
  exports.FLP_CONFIG_NAMESPACE = 'flp-config-inquirer';
14
+ exports.i18n = i18next_1.default.createInstance();
14
15
  /**
15
16
  * Adds the `flp-config-inquirer` resource bundle to i18next.
16
17
  * May be required to load i18n translations after initialising in the consumer module.
17
18
  */
18
19
  function addi18nResourceBundle() {
19
- i18next_1.default.addResourceBundle('en', exports.FLP_CONFIG_NAMESPACE, flp_config_inquirer_i18n_json_1.default);
20
+ exports.i18n.addResourceBundle('en', exports.FLP_CONFIG_NAMESPACE, flp_config_inquirer_i18n_json_1.default);
20
21
  }
21
22
  /**
22
23
  * Initialize i18next with the translations for this module.
23
24
  */
24
25
  async function initI18n() {
25
- await i18next_1.default.init({ lng: 'en', fallbackLng: 'en' });
26
+ await exports.i18n.init({
27
+ lng: 'en',
28
+ fallbackLng: 'en'
29
+ });
26
30
  addi18nResourceBundle();
27
31
  // add the project-input-validator i18n resource bundle to ensure all translations are available
28
32
  (0, project_input_validator_1.addi18nResourceBundle)();
@@ -38,7 +42,7 @@ function t(key, options) {
38
42
  if (!options?.ns) {
39
43
  options = Object.assign(options ?? {}, { ns: exports.FLP_CONFIG_NAMESPACE });
40
44
  }
41
- return i18next_1.default.t(key, options);
45
+ return exports.i18n.t(key, options);
42
46
  }
43
47
  initI18n().catch(() => {
44
48
  // Needed for lint
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sap-ux/flp-config-inquirer",
3
3
  "description": "Prompts module that can prompt users for inputs required for FLP configuration",
4
- "version": "0.3.38",
4
+ "version": "0.3.40",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -19,15 +19,15 @@
19
19
  "!dist/**/*.map"
20
20
  ],
21
21
  "dependencies": {
22
- "i18next": "23.5.1",
22
+ "i18next": "25.3.0",
23
23
  "lodash": "4.17.21",
24
- "@sap-ux/inquirer-common": "0.7.20",
24
+ "@sap-ux/inquirer-common": "0.7.22",
25
25
  "@sap-ux/btp-utils": "1.1.0",
26
- "@sap-ux/project-input-validator": "0.6.9",
27
- "@sap-ux/fiori-generator-shared": "0.12.15",
26
+ "@sap-ux/project-input-validator": "0.6.10",
27
+ "@sap-ux/fiori-generator-shared": "0.13.0",
28
28
  "@sap-ux/project-access": "1.30.6",
29
29
  "@sap-ux/axios-extension": "1.22.3",
30
- "@sap-ux/adp-tooling": "0.14.38"
30
+ "@sap-ux/adp-tooling": "0.14.40"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@sap-devx/yeoman-ui-types": "1.14.4",