@sap-ux/generator-adp 0.3.61 → 0.3.63

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.
@@ -184,12 +184,12 @@ class default_1 extends yeoman_generator_1.default {
184
184
  this._updateWizardStepsAfterNavigation();
185
185
  this.logger.info(`Project Attributes: ${JSON.stringify(this.attributeAnswers, null, 2)}`);
186
186
  if (this.attributeAnswers.addDeployConfig) {
187
- const client = (await this.systemLookup.getSystemByName(this.configAnswers.system))?.Client;
187
+ const system = await this.systemLookup.getSystemByName(this.configAnswers.system);
188
188
  (0, subgenHelpers_1.addDeployGen)({
189
189
  projectName: this.attributeAnswers.projectName,
190
- targetFolder: this.attributeAnswers.targetFolder,
190
+ projectPath: this.attributeAnswers.targetFolder,
191
191
  connectedSystem: this.configAnswers.system,
192
- client
192
+ system
193
193
  }, this.composeWith.bind(this), this.logger, this.appWizard);
194
194
  }
195
195
  if (this.attributeAnswers?.addFlpConfig) {
@@ -2,7 +2,7 @@ import type Generator from 'yeoman-generator';
2
2
  import type { AppWizard } from '@sap-devx/yeoman-ui-types';
3
3
  import type { ToolsLogger } from '@sap-ux/logger';
4
4
  import type { ManifestNamespace } from '@sap-ux/project-access';
5
- import type { ConfigAnswers, AttributesAnswers, SystemLookup, FlexLayer } from '@sap-ux/adp-tooling';
5
+ import type { ConfigAnswers, AttributesAnswers, SystemLookup, FlexLayer, Endpoint } from '@sap-ux/adp-tooling';
6
6
  /**
7
7
  * Parameters required for composing the extension project generator.
8
8
  */
@@ -25,10 +25,9 @@ interface FlpGenProps {
25
25
  */
26
26
  interface DeployGenOptions {
27
27
  projectName: string;
28
- targetFolder: string;
29
- client?: string;
28
+ projectPath: string;
30
29
  connectedSystem: string;
31
- destinationName?: string;
30
+ system?: Endpoint;
32
31
  }
33
32
  /**
34
33
  * Composes the FLP config sub-generator using `composeWith`. This generator is used to scaffold
@@ -49,15 +48,13 @@ export declare function addFlpGen({ projectRootPath, vscode, inbounds, layer }:
49
48
  * @param {DeployGenOptions} options - Deployment generator input options
50
49
  * @param {string} options.projectName - Project name
51
50
  * @param {string} options.targetFolder - Folder where project will be generated
52
- * @param {string} options.applicationType - Type of application being deployed
53
- * @param {string} options.client - (Optional) ABAP client number
54
- * @param {string} options.connectedSystem - (Optional) Connected system data
55
- * @param {string} options.destinationName - (Optional) Destination name for deployment
51
+ * @param {string} options.connectedSystem - Connected system data
52
+ * @param {Endpoint} options.system - (Optional) System endpoint with connection details
56
53
  * @param {Generator['composeWith']} composeWith - Yeoman composeWith method from generator context
57
54
  * @param {ToolsLogger} logger - Logger for info and error output
58
55
  * @param {AppWizard} appWizard - Optional AppWizard instance for displaying UI messages
59
56
  */
60
- export declare function addDeployGen({ projectName, targetFolder, client, connectedSystem, destinationName }: DeployGenOptions, composeWith: Generator['composeWith'], logger: ToolsLogger, appWizard: AppWizard): void;
57
+ export declare function addDeployGen({ projectName, projectPath, connectedSystem, system }: DeployGenOptions, composeWith: Generator['composeWith'], logger: ToolsLogger, appWizard: AppWizard): void;
61
58
  /**
62
59
  * Composes the extension project sub-generator if the base app is unsupported.
63
60
  *
@@ -5,6 +5,14 @@ exports.addDeployGen = addDeployGen;
5
5
  exports.addExtProjectGen = addExtProjectGen;
6
6
  const i18n_1 = require("./i18n");
7
7
  const extension_project_1 = require("../app/extension-project");
8
+ /**
9
+ * Static validation configuration for package prompts in ADP deployment.
10
+ */
11
+ const PACKAGE_ADDITIONAL_VALIDATION = {
12
+ shouldValidatePackageForStartingPrefix: true,
13
+ shouldValidatePackageType: true,
14
+ shouldValidateFormatAndSpecialCharacters: true
15
+ };
8
16
  /**
9
17
  * Composes the FLP config sub-generator using `composeWith`. This generator is used to scaffold
10
18
  * the FLP (Fiori Launchpad) configuration for the project.
@@ -43,27 +51,39 @@ function addFlpGen({ projectRootPath, vscode, inbounds, layer }, composeWith, lo
43
51
  * @param {DeployGenOptions} options - Deployment generator input options
44
52
  * @param {string} options.projectName - Project name
45
53
  * @param {string} options.targetFolder - Folder where project will be generated
46
- * @param {string} options.applicationType - Type of application being deployed
47
- * @param {string} options.client - (Optional) ABAP client number
48
- * @param {string} options.connectedSystem - (Optional) Connected system data
49
- * @param {string} options.destinationName - (Optional) Destination name for deployment
54
+ * @param {string} options.connectedSystem - Connected system data
55
+ * @param {Endpoint} options.system - (Optional) System endpoint with connection details
50
56
  * @param {Generator['composeWith']} composeWith - Yeoman composeWith method from generator context
51
57
  * @param {ToolsLogger} logger - Logger for info and error output
52
58
  * @param {AppWizard} appWizard - Optional AppWizard instance for displaying UI messages
53
59
  */
54
- function addDeployGen({ projectName, targetFolder, client, connectedSystem, destinationName }, composeWith, logger, appWizard) {
60
+ function addDeployGen({ projectName, projectPath, connectedSystem, system }, composeWith, logger, appWizard) {
55
61
  try {
62
+ const subGenPromptOptions = {
63
+ ui5AbapRepo: { hideIfOnPremise: true },
64
+ transportInputChoice: { hideIfOnPremise: true },
65
+ overwriteAbapConfig: { hide: true },
66
+ packageAutocomplete: {
67
+ additionalValidation: PACKAGE_ADDITIONAL_VALIDATION
68
+ },
69
+ packageManual: {
70
+ additionalValidation: PACKAGE_ADDITIONAL_VALIDATION
71
+ },
72
+ targetSystem: { additionalValidation: { shouldRestrictDifferentSystemType: true } }
73
+ };
56
74
  const generatorOptions = {
57
75
  launchDeployConfigAsSubGenerator: true,
58
76
  projectName,
59
- projectPath: targetFolder,
77
+ projectPath,
60
78
  telemetryData: { appType: 'Fiori Adaptation' },
61
79
  appWizard,
62
80
  logWrapper: logger,
63
81
  target: 'abap',
64
- ...(client && { appGenClient: client }),
82
+ subGenPromptOptions,
65
83
  ...(connectedSystem && { connectedSystem }),
66
- ...(destinationName && { appGenDestination: destinationName })
84
+ ...(system?.Name && { appGenDestination: system.Name }),
85
+ ...(system?.Client && { appGenClient: system.Client }),
86
+ ...(system?.Url && { appGenServiceHost: system.Url })
67
87
  };
68
88
  composeWith('@sap/fiori:deploy-config', generatorOptions);
69
89
  logger.info(`'@sap/fiori:deploy-config' was called.`);
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.3.61",
6
+ "version": "0.3.63",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -30,18 +30,18 @@
30
30
  "i18next": "25.3.0",
31
31
  "yeoman-generator": "5.10.0",
32
32
  "uuid": "10.0.0",
33
- "@sap-ux/adp-tooling": "0.15.14",
33
+ "@sap-ux/adp-tooling": "0.15.15",
34
34
  "@sap-ux/axios-extension": "1.22.5",
35
35
  "@sap-ux/btp-utils": "1.1.0",
36
36
  "@sap-ux/feature-toggle": "0.3.0",
37
- "@sap-ux/inquirer-common": "0.7.32",
37
+ "@sap-ux/inquirer-common": "0.7.33",
38
38
  "@sap-ux/logger": "0.7.0",
39
39
  "@sap-ux/project-access": "1.30.10",
40
40
  "@sap-ux/store": "1.1.2",
41
41
  "@sap-ux/system-access": "0.6.12",
42
42
  "@sap-ux/project-input-validator": "0.6.15",
43
43
  "@sap-ux/fiori-generator-shared": "0.13.7",
44
- "@sap-ux/adp-flp-config-sub-generator": "0.1.60",
44
+ "@sap-ux/adp-flp-config-sub-generator": "0.1.61",
45
45
  "@sap-ux/odata-service-writer": "0.27.15"
46
46
  },
47
47
  "devDependencies": {
@@ -57,7 +57,7 @@
57
57
  "fs-extra": "10.0.0",
58
58
  "rimraf": "5.0.5",
59
59
  "yeoman-test": "6.3.0",
60
- "@sap-ux/deploy-config-sub-generator": "0.3.56"
60
+ "@sap-ux/deploy-config-sub-generator": "0.3.57"
61
61
  },
62
62
  "engines": {
63
63
  "node": ">=20.x"