@nestjs/cqrs 9.0.1 → 9.0.3
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/.circleci/config.yml +3 -3
- package/.husky/commit-msg +4 -0
- package/.husky/pre-commit +4 -0
- package/CONTRIBUTING.md +2 -2
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/dist/decorators/command-handler.decorator.d.ts +1 -1
- package/dist/decorators/command-handler.decorator.js +1 -1
- package/dist/decorators/query-handler.decorator.js +1 -1
- package/package.json +24 -31
package/.circleci/config.yml
CHANGED
|
@@ -17,12 +17,12 @@ jobs:
|
|
|
17
17
|
build:
|
|
18
18
|
working_directory: ~/nest
|
|
19
19
|
docker:
|
|
20
|
-
- image:
|
|
20
|
+
- image: cimg/node:19.6
|
|
21
21
|
steps:
|
|
22
22
|
- checkout
|
|
23
23
|
- run:
|
|
24
24
|
name: Update NPM version
|
|
25
|
-
command:
|
|
25
|
+
command: sudo npm install -g npm@latest
|
|
26
26
|
- restore_cache:
|
|
27
27
|
key: dependency-cache-{{ checksum "package.json" }}
|
|
28
28
|
- run:
|
|
@@ -41,4 +41,4 @@ workflows:
|
|
|
41
41
|
build-and-test:
|
|
42
42
|
jobs:
|
|
43
43
|
- build
|
|
44
|
-
|
|
44
|
+
|
package/CONTRIBUTING.md
CHANGED
|
@@ -27,7 +27,7 @@ Stack Overflow is a much better place to ask questions since:
|
|
|
27
27
|
|
|
28
28
|
To save your and our time, we will systematically close all issues that are requests for general support and redirect people to Stack Overflow.
|
|
29
29
|
|
|
30
|
-
If you would like to chat about the question in real-time, you can reach out via [our
|
|
30
|
+
If you would like to chat about the question in real-time, you can reach out via [our discord channel][discord].
|
|
31
31
|
|
|
32
32
|
## <a name="issue"></a> Found a Bug?
|
|
33
33
|
If you find a bug in the source code, you can help us by
|
|
@@ -244,7 +244,7 @@ changes to be accepted, the CLA must be signed. It's a quick process, we promise
|
|
|
244
244
|
[corporate-cla]: http://code.google.com/legal/corporate-cla-v1.0.html
|
|
245
245
|
[dev-doc]: https://github.com/nestjs/nest/blob/master/docs/DEVELOPER.md
|
|
246
246
|
[github]: https://github.com/nestjs/nest
|
|
247
|
-
[
|
|
247
|
+
[discord]: https://discord.gg/nestjs
|
|
248
248
|
[individual-cla]: http://code.google.com/legal/individual-cla-v1.0.html
|
|
249
249
|
[js-style-guide]: https://google.github.io/styleguide/jsguide.html
|
|
250
250
|
[jsfiddle]: http://jsfiddle.net
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2017-
|
|
3
|
+
Copyright (c) 2017-2022 Kamil Mysliwiec <https://kamilmysliwiec.com>
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/
|
|
2
|
+
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
[travis-image]: https://api.travis-ci.org/nestjs/nest.svg?branch=master
|
|
@@ -10,4 +10,4 @@ import { ICommand } from '../index';
|
|
|
10
10
|
*
|
|
11
11
|
* @see https://docs.nestjs.com/recipes/cqrs#commands
|
|
12
12
|
*/
|
|
13
|
-
export declare const CommandHandler: (command: ICommand) => ClassDecorator;
|
|
13
|
+
export declare const CommandHandler: (command: ICommand | (new (...args: any[]) => ICommand)) => ClassDecorator;
|
|
@@ -16,7 +16,7 @@ const uuid_1 = require("uuid");
|
|
|
16
16
|
*/
|
|
17
17
|
const CommandHandler = (command) => {
|
|
18
18
|
return (target) => {
|
|
19
|
-
if (!Reflect.
|
|
19
|
+
if (!Reflect.hasOwnMetadata(constants_1.COMMAND_METADATA, command)) {
|
|
20
20
|
Reflect.defineMetadata(constants_1.COMMAND_METADATA, { id: (0, uuid_1.v4)() }, command);
|
|
21
21
|
}
|
|
22
22
|
Reflect.defineMetadata(constants_1.COMMAND_HANDLER_METADATA, command, target);
|
|
@@ -16,7 +16,7 @@ const uuid_1 = require("uuid");
|
|
|
16
16
|
*/
|
|
17
17
|
const QueryHandler = (query) => {
|
|
18
18
|
return (target) => {
|
|
19
|
-
if (!Reflect.
|
|
19
|
+
if (!Reflect.hasOwnMetadata(constants_1.QUERY_METADATA, query)) {
|
|
20
20
|
Reflect.defineMetadata(constants_1.QUERY_METADATA, { id: (0, uuid_1.v4)() }, query);
|
|
21
21
|
}
|
|
22
22
|
Reflect.defineMetadata(constants_1.QUERY_HANDLER_METADATA, query, target);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/cqrs",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.3",
|
|
4
4
|
"description": "A lightweight CQRS module for Nest framework (node.js)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"url": "https://github.com/nestjs/cqrs#readme",
|
|
@@ -14,32 +14,33 @@
|
|
|
14
14
|
"prepublish:npm": "npm run build",
|
|
15
15
|
"publish:npm": "npm publish --access public",
|
|
16
16
|
"prerelease": "npm run build",
|
|
17
|
-
"release": "release-it"
|
|
17
|
+
"release": "release-it",
|
|
18
|
+
"prepare": "husky install"
|
|
18
19
|
},
|
|
19
20
|
"dependencies": {
|
|
20
|
-
"uuid": "
|
|
21
|
+
"uuid": "9.0.0"
|
|
21
22
|
},
|
|
22
23
|
"devDependencies": {
|
|
23
|
-
"@commitlint/cli": "17.
|
|
24
|
-
"@commitlint/config-angular": "17.
|
|
25
|
-
"@nestjs/common": "9.
|
|
26
|
-
"@nestjs/core": "9.
|
|
27
|
-
"@types/node": "
|
|
28
|
-
"@types/jest": "
|
|
29
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
30
|
-
"@typescript-eslint/parser": "5.
|
|
31
|
-
"eslint": "8.
|
|
32
|
-
"eslint-config-prettier": "8.
|
|
33
|
-
"eslint-plugin-import": "2.
|
|
34
|
-
"husky": "8.0.
|
|
35
|
-
"jest": "
|
|
36
|
-
"lint-staged": "13.
|
|
37
|
-
"prettier": "2.
|
|
24
|
+
"@commitlint/cli": "17.4.2",
|
|
25
|
+
"@commitlint/config-angular": "17.4.2",
|
|
26
|
+
"@nestjs/common": "9.3.7",
|
|
27
|
+
"@nestjs/core": "9.3.7",
|
|
28
|
+
"@types/node": "18.13.0",
|
|
29
|
+
"@types/jest": "29.4.0",
|
|
30
|
+
"@typescript-eslint/eslint-plugin": "5.51.0",
|
|
31
|
+
"@typescript-eslint/parser": "5.51.0",
|
|
32
|
+
"eslint": "8.33.0",
|
|
33
|
+
"eslint-config-prettier": "8.6.0",
|
|
34
|
+
"eslint-plugin-import": "2.27.5",
|
|
35
|
+
"husky": "8.0.3",
|
|
36
|
+
"jest": "29.4.2",
|
|
37
|
+
"lint-staged": "13.1.1",
|
|
38
|
+
"prettier": "2.8.4",
|
|
38
39
|
"reflect-metadata": "0.1.13",
|
|
39
|
-
"release-it": "15.
|
|
40
|
-
"rxjs": "7.
|
|
41
|
-
"ts-jest": "
|
|
42
|
-
"typescript": "4.
|
|
40
|
+
"release-it": "15.6.0",
|
|
41
|
+
"rxjs": "7.8.0",
|
|
42
|
+
"ts-jest": "29.0.5",
|
|
43
|
+
"typescript": "4.9.5"
|
|
43
44
|
},
|
|
44
45
|
"peerDependencies": {
|
|
45
46
|
"@nestjs/common": "^9.0.0",
|
|
@@ -48,15 +49,7 @@
|
|
|
48
49
|
"rxjs": "^7.2.0"
|
|
49
50
|
},
|
|
50
51
|
"lint-staged": {
|
|
51
|
-
"
|
|
52
|
-
"prettier --write"
|
|
53
|
-
]
|
|
54
|
-
},
|
|
55
|
-
"husky": {
|
|
56
|
-
"hooks": {
|
|
57
|
-
"commit-msg": "commitlint -c .commitlintrc.json -E HUSKY_GIT_PARAMS",
|
|
58
|
-
"pre-commit": "lint-staged"
|
|
59
|
-
}
|
|
52
|
+
"**/*.{ts,json}": []
|
|
60
53
|
},
|
|
61
54
|
"repository": {
|
|
62
55
|
"type": "git",
|