claudeup 3.6.4 → 3.6.5
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
|
@@ -54,11 +54,18 @@ export async function installPlugin(pluginId, scope = "user") {
|
|
|
54
54
|
await execClaude(["plugin", "install", pluginId, "--scope", scope]);
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
|
-
* Uninstall a plugin using claude CLI
|
|
58
|
-
*
|
|
57
|
+
* Uninstall a plugin using claude CLI.
|
|
58
|
+
* Falls back to `disable` if `uninstall` fails (e.g., for plugins
|
|
59
|
+
* installed via old JSON method that the CLI doesn't recognize).
|
|
59
60
|
*/
|
|
60
61
|
export async function uninstallPlugin(pluginId, scope = "user") {
|
|
61
|
-
|
|
62
|
+
try {
|
|
63
|
+
await execClaude(["plugin", "uninstall", pluginId, "--scope", scope]);
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
// Fallback: disable works for plugins installed via old JSON method
|
|
67
|
+
await execClaude(["plugin", "disable", pluginId, "--scope", scope]);
|
|
68
|
+
}
|
|
62
69
|
}
|
|
63
70
|
/**
|
|
64
71
|
* Enable a previously disabled plugin
|
|
@@ -75,14 +75,20 @@ export async function installPlugin(
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
|
-
* Uninstall a plugin using claude CLI
|
|
79
|
-
*
|
|
78
|
+
* Uninstall a plugin using claude CLI.
|
|
79
|
+
* Falls back to `disable` if `uninstall` fails (e.g., for plugins
|
|
80
|
+
* installed via old JSON method that the CLI doesn't recognize).
|
|
80
81
|
*/
|
|
81
82
|
export async function uninstallPlugin(
|
|
82
83
|
pluginId: string,
|
|
83
84
|
scope: PluginScope = "user",
|
|
84
85
|
): Promise<void> {
|
|
85
|
-
|
|
86
|
+
try {
|
|
87
|
+
await execClaude(["plugin", "uninstall", pluginId, "--scope", scope]);
|
|
88
|
+
} catch {
|
|
89
|
+
// Fallback: disable works for plugins installed via old JSON method
|
|
90
|
+
await execClaude(["plugin", "disable", pluginId, "--scope", scope]);
|
|
91
|
+
}
|
|
86
92
|
}
|
|
87
93
|
|
|
88
94
|
/**
|