@zimic/interceptor 1.2.5 → 1.2.6-canary.1

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/http.mjs CHANGED
@@ -1009,6 +1009,8 @@ function removeArrayElement(array, element) {
1009
1009
  const index = array.indexOf(element);
1010
1010
  return removeArrayIndex(array, index);
1011
1011
  }
1012
+
1013
+ // src/utils/http.ts
1012
1014
  var HTTP_METHODS_WITH_RESPONSE_BODY = /* @__PURE__ */ new Set([
1013
1015
  "GET",
1014
1016
  "POST",
@@ -2261,6 +2263,14 @@ var WebSocketHandler = class {
2261
2263
  listeners[type].add(listener);
2262
2264
  return listener;
2263
2265
  }
2266
+ offAny() {
2267
+ this.channelListeners = {};
2268
+ for (const listenersBySocket of Object.values(this.socketListeners)) {
2269
+ for (const listeners of listenersBySocket.values()) {
2270
+ listeners.clear();
2271
+ }
2272
+ }
2273
+ }
2264
2274
  getOrCreateChannelListeners(channel) {
2265
2275
  const listeners = this.channelListeners[channel] ?? {
2266
2276
  event: /* @__PURE__ */ new Set(),
@@ -2296,14 +2306,6 @@ var WebSocketHandler = class {
2296
2306
  listener(options);
2297
2307
  }
2298
2308
  }
2299
- offAny() {
2300
- this.channelListeners = {};
2301
- for (const listenersBySocket of Object.values(this.socketListeners)) {
2302
- for (const listeners of listenersBySocket.values()) {
2303
- listeners.clear();
2304
- }
2305
- }
2306
- }
2307
2309
  };
2308
2310
  var WebSocketHandler_default = WebSocketHandler;
2309
2311