@sap-ux/create 0.13.163 → 0.13.164

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.
@@ -59,20 +59,17 @@ async function addInboundNavigationConfig(basePath, simulate, yamlPath) {
59
59
  const inbounds = await getInbounds(basePath, yamlPath, fs, logger, variant);
60
60
  let tileSettingsAnswers;
61
61
  if (inbounds && isAdp) {
62
- tileSettingsAnswers = await (0, common_1.promptYUIQuestions)((0, flp_config_inquirer_2.getTileSettingsQuestions)(), false);
62
+ tileSettingsAnswers = await (0, common_1.promptYUIQuestions)((0, flp_config_inquirer_2.getTileSettingsQuestions)(inbounds), false);
63
63
  }
64
64
  const answers = await getUserAnswers(inbounds, isAdp, tileSettingsAnswers);
65
- if (!answers) {
65
+ if (!answers && tileSettingsAnswers?.tileHandlingAction !== flp_config_inquirer_1.tileActions.REPLACE) {
66
66
  logger.info('User chose not to overwrite existing inbound navigation configuration.');
67
67
  return;
68
68
  }
69
- if (variant.isAdp) {
70
- const config = (0, flp_config_inquirer_2.getAdpFlpInboundsWriterConfig)(answers, variant.content.layer, tileSettingsAnswers);
71
- await (0, adp_tooling_1.generateInboundConfig)(basePath, config, fs);
72
- }
73
- else {
74
- await (0, app_config_writer_1.generateInboundNavigationConfig)(basePath, answers, true, fs);
75
- }
69
+ await generateConfig(basePath, {
70
+ flpConfigAnswers: answers,
71
+ tileSettingsAnswers
72
+ }, variant, fs, inbounds);
76
73
  if (!simulate) {
77
74
  fs.commit(() => logger.info(`Inbound navigation configuration complete.`));
78
75
  }
@@ -129,7 +126,8 @@ async function getUserAnswers(inbounds, isAdp, tileSettingsAnswers) {
129
126
  if (!isAdp) {
130
127
  promptOptions = {
131
128
  inboundId: { hide: true },
132
- additionalParameters: { hide: true }
129
+ additionalParameters: { hide: true },
130
+ confirmReplace: { hide: true }
133
131
  };
134
132
  }
135
133
  else {
@@ -142,4 +140,26 @@ async function getUserAnswers(inbounds, isAdp, tileSettingsAnswers) {
142
140
  }
143
141
  return config?.overwrite === false ? undefined : config;
144
142
  }
143
+ /**
144
+ * Generates the inbound navigation configuration for the given project.
145
+ *
146
+ * @param {string} basePath - The path to the application root.
147
+ * @param {object} answers - The user-provided answers.
148
+ * @param {FLPConfigAnswers} answers.flpConfigAnswers - The user-provided configuration answers.
149
+ * @param {TileSettingsAnswers} [answers.tileSettingsAnswers] - The answers for tile settings.
150
+ * @param {Variant} variant - The descriptor variant information.
151
+ * @param {Editor} fs - The mem-fs editor instance.
152
+ * @param {ManifestNamespace.Inbound} [inbounds] - Base application inbounds
153
+ * @returns {Promise<void>} A promise that resolves when the configuration is generated.
154
+ */
155
+ async function generateConfig(basePath, answers, variant, fs, inbounds) {
156
+ const { flpConfigAnswers, tileSettingsAnswers } = answers;
157
+ if (variant.isAdp) {
158
+ const config = (0, flp_config_inquirer_2.getAdpFlpInboundsWriterConfig)(flpConfigAnswers, variant.content.layer, tileSettingsAnswers, inbounds);
159
+ await (0, adp_tooling_1.generateInboundConfig)(basePath, config, fs);
160
+ }
161
+ else {
162
+ await (0, app_config_writer_1.generateInboundNavigationConfig)(basePath, flpConfigAnswers, true, fs);
163
+ }
164
+ }
145
165
  //# sourceMappingURL=navigation-config.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sap-ux/create",
3
3
  "description": "SAP Fiori tools module to add or remove features",
4
- "version": "0.13.163",
4
+ "version": "0.13.164",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -32,17 +32,17 @@
32
32
  "prompts": "2.4.2",
33
33
  "@sap-ux/abap-deploy-config-inquirer": "1.6.46",
34
34
  "@sap-ux/abap-deploy-config-writer": "0.2.33",
35
- "@sap-ux/adp-tooling": "0.18.1",
35
+ "@sap-ux/adp-tooling": "0.18.2",
36
36
  "@sap-ux/app-config-writer": "0.6.56",
37
37
  "@sap-ux/cap-config-writer": "0.12.24",
38
38
  "@sap-ux/logger": "0.7.1",
39
39
  "@sap-ux/mockserver-config-writer": "0.9.25",
40
40
  "@sap-ux/odata-service-writer": "0.27.29",
41
- "@sap-ux/preview-middleware": "0.23.52",
41
+ "@sap-ux/preview-middleware": "0.23.53",
42
42
  "@sap-ux/project-access": "1.32.8",
43
43
  "@sap-ux/system-access": "0.6.28",
44
44
  "@sap-ux/ui5-config": "0.29.9",
45
- "@sap-ux/flp-config-inquirer": "0.4.60"
45
+ "@sap-ux/flp-config-inquirer": "0.4.61"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/diff": "5.0.9",