@kronos-integration/service-health 5.0.180 → 5.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": "5.0.180",
3
+ "version": "5.1.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -32,18 +32,18 @@
32
32
  "lint:docs": "documentation lint ./src/**/*.mjs"
33
33
  },
34
34
  "dependencies": {
35
- "@kronos-integration/endpoint": "^9.5.4",
35
+ "@kronos-integration/endpoint": "^9.5.5",
36
36
  "@kronos-integration/service": "^11.0.0",
37
37
  "model-attributes": "^4.2.2"
38
38
  },
39
39
  "devDependencies": {
40
40
  "ava": "^6.1.3",
41
- "c8": "^9.1.0",
41
+ "c8": "^10.1.2",
42
42
  "documentation": "^14.0.3",
43
- "semantic-release": "^23.1.1"
43
+ "semantic-release": "^24.1.1"
44
44
  },
45
45
  "engines": {
46
- "node": ">=22.2.0"
46
+ "node": ">=22.8.0"
47
47
  },
48
48
  "repository": {
49
49
  "type": "git",
@@ -17,9 +17,22 @@ const intervalOptions = {
17
17
  }
18
18
  };
19
19
 
20
+ let lastCpuUsage;
21
+
20
22
  const intervalEndpointDefs = {
21
23
  cpu: {
22
- receive: () => process.cpuUsage(),
24
+ receive: () => {
25
+ lastCpuUsage = process.cpuUsage(lastCpuUsage);
26
+ return lastCpuUsage;
27
+ },
28
+ ...intervalOptions
29
+ },
30
+ availableMemory: {
31
+ receive: () => process.availableMemory(),
32
+ ...intervalOptions
33
+ },
34
+ constrainedMemory: {
35
+ receive: () => process.constrainedMemory(),
23
36
  ...intervalOptions
24
37
  },
25
38
  memory: {