@mutmutco/hub 4.3.68 → 4.4.0

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/dist/index.cjs +10 -4
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -2816,6 +2816,8 @@ var GREEN = "\x1B[32m";
2816
2816
  var YELLOW = "\x1B[33m";
2817
2817
  var RED = "\x1B[31m";
2818
2818
  var RESET = "\x1B[0m";
2819
+ var ACCENT = "\x1B[38;2;125;211;252m";
2820
+ var MUTED = "\x1B[38;2;150;150;150m";
2819
2821
  var RETRY_HINTS = [
2820
2822
  [/applies when the host exits|applies on a quiet tick/, "installs when the app closes"],
2821
2823
  [/in flight|changed while/, "rerun update \u2014 host race"],
@@ -2931,8 +2933,9 @@ function headline(detail, width) {
2931
2933
  const first = (detail ?? "").split(/(?<=[.;:])\s/)[0]?.replace(/\s+/g, " ").trim() ?? "";
2932
2934
  return wrapWords(first || "blocked", Math.max(10, width - 4))[0];
2933
2935
  }
2934
- function updateHeader(target, dryRun = false) {
2935
- return dryRun ? `MMI Hub \u2014 update plan to ${target} (dry run)` : `MMI Hub \u2014 updating to ${target} (verified)`;
2936
+ function updateHeader(target, dryRun = false, options) {
2937
+ const accent = (text) => options?.color ? ACCENT + text + RESET : text;
2938
+ return dryRun ? `${accent("mmi-hub")} \xB7 Mutatis Mutandis \u2014 update plan to ${target} (dry run)` : `${accent("mmi-hub")} \xB7 Mutatis Mutandis \u2014 updating to ${target} (verified)`;
2936
2939
  }
2937
2940
  function renderRowLines(row, ctx) {
2938
2941
  const paint = (kind, text) => ctx.color ? colorFor(kind) + text + RESET : text;
@@ -2968,6 +2971,9 @@ function reportFooterLines(summary, options = {}) {
2968
2971
  };
2969
2972
  const footer = dryRun ? `${counts.updated}/${counts.total} would update` : `${counts.updated}/${counts.total} updated` + (counts.retry ? ` \xB7 ${counts.retry} will retry` : "") + (counts.failed ? ` \xB7 ${counts.failed} failed` : "");
2970
2973
  const out = ["", " " + footer];
2974
+ if (tty && !dryRun && counts.failed === 0) {
2975
+ out.push(" " + (color ? MUTED + "Suggested next: mmi-cli doctor" + RESET : "Suggested next: mmi-cli doctor"));
2976
+ }
2971
2977
  const self = summary.updater;
2972
2978
  if (!dryRun && self && self.from && self.to && self.from !== self.to && self.verdict !== "fail") {
2973
2979
  out.push("");
@@ -3018,7 +3024,7 @@ function formatReconcileReport(summary, options = {}) {
3018
3024
  out.push(`MMI Hub \u2014 MMI is up to date (${summary.target} \xB7 verified)`);
3019
3025
  return out.join("\n") + "\n";
3020
3026
  }
3021
- out.push(updateHeader(summary.target, dryRun));
3027
+ out.push(updateHeader(summary.target, dryRun, { color }));
3022
3028
  out.push("");
3023
3029
  const statusWidth = Math.max(...rows.map((row) => statusText(row.kind, dryRun).length), 7);
3024
3030
  for (const row of rows) out.push(...renderRowLines(row, { tty, color, dryRun, width, statusWidth }));
@@ -3230,7 +3236,7 @@ function runUpdate(args, json) {
3230
3236
  dryRun,
3231
3237
  onPhase: (line) => spinner.label(line),
3232
3238
  onTargetResolved: (target) => {
3233
- emit(updateHeader(target, dryRun));
3239
+ emit(updateHeader(target, dryRun, reportOptions));
3234
3240
  emit("");
3235
3241
  headerEmitted = true;
3236
3242
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/hub",
3
- "version": "4.3.68",
3
+ "version": "4.4.0",
4
4
  "description": "Install and maintain the MMI CLI and every present host surface from one release-gated Hub command.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",