@lyrolab/nest-shared 1.0.2 → 1.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 +6 -1
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/index.js +1 -1
- package/dist/ai/index.js.map +1 -1
- package/dist/ai/shared-ai.module.d.ts +2 -0
- package/dist/ai/{ai.module.js → shared-ai.module.js} +6 -6
- package/dist/ai/shared-ai.module.js.map +1 -0
- package/dist/health/health.controller.d.ts +7 -0
- package/dist/health/health.controller.js +39 -0
- package/dist/health/health.controller.js.map +1 -0
- package/dist/health/index.d.ts +1 -0
- package/dist/health/index.js +18 -0
- package/dist/health/index.js.map +1 -0
- package/dist/health/shared-health.module.d.ts +2 -0
- package/dist/health/shared-health.module.js +22 -0
- package/dist/health/shared-health.module.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -1
- package/dist/ai/ai.module.d.ts +0 -2
- package/dist/ai/ai.module.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
# [1.1.0](https://github.com/lyrolab/nest-shared/compare/v1.0.3...v1.1.0) (2025-04-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add healthcheck ([4901574](https://github.com/lyrolab/nest-shared/commit/49015741339621371ac839c58d9864decde7c2e4))
|
|
2
7
|
|
|
3
8
|
## [1.0.1](https://github.com/lyrolab/nest-shared/compare/v1.0.0...v1.0.1) (2025-04-10)
|
|
4
9
|
|
package/dist/ai/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./ai.module";
|
|
1
|
+
export * from "./shared-ai.module";
|
|
2
2
|
export * from "./services/ai.service";
|
package/dist/ai/index.js
CHANGED
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./ai.module"), exports);
|
|
17
|
+
__exportStar(require("./shared-ai.module"), exports);
|
|
18
18
|
__exportStar(require("./services/ai.service"), exports);
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
package/dist/ai/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAkC;AAClC,wDAAqC"}
|
|
@@ -6,16 +6,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.
|
|
9
|
+
exports.SharedAiModule = void 0;
|
|
10
10
|
const common_1 = require("@nestjs/common");
|
|
11
11
|
const ai_service_1 = require("./services/ai.service");
|
|
12
|
-
let
|
|
12
|
+
let SharedAiModule = class SharedAiModule {
|
|
13
13
|
};
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
14
|
+
exports.SharedAiModule = SharedAiModule;
|
|
15
|
+
exports.SharedAiModule = SharedAiModule = __decorate([
|
|
16
16
|
(0, common_1.Module)({
|
|
17
17
|
providers: [ai_service_1.AiService],
|
|
18
18
|
exports: [ai_service_1.AiService],
|
|
19
19
|
})
|
|
20
|
-
],
|
|
21
|
-
//# sourceMappingURL=ai.module.js.map
|
|
20
|
+
], SharedAiModule);
|
|
21
|
+
//# sourceMappingURL=shared-ai.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-ai.module.js","sourceRoot":"","sources":["../../src/ai/shared-ai.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAuC;AACvC,sDAAiD;AAM1C,IAAM,cAAc,GAApB,MAAM,cAAc;CAAG,CAAA;AAAjB,wCAAc;yBAAd,cAAc;IAJ1B,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,sBAAS,CAAC;QACtB,OAAO,EAAE,CAAC,sBAAS,CAAC;KACrB,CAAC;GACW,cAAc,CAAG"}
|
|
@@ -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,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"}
|