@mamindom/common 1.0.99 → 1.0.100

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.
@@ -53,16 +53,20 @@ let GrpcClientFactory = (() => {
53
53
  }
54
54
  clients = new Map();
55
55
  createClient(options) {
56
+ const channelOptions = {
57
+ 'grpc.service_config': JSON.stringify({
58
+ loadBalancingConfig: [{ round_robin: {} }]
59
+ }),
60
+ ...options.channelOptions
61
+ };
56
62
  return microservices_1.ClientProxyFactory.create({
57
63
  transport: microservices_1.Transport.GRPC,
58
64
  options: {
59
65
  ...options,
66
+ channelOptions,
60
67
  loader: {
61
68
  keepCase: false,
62
69
  longs: String,
63
- // enums: String — інакше enum'и приходять як числа (1, 2…), а
64
- // фронт чекає string-keys ('EMAIL'/'UK'/etc.) і CHANNEL_LABEL[1]
65
- // дає undefined. Бекенд-сервіси у grpc.options теж сетять String.
66
70
  enums: String,
67
71
  defaults: true,
68
72
  oneofs: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mamindom/common",
3
- "version": "1.0.99",
3
+ "version": "1.0.100",
4
4
  "type": "commonjs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,7 +21,7 @@
21
21
  "typescript": "^5.9.3"
22
22
  },
23
23
  "dependencies": {
24
- "@mamindom/contracts": "^1.0.129",
24
+ "@mamindom/contracts": "^1.0.130",
25
25
  "@nestjs/common": "^11.1.16",
26
26
  "@nestjs/config": "^4.0.3",
27
27
  "@nestjs/microservices": "^11.1.16"