@sap-ux/fiori-freestyle-writer 0.22.13 → 0.22.15

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.
Files changed (2) hide show
  1. package/dist/index.js +8 -19
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -32,7 +32,7 @@ const i18n_1 = require("./i18n");
32
32
  * @returns Reference to a mem-fs-editor
33
33
  */
34
34
  function generate(basePath, data, fs) {
35
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
35
+ var _a, _b, _c, _d, _e, _f, _g;
36
36
  return __awaiter(this, void 0, void 0, function* () {
37
37
  // Load i18n translations asynchronously to ensure proper initialization.
38
38
  // This addresses occasional issues where i18n is not initialized in time, causing tests to fail.
@@ -47,13 +47,7 @@ function generate(basePath, data, fs) {
47
47
  const tmplPath = (0, path_1.join)(__dirname, '..', 'templates');
48
48
  // Common files
49
49
  const ignore = [isTypeScriptEnabled ? '**/*.js' : '**/*.ts'];
50
- // Check if sap.ushell is already in the ui5Libs array
51
- const ushellLib = 'sap.ushell';
52
- const ui5Libs = Array.isArray((_b = ffApp.ui5) === null || _b === void 0 ? void 0 : _b.ui5Libs) ? ffApp.ui5.ui5Libs : [(_c = ffApp.ui5) === null || _c === void 0 ? void 0 : _c.ui5Libs];
53
- if (!ui5Libs.includes(ushellLib)) {
54
- ui5Libs.push(ushellLib);
55
- }
56
- fs.copyTpl((0, path_1.join)(tmplPath, 'common', 'add'), basePath, Object.assign(Object.assign({}, ffApp), { ui5: Object.assign(Object.assign({}, ffApp.ui5), { ui5Libs }), escapeFLPText: defaults_1.escapeFLPText }), undefined, {
50
+ fs.copyTpl((0, path_1.join)(tmplPath, 'common', 'add'), basePath, Object.assign(Object.assign({}, ffApp), { escapeFLPText: defaults_1.escapeFLPText }), undefined, {
57
51
  globOptions: { ignore, dot: true }
58
52
  });
59
53
  fs.copyTpl((0, path_1.join)(tmplPath, ffApp.template.type, 'add'), basePath, ffApp, undefined, {
@@ -78,13 +72,13 @@ function generate(basePath, data, fs) {
78
72
  fs.extendJSON(packagePath, JSON.parse((0, ejs_1.render)(fs.read((0, path_1.join)(tmplPath, 'common', 'extend', 'package.json')), ffApp, {})));
79
73
  const packageJson = JSON.parse(fs.read(packagePath));
80
74
  packageJson.scripts = Object.assign(Object.assign({}, packageJson.scripts), (0, packageConfig_1.getPackageJsonTasks)({
81
- localOnly: !!ffApp.service && !((_d = ffApp.service) === null || _d === void 0 ? void 0 : _d.url),
82
- addMock: !!((_e = ffApp.service) === null || _e === void 0 ? void 0 : _e.metadata),
83
- sapClient: (_f = ffApp.service) === null || _f === void 0 ? void 0 : _f.client,
75
+ localOnly: !!ffApp.service && !((_b = ffApp.service) === null || _b === void 0 ? void 0 : _b.url),
76
+ addMock: !!((_c = ffApp.service) === null || _c === void 0 ? void 0 : _c.metadata),
77
+ sapClient: (_d = ffApp.service) === null || _d === void 0 ? void 0 : _d.client,
84
78
  flpAppId: ffApp.app.flpAppId,
85
- startFile: (_g = data === null || data === void 0 ? void 0 : data.app) === null || _g === void 0 ? void 0 : _g.startFile,
86
- localStartFile: (_h = data === null || data === void 0 ? void 0 : data.app) === null || _h === void 0 ? void 0 : _h.localStartFile,
87
- generateIndex: (_j = ffApp.appOptions) === null || _j === void 0 ? void 0 : _j.generateIndex
79
+ startFile: (_e = data === null || data === void 0 ? void 0 : data.app) === null || _e === void 0 ? void 0 : _e.startFile,
80
+ localStartFile: (_f = data === null || data === void 0 ? void 0 : data.app) === null || _f === void 0 ? void 0 : _f.localStartFile,
81
+ generateIndex: (_g = ffApp.appOptions) === null || _g === void 0 ? void 0 : _g.generateIndex
88
82
  }));
89
83
  fs.writeJSON(packagePath, packageJson);
90
84
  // Add service to the project if provided
@@ -98,11 +92,6 @@ function generate(basePath, data, fs) {
98
92
  ui5LocalConfig.addFioriToolsProxydMiddleware({});
99
93
  fs.write(ui5LocalConfigPath, ui5LocalConfig.toString());
100
94
  }
101
- // Extend ui5-local.yaml with additional UI5 lib
102
- const ui5LocalConfigPath = (0, path_1.join)(basePath, 'ui5-local.yaml');
103
- const ui5LocalConfig = yield ui5_config_1.UI5Config.newInstance(fs.read(ui5LocalConfigPath));
104
- ui5LocalConfig.addUI5Libs([ushellLib]);
105
- fs.write(ui5LocalConfigPath, ui5LocalConfig.toString());
106
95
  return fs;
107
96
  });
108
97
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sap-ux/fiori-freestyle-writer",
3
3
  "description": "SAP Fiori freestyle application writer",
4
- "version": "0.22.13",
4
+ "version": "0.22.15",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -26,9 +26,9 @@
26
26
  "mem-fs": "2.1.0",
27
27
  "mem-fs-editor": "9.4.0",
28
28
  "read-pkg-up": "7.0.1",
29
- "@sap-ux/odata-service-writer": "0.20.3",
30
- "@sap-ux/ui5-application-writer": "0.26.16",
31
- "@sap-ux/ui5-config": "0.22.8"
29
+ "@sap-ux/odata-service-writer": "0.20.5",
30
+ "@sap-ux/ui5-application-writer": "0.26.18",
31
+ "@sap-ux/ui5-config": "0.22.10"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/ejs": "3.1.2",