@sap-ux/adp-tooling 0.12.124 → 0.12.125

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.
@@ -4,9 +4,10 @@ import type { DescriptorVariant, AdpPreviewConfig } from '../types';
4
4
  * Get the app descriptor variant.
5
5
  *
6
6
  * @param {string} basePath - The path to the adaptation project.
7
+ * @param {Editor} fs - The mem-fs editor instance.
7
8
  * @returns {DescriptorVariant} The app descriptor variant.
8
9
  */
9
- export declare function getVariant(basePath: string): DescriptorVariant;
10
+ export declare function getVariant(basePath: string, fs?: Editor): DescriptorVariant;
10
11
  /**
11
12
  * Writes the updated variant content to the manifest.appdescr_variant file.
12
13
  *
@@ -12,9 +12,13 @@ const ui5_config_1 = require("@sap-ux/ui5-config");
12
12
  * Get the app descriptor variant.
13
13
  *
14
14
  * @param {string} basePath - The path to the adaptation project.
15
+ * @param {Editor} fs - The mem-fs editor instance.
15
16
  * @returns {DescriptorVariant} The app descriptor variant.
16
17
  */
17
- function getVariant(basePath) {
18
+ function getVariant(basePath, fs) {
19
+ if (fs) {
20
+ return fs.readJSON((0, path_1.join)(basePath, 'webapp', 'manifest.appdescr_variant'));
21
+ }
18
22
  return JSON.parse((0, fs_1.readFileSync)((0, path_1.join)(basePath, 'webapp', 'manifest.appdescr_variant'), 'utf-8'));
19
23
  }
20
24
  /**
@@ -24,7 +24,7 @@ async function generateInboundConfig(basePath, config, fs) {
24
24
  if (!fs) {
25
25
  fs = (0, mem_fs_editor_1.create)((0, mem_fs_1.create)());
26
26
  }
27
- const variant = (0, __1.getVariant)(basePath);
27
+ const variant = (0, __1.getVariant)(basePath, fs);
28
28
  if (!config?.inboundId) {
29
29
  config.addInboundId = true;
30
30
  config.inboundId = `${variant.id}.InboundID`;
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%3Aadp-tooling"
11
11
  },
12
- "version": "0.12.124",
12
+ "version": "0.12.125",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -34,14 +34,14 @@
34
34
  "uuid": "10.0.0",
35
35
  "@sap-ux/axios-extension": "1.18.5",
36
36
  "@sap-ux/btp-utils": "1.0.1",
37
- "@sap-ux/inquirer-common": "0.6.13",
37
+ "@sap-ux/inquirer-common": "0.6.14",
38
38
  "@sap-ux/logger": "0.6.0",
39
- "@sap-ux/project-access": "1.29.4",
39
+ "@sap-ux/project-access": "1.29.5",
40
40
  "@sap-ux/project-input-validator": "0.3.4",
41
41
  "@sap-ux/system-access": "0.5.30",
42
42
  "@sap-ux/ui5-config": "0.26.1",
43
- "@sap-ux/odata-service-writer": "0.25.7",
44
- "@sap-ux/i18n": "0.2.0"
43
+ "@sap-ux/odata-service-writer": "0.25.8",
44
+ "@sap-ux/i18n": "0.2.1"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/adm-zip": "0.5.5",