msw 0.49.2 → 1.0.0
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/lib/{SetupServerApi-70cc71a7.d.ts → SetupServerApi-39df862c.d.ts} +2 -2
- package/lib/{SetupApi-b2f0e5ac.d.ts → glossary-de6278a9.d.ts} +57 -15
- package/lib/iife/index.js +228 -488
- package/lib/iife/index.js.map +1 -1
- package/lib/index.d.ts +18 -8
- package/lib/index.js +43 -30
- package/lib/index.js.map +1 -1
- package/lib/mockServiceWorker.js +1 -1
- package/lib/native/index.d.ts +4 -3
- package/lib/native/index.js +2 -2
- package/lib/native/index.mjs +3 -3
- package/lib/node/index.d.ts +5 -5
- package/lib/node/index.js +4 -2
- package/lib/node/index.js.map +1 -1
- package/lib/node/index.mjs +4 -3
- package/lib/node/index.mjs.map +1 -1
- package/package.json +2 -2
- package/lib/glossary-a30fab39.d.ts +0 -45
package/lib/node/index.mjs
CHANGED
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
|
|
65
65
|
// src/SetupApi.ts
|
|
66
66
|
import { invariant } from "outvariant";
|
|
67
|
-
import {
|
|
67
|
+
import { Emitter } from "strict-event-emitter";
|
|
68
68
|
|
|
69
69
|
// src/utils/internal/devUtils.ts
|
|
70
70
|
import { format } from "outvariant";
|
|
@@ -111,8 +111,8 @@ var SetupApi = class {
|
|
|
111
111
|
this.validateHandlers(...initialHandlers);
|
|
112
112
|
this.initialHandlers = toReadonlyArray(initialHandlers);
|
|
113
113
|
this.currentHandlers = [...initialHandlers];
|
|
114
|
-
this.emitter = new
|
|
115
|
-
this.publicEmitter = new
|
|
114
|
+
this.emitter = new Emitter();
|
|
115
|
+
this.publicEmitter = new Emitter();
|
|
116
116
|
pipeEvents(this.emitter, this.publicEmitter);
|
|
117
117
|
this.events = this.createLifeCycleEvents();
|
|
118
118
|
}
|
|
@@ -1486,6 +1486,7 @@ var setupServer = (...handlers) => {
|
|
|
1486
1486
|
return new SetupServerApi([ClientRequestInterceptor, XMLHttpRequestInterceptor], ...handlers);
|
|
1487
1487
|
};
|
|
1488
1488
|
export {
|
|
1489
|
+
SetupServerApi,
|
|
1489
1490
|
setupServer
|
|
1490
1491
|
};
|
|
1491
1492
|
//# sourceMappingURL=index.mjs.map
|