@sap-ux/axios-extension 1.10.0 → 1.10.2
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.
- package/dist/abap/adt-catalog/services/transportcheck-service.d.ts +6 -0
- package/dist/abap/adt-catalog/services/transportcheck-service.js +18 -1
- package/dist/abap/types/adt-types.js +1 -1
- package/dist/auth/connection.js +1 -1
- package/dist/auth/uaa.js +1 -1
- package/dist/base/odata-service.js +1 -1
- package/dist/factory.js +1 -1
- package/package.json +4 -4
|
@@ -31,6 +31,12 @@ export declare class TransportChecksService extends AdtService {
|
|
|
31
31
|
* @returns a list of valid transport requests can be used for deploy config
|
|
32
32
|
*/
|
|
33
33
|
private getTransportRequestList;
|
|
34
|
+
/**
|
|
35
|
+
* Parses the document to find and log the <CTS_MESSAGE> with severity 'E' in <MESSAGES>.
|
|
36
|
+
*
|
|
37
|
+
* @param doc document
|
|
38
|
+
*/
|
|
39
|
+
private logErrorMsgs;
|
|
34
40
|
/**
|
|
35
41
|
* Provide a list of transport requests available for the input package name and project name
|
|
36
42
|
* in a ADT CTS request.
|
|
@@ -104,11 +104,28 @@ class TransportChecksService extends adt_service_1.AdtService {
|
|
|
104
104
|
case 'S':
|
|
105
105
|
return this.getTransportList(doc);
|
|
106
106
|
case 'E':
|
|
107
|
+
this.logErrorMsgs(doc);
|
|
108
|
+
return [];
|
|
107
109
|
default:
|
|
108
|
-
this.log.warn(`
|
|
110
|
+
this.log.warn(`Unknown response content: ${xml}`);
|
|
109
111
|
return [];
|
|
110
112
|
}
|
|
111
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Parses the document to find and log the <CTS_MESSAGE> with severity 'E' in <MESSAGES>.
|
|
116
|
+
*
|
|
117
|
+
* @param doc document
|
|
118
|
+
*/
|
|
119
|
+
logErrorMsgs(doc) {
|
|
120
|
+
var _a, _b;
|
|
121
|
+
const messages = doc.getElementsByTagName('CTS_MESSAGE');
|
|
122
|
+
for (const msg of Array.from(messages)) {
|
|
123
|
+
if (((_a = msg.getElementsByTagName('SEVERITY')[0]) === null || _a === void 0 ? void 0 : _a.textContent) === 'E') {
|
|
124
|
+
const text = (_b = msg.getElementsByTagName('TEXT')[0]) === null || _b === void 0 ? void 0 : _b.textContent;
|
|
125
|
+
this.log.error(text);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
112
129
|
/**
|
|
113
130
|
* Provide a list of transport requests available for the input package name and project name
|
|
114
131
|
* in a ADT CTS request.
|
|
@@ -8,7 +8,7 @@ var TenantType;
|
|
|
8
8
|
(function (TenantType) {
|
|
9
9
|
TenantType["SAP"] = "SAP";
|
|
10
10
|
TenantType["Customer"] = "CUSTOMER";
|
|
11
|
-
})(TenantType
|
|
11
|
+
})(TenantType || (exports.TenantType = TenantType = {}));
|
|
12
12
|
// In XML response of ADT TransportChecks service,
|
|
13
13
|
// the <DLVUNIT/> element contain text that indicate it is local package.
|
|
14
14
|
// No transport number required for deploying to local pacakge.
|
package/dist/auth/connection.js
CHANGED
|
@@ -11,7 +11,7 @@ var CSRF;
|
|
|
11
11
|
CSRF["RequestHeaderName"] = "X-Csrf-Token";
|
|
12
12
|
CSRF["RequestHeaderValue"] = "Fetch";
|
|
13
13
|
CSRF["ResponseHeaderName"] = "x-csrf-token";
|
|
14
|
-
})(CSRF
|
|
14
|
+
})(CSRF || (exports.CSRF = CSRF = {}));
|
|
15
15
|
/** Default connection timeout (milliseconds) */
|
|
16
16
|
exports.defaultTimeout = 60 * 1000; // 1 minute
|
|
17
17
|
/**
|
package/dist/auth/uaa.js
CHANGED
|
@@ -278,7 +278,7 @@ class Uaa {
|
|
|
278
278
|
if (!refreshToken || startFreshLogin) {
|
|
279
279
|
const { authCode, redirect } = yield this.getAuthCode();
|
|
280
280
|
const tokenRequest = this.getTokenRequestForAuthCode({
|
|
281
|
-
redirectUri: redirect.url(),
|
|
281
|
+
redirectUri: redirect.url(), // Redirection URL needs to match
|
|
282
282
|
authCode
|
|
283
283
|
});
|
|
284
284
|
response = yield axios_1.default.request(tokenRequest);
|
|
@@ -18,7 +18,7 @@ var ODataVersion;
|
|
|
18
18
|
(function (ODataVersion) {
|
|
19
19
|
ODataVersion["v2"] = "2";
|
|
20
20
|
ODataVersion["v4"] = "4";
|
|
21
|
-
})(ODataVersion
|
|
21
|
+
})(ODataVersion || (exports.ODataVersion = ODataVersion = {}));
|
|
22
22
|
/**
|
|
23
23
|
* Parse a JSON based OData response and extract the content from the OData structure.
|
|
24
24
|
*
|
package/dist/factory.js
CHANGED
|
@@ -106,7 +106,7 @@ var AbapCloudEnvironment;
|
|
|
106
106
|
(function (AbapCloudEnvironment) {
|
|
107
107
|
AbapCloudEnvironment["Standalone"] = "Standalone";
|
|
108
108
|
AbapCloudEnvironment["EmbeddedSteampunk"] = "EmbeddedSteampunk";
|
|
109
|
-
})(AbapCloudEnvironment
|
|
109
|
+
})(AbapCloudEnvironment || (exports.AbapCloudEnvironment = AbapCloudEnvironment = {}));
|
|
110
110
|
/**
|
|
111
111
|
* Create an instance of an ABAP service provider for a Cloud ABAP system.
|
|
112
112
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/axios-extension",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.2",
|
|
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",
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"xpath": "0.0.33",
|
|
24
24
|
"@xmldom/xmldom": "0.8.10",
|
|
25
25
|
"@sap-ux/btp-utils": "0.13.0",
|
|
26
|
-
"@sap-ux/logger": "0.
|
|
26
|
+
"@sap-ux/logger": "0.5.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@types/lodash": "4.14.
|
|
29
|
+
"@types/lodash": "4.14.202",
|
|
30
30
|
"nock": "13.4.0",
|
|
31
31
|
"supertest": "6.3.3",
|
|
32
|
-
"@sap-ux/project-access": "1.17.
|
|
32
|
+
"@sap-ux/project-access": "1.17.2"
|
|
33
33
|
},
|
|
34
34
|
"files": [
|
|
35
35
|
"dist",
|