@wallentaine/cqrs-schematics 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -63,8 +63,9 @@ nge PostCreated
63
63
  ### Пример для CreatePost:
64
64
 
65
65
  ```
66
- src/commands/CreatePost.command.ts
67
- src/commands/handlers/CreatePost.commandHandler.ts
66
+ src/Commands/CreatePost.command.ts
67
+ src/Commands/CreatePost.commandHandler.ts
68
+ src/Commands/CreatePost.http.controller.ts
68
69
  ```
69
70
 
70
71
  ### Регистрация
@@ -8,7 +8,7 @@ export class <%= className %>CommandHandler implements ICommandHandler<<%= class
8
8
 
9
9
  public constructor() {}
10
10
 
11
- async execute(command: <%= className %>Command): Promise<void> {
11
+ public async execute(command: <%= className %>Command): Promise<void> {
12
12
  // Implement your command logic here
13
13
  }
14
14
  }
@@ -9,13 +9,13 @@ import { <%= className %>CommandHandler } from './<%= name %>.commandHandler';
9
9
  @ApiBearerAuth()<% } %>
10
10
  @UseGuards()
11
11
  @Controller('')
12
- export class <%= className %>Controller {
12
+ export class <%= className %>HttpController {
13
13
  public constructor(private readonly commandBus: CommandBus) {}
14
14
 
15
15
  @HttpCode(200)
16
16
  @Post()
17
17
  <% if (useSwagger) { %>@ApiOperation({ summary: '<%= humanize(name) %>' })<% } %>
18
- async create(@Body() data: {}): Promise<void> {
18
+ public async create(@Body() data: {}): Promise<void> {
19
19
  return this.commandBus.execute<
20
20
  <%= className %>Command,
21
21
  CommandResponse<<%= className %>CommandHandler>
@@ -9,7 +9,7 @@ export class <%= className %>EventHandler {
9
9
  public constructor() {}
10
10
 
11
11
  @OnEvent()
12
- async handle(event: ApplicationEventProps<<%= className %>Event>): Promise<void> {
12
+ public async handle(event: ApplicationEventProps<<%= className %>Event>): Promise<void> {
13
13
  // Implement your query logic here
14
14
  }
15
15
  }
@@ -9,13 +9,13 @@ import { <%= className %>QueryHandler } from './<%= name %>.queryHandler';
9
9
  @ApiBearerAuth()<% } %>
10
10
  @UseGuards()
11
11
  @Controller('')
12
- export class <%= className %>Controller {
12
+ export class <%= className %>HttpController {
13
13
  public constructor(private readonly queryBus: QueryBus) {}
14
14
 
15
15
  @HttpCode(200)
16
16
  @Get()
17
17
  <% if (useSwagger) { %>@ApiOperation({ summary: '<%= humanize(name) %>' })<% } %>
18
- async create(@Query() query: {}): Promise<void> {
18
+ public async create(@Query() query: {}): Promise<void> {
19
19
  return this.queryBus.execute<
20
20
  <%= className %>Query,
21
21
  QueryResponse<<%= className %>QueryHandler>
@@ -8,7 +8,7 @@ export class <%= className %>QueryHandler implements IQueryHandler<<%= className
8
8
 
9
9
  public constructor() {}
10
10
 
11
- async execute(query: <%= className %>Query): Promise<void> {
11
+ public async execute(query: <%= className %>Query): Promise<void> {
12
12
  // Implement your query logic here
13
13
  }
14
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wallentaine/cqrs-schematics",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {