claude-code-marketplace 0.5.10 → 0.5.12

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-marketplace",
3
- "version": "0.5.10",
3
+ "version": "0.5.12",
4
4
  "description": "Web UI for browsing and managing Claude Code marketplace plugins",
5
5
  "main": "server.js",
6
6
  "bin": {
package/public/style.css CHANGED
@@ -79,9 +79,8 @@ body {
79
79
  background: var(--bg-deep);
80
80
  color: var(--text-primary);
81
81
  line-height: 1.5;
82
- height: calc(100vh / 1.2);
82
+ height: 100vh;
83
83
  display: flex;
84
- zoom: 1.2;
85
84
  flex-direction: column;
86
85
  overflow: hidden;
87
86
  -webkit-font-smoothing: antialiased;
@@ -279,7 +278,7 @@ body {
279
278
  /* === TREE PANEL === */
280
279
 
281
280
  .tree-panel {
282
- flex: 0 0 var(--sidebar-w, 400px);
281
+ flex: 0 0 var(--sidebar-w, 60%);
283
282
  display: flex;
284
283
  flex-direction: column;
285
284
  overflow: hidden;
package/server.js CHANGED
@@ -256,6 +256,7 @@ function loadMarketplaces() {
256
256
 
257
257
  const fsComps = pluginDir ? countComponents(pluginDir) : null;
258
258
  const components = {};
259
+ const inlineConfig = {};
259
260
  for (const k of compKeys) {
260
261
  if (fsComps && Array.isArray(fsComps[k]) && fsComps[k].length > 0) {
261
262
  if (Array.isArray(pd[k]) && pd[k].length > 0) {
@@ -266,10 +267,19 @@ function loadMarketplaces() {
266
267
  }
267
268
  } else if (Array.isArray(pd[k]) && pd[k].length > 0) {
268
269
  components[k] = pd[k].map(p => typeof p === 'string' ? path.basename(p) : (p.name || String(p)));
270
+ } else if (pd[k] && typeof pd[k] === 'object') {
271
+ components[k] = Object.keys(pd[k]);
272
+ inlineConfig[k] = pd[k];
269
273
  } else if (pd[k]) {
270
- components[k] = Array.isArray(pd[k]) ? [] : [String(pd[k])];
274
+ components[k] = [String(pd[k])];
271
275
  }
272
276
  }
277
+ if (fsComps?._configFiles) components._configFiles = fsComps._configFiles;
278
+ if (fsComps?._readmePath) components._readmePath = fsComps._readmePath;
279
+ for (const k of Object.keys(inlineConfig)) {
280
+ if (!components._configFiles) components._configFiles = {};
281
+ if (!components._configFiles[k]) components._configFiles[k] = `${INLINE_PREFIX}${k}`;
282
+ }
273
283
 
274
284
  const installedVersion = [scopeDetails.user, scopeDetails.project, scopeDetails.local]
275
285
  .find(d => d?.version && d.version !== 'unknown')?.version || null;
@@ -301,6 +311,8 @@ function loadMarketplaces() {
301
311
  components,
302
312
  _pluginDir: toUnixPath(pluginDir),
303
313
  _originDir: toUnixPath(originDir),
314
+ _installLocation: toUnixPath(installLocation),
315
+ _inlineConfig: Object.keys(inlineConfig).length ? inlineConfig : null,
304
316
  _fsComps: fsComps,
305
317
  metadata: Object.fromEntries(
306
318
  Object.entries(pd).filter(([k]) => !['name', 'description', 'source', 'version', ...compKeys].includes(k))
@@ -429,6 +441,7 @@ function findFiles(dir, ext) {
429
441
  }
430
442
 
431
443
  const VIRTUAL_PREFIX = '_custom/';
444
+ const INLINE_PREFIX = '__inline__/';
432
445
  const SCOPE_LABELS = { user: 'User Customizations', project: 'Project Customizations' };
433
446
  const EMPTY_SCOPE = { installed: false, enabled: false, version: null, installPath: null };
434
447
 
@@ -623,14 +636,21 @@ app.get('/api/plugins/:pluginId/components', (req, res) => {
623
636
  if (!plugin?._pluginDir) return res.status(404).json({ error: 'Plugin directory not found', pluginId });
624
637
 
625
638
  const comps = plugin.components || plugin._fsComps || countComponents(plugin._pluginDir, plugin.metadata);
626
- const result = { ...comps, _pluginDir: plugin._pluginDir };
627
- res.json(result);
639
+ res.json({ ...comps, _pluginDir: plugin._pluginDir });
628
640
  });
629
641
 
630
642
  app.get('/api/plugins/:pluginId/preview/*', (req, res) => {
631
643
  const pluginId = decodeURIComponent(req.params.pluginId);
632
644
  const relPath = req.params[0];
633
645
  const marketplaces = getCachedMarketplaces();
646
+
647
+ if (relPath.startsWith(INLINE_PREFIX)) {
648
+ const type = relPath.slice(INLINE_PREFIX.length);
649
+ const inline = findPlugin(pluginId, marketplaces)?._inlineConfig?.[type];
650
+ if (inline === undefined) return res.status(404).json({ error: 'Inline config not found' });
651
+ return res.json({ type: 'file', content: JSON.stringify({ [type]: inline }, null, 2), name: `${type}.json` });
652
+ }
653
+
634
654
  const pluginDir = resolvePluginDir(pluginId, marketplaces);
635
655
  if (!pluginDir) return res.status(404).json({ error: 'Plugin not found' });
636
656
 
@@ -677,7 +697,13 @@ app.post('/api/open-in-editor', (req, res) => {
677
697
  const pluginJson = path.join(pluginDir, '.claude-plugin', 'plugin.json');
678
698
  if (fs.existsSync(pluginJson)) args.push(pluginJson);
679
699
 
680
- if (relativePath) {
700
+ if (relativePath && relativePath.startsWith(INLINE_PREFIX)) {
701
+ const installLocation = findPlugin(pluginId, marketplaces)?._installLocation;
702
+ if (installLocation) {
703
+ const mktJson = path.join(installLocation, '.claude-plugin', 'marketplace.json');
704
+ if (fs.existsSync(mktJson)) args.push(mktJson);
705
+ }
706
+ } else if (relativePath) {
681
707
  const fullPath = path.resolve(pluginDir, resolveVirtualRelPath(pluginId, relativePath));
682
708
  if (isPathAllowed(fullPath, pluginDir, pluginId)) args.push(fullPath);
683
709
  }