@kronos-integration/service-health 5.0.179 → 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/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2016-2023 darlenya & arlac77
1
+ Copyright (c) 2016-2024 darlenya & arlac77
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@kronos-integration/service-health",
3
- "version": "5.0.179",
3
+ "version": "5.1.0",
4
4
  "publishConfig": {
5
- "access": "public"
5
+ "access": "public",
6
+ "provenance": true
6
7
  },
7
8
  "exports": {
8
9
  ".": "./src/service-health.mjs"
@@ -31,22 +32,22 @@
31
32
  "lint:docs": "documentation lint ./src/**/*.mjs"
32
33
  },
33
34
  "dependencies": {
34
- "@kronos-integration/endpoint": "^9.4.43",
35
- "@kronos-integration/service": "^10.4.50",
35
+ "@kronos-integration/endpoint": "^9.5.5",
36
+ "@kronos-integration/service": "^11.0.0",
36
37
  "model-attributes": "^4.2.2"
37
38
  },
38
39
  "devDependencies": {
39
- "ava": "^5.3.1",
40
- "c8": "^8.0.1",
41
- "documentation": "^14.0.2",
42
- "semantic-release": "^22.0.6"
40
+ "ava": "^6.1.3",
41
+ "c8": "^10.1.2",
42
+ "documentation": "^14.0.3",
43
+ "semantic-release": "^24.1.1"
43
44
  },
44
45
  "engines": {
45
- "node": ">=20.9.0"
46
+ "node": ">=22.8.0"
46
47
  },
47
48
  "repository": {
48
49
  "type": "git",
49
- "url": "https://github.com/Kronos-Integration/service-health"
50
+ "url": "git+https://github.com/Kronos-Integration/service-health.git"
50
51
  },
51
52
  "bugs": {
52
53
  "url": "https://github.com/Kronos-Integration/service-health/issues"
@@ -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: {