UNPKG

@ahmedhegazee/nestjs-telescope

Version:

Advanced observability and monitoring solution for NestJS applications with ML-powered analytics, enterprise features, and production-ready scaling

58 lines 2.77 kB
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var ExceptionWatcherModule_1; Object.defineProperty(exports, "__esModule", { value: true }); exports.ExceptionWatcherModule = void 0; const common_1 = require("@nestjs/common"); const core_1 = require("@nestjs/core"); const exception_watcher_service_1 = require("./exception-watcher.service"); const exception_watcher_filter_1 = require("./exception-watcher.filter"); const exception_watcher_config_1 = require("./exception-watcher.config"); let ExceptionWatcherModule = ExceptionWatcherModule_1 = class ExceptionWatcherModule { static forRoot(config = {}) { const exceptionWatcherConfig = { ...exception_watcher_config_1.defaultExceptionWatcherConfig, ...config }; return { module: ExceptionWatcherModule_1, providers: [ { provide: 'EXCEPTION_WATCHER_CONFIG', useValue: exceptionWatcherConfig, }, exception_watcher_service_1.ExceptionWatcherService, { provide: core_1.APP_FILTER, useClass: exception_watcher_filter_1.ExceptionWatcherFilter, }, ], exports: [exception_watcher_service_1.ExceptionWatcherService], }; } static forRootAsync(options) { return { module: ExceptionWatcherModule_1, providers: [ { provide: 'EXCEPTION_WATCHER_CONFIG', useFactory: options.useFactory, inject: options.inject || [], }, exception_watcher_service_1.ExceptionWatcherService, { provide: core_1.APP_FILTER, useClass: exception_watcher_filter_1.ExceptionWatcherFilter, }, ], exports: [exception_watcher_service_1.ExceptionWatcherService], }; } }; exports.ExceptionWatcherModule = ExceptionWatcherModule; exports.ExceptionWatcherModule = ExceptionWatcherModule = ExceptionWatcherModule_1 = __decorate([ (0, common_1.Module)({}) ], ExceptionWatcherModule); //# sourceMappingURL=exception-watcher.module.js.map