@checkstack/maintenance-common 1.2.3 → 1.4.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,49 @@
1
1
  # @checkstack/maintenance-common
2
2
 
3
+ ## 1.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 9dcc848: Align workspace dependency versions and migrate React Router to v7.
8
+
9
+ BREAKING CHANGES (React Router v7): All frontend packages now depend on `react-router-dom@^7.16.0`. Previously the workspace declared four divergent ranges (`^6.20.0`, `^6.22.0`, `^7.1.1`, `^7.14.2`), which resolved both `react-router@6` and `react-router@7` into a single bundle. Everything is now unified on v7. The public imports the app uses (`BrowserRouter`, `Routes`, `Route`, `Link`, `NavLink`, `MemoryRouter`, `useNavigate`, `useParams`, `useSearchParams`, `useLocation`) are unchanged between v6 and v7, so no source rewrites were required - but any out-of-tree plugin still on react-router v6 should upgrade to v7 (see the React Router v6 -> v7 upgrade guide) to share the host's single router instance via the import map.
10
+
11
+ Other unified ranges (no API change): `react` -> `^18.3.1`, the `@orpc/*` family (`contract`, `server`, `client`, `tanstack-query`, `openapi`, `zod`) -> `^1.14.4`, and `better-auth` -> `^1.6.13`.
12
+
13
+ Removed the pre-rename `@orpc/react-query` leftover from `@checkstack/frontend-api`; its `createRouterUtils` / `RouterUtils` / `ProcedureUtils` now come from `@orpc/tanstack-query` (the package already in use).
14
+
15
+ Stale in-range runtime deps pulled up to current published versions: `hono` `^4.12.23`, `@tanstack/react-query` (+devtools) `^5.100.14`, `date-fns` `^4.4.0`, `jose` `^6.2.3`, `tar` `^7.5.16`, `semver` `^7.8.1`, `@xyflow/react` `^12.11.0`.
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [9dcc848]
20
+ - Updated dependencies [9dcc848]
21
+ - Updated dependencies [9dcc848]
22
+ - Updated dependencies [9dcc848]
23
+ - Updated dependencies [9dcc848]
24
+ - Updated dependencies [9dcc848]
25
+ - Updated dependencies [9dcc848]
26
+ - Updated dependencies [9dcc848]
27
+ - Updated dependencies [9dcc848]
28
+ - Updated dependencies [9dcc848]
29
+ - @checkstack/notification-common@1.3.0
30
+ - @checkstack/catalog-common@2.3.0
31
+ - @checkstack/common@0.13.0
32
+ - @checkstack/frontend-api@0.7.0
33
+ - @checkstack/signal-common@0.2.6
34
+
35
+ ## 1.3.0
36
+
37
+ ### Minor Changes
38
+
39
+ - 270ef29: Add the health-state provider data contract (automation sensing layer, Wave 2 Phase 13).
40
+
41
+ - New `health_check_state_transitions` table records every aggregate health-status transition for a system (all statuses, not just unhealthy), giving a reliable "in current status since" timestamp. Written wherever an aggregate transition is detected. Pruned with raw-run retention, but the single most-recent row per system is always kept so an active streak never blanks.
42
+ - New service-typed RPCs on `HealthCheckApi`: `getHealthState({ systemId, configurationId? })` returns `{ status, inStatusSince, inStatusForMs, latencyMs?, avgLatencyMs?, p95LatencyMs?, successRate?, lastRunAt?, inMaintenance, evaluatedAt }`, and `getBulkHealthState({ systemIds })` (POST) resolves many systems against one shared timestamp.
43
+ - New service-typed RPC on `MaintenanceApi`: `hasActiveMaintenance({ systemId })` reports whether a system is in an active maintenance window regardless of notification-suppression (suppression-agnostic), folded into `getHealthState` as `inMaintenance`.
44
+
45
+ All reads are fail-safe: a missing transition row yields `inStatusSince: null`, and a maintenance-plugin error fails open to `inMaintenance: false`.
46
+
3
47
  ## 1.2.3
4
48
 
5
49
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/maintenance-common",
3
- "version": "1.2.3",
3
+ "version": "1.4.0",
4
4
  "license": "Elastic-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -9,18 +9,18 @@
9
9
  }
10
10
  },
11
11
  "dependencies": {
12
- "@checkstack/common": "0.11.0",
13
- "@checkstack/catalog-common": "2.2.2",
14
- "@checkstack/frontend-api": "0.5.2",
15
- "@checkstack/notification-common": "1.2.0",
16
- "@checkstack/signal-common": "0.2.4",
17
- "@orpc/contract": "^1.13.14",
12
+ "@checkstack/common": "0.12.0",
13
+ "@checkstack/catalog-common": "2.2.3",
14
+ "@checkstack/frontend-api": "0.6.0",
15
+ "@checkstack/notification-common": "1.2.1",
16
+ "@checkstack/signal-common": "0.2.5",
17
+ "@orpc/contract": "^1.14.4",
18
18
  "zod": "^4.2.1"
19
19
  },
20
20
  "devDependencies": {
21
21
  "typescript": "^5.7.2",
22
22
  "@checkstack/tsconfig": "0.0.7",
23
- "@checkstack/scripts": "0.3.3"
23
+ "@checkstack/scripts": "0.3.4"
24
24
  },
25
25
  "scripts": {
26
26
  "typecheck": "tsgo -b",
@@ -146,6 +146,19 @@ export const maintenanceContract = {
146
146
  })
147
147
  .input(z.object({ systemId: z.string() }))
148
148
  .output(z.object({ suppressed: z.boolean() })),
149
+
150
+ /** Check if a system currently has an active maintenance window,
151
+ * regardless of notification-suppression. Used by automations and the
152
+ * health-state provider to gate on maintenance state without coupling
153
+ * to the suppression flag. Service-to-service endpoint.
154
+ */
155
+ hasActiveMaintenance: proc({
156
+ operationType: "query",
157
+ userType: "service",
158
+ access: [],
159
+ })
160
+ .input(z.object({ systemId: z.string() }))
161
+ .output(z.object({ active: z.boolean() })),
149
162
  };
150
163
 
151
164
  // Export contract type