@kontent-ai/core-sdk 10.12.5 → 10.12.7
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/.npmignore +14 -14
- package/LICENSE.md +9 -9
- package/README.md +30 -30
- package/dist/cjs/http/http.functions.js +109 -23
- package/dist/cjs/http/http.functions.js.map +1 -1
- package/dist/cjs/sdk-info.generated.js +1 -1
- package/dist/es6/http/http.functions.js +109 -23
- package/dist/es6/http/http.functions.js.map +1 -1
- package/dist/es6/sdk-info.generated.js +1 -1
- package/dist/esnext/http/http.functions.js +109 -23
- package/dist/esnext/http/http.functions.js.map +1 -1
- package/dist/esnext/sdk-info.generated.js +1 -1
- package/dist/umd/kontent-core.umd.js +646 -147
- package/dist/umd/kontent-core.umd.js.map +1 -1
- package/dist/umd/kontent-core.umd.min.js +1 -1
- package/dist/umd/kontent-core.umd.min.js.LICENSE.txt +1 -1
- package/dist/umd/kontent-core.umd.min.js.map +1 -1
- package/dist/umd/report.json +1 -1
- package/dist/umd/report.min.json +1 -1
- package/dist/umd/stats.json +441 -441
- package/dist/umd/stats.min.json +449 -449
- package/lib/helpers/header.helper.ts +23 -23
- package/lib/helpers/headers-helper.ts +15 -15
- package/lib/helpers/index.ts +4 -4
- package/lib/helpers/retry-helper.ts +204 -204
- package/lib/helpers/url.helper.ts +26 -26
- package/lib/http/http.debugger.ts +21 -21
- package/lib/http/http.functions.ts +416 -314
- package/lib/http/http.models.ts +83 -83
- package/lib/http/http.service.ts +91 -91
- package/lib/http/ihttp.service.ts +20 -20
- package/lib/http/index.ts +6 -6
- package/lib/http/test-http.service.ts +70 -70
- package/lib/index.ts +4 -4
- package/lib/models/index.ts +3 -3
- package/lib/models/isdk-info.ts +15 -15
- package/lib/models/parameters.ts +25 -25
- package/lib/models/url.models.ts +3 -3
- package/lib/sdk-info.generated.ts +1 -1
- package/package.json +93 -93
package/.npmignore
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
# Ignore everything
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
# But descend into directories
|
|
5
|
-
|
|
6
|
-
# Recursively allow files under subtree
|
|
7
|
-
!/lib/**
|
|
8
|
-
!/dist/**
|
|
9
|
-
!package.json
|
|
10
|
-
!.npmignore
|
|
11
|
-
!README.md
|
|
12
|
-
!LICENSE.md
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
# Ignore everything
|
|
2
|
+
*
|
|
3
|
+
|
|
4
|
+
# But descend into directories
|
|
5
|
+
|
|
6
|
+
# Recursively allow files under subtree
|
|
7
|
+
!/lib/**
|
|
8
|
+
!/dist/**
|
|
9
|
+
!package.json
|
|
10
|
+
!.npmignore
|
|
11
|
+
!README.md
|
|
12
|
+
!LICENSE.md
|
|
13
|
+
|
|
14
|
+
|
package/LICENSE.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022 Kontent s.r.o.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
-
|
|
7
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Kontent s.r.o.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
[](https://www.npmjs.com/package/@kontent-ai/core-sdk)
|
|
3
|
-
[](https://github.com/kontent-ai/core-sdk-js/actions/workflows/integrate.yml)
|
|
4
|
-
[](https://www.npmjs.com/package/@kontent-ai/core-sdk)
|
|
5
|
-
[](https://snyk.io/test/github/kontent-ai/core-sdk-js)
|
|
6
|
-
[](https://github.com/kontent-ai/core-sdk-js)
|
|
7
|
-
[](https://www.jsdelivr.com/package/npm/@kontent-ai/core-sdk)
|
|
8
|
-
|
|
9
|
-
# Core package
|
|
10
|
-
|
|
11
|
-
This package contains core functionality used by dependant Kontent.ai SDKs such as Delivery SDK or Management SDK.
|
|
12
|
-
|
|
13
|
-
# Testing
|
|
14
|
-
|
|
15
|
-
If you want to inject testing service as an implementation of [IHttpService](lib/http/ihttp.service.ts), it is possible to use configurable [Test Http Service](lib/http/test-http.service.ts).
|
|
16
|
-
|
|
17
|
-
```js
|
|
18
|
-
import { TestHttpService } from '@kontent-ai/core-sdk';
|
|
19
|
-
|
|
20
|
-
const client = new /*(Delivery/Management)*/Client() {
|
|
21
|
-
// ...
|
|
22
|
-
httpService: new TestHttpService({
|
|
23
|
-
fakeResponseJson: json,
|
|
24
|
-
throwError: false
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
|
|
2
|
+
[](https://www.npmjs.com/package/@kontent-ai/core-sdk)
|
|
3
|
+
[](https://github.com/kontent-ai/core-sdk-js/actions/workflows/integrate.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/@kontent-ai/core-sdk)
|
|
5
|
+
[](https://snyk.io/test/github/kontent-ai/core-sdk-js)
|
|
6
|
+
[](https://github.com/kontent-ai/core-sdk-js)
|
|
7
|
+
[](https://www.jsdelivr.com/package/npm/@kontent-ai/core-sdk)
|
|
8
|
+
|
|
9
|
+
# Core package
|
|
10
|
+
|
|
11
|
+
This package contains core functionality used by dependant Kontent.ai SDKs such as Delivery SDK or Management SDK.
|
|
12
|
+
|
|
13
|
+
# Testing
|
|
14
|
+
|
|
15
|
+
If you want to inject testing service as an implementation of [IHttpService](lib/http/ihttp.service.ts), it is possible to use configurable [Test Http Service](lib/http/test-http.service.ts).
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
import { TestHttpService } from '@kontent-ai/core-sdk';
|
|
19
|
+
|
|
20
|
+
const client = new /*(Delivery/Management)*/Client() {
|
|
21
|
+
// ...
|
|
22
|
+
httpService: new TestHttpService({
|
|
23
|
+
fakeResponseJson: json,
|
|
24
|
+
throwError: false
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
@@ -15,7 +15,7 @@ const headers_helper_1 = require("../helpers/headers-helper");
|
|
|
15
15
|
const http_debugger_1 = require("./http.debugger");
|
|
16
16
|
const retry_helper_1 = require("../helpers/retry-helper");
|
|
17
17
|
function getWithRetryAsync(instance, call, functionsConfig, options) {
|
|
18
|
-
var _a;
|
|
18
|
+
var _a, _b;
|
|
19
19
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20
20
|
const retryStrategyOptions = (_a = options === null || options === void 0 ? void 0 : options.retryStrategy) !== null && _a !== void 0 ? _a : retry_helper_1.retryHelper.defaultRetryStrategy;
|
|
21
21
|
return yield runWithRetryAsync({
|
|
@@ -23,13 +23,14 @@ function getWithRetryAsync(instance, call, functionsConfig, options) {
|
|
|
23
23
|
url: call.url,
|
|
24
24
|
retryStrategy: retryStrategyOptions,
|
|
25
25
|
functionsConfig: functionsConfig,
|
|
26
|
+
headers: (_b = options === null || options === void 0 ? void 0 : options.headers) !== null && _b !== void 0 ? _b : [],
|
|
26
27
|
call: (retryAttempt) => __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
var
|
|
28
|
+
var _c, _d;
|
|
28
29
|
http_debugger_1.httpDebugger.debugStartHttpRequest();
|
|
29
30
|
const axiosResponse = yield instance.get(call.url, {
|
|
30
|
-
headers: getHeadersJson((
|
|
31
|
+
headers: getHeadersJson((_c = options === null || options === void 0 ? void 0 : options.headers) !== null && _c !== void 0 ? _c : [], false),
|
|
31
32
|
responseType: options === null || options === void 0 ? void 0 : options.responseType,
|
|
32
|
-
cancelToken: (
|
|
33
|
+
cancelToken: (_d = options === null || options === void 0 ? void 0 : options.cancelToken) === null || _d === void 0 ? void 0 : _d.token
|
|
33
34
|
});
|
|
34
35
|
const response = {
|
|
35
36
|
data: axiosResponse.data,
|
|
@@ -49,7 +50,7 @@ function getWithRetryAsync(instance, call, functionsConfig, options) {
|
|
|
49
50
|
}
|
|
50
51
|
exports.getWithRetryAsync = getWithRetryAsync;
|
|
51
52
|
function postWithRetryAsync(instance, call, functionsConfig, options) {
|
|
52
|
-
var _a;
|
|
53
|
+
var _a, _b;
|
|
53
54
|
return __awaiter(this, void 0, void 0, function* () {
|
|
54
55
|
const retryStrategyOptions = (_a = options === null || options === void 0 ? void 0 : options.retryStrategy) !== null && _a !== void 0 ? _a : retry_helper_1.retryHelper.defaultRetryStrategy;
|
|
55
56
|
return yield runWithRetryAsync({
|
|
@@ -57,17 +58,18 @@ function postWithRetryAsync(instance, call, functionsConfig, options) {
|
|
|
57
58
|
url: call.url,
|
|
58
59
|
retryStrategy: retryStrategyOptions,
|
|
59
60
|
functionsConfig: functionsConfig,
|
|
61
|
+
headers: (_b = options === null || options === void 0 ? void 0 : options.headers) !== null && _b !== void 0 ? _b : [],
|
|
60
62
|
call: (retryAttempt) => __awaiter(this, void 0, void 0, function* () {
|
|
61
|
-
var
|
|
63
|
+
var _c, _d;
|
|
62
64
|
http_debugger_1.httpDebugger.debugStartHttpRequest();
|
|
63
65
|
const axiosResponse = yield instance.post(call.url, call.body, {
|
|
64
|
-
headers: getHeadersJson((
|
|
66
|
+
headers: getHeadersJson((_c = options === null || options === void 0 ? void 0 : options.headers) !== null && _c !== void 0 ? _c : [], false),
|
|
65
67
|
responseType: options === null || options === void 0 ? void 0 : options.responseType,
|
|
66
68
|
// required for uploading large files
|
|
67
69
|
// https://github.com/axios/axios/issues/1362
|
|
68
70
|
maxContentLength: 'Infinity',
|
|
69
71
|
maxBodyLength: 'Infinity',
|
|
70
|
-
cancelToken: (
|
|
72
|
+
cancelToken: (_d = options === null || options === void 0 ? void 0 : options.cancelToken) === null || _d === void 0 ? void 0 : _d.token
|
|
71
73
|
});
|
|
72
74
|
const response = {
|
|
73
75
|
data: axiosResponse.data,
|
|
@@ -87,7 +89,7 @@ function postWithRetryAsync(instance, call, functionsConfig, options) {
|
|
|
87
89
|
}
|
|
88
90
|
exports.postWithRetryAsync = postWithRetryAsync;
|
|
89
91
|
function putWithRetryAsync(instance, call, functionsConfig, options) {
|
|
90
|
-
var _a;
|
|
92
|
+
var _a, _b;
|
|
91
93
|
return __awaiter(this, void 0, void 0, function* () {
|
|
92
94
|
const retryStrategyOptions = (_a = options === null || options === void 0 ? void 0 : options.retryStrategy) !== null && _a !== void 0 ? _a : retry_helper_1.retryHelper.defaultRetryStrategy;
|
|
93
95
|
return yield runWithRetryAsync({
|
|
@@ -95,17 +97,18 @@ function putWithRetryAsync(instance, call, functionsConfig, options) {
|
|
|
95
97
|
url: call.url,
|
|
96
98
|
retryStrategy: retryStrategyOptions,
|
|
97
99
|
functionsConfig: functionsConfig,
|
|
100
|
+
headers: (_b = options === null || options === void 0 ? void 0 : options.headers) !== null && _b !== void 0 ? _b : [],
|
|
98
101
|
call: (retryAttempt) => __awaiter(this, void 0, void 0, function* () {
|
|
99
|
-
var
|
|
102
|
+
var _c, _d;
|
|
100
103
|
http_debugger_1.httpDebugger.debugStartHttpRequest();
|
|
101
104
|
const axiosResponse = yield instance.put(call.url, call.body, {
|
|
102
|
-
headers: getHeadersJson((
|
|
105
|
+
headers: getHeadersJson((_c = options === null || options === void 0 ? void 0 : options.headers) !== null && _c !== void 0 ? _c : [], false),
|
|
103
106
|
responseType: options === null || options === void 0 ? void 0 : options.responseType,
|
|
104
107
|
// required for uploading large files
|
|
105
108
|
// https://github.com/axios/axios/issues/1362
|
|
106
109
|
maxContentLength: 'Infinity',
|
|
107
110
|
maxBodyLength: 'Infinity',
|
|
108
|
-
cancelToken: (
|
|
111
|
+
cancelToken: (_d = options === null || options === void 0 ? void 0 : options.cancelToken) === null || _d === void 0 ? void 0 : _d.token
|
|
109
112
|
});
|
|
110
113
|
const response = {
|
|
111
114
|
data: axiosResponse.data,
|
|
@@ -125,7 +128,7 @@ function putWithRetryAsync(instance, call, functionsConfig, options) {
|
|
|
125
128
|
}
|
|
126
129
|
exports.putWithRetryAsync = putWithRetryAsync;
|
|
127
130
|
function patchWithRetryAsync(instance, call, functionsConfig, options) {
|
|
128
|
-
var _a;
|
|
131
|
+
var _a, _b;
|
|
129
132
|
return __awaiter(this, void 0, void 0, function* () {
|
|
130
133
|
const retryStrategyOptions = (_a = options === null || options === void 0 ? void 0 : options.retryStrategy) !== null && _a !== void 0 ? _a : retry_helper_1.retryHelper.defaultRetryStrategy;
|
|
131
134
|
return yield runWithRetryAsync({
|
|
@@ -133,17 +136,18 @@ function patchWithRetryAsync(instance, call, functionsConfig, options) {
|
|
|
133
136
|
url: call.url,
|
|
134
137
|
retryStrategy: retryStrategyOptions,
|
|
135
138
|
functionsConfig: functionsConfig,
|
|
139
|
+
headers: (_b = options === null || options === void 0 ? void 0 : options.headers) !== null && _b !== void 0 ? _b : [],
|
|
136
140
|
call: (retryAttempt) => __awaiter(this, void 0, void 0, function* () {
|
|
137
|
-
var
|
|
141
|
+
var _c, _d;
|
|
138
142
|
http_debugger_1.httpDebugger.debugStartHttpRequest();
|
|
139
143
|
const axiosResponse = yield instance.patch(call.url, call.body, {
|
|
140
|
-
headers: getHeadersJson((
|
|
144
|
+
headers: getHeadersJson((_c = options === null || options === void 0 ? void 0 : options.headers) !== null && _c !== void 0 ? _c : [], false),
|
|
141
145
|
responseType: options === null || options === void 0 ? void 0 : options.responseType,
|
|
142
146
|
// required for uploading large files
|
|
143
147
|
// https://github.com/axios/axios/issues/1362
|
|
144
148
|
maxContentLength: 'Infinity',
|
|
145
149
|
maxBodyLength: 'Infinity',
|
|
146
|
-
cancelToken: (
|
|
150
|
+
cancelToken: (_d = options === null || options === void 0 ? void 0 : options.cancelToken) === null || _d === void 0 ? void 0 : _d.token
|
|
147
151
|
});
|
|
148
152
|
const response = {
|
|
149
153
|
data: axiosResponse.data,
|
|
@@ -163,7 +167,7 @@ function patchWithRetryAsync(instance, call, functionsConfig, options) {
|
|
|
163
167
|
}
|
|
164
168
|
exports.patchWithRetryAsync = patchWithRetryAsync;
|
|
165
169
|
function deleteWithRetryAsync(instance, call, functionsConfig, options) {
|
|
166
|
-
var _a;
|
|
170
|
+
var _a, _b;
|
|
167
171
|
return __awaiter(this, void 0, void 0, function* () {
|
|
168
172
|
const retryStrategyOptions = (_a = options === null || options === void 0 ? void 0 : options.retryStrategy) !== null && _a !== void 0 ? _a : retry_helper_1.retryHelper.defaultRetryStrategy;
|
|
169
173
|
return yield runWithRetryAsync({
|
|
@@ -171,17 +175,18 @@ function deleteWithRetryAsync(instance, call, functionsConfig, options) {
|
|
|
171
175
|
url: call.url,
|
|
172
176
|
retryStrategy: retryStrategyOptions,
|
|
173
177
|
functionsConfig: functionsConfig,
|
|
178
|
+
headers: (_b = options === null || options === void 0 ? void 0 : options.headers) !== null && _b !== void 0 ? _b : [],
|
|
174
179
|
call: (retryAttempt) => __awaiter(this, void 0, void 0, function* () {
|
|
175
|
-
var
|
|
180
|
+
var _c, _d;
|
|
176
181
|
http_debugger_1.httpDebugger.debugStartHttpRequest();
|
|
177
182
|
const axiosResponse = yield instance.delete(call.url, {
|
|
178
|
-
headers: getHeadersJson((
|
|
183
|
+
headers: getHeadersJson((_c = options === null || options === void 0 ? void 0 : options.headers) !== null && _c !== void 0 ? _c : [], false),
|
|
179
184
|
responseType: options === null || options === void 0 ? void 0 : options.responseType,
|
|
180
185
|
// required for uploading large files
|
|
181
186
|
// https://github.com/axios/axios/issues/1362
|
|
182
187
|
maxContentLength: 'Infinity',
|
|
183
188
|
maxBodyLength: 'Infinity',
|
|
184
|
-
cancelToken: (
|
|
189
|
+
cancelToken: (_d = options === null || options === void 0 ? void 0 : options.cancelToken) === null || _d === void 0 ? void 0 : _d.token
|
|
185
190
|
});
|
|
186
191
|
const response = {
|
|
187
192
|
data: axiosResponse.data,
|
|
@@ -236,16 +241,97 @@ function runWithRetryAsync(data) {
|
|
|
236
241
|
retryStrategy: data.retryStrategy,
|
|
237
242
|
retryAttempt: data.retryAttempt + 1,
|
|
238
243
|
url: data.url,
|
|
239
|
-
functionsConfig: data.functionsConfig
|
|
244
|
+
functionsConfig: data.functionsConfig,
|
|
245
|
+
headers: data.headers
|
|
240
246
|
});
|
|
241
247
|
}
|
|
248
|
+
// sanitize the error before logging / re-throwing so the authorization token is not leaked
|
|
249
|
+
const sanitizedError = sanitizeError(error, data.headers);
|
|
242
250
|
if (data.functionsConfig.logErrorsToConsole) {
|
|
243
|
-
console.error(`Executing '${data.url}' failed. Request was retried '${data.retryAttempt}' times
|
|
251
|
+
console.error(`Executing '${data.url}' failed. Request was retried '${data.retryAttempt}' times.`, sanitizedError);
|
|
244
252
|
}
|
|
245
|
-
throw
|
|
253
|
+
throw sanitizedError;
|
|
246
254
|
}
|
|
247
255
|
});
|
|
248
256
|
}
|
|
257
|
+
const redactedValue = 'redacted';
|
|
258
|
+
const maxRedactionDepth = 10;
|
|
259
|
+
/**
|
|
260
|
+
* Returns the caller-supplied 'authorization' header value(s), which are the secret token(s) to
|
|
261
|
+
* scrub from errors. Note: if a consumer sets the authorization token on the axios instance defaults
|
|
262
|
+
* instead of passing it via 'options.headers', it is not known here and cannot be redacted.
|
|
263
|
+
*/
|
|
264
|
+
function getSecretHeaderValues(headers) {
|
|
265
|
+
return headers
|
|
266
|
+
.filter((header) => header.header.toLowerCase() === 'authorization')
|
|
267
|
+
.map((header) => header.value)
|
|
268
|
+
// skip empty values - splitting on an empty string would corrupt every string
|
|
269
|
+
.filter((value) => typeof value === 'string' && value.length > 0);
|
|
270
|
+
}
|
|
271
|
+
function redactStringValue(value, secrets) {
|
|
272
|
+
let result = value;
|
|
273
|
+
for (const secret of secrets) {
|
|
274
|
+
if (result.includes(secret)) {
|
|
275
|
+
result = result.split(secret).join(redactedValue);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
return result;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Walks the object graph (cycle- and depth-guarded) replacing every occurrence of a secret with the
|
|
282
|
+
* redacted placeholder in place.
|
|
283
|
+
*/
|
|
284
|
+
function redactSecretsInPlace(target, secrets, seen, depth) {
|
|
285
|
+
if (depth > maxRedactionDepth || target === null || typeof target !== 'object') {
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
if (seen.has(target)) {
|
|
289
|
+
// break cycles (config.headers, request.socket, response.request, ...)
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
seen.add(target);
|
|
293
|
+
for (const key of Object.keys(target)) {
|
|
294
|
+
let value;
|
|
295
|
+
try {
|
|
296
|
+
value = target[key];
|
|
297
|
+
}
|
|
298
|
+
catch (_a) {
|
|
299
|
+
// accessing the property threw (e.g. a getter) - skip it
|
|
300
|
+
continue;
|
|
301
|
+
}
|
|
302
|
+
if (typeof value === 'string') {
|
|
303
|
+
const redacted = redactStringValue(value, secrets);
|
|
304
|
+
if (redacted !== value) {
|
|
305
|
+
try {
|
|
306
|
+
target[key] = redacted;
|
|
307
|
+
}
|
|
308
|
+
catch (_b) {
|
|
309
|
+
// property is read-only - skip it
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
else if (value && typeof value === 'object') {
|
|
314
|
+
redactSecretsInPlace(value, secrets, seen, depth + 1);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* If 'error' is an axios error, redacts every occurrence of the caller's authorization token (taken
|
|
320
|
+
* from 'headers') throughout the error, replacing it with a redacted placeholder. Non-axios errors
|
|
321
|
+
* and errors with no known token are returned unchanged. This prevents the authorization token from
|
|
322
|
+
* leaking via console logs or the re-thrown error. All other axios properties are preserved.
|
|
323
|
+
*/
|
|
324
|
+
function sanitizeError(error, headers) {
|
|
325
|
+
if (!axios_1.default.isAxiosError(error)) {
|
|
326
|
+
return error;
|
|
327
|
+
}
|
|
328
|
+
const secrets = getSecretHeaderValues(headers);
|
|
329
|
+
if (secrets.length === 0) {
|
|
330
|
+
return error;
|
|
331
|
+
}
|
|
332
|
+
redactSecretsInPlace(error, secrets, new WeakSet(), 0);
|
|
333
|
+
return error;
|
|
334
|
+
}
|
|
249
335
|
function getHeadersJson(headers, addContentTypeHeader) {
|
|
250
336
|
const headerJson = {};
|
|
251
337
|
headers.forEach((header) =>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