-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
feat(installer): community module browser and custom URL support #2229
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
Changes from all commits
7c58c0b
cccc821
f06f21f
bbcc6a8
66914df
1b95c10
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -818,6 +818,34 @@ class Manifest { | |||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| // Check if this is a community module | ||||||||||||||||||||||||||||||||||||||||||||||||||
| const { CommunityModuleManager } = require('../modules/community-manager'); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| const communityMgr = new CommunityModuleManager(); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| const communityInfo = await communityMgr.getModuleByCode(moduleName); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if (communityInfo) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| const communityVersion = await this._readMarketplaceVersion(moduleName, moduleSourcePath); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| return { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| version: communityVersion || communityInfo.version, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| source: 'community', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| npmPackage: communityInfo.npmPackage || null, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| repoUrl: communityInfo.url || null, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| // Check if this is a custom module (from user-provided URL) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| const { CustomModuleManager } = require('../modules/custom-module-manager'); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| const customMgr = new CustomModuleManager(); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| const customSource = await customMgr.findModuleSourceByCode(moduleName); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if (customSource) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| const customVersion = await this._readMarketplaceVersion(moduleName, moduleSourcePath); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| return { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| version: customVersion, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| source: 'custom', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| npmPackage: null, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| repoUrl: null, | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. tools/installer/core/manifest.js:845 — For custom modules, Severity: medium 🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage. |
||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+835
to
+846
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use This branch already found the module in the custom cache, but 💡 Proposed fix- const customVersion = await this._readMarketplaceVersion(moduleName, moduleSourcePath);
+ const customVersion = await this._readMarketplaceVersion(moduleName, moduleSourcePath || customSource);📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| // Unknown module | ||||||||||||||||||||||||||||||||||||||||||||||||||
| const version = await this._readMarketplaceVersion(moduleName, moduleSourcePath); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| return { | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
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.
tools/installer/core/manifest.js:840 — In the custom-module block,
customSourceis computed but not used, so_readMarketplaceVersion()is typically called withmoduleSourcePath=nulland falls back to the external-module cache (likely returningnull).That means custom modules may always show
version: nullin manifests even when the cached repo has a.claude-plugin/marketplace.json.Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.