@labdigital/commercetools-mock 2.43.1 → 2.43.2

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.
package/dist/index.cjs CHANGED
@@ -9367,8 +9367,12 @@ var CommercetoolsMock = class {
9367
9367
  // allows you to manage msw server yourself and register the handlers needed
9368
9368
  // for commercetools-mock to work.
9369
9369
  registerHandlers(server) {
9370
+ const handlers = this.getHandlers(server);
9371
+ server.use(...handlers);
9372
+ }
9373
+ getHandlers(server) {
9370
9374
  const app = this.app;
9371
- server.use(
9375
+ return [
9372
9376
  import_msw.http.post(`${this.options.authHost}/oauth/*`, async ({ request }) => {
9373
9377
  const body = await request.text();
9374
9378
  const url = new URL(request.url);
@@ -9427,7 +9431,7 @@ var CommercetoolsMock = class {
9427
9431
  headers: mapHeaderType(res.headers)
9428
9432
  });
9429
9433
  })
9430
- );
9434
+ ];
9431
9435
  }
9432
9436
  mswServer() {
9433
9437
  return this._mswServer;