bfi-cli 0.1.17 → 0.1.19
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.mjs +6 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -233,6 +233,11 @@ function parseSource(input) {
|
|
|
233
233
|
type: "well-known",
|
|
234
234
|
url: input
|
|
235
235
|
};
|
|
236
|
+
if (!input.includes(":") && !input.includes("/") && !input.startsWith("@") && !input.includes("--")) return {
|
|
237
|
+
type: "skillhub",
|
|
238
|
+
url: `skillhub:${input}`,
|
|
239
|
+
subpath: void 0
|
|
240
|
+
};
|
|
236
241
|
return {
|
|
237
242
|
type: "git",
|
|
238
243
|
url: input,
|
|
@@ -4405,7 +4410,7 @@ async function installFromSkillHub(parsed, options, spinner) {
|
|
|
4405
4410
|
let slug;
|
|
4406
4411
|
if (restParts.length === 0) {
|
|
4407
4412
|
spinner.start(`正在 SkillHub 搜索 "${rawRef}"...`);
|
|
4408
|
-
const hits = ((await api.searchSkills(rawRef)).
|
|
4413
|
+
const hits = ((await api.searchSkills(rawRef)).results || []).slice(0, 20);
|
|
4409
4414
|
if (hits.length === 0) {
|
|
4410
4415
|
spinner.stop(import_picocolors.default.red("无结果"));
|
|
4411
4416
|
outro(import_picocolors.default.red(`No skills found on SkillHub for "${rawRef}".`));
|