msw 2.4.12 → 2.5.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.
@@ -218,13 +218,16 @@ function printStartMessage(args = {}) {
218
218
  if (args.workerScope) {
219
219
  console.log("Worker scope:", args.workerScope);
220
220
  }
221
+ if (args.client) {
222
+ console.log("Client ID: %s (%s)", args.client.id, args.client.frameType);
223
+ }
221
224
  console.groupEnd();
222
225
  }
223
226
 
224
227
  // src/browser/setupWorker/start/utils/enableMocking.ts
225
228
  async function enableMocking(context, options) {
226
229
  context.workerChannel.send("MOCK_ACTIVATE");
227
- await context.events.once("MOCKING_ENABLED");
230
+ const { payload } = await context.events.once("MOCKING_ENABLED");
228
231
  if (context.isMockingEnabled) {
229
232
  devUtils3.warn(
230
233
  `Found a redundant "worker.start()" call. Note that starting the worker while mocking is already enabled will have no effect. Consider removing this "worker.start()" call.`
@@ -235,7 +238,8 @@ async function enableMocking(context, options) {
235
238
  printStartMessage({
236
239
  quiet: options.quiet,
237
240
  workerScope: context.registration?.scope,
238
- workerUrl: context.worker?.scriptURL
241
+ workerUrl: context.worker?.scriptURL,
242
+ client: payload.client
239
243
  });
240
244
  }
241
245
 
@@ -358,7 +362,7 @@ import { devUtils as devUtils5 } from '../core/utils/internal/devUtils.mjs';
358
362
  async function checkWorkerIntegrity(context) {
359
363
  context.workerChannel.send("INTEGRITY_CHECK_REQUEST");
360
364
  const { payload } = await context.events.once("INTEGRITY_CHECK_RESPONSE");
361
- if (payload.checksum !== "26357c79639bfa20d64c0efca2a87423") {
365
+ if (payload.checksum !== "07a8241b182f8a246a7cd39894799a9e") {
362
366
  devUtils5.warn(
363
367
  `The currently registered Service Worker has been generated by a different version of MSW (${payload.packageVersion}) and may not be fully compatible with the installed version.
364
368