@sap-ux/create 0.13.162 → 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.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  [![Changelog](https://img.shields.io/badge/changelog-8A2BE2)](https://github.com/SAP/open-ux-tools/blob/main/packages/create/CHANGELOG.md) [![Github repo](https://img.shields.io/badge/github-repo-blue)](https://github.com/SAP/open-ux-tools/tree/main/packages/create)
2
2
  # [`@sap-ux/create`](https://github.com/SAP/open-ux-tools/tree/main/packages/create) CLI Reference
3
3
 
4
- Configure features for SAP Fiori applications and projects (@sap-ux/create version 0.13.161).
4
+ Configure features for SAP Fiori applications and projects.
5
5
 
6
6
  # [Usage](#usage)
7
7
 
@@ -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/dist/cli/index.js CHANGED
@@ -46,7 +46,7 @@ function getCommanderProgram() {
46
46
  const logger = (0, tracing_1.getLogger)();
47
47
  const program = new commander_1.Command();
48
48
  const version = getVersion();
49
- program.description(`Configure features for SAP Fiori applications and projects (@sap-ux/create version ${version}).`);
49
+ program.description(`Configure features for SAP Fiori applications and projects.`);
50
50
  program.addHelpText('after', `\nExample Usage:
51
51
  'npx --yes @sap-ux/create@latest add --help' Get the available subcommands for the 'add' command.
52
52
  'npx --yes @sap-ux/create@latest add html --help' Get the available options for the 'add html' command.
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.162",
4
+ "version": "0.13.164",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -30,19 +30,19 @@
30
30
  "mem-fs": "2.1.0",
31
31
  "mem-fs-editor": "9.4.0",
32
32
  "prompts": "2.4.2",
33
+ "@sap-ux/abap-deploy-config-inquirer": "1.6.46",
33
34
  "@sap-ux/abap-deploy-config-writer": "0.2.33",
35
+ "@sap-ux/adp-tooling": "0.18.2",
34
36
  "@sap-ux/app-config-writer": "0.6.56",
35
- "@sap-ux/abap-deploy-config-inquirer": "1.6.46",
36
37
  "@sap-ux/cap-config-writer": "0.12.24",
37
- "@sap-ux/adp-tooling": "0.18.0",
38
38
  "@sap-ux/logger": "0.7.1",
39
- "@sap-ux/odata-service-writer": "0.27.29",
40
39
  "@sap-ux/mockserver-config-writer": "0.9.25",
41
- "@sap-ux/preview-middleware": "0.23.51",
40
+ "@sap-ux/odata-service-writer": "0.27.29",
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.59"
45
+ "@sap-ux/flp-config-inquirer": "0.4.61"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/diff": "5.0.9",