@sap-ux/generator-adp 0.5.15 → 0.6.0

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.
@@ -96,14 +96,14 @@ export default class extends Generator {
96
96
  * CF services answers.
97
97
  */
98
98
  private cfServicesAnswers;
99
- /**
100
- * Indicates if the extension is installed.
101
- */
102
- private readonly isExtensionInstalled;
103
99
  /**
104
100
  * Indicates if CF is installed.
105
101
  */
106
102
  private cfInstalled;
103
+ /**
104
+ * Indicates if the CF feature is enabled.
105
+ */
106
+ private readonly isCfFeatureEnabled;
107
107
  /**
108
108
  * Creates an instance of the generator.
109
109
  *
@@ -9,6 +9,7 @@ const yeoman_generator_1 = __importDefault(require("yeoman-generator"));
9
9
  const yeoman_ui_types_1 = require("@sap-devx/yeoman-ui-types");
10
10
  const adp_tooling_1 = require("@sap-ux/adp-tooling");
11
11
  const fiori_generator_shared_1 = require("@sap-ux/fiori-generator-shared");
12
+ const btp_utils_1 = require("@sap-ux/btp-utils");
12
13
  const logger_1 = require("@sap-ux/logger");
13
14
  const feature_toggle_1 = require("@sap-ux/feature-toggle");
14
15
  const telemetryEvents_1 = require("../telemetryEvents");
@@ -29,7 +30,6 @@ const configuration_1 = require("./questions/configuration");
29
30
  const default_values_1 = require("./questions/helper/default-values");
30
31
  const validators_1 = require("./questions/helper/validators");
31
32
  const types_1 = require("./types");
32
- const btp_utils_1 = require("@sap-ux/btp-utils");
33
33
  const target_env_1 = require("./questions/target-env");
34
34
  const generatorTitle = 'Adaptation Project';
35
35
  /**
@@ -128,14 +128,14 @@ class default_1 extends yeoman_generator_1.default {
128
128
  * CF services answers.
129
129
  */
130
130
  cfServicesAnswers;
131
- /**
132
- * Indicates if the extension is installed.
133
- */
134
- isExtensionInstalled;
135
131
  /**
136
132
  * Indicates if CF is installed.
137
133
  */
138
134
  cfInstalled;
135
+ /**
136
+ * Indicates if the CF feature is enabled.
137
+ */
138
+ isCfFeatureEnabled;
139
139
  /**
140
140
  * Creates an instance of the generator.
141
141
  *
@@ -151,11 +151,14 @@ class default_1 extends yeoman_generator_1.default {
151
151
  this._setupLogging();
152
152
  this.options = opts;
153
153
  this.isMtaYamlFound = (0, adp_tooling_1.isMtaProject)(process.cwd());
154
- this.isExtensionInstalled = (0, feature_toggle_1.isInternalFeaturesSettingEnabled)()
155
- ? (0, fiori_generator_shared_1.isExtensionInstalled)(opts.vscode, 'SAP.adp-ve-bas-ext')
156
- : false;
154
+ this.isCfFeatureEnabled = (0, feature_toggle_1.isFeatureEnabled)('sap.ux.appGenerator.testBetaFeatures.adpCfExperimental');
155
+ this.logger.debug(`isCfFeatureEnabled: ${this.isCfFeatureEnabled}`);
157
156
  const jsonInputString = (0, parse_json_input_1.getFirstArgAsString)(args);
158
157
  this.jsonInput = (0, parse_json_input_1.parseJsonInput)(jsonInputString, this.logger);
158
+ // Force the generator to overwrite existing files without additional prompting
159
+ if (this.env.conflicter) {
160
+ this.env.conflicter.force = this.options.force ?? true;
161
+ }
159
162
  if (!this.jsonInput) {
160
163
  this.env.lookup({
161
164
  packagePatterns: ['@sap/generator-fiori', '@bas-dev/generator-extensibility-sub']
@@ -182,7 +185,7 @@ class default_1 extends yeoman_generator_1.default {
182
185
  this.logger.info(`isCfInstalled: ${this.cfInstalled}`);
183
186
  const isInternalUsage = (0, feature_toggle_1.isInternalFeaturesSettingEnabled)();
184
187
  if (!this.jsonInput) {
185
- const shouldShowTargetEnv = (0, btp_utils_1.isAppStudio)() && this.cfInstalled && this.isExtensionInstalled;
188
+ const shouldShowTargetEnv = (0, btp_utils_1.isAppStudio)() && this.cfInstalled && this.isCfFeatureEnabled;
186
189
  this.prompts.splice(0, 0, (0, steps_1.getWizardPages)(shouldShowTargetEnv));
187
190
  this.prompter = this._getOrCreatePrompter();
188
191
  this.cfPrompter = new cf_services_1.CFServicesPrompter(isInternalUsage, this.isCfLoggedIn, this.logger);
@@ -366,7 +369,7 @@ class default_1 extends yeoman_generator_1.default {
366
369
  * Sets the target environment and updates related state accordingly.
367
370
  */
368
371
  async _determineTargetEnv() {
369
- const hasRequiredExtensions = this.isExtensionInstalled && this.cfInstalled;
372
+ const hasRequiredExtensions = this.isCfFeatureEnabled && this.cfInstalled;
370
373
  if ((0, btp_utils_1.isAppStudio)() && hasRequiredExtensions) {
371
374
  await this._promptForTargetEnvironment();
372
375
  }
@@ -567,7 +567,13 @@ class ConfigPrompter {
567
567
  * @returns {Promise<void>} A promise that resolves once all version data is loaded and assigned.
568
568
  */
569
569
  async loadUI5Versions() {
570
- const version = await (0, adp_tooling_1.getSystemUI5Version)(this.abapProvider);
570
+ let version;
571
+ try {
572
+ version = await (0, adp_tooling_1.getSystemUI5Version)(this.abapProvider, this.logger);
573
+ }
574
+ catch (error) {
575
+ this.logger.debug(`Could not fetch the system UI5 version: ${error.message}.`);
576
+ }
571
577
  this.systemVersion = (0, adp_tooling_1.checkSystemVersionPattern)(version);
572
578
  this.publicVersions = await (0, adp_tooling_1.fetchPublicVersions)(this.logger);
573
579
  this.ui5Versions = await (0, adp_tooling_1.getRelevantVersions)(this.systemVersion, this.isCustomerBase, this.publicVersions);
@@ -28,7 +28,7 @@ const getSystemAdditionalMessages = (flexUISystem, isCloudProject) => {
28
28
  if (!isUIFlex) {
29
29
  return {
30
30
  message: (0, i18n_1.t)('error.notDeployableNotFlexEnabledSystemError'),
31
- severity: yeoman_ui_types_1.Severity.error
31
+ severity: yeoman_ui_types_1.Severity.warning
32
32
  };
33
33
  }
34
34
  else {
@@ -66,7 +66,7 @@ function getPasswordPrompt(abapTarget, logger) {
66
66
  password: value
67
67
  };
68
68
  const abapProvider = await (0, adp_tooling_1.getConfiguredProvider)(options, logger);
69
- await (0, adp_tooling_1.getSystemUI5Version)(abapProvider);
69
+ await (0, adp_tooling_1.getSystemUI5Version)(abapProvider, logger);
70
70
  return true;
71
71
  }
72
72
  catch (e) {
@@ -105,5 +105,8 @@
105
105
  "projectDoesNotExistMta": "Provide the path to the MTA project where you want to have your Adaptation Project created.",
106
106
  "noAdaptableBusinessServiceFoundInMta": "No adaptable business service found in the MTA.",
107
107
  "fetchBaseInboundsFailed": "Fetching base application inbounds failed: {{error}}."
108
+ },
109
+ "validators": {
110
+ "ui5VersionNotDetectedError": "The SAPUI5 version of the selected system cannot be determined. You are able to create and edit adaptation projects that use the latest SAPUI5 version, but they are not usable on this system until the system's SAPUI5 version is upgraded to version 1.71 or higher."
108
111
  }
109
112
  }
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.5.15",
6
+ "version": "0.6.0",
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.16.13",
34
- "@sap-ux/axios-extension": "1.23.1",
33
+ "@sap-ux/adp-tooling": "0.17.0",
34
+ "@sap-ux/axios-extension": "1.24.0",
35
35
  "@sap-ux/btp-utils": "1.1.4",
36
36
  "@sap-ux/feature-toggle": "0.3.3",
37
- "@sap-ux/inquirer-common": "0.8.7",
38
37
  "@sap-ux/logger": "0.7.0",
39
38
  "@sap-ux/project-access": "1.32.7",
40
39
  "@sap-ux/store": "1.2.1",
41
- "@sap-ux/system-access": "0.6.22",
40
+ "@sap-ux/system-access": "0.6.23",
42
41
  "@sap-ux/project-input-validator": "0.6.29",
43
42
  "@sap-ux/fiori-generator-shared": "0.13.28",
44
- "@sap-ux/odata-service-writer": "0.27.28"
43
+ "@sap-ux/odata-service-writer": "0.27.28",
44
+ "@sap-ux/inquirer-common": "0.8.7"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@jest/types": "30.0.1",
@@ -56,7 +56,7 @@
56
56
  "fs-extra": "10.0.0",
57
57
  "rimraf": "6.0.1",
58
58
  "yeoman-test": "6.3.0",
59
- "@sap-ux/deploy-config-sub-generator": "0.4.34"
59
+ "@sap-ux/deploy-config-sub-generator": "0.4.35"
60
60
  },
61
61
  "engines": {
62
62
  "node": ">=20.x"