@mutmutco/cli 4.5.27 → 4.5.28
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/main.cjs +42 -17
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -5491,7 +5491,8 @@ async function fetchHubBoardSnapshot(request, deps) {
|
|
|
5491
5491
|
...request.statusFieldId ? { statusFieldId: request.statusFieldId } : {},
|
|
5492
5492
|
activeOnly: request.activeOnly !== false,
|
|
5493
5493
|
allowPartial: request.allowPartial === true,
|
|
5494
|
-
includePullRequests: request.includePullRequests !== false
|
|
5494
|
+
includePullRequests: request.includePullRequests !== false,
|
|
5495
|
+
...request.minCursor !== void 0 ? { minCursor: request.minCursor } : {}
|
|
5495
5496
|
})
|
|
5496
5497
|
},
|
|
5497
5498
|
{ attempts: 3, timeoutMs: deps.timeoutMs ?? BOARD_SNAPSHOT_TIMEOUT_MS, sleep: deps.retrySleep }
|
|
@@ -12472,7 +12473,8 @@ async function collectBoardPreferringSnapshot(cfg, options, deps) {
|
|
|
12472
12473
|
number: cfg.projectNumber,
|
|
12473
12474
|
statusFieldId: cfg.statusFieldId,
|
|
12474
12475
|
activeOnly: true,
|
|
12475
|
-
allowPartial: options.allowPartial === true
|
|
12476
|
+
allowPartial: options.allowPartial === true,
|
|
12477
|
+
...options.minCursor !== void 0 ? { minCursor: options.minCursor } : {}
|
|
12476
12478
|
},
|
|
12477
12479
|
deps.snapshot
|
|
12478
12480
|
) : void 0;
|
|
@@ -16816,10 +16818,10 @@ var rollout_plan_default = {
|
|
|
16816
16818
|
note: "The v4.0.0 stamp happens at cut time (D6e #4463); until then the candidate is the origin/development head artifacts (built cli/dist + npm pack), identity proven by dist content hash (D6a)."
|
|
16817
16819
|
},
|
|
16818
16820
|
baseline: {
|
|
16819
|
-
version: "4.5.
|
|
16820
|
-
tag: "v4.5.
|
|
16821
|
-
commit: "
|
|
16822
|
-
npm: "@mutmutco/cli@4.5.
|
|
16821
|
+
version: "4.5.28",
|
|
16822
|
+
tag: "v4.5.28",
|
|
16823
|
+
commit: "7b61e100e4df",
|
|
16824
|
+
npm: "@mutmutco/cli@4.5.28"
|
|
16823
16825
|
},
|
|
16824
16826
|
exitCriterion: "fleet-n-of-n",
|
|
16825
16827
|
hubOnlyShortcut: "forbidden",
|
|
@@ -16836,14 +16838,14 @@ var rollout_plan_default = {
|
|
|
16836
16838
|
repo: "mutmutco/mmi-hub",
|
|
16837
16839
|
role: "canary",
|
|
16838
16840
|
schedule: "train",
|
|
16839
|
-
v3Target: "v4.5.
|
|
16841
|
+
v3Target: "v4.5.28"
|
|
16840
16842
|
}
|
|
16841
16843
|
],
|
|
16842
16844
|
rollbackTrigger: "Any red inside the post-contract soak window: `devops train gate` FAIL attributable to the v4 doors, Hub endpoint health probe failure, a pre-v4 client admitted instead of receiving actionable HTTP 426, or npm consumer install/doctor failure on the v4-only dist.",
|
|
16843
16845
|
rollback: {
|
|
16844
16846
|
independent: true,
|
|
16845
|
-
mechanism: "npm dist-tag latest -> 4.5.
|
|
16846
|
-
v3Target: "v4.5.
|
|
16847
|
+
mechanism: "npm dist-tag latest -> 4.5.28 and redeploy the Hub Lambda from tag v4.5.28 (7b61e100e4df); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
|
|
16848
|
+
v3Target: "v4.5.28 (@mutmutco/cli@4.5.28, tag commit 7b61e100e4df \u2014 last known-good release carrying the repo-index v4-only contract)"
|
|
16847
16849
|
}
|
|
16848
16850
|
},
|
|
16849
16851
|
{
|
|
@@ -20061,7 +20063,7 @@ async function appendMmiGetRedeploy(deps, input, dispatch) {
|
|
|
20061
20063
|
workflowRuns: [...dispatch.workflowRuns ?? [], { ...runRow, conclusion: "success" }]
|
|
20062
20064
|
};
|
|
20063
20065
|
}
|
|
20064
|
-
async function appendServedChannelPublish(deps, input, dispatch) {
|
|
20066
|
+
async function appendServedChannelPublish(deps, input, dispatch, redeployed) {
|
|
20065
20067
|
if (!isHubControlRepo(input.repo)) return dispatch;
|
|
20066
20068
|
const channelUrl = input.channelUrl ?? readServedChannelUrl();
|
|
20067
20069
|
const remedy = getPublishDispatchCommand(input.repo);
|
|
@@ -20111,7 +20113,7 @@ async function appendServedChannelPublish(deps, input, dispatch) {
|
|
|
20111
20113
|
deployStatus: "failure"
|
|
20112
20114
|
};
|
|
20113
20115
|
}
|
|
20114
|
-
const expected = (deps.readLauncherVersion ?? readLocalLauncherVersion)();
|
|
20116
|
+
const expected = input.tag ? input.tag.replace(/^v/, "") : (deps.readLauncherVersion ?? readLocalLauncherVersion)();
|
|
20115
20117
|
const runs = [...dispatch.workflowRuns ?? [], { ...runRow, conclusion: "success" }];
|
|
20116
20118
|
if (!channelUrl) {
|
|
20117
20119
|
return {
|
|
@@ -20120,6 +20122,7 @@ async function appendServedChannelPublish(deps, input, dispatch) {
|
|
|
20120
20122
|
workflowRuns: runs
|
|
20121
20123
|
};
|
|
20122
20124
|
}
|
|
20125
|
+
if (redeployed) await redeployed;
|
|
20123
20126
|
const probe = await (deps.readServedChannelVersion ?? fetchServedChannelVersion)(channelUrl);
|
|
20124
20127
|
const evidence = (conclusion, text) => [...runs, servedChannelRow(HUB_SERVED_PRODUCT, conclusion, text)];
|
|
20125
20128
|
if (!probe.ok && staleServedProcess(probe)) {
|
|
@@ -20271,12 +20274,31 @@ async function appendInstallHomePublish(deps, input, dispatch) {
|
|
|
20271
20274
|
workflowRuns: [...dispatch.workflowRuns ?? [], { ...row, conclusion: "success" }]
|
|
20272
20275
|
};
|
|
20273
20276
|
}
|
|
20277
|
+
function mergeServedLegs(base, first, second) {
|
|
20278
|
+
if (first === base) return second;
|
|
20279
|
+
if (second === base) return first;
|
|
20280
|
+
const priorRows = base.workflowRuns?.length ?? 0;
|
|
20281
|
+
const rows = [...(first.workflowRuns ?? []).slice(priorRows), ...(second.workflowRuns ?? []).slice(priorRows)];
|
|
20282
|
+
return {
|
|
20283
|
+
...base,
|
|
20284
|
+
note: base.note + first.note.slice(base.note.length) + second.note.slice(base.note.length),
|
|
20285
|
+
...rows.length ? { workflowRuns: [...base.workflowRuns ?? [], ...rows] } : {},
|
|
20286
|
+
...first.deployStatus === "failure" || second.deployStatus === "failure" ? { deployStatus: "failure" } : {}
|
|
20287
|
+
};
|
|
20288
|
+
}
|
|
20274
20289
|
async function appendServedChannelLegs(deps, input, dispatch) {
|
|
20275
20290
|
const publishStatus = input.publish?.state === "complete" ? "success" : "failure";
|
|
20276
|
-
|
|
20277
|
-
|
|
20278
|
-
|
|
20279
|
-
|
|
20291
|
+
const redeployed = appendMmiGetRedeploy(deps, { repo: input.repo, publishStatus, watch: input.watch, releaseSha: input.releaseSha }, dispatch);
|
|
20292
|
+
const [box, channel] = await Promise.all([
|
|
20293
|
+
redeployed,
|
|
20294
|
+
appendServedChannelPublish(deps, { repo: input.repo, publishStatus, watch: input.watch, releaseSha: input.releaseSha, tag: input.tag }, dispatch, redeployed)
|
|
20295
|
+
]);
|
|
20296
|
+
const out = mergeServedLegs(dispatch, box, channel);
|
|
20297
|
+
const [home, proof] = await Promise.all([
|
|
20298
|
+
appendInstallHomePublish(deps, { repo: input.repo, installer: input.installer, publishStatus, watch: input.watch }, out),
|
|
20299
|
+
appendServedChannelProof(deps, { repo: input.repo, tag: input.tag, shipped: shipLegsGreen(input.deploy, input.publish), installer: input.installer }, out)
|
|
20300
|
+
]);
|
|
20301
|
+
return mergeServedLegs(out, home, proof);
|
|
20280
20302
|
}
|
|
20281
20303
|
function servedChannelRowsAfter(before, after) {
|
|
20282
20304
|
return (after.workflowRuns ?? []).slice((before.workflowRuns ?? []).length);
|
|
@@ -28845,6 +28867,8 @@ function registerBoardCommands(program3) {
|
|
|
28845
28867
|
}
|
|
28846
28868
|
async function runBoardRead(o) {
|
|
28847
28869
|
try {
|
|
28870
|
+
if (o.minCursor !== void 0 && !/^\d{1,15}$/.test(o.minCursor)) throw new Error("--min-cursor must be a non-negative integer board-event cursor");
|
|
28871
|
+
if (o.minCursor !== void 0 && o.direct) throw new Error("--min-cursor applies to the Hub snapshot and cannot be combined with --direct");
|
|
28848
28872
|
const config = await loadConfigForRepo(o.repo);
|
|
28849
28873
|
const report = await readBoard({
|
|
28850
28874
|
config,
|
|
@@ -28852,7 +28876,8 @@ function registerBoardCommands(program3) {
|
|
|
28852
28876
|
includeBundleDetails: o.bundleDetails,
|
|
28853
28877
|
includeAllBodies: o.bodies,
|
|
28854
28878
|
allowPartial: o.allowPartial,
|
|
28855
|
-
snapshotOnly: o.snapshotOnly
|
|
28879
|
+
snapshotOnly: o.snapshotOnly,
|
|
28880
|
+
...o.minCursor !== void 0 ? { minCursor: Number(o.minCursor) } : {}
|
|
28856
28881
|
}, o.direct ? {} : { snapshot: registryClientDeps(config) });
|
|
28857
28882
|
const output = o.json ? JSON.stringify(report) : renderBoardReport(report);
|
|
28858
28883
|
if (!o.out) console.log(output);
|
|
@@ -28895,7 +28920,7 @@ function registerBoardCommands(program3) {
|
|
|
28895
28920
|
return `Claimed ${ref} for ${holder} - In Progress${reclaimed}`;
|
|
28896
28921
|
}
|
|
28897
28922
|
const board = program3.command("board").description("read, claim, show, and move Project v2 work items for the current repo");
|
|
28898
|
-
board.command("read", { isDefault: true }).alias("list").description("read the board and print user-owned, claimable, and taken items").option("--json", "machine-readable output").option("--repo <owner/repo>", "current repo (defaults to git origin)").option("--direct", "bypass the Hub snapshot and read the live board through direct GitHub GraphQL").option("--snapshot-only", "fail instead of falling back to your personal GraphQL pool when the Hub snapshot is unavailable \u2014 for ambient readers such as sidebars (#7203)").option("--bundle-details", "fetch body/comments only for user-owned and claimable issues").option("--bodies", "fetch body/comments for EVERY scoped row, including taken and unowned in-flight ones \u2014 for consumers that scope by Status rather than ownership (#4861); implies --bundle-details and costs one extra read per row").option("--allow-partial", "return partial board results when later page/detail reads fail").option("--out <path>", "write the output to this file as UTF-8 (no BOM) instead of stdout \u2014 the shell-free receipt path (#5802)").addHelpText("after", "\nread is always the authoritative live GitHub Project v2 board (#4926).\n--direct skips the Hub snapshot and uses the existing direct GitHub GraphQL read immediately.\n--allow-partial applies to the paginated path and detail reads.\n\nWhen using Windows PowerShell 5.1, avoid shell redirects: PowerShell 5.1's `> file.json` is Out-File,\nwhich writes UTF-16LE with a BOM, and Node reading it as 'utf8' then fails JSON.parse at position 1\n(#5802). Use --out instead \u2014 the CLI writes the file itself as UTF-8:\n mmi-cli oracle board read --json --out .jerv/tmp/board.json\n").action((o) => runBoardRead(o));
|
|
28923
|
+
board.command("read", { isDefault: true }).alias("list").description("read the board and print user-owned, claimable, and taken items").option("--json", "machine-readable output").option("--repo <owner/repo>", "current repo (defaults to git origin)").option("--direct", "bypass the Hub snapshot and read the live board through direct GitHub GraphQL").option("--snapshot-only", "fail instead of falling back to your personal GraphQL pool when the Hub snapshot is unavailable \u2014 for ambient readers such as sidebars (#7203)").option("--min-cursor <n>", "board-event cursor (from `oracle board events`) the Hub snapshot must postdate; a cached snapshot older than that event is rebuilt (#7240)").option("--bundle-details", "fetch body/comments only for user-owned and claimable issues").option("--bodies", "fetch body/comments for EVERY scoped row, including taken and unowned in-flight ones \u2014 for consumers that scope by Status rather than ownership (#4861); implies --bundle-details and costs one extra read per row").option("--allow-partial", "return partial board results when later page/detail reads fail").option("--out <path>", "write the output to this file as UTF-8 (no BOM) instead of stdout \u2014 the shell-free receipt path (#5802)").addHelpText("after", "\nread is always the authoritative live GitHub Project v2 board (#4926).\n--direct skips the Hub snapshot and uses the existing direct GitHub GraphQL read immediately.\n--allow-partial applies to the paginated path and detail reads.\n\nWhen using Windows PowerShell 5.1, avoid shell redirects: PowerShell 5.1's `> file.json` is Out-File,\nwhich writes UTF-16LE with a BOM, and Node reading it as 'utf8' then fails JSON.parse at position 1\n(#5802). Use --out instead \u2014 the CLI writes the file itself as UTF-8:\n mmi-cli oracle board read --json --out .jerv/tmp/board.json\n").action((o) => runBoardRead(o));
|
|
28899
28924
|
board.command("events").description("content-free board/CI change records after a cursor, from the Hub event feed (no GitHub call) \u2014 for real-time sidebars (#7235)").option("--since <cursor>", "cursor from the previous answer; omit on first read (answers the head cursor with resync:true)").option("--wait <seconds>", "hold up to this long (max 120), polling every 2s, and return on the first event or resync", "0").option("--repo <owner/repo>", "repo whose Hub config to use (defaults to git origin)").option("--json", "machine-readable output (already the default)").addHelpText("after", "\nPrints {cursor, events, resync, more[, hidden]}. Pass the returned cursor as the next --since.\nresync:true means records were missed (retention ~1h, or a gap): re-read the board with\n`mmi-cli oracle board read --snapshot-only --json`.\n").action(async (o) => {
|
|
28900
28925
|
try {
|
|
28901
28926
|
if (o.since !== void 0 && !/^\d{1,15}$/.test(o.since)) throw new Error("--since must be a non-negative integer cursor");
|
package/package.json
CHANGED