@sap-ux/axios-extension 1.11.3 → 1.11.5
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.
|
@@ -16,9 +16,9 @@ const abap_system_1 = require("./abap-system");
|
|
|
16
16
|
const redirect_1 = require("./redirect");
|
|
17
17
|
/**
|
|
18
18
|
* DO NOT USE THIS SERVICE ENDPOINT DIRECTLY.
|
|
19
|
-
*
|
|
19
|
+
* It might be removed in the future without notice.
|
|
20
20
|
*/
|
|
21
|
-
const ADT_REENTRANCE_ENDPOINT = '/sap/bc/
|
|
21
|
+
const ADT_REENTRANCE_ENDPOINT = '/sap/bc/sec/reentrance';
|
|
22
22
|
/**
|
|
23
23
|
* Get the reentrance ticket from the backend.
|
|
24
24
|
*
|
|
@@ -30,15 +30,16 @@ const ADT_REENTRANCE_ENDPOINT = '/sap/bc/adt/core/http/reentranceticket';
|
|
|
30
30
|
function getReentranceTicket({ backendUrl, logger, timeout = connection_1.defaultTimeout }) {
|
|
31
31
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
32
|
return new Promise((resolve, reject) => {
|
|
33
|
-
var _a;
|
|
33
|
+
var _a, _b;
|
|
34
34
|
const backend = new abap_system_1.ABAPSystem(backendUrl);
|
|
35
35
|
// Start local server to listen to redirect call, with timeout
|
|
36
36
|
const { server, redirectUrl } = (0, redirect_1.setupRedirectHandling)({ resolve, reject, timeout, backend, logger });
|
|
37
37
|
server.listen();
|
|
38
38
|
const redirectPort = server.address().port;
|
|
39
39
|
// Open browser to handle SAML flow and return the reentrance ticket
|
|
40
|
-
const
|
|
41
|
-
|
|
40
|
+
const scenario = (_a = process.env.SCENARIO) !== null && _a !== void 0 ? _a : 'FIORI';
|
|
41
|
+
const url = `${backend.uiHostname()}${ADT_REENTRANCE_ENDPOINT}?scenario=${scenario}&redirect-url=${redirectUrl(redirectPort)}`;
|
|
42
|
+
(_b = open(url)) === null || _b === void 0 ? void 0 : _b.catch((error) => logger.error(error));
|
|
42
43
|
});
|
|
43
44
|
});
|
|
44
45
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/axios-extension",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.5",
|
|
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",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"private": false,
|
|
15
15
|
"main": "dist/index.js",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"axios": "1.6.
|
|
17
|
+
"axios": "1.6.8",
|
|
18
18
|
"detect-content-type": "1.2.0",
|
|
19
19
|
"fast-xml-parser": "4.2.7",
|
|
20
20
|
"lodash": "4.17.21",
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"qs": "6.7.3",
|
|
23
23
|
"xpath": "0.0.33",
|
|
24
24
|
"@xmldom/xmldom": "0.8.10",
|
|
25
|
-
"@sap-ux/btp-utils": "0.14.
|
|
25
|
+
"@sap-ux/btp-utils": "0.14.3",
|
|
26
26
|
"@sap-ux/logger": "0.5.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
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.
|
|
32
|
+
"@sap-ux/project-access": "1.19.6"
|
|
33
33
|
},
|
|
34
34
|
"files": [
|
|
35
35
|
"dist",
|