claude-code-marketplace 0.5.0 → 0.5.2
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 +1 -1
- package/public/style.css +2 -2
- package/server.js +10 -5
package/package.json
CHANGED
package/public/style.css
CHANGED
package/server.js
CHANGED
|
@@ -31,6 +31,10 @@ let projectPath = getArg('project') || process.cwd();
|
|
|
31
31
|
if (projectPath.startsWith('~')) projectPath = projectPath.replace('~', os.homedir());
|
|
32
32
|
const PORT = parseInt(getArg('port') || process.env.PORT || '3457', 10);
|
|
33
33
|
|
|
34
|
+
function toUnixPath(p) {
|
|
35
|
+
return p ? p.replace(/\\/g, '/') : p;
|
|
36
|
+
}
|
|
37
|
+
|
|
34
38
|
function readJsonSafe(filePath) {
|
|
35
39
|
try {
|
|
36
40
|
return JSON.parse(fs.readFileSync(filePath, 'utf-8'));
|
|
@@ -157,7 +161,7 @@ function loadMarketplaces() {
|
|
|
157
161
|
path: sourceData.path || null,
|
|
158
162
|
url: sourceData.url || null,
|
|
159
163
|
},
|
|
160
|
-
installLocation,
|
|
164
|
+
installLocation: toUnixPath(installLocation),
|
|
161
165
|
lastUpdated: entryData.lastUpdated || null,
|
|
162
166
|
version: null,
|
|
163
167
|
plugins: [],
|
|
@@ -262,7 +266,8 @@ function loadMarketplaces() {
|
|
|
262
266
|
|
|
263
267
|
let availableVersion = pd.version || null;
|
|
264
268
|
if (!availableVersion) {
|
|
265
|
-
|
|
269
|
+
// Use originDir (source copy) for available version, not pluginDir (installed/cached copy)
|
|
270
|
+
const versionDir = originDir || pluginDir;
|
|
266
271
|
if (versionDir) {
|
|
267
272
|
const pluginJson = path.join(versionDir, '.claude-plugin', 'plugin.json');
|
|
268
273
|
const pjData = readJsonSafe(pluginJson);
|
|
@@ -284,8 +289,8 @@ function loadMarketplaces() {
|
|
|
284
289
|
scopeDetails,
|
|
285
290
|
installedScopes,
|
|
286
291
|
components,
|
|
287
|
-
_pluginDir: pluginDir,
|
|
288
|
-
_originDir: originDir,
|
|
292
|
+
_pluginDir: toUnixPath(pluginDir),
|
|
293
|
+
_originDir: toUnixPath(originDir),
|
|
289
294
|
_fsComps: fsComps,
|
|
290
295
|
metadata: Object.fromEntries(
|
|
291
296
|
Object.entries(pd).filter(([k]) => !['name', 'description', 'source', 'version', ...compKeys].includes(k))
|
|
@@ -472,7 +477,7 @@ function scanCustomizations(basePath, scope) {
|
|
|
472
477
|
scopeDetails,
|
|
473
478
|
installedScopes: [scope],
|
|
474
479
|
components,
|
|
475
|
-
_pluginDir: basePath,
|
|
480
|
+
_pluginDir: toUnixPath(basePath),
|
|
476
481
|
_fsComps: components,
|
|
477
482
|
metadata: {},
|
|
478
483
|
}],
|