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.
@@ -2,7 +2,7 @@
2
2
  /* tslint:disable */
3
3
 
4
4
  /**
5
- * Mock Service Worker (0.49.2).
5
+ * Mock Service Worker (1.0.0).
6
6
  * @see https://github.com/mswjs/msw
7
7
  * - Please do NOT modify this file.
8
8
  * - Please do NOT serve this file on production.
@@ -1,8 +1,9 @@
1
- import { b as RequestHandler } from '../SetupApi-b2f0e5ac.js';
2
- import { S as SetupServerApi } from '../SetupServerApi-70cc71a7.js';
1
+ import { c as RequestHandler } from '../glossary-de6278a9.js';
2
+ import { S as SetupServerApi } from '../SetupServerApi-39df862c.js';
3
3
  import 'strict-event-emitter';
4
- import 'headers-polyfill';
4
+ import 'type-fest';
5
5
  import '@mswjs/interceptors';
6
+ import 'headers-polyfill';
6
7
 
7
8
  /**
8
9
  * Sets up a requests interception in React Native with the given request handlers.
@@ -110,8 +110,8 @@ var SetupApi = class {
110
110
  this.validateHandlers(...initialHandlers);
111
111
  this.initialHandlers = toReadonlyArray(initialHandlers);
112
112
  this.currentHandlers = [...initialHandlers];
113
- this.emitter = new import_strict_event_emitter.StrictEventEmitter();
114
- this.publicEmitter = new import_strict_event_emitter.StrictEventEmitter();
113
+ this.emitter = new import_strict_event_emitter.Emitter();
114
+ this.publicEmitter = new import_strict_event_emitter.Emitter();
115
115
  pipeEvents(this.emitter, this.publicEmitter);
116
116
  this.events = this.createLifeCycleEvents();
117
117
  }
@@ -63,7 +63,7 @@ import {
63
63
 
64
64
  // src/SetupApi.ts
65
65
  import { invariant } from "outvariant";
66
- import { StrictEventEmitter } from "strict-event-emitter";
66
+ import { Emitter } from "strict-event-emitter";
67
67
 
68
68
  // src/utils/internal/devUtils.ts
69
69
  import { format } from "outvariant";
@@ -110,8 +110,8 @@ var SetupApi = class {
110
110
  this.validateHandlers(...initialHandlers);
111
111
  this.initialHandlers = toReadonlyArray(initialHandlers);
112
112
  this.currentHandlers = [...initialHandlers];
113
- this.emitter = new StrictEventEmitter();
114
- this.publicEmitter = new StrictEventEmitter();
113
+ this.emitter = new Emitter();
114
+ this.publicEmitter = new Emitter();
115
115
  pipeEvents(this.emitter, this.publicEmitter);
116
116
  this.events = this.createLifeCycleEvents();
117
117
  }
@@ -1,11 +1,11 @@
1
- import { S as SetupServerApi } from '../SetupServerApi-70cc71a7.js';
2
- export { a as ServerLifecycleEventsMap } from '../SetupServerApi-70cc71a7.js';
3
- import { b as RequestHandler } from '../SetupApi-b2f0e5ac.js';
4
- export { a as SetupServerApi } from '../glossary-a30fab39.js';
1
+ import { S as SetupServerApi } from '../SetupServerApi-39df862c.js';
2
+ export { a as ServerLifecycleEventsMap, S as SetupServerApi } from '../SetupServerApi-39df862c.js';
3
+ import { c as RequestHandler } from '../glossary-de6278a9.js';
4
+ export { K as SetupServer } from '../glossary-de6278a9.js';
5
5
  import '@mswjs/interceptors';
6
6
  import 'strict-event-emitter';
7
- import 'headers-polyfill';
8
7
  import 'type-fest';
8
+ import 'headers-polyfill';
9
9
 
10
10
  /**
11
11
  * Sets up a requests interception in Node.js with the given request handlers.
package/lib/node/index.js CHANGED
@@ -51,6 +51,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
51
51
  // src/node/index.ts
52
52
  var node_exports = {};
53
53
  __export(node_exports, {
54
+ SetupServerApi: () => SetupServerApi,
54
55
  setupServer: () => setupServer
55
56
  });
56
57
  module.exports = __toCommonJS(node_exports);
@@ -113,8 +114,8 @@ var SetupApi = class {
113
114
  this.validateHandlers(...initialHandlers);
114
115
  this.initialHandlers = toReadonlyArray(initialHandlers);
115
116
  this.currentHandlers = [...initialHandlers];
116
- this.emitter = new import_strict_event_emitter.StrictEventEmitter();
117
- this.publicEmitter = new import_strict_event_emitter.StrictEventEmitter();
117
+ this.emitter = new import_strict_event_emitter.Emitter();
118
+ this.publicEmitter = new import_strict_event_emitter.Emitter();
118
119
  pipeEvents(this.emitter, this.publicEmitter);
119
120
  this.events = this.createLifeCycleEvents();
120
121
  }
@@ -1489,6 +1490,7 @@ var setupServer = (...handlers) => {
1489
1490
  };
1490
1491
  // Annotate the CommonJS export names for ESM import in node:
1491
1492
  0 && (module.exports = {
1493
+ SetupServerApi,
1492
1494
  setupServer
1493
1495
  });
1494
1496
  //# sourceMappingURL=index.js.map