msw 0.0.0-fetch.rc-18 → 0.0.0-fetch.rc-19

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.
@@ -220,9 +220,6 @@ var WorkerChannel = class {
220
220
  }
221
221
  };
222
222
 
223
- // src/browser/setupWorker/start/createRequestListener.ts
224
- var import_NetworkError = require("../core/NetworkError.js");
225
-
226
223
  // src/browser/utils/pruneGetRequestBody.ts
227
224
  function pruneGetRequestBody(request) {
228
225
  if (["HEAD", "GET"].includes(request.method)) {
@@ -285,13 +282,6 @@ var createRequestListener = (context, options) => {
285
282
  }
286
283
  );
287
284
  } catch (error) {
288
- if (error instanceof import_NetworkError.NetworkError) {
289
- messageChannel.postMessage("NETWORK_ERROR", {
290
- name: error.name,
291
- message: error.message
292
- });
293
- return;
294
- }
295
285
  if (error instanceof Error) {
296
286
  import_devUtils4.devUtils.error(
297
287
  `Uncaught exception in the request handler for "%s %s":
@@ -327,9 +317,9 @@ function requestIntegrityCheck(context, serviceWorker) {
327
317
  const { payload: actualChecksum } = yield context.events.once(
328
318
  "INTEGRITY_CHECK_RESPONSE"
329
319
  );
330
- if (actualChecksum !== "42fb047ce943b9103a6ed499f86548c4") {
320
+ if (actualChecksum !== "e2d8525b2d1bdadf89a15ae5a2619512") {
331
321
  throw new Error(
332
- `Currently active Service Worker (${actualChecksum}) is behind the latest published one (${"42fb047ce943b9103a6ed499f86548c4"}).`
322
+ `Currently active Service Worker (${actualChecksum}) is behind the latest published one (${"e2d8525b2d1bdadf89a15ae5a2619512"}).`
333
323
  );
334
324
  }
335
325
  return serviceWorker;
@@ -196,9 +196,6 @@ var WorkerChannel = class {
196
196
  }
197
197
  };
198
198
 
199
- // src/browser/setupWorker/start/createRequestListener.ts
200
- import { NetworkError } from '../core/NetworkError.mjs';
201
-
202
199
  // src/browser/utils/pruneGetRequestBody.ts
203
200
  function pruneGetRequestBody(request) {
204
201
  if (["HEAD", "GET"].includes(request.method)) {
@@ -261,13 +258,6 @@ var createRequestListener = (context, options) => {
261
258
  }
262
259
  );
263
260
  } catch (error) {
264
- if (error instanceof NetworkError) {
265
- messageChannel.postMessage("NETWORK_ERROR", {
266
- name: error.name,
267
- message: error.message
268
- });
269
- return;
270
- }
271
261
  if (error instanceof Error) {
272
262
  devUtils4.error(
273
263
  `Uncaught exception in the request handler for "%s %s":
@@ -303,9 +293,9 @@ function requestIntegrityCheck(context, serviceWorker) {
303
293
  const { payload: actualChecksum } = yield context.events.once(
304
294
  "INTEGRITY_CHECK_RESPONSE"
305
295
  );
306
- if (actualChecksum !== "42fb047ce943b9103a6ed499f86548c4") {
296
+ if (actualChecksum !== "e2d8525b2d1bdadf89a15ae5a2619512") {
307
297
  throw new Error(
308
- `Currently active Service Worker (${actualChecksum}) is behind the latest published one (${"42fb047ce943b9103a6ed499f86548c4"}).`
298
+ `Currently active Service Worker (${actualChecksum}) is behind the latest published one (${"e2d8525b2d1bdadf89a15ae5a2619512"}).`
309
299
  );
310
300
  }
311
301
  return serviceWorker;
@@ -11,7 +11,6 @@ export { LifeCycleEventsMap, SharedOptions } from './sharedOptions.js';
11
11
  export { DelayMode, MAX_SERVER_RESPONSE_TIME, MIN_SERVER_RESPONSE_TIME, NODE_SERVER_RESPONSE_TIME, SET_TIMEOUT_MAX_ALLOWED_INT, delay } from './delay.js';
12
12
  export { bypass } from './bypass.js';
13
13
  export { passthrough } from './passthrough.js';
14
- export { NetworkError } from './NetworkError.js';
15
14
  import 'strict-event-emitter';
16
15
  import './utils/internal/Disposable.js';
17
16
  import './typeUtils.js';
package/lib/core/index.js CHANGED
@@ -22,7 +22,6 @@ __export(core_exports, {
22
22
  GraphQLHandler: () => import_GraphQLHandler.GraphQLHandler,
23
23
  HttpHandler: () => import_HttpHandler.HttpHandler,
24
24
  HttpMethods: () => import_HttpHandler.HttpMethods,
25
- NetworkError: () => import_NetworkError.NetworkError,
26
25
  RequestHandler: () => import_RequestHandler.RequestHandler,
27
26
  SetupApi: () => import_SetupApi.SetupApi,
28
27
  bypass: () => import_bypass.bypass,
@@ -47,5 +46,4 @@ __reExport(core_exports, require("./HttpResponse.js"), module.exports);
47
46
  __reExport(core_exports, require("./delay.js"), module.exports);
48
47
  var import_bypass = require("./bypass.js");
49
48
  var import_passthrough = require("./passthrough.js");
50
- var import_NetworkError = require("./NetworkError.js");
51
49
  (0, import_checkGlobals.checkGlobals)();
@@ -12,13 +12,11 @@ export * from './HttpResponse.mjs';
12
12
  export * from './delay.mjs';
13
13
  import { bypass } from './bypass.mjs';
14
14
  import { passthrough } from './passthrough.mjs';
15
- import { NetworkError } from './NetworkError.mjs';
16
15
  checkGlobals();
17
16
  export {
18
17
  GraphQLHandler,
19
18
  HttpHandler,
20
19
  HttpMethods,
21
- NetworkError,
22
20
  RequestHandler,
23
21
  SetupApi,
24
22
  bypass,