@mutmutco/cli 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.
Files changed (2) hide show
  1. package/dist/main.cjs +88 -8
  2. package/package.json +1 -1
package/dist/main.cjs CHANGED
@@ -15938,10 +15938,10 @@ var rollout_plan_default = {
15938
15938
  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)."
15939
15939
  },
15940
15940
  baseline: {
15941
- version: "4.4.9",
15942
- tag: "v4.4.9",
15943
- commit: "da79ce082e9b",
15944
- npm: "@mutmutco/cli@4.4.9"
15941
+ version: "4.4.10",
15942
+ tag: "v4.4.10",
15943
+ commit: "187ab08827c9",
15944
+ npm: "@mutmutco/cli@4.4.10"
15945
15945
  },
15946
15946
  exitCriterion: "fleet-n-of-n",
15947
15947
  hubOnlyShortcut: "forbidden",
@@ -15958,14 +15958,14 @@ var rollout_plan_default = {
15958
15958
  repo: "mutmutco/mmi-hub",
15959
15959
  role: "canary",
15960
15960
  schedule: "train",
15961
- v3Target: "v4.4.9"
15961
+ v3Target: "v4.4.10"
15962
15962
  }
15963
15963
  ],
15964
15964
  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.",
15965
15965
  rollback: {
15966
15966
  independent: true,
15967
- mechanism: "npm dist-tag latest -> 4.4.9 and redeploy the Hub Lambda from tag v4.4.9 (da79ce082e9b); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
15968
- v3Target: "v4.4.9 (@mutmutco/cli@4.4.9, tag commit da79ce082e9b \u2014 last known-good release carrying the repo-index v4-only contract)"
15967
+ mechanism: "npm dist-tag latest -> 4.4.10 and redeploy the Hub Lambda from tag v4.4.10 (187ab08827c9); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
15968
+ v3Target: "v4.4.10 (@mutmutco/cli@4.4.10, tag commit 187ab08827c9 \u2014 last known-good release carrying the repo-index v4-only contract)"
15969
15969
  }
15970
15970
  },
15971
15971
  {
@@ -19020,6 +19020,11 @@ var HUB_SERVED_PRODUCT = "mmi";
19020
19020
  function getPublishDispatchCommand(repo, product = HUB_SERVED_PRODUCT) {
19021
19021
  return `gh workflow run get-publish.yml --repo ${repo} --ref main -f product=${product}`;
19022
19022
  }
19023
+ var HUB_GET_SLUG = "mmi-get";
19024
+ var HUB_GET_STAGE = "main";
19025
+ function mmiGetRedeployCommand(repo) {
19026
+ return `gh workflow run tenant-deploy.yml --repo ${repo} --ref main -f slug=${HUB_GET_SLUG} -f repo=${repo} -f ref=${HUB_GET_STAGE} -f stage=${HUB_GET_STAGE}`;
19027
+ }
19023
19028
  function readLocalLauncherVersion(root = process.cwd()) {
19024
19029
  try {
19025
19030
  const raw = (0, import_node_fs19.readFileSync)((0, import_node_path17.join)(root, "installer", "launcher", "package.json"), "utf8");
@@ -19051,6 +19056,69 @@ async function fetchServedChannelVersion(url, fetchImpl = fetch) {
19051
19056
  return { ok: false, error: e instanceof Error ? e.message : String(e) };
19052
19057
  }
19053
19058
  }
19059
+ async function appendMmiGetRedeploy(deps, input, dispatch) {
19060
+ if (!isHubControlRepo(input.repo)) return dispatch;
19061
+ const remedy = mmiGetRedeployCommand(input.repo);
19062
+ const withNote = (note, deployStatus) => ({
19063
+ ...dispatch,
19064
+ note: `${dispatch.note}; ${note}`,
19065
+ ...deployStatus ? { deployStatus } : {}
19066
+ });
19067
+ if (input.publishStatus !== "success") {
19068
+ return withNote(`mmi-get box NOT redeployed (publish did not succeed) \u2014 after the publish is green, run \`${remedy}\``);
19069
+ }
19070
+ const since = (deps.now ?? Date.now)();
19071
+ try {
19072
+ await deps.run("gh", [
19073
+ "workflow",
19074
+ "run",
19075
+ "tenant-deploy.yml",
19076
+ "--repo",
19077
+ input.repo,
19078
+ "--ref",
19079
+ "main",
19080
+ "-f",
19081
+ `slug=${HUB_GET_SLUG}`,
19082
+ "-f",
19083
+ `repo=${input.repo}`,
19084
+ "-f",
19085
+ `ref=${HUB_GET_STAGE}`,
19086
+ "-f",
19087
+ `stage=${HUB_GET_STAGE}`
19088
+ ]);
19089
+ } catch (e) {
19090
+ const msg = e instanceof Error ? e.message : String(e);
19091
+ return withNote(`tenant-deploy dispatch FAILED: ${msg}. The release itself landed, but the MMI-GET BOX WAS NOT REDEPLOYED \u2014 recover with \`${remedy}\``, "failure");
19092
+ }
19093
+ const correlated = await correlateTenantRun(deps, since, [HUB_GET_SLUG, HUB_GET_STAGE]);
19094
+ if (correlated.read === "failed" || correlated.read === "absent") {
19095
+ const why = correlated.read === "failed" ? `its run could not be READ: ${correlated.error}` : "no matching run appeared";
19096
+ return withNote(`tenant-deploy dispatched (slug=${HUB_GET_SLUG}, stage=${HUB_GET_STAGE}) but ${why}. Check the Actions tab; if it never ran, recover with \`${remedy}\``, "failure");
19097
+ }
19098
+ const { runId, runUrl } = correlated;
19099
+ const runRow = { workflow: "tenant-deploy.yml", ...runId ? { runId } : {}, ...runUrl ? { runUrl } : {} };
19100
+ if (!input.watch) {
19101
+ return {
19102
+ ...dispatch,
19103
+ note: `${dispatch.note}; dispatched tenant-deploy.yml (slug=${HUB_GET_SLUG}, ref=${HUB_GET_STAGE}, stage=${HUB_GET_STAGE}) \u2014 NOT watched, so the mmi-get box is not yet proven redeployed`,
19104
+ workflowRuns: [...dispatch.workflowRuns ?? [], { ...runRow, conclusion: "pending" }]
19105
+ };
19106
+ }
19107
+ const runStatus = await watchTenantRun(deps, runId, input.repo);
19108
+ if (runStatus !== "success") {
19109
+ return {
19110
+ ...dispatch,
19111
+ note: `${dispatch.note}; tenant-deploy.yml ${runStatus} \u2014 the MMI-GET BOX WAS NOT REDEPLOYED; recover with \`${remedy}\``,
19112
+ workflowRuns: [...dispatch.workflowRuns ?? [], { ...runRow, conclusion: runStatus }],
19113
+ deployStatus: "failure"
19114
+ };
19115
+ }
19116
+ return {
19117
+ ...dispatch,
19118
+ note: `${dispatch.note}; mmi-get box redeployed (tenant-deploy.yml slug=${HUB_GET_SLUG} stage=${HUB_GET_STAGE})`,
19119
+ workflowRuns: [...dispatch.workflowRuns ?? [], { ...runRow, conclusion: "success" }]
19120
+ };
19121
+ }
19054
19122
  async function appendServedChannelPublish(deps, input, dispatch) {
19055
19123
  if (!isHubControlRepo(input.repo)) return dispatch;
19056
19124
  const channelUrl = input.channelUrl ?? readServedChannelUrl();
@@ -19118,9 +19186,16 @@ async function appendServedChannelPublish(deps, input, dispatch) {
19118
19186
  deployStatus: "failure"
19119
19187
  };
19120
19188
  }
19189
+ if (!expected) {
19190
+ return {
19191
+ ...dispatch,
19192
+ note: `${dispatch.note}; get-publish.yml succeeded and ${channelUrl} reports ${probe.version}, but the local launcher version could not be read \u2014 nothing was compared, so the move is unverified`,
19193
+ workflowRuns: runs
19194
+ };
19195
+ }
19121
19196
  return {
19122
19197
  ...dispatch,
19123
- note: `${dispatch.note}; served channel moved \u2014 ${channelUrl} now reports ${probe.version}${expected ? "" : " (no local launcher version to compare against)"}`,
19198
+ note: `${dispatch.note}; served channel moved \u2014 ${channelUrl} now reports ${probe.version}`,
19124
19199
  workflowRuns: runs
19125
19200
  };
19126
19201
  }
@@ -23668,6 +23743,11 @@ ${recovery.note}`), recoveryInput);
23668
23743
  });
23669
23744
  let dispatch = appendPublishDispatch(deployDispatch, publishDispatch);
23670
23745
  if (publishSkipNote) dispatch = { ...dispatch, note: `${dispatch.note}; tenant-publish.yml skipped (${publishSkipNote})` };
23746
+ dispatch = await appendMmiGetRedeploy(
23747
+ deps,
23748
+ { repo: ctx.repo, publishStatus: publishLeg.state === "complete" ? "success" : "failure", watch },
23749
+ dispatch
23750
+ );
23671
23751
  dispatch = await appendServedChannelPublish(
23672
23752
  deps,
23673
23753
  { repo: ctx.repo, publishStatus: publishLeg.state === "complete" ? "success" : "failure", watch },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/cli",
3
- "version": "4.4.9",
3
+ "version": "4.4.10",
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",