ht-skills 0.2.10 → 0.2.12

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.
Files changed (2) hide show
  1. package/lib/cli.js +33 -11
  2. package/package.json +1 -1
package/lib/cli.js CHANGED
@@ -844,7 +844,6 @@ function getPublishStepStatusLabel(status) {
844
844
  function renderPublishFlowCard(flowState, {
845
845
  colorize = (text) => text,
846
846
  width = 80,
847
- currentMessage = "",
848
847
  } = {}) {
849
848
  const contentWidth = Math.max(
850
849
  28,
@@ -877,11 +876,16 @@ function renderPublishFlowCard(flowState, {
877
876
 
878
877
  const titleSuffix = "─".repeat(Math.max(0, contentWidth - getDisplayWidth("Publish Flow") - 1));
879
878
  const title = `◇ ${colorize("Publish Flow", "accent")} ${colorize(titleSuffix, "muted")}╮`;
880
- const messageLines = currentMessage
881
- ? wrapText(currentMessage, contentWidth).map((line) => `│ ${colorize(line, "muted")}${" ".repeat(Math.max(0, contentWidth - getDisplayWidth(line)))} │`)
882
- : [];
883
879
  const bottom = `╰${"─".repeat(contentWidth + 2)}╯`;
884
- return [title, ...lines, ...messageLines, bottom].join("\n");
880
+ return [title, ...lines, bottom].join("\n");
881
+ }
882
+
883
+ function renderPublishStatusLine(message, { colorize = (text) => text, width = 80 } = {}) {
884
+ const contentWidth = Math.max(24, width);
885
+ const wrapped = wrapText(message || "", contentWidth);
886
+ return wrapped
887
+ .map((line, index) => `${index === 0 ? colorize("•", "accent") : " "} ${colorize(line, "muted")}`)
888
+ .join("\n");
885
889
  }
886
890
 
887
891
  function createLiveBlockRenderer(output = process.stdout) {
@@ -1574,11 +1578,18 @@ async function cmdPublish(flags, deps = {}) {
1574
1578
 
1575
1579
  const renderPublishFlow = () => {
1576
1580
  if (!flowRenderer) return;
1577
- flowRenderer.render(renderPublishFlowCard(flowState, {
1578
- colorize,
1579
- width: Math.max(44, Math.min(outputWidth - 4, 72)),
1580
- currentMessage,
1581
- }));
1581
+ const panelWidth = Math.max(44, Math.min(outputWidth - 4, 72));
1582
+ flowRenderer.render([
1583
+ renderPublishFlowCard(flowState, {
1584
+ colorize,
1585
+ width: panelWidth,
1586
+ }),
1587
+ "",
1588
+ renderPublishStatusLine(currentMessage, {
1589
+ colorize,
1590
+ width: panelWidth,
1591
+ }),
1592
+ ].join("\n"));
1582
1593
  };
1583
1594
  const setFlowStatus = (stepId, status) => {
1584
1595
  flowState[stepId] = status;
@@ -1794,6 +1805,14 @@ async function cmdPublish(flags, deps = {}) {
1794
1805
  preview_token: preview.preview_token,
1795
1806
  archive_name: archiveName,
1796
1807
  };
1808
+ const skillSlug = String(
1809
+ result.publication?.slug
1810
+ || result.publication?.manifest?.slug
1811
+ || preview.manifest?.slug
1812
+ || "",
1813
+ ).trim();
1814
+ const skillUrl = skillSlug ? `${registry}/skills/${encodeURIComponent(skillSlug)}` : null;
1815
+ summaryPayload.skill_url = skillUrl;
1797
1816
 
1798
1817
  if (ui) {
1799
1818
  ui.note(
@@ -1802,11 +1821,14 @@ async function cmdPublish(flags, deps = {}) {
1802
1821
  `${colorize("Submission", "muted")}: ${result.submission_id || "-"}`,
1803
1822
  `${colorize("Preview", "muted")}: ${preview.preview_token}`,
1804
1823
  `${colorize("Access", "muted")}: ${summaryPayload.visibility || visibility}`,
1824
+ skillUrl ? `${colorize("Skill URL", "muted")}: ${skillUrl}` : "",
1805
1825
  ].join("\n"),
1806
1826
  "Published",
1807
1827
  );
1808
1828
  setFlowMessage(`Submitted ${archiveName} for review`);
1809
- ui.outro(`Submitted ${ui.pc.cyan(archiveName)} for review.`);
1829
+ ui.outro(skillUrl
1830
+ ? `Submitted ${ui.pc.cyan(archiveName)} for review. Skill URL: ${skillUrl}`
1831
+ : `Submitted ${ui.pc.cyan(archiveName)} for review.`);
1810
1832
  } else {
1811
1833
  log(JSON.stringify(summaryPayload, null, 2));
1812
1834
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ht-skills",
3
- "version": "0.2.10",
3
+ "version": "0.2.12",
4
4
  "description": "CLI for installing and submitting skills from HT Skills Marketplace.",
5
5
  "type": "commonjs",
6
6
  "bin": {