@mutmutco/hub 4.4.7 → 4.4.9

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 +11 -9
  2. package/package.json +2 -2
package/dist/index.cjs CHANGED
@@ -28,6 +28,7 @@ __export(index_exports, {
28
28
  accent: () => accent,
29
29
  acquireSharedDocLock: () => acquireSharedDocLock,
30
30
  attentionRows: () => attentionRows,
31
+ autoupdateLine: () => autoupdateLine,
31
32
  brandLine: () => brandLine,
32
33
  buildWatcherCommand: () => buildWatcherCommand,
33
34
  checkAtomicity: () => checkAtomicity,
@@ -216,9 +217,10 @@ function createFace({ product, color = false, columns }) {
216
217
  const content = Math.min(width - 6, Math.max(...body.map(visibleWidth)));
217
218
  const rule = paint(identity.accent, GLYPH.rule.repeat(content + 4));
218
219
  const frame = (left, right) => `${paint(identity.accent, left)}${rule}${paint(identity.accent, right)}`;
220
+ const bodyRow = (line) => line.startsWith(GLYPH.check) ? `${paint(PALETTE.green, GLYPH.check)}${line.slice(1)}` : line;
219
221
  return [
220
222
  frame(GLYPH.boxTop, GLYPH.boxTopEnd),
221
- ...body.map((line) => `${paint(identity.accent, GLYPH.bar)} ${line}${" ".repeat(Math.max(0, content - visibleWidth(line)))} ${paint(identity.accent, GLYPH.bar)}`),
223
+ ...body.map((line) => `${paint(identity.accent, GLYPH.bar)} ${bodyRow(line)}${" ".repeat(Math.max(0, content - visibleWidth(line)))} ${paint(identity.accent, GLYPH.bar)}`),
222
224
  frame(GLYPH.boxBottom, GLYPH.boxBottomEnd)
223
225
  ];
224
226
  };
@@ -251,8 +253,8 @@ function renderRows(face, rows) {
251
253
  const body = `${clip(subject, column).padEnd(column)} ${row.mark ? `${markGlyph(face, row.mark)} ` : ""}${tail2}`;
252
254
  lines.push(...face.relay(body).split("\n"));
253
255
  if (row.note) {
254
- for (const part of wrapWords(row.note, Math.max(16, face.width - column - 10))) {
255
- lines.push(...face.relay(`${" ".repeat(column)} ${part}`).split("\n"));
256
+ for (const part of wrapWords(row.note, Math.max(16, face.width - TITLE_COLUMN))) {
257
+ lines.push(...face.relay(part).split("\n"));
256
258
  }
257
259
  }
258
260
  }
@@ -3260,6 +3262,9 @@ function receiptText(summary, autoupdate, options = {}) {
3260
3262
  const tail2 = autoupdate ? ` \xB7 ${autoupdate.ok ? "auto-update on" : `auto-update NOT enabled \u2014 ${autoupdate.detail}`}` : ` \xB7 ${summary.target}${dry ? " (planned)" : " (verified)"}`;
3261
3263
  return [`${glyph} mmi-hub is ${ready ? "ready" : "not ready"} \u2014 ${state}${tail2}`, "", health];
3262
3264
  }
3265
+ function autoupdateLine(state) {
3266
+ return state.ok ? 'Auto-update on \u2014 hourly task "MMI Fleet Updater".' : `Auto-update NOT enabled \u2014 ${state.detail}`;
3267
+ }
3263
3268
  function attentionRows(summary) {
3264
3269
  return collectRows(summary).filter((row) => row.kind === "failed" || row.kind === "retry" || row.kind === "pending").map((row) => ({
3265
3270
  surface: row.name,
@@ -3668,9 +3673,7 @@ async function main(args = process.argv.slice(2)) {
3668
3673
  const handedOff = handOff(summary.reexec, ["update", ...args.filter((arg) => arg !== "install" && arg !== "--shipped" && arg !== shippedTarget)]);
3669
3674
  const scheduled = installTask();
3670
3675
  if (!json) {
3671
- process.stdout.write(scheduled.ok ? ` Auto-update on \u2014 hourly task "MMI Fleet Updater".
3672
- ` : ` Auto-update NOT enabled \u2014 ${scheduled.detail}
3673
- `);
3676
+ process.stdout.write(autoupdateLine(scheduled) + "\n");
3674
3677
  } else {
3675
3678
  process.stdout.write(JSON.stringify({ convergence: summary, autoupdate: scheduled }, null, 2) + "\n");
3676
3679
  }
@@ -3683,9 +3686,7 @@ async function main(args = process.argv.slice(2)) {
3683
3686
  finishFace(face, summary, schedule, dryRun);
3684
3687
  } else {
3685
3688
  if (!rendered) printReconcile(summary, false, dryRun);
3686
- process.stdout.write(schedule.ok ? ` Auto-update on \u2014 hourly task "MMI Fleet Updater".
3687
- ` : ` Auto-update NOT enabled \u2014 ${schedule.detail}
3688
- `);
3689
+ process.stdout.write(autoupdateLine(schedule) + "\n");
3689
3690
  }
3690
3691
  return Math.max(summary.exit, schedule.ok ? 0 : 1);
3691
3692
  }
@@ -3720,6 +3721,7 @@ if (typeof require !== "undefined" && require.main === module) {
3720
3721
  accent,
3721
3722
  acquireSharedDocLock,
3722
3723
  attentionRows,
3724
+ autoupdateLine,
3723
3725
  brandLine,
3724
3726
  buildWatcherCommand,
3725
3727
  checkAtomicity,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/hub",
3
- "version": "4.4.7",
3
+ "version": "4.4.9",
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",
@@ -26,7 +26,7 @@
26
26
  "typecheck": "tsc --noEmit"
27
27
  },
28
28
  "dependencies": {
29
- "@mutmutco/installer-face": "^0.2.0"
29
+ "@mutmutco/installer-face": "^0.2.1"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^22.0.0",