@sap-ux/axios-extension 1.25.0 → 1.25.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/abapcdsview-service.d.ts +1 -1
- package/dist/abap/adt-catalog/services/ato-service.d.ts +1 -1
- package/dist/abap/adt-catalog/services/businessobjects-service.d.ts +1 -1
- package/dist/abap/adt-catalog/services/filestore-service.d.ts +1 -1
- package/dist/abap/adt-catalog/services/generator-service.d.ts +1 -1
- package/dist/abap/adt-catalog/services/list-package-service.d.ts +1 -1
- package/dist/abap/adt-catalog/services/transportcheck-service.d.ts +1 -1
- package/dist/abap/adt-catalog/services/transportrequest-service.d.ts +1 -1
- package/dist/abap/adt-catalog/services/ui5-rt-version-service.d.ts +1 -1
- package/dist/abap/app-index-service.js +1 -1
- package/dist/auth/reentrance-ticket/redirect.d.ts +1 -1
- package/dist/auth/reentrance-ticket/redirect.js +2 -2
- package/dist/auth/uaa.js +2 -2
- package/dist/base/service-provider.js +2 -3
- package/dist/factory.js +4 -4
- package/package.json +3 -3
|
@@ -16,7 +16,7 @@ class AppIndexService extends axios_1.Axios {
|
|
|
16
16
|
* @returns list of applications
|
|
17
17
|
*/
|
|
18
18
|
async search(searchParams = {}, resultFields) {
|
|
19
|
-
const params =
|
|
19
|
+
const params = { ...searchParams };
|
|
20
20
|
if (resultFields) {
|
|
21
21
|
params['fields'] = resultFields.join(',');
|
|
22
22
|
}
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.setupRedirectHandling = setupRedirectHandling;
|
|
7
|
-
const
|
|
7
|
+
const node_http_1 = __importDefault(require("node:http"));
|
|
8
8
|
const error_1 = require("../error");
|
|
9
9
|
const message_1 = require("../../abap/message");
|
|
10
10
|
const static_1 = require("../static");
|
|
@@ -27,7 +27,7 @@ function setupRedirectHandling({ resolve, reject, timeout, backend, logger }) {
|
|
|
27
27
|
reject(new error_1.TimeoutError(`Timeout. Did not get a response within ${(0, message_1.prettyPrintTimeInMs)(timeout)}`));
|
|
28
28
|
};
|
|
29
29
|
const timer = setTimeout(handleTimeout, timeout);
|
|
30
|
-
server =
|
|
30
|
+
server = node_http_1.default.createServer((req, res) => {
|
|
31
31
|
const reqUrl = new URL(req.url, `http://${req.headers.host}`);
|
|
32
32
|
if (reqUrl.pathname === REDIRECT_PATH) {
|
|
33
33
|
if (timer) {
|
package/dist/auth/uaa.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.Uaa = void 0;
|
|
7
7
|
const open = require("open");
|
|
8
8
|
const axios_1 = __importDefault(require("axios"));
|
|
9
|
-
const
|
|
9
|
+
const node_http_1 = __importDefault(require("node:http"));
|
|
10
10
|
const qs_1 = __importDefault(require("qs"));
|
|
11
11
|
const redirect_1 = require("./redirect");
|
|
12
12
|
const message_1 = require("../abap/message");
|
|
@@ -212,7 +212,7 @@ class Uaa {
|
|
|
212
212
|
reject(new error_1.UAATimeoutError(`Timeout. Did not get a response within ${(0, message_1.prettyPrintTimeInMs)(timeout)}`));
|
|
213
213
|
};
|
|
214
214
|
const timer = setTimeout(handleTimeout, timeout);
|
|
215
|
-
server =
|
|
215
|
+
server = node_http_1.default.createServer((req, res) => {
|
|
216
216
|
const reqUrl = new URL(req.url, `http://${req.headers.host}`);
|
|
217
217
|
if (reqUrl.pathname === redirect_1.Redirect.path) {
|
|
218
218
|
res.writeHead(200, { 'Content-Type': 'text/html' });
|
|
@@ -58,10 +58,9 @@ class ServiceProvider extends axios_1.Axios {
|
|
|
58
58
|
* @returns axios config
|
|
59
59
|
*/
|
|
60
60
|
generateServiceConfig(path) {
|
|
61
|
-
const
|
|
62
|
-
const headers = Object.assign(this.defaults.headers?.common ?? {}, { Cookie: this.cookies.toString() });
|
|
61
|
+
const headers = { ...this.defaults.headers?.common, Cookie: this.cookies.toString() };
|
|
63
62
|
return {
|
|
64
|
-
...
|
|
63
|
+
...this.defaults,
|
|
65
64
|
baseURL: this.defaults.baseURL + path,
|
|
66
65
|
headers
|
|
67
66
|
};
|
package/dist/factory.js
CHANGED
|
@@ -11,11 +11,11 @@ exports.createForDestination = createForDestination;
|
|
|
11
11
|
exports.createServiceForUrl = createServiceForUrl;
|
|
12
12
|
const btp_utils_1 = require("@sap-ux/btp-utils");
|
|
13
13
|
const http_proxy_agent_1 = require("http-proxy-agent");
|
|
14
|
-
const
|
|
14
|
+
const node_https_1 = require("node:https");
|
|
15
15
|
const https_proxy_agent_1 = require("https-proxy-agent");
|
|
16
16
|
const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
|
|
17
17
|
const proxy_from_env_1 = require("proxy-from-env");
|
|
18
|
-
const
|
|
18
|
+
const node_util_1 = require("node:util");
|
|
19
19
|
const abap_1 = require("./abap");
|
|
20
20
|
const auth_1 = require("./auth");
|
|
21
21
|
const patchTls_1 = require("./base/patchTls");
|
|
@@ -68,7 +68,7 @@ function createInstance(ProviderType, config) {
|
|
|
68
68
|
}
|
|
69
69
|
// Default httpsAgent with optional parameters passed to the agent
|
|
70
70
|
if (!providerConfig.httpsAgent) {
|
|
71
|
-
providerConfig.httpsAgent = new
|
|
71
|
+
providerConfig.httpsAgent = new node_https_1.Agent(agentOptions);
|
|
72
72
|
}
|
|
73
73
|
delete providerConfig.ignoreCertErrors;
|
|
74
74
|
providerConfig.withCredentials = providerConfig?.auth && Object.keys(providerConfig.auth).length > 0;
|
|
@@ -177,7 +177,7 @@ function createForAbapOnCloud(options) {
|
|
|
177
177
|
}
|
|
178
178
|
default:
|
|
179
179
|
const opts = options;
|
|
180
|
-
throw new Error(`Unknown environment type supplied: ${(0,
|
|
180
|
+
throw new Error(`Unknown environment type supplied: ${(0, node_util_1.inspect)(opts)}`);
|
|
181
181
|
}
|
|
182
182
|
return provider;
|
|
183
183
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/axios-extension",
|
|
3
|
-
"version": "1.25.
|
|
3
|
+
"version": "1.25.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",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"http-proxy-agent": "7.0.2",
|
|
27
27
|
"proxy-from-env": "1.1.0",
|
|
28
28
|
"@sap-ux/btp-utils": "1.1.6",
|
|
29
|
-
"@sap-ux/logger": "0.
|
|
29
|
+
"@sap-ux/logger": "0.8.0",
|
|
30
30
|
"@sap-ux/feature-toggle": "0.3.5"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"nock": "13.4.0",
|
|
36
36
|
"supertest": "7.1.4",
|
|
37
37
|
"@types/proxy-from-env": "1.0.1",
|
|
38
|
-
"@sap-ux/project-access": "1.
|
|
38
|
+
"@sap-ux/project-access": "1.33.0"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
|
41
41
|
"dist",
|