@checkstack/healthcheck-tcp-backend 0.1.0 → 0.1.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 +32 -0
- package/package.json +1 -1
- package/src/banner-collector.ts +3 -2
- package/src/strategy.ts +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @checkstack/healthcheck-tcp-backend
|
|
2
2
|
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f533141: Enforce health result factory function usage via branded types
|
|
8
|
+
|
|
9
|
+
- Added `healthResultSchema()` builder that enforces the use of factory functions at compile-time
|
|
10
|
+
- Added `healthResultArray()` factory for array fields (e.g., DNS resolved values)
|
|
11
|
+
- Added branded `HealthResultField<T>` type to mark schemas created by factory functions
|
|
12
|
+
- Consolidated `ChartType` and `HealthResultMeta` into `@checkstack/common` as single source of truth
|
|
13
|
+
- Updated all 12 health check strategies and 11 collectors to use `healthResultSchema()`
|
|
14
|
+
- Using raw `z.number()` etc. inside `healthResultSchema()` now causes a TypeScript error
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [9faec1f]
|
|
17
|
+
- Updated dependencies [827b286]
|
|
18
|
+
- Updated dependencies [f533141]
|
|
19
|
+
- Updated dependencies [aa4a8ab]
|
|
20
|
+
- @checkstack/backend-api@0.3.0
|
|
21
|
+
- @checkstack/common@0.2.0
|
|
22
|
+
- @checkstack/healthcheck-common@0.3.0
|
|
23
|
+
|
|
24
|
+
## 0.1.1
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [97c5a6b]
|
|
29
|
+
- Updated dependencies [8e43507]
|
|
30
|
+
- Updated dependencies [97c5a6b]
|
|
31
|
+
- @checkstack/backend-api@0.2.0
|
|
32
|
+
- @checkstack/common@0.1.0
|
|
33
|
+
- @checkstack/healthcheck-common@0.2.0
|
|
34
|
+
|
|
3
35
|
## 0.1.0
|
|
4
36
|
|
|
5
37
|
### Minor Changes
|
package/package.json
CHANGED
package/src/banner-collector.ts
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
healthResultNumber,
|
|
10
10
|
healthResultString,
|
|
11
11
|
healthResultBoolean,
|
|
12
|
+
healthResultSchema,
|
|
12
13
|
} from "@checkstack/healthcheck-common";
|
|
13
14
|
import { pluginMetadata } from "./plugin-metadata";
|
|
14
15
|
import type { TcpTransportClient } from "./transport-client";
|
|
@@ -31,7 +32,7 @@ export type BannerConfig = z.infer<typeof bannerConfigSchema>;
|
|
|
31
32
|
// RESULT SCHEMAS
|
|
32
33
|
// ============================================================================
|
|
33
34
|
|
|
34
|
-
const bannerResultSchema =
|
|
35
|
+
const bannerResultSchema = healthResultSchema({
|
|
35
36
|
banner: healthResultString({
|
|
36
37
|
"x-chart-type": "text",
|
|
37
38
|
"x-chart-label": "Banner",
|
|
@@ -49,7 +50,7 @@ const bannerResultSchema = z.object({
|
|
|
49
50
|
|
|
50
51
|
export type BannerResult = z.infer<typeof bannerResultSchema>;
|
|
51
52
|
|
|
52
|
-
const bannerAggregatedSchema =
|
|
53
|
+
const bannerAggregatedSchema = healthResultSchema({
|
|
53
54
|
avgReadTimeMs: healthResultNumber({
|
|
54
55
|
"x-chart-type": "line",
|
|
55
56
|
"x-chart-label": "Avg Read Time",
|
package/src/strategy.ts
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
healthResultBoolean,
|
|
10
10
|
healthResultNumber,
|
|
11
11
|
healthResultString,
|
|
12
|
+
healthResultSchema,
|
|
12
13
|
} from "@checkstack/healthcheck-common";
|
|
13
14
|
import type {
|
|
14
15
|
TcpTransportClient,
|
|
@@ -47,7 +48,7 @@ interface TcpConfigV1 {
|
|
|
47
48
|
/**
|
|
48
49
|
* Per-run result metadata.
|
|
49
50
|
*/
|
|
50
|
-
const tcpResultSchema =
|
|
51
|
+
const tcpResultSchema = healthResultSchema({
|
|
51
52
|
connected: healthResultBoolean({
|
|
52
53
|
"x-chart-type": "boolean",
|
|
53
54
|
"x-chart-label": "Connected",
|
|
@@ -72,7 +73,7 @@ type TcpResult = z.infer<typeof tcpResultSchema>;
|
|
|
72
73
|
/**
|
|
73
74
|
* Aggregated metadata for buckets.
|
|
74
75
|
*/
|
|
75
|
-
const tcpAggregatedSchema =
|
|
76
|
+
const tcpAggregatedSchema = healthResultSchema({
|
|
76
77
|
avgConnectionTime: healthResultNumber({
|
|
77
78
|
"x-chart-type": "line",
|
|
78
79
|
"x-chart-label": "Avg Connection Time",
|