-
Notifications
You must be signed in to change notification settings - Fork 193
fix(cli): fix link in plugin docs and npm workspace issue #2164
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
WalkthroughAdds an install-wgc Makefile target and updates templates to run wgc directly (and depend on install-wgc). Replaces documentation pointers with an explicit plugin structure block. Removes the --only-plugin flag from the router plugin init script and updates user-facing docs URLs. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
✨ Finishing Touches
🧪 Generate unit tests
🪧 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
CodeRabbit Configuration File (
|
Router image scan passed✅ No security vulnerabilities found in image: |
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.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
cli/src/commands/router/commands/plugin/templates/plugin.ts (4)
9-9: Invalid go directive in go.mod template (patch versions are not allowed)The go directive must be major.minor (e.g., go 1.24). go 1.24.1 will cause module parsing errors.
Apply this diff:
-go 1.24.1 +go 1.24Also ensure the Dockerfile base image and CI toolchain match the selected Go minor version.
47-47: Wrong import path for generated service; should use the module’s generated folderThis currently imports from the cosmo repo instead of the generated code of the newly created plugin module, which will not compile.
Apply this diff:
- service "github.com/wundergraph/cosmo/plugin/generated" + service "{modulePath}/generated"
95-99: Same incorrect import path in testsUpdate tests to import the generated package from the plugin module.
Apply this diff:
- service "github.com/wundergraph/cosmo/plugin/generated" + service "{modulePath}/generated"
283-285: Unify documentation links to use/router/pluginsacross all templatesThe CLI currently mixes two URL paths for the router plugins guide:
- The plugin template (
plugin.ts) and init command usehttps://cosmo-docs.wundergraph.com/router/plugins- The project template (
project.ts) at line 146 mistakenly points tohttps://cosmo-docs.wundergraph.com/connect/pluginsbefore reverting back to/router/pluginsat line 198Please update the single incorrect instance so that every reference consistently uses
/router/plugins.Files to fix:
- cli/src/commands/router/commands/plugin/templates/project.ts
- Line 146: change
https://cosmo-docs.wundergraph.com/connect/plugins
→
https://cosmo-docs.wundergraph.com/router/pluginsAfter this change, all mentions of the “Cosmo Router Plugins Guide” will point to the same canonical URL.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
cli/src/commands/router/commands/plugin/templates/plugin.ts(2 hunks)cli/src/commands/router/commands/plugin/templates/project.ts(2 hunks)router/__schemas/plugin.sh(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-12T09:13:38.973Z
Learnt from: Noroth
PR: wundergraph/cosmo#2132
File: router-plugin/plugin.go:88-104
Timestamp: 2025-08-12T09:13:38.973Z
Learning: In the Cosmo router plugin system, plugin logs are written to stdout and incorporated by the router into its zap logger, which handles timestamping. Therefore, plugin loggers should use DisableTime: true to avoid redundant timestamps that could interfere with the router's log processing.
Applied to files:
cli/src/commands/router/commands/plugin/templates/project.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
- GitHub Check: image_scan (nonroot)
- GitHub Check: build_push_image (nonroot)
- GitHub Check: build_push_image
- GitHub Check: integration_test (./events)
- GitHub Check: image_scan
- GitHub Check: build_test
- GitHub Check: integration_test (./telemetry)
- GitHub Check: integration_test (./. ./fuzzquery ./lifecycle ./modules)
- GitHub Check: Analyze (go)
🔇 Additional comments (3)
router/__schemas/plugin.sh (1)
5-5: Dropping --only-plugin looks correct, given subsequent steps still target ../plugins/hello-worldThe script continues to build/test the plugin at ../plugins/hello-world, so the broader scaffold from init should not break this flow.
cli/src/commands/router/commands/plugin/templates/project.ts (1)
21-29: Nice: compose and download now depend on install-wgcThis guards against missing CLI and reduces flakiness in first-run scenarios.
cli/src/commands/router/commands/plugin/templates/plugin.ts (1)
259-273: Good addition: explicit Plugin structure blockThis makes onboarding easier and reduces context switching from external docs.
wilsonrivera
left a comment
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.
LGTM
Summary by CodeRabbit
Documentation
Chores
Checklist