@checkstack/healthcheck-ssh-common 0.1.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 ADDED
@@ -0,0 +1,32 @@
1
+ # @checkstack/healthcheck-ssh-common
2
+
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f5b1f49: Refactored health check strategies to use `createClient()` pattern with built-in collectors.
8
+
9
+ **Strategy Changes:**
10
+
11
+ - Replaced `execute()` with `createClient()` that returns a transport client
12
+ - Strategy configs now only contain connection parameters
13
+ - Collector configs handle what to do with the connection
14
+
15
+ **Built-in Collectors Added:**
16
+
17
+ - DNS: `LookupCollector` for hostname resolution
18
+ - gRPC: `HealthCollector` for gRPC health protocol
19
+ - HTTP: `RequestCollector` for HTTP requests
20
+ - MySQL: `QueryCollector` for database queries
21
+ - Ping: `PingCollector` for ICMP ping
22
+ - Postgres: `QueryCollector` for database queries
23
+ - Redis: `CommandCollector` for Redis commands
24
+ - Script: `ExecuteCollector` for script execution
25
+ - SSH: `CommandCollector` for SSH commands
26
+ - TCP: `BannerCollector` for TCP banner grabbing
27
+ - TLS: `CertificateCollector` for certificate inspection
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies [f5b1f49]
32
+ - @checkstack/common@0.0.3
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@checkstack/healthcheck-ssh-common",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "main": "src/index.ts",
6
+ "scripts": {
7
+ "typecheck": "tsc --noEmit",
8
+ "lint": "bun run lint:code",
9
+ "lint:code": "eslint . --max-warnings 0"
10
+ },
11
+ "dependencies": {
12
+ "@checkstack/common": "workspace:*"
13
+ },
14
+ "devDependencies": {
15
+ "@types/bun": "^1.0.0",
16
+ "typescript": "^5.0.0",
17
+ "@checkstack/tsconfig": "workspace:*",
18
+ "@checkstack/scripts": "workspace:*"
19
+ }
20
+ }
package/src/index.ts ADDED
@@ -0,0 +1,5 @@
1
+ // Plugin metadata
2
+ export { pluginMetadata } from "./plugin-metadata";
3
+
4
+ // SSH transport types
5
+ export type { SshResult, SshTransportClient } from "./transport";
@@ -0,0 +1,9 @@
1
+ import { definePluginMetadata } from "@checkstack/common";
2
+
3
+ /**
4
+ * Plugin metadata for the SSH Health Check.
5
+ * Shared between backend and collectors that support SSH transport.
6
+ */
7
+ export const pluginMetadata = definePluginMetadata({
8
+ pluginId: "healthcheck-ssh",
9
+ });
@@ -0,0 +1,23 @@
1
+ import type { TransportClient } from "@checkstack/common";
2
+
3
+ // ============================================================================
4
+ // SSH TRANSPORT TYPES
5
+ // ============================================================================
6
+
7
+ /**
8
+ * SSH command execution result.
9
+ */
10
+ export interface SshResult {
11
+ /** Exit code from the command (0 = success) */
12
+ exitCode: number;
13
+ /** Standard output from the command */
14
+ stdout: string;
15
+ /** Standard error from the command */
16
+ stderr: string;
17
+ }
18
+
19
+ /**
20
+ * SSH transport client type.
21
+ * Commands are strings (shell commands), results include exit code and output.
22
+ */
23
+ export type SshTransportClient = TransportClient<string, SshResult>;
package/tsconfig.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "@checkstack/tsconfig/backend.json",
3
+ "include": [
4
+ "src"
5
+ ]
6
+ }