skild 0.10.19 → 0.10.20
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/index.js +22 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1519,6 +1519,7 @@ function reportResults(ctx) {
|
|
|
1519
1519
|
return;
|
|
1520
1520
|
}
|
|
1521
1521
|
const platformsLabel = targets.length === PLATFORMS2.length ? "all platforms" : targets.length === 1 ? targets[0] : `${targets.length} platforms`;
|
|
1522
|
+
const isMultiTarget = targets.length > 1;
|
|
1522
1523
|
if (errors.length === 0 && (results.length > 0 || skipped.length > 0)) {
|
|
1523
1524
|
const displayName = results[0]?.canonicalName || results[0]?.name || ctx.source;
|
|
1524
1525
|
const skillCount = selectedSkills?.length ?? results.length;
|
|
@@ -1533,7 +1534,7 @@ function reportResults(ctx) {
|
|
|
1533
1534
|
);
|
|
1534
1535
|
} else {
|
|
1535
1536
|
spinner?.succeed(
|
|
1536
|
-
isMultiSkill ? `Installed ${chalk3.green(skillCount)} skill${skillCount > 1 ? "s" : ""} \u2192 ${chalk3.dim(platformsLabel)}` : `Installed ${chalk3.green(displayName)} \u2192 ${chalk3.dim(results[0]?.installDir || platformsLabel)}`
|
|
1537
|
+
isMultiSkill ? `Installed ${chalk3.green(skillCount)} skill${skillCount > 1 ? "s" : ""} \u2192 ${chalk3.dim(platformsLabel)}` : isMultiTarget ? `Installed ${chalk3.green(displayName)} \u2192 ${chalk3.dim(platformsLabel)}` : `Installed ${chalk3.green(displayName)} \u2192 ${chalk3.dim(results[0]?.installDir || platformsLabel)}`
|
|
1537
1538
|
);
|
|
1538
1539
|
}
|
|
1539
1540
|
} else if (errors.length > 0) {
|
|
@@ -1566,6 +1567,15 @@ function reportResults(ctx) {
|
|
|
1566
1567
|
}
|
|
1567
1568
|
console.log(chalk3.dim(` ... and ${uniqueSkillNames.length - 8} more`));
|
|
1568
1569
|
}
|
|
1570
|
+
} else if (!isMultiSkill && isMultiTarget && results.length > 0) {
|
|
1571
|
+
console.log();
|
|
1572
|
+
const byPlatform = /* @__PURE__ */ new Map();
|
|
1573
|
+
for (const r of results) byPlatform.set(r.platform, r);
|
|
1574
|
+
for (const platform of targets) {
|
|
1575
|
+
const record = byPlatform.get(platform);
|
|
1576
|
+
if (!record) continue;
|
|
1577
|
+
console.log(` ${chalk3.green("\u2713")} ${chalk3.cyan(platform)} \u2192 ${chalk3.dim(record.installDir)}`);
|
|
1578
|
+
}
|
|
1569
1579
|
} else if (!isMultiSkill && targets.length === 1 && results[0]) {
|
|
1570
1580
|
const record = results[0];
|
|
1571
1581
|
if (!record.hasSkillMd) {
|
|
@@ -1597,11 +1607,17 @@ function reportResults(ctx) {
|
|
|
1597
1607
|
platforms.push(s.platform);
|
|
1598
1608
|
bySkill.set(s.skillName, platforms);
|
|
1599
1609
|
}
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1610
|
+
const onlySkill = bySkill.size === 1 ? [...bySkill.entries()][0] : null;
|
|
1611
|
+
if (onlySkill && isMultiTarget) {
|
|
1612
|
+
const [skillName, platforms] = onlySkill;
|
|
1613
|
+
console.log(chalk3.dim(` \u2022 ${skillName} \u2192 ${platforms.join(", ")}`));
|
|
1614
|
+
} else {
|
|
1615
|
+
for (const [skillName] of [...bySkill.entries()].slice(0, 5)) {
|
|
1616
|
+
console.log(chalk3.dim(` \u2022 ${skillName}`));
|
|
1617
|
+
}
|
|
1618
|
+
if (bySkill.size > 5) {
|
|
1619
|
+
console.log(chalk3.dim(` ... and ${bySkill.size - 5} more`));
|
|
1620
|
+
}
|
|
1605
1621
|
}
|
|
1606
1622
|
console.log(chalk3.dim(`
|
|
1607
1623
|
\u{1F4A1} Reinstall with: ${chalk3.cyan(`skild install ${ctx.source} --force`)}`));
|