@rsdk/core 5.7.0-next.6 → 5.7.0-next.8
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/dist/plugin/plugin.module.js.map +1 -1
- package/dist/transport/protocol.detector.d.ts +1 -1
- package/dist/transport/protocol.detector.js +1 -4
- package/dist/transport/protocol.detector.js.map +1 -1
- package/dist/types/plugins.d.ts +1 -1
- package/package.json +7 -7
- package/src/plugin/plugin.module.ts +1 -2
- package/src/transport/protocol.detector.ts +2 -6
- package/src/types/plugins.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.module.js","sourceRoot":"","sources":["../../src/plugin/plugin.module.ts"],"names":[],"mappings":";;;AAKA,MAAa,oBAAoB;IAC/B,MAAM,CAAC,UAAU,CAAC,OAAgC;QAChD,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"plugin.module.js","sourceRoot":"","sources":["../../src/plugin/plugin.module.ts"],"names":[],"mappings":";;;AAKA,MAAa,oBAAoB;IAC/B,MAAM,CAAC,UAAU,CAAC,OAAgC;QAChD,MAAM,OAAO,GAAoC,EAAE,CAAC;QAEpD,2CAA2C;QAC3C,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACpB,KAAK,MAAM,MAAM,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;gBACrC,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;oBACnB,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;gBACpC,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO;YACL,MAAM,EAAE,oBAAoB;YAC5B,OAAO,EAAE,OAAO;SACjB,CAAC;IACJ,CAAC;CACF;AAlBD,oDAkBC"}
|
|
@@ -5,7 +5,7 @@ import type { ITransport } from '../types';
|
|
|
5
5
|
* Mostly used in global enhancers to decide: "to work of not to work"
|
|
6
6
|
*/
|
|
7
7
|
export declare class ProtocolDetector {
|
|
8
|
-
private
|
|
8
|
+
private transports;
|
|
9
9
|
constructor(transports: ITransport[]);
|
|
10
10
|
/**
|
|
11
11
|
* Detects transport's protocol by ArgumentHost (context)
|
|
@@ -24,10 +24,7 @@ class ProtocolDetector {
|
|
|
24
24
|
return this.getProtocol(context) === protocol;
|
|
25
25
|
}
|
|
26
26
|
getTransport(context) {
|
|
27
|
-
|
|
28
|
-
// .findLast() alternative from lodash but faster
|
|
29
|
-
const transports = this.transports.filter((x) => x.matchByContext(context));
|
|
30
|
-
return transports.at(-1);
|
|
27
|
+
return this.transports.findLast((x) => x.matchByContext(context));
|
|
31
28
|
}
|
|
32
29
|
}
|
|
33
30
|
exports.ProtocolDetector = ProtocolDetector;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.detector.js","sourceRoot":"","sources":["../../src/transport/protocol.detector.ts"],"names":[],"mappings":";;;AAIA;;;GAGG;AACH,MAAa,gBAAgB;
|
|
1
|
+
{"version":3,"file":"protocol.detector.js","sourceRoot":"","sources":["../../src/transport/protocol.detector.ts"],"names":[],"mappings":";;;AAIA;;;GAGG;AACH,MAAa,gBAAgB;IACP;IAApB,YAAoB,UAAwB;QAAxB,eAAU,GAAV,UAAU,CAAc;IAAG,CAAC;IAEhD;;OAEG;IACH,WAAW,CAAC,OAAsB;QAChC,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACnD,CAAC;IAED;;;OAGG;IACH,aAAa,CAAC,OAAsB,EAAE,QAAgB;QACpD,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC;IAChD,CAAC;IAEO,YAAY,CAAC,OAAsB;QACzC,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACpE,CAAC;CACF;AArBD,4CAqBC"}
|
package/dist/types/plugins.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export interface PlatformAppPlugin<T extends AppropriateTransports = Appropriate
|
|
|
40
40
|
* applied after all core modules but before any application
|
|
41
41
|
* level modules.
|
|
42
42
|
*/
|
|
43
|
-
modules?(): (Constructor | DynamicModule
|
|
43
|
+
modules?(): (Constructor | DynamicModule)[];
|
|
44
44
|
/**
|
|
45
45
|
* Additional error transformers
|
|
46
46
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdk/core",
|
|
3
|
-
"version": "5.7.0-next.
|
|
3
|
+
"version": "5.7.0-next.8",
|
|
4
4
|
"description": "Nestjs based microservice chassis",
|
|
5
5
|
"license": "Apache License 2.0",
|
|
6
6
|
"publishConfig": {
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
"prepublishOnly": "npm run build"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"dotenv": "^16.
|
|
17
|
+
"dotenv": "^16.3.1",
|
|
18
18
|
"lodash": "^4.17.21",
|
|
19
|
-
"pino": "^8.
|
|
19
|
+
"pino": "^8.21.0",
|
|
20
20
|
"prom-client": "^14.2.0"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@nestjs/common": "^10.0.0",
|
|
24
24
|
"@nestjs/core": "^10.0.0",
|
|
25
25
|
"@nestjs/microservices": "^10.0.0",
|
|
26
|
-
"@opentelemetry/api": "
|
|
27
|
-
"@opentelemetry/exporter-logs-otlp-http": "
|
|
26
|
+
"@opentelemetry/api": "1.9.0",
|
|
27
|
+
"@opentelemetry/exporter-logs-otlp-http": "0.55.0",
|
|
28
28
|
"@rsdk/actx": "*",
|
|
29
29
|
"@rsdk/autodoc.protocol": "*",
|
|
30
30
|
"@rsdk/common": "*",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@rsdk/nest-tools": "*",
|
|
37
37
|
"pino-opentelemetry-transport": "^1.0.1",
|
|
38
38
|
"reflect-metadata": "^0.1.12 || ^0.2.0",
|
|
39
|
-
"rxjs": "^7.1
|
|
39
|
+
"rxjs": "^7.8.1"
|
|
40
40
|
},
|
|
41
41
|
"peerDependenciesMeta": {
|
|
42
42
|
"@opentelemetry/api": {
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"optional": true
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "732bf4033fec8248fcc5d3d11a7b81ca3e28622c"
|
|
53
53
|
}
|
|
@@ -5,8 +5,7 @@ import type { PlatformExtendedOptions } from '../types';
|
|
|
5
5
|
|
|
6
6
|
export class PlatformPluginModule {
|
|
7
7
|
static forOptions(options: PlatformExtendedOptions): DynamicModule {
|
|
8
|
-
const modules: (DynamicModule | Constructor
|
|
9
|
-
[];
|
|
8
|
+
const modules: (DynamicModule | Constructor)[] = [];
|
|
10
9
|
|
|
11
10
|
// Adding additional modules (from plugins)
|
|
12
11
|
if (options.plugins) {
|
|
@@ -7,7 +7,7 @@ import type { ITransport } from '../types';
|
|
|
7
7
|
* Mostly used in global enhancers to decide: "to work of not to work"
|
|
8
8
|
*/
|
|
9
9
|
export class ProtocolDetector {
|
|
10
|
-
constructor(private
|
|
10
|
+
constructor(private transports: ITransport[]) {}
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Detects transport's protocol by ArgumentHost (context)
|
|
@@ -25,10 +25,6 @@ export class ProtocolDetector {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
private getTransport(context: ArgumentsHost): ITransport | undefined {
|
|
28
|
-
|
|
29
|
-
// .findLast() alternative from lodash but faster
|
|
30
|
-
const transports = this.transports.filter((x) => x.matchByContext(context));
|
|
31
|
-
|
|
32
|
-
return transports.at(-1);
|
|
28
|
+
return this.transports.findLast((x) => x.matchByContext(context));
|
|
33
29
|
}
|
|
34
30
|
}
|
package/src/types/plugins.ts
CHANGED
|
@@ -56,7 +56,7 @@ export interface PlatformAppPlugin<
|
|
|
56
56
|
* applied after all core modules but before any application
|
|
57
57
|
* level modules.
|
|
58
58
|
*/
|
|
59
|
-
modules?(): (Constructor | DynamicModule
|
|
59
|
+
modules?(): (Constructor | DynamicModule)[];
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
62
|
* Additional error transformers
|