-
Notifications
You must be signed in to change notification settings - Fork 6
feat: support providing redis client or redis URL #60
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR enhances the Redis configuration flexibility by allowing users to provide Redis configuration in three ways: as a Redis client instance, as RedisOptions object, or as a connection string URL. This addresses issue #59 by making the plugin more convenient to use when integrating with existing Redis clients.
Key Changes:
- Modified the
redisoption type to acceptRedis | RedisOptions | stringinstead of a specific object structure - Added type guard function to detect existing Redis client instances
- Added comprehensive test coverage for all three configuration methods
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/types.ts | Updated MCPPluginOptions interface to accept Redis client, options object, or connection string |
| src/index.ts | Added type guard function and logic to handle different Redis configuration formats |
| test/redis-integration.test.ts | Added test cases for Redis client instance and URL string initialization |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull Request Overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull Request Overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull Request Overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Addresses #59
Please let me know if this requires any further work 🙏🏻