msw 0.36.8 → 0.38.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.36.8).
5
+ * Mock Service Worker (0.38.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,4 +1,4 @@
1
- import { Headers } from 'headers-utils';
1
+ import { Headers } from 'headers-polyfill';
2
2
  import { MockedResponse, ResponseComposition } from '../response';
3
3
  import { set } from '../context/set';
4
4
  import { ResponseResolutionContext } from '../utils/getResponse';
@@ -1,4 +1,4 @@
1
- import { Headers } from 'headers-utils';
1
+ import { Headers } from 'headers-polyfill';
2
2
  /**
3
3
  * Internal representation of a mocked response instance.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { FlatHeadersObject } from 'headers-utils';
1
+ import { FlatHeadersObject } from 'headers-polyfill';
2
2
  import { StrictEventEmitter } from 'strict-event-emitter';
3
3
  import { LifeCycleEventEmitter, LifeCycleEventsMap, SharedOptions } from '../sharedOptions';
4
4
  import { ServiceWorkerMessage } from '../utils/createBroadcastChannel';
@@ -6,5 +6,5 @@ export declare function prepareResponse(res: SerializedResponse<any>): {
6
6
  body: string | number | boolean | Record<string, any> | null | undefined;
7
7
  status: number;
8
8
  statusText: string;
9
- headers: import("headers-utils").FlatHeadersObject;
9
+ headers: import("headers-polyfill").FlatHeadersObject;
10
10
  };
@@ -1,4 +1,8 @@
1
1
  import { MockedRequest, RequestHandler } from '../../handlers/RequestHandler';
2
- export declare type UnhandledRequestCallback = (request: MockedRequest) => void;
2
+ export interface UnhandledRequestPrint {
3
+ warning(): void;
4
+ error(): void;
5
+ }
6
+ export declare type UnhandledRequestCallback = (request: MockedRequest, print: UnhandledRequestPrint) => void;
3
7
  export declare type UnhandledRequestStrategy = 'bypass' | 'warn' | 'error' | UnhandledRequestCallback;
4
8
  export declare function onUnhandledRequest(request: MockedRequest, handlers: RequestHandler[], strategy?: UnhandledRequestStrategy): void;