@mutmutco/hub 4.4.9 → 4.4.10
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.cjs +13 -8
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -184,20 +184,26 @@ function wrapWords(text, width) {
|
|
|
184
184
|
if (line) lines.push(line);
|
|
185
185
|
return lines.length ? lines : [""];
|
|
186
186
|
}
|
|
187
|
-
function createFace({ product, color = false, columns }) {
|
|
187
|
+
function createFace({ product, color = false, columns, env = process.env }) {
|
|
188
188
|
const identity = identityFor(product);
|
|
189
189
|
const width = faceWidth(columns);
|
|
190
190
|
const paint = (sgr, text) => color ? `\x1B[${sgr}m${text}\x1B[0m` : String(text);
|
|
191
191
|
const bar = () => paint(PALETTE.muted, GLYPH.bar);
|
|
192
192
|
const indent = " ".repeat(TITLE_COLUMN - 1);
|
|
193
|
-
const
|
|
193
|
+
const continuedPhases = new Set((env.MM_FACE_CONTINUES ?? "").split(",").map((phase) => phase.trim()).filter(Boolean));
|
|
194
|
+
const continuesFace = continuedPhases.size > 0;
|
|
195
|
+
const welcome = () => continuesFace ? [] : [
|
|
194
196
|
`${paint(identity.accent, GLYPH.diamond)} ${paint(identity.accent, identity.name)} \u2014 Mutatis Mutandis`,
|
|
195
197
|
bar(),
|
|
196
198
|
`${bar()} ${identity.warm}`,
|
|
197
199
|
bar()
|
|
198
200
|
];
|
|
201
|
+
const continues = (phase, kind = "ok") => {
|
|
202
|
+
const inherited = continuedPhases.delete(String(phase).trim());
|
|
203
|
+
return kind === "fail" ? false : inherited;
|
|
204
|
+
};
|
|
199
205
|
const step = (title, seconds = null, kind = "ok") => {
|
|
200
|
-
const glyph = kind === "fail" ? paint(identity.accent, GLYPH.cross) : kind === "note" ? paint(PALETTE.muted, GLYPH.
|
|
206
|
+
const glyph = kind === "fail" ? paint(identity.accent, GLYPH.cross) : kind === "note" ? paint(PALETTE.muted, GLYPH.dot) : paint(PALETTE.green, GLYPH.check);
|
|
201
207
|
const time = seconds === null || seconds === void 0 ? "" : paint(PALETTE.muted, `${Math.max(0, Math.round(seconds))}s`);
|
|
202
208
|
const column = Math.min(44, Math.max(0, width - 8));
|
|
203
209
|
const reserved = time ? 6 : 0;
|
|
@@ -211,8 +217,7 @@ function createFace({ product, color = false, columns }) {
|
|
|
211
217
|
const body = (Array.isArray(lines) ? lines : String(lines).split("\n")).flatMap((raw) => {
|
|
212
218
|
const line = String(raw);
|
|
213
219
|
if (visibleWidth(line) <= width - 6) return [line];
|
|
214
|
-
|
|
215
|
-
return wrapWords(line, width - 6 - lead.length).map((part) => `${lead}${part}`);
|
|
220
|
+
return wrapWords(line, width - 6);
|
|
216
221
|
});
|
|
217
222
|
const content = Math.min(width - 6, Math.max(...body.map(visibleWidth)));
|
|
218
223
|
const rule = paint(identity.accent, GLYPH.rule.repeat(content + 4));
|
|
@@ -226,7 +231,7 @@ function createFace({ product, color = false, columns }) {
|
|
|
226
231
|
};
|
|
227
232
|
const signOff = () => `${paint(identity.accent, GLYPH.diamond)} ${paint(identity.accent, `${identity.name} \xB7 Mutatis Mutandis`)}`;
|
|
228
233
|
const refusal = (message3) => `${bar()} ${paint(identity.accent, GLYPH.cross)} ${message3}`;
|
|
229
|
-
return { identity, width, welcome, step, relay, receipt, signOff, refusal, paint };
|
|
234
|
+
return { identity, width, welcome, continues, step, relay, receipt, signOff, refusal, paint };
|
|
230
235
|
}
|
|
231
236
|
var RELAY_INDENT = " ".repeat(TITLE_COLUMN - 1);
|
|
232
237
|
var SEPARATOR = "\xB7";
|
|
@@ -278,7 +283,7 @@ function createSpinner(face, { animate, stream = process.stderr, intervalMs = 90
|
|
|
278
283
|
};
|
|
279
284
|
const draw = () => {
|
|
280
285
|
if (!animate) return;
|
|
281
|
-
const line = face.step(text, null, "note").split("\n")[0].replace(GLYPH.
|
|
286
|
+
const line = face.step(text, null, "note").split("\n")[0].replace(GLYPH.dot, FRAMES[frame % FRAMES.length]);
|
|
282
287
|
stream.write(`\r\x1B[2K${line}`);
|
|
283
288
|
frame += 1;
|
|
284
289
|
};
|
|
@@ -3257,7 +3262,7 @@ function receiptText(summary, autoupdate, options = {}) {
|
|
|
3257
3262
|
return [`${summary.exit >= 1 ? "\u2716" : "\u25CF"} mmi-hub is not ready \u2014 no green release yet (hourly retry)`, "", health];
|
|
3258
3263
|
}
|
|
3259
3264
|
const ready = counts.failed === 0;
|
|
3260
|
-
const glyph = counts.failed > 0 ? "\u2716" : counts.retry > 0 ? "\u25CF" : dry ? "\
|
|
3265
|
+
const glyph = counts.failed > 0 ? "\u2716" : counts.retry > 0 ? "\u25CF" : dry ? "\u25CF" : "\u2714";
|
|
3261
3266
|
const state = counts.failed > 0 ? `${counts.failed} of ${counts.total} surfaces failed` : counts.retry > 0 ? `${counts.retry} of ${counts.total} surfaces will retry` : counts.updated > 0 ? `${counts.updated}/${counts.total} surfaces ${dry ? "would update" : "updated"}` : `all ${counts.total} surfaces current`;
|
|
3262
3267
|
const tail2 = autoupdate ? ` \xB7 ${autoupdate.ok ? "auto-update on" : `auto-update NOT enabled \u2014 ${autoupdate.detail}`}` : ` \xB7 ${summary.target}${dry ? " (planned)" : " (verified)"}`;
|
|
3263
3268
|
return [`${glyph} mmi-hub is ${ready ? "ready" : "not ready"} \u2014 ${state}${tail2}`, "", health];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mutmutco/hub",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.10",
|
|
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.
|
|
29
|
+
"@mutmutco/installer-face": "^0.2.3"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^22.0.0",
|