@checkstack/healthcheck-backend 0.11.0 → 0.12.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/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @checkstack/healthcheck-backend
2
2
 
3
+ ## 0.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 54a5f80: ### Health Check Editor Redesign — IDE-Style Experience
8
+
9
+ Replaces the modal-based health check editor with a full-page, IDE-style experience:
10
+
11
+ - **Strategy Picker Page**: New `/config/create` page with categorized strategy discovery, search filtering, and grouped card grid layout
12
+ - **IDE Editor Page**: New `/config/:configId/edit` page with a split-view layout — explorer tree on the left, editor panel on the right
13
+ - **Strategy Categories**: Introduces `StrategyCategory` enum with 16 categories (Networking, Database, Infrastructure, etc.) — all 13 strategy plugins now declare their category
14
+ - **New RPC Endpoint**: Added `getConfiguration` (singular by ID) for efficient single-resource fetching on the edit page
15
+ - **Explorer Tree**: Left-hand navigation with General, Check Items (collectors), and Access Control sections, with real-time validation indicators
16
+ - **Validation Status Bar**: Bottom bar showing aggregated validation issues with clickable navigation
17
+ - **Unsaved Changes Guard**: Browser `beforeunload` protection when the form is dirty
18
+ - **Responsive Design**: Split-view on desktop, stacked layout on mobile
19
+ - **Deleted**: Legacy `HealthCheckEditor.tsx` modal component
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies [54a5f80]
24
+ - @checkstack/healthcheck-common@0.10.0
25
+ - @checkstack/backend-api@0.11.0
26
+ - @checkstack/catalog-backend@0.2.22
27
+ - @checkstack/command-backend@0.1.17
28
+ - @checkstack/integration-backend@0.1.17
29
+ - @checkstack/queue-api@0.2.11
30
+
3
31
  ## 0.11.0
4
32
 
5
33
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/healthcheck-backend",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "checkstack": {
@@ -66,6 +66,7 @@ describe("HealthCheck Router", () => {
66
66
  id: "http",
67
67
  displayName: "HTTP",
68
68
  description: "Check HTTP",
69
+ category: "networking",
69
70
  config: {
70
71
  version: 1,
71
72
  schema: z.object({}),
@@ -97,6 +98,19 @@ describe("HealthCheck Router", () => {
97
98
  expect(Array.isArray(result.configurations)).toBe(true);
98
99
  });
99
100
 
101
+ it("getConfiguration returns undefined for non-existent config", async () => {
102
+ const context = createMockRpcContext({
103
+ user: mockUser,
104
+ });
105
+
106
+ const result = await call(
107
+ router.getConfiguration,
108
+ { id: "non-existent" },
109
+ { context },
110
+ );
111
+ expect(result).toBeUndefined();
112
+ });
113
+
100
114
  it("getCollectors returns collectors for strategy", async () => {
101
115
  const mockCollector = {
102
116
  qualifiedId: "collector-hardware.cpu",
package/src/router.ts CHANGED
@@ -8,6 +8,7 @@ import {
8
8
  type CollectorRegistry,
9
9
  } from "@checkstack/backend-api";
10
10
  import { healthCheckContract } from "@checkstack/healthcheck-common";
11
+ import type { StrategyCategory } from "@checkstack/healthcheck-common";
11
12
  import { HealthCheckService } from "./service";
12
13
  import * as schema from "./schema";
13
14
  import { toJsonSchemaWithChartMeta } from "./schema-utils";
@@ -37,6 +38,7 @@ export const createHealthCheckRouter = (
37
38
  id: r.qualifiedId, // Return fully qualified ID
38
39
  displayName: r.strategy.displayName,
39
40
  description: r.strategy.description,
41
+ category: (r.strategy.category ?? "other") as StrategyCategory,
40
42
  configSchema: toJsonSchema(r.strategy.config.schema),
41
43
  resultSchema: r.strategy.result
42
44
  ? toJsonSchemaWithChartMeta(r.strategy.result.schema)
@@ -87,6 +89,10 @@ export const createHealthCheckRouter = (
87
89
  return { configurations: await service.getConfigurations() };
88
90
  }),
89
91
 
92
+ getConfiguration: os.getConfiguration.handler(async ({ input }) => {
93
+ return service.getConfiguration(input.id);
94
+ }),
95
+
90
96
  createConfiguration: os.createConfiguration.handler(async ({ input }) => {
91
97
  return service.createConfiguration(input);
92
98
  }),