@sap-ux/axios-extension 1.26.1 → 2.0.1

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.
Files changed (92) hide show
  1. package/dist/abap/abap-service-provider.d.ts +11 -11
  2. package/dist/abap/abap-service-provider.js +43 -47
  3. package/dist/abap/adt-catalog/adt-catalog-service.d.ts +2 -2
  4. package/dist/abap/adt-catalog/adt-catalog-service.js +7 -11
  5. package/dist/abap/adt-catalog/adt-schema-store.d.ts +1 -1
  6. package/dist/abap/adt-catalog/adt-schema-store.js +1 -5
  7. package/dist/abap/adt-catalog/generators/index.d.ts +2 -2
  8. package/dist/abap/adt-catalog/generators/index.js +2 -7
  9. package/dist/abap/adt-catalog/generators/odata-service-generator.d.ts +3 -3
  10. package/dist/abap/adt-catalog/generators/odata-service-generator.js +2 -6
  11. package/dist/abap/adt-catalog/generators/types.js +1 -2
  12. package/dist/abap/adt-catalog/generators/ui-service-generator.d.ts +3 -3
  13. package/dist/abap/adt-catalog/generators/ui-service-generator.js +2 -6
  14. package/dist/abap/adt-catalog/index.d.ts +3 -3
  15. package/dist/abap/adt-catalog/index.js +3 -19
  16. package/dist/abap/adt-catalog/services/abapcdsview-service.d.ts +2 -2
  17. package/dist/abap/adt-catalog/services/abapcdsview-service.js +2 -6
  18. package/dist/abap/adt-catalog/services/adt-service.d.ts +1 -1
  19. package/dist/abap/adt-catalog/services/adt-service.js +5 -9
  20. package/dist/abap/adt-catalog/services/ato-service.d.ts +2 -2
  21. package/dist/abap/adt-catalog/services/ato-service.js +5 -9
  22. package/dist/abap/adt-catalog/services/businessobjects-service.d.ts +2 -2
  23. package/dist/abap/adt-catalog/services/businessobjects-service.js +2 -6
  24. package/dist/abap/adt-catalog/services/filestore-service.d.ts +2 -2
  25. package/dist/abap/adt-catalog/services/filestore-service.js +5 -9
  26. package/dist/abap/adt-catalog/services/generator-service.d.ts +3 -3
  27. package/dist/abap/adt-catalog/services/generator-service.js +2 -6
  28. package/dist/abap/adt-catalog/services/index.d.ts +13 -12
  29. package/dist/abap/adt-catalog/services/index.js +12 -27
  30. package/dist/abap/adt-catalog/services/list-package-service.d.ts +2 -2
  31. package/dist/abap/adt-catalog/services/list-package-service.js +5 -9
  32. package/dist/abap/adt-catalog/services/publish-service.d.ts +2 -2
  33. package/dist/abap/adt-catalog/services/publish-service.js +2 -6
  34. package/dist/abap/adt-catalog/services/rap-generator-service.d.ts +3 -3
  35. package/dist/abap/adt-catalog/services/rap-generator-service.js +2 -6
  36. package/dist/abap/adt-catalog/services/systeminfo-service.d.ts +2 -2
  37. package/dist/abap/adt-catalog/services/systeminfo-service.js +2 -6
  38. package/dist/abap/adt-catalog/services/transportcheck-service.d.ts +2 -2
  39. package/dist/abap/adt-catalog/services/transportcheck-service.js +9 -46
  40. package/dist/abap/adt-catalog/services/transportrequest-service.d.ts +2 -2
  41. package/dist/abap/adt-catalog/services/transportrequest-service.js +2 -6
  42. package/dist/abap/adt-catalog/services/ui5-rt-version-service.d.ts +2 -2
  43. package/dist/abap/adt-catalog/services/ui5-rt-version-service.js +2 -6
  44. package/dist/abap/app-index-service.d.ts +1 -1
  45. package/dist/abap/app-index-service.js +3 -7
  46. package/dist/abap/catalog/base.d.ts +2 -2
  47. package/dist/abap/catalog/base.js +3 -7
  48. package/dist/abap/catalog/index.d.ts +3 -3
  49. package/dist/abap/catalog/index.js +3 -19
  50. package/dist/abap/catalog/v2-catalog-service.d.ts +2 -2
  51. package/dist/abap/catalog/v2-catalog-service.js +7 -11
  52. package/dist/abap/catalog/v4-catalog-service.d.ts +2 -2
  53. package/dist/abap/catalog/v4-catalog-service.js +11 -15
  54. package/dist/abap/index.d.ts +12 -8
  55. package/dist/abap/index.js +8 -31
  56. package/dist/abap/lrep-service.d.ts +2 -2
  57. package/dist/abap/lrep-service.js +24 -31
  58. package/dist/abap/message.js +10 -18
  59. package/dist/abap/types/adt-internal-types.js +1 -2
  60. package/dist/abap/types/adt-types.js +3 -6
  61. package/dist/abap/types/external-services.js +1 -2
  62. package/dist/abap/types/index.d.ts +2 -2
  63. package/dist/abap/types/index.js +2 -18
  64. package/dist/abap/ui5-abap-repository-service.d.ts +1 -1
  65. package/dist/abap/ui5-abap-repository-service.js +14 -18
  66. package/dist/abap/ui5-version-service.d.ts +1 -1
  67. package/dist/abap/ui5-version-service.js +2 -6
  68. package/dist/auth/connection.d.ts +1 -1
  69. package/dist/auth/connection.js +10 -18
  70. package/dist/auth/error.js +4 -11
  71. package/dist/auth/index.d.ts +8 -6
  72. package/dist/auth/index.js +14 -35
  73. package/dist/auth/redirect.js +1 -5
  74. package/dist/auth/reentrance-ticket/abap-virtual-host-provider.js +5 -12
  75. package/dist/auth/reentrance-ticket/index.d.ts +1 -1
  76. package/dist/auth/reentrance-ticket/index.js +7 -10
  77. package/dist/auth/reentrance-ticket/redirect.d.ts +1 -1
  78. package/dist/auth/reentrance-ticket/redirect.js +10 -16
  79. package/dist/auth/static.js +2 -7
  80. package/dist/auth/uaa.d.ts +1 -1
  81. package/dist/auth/uaa.js +24 -31
  82. package/dist/base/odata-request-error.js +2 -7
  83. package/dist/base/odata-service.js +4 -8
  84. package/dist/base/patchTls.js +6 -13
  85. package/dist/base/service-provider.d.ts +2 -2
  86. package/dist/base/service-provider.js +8 -12
  87. package/dist/cacerts/sap-global-root-ca.js +1 -4
  88. package/dist/factory.d.ts +5 -5
  89. package/dist/factory.js +44 -56
  90. package/dist/index.d.ts +9 -9
  91. package/dist/index.js +10 -28
  92. package/package.json +9 -7
@@ -1,12 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sapGlobalRootCaCert = void 0;
4
1
  /**
5
2
  * SAP Global Root CA certificate is publicly available from:
6
3
  * https://github.com/SAP/SapMachine/blob/sapmachine/src/java.base/share/data/cacerts/sapglobalrootca
7
4
  *
8
5
  */
9
- exports.sapGlobalRootCaCert = `
6
+ export const sapGlobalRootCaCert = `
10
7
  Owner: CN=SAP Global Root CA, O=SAP AG, L=Walldorf, C=DE
11
8
  Issuer: CN=SAP Global Root CA, O=SAP AG, L=Walldorf, C=DE
12
9
  Serial number: 5d03d93d31615d8f488b3970c78f1b99
package/dist/factory.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import { type Destination } from '@sap-ux/btp-utils';
2
2
  import type { AxiosRequestConfig } from 'axios';
3
3
  import { type HttpsProxyAgentOptions, HttpsProxyAgent } from 'https-proxy-agent';
4
- import { AbapServiceProvider } from './abap';
5
- import type { RefreshTokenChanged, ServiceInfo } from './auth';
6
- import type { ODataService } from './base/odata-service';
7
- import type { ProviderConfiguration } from './base/service-provider';
8
- import { ServiceProvider } from './base/service-provider';
4
+ import { AbapServiceProvider } from './abap/index.js';
5
+ import type { RefreshTokenChanged, ServiceInfo } from './auth/index.js';
6
+ import type { ODataService } from './base/odata-service.js';
7
+ import type { ProviderConfiguration } from './base/service-provider.js';
8
+ import { ServiceProvider } from './base/service-provider.js';
9
9
  /**
10
10
  * PatchedHttpsProxyAgent is a custom implementation of HttpsProxyAgent that allows to pass additional options, currently not supported by the original implementation when calling tls.connect
11
11
  */
package/dist/factory.js CHANGED
@@ -1,29 +1,18 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.AbapCloudEnvironment = exports.PatchedHttpsProxyAgent = void 0;
7
- exports.create = create;
8
- exports.createForAbap = createForAbap;
9
- exports.createForAbapOnCloud = createForAbapOnCloud;
10
- exports.createForDestination = createForDestination;
11
- exports.createServiceForUrl = createServiceForUrl;
12
- const btp_utils_1 = require("@sap-ux/btp-utils");
13
- const http_proxy_agent_1 = require("http-proxy-agent");
14
- const node_https_1 = require("node:https");
15
- const https_proxy_agent_1 = require("https-proxy-agent");
16
- const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
17
- const proxy_from_env_1 = require("proxy-from-env");
18
- const node_util_1 = require("node:util");
19
- const abap_1 = require("./abap");
20
- const auth_1 = require("./auth");
21
- const patchTls_1 = require("./base/patchTls");
22
- const service_provider_1 = require("./base/service-provider");
1
+ import { BAS_DEST_INSTANCE_CRED_HEADER, getCredentialsForDestinationService, getDestinationUrlForAppStudio, isAbapSystem, isAppStudio } from '@sap-ux/btp-utils';
2
+ import { HttpProxyAgent } from 'http-proxy-agent';
3
+ import { Agent as HttpsAgent } from 'node:https';
4
+ import { HttpsProxyAgent } from 'https-proxy-agent';
5
+ import cloneDeep from 'lodash/cloneDeep.js';
6
+ import { getProxyForUrl } from 'proxy-from-env';
7
+ import { inspect } from 'node:util';
8
+ import { AbapServiceProvider } from './abap/index.js';
9
+ import { attachBasicAuthInterceptor, attachConnectionHandler, attachReentranceTicketAuthInterceptor, attachUaaAuthInterceptor } from './auth/index.js';
10
+ import { TlsPatch } from './base/patchTls.js';
11
+ import { ServiceProvider } from './base/service-provider.js';
23
12
  /**
24
13
  * PatchedHttpsProxyAgent is a custom implementation of HttpsProxyAgent that allows to pass additional options, currently not supported by the original implementation when calling tls.connect
25
14
  */
26
- class PatchedHttpsProxyAgent extends https_proxy_agent_1.HttpsProxyAgent {
15
+ export class PatchedHttpsProxyAgent extends HttpsProxyAgent {
27
16
  extraOptions;
28
17
  /**
29
18
  * Extension of the base constructor.
@@ -46,7 +35,6 @@ class PatchedHttpsProxyAgent extends https_proxy_agent_1.HttpsProxyAgent {
46
35
  return super.connect(req, { ...this.extraOptions, ...opts });
47
36
  }
48
37
  }
49
- exports.PatchedHttpsProxyAgent = PatchedHttpsProxyAgent;
50
38
  /**
51
39
  * Create a new instance of given type and set default configuration merged with the given config.
52
40
  *
@@ -55,13 +43,13 @@ exports.PatchedHttpsProxyAgent = PatchedHttpsProxyAgent;
55
43
  * @returns instance of the provided class
56
44
  */
57
45
  function createInstance(ProviderType, config) {
58
- const providerConfig = (0, cloneDeep_1.default)(config);
46
+ const providerConfig = cloneDeep(config);
59
47
  const agentOptions = {
60
48
  rejectUnauthorized: !providerConfig.ignoreCertErrors
61
49
  };
62
50
  // Default httpsAgent with optional parameters passed to the agent
63
51
  if (!providerConfig.httpsAgent) {
64
- providerConfig.httpsAgent = new node_https_1.Agent(agentOptions);
52
+ providerConfig.httpsAgent = new HttpsAgent(agentOptions);
65
53
  }
66
54
  delete providerConfig.ignoreCertErrors;
67
55
  providerConfig.withCredentials = providerConfig?.auth && Object.keys(providerConfig.auth).length > 0;
@@ -77,11 +65,11 @@ function createInstance(ProviderType, config) {
77
65
  // NO_PROXY hostname matching works correctly against the actual target URL.
78
66
  instance.interceptors.request.use((request) => {
79
67
  const fullUrl = instance.getUri(request);
80
- const localProxy = (0, proxy_from_env_1.getProxyForUrl)(fullUrl);
81
- if (localProxy && !(0, btp_utils_1.isAppStudio)()) {
68
+ const localProxy = getProxyForUrl(fullUrl);
69
+ if (localProxy && !isAppStudio()) {
82
70
  // axios doesn't handle proxies correctly, instead use a custom agent with axios proxy disabled
83
71
  request.httpsAgent = new PatchedHttpsProxyAgent(localProxy, agentOptions);
84
- request.httpAgent = new http_proxy_agent_1.HttpProxyAgent(localProxy);
72
+ request.httpAgent = new HttpProxyAgent(localProxy);
85
73
  request.proxy = false;
86
74
  }
87
75
  return request;
@@ -95,17 +83,17 @@ function createInstance(ProviderType, config) {
95
83
  head: {},
96
84
  patch: {}
97
85
  };
98
- (0, auth_1.attachConnectionHandler)(instance);
86
+ attachConnectionHandler(instance);
99
87
  if (providerConfig.auth?.password) {
100
- (0, auth_1.attachBasicAuthInterceptor)(instance);
88
+ attachBasicAuthInterceptor(instance);
101
89
  }
102
90
  if (config.cookies) {
103
91
  config.cookies.split(';').forEach((singleCookieStr) => {
104
92
  instance.cookies.addCookie(singleCookieStr.trim());
105
93
  });
106
94
  }
107
- if (patchTls_1.TlsPatch.isPatchRequired(config.baseURL)) {
108
- patchTls_1.TlsPatch.apply();
95
+ if (TlsPatch.isPatchRequired(config.baseURL)) {
96
+ TlsPatch.apply();
109
97
  }
110
98
  return instance;
111
99
  }
@@ -115,14 +103,14 @@ function createInstance(ProviderType, config) {
115
103
  * @param config axios config with additional extension specific properties
116
104
  * @returns instance of the basic service provider
117
105
  */
118
- function create(config) {
106
+ export function create(config) {
119
107
  if (typeof config === 'string') {
120
- return createInstance(service_provider_1.ServiceProvider, {
108
+ return createInstance(ServiceProvider, {
121
109
  baseURL: config
122
110
  });
123
111
  }
124
112
  else {
125
- return createInstance(service_provider_1.ServiceProvider, config);
113
+ return createInstance(ServiceProvider, config);
126
114
  }
127
115
  }
128
116
  /**
@@ -131,27 +119,27 @@ function create(config) {
131
119
  * @param config axios config with additional extension specific properties
132
120
  * @returns instance of an ABAP service provider
133
121
  */
134
- function createForAbap(config) {
135
- return createInstance(abap_1.AbapServiceProvider, config);
122
+ export function createForAbap(config) {
123
+ return createInstance(AbapServiceProvider, config);
136
124
  }
137
125
  /** Supported ABAP environments on the cloud */
138
- var AbapCloudEnvironment;
126
+ export var AbapCloudEnvironment;
139
127
  (function (AbapCloudEnvironment) {
140
128
  AbapCloudEnvironment["Standalone"] = "Standalone";
141
129
  AbapCloudEnvironment["EmbeddedSteampunk"] = "EmbeddedSteampunk";
142
- })(AbapCloudEnvironment || (exports.AbapCloudEnvironment = AbapCloudEnvironment = {}));
130
+ })(AbapCloudEnvironment || (AbapCloudEnvironment = {}));
143
131
  /**
144
132
  * Create an instance of an ABAP service provider for a Cloud ABAP system.
145
133
  *
146
134
  * @param options {@link AbapCloudOptions}
147
135
  * @returns instance of an {@link AbapServiceProvider}
148
136
  */
149
- function createForAbapOnCloud(options) {
137
+ export function createForAbapOnCloud(options) {
150
138
  let provider;
151
139
  switch (options.environment) {
152
140
  case AbapCloudEnvironment.Standalone: {
153
141
  const { service, refreshToken, refreshTokenChangedCb, cookies, ...config } = options;
154
- provider = createInstance(abap_1.AbapServiceProvider, {
142
+ provider = createInstance(AbapServiceProvider, {
155
143
  baseURL: service.url,
156
144
  cookies,
157
145
  ...config
@@ -160,30 +148,30 @@ function createForAbapOnCloud(options) {
160
148
  // Only in the case where a username and password are provided use UAA otherwise use re-entrance
161
149
  // This is to support unattended authentication for now.
162
150
  if (options.service?.uaa?.username && options.service.uaa.password) {
163
- (0, auth_1.attachUaaAuthInterceptor)(provider, service, refreshToken, refreshTokenChangedCb);
151
+ attachUaaAuthInterceptor(provider, service, refreshToken, refreshTokenChangedCb);
164
152
  }
165
153
  else {
166
154
  // Always use re-entrance tickets regardless of the ABAP Cloud environment where credentials are not provided
167
- (0, auth_1.attachReentranceTicketAuthInterceptor)({ provider });
155
+ attachReentranceTicketAuthInterceptor({ provider });
168
156
  }
169
157
  }
170
158
  break;
171
159
  }
172
160
  case AbapCloudEnvironment.EmbeddedSteampunk: {
173
161
  const { url, cookies, ...config } = options;
174
- provider = createInstance(abap_1.AbapServiceProvider, {
162
+ provider = createInstance(AbapServiceProvider, {
175
163
  baseURL: url,
176
164
  cookies,
177
165
  ...config
178
166
  });
179
167
  if (!cookies) {
180
- (0, auth_1.attachReentranceTicketAuthInterceptor)({ provider });
168
+ attachReentranceTicketAuthInterceptor({ provider });
181
169
  }
182
170
  break;
183
171
  }
184
172
  default: {
185
173
  const opts = options;
186
- throw new Error(`Unknown environment type supplied: ${(0, node_util_1.inspect)(opts)}`);
174
+ throw new Error(`Unknown environment type supplied: ${inspect(opts)}`);
187
175
  }
188
176
  }
189
177
  return provider;
@@ -196,30 +184,30 @@ function createForAbapOnCloud(options) {
196
184
  * @param destinationServiceInstance optional id of a destination service instance providing the destination
197
185
  * @returns instance of a service provider
198
186
  */
199
- function createForDestination(options, destination, destinationServiceInstance) {
187
+ export function createForDestination(options, destination, destinationServiceInstance) {
200
188
  const { cookies, ...config } = options;
201
189
  const providerConfig = {
202
190
  ...config,
203
- baseURL: (0, btp_utils_1.getDestinationUrlForAppStudio)(destination.Name, destination.Host ? new URL(destination.Host).pathname : undefined),
191
+ baseURL: getDestinationUrlForAppStudio(destination.Name, destination.Host ? new URL(destination.Host).pathname : undefined),
204
192
  cookies: cookies
205
193
  };
206
194
  // SAML in AppStudio is not yet supported
207
195
  providerConfig.params = providerConfig.params ?? {};
208
196
  providerConfig.params.saml2 = 'disabled';
209
197
  let provider;
210
- if ((0, btp_utils_1.isAbapSystem)(destination)) {
211
- provider = createInstance(abap_1.AbapServiceProvider, providerConfig);
198
+ if (isAbapSystem(destination)) {
199
+ provider = createInstance(AbapServiceProvider, providerConfig);
212
200
  // For an ABAP destination flow, need to show the destination host URL property instead of the BAS host URL i.e. https://mydest.dest
213
201
  provider.publicUrl = destination.Host;
214
202
  }
215
203
  else {
216
- provider = createInstance(service_provider_1.ServiceProvider, providerConfig);
204
+ provider = createInstance(ServiceProvider, providerConfig);
217
205
  }
218
206
  // resolve destination service user on first request if required
219
207
  if (destinationServiceInstance) {
220
208
  const oneTimeReqInterceptorId = provider.interceptors.request.use(async (request) => {
221
- const credentials = await (0, btp_utils_1.getCredentialsForDestinationService)(destinationServiceInstance);
222
- provider.defaults.headers.common[btp_utils_1.BAS_DEST_INSTANCE_CRED_HEADER] = credentials;
209
+ const credentials = await getCredentialsForDestinationService(destinationServiceInstance);
210
+ provider.defaults.headers.common[BAS_DEST_INSTANCE_CRED_HEADER] = credentials;
223
211
  provider.interceptors.request.eject(oneTimeReqInterceptorId);
224
212
  return request;
225
213
  });
@@ -233,7 +221,7 @@ function createForDestination(options, destination, destinationServiceInstance)
233
221
  * @param config axios config with additional extension specific properties
234
222
  * @returns instance of a service
235
223
  */
236
- function createServiceForUrl(url, config = {}) {
224
+ export function createServiceForUrl(url, config = {}) {
237
225
  const urlObject = new URL(url);
238
226
  config.baseURL = urlObject.origin;
239
227
  const searchParams = new URLSearchParams(config.params);
@@ -241,7 +229,7 @@ function createServiceForUrl(url, config = {}) {
241
229
  searchParams.append(key, val);
242
230
  }
243
231
  config.params = searchParams;
244
- const provider = createInstance(service_provider_1.ServiceProvider, config);
232
+ const provider = createInstance(ServiceProvider, config);
245
233
  return provider.service(urlObject.pathname);
246
234
  }
247
235
  //# sourceMappingURL=factory.js.map
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import type { AxiosError, AxiosRequestConfig } from 'axios';
2
- import { isAxiosError } from './base/odata-request-error';
3
- export * from './base/odata-service';
4
- export * from './base/service-provider';
5
- export * from './base/patchTls';
6
- export * from './abap';
7
- export * from './factory';
8
- export * from './auth';
9
- export * from './abap/message';
10
- export { ServiceType } from './abap/catalog/base';
2
+ import { isAxiosError } from './base/odata-request-error.js';
3
+ export * from './base/odata-service.js';
4
+ export * from './base/service-provider.js';
5
+ export * from './base/patchTls.js';
6
+ export * from './abap/index.js';
7
+ export * from './factory.js';
8
+ export * from './auth/index.js';
9
+ export * from './abap/message.js';
10
+ export { ServiceType } from './abap/catalog/base.js';
11
11
  export { AxiosError, AxiosRequestConfig, isAxiosError };
12
12
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,29 +1,11 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.isAxiosError = exports.ServiceType = void 0;
18
- const odata_request_error_1 = require("./base/odata-request-error");
19
- Object.defineProperty(exports, "isAxiosError", { enumerable: true, get: function () { return odata_request_error_1.isAxiosError; } });
20
- __exportStar(require("./base/odata-service"), exports);
21
- __exportStar(require("./base/service-provider"), exports);
22
- __exportStar(require("./base/patchTls"), exports);
23
- __exportStar(require("./abap"), exports);
24
- __exportStar(require("./factory"), exports);
25
- __exportStar(require("./auth"), exports);
26
- __exportStar(require("./abap/message"), exports);
27
- var base_1 = require("./abap/catalog/base");
28
- Object.defineProperty(exports, "ServiceType", { enumerable: true, get: function () { return base_1.ServiceType; } });
1
+ import { isAxiosError } from './base/odata-request-error.js';
2
+ export * from './base/odata-service.js';
3
+ export * from './base/service-provider.js';
4
+ export * from './base/patchTls.js';
5
+ export * from './abap/index.js';
6
+ export * from './factory.js';
7
+ export * from './auth/index.js';
8
+ export * from './abap/message.js';
9
+ export { ServiceType } from './abap/catalog/base.js';
10
+ export { isAxiosError };
29
11
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@sap-ux/axios-extension",
3
- "version": "1.26.1",
3
+ "version": "2.0.1",
4
4
  "description": "Extension of the Axios module adding convenience methods to interact with SAP systems especially with OData services.",
5
+ "type": "module",
5
6
  "repository": {
6
7
  "type": "git",
7
8
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -25,17 +26,18 @@
25
26
  "https-proxy-agent": "7.0.6",
26
27
  "http-proxy-agent": "7.0.2",
27
28
  "proxy-from-env": "1.1.0",
28
- "@sap-ux/btp-utils": "1.2.1",
29
- "@sap-ux/logger": "0.9.0",
30
- "@sap-ux/feature-toggle": "0.4.0"
29
+ "@sap-ux/btp-utils": "2.0.1",
30
+ "@sap-ux/logger": "1.0.1",
31
+ "@sap-ux/feature-toggle": "1.0.1"
31
32
  },
32
33
  "devDependencies": {
34
+ "@jest/globals": "30.3.0",
33
35
  "@sap-ux/vocabularies-types": "0.15.0",
34
36
  "@types/lodash": "4.17.24",
35
37
  "nock": "14.0.11",
36
38
  "supertest": "7.2.2",
37
39
  "@types/proxy-from-env": "1.0.4",
38
- "@sap-ux/project-access": "1.38.1"
40
+ "@sap-ux/project-access": "2.1.0"
39
41
  },
40
42
  "files": [
41
43
  "dist",
@@ -53,8 +55,8 @@
53
55
  "format": "prettier --write '**/*.{js,json,ts,yaml,yml}' --ignore-path ../../.prettierignore",
54
56
  "lint": "eslint",
55
57
  "lint:fix": "eslint --fix",
56
- "test": "jest --ci --forceExit --detectOpenHandles --colors",
57
- "test-u": "jest --forceExit --detectOpenHandles --colors -u",
58
+ "test": "cross-env NODE_OPTIONS='--experimental-vm-modules' jest --ci --forceExit --detectOpenHandles --colors",
59
+ "test-u": "cross-env NODE_OPTIONS='--experimental-vm-modules' jest --forceExit --detectOpenHandles --colors -u",
58
60
  "link": "pnpm link --global",
59
61
  "unlink": "pnpm unlink --global"
60
62
  }