@checkstack/healthcheck-tls-backend 0.2.16 → 0.2.18

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,47 @@
1
1
  # @checkstack/healthcheck-tls-backend
2
2
 
3
+ ## 0.2.18
4
+
5
+ ### Patch Changes
6
+
7
+ - a06b899: Dead-code audit cleanup and a small platform of shared notification helpers.
8
+
9
+ **Removed (dead code)**
10
+
11
+ - `core/backend/src/plugin-manager/deregistration-guard.ts` deleted. The exported `assertCanDeregister()` was never called and was a less-complete version of the dependents+isUninstallable checks already done inline by `previewUninstallOriginator` / `uninstallOriginator` in `plugin-manager-orchestrator.ts`.
12
+ - `createMockQueueFactory` deprecated alias removed from `@checkstack/test-utils-backend`. Use `createMockQueueManager` directly.
13
+
14
+ **New shared helpers**
15
+
16
+ - `@checkstack/backend-api` now exports `requestTimeoutMs()` — a Zod field builder for outbound HTTP request timeouts (1s..60s, default 10s). Replaces hand-rolled `configNumber({}).min(1000).max(60_000).default(10_000)` in `integration-webhook-backend`, `integration-script-backend`, and `healthcheck-script-backend`'s inline collector.
17
+ - `@checkstack/notification-common` now exports `SubjectStatusSchema` / `SubjectStatus`, mirroring the existing `ImportanceSchema`.
18
+ - `@checkstack/notification-backend` now exports:
19
+ - `SUBJECT_STATUS_EMOJI` / `IMPORTANCE_EMOJI` — the shared status / importance emoji maps that Discord, Slack, Teams, Webex and Telegram previously each redefined inline.
20
+ - `postJson(opts)` — a timeout-bounded `fetch` wrapper that handles non-2xx logging and error mapping for webhook-style POSTs. Returns `{ ok: true, response } | { ok: false, error }`.
21
+
22
+ **Migrated to shared helpers**
23
+
24
+ - Discord, Slack, Gotify, Pushover notification backends now use `postJson`. Outer try/catch + per-plugin error mapping deleted (~140 LOC).
25
+ - Discord, Slack, Teams, Telegram, Webex notification backends now use `IMPORTANCE_EMOJI`. Discord, Slack, Teams use `SUBJECT_STATUS_EMOJI`.
26
+ - Teams, Webex, Backstage, Telegram kept their inline fetch/Bot logic: their error strings surface server response bodies to operators, or the transport isn't raw `fetch` (Telegram uses `grammy`'s `Bot`).
27
+
28
+ **API surface tightening**
29
+
30
+ - Per-plugin test-only re-exports in 6 notification backends (Pushover, Gotify, Backstage, Slack, Discord, Teams) and the `CertificateInfo` interface in `healthcheck-tls-backend/strategy.ts` are now JSDoc-tagged `@internal`. No behaviour change; signals that downstream consumers must not depend on them.
31
+
32
+ - Updated dependencies [a06b899]
33
+ - Updated dependencies [a06b899]
34
+ - @checkstack/backend-api@0.16.0
35
+ - @checkstack/healthcheck-common@1.1.1
36
+
37
+ ## 0.2.17
38
+
39
+ ### Patch Changes
40
+
41
+ - Updated dependencies [1909a61]
42
+ - Updated dependencies [b33fb4d]
43
+ - @checkstack/backend-api@0.15.3
44
+
3
45
  ## 0.2.16
4
46
 
5
47
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/healthcheck-tls-backend",
3
- "version": "0.2.16",
3
+ "version": "0.2.18",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "checkstack": {
@@ -14,15 +14,15 @@
14
14
  "pack": "bunx @checkstack/scripts plugin-pack"
15
15
  },
16
16
  "dependencies": {
17
- "@checkstack/backend-api": "0.15.1",
18
- "@checkstack/common": "0.9.0",
19
- "@checkstack/healthcheck-common": "1.0.2"
17
+ "@checkstack/backend-api": "0.15.3",
18
+ "@checkstack/common": "0.10.0",
19
+ "@checkstack/healthcheck-common": "1.1.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/bun": "^1.0.0",
23
23
  "typescript": "^5.0.0",
24
24
  "@checkstack/tsconfig": "0.0.7",
25
- "@checkstack/scripts": "0.3.1"
25
+ "@checkstack/scripts": "0.3.2"
26
26
  },
27
27
  "description": "Checkstack healthcheck-tls-backend plugin",
28
28
  "author": {
package/src/strategy.ts CHANGED
@@ -131,6 +131,13 @@ type TlsAggregatedResult = InferAggregatedResult<typeof tlsAggregatedFields>;
131
131
  // TLS CLIENT INTERFACE (for testability)
132
132
  // ============================================================================
133
133
 
134
+ /**
135
+ * Raw `node:tls` peer-certificate shape used by the in-process TLS client
136
+ * implementation. Exported only so the package's own tests can build mock
137
+ * `TlsConnection`s; not part of the plugin's public surface. Use
138
+ * [[TlsCertificateInfo]] from `./transport-client` for the transport contract.
139
+ * @internal
140
+ */
134
141
  export interface CertificateInfo {
135
142
  subject: { CN?: string };
136
143
  issuer: { CN?: string; O?: string };
@@ -138,6 +145,7 @@ export interface CertificateInfo {
138
145
  valid_to: string;
139
146
  }
140
147
 
148
+ /** @internal */
141
149
  export interface TlsConnection {
142
150
  authorized: boolean;
143
151
  getPeerCertificate(): CertificateInfo;