@zola_do/health 0.2.5 → 0.2.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/README.md CHANGED
@@ -1,61 +1,61 @@
1
- # @zola_do/health
2
-
3
- NestJS readiness/liveness helpers built on [`@nestjs/terminus`](https://docs.nestjs.com/recipes/terminus), aligned with `@zola_do` env conventions (TypeORM, RabbitMQ audit, MinIO, Seaweed/S3).
4
-
5
- ## Install
6
-
7
- ```bash
8
- pnpm add @zola_do/health @nestjs/terminus
9
- ```
10
-
11
- Optional peers (enable related checks only when installed and configured):
12
-
13
- - `@nestjs/typeorm`, `typeorm` — database ping
14
- - `@nestjs/microservices`, `amqplib` — RabbitMQ ping when `RMQ_URL` is set
15
-
16
- ## Usage
17
-
18
- ```typescript
19
- import { ZolaHealthModule } from '@zola_do/health';
20
-
21
- @Module({
22
- imports: [
23
- TypeOrmModule.forRoot(/* ... */),
24
- ZolaHealthModule.forRoot({
25
- path: 'health',
26
- typeorm: true,
27
- rabbitmq: true,
28
- minio: true,
29
- seaweed: true,
30
- http: [{ name: 'docs', url: 'https://example.com/status' }],
31
- }),
32
- ],
33
- })
34
- export class AppModule {}
35
- ```
36
-
37
- - **`path`**: controller route (default `health` → `GET /health`).
38
- - **`typeorm`**: `true` (key `database`), a custom string key, or `false` to skip.
39
- - **`rabbitmq`**: uses `RMQ_URL` and Terminus microservice ping (requires optional peers above).
40
- - **`minio`**: GET `http(s)://MINIO_ENDPOINT:MINIO_PORT/minio/health/live` from `MINIO_*` env vars.
41
- - **`seaweed`**: GET `AWS_ENDPOINT` (prefixes `https://` if missing); treats HTTP ≥ 500 as down.
42
- - **`http`**: extra `{ name, url }` GET checks via `fetch`.
43
-
44
- If `@nestjs/terminus` is **not** installed, the module registers a minimal `GET /health` JSON body (`mode: 'minimal'`) so imports stay safe.
45
-
46
- ### Global JWT guard
47
-
48
- Use `@ZolaHealthPublic()` on custom health routes, or rely on the built-in controller: it sets the same `allowAnonymous` metadata key as `@AllowAnonymous()` from `@zola_do/authorization`.
49
-
50
- ## Environment variables
51
-
52
- | Check | Variables |
53
- |----------|-----------|
54
- | TypeORM | Same as your app / `@zola_do/typeorm` (`DATABASE_*`) |
55
- | RabbitMQ | `RMQ_URL` |
56
- | MinIO | `MINIO_ENDPOINT`, `MINIO_PORT`, `MINIO_USESSL` |
57
- | Seaweed | `AWS_ENDPOINT` |
58
-
59
- ## License
60
-
61
- ISC
1
+ # @zola_do/health
2
+
3
+ NestJS readiness/liveness helpers built on [`@nestjs/terminus`](https://docs.nestjs.com/recipes/terminus), aligned with `@zola_do` env conventions (TypeORM, RabbitMQ audit, MinIO, Seaweed/S3).
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pnpm add @zola_do/health @nestjs/terminus
9
+ ```
10
+
11
+ Optional peers (enable related checks only when installed and configured):
12
+
13
+ - `@nestjs/typeorm`, `typeorm` — database ping
14
+ - `@nestjs/microservices`, `amqplib` — RabbitMQ ping when `RMQ_URL` is set
15
+
16
+ ## Usage
17
+
18
+ ```typescript
19
+ import { ZolaHealthModule } from '@zola_do/health';
20
+
21
+ @Module({
22
+ imports: [
23
+ TypeOrmModule.forRoot(/* ... */),
24
+ ZolaHealthModule.forRoot({
25
+ path: 'health',
26
+ typeorm: true,
27
+ rabbitmq: true,
28
+ minio: true,
29
+ seaweed: true,
30
+ http: [{ name: 'docs', url: 'https://example.com/status' }],
31
+ }),
32
+ ],
33
+ })
34
+ export class AppModule {}
35
+ ```
36
+
37
+ - **`path`**: controller route (default `health` → `GET /health`).
38
+ - **`typeorm`**: `true` (key `database`), a custom string key, or `false` to skip.
39
+ - **`rabbitmq`**: uses `RMQ_URL` and Terminus microservice ping (requires optional peers above).
40
+ - **`minio`**: GET `http(s)://MINIO_ENDPOINT:MINIO_PORT/minio/health/live` from `MINIO_*` env vars.
41
+ - **`seaweed`**: GET `AWS_ENDPOINT` (prefixes `https://` if missing); treats HTTP ≥ 500 as down.
42
+ - **`http`**: extra `{ name, url }` GET checks via `fetch`.
43
+
44
+ If `@nestjs/terminus` is **not** installed, the module registers a minimal `GET /health` JSON body (`mode: 'minimal'`) so imports stay safe.
45
+
46
+ ### Global JWT guard
47
+
48
+ Use `@ZolaHealthPublic()` on custom health routes, or rely on the built-in controller: it sets the same `allowAnonymous` metadata key as `@AllowAnonymous()` from `@zola_do/authorization`.
49
+
50
+ ## Environment variables
51
+
52
+ | Check | Variables |
53
+ |----------|-----------|
54
+ | TypeORM | Same as your app / `@zola_do/typeorm` (`DATABASE_*`) |
55
+ | RabbitMQ | `RMQ_URL` |
56
+ | MinIO | `MINIO_ENDPOINT`, `MINIO_PORT`, `MINIO_USESSL` |
57
+ | Seaweed | `AWS_ENDPOINT` |
58
+
59
+ ## License
60
+
61
+ ISC
@@ -12,9 +12,10 @@ const common_1 = require("@nestjs/common");
12
12
  const zola_health_fallback_controller_1 = require("./zola-health-fallback.controller");
13
13
  const zola_health_constants_1 = require("./zola-health.constants");
14
14
  const zola_health_options_1 = require("./zola-health-options");
15
+ const resolve_host_module_1 = require("./resolve-host-module");
15
16
  function isTerminusAvailable() {
16
17
  try {
17
- require.resolve('@nestjs/terminus');
18
+ require.resolve('@nestjs/terminus', { paths: (0, resolve_host_module_1.hostModuleResolvePaths)() });
18
19
  return true;
19
20
  }
20
21
  catch (_a) {
@@ -28,18 +29,20 @@ let ZolaHealthModule = ZolaHealthModule_1 = class ZolaHealthModule {
28
29
  if (!isTerminusAvailable()) {
29
30
  return {
30
31
  module: ZolaHealthModule_1,
31
- controllers: [(0, zola_health_fallback_controller_1.createZolaHealthFallbackController)(path)],
32
+ controllers: [(0, zola_health_fallback_controller_1.createZolaHealthFallbackController)(path, merged)],
32
33
  };
33
34
  }
34
- const { TerminusModule } = require('@nestjs/terminus');
35
+ const { TerminusModule } = (0, resolve_host_module_1.requireHostModule)('@nestjs/terminus');
35
36
  const { createZolaTerminusHealthController } = require('./zola-terminus-health.controller');
36
- const ControllerClass = createZolaTerminusHealthController(path);
37
+ const ControllerClass = createZolaTerminusHealthController(path, merged);
37
38
  if (merged.rabbitmq &&
38
39
  process.env.NODE_ENV !== 'production') {
39
40
  let rmqOk = false;
40
41
  try {
41
- require.resolve('@nestjs/microservices');
42
- require.resolve('amqplib');
42
+ require.resolve('@nestjs/microservices', {
43
+ paths: (0, resolve_host_module_1.hostModuleResolvePaths)(),
44
+ });
45
+ require.resolve('amqplib', { paths: (0, resolve_host_module_1.hostModuleResolvePaths)() });
43
46
  rmqOk = Boolean(process.env.RMQ_URL);
44
47
  }
45
48
  catch (_a) {
@@ -1 +1 @@
1
- {"version":3,"file":"health.module.js","sourceRoot":"","sources":["../src/health.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAuD;AACvD,uFAAuF;AACvF,mEAA8D;AAC9D,+DAG+B;AAE/B,SAAS,mBAAmB;IAC1B,IAAI,CAAC;QACH,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;QACpC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,WAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAGM,IAAM,gBAAgB,wBAAtB,MAAM,gBAAgB;IAC3B,MAAM,CAAC,OAAO,CAAC,UAAmC,EAAE;QAClD,MAAM,MAAM,GAAG,IAAA,gDAA0B,EAAC,OAAO,CAAC,CAAC;QACnD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QAEzB,IAAI,CAAC,mBAAmB,EAAE,EAAE,CAAC;YAC3B,OAAO;gBACL,MAAM,EAAE,kBAAgB;gBACxB,WAAW,EAAE,CAAC,IAAA,oEAAkC,EAAC,IAAI,CAAC,CAAC;aACxD,CAAC;QACJ,CAAC;QAED,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;QACvD,MAAM,EAAE,kCAAkC,EAAE,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;QAC5F,MAAM,eAAe,GAAG,kCAAk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;YACL,MAAM,EAAE,kBAAgB;YACxB,OAAO,EAAE,CAAC,cAAc,CAAC;YACzB,WAAW,EAAE,CAAC,eAAe,CAAC;YAC9B,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,2CAAmB,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;SAChE,CAAC;IACJ,CAAC;CACF,CAAA;AA9CY,4CAAgB;AAiDA,wCAAY;kDAjD5B,gBAAgB;IAD5B,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,gBAAgB,CA8C5B"}
@@ -0,0 +1,2 @@
1
+ export declare function hostModuleResolvePaths(): string[];
2
+ export declare function requireHostModule<T = unknown>(specifier: string): T;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.hostModuleResolvePaths = hostModuleResolvePaths;
4
+ exports.requireHostModule = requireHostModule;
5
+ function hostModuleResolvePaths() {
6
+ const paths = [];
7
+ if (typeof process !== 'undefined' && typeof process.cwd === 'function') {
8
+ paths.push(process.cwd());
9
+ }
10
+ paths.push(__dirname);
11
+ return paths;
12
+ }
13
+ function requireHostModule(specifier) {
14
+ const resolved = require.resolve(specifier, {
15
+ paths: hostModuleResolvePaths(),
16
+ });
17
+ return require(resolved);
18
+ }
19
+ //# sourceMappingURL=resolve-host-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-host-module.js","sourceRoot":"","sources":["../src/resolve-host-module.ts"],"names":[],"mappings":";;AAKA,wDAOC;AAED,8CAKC;AAdD,SAAgB,sBAAsB;IACpC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,OAAO,CAAC,GAAG,KAAK,UAAU,EAAE,CAAC;QACxE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAC5B,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACtB,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAgB,iBAAiB,CAAc,SAAiB;IAC9D,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE;QAC1C,KAAK,EAAE,sBAAsB,EAAE;KAChC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC,QAAQ,CAAM,CAAC;AAChC,CAAC"}
@@ -1,4 +1,4 @@
1
- export declare function createZolaHealthFallbackController(routePath: string): {
1
+ export declare function createZolaHealthFallbackController(routePath: string, opts?: import('./zola-health-options').NormalizedZolaHealthModuleOptions): {
2
2
  new (): {
3
3
  health(): {
4
4
  status: string;
@@ -7,4 +7,26 @@ export declare function createZolaHealthFallbackController(routePath: string): {
7
7
  timestamp: string;
8
8
  };
9
9
  };
10
+ } | {
11
+ new (): {
12
+ live(): {
13
+ status: string;
14
+ probe: string;
15
+ mode: string;
16
+ timestamp: string;
17
+ };
18
+ ready(): {
19
+ status: string;
20
+ probe: string;
21
+ mode: string;
22
+ hint: string;
23
+ timestamp: string;
24
+ };
25
+ root(): {
26
+ status: string;
27
+ mode: string;
28
+ hint: string;
29
+ timestamp: string;
30
+ };
31
+ };
10
32
  };
@@ -12,9 +12,53 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.createZolaHealthFallbackController = createZolaHealthFallbackController;
13
13
  const common_1 = require("@nestjs/common");
14
14
  const zola_health_public_decorator_1 = require("./zola-health-public.decorator");
15
- function createZolaHealthFallbackController(routePath) {
16
- let ZolaHealthFallbackController = class ZolaHealthFallbackController {
17
- health() {
15
+ function createZolaHealthFallbackController(routePath, opts) {
16
+ var _a, _b;
17
+ const split = (opts === null || opts === void 0 ? void 0 : opts.splitLivenessReadiness) === true;
18
+ const live = (_a = opts === null || opts === void 0 ? void 0 : opts.livenessPath) !== null && _a !== void 0 ? _a : 'live';
19
+ const ready = (_b = opts === null || opts === void 0 ? void 0 : opts.readinessPath) !== null && _b !== void 0 ? _b : 'ready';
20
+ if (!split) {
21
+ let ZolaHealthFallbackController = class ZolaHealthFallbackController {
22
+ health() {
23
+ return {
24
+ status: 'ok',
25
+ mode: 'minimal',
26
+ hint: 'Install @nestjs/terminus for database and integration health checks.',
27
+ timestamp: new Date().toISOString(),
28
+ };
29
+ }
30
+ };
31
+ __decorate([
32
+ (0, common_1.Get)(),
33
+ (0, zola_health_public_decorator_1.ZolaHealthPublic)(),
34
+ __metadata("design:type", Function),
35
+ __metadata("design:paramtypes", []),
36
+ __metadata("design:returntype", void 0)
37
+ ], ZolaHealthFallbackController.prototype, "health", null);
38
+ ZolaHealthFallbackController = __decorate([
39
+ (0, common_1.Controller)(routePath)
40
+ ], ZolaHealthFallbackController);
41
+ return ZolaHealthFallbackController;
42
+ }
43
+ let ZolaHealthFallbackSplitController = class ZolaHealthFallbackSplitController {
44
+ live() {
45
+ return {
46
+ status: 'ok',
47
+ probe: 'liveness',
48
+ mode: 'minimal',
49
+ timestamp: new Date().toISOString(),
50
+ };
51
+ }
52
+ ready() {
53
+ return {
54
+ status: 'ok',
55
+ probe: 'readiness',
56
+ mode: 'minimal',
57
+ hint: 'Install @nestjs/terminus for database and integration health checks.',
58
+ timestamp: new Date().toISOString(),
59
+ };
60
+ }
61
+ root() {
18
62
  return {
19
63
  status: 'ok',
20
64
  mode: 'minimal',
@@ -23,16 +67,30 @@ function createZolaHealthFallbackController(routePath) {
23
67
  };
24
68
  }
25
69
  };
70
+ __decorate([
71
+ (0, common_1.Get)(live),
72
+ (0, zola_health_public_decorator_1.ZolaHealthPublic)(),
73
+ __metadata("design:type", Function),
74
+ __metadata("design:paramtypes", []),
75
+ __metadata("design:returntype", void 0)
76
+ ], ZolaHealthFallbackSplitController.prototype, "live", null);
77
+ __decorate([
78
+ (0, common_1.Get)(ready),
79
+ (0, zola_health_public_decorator_1.ZolaHealthPublic)(),
80
+ __metadata("design:type", Function),
81
+ __metadata("design:paramtypes", []),
82
+ __metadata("design:returntype", void 0)
83
+ ], ZolaHealthFallbackSplitController.prototype, "ready", null);
26
84
  __decorate([
27
85
  (0, common_1.Get)(),
28
86
  (0, zola_health_public_decorator_1.ZolaHealthPublic)(),
29
87
  __metadata("design:type", Function),
30
88
  __metadata("design:paramtypes", []),
31
89
  __metadata("design:returntype", void 0)
32
- ], ZolaHealthFallbackController.prototype, "health", null);
33
- ZolaHealthFallbackController = __decorate([
90
+ ], ZolaHealthFallbackSplitController.prototype, "root", null);
91
+ ZolaHealthFallbackSplitController = __decorate([
34
92
  (0, common_1.Controller)(routePath)
35
- ], ZolaHealthFallbackController);
36
- return ZolaHealthFallbackController;
93
+ ], ZolaHealthFallbackSplitController);
94
+ return ZolaHealthFallbackSplitController;
37
95
  }
38
96
  //# sourceMappingURL=zola-health-fallback.controller.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"zola-health-fallback.controller.js","sourceRoot":"","sources":["../src/zola-health-fallback.controller.ts"],"names":[],"mappings":";;;;;;;;;;;AAGA,gFAeC;AAlBD,2CAAiD;AACjD,iFAAkE;AAElE,SAAgB,kCAAkC,CAAC,SAAiB;IAElE,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;QAGhC,MAAM;YACJ,OAAO;gBACL,MAAM,EAAE,IAAI;gBACZ,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,sEAAsE;gBAC5E,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;aACpC,CAAC;QACJ,CAAC;KACF,CAAA;IARC;QAFC,IAAA,YAAG,GAAE;QACL,IAAA,+CAAgB,GAAE;;;;8DAQlB;IAVG,4BAA4B;QADjC,IAAA,mBAAU,EAAC,SAAS,CAAC;OAChB,4BAA4B,CAWjC;IACD,OAAO,4BAA4B,CAAC;AACtC,CAAC"}
1
+ {"version":3,"file":"zola-health-fallback.controller.js","sourceRoot":"","sources":["../src/zola-health-fallback.controller.ts"],"names":[],"mappings":";;;;;;;;;;;AAGA,gFA8DC;AAjED,2CAAiD;AACjD,iFAAkE;AAElE,SAAgB,kCAAkC,CAChD,SAAiB,EACjB,IAAwE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S;gBACf,IAAI,EAAE,sEAAsE;gBAC5E,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;aACpC,CAAC;QACJ,CAAC;KACF,CAAA;IA/BC;QAFC,IAAA,YAAG,EAAC,IAAI,CAAC;QACT,IAAA,+CAAgB,GAAE;;;;iEAQlB;IAID;QAFC,IAAA,YAAG,EAAC,KAAK,CAAC;QACV,IAAA,+CAAgB,GAAE;;;;kEASlB;IAID;QAFC,IAAA,YAAG,GAAE;QACL,IAAA,+CAAgB,GAAE;;;;iEAQlB;IAjCG,iCAAiC;QADtC,IAAA,mBAAU,EAAC,SAAS,CAAC;OAChB,iCAAiC,CAkCtC;IACD,OAAO,iCAAiC,CAAC;AAC3C,CAAC"}
@@ -1,5 +1,8 @@
1
1
  export interface ZolaHealthModuleOptions {
2
2
  path?: string;
3
+ splitLivenessReadiness?: boolean;
4
+ livenessPath?: string;
5
+ readinessPath?: string;
3
6
  typeorm?: boolean | string;
4
7
  rabbitmq?: boolean;
5
8
  minio?: boolean;
@@ -11,6 +14,9 @@ export interface ZolaHealthModuleOptions {
11
14
  }
12
15
  export interface NormalizedZolaHealthModuleOptions {
13
16
  path: string;
17
+ splitLivenessReadiness: boolean;
18
+ livenessPath: string;
19
+ readinessPath: string;
14
20
  typeorm: boolean | string;
15
21
  rabbitmq: boolean;
16
22
  minio: boolean;
@@ -2,14 +2,17 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeZolaHealthOptions = normalizeZolaHealthOptions;
4
4
  function normalizeZolaHealthOptions(options = {}) {
5
- var _a, _b;
5
+ var _a, _b, _c, _d;
6
6
  return {
7
7
  path: (_a = options.path) !== null && _a !== void 0 ? _a : 'health',
8
+ splitLivenessReadiness: options.splitLivenessReadiness === true,
9
+ livenessPath: (_b = options.livenessPath) !== null && _b !== void 0 ? _b : 'live',
10
+ readinessPath: (_c = options.readinessPath) !== null && _c !== void 0 ? _c : 'ready',
8
11
  typeorm: options.typeorm !== undefined ? options.typeorm : true,
9
12
  rabbitmq: options.rabbitmq === true,
10
13
  minio: options.minio === true,
11
14
  seaweed: options.seaweed === true,
12
- http: (_b = options.http) !== null && _b !== void 0 ? _b : [],
15
+ http: (_d = options.http) !== null && _d !== void 0 ? _d : [],
13
16
  };
14
17
  }
15
18
  //# sourceMappingURL=zola-health-options.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"zola-health-options.js","sourceRoot":"","sources":["../src/zola-health-options.ts"],"names":[],"mappings":";;AA4BA,gEAWC;AAXD,SAAgB,0BAA0B,CACxC,UAAmC,EAAE;;IAErC,OAAO;QACL,IAAI,EAAE,MAAA,OAAO,CAAC,IAAI,mCAAI,QAAQ;QAC9B,OAAO,EAAE,OAAO,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI;QAC/D,QAAQ,EAAE,OAAO,CAAC,QAAQ,KAAK,IAAI;QACnC,KAAK,EAAE,OAAO,CAAC,KAAK,KAAK,IAAI;QAC7B,OAAO,EAAE,OAAO,CAAC,OAAO,KAAK,IAAI;QACjC,IAAI,EAAE,MAAA,OAAO,CAAC,IAAI,mCAAI,EAAE;KACzB,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"zola-health-options.js","sourceRoot":"","sources":["../src/zola-health-options.ts"],"names":[],"mappings":";;AAwCA,gEAcC;AAdD,SAAgB,0BAA0B,CACxC,UAAmC,EAAE;;IAErC,OAAO;QACL,IAAI,EAAE,MAAA,OAAO,CAAC,IAAI,mCAAI,QAAQ;QAC9B,sBAAsB,EAAE,OAAO,CAAC,sBAAsB,KAAK,IAAI;QAC/D,YAAY,EAAE,MAAA,OAAO,CAAC,YAAY,mCAAI,MAAM;QAC5C,aAAa,EAAE,MAAA,OAAO,CAAC,aAAa,mCAAI,OAAO;QAC/C,OAAO,EAAE,OAAO,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI;QAC/D,QAAQ,EAAE,OAAO,CAAC,QAAQ,KAAK,IAAI;QACnC,KAAK,EAAE,OAAO,CAAC,KAAK,KAAK,IAAI;QAC7B,OAAO,EAAE,OAAO,CAAC,OAAO,KAAK,IAAI;QACjC,IAAI,EAAE,MAAA,OAAO,CAAC,IAAI,mCAAI,EAAE;KACzB,CAAC;AACJ,CAAC"}
@@ -1,12 +1,22 @@
1
- import { HealthCheckService, MemoryHealthIndicator, MicroserviceHealthIndicator, TypeOrmHealthIndicator } from '@nestjs/terminus';
2
1
  import type { NormalizedZolaHealthModuleOptions } from './zola-health-options';
3
- export declare function createZolaTerminusHealthController(routePath: string): {
4
- new (health: HealthCheckService, memory: MemoryHealthIndicator, opts: NormalizedZolaHealthModuleOptions, typeOrm?: TypeOrmHealthIndicator, microservice?: MicroserviceHealthIndicator): {
5
- readonly health: HealthCheckService;
6
- readonly memory: MemoryHealthIndicator;
2
+ export declare function createZolaTerminusHealthController(routePath: string, normalizedOpts: NormalizedZolaHealthModuleOptions): {
3
+ new (health: InstanceType<typeof import("@nestjs/terminus").HealthCheckService>, memory: InstanceType<typeof import("@nestjs/terminus").MemoryHealthIndicator>, opts: NormalizedZolaHealthModuleOptions, typeOrm?: InstanceType<typeof import("@nestjs/terminus").TypeOrmHealthIndicator>, microservice?: InstanceType<typeof import("@nestjs/terminus").MicroserviceHealthIndicator>): {
4
+ readonly health: InstanceType<typeof import("@nestjs/terminus").HealthCheckService>;
5
+ readonly memory: InstanceType<typeof import("@nestjs/terminus").MemoryHealthIndicator>;
7
6
  readonly opts: NormalizedZolaHealthModuleOptions;
8
- readonly typeOrm?: TypeOrmHealthIndicator;
9
- readonly microservice?: MicroserviceHealthIndicator;
7
+ readonly typeOrm?: InstanceType<typeof import("@nestjs/terminus").TypeOrmHealthIndicator>;
8
+ readonly microservice?: InstanceType<typeof import("@nestjs/terminus").MicroserviceHealthIndicator>;
10
9
  check(): Promise<import("@nestjs/terminus").HealthCheckResult<import("@nestjs/terminus").HealthIndicatorResult<string, import("@nestjs/terminus").HealthIndicatorStatus, Record<string, any>>, Partial<import("@nestjs/terminus").HealthIndicatorResult<string, import("@nestjs/terminus").HealthIndicatorStatus, Record<string, any>>>, Partial<import("@nestjs/terminus").HealthIndicatorResult<string, import("@nestjs/terminus").HealthIndicatorStatus, Record<string, any>>>>>;
11
10
  };
11
+ } | {
12
+ new (health: InstanceType<typeof import("@nestjs/terminus").HealthCheckService>, memory: InstanceType<typeof import("@nestjs/terminus").MemoryHealthIndicator>, opts: NormalizedZolaHealthModuleOptions, typeOrm?: InstanceType<typeof import("@nestjs/terminus").TypeOrmHealthIndicator>, microservice?: InstanceType<typeof import("@nestjs/terminus").MicroserviceHealthIndicator>): {
13
+ readonly health: InstanceType<typeof import("@nestjs/terminus").HealthCheckService>;
14
+ readonly memory: InstanceType<typeof import("@nestjs/terminus").MemoryHealthIndicator>;
15
+ readonly opts: NormalizedZolaHealthModuleOptions;
16
+ readonly typeOrm?: InstanceType<typeof import("@nestjs/terminus").TypeOrmHealthIndicator>;
17
+ readonly microservice?: InstanceType<typeof import("@nestjs/terminus").MicroserviceHealthIndicator>;
18
+ liveness(): Promise<import("@nestjs/terminus").HealthCheckResult<import("@nestjs/terminus").HealthIndicatorResult<string, import("@nestjs/terminus").HealthIndicatorStatus, Record<string, any>> & import("@nestjs/terminus").HealthIndicatorResult<"memory">, Partial<import("@nestjs/terminus").HealthIndicatorResult<string, import("@nestjs/terminus").HealthIndicatorStatus, Record<string, any>> & import("@nestjs/terminus").HealthIndicatorResult<"memory">>, Partial<import("@nestjs/terminus").HealthIndicatorResult<string, import("@nestjs/terminus").HealthIndicatorStatus, Record<string, any>> & import("@nestjs/terminus").HealthIndicatorResult<"memory">>>>;
19
+ readiness(): Promise<import("@nestjs/terminus").HealthCheckResult<import("@nestjs/terminus").HealthIndicatorResult<string, import("@nestjs/terminus").HealthIndicatorStatus, Record<string, any>>, Partial<import("@nestjs/terminus").HealthIndicatorResult<string, import("@nestjs/terminus").HealthIndicatorStatus, Record<string, any>>>, Partial<import("@nestjs/terminus").HealthIndicatorResult<string, import("@nestjs/terminus").HealthIndicatorStatus, Record<string, any>>>>>;
20
+ root(): Promise<import("@nestjs/terminus").HealthCheckResult<import("@nestjs/terminus").HealthIndicatorResult<string, import("@nestjs/terminus").HealthIndicatorStatus, Record<string, any>>, Partial<import("@nestjs/terminus").HealthIndicatorResult<string, import("@nestjs/terminus").HealthIndicatorStatus, Record<string, any>>>, Partial<import("@nestjs/terminus").HealthIndicatorResult<string, import("@nestjs/terminus").HealthIndicatorStatus, Record<string, any>>>>>;
21
+ };
12
22
  };
@@ -14,8 +14,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.createZolaTerminusHealthController = createZolaTerminusHealthController;
16
16
  const common_1 = require("@nestjs/common");
17
- const terminus_1 = require("@nestjs/terminus");
18
- const microservices_1 = require("@nestjs/microservices");
17
+ const resolve_host_module_1 = require("./resolve-host-module");
19
18
  const zola_health_constants_1 = require("./zola-health.constants");
20
19
  const zola_health_public_decorator_1 = require("./zola-health-public.decorator");
21
20
  function buildMinioHealthUrl() {
@@ -39,42 +38,133 @@ function buildSeaweedHealthUrl() {
39
38
  }
40
39
  return base.replace(/\/$/, '') + '/';
41
40
  }
42
- async function zolaHttpPing(key, url, timeoutMs = 3000) {
43
- const ac = new AbortController();
44
- const timer = setTimeout(() => ac.abort(), timeoutMs);
41
+ function isRabbitMqPingAvailable() {
45
42
  try {
46
- const res = await fetch(url, {
47
- signal: ac.signal,
48
- method: 'GET',
49
- redirect: 'follow',
50
- });
51
- if (res.status >= 500) {
52
- throw new terminus_1.HealthCheckError(`${key} responded with ${res.status}`, { [key]: { status: 'down', message: `HTTP ${res.status}` } });
53
- }
54
- return { [key]: { status: 'up' } };
55
- }
56
- catch (err) {
57
- const message = err instanceof Error ? err.message : String(err);
58
- throw new terminus_1.HealthCheckError(`${key} is not available`, {
59
- [key]: { status: 'down', message },
43
+ require.resolve('@nestjs/microservices', {
44
+ paths: (0, resolve_host_module_1.hostModuleResolvePaths)(),
60
45
  });
46
+ require.resolve('amqplib', { paths: (0, resolve_host_module_1.hostModuleResolvePaths)() });
47
+ return Boolean(process.env.RMQ_URL);
61
48
  }
62
- finally {
63
- clearTimeout(timer);
49
+ catch (_a) {
50
+ return false;
64
51
  }
65
52
  }
66
- function isRabbitMqPingAvailable() {
53
+ function createZolaTerminusHealthController(routePath, normalizedOpts) {
54
+ const { HealthCheck, HealthCheckService, HealthCheckError, MemoryHealthIndicator, MicroserviceHealthIndicator, TypeOrmHealthIndicator, } = (0, resolve_host_module_1.requireHostModule)('@nestjs/terminus');
55
+ let Transport;
67
56
  try {
68
- require.resolve('@nestjs/microservices');
69
- require.resolve('amqplib');
70
- return Boolean(process.env.RMQ_URL);
57
+ ({ Transport } = (0, resolve_host_module_1.requireHostModule)('@nestjs/microservices'));
71
58
  }
72
59
  catch (_a) {
73
- return false;
60
+ Transport = undefined;
74
61
  }
75
- }
76
- function createZolaTerminusHealthController(routePath) {
77
- let ZolaTerminusHealthController = class ZolaTerminusHealthController {
62
+ async function zolaHttpPing(key, url, timeoutMs = 3000) {
63
+ const ac = new AbortController();
64
+ const timer = setTimeout(() => ac.abort(), timeoutMs);
65
+ try {
66
+ const res = await fetch(url, {
67
+ signal: ac.signal,
68
+ method: 'GET',
69
+ redirect: 'follow',
70
+ });
71
+ if (res.status >= 500) {
72
+ throw new HealthCheckError(`${key} responded with ${res.status}`, { [key]: { status: 'down', message: `HTTP ${res.status}` } });
73
+ }
74
+ return { [key]: { status: 'up' } };
75
+ }
76
+ catch (err) {
77
+ const message = err instanceof Error ? err.message : String(err);
78
+ throw new HealthCheckError(`${key} is not available`, {
79
+ [key]: { status: 'down', message },
80
+ });
81
+ }
82
+ finally {
83
+ clearTimeout(timer);
84
+ }
85
+ }
86
+ const HEAP_LIMIT = 64 * 1024 * 1024 * 1024;
87
+ function buildReadinessChecks(ctx) {
88
+ const checks = [];
89
+ const typeormOpt = ctx.opts.typeorm;
90
+ if (typeormOpt !== false && ctx.typeOrm) {
91
+ const key = typeof typeormOpt === 'string' ? typeormOpt : 'database';
92
+ checks.push(() => ctx.typeOrm.pingCheck(key, { timeout: 2000 }));
93
+ }
94
+ if (ctx.opts.rabbitmq &&
95
+ ctx.microservice &&
96
+ Transport &&
97
+ isRabbitMqPingAvailable()) {
98
+ checks.push(() => ctx.microservice.pingCheck('rabbitmq', {
99
+ transport: Transport.RMQ,
100
+ timeout: 3000,
101
+ options: {
102
+ urls: [process.env.RMQ_URL],
103
+ },
104
+ }));
105
+ }
106
+ if (ctx.opts.minio) {
107
+ const minioUrl = buildMinioHealthUrl();
108
+ if (minioUrl) {
109
+ checks.push(() => zolaHttpPing('minio', minioUrl));
110
+ }
111
+ }
112
+ if (ctx.opts.seaweed) {
113
+ const seaweedUrl = buildSeaweedHealthUrl();
114
+ if (seaweedUrl) {
115
+ checks.push(() => zolaHttpPing('seaweed', seaweedUrl));
116
+ }
117
+ }
118
+ for (const h of ctx.opts.http) {
119
+ checks.push(() => zolaHttpPing(h.name, h.url));
120
+ }
121
+ if (checks.length === 0) {
122
+ checks.push(() => ctx.memory.checkHeap('memory', HEAP_LIMIT));
123
+ }
124
+ return checks;
125
+ }
126
+ if (!normalizedOpts.splitLivenessReadiness) {
127
+ let ZolaTerminusHealthSingle = class ZolaTerminusHealthSingle {
128
+ constructor(health, memory, opts, typeOrm, microservice) {
129
+ this.health = health;
130
+ this.memory = memory;
131
+ this.opts = opts;
132
+ this.typeOrm = typeOrm;
133
+ this.microservice = microservice;
134
+ }
135
+ check() {
136
+ const ctx = {
137
+ health: this.health,
138
+ memory: this.memory,
139
+ opts: this.opts,
140
+ typeOrm: this.typeOrm,
141
+ microservice: this.microservice,
142
+ };
143
+ return this.health.check(buildReadinessChecks(ctx));
144
+ }
145
+ };
146
+ __decorate([
147
+ (0, common_1.Get)(),
148
+ HealthCheck(),
149
+ (0, zola_health_public_decorator_1.ZolaHealthPublic)(),
150
+ __metadata("design:type", Function),
151
+ __metadata("design:paramtypes", []),
152
+ __metadata("design:returntype", void 0)
153
+ ], ZolaTerminusHealthSingle.prototype, "check", null);
154
+ ZolaTerminusHealthSingle = __decorate([
155
+ (0, common_1.Controller)(routePath),
156
+ __param(0, (0, common_1.Inject)(HealthCheckService)),
157
+ __param(1, (0, common_1.Inject)(MemoryHealthIndicator)),
158
+ __param(2, (0, common_1.Inject)(zola_health_constants_1.ZOLA_HEALTH_OPTIONS)),
159
+ __param(3, (0, common_1.Optional)()),
160
+ __param(3, (0, common_1.Inject)(TypeOrmHealthIndicator)),
161
+ __param(4, (0, common_1.Optional)()),
162
+ __param(4, (0, common_1.Inject)(MicroserviceHealthIndicator)),
163
+ __metadata("design:paramtypes", [void 0, void 0, Object, void 0, void 0])
164
+ ], ZolaTerminusHealthSingle);
165
+ return ZolaTerminusHealthSingle;
166
+ }
167
+ let ZolaTerminusHealthSplit = class ZolaTerminusHealthSplit {
78
168
  constructor(health, memory, opts, typeOrm, microservice) {
79
169
  this.health = health;
80
170
  this.memory = memory;
@@ -82,60 +172,67 @@ function createZolaTerminusHealthController(routePath) {
82
172
  this.typeOrm = typeOrm;
83
173
  this.microservice = microservice;
84
174
  }
85
- check() {
86
- const checks = [];
87
- const typeormOpt = this.opts.typeorm;
88
- if (typeormOpt !== false && this.typeOrm) {
89
- const key = typeof typeormOpt === 'string' ? typeormOpt : 'database';
90
- checks.push(() => this.typeOrm.pingCheck(key, { timeout: 2000 }));
91
- }
92
- if (this.opts.rabbitmq && this.microservice && isRabbitMqPingAvailable()) {
93
- checks.push(() => this.microservice.pingCheck('rabbitmq', {
94
- transport: microservices_1.Transport.RMQ,
95
- timeout: 3000,
96
- options: {
97
- urls: [process.env.RMQ_URL],
98
- },
99
- }));
100
- }
101
- if (this.opts.minio) {
102
- const minioUrl = buildMinioHealthUrl();
103
- if (minioUrl) {
104
- checks.push(() => zolaHttpPing('minio', minioUrl));
105
- }
106
- }
107
- if (this.opts.seaweed) {
108
- const seaweedUrl = buildSeaweedHealthUrl();
109
- if (seaweedUrl) {
110
- checks.push(() => zolaHttpPing('seaweed', seaweedUrl));
111
- }
112
- }
113
- for (const h of this.opts.http) {
114
- checks.push(() => zolaHttpPing(h.name, h.url));
115
- }
116
- if (checks.length === 0) {
117
- checks.push(() => this.memory.checkHeap('memory', 64 * 1024 * 1024 * 1024));
118
- }
119
- return this.health.check(checks);
175
+ liveness() {
176
+ return this.health.check([
177
+ () => this.memory.checkHeap('memory', HEAP_LIMIT),
178
+ ]);
179
+ }
180
+ readiness() {
181
+ const ctx = {
182
+ health: this.health,
183
+ memory: this.memory,
184
+ opts: this.opts,
185
+ typeOrm: this.typeOrm,
186
+ microservice: this.microservice,
187
+ };
188
+ return this.health.check(buildReadinessChecks(ctx));
189
+ }
190
+ root() {
191
+ const ctx = {
192
+ health: this.health,
193
+ memory: this.memory,
194
+ opts: this.opts,
195
+ typeOrm: this.typeOrm,
196
+ microservice: this.microservice,
197
+ };
198
+ return this.health.check(buildReadinessChecks(ctx));
120
199
  }
121
200
  };
201
+ __decorate([
202
+ (0, common_1.Get)(normalizedOpts.livenessPath),
203
+ HealthCheck(),
204
+ (0, zola_health_public_decorator_1.ZolaHealthPublic)(),
205
+ __metadata("design:type", Function),
206
+ __metadata("design:paramtypes", []),
207
+ __metadata("design:returntype", void 0)
208
+ ], ZolaTerminusHealthSplit.prototype, "liveness", null);
209
+ __decorate([
210
+ (0, common_1.Get)(normalizedOpts.readinessPath),
211
+ HealthCheck(),
212
+ (0, zola_health_public_decorator_1.ZolaHealthPublic)(),
213
+ __metadata("design:type", Function),
214
+ __metadata("design:paramtypes", []),
215
+ __metadata("design:returntype", void 0)
216
+ ], ZolaTerminusHealthSplit.prototype, "readiness", null);
122
217
  __decorate([
123
218
  (0, common_1.Get)(),
124
- (0, terminus_1.HealthCheck)(),
219
+ HealthCheck(),
125
220
  (0, zola_health_public_decorator_1.ZolaHealthPublic)(),
126
221
  __metadata("design:type", Function),
127
222
  __metadata("design:paramtypes", []),
128
223
  __metadata("design:returntype", void 0)
129
- ], ZolaTerminusHealthController.prototype, "check", null);
130
- ZolaTerminusHealthController = __decorate([
224
+ ], ZolaTerminusHealthSplit.prototype, "root", null);
225
+ ZolaTerminusHealthSplit = __decorate([
131
226
  (0, common_1.Controller)(routePath),
227
+ __param(0, (0, common_1.Inject)(HealthCheckService)),
228
+ __param(1, (0, common_1.Inject)(MemoryHealthIndicator)),
132
229
  __param(2, (0, common_1.Inject)(zola_health_constants_1.ZOLA_HEALTH_OPTIONS)),
133
230
  __param(3, (0, common_1.Optional)()),
231
+ __param(3, (0, common_1.Inject)(TypeOrmHealthIndicator)),
134
232
  __param(4, (0, common_1.Optional)()),
135
- __metadata("design:paramtypes", [terminus_1.HealthCheckService,
136
- terminus_1.MemoryHealthIndicator, Object, terminus_1.TypeOrmHealthIndicator,
137
- terminus_1.MicroserviceHealthIndicator])
138
- ], ZolaTerminusHealthController);
139
- return ZolaTerminusHealthController;
233
+ __param(4, (0, common_1.Inject)(MicroserviceHealthIndicator)),
234
+ __metadata("design:paramtypes", [void 0, void 0, Object, void 0, void 0])
235
+ ], ZolaTerminusHealthSplit);
236
+ return ZolaTerminusHealthSplit;
140
237
  }
141
238
  //# sourceMappingURL=zola-terminus-health.controller.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"zola-terminus-health.controller.js","sourceRoot":"","sources":["../src/zola-terminus-health.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AA4EA,gFAgEC;AA5ID,2CAAmE;AACnE,+CAO0B;AAC1B,yDAAkD;AAClD,mEAA8D;AAC9D,iFAAkE;AAGlE,SAAS,mBAAmB;;IAC1B,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;IACxC,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,IAAI,GAAG,MAAA,OAAO,CAAC,G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,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;gBACzD,CAAC;YACH,CAAC;YAED,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;gBAC/B,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACjD,CAAC;YAED,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACxB,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CACf,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CACzD,CAAC;YACJ,CAAC;YAED,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACnC,CAAC;KACF,CAAA;IA/CC;QAHC,IAAA,YAAG,GAAE;QACL,IAAA,sBAAW,GAAE;QACb,IAAA,+CAAgB,GAAE;;;;6DA+ClB;IA3DG,4BAA4B;QADjC,IAAA,mBAAU,EAAC,SAAS,CAAC;QAKjB,WAAA,IAAA,eAAM,EAAC,2CAAmB,CAAC,CAAA;QAE3B,WAAA,IAAA,iBAAQ,GAAE,CAAA;QACV,WAAA,IAAA,iBAAQ,GAAE,CAAA;yCALa,6BAAkB;YAClB,gCAAqB,UAGP,iCAAsB;YACjB,sCAA2B;OAPpE,4BAA4B,CA4DjC;IACD,OAAO,4BAA4B,CAAC;AACtC,CAAC"}
1
+ {"version":3,"file":"zola-terminus-health.controller.js","sourceRoot":"","sources":["../src/zola-terminus-health.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAwCA,gFA+MC;AAvPD,2CAAmE;AACnE,+DAAkF;AAClF,mEAA8D;AAC9D,iFAAkE;AAGlE,SAAS,mBAAmB;;IAC1B,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,cA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CAAC,CAAA;QAE7B,WAAA,IAAA,eAAM,EAAC,2CAAmB,CAAC,CAAA;QAE3B,WAAA,IAAA,iBAAQ,GAAE,CAAA;QACV,WAAA,IAAA,eAAM,EAAC,sBAAsB,CAAC,CAAA;QAE9B,WAAA,IAAA,iBAAQ,GAAE,CAAA;QACV,WAAA,IAAA,eAAM,EAAC,2BAA2B,CAAC,CAAA;;OAZlC,uBAAuB,CAsD5B;IACD,OAAO,uBAAuB,CAAC;AACjC,CAAC"}
package/package.json CHANGED
@@ -1,88 +1,88 @@
1
- {
2
- "name": "@zola_do/health",
3
- "version": "0.2.5",
4
- "description": "NestJS health checks (Terminus) aligned with @zola_do TypeORM, RabbitMQ, and storage env patterns",
5
- "author": "zolaDO",
6
- "license": "ISC",
7
- "sideEffects": false,
8
- "engines": {
9
- "node": ">=20.0.0"
10
- },
11
- "publishConfig": {
12
- "access": "public"
13
- },
14
- "main": "./dist/index.js",
15
- "types": "./dist/index.d.ts",
16
- "exports": {
17
- ".": {
18
- "types": "./dist/index.d.ts",
19
- "require": "./dist/index.js",
20
- "default": "./dist/index.js"
21
- }
22
- },
23
- "files": [
24
- "dist",
25
- "README.md"
26
- ],
27
- "scripts": {
28
- "clean": "rimraf dist",
29
- "typecheck": "tsc --noEmit",
30
- "build": "npm run clean && tsc",
31
- "prepublishOnly": "npm run build"
32
- },
33
- "peerDependencies": {
34
- "@nestjs/common": "^10.0.0 || ^11.0.0",
35
- "@nestjs/core": "^10.0.0 || ^11.0.0",
36
- "@nestjs/microservices": "^10.0.0 || ^11.0.0",
37
- "@nestjs/terminus": "^10.0.0 || ^11.0.0",
38
- "@nestjs/typeorm": "^10.0.0 || ^11.0.0",
39
- "amqplib": "^0.10.0",
40
- "reflect-metadata": "^0.1.0 || ^0.2.0",
41
- "rxjs": "^7.0.0 || ^8.0.0",
42
- "typeorm": "^0.3.0"
43
- },
44
- "peerDependenciesMeta": {
45
- "@nestjs/terminus": {
46
- "optional": true
47
- },
48
- "@nestjs/microservices": {
49
- "optional": true
50
- },
51
- "@nestjs/typeorm": {
52
- "optional": true
53
- },
54
- "amqplib": {
55
- "optional": true
56
- },
57
- "typeorm": {
58
- "optional": true
59
- }
60
- },
61
- "devDependencies": {
62
- "rimraf": "^6.1.3",
63
- "typescript": "^5.9.3"
64
- },
65
- "repository": {
66
- "directory": "packages/health",
67
- "type": "git",
68
- "url": "https://github.com/zola0031/zola-nestjs-shared.git"
69
- },
70
- "homepage": "https://github.com/zola0031/zola-nestjs-shared#readme",
71
- "bugs": {
72
- "url": "https://github.com/zola0031/zola-nestjs-shared/issues"
73
- },
74
- "funding": {
75
- "type": "github",
76
- "url": "https://github.com/sponsors/zola0031"
77
- },
78
- "keywords": [
79
- "nestjs",
80
- "typescript",
81
- "health",
82
- "terminus",
83
- "readiness",
84
- "liveness",
85
- "zola_do",
86
- "nestjs-shared"
87
- ]
88
- }
1
+ {
2
+ "name": "@zola_do/health",
3
+ "version": "0.2.8",
4
+ "description": "NestJS health checks (Terminus) aligned with @zola_do TypeORM, RabbitMQ, and storage env patterns",
5
+ "author": "zolaDO",
6
+ "license": "ISC",
7
+ "sideEffects": false,
8
+ "engines": {
9
+ "node": ">=20.0.0"
10
+ },
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "main": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "require": "./dist/index.js",
20
+ "default": "./dist/index.js"
21
+ }
22
+ },
23
+ "files": [
24
+ "dist",
25
+ "README.md"
26
+ ],
27
+ "scripts": {
28
+ "clean": "rimraf dist",
29
+ "typecheck": "tsc --noEmit",
30
+ "build": "npm run clean && tsc",
31
+ "prepublishOnly": "npm run build"
32
+ },
33
+ "peerDependencies": {
34
+ "@nestjs/common": "^10.0.0 || ^11.0.0",
35
+ "@nestjs/core": "^10.0.0 || ^11.0.0",
36
+ "@nestjs/microservices": "^10.0.0 || ^11.0.0",
37
+ "@nestjs/terminus": "^10.0.0 || ^11.0.0",
38
+ "@nestjs/typeorm": "^10.0.0 || ^11.0.0",
39
+ "amqplib": "^0.10.0",
40
+ "reflect-metadata": "^0.1.0 || ^0.2.0",
41
+ "rxjs": "^7.0.0 || ^8.0.0",
42
+ "typeorm": "^0.3.0"
43
+ },
44
+ "peerDependenciesMeta": {
45
+ "@nestjs/terminus": {
46
+ "optional": true
47
+ },
48
+ "@nestjs/microservices": {
49
+ "optional": true
50
+ },
51
+ "@nestjs/typeorm": {
52
+ "optional": true
53
+ },
54
+ "amqplib": {
55
+ "optional": true
56
+ },
57
+ "typeorm": {
58
+ "optional": true
59
+ }
60
+ },
61
+ "devDependencies": {
62
+ "rimraf": "^6.1.3",
63
+ "typescript": "^5.9.3"
64
+ },
65
+ "repository": {
66
+ "directory": "packages/health",
67
+ "type": "git",
68
+ "url": "https://github.com/zola0031/zola-nestjs-shared.git"
69
+ },
70
+ "homepage": "https://github.com/zola0031/zola-nestjs-shared#readme",
71
+ "bugs": {
72
+ "url": "https://github.com/zola0031/zola-nestjs-shared/issues"
73
+ },
74
+ "funding": {
75
+ "type": "github",
76
+ "url": "https://github.com/sponsors/zola0031"
77
+ },
78
+ "keywords": [
79
+ "nestjs",
80
+ "typescript",
81
+ "health",
82
+ "terminus",
83
+ "readiness",
84
+ "liveness",
85
+ "zola_do",
86
+ "nestjs-shared"
87
+ ]
88
+ }