Update checked-in dependencies
This commit is contained in:
parent
c7102cdca1
commit
5bddbeb2bf
71 changed files with 436 additions and 356 deletions
51
node_modules/@mswjs/interceptors/lib/node/chunk-TBU3WLO3.mjs
generated
vendored
Normal file
51
node_modules/@mswjs/interceptors/lib/node/chunk-TBU3WLO3.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
import {
|
||||
Interceptor
|
||||
} from "./chunk-YM42IU6M.mjs";
|
||||
|
||||
// src/BatchInterceptor.ts
|
||||
var BatchInterceptor = class extends Interceptor {
|
||||
constructor(options) {
|
||||
BatchInterceptor.symbol = Symbol(options.name);
|
||||
super(BatchInterceptor.symbol);
|
||||
this.interceptors = options.interceptors;
|
||||
}
|
||||
setup() {
|
||||
const logger = this.logger.extend("setup");
|
||||
logger.info("applying all %d interceptors...", this.interceptors.length);
|
||||
for (const interceptor of this.interceptors) {
|
||||
logger.info('applying "%s" interceptor...', interceptor.constructor.name);
|
||||
interceptor.apply();
|
||||
logger.info("adding interceptor dispose subscription");
|
||||
this.subscriptions.push(() => interceptor.dispose());
|
||||
}
|
||||
}
|
||||
on(event, listener) {
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptor.on(event, listener);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
once(event, listener) {
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptor.once(event, listener);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
off(event, listener) {
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptor.off(event, listener);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
removeAllListeners(event) {
|
||||
for (const interceptors of this.interceptors) {
|
||||
interceptors.removeAllListeners(event);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
};
|
||||
|
||||
export {
|
||||
BatchInterceptor
|
||||
};
|
||||
//# sourceMappingURL=chunk-TBU3WLO3.mjs.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue