@sap-ux/axios-extension
Advanced tools
Comparing version 1.16.0 to 1.16.1
@@ -9,3 +9,4 @@ export { AdtService } from './adt-service'; | ||
export { BusinessObjectsService } from './businessobjects-service'; | ||
export { UI5RtVersionService } from './ui5-rt-version-service'; | ||
export { AbapCDSViewService } from './abapcdsview-service'; | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AbapCDSViewService = exports.BusinessObjectsService = exports.GeneratorService = exports.FileStoreService = exports.ListPackageService = exports.TransportRequestService = exports.TransportChecksService = exports.AtoService = exports.AdtService = void 0; | ||
exports.AbapCDSViewService = exports.UI5RtVersionService = exports.BusinessObjectsService = exports.GeneratorService = exports.FileStoreService = exports.ListPackageService = exports.TransportRequestService = exports.TransportChecksService = exports.AtoService = exports.AdtService = void 0; | ||
var adt_service_1 = require("./adt-service"); | ||
@@ -20,4 +20,6 @@ Object.defineProperty(exports, "AdtService", { enumerable: true, get: function () { return adt_service_1.AdtService; } }); | ||
Object.defineProperty(exports, "BusinessObjectsService", { enumerable: true, get: function () { return businessobjects_service_1.BusinessObjectsService; } }); | ||
var ui5_rt_version_service_1 = require("./ui5-rt-version-service"); | ||
Object.defineProperty(exports, "UI5RtVersionService", { enumerable: true, get: function () { return ui5_rt_version_service_1.UI5RtVersionService; } }); | ||
var abapcdsview_service_1 = require("./abapcdsview-service"); | ||
Object.defineProperty(exports, "AbapCDSViewService", { enumerable: true, get: function () { return abapcdsview_service_1.AbapCDSViewService; } }); | ||
//# sourceMappingURL=index.js.map |
@@ -46,2 +46,9 @@ import type { Service } from '../base/service-provider'; | ||
/** | ||
* Check for a given app id whether the manifest first is supported. | ||
* | ||
* @param {string} appId - The id of the app. | ||
* @returns {Promise<boolean>} - "true" for apps supporting manifest first which are apps with minUI5Version at least 1.30 and not scaffolding-based (i.e. dependency to sap.ca.scfld.md library), otherwise it returns "false". | ||
*/ | ||
getIsManiFirstSupported(appId: string): Promise<boolean>; | ||
/** | ||
* Gets the app info for the specified id. | ||
@@ -48,0 +55,0 @@ * |
@@ -5,3 +5,2 @@ "use strict"; | ||
const axios_1 = require("axios"); | ||
const odata_request_error_1 = require("../base/odata-request-error"); | ||
/** | ||
@@ -29,2 +28,23 @@ * A class representing the app index service allowing to search applications deployed on an ABAP system. | ||
/** | ||
* Check for a given app id whether the manifest first is supported. | ||
* | ||
* @param {string} appId - The id of the app. | ||
* @returns {Promise<boolean>} - "true" for apps supporting manifest first which are apps with minUI5Version at least 1.30 and not scaffolding-based (i.e. dependency to sap.ca.scfld.md library), otherwise it returns "false". | ||
*/ | ||
async getIsManiFirstSupported(appId) { | ||
try { | ||
const params = { | ||
'id': appId | ||
}; | ||
const response = await this.get('/ui5_app_mani_first_supported', { params }); | ||
const isManiFirstSupported = JSON.parse(response.data); | ||
return isManiFirstSupported; | ||
} | ||
catch (error) { | ||
this.log.error(`Fail fetching ui5_app_mani_first_supported for app with id: ${appId}.`); | ||
this.log.debug(error); | ||
throw error; | ||
} | ||
} | ||
/** | ||
* Gets the app info for the specified id. | ||
@@ -41,3 +61,3 @@ * | ||
catch (error) { | ||
if ((0, odata_request_error_1.isAxiosError)(error)) { | ||
if ((0, axios_1.isAxiosError)(error)) { | ||
this.log.error(`Failed fetching ui5_app_info_json for app with id ${appId}.`); | ||
@@ -44,0 +64,0 @@ } |
export { AppInfo, BspConfig, DeployConfig, Ui5AbapRepositoryService, UndeployConfig } from './ui5-abap-repository-service'; | ||
export { LayeredRepositoryService, AdaptationConfig, MergedAppDescriptor } from './lrep-service'; | ||
export { LayeredRepositoryService, AdaptationConfig, MergedAppDescriptor, SystemInfo, AdaptationProjectType } from './lrep-service'; | ||
export { AbapServiceProvider } from './abap-service-provider'; | ||
@@ -4,0 +4,0 @@ export { AppIndex, AppIndexService, Ui5AppInfo } from './app-index-service'; |
@@ -17,3 +17,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TenantType = exports.AppIndexService = exports.AbapServiceProvider = exports.LayeredRepositoryService = exports.Ui5AbapRepositoryService = void 0; | ||
exports.TenantType = exports.AppIndexService = exports.AbapServiceProvider = exports.AdaptationProjectType = exports.LayeredRepositoryService = exports.Ui5AbapRepositoryService = void 0; | ||
var ui5_abap_repository_service_1 = require("./ui5-abap-repository-service"); | ||
@@ -23,2 +23,3 @@ Object.defineProperty(exports, "Ui5AbapRepositoryService", { enumerable: true, get: function () { return ui5_abap_repository_service_1.Ui5AbapRepositoryService; } }); | ||
Object.defineProperty(exports, "LayeredRepositoryService", { enumerable: true, get: function () { return lrep_service_1.LayeredRepositoryService; } }); | ||
Object.defineProperty(exports, "AdaptationProjectType", { enumerable: true, get: function () { return lrep_service_1.AdaptationProjectType; } }); | ||
var abap_service_provider_1 = require("./abap-service-provider"); | ||
@@ -25,0 +26,0 @@ Object.defineProperty(exports, "AbapServiceProvider", { enumerable: true, get: function () { return abap_service_provider_1.AbapServiceProvider; } }); |
@@ -71,2 +71,24 @@ /// <reference types="node" /> | ||
/** | ||
* All available adaptation project types from system. | ||
*/ | ||
export declare enum AdaptationProjectType { | ||
ON_PREMISE = "onPremise", | ||
CLOUD_READY = "cloudReady" | ||
} | ||
/** | ||
* Structure of the system info reponse data. | ||
*/ | ||
export interface SystemInfo { | ||
/** | ||
* Supported adaptation project types from system. | ||
*/ | ||
adaptationProjectTypes: AdaptationProjectType[]; | ||
activeLanguages: Language[]; | ||
} | ||
interface Language { | ||
sap: string; | ||
description: string; | ||
i18n: string; | ||
} | ||
/** | ||
* Technically supported layers, however, in practice only `CUSTOMER_BASE` is used | ||
@@ -120,2 +142,10 @@ */ | ||
/** | ||
* Get system info. | ||
* | ||
* @param language | ||
* @param cloudPackage name | ||
* @returns the system info object | ||
*/ | ||
getSystemInfo(language?: string, cloudPackage?: string): Promise<SystemInfo>; | ||
/** | ||
* Try parsing the response and log the result. If the parsing fails and an alternative is provided, log it instead. | ||
@@ -122,0 +152,0 @@ * |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.LayeredRepositoryService = void 0; | ||
exports.LayeredRepositoryService = exports.AdaptationProjectType = void 0; | ||
const axios_1 = require("axios"); | ||
@@ -10,2 +10,10 @@ const logger_1 = require("@sap-ux/logger"); | ||
/** | ||
* All available adaptation project types from system. | ||
*/ | ||
var AdaptationProjectType; | ||
(function (AdaptationProjectType) { | ||
AdaptationProjectType["ON_PREMISE"] = "onPremise"; | ||
AdaptationProjectType["CLOUD_READY"] = "cloudReady"; | ||
})(AdaptationProjectType || (exports.AdaptationProjectType = AdaptationProjectType = {})); | ||
/** | ||
* Returns the namespace as string. | ||
@@ -174,2 +182,27 @@ * | ||
/** | ||
* Get system info. | ||
* | ||
* @param language | ||
* @param cloudPackage name | ||
* @returns the system info object | ||
*/ | ||
async getSystemInfo(language = 'EN', cloudPackage) { | ||
try { | ||
const params = { | ||
'sap-language': language | ||
}; | ||
if (cloudPackage) { | ||
params['package'] = cloudPackage; | ||
} | ||
const response = await this.get(`${DTA_PATH_SUFFIX}system_info`, { params }); | ||
this.tryLogResponse(response, 'Successful getting system info.'); | ||
return JSON.parse(response.data); | ||
} | ||
catch (error) { | ||
this.log.error('Getting system data failed.'); | ||
this.log.debug(error); | ||
throw error; | ||
} | ||
} | ||
/** | ||
* Try parsing the response and log the result. If the parsing fails and an alternative is provided, log it instead. | ||
@@ -176,0 +209,0 @@ * |
{ | ||
"name": "@sap-ux/axios-extension", | ||
"version": "1.16.0", | ||
"version": "1.16.1", | ||
"description": "Extension of the Axios module adding convenience methods to interact with SAP systems especially with OData services.", | ||
@@ -32,3 +32,3 @@ "repository": { | ||
"supertest": "6.3.3", | ||
"@sap-ux/project-access": "1.25.5" | ||
"@sap-ux/project-access": "1.25.7" | ||
}, | ||
@@ -35,0 +35,0 @@ "files": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
259158
95
6274