@sap-ux/axios-extension 1.14.1 → 1.14.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.
|
@@ -8,6 +8,24 @@ export interface App extends Record<string, unknown> {
|
|
|
8
8
|
url: string;
|
|
9
9
|
}
|
|
10
10
|
export type AppIndex = Partial<App>[];
|
|
11
|
+
export type AsyncHintsLib = {
|
|
12
|
+
name: string;
|
|
13
|
+
};
|
|
14
|
+
export type AsyncHintsRequest = {
|
|
15
|
+
name: string;
|
|
16
|
+
reference: string;
|
|
17
|
+
};
|
|
18
|
+
export type Ui5AppInfo = Record<string, Ui5AppInfoContent>;
|
|
19
|
+
export interface Ui5AppInfoContent {
|
|
20
|
+
name: string;
|
|
21
|
+
url: string;
|
|
22
|
+
manifestUrl?: string;
|
|
23
|
+
manifest?: string;
|
|
24
|
+
asyncHints: {
|
|
25
|
+
libs: AsyncHintsLib[];
|
|
26
|
+
requests: AsyncHintsRequest[];
|
|
27
|
+
};
|
|
28
|
+
}
|
|
11
29
|
/**
|
|
12
30
|
* A class representing the app index service allowing to search applications deployed on an ABAP system.
|
|
13
31
|
*/
|
|
@@ -24,5 +42,12 @@ export declare abstract class AppIndexService extends Axios implements Service {
|
|
|
24
42
|
search(searchParams?: {
|
|
25
43
|
[property: string]: string;
|
|
26
44
|
}, resultFields?: string[]): Promise<AppIndex>;
|
|
45
|
+
/**
|
|
46
|
+
* Gets the app info for the specified id.
|
|
47
|
+
*
|
|
48
|
+
* @param {string} appId - The id of the app.
|
|
49
|
+
* @returns {Promise<Ui5AppInfo>} App info.
|
|
50
|
+
*/
|
|
51
|
+
getAppInfo(appId: string): Promise<Ui5AppInfo>;
|
|
27
52
|
}
|
|
28
53
|
//# sourceMappingURL=app-index-service.d.ts.map
|
|
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.AppIndexService = void 0;
|
|
13
13
|
const axios_1 = require("axios");
|
|
14
|
+
const odata_request_error_1 = require("../base/odata-request-error");
|
|
14
15
|
/**
|
|
15
16
|
* A class representing the app index service allowing to search applications deployed on an ABAP system.
|
|
16
17
|
*/
|
|
@@ -32,6 +33,30 @@ class AppIndexService extends axios_1.Axios {
|
|
|
32
33
|
return JSON.parse(response.data).results;
|
|
33
34
|
});
|
|
34
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Gets the app info for the specified id.
|
|
38
|
+
*
|
|
39
|
+
* @param {string} appId - The id of the app.
|
|
40
|
+
* @returns {Promise<Ui5AppInfo>} App info.
|
|
41
|
+
*/
|
|
42
|
+
getAppInfo(appId) {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
try {
|
|
45
|
+
const response = yield this.get('/ui5_app_info_json', { params: { id: appId } });
|
|
46
|
+
return JSON.parse(response.data);
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
if ((0, odata_request_error_1.isAxiosError)(error)) {
|
|
50
|
+
this.log.error(`Failed fetching ui5_app_info_json for app with id ${appId}.`);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
this.log.error(`Parsing error: ui5_app_info_json is not in expected format for app with id ${appId}.`);
|
|
54
|
+
}
|
|
55
|
+
this.log.debug(error);
|
|
56
|
+
throw error;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
35
60
|
}
|
|
36
61
|
exports.AppIndexService = AppIndexService;
|
|
37
62
|
AppIndexService.PATH = '/sap/bc/ui2/app_index';
|
package/dist/abap/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { AppInfo, BspConfig, DeployConfig, Ui5AbapRepositoryService, UndeployConfig } from './ui5-abap-repository-service';
|
|
2
2
|
export { LayeredRepositoryService, AdaptationConfig, MergedAppDescriptor } from './lrep-service';
|
|
3
3
|
export { AbapServiceProvider } from './abap-service-provider';
|
|
4
|
-
export { AppIndex, AppIndexService } from './app-index-service';
|
|
4
|
+
export { AppIndex, AppIndexService, Ui5AppInfo } from './app-index-service';
|
|
5
5
|
export * from './message';
|
|
6
6
|
export * from './catalog';
|
|
7
7
|
export * from './adt-catalog';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/axios-extension",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.3",
|
|
4
4
|
"description": "Extension of the Axios module adding convenience methods to interact with SAP systems especially with OData services.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"fast-xml-parser": "4.2.7",
|
|
20
20
|
"lodash": "4.17.21",
|
|
21
21
|
"open": "7.0.3",
|
|
22
|
-
"qs": "6.
|
|
22
|
+
"qs": "6.11.0",
|
|
23
23
|
"xpath": "0.0.33",
|
|
24
24
|
"@xmldom/xmldom": "0.8.10",
|
|
25
25
|
"@sap-ux/btp-utils": "0.14.4",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@types/lodash": "4.14.202",
|
|
30
30
|
"nock": "13.4.0",
|
|
31
31
|
"supertest": "6.3.3",
|
|
32
|
-
"@sap-ux/project-access": "1.22.
|
|
32
|
+
"@sap-ux/project-access": "1.22.3"
|
|
33
33
|
},
|
|
34
34
|
"files": [
|
|
35
35
|
"dist",
|