@rsdk/core 4.0.2 → 4.0.3-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 +12 -0
- package/dist/context.aggregator.js +1 -1
- package/dist/context.aggregator.js.map +1 -1
- package/dist/transport/transport.module.d.ts +1 -0
- package/dist/transport/transport.module.js +11 -5
- package/dist/transport/transport.module.js.map +1 -1
- package/package.json +10 -10
- package/src/context.aggregator.ts +1 -1
- package/src/transport/transport.module.ts +17 -8
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
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.3-next.1](https://github.com/R-Vision/rsdk/compare/v4.0.3-next.0...v4.0.3-next.1) (2023-12-11)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* try fixed di trouble ([b4322de](https://github.com/R-Vision/rsdk/commit/b4322de16ce1f1b220c1d2d064e89231273f171f))
|
|
11
|
+
|
|
12
|
+
## [4.0.3-next.0](https://github.com/R-Vision/rsdk/compare/v4.0.2...v4.0.3-next.0) (2023-12-10)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* dependency-cycle with ProtocolDetector ([3cd70e0](https://github.com/R-Vision/rsdk/commit/3cd70e05b6dd530ea5409d40e753a1bc773b9b2e))
|
|
17
|
+
|
|
6
18
|
## [4.0.2](https://github.com/R-Vision/rsdk/compare/v4.0.2-next.0...v4.0.2) (2023-12-10)
|
|
7
19
|
|
|
8
20
|
**Note:** Version bump only for package @rsdk/core
|
|
@@ -26,7 +26,7 @@ class ContextAggregator {
|
|
|
26
26
|
return this._aggregated;
|
|
27
27
|
}
|
|
28
28
|
const platformRoot = platform_module_1.PlatformModule.forRoot(this.platformContext.extendedOptions);
|
|
29
|
-
const rsdkMetadataProvider = await metadata_1.RsdkMetadataProvider.create([platformRoot],
|
|
29
|
+
const rsdkMetadataProvider = await metadata_1.RsdkMetadataProvider.create([platformRoot], [new config_metadata_extractor_1.ConfigMetadataExtractor()]);
|
|
30
30
|
const rsdkMetadataGlobalModule = await rsdk_metadata_global_module_1.RsdkMetadataGlobalModule.fromProvider(rsdkMetadataProvider);
|
|
31
31
|
const configContext = new config_1.ConfigContext(rsdkMetadataProvider, {
|
|
32
32
|
...this.platformContext.options.config,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.aggregator.js","sourceRoot":"","sources":["../src/context.aggregator.ts"],"names":[],"mappings":";;;AACA,6CAAsD;AAEtD,oDAA8D;AAC9D,yFAAoF;AACpF,6FAAuF;AAEvF,qCAAyC;AAEzC,uDAAmD;AAEnD,MAAa,iBAAiB;IAGR;IAFZ,WAAW,CAAqB;IAExC,YAAoB,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IAAG,CAAC;IAExD;;;;;;;OAOG;IACH,KAAK,CAAC,aAAa;QACjB,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,OAAO,IAAI,CAAC,WAAW,CAAC;QAC1B,CAAC;QACD,MAAM,YAAY,GAAG,gCAAc,CAAC,OAAO,CACzC,IAAI,CAAC,eAAe,CAAC,eAAe,CACrC,CAAC;QACF,MAAM,oBAAoB,GAAG,MAAM,+BAAoB,CAAC,MAAM,CAC5D,CAAC,YAAY,CAAC,EACd,
|
|
1
|
+
{"version":3,"file":"context.aggregator.js","sourceRoot":"","sources":["../src/context.aggregator.ts"],"names":[],"mappings":";;;AACA,6CAAsD;AAEtD,oDAA8D;AAC9D,yFAAoF;AACpF,6FAAuF;AAEvF,qCAAyC;AAEzC,uDAAmD;AAEnD,MAAa,iBAAiB;IAGR;IAFZ,WAAW,CAAqB;IAExC,YAAoB,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IAAG,CAAC;IAExD;;;;;;;OAOG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,IAAI,CAAC,aAAa,EAAE,CAAC;QAE5C,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAhED,8CAgEC"}
|
|
@@ -3,6 +3,7 @@ import type { PlatformExtendedOptions } from '../types';
|
|
|
3
3
|
export declare class PlatformTransportModule {
|
|
4
4
|
static forOptions(options: PlatformExtendedOptions): DynamicModule;
|
|
5
5
|
private static getTransportModules;
|
|
6
|
+
private static initProtocolDetector;
|
|
6
7
|
private static initMetrics;
|
|
7
8
|
private static initHealthchecks;
|
|
8
9
|
private static initExceptionsHandling;
|
|
@@ -11,12 +11,23 @@ class PlatformTransportModule {
|
|
|
11
11
|
static forOptions(options) {
|
|
12
12
|
return {
|
|
13
13
|
imports: [
|
|
14
|
+
PlatformTransportModule.initProtocolDetector(options),
|
|
14
15
|
PlatformTransportModule.initHealthchecks(options),
|
|
15
16
|
PlatformTransportModule.initMetrics(options),
|
|
16
17
|
PlatformTransportModule.initExceptionsHandling(options),
|
|
17
18
|
...PlatformTransportModule.getTransportModules(options),
|
|
18
19
|
],
|
|
19
20
|
module: PlatformTransportModule,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
static getTransportModules(options) {
|
|
24
|
+
return (options?.transports?.flatMap?.((transport) => {
|
|
25
|
+
return transport.modules?.() ?? [];
|
|
26
|
+
}) ?? []);
|
|
27
|
+
}
|
|
28
|
+
static initProtocolDetector(options) {
|
|
29
|
+
return {
|
|
30
|
+
module: PlatformTransportModule,
|
|
20
31
|
providers: [
|
|
21
32
|
{
|
|
22
33
|
provide: protocol_detector_1.ProtocolDetector,
|
|
@@ -27,11 +38,6 @@ class PlatformTransportModule {
|
|
|
27
38
|
exports: [protocol_detector_1.ProtocolDetector],
|
|
28
39
|
};
|
|
29
40
|
}
|
|
30
|
-
static getTransportModules(options) {
|
|
31
|
-
return (options?.transports?.flatMap?.((transport) => {
|
|
32
|
-
return transport.modules?.() ?? [];
|
|
33
|
-
}) ?? []);
|
|
34
|
-
}
|
|
35
41
|
static initMetrics(options) {
|
|
36
42
|
const transports = options.transports ?? [];
|
|
37
43
|
return metrics_1.MetricsModule.forRoot({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.module.js","sourceRoot":"","sources":["../../src/transport/transport.module.ts"],"names":[],"mappings":";;;AAEA,mCAAiC;AAGjC,gEAAgE;AAChE,2DAAuD;AACvD,wCAA2C;AAE3C,oCAA8C;AAE9C,2DAAuD;AAEvD,MAAa,uBAAuB;IAClC,MAAM,CAAC,UAAU,CAAC,OAAgC;QAChD,OAAO;YACL,OAAO,EAAE;gBACP,uBAAuB,CAAC,gBAAgB,CAAC,OAAO,CAAC;gBACjD,uBAAuB,CAAC,WAAW,CAAC,OAAO,CAAC;gBAC5C,uBAAuB,CAAC,sBAAsB,CAAC,OAAO,CAAC;gBACvD,GAAG,uBAAuB,CAAC,mBAAmB,CAAC,OAAO,CAAC;aACxD;YACD,MAAM,EAAE,uBAAuB;
|
|
1
|
+
{"version":3,"file":"transport.module.js","sourceRoot":"","sources":["../../src/transport/transport.module.ts"],"names":[],"mappings":";;;AAEA,mCAAiC;AAGjC,gEAAgE;AAChE,2DAAuD;AACvD,wCAA2C;AAE3C,oCAA8C;AAE9C,2DAAuD;AAEvD,MAAa,uBAAuB;IAClC,MAAM,CAAC,UAAU,CAAC,OAAgC;QAChD,OAAO;YACL,OAAO,EAAE;gBACP,uBAAuB,CAAC,oBAAoB,CAAC,OAAO,CAAC;gBACrD,uBAAuB,CAAC,gBAAgB,CAAC,OAAO,CAAC;gBACjD,uBAAuB,CAAC,WAAW,CAAC,OAAO,CAAC;gBAC5C,uBAAuB,CAAC,sBAAsB,CAAC,OAAO,CAAC;gBACvD,GAAG,uBAAuB,CAAC,mBAAmB,CAAC,OAAO,CAAC;aACxD;YACD,MAAM,EAAE,uBAAuB;SAChC,CAAC;IACJ,CAAC;IAEO,MAAM,CAAC,mBAAmB,CAChC,OAAgC;QAEhC,OAAO,CACL,OAAO,EAAE,UAAU,EAAE,OAAO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license": "Apache License 2.0",
|
|
6
6
|
"publishConfig": {
|
|
@@ -32,18 +32,18 @@
|
|
|
32
32
|
"@nestjs/common": "^10.0.0",
|
|
33
33
|
"@nestjs/core": "^10.0.0",
|
|
34
34
|
"@nestjs/microservices": "^10.0.0",
|
|
35
|
-
"@rsdk/autodoc.protocol": "^4.0.
|
|
36
|
-
"@rsdk/common": "^4.0.
|
|
37
|
-
"@rsdk/common.nestjs": "^4.0.
|
|
38
|
-
"@rsdk/common.node": "^4.0.
|
|
39
|
-
"@rsdk/decorators": "^4.0.
|
|
40
|
-
"@rsdk/logging": "^4.0.
|
|
41
|
-
"@rsdk/metadata": "^4.0.
|
|
42
|
-
"@rsdk/nest-tools": "^4.0.
|
|
35
|
+
"@rsdk/autodoc.protocol": "^4.0.3-next.1",
|
|
36
|
+
"@rsdk/common": "^4.0.3-next.1",
|
|
37
|
+
"@rsdk/common.nestjs": "^4.0.3-next.1",
|
|
38
|
+
"@rsdk/common.node": "^4.0.3-next.1",
|
|
39
|
+
"@rsdk/decorators": "^4.0.3-next.1",
|
|
40
|
+
"@rsdk/logging": "^4.0.3-next.1",
|
|
41
|
+
"@rsdk/metadata": "^4.0.3-next.1",
|
|
42
|
+
"@rsdk/nest-tools": "^4.0.3-next.1",
|
|
43
43
|
"axios": "^1.1.3",
|
|
44
44
|
"pino": "^8.16.1",
|
|
45
45
|
"reflect-metadata": "^0.1.13",
|
|
46
46
|
"rxjs": "^7.0.0"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "3c6575036f689aac364422a6f5494271b1616f62"
|
|
49
49
|
}
|
|
@@ -31,7 +31,7 @@ export class ContextAggregator {
|
|
|
31
31
|
);
|
|
32
32
|
const rsdkMetadataProvider = await RsdkMetadataProvider.create(
|
|
33
33
|
[platformRoot],
|
|
34
|
-
|
|
34
|
+
[new ConfigMetadataExtractor()],
|
|
35
35
|
);
|
|
36
36
|
const rsdkMetadataGlobalModule =
|
|
37
37
|
await RsdkMetadataGlobalModule.fromProvider(rsdkMetadataProvider);
|
|
@@ -15,20 +15,13 @@ export class PlatformTransportModule {
|
|
|
15
15
|
static forOptions(options: PlatformExtendedOptions): DynamicModule {
|
|
16
16
|
return {
|
|
17
17
|
imports: [
|
|
18
|
+
PlatformTransportModule.initProtocolDetector(options),
|
|
18
19
|
PlatformTransportModule.initHealthchecks(options),
|
|
19
20
|
PlatformTransportModule.initMetrics(options),
|
|
20
21
|
PlatformTransportModule.initExceptionsHandling(options),
|
|
21
22
|
...PlatformTransportModule.getTransportModules(options),
|
|
22
23
|
],
|
|
23
24
|
module: PlatformTransportModule,
|
|
24
|
-
providers: [
|
|
25
|
-
{
|
|
26
|
-
provide: ProtocolDetector,
|
|
27
|
-
useFactory: () => new ProtocolDetector(options.transports ?? []),
|
|
28
|
-
},
|
|
29
|
-
],
|
|
30
|
-
global: true,
|
|
31
|
-
exports: [ProtocolDetector],
|
|
32
25
|
};
|
|
33
26
|
}
|
|
34
27
|
|
|
@@ -42,6 +35,22 @@ export class PlatformTransportModule {
|
|
|
42
35
|
);
|
|
43
36
|
}
|
|
44
37
|
|
|
38
|
+
private static initProtocolDetector(
|
|
39
|
+
options: PlatformExtendedOptions,
|
|
40
|
+
): DynamicModule {
|
|
41
|
+
return {
|
|
42
|
+
module: PlatformTransportModule,
|
|
43
|
+
providers: [
|
|
44
|
+
{
|
|
45
|
+
provide: ProtocolDetector,
|
|
46
|
+
useFactory: () => new ProtocolDetector(options.transports ?? []),
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
global: true,
|
|
50
|
+
exports: [ProtocolDetector],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
45
54
|
private static initMetrics(options: PlatformExtendedOptions): DynamicModule {
|
|
46
55
|
const transports = options.transports ?? ([] as any[]);
|
|
47
56
|
|