@checkstack/healthcheck-redis-backend 0.1.1 → 0.1.3

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,32 @@
1
1
  # @checkstack/healthcheck-redis-backend
2
2
 
3
+ ## 0.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - @checkstack/backend-api@0.3.1
8
+
9
+ ## 0.1.2
10
+
11
+ ### Patch Changes
12
+
13
+ - f533141: Enforce health result factory function usage via branded types
14
+
15
+ - Added `healthResultSchema()` builder that enforces the use of factory functions at compile-time
16
+ - Added `healthResultArray()` factory for array fields (e.g., DNS resolved values)
17
+ - Added branded `HealthResultField<T>` type to mark schemas created by factory functions
18
+ - Consolidated `ChartType` and `HealthResultMeta` into `@checkstack/common` as single source of truth
19
+ - Updated all 12 health check strategies and 11 collectors to use `healthResultSchema()`
20
+ - Using raw `z.number()` etc. inside `healthResultSchema()` now causes a TypeScript error
21
+
22
+ - Updated dependencies [9faec1f]
23
+ - Updated dependencies [827b286]
24
+ - Updated dependencies [f533141]
25
+ - Updated dependencies [aa4a8ab]
26
+ - @checkstack/backend-api@0.3.0
27
+ - @checkstack/common@0.2.0
28
+ - @checkstack/healthcheck-common@0.3.0
29
+
3
30
  ## 0.1.1
4
31
 
5
32
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/healthcheck-redis-backend",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "scripts": {
@@ -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 { RedisTransportClient } from "./transport-client";
@@ -34,7 +35,7 @@ export type CommandConfig = z.infer<typeof commandConfigSchema>;
34
35
  // RESULT SCHEMAS
35
36
  // ============================================================================
36
37
 
37
- const commandResultSchema = z.object({
38
+ const commandResultSchema = healthResultSchema({
38
39
  response: healthResultString({
39
40
  "x-chart-type": "text",
40
41
  "x-chart-label": "Response",
@@ -52,7 +53,7 @@ const commandResultSchema = z.object({
52
53
 
53
54
  export type CommandResult = z.infer<typeof commandResultSchema>;
54
55
 
55
- const commandAggregatedSchema = z.object({
56
+ const commandAggregatedSchema = healthResultSchema({
56
57
  avgResponseTimeMs: healthResultNumber({
57
58
  "x-chart-type": "line",
58
59
  "x-chart-label": "Avg Response Time",
package/src/strategy.ts CHANGED
@@ -13,6 +13,7 @@ import {
13
13
  healthResultBoolean,
14
14
  healthResultNumber,
15
15
  healthResultString,
16
+ healthResultSchema,
16
17
  } from "@checkstack/healthcheck-common";
17
18
  import type {
18
19
  RedisTransportClient,
@@ -56,7 +57,7 @@ export type RedisConfigInput = z.input<typeof redisConfigSchema>;
56
57
  /**
57
58
  * Per-run result metadata.
58
59
  */
59
- const redisResultSchema = z.object({
60
+ const redisResultSchema = healthResultSchema({
60
61
  connected: healthResultBoolean({
61
62
  "x-chart-type": "boolean",
62
63
  "x-chart-label": "Connected",
@@ -77,7 +78,7 @@ type RedisResult = z.infer<typeof redisResultSchema>;
77
78
  /**
78
79
  * Aggregated metadata for buckets.
79
80
  */
80
- const redisAggregatedSchema = z.object({
81
+ const redisAggregatedSchema = healthResultSchema({
81
82
  avgConnectionTime: healthResultNumber({
82
83
  "x-chart-type": "line",
83
84
  "x-chart-label": "Avg Connection Time",