@rsdk/grpc.clients 4.0.0-next.0 → 4.0.0-next.10
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 +44 -0
- package/dist/decorators/inject-client-factory.decorator.js +1 -2
- package/dist/decorators/inject-client-factory.decorator.js.map +1 -1
- package/dist/decorators/inject-client.decorator.js +1 -2
- package/dist/decorators/inject-client.decorator.js.map +1 -1
- package/dist/exceptions/no-channel.exception.js +2 -1
- package/dist/exceptions/no-channel.exception.js.map +1 -1
- package/dist/exceptions/registration.exception.js +2 -1
- package/dist/exceptions/registration.exception.js.map +1 -1
- package/dist/repository/grpc-client-repository.module.js +2 -1
- package/dist/repository/grpc-client-repository.module.js.map +1 -1
- package/package.json +17 -13
- package/src/decorators/inject-client-factory.decorator.ts +4 -2
- package/src/decorators/inject-client.decorator.ts +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,50 @@
|
|
|
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
|
+
## [4.0.0-next.10](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.9...v4.0.0-next.10) (2023-11-29)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @rsdk/grpc.clients
|
|
9
|
+
|
|
10
|
+
## [4.0.0-next.9](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.8...v4.0.0-next.9) (2023-11-29)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @rsdk/grpc.clients
|
|
13
|
+
|
|
14
|
+
## [4.0.0-next.8](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.7...v4.0.0-next.8) (2023-11-29)
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* Kafka batch producer ([#150](https://github.com/R-Vision/rsdk/issues/150)) ([2faa2f4](https://github.com/R-Vision/rsdk/commit/2faa2f41ca0dbb6d8a92cbf0ab20cf5cefeaf4e9))
|
|
19
|
+
|
|
20
|
+
## [4.0.0-next.7](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.6...v4.0.0-next.7) (2023-11-21)
|
|
21
|
+
|
|
22
|
+
**Note:** Version bump only for package @rsdk/grpc.clients
|
|
23
|
+
|
|
24
|
+
## [4.0.0-next.6](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.5...v4.0.0-next.6) (2023-11-21)
|
|
25
|
+
|
|
26
|
+
**Note:** Version bump only for package @rsdk/grpc.clients
|
|
27
|
+
|
|
28
|
+
## [4.0.0-next.5](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.4...v4.0.0-next.5) (2023-11-13)
|
|
29
|
+
|
|
30
|
+
**Note:** Version bump only for package @rsdk/grpc.clients
|
|
31
|
+
|
|
32
|
+
## [4.0.0-next.4](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.3...v4.0.0-next.4) (2023-11-12)
|
|
33
|
+
|
|
34
|
+
**Note:** Version bump only for package @rsdk/grpc.clients
|
|
35
|
+
|
|
36
|
+
## [4.0.0-next.3](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.2...v4.0.0-next.3) (2023-11-12)
|
|
37
|
+
|
|
38
|
+
### Bug Fixes
|
|
39
|
+
|
|
40
|
+
* all yarn peers dependency issues ([e0db9ef](https://github.com/R-Vision/rsdk/commit/e0db9ef1ab8a4df4e1f8ff6f6a9e3728f497549b))
|
|
41
|
+
|
|
42
|
+
## [4.0.0-next.2](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.1...v4.0.0-next.2) (2023-11-10)
|
|
43
|
+
|
|
44
|
+
**Note:** Version bump only for package @rsdk/grpc.clients
|
|
45
|
+
|
|
46
|
+
## [4.0.0-next.1](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.0...v4.0.0-next.1) (2023-11-10)
|
|
47
|
+
|
|
48
|
+
**Note:** Version bump only for package @rsdk/grpc.clients
|
|
49
|
+
|
|
6
50
|
## [4.0.0-next.0](https://github.com/R-Vision/rsdk/compare/v3.6.2-next.0...v4.0.0-next.0) (2023-10-26)
|
|
7
51
|
|
|
8
52
|
**Note:** Version bump only for package @rsdk/grpc.clients
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InjectGrpcClientsFactory = void 0;
|
|
4
4
|
const common_1 = require("@nestjs/common");
|
|
5
|
-
const constants_1 = require("@rsdk/core/dist/rsdk-metadata/constants");
|
|
6
5
|
const metadata_1 = require("@rsdk/metadata");
|
|
7
6
|
const module_generator_1 = require("../module.generator");
|
|
8
7
|
const token_factories_1 = require("../token.factories");
|
|
@@ -16,7 +15,7 @@ const token_factories_1 = require("../token.factories");
|
|
|
16
15
|
const InjectGrpcClientsFactory = (definition) => {
|
|
17
16
|
return (target, propertyKey, parameterIndex) => {
|
|
18
17
|
(0, common_1.Inject)((0, token_factories_1.getFactoryToken)(definition))(target, propertyKey, parameterIndex);
|
|
19
|
-
metadata_1.RsdkMetadata.setWithScope(target,
|
|
18
|
+
metadata_1.RsdkMetadata.setWithScope(target, metadata_1.PLATFORM_RAW_GLOBAL_METADATA_SCOPE, definition.fullName, module_generator_1.ModuleGenerator.createClientFactoryModuleDefinition(definition), true);
|
|
20
19
|
};
|
|
21
20
|
};
|
|
22
21
|
exports.InjectGrpcClientsFactory = InjectGrpcClientsFactory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inject-client-factory.decorator.js","sourceRoot":"","sources":["../../src/decorators/inject-client-factory.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AACxC,
|
|
1
|
+
{"version":3,"file":"inject-client-factory.decorator.js","sourceRoot":"","sources":["../../src/decorators/inject-client-factory.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AACxC,6CAGwB;AAGxB,0DAAsD;AACtD,wDAAqD;AAWrD;;;;;;GAMG;AACI,MAAM,wBAAwB,GAAG,CACtC,UAAmC,EACf,EAAE;IACtB,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,EAAE;QAC7C,IAAA,eAAM,EAAC,IAAA,iCAAe,EAAC,UAAU,CAAC,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;QACzE,uBAAY,CAAC,YAAY,CACvB,MAAM,EACN,6CAAkC,EAClC,UAAU,CAAC,QAAQ,EACnB,kCAAe,CAAC,mCAAmC,CAAC,UAAU,CAAC,EAC/D,IAAI,CACL,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC;AAbW,QAAA,wBAAwB,4BAanC"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InjectGrpcClient = void 0;
|
|
4
4
|
const common_1 = require("@nestjs/common");
|
|
5
|
-
const constants_1 = require("@rsdk/core/dist/rsdk-metadata/constants");
|
|
6
5
|
const metadata_1 = require("@rsdk/metadata");
|
|
7
6
|
const module_generator_1 = require("../module.generator");
|
|
8
7
|
const token_factories_1 = require("../token.factories");
|
|
@@ -17,7 +16,7 @@ const token_factories_1 = require("../token.factories");
|
|
|
17
16
|
const InjectGrpcClient = (grpcServerDeclarationValue) => {
|
|
18
17
|
return (target, propertyKey, parameterIndex) => {
|
|
19
18
|
(0, common_1.Inject)((0, token_factories_1.getClientToken)(grpcServerDeclarationValue.definition))(target, propertyKey, parameterIndex);
|
|
20
|
-
metadata_1.RsdkMetadata.setWithScope(target,
|
|
19
|
+
metadata_1.RsdkMetadata.setWithScope(target, metadata_1.PLATFORM_RAW_GLOBAL_METADATA_SCOPE, `${grpcServerDeclarationValue.serverName}.${grpcServerDeclarationValue.serviceName}`, module_generator_1.ModuleGenerator.createClientModuleDefinition(grpcServerDeclarationValue.serverName, grpcServerDeclarationValue.definition), true);
|
|
21
20
|
};
|
|
22
21
|
};
|
|
23
22
|
exports.InjectGrpcClient = InjectGrpcClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inject-client.decorator.js","sourceRoot":"","sources":["../../src/decorators/inject-client.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AACxC,
|
|
1
|
+
{"version":3,"file":"inject-client.decorator.js","sourceRoot":"","sources":["../../src/decorators/inject-client.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AACxC,6CAGwB;AAExB,0DAAsD;AAEtD,wDAAoD;AAEpD;;;;;;;GAOG;AACI,MAAM,gBAAgB,GAAG,CAI9B,0BAGC,EACmB,EAAE;IACtB,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,EAAE;QAC7C,IAAA,eAAM,EAAC,IAAA,gCAAc,EAAC,0BAA0B,CAAC,UAAU,CAAC,CAAC,CAC3D,MAAM,EACN,WAAW,EACX,cAAc,CACf,CAAC;QACF,uBAAY,CAAC,YAAY,CACvB,MAAM,EACN,6CAAkC,EAClC,GAAG,0BAA0B,CAAC,UAAU,IAAI,0BAA0B,CAAC,WAAW,EAAE,EACpF,kCAAe,CAAC,4BAA4B,CAC1C,0BAA0B,CAAC,UAAU,EACrC,0BAA0B,CAAC,UAAU,CACtC,EACD,IAAI,CACL,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC;AA1BW,QAAA,gBAAgB,oBA0B3B"}
|
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.NoChannelException = void 0;
|
|
13
13
|
const common_1 = require("@rsdk/common");
|
|
14
14
|
const core_1 = require("@rsdk/core");
|
|
15
|
-
let NoChannelException =
|
|
15
|
+
let NoChannelException = class NoChannelException extends core_1.BootstrapException {
|
|
16
16
|
constructor(serverName) {
|
|
17
17
|
super((0, common_1.text) `
|
|
18
18
|
GRPC server ${serverName} was not registered and thus
|
|
@@ -20,6 +20,7 @@ let NoChannelException = exports.NoChannelException = class NoChannelException e
|
|
|
20
20
|
`);
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
+
exports.NoChannelException = NoChannelException;
|
|
23
24
|
exports.NoChannelException = NoChannelException = __decorate([
|
|
24
25
|
(0, core_1.Exception)({
|
|
25
26
|
description: (0, common_1.text) `
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-channel.exception.js","sourceRoot":"","sources":["../../src/exceptions/no-channel.exception.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAAoC;AACpC,qCAA2D;AAOpD,IAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"no-channel.exception.js","sourceRoot":"","sources":["../../src/exceptions/no-channel.exception.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAAoC;AACpC,qCAA2D;AAOpD,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,yBAAkB;IACxD,YAAY,UAAkB;QAC5B,KAAK,CAAC,IAAA,aAAI,EAAA;oBACM,UAAU;;KAEzB,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAPY,gDAAkB;6BAAlB,kBAAkB;IAL9B,IAAA,gBAAS,EAAC;QACT,WAAW,EAAE,IAAA,aAAI,EAAA;;GAEhB;KACF,CAAC;;GACW,kBAAkB,CAO9B"}
|
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.GrpcClientRegistrationException = void 0;
|
|
13
13
|
const common_1 = require("@rsdk/common");
|
|
14
14
|
const core_1 = require("@rsdk/core");
|
|
15
|
-
let GrpcClientRegistrationException =
|
|
15
|
+
let GrpcClientRegistrationException = class GrpcClientRegistrationException extends core_1.BootstrapException {
|
|
16
16
|
constructor(definition, registeredServer, duplicateServer) {
|
|
17
17
|
super((0, common_1.text) `
|
|
18
18
|
GrpcService ${definition.fullName.toString()} can't be bound to
|
|
@@ -21,6 +21,7 @@ let GrpcClientRegistrationException = exports.GrpcClientRegistrationException =
|
|
|
21
21
|
`);
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
+
exports.GrpcClientRegistrationException = GrpcClientRegistrationException;
|
|
24
25
|
exports.GrpcClientRegistrationException = GrpcClientRegistrationException = __decorate([
|
|
25
26
|
(0, core_1.Exception)({
|
|
26
27
|
description: (0, common_1.text) `
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registration.exception.js","sourceRoot":"","sources":["../../src/exceptions/registration.exception.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAAoC;AACpC,qCAA2D;AAUpD,IAAM,+BAA+B,
|
|
1
|
+
{"version":3,"file":"registration.exception.js","sourceRoot":"","sources":["../../src/exceptions/registration.exception.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAAoC;AACpC,qCAA2D;AAUpD,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,yBAAkB;IACrE,YACE,UAAmC,EACnC,gBAAwB,EACxB,eAAuB;QAEvB,KAAK,CAAC,IAAA,aAAI,EAAA;oBACM,UAAU,CAAC,QAAQ,CAAC,QAAQ,EAAE;eACnC,eAAe;eACf,gBAAgB;KAC1B,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAZY,0EAA+B;0CAA/B,+BAA+B;IAP3C,IAAA,gBAAS,EAAC;QACT,WAAW,EAAE,IAAA,aAAI,EAAA;;;;GAIhB;KACF,CAAC;;GACW,+BAA+B,CAY3C"}
|
|
@@ -13,8 +13,9 @@ const grpc_client_repository_1 = require("./grpc-client.repository");
|
|
|
13
13
|
* Вынесено в отдельный модуль для того чтобы не было дублирования внутри DI
|
|
14
14
|
* Но при этом чтобы не надо было делать `forRoot` в корне приложения
|
|
15
15
|
*/
|
|
16
|
-
let GrpcClientRepositoryModule =
|
|
16
|
+
let GrpcClientRepositoryModule = class GrpcClientRepositoryModule {
|
|
17
17
|
};
|
|
18
|
+
exports.GrpcClientRepositoryModule = GrpcClientRepositoryModule;
|
|
18
19
|
exports.GrpcClientRepositoryModule = GrpcClientRepositoryModule = __decorate([
|
|
19
20
|
(0, common_1.Module)({
|
|
20
21
|
providers: [grpc_client_repository_1.GrpcClientRepository],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grpc-client-repository.module.js","sourceRoot":"","sources":["../../src/repository/grpc-client-repository.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AAExC,qEAAgE;AAEhE;;;GAGG;AAKI,IAAM,0BAA0B,
|
|
1
|
+
{"version":3,"file":"grpc-client-repository.module.js","sourceRoot":"","sources":["../../src/repository/grpc-client-repository.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AAExC,qEAAgE;AAEhE;;;GAGG;AAKI,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;CAAG,CAAA;AAA7B,gEAA0B;qCAA1B,0BAA0B;IAJtC,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,6CAAoB,CAAC;QACjC,OAAO,EAAE,CAAC,6CAAoB,CAAC;KAChC,CAAC;GACW,0BAA0B,CAAG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdk/grpc.clients",
|
|
3
|
-
"version": "4.0.0-next.
|
|
3
|
+
"version": "4.0.0-next.10",
|
|
4
4
|
"description": "Grpc clients infrastructure",
|
|
5
5
|
"license": "Apache License 2.0",
|
|
6
6
|
"publishConfig": {
|
|
@@ -15,18 +15,22 @@
|
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@grpc/grpc-js": "^1.8.7",
|
|
18
|
-
"@nestjs/common": "^10.
|
|
19
|
-
"@nestjs/
|
|
20
|
-
"@
|
|
21
|
-
"@rsdk/
|
|
22
|
-
"@rsdk/
|
|
23
|
-
"@rsdk/
|
|
24
|
-
"@rsdk/
|
|
25
|
-
"@rsdk/
|
|
26
|
-
"@rsdk/
|
|
18
|
+
"@nestjs/common": "^10.0.0",
|
|
19
|
+
"@nestjs/core": "^10.0.0",
|
|
20
|
+
"@nestjs/microservices": "^10.0.0",
|
|
21
|
+
"@rsdk/autodoc.protocol": "^4.0.0-next.10",
|
|
22
|
+
"@rsdk/builtin-contract": "^4.0.0-next.10",
|
|
23
|
+
"@rsdk/common": "^4.0.0-next.10",
|
|
24
|
+
"@rsdk/core": "^4.0.0-next.10",
|
|
25
|
+
"@rsdk/grpc.common": "^4.0.0-next.10",
|
|
26
|
+
"@rsdk/logging": "^4.0.0-next.10",
|
|
27
|
+
"@rsdk/metadata": "^4.0.0-next.10",
|
|
27
28
|
"nice-grpc": "^2.1.4",
|
|
28
|
-
"
|
|
29
|
-
"rxjs": "^7.
|
|
29
|
+
"reflect-metadata": "^0.1.13",
|
|
30
|
+
"rxjs": "^7.8.1"
|
|
30
31
|
},
|
|
31
|
-
"
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"nice-grpc-opentelemetry": "^0.1.2"
|
|
34
|
+
},
|
|
35
|
+
"gitHead": "c41d4da9aa0318d5e6417514c763618ce924f9b7"
|
|
32
36
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Inject } from '@nestjs/common';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
PLATFORM_RAW_GLOBAL_METADATA_SCOPE,
|
|
4
|
+
RsdkMetadata,
|
|
5
|
+
} from '@rsdk/metadata';
|
|
4
6
|
import type { CompatServiceDefinition } from 'nice-grpc/lib/service-definitions';
|
|
5
7
|
|
|
6
8
|
import { ModuleGenerator } from '../module.generator';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Inject } from '@nestjs/common';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
PLATFORM_RAW_GLOBAL_METADATA_SCOPE,
|
|
4
|
+
RsdkMetadata,
|
|
5
|
+
} from '@rsdk/metadata';
|
|
4
6
|
|
|
5
7
|
import { ModuleGenerator } from '../module.generator';
|
|
6
8
|
import type { GrpcServerDeclarationValue } from '../servers/types';
|