@volontariapp/contracts-nest 3.1.12 → 3.1.14
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 +18 -0
- package/README.md +12 -12
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.1.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- README bump
|
|
8
|
+
|
|
9
|
+
- Updated dependencies []:
|
|
10
|
+
- @volontariapp/logger@0.2.7
|
|
11
|
+
|
|
12
|
+
## 3.1.13
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- README bump
|
|
17
|
+
|
|
18
|
+
- Updated dependencies []:
|
|
19
|
+
- @volontariapp/logger@0.2.6
|
|
20
|
+
|
|
3
21
|
## 3.1.12
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
NestJS-specific integration for Volontariapp gRPC contracts.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Purpose
|
|
6
6
|
|
|
7
7
|
This package provides the integration layer for NestJS microservices. It contains:
|
|
8
8
|
- **gRPC Helpers**: `getGrpcOptions` and configuration utilities.
|
|
@@ -10,11 +10,11 @@ This package provides the integration layer for NestJS microservices. It contain
|
|
|
10
10
|
- **Service Clients**: Interfaces for gRPC clients using RxJS.
|
|
11
11
|
- **Proto Files**: Contains the original `.proto` definition files in the `proto/` directory.
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## ️ Compatibility
|
|
14
14
|
|
|
15
15
|
This package depends on `@nestjs/microservices` and `rxjs`. It is **not** compatible with front-end environments (React/React Native). For front-end usage, use `@volontariapp/contracts`.
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## Usage
|
|
18
18
|
|
|
19
19
|
### Microservice Setup
|
|
20
20
|
```typescript
|
|
@@ -22,10 +22,10 @@ import { NestFactory } from '@nestjs/core';
|
|
|
22
22
|
import { GRPC_SERVICES, getGrpcOptions } from '@volontariapp/contracts-nest';
|
|
23
23
|
|
|
24
24
|
async function bootstrap() {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
const app = await NestFactory.createMicroservice(AppModule, {
|
|
26
|
+
...getGrpcOptions(GRPC_SERVICES.USER, process.env.MS_USER_URL)
|
|
27
|
+
});
|
|
28
|
+
await app.listen();
|
|
29
29
|
}
|
|
30
30
|
```
|
|
31
31
|
|
|
@@ -37,13 +37,13 @@ import { USER_SERVICE_NAME, USER_GRPC_METHODS } from '@volontariapp/contracts-ne
|
|
|
37
37
|
|
|
38
38
|
@Controller()
|
|
39
39
|
export class UserQueryController {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
@GrpcMethod(USER_SERVICE_NAME, USER_GRPC_METHODS.GET_USER)
|
|
41
|
+
async getUser(query: UserQuery) {
|
|
42
|
+
// ...
|
|
43
|
+
}
|
|
44
44
|
}
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
##
|
|
47
|
+
## Maintenance
|
|
48
48
|
|
|
49
49
|
The source code in `src/` is automatically generated by the CI. Do **not** edit files inside `src/` manually, except for `grpc.helpers.ts`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volontariapp/contracts-nest",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.14",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"rxjs": "^7.0.0"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@volontariapp/logger": "0.2.
|
|
54
|
+
"@volontariapp/logger": "0.2.7",
|
|
55
55
|
"protobufjs": "^7.5.8"
|
|
56
56
|
}
|
|
57
57
|
}
|