@sap-ux/generator-adp 1.2.1 → 1.2.3
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/generators/app/index.js
CHANGED
|
@@ -514,9 +514,11 @@ class default_1 extends yeoman_generator_1.default {
|
|
|
514
514
|
this.isCfEnv = this.targetEnv === types_js_1.TargetEnv.CF;
|
|
515
515
|
this.logger.info(`Target environment: ${this.targetEnv}`);
|
|
516
516
|
(0, steps_js_1.updateCfWizardSteps)(this.isCfEnv, this.prompts);
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
517
|
+
if (this.targetEnv === 'CF') {
|
|
518
|
+
this.logger.log(`Project organization information: ${JSON.stringify(this.cfConfig.org, null, 2)}`);
|
|
519
|
+
this.logger.log(`Project space information: ${JSON.stringify(this.cfConfig.space, null, 2)}`);
|
|
520
|
+
this.logger.log(`Project apiUrl information: ${JSON.stringify(this.cfConfig.url, null, 2)}`);
|
|
521
|
+
}
|
|
520
522
|
}
|
|
521
523
|
/**
|
|
522
524
|
* Prompts the user for the CF environment.
|
|
@@ -726,7 +728,7 @@ class default_1 extends yeoman_generator_1.default {
|
|
|
726
728
|
selectedProjectType = axios_extension_1.AdaptationProjectType.CLOUD_READY;
|
|
727
729
|
}
|
|
728
730
|
this.projectType = selectedProjectType;
|
|
729
|
-
const applications = await (0, adp_tooling_1.loadApps)(this.abapProvider, this.isCustomerBase, supportedProject);
|
|
731
|
+
const applications = await (0, adp_tooling_1.loadApps)(this.abapProvider, this.isCustomerBase, supportedProject, this.logger);
|
|
730
732
|
this.telemetryCollector.setBatch({ numberOfApplications: applications.length });
|
|
731
733
|
const application = applications.find((application) => application.id === baseApplicationName);
|
|
732
734
|
if (!application) {
|
|
@@ -486,6 +486,7 @@ class CFServicesPrompter {
|
|
|
486
486
|
// The picker is FDC-filtered to services with adaptable apps, so an empty app list or a
|
|
487
487
|
// discovery failure here is a real error: the writer needs the selected base app's manifest.
|
|
488
488
|
try {
|
|
489
|
+
this.logger.info(`Getting CF apps for business service: ${instance.name}`);
|
|
489
490
|
this.apps = await (0, adp_tooling_1.getCfApps)(this.businessServiceInfo.serviceKeys, cfConfig, this.logger);
|
|
490
491
|
this.logger?.log(`Available applications: ${JSON.stringify(this.apps)}`);
|
|
491
492
|
if (this.apps.length === 0) {
|
|
@@ -582,7 +582,7 @@ class ConfigPrompter {
|
|
|
582
582
|
}
|
|
583
583
|
if (this.selectedProjectType === axios_extension_1.AdaptationProjectType.CLOUD_READY) {
|
|
584
584
|
try {
|
|
585
|
-
this.baseApplicationInbounds = await (0, adp_tooling_1.getBaseAppInbounds)(app.id, this.provider);
|
|
585
|
+
this.baseApplicationInbounds = await (0, adp_tooling_1.getBaseAppInbounds)(app.id, this.provider, this.logger);
|
|
586
586
|
}
|
|
587
587
|
catch (error) {
|
|
588
588
|
return (0, i18n_js_1.t)('error.fetchBaseInboundsFailed', { error: error.message });
|
|
@@ -622,7 +622,7 @@ class ConfigPrompter {
|
|
|
622
622
|
return validationResult;
|
|
623
623
|
}
|
|
624
624
|
this.telemetryCollector.startTiming('applicationListLoadingTime');
|
|
625
|
-
this.targetApps = await (0, adp_tooling_1.loadApps)(this.abapProvider, this.isCustomerBase, this.supportedProject);
|
|
625
|
+
this.targetApps = await (0, adp_tooling_1.loadApps)(this.abapProvider, this.isCustomerBase, this.supportedProject, this.logger);
|
|
626
626
|
this.telemetryCollector.setBatch({ numberOfApplications: this.targetApps.length });
|
|
627
627
|
this.telemetryCollector.endTiming('applicationListLoadingTime');
|
|
628
628
|
this.isLoginSuccessful = true;
|
|
@@ -677,7 +677,7 @@ class ConfigPrompter {
|
|
|
677
677
|
return validationResult;
|
|
678
678
|
}
|
|
679
679
|
this.telemetryCollector.startTiming('applicationListLoadingTime');
|
|
680
|
-
this.targetApps = await (0, adp_tooling_1.loadApps)(this.abapProvider, this.isCustomerBase, this.supportedProject);
|
|
680
|
+
this.targetApps = await (0, adp_tooling_1.loadApps)(this.abapProvider, this.isCustomerBase, this.supportedProject, this.logger);
|
|
681
681
|
this.telemetryCollector.setBatch({ numberOfApplications: this.targetApps.length });
|
|
682
682
|
this.telemetryCollector.endTiming('applicationListLoadingTime');
|
|
683
683
|
return true;
|
|
@@ -693,6 +693,7 @@ class ConfigPrompter {
|
|
|
693
693
|
* @returns {Promise<boolean | string>} True if the application is valid, otherwise an error message.
|
|
694
694
|
*/
|
|
695
695
|
async validateAppData(app) {
|
|
696
|
+
this.logger.debug(`Validating application data for app with id: ${app.id}`);
|
|
696
697
|
try {
|
|
697
698
|
// Reset the flag when we are selecting a new application from the list.
|
|
698
699
|
this.isApplicationSupported = false;
|
|
@@ -706,7 +707,7 @@ class ConfigPrompter {
|
|
|
706
707
|
this.isApplicationSupported = true;
|
|
707
708
|
}
|
|
708
709
|
catch (e) {
|
|
709
|
-
this.logger.debug(`Application failed
|
|
710
|
+
this.logger.debug(`Application validation failed. Reason: ${e.message}`);
|
|
710
711
|
return e.message;
|
|
711
712
|
}
|
|
712
713
|
return true;
|
|
@@ -727,13 +728,16 @@ class ConfigPrompter {
|
|
|
727
728
|
* @returns A promise that resolves when system data is fetched.
|
|
728
729
|
*/
|
|
729
730
|
async loadSystemData() {
|
|
731
|
+
this.logger.info(`Try to load system data.`);
|
|
730
732
|
try {
|
|
731
733
|
// Do not include the ato settings retreival in the parallel calls because we need to first login
|
|
732
734
|
// before executing any other call. A provider works like this - with the first api call it authenticates the user.
|
|
735
|
+
this.logger.info(`Try to determine system type.`);
|
|
733
736
|
this.selectedSystemType = (await this.provider.isAbapCloud()) ? types_js_1.SystemType.CLOUD_READY : types_js_1.SystemType.ON_PREM;
|
|
737
|
+
this.logger.info(`selectedSystemType: ${this.selectedSystemType}`);
|
|
734
738
|
const [supportedProject, flexUICapability] = await Promise.all([
|
|
735
|
-
(0, adp_tooling_1.getSupportedProject)(this.abapProvider),
|
|
736
|
-
(0, adp_tooling_1.getFlexUICapability)(this.abapProvider, this.isCustomerBase)
|
|
739
|
+
(0, adp_tooling_1.getSupportedProject)(this.abapProvider, this.logger),
|
|
740
|
+
(0, adp_tooling_1.getFlexUICapability)(this.abapProvider, this.isCustomerBase, this.logger)
|
|
737
741
|
]);
|
|
738
742
|
this.supportedProject = supportedProject;
|
|
739
743
|
this.flexUICapability = flexUICapability;
|
|
@@ -760,8 +764,10 @@ class ConfigPrompter {
|
|
|
760
764
|
*/
|
|
761
765
|
async loadUI5Versions() {
|
|
762
766
|
let version;
|
|
767
|
+
this.logger.info(`Try to loadUI5Versions.`);
|
|
763
768
|
try {
|
|
764
769
|
version = await (0, adp_tooling_1.getSystemUI5Version)(this.abapProvider, this.logger);
|
|
770
|
+
this.logger.info(`version: ${version}`);
|
|
765
771
|
}
|
|
766
772
|
catch (error) {
|
|
767
773
|
this.logger.debug(`Could not fetch the system UI5 version: ${error.message}.`);
|
|
@@ -776,6 +782,7 @@ class ConfigPrompter {
|
|
|
776
782
|
* @returns {Promise<boolean | string>} True if successful, or an error message if an error occurs.
|
|
777
783
|
*/
|
|
778
784
|
async handleSystemDataValidation() {
|
|
785
|
+
this.logger.info(`Starting system validation.`);
|
|
779
786
|
try {
|
|
780
787
|
await this.loadSystemData();
|
|
781
788
|
await this.loadUI5Versions();
|
|
@@ -785,7 +792,10 @@ class ConfigPrompter {
|
|
|
785
792
|
return true;
|
|
786
793
|
}
|
|
787
794
|
catch (e) {
|
|
788
|
-
|
|
795
|
+
if ((0, axios_extension_1.isAxiosError)(e) && e.config) {
|
|
796
|
+
this.logger.error(`Failed for request URL: ${e.config.url}`);
|
|
797
|
+
}
|
|
798
|
+
this.logger.error(`Validating system failed. Reason: ${e.message}`);
|
|
789
799
|
return e.message;
|
|
790
800
|
}
|
|
791
801
|
}
|
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": "1.2.
|
|
6
|
+
"version": "1.2.3",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -30,19 +30,19 @@
|
|
|
30
30
|
"i18next": "26.5.11",
|
|
31
31
|
"uuid": "14.0.3",
|
|
32
32
|
"yeoman-generator": "5.10.0",
|
|
33
|
-
"@sap-ux/adp-tooling": "1.2.
|
|
34
|
-
"@sap-ux/axios-extension": "2.1.
|
|
33
|
+
"@sap-ux/adp-tooling": "1.2.5",
|
|
34
|
+
"@sap-ux/axios-extension": "2.1.9",
|
|
35
35
|
"@sap-ux/btp-utils": "2.0.9",
|
|
36
36
|
"@sap-ux/feature-toggle": "1.0.5",
|
|
37
|
-
"@sap-ux/fiori-generator-shared": "1.4.
|
|
38
|
-
"@sap-ux/inquirer-common": "1.0.
|
|
37
|
+
"@sap-ux/fiori-generator-shared": "1.4.3",
|
|
38
|
+
"@sap-ux/inquirer-common": "1.0.58",
|
|
39
39
|
"@sap-ux/logger": "1.0.3",
|
|
40
|
-
"@sap-ux/odata-service-writer": "1.0.
|
|
41
|
-
"@sap-ux/project-access": "2.3.
|
|
42
|
-
"@sap-ux/project-input-validator": "1.0.
|
|
43
|
-
"@sap-ux/store": "2.0.
|
|
44
|
-
"@sap-ux/system-access": "1.0.
|
|
45
|
-
"@sap-ux/telemetry": "2.0.
|
|
40
|
+
"@sap-ux/odata-service-writer": "1.0.31",
|
|
41
|
+
"@sap-ux/project-access": "2.3.6",
|
|
42
|
+
"@sap-ux/project-input-validator": "1.0.29",
|
|
43
|
+
"@sap-ux/store": "2.0.9",
|
|
44
|
+
"@sap-ux/system-access": "1.0.23",
|
|
45
|
+
"@sap-ux/telemetry": "2.0.17"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@jest/globals": "30.5.2",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"fs-extra": "11.4.1",
|
|
58
58
|
"rimraf": "6.1.3",
|
|
59
59
|
"yeoman-test": "6.3.0",
|
|
60
|
-
"@sap-ux/deploy-config-sub-generator": "1.0.
|
|
60
|
+
"@sap-ux/deploy-config-sub-generator": "1.0.97"
|
|
61
61
|
},
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">=22.x"
|