@nexusts/health 0.9.6 → 0.9.8
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/dist/health.controller.d.ts +6 -11
- package/dist/health.service.d.ts +2 -2
- package/dist/index.js +23 -39
- package/dist/index.js.map +5 -5
- package/package.json +2 -2
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
* Mount `HealthModule.forRoot({...})` in your app module to get
|
|
6
6
|
* these routes automatically. Override paths or add an auth token
|
|
7
7
|
* via `HealthConfig`.
|
|
8
|
+
*
|
|
9
|
+
* Uses standard decorator patterns: field injection and `ctx.req.*`
|
|
10
|
+
* methods instead of legacy `@Req()`/`@Res()` parameter decorators.
|
|
8
11
|
*/
|
|
9
12
|
import type { Context } from "hono";
|
|
10
|
-
import { HealthCheckService } from "./health.service.js";
|
|
11
|
-
import type { HealthConfig } from "./types.js";
|
|
12
13
|
export declare class HealthController {
|
|
13
14
|
private readonly health;
|
|
14
|
-
|
|
15
|
-
live(c: Context, _res: Response): Promise<Response & import("hono").TypedResponse<{
|
|
15
|
+
live(ctx: Context): Promise<Response & import("hono").TypedResponse<{
|
|
16
16
|
status: import("./types.js").HealthStatus;
|
|
17
17
|
results: {
|
|
18
18
|
name: string;
|
|
@@ -25,7 +25,7 @@ export declare class HealthController {
|
|
|
25
25
|
durationMs: number;
|
|
26
26
|
timestamp: string;
|
|
27
27
|
}, 200 | 503, "json">>;
|
|
28
|
-
ready(
|
|
28
|
+
ready(ctx: Context): Promise<Response & import("hono").TypedResponse<{
|
|
29
29
|
status: import("./types.js").HealthStatus;
|
|
30
30
|
results: {
|
|
31
31
|
name: string;
|
|
@@ -38,7 +38,7 @@ export declare class HealthController {
|
|
|
38
38
|
durationMs: number;
|
|
39
39
|
timestamp: string;
|
|
40
40
|
}, 200 | 503, "json">>;
|
|
41
|
-
startup(
|
|
41
|
+
startup(ctx: Context): Promise<Response & import("hono").TypedResponse<{
|
|
42
42
|
status: import("./types.js").HealthStatus;
|
|
43
43
|
results: {
|
|
44
44
|
name: string;
|
|
@@ -53,8 +53,3 @@ export declare class HealthController {
|
|
|
53
53
|
}, 200 | 503, "json">>;
|
|
54
54
|
private respond;
|
|
55
55
|
}
|
|
56
|
-
declare module "./health.service.js" {
|
|
57
|
-
interface HealthCheckService {
|
|
58
|
-
config: HealthConfig;
|
|
59
|
-
}
|
|
60
|
-
}
|
package/dist/health.service.d.ts
CHANGED
|
@@ -11,9 +11,9 @@ export declare class HealthCheckService {
|
|
|
11
11
|
static readonly TOKEN: unique symbol;
|
|
12
12
|
/** Registered indicators keyed by name. */
|
|
13
13
|
indicators: Map<string, HealthIndicator>;
|
|
14
|
-
/**
|
|
14
|
+
/** Health config — injected by DI container. */
|
|
15
15
|
config: HealthConfig;
|
|
16
|
-
constructor(
|
|
16
|
+
constructor();
|
|
17
17
|
/**
|
|
18
18
|
* Register an indicator at runtime (e.g. a DB-specific indicator
|
|
19
19
|
* from a feature module).
|
package/dist/index.js
CHANGED
|
@@ -25,7 +25,6 @@ var __legacyDecorateClassTS = function(decorators, target, key, desc) {
|
|
|
25
25
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
26
26
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
27
27
|
};
|
|
28
|
-
var __legacyDecorateParamTS = (index, decorator) => (target, key) => decorator(target, key, index);
|
|
29
28
|
var __legacyMetadataTS = (k, v) => {
|
|
30
29
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
31
30
|
return Reflect.metadata(k, v);
|
|
@@ -202,9 +201,7 @@ class CustomPingIndicator {
|
|
|
202
201
|
class HealthCheckService {
|
|
203
202
|
static TOKEN = Symbol.for("nexus:HealthCheckService");
|
|
204
203
|
indicators = new Map;
|
|
205
|
-
|
|
206
|
-
constructor(config = {}) {
|
|
207
|
-
this.config = config;
|
|
204
|
+
constructor() {
|
|
208
205
|
this.registerBuiltIns();
|
|
209
206
|
}
|
|
210
207
|
register(indicator) {
|
|
@@ -243,7 +240,8 @@ class HealthCheckService {
|
|
|
243
240
|
};
|
|
244
241
|
}
|
|
245
242
|
registerBuiltIns() {
|
|
246
|
-
const
|
|
243
|
+
const cfg = this.config ?? {};
|
|
244
|
+
const bi = cfg.builtIn ?? {};
|
|
247
245
|
if (bi.memory) {
|
|
248
246
|
const opts = typeof bi.memory === "object" ? bi.memory : {};
|
|
249
247
|
this.register(new MemoryHealthIndicator(opts));
|
|
@@ -263,74 +261,60 @@ class HealthCheckService {
|
|
|
263
261
|
}
|
|
264
262
|
}
|
|
265
263
|
}
|
|
264
|
+
__legacyDecorateClassTS([
|
|
265
|
+
Inject("HEALTH_CONFIG")
|
|
266
|
+
], HealthCheckService.prototype, "config", undefined);
|
|
266
267
|
HealthCheckService = __legacyDecorateClassTS([
|
|
267
268
|
Injectable(),
|
|
268
|
-
|
|
269
|
-
__legacyMetadataTS("design:paramtypes", [
|
|
270
|
-
typeof HealthConfig === "undefined" ? Object : HealthConfig
|
|
271
|
-
])
|
|
269
|
+
__legacyMetadataTS("design:paramtypes", [])
|
|
272
270
|
], HealthCheckService);
|
|
273
271
|
// packages/health/src/health.controller.ts
|
|
274
|
-
import { Controller, Get,
|
|
272
|
+
import { Controller, Get, Inject as Inject2 } from "@nexusts/core";
|
|
275
273
|
class HealthController {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
this.health = health;
|
|
279
|
-
}
|
|
280
|
-
async live(c, _res) {
|
|
281
|
-
return this.respond(c, "liveness", this.health.config.livenessPath ?? "/health/live");
|
|
274
|
+
async live(ctx) {
|
|
275
|
+
return this.respond(ctx, "liveness");
|
|
282
276
|
}
|
|
283
|
-
async ready(
|
|
284
|
-
return this.respond(
|
|
277
|
+
async ready(ctx) {
|
|
278
|
+
return this.respond(ctx, "readiness");
|
|
285
279
|
}
|
|
286
|
-
async startup(
|
|
287
|
-
return this.respond(
|
|
280
|
+
async startup(ctx) {
|
|
281
|
+
return this.respond(ctx, "startup");
|
|
288
282
|
}
|
|
289
|
-
async respond(c, kind
|
|
283
|
+
async respond(c, kind) {
|
|
290
284
|
const result = await this.health.check(kind);
|
|
291
285
|
const status = result.status === "up" ? 200 : 503;
|
|
292
286
|
return c.json(result, status);
|
|
293
287
|
}
|
|
294
288
|
}
|
|
289
|
+
__legacyDecorateClassTS([
|
|
290
|
+
Inject2(HealthCheckService.TOKEN)
|
|
291
|
+
], HealthController.prototype, "health", undefined);
|
|
295
292
|
__legacyDecorateClassTS([
|
|
296
293
|
Get("/health/live"),
|
|
297
|
-
__legacyDecorateParamTS(0, Req()),
|
|
298
|
-
__legacyDecorateParamTS(1, Res()),
|
|
299
294
|
__legacyMetadataTS("design:type", Function),
|
|
300
295
|
__legacyMetadataTS("design:paramtypes", [
|
|
301
|
-
typeof Context === "undefined" ? Object : Context
|
|
302
|
-
typeof Response === "undefined" ? Object : Response
|
|
296
|
+
typeof Context === "undefined" ? Object : Context
|
|
303
297
|
]),
|
|
304
298
|
__legacyMetadataTS("design:returntype", Promise)
|
|
305
299
|
], HealthController.prototype, "live", null);
|
|
306
300
|
__legacyDecorateClassTS([
|
|
307
301
|
Get("/health/ready"),
|
|
308
|
-
__legacyDecorateParamTS(0, Req()),
|
|
309
|
-
__legacyDecorateParamTS(1, Res()),
|
|
310
302
|
__legacyMetadataTS("design:type", Function),
|
|
311
303
|
__legacyMetadataTS("design:paramtypes", [
|
|
312
|
-
typeof Context === "undefined" ? Object : Context
|
|
313
|
-
typeof Response === "undefined" ? Object : Response
|
|
304
|
+
typeof Context === "undefined" ? Object : Context
|
|
314
305
|
]),
|
|
315
306
|
__legacyMetadataTS("design:returntype", Promise)
|
|
316
307
|
], HealthController.prototype, "ready", null);
|
|
317
308
|
__legacyDecorateClassTS([
|
|
318
309
|
Get("/health/startup"),
|
|
319
|
-
__legacyDecorateParamTS(0, Req()),
|
|
320
|
-
__legacyDecorateParamTS(1, Res()),
|
|
321
310
|
__legacyMetadataTS("design:type", Function),
|
|
322
311
|
__legacyMetadataTS("design:paramtypes", [
|
|
323
|
-
typeof Context === "undefined" ? Object : Context
|
|
324
|
-
typeof Response === "undefined" ? Object : Response
|
|
312
|
+
typeof Context === "undefined" ? Object : Context
|
|
325
313
|
]),
|
|
326
314
|
__legacyMetadataTS("design:returntype", Promise)
|
|
327
315
|
], HealthController.prototype, "startup", null);
|
|
328
316
|
HealthController = __legacyDecorateClassTS([
|
|
329
|
-
Controller()
|
|
330
|
-
__legacyDecorateParamTS(0, Inject2(HealthCheckService.TOKEN)),
|
|
331
|
-
__legacyMetadataTS("design:paramtypes", [
|
|
332
|
-
typeof HealthCheckService === "undefined" ? Object : HealthCheckService
|
|
333
|
-
])
|
|
317
|
+
Controller()
|
|
334
318
|
], HealthController);
|
|
335
319
|
// packages/health/src/health.module.ts
|
|
336
320
|
import { Module } from "@nexusts/core";
|
|
@@ -376,5 +360,5 @@ export {
|
|
|
376
360
|
CustomPingIndicator
|
|
377
361
|
};
|
|
378
362
|
|
|
379
|
-
//# debugId=
|
|
363
|
+
//# debugId=ECD39046C73A852164756E2164756E21
|
|
380
364
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
"sources": ["../src/types.ts", "../src/health.service.ts", "../src/indicators/drizzle.ts", "../src/indicators/index.ts", "../src/health.controller.ts", "../src/health.module.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"/**\n * Health check types — the contract for `@nexusts/health`.\n *\n * Mirrors `@nestjs/terminus` and `@adonisjs/health`. Three check\n * kinds:\n *\n * - **Liveness** — am I alive? Used by Kubernetes to decide when\n * to restart the pod. Should be a fast, in-process check.\n *\n * - **Readiness** — am I ready to serve traffic? Used by load\n * balancers and K8s to decide when to send requests. May include\n * DB / cache pings.\n *\n * - **Startup** — has my initialization finished? Used by K8s to\n * gate deployment rollouts.\n *\n * Each check returns a `HealthIndicatorResult`. `status: 'up'` means\n * the check passed; `down` means it failed (the indicator's data\n * carries the error message).\n */\n\nexport type HealthStatus = \"up\" | \"down\";\n\nexport interface HealthIndicatorResult<T = unknown> {\n\t/** Whether the check passed. */\n\tstatus: HealthStatus;\n\t/** Optional data attached to the check (e.g. ping latency). */\n\tdata?: T;\n\t/** Error message when status is 'down'. */\n\tmessage?: string;\n}\n\n/**\n * A single health indicator. Indicators are usually singletons that\n * wrap a connection (DB, cache, HTTP API). The `check()` method\n * performs a fast liveness probe.\n *\n * class DbHealthIndicator extends HealthIndicator {\n * name = 'database';\n * async check() {\n * await this.db.ping();\n * return { status: 'up' };\n * }\n * }\n */\nexport abstract class HealthIndicator {\n\tabstract readonly name: string;\n\tabstract check(): Promise<HealthIndicatorResult>;\n}\n\n/** Result of one check plus its indicator name. */\nexport interface HealthCheckEntry {\n\tname: string;\n\tresult: HealthIndicatorResult;\n}\n\n/** Result of `HealthCheckService.check([...])`. */\nexport interface HealthCheckResult {\n\t/** Aggregate status. `'up'` iff every indicator returned `'up'`. */\n\tstatus: HealthStatus;\n\t/** Per-indicator results. */\n\tresults: HealthCheckEntry[];\n\t/** Total wall-clock time (ms). */\n\tdurationMs: number;\n\t/** ISO timestamp. */\n\ttimestamp: string;\n}\n\n/** Which kind of check we're running. */\nexport type HealthCheckKind = \"liveness\" | \"readiness\" | \"startup\";\n\n/** Configuration for the HealthModule. */\nexport interface HealthConfig {\n\t/**\n\t * Path for the liveness probe. Default: `/health/live`.\n\t * Set to null to disable.\n\t */\n\tlivenessPath?: string | null;\n\t/**\n\t * Path for the readiness probe. Default: `/health/ready`.\n\t */\n\treadinessPath?: string | null;\n\t/**\n\t * Path for the startup probe. Default: `/health/startup`.\n\t */\n\tstartupPath?: string | null;\n\t/**\n\t * Optional token to gate the health endpoints. When set, requests\n\t * must include `Authorization: Bearer <token>`. Useful for\n\t * protecting internal health endpoints from public exposure.\n\t */\n\tauthToken?: string;\n\t/**\n\t * Built-in indicators to register automatically. Currently\n\t * supports 'memory' (heap pressure). 'disk' and 'http' require\n\t * additional config (see config docs).\n\t */\n\tbuiltIn?: {\n\t\tmemory?: boolean | { threshold?: number /* heap pressure 0-1 */ };\n\t\tdisk?: { threshold?: number /* fraction free, e.g. 0.1 */; path?: string };\n\t\thttp?: { url: string; timeoutMs?: number };\n\t};\n}\n",
|
|
6
|
-
"/**\n * `HealthCheckService` — runs a list of indicators in parallel and\n * aggregates the result.\n *\n * Typically injected into a controller that mounts the\n * `/health/live`, `/health/ready`, `/health/startup` endpoints.\n */\n\nimport { Inject, Injectable } from \"@nexusts/core\";\nimport type {\n\tHealthCheckResult,\n\tHealthCheckEntry,\n\tHealthIndicator,\n\tHealthIndicatorResult,\n\tHealthCheckKind,\n\tHealthConfig,\n} from \"./types.js\";\nimport {\n\tMemoryHealthIndicator,\n\tDiskHealthIndicator,\n\tHttpHealthIndicator,\n} from \"./indicators/index.js\";\n\n@Injectable()\nexport class HealthCheckService {\n\t/** DI token — use with `@Inject(HealthCheckService.TOKEN)`. */\n\tstatic readonly TOKEN = Symbol.for(\"nexus:HealthCheckService\");\n\n\t/** Registered indicators keyed by name. */\n\tindicators = new Map<string, HealthIndicator>();\n\t/**
|
|
6
|
+
"/**\n * `HealthCheckService` — runs a list of indicators in parallel and\n * aggregates the result.\n *\n * Typically injected into a controller that mounts the\n * `/health/live`, `/health/ready`, `/health/startup` endpoints.\n */\n\nimport { Inject, Injectable } from \"@nexusts/core\";\nimport type {\n\tHealthCheckResult,\n\tHealthCheckEntry,\n\tHealthIndicator,\n\tHealthIndicatorResult,\n\tHealthCheckKind,\n\tHealthConfig,\n} from \"./types.js\";\nimport {\n\tMemoryHealthIndicator,\n\tDiskHealthIndicator,\n\tHttpHealthIndicator,\n} from \"./indicators/index.js\";\n\n@Injectable()\nexport class HealthCheckService {\n\t/** DI token — use with `@Inject(HealthCheckService.TOKEN)`. */\n\tstatic readonly TOKEN = Symbol.for(\"nexus:HealthCheckService\");\n\n\t/** Registered indicators keyed by name. */\n\tindicators = new Map<string, HealthIndicator>();\n\n\t/** Health config — injected by DI container. */\n\t@Inject(\"HEALTH_CONFIG\") declare config: HealthConfig;\n\n\tconstructor() {\n\t\t// DI sets @Inject fields before first use.\n\t\tthis.registerBuiltIns();\n\t}\n\n\t/**\n\t * Register an indicator at runtime (e.g. a DB-specific indicator\n\t * from a feature module).\n\t */\n\tregister(indicator: HealthIndicator): void {\n\t\tthis.indicators.set(indicator.name, indicator);\n\t}\n\n\t/** Remove a registered indicator. */\n\tunregister(name: string): boolean {\n\t\treturn this.indicators.delete(name);\n\t}\n\n\t/** List registered indicator names. */\n\tlist(): string[] {\n\t\treturn [...this.indicators.keys()];\n\t}\n\n\t/**\n\t * Run all registered indicators in parallel and aggregate.\n\t *\n\t * await health.check() → 200 if all 'up', 503 if any 'down'.\n\t */\n\tasync check(kind: HealthCheckKind = \"readiness\"): Promise<HealthCheckResult> {\n\t\tconst start = Date.now();\n\t\tconst indicators = [...this.indicators.values()];\n\t\tconst settled = await Promise.allSettled(\n\t\t\tindicators.map((i) => i.check()),\n\t\t);\n\t\tconst entries: HealthCheckEntry[] = indicators.map((i, idx) => {\n\t\t\tconst s = settled[idx]!;\n\t\t\tif (s.status === \"fulfilled\") {\n\t\t\t\treturn { name: i.name, result: s.value };\n\t\t\t}\n\t\t\tconst err = s.reason;\n\t\t\treturn {\n\t\t\t\tname: i.name,\n\t\t\t\tresult: {\n\t\t\t\t\tstatus: \"down\",\n\t\t\t\t\tmessage: err instanceof Error ? err.message : String(err),\n\t\t\t\t},\n\t\t\t};\n\t\t});\n\t\tconst status = entries.every((e) => e.result.status === \"up\")\n\t\t\t? \"up\"\n\t\t\t: \"down\";\n\t\treturn {\n\t\t\tstatus,\n\t\t\tresults: entries,\n\t\t\tdurationMs: Date.now() - start,\n\t\t\ttimestamp: new Date().toISOString(),\n\t\t};\n\t}\n\n\t// ===========================================================================\n\t// Internal\n\t// ===========================================================================\n\n\tprivate registerBuiltIns(): void {\n\t\tconst cfg = this.config ?? {};\n\t\tconst bi = cfg.builtIn ?? {};\n\t\tif (bi.memory) {\n\t\t\tconst opts = typeof bi.memory === \"object\" ? bi.memory : {};\n\t\t\tthis.register(new MemoryHealthIndicator(opts));\n\t\t}\n\t\tif (bi.disk) {\n\t\t\tthis.register(new DiskHealthIndicator(bi.disk));\n\t\t}\n\t\tif (bi.http) {\n\t\t\t// Default name is derived from the URL host.\n\t\t\tconst host = (() => {\n\t\t\t\ttry {\n\t\t\t\t\treturn new URL(bi.http.url).host || \"http\";\n\t\t\t\t} catch {\n\t\t\t\t\treturn \"http\";\n\t\t\t\t}\n\t\t\t})();\n\t\t\tthis.register(new HttpHealthIndicator(host, bi.http));\n\t\t}\n\t}\n}",
|
|
7
7
|
"/**\n * DrizzleHealthIndicator — runs a `SELECT 1` against the database.\n *\n * new DrizzleHealthIndicator('database', drizzleService, { timeoutMs: 3000 })\n */\nimport type { HealthIndicator, HealthIndicatorResult } from \"../types.js\";\n\nexport class DrizzleHealthIndicator implements HealthIndicator {\n\treadonly name: string;\n\t#db: { rawQuery<T = unknown>(sql: string, params?: unknown[]): Promise<T[]> };\n\t#timeoutMs: number;\n\t/** Optional probe SQL. Default: 'SELECT 1'. */\n\t#probe: string;\n\n\tconstructor(\n\t\tname: string,\n\t\tdb: {\n\t\t\trawQuery<T = unknown>(sql: string, params?: unknown[]): Promise<T[]>;\n\t\t},\n\t\toptions: { timeoutMs?: number; probe?: string } = {},\n\t) {\n\t\tthis.name = name;\n\t\tthis.#db = db;\n\t\tthis.#timeoutMs = options.timeoutMs ?? 3000;\n\t\tthis.#probe = options.probe ?? \"SELECT 1\";\n\t}\n\n\tasync check(): Promise<HealthIndicatorResult> {\n\t\tconst start = Date.now();\n\t\ttry {\n\t\t\tconst probe = this.#probe;\n\t\t\tawait Promise.race([\n\t\t\t\tthis.#db.rawQuery(probe),\n\t\t\t\tnew Promise<never>((_, reject) =>\n\t\t\t\t\tsetTimeout(\n\t\t\t\t\t\t() =>\n\t\t\t\t\t\t\treject(new Error(`probe timed out after ${this.#timeoutMs}ms`)),\n\t\t\t\t\t\tthis.#timeoutMs,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t]);\n\t\t\treturn {\n\t\t\t\tstatus: \"up\",\n\t\t\t\tdata: { latencyMs: Date.now() - start, probe: this.#probe },\n\t\t\t};\n\t\t} catch (err) {\n\t\t\treturn {\n\t\t\t\tstatus: \"down\",\n\t\t\t\tmessage: err instanceof Error ? err.message : String(err),\n\t\t\t\tdata: { latencyMs: Date.now() - start, probe: this.#probe },\n\t\t\t};\n\t\t}\n\t}\n}\n",
|
|
8
8
|
"/**\n * Built-in health indicators.\n *\n * Each one extends `HealthIndicator` and lives in this folder so the\n * core service stays small. New built-ins (DB, Redis, ...) can be\n * added here.\n */\n\nexport { DrizzleHealthIndicator } from \"./drizzle.js\";\n\nimport type { HealthIndicator, HealthIndicatorResult } from \"../types.js\";\n\n/**\n * Memory pressure indicator. Reports `'down'` when heap usage\n * exceeds the configured threshold (default: 0.9 = 90%).\n */\nexport class MemoryHealthIndicator implements HealthIndicator {\n\treadonly name = \"memory\";\n\t#threshold: number;\n\n\tconstructor(options: { threshold?: number } = {}) {\n\t\tthis.#threshold = options.threshold ?? 0.9;\n\t}\n\n\tasync check(): Promise<HealthIndicatorResult> {\n\t\tconst mem = process.memoryUsage();\n\t\tconst total = mem.heapTotal;\n\t\tconst used = mem.heapUsed;\n\t\tconst ratio = total > 0 ? used / total : 0;\n\t\tif (ratio > this.#threshold) {\n\t\t\treturn {\n\t\t\t\tstatus: \"down\",\n\t\t\t\tmessage: `heap usage ${(ratio * 100).toFixed(1)}% exceeds threshold ${(this.#threshold * 100).toFixed(0)}%`,\n\t\t\t\tdata: { heapUsed: used, heapTotal: total, ratio },\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tstatus: \"up\",\n\t\t\tdata: { heapUsed: used, heapTotal: total, ratio },\n\t\t};\n\t}\n}\n\n/**\n * Disk space indicator. Reports `'down'` when free fraction falls\n * below the threshold.\n */\nexport class DiskHealthIndicator implements HealthIndicator {\n\treadonly name = \"disk\";\n\t#threshold: number;\n\t#path: string;\n\n\tconstructor(options: { threshold?: number; path?: string } = {}) {\n\t\tthis.#threshold = options.threshold ?? 0.1; // 10% free\n\t\tthis.#path = options.path ?? process.cwd();\n\t}\n\n\tasync check(): Promise<HealthIndicatorResult> {\n\t\ttry {\n\t\t\t// Best-effort: rely on Bun / Node to throw if statfs is unsupported.\n\t\t\t// We use a tiny shell-out only when the runtime exposes one.\n\t\t\t// Fall back to 'up' if we can't tell.\n\t\t\tconst statfs = (await import(\"node:fs/promises\")\n\t\t\t\t.then((m) => m.statfs)\n\t\t\t\t.catch(() => null)) as\n\t\t\t\t| ((p: string) => Promise<{\n\t\t\t\t\t\tbavail: number;\n\t\t\t\t\t\tbsize: number;\n\t\t\t\t\t\tblocks: number;\n\t\t\t\t\t\tbfree: number;\n\t\t\t\t }>)\n\t\t\t\t| null;\n\t\t\tif (!statfs) {\n\t\t\t\treturn { status: \"up\", message: \"statfs unavailable; skipping\" };\n\t\t\t}\n\t\t\tconst s = await statfs(this.#path);\n\t\t\tconst free = s.bavail * s.bsize;\n\t\t\tconst total = s.blocks * s.bsize;\n\t\t\tconst freeRatio = total > 0 ? free / total : 1;\n\t\t\tif (freeRatio < this.#threshold) {\n\t\t\t\treturn {\n\t\t\t\t\tstatus: \"down\",\n\t\t\t\t\tmessage: `disk free ${(freeRatio * 100).toFixed(1)}% below threshold ${(this.#threshold * 100).toFixed(0)}%`,\n\t\t\t\t\tdata: { free, total, freeRatio, path: this.#path },\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tstatus: \"up\",\n\t\t\t\tdata: { free, total, freeRatio, path: this.#path },\n\t\t\t};\n\t\t} catch (err) {\n\t\t\treturn {\n\t\t\t\tstatus: \"down\",\n\t\t\t\tmessage: err instanceof Error ? err.message : String(err),\n\t\t\t};\n\t\t}\n\t}\n}\n\n/**\n * HTTP ping indicator. GETs a URL and reports `'up'` on any 2xx.\n */\nexport class HttpHealthIndicator implements HealthIndicator {\n\treadonly name: string;\n\t#url: string;\n\t#timeoutMs: number;\n\n\tconstructor(name: string, options: { url: string; timeoutMs?: number }) {\n\t\tthis.name = name;\n\t\tthis.#url = options.url;\n\t\tthis.#timeoutMs = options.timeoutMs ?? 3000;\n\t}\n\n\tasync check(): Promise<HealthIndicatorResult> {\n\t\tconst ctrl = new AbortController();\n\t\tconst timer = setTimeout(() => ctrl.abort(), this.#timeoutMs);\n\t\ttry {\n\t\t\tconst res = await fetch(this.#url, { signal: ctrl.signal });\n\t\t\tif (res.status >= 200 && res.status < 300) {\n\t\t\t\treturn { status: \"up\", data: { status: res.status } };\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tstatus: \"down\",\n\t\t\t\tmessage: `HTTP ${res.status}`,\n\t\t\t\tdata: { status: res.status },\n\t\t\t};\n\t\t} catch (err) {\n\t\t\treturn {\n\t\t\t\tstatus: \"down\",\n\t\t\t\tmessage: err instanceof Error ? err.message : String(err),\n\t\t\t};\n\t\t} finally {\n\t\t\tclearTimeout(timer);\n\t\t}\n\t}\n}\n\n/**\n * User-supplied ping indicator. Wrap a `ping()` function — typically\n * a DB driver's health check.\n *\n * new CustomPingIndicator('database', async () => db.ping())\n */\nexport class CustomPingIndicator implements HealthIndicator {\n\treadonly name: string;\n\t#ping: () => Promise<void> | void;\n\t#timeoutMs: number;\n\n\tconstructor(\n\t\tname: string,\n\t\tping: () => Promise<void> | void,\n\t\ttimeoutMs = 3000,\n\t) {\n\t\tthis.name = name;\n\t\tthis.#ping = ping;\n\t\tthis.#timeoutMs = timeoutMs;\n\t}\n\n\tasync check(): Promise<HealthIndicatorResult> {\n\t\tconst ctrl = new AbortController();\n\t\tconst timer = setTimeout(() => ctrl.abort(), this.#timeoutMs);\n\t\ttry {\n\t\t\tawait Promise.race([\n\t\t\t\tPromise.resolve(this.#ping()),\n\t\t\t\tnew Promise<never>((_, reject) =>\n\t\t\t\t\tsetTimeout(\n\t\t\t\t\t\t() =>\n\t\t\t\t\t\t\treject(new Error(`ping timed out after ${this.#timeoutMs}ms`)),\n\t\t\t\t\t\tthis.#timeoutMs,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t]);\n\t\t\treturn { status: \"up\" };\n\t\t} catch (err) {\n\t\t\treturn {\n\t\t\t\tstatus: \"down\",\n\t\t\t\tmessage: err instanceof Error ? err.message : String(err),\n\t\t\t};\n\t\t} finally {\n\t\t\tclearTimeout(timer);\n\t\t}\n\t}\n}\n",
|
|
9
|
-
"/**\n * `HealthController` — built-in `/health/live`, `/health/ready`,\n * `/health/startup` endpoints.\n *\n * Mount `HealthModule.forRoot({...})` in your app module to get\n * these routes automatically. Override paths or add an auth token\n * via `HealthConfig`.\n */\n\nimport { Controller, Get,
|
|
10
|
-
"/**\n * `HealthModule` — drop-in module for `/health/live`, `/health/ready`,\n * `/health/startup` endpoints.\n *\n * Usage:\n * @Module({\n * imports: [\n * HealthModule.forRoot({\n * builtIn: {\n * memory: true,\n * disk: { threshold: 0.1 },\n * http: { url: 'https://api.stripe.com/v1/healthcheck' },\n * },\n * }),\n * ],\n * })\n * export class AppModule {}\n *\n * Then `/health/live`, `/health/ready`, `/health/startup` respond\n * with a JSON body. Status 200 on `'up'`, 503 on `'down'`.\n */\n\nimport { Module } from \"@nexusts/core\";\nimport { HealthCheckService } from \"./health.service.js\";\nimport { HealthController } from \"./health.controller.js\";\nimport type { HealthConfig } from \"./types.js\";\
|
|
9
|
+
"/**\n * `HealthController` — built-in `/health/live`, `/health/ready`,\n * `/health/startup` endpoints.\n *\n * Mount `HealthModule.forRoot({...})` in your app module to get\n * these routes automatically. Override paths or add an auth token\n * via `HealthConfig`.\n *\n * Uses standard decorator patterns: field injection and `ctx.req.*`\n * methods instead of legacy `@Req()`/`@Res()` parameter decorators.\n */\n\nimport { Controller, Get, Inject } from \"@nexusts/core\";\nimport type { Context } from \"hono\";\nimport { HealthCheckService } from \"./health.service.js\";\nimport type { HealthCheckKind, HealthConfig } from \"./types.js\";\n\n@Controller()\nexport class HealthController {\n\t@Inject(HealthCheckService.TOKEN) declare private readonly health: HealthCheckService;\n\n\t@Get(\"/health/live\")\n\tasync live(ctx: Context) {\n\t\treturn this.respond(ctx, \"liveness\");\n\t}\n\n\t@Get(\"/health/ready\")\n\tasync ready(ctx: Context) {\n\t\treturn this.respond(ctx, \"readiness\");\n\t}\n\n\t@Get(\"/health/startup\")\n\tasync startup(ctx: Context) {\n\t\treturn this.respond(ctx, \"startup\");\n\t}\n\n\tprivate async respond(c: Context, kind: HealthCheckKind) {\n\t\tconst result = await this.health.check(kind);\n\t\tconst status = result.status === \"up\" ? 200 : 503;\n\t\treturn c.json(result, status);\n\t}\n}\n",
|
|
10
|
+
"/**\n * `HealthModule` — drop-in module for `/health/live`, `/health/ready`,\n * `/health/startup` endpoints.\n *\n * Usage:\n * @Module({\n * imports: [\n * HealthModule.forRoot({\n * builtIn: {\n * memory: true,\n * disk: { threshold: 0.1 },\n * http: { url: 'https://api.stripe.com/v1/healthcheck' },\n * },\n * }),\n * ],\n * })\n * export class AppModule {}\n *\n * Then `/health/live`, `/health/ready`, `/health/startup` respond\n * with a JSON body. Status 200 on `'up'`, 503 on `'down'`.\n */\n\nimport { Module } from \"@nexusts/core\";\nimport { HealthCheckService } from \"./health.service.js\";\nimport { HealthController } from \"./health.controller.js\";\nimport type { HealthConfig } from \"./types.js\";\n\n@Module({\n\tcontrollers: [HealthController],\n\tproviders: [\n\t\tHealthCheckService,\n\t\t{ provide: HealthCheckService.TOKEN, useExisting: HealthCheckService },\n\t],\n\texports: [HealthCheckService, HealthCheckService.TOKEN],\n})\nexport class HealthModule {\n\tstatic forRoot(config: HealthConfig = {}) {\n\t\t@Module({\n\t\t\tcontrollers: [HealthController],\n\t\t\tproviders: [\n\t\t\t\tHealthCheckService,\n\t\t\t\t{ provide: HealthCheckService.TOKEN, useExisting: HealthCheckService },\n\t\t\t\t{ provide: \"HEALTH_CONFIG\", useValue: config },\n\t\t\t],\n\t\t\texports: [HealthCheckService, HealthCheckService.TOKEN],\n\t\t})\n\t\tclass ConfiguredHealthModule {}\n\n\t\tObject.defineProperty(ConfiguredHealthModule, \"name\", {\n\t\t\tvalue: \"ConfiguredHealthModule\",\n\t\t});\n\n\t\treturn ConfiguredHealthModule;\n\t}\n}\n"
|
|
11
11
|
],
|
|
12
|
-
"mappings": "
|
|
13
|
-
"debugId": "
|
|
12
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CO,MAAe,gBAAgB;AAGtC;;ACxCA;;;ACDO,MAAM,uBAAkD;AAAA,EACrD;AAAA,EACT;AAAA,EACA;AAAA,EAEA;AAAA,EAEA,WAAW,CACV,MACA,IAGA,UAAkD,CAAC,GAClD;AAAA,IACD,KAAK,OAAO;AAAA,IACZ,KAAK,MAAM;AAAA,IACX,KAAK,aAAa,QAAQ,aAAa;AAAA,IACvC,KAAK,SAAS,QAAQ,SAAS;AAAA;AAAA,OAG1B,MAAK,GAAmC;AAAA,IAC7C,MAAM,QAAQ,KAAK,IAAI;AAAA,IACvB,IAAI;AAAA,MACH,MAAM,QAAQ,KAAK;AAAA,MACnB,MAAM,QAAQ,KAAK;AAAA,QAClB,KAAK,IAAI,SAAS,KAAK;AAAA,QACvB,IAAI,QAAe,CAAC,GAAG,WACtB,WACC,MACC,OAAO,IAAI,MAAM,yBAAyB,KAAK,cAAc,CAAC,GAC/D,KAAK,UACN,CACD;AAAA,MACD,CAAC;AAAA,MACD,OAAO;AAAA,QACN,QAAQ;AAAA,QACR,MAAM,EAAE,WAAW,KAAK,IAAI,IAAI,OAAO,OAAO,KAAK,OAAO;AAAA,MAC3D;AAAA,MACC,OAAO,KAAK;AAAA,MACb,OAAO;AAAA,QACN,QAAQ;AAAA,QACR,SAAS,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAAA,QACxD,MAAM,EAAE,WAAW,KAAK,IAAI,IAAI,OAAO,OAAO,KAAK,OAAO;AAAA,MAC3D;AAAA;AAAA;AAGH;;;ACrCO,MAAM,sBAAi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AA,GAdM,iBAcN;AAdM,mBAAN;AAAA,EADN,WAAW;AAAA,GACC;;ACIb;AAaO,MAAM,aAAa;AAAA,SAClB,OAAO,CAAC,SAAuB,CAAC,GAAG;AAAA,IAUzC,MAAM,uBAAuB;AAAA,IAAC;AAAA,IAAxB,yBAAN;AAAA,MATC,OAAO;AAAA,QACP,aAAa,CAAC,gBAAgB;AAAA,QAC9B,WAAW;AAAA,UACV;AAAA,UACA,EAAE,SAAS,mBAAmB,OAAO,aAAa,mBAAmB;AAAA,UACrE,EAAE,SAAS,iBAAiB,UAAU,OAAO;AAAA,QAC9C;AAAA,QACA,SAAS,CAAC,oBAAoB,mBAAmB,KAAK;AAAA,MACvD,CAAC;AAAA,OACK;AAAA,IAEN,OAAO,eAAe,wBAAwB,QAAQ;AAAA,MACrD,OAAO;AAAA,IACR,CAAC;AAAA,IAED,OAAO;AAAA;AAET;AAnBa,eAAN;AAAA,EARN,OAAO;AAAA,IACP,aAAa,CAAC,gBAAgB;AAAA,IAC9B,WAAW;AAAA,MACV;AAAA,MACA,EAAE,SAAS,mBAAmB,OAAO,aAAa,mBAAmB;AAAA,IACtE;AAAA,IACA,SAAS,CAAC,oBAAoB,mBAAmB,KAAK;AAAA,EACvD,CAAC;AAAA,GACY;",
|
|
13
|
+
"debugId": "ECD39046C73A852164756E2164756E21",
|
|
14
14
|
"names": []
|
|
15
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexusts/health",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.8",
|
|
4
4
|
"description": "Health check endpoints (live, ready, startup)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@nexusts/core": "^0.9.
|
|
29
|
+
"@nexusts/core": "^0.9.8"
|
|
30
30
|
},
|
|
31
31
|
"repository": {
|
|
32
32
|
"type": "git",
|