@seas-computing/nestjs-healthcheck 0.0.12 → 0.0.13-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.
Files changed (36) hide show
  1. package/README.md +55 -60
  2. package/package.json +2 -3
  3. package/lib/RedisHealthService.d.ts +0 -7
  4. package/lib/RedisHealthService.js +0 -57
  5. package/lib/RedisHealthService.js.map +0 -1
  6. package/lib/constants.d.ts +0 -4
  7. package/lib/constants.js +0 -9
  8. package/lib/constants.js.map +0 -1
  9. package/lib/healthcheck.controller.d.ts +0 -12
  10. package/lib/healthcheck.controller.js +0 -72
  11. package/lib/healthcheck.controller.js.map +0 -1
  12. package/lib/healthcheck.module-definition.d.ts +0 -2
  13. package/lib/healthcheck.module-definition.js +0 -7
  14. package/lib/healthcheck.module-definition.js.map +0 -1
  15. package/lib/healthcheck.module.d.ts +0 -3
  16. package/lib/healthcheck.module.js +0 -31
  17. package/lib/healthcheck.module.js.map +0 -1
  18. package/lib/index.d.ts +0 -7
  19. package/lib/index.js +0 -26
  20. package/lib/index.js.map +0 -1
  21. package/lib/tsconfig.publish.tsbuildinfo +0 -1
  22. package/lib/types/BuildVersionHealthIndicator.interface.d.ts +0 -4
  23. package/lib/types/BuildVersionHealthIndicator.interface.js +0 -3
  24. package/lib/types/BuildVersionHealthIndicator.interface.js.map +0 -1
  25. package/lib/types/ConfigServiceInterface.d.ts +0 -4
  26. package/lib/types/ConfigServiceInterface.js +0 -3
  27. package/lib/types/ConfigServiceInterface.js.map +0 -1
  28. package/lib/types/CustomHealthCheckResponse.d.ts +0 -10
  29. package/lib/types/CustomHealthCheckResponse.js +0 -3
  30. package/lib/types/CustomHealthCheckResponse.js.map +0 -1
  31. package/lib/types/RedisHealthIndicator.interface.d.ts +0 -5
  32. package/lib/types/RedisHealthIndicator.interface.js +0 -3
  33. package/lib/types/RedisHealthIndicator.interface.js.map +0 -1
  34. package/lib/types/healthcheckModuleOptions.d.ts +0 -9
  35. package/lib/types/healthcheckModuleOptions.js +0 -4
  36. package/lib/types/healthcheckModuleOptions.js.map +0 -1
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # NestJS HealthCheck Module
2
2
 
3
- The `nestjs-healthcheck` package provides a standlone NestJS module that verifies the availability of essential application dependencies. This includes:
3
+ The `nestjs-healthcheck` package provides a standalone NestJS module that verifies the availability of essential application dependencies. This includes:
4
4
  - pinging the application database using `TypeOrmHealthIndicator`
5
- - performing an HTTP ping to the HarvardKey (CAS logout) URL uisng `HttpHealthIndicator`
6
- - pinging Redis with a custom `RedisHealthService`
7
- It returns a composite health status result and the current app version. It is intended to be included in a larger application and assumes the presence of a Redis connection and database connection during runtime.
5
+ - performing an HTTP ping to the HarvardKey OIDC discovery document URL using `HttpHealthIndicator`
6
+ - pinging Valkey with a custom `ValkeyHealthService`
7
+ It returns a composite health status result and the current app version. It is intended to be included in a larger application and assumes the presence of a Valkey connection and database connection during runtime.
8
8
 
9
9
  ## Installation
10
10
  ```
@@ -16,15 +16,16 @@ npm install @seas-computing/nestjs-healthcheck
16
16
  To add the nestjs healthcheck system, you should make the following changes in the consuming application's `AppModule` (or other root module):
17
17
  - be sure that the `ConfigModule` is at the top of the imports list
18
18
  - import and register the `HealthcheckModule` using `registerAsync`
19
- - import `TypeOrmModule` and `RedisModule`
19
+ - import `TypeOrmModule` and `ValkeyModule`
20
20
 
21
21
  In the `ConfigService`, configuration values (i.e. `HealthcheckModuleOptions`) should be made available and passed as options to the `HealthcheckModule`.
22
22
 
23
- Example `app.module` from [makerspace](https://github.huit.harvard.edu/SEAS/makerspace/blob/feature/add-healthcheck-module/src/server/app.module.ts):
23
+ Example `app.module` from [oap-grad-database](https://github.huit.harvard.edu/SEAS/oap-grad-database/blob/develop/src/server/app.module.ts):
24
24
  ```ts
25
25
  @Module({
26
26
  imports: [
27
- ConfigModule, // Ensure this is at the top
27
+ ConfigModule, // Ensure this is at the top
28
+ HealthCheckModule,
28
29
  LogModule.registerAsync({
29
30
  imports: [ConfigModule],
30
31
  inject: [ConfigService],
@@ -35,24 +36,22 @@ Example `app.module` from [makerspace](https://github.huit.harvard.edu/SEAS/make
35
36
  imports: [ConfigModule],
36
37
  useFactory: (
37
38
  config: ConfigService
38
- ): HarvardKeyModuleOptions => config.harvardKeyConfig,
39
+ ) => ({
40
+ ...config.harvardKeyConfig,
41
+ }),
39
42
  }),
40
43
  SessionModule.forRootAsync({
41
44
  imports: [ConfigModule],
42
45
  inject: [ConfigService],
43
- useFactory: async (
46
+ useFactory: (
44
47
  config: ConfigService
45
- ): Promise<NestSessionOptions> => {
46
- const client = createClient(config.redisClientOptions);
47
- // Version 4 of redis does not automatically connect to the server:
48
- // https://github.com/redis/node-redis/blob/master/docs/v3-to-v4.md
49
- await client.connect();
50
- await client.ping();
48
+ ): NestSessionOptions => {
49
+ const client = new Redis(config.valkeyClientOptions);
51
50
  const store = new RedisStore({
52
51
  client,
53
52
  prefix: config.get('REDIS_PREFIX'),
54
53
  });
55
- return config.getSessionSettings(store);
54
+ return { session: config.getSessionSettings(store) };
56
55
  },
57
56
  }),
58
57
  TypeOrmModule.forRootAsync({
@@ -65,13 +64,12 @@ Example `app.module` from [makerspace](https://github.huit.harvard.edu/SEAS/make
65
64
  maxQueryExecutionTime: 1000,
66
65
  }),
67
66
  }),
68
- // Add the Redis module
69
67
  RedisModule.forRootAsync({
70
68
  imports: [ConfigModule],
71
69
  inject: [ConfigService],
72
70
  useFactory: (config: ConfigService): RedisModuleOptions => ({
73
71
  type: 'single',
74
- url: config.redisURL,
72
+ url: config.valkeyURL,
75
73
  options: {
76
74
  tls: {
77
75
  rejectUnauthorized: false,
@@ -79,31 +77,18 @@ Example `app.module` from [makerspace](https://github.huit.harvard.edu/SEAS/make
79
77
  },
80
78
  }),
81
79
  }),
82
- TrainingModule,
83
- PersonModule,
84
- AffiliationModule,
85
- AttendanceModule,
86
- UserModule,
87
- KioskModule,
88
- HealthcheckModule.registerAsync({ // Add HealthCheckModule
80
+ AdvisorModule,
81
+ StudentModule,
82
+ StudentToAdvisorModule,
83
+ NoteModule,
84
+ ThesisModule,
85
+ DegreeProgramModule,
86
+ MilestonesModule,
87
+ HealthcheckModule.registerAsync({ // Add HealthcheckModule
89
88
  imports: [ConfigModule],
90
89
  inject: [ConfigService],
91
90
  useFactory: (configService: ConfigService): HealthcheckModuleOptions => {
92
- const casHealthcheckUrl = configService.casCheckURL;
93
- if (!casHealthcheckUrl) throw new Error('casCheckURL is not defined or is invalid in configuration.');
94
- try {
95
- new URL(casHealthcheckUrl);
96
- } catch (error) {
97
- if (error instanceof Error) {
98
- throw new Error(`casCheckURL is not a valid URL. ${error}`);
99
- } else {
100
- throw error;
101
- }
102
- }
103
- return {
104
- ...configService.healthcheckConfig,
105
- casCheckURL: casHealthcheckUrl,
106
- };
91
+ return configService.healthcheckConfig,
107
92
  },
108
93
  }),
109
94
  ],
@@ -118,7 +103,10 @@ class AppModule implements NestModule {
118
103
  configure(consumer: MiddlewareConsumer): void {
119
104
  consumer
120
105
  .apply(LogMiddleware)
121
- .exclude({ path: 'makerspace/health-check', method: RequestMethod.ALL }) // exclude healthcheck
106
+ .exclude(
107
+ 'heartbeat',
108
+ { path: 'oapGradDatabase/health-check', method: RequestMethod.ALL } // exclude healthcheck
109
+ )
122
110
  .forRoutes('*');
123
111
  }
124
112
  }
@@ -127,33 +115,40 @@ export { AppModule };
127
115
 
128
116
  ```
129
117
 
130
- Examples of additions to `config.service.ts` from [makerspace](https://github.huit.harvard.edu/SEAS/makerspace/blob/feature/add-healthcheck-module/src/server/config/config.service.ts):
118
+ Examples of additions to `config.service.ts` from [oap-grad-database](https://github.huit.harvard.edu/SEAS/makerspace/blob/feature/add-healthcheck-module/src/server/config/config.service.ts):
131
119
 
132
120
  ```ts
133
121
  /**
134
- * Returns the full healthcheck endpoint for HarvardKey CAS, which will be sent to
135
- * the Healthcheck Module. It strips out any auth credentials, query strings, and
136
- * hashes, normalizes the path to ensure there is only one `/cas` segment, and
137
- * appends `/logout` to the end.
138
- */
139
- public get casCheckURL(): string {
122
+ * Returns the OIDC discovery document URL, which will be sent to the
123
+ * Healthcheck Module. The /.well-known/openid-configuration endpoint
124
+ * is the standard, unauthenticated health signal exposed by all OIDC
125
+ * providers.
126
+ */
127
+ public get oidcCheckURL(): string {
128
+ return `${this.oidcBaseURL}/.well-known/openid-configuration`;
129
+ }
130
+
131
+ /**
132
+ * Returns the Valkey URL
133
+ */
134
+ public get valkeyURL(): string {
140
135
  const {
141
- origin,
142
- pathname,
143
- } = this.casURL;
144
- let cleanPath = pathname.replace(/\/$/, '');
145
- cleanPath = cleanPath.replace(/\/(login|logout)$/, '');
146
- if (!cleanPath.endsWith('/cas')) {
147
- cleanPath += '/cas';
136
+ VALKEY_HOST,
137
+ VALKEY_PORT,
138
+ VALKEY_PASSWORD,
139
+ } = this.env;
140
+ const valkey = new URL(`rediss://${VALKEY_HOST}:${VALKEY_PORT}`);
141
+ if (VALKEY_PASSWORD) {
142
+ valkey.password = VALKEY_PASSWORD;
148
143
  }
149
- return `${origin}${cleanPath}/logout`;
144
+ return valkey.toString();
150
145
  }
151
146
 
152
147
  public get healthcheckConfig(): HealthcheckModuleOptions {
153
148
  return {
154
- casCheckURL: this.casCheckURL,
149
+ oidcCheckURL: this.oidcCheckURL,
155
150
  dbOptions: this.dbOptions,
156
- redisUrl: this.redisURL,
151
+ valkeyURL: this.valkeyURL,
157
152
  version: this.buildVersion,
158
153
  strategy: this.isProduction
159
154
  ? HEALTH_STRATEGY_NAME.HEALTHCHECK
@@ -176,7 +171,7 @@ You should receive a response that looks like this:
176
171
  "harvard-key": {
177
172
  "status": "up"
178
173
  },
179
- "redis": {
174
+ "valkey": {
180
175
  "status": "up",
181
176
  "result": "PONG"
182
177
  }
@@ -189,7 +184,7 @@ You should receive a response that looks like this:
189
184
  "harvard-key": {
190
185
  "status": "up"
191
186
  },
192
- "redis": {
187
+ "valkey": {
193
188
  "status": "up",
194
189
  "result": "PONG"
195
190
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seas-computing/nestjs-healthcheck",
3
- "version": "0.0.12",
3
+ "version": "0.0.13-1",
4
4
  "description": "A standalone healthcheck module for NestJS apps",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -28,8 +28,7 @@
28
28
  "@nestjs/swagger": "^7.1.16",
29
29
  "@nestjs/terminus": "^10.0.0 || ^11.0.0",
30
30
  "@nestjs/typeorm": "^10.0.0 || ^11.0.0",
31
- "ioredis": "^5.6.1",
32
- "redis": "^4.7.0",
31
+ "iovalkey": "^0.3.3",
33
32
  "reflect-metadata": "^0.1.13",
34
33
  "typeorm": "^0.3.22"
35
34
  },
@@ -1,7 +0,0 @@
1
- import { HealthIndicatorResult } from '@nestjs/terminus';
2
- import { Redis } from 'ioredis';
3
- export declare class RedisHealthService {
4
- private readonly redisClient;
5
- constructor(redisClient: Redis);
6
- checkRedisConnection(): Promise<HealthIndicatorResult>;
7
- }
@@ -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"}
@@ -1,4 +0,0 @@
1
- export declare enum HEALTH_STRATEGY_NAME {
2
- HEALTHCHECK = "HealthcheckStrategy",
3
- DEV = "DevStrategy"
4
- }
package/lib/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,2 +0,0 @@
1
- import { HealthcheckModuleOptions } from './types/healthcheckModuleOptions';
2
- export declare const ConfigurableModuleClass: import("@nestjs/common").ConfigurableModuleCls<HealthcheckModuleOptions, "register", "create", {}>, MODULE_OPTIONS_TOKEN: string | symbol;
@@ -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,3 +0,0 @@
1
- import { ConfigurableModuleClass } from './healthcheck.module-definition';
2
- export declare class HealthcheckModule extends ConfigurableModuleClass {
3
- }
@@ -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/lib/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/lib/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/lib/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"}