@goparrot/pubsub-event-bus
Version:
NestJS EventBus extension for RabbitMQ PubSub
22 lines • 861 B
JavaScript
import { __decorate, __metadata } from "tslib";
import { Injectable } from '@nestjs/common';
import { ModulesContainer } from '@nestjs/core';
import { ExplorerService as NestExplorerService } from '@nestjs/cqrs/dist/services/explorer.service';
import { PUBSUB_EVENT_HANDLER_METADATA } from '../decorator';
let ExplorerService = class ExplorerService extends NestExplorerService {
constructor(modules) {
super(modules);
this.modules = modules;
}
pubsubEvents() {
return this.flatMap([...this.modules.values()], (instance) => {
return this.filterProvider(instance, PUBSUB_EVENT_HANDLER_METADATA);
});
}
};
ExplorerService = __decorate([
Injectable(),
__metadata("design:paramtypes", [ModulesContainer])
], ExplorerService);
export { ExplorerService };
//# sourceMappingURL=ExplorerService.js.map