@rsdk/grpc.server 5.3.0 → 5.4.0-next.1
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
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [5.4.0-next.1](https://github.com/R-Vision/rsdk/compare/v5.4.0-next.0...v5.4.0-next.1) (2024-11-08)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @rsdk/grpc.server
|
|
9
|
+
|
|
10
|
+
## [5.4.0-next.0](https://github.com/R-Vision/rsdk/compare/v5.3.0...v5.4.0-next.0) (2024-11-08)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* log rpc response path ([c463237](https://github.com/R-Vision/rsdk/commit/c46323794cd2441440578e4773534951d3d38c13))
|
|
15
|
+
|
|
6
16
|
## [5.3.0](https://github.com/R-Vision/rsdk/compare/v5.3.0-next.4...v5.3.0) (2024-11-08)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @rsdk/grpc.server
|
|
@@ -42,13 +42,14 @@ let GrpcLoggerInterceptor = class GrpcLoggerInterceptor {
|
|
|
42
42
|
data: rpc.getData(),
|
|
43
43
|
ctx: serializedCtx,
|
|
44
44
|
};
|
|
45
|
-
|
|
45
|
+
const path = this.getRpcPath(context);
|
|
46
|
+
this.logger.trace(`received rpc ${path || 'request'} `, {
|
|
46
47
|
request: requestForLog,
|
|
47
48
|
timestamp: startDate,
|
|
48
49
|
});
|
|
49
50
|
return next.handle().pipe((0, rxjs_1.catchError)((error) => {
|
|
50
51
|
const endDate = Date.now();
|
|
51
|
-
this.logger.trace(
|
|
52
|
+
this.logger.trace(`handled rpc ${path || 'request'} with error`, {
|
|
52
53
|
request: requestForLog,
|
|
53
54
|
startDate,
|
|
54
55
|
endDate,
|
|
@@ -58,7 +59,7 @@ let GrpcLoggerInterceptor = class GrpcLoggerInterceptor {
|
|
|
58
59
|
return (0, rxjs_1.throwError)(() => error);
|
|
59
60
|
}), (0, rxjs_1.tap)((response) => {
|
|
60
61
|
const endDate = Date.now();
|
|
61
|
-
this.logger.trace(
|
|
62
|
+
this.logger.trace(`handled rpc ${path || 'request'}`, {
|
|
62
63
|
request: requestForLog,
|
|
63
64
|
startDate,
|
|
64
65
|
endDate,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grpc-logger.interceptor.js","sourceRoot":"","sources":["../src/grpc-logger.interceptor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAKA,qCAA4D;AAG5D,+BAAmD;AAEnD,+CAA2C;AAE3C,IAAa,qBAAqB,GAAlC,MAAa,qBAAqB;IAEe;IACrC;IACA;IAHV,YAC+C,MAAe,EACpD,UAAsB,EACtB,QAA0B;QAFW,WAAM,GAAN,MAAM,CAAS;QACpD,eAAU,GAAV,UAAU,CAAY;QACtB,aAAQ,GAAR,QAAQ,CAAkB;IACjC,CAAC;IAEJ,SAAS,CACP,OAAyB,EACzB,IAAsB;QAEtB,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC;YACpC,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;QACvB,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QACpD,MAAM,KAAK,GAAG,QAAQ,KAAK,MAAM,CAAC;QAClC,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;QACvB,CAAC;QAED,MAAM,GAAG,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;QAElC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC7B,MAAM,UAAU,GAAG,GAAG,CAAC,UAAU,EAAE,CAAC;QACpC,MAAM,aAA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,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;YAC7C,CAAC;YACD,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;CACF,CAAA;AA3EY,sDAAqB;gCAArB,qBAAqB;IAE7B,WAAA,IAAA,mBAAY,EAAC,qBAAqB,CAAC,CAAA;6CAChB,wBAAU;QACZ,uBAAgB;GAJzB,qBAAqB,CA2EjC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdk/grpc.server",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.0-next.1",
|
|
4
4
|
"description": "Grpc transport for platform, clients and common grpc stuff",
|
|
5
5
|
"license": "Apache License 2.0",
|
|
6
6
|
"publishConfig": {
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@bufbuild/protobuf": "^1.4.2"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "de7a6d46a28e5d5e90eb9ba36cea1ee48891505a"
|
|
32
32
|
}
|
|
@@ -41,19 +41,18 @@ export class GrpcLoggerInterceptor implements NestInterceptor {
|
|
|
41
41
|
ctx: serializedCtx,
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
this.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
);
|
|
44
|
+
const path = this.getRpcPath(context);
|
|
45
|
+
|
|
46
|
+
this.logger.trace(`received rpc ${path || 'request'} `, {
|
|
47
|
+
request: requestForLog,
|
|
48
|
+
timestamp: startDate,
|
|
49
|
+
});
|
|
51
50
|
|
|
52
51
|
return next.handle().pipe(
|
|
53
52
|
catchError((error) => {
|
|
54
53
|
const endDate = Date.now();
|
|
55
54
|
|
|
56
|
-
this.logger.trace(
|
|
55
|
+
this.logger.trace(`handled rpc ${path || 'request'} with error`, {
|
|
57
56
|
request: requestForLog,
|
|
58
57
|
startDate,
|
|
59
58
|
endDate,
|
|
@@ -65,7 +64,7 @@ export class GrpcLoggerInterceptor implements NestInterceptor {
|
|
|
65
64
|
tap((response) => {
|
|
66
65
|
const endDate = Date.now();
|
|
67
66
|
|
|
68
|
-
this.logger.trace(
|
|
67
|
+
this.logger.trace(`handled rpc ${path || 'request'}`, {
|
|
69
68
|
request: requestForLog,
|
|
70
69
|
startDate,
|
|
71
70
|
endDate,
|