@mutmutco/cli 4.5.133 → 4.5.134
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 +45 -11
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -18274,10 +18274,10 @@ var rollout_plan_default = {
|
|
|
18274
18274
|
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)."
|
|
18275
18275
|
},
|
|
18276
18276
|
baseline: {
|
|
18277
|
-
version: "4.5.
|
|
18278
|
-
tag: "v4.5.
|
|
18279
|
-
commit: "
|
|
18280
|
-
npm: "@mutmutco/cli@4.5.
|
|
18277
|
+
version: "4.5.134",
|
|
18278
|
+
tag: "v4.5.134",
|
|
18279
|
+
commit: "f976ea4f8325",
|
|
18280
|
+
npm: "@mutmutco/cli@4.5.134"
|
|
18281
18281
|
},
|
|
18282
18282
|
exitCriterion: "fleet-n-of-n",
|
|
18283
18283
|
hubOnlyShortcut: "forbidden",
|
|
@@ -18294,14 +18294,14 @@ var rollout_plan_default = {
|
|
|
18294
18294
|
repo: "mutmutco/mmi-hub",
|
|
18295
18295
|
role: "canary",
|
|
18296
18296
|
schedule: "train",
|
|
18297
|
-
v3Target: "v4.5.
|
|
18297
|
+
v3Target: "v4.5.134"
|
|
18298
18298
|
}
|
|
18299
18299
|
],
|
|
18300
18300
|
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.",
|
|
18301
18301
|
rollback: {
|
|
18302
18302
|
independent: true,
|
|
18303
|
-
mechanism: "npm dist-tag latest -> 4.5.
|
|
18304
|
-
v3Target: "v4.5.
|
|
18303
|
+
mechanism: "npm dist-tag latest -> 4.5.134 and redeploy the Hub Lambda from tag v4.5.134 (f976ea4f8325); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
|
|
18304
|
+
v3Target: "v4.5.134 (@mutmutco/cli@4.5.134, tag commit f976ea4f8325 \u2014 last known-good release carrying the repo-index v4-only contract)"
|
|
18305
18305
|
}
|
|
18306
18306
|
},
|
|
18307
18307
|
{
|
|
@@ -26387,10 +26387,42 @@ Cut by ${formatSessionIdentity(cutBy)}
|
|
|
26387
26387
|
var PLAIN_WORDS_HEADING = "## In plain words";
|
|
26388
26388
|
var PLAIN_WORDS_HEADING_TR = "## Sade s\xF6zlerle";
|
|
26389
26389
|
var PLAIN_WORDS_MARKER = "<!-- mmi:big -->";
|
|
26390
|
-
|
|
26390
|
+
var REPORT_ID = /^[A-Za-z0-9_-]{1,64}$/;
|
|
26391
|
+
async function collectReleaseCredits(deps, repo, body) {
|
|
26392
|
+
try {
|
|
26393
|
+
const [owner, name] = repo.split("/");
|
|
26394
|
+
const prs = /* @__PURE__ */ new Set();
|
|
26395
|
+
let changes = false;
|
|
26396
|
+
for (const line of body.split(/\r?\n/)) {
|
|
26397
|
+
if (line.startsWith("## ")) changes = line === "## What's Changed";
|
|
26398
|
+
if (!changes) continue;
|
|
26399
|
+
const match = line.match(/\bin https:\/\/github\.com\/([^/]+\/[^/]+)\/pull\/(\d+)\s*$/);
|
|
26400
|
+
if (match?.[1]?.toLowerCase() === repo.toLowerCase()) prs.add(Number(match[2]));
|
|
26401
|
+
}
|
|
26402
|
+
const ids = /* @__PURE__ */ new Set();
|
|
26403
|
+
for (const number of [...prs].sort((a, b) => a - b)) {
|
|
26404
|
+
const query = "query($owner:String!,$name:String!,$number:Int!){repository(owner:$owner,name:$name){pullRequest(number:$number){closingIssuesReferences(first:100){nodes{body} pageInfo{hasNextPage}}}}}";
|
|
26405
|
+
const result = JSON.parse(clean2(await deps.run("gh", ["api", "graphql", "-f", `query=${query}`, "-f", `owner=${owner}`, "-f", `name=${name}`, "-F", `number=${number}`])));
|
|
26406
|
+
const refs = result.data?.repository?.pullRequest?.closingIssuesReferences;
|
|
26407
|
+
if (result.errors?.length || !Array.isArray(refs?.nodes) || refs.pageInfo?.hasNextPage !== false) throw new Error(`closing issues unavailable or truncated for PR #${number}`);
|
|
26408
|
+
for (const issue of refs.nodes) {
|
|
26409
|
+
if (typeof issue?.body !== "string") throw new Error(`issue body unavailable for PR #${number}`);
|
|
26410
|
+
const footer = issue.body.trim().match(/(?:^|\n)---\r?\nReported by a person in MM-Work \((?:dev|rc|main)\), module `[^`\r\n]+`, report `([A-Za-z0-9_-]{1,64})`\. Filed by the Hub \(#7389\)\.$/);
|
|
26411
|
+
if (footer?.[1]) ids.add(footer[1]);
|
|
26412
|
+
}
|
|
26413
|
+
}
|
|
26414
|
+
return [...ids].sort().slice(0, 20);
|
|
26415
|
+
} catch (e) {
|
|
26416
|
+
(deps.warn ?? console.warn)(`release credits omitted for ${repo}: ${e.message}`);
|
|
26417
|
+
return [];
|
|
26418
|
+
}
|
|
26419
|
+
}
|
|
26420
|
+
function buildPlainWordsSection(lines2, big, heading = PLAIN_WORDS_HEADING, credits = []) {
|
|
26391
26421
|
const [title, ...notes] = lines2;
|
|
26392
26422
|
const body = [heading, title ?? "", ...notes.slice(0, 5).map((n) => `- ${n}`)];
|
|
26393
26423
|
if (big) body.push(PLAIN_WORDS_MARKER);
|
|
26424
|
+
const ids = [...new Set(credits.filter((id) => REPORT_ID.test(id)))].sort().slice(0, 20);
|
|
26425
|
+
if (ids.length) body.push(`<!-- mmi:credits ${ids.join(",")} -->`);
|
|
26394
26426
|
return body.join("\n");
|
|
26395
26427
|
}
|
|
26396
26428
|
var SUMMARY_GUIDE = "https://github.com/mutmutco/MMI-Hub/blob/development/docs/Guides/train-troubleshooting.md#announce-summary-missing";
|
|
@@ -26462,13 +26494,15 @@ async function writePlainWordsIfSuiteMember(deps, args) {
|
|
|
26462
26494
|
try {
|
|
26463
26495
|
if (!args.summaryLines?.length) return;
|
|
26464
26496
|
const lines2 = args.summaryLines;
|
|
26497
|
+
const body = clean2(await deps.run("gh", ["release", "view", args.tag, "--repo", args.repo, "--json", "body", "-q", ".body"]));
|
|
26498
|
+
const credits = await collectReleaseCredits(deps, args.repo, body);
|
|
26465
26499
|
const section = [
|
|
26466
|
-
buildPlainWordsSection(lines2, args.big === true),
|
|
26500
|
+
buildPlainWordsSection(lines2, args.big === true, PLAIN_WORDS_HEADING, credits),
|
|
26467
26501
|
...args.summaryLinesTr?.length ? [buildPlainWordsSection(args.summaryLinesTr, false, PLAIN_WORDS_HEADING_TR)] : []
|
|
26468
26502
|
].join("\n\n");
|
|
26469
|
-
const body = clean2(await deps.run("gh", ["release", "view", args.tag, "--repo", args.repo, "--json", "body", "-q", ".body"]));
|
|
26470
26503
|
await deps.run("gh", ["release", "edit", args.tag, "--repo", args.repo, "--notes", upsertPlainWordsSection(body, section)]);
|
|
26471
|
-
} catch {
|
|
26504
|
+
} catch (e) {
|
|
26505
|
+
(deps.warn ?? console.warn)(`plain-words write failed for ${args.repo}@${args.tag}: ${e.message}`);
|
|
26472
26506
|
}
|
|
26473
26507
|
}
|
|
26474
26508
|
async function writePlainWordsSection(deps, options, repo, meta, tag) {
|
package/package.json
CHANGED