@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.
@@ -7,7 +7,7 @@ export declare class AbapCDSViewService extends AdtService {
7
7
  /**
8
8
  * @see AdtService.getAdtCatagory()
9
9
  */
10
- private static adtCategory;
10
+ private static readonly adtCategory;
11
11
  /**
12
12
  * Get ADT scheme ID.
13
13
  *
@@ -7,7 +7,7 @@ export declare class AtoService extends AdtService {
7
7
  /**
8
8
  * @see AdtService.getAdtCatagory()
9
9
  */
10
- private static adtCategory;
10
+ private static readonly adtCategory;
11
11
  /**
12
12
  * @see AdtService.getAdtCatagory()
13
13
  * @returns AdtCategory
@@ -7,7 +7,7 @@ export declare class BusinessObjectsService extends AdtService {
7
7
  /**
8
8
  * @see AdtService.getAdtCatagory()
9
9
  */
10
- private static adtCategory;
10
+ private static readonly adtCategory;
11
11
  /**
12
12
  * Get ADT scheme ID.
13
13
  *
@@ -8,7 +8,7 @@ export declare class FileStoreService extends AdtService {
8
8
  /**
9
9
  * @see AdtService.getAdtCatagory()
10
10
  */
11
- private static adtCategory;
11
+ private static readonly adtCategory;
12
12
  /**
13
13
  * Get ADT scheme ID.
14
14
  *
@@ -8,7 +8,7 @@ export declare class GeneratorService extends AdtService {
8
8
  /**
9
9
  * @see AdtService.getAdtCatagory()
10
10
  */
11
- private static adtCategory;
11
+ private static readonly adtCategory;
12
12
  /**
13
13
  * Get ADT scheme ID.
14
14
  *
@@ -19,7 +19,7 @@ export declare class ListPackageService extends AdtService {
19
19
  /**
20
20
  * @see AdtService.getAdtCatagory()
21
21
  */
22
- private static adtCategory;
22
+ private static readonly adtCategory;
23
23
  /**
24
24
  * Get ADT scheme ID.
25
25
  *
@@ -8,7 +8,7 @@ export declare class TransportChecksService extends AdtService {
8
8
  /**
9
9
  * @see AdtService.getAdtCatagory()
10
10
  */
11
- private static adtCategory;
11
+ private static readonly adtCategory;
12
12
  /**
13
13
  * @see AdtService.getAdtCatagory()
14
14
  * @returns AdtCategory
@@ -26,7 +26,7 @@ export declare class TransportRequestService extends AdtService {
26
26
  /**
27
27
  * @see AdtService.getAdtCatagory()
28
28
  */
29
- private static adtCategory;
29
+ private static readonly adtCategory;
30
30
  /**
31
31
  * @see AdtService.getAdtCatagory()
32
32
  * @returns AdtCategory
@@ -8,7 +8,7 @@ export declare class UI5RtVersionService extends AdtService {
8
8
  /**
9
9
  * @see AdtService.getAdtCatagory()
10
10
  */
11
- private static adtCategory;
11
+ private static readonly adtCategory;
12
12
  /**
13
13
  * Get ADT scheme ID.
14
14
  *
@@ -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 = Object.assign({}, searchParams);
19
+ const params = { ...searchParams };
20
20
  if (resultFields) {
21
21
  params['fields'] = resultFields.join(',');
22
22
  }
@@ -1,5 +1,5 @@
1
1
  import type { Logger } from '@sap-ux/logger';
2
- import http from 'http';
2
+ import http from 'node:http';
3
3
  import type { ABAPVirtualHostProvider } from './abap-virtual-host-provider';
4
4
  interface Redirect {
5
5
  server: http.Server;
@@ -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 http_1 = __importDefault(require("http"));
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 = http_1.default.createServer((req, res) => {
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 http_1 = __importDefault(require("http"));
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 = http_1.default.createServer((req, res) => {
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 config = Object.assign({}, this.defaults);
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
- ...config,
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 https_1 = require("https");
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 util_1 = require("util");
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 https_1.Agent(agentOptions);
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, util_1.inspect)(opts)}`);
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.0",
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.7.2",
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.32.16"
38
+ "@sap-ux/project-access": "1.33.0"
39
39
  },
40
40
  "files": [
41
41
  "dist",