@smithery/cli 1.0.2 → 1.0.4
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/dist/constants.js +1 -1
- package/dist/index.js +12 -12
- package/dist/utils/config-manager.js +8 -6
- package/dist/utils/registry-utils.js +3 -7
- package/package.json +1 -1
|
@@ -5,7 +5,8 @@ import path from "node:path";
|
|
|
5
5
|
export class ConfigManager {
|
|
6
6
|
static getConfigPath(client) {
|
|
7
7
|
const normalizedClient = client?.toLowerCase() || "claude";
|
|
8
|
-
return ConfigManager.clientPaths[normalizedClient] ||
|
|
8
|
+
return (ConfigManager.clientPaths[normalizedClient] ||
|
|
9
|
+
path.join(path.dirname(ConfigManager.configPath), "..", client || "claude", `${normalizedClient}_config.json`));
|
|
9
10
|
}
|
|
10
11
|
static readConfig(client) {
|
|
11
12
|
try {
|
|
@@ -95,23 +96,24 @@ export class ConfigManager {
|
|
|
95
96
|
const platformPaths = {
|
|
96
97
|
win32: {
|
|
97
98
|
baseDir: process.env.APPDATA || path.join(homeDir, "AppData", "Roaming"),
|
|
98
|
-
vscodePath: path.join("Code", "User", "globalStorage")
|
|
99
|
+
vscodePath: path.join("Code", "User", "globalStorage"),
|
|
99
100
|
},
|
|
100
101
|
darwin: {
|
|
101
102
|
baseDir: path.join(homeDir, "Library", "Application Support"),
|
|
102
|
-
vscodePath: path.join("Code", "User", "globalStorage")
|
|
103
|
+
vscodePath: path.join("Code", "User", "globalStorage"),
|
|
103
104
|
},
|
|
104
105
|
linux: {
|
|
105
106
|
baseDir: process.env.XDG_CONFIG_HOME || path.join(homeDir, ".config"),
|
|
106
|
-
vscodePath: path.join("Code/User/globalStorage")
|
|
107
|
-
}
|
|
107
|
+
vscodePath: path.join("Code/User/globalStorage"),
|
|
108
|
+
},
|
|
108
109
|
};
|
|
109
110
|
const platform = process.platform;
|
|
110
111
|
const { baseDir, vscodePath } = platformPaths[platform];
|
|
111
112
|
// Define client paths using the platform-specific base directories
|
|
112
113
|
const clientPaths = {
|
|
113
114
|
claude: path.join(baseDir, "Claude", "claude_desktop_config.json"),
|
|
114
|
-
cline: path.join(baseDir, vscodePath, "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json")
|
|
115
|
+
cline: path.join(baseDir, vscodePath, "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json"),
|
|
116
|
+
"roo-cline": path.join(baseDir, vscodePath, "rooveterinaryinc.roo-cline", "settings", "cline_mcp_settings.json"),
|
|
115
117
|
};
|
|
116
118
|
ConfigManager.configPath = clientPaths.claude;
|
|
117
119
|
ConfigManager.clientPaths = clientPaths;
|
|
@@ -40,8 +40,8 @@ export async function resolveServer(serverId, client) {
|
|
|
40
40
|
}
|
|
41
41
|
const registryServer = await response.json();
|
|
42
42
|
const resolvedServer = {
|
|
43
|
-
id: registryServer.
|
|
44
|
-
name: registryServer.
|
|
43
|
+
id: registryServer.qualifiedName,
|
|
44
|
+
name: registryServer.displayName,
|
|
45
45
|
connections: registryServer.connections,
|
|
46
46
|
isInstalled: isInstalled, // Use the checked installation status
|
|
47
47
|
client: client,
|
|
@@ -65,12 +65,8 @@ export async function getServerConfiguration(serverId, configValues, connectionT
|
|
|
65
65
|
},
|
|
66
66
|
body: JSON.stringify(requestBody),
|
|
67
67
|
});
|
|
68
|
-
const text = await response.text();
|
|
69
|
-
if (!text) {
|
|
70
|
-
throw new Error("Empty response received from registry");
|
|
71
|
-
}
|
|
72
68
|
try {
|
|
73
|
-
const parsed =
|
|
69
|
+
const parsed = await response.json();
|
|
74
70
|
return parsed.result;
|
|
75
71
|
}
|
|
76
72
|
catch (parseError) {
|