@lenne.tech/cli 1.26.0 → 1.26.1
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/build/commands/claude/plugins.js +13 -10
- package/package.json +1 -1
|
@@ -19,20 +19,22 @@ const shell_config_1 = require("../../lib/shell-config");
|
|
|
19
19
|
function installPlugin(plugin, cli, toolbox) {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
21
|
const { print: { error, info, spin }, } = toolbox;
|
|
22
|
-
// Step 1: Install or update plugin
|
|
22
|
+
// Step 1: Install or update plugin.
|
|
23
|
+
//
|
|
24
|
+
// `claude plugin install` is a no-op for an already-installed plugin: it reports
|
|
25
|
+
// "already installed" and leaves the active version pinned to whatever was installed
|
|
26
|
+
// before. To actually pull a newer release from the (freshly updated) marketplace
|
|
27
|
+
// cache, an existing install must be bumped with `claude plugin update`.
|
|
23
28
|
const fullPluginName = `${plugin.pluginName}@${plugin.marketplaceName}`;
|
|
24
29
|
const pluginSpinner = spin(`Installing/updating ${plugin.pluginName}`);
|
|
25
|
-
|
|
30
|
+
let installResult = (0, claude_cli_1.runClaudeCommand)(cli, `plugin install ${fullPluginName}`);
|
|
26
31
|
let pluginAction = 'installed';
|
|
27
|
-
if (installResult.output.includes('already
|
|
28
|
-
|
|
32
|
+
if (installResult.output.includes('already installed')) {
|
|
33
|
+
// Plugin was already present — follow up with an update to reach the latest version.
|
|
34
|
+
installResult = (0, claude_cli_1.runClaudeCommand)(cli, `plugin update ${fullPluginName}`);
|
|
35
|
+
pluginAction = installResult.output.includes('already') ? 'up to date' : 'updated';
|
|
29
36
|
}
|
|
30
|
-
|
|
31
|
-
pluginAction = 'updated';
|
|
32
|
-
}
|
|
33
|
-
if (installResult.success ||
|
|
34
|
-
installResult.output.includes('already') ||
|
|
35
|
-
installResult.output.includes('up to date')) {
|
|
37
|
+
if (installResult.success || installResult.output.includes('already')) {
|
|
36
38
|
pluginSpinner.succeed(`${plugin.pluginName} ${pluginAction}`);
|
|
37
39
|
}
|
|
38
40
|
else {
|
|
@@ -42,6 +44,7 @@ function installPlugin(plugin, cli, toolbox) {
|
|
|
42
44
|
info('Manual installation:');
|
|
43
45
|
info(` /plugin marketplace add ${plugin.marketplaceRepo}`);
|
|
44
46
|
info(` /plugin install ${fullPluginName}`);
|
|
47
|
+
info(` /plugin update ${fullPluginName}`);
|
|
45
48
|
return { action: 'failed', contents: plugin_utils_1.EMPTY_PLUGIN_CONTENTS, postInstall: null, success: false };
|
|
46
49
|
}
|
|
47
50
|
// Step 2: Read plugin contents
|