nestjs-cqrs-extra
Advanced tools
Comparing version 1.1.1 to 1.1.2
{ | ||
"name": "nestjs-cqrs-extra", | ||
"description": "Library that provides additional features for the NestJS CQRS module.", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"scripts": { | ||
@@ -6,0 +6,0 @@ "build": "rimraf dist && tsc -p tsconfig.build.json", |
@@ -19,6 +19,7 @@ <p align="center"> | ||
Nest CQRS Extra is a module that provides additional features for the [NestJS CQRS module](https://docs.nestjs.com/recipes/cqrs). It | ||
provides a way to create a command bus and query bus that can be used to send commands and queries to the appropriate handlers. It also | ||
provides a way to create a command and query handler that can be used to handle commands and queries. | ||
provides a way to send commands and queries through a message broker (e.g. NATS, Redis, MQTT) to the appropriate handlers in microservices. | ||
It also provides a way to create sagas that can be used to handle events. | ||
**Features** | ||
- **Typings** - Provides typings for commands, queries, and events. (Request & Response) | ||
@@ -28,3 +29,2 @@ - **Message Broker** - Provides a way to send commands and queries to the appropriate handlers in microservices. | ||
## Installation | ||
@@ -51,3 +51,4 @@ | ||
}) | ||
export class AppModule {} | ||
export class AppModule { | ||
} | ||
``` | ||
@@ -78,6 +79,6 @@ | ||
export class UserCommandsController { | ||
@CommandHandler(CreateUserCommand) | ||
public createUser(command: CreateUserCommand): string { | ||
return `User ${command.name} created`; | ||
} | ||
@CommandHandler(CreateUserCommand) | ||
public createUser(command: CreateUserCommand): string { | ||
return `User ${command.name} created`; | ||
} | ||
} | ||
@@ -96,3 +97,4 @@ ``` | ||
export class UserService { | ||
constructor(private readonly commandBus: CommandBus) {} | ||
constructor(private readonly commandBus: CommandBus) { | ||
} | ||
@@ -99,0 +101,0 @@ async createUser(name: string): Promise<number> { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
110
35152