Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nestjs/microservices

Package Overview
Dependencies
Maintainers
1
Versions
366
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nestjs/microservices - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

3

context/exception-filters-context.d.ts

@@ -6,5 +6,8 @@ import 'reflect-metadata';

import { BaseExceptionFilterContext } from '@nestjs/core/exceptions/base-exception-filter-context';
import { ApplicationConfig } from '@nestjs/core/application-config';
export declare class ExceptionFiltersContext extends BaseExceptionFilterContext {
private readonly config;
constructor(config: ApplicationConfig);
create(instance: Controller, callback: (data) => Observable<any>): RpcExceptionsHandler;
getGlobalMetadata<T extends any[]>(): T;
}

@@ -9,2 +9,6 @@ "use strict";

class ExceptionFiltersContext extends base_exception_filter_context_1.BaseExceptionFilterContext {
constructor(config) {
super();
this.config = config;
}
create(instance, callback) {

@@ -20,5 +24,5 @@ const exceptionHandler = new rpc_exceptions_handler_1.RpcExceptionsHandler();

getGlobalMetadata() {
return [];
return this.config.getGlobalFilters();
}
}
exports.ExceptionFiltersContext = ExceptionFiltersContext;

2

microservices-module.d.ts

@@ -8,3 +8,3 @@ import { InstanceWrapper } from '@nestjs/core/injector/container';

private static listenersController;
static setup(container: any): void;
static setup(container: any, config: any): void;
static setupListeners(container: any, server: Server & CustomTransportStrategy): void;

@@ -11,0 +11,0 @@ static setupClients(container: any): void;

@@ -16,4 +16,4 @@ "use strict";

class MicroservicesModule {
static setup(container) {
this.listenersController = new listeners_controller_1.ListenersController(MicroservicesModule.clientsContainer, new rpc_context_creator_1.RpcContextCreator(new rpc_proxy_1.RpcProxy(), new exception_filters_context_1.ExceptionFiltersContext(), new pipes_context_creator_1.PipesContextCreator(), new pipes_consumer_1.PipesConsumer(), new guards_context_creator_1.GuardsContextCreator(container), new guards_consumer_1.GuardsConsumer(), new interceptors_context_creator_1.InterceptorsContextCreator(container), new interceptors_consumer_1.InterceptorsConsumer()));
static setup(container, config) {
this.listenersController = new listeners_controller_1.ListenersController(MicroservicesModule.clientsContainer, new rpc_context_creator_1.RpcContextCreator(new rpc_proxy_1.RpcProxy(), new exception_filters_context_1.ExceptionFiltersContext(config), new pipes_context_creator_1.PipesContextCreator(config), new pipes_consumer_1.PipesConsumer(), new guards_context_creator_1.GuardsContextCreator(container, config), new guards_consumer_1.GuardsConsumer(), new interceptors_context_creator_1.InterceptorsContextCreator(container, config), new interceptors_consumer_1.InterceptorsConsumer()));
}

@@ -20,0 +20,0 @@ static setupListeners(container, server) {

{
"name": "@nestjs/microservices",
"version": "4.0.0",
"version": "4.0.1",
"description": "Nest - modern, fast, powerful node.js web framework (@microservices)",

@@ -5,0 +5,0 @@ "author": "Kamil Mysliwiec",

@@ -17,4 +17,4 @@ import { Logger } from '@nestjs/common/services/logger.service';

send(stream$: Observable<any>, respond: (data: MicroserviceResponse) => void): Subscription;
transformToObservable(resultOrDeffered: any): Observable<any>;
protected handleError(error: string): void;
protected transformToObservable(resultOrDeffered: any): Observable<any>;
}

@@ -29,5 +29,2 @@ "use strict";

}
handleError(error) {
this.logger.error(error);
}
transformToObservable(resultOrDeffered) {

@@ -42,3 +39,6 @@ if (resultOrDeffered instanceof Promise) {

}
handleError(error) {
this.logger.error(error);
}
}
exports.Server = Server;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc