claude-code-marketplace 0.5.9 → 0.5.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server.js +9 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-marketplace",
3
- "version": "0.5.9",
3
+ "version": "0.5.10",
4
4
  "description": "Web UI for browsing and managing Claude Code marketplace plugins",
5
5
  "main": "server.js",
6
6
  "bin": {
package/server.js CHANGED
@@ -258,7 +258,12 @@ function loadMarketplaces() {
258
258
  const components = {};
259
259
  for (const k of compKeys) {
260
260
  if (fsComps && Array.isArray(fsComps[k]) && fsComps[k].length > 0) {
261
- components[k] = fsComps[k];
261
+ if (Array.isArray(pd[k]) && pd[k].length > 0) {
262
+ const allowed = new Set(pd[k].map(p => path.basename(typeof p === 'string' ? p : (p.name || String(p)))));
263
+ components[k] = fsComps[k].filter(name => allowed.has(name));
264
+ } else {
265
+ components[k] = fsComps[k];
266
+ }
262
267
  } else if (Array.isArray(pd[k]) && pd[k].length > 0) {
263
268
  components[k] = pd[k].map(p => typeof p === 'string' ? path.basename(p) : (p.name || String(p)));
264
269
  } else if (pd[k]) {
@@ -617,9 +622,9 @@ app.get('/api/plugins/:pluginId/components', (req, res) => {
617
622
  }
618
623
  if (!plugin?._pluginDir) return res.status(404).json({ error: 'Plugin directory not found', pluginId });
619
624
 
620
- const comps = plugin._fsComps || countComponents(plugin._pluginDir, plugin.metadata);
621
- comps._pluginDir = plugin._pluginDir;
622
- res.json(comps);
625
+ const comps = plugin.components || plugin._fsComps || countComponents(plugin._pluginDir, plugin.metadata);
626
+ const result = { ...comps, _pluginDir: plugin._pluginDir };
627
+ res.json(result);
623
628
  });
624
629
 
625
630
  app.get('/api/plugins/:pluginId/preview/*', (req, res) => {