@sap-ux/ui5-application-writer 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_application_writer_i18n_json_1 = __importDefault(require("./translations/ui5-application-writer.i18n.json"));
10
11
  const NS = 'ui5-application-writer';
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_application_writer_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 write will still work
package/dist/index.js CHANGED
@@ -57,9 +57,10 @@ async function generate(basePath, ui5AppConfig, fs) {
57
57
  });
58
58
  ui5Config.addFioriToolsAppReloadMiddleware();
59
59
  const previewMiddleWareOpts = getPreviewMiddlewareOpts(ui5App.app, ui5App.ui5?.ui5Theme, ui5AppConfig.appOptions?.useVirtualPreviewEndpoints);
60
+ const fioriToolsPreviewConfigMiddlware = (0, ui5_config_1.getPreviewMiddlewareConfig)(previewMiddleWareOpts);
60
61
  // add preview middleware to ui5Config for edmx projects and cap apps using virtual endpoints
61
62
  if (isEdmxProjectType || ui5AppConfig.appOptions?.useVirtualPreviewEndpoints) {
62
- ui5Config.addFioriToolsPreviewMiddleware(previewMiddleWareOpts);
63
+ ui5Config.updateCustomMiddleware(fioriToolsPreviewConfigMiddlware);
63
64
  }
64
65
  if (isEdmxProjectType) {
65
66
  const ui5LocalConfigPath = (0, path_1.join)(basePath, 'ui5-local.yaml');
@@ -70,7 +71,7 @@ async function generate(basePath, ui5AppConfig, fs) {
70
71
  // Add optional features
71
72
  await (0, options_1.applyOptionalFeatures)(ui5App, fs, basePath, tmplPath, [ui5Config, ui5LocalConfig]);
72
73
  // add preview middleware to ui5LocalConfig
73
- ui5LocalConfig.addFioriToolsPreviewMiddleware(previewMiddleWareOpts);
74
+ ui5LocalConfig.updateCustomMiddleware(fioriToolsPreviewConfigMiddlware);
74
75
  // write ui5 local yaml
75
76
  fs.write(ui5LocalConfigPath, ui5LocalConfig.toString());
76
77
  }
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-application-writer"
11
11
  },
12
- "version": "1.5.6",
12
+ "version": "1.5.8",
13
13
  "license": "Apache-2.0",
14
14
  "main": "dist/index.js",
15
15
  "files": [
@@ -22,12 +22,12 @@
22
22
  "dependencies": {
23
23
  "@ui5/manifest": "1.66.0",
24
24
  "ejs": "3.1.10",
25
- "i18next": "21.10.0",
25
+ "i18next": "25.3.0",
26
26
  "lodash": "4.17.21",
27
27
  "mem-fs": "2.1.0",
28
28
  "mem-fs-editor": "9.4.0",
29
29
  "semver": "7.5.4",
30
- "@sap-ux/ui5-config": "0.28.3"
30
+ "@sap-ux/ui5-config": "0.29.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/ejs": "3.1.2",
@@ -37,8 +37,8 @@
37
37
  "@types/mem-fs-editor": "7.0.1",
38
38
  "@types/semver": "7.5.2",
39
39
  "fs-extra": "10.0.0",
40
- "@sap-ux/project-access": "1.30.4",
41
- "@sap-ux/eslint-plugin-fiori-tools": "0.6.0"
40
+ "@sap-ux/eslint-plugin-fiori-tools": "0.6.0",
41
+ "@sap-ux/project-access": "1.30.6"
42
42
  },
43
43
  "engines": {
44
44
  "node": ">=20.x"