@checkstack/healthcheck-tls-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/certificate-collector.ts +3 -2
- package/src/strategy.ts +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @checkstack/healthcheck-tls-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
|
@@ -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 { TlsTransportClient } from "./transport-client";
|
|
@@ -27,7 +28,7 @@ export type CertificateConfig = z.infer<typeof certificateConfigSchema>;
|
|
|
27
28
|
// RESULT SCHEMAS
|
|
28
29
|
// ============================================================================
|
|
29
30
|
|
|
30
|
-
const certificateResultSchema =
|
|
31
|
+
const certificateResultSchema = healthResultSchema({
|
|
31
32
|
subject: healthResultString({
|
|
32
33
|
"x-chart-type": "text",
|
|
33
34
|
"x-chart-label": "Subject",
|
|
@@ -57,7 +58,7 @@ const certificateResultSchema = z.object({
|
|
|
57
58
|
|
|
58
59
|
export type CertificateResult = z.infer<typeof certificateResultSchema>;
|
|
59
60
|
|
|
60
|
-
const certificateAggregatedSchema =
|
|
61
|
+
const certificateAggregatedSchema = healthResultSchema({
|
|
61
62
|
avgDaysRemaining: healthResultNumber({
|
|
62
63
|
"x-chart-type": "gauge",
|
|
63
64
|
"x-chart-label": "Avg Days Remaining",
|
package/src/strategy.ts
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
healthResultBoolean,
|
|
11
11
|
healthResultNumber,
|
|
12
12
|
healthResultString,
|
|
13
|
+
healthResultSchema,
|
|
13
14
|
} from "@checkstack/healthcheck-common";
|
|
14
15
|
import type {
|
|
15
16
|
TlsTransportClient,
|
|
@@ -53,7 +54,7 @@ export type TlsConfig = z.infer<typeof tlsConfigSchema>;
|
|
|
53
54
|
/**
|
|
54
55
|
* Per-run result metadata.
|
|
55
56
|
*/
|
|
56
|
-
const tlsResultSchema =
|
|
57
|
+
const tlsResultSchema = healthResultSchema({
|
|
57
58
|
connected: healthResultBoolean({
|
|
58
59
|
"x-chart-type": "boolean",
|
|
59
60
|
"x-chart-label": "Connected",
|
|
@@ -82,7 +83,7 @@ type TlsResult = z.infer<typeof tlsResultSchema>;
|
|
|
82
83
|
/**
|
|
83
84
|
* Aggregated metadata for buckets.
|
|
84
85
|
*/
|
|
85
|
-
const tlsAggregatedSchema =
|
|
86
|
+
const tlsAggregatedSchema = healthResultSchema({
|
|
86
87
|
avgDaysUntilExpiry: healthResultNumber({
|
|
87
88
|
"x-chart-type": "line",
|
|
88
89
|
"x-chart-label": "Avg Days Until Expiry",
|