-
-
Notifications
You must be signed in to change notification settings - Fork 12
feat: cli plugin support #181
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
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
|
Claude finished @ymc9's task —— View job PR Review: CLI Plugin SupportI've completed a thorough review of this CLI plugin support implementation. Here's my comprehensive feedback: Todo List:
🎯 Overall Assessment: Good Implementation with Some ConcernsThis PR introduces a clean plugin architecture for the CLI, but there are several important issues to address. 🔧 Code Quality & Architecture✅ Strengths:
🚨 Security ConcernsCritical Issue - Dynamic Import Vulnerability ( cliPlugin = (await import(provider)).default as CliPlugin;This allows arbitrary code execution by importing any module specified in the provider field. This is a high-severity security vulnerability. Recommendations:
🔍 Potential Bugs
⚡ Performance Considerations✅ Good:
🧪 Test Coverage✅ Adequate:
📝 Missing:
📋 Specific Recommendations
🔄 Suggestions for Future Enhancements
📊 SummaryThis is a solid foundation for a plugin system, but the security vulnerability around dynamic imports must be addressed before merging. The architecture is clean and the implementation is mostly well-structured, but security hardening is essential. Recommendation: Request changes - address the security issue and consider the type safety improvements before approval. |
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 implements CLI plugin support by introducing a new plugin system architecture. The changes enable CLI plugins to be loaded and executed during code generation, replacing the previous hardcoded generation approach.
Key changes:
- Introduces a new
CliPlugininterface and plugin system - Refactors
TsSchemaGeneratorto accept AST models directly instead of file paths - Adds core plugins for TypeScript and Prisma schema generation
- Updates CLI commands from
zenstacktozenfor brevity
Reviewed Changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/sdk/src/cli-plugin.ts | Defines new CLI plugin interface and context types |
| packages/sdk/src/ts-schema-generator.ts | Refactored to accept Model AST instead of file paths |
| packages/cli/src/actions/generate.ts | Implements plugin loading and execution logic |
| packages/cli/src/plugins/ | Adds core TypeScript and Prisma plugins |
| samples/blog/package.json | Updates CLI commands to use shorter zen syntax |
| Multiple tsconfig.json files | Removes redundant baseUrl configuration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
|
Claude finished @ymc9's task —— View job PR Review: CLI Plugin SupportI've completed a thorough review of this CLI plugin support implementation. Here's my comprehensive feedback: Todo List:
🎯 Overall Assessment: Good Implementation with Some ConcernsThis PR introduces a clean plugin architecture for the CLI, but there are several important issues to address. 🔧 Code Quality & Architecture✅ Strengths:
🚨 Security ConcernsCritical Issue - Dynamic Import Vulnerability ( cliPlugin = (await import(provider)).default as CliPlugin;This allows arbitrary code execution by importing any module specified in the provider field. This is a high-severity security vulnerability. Recommendations:
🔍 Potential Bugs
⚡ Performance Considerations✅ Good:
🧪 Test Coverage✅ Adequate:
📝 Missing:
📋 Specific Recommendations
🔄 Suggestions for Future Enhancements
📊 SummaryThis is a solid foundation for a plugin system, but the security vulnerability around dynamic imports must be addressed before merging. The architecture is clean and the implementation is mostly well-structured, but security hardening is essential. Recommendation: Request changes - address the security issue and consider the type safety improvements before approval. |
|
Claude finished @ymc9's task —— View job PR Review: CLI Plugin SupportI've completed a thorough review of this CLI plugin support implementation. Here's my comprehensive feedback: Todo List:
🎯 Overall Assessment: Good Implementation with Some ConcernsThis PR introduces a clean plugin architecture for the CLI, but there are several important issues to address. 🔧 Code Quality & Architecture✅ Strengths:
🚨 Security ConcernsCritical Issue - Dynamic Import Vulnerability ( cliPlugin = (await import(provider)).default as CliPlugin;This allows arbitrary code execution by importing any module specified in the provider field. This is a high-severity security vulnerability. Recommendations:
🔍 Potential Bugs
⚡ Performance Considerations✅ Good:
🧪 Test Coverage✅ Adequate:
📝 Missing:
📋 Specific Recommendations
🔄 Suggestions for Future Enhancements
📊 SummaryThis is a solid foundation for a plugin system, but the security vulnerability around dynamic imports must be addressed before merging. The architecture is clean and the implementation is mostly well-structured, but security hardening is essential. Recommendation: Request changes - address the security issue and consider the type safety improvements before approval. |
|
Claude finished @ymc9's task —— View job Claude finished @ymc9's task —— View job PR Review: CLI Plugin SupportI've completed a thorough review of this CLI plugin support implementation. Here's my comprehensive feedback: Todo List:
🎯 Overall Assessment: Good Implementation with Some ConcernsThis PR introduces a clean plugin architecture for the CLI, but there are several important issues to address. 🔧 Code Quality & Architecture✅ Strengths:
🚨 Security ConcernsCritical Issue - Dynamic Import Vulnerability ( cliPlugin = (await import(provider)).default as CliPlugin;This allows arbitrary code execution by importing any module specified in the provider field. This is a high-severity security vulnerability. Recommendations:
🔍 Potential Bugs
⚡ Performance Considerations✅ Good:
🧪 Test Coverage✅ Adequate:
📝 Missing:
📋 Specific Recommendations
🔄 Suggestions for Future Enhancements
📊 SummaryThis is a solid foundation for a plugin system, but the security vulnerability around dynamic imports must be addressed before merging. The architecture is clean and the implementation is mostly well-structured, but security hardening is essential. Recommendation: Request changes - address the security issue and consider the type safety improvements before approval. |
No description provided.