@checkstack/healthcheck-postgres-backend 0.2.0 → 0.2.1

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,29 @@
1
1
  # @checkstack/healthcheck-postgres-backend
2
2
 
3
+ ## 0.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 869b4ab: ## Health Check Execution Improvements
8
+
9
+ ### Breaking Changes (backend-api)
10
+
11
+ - `HealthCheckStrategy.createClient()` now accepts `unknown` instead of `TConfig` due to TypeScript contravariance constraints. Implementations should use `this.config.validate(config)` to narrow the type.
12
+
13
+ ### Features
14
+
15
+ - **Platform-level hard timeout**: The executor now wraps the entire health check execution (connection + all collectors) in a single timeout, ensuring checks never hang indefinitely.
16
+ - **Parallel collector execution**: Collectors now run in parallel using `Promise.allSettled()`, improving performance while ensuring all collectors complete regardless of individual failures.
17
+ - **Base strategy config schema**: All strategy configs now extend `baseStrategyConfigSchema` which provides a standardized `timeout` field with sensible defaults (30s, min 100ms).
18
+
19
+ ### Fixes
20
+
21
+ - Fixed HTTP and Jenkins strategies clearing timeouts before reading the full response body.
22
+ - Simplified registry type signatures by using default type parameters.
23
+
24
+ - Updated dependencies [869b4ab]
25
+ - @checkstack/backend-api@0.8.0
26
+
3
27
  ## 0.2.0
4
28
 
5
29
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/healthcheck-postgres-backend",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "scripts": {
@@ -9,9 +9,9 @@
9
9
  "lint:code": "eslint . --max-warnings 0"
10
10
  },
11
11
  "dependencies": {
12
- "@checkstack/backend-api": "0.5.2",
13
- "@checkstack/common": "0.6.1",
14
- "@checkstack/healthcheck-common": "0.8.1",
12
+ "@checkstack/backend-api": "0.7.0",
13
+ "@checkstack/common": "0.6.2",
14
+ "@checkstack/healthcheck-common": "0.8.2",
15
15
  "pg": "^8.11.0"
16
16
  },
17
17
  "devDependencies": {
package/src/strategy.ts CHANGED
@@ -18,6 +18,7 @@ import {
18
18
  configBoolean,
19
19
  type ConnectedClient,
20
20
  type InferAggregatedResult,
21
+ baseStrategyConfigSchema,
21
22
  } from "@checkstack/backend-api";
22
23
  import {
23
24
  healthResultBoolean,
@@ -38,7 +39,7 @@ import type {
38
39
  /**
39
40
  * Configuration schema for PostgreSQL health checks.
40
41
  */
41
- export const postgresConfigSchema = z.object({
42
+ export const postgresConfigSchema = baseStrategyConfigSchema.extend({
42
43
  host: configString({}).describe("PostgreSQL server hostname"),
43
44
  port: configNumber({})
44
45
  .int()
@@ -50,10 +51,6 @@ export const postgresConfigSchema = z.object({
50
51
  user: configString({}).describe("Database user"),
51
52
  password: configString({ "x-secret": true }).describe("Database password"),
52
53
  ssl: configBoolean({}).default(false).describe("Use SSL connection"),
53
- timeout: configNumber({})
54
- .min(100)
55
- .default(10_000)
56
- .describe("Connection timeout in milliseconds"),
57
54
  });
58
55
 
59
56
  export type PostgresConfig = z.infer<typeof postgresConfigSchema>;