@atls/nestjs-connectrpc-errors 0.0.1 → 0.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/CHANGELOG.md +20 -0
- package/dist/exception-factories/{domain.expection-factory.js → domain.exception-factory.js} +2 -1
- package/dist/exception-factories/guard.exception-factory.js +2 -0
- package/dist/exception-factories/index.d.ts +2 -2
- package/dist/exception-factories/index.js +2 -2
- package/dist/exception-factories/validation.exception-factory.js +3 -1
- package/package.json +21 -22
- /package/dist/exception-factories/{domain.expection-factory.d.ts → domain.exception-factory.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## [0.0.3](https://github.com/atls/nestjs/compare/@atls/nestjs-connectrpc-errors@0.0.2...@atls/nestjs-connectrpc-errors@0.0.3) (2025-12-31)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## [0.0.2](https://github.com/atls/nestjs/compare/@atls/nestjs-connectrpc-errors@0.0.1...@atls/nestjs-connectrpc-errors@0.0.2) (2025-04-03)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
* **nestjs-connectrpc-errors:** integration test ([f27551b](https://github.com/atls/nestjs/commit/f27551b1612908d3f539c9cb3aa06ae52a6a8e7a))
|
|
17
|
+
* **nestjs-connectrpc-errors:** protobuf-rpc ts errors ([81c9785](https://github.com/atls/nestjs/commit/81c9785e2de33ee9cd1c9f996d87490e81b49654))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
3
23
|
## [0.0.1](https://github.com/atls/nestjs/compare/@atls/nestjs-connectrpc-errors@0.0.0...@atls/nestjs-connectrpc-errors@0.0.1) (2025-01-24)
|
|
4
24
|
|
|
5
25
|
|
package/dist/exception-factories/{domain.expection-factory.js → domain.exception-factory.js}
RENAMED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { LogicalError } from '@atls/protobuf-rpc';
|
|
1
2
|
import { Code } from '@connectrpc/connect';
|
|
2
3
|
import { ConnectError } from '@connectrpc/connect';
|
|
3
4
|
import { RpcException } from '@nestjs/microservices';
|
|
4
5
|
export const domainExceptionFactory = (error) => {
|
|
5
6
|
const logicalError = new LogicalError({
|
|
6
|
-
id: error.
|
|
7
|
+
id: error.name,
|
|
7
8
|
message: error.message,
|
|
8
9
|
});
|
|
9
10
|
return new RpcException(new ConnectError('Logical Error', Code.InvalidArgument, undefined, [logicalError]));
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ValidationError } from '@atls/protobuf-rpc';
|
|
2
|
+
import { ValidationErrorMessage } from '@atls/protobuf-rpc';
|
|
1
3
|
import { Code } from '@connectrpc/connect';
|
|
2
4
|
import { ConnectError } from '@connectrpc/connect';
|
|
3
5
|
import { RpcException } from '@nestjs/microservices';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './validation.exception-factory.js';
|
|
2
1
|
export * from './assertion.exception-factory.js';
|
|
2
|
+
export * from './domain.exception-factory.js';
|
|
3
3
|
export * from './guard.exception-factory.js';
|
|
4
|
-
export * from './
|
|
4
|
+
export * from './validation.exception-factory.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./validation.exception-factory.js";
|
|
2
1
|
export * from "./assertion.exception-factory.js";
|
|
2
|
+
export * from "./domain.exception-factory.js";
|
|
3
3
|
export * from "./guard.exception-factory.js";
|
|
4
|
-
export * from "./
|
|
4
|
+
export * from "./validation.exception-factory.js";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ValidationError } from '@atls/protobuf-rpc';
|
|
2
|
+
import { ValidationErrorMessage } from '@atls/protobuf-rpc';
|
|
1
3
|
import { Code } from '@connectrpc/connect';
|
|
2
4
|
import { ConnectError } from '@connectrpc/connect';
|
|
3
5
|
import { RpcException } from '@nestjs/microservices';
|
|
@@ -16,7 +18,7 @@ export const validationExceptionFactory = (errors) => {
|
|
|
16
18
|
const messages = Object.keys(error.constraints || {}).map((constraintId) => {
|
|
17
19
|
const validationErrorMessage = new ValidationErrorMessage({
|
|
18
20
|
id: constraintId,
|
|
19
|
-
constraint: error.constraints[constraintId],
|
|
21
|
+
constraint: error.constraints?.[constraintId],
|
|
20
22
|
});
|
|
21
23
|
return validationErrorMessage;
|
|
22
24
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atls/nestjs-connectrpc-errors",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -22,32 +22,31 @@
|
|
|
22
22
|
"proto:generate": "buf generate integration/proto"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@atls/core-errors": "
|
|
26
|
-
"@atls/guard-clause": "
|
|
27
|
-
"@atls/protobuf-rpc": "
|
|
25
|
+
"@atls/core-errors": "0.0.4",
|
|
26
|
+
"@atls/guard-clause": "0.0.1",
|
|
27
|
+
"@atls/protobuf-rpc": "0.0.5"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@atls/nestjs-connectrpc": "0.0.
|
|
30
|
+
"@atls/nestjs-connectrpc": "0.0.5",
|
|
31
31
|
"@atls/nestjs-validation": "0.0.1",
|
|
32
|
-
"@
|
|
33
|
-
"@bufbuild/
|
|
34
|
-
"@bufbuild/
|
|
35
|
-
"@
|
|
36
|
-
"@connectrpc/connect
|
|
37
|
-
"@connectrpc/
|
|
38
|
-
"@
|
|
39
|
-
"@nestjs/common": "
|
|
40
|
-
"@nestjs/core": "
|
|
41
|
-
"@nestjs/microservices": "
|
|
42
|
-
"@nestjs/platform-express": "
|
|
43
|
-
"@nestjs/testing": "
|
|
32
|
+
"@atls/protoc-gen-interfaces": "0.0.7",
|
|
33
|
+
"@bufbuild/buf": "1.51.0",
|
|
34
|
+
"@bufbuild/protobuf": "1.10.0",
|
|
35
|
+
"@bufbuild/protoc-gen-es": "1.10.0",
|
|
36
|
+
"@connectrpc/connect": "1.6.1",
|
|
37
|
+
"@connectrpc/connect-node": "1.6.1",
|
|
38
|
+
"@connectrpc/protoc-gen-connect-es": "1.6.1",
|
|
39
|
+
"@nestjs/common": "10.4.15",
|
|
40
|
+
"@nestjs/core": "10.4.15",
|
|
41
|
+
"@nestjs/microservices": "10.4.15",
|
|
42
|
+
"@nestjs/platform-express": "10.4.15",
|
|
43
|
+
"@nestjs/testing": "10.4.15",
|
|
44
44
|
"@types/node": "22.5.5",
|
|
45
|
-
"class-transformer": "
|
|
46
|
-
"class-validator": "
|
|
47
|
-
"get-port": "
|
|
45
|
+
"class-transformer": "0.5.1",
|
|
46
|
+
"class-validator": "0.14.1",
|
|
47
|
+
"get-port": "7.1.0",
|
|
48
48
|
"reflect-metadata": "^0.2.2",
|
|
49
|
-
"rxjs": "
|
|
50
|
-
"supertest": "^6.3.3"
|
|
49
|
+
"rxjs": "7.8.1"
|
|
51
50
|
},
|
|
52
51
|
"peerDependencies": {
|
|
53
52
|
"@atls/nestjs-validation": "0.0.1",
|
/package/dist/exception-factories/{domain.expection-factory.d.ts → domain.exception-factory.d.ts}
RENAMED
|
File without changes
|