@lad-tech/nsc-toolkit 1.17.3 → 1.17.4
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 +2 -2
- package/dist/Service.js +10 -0
- package/dist/types/Service.d.ts +4 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
## [1.17.
|
|
1
|
+
## [1.17.4](https://github.com/lad-tech/nsc-toolkit/compare/v1.17.3...v1.17.4) (2023-11-17)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* Move nats debug log in debug level ([#91](https://github.com/lad-tech/nsc-toolkit/issues/91)) ([07e7688](https://github.com/lad-tech/nsc-toolkit/commit/07e7688a7332fb1cfa58ccb590357770d4bc77cf))
|
package/dist/Service.js
CHANGED
|
@@ -501,11 +501,21 @@ class Service extends Root_1.Root {
|
|
|
501
501
|
this.httpProbServer = undefined;
|
|
502
502
|
});
|
|
503
503
|
}
|
|
504
|
+
/**
|
|
505
|
+
* Type guard for NATS debug event
|
|
506
|
+
*/
|
|
507
|
+
isNATSDebugEvent(event) {
|
|
508
|
+
return (event === nats_1.DebugEvents.PingTimer || event === nats_1.DebugEvents.Reconnecting || event === nats_1.DebugEvents.StaleConnection);
|
|
509
|
+
}
|
|
504
510
|
/**
|
|
505
511
|
* Logs events from the broker
|
|
506
512
|
*/
|
|
507
513
|
async watchBrokerEvents() {
|
|
508
514
|
for await (const event of this.broker.status()) {
|
|
515
|
+
if (this.isNATSDebugEvent(event.type)) {
|
|
516
|
+
this.logger.debug(`${event.type}: ${event.data}`);
|
|
517
|
+
return;
|
|
518
|
+
}
|
|
509
519
|
this.logger.warn(`${event.type}: ${event.data}`);
|
|
510
520
|
}
|
|
511
521
|
}
|
package/dist/types/Service.d.ts
CHANGED
|
@@ -98,6 +98,10 @@ export declare class Service<E extends Emitter = Emitter> extends Root {
|
|
|
98
98
|
* Up Probe Route for container orchestration service
|
|
99
99
|
*/
|
|
100
100
|
private upProbeRoutes;
|
|
101
|
+
/**
|
|
102
|
+
* Type guard for NATS debug event
|
|
103
|
+
*/
|
|
104
|
+
private isNATSDebugEvent;
|
|
101
105
|
/**
|
|
102
106
|
* Logs events from the broker
|
|
103
107
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lad-tech/nsc-toolkit",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.4",
|
|
4
4
|
"description": "Toolkit for create microservices around NATS",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"typescript": "^5.1.3"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@lad-tech/toolbelt": "^1.
|
|
37
|
+
"@lad-tech/toolbelt": "^1.3.1",
|
|
38
38
|
"@opentelemetry/api": "^1.1.0",
|
|
39
39
|
"@opentelemetry/exporter-jaeger": "^1.3.1",
|
|
40
40
|
"@opentelemetry/resources": "^1.3.1",
|