@mutmutco/cli 4.5.153 → 4.5.154
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 +38 -12
- package/dist/runbook-sweep.cjs +22 -5
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -7163,6 +7163,27 @@ async function readAppVaultSecret(read) {
|
|
|
7163
7163
|
}
|
|
7164
7164
|
}
|
|
7165
7165
|
async function mintInstallationToken(deps) {
|
|
7166
|
+
return mintScopedInstallationToken(deps, APP_POLL_PERMISSIONS);
|
|
7167
|
+
}
|
|
7168
|
+
async function mintStatusWriteToken(deps) {
|
|
7169
|
+
return mintScopedInstallationToken(deps, { metadata: "read", statuses: "write" });
|
|
7170
|
+
}
|
|
7171
|
+
var statusWriteTokenProvider;
|
|
7172
|
+
function setStatusWriteTokenProvider(provider) {
|
|
7173
|
+
statusWriteTokenProvider = provider;
|
|
7174
|
+
}
|
|
7175
|
+
async function fleetStatusWriteEnv(args) {
|
|
7176
|
+
if (args[0] !== "api" || args[1] !== "-X" || args[2] !== "POST" || !/^repos\/[^/]+\/[^/]+\/statuses\/[^/]+$/.test(args[3] ?? "") || !args.some((arg, i) => arg === "context=fleet-lockstep" && args[i - 1] === "-f")) return void 0;
|
|
7177
|
+
if (!statusWriteTokenProvider) throw new AppActorError("app actor: status-write provider not installed");
|
|
7178
|
+
try {
|
|
7179
|
+
const { token } = await statusWriteTokenProvider();
|
|
7180
|
+
return { ...process.env, GH_TOKEN: token };
|
|
7181
|
+
} catch (e) {
|
|
7182
|
+
if (e instanceof AppActorError && e.code === "vault-denied") return void 0;
|
|
7183
|
+
throw e;
|
|
7184
|
+
}
|
|
7185
|
+
}
|
|
7186
|
+
async function mintScopedInstallationToken(deps, permissions) {
|
|
7166
7187
|
const [appId, installationId, privateKey] = await Promise.all(APP_VAULT_KEYS.map((k) => deps.fetchSecret(k)));
|
|
7167
7188
|
if (!appId || !installationId || !privateKey) {
|
|
7168
7189
|
const missing = APP_VAULT_KEYS.filter((_, i) => ![appId, installationId, privateKey][i]);
|
|
@@ -7189,7 +7210,7 @@ async function mintInstallationToken(deps) {
|
|
|
7189
7210
|
"content-type": "application/json",
|
|
7190
7211
|
"user-agent": "mmi-cli-app-actor"
|
|
7191
7212
|
},
|
|
7192
|
-
body: JSON.stringify({ permissions
|
|
7213
|
+
body: JSON.stringify({ permissions })
|
|
7193
7214
|
});
|
|
7194
7215
|
} catch (e) {
|
|
7195
7216
|
if (e instanceof AppActorError) throw e;
|
|
@@ -18720,10 +18741,10 @@ var rollout_plan_default = {
|
|
|
18720
18741
|
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)."
|
|
18721
18742
|
},
|
|
18722
18743
|
baseline: {
|
|
18723
|
-
version: "4.5.
|
|
18724
|
-
tag: "v4.5.
|
|
18725
|
-
commit: "
|
|
18726
|
-
npm: "@mutmutco/cli@4.5.
|
|
18744
|
+
version: "4.5.154",
|
|
18745
|
+
tag: "v4.5.154",
|
|
18746
|
+
commit: "045e47363357",
|
|
18747
|
+
npm: "@mutmutco/cli@4.5.154"
|
|
18727
18748
|
},
|
|
18728
18749
|
exitCriterion: "fleet-n-of-n",
|
|
18729
18750
|
hubOnlyShortcut: "forbidden",
|
|
@@ -18740,14 +18761,14 @@ var rollout_plan_default = {
|
|
|
18740
18761
|
repo: "mutmutco/mmi-hub",
|
|
18741
18762
|
role: "canary",
|
|
18742
18763
|
schedule: "train",
|
|
18743
|
-
v3Target: "v4.5.
|
|
18764
|
+
v3Target: "v4.5.154"
|
|
18744
18765
|
}
|
|
18745
18766
|
],
|
|
18746
18767
|
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.",
|
|
18747
18768
|
rollback: {
|
|
18748
18769
|
independent: true,
|
|
18749
|
-
mechanism: "npm dist-tag latest -> 4.5.
|
|
18750
|
-
v3Target: "v4.5.
|
|
18770
|
+
mechanism: "npm dist-tag latest -> 4.5.154 and redeploy the Hub Lambda from tag v4.5.154 (045e47363357); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
|
|
18771
|
+
v3Target: "v4.5.154 (@mutmutco/cli@4.5.154, tag commit 045e47363357 \u2014 last known-good release carrying the repo-index v4-only contract)"
|
|
18751
18772
|
}
|
|
18752
18773
|
},
|
|
18753
18774
|
{
|
|
@@ -19682,9 +19703,12 @@ async function resolveBoardProjectId(repoOption) {
|
|
|
19682
19703
|
return void 0;
|
|
19683
19704
|
}
|
|
19684
19705
|
}
|
|
19685
|
-
function queryDeps() {
|
|
19706
|
+
function queryDeps(readEnv) {
|
|
19686
19707
|
return {
|
|
19687
|
-
ghJson: async (args, timeoutMs = GH_LIST_TIMEOUT_MS) =>
|
|
19708
|
+
ghJson: async (args, timeoutMs = GH_LIST_TIMEOUT_MS) => {
|
|
19709
|
+
const env = await readEnv?.();
|
|
19710
|
+
return JSON.parse((await execFileP("gh", args, { timeout: timeoutMs, ...env ? { env } : {} })).stdout);
|
|
19711
|
+
},
|
|
19688
19712
|
viewer: () => githubLogin(),
|
|
19689
19713
|
resolveRepo
|
|
19690
19714
|
};
|
|
@@ -20070,7 +20094,8 @@ function defaultFleetTrackInventoryDeps(consistent = false) {
|
|
|
20070
20094
|
if (!projects) throw new Error("live Hub registry roster is unavailable \u2014 a committed inventory is never current truth, so there is no fallback; retry when the Hub API is reachable");
|
|
20071
20095
|
return projects;
|
|
20072
20096
|
},
|
|
20073
|
-
|
|
20097
|
+
// #8350: gate inventory probes bypass the train runner, so supply its App read env here too.
|
|
20098
|
+
query: queryDeps(ghReadEnv),
|
|
20074
20099
|
now: () => /* @__PURE__ */ new Date()
|
|
20075
20100
|
};
|
|
20076
20101
|
}
|
|
@@ -48186,7 +48211,7 @@ function trainApplyDeps() {
|
|
|
48186
48211
|
trainWriter: (verb, cwd) => acquireTrainWriterLock(cwd, `mmi-cli devops ${verb}`),
|
|
48187
48212
|
run: async (file, args) => {
|
|
48188
48213
|
const timeout = file === "node" && args[1] === "prepare" ? NODE_PREPARE_TIMEOUT_MS : file === "node" && args[1] === "verify" ? NODE_VERIFY_TIMEOUT_MS : file === "npm" && (args[0] === "version" || args[0] === "ci" || args[0] === "install") ? NPM_FOLD_TIMEOUT_MS : file === "npm" ? NPM_TRAIN_TIMEOUT_MS : file === "bash" && /jerv-gateway-release-deploy\.sh$/.test(args[0] ?? "") ? JERV_GATEWAY_DEPLOY_TIMEOUT_MS : file === "git" && args[0] === "commit" ? GIT_COMMIT_TIMEOUT_MS : file !== "gh" ? GIT_TIMEOUT_MS : args[0] === "run" && args[1] === "watch" ? GH_RUN_WATCH_TIMEOUT_MS : GH_TRAIN_TIMEOUT_MS;
|
|
48189
|
-
const readEnv = file
|
|
48214
|
+
const readEnv = file !== "gh" ? void 0 : isAppRoutableGhReadArgs(args) ? await ghReadEnv() : await fleetStatusWriteEnv(args);
|
|
48190
48215
|
try {
|
|
48191
48216
|
return isWin3 && file === "npm" ? (await execFileP("cmd.exe", ["/c", "npm", ...args], { timeout })).stdout : (await execFileP(file, file === "git" ? trainGitArgs(args) : args, { timeout, ...readEnv ? { env: readEnv } : {} })).stdout;
|
|
48192
48217
|
} catch (e) {
|
|
@@ -56751,6 +56776,7 @@ function appActorDeps() {
|
|
|
56751
56776
|
};
|
|
56752
56777
|
}
|
|
56753
56778
|
setPollTokenProvider(async () => activeAppToken() ?? pollTokenOrUndefined(appActorDeps()));
|
|
56779
|
+
setStatusWriteTokenProvider(() => mintStatusWriteToken(appActorDeps()));
|
|
56754
56780
|
var registerPreAction = Reflect.get(program2, ["h", "ook"].join(""));
|
|
56755
56781
|
registerPreAction.call(program2, "preAction", async (_thisCommand, actionCommand) => {
|
|
56756
56782
|
const commandPath3 = commandPathOf(actionCommand);
|
package/dist/runbook-sweep.cjs
CHANGED
|
@@ -4467,12 +4467,11 @@ init_github_quota();
|
|
|
4467
4467
|
var CHILD_PROJECT_ITEMS_PAGE = 50;
|
|
4468
4468
|
var CHILD_PROJECT_ITEMS_FIELDS = `projectItems(first:${CHILD_PROJECT_ITEMS_PAGE}){nodes{project{id} fieldValues(first:20){nodes{... on ProjectV2ItemFieldSingleSelectValue{name field{...on ProjectV2SingleSelectField{name}}}}}}}`;
|
|
4469
4469
|
|
|
4470
|
-
// src/
|
|
4471
|
-
|
|
4470
|
+
// src/pr-checks-rest.ts
|
|
4471
|
+
init_cli_shared();
|
|
4472
4472
|
|
|
4473
|
-
// src/
|
|
4474
|
-
var
|
|
4475
|
-
var SUITE_GUARD_ANCHOR = `https://github.com/mutmutco/MMI-Hub/blob/development/docs/Guides/train-troubleshooting.md#${SUITE_GUARD_CODE}`;
|
|
4473
|
+
// src/app-actor.ts
|
|
4474
|
+
var APP_JWT_TTL_S = 9 * 60;
|
|
4476
4475
|
|
|
4477
4476
|
// src/release-auxiliary-workflows.ts
|
|
4478
4477
|
var AUXILIARY_RELEASE_WORKFLOW_NAMES = /* @__PURE__ */ new Set([
|
|
@@ -4493,6 +4492,24 @@ function isReleaseShaDeployEnumerationCandidate(row, nonDeployEvents) {
|
|
|
4493
4492
|
return true;
|
|
4494
4493
|
}
|
|
4495
4494
|
|
|
4495
|
+
// src/pr-checks-rest.ts
|
|
4496
|
+
init_github_quota();
|
|
4497
|
+
|
|
4498
|
+
// src/rest-etag-cache.ts
|
|
4499
|
+
var MAX_AGE_MS = 24 * 60 * 6e4;
|
|
4500
|
+
var MAX_BYTES = 16 * 1024 * 1024;
|
|
4501
|
+
var MAX_ENTRY_BYTES = 1024 * 1024;
|
|
4502
|
+
|
|
4503
|
+
// src/pr-checks-rest.ts
|
|
4504
|
+
var OBSERVED_POOL_MAX_AGE_MS = 3 * 6e4;
|
|
4505
|
+
|
|
4506
|
+
// src/train-apply-correlation.ts
|
|
4507
|
+
var ALIGNMENT_LAND_TIMEOUT_MS = 20 * 6e4;
|
|
4508
|
+
|
|
4509
|
+
// src/train-suite.ts
|
|
4510
|
+
var SUITE_GUARD_CODE = "suite-member-solo";
|
|
4511
|
+
var SUITE_GUARD_ANCHOR = `https://github.com/mutmutco/MMI-Hub/blob/development/docs/Guides/train-troubleshooting.md#${SUITE_GUARD_CODE}`;
|
|
4512
|
+
|
|
4496
4513
|
// src/vercel-deployments.ts
|
|
4497
4514
|
var TERMINAL = /* @__PURE__ */ new Set(["success", "failure", "error", "inactive"]);
|
|
4498
4515
|
function isTerminalVercelState(state) {
|
package/package.json
CHANGED