@saplings/quality-node-diagnostics 0.17.1 → 0.17.2

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @saplings/quality-node-diagnostics
2
2
 
3
+ ## 0.17.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 886be53: Publish onboarding guides, API summaries, and examples in each npm package.
8
+
9
+ Use the single sapling executable for catalog, scan, doctor, and quality commands. Install @saplings/cli and replace sapling-quality with sapling quality. Replace sapling-quality-legacy with sapling quality legacy.
10
+
3
11
  ## 0.17.1
4
12
 
5
13
  ### Patch Changes
package/README.md ADDED
@@ -0,0 +1,30 @@
1
+ # @saplings/quality-node-diagnostics
2
+
3
+ Collect process and event-loop metrics in a Node.js service.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @saplings/quality-node-diagnostics
9
+ ```
10
+
11
+ ## Quick start
12
+
13
+ ```ts
14
+ import { createNodeDiagnostics } from '@saplings/quality-node-diagnostics';
15
+
16
+ const diagnostics = createNodeDiagnostics();
17
+ try {
18
+ console.log(diagnostics.snapshot());
19
+ } finally {
20
+ diagnostics.close();
21
+ }
22
+ ```
23
+
24
+ ## API and integration
25
+
26
+ - `createNodeDiagnostics()` starts a performance histogram. `snapshot()` reports memory, CPU, uptime, and event-loop latency in documented units.
27
+ - Create a collector at service startup and close it at shutdown. CPU usage reflects the interval since the last snapshot.
28
+ - Restrict access if you expose snapshots through an HTTP endpoint.
29
+
30
+ Read the [integration guide](https://github.com/snrakshith/saplings/blob/main/docs/BACKEND_QUALITY.md) for configuration and operational details.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saplings/quality-node-diagnostics",
3
- "version": "0.17.1",
3
+ "version": "0.17.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -12,6 +12,7 @@
12
12
  },
13
13
  "files": [
14
14
  "dist",
15
+ "README.md",
15
16
  "CHANGELOG.md"
16
17
  ],
17
18
  "dependencies": {},