@kronos-integration/service-health 8.0.68 → 8.1.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kronos-integration/service-health",
3
- "version": "8.0.68",
3
+ "version": "8.1.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -44,7 +44,7 @@
44
44
  "semantic-release": "^25.0.9"
45
45
  },
46
46
  "engines": {
47
- "node": ">=24.13.0"
47
+ "node": ">=26.7.0"
48
48
  },
49
49
  "repository": {
50
50
  "type": "git",
@@ -64,6 +64,18 @@ export class ServiceHealth extends Service {
64
64
  static get endpoints() {
65
65
  return {
66
66
  ...super.endpoints,
67
+ heartbeat: {
68
+ multi: true,
69
+ didConnect: (endpoint, other) => {
70
+ if (other.direction === "inout") {
71
+ const interval = setInterval(
72
+ () => endpoint.send("heartbeat"),
73
+ 10 * 60 * 1000
74
+ );
75
+ return () => clearInterval(interval);
76
+ }
77
+ }
78
+ },
67
79
  state: {
68
80
  multi: true,
69
81
  receive: "isHealthy",