@lyrolab/nest-shared 1.0.3 → 1.1.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 CHANGED
@@ -1,9 +1,9 @@
1
- ## [1.0.3](https://github.com/lyrolab/nest-shared/compare/v1.0.2...v1.0.3) (2025-04-10)
1
+ ## [1.1.1](https://github.com/lyrolab/nest-shared/compare/v1.1.0...v1.1.1) (2025-04-10)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * rename ai module ([cadae82](https://github.com/lyrolab/nest-shared/commit/cadae824be5a5e6b4fb34eda5a513ef4625e3974))
6
+ * export health ([e56c4a6](https://github.com/lyrolab/nest-shared/commit/e56c4a6b3166313a9cede3a42f9b0611959d3860))
7
7
 
8
8
  ## [1.0.1](https://github.com/lyrolab/nest-shared/compare/v1.0.0...v1.0.1) (2025-04-10)
9
9
 
@@ -0,0 +1,7 @@
1
+ import { HealthCheckService, TypeOrmHealthIndicator } from "@nestjs/terminus";
2
+ export declare class HealthController {
3
+ private health;
4
+ private db;
5
+ constructor(health: HealthCheckService, db: TypeOrmHealthIndicator);
6
+ check(): Promise<import("@nestjs/terminus").HealthCheckResult>;
7
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.HealthController = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const terminus_1 = require("@nestjs/terminus");
15
+ let HealthController = class HealthController {
16
+ health;
17
+ db;
18
+ constructor(health, db) {
19
+ this.health = health;
20
+ this.db = db;
21
+ }
22
+ check() {
23
+ return this.health.check([() => this.db.pingCheck("database")]);
24
+ }
25
+ };
26
+ exports.HealthController = HealthController;
27
+ __decorate([
28
+ (0, common_1.Get)(),
29
+ (0, terminus_1.HealthCheck)(),
30
+ __metadata("design:type", Function),
31
+ __metadata("design:paramtypes", []),
32
+ __metadata("design:returntype", void 0)
33
+ ], HealthController.prototype, "check", null);
34
+ exports.HealthController = HealthController = __decorate([
35
+ (0, common_1.Controller)("health"),
36
+ __metadata("design:paramtypes", [terminus_1.HealthCheckService,
37
+ terminus_1.TypeOrmHealthIndicator])
38
+ ], HealthController);
39
+ //# sourceMappingURL=health.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health.controller.js","sourceRoot":"","sources":["../../src/health/health.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAgD;AAChD,+CAIyB;AAGlB,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAEjB;IACA;IAFV,YACU,MAA0B,EAC1B,EAA0B;QAD1B,WAAM,GAAN,MAAM,CAAoB;QAC1B,OAAE,GAAF,EAAE,CAAwB;IACjC,CAAC;IAIJ,KAAK;QACH,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;IACjE,CAAC;CACF,CAAA;AAXY,4CAAgB;AAQ3B;IAFC,IAAA,YAAG,GAAE;IACL,IAAA,sBAAW,GAAE;;;;6CAGb;2BAVU,gBAAgB;IAD5B,IAAA,mBAAU,EAAC,QAAQ,CAAC;qCAGD,6BAAkB;QACtB,iCAAsB;GAHzB,gBAAgB,CAW5B"}
@@ -0,0 +1 @@
1
+ export * from "./shared-health.module";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./shared-health.module"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/health/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAsC"}
@@ -0,0 +1,2 @@
1
+ export declare class SharedHealthModule {
2
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.SharedHealthModule = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const terminus_1 = require("@nestjs/terminus");
12
+ const health_controller_1 = require("./health.controller");
13
+ let SharedHealthModule = class SharedHealthModule {
14
+ };
15
+ exports.SharedHealthModule = SharedHealthModule;
16
+ exports.SharedHealthModule = SharedHealthModule = __decorate([
17
+ (0, common_1.Module)({
18
+ imports: [terminus_1.TerminusModule.forRoot({ gracefulShutdownTimeoutMs: 1000 })],
19
+ controllers: [health_controller_1.HealthController],
20
+ })
21
+ ], SharedHealthModule);
22
+ //# sourceMappingURL=shared-health.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-health.module.js","sourceRoot":"","sources":["../../src/health/shared-health.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAuC;AACvC,+CAAiD;AACjD,2DAAsD;AAM/C,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAAG,CAAA;AAArB,gDAAkB;6BAAlB,kBAAkB;IAJ9B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,yBAAc,CAAC,OAAO,CAAC,EAAE,yBAAyB,EAAE,IAAI,EAAE,CAAC,CAAC;QACtE,WAAW,EAAE,CAAC,oCAAgB,CAAC;KAChC,CAAC;GACW,kBAAkB,CAAG"}