@mutmutco/cli 4.5.150 → 4.5.151

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/main.cjs +56 -19
  2. package/package.json +1 -1
package/dist/main.cjs CHANGED
@@ -17125,9 +17125,6 @@ function suiteModuleSeeds(seeds, suite, deployModel) {
17125
17125
  "module/.npmrc": "suite-npmrc.template",
17126
17126
  "module/src/module.jsx": "suite-module.template.jsx",
17127
17127
  "module/vite.config.mjs": "suite-vite.template.mjs",
17128
- "module/screens/screens.json": "suite-screens.template.json",
17129
- "module/screens/files.json": "suite-files.template.json",
17130
- ".github/workflows/screens.yml": "suite-screens.template.yml",
17131
17128
  "docs/Guides/mm-work-module.md": "suite-guide.template.md"
17132
17129
  };
17133
17130
  return [
@@ -18669,10 +18666,10 @@ var rollout_plan_default = {
18669
18666
  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)."
18670
18667
  },
18671
18668
  baseline: {
18672
- version: "4.5.150",
18673
- tag: "v4.5.150",
18674
- commit: "4dc71e3761ec",
18675
- npm: "@mutmutco/cli@4.5.150"
18669
+ version: "4.5.151",
18670
+ tag: "v4.5.151",
18671
+ commit: "c80d8f0f8b26",
18672
+ npm: "@mutmutco/cli@4.5.151"
18676
18673
  },
18677
18674
  exitCriterion: "fleet-n-of-n",
18678
18675
  hubOnlyShortcut: "forbidden",
@@ -18689,14 +18686,14 @@ var rollout_plan_default = {
18689
18686
  repo: "mutmutco/mmi-hub",
18690
18687
  role: "canary",
18691
18688
  schedule: "train",
18692
- v3Target: "v4.5.150"
18689
+ v3Target: "v4.5.151"
18693
18690
  }
18694
18691
  ],
18695
18692
  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.",
18696
18693
  rollback: {
18697
18694
  independent: true,
18698
- mechanism: "npm dist-tag latest -> 4.5.150 and redeploy the Hub Lambda from tag v4.5.150 (4dc71e3761ec); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
18699
- v3Target: "v4.5.150 (@mutmutco/cli@4.5.150, tag commit 4dc71e3761ec \u2014 last known-good release carrying the repo-index v4-only contract)"
18695
+ mechanism: "npm dist-tag latest -> 4.5.151 and redeploy the Hub Lambda from tag v4.5.151 (c80d8f0f8b26); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
18696
+ v3Target: "v4.5.151 (@mutmutco/cli@4.5.151, tag commit c80d8f0f8b26 \u2014 last known-good release carrying the repo-index v4-only contract)"
18700
18697
  }
18701
18698
  },
18702
18699
  {
@@ -35655,8 +35652,8 @@ function suiteModulePackageAccessCheck(suite, deployModel) {
35655
35652
  if (suite !== "mm-work" || deployModel !== "tenant-container") return void 0;
35656
35653
  return {
35657
35654
  ok: true,
35658
- label: "mmwork-ds + mmwork-screens package access (manual org-admin step; unverified)",
35659
- detail: `An org admin must add this repository with Read under BOTH @mutmutco/mmwork-ds and @mutmutco/mmwork-screens \u2192 Package settings \u2192 Manage Actions access (#7984). No GitHub REST API can verify or grant this; without it the image build or the screens job fails with 403 read_package. Once screens is green, require it: mmi-cli oracle org project set <owner/repo> --var 'requiredChecks=["gate","screens / screens"]'.`
35655
+ label: "mmwork-ds package access (manual org-admin step; unverified)",
35656
+ detail: "An org admin must add this repository with Read under @mutmutco/mmwork-ds \u2192 Package settings \u2192 Manage Actions access (#7984). No GitHub REST API can verify or grant this; without it the image build fails with 403 read_package."
35660
35657
  };
35661
35658
  }
35662
35659
  function attachTrainDoctorVerdicts(report, trainDoctors) {
@@ -40608,6 +40605,7 @@ var TRAILER_KEY = "Test-Policy-Override";
40608
40605
  var OVERRIDE_RE = /^Test-Policy-Override:\s*(.+)$/im;
40609
40606
  var REC = "";
40610
40607
  var FLD = "";
40608
+ var GH_SQUASH_COAUTHORS_RE = /\r?\n(?:[ \t]*\r?\n)+---------\r?\n(?:[ \t]*\r?\n)+(?:Co-authored-by:[ \t]+\S[^\r\n]*(?:\r?\n|$))+[ \t\r\n]*$/i;
40611
40609
  var WAIVABLE_KINDS = [
40612
40610
  "mandatory-zone-untested",
40613
40611
  "unrequested-test-file",
@@ -40765,6 +40763,21 @@ function isShallowRepository(cwd) {
40765
40763
  return true;
40766
40764
  }
40767
40765
  }
40766
+ function readOverrideTrailer(trailer, body, cwd) {
40767
+ const direct = (trailer ?? "").trim();
40768
+ if (direct) return direct;
40769
+ const raw = body ?? "";
40770
+ const stripped = raw.replace(GH_SQUASH_COAUTHORS_RE, "\n");
40771
+ if (stripped === raw) return "";
40772
+ const prefix = `${TRAILER_KEY.toLowerCase()}:`;
40773
+ return (0, import_node_child_process12.execFileSync)("git", ["interpret-trailers", "--parse", "--unfold"], {
40774
+ windowsHide: true,
40775
+ cwd,
40776
+ input: stripped,
40777
+ encoding: "utf8",
40778
+ maxBuffer: 32 * 1024 * 1024
40779
+ }).split(/\r?\n/).filter((line) => line.trim().toLowerCase().startsWith(prefix)).map((line) => line.trim().slice(prefix.length).trim()).join("\n").trim();
40780
+ }
40768
40781
  function readOverride(base, cwd) {
40769
40782
  const format = `%H${FLD}%(trailers:key=${TRAILER_KEY},valueonly,unfold)${FLD}%B${REC}`;
40770
40783
  const refusals = [];
@@ -40773,7 +40786,7 @@ function readOverride(base, cwd) {
40773
40786
  const [sha, trailer, body] = record.replace(/^\s+/, "").split(FLD);
40774
40787
  if (!sha) continue;
40775
40788
  if (override) break;
40776
- const value = (trailer ?? "").trim();
40789
+ const value = readOverrideTrailer(trailer, body, cwd);
40777
40790
  if (!value) {
40778
40791
  const shaped = OVERRIDE_RE.exec(body ?? "");
40779
40792
  if (shaped) refusals.push(invisibleTrailer(sha, shaped[0].trim()));
@@ -53400,27 +53413,51 @@ var COMPARE_RE = new RegExp(`^repos/${NAME}/${NAME}/compare/${FREE}\\.\\.\\.${FR
53400
53413
  var CONTENTS_BASE_RE = new RegExp(`^repos/${NAME}/${NAME}/contents/${FREE}$`);
53401
53414
  var CONTENTS_QUERY_RE = /^ref=[^&\s]+$/;
53402
53415
  var ACTIONS_RUNS_RE = new RegExp(`^repos/${NAME}/${NAME}/actions/runs$`);
53416
+ var RUNS_QUERY_VALUE = {
53417
+ per_page: /^(?:[1-9]\d?|100)$/,
53418
+ page: /^[1-9]\d{0,5}$/,
53419
+ status: /^[A-Za-z_]+$/,
53420
+ branch: /^[A-Za-z0-9_.\/-]+$/,
53421
+ event: /^[A-Za-z_]+$/,
53422
+ head_sha: /^[0-9a-fA-F]{40}$/,
53423
+ created: /^[0-9:TZ.<>=-]+$/,
53424
+ actor: /^[A-Za-z0-9_.\[\]-]+$/
53425
+ };
53426
+ function validRunsQuery(query) {
53427
+ const seen = /* @__PURE__ */ new Set();
53428
+ for (const pair of query.split("&")) {
53429
+ const eq = pair.indexOf("=");
53430
+ if (eq < 1) return false;
53431
+ const key = pair.slice(0, eq);
53432
+ const value = pair.slice(eq + 1);
53433
+ const re = Object.prototype.hasOwnProperty.call(RUNS_QUERY_VALUE, key) ? RUNS_QUERY_VALUE[key] : void 0;
53434
+ if (!re || seen.has(key) || !re.test(value)) return false;
53435
+ seen.add(key);
53436
+ }
53437
+ return true;
53438
+ }
53439
+ var JSON_MAX_BUFFER = 64 * 1024 * 1024;
53403
53440
  var ACTIONS_RUN_RE = new RegExp(`^repos/${NAME}/${NAME}/actions/runs/\\d+$`);
53404
53441
  var ACTIONS_JOBS_RE = new RegExp(`^repos/${NAME}/${NAME}/actions/runs/\\d+(?:/attempts/\\d+)?/jobs$`);
53405
53442
  var ACTIONS_ARTIFACTS_RE = new RegExp(`^repos/${NAME}/${NAME}/actions/runs/\\d+/artifacts$`);
53406
53443
  var ACTIONS_ARTIFACT_ZIP_RE = new RegExp(`^repos/${NAME}/${NAME}/actions/artifacts/\\d+/zip$`);
53407
53444
  var ACTIONS_JOB_LOGS_RE = new RegExp(`^repos/${NAME}/${NAME}/actions/jobs/\\d+/logs$`);
53408
- var API_GET_ALLOWED_SHAPES = "repos/{owner}/{repo}/pulls/{n}/files, repos/{owner}/{repo}/compare/{a}...{b}, repos/{owner}/{repo}/contents/{path}[?ref=<branch>], repos/{owner}/{repo}/actions/runs, repos/{owner}/{repo}/actions/runs/{id}, repos/{owner}/{repo}/actions/runs/{id}/jobs, repos/{owner}/{repo}/actions/runs/{id}/attempts/{n}/jobs, repos/{owner}/{repo}/actions/runs/{id}/artifacts, repos/{owner}/{repo}/actions/artifacts/{id}/zip (needs --out <file>), repos/{owner}/{repo}/actions/jobs/{id}/logs (needs --out <file>)";
53445
+ var API_GET_ALLOWED_SHAPES = "repos/{owner}/{repo}/pulls/{n}/files, repos/{owner}/{repo}/compare/{a}...{b}, repos/{owner}/{repo}/contents/{path}[?ref=<branch>], repos/{owner}/{repo}/actions/runs[?per_page=1-100&page=<n>&status=&branch=&event=&head_sha=<40-hex>&created=<date-range>&actor=, each key at most once], repos/{owner}/{repo}/actions/runs/{id}, repos/{owner}/{repo}/actions/runs/{id}/jobs, repos/{owner}/{repo}/actions/runs/{id}/attempts/{n}/jobs, repos/{owner}/{repo}/actions/runs/{id}/artifacts, repos/{owner}/{repo}/actions/artifacts/{id}/zip (needs --out <file>), repos/{owner}/{repo}/actions/jobs/{id}/logs (needs --out <file>)";
53409
53446
  function parseApiGetPath(rawPath) {
53410
53447
  const path2 = rawPath.trim();
53411
53448
  const refuse = () => new Error(`api get: refusing '${rawPath}' \u2014 only these GET reads are allowed (#7219): ${API_GET_ALLOWED_SHAPES}`);
53412
53449
  if (/[%#\\]/.test(path2) || path2.split("?")[0].split("/").some((seg) => seg === "." || seg === ".." || seg === "")) throw refuse();
53450
+ const q = path2.indexOf("?");
53451
+ const base = q === -1 ? path2 : path2.slice(0, q);
53452
+ const query = q === -1 ? "" : path2.slice(q + 1);
53413
53453
  if (PULL_FILES_RE.test(path2)) return { kind: "pull-files", path: path2, paginate: true };
53414
53454
  if (COMPARE_RE.test(path2)) return { kind: "compare", path: path2, paginate: false };
53415
- if (ACTIONS_RUNS_RE.test(path2)) return { kind: "actions-runs", path: path2, paginate: true };
53455
+ if (ACTIONS_RUNS_RE.test(base) && (q === -1 || validRunsQuery(query))) return { kind: "actions-runs", path: path2, paginate: false };
53416
53456
  if (ACTIONS_RUN_RE.test(path2)) return { kind: "actions-run", path: path2, paginate: false };
53417
53457
  if (ACTIONS_JOBS_RE.test(path2)) return { kind: "actions-jobs", path: path2, paginate: true };
53418
53458
  if (ACTIONS_ARTIFACTS_RE.test(path2)) return { kind: "actions-artifacts", path: path2, paginate: true };
53419
53459
  if (ACTIONS_ARTIFACT_ZIP_RE.test(path2)) return { kind: "actions-artifact-zip", path: path2, paginate: false };
53420
53460
  if (ACTIONS_JOB_LOGS_RE.test(path2)) return { kind: "actions-job-logs", path: path2, paginate: false };
53421
- const q = path2.indexOf("?");
53422
- const base = q === -1 ? path2 : path2.slice(0, q);
53423
- const query = q === -1 ? "" : path2.slice(q + 1);
53424
53461
  if (CONTENTS_BASE_RE.test(base) && (query === "" || CONTENTS_QUERY_RE.test(query))) {
53425
53462
  return { kind: "contents", path: path2, paginate: false };
53426
53463
  }
@@ -53439,7 +53476,7 @@ function buildApiGetArgs(path2, accept) {
53439
53476
  async function runApiGet(run, path2, accept) {
53440
53477
  return run(buildApiGetArgs(path2, accept), GIT_TIMEOUT_MS);
53441
53478
  }
53442
- var apiReadRunner = async (args, timeoutMs, env, binary) => (await execFileP("gh", args, { timeout: timeoutMs, ...binary ? { encoding: "latin1", maxBuffer: ZIP_MAX_BUFFER } : {}, ...env ? { env } : {} })).stdout;
53479
+ var apiReadRunner = async (args, timeoutMs, env, binary) => (await execFileP("gh", args, { timeout: timeoutMs, ...binary ? { encoding: "latin1", maxBuffer: ZIP_MAX_BUFFER } : { maxBuffer: JSON_MAX_BUFFER }, ...env ? { env } : {} })).stdout;
53443
53480
  async function readAppApi(path2, runner = apiReadRunner) {
53444
53481
  const req = parseApiGetPath(path2);
53445
53482
  requireBrokerApp("read run log");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/cli",
3
- "version": "4.5.150",
3
+ "version": "4.5.151",
4
4
  "description": "MMI Future CLI — the org dev toolbox and shared cross-IDE engine for every registry-declared MMI coding surface.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",