@sap-ux/generator-adp 1.0.53 → 1.0.55
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.
|
@@ -376,5 +376,19 @@ export declare class ConfigPrompter {
|
|
|
376
376
|
* @returns {boolean} True if the project type classic label must be displayed.
|
|
377
377
|
*/
|
|
378
378
|
private shouldDisplayProjectTypeClassicLabel;
|
|
379
|
+
/**
|
|
380
|
+
* Determines whether the given system requires authentication.
|
|
381
|
+
*
|
|
382
|
+
* Returns `undefined` when no ABAP provider is configured. Otherwise, checks the system
|
|
383
|
+
* endpoint's authentication requirement. In SAP Business Application Studio, when the system
|
|
384
|
+
* reports that authentication is required, it verifies this by attempting to fetch a CSRF
|
|
385
|
+
* token from the layered repository: a `401` response confirms authentication is required,
|
|
386
|
+
* while a successful call indicates it is not.
|
|
387
|
+
*
|
|
388
|
+
* @param {string} system - The system to check.
|
|
389
|
+
* @returns {Promise<boolean | undefined>} `true` if authentication is required, `false` if not,
|
|
390
|
+
* or `undefined` if no provider is configured.
|
|
391
|
+
*/
|
|
392
|
+
private getIsAuthRequired;
|
|
379
393
|
}
|
|
380
394
|
//# sourceMappingURL=configuration.d.ts.map
|
|
@@ -659,7 +659,7 @@ class ConfigPrompter {
|
|
|
659
659
|
this.selectedSystemType = undefined;
|
|
660
660
|
this.supportedProject = undefined;
|
|
661
661
|
this.abapProvider = await (0, adp_tooling_1.getConfiguredProvider)(options, this.logger);
|
|
662
|
-
this.isAuthRequired = await this.
|
|
662
|
+
this.isAuthRequired = (await this.getIsAuthRequired(system)) ?? false;
|
|
663
663
|
if (this.isAuthRequired) {
|
|
664
664
|
return true;
|
|
665
665
|
}
|
|
@@ -885,6 +885,38 @@ class ConfigPrompter {
|
|
|
885
885
|
shouldDisplayProjectTypeClassicLabel(application) {
|
|
886
886
|
return !(0, feature_toggle_1.isInternalFeaturesSettingEnabled)() && this.isClassicAppOnMixedSystem(application);
|
|
887
887
|
}
|
|
888
|
+
/**
|
|
889
|
+
* Determines whether the given system requires authentication.
|
|
890
|
+
*
|
|
891
|
+
* Returns `undefined` when no ABAP provider is configured. Otherwise, checks the system
|
|
892
|
+
* endpoint's authentication requirement. In SAP Business Application Studio, when the system
|
|
893
|
+
* reports that authentication is required, it verifies this by attempting to fetch a CSRF
|
|
894
|
+
* token from the layered repository: a `401` response confirms authentication is required,
|
|
895
|
+
* while a successful call indicates it is not.
|
|
896
|
+
*
|
|
897
|
+
* @param {string} system - The system to check.
|
|
898
|
+
* @returns {Promise<boolean | undefined>} `true` if authentication is required, `false` if not,
|
|
899
|
+
* or `undefined` if no provider is configured.
|
|
900
|
+
*/
|
|
901
|
+
async getIsAuthRequired(system) {
|
|
902
|
+
if (!this.abapProvider) {
|
|
903
|
+
return undefined;
|
|
904
|
+
}
|
|
905
|
+
const doesSystemRequireAuth = await this.systemLookup.getSystemRequiresAuth(system);
|
|
906
|
+
if (!(0, btp_utils_1.isAppStudio)() || !doesSystemRequireAuth) {
|
|
907
|
+
return doesSystemRequireAuth;
|
|
908
|
+
}
|
|
909
|
+
try {
|
|
910
|
+
await this.abapProvider.getLayeredRepository().getCsrfToken();
|
|
911
|
+
return false;
|
|
912
|
+
}
|
|
913
|
+
catch (error) {
|
|
914
|
+
if ((0, axios_extension_1.isAxiosError)(error) && error.response?.status === 401) {
|
|
915
|
+
return true;
|
|
916
|
+
}
|
|
917
|
+
throw error;
|
|
918
|
+
}
|
|
919
|
+
}
|
|
888
920
|
}
|
|
889
921
|
exports.ConfigPrompter = ConfigPrompter;
|
|
890
922
|
//# sourceMappingURL=configuration.js.map
|
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.0.
|
|
6
|
+
"version": "1.0.55",
|
|
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.3.6",
|
|
31
31
|
"yeoman-generator": "5.10.0",
|
|
32
32
|
"uuid": "11.1.1",
|
|
33
|
-
"@sap-ux/adp-tooling": "1.0.
|
|
33
|
+
"@sap-ux/adp-tooling": "1.0.50",
|
|
34
34
|
"@sap-ux/axios-extension": "2.0.9",
|
|
35
|
-
"@sap-ux/btp-utils": "2.0.6",
|
|
36
35
|
"@sap-ux/feature-toggle": "1.0.5",
|
|
37
|
-
"@sap-ux/
|
|
36
|
+
"@sap-ux/btp-utils": "2.0.6",
|
|
37
|
+
"@sap-ux/inquirer-common": "1.0.37",
|
|
38
38
|
"@sap-ux/logger": "1.0.3",
|
|
39
|
-
"@sap-ux/store": "2.0.7",
|
|
40
39
|
"@sap-ux/project-access": "2.1.13",
|
|
40
|
+
"@sap-ux/store": "2.0.7",
|
|
41
41
|
"@sap-ux/system-access": "1.0.12",
|
|
42
42
|
"@sap-ux/project-input-validator": "1.0.18",
|
|
43
|
-
"@sap-ux/fiori-generator-shared": "1.2.
|
|
44
|
-
"@sap-ux/
|
|
45
|
-
"@sap-ux/
|
|
43
|
+
"@sap-ux/fiori-generator-shared": "1.2.12",
|
|
44
|
+
"@sap-ux/telemetry": "2.0.4",
|
|
45
|
+
"@sap-ux/odata-service-writer": "1.0.21"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@jest/globals": "30.4.1",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"fs-extra": "11.3.6",
|
|
59
59
|
"rimraf": "6.1.3",
|
|
60
60
|
"yeoman-test": "6.3.0",
|
|
61
|
-
"@sap-ux/deploy-config-sub-generator": "1.0.
|
|
61
|
+
"@sap-ux/deploy-config-sub-generator": "1.0.64"
|
|
62
62
|
},
|
|
63
63
|
"engines": {
|
|
64
64
|
"node": ">=22.x"
|