@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.
- package/dist/abap/abap-service-provider.d.ts +11 -11
- package/dist/abap/abap-service-provider.js +43 -47
- package/dist/abap/adt-catalog/adt-catalog-service.d.ts +2 -2
- package/dist/abap/adt-catalog/adt-catalog-service.js +7 -11
- package/dist/abap/adt-catalog/adt-schema-store.d.ts +1 -1
- package/dist/abap/adt-catalog/adt-schema-store.js +1 -5
- package/dist/abap/adt-catalog/generators/index.d.ts +2 -2
- package/dist/abap/adt-catalog/generators/index.js +2 -7
- package/dist/abap/adt-catalog/generators/odata-service-generator.d.ts +3 -3
- package/dist/abap/adt-catalog/generators/odata-service-generator.js +2 -6
- package/dist/abap/adt-catalog/generators/types.js +1 -2
- package/dist/abap/adt-catalog/generators/ui-service-generator.d.ts +3 -3
- package/dist/abap/adt-catalog/generators/ui-service-generator.js +2 -6
- package/dist/abap/adt-catalog/index.d.ts +3 -3
- package/dist/abap/adt-catalog/index.js +3 -19
- package/dist/abap/adt-catalog/services/abapcdsview-service.d.ts +2 -2
- package/dist/abap/adt-catalog/services/abapcdsview-service.js +2 -6
- package/dist/abap/adt-catalog/services/adt-service.d.ts +1 -1
- package/dist/abap/adt-catalog/services/adt-service.js +5 -9
- package/dist/abap/adt-catalog/services/ato-service.d.ts +2 -2
- package/dist/abap/adt-catalog/services/ato-service.js +5 -9
- package/dist/abap/adt-catalog/services/businessobjects-service.d.ts +2 -2
- package/dist/abap/adt-catalog/services/businessobjects-service.js +2 -6
- package/dist/abap/adt-catalog/services/filestore-service.d.ts +2 -2
- package/dist/abap/adt-catalog/services/filestore-service.js +5 -9
- package/dist/abap/adt-catalog/services/generator-service.d.ts +3 -3
- package/dist/abap/adt-catalog/services/generator-service.js +2 -6
- package/dist/abap/adt-catalog/services/index.d.ts +13 -12
- package/dist/abap/adt-catalog/services/index.js +12 -27
- package/dist/abap/adt-catalog/services/list-package-service.d.ts +2 -2
- package/dist/abap/adt-catalog/services/list-package-service.js +5 -9
- package/dist/abap/adt-catalog/services/publish-service.d.ts +2 -2
- package/dist/abap/adt-catalog/services/publish-service.js +2 -6
- package/dist/abap/adt-catalog/services/rap-generator-service.d.ts +3 -3
- package/dist/abap/adt-catalog/services/rap-generator-service.js +2 -6
- package/dist/abap/adt-catalog/services/systeminfo-service.d.ts +2 -2
- package/dist/abap/adt-catalog/services/systeminfo-service.js +2 -6
- package/dist/abap/adt-catalog/services/transportcheck-service.d.ts +2 -2
- package/dist/abap/adt-catalog/services/transportcheck-service.js +9 -46
- package/dist/abap/adt-catalog/services/transportrequest-service.d.ts +2 -2
- package/dist/abap/adt-catalog/services/transportrequest-service.js +2 -6
- package/dist/abap/adt-catalog/services/ui5-rt-version-service.d.ts +2 -2
- package/dist/abap/adt-catalog/services/ui5-rt-version-service.js +2 -6
- package/dist/abap/app-index-service.d.ts +1 -1
- package/dist/abap/app-index-service.js +3 -7
- package/dist/abap/catalog/base.d.ts +2 -2
- package/dist/abap/catalog/base.js +3 -7
- package/dist/abap/catalog/index.d.ts +3 -3
- package/dist/abap/catalog/index.js +3 -19
- package/dist/abap/catalog/v2-catalog-service.d.ts +2 -2
- package/dist/abap/catalog/v2-catalog-service.js +7 -11
- package/dist/abap/catalog/v4-catalog-service.d.ts +2 -2
- package/dist/abap/catalog/v4-catalog-service.js +11 -15
- package/dist/abap/index.d.ts +12 -8
- package/dist/abap/index.js +8 -31
- package/dist/abap/lrep-service.d.ts +2 -2
- package/dist/abap/lrep-service.js +24 -31
- package/dist/abap/message.js +10 -18
- package/dist/abap/types/adt-internal-types.js +1 -2
- package/dist/abap/types/adt-types.js +3 -6
- package/dist/abap/types/external-services.js +1 -2
- package/dist/abap/types/index.d.ts +2 -2
- package/dist/abap/types/index.js +2 -18
- package/dist/abap/ui5-abap-repository-service.d.ts +1 -1
- package/dist/abap/ui5-abap-repository-service.js +14 -18
- package/dist/abap/ui5-version-service.d.ts +1 -1
- package/dist/abap/ui5-version-service.js +2 -6
- package/dist/auth/connection.d.ts +1 -1
- package/dist/auth/connection.js +10 -18
- package/dist/auth/error.js +4 -11
- package/dist/auth/index.d.ts +8 -6
- package/dist/auth/index.js +14 -35
- package/dist/auth/redirect.js +1 -5
- package/dist/auth/reentrance-ticket/abap-virtual-host-provider.js +5 -12
- package/dist/auth/reentrance-ticket/index.d.ts +1 -1
- package/dist/auth/reentrance-ticket/index.js +7 -10
- package/dist/auth/reentrance-ticket/redirect.d.ts +1 -1
- package/dist/auth/reentrance-ticket/redirect.js +10 -16
- package/dist/auth/static.js +2 -7
- package/dist/auth/uaa.d.ts +1 -1
- package/dist/auth/uaa.js +24 -31
- package/dist/base/odata-request-error.js +2 -7
- package/dist/base/odata-service.js +4 -8
- package/dist/base/patchTls.js +6 -13
- package/dist/base/service-provider.d.ts +2 -2
- package/dist/base/service-provider.js +8 -12
- package/dist/cacerts/sap-global-root-ca.js +1 -4
- package/dist/factory.d.ts +5 -5
- package/dist/factory.js +44 -56
- package/dist/index.d.ts +9 -9
- package/dist/index.js +10 -28
- 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
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
|
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 = (
|
|
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
|
|
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 =
|
|
81
|
-
if (localProxy && !
|
|
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
|
|
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
|
-
|
|
86
|
+
attachConnectionHandler(instance);
|
|
99
87
|
if (providerConfig.auth?.password) {
|
|
100
|
-
|
|
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 (
|
|
108
|
-
|
|
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(
|
|
108
|
+
return createInstance(ServiceProvider, {
|
|
121
109
|
baseURL: config
|
|
122
110
|
});
|
|
123
111
|
}
|
|
124
112
|
else {
|
|
125
|
-
return createInstance(
|
|
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(
|
|
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 || (
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
162
|
+
provider = createInstance(AbapServiceProvider, {
|
|
175
163
|
baseURL: url,
|
|
176
164
|
cookies,
|
|
177
165
|
...config
|
|
178
166
|
});
|
|
179
167
|
if (!cookies) {
|
|
180
|
-
|
|
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: ${
|
|
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:
|
|
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 (
|
|
211
|
-
provider = createInstance(
|
|
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(
|
|
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
|
|
222
|
-
provider.defaults.headers.common[
|
|
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(
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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": "
|
|
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": "
|
|
29
|
-
"@sap-ux/logger": "0.
|
|
30
|
-
"@sap-ux/feature-toggle": "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.
|
|
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
|
}
|