@sap-ux/generator-adp 0.9.44 → 0.9.46

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.
@@ -477,7 +477,9 @@ class default_1 extends yeoman_generator_1.default {
477
477
  ui5Version: { hide: true },
478
478
  ui5ValidationCli: { hide: true },
479
479
  enableTypeScript: { hide: true },
480
- addFlpConfig: { hide: true },
480
+ // In CF flow, inbounds are fetched after base app selection (CF services page), which comes after attributes.
481
+ // We assume true here so the wizard prepares the tile settings page; actual inbounds availability is handled by the FLP sub-gen.
482
+ addFlpConfig: { hasBaseAppInbounds: true },
481
483
  addDeployConfig: { hide: true },
482
484
  importKeyUserChanges: { hide: true }
483
485
  };
@@ -494,6 +496,28 @@ class default_1 extends yeoman_generator_1.default {
494
496
  const cfServicesQuestions = await this.cfPrompter.getPrompts(projectPath, this.cfConfig);
495
497
  this.cfServicesAnswers = await this.prompt(cfServicesQuestions);
496
498
  this.logger.info(`CF Services Answers: ${JSON.stringify(this.cfServicesAnswers, null, 2)}`);
499
+ const selectedApp = this.cfServicesAnswers.baseApp;
500
+ if (!selectedApp || !this.attributeAnswers?.addFlpConfig) {
501
+ return;
502
+ }
503
+ try {
504
+ const cfInbounds = await (0, adp_tooling_1.getCfBaseAppInbounds)(selectedApp.appId, selectedApp.appHostId, this.cfConfig, this.logger);
505
+ // Register FLP wizard pages now that we know if inbounds are available
506
+ (0, steps_1.updateFlpWizardSteps)(!!cfInbounds, this.prompts, this.attributeAnswers.projectName, true);
507
+ if (cfInbounds) {
508
+ await (0, subgenHelpers_1.addFlpGen)({
509
+ vscode: this.vscode,
510
+ projectRootPath: this._getProjectPath(),
511
+ inbounds: cfInbounds,
512
+ layer: this.layer,
513
+ prompts: this.prompts,
514
+ isCfProject: true
515
+ }, this.composeWith.bind(this), this.logger, this.appWizard);
516
+ }
517
+ }
518
+ catch (e) {
519
+ this.logger.warn(`Could not fetch CF inbounds for FLP configuration: ${e.message}`);
520
+ }
497
521
  }
498
522
  /**
499
523
  * Retrieves the ConfigPrompter instance from cache if it exists, otherwise creates a new instance.
@@ -22,9 +22,10 @@ export declare function getAddDeployConfigPrompt(prompts: YeomanUiSteps, _?: Add
22
22
  * Creates the Add FLP Config confirm prompt.
23
23
  *
24
24
  * @param {YeomanUiSteps} prompts - The Yeoman UI pages.
25
- * @param {boolean} projectType - The project type.
25
+ * @param {AdaptationProjectType} projectType - The project type.
26
26
  * @param {AddFlpConfigPromptOptions} options - Optional prompt options to control visibility.
27
+ * @param {boolean} isCfEnv - Whether the project targets Cloud Foundry.
27
28
  * @returns {AttributesQuestion} The prompt configuration for Add FLP config confirmation.
28
29
  */
29
- export declare function getFlpConfigPrompt(prompts: YeomanUiSteps, projectType?: AdaptationProjectType, options?: AddFlpConfigPromptOptions): AttributesQuestion;
30
+ export declare function getFlpConfigPrompt(prompts: YeomanUiSteps, projectType?: AdaptationProjectType, options?: AddFlpConfigPromptOptions, isCfEnv?: boolean): AttributesQuestion;
30
31
  //# sourceMappingURL=attributes.d.ts.map
@@ -32,7 +32,7 @@ function getPrompts(path, config, promptOptions) {
32
32
  [types_1.attributePromptNames.ui5ValidationCli]: getUi5VersionValidationPromptForCli(),
33
33
  [types_1.attributePromptNames.enableTypeScript]: getEnableTypeScriptPrompt(promptOptions?.[types_1.attributePromptNames.enableTypeScript]),
34
34
  [types_1.attributePromptNames.addDeployConfig]: getAddDeployConfigPrompt(prompts, promptOptions?.[types_1.attributePromptNames.addDeployConfig]),
35
- [types_1.attributePromptNames.addFlpConfig]: getFlpConfigPrompt(prompts, projectType, promptOptions?.[types_1.attributePromptNames.addFlpConfig]),
35
+ [types_1.attributePromptNames.addFlpConfig]: getFlpConfigPrompt(prompts, projectType, promptOptions?.[types_1.attributePromptNames.addFlpConfig], isCfEnv),
36
36
  [types_1.attributePromptNames.importKeyUserChanges]: getImportKeyUserChangesPrompt(prompts, promptOptions?.[types_1.attributePromptNames.importKeyUserChanges])
37
37
  };
38
38
  const questions = Object.entries(keyedPrompts)
@@ -228,11 +228,12 @@ function getAddDeployConfigPrompt(prompts, _) {
228
228
  * Creates the Add FLP Config confirm prompt.
229
229
  *
230
230
  * @param {YeomanUiSteps} prompts - The Yeoman UI pages.
231
- * @param {boolean} projectType - The project type.
231
+ * @param {AdaptationProjectType} projectType - The project type.
232
232
  * @param {AddFlpConfigPromptOptions} options - Optional prompt options to control visibility.
233
+ * @param {boolean} isCfEnv - Whether the project targets Cloud Foundry.
233
234
  * @returns {AttributesQuestion} The prompt configuration for Add FLP config confirmation.
234
235
  */
235
- function getFlpConfigPrompt(prompts, projectType, options) {
236
+ function getFlpConfigPrompt(prompts, projectType, options, isCfEnv) {
236
237
  return {
237
238
  type: 'confirm',
238
239
  name: types_1.attributePromptNames.addFlpConfig,
@@ -241,7 +242,7 @@ function getFlpConfigPrompt(prompts, projectType, options) {
241
242
  guiOptions: {
242
243
  breadcrumb: true
243
244
  },
244
- when: () => projectType === axios_extension_1.AdaptationProjectType.CLOUD_READY,
245
+ when: () => isCfEnv || projectType === axios_extension_1.AdaptationProjectType.CLOUD_READY,
245
246
  validate: (value, answers) => {
246
247
  (0, steps_1.updateFlpWizardSteps)(!!options?.hasBaseAppInbounds, prompts, answers.projectName, value);
247
248
  return true;
@@ -21,6 +21,7 @@ interface FlpGenProps {
21
21
  inbounds?: ManifestNamespace.Inbound;
22
22
  layer: FlexLayer;
23
23
  prompts: Prompts;
24
+ isCfProject?: boolean;
24
25
  }
25
26
  /**
26
27
  * Options required to invoke the deploy-config subgenerator.
@@ -43,7 +44,7 @@ interface DeployGenOptions {
43
44
  * @param {ToolsLogger} logger - Logger instance for tracking operations and errors.
44
45
  * @param {AppWizard} appWizard - AppWizard instance for interacting with the UI (optional).
45
46
  */
46
- export declare function addFlpGen({ projectRootPath, vscode, inbounds, layer, prompts }: FlpGenProps, composeWith: Generator['composeWith'], logger: ToolsLogger, appWizard: AppWizard): Promise<void>;
47
+ export declare function addFlpGen({ projectRootPath, vscode, inbounds, layer, prompts, isCfProject }: FlpGenProps, composeWith: Generator['composeWith'], logger: ToolsLogger, appWizard: AppWizard): Promise<void>;
47
48
  /**
48
49
  * Composes the Fiori deploy-config sub-generator using `composeWith`. This sub-generator configures
49
50
  * deployment for Fiori applications, such as to ABAP or Cloud Foundry environments.
@@ -25,7 +25,7 @@ const PACKAGE_ADDITIONAL_VALIDATION = {
25
25
  * @param {ToolsLogger} logger - Logger instance for tracking operations and errors.
26
26
  * @param {AppWizard} appWizard - AppWizard instance for interacting with the UI (optional).
27
27
  */
28
- async function addFlpGen({ projectRootPath, vscode, inbounds, layer, prompts }, composeWith, logger, appWizard) {
28
+ async function addFlpGen({ projectRootPath, vscode, inbounds, layer, prompts, isCfProject }, composeWith, logger, appWizard) {
29
29
  try {
30
30
  /**
31
31
  * We are using this namespace for now because '@sap/fiori:adp-flp-config' is not yet bundled in '@sap/generator-fiori'.
@@ -37,7 +37,8 @@ async function addFlpGen({ projectRootPath, vscode, inbounds, layer, prompts },
37
37
  layer,
38
38
  prompts,
39
39
  data: { projectRootPath },
40
- appWizard
40
+ appWizard,
41
+ isCfProject
41
42
  });
42
43
  logger.info(`'@sap/fiori:adp-flp-config' was called.`);
43
44
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "displayName": "SAPUI5 Adaptation Project",
4
4
  "homepage": "https://help.sap.com/viewer/584e0bcbfd4a4aff91c815cefa0bce2d/Cloud/en-US/ada9567b767941aba8d49fdb4fdedea7.html",
5
5
  "description": "Adaptation project allows you to create an app variant for an existing SAP Fiori elements-based or SAPUI5 freestyle application, without changing the original application.",
6
- "version": "0.9.44",
6
+ "version": "0.9.46",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -25,39 +25,39 @@
25
25
  "yeoman-generator"
26
26
  ],
27
27
  "dependencies": {
28
- "@sap-devx/yeoman-ui-types": "1.22.0",
28
+ "@sap-devx/yeoman-ui-types": "1.23.0",
29
29
  "@sap-devx/feature-toggle-node": "2.1.0",
30
- "i18next": "25.8.20",
30
+ "i18next": "25.10.10",
31
31
  "yeoman-generator": "5.10.0",
32
32
  "uuid": "11.1.0",
33
- "@sap-ux/adp-tooling": "0.18.106",
34
- "@sap-ux/axios-extension": "1.25.27",
33
+ "@sap-ux/adp-tooling": "0.18.108",
34
+ "@sap-ux/axios-extension": "1.25.28",
35
35
  "@sap-ux/btp-utils": "1.1.12",
36
- "@sap-ux/feature-toggle": "0.3.7",
37
- "@sap-ux/inquirer-common": "0.11.31",
38
- "@sap-ux/logger": "0.8.3",
36
+ "@sap-ux/feature-toggle": "0.3.8",
37
+ "@sap-ux/inquirer-common": "0.11.32",
38
+ "@sap-ux/logger": "0.8.4",
39
39
  "@sap-ux/project-access": "1.35.17",
40
- "@sap-ux/store": "1.5.11",
41
- "@sap-ux/system-access": "0.7.3",
42
- "@sap-ux/project-input-validator": "0.6.72",
43
- "@sap-ux/fiori-generator-shared": "0.13.93",
44
- "@sap-ux/odata-service-writer": "0.31.3",
45
- "@sap-ux/telemetry": "0.6.93"
40
+ "@sap-ux/store": "1.5.12",
41
+ "@sap-ux/system-access": "0.7.4",
42
+ "@sap-ux/project-input-validator": "0.6.73",
43
+ "@sap-ux/fiori-generator-shared": "0.13.94",
44
+ "@sap-ux/odata-service-writer": "0.31.4",
45
+ "@sap-ux/telemetry": "0.6.94"
46
46
  },
47
47
  "devDependencies": {
48
- "@jest/types": "30.2.0",
48
+ "@jest/types": "30.3.0",
49
49
  "@types/fs-extra": "11.0.4",
50
50
  "@types/inquirer": "8.2.6",
51
51
  "@types/vscode": "1.110.0",
52
52
  "@types/yeoman-environment": "2.10.11",
53
- "@types/yeoman-generator": "5.2.11",
53
+ "@types/yeoman-generator": "5.2.14",
54
54
  "@types/yeoman-test": "4.0.6",
55
55
  "@types/uuid": "11.0.0",
56
56
  "@vscode-logging/logger": "2.0.8",
57
57
  "fs-extra": "11.3.4",
58
58
  "rimraf": "6.1.3",
59
59
  "yeoman-test": "6.3.0",
60
- "@sap-ux/deploy-config-sub-generator": "0.5.127"
60
+ "@sap-ux/deploy-config-sub-generator": "0.5.129"
61
61
  },
62
62
  "engines": {
63
63
  "node": ">=20.x"