@mutmutco/cli 4.1.12 → 4.1.13

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 +59 -10
  2. package/package.json +1 -1
package/dist/main.cjs CHANGED
@@ -13152,10 +13152,10 @@ var rollout_plan_default = {
13152
13152
  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)."
13153
13153
  },
13154
13154
  baseline: {
13155
- version: "4.1.12",
13156
- tag: "v4.1.12",
13157
- commit: "306701c103b7",
13158
- npm: "@mutmutco/cli@4.1.12"
13155
+ version: "4.1.13",
13156
+ tag: "v4.1.13",
13157
+ commit: "91a8a172eda6",
13158
+ npm: "@mutmutco/cli@4.1.13"
13159
13159
  },
13160
13160
  exitCriterion: "fleet-n-of-n",
13161
13161
  hubOnlyShortcut: "forbidden",
@@ -13172,14 +13172,14 @@ var rollout_plan_default = {
13172
13172
  repo: "mutmutco/mmi-hub",
13173
13173
  role: "canary",
13174
13174
  schedule: "train",
13175
- v3Target: "v4.1.12"
13175
+ v3Target: "v4.1.13"
13176
13176
  }
13177
13177
  ],
13178
13178
  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.",
13179
13179
  rollback: {
13180
13180
  independent: true,
13181
- mechanism: "npm dist-tag latest -> 4.1.12 and redeploy the Hub Lambda from tag v4.1.12 (306701c103b7); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
13182
- v3Target: "v4.1.12 (@mutmutco/cli@4.1.12, tag commit 306701c103b7 \u2014 last known-good release carrying the repo-index v4-only contract)"
13181
+ mechanism: "npm dist-tag latest -> 4.1.13 and redeploy the Hub Lambda from tag v4.1.13 (91a8a172eda6); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
13182
+ v3Target: "v4.1.13 (@mutmutco/cli@4.1.13, tag commit 91a8a172eda6 \u2014 last known-good release carrying the repo-index v4-only contract)"
13183
13183
  }
13184
13184
  },
13185
13185
  {
@@ -15938,9 +15938,13 @@ async function withCheckoutRestoredAfterRelease(deps, result, startBranch) {
15938
15938
  return { ...result, checkout, ...localSync ? { localSync } : {} };
15939
15939
  }
15940
15940
  var HUB_REPO3 = "mutmutco/MMI-Hub";
15941
+ var JERV_HUB_REPO = "mutmutco/Jerv-Hub";
15941
15942
  function isHubControlRepo(repo) {
15942
15943
  return repo.toLowerCase() === HUB_REPO3.toLowerCase();
15943
15944
  }
15945
+ function isJervHubRepo(repo) {
15946
+ return repo.toLowerCase() === JERV_HUB_REPO.toLowerCase();
15947
+ }
15944
15948
  function supportsReleaseAbort(_repo, meta, _branchHints) {
15945
15949
  return DEPLOY_MODELS.includes(meta.deployModel);
15946
15950
  }
@@ -16653,6 +16657,42 @@ function appendPublishDispatch(deploy, publish) {
16653
16657
  deployStatus: deploy.deployStatus === "failure" || publish.deployStatus === "failure" ? "failure" : deploy.deployStatus === "pending" || publish.deployStatus === "pending" ? "pending" : "success"
16654
16658
  };
16655
16659
  }
16660
+ async function appendJervGatewayReleaseDeploy(deps, repo, tag, tagSha, dispatch) {
16661
+ if (!isJervHubRepo(repo)) return dispatch;
16662
+ if (dispatch.deployStatus !== "success") {
16663
+ return {
16664
+ ...dispatch,
16665
+ note: `${dispatch.note}; Jerv Gateway deploy deferred until package publication is proven green`
16666
+ };
16667
+ }
16668
+ try {
16669
+ const output = await deps.run("bash", ["scripts/jerv-gateway-release-deploy.sh", "--tag", tag]);
16670
+ const receipt = output.trim().split(/\r?\n/).reverse().map((line) => {
16671
+ try {
16672
+ return JSON.parse(line);
16673
+ } catch {
16674
+ return null;
16675
+ }
16676
+ }).find((value) => value?.schema === "jerv-gateway/release-deploy-v1");
16677
+ if (!receipt || receipt.tag !== tag || receipt.commit !== tagSha || receipt.status !== "healthy") {
16678
+ throw new Error("helper receipt did not match the released tag and commit");
16679
+ }
16680
+ return {
16681
+ ...dispatch,
16682
+ note: `${dispatch.note}; Jerv Gateway deployed ${tagSha.slice(0, 12)} and passed health checks`,
16683
+ workflowRuns: [...dispatch.workflowRuns ?? [], { workflow: "jerv-gateway", conclusion: "success" }],
16684
+ deployStatus: "success"
16685
+ };
16686
+ } catch (error) {
16687
+ const detail = (error instanceof Error ? error.message : String(error)).split(/\r?\n/, 1)[0].slice(0, 240);
16688
+ return {
16689
+ ...dispatch,
16690
+ note: `${dispatch.note}; Jerv Gateway deploy FAILED (${detail})`,
16691
+ workflowRuns: [...dispatch.workflowRuns ?? [], { workflow: "jerv-gateway", conclusion: "failure" }],
16692
+ deployStatus: "failure"
16693
+ };
16694
+ }
16695
+ }
16656
16696
  async function watchOwnWorkflowRuns(deps, repo, targets, since, headSha, enumerateSha = false) {
16657
16697
  const workflowRuns = [];
16658
16698
  for (const target of targets) {
@@ -17366,6 +17406,7 @@ async function completeMainRelease(deps, ctx, meta, deployModel, watch, options,
17366
17406
  const deployDispatch = await dispatchDeploy(deps, ctx, "main", "main", deployModel, watch, autoRunSince, releaseSha, "report", meta.publishDir);
17367
17407
  const publishDispatch = deployDispatch.deployStatus === "success" ? await dispatchPublishIfRequired(deps, ctx, meta, deployModel, "main", tag, watch, "report") : null;
17368
17408
  let dispatch = appendPublishDispatch(deployDispatch, publishDispatch);
17409
+ dispatch = await appendJervGatewayReleaseDeploy(deps, ctx.repo, tag, releaseSha, dispatch);
17369
17410
  if (!publishDispatch && deployDispatch.deployStatus !== "success" && meta.publishRequired && (deployModel === "tenant-container" || deployModel === "solo-container")) {
17370
17411
  const reason = deployDispatch.deployStatus === "failure" ? "box deploy failed \u2014 redeploy the box before publishing" : "box deploy not confirmed (run with --watch) \u2014 publish after the box deploy lands";
17371
17412
  dispatch = {
@@ -17504,9 +17545,14 @@ async function runReleaseResume(deps, options = {}) {
17504
17545
  const rcAlignment2 = !directTrack && branchHints.hasRcBranch ? await alignRcForward(deps, ctx, tag) : void 0;
17505
17546
  if (rcAlignment2) steps2.push(`rc alignment: ${rcAlignment2.status}`);
17506
17547
  const historicalDeploy = await deriveHistoricalDeployStatus(deps, ctx, deployModel, tagSha);
17548
+ const dispatch2 = await appendJervGatewayReleaseDeploy(deps, ctx.repo, tag, tagSha, {
17549
+ note: `historical ${deployModel} deploy/publish status: ${historicalDeploy}`,
17550
+ deployStatus: historicalDeploy
17551
+ });
17552
+ if (isJervHubRepo(ctx.repo)) steps2.push(dispatch2.note);
17507
17553
  const state2 = resumeStateOf(deriveTrainFollowUpStatus({
17508
17554
  projectInfo: "ok",
17509
- deploy: deployFollowUpOutcome(historicalDeploy),
17555
+ deploy: deployFollowUpOutcome(dispatch2.deployStatus),
17510
17556
  rcRetirement: "ok",
17511
17557
  alignment: alignmentFollowUpOutcome(devRollForward2, rcAlignment2),
17512
17558
  foldPort: "ok"
@@ -17519,6 +17565,7 @@ async function runReleaseResume(deps, options = {}) {
17519
17565
  steps: steps2,
17520
17566
  devRollForward: devRollForward2,
17521
17567
  rcAlignment: rcAlignment2,
17568
+ dispatch: dispatch2,
17522
17569
  note: state2 === "failed" ? `release ${tag} was already published, but its deploy/publish on the release SHA FAILED \u2014 re-run the failed job (do NOT re-tag); the protected alignment PRs were reused` : state2 === "pending" ? `release ${tag} was already published; reused its protected alignment PRs, but a deploy/publish or alignment follow-up is unresolved \u2014 watch it to completion` : `release ${tag} was already published; alignment is complete and the deploy on the release SHA is proven green`
17523
17570
  };
17524
17571
  }
@@ -17551,7 +17598,8 @@ async function runReleaseResume(deps, options = {}) {
17551
17598
  const autoRunSince = (deps.now ?? Date.now)();
17552
17599
  const deployDispatch = await dispatchDeploy(deps, ctx, "main", "main", deployModel, watch, autoRunSince, tagSha, "report", meta.publishDir);
17553
17600
  const publishDispatch = deployDispatch.deployStatus === "success" ? await dispatchPublishIfRequired(deps, ctx, meta, deployModel, "main", tag, watch, "report") : null;
17554
- const dispatch = appendPublishDispatch(deployDispatch, publishDispatch);
17601
+ let dispatch = appendPublishDispatch(deployDispatch, publishDispatch);
17602
+ dispatch = await appendJervGatewayReleaseDeploy(deps, ctx.repo, tag, tagSha, dispatch);
17555
17603
  steps.push(`dispatched the ${deployModel} deploy path`);
17556
17604
  const devRollForward = await rollDevelopmentForward(deps, ctx, tag);
17557
17605
  steps.push(`development roll-forward: ${devRollForward.status}`);
@@ -43162,10 +43210,11 @@ var GH_RUN_WATCH_TIMEOUT_MS = 20 * 6e4;
43162
43210
  var NODE_PREPARE_TIMEOUT_MS = 10 * 6e4;
43163
43211
  var NODE_VERIFY_TIMEOUT_MS = 5 * 6e4;
43164
43212
  var NPM_TRAIN_TIMEOUT_MS = 6e4;
43213
+ var JERV_GATEWAY_DEPLOY_TIMEOUT_MS = 20 * 6e4;
43165
43214
  function trainApplyDeps() {
43166
43215
  return {
43167
43216
  run: async (file, args) => {
43168
- const timeout = file === "node" && args[1] === "prepare" ? NODE_PREPARE_TIMEOUT_MS : file === "node" && args[1] === "verify" ? NODE_VERIFY_TIMEOUT_MS : file === "npm" ? NPM_TRAIN_TIMEOUT_MS : file !== "gh" ? GIT_TIMEOUT_MS : args[0] === "run" && args[1] === "watch" ? GH_RUN_WATCH_TIMEOUT_MS : GH_TRAIN_TIMEOUT_MS;
43217
+ const timeout = file === "node" && args[1] === "prepare" ? NODE_PREPARE_TIMEOUT_MS : file === "node" && args[1] === "verify" ? NODE_VERIFY_TIMEOUT_MS : file === "npm" ? NPM_TRAIN_TIMEOUT_MS : file === "bash" && args[0] === "scripts/jerv-gateway-release-deploy.sh" ? JERV_GATEWAY_DEPLOY_TIMEOUT_MS : file !== "gh" ? GIT_TIMEOUT_MS : args[0] === "run" && args[1] === "watch" ? GH_RUN_WATCH_TIMEOUT_MS : GH_TRAIN_TIMEOUT_MS;
43169
43218
  try {
43170
43219
  return isWin2 && file === "npm" ? (await execFileP2("cmd.exe", ["/c", "npm", ...args], { timeout })).stdout : (await execFileP2(file, args, { timeout })).stdout;
43171
43220
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/cli",
3
- "version": "4.1.12",
3
+ "version": "4.1.13",
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",