@zimic/interceptor 0.16.0-canary.11 → 0.16.0-canary.3
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/README.md +2 -1
- package/dist/{chunk-NTRC2S4I.mjs → chunk-2RNFR6TF.mjs} +267 -249
- package/dist/chunk-2RNFR6TF.mjs.map +1 -0
- package/dist/{chunk-O6ZIPCUJ.js → chunk-D7CDDSQE.js} +268 -250
- package/dist/chunk-D7CDDSQE.js.map +1 -0
- package/dist/cli.js +9 -9
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +5 -5
- package/dist/cli.mjs.map +1 -1
- package/dist/http.d.ts +141 -180
- package/dist/http.js +69 -102
- package/dist/http.js.map +1 -1
- package/dist/http.mjs +69 -101
- package/dist/http.mjs.map +1 -1
- package/dist/server.d.ts +46 -20
- package/dist/server.js +7 -7
- package/dist/server.mjs +1 -1
- package/package.json +11 -11
- package/src/cli/browser/init.ts +2 -2
- package/src/cli/server/start.ts +2 -2
- package/src/http/index.ts +2 -5
- package/src/http/interceptor/HttpInterceptorClient.ts +15 -30
- package/src/http/interceptor/LocalHttpInterceptor.ts +8 -8
- package/src/http/interceptor/RemoteHttpInterceptor.ts +8 -8
- package/src/http/interceptor/types/options.ts +10 -3
- package/src/http/interceptor/types/public.ts +12 -44
- package/src/http/interceptorWorker/HttpInterceptorWorker.ts +2 -2
- package/src/http/requestHandler/HttpRequestHandlerClient.ts +5 -15
- package/src/http/requestHandler/errors/DisabledRequestSavingError.ts +1 -1
- package/src/http/requestHandler/errors/TimesCheckError.ts +14 -15
- package/src/http/requestHandler/types/public.ts +8 -16
- package/src/server/index.ts +11 -1
- package/src/server/namespace/InterceptorServerNamespace.ts +21 -0
- package/src/utils/console.ts +2 -2
- package/dist/chunk-NTRC2S4I.mjs.map +0 -1
- package/dist/chunk-O6ZIPCUJ.js.map +0 -1
- package/src/http/interceptor/errors/RequestSavingSafeLimitExceededError.ts +0 -22
package/dist/http.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import chalk2 from 'chalk';
|
|
2
2
|
import { HttpHeaders, HttpSearchParams, HttpFormData, HTTP_METHODS, HTTP_METHODS_WITH_RESPONSE_BODY } from '@zimic/http';
|
|
3
3
|
import { http, passthrough } from 'msw';
|
|
4
4
|
import * as mswBrowser from 'msw/browser';
|
|
@@ -8,6 +8,30 @@ import ClientSocket from 'isomorphic-ws';
|
|
|
8
8
|
var __defProp = Object.defineProperty;
|
|
9
9
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
10
10
|
|
|
11
|
+
// src/http/interceptorWorker/errors/InvalidJSONError.ts
|
|
12
|
+
var InvalidJSONError = class extends SyntaxError {
|
|
13
|
+
static {
|
|
14
|
+
__name(this, "InvalidJSONError");
|
|
15
|
+
}
|
|
16
|
+
constructor(value) {
|
|
17
|
+
super(`Failed to parse value as JSON: ${value}`);
|
|
18
|
+
this.name = "InvalidJSONError";
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
var InvalidJSONError_default = InvalidJSONError;
|
|
22
|
+
|
|
23
|
+
// src/http/interceptorWorker/errors/InvalidFormDataError.ts
|
|
24
|
+
var InvalidFormDataError = class extends SyntaxError {
|
|
25
|
+
static {
|
|
26
|
+
__name(this, "InvalidFormDataError");
|
|
27
|
+
}
|
|
28
|
+
constructor(value) {
|
|
29
|
+
super(`Failed to parse value as form data: ${value}`);
|
|
30
|
+
this.name = "InvalidFormDataError";
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
var InvalidFormDataError_default = InvalidFormDataError;
|
|
34
|
+
|
|
11
35
|
// src/http/interceptor/errors/RunningHttpInterceptorError.ts
|
|
12
36
|
var RunningHttpInterceptorError = class extends Error {
|
|
13
37
|
static {
|
|
@@ -60,50 +84,6 @@ var UnknownHttpInterceptorTypeError = class extends TypeError {
|
|
|
60
84
|
};
|
|
61
85
|
var UnknownHttpInterceptorTypeError_default = UnknownHttpInterceptorTypeError;
|
|
62
86
|
|
|
63
|
-
// src/http/interceptor/errors/RequestSavingSafeLimitExceededError.ts
|
|
64
|
-
var RequestSavingSafeLimitExceededError = class extends TypeError {
|
|
65
|
-
static {
|
|
66
|
-
__name(this, "RequestSavingSafeLimitExceededError");
|
|
67
|
-
}
|
|
68
|
-
constructor(numberOfSavedRequests, safeLimit) {
|
|
69
|
-
super(
|
|
70
|
-
`The number of intercepted requests saved in memory (${numberOfSavedRequests}) exceeded the safe limit of ${safeLimit}. Did you forget to call \`interceptor.clear()\`?
|
|
71
|
-
|
|
72
|
-
If you need to save requests, make sure to regularly call \`interceptor.clear()\`. Alternatively, you can hide this warning by increasing \`requestSaving.safeLimit\` in your interceptor. Note that saving too many requests in memory can lead to performance issues.
|
|
73
|
-
|
|
74
|
-
If you do not need to save requests, consider setting \`requestSaving.enabled: false\` in your interceptor.
|
|
75
|
-
|
|
76
|
-
Learn more: https://github.com/zimicjs/zimic/wiki/api\u2010zimic\u2010interceptor\u2010http#saving-requests`
|
|
77
|
-
);
|
|
78
|
-
this.name = "RequestSavingSafeLimitExceededError";
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
var RequestSavingSafeLimitExceededError_default = RequestSavingSafeLimitExceededError;
|
|
82
|
-
|
|
83
|
-
// src/http/interceptorWorker/errors/InvalidFormDataError.ts
|
|
84
|
-
var InvalidFormDataError = class extends SyntaxError {
|
|
85
|
-
static {
|
|
86
|
-
__name(this, "InvalidFormDataError");
|
|
87
|
-
}
|
|
88
|
-
constructor(value) {
|
|
89
|
-
super(`Failed to parse value as form data: ${value}`);
|
|
90
|
-
this.name = "InvalidFormDataError";
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
var InvalidFormDataError_default = InvalidFormDataError;
|
|
94
|
-
|
|
95
|
-
// src/http/interceptorWorker/errors/InvalidJSONError.ts
|
|
96
|
-
var InvalidJSONError = class extends SyntaxError {
|
|
97
|
-
static {
|
|
98
|
-
__name(this, "InvalidJSONError");
|
|
99
|
-
}
|
|
100
|
-
constructor(value) {
|
|
101
|
-
super(`Failed to parse value as JSON: ${value}`);
|
|
102
|
-
this.name = "InvalidJSONError";
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
var InvalidJSONError_default = InvalidJSONError;
|
|
106
|
-
|
|
107
87
|
// src/cli/browser/shared/constants.ts
|
|
108
88
|
var SERVICE_WORKER_FILE_NAME = "mockServiceWorker.js";
|
|
109
89
|
|
|
@@ -135,7 +115,7 @@ var DisabledRequestSavingError = class extends TypeError {
|
|
|
135
115
|
}
|
|
136
116
|
constructor() {
|
|
137
117
|
super(
|
|
138
|
-
"Intercepted requests are not being saved. Did you forget to use `
|
|
118
|
+
"Intercepted requests are not being saved. Did you forget to use `saveRequests: true` when creating the interceptor?\n\nLearn more: https://github.com/zimicjs/zimic/wiki/api\u2010zimic\u2010interceptor\u2010http#saving-requests"
|
|
139
119
|
);
|
|
140
120
|
this.name = "DisabledRequestSavingError";
|
|
141
121
|
}
|
|
@@ -248,7 +228,7 @@ __name(formatValueToLog, "formatValueToLog");
|
|
|
248
228
|
function logWithPrefix(messageOrMessages, options = {}) {
|
|
249
229
|
const { method = "log" } = options;
|
|
250
230
|
const messages = Array.isArray(messageOrMessages) ? messageOrMessages : [messageOrMessages];
|
|
251
|
-
console[method](
|
|
231
|
+
console[method](chalk2.cyan("[@zimic/interceptor]"), ...messages);
|
|
252
232
|
}
|
|
253
233
|
__name(logWithPrefix, "logWithPrefix");
|
|
254
234
|
|
|
@@ -274,14 +254,14 @@ function createMessageHeader({
|
|
|
274
254
|
|
|
275
255
|
Requests evaluated by this handler:
|
|
276
256
|
|
|
277
|
-
${
|
|
278
|
-
${
|
|
257
|
+
${chalk2.green("- Expected")}
|
|
258
|
+
${chalk2.red("+ Received")}`
|
|
279
259
|
].filter((part) => part !== false).join("");
|
|
280
260
|
}
|
|
281
261
|
__name(createMessageHeader, "createMessageHeader");
|
|
282
|
-
function createMessageDiffs({
|
|
283
|
-
if (!
|
|
284
|
-
return "Tip:
|
|
262
|
+
function createMessageDiffs({ hasSavedRequests, unmatchedRequestGroups }) {
|
|
263
|
+
if (!hasSavedRequests) {
|
|
264
|
+
return "Tip: enable `saveRequests: true` in your interceptor for more details about the unmatched requests.";
|
|
285
265
|
}
|
|
286
266
|
return unmatchedRequestGroups.map(({ request, diff }, index) => {
|
|
287
267
|
const requestNumber = index + 1;
|
|
@@ -290,22 +270,22 @@ function createMessageDiffs({ requestSaving, unmatchedRequestGroups }) {
|
|
|
290
270
|
messageParts.push("Computed restriction:");
|
|
291
271
|
const stringifiedExpected = stringifyValueToLog(diff.computed.expected);
|
|
292
272
|
const stringifiedReceived = stringifyValueToLog(diff.computed.received);
|
|
293
|
-
messageParts.push(` ${
|
|
294
|
-
messageParts.push(` ${
|
|
273
|
+
messageParts.push(` ${chalk2.green(`- return ${stringifiedExpected}`)}`);
|
|
274
|
+
messageParts.push(` ${chalk2.red(`+ return ${stringifiedReceived}`)}`);
|
|
295
275
|
}
|
|
296
276
|
if (diff.headers) {
|
|
297
277
|
messageParts.push("Headers:");
|
|
298
278
|
const stringifiedExpected = stringifyValueToLog(diff.headers.expected);
|
|
299
279
|
const stringifiedReceived = stringifyValueToLog(diff.headers.received);
|
|
300
|
-
messageParts.push(` ${
|
|
301
|
-
messageParts.push(` ${
|
|
280
|
+
messageParts.push(` ${chalk2.green(`- ${stringifiedExpected}`)}`);
|
|
281
|
+
messageParts.push(` ${chalk2.red(`+ ${stringifiedReceived}`)}`);
|
|
302
282
|
}
|
|
303
283
|
if (diff.searchParams) {
|
|
304
284
|
messageParts.push("Search params:");
|
|
305
285
|
const stringifiedExpected = stringifyValueToLog(diff.searchParams.expected);
|
|
306
286
|
const stringifiedReceived = stringifyValueToLog(diff.searchParams.received);
|
|
307
|
-
messageParts.push(` ${
|
|
308
|
-
messageParts.push(` ${
|
|
287
|
+
messageParts.push(` ${chalk2.green(`- ${stringifiedExpected}`)}`);
|
|
288
|
+
messageParts.push(` ${chalk2.red(`+ ${stringifiedReceived}`)}`);
|
|
309
289
|
}
|
|
310
290
|
if (diff.body) {
|
|
311
291
|
messageParts.push("Body:");
|
|
@@ -315,8 +295,8 @@ function createMessageDiffs({ requestSaving, unmatchedRequestGroups }) {
|
|
|
315
295
|
const stringifiedReceived = stringifyValueToLog(diff.body.received, {
|
|
316
296
|
includeClassName: { searchParams: true }
|
|
317
297
|
});
|
|
318
|
-
messageParts.push(` ${
|
|
319
|
-
messageParts.push(` ${
|
|
298
|
+
messageParts.push(` ${chalk2.green(`- ${stringifiedExpected}`)}`);
|
|
299
|
+
messageParts.push(` ${chalk2.red(`+ ${stringifiedReceived}`)}`);
|
|
320
300
|
}
|
|
321
301
|
return messageParts.join("\n ");
|
|
322
302
|
}).join("\n\n");
|
|
@@ -496,7 +476,7 @@ var HttpRequestHandlerClient = class {
|
|
|
496
476
|
newThis.createResponseDeclaration = this.isResponseDeclarationFactory(declaration) ? declaration : () => declaration;
|
|
497
477
|
newThis.numberOfMatchedRequests = 0;
|
|
498
478
|
newThis.unmatchedRequestGroups.length = 0;
|
|
499
|
-
newThis.
|
|
479
|
+
newThis._requests.length = 0;
|
|
500
480
|
this.interceptor.registerRequestHandler(this.handler);
|
|
501
481
|
return newThis;
|
|
502
482
|
}
|
|
@@ -520,7 +500,7 @@ var HttpRequestHandlerClient = class {
|
|
|
520
500
|
declarationPointer: this.timesDeclarationPointer,
|
|
521
501
|
unmatchedRequestGroups: this.unmatchedRequestGroups,
|
|
522
502
|
hasRestrictions: this.restrictions.length > 0,
|
|
523
|
-
|
|
503
|
+
hasSavedRequests: this.interceptor.saveRequests
|
|
524
504
|
});
|
|
525
505
|
}
|
|
526
506
|
}
|
|
@@ -532,7 +512,7 @@ var HttpRequestHandlerClient = class {
|
|
|
532
512
|
this.timesDeclarationPointer = void 0;
|
|
533
513
|
this.numberOfMatchedRequests = 0;
|
|
534
514
|
this.unmatchedRequestGroups.length = 0;
|
|
535
|
-
this.
|
|
515
|
+
this._requests.length = 0;
|
|
536
516
|
this.createResponseDeclaration = void 0;
|
|
537
517
|
return this;
|
|
538
518
|
}
|
|
@@ -545,7 +525,7 @@ var HttpRequestHandlerClient = class {
|
|
|
545
525
|
if (restrictionsMatch.value) {
|
|
546
526
|
this.numberOfMatchedRequests++;
|
|
547
527
|
} else {
|
|
548
|
-
const shouldSaveUnmatchedGroup = this.interceptor.
|
|
528
|
+
const shouldSaveUnmatchedGroup = this.interceptor.saveRequests && this.restrictions.length > 0 && this.timesDeclarationPointer !== void 0;
|
|
549
529
|
if (shouldSaveUnmatchedGroup) {
|
|
550
530
|
this.unmatchedRequestGroups.push({ request, diff: restrictionsMatch.diff });
|
|
551
531
|
}
|
|
@@ -679,11 +659,6 @@ var HttpRequestHandlerClient = class {
|
|
|
679
659
|
saveInterceptedRequest(request, response) {
|
|
680
660
|
const interceptedRequest = this.createInterceptedRequest(request, response);
|
|
681
661
|
this._requests.push(interceptedRequest);
|
|
682
|
-
this.interceptor.incrementNumberOfSavedRequests(1);
|
|
683
|
-
}
|
|
684
|
-
clearInterceptedRequests() {
|
|
685
|
-
this.interceptor.incrementNumberOfSavedRequests(-this._requests.length);
|
|
686
|
-
this._requests.length = 0;
|
|
687
662
|
}
|
|
688
663
|
createInterceptedRequest(request, response) {
|
|
689
664
|
const interceptedRequest = request;
|
|
@@ -696,7 +671,7 @@ var HttpRequestHandlerClient = class {
|
|
|
696
671
|
return interceptedRequest;
|
|
697
672
|
}
|
|
698
673
|
get requests() {
|
|
699
|
-
if (!this.interceptor.
|
|
674
|
+
if (!this.interceptor.saveRequests) {
|
|
700
675
|
throw new DisabledRequestSavingError_default();
|
|
701
676
|
}
|
|
702
677
|
return this._requests;
|
|
@@ -1177,7 +1152,7 @@ var HttpInterceptorWorker = class _HttpInterceptorWorker {
|
|
|
1177
1152
|
]);
|
|
1178
1153
|
logWithPrefix(
|
|
1179
1154
|
[
|
|
1180
|
-
`${action === "bypass" ? "Warning:" : "Error:"} Request was not handled and was ${action === "bypass" ?
|
|
1155
|
+
`${action === "bypass" ? "Warning:" : "Error:"} Request was not handled and was ${action === "bypass" ? chalk2.yellow("bypassed") : chalk2.red("rejected")}.
|
|
1181
1156
|
|
|
1182
1157
|
`,
|
|
1183
1158
|
`${request.method} ${request.url}`,
|
|
@@ -1484,7 +1459,6 @@ var RemoteHttpRequestHandler_default = RemoteHttpRequestHandler;
|
|
|
1484
1459
|
|
|
1485
1460
|
// src/http/interceptor/HttpInterceptorClient.ts
|
|
1486
1461
|
var SUPPORTED_BASE_URL_PROTOCOLS = Object.freeze(["http", "https"]);
|
|
1487
|
-
var DEFAULT_REQUEST_SAVING_SAFE_LIMIT = 1e3;
|
|
1488
1462
|
var HttpInterceptorClient = class {
|
|
1489
1463
|
static {
|
|
1490
1464
|
__name(this, "HttpInterceptorClient");
|
|
@@ -1492,8 +1466,7 @@ var HttpInterceptorClient = class {
|
|
|
1492
1466
|
worker;
|
|
1493
1467
|
store;
|
|
1494
1468
|
_baseURL;
|
|
1495
|
-
|
|
1496
|
-
numberOfSavedRequests = 0;
|
|
1469
|
+
_saveRequests;
|
|
1497
1470
|
onUnhandledRequest;
|
|
1498
1471
|
isRunning = false;
|
|
1499
1472
|
Handler;
|
|
@@ -1510,16 +1483,10 @@ var HttpInterceptorClient = class {
|
|
|
1510
1483
|
this.worker = options.worker;
|
|
1511
1484
|
this.store = options.store;
|
|
1512
1485
|
this.baseURL = options.baseURL;
|
|
1513
|
-
this.
|
|
1514
|
-
enabled: options.requestSaving?.enabled ?? this.getDefaultRequestSavingEnabled(),
|
|
1515
|
-
safeLimit: options.requestSaving?.safeLimit ?? DEFAULT_REQUEST_SAVING_SAFE_LIMIT
|
|
1516
|
-
};
|
|
1486
|
+
this._saveRequests = options.saveRequests;
|
|
1517
1487
|
this.onUnhandledRequest = options.onUnhandledRequest;
|
|
1518
1488
|
this.Handler = options.Handler;
|
|
1519
1489
|
}
|
|
1520
|
-
getDefaultRequestSavingEnabled() {
|
|
1521
|
-
return isServerSide() ? process.env.NODE_ENV === "test" : false;
|
|
1522
|
-
}
|
|
1523
1490
|
get baseURL() {
|
|
1524
1491
|
return this._baseURL;
|
|
1525
1492
|
}
|
|
@@ -1539,6 +1506,15 @@ var HttpInterceptorClient = class {
|
|
|
1539
1506
|
}
|
|
1540
1507
|
return this.baseURL.href;
|
|
1541
1508
|
}
|
|
1509
|
+
get saveRequests() {
|
|
1510
|
+
if (this._saveRequests === void 0) {
|
|
1511
|
+
return isServerSide() ? process.env.NODE_ENV === "test" : false;
|
|
1512
|
+
}
|
|
1513
|
+
return this._saveRequests;
|
|
1514
|
+
}
|
|
1515
|
+
set saveRequests(saveRequests) {
|
|
1516
|
+
this._saveRequests = saveRequests;
|
|
1517
|
+
}
|
|
1542
1518
|
get platform() {
|
|
1543
1519
|
return this.worker.platform;
|
|
1544
1520
|
}
|
|
@@ -1636,21 +1612,13 @@ var HttpInterceptorClient = class {
|
|
|
1636
1612
|
}
|
|
1637
1613
|
const responseDeclaration = await matchedHandler.applyResponseDeclaration(parsedRequest);
|
|
1638
1614
|
const response = HttpInterceptorWorker_default.createResponseFromDeclaration(request, responseDeclaration);
|
|
1639
|
-
if (this.
|
|
1615
|
+
if (this.saveRequests) {
|
|
1640
1616
|
const responseClone = response.clone();
|
|
1641
1617
|
const parsedResponse = await HttpInterceptorWorker_default.parseRawResponse(responseClone);
|
|
1642
1618
|
matchedHandler.saveInterceptedRequest(parsedRequest, parsedResponse);
|
|
1643
1619
|
}
|
|
1644
1620
|
return response;
|
|
1645
1621
|
}
|
|
1646
|
-
incrementNumberOfSavedRequests(increment) {
|
|
1647
|
-
this.numberOfSavedRequests = Math.max(this.numberOfSavedRequests + increment, 0);
|
|
1648
|
-
const exceedsSafeLimit = this.numberOfSavedRequests > this.requestSaving.safeLimit;
|
|
1649
|
-
if (increment > 0 && exceedsSafeLimit) {
|
|
1650
|
-
const error = new RequestSavingSafeLimitExceededError_default(this.numberOfSavedRequests, this.requestSaving.safeLimit);
|
|
1651
|
-
console.warn(error);
|
|
1652
|
-
}
|
|
1653
|
-
}
|
|
1654
1622
|
async findMatchedHandler(method, path, parsedRequest) {
|
|
1655
1623
|
const handlersByPath = this.handlerClientsByMethod[method].get(path) ?? [];
|
|
1656
1624
|
for (let handlerIndex = handlersByPath.length - 1; handlerIndex >= 0; handlerIndex--) {
|
|
@@ -2399,7 +2367,7 @@ var LocalHttpInterceptor = class {
|
|
|
2399
2367
|
baseURL,
|
|
2400
2368
|
Handler: LocalHttpRequestHandler_default,
|
|
2401
2369
|
onUnhandledRequest: options.onUnhandledRequest,
|
|
2402
|
-
|
|
2370
|
+
saveRequests: options.saveRequests
|
|
2403
2371
|
});
|
|
2404
2372
|
}
|
|
2405
2373
|
get type() {
|
|
@@ -2411,11 +2379,11 @@ var LocalHttpInterceptor = class {
|
|
|
2411
2379
|
set baseURL(baseURL) {
|
|
2412
2380
|
this.client.baseURL = new URL(baseURL);
|
|
2413
2381
|
}
|
|
2414
|
-
get
|
|
2415
|
-
return this.client.
|
|
2382
|
+
get saveRequests() {
|
|
2383
|
+
return this.client.saveRequests;
|
|
2416
2384
|
}
|
|
2417
|
-
set
|
|
2418
|
-
this.client.
|
|
2385
|
+
set saveRequests(saveRequests) {
|
|
2386
|
+
this.client.saveRequests = saveRequests;
|
|
2419
2387
|
}
|
|
2420
2388
|
get onUnhandledRequest() {
|
|
2421
2389
|
return this.client.onUnhandledRequest;
|
|
@@ -2489,7 +2457,7 @@ var RemoteHttpInterceptor = class {
|
|
|
2489
2457
|
baseURL,
|
|
2490
2458
|
Handler: RemoteHttpRequestHandler_default,
|
|
2491
2459
|
onUnhandledRequest: options.onUnhandledRequest,
|
|
2492
|
-
|
|
2460
|
+
saveRequests: options.saveRequests
|
|
2493
2461
|
});
|
|
2494
2462
|
}
|
|
2495
2463
|
get type() {
|
|
@@ -2501,11 +2469,11 @@ var RemoteHttpInterceptor = class {
|
|
|
2501
2469
|
set baseURL(baseURL) {
|
|
2502
2470
|
this.client.baseURL = new URL(baseURL);
|
|
2503
2471
|
}
|
|
2504
|
-
get
|
|
2505
|
-
return this.client.
|
|
2472
|
+
get saveRequests() {
|
|
2473
|
+
return this.client.saveRequests;
|
|
2506
2474
|
}
|
|
2507
|
-
set
|
|
2508
|
-
this.client.
|
|
2475
|
+
set saveRequests(saveRequests) {
|
|
2476
|
+
this.client.saveRequests = saveRequests;
|
|
2509
2477
|
}
|
|
2510
2478
|
get onUnhandledRequest() {
|
|
2511
2479
|
return this.client.onUnhandledRequest;
|
|
@@ -2608,6 +2576,6 @@ __name(createHttpInterceptor, "createHttpInterceptor");
|
|
|
2608
2576
|
* Reply listeners are always present when notified in normal conditions. If they were not present, the request
|
|
2609
2577
|
* would reach a timeout and not be responded. The empty set serves as a fallback. */
|
|
2610
2578
|
|
|
2611
|
-
export { DisabledRequestSavingError_default as DisabledRequestSavingError, InvalidFormDataError_default as InvalidFormDataError, InvalidJSONError_default as InvalidJSONError, NotRunningHttpInterceptorError_default as NotRunningHttpInterceptorError,
|
|
2579
|
+
export { DisabledRequestSavingError_default as DisabledRequestSavingError, InvalidFormDataError_default as InvalidFormDataError, InvalidJSONError_default as InvalidJSONError, NotRunningHttpInterceptorError_default as NotRunningHttpInterceptorError, RunningHttpInterceptorError_default as RunningHttpInterceptorError, TimesCheckError_default as TimesCheckError, UnknownHttpInterceptorPlatformError_default as UnknownHttpInterceptorPlatformError, UnknownHttpInterceptorTypeError_default as UnknownHttpInterceptorTypeError, UnregisteredBrowserServiceWorkerError_default as UnregisteredBrowserServiceWorkerError, createHttpInterceptor };
|
|
2612
2580
|
//# sourceMappingURL=http.mjs.map
|
|
2613
2581
|
//# sourceMappingURL=http.mjs.map
|