moshcode 0.29.0 → 0.29.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/README.md +6 -0
- package/package.json +1 -1
- package/plugins/crypto/README.md +1 -0
- package/plugins/stocks/README.md +1 -0
- package/src/plugins.mjs +17 -3
package/README.md
CHANGED
|
@@ -392,10 +392,16 @@ The equivalent by hand:
|
|
|
392
392
|
|
|
393
393
|
```sh
|
|
394
394
|
claude plugin marketplace add moshcoder/moshcode
|
|
395
|
+
claude plugin marketplace update moshcode # `add` is a no-op if you already have it
|
|
395
396
|
claude plugin install stocks@moshcode
|
|
396
397
|
claude plugin install crypto@moshcode
|
|
397
398
|
```
|
|
398
399
|
|
|
400
|
+
The `update` line matters if you have ever installed from this marketplace
|
|
401
|
+
before: `add` declines to do anything for a marketplace already on disk, so
|
|
402
|
+
without a refresh the install reads a stale copy and fails with "not found in
|
|
403
|
+
any marketplace". `moshcode plugin install` runs both steps for you.
|
|
404
|
+
|
|
399
405
|
### Upgrading from `ticker@moshcode`
|
|
400
406
|
|
|
401
407
|
`stocks` was called `ticker` before v0.29.0. Installing the new id does **not**
|
package/package.json
CHANGED
package/plugins/crypto/README.md
CHANGED
package/plugins/stocks/README.md
CHANGED
package/src/plugins.mjs
CHANGED
|
@@ -82,15 +82,29 @@ export function pluginId(name) {
|
|
|
82
82
|
/**
|
|
83
83
|
* The commands one engine needs to install a plugin.
|
|
84
84
|
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
85
|
+
* Both marketplace steps run every time, and they do different jobs:
|
|
86
|
+
*
|
|
87
|
+
* add — makes the marketplace exist. A no-op when it is already on disk,
|
|
88
|
+
* which is exactly why it is not sufficient on its own.
|
|
89
|
+
* update — re-fetches it. Without this, a machine that added the marketplace
|
|
90
|
+
* before a plugin existed installs from its stale local copy and
|
|
91
|
+
* fails with "not found in any marketplace" — the failure `add` was
|
|
92
|
+
* supposed to prevent and cannot, because it declines to do anything
|
|
93
|
+
* for a marketplace it already has.
|
|
94
|
+
*
|
|
95
|
+
* That gap is not theoretical: it broke `plugin install crypto` in v0.27.0 and
|
|
96
|
+
* `plugin install stocks` in v0.29.0, on every machine that had installed a
|
|
97
|
+
* plugin from this marketplace beforehand — which is all of them.
|
|
98
|
+
*
|
|
99
|
+
* `marketplace update` takes the marketplace *name*, not the source, and
|
|
100
|
+
* accepts no --scope.
|
|
88
101
|
*/
|
|
89
102
|
export function pluginInstallActions(key, { plugin, source, scope }) {
|
|
90
103
|
switch (key) {
|
|
91
104
|
case "claude":
|
|
92
105
|
return [
|
|
93
106
|
{ cmd: "claude", args: ["plugin", "marketplace", "add", source, ...(scope ? ["--scope", scope] : [])] },
|
|
107
|
+
{ cmd: "claude", args: ["plugin", "marketplace", "update", MARKETPLACE_NAME] },
|
|
94
108
|
{ cmd: "claude", args: ["plugin", "install", pluginId(plugin.name), ...(scope ? ["--scope", scope] : [])] },
|
|
95
109
|
];
|
|
96
110
|
default:
|