update health package
This commit is contained in:
parent
41cb3731c6
commit
17de996457
|
@ -14,7 +14,7 @@
|
|||
"@liaoliaots/nestjs-redis": "^9.0.5",
|
||||
"@mobicoop/configuration-module": "^1.2.0",
|
||||
"@mobicoop/ddd-library": "^0.3.0",
|
||||
"@mobicoop/health-module": "^1.1.0",
|
||||
"@mobicoop/health-module": "^2.0.0",
|
||||
"@mobicoop/message-broker-module": "^1.2.0",
|
||||
"@nestjs/common": "^9.0.0",
|
||||
"@nestjs/config": "^2.3.1",
|
||||
|
@ -1430,16 +1430,18 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@mobicoop/health-module": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@mobicoop/health-module/-/health-module-1.1.0.tgz",
|
||||
"integrity": "sha512-tSdvpwHxMOG7U3txm3sQDUkj1cWeGg9K68u8Y2BKgD8ocMRDufiCXY43ScFXKZqWm8jkcOU6XdwJm3pxvUOq4w==",
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@mobicoop/health-module/-/health-module-2.0.0.tgz",
|
||||
"integrity": "sha512-r/7zrHJKVRTIiZ50ILy3lEUC/9vi6k0TRcYPMS8zcnUssQg+MPcT5DQS9B9tTB2gkKwcCyxOQlZZIppIybFX3A==",
|
||||
"dependencies": {
|
||||
"@grpc/grpc-js": "^1.8.14",
|
||||
"@grpc/proto-loader": "^0.7.7",
|
||||
"@mobicoop/ddd-library": "^0.3.0",
|
||||
"@mobicoop/message-broker-module": "^1.0.5",
|
||||
"@nestjs/axios": "^3.0.0",
|
||||
"@nestjs/microservices": "^9.4.2",
|
||||
"@nestjs/terminus": "^9.2.2"
|
||||
"@nestjs/terminus": "^9.2.2",
|
||||
"axios": "^1.4.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^9.4.2"
|
||||
|
@ -1458,6 +1460,17 @@
|
|||
"@nestjs/common": "^9.4.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@nestjs/axios": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-3.0.0.tgz",
|
||||
"integrity": "sha512-ULdH03jDWkS5dy9X69XbUVbhC+0pVnrRcj7bIK/ytTZ76w7CgvTZDJqsIyisg3kNOiljRW/4NIjSf3j6YGvl+g==",
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0",
|
||||
"axios": "^1.3.1",
|
||||
"reflect-metadata": "^0.1.12",
|
||||
"rxjs": "^6.0.0 || ^7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@nestjs/cli": {
|
||||
"version": "9.5.0",
|
||||
"dev": true,
|
||||
|
@ -2830,9 +2843,18 @@
|
|||
},
|
||||
"node_modules/asynckit": {
|
||||
"version": "0.4.0",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/axios": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz",
|
||||
"integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.0",
|
||||
"form-data": "^4.0.0",
|
||||
"proxy-from-env": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/babel-jest": {
|
||||
"version": "29.5.0",
|
||||
"dev": true,
|
||||
|
@ -3457,7 +3479,6 @@
|
|||
},
|
||||
"node_modules/combined-stream": {
|
||||
"version": "1.0.8",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"delayed-stream": "~1.0.0"
|
||||
|
@ -3688,7 +3709,6 @@
|
|||
},
|
||||
"node_modules/delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
|
@ -4496,6 +4516,25 @@
|
|||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.2",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
|
||||
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/RubenVerborgh"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"debug": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/fork-ts-checker-webpack-plugin": {
|
||||
"version": "8.0.0",
|
||||
"dev": true,
|
||||
|
@ -4525,7 +4564,6 @@
|
|||
},
|
||||
"node_modules/form-data": {
|
||||
"version": "4.0.0",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"asynckit": "^0.4.0",
|
||||
|
@ -6732,6 +6770,11 @@
|
|||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/proxy-from-env": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
|
||||
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
|
||||
},
|
||||
"node_modules/pump": {
|
||||
"version": "3.0.0",
|
||||
"dev": true,
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
"@liaoliaots/nestjs-redis": "^9.0.5",
|
||||
"@mobicoop/configuration-module": "^1.2.0",
|
||||
"@mobicoop/ddd-library": "^0.3.0",
|
||||
"@mobicoop/health-module": "^1.1.0",
|
||||
"@mobicoop/health-module": "^2.0.0",
|
||||
"@mobicoop/message-broker-module": "^1.2.0",
|
||||
"@nestjs/common": "^9.0.0",
|
||||
"@nestjs/config": "^2.3.1",
|
||||
|
|
|
@ -8,13 +8,10 @@ import {
|
|||
import { EventEmitterModule } from '@nestjs/event-emitter';
|
||||
import { RequestContextModule } from 'nestjs-request-context';
|
||||
import { MessagerModule } from '@modules/messager/messager.module';
|
||||
import { HealthModule } from '@mobicoop/health-module';
|
||||
import { HealthModule, HealthRepositoryPort } from '@mobicoop/health-module';
|
||||
import { AD_REPOSITORY } from '@modules/ad/ad.di-tokens';
|
||||
import { MESSAGE_PUBLISHER } from '@modules/messager/messager.di-tokens';
|
||||
import {
|
||||
HealthModuleOptions,
|
||||
ICheckRepository,
|
||||
} from '@mobicoop/health-module/dist/core/domain/types/health.types';
|
||||
import { HealthModuleOptions } from '@mobicoop/health-module/dist/core/domain/types/health.types';
|
||||
import { MessagePublisherPort } from '@mobicoop/ddd-library';
|
||||
|
||||
@Module({
|
||||
|
@ -47,12 +44,17 @@ import { MessagePublisherPort } from '@mobicoop/ddd-library';
|
|||
imports: [AdModule, MessagerModule],
|
||||
inject: [AD_REPOSITORY, MESSAGE_PUBLISHER],
|
||||
useFactory: async (
|
||||
adRepository: ICheckRepository,
|
||||
adRepository: HealthRepositoryPort,
|
||||
messagePublisher: MessagePublisherPort,
|
||||
): Promise<HealthModuleOptions> => ({
|
||||
serviceName: 'ad',
|
||||
criticalLoggingKey: 'logging.ad.health.crit',
|
||||
checkRepositories: [adRepository],
|
||||
checkRepositories: [
|
||||
{
|
||||
name: 'AdRepository',
|
||||
repository: adRepository,
|
||||
},
|
||||
],
|
||||
messagePublisher,
|
||||
}),
|
||||
}),
|
||||
|
|
|
@ -2,7 +2,6 @@ syntax = "proto3";
|
|||
|
||||
package health;
|
||||
|
||||
|
||||
service Health {
|
||||
rpc Check(HealthCheckRequest) returns (HealthCheckResponse);
|
||||
}
|
||||
|
@ -18,4 +17,5 @@ message HealthCheckResponse {
|
|||
NOT_SERVING = 2;
|
||||
}
|
||||
ServingStatus status = 1;
|
||||
string message = 2;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue