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.
@@ -245,13 +245,16 @@ function printStartMessage(args = {}) {
245
245
  if (args.workerScope) {
246
246
  console.log("Worker scope:", args.workerScope);
247
247
  }
248
+ if (args.client) {
249
+ console.log("Client ID: %s (%s)", args.client.id, args.client.frameType);
250
+ }
248
251
  console.groupEnd();
249
252
  }
250
253
 
251
254
  // src/browser/setupWorker/start/utils/enableMocking.ts
252
255
  async function enableMocking(context, options) {
253
256
  context.workerChannel.send("MOCK_ACTIVATE");
254
- await context.events.once("MOCKING_ENABLED");
257
+ const { payload } = await context.events.once("MOCKING_ENABLED");
255
258
  if (context.isMockingEnabled) {
256
259
  import_devUtils3.devUtils.warn(
257
260
  `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.`
@@ -262,7 +265,8 @@ async function enableMocking(context, options) {
262
265
  printStartMessage({
263
266
  quiet: options.quiet,
264
267
  workerScope: context.registration?.scope,
265
- workerUrl: context.worker?.scriptURL
268
+ workerUrl: context.worker?.scriptURL,
269
+ client: payload.client
266
270
  });
267
271
  }
268
272
 
@@ -385,7 +389,7 @@ var import_devUtils5 = require("../core/utils/internal/devUtils.js");
385
389
  async function checkWorkerIntegrity(context) {
386
390
  context.workerChannel.send("INTEGRITY_CHECK_REQUEST");
387
391
  const { payload } = await context.events.once("INTEGRITY_CHECK_RESPONSE");
388
- if (payload.checksum !== "26357c79639bfa20d64c0efca2a87423") {
392
+ if (payload.checksum !== "07a8241b182f8a246a7cd39894799a9e") {
389
393
  import_devUtils5.devUtils.warn(
390
394
  `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.
391
395