@checkstack/healthcheck-ssh-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 +24 -0
- package/package.json +5 -5
- package/src/strategy.ts +2 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @checkstack/healthcheck-ssh-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-ssh-backend",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
"lint:code": "eslint . --max-warnings 0"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@checkstack/backend-api": "0.
|
|
13
|
-
"@checkstack/common": "0.6.
|
|
14
|
-
"@checkstack/healthcheck-common": "0.8.
|
|
15
|
-
"@checkstack/healthcheck-ssh-common": "0.1.
|
|
12
|
+
"@checkstack/backend-api": "0.7.0",
|
|
13
|
+
"@checkstack/common": "0.6.2",
|
|
14
|
+
"@checkstack/healthcheck-common": "0.8.2",
|
|
15
|
+
"@checkstack/healthcheck-ssh-common": "0.1.8",
|
|
16
16
|
"ssh2": "^1.15.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
package/src/strategy.ts
CHANGED
|
@@ -14,9 +14,9 @@ import {
|
|
|
14
14
|
mergeMinMax,
|
|
15
15
|
z,
|
|
16
16
|
configString,
|
|
17
|
-
configNumber,
|
|
18
17
|
type ConnectedClient,
|
|
19
18
|
type InferAggregatedResult,
|
|
19
|
+
baseStrategyConfigSchema,
|
|
20
20
|
} from "@checkstack/backend-api";
|
|
21
21
|
import {
|
|
22
22
|
healthResultBoolean,
|
|
@@ -33,7 +33,7 @@ import type { SshTransportClient, SshCommandResult } from "./transport-client";
|
|
|
33
33
|
/**
|
|
34
34
|
* Configuration schema for SSH health checks.
|
|
35
35
|
*/
|
|
36
|
-
export const sshConfigSchema =
|
|
36
|
+
export const sshConfigSchema = baseStrategyConfigSchema.extend({
|
|
37
37
|
host: z.string().describe("SSH server hostname"),
|
|
38
38
|
port: z.number().int().min(1).max(65_535).default(22).describe("SSH port"),
|
|
39
39
|
username: z.string().describe("SSH username"),
|
|
@@ -46,10 +46,6 @@ export const sshConfigSchema = z.object({
|
|
|
46
46
|
passphrase: configString({ "x-secret": true })
|
|
47
47
|
.describe("Passphrase for private key")
|
|
48
48
|
.optional(),
|
|
49
|
-
timeout: configNumber({})
|
|
50
|
-
.min(100)
|
|
51
|
-
.default(10_000)
|
|
52
|
-
.describe("Connection timeout in milliseconds"),
|
|
53
49
|
});
|
|
54
50
|
|
|
55
51
|
export type SshConfig = z.infer<typeof sshConfigSchema>;
|