-
-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Added MongooseHealthIndicator #36
Conversation
- Brought DatabasePingCheckSettings interface from DatabaseHealthIndicator out to its own file - Refactored HealthIndicator abstract class to contain more common functionalities to share between MongooseHealthIndicator and DatabaseHealthIndicator - DatabaseHealthIndicator and MongooseHealthIndicator are much cleaner since the exposed method are common. The only difference (abstract method) is the different method to ping the Connection based on Mongoose or TypeOrm. - Added mongoose and @nestjs/mongooses to peerDependencies, added @types/mongoose to devDepdencies - Added MongooseHealthIndicator usage to the sample application. Also updated package.json in the sample app to have Mongoose installed.
Overlooked |
- Reverted HealthIndicator - Added DatabaseHealthIndicator abstract extends HealthIndicator and added common functionalities for DatabaseHealthIndicator - Renamed DatabaseHealthIndicator to TypeOrmHealthIndicator to differentiate between TypeOrm and MongooseHealthIndicator - Removed generic from HealthIndicator and DatabasePingCheckSettings. Used union type Connection | MongooseConnection - Updated TermninusCoreModule
|
Closed due to Unit Test failing. |
Closed. Can't seem to connect to MongoDB for Unit Test. This PR has been flooded with so many meaningless comment so Imma close and will re-submit another PR. |
|
||
const getTerminusOptions = ( | ||
dogHealthIndicator: DogHealthIndicator, | ||
catHealthIndicator: CatHealthIndicator, | ||
dnsHealthIndicator: DNSHealthIndicator, | ||
mongoHealthIndicator: MongooseHealthIndicator, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should keep the sample dogs sample app as it is. It is useful for the user to start the sample app, without having to start a MongoDB instance locally.
If you want to create a sample, feel free to create a new folder sample/001-mongoose
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Looking good! :)
You can also squash these commits. Try out While you are rebasing, could you use this commit format? Note: also use present tense for commits (e.g. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
MongooseHealthIndicator
DatabasePingCheckSettings
interface fromDatabaseHealthIndicator
out to its own fileHealthIndicator
abstract class to contain more common functionalities to share betweenMongooseHealthIndicator
andDatabaseHealthIndicator
DatabaseHealthIndicator
andMongooseHealthIndicator
are much cleaner since the exposed method are common. The only difference (abstract method) is the different method to ping the Connection based on Mongoose or TypeOrm.mongoose
and@nestjs/mongooses
to peerDependencies, added@types/mongoose
to devDependenciesMongooseHealthIndicator
usage to the sample application. Also updated package.json in the sample app to have Mongoose installed.What is the current behavior?
MongooseHealthCheck
is missingIssue Number: #35
What is the new behavior?
MongooseHealthCheck
is addedDoes this PR introduce a breaking change?
Other information
Please review as it contains more changes than intended.
DatabasePingCheckOptions
now takes in a generic of typeConnection | MongooseConnection
HealthCheckIndicator
now takes in a generic of typeConnection | MongooseConnection
EDIT: Please see comment below