@checkstack/healthcheck-backend 0.3.1 → 0.3.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,78 @@
1
1
  # @checkstack/healthcheck-backend
2
2
 
3
+ ## 0.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - @checkstack/catalog-common@1.2.1
8
+ - @checkstack/catalog-backend@0.2.3
9
+
10
+ ## 0.3.2
11
+
12
+ ### Patch Changes
13
+
14
+ - 7a23261: ## TanStack Query Integration
15
+
16
+ Migrated all frontend components to use `usePluginClient` hook with TanStack Query integration, replacing the legacy `forPlugin()` pattern.
17
+
18
+ ### New Features
19
+
20
+ - **`usePluginClient` hook**: Provides type-safe access to plugin APIs with `.useQuery()` and `.useMutation()` methods
21
+ - **Automatic request deduplication**: Multiple components requesting the same data share a single network request
22
+ - **Built-in caching**: Configurable stale time and cache duration per query
23
+ - **Loading/error states**: TanStack Query provides `isLoading`, `error`, `isRefetching` states automatically
24
+ - **Background refetching**: Stale data is automatically refreshed when components mount
25
+
26
+ ### Contract Changes
27
+
28
+ All RPC contracts now require `operationType: "query"` or `operationType: "mutation"` metadata:
29
+
30
+ ```typescript
31
+ const getItems = proc()
32
+ .meta({ operationType: "query", access: [access.read] })
33
+ .output(z.array(itemSchema))
34
+ .query();
35
+
36
+ const createItem = proc()
37
+ .meta({ operationType: "mutation", access: [access.manage] })
38
+ .input(createItemSchema)
39
+ .output(itemSchema)
40
+ .mutation();
41
+ ```
42
+
43
+ ### Migration
44
+
45
+ ```typescript
46
+ // Before (forPlugin pattern)
47
+ const api = useApi(myPluginApiRef);
48
+ const [items, setItems] = useState<Item[]>([]);
49
+ useEffect(() => {
50
+ api.getItems().then(setItems);
51
+ }, [api]);
52
+
53
+ // After (usePluginClient pattern)
54
+ const client = usePluginClient(MyPluginApi);
55
+ const { data: items, isLoading } = client.getItems.useQuery({});
56
+ ```
57
+
58
+ ### Bug Fixes
59
+
60
+ - Fixed `rpc.test.ts` test setup for middleware type inference
61
+ - Fixed `SearchDialog` to use `setQuery` instead of deprecated `search` method
62
+ - Fixed null→undefined warnings in notification and queue frontends
63
+
64
+ - Updated dependencies [180be38]
65
+ - Updated dependencies [7a23261]
66
+ - @checkstack/queue-api@0.1.0
67
+ - @checkstack/common@0.3.0
68
+ - @checkstack/backend-api@0.3.2
69
+ - @checkstack/catalog-common@1.2.0
70
+ - @checkstack/healthcheck-common@0.4.0
71
+ - @checkstack/integration-backend@0.1.2
72
+ - @checkstack/catalog-backend@0.2.2
73
+ - @checkstack/command-backend@0.1.2
74
+ - @checkstack/signal-common@0.1.1
75
+
3
76
  ## 0.3.1
4
77
 
5
78
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/healthcheck-backend",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "scripts": {
package/src/router.ts CHANGED
@@ -184,6 +184,24 @@ export const createHealthCheckRouter = (
184
184
  }
185
185
  ),
186
186
 
187
+ getBulkSystemHealthStatus: os.getBulkSystemHealthStatus.handler(
188
+ async ({ input }) => {
189
+ const statuses: Record<
190
+ string,
191
+ Awaited<ReturnType<typeof service.getSystemHealthStatus>>
192
+ > = {};
193
+
194
+ // Fetch health status for each system in parallel
195
+ await Promise.all(
196
+ input.systemIds.map(async (systemId) => {
197
+ statuses[systemId] = await service.getSystemHealthStatus(systemId);
198
+ })
199
+ );
200
+
201
+ return { statuses };
202
+ }
203
+ ),
204
+
187
205
  getSystemHealthOverview: os.getSystemHealthOverview.handler(
188
206
  async ({ input }) => {
189
207
  return service.getSystemHealthOverview(input.systemId);