@sap/adp-abap
Advanced tools
Comparing version 1.1.55 to 1.1.56
@@ -17,3 +17,4 @@ export declare const Messages: { | ||
ERROR_WRONG_CLOUD_PACKAGE: string; | ||
ERROR_UNSUPPORTED_ADP_PROJECT_SYSTEM: string; | ||
ERROR_UNSUPPORTED_ADP_PROJECT_SYSTEM_INTERNAL: string; | ||
ERROR_UNSUPPORTED_ADP_PROJECT_SYSTEM_EXTERNAL: string; | ||
}; |
@@ -21,4 +21,5 @@ "use strict"; | ||
ERROR_WRONG_CLOUD_PACKAGE: "The package entered is not meant to be used for cloud deployments. You should either use cloud package or go back to the project type selection and select On Premise", | ||
ERROR_UNSUPPORTED_ADP_PROJECT_SYSTEM: "The system that you have selected is not an ABAP On-Premise system. Adaptation Project is supported only on such systems, so please choose ABAP On-Premise" | ||
ERROR_UNSUPPORTED_ADP_PROJECT_SYSTEM_INTERNAL: "The system that you have selected cannot be detected to be of type OnPremise. You should select system of this type in order to continue with the generation of the project.", | ||
ERROR_UNSUPPORTED_ADP_PROJECT_SYSTEM_EXTERNAL: "The system that you have selected cannot be detected to be of type OnPremise or of type CloudReady. You should select system of either of both types in order to continue with the generation of the project." | ||
}; | ||
//# sourceMappingURL=messages.js.map |
@@ -76,3 +76,5 @@ "use strict"; | ||
this.axiosInstance.defaults.params = { | ||
"sap-client": client | ||
"sap-client": client, | ||
"spnego": "disabled", | ||
"saml2": "disabled" | ||
}; | ||
@@ -88,4 +90,4 @@ } | ||
setHTTPSAgent() { | ||
if (!this.axiosInstance.defaults.httpAgent) { | ||
this.axiosInstance.defaults.httpAgent = new https_1.default.Agent({ | ||
if (!this.axiosInstance.defaults.httpsAgent) { | ||
this.axiosInstance.defaults.httpsAgent = new https_1.default.Agent({ | ||
rejectUnauthorized: false, | ||
@@ -92,0 +94,0 @@ requestCert: false |
@@ -23,3 +23,3 @@ import { AxiosRequestConfig } from "axios"; | ||
getCachedApplicationComponentHierarchy(): string; | ||
getSystemInfo(system: string, cloudPackage?: string): Promise<DestinationInfo>; | ||
getSystemInfo(cloudPackage?: string): Promise<DestinationInfo>; | ||
isFlexUISupportedSystem(): Promise<FlexUISupportedSystem>; | ||
@@ -33,3 +33,4 @@ getUI5Version(): Promise<import("axios").AxiosResponse<any, any>>; | ||
private getS4HANAAppsParams; | ||
private getAuthParams; | ||
private logSystemError; | ||
} |
@@ -11,5 +11,2 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -19,3 +16,2 @@ exports.ABAPConnectionService = void 0; | ||
const adp_common_1 = require("@sap/adp-common"); | ||
const DestinationService_1 = __importDefault(require("./DestinationService")); | ||
class ABAPConnectionService { | ||
@@ -27,3 +23,3 @@ constructor(axiosInstance) { | ||
this.UI5_VERSION_URL = "sap/bc/adt/filestore/ui5-bsp/ui5-rt-version"; | ||
this.SYSTEM_INFO_URL = (clientID) => `/sap/bc/lrep/dta_folder/system_info?sap-client=${clientID}&sap-language=EN`; | ||
this.SYSTEM_INFO_URL = "/sap/bc/lrep/dta_folder/system_info?sap-language=EN"; | ||
this.ADT_DISCOVERY_URL = "/sap/bc/adt/discovery"; | ||
@@ -37,2 +33,3 @@ this.axiosInstance = axiosInstance; | ||
}; | ||
this.axiosInstance.defaults.params = this.getAuthParams(); | ||
let applicationIds = []; | ||
@@ -43,3 +40,3 @@ let result; | ||
const listBaseAppsParams = this.getS4HANAAppsParams(); | ||
this.axiosInstance.defaults.params = listBaseAppsParams; | ||
Object.assign(this.axiosInstance.defaults.params, listBaseAppsParams); | ||
const responseAppdescrType = yield this.request(appListConfig); | ||
@@ -50,3 +47,3 @@ result = responseAppdescrType.data["results"]; | ||
const listBaseAppsParams = this.getABAPAppsParams(); | ||
this.axiosInstance.defaults.params = listBaseAppsParams; | ||
Object.assign(this.axiosInstance.defaults.params, listBaseAppsParams); | ||
const responseAppdescrType = yield this.request(appListConfig); | ||
@@ -56,3 +53,3 @@ result = responseAppdescrType.data["results"]; | ||
const listAppVariantsParams = this.getABAPVariantsAppsParams(); | ||
this.axiosInstance.defaults.params = listAppVariantsParams; | ||
Object.assign(this.axiosInstance.defaults.params, listAppVariantsParams); | ||
const responseAppdescrVariantType = yield this.request(appListConfig); | ||
@@ -128,3 +125,4 @@ result = responseAppdescrVariantType.data["results"].concat(responseAppdescrType.data["results"]); | ||
}; | ||
this.axiosInstance.defaults.params = params; | ||
this.axiosInstance.defaults.params = this.getAuthParams(); | ||
Object.assign(this.axiosInstance.defaults.params, params); | ||
let response; | ||
@@ -177,7 +175,5 @@ try { | ||
} | ||
getSystemInfo(system, cloudPackage) { | ||
getSystemInfo(cloudPackage) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const destinationService = DestinationService_1.default.getInstance(); | ||
const destinationInfo = yield destinationService.getDestinationInfoByName(system); | ||
let url = this.SYSTEM_INFO_URL(destinationInfo["sap-client"]); | ||
let url = this.SYSTEM_INFO_URL; | ||
if (cloudPackage) { | ||
@@ -248,3 +244,4 @@ url += `&package=${cloudPackage}`; | ||
}; | ||
this.axiosInstance.defaults.params = params; | ||
this.axiosInstance.defaults.params = this.getAuthParams(); | ||
Object.assign(this.axiosInstance.defaults.params, params); | ||
const response = yield this.request(supportsManiFirstConfig); | ||
@@ -287,2 +284,3 @@ if (response && response.data) { | ||
return { | ||
"sap.app/type": "application", | ||
"sap.fiori/cloudDevAdaptationStatus": "released", | ||
@@ -292,2 +290,6 @@ "fields": "sap.app/id,repoName,sap.fiori/cloudDevAdaptationStatus,sap.app/ach,sap.fiori/registrationIds,sap.app/title,url,fileType" | ||
} | ||
getAuthParams() { | ||
const { "sap-client": sapClient, spnego, saml2 } = this.axiosInstance.defaults.params || {}; | ||
return sapClient && spnego && saml2 ? { "sap-client": sapClient, spnego, saml2 } : {}; | ||
} | ||
logSystemError(error, url) { | ||
@@ -294,0 +296,0 @@ var _a, _b, _c, _d, _e, _f; |
{ | ||
"name": "@sap/adp-abap", | ||
"version": "1.1.55", | ||
"version": "1.1.56", | ||
"description": "abap service for all yeoman generators", | ||
@@ -41,3 +41,3 @@ "main": "dist/index.js", | ||
"@sap/cf-tools": "0.8.1", | ||
"@sap/adp-common": "1.1.55", | ||
"@sap/adp-common": "1.1.56", | ||
"@sap-ux/store": "0.3.11", | ||
@@ -44,0 +44,0 @@ "axios": "1.6.3", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
107356
1540
+ Added@sap/adp-common@1.1.56(transitive)
- Removed@sap/adp-common@1.1.55(transitive)
Updated@sap/adp-common@1.1.56