@toolr/seedr 0.1.48 → 0.1.49
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/cli.js +11 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -165,7 +165,7 @@ function trackInstalls(slug, type, results, scope) {
|
|
|
165
165
|
type,
|
|
166
166
|
tool: result.tool,
|
|
167
167
|
scope,
|
|
168
|
-
version: "0.1.
|
|
168
|
+
version: "0.1.49"
|
|
169
169
|
}),
|
|
170
170
|
signal: AbortSignal.timeout(4e3)
|
|
171
171
|
}).catch(() => {
|
|
@@ -772,7 +772,16 @@ async function resolveItem(itemName, type) {
|
|
|
772
772
|
const results = await searchItems(itemName);
|
|
773
773
|
const filtered = type ? results.filter((r) => r.type === type) : results;
|
|
774
774
|
if (filtered.length === 0) {
|
|
775
|
-
|
|
775
|
+
if (type && results.length > 0) {
|
|
776
|
+
const match = results.find((r) => r.slug === itemName);
|
|
777
|
+
if (match) {
|
|
778
|
+
error(`"${itemName}" is a ${match.type}, not a ${type}. Run: seedr add ${itemName} --type ${match.type}`);
|
|
779
|
+
} else {
|
|
780
|
+
error(`No ${type} matching "${itemName}". Found: ${results.map((r) => `${r.slug} (${r.type})`).join(", ")}`);
|
|
781
|
+
}
|
|
782
|
+
} else {
|
|
783
|
+
error(`"${itemName}" not found`);
|
|
784
|
+
}
|
|
776
785
|
return null;
|
|
777
786
|
}
|
|
778
787
|
if (filtered.length === 1) {
|