@rsdk/grpc.loader 5.0.4 → 5.0.5-next.0
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 +6 -0
- package/dist/options.d.ts +2 -0
- package/dist/options.js +1 -0
- package/dist/options.js.map +1 -1
- package/package.json +2 -2
- package/src/options.ts +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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.0.5-next.0](https://github.com/R-Vision/rsdk/compare/v5.0.4...v5.0.5-next.0) (2024-08-19)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* added channelOptions to client and server ([#279](https://github.com/R-Vision/rsdk/issues/279)) ([#281](https://github.com/R-Vision/rsdk/issues/281)) ([ff07265](https://github.com/R-Vision/rsdk/commit/ff072652e81b6b1f9b9f69645edb667a3e427b0a))
|
|
11
|
+
|
|
6
12
|
## [5.0.4](https://github.com/R-Vision/rsdk/compare/v5.0.4-next.0...v5.0.4) (2024-07-24)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @rsdk/grpc.loader
|
package/dist/options.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ChannelOptions } from '@grpc/grpc-js';
|
|
1
2
|
import type { MicroserviceOptions } from '@nestjs/microservices';
|
|
2
3
|
export interface Package {
|
|
3
4
|
readonly name: string;
|
|
@@ -11,5 +12,6 @@ export interface GrpcServerOptions {
|
|
|
11
12
|
address: string;
|
|
12
13
|
maxRecv?: number;
|
|
13
14
|
maxSend?: number;
|
|
15
|
+
channelOptions?: ChannelOptions;
|
|
14
16
|
}
|
|
15
17
|
export declare const createGrpcOptions: (packages: Package[], options: GrpcServerOptions) => MicroserviceOptions;
|
package/dist/options.js
CHANGED
package/dist/options.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":";;;AAEA,yDAAkD;AA0B3C,MAAM,iBAAiB,GAAG,CAC/B,QAAmB,EACnB,OAA0B,EACL,EAAE;IACvB,OAAO;QACL,SAAS,EAAE,yBAAS,CAAC,IAAI;QAEzB,OAAO,EAAE;YACP,MAAM,EAAE;gBACN,QAAQ;aACT;YAED;;;eAGG;YACH,WAAW,EAAE,mBAAmB;YAEhC;;;;;;;;eAQG;YACH,SAAS,EAAE,EAAE;YAEb,sBAAsB;YACtB,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;YACpC,GAAG,EAAE,OAAO,CAAC,OAAO;YAEpB,cAAc,EAAE;gBACd,iCAAiC,EAAE,OAAO,CAAC,OAAO;gBAClD,8BAA8B,EAAE,OAAO,CAAC,OAAO;gBAC/C,GAAG,OAAO,CAAC,cAAc;aAC1B;SACK;KACT,CAAC;AACJ,CAAC,CAAC;AAxCW,QAAA,iBAAiB,qBAwC5B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdk/grpc.loader",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.5-next.0",
|
|
4
4
|
"description": "Load generated ts code to nestjs and initialize microservice",
|
|
5
5
|
"license": "Apache License 2.0",
|
|
6
6
|
"publishConfig": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@nestjs/microservices": "^10.0.0",
|
|
18
18
|
"reflect-metadata": "^0.1.12 || ^0.2.0"
|
|
19
19
|
},
|
|
20
|
-
"gitHead": "
|
|
20
|
+
"gitHead": "69cc17448de4db247e4fc27ab4d00896271c178a",
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"rxjs": "^7.8.1"
|
|
23
23
|
}
|
package/src/options.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ChannelOptions } from '@grpc/grpc-js';
|
|
1
2
|
import type { MicroserviceOptions } from '@nestjs/microservices';
|
|
2
3
|
import { Transport } from '@nestjs/microservices';
|
|
3
4
|
|
|
@@ -20,6 +21,9 @@ export interface GrpcServerOptions {
|
|
|
20
21
|
|
|
21
22
|
// Max gRPC message size (send)
|
|
22
23
|
maxSend?: number;
|
|
24
|
+
|
|
25
|
+
// Max gRPC message size (send)
|
|
26
|
+
channelOptions?: ChannelOptions;
|
|
23
27
|
}
|
|
24
28
|
|
|
25
29
|
export const createGrpcOptions = (
|
|
@@ -58,6 +62,7 @@ export const createGrpcOptions = (
|
|
|
58
62
|
channelOptions: {
|
|
59
63
|
'grpc.max_receive_message_length': options.maxRecv,
|
|
60
64
|
'grpc.max_send_message_length': options.maxSend,
|
|
65
|
+
...options.channelOptions,
|
|
61
66
|
},
|
|
62
67
|
} as any,
|
|
63
68
|
};
|