@seas-computing/nestjs-healthcheck 0.0.9-0 → 0.0.9
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/package.json +3 -3
- package/dist/src/RedisHealthService.d.ts +0 -7
- package/dist/src/RedisHealthService.js +0 -57
- package/dist/src/RedisHealthService.js.map +0 -1
- package/dist/src/constants.d.ts +0 -4
- package/dist/src/constants.js +0 -9
- package/dist/src/constants.js.map +0 -1
- package/dist/src/healthcheck.controller.d.ts +0 -12
- package/dist/src/healthcheck.controller.js +0 -72
- package/dist/src/healthcheck.controller.js.map +0 -1
- package/dist/src/healthcheck.module-definition.d.ts +0 -2
- package/dist/src/healthcheck.module-definition.js +0 -7
- package/dist/src/healthcheck.module-definition.js.map +0 -1
- package/dist/src/healthcheck.module.d.ts +0 -3
- package/dist/src/healthcheck.module.js +0 -31
- package/dist/src/healthcheck.module.js.map +0 -1
- package/dist/src/index.d.ts +0 -7
- package/dist/src/index.js +0 -26
- package/dist/src/index.js.map +0 -1
- package/dist/src/types/ConfigServiceInterface.d.ts +0 -4
- package/dist/src/types/ConfigServiceInterface.js +0 -3
- package/dist/src/types/ConfigServiceInterface.js.map +0 -1
- package/dist/src/types/HealthCheckResponse.d.ts +0 -39
- package/dist/src/types/HealthCheckResponse.js +0 -4
- package/dist/src/types/HealthCheckResponse.js.map +0 -1
- package/dist/src/types/healthcheckModuleOptions.d.ts +0 -9
- package/dist/src/types/healthcheckModuleOptions.js +0 -4
- package/dist/src/types/healthcheckModuleOptions.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seas-computing/nestjs-healthcheck",
|
|
3
|
-
"version": "0.0.9
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "A standalone healthcheck module for NestJS apps",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"dist/src"
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
|
-
"build": "rimraf dist/ && tsc",
|
|
14
|
-
"test": "nyc mocha --require ts-node/register \"test
|
|
13
|
+
"build": "rimraf dist/ && tsc --project tsconfig.publish.json",
|
|
14
|
+
"test": "nyc mocha --require ts-node/register \"src/**/__tests__/*.test.ts\"",
|
|
15
15
|
"lint": "eslint --ext=ts,tsx,js ./src",
|
|
16
16
|
"test:watch": "TS_NODE_TRANSPILE_ONLY=true mocha --watch",
|
|
17
17
|
"typecheck": "tsc --noEmit",
|
|
@@ -1,57 +0,0 @@
|
|
|
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
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.RedisHealthService = void 0;
|
|
16
|
-
const common_1 = require("@nestjs/common");
|
|
17
|
-
const ioredis_1 = require("ioredis");
|
|
18
|
-
const ioredis_2 = require("@nestjs-modules/ioredis");
|
|
19
|
-
let RedisHealthService = class RedisHealthService {
|
|
20
|
-
constructor(redisClient) {
|
|
21
|
-
this.redisClient = redisClient;
|
|
22
|
-
}
|
|
23
|
-
async checkRedisConnection() {
|
|
24
|
-
try {
|
|
25
|
-
const result = await this.redisClient.ping();
|
|
26
|
-
return {
|
|
27
|
-
redis: {
|
|
28
|
-
status: 'up',
|
|
29
|
-
result,
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
catch (error) {
|
|
34
|
-
if (error instanceof Error) {
|
|
35
|
-
return {
|
|
36
|
-
redis: {
|
|
37
|
-
status: 'down',
|
|
38
|
-
message: error.message,
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
redis: {
|
|
44
|
-
status: 'down',
|
|
45
|
-
message: 'Could not connect to Redis.',
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
exports.RedisHealthService = RedisHealthService;
|
|
52
|
-
exports.RedisHealthService = RedisHealthService = __decorate([
|
|
53
|
-
(0, common_1.Injectable)(),
|
|
54
|
-
__param(0, (0, ioredis_2.InjectRedis)()),
|
|
55
|
-
__metadata("design:paramtypes", [ioredis_1.Redis])
|
|
56
|
-
], RedisHealthService);
|
|
57
|
-
//# sourceMappingURL=RedisHealthService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RedisHealthService.js","sourceRoot":"","sources":["../../src/RedisHealthService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAE5C,qCAAgC;AAChC,qDAAsD;AAS/C,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,YACkC,WAAkB;QAAlB,gBAAW,GAAX,WAAW,CAAO;IACjD,CAAC;IAEG,KAAK,CAAC,oBAAoB;QAC/B,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;YAE7C,OAAO;gBACL,KAAK,EAAE;oBACL,MAAM,EAAE,IAAI;oBACZ,MAAM;iBACP;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;gBAC3B,OAAO;oBACL,KAAK,EAAE;wBACL,MAAM,EAAE,MAAM;wBACd,OAAO,EAAE,KAAK,CAAC,OAAO;qBACvB;iBACF,CAAC;YACJ,CAAC;YACD,OAAO;gBACL,KAAK,EAAE;oBACL,MAAM,EAAE,MAAM;oBACd,OAAO,EAAE,6BAA6B;iBACvC;aACF,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AAhCY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,qBAAW,GAAE,CAAA;qCAA+B,eAAK;GAFzC,kBAAkB,CAgC9B"}
|
package/dist/src/constants.d.ts
DELETED
package/dist/src/constants.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HEALTH_STRATEGY_NAME = void 0;
|
|
4
|
-
var HEALTH_STRATEGY_NAME;
|
|
5
|
-
(function (HEALTH_STRATEGY_NAME) {
|
|
6
|
-
HEALTH_STRATEGY_NAME["HEALTHCHECK"] = "HealthcheckStrategy";
|
|
7
|
-
HEALTH_STRATEGY_NAME["DEV"] = "DevStrategy";
|
|
8
|
-
})(HEALTH_STRATEGY_NAME || (exports.HEALTH_STRATEGY_NAME = HEALTH_STRATEGY_NAME = {}));
|
|
9
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;AAGA,IAAY,oBAqBX;AArBD,WAAY,oBAAoB;IAI9B,2DAAmC,CAAA;IAgBnC,2CAAmB,CAAA;AACrB,CAAC,EArBW,oBAAoB,oCAApB,oBAAoB,QAqB/B"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { HealthCheckService, TypeOrmHealthIndicator, HealthCheckResult, HttpHealthIndicator } from '@nestjs/terminus';
|
|
2
|
-
import { ConfigServiceInterface } from './types/ConfigServiceInterface';
|
|
3
|
-
import { RedisHealthService } from './RedisHealthService';
|
|
4
|
-
export declare class HealthCheckController {
|
|
5
|
-
private config;
|
|
6
|
-
private health;
|
|
7
|
-
private db;
|
|
8
|
-
private http;
|
|
9
|
-
private redisHealth;
|
|
10
|
-
constructor(config: ConfigServiceInterface, health: HealthCheckService, db: TypeOrmHealthIndicator, http: HttpHealthIndicator, redisHealth: RedisHealthService);
|
|
11
|
-
getHealthCheck(): Promise<HealthCheckResult>;
|
|
12
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
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
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.HealthCheckController = void 0;
|
|
16
|
-
const common_1 = require("@nestjs/common");
|
|
17
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
18
|
-
const terminus_1 = require("@nestjs/terminus");
|
|
19
|
-
const RedisHealthService_1 = require("./RedisHealthService");
|
|
20
|
-
const healthcheck_module_definition_1 = require("./healthcheck.module-definition");
|
|
21
|
-
let HealthCheckController = class HealthCheckController {
|
|
22
|
-
constructor(config, health, db, http, redisHealth) {
|
|
23
|
-
this.config = config;
|
|
24
|
-
this.health = health;
|
|
25
|
-
this.db = db;
|
|
26
|
-
this.http = http;
|
|
27
|
-
this.redisHealth = redisHealth;
|
|
28
|
-
}
|
|
29
|
-
async getHealthCheck() {
|
|
30
|
-
const status = await this.health.check([
|
|
31
|
-
() => this.db.pingCheck('database'),
|
|
32
|
-
() => this.http.pingCheck('harvard-key', this.config.casCheckURL),
|
|
33
|
-
async () => this.redisHealth.checkRedisConnection(),
|
|
34
|
-
() => ({
|
|
35
|
-
buildVersion: {
|
|
36
|
-
status: 'up',
|
|
37
|
-
version: this.config.buildVersion,
|
|
38
|
-
},
|
|
39
|
-
}),
|
|
40
|
-
]);
|
|
41
|
-
return status;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
exports.HealthCheckController = HealthCheckController;
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, common_1.Get)('/'),
|
|
47
|
-
(0, swagger_1.ApiOperation)({
|
|
48
|
-
summary: 'While the server is active, return a 200 status code',
|
|
49
|
-
}),
|
|
50
|
-
(0, swagger_1.ApiOkResponse)({
|
|
51
|
-
description: 'A 200 response',
|
|
52
|
-
isArray: false,
|
|
53
|
-
}),
|
|
54
|
-
(0, terminus_1.HealthCheck)(),
|
|
55
|
-
__metadata("design:type", Function),
|
|
56
|
-
__metadata("design:paramtypes", []),
|
|
57
|
-
__metadata("design:returntype", Promise)
|
|
58
|
-
], HealthCheckController.prototype, "getHealthCheck", null);
|
|
59
|
-
exports.HealthCheckController = HealthCheckController = __decorate([
|
|
60
|
-
(0, swagger_1.ApiTags)('Health Check'),
|
|
61
|
-
(0, common_1.Controller)('health-check'),
|
|
62
|
-
__param(0, (0, common_1.Inject)(healthcheck_module_definition_1.MODULE_OPTIONS_TOKEN)),
|
|
63
|
-
__param(1, (0, common_1.Inject)(terminus_1.HealthCheckService)),
|
|
64
|
-
__param(2, (0, common_1.Inject)(terminus_1.TypeOrmHealthIndicator)),
|
|
65
|
-
__param(3, (0, common_1.Inject)(terminus_1.HttpHealthIndicator)),
|
|
66
|
-
__param(4, (0, common_1.Inject)(RedisHealthService_1.RedisHealthService)),
|
|
67
|
-
__metadata("design:paramtypes", [Object, terminus_1.HealthCheckService,
|
|
68
|
-
terminus_1.TypeOrmHealthIndicator,
|
|
69
|
-
terminus_1.HttpHealthIndicator,
|
|
70
|
-
RedisHealthService_1.RedisHealthService])
|
|
71
|
-
], HealthCheckController);
|
|
72
|
-
//# sourceMappingURL=healthcheck.controller.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"healthcheck.controller.js","sourceRoot":"","sources":["../../src/healthcheck.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAyD;AACzD,6CAAuE;AACvE,+CAAmI;AAEnI,6DAA0D;AAC1D,mFAAuE;AAIhE,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAEhC,YACwC,MAA8B,EAChC,MAA0B,EACtB,EAA0B,EAC7B,IAAyB,EAC1B,WAA+B;QAJ7B,WAAM,GAAN,MAAM,CAAwB;QAChC,WAAM,GAAN,MAAM,CAAoB;QACtB,OAAE,GAAF,EAAE,CAAwB;QAC7B,SAAI,GAAJ,IAAI,CAAqB;QAC1B,gBAAW,GAAX,WAAW,CAAoB;IAClE,CAAC;IAcS,AAAN,KAAK,CAAC,cAAc;QAEzB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;YACrC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC;YACnC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CACvB,aAAa,EACb,IAAI,CAAC,MAAM,CAAC,WAAW,CACxB;YACD,KAAK,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,oBAAoB,EAAE;YACnD,GAAG,EAAE,CAAC,CAAC;gBACL,YAAY,EAAE;oBACZ,MAAM,EAAE,IAAI;oBACZ,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY;iBAClC;aACF,CAAC;SACH,CACA,CAAC;QACF,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAA;AAzCY,sDAAqB;AAsBnB;IATZ,IAAA,YAAG,EAAC,GAAG,CAAC;IACR,IAAA,sBAAY,EAAC;QACZ,OAAO,EAAE,sDAAsD;KAChE,CAAC;IACD,IAAA,uBAAa,EAAC;QACb,WAAW,EAAE,gBAAgB;QAC7B,OAAO,EAAE,KAAK;KACf,CAAC;IACD,IAAA,sBAAW,GAAE;;;;2DAmBb;gCAxCU,qBAAqB;IAFjC,IAAA,iBAAO,EAAC,cAAc,CAAC;IACvB,IAAA,mBAAU,EAAC,cAAc,CAAC;IAItB,WAAA,IAAA,eAAM,EAAC,oDAAoB,CAAC,CAAA;IAC5B,WAAA,IAAA,eAAM,EAAC,6BAAkB,CAAC,CAAA;IAC1B,WAAA,IAAA,eAAM,EAAC,iCAAsB,CAAC,CAAA;IAC9B,WAAA,IAAA,eAAM,EAAC,8BAAmB,CAAC,CAAA;IAC3B,WAAA,IAAA,eAAM,EAAC,uCAAkB,CAAC,CAAA;6CAHiB,6BAAkB;QAClB,iCAAsB;QACvB,8BAAmB;QACb,uCAAkB;GAP1D,qBAAqB,CAyCjC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var _a;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.MODULE_OPTIONS_TOKEN = exports.ConfigurableModuleClass = void 0;
|
|
5
|
-
const common_1 = require("@nestjs/common");
|
|
6
|
-
_a = new common_1.ConfigurableModuleBuilder().build(), exports.ConfigurableModuleClass = _a.ConfigurableModuleClass, exports.MODULE_OPTIONS_TOKEN = _a.MODULE_OPTIONS_TOKEN;
|
|
7
|
-
//# sourceMappingURL=healthcheck.module-definition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"healthcheck.module-definition.js","sourceRoot":"","sources":["../../src/healthcheck.module-definition.ts"],"names":[],"mappings":";;;;AAAA,2CAA2D;AAO9C,KAGT,IAAI,kCAAyB,EAA4B,CAAC,KAAK,EAAE,EAFnE,+BAAuB,+BACvB,4BAAoB,2BACgD"}
|
|
@@ -1,31 +0,0 @@
|
|
|
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.HealthcheckModule = void 0;
|
|
10
|
-
const common_1 = require("@nestjs/common");
|
|
11
|
-
const terminus_1 = require("@nestjs/terminus");
|
|
12
|
-
const axios_1 = require("@nestjs/axios");
|
|
13
|
-
const typeorm_1 = require("@nestjs/typeorm");
|
|
14
|
-
const healthcheck_controller_1 = require("./healthcheck.controller");
|
|
15
|
-
const RedisHealthService_1 = require("./RedisHealthService");
|
|
16
|
-
const healthcheck_module_definition_1 = require("./healthcheck.module-definition");
|
|
17
|
-
let HealthcheckModule = class HealthcheckModule extends healthcheck_module_definition_1.ConfigurableModuleClass {
|
|
18
|
-
};
|
|
19
|
-
exports.HealthcheckModule = HealthcheckModule;
|
|
20
|
-
exports.HealthcheckModule = HealthcheckModule = __decorate([
|
|
21
|
-
(0, common_1.Module)({
|
|
22
|
-
imports: [
|
|
23
|
-
terminus_1.TerminusModule,
|
|
24
|
-
axios_1.HttpModule,
|
|
25
|
-
typeorm_1.TypeOrmModule.forFeature([]),
|
|
26
|
-
],
|
|
27
|
-
controllers: [healthcheck_controller_1.HealthCheckController],
|
|
28
|
-
providers: [RedisHealthService_1.RedisHealthService],
|
|
29
|
-
})
|
|
30
|
-
], HealthcheckModule);
|
|
31
|
-
//# sourceMappingURL=healthcheck.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"healthcheck.module.js","sourceRoot":"","sources":["../../src/healthcheck.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+CAAkD;AAClD,yCAA2C;AAC3C,6CAAgD;AAChD,qEAAiE;AACjE,6DAA0D;AAC1D,mFAA0E;AAYnE,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,uDAAuB;CAAG,CAAA;AAApD,8CAAiB;4BAAjB,iBAAiB;IAV7B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,yBAAc;YACd,kBAAU;YACV,uBAAa,CAAC,UAAU,CAAC,EAAE,CAAC;SAC7B;QACD,WAAW,EAAE,CAAC,8CAAqB,CAAC;QACpC,SAAS,EAAE,CAAC,uCAAkB,CAAC;KAChC,CAAC;GAEW,iBAAiB,CAAmC"}
|
package/dist/src/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { HealthcheckModule } from './healthcheck.module';
|
|
2
|
-
export * from './healthcheck.controller';
|
|
3
|
-
export * from './RedisHealthService';
|
|
4
|
-
export * from './types/ConfigServiceInterface';
|
|
5
|
-
export * from './types/healthcheckModuleOptions';
|
|
6
|
-
export * from './constants';
|
|
7
|
-
export * from './healthcheck.module-definition';
|
package/dist/src/index.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
exports.HealthcheckModule = void 0;
|
|
18
|
-
var healthcheck_module_1 = require("./healthcheck.module");
|
|
19
|
-
Object.defineProperty(exports, "HealthcheckModule", { enumerable: true, get: function () { return healthcheck_module_1.HealthcheckModule; } });
|
|
20
|
-
__exportStar(require("./healthcheck.controller"), exports);
|
|
21
|
-
__exportStar(require("./RedisHealthService"), exports);
|
|
22
|
-
__exportStar(require("./types/ConfigServiceInterface"), exports);
|
|
23
|
-
__exportStar(require("./types/healthcheckModuleOptions"), exports);
|
|
24
|
-
__exportStar(require("./constants"), exports);
|
|
25
|
-
__exportStar(require("./healthcheck.module-definition"), exports);
|
|
26
|
-
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2DAAyD;AAAhD,uHAAA,iBAAiB,OAAA;AAC1B,2DAAyC;AACzC,uDAAqC;AACrC,iEAA+C;AAC/C,mEAAiD;AACjD,8CAA4B;AAC5B,kEAAgD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigServiceInterface.js","sourceRoot":"","sources":["../../../src/types/ConfigServiceInterface.ts"],"names":[],"mappings":""}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export interface HealthCheckResponse {
|
|
2
|
-
status: string;
|
|
3
|
-
info: {
|
|
4
|
-
database: {
|
|
5
|
-
status: string;
|
|
6
|
-
};
|
|
7
|
-
'harvard-key': {
|
|
8
|
-
status: string;
|
|
9
|
-
};
|
|
10
|
-
redis: {
|
|
11
|
-
status: string;
|
|
12
|
-
result: string;
|
|
13
|
-
};
|
|
14
|
-
buildVersion: {
|
|
15
|
-
status: string;
|
|
16
|
-
version: string;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
error: {
|
|
20
|
-
key: string;
|
|
21
|
-
value: unknown;
|
|
22
|
-
};
|
|
23
|
-
details: {
|
|
24
|
-
database: {
|
|
25
|
-
status: string;
|
|
26
|
-
};
|
|
27
|
-
'harvard-key': {
|
|
28
|
-
status: string;
|
|
29
|
-
};
|
|
30
|
-
redis: {
|
|
31
|
-
status: string;
|
|
32
|
-
result: string;
|
|
33
|
-
};
|
|
34
|
-
buildVersion: {
|
|
35
|
-
status: string;
|
|
36
|
-
version: string;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HealthCheckResponse.js","sourceRoot":"","sources":["../../../src/types/HealthCheckResponse.ts"],"names":[],"mappings":";;AAqBC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { TypeOrmModuleOptions } from '@nestjs/typeorm';
|
|
2
|
-
import { HEALTH_STRATEGY_NAME } from '../constants';
|
|
3
|
-
export interface HealthcheckModuleOptions {
|
|
4
|
-
casCheckURL: string;
|
|
5
|
-
dbOptions: TypeOrmModuleOptions;
|
|
6
|
-
redisUrl: string;
|
|
7
|
-
buildVersion: string;
|
|
8
|
-
strategy: HEALTH_STRATEGY_NAME;
|
|
9
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"healthcheckModuleOptions.js","sourceRoot":"","sources":["../../../src/types/healthcheckModuleOptions.ts"],"names":[],"mappings":";;AAYC,CAAC"}
|