@sap-ux/fe-fpm-writer 0.40.3 → 0.40.5

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.
@@ -18,7 +18,7 @@ function setCommonDefaults(config, manifestPath, manifest) {
18
18
  // set target folder if not provided
19
19
  config.folder = config.folder || `ext/${config.name[0].toLocaleLowerCase() + config.name.substring(1)}`;
20
20
  // calculate namespace and path for generated artifacts
21
- config.ns = `${manifest['sap.app'].id}.${config.folder.replace(/[\/\\]/g, '.')}`;
21
+ config.ns = `${manifest['sap.app'].id}.${config.folder.replace(/[/\\]/g, '.')}`;
22
22
  config.path = (0, node_path_1.join)((0, node_path_1.dirname)(manifestPath), config.folder);
23
23
  return config;
24
24
  }
@@ -13,7 +13,7 @@ const CHAR_TAB = '\t';
13
13
  */
14
14
  function getLineTabInfo(line) {
15
15
  let tabSize;
16
- const symbol = line[0] === CHAR_TAB ? CHAR_TAB : CHAR_SPACE;
16
+ const symbol = line.startsWith(CHAR_TAB) ? CHAR_TAB : CHAR_SPACE;
17
17
  // get count of tabs
18
18
  for (let i = 0; i < line.length; i++) {
19
19
  const char = line[i];
@@ -35,10 +35,10 @@ function getLineTabInfo(line) {
35
35
  */
36
36
  function detectTabSpacing(content) {
37
37
  let tabSize;
38
- const tabSymbols = [CHAR_SPACE, CHAR_TAB];
38
+ const tabSymbols = new Set([CHAR_SPACE, CHAR_TAB]);
39
39
  const lines = content.split(/\r\n|\n/);
40
40
  const lineWithSpacing = lines.find((line) => {
41
- return tabSymbols.includes(line[0]);
41
+ return tabSymbols.has(line[0]);
42
42
  });
43
43
  if (lineWithSpacing) {
44
44
  tabSize = getLineTabInfo(lineWithSpacing);
@@ -93,9 +93,9 @@ function getManifestJsonExtensionHelper(config) {
93
93
  return (key, value) => {
94
94
  switch (key) {
95
95
  case 'routing':
96
- value.routes = value.routes ?? [];
96
+ value.routes ??= [];
97
97
  break;
98
- case 'routes':
98
+ case 'routes': {
99
99
  const routes = value;
100
100
  routes.push({
101
101
  name: config.id ?? `${config.entity}${config.name}`,
@@ -103,6 +103,7 @@ function getManifestJsonExtensionHelper(config) {
103
103
  target: generateRouteTarget(routes, config.id ?? `${config.entity}${config.name}`, config.fcl, config.navigation)
104
104
  });
105
105
  break;
106
+ }
106
107
  default:
107
108
  break;
108
109
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sap-ux/fe-fpm-writer",
3
3
  "description": "SAP Fiori elements flexible programming model writer",
4
- "version": "0.40.3",
4
+ "version": "0.40.5",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -30,8 +30,8 @@
30
30
  "semver": "7.5.4",
31
31
  "xml-formatter": "2.6.1",
32
32
  "xpath": "0.0.33",
33
- "@sap-ux/fiori-annotation-api": "0.8.3",
34
- "@sap-ux/project-access": "1.33.0",
33
+ "@sap-ux/fiori-annotation-api": "0.8.5",
34
+ "@sap-ux/project-access": "1.33.1",
35
35
  "@sap-ux/logger": "0.8.0"
36
36
  },
37
37
  "devDependencies": {
@@ -42,7 +42,7 @@
42
42
  "@types/semver": "7.5.2",
43
43
  "@types/vinyl": "2.0.7",
44
44
  "@sap-ux/i18n": "0.3.7",
45
- "@sap-ux/ui-prompting": "0.5.11"
45
+ "@sap-ux/ui-prompting": "0.5.12"
46
46
  },
47
47
  "engines": {
48
48
  "node": ">=20.x"