@mutmutco/cli 2.20.0 → 2.20.1
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 +23 -8
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -4826,6 +4826,13 @@ function parseManifestVersion(stdout) {
|
|
|
4826
4826
|
return void 0;
|
|
4827
4827
|
}
|
|
4828
4828
|
}
|
|
4829
|
+
function npmReleasedVersionArgs() {
|
|
4830
|
+
return ["view", "@mutmutco/cli", "version"];
|
|
4831
|
+
}
|
|
4832
|
+
function parseNpmVersion(stdout) {
|
|
4833
|
+
const v = stdout.trim();
|
|
4834
|
+
return /^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?$/.test(v) ? v : void 0;
|
|
4835
|
+
}
|
|
4829
4836
|
function versionAutoUpdateAction(report, hasPluginRoot) {
|
|
4830
4837
|
if (report.ok || report.staleAgainst !== "released") return "none";
|
|
4831
4838
|
return hasPluginRoot ? "plugin-pull" : "npm";
|
|
@@ -7387,7 +7394,7 @@ function resolveContextState(context, checkRuns, statuses) {
|
|
|
7387
7394
|
if (r.name !== context) continue;
|
|
7388
7395
|
if (r.status === "completed") {
|
|
7389
7396
|
if (r.conclusion === "success") return "success";
|
|
7390
|
-
sawFailure = true;
|
|
7397
|
+
if (r.conclusion !== "skipped" && r.conclusion !== "neutral") sawFailure = true;
|
|
7391
7398
|
}
|
|
7392
7399
|
}
|
|
7393
7400
|
for (const s of statuses) {
|
|
@@ -8014,19 +8021,18 @@ async function findHotfixPr(deps, ctx, tag) {
|
|
|
8014
8021
|
"list",
|
|
8015
8022
|
"--repo",
|
|
8016
8023
|
ctx.repo,
|
|
8017
|
-
"--head",
|
|
8018
|
-
hotfixBranch(tag),
|
|
8019
8024
|
"--base",
|
|
8020
8025
|
"main",
|
|
8021
8026
|
"--state",
|
|
8022
8027
|
"all",
|
|
8023
8028
|
"--limit",
|
|
8024
|
-
"
|
|
8029
|
+
"50",
|
|
8025
8030
|
"--json",
|
|
8026
|
-
"number,state,url,mergeCommit"
|
|
8031
|
+
"number,state,url,mergeCommit,headRefName"
|
|
8027
8032
|
]);
|
|
8028
8033
|
const rows = JSON.parse(out || "[]");
|
|
8029
|
-
|
|
8034
|
+
const branch = hotfixBranch(tag);
|
|
8035
|
+
return rows.filter((r) => typeof r.headRefName === "string" && (r.headRefName === branch || r.headRefName.startsWith(`${branch}-`))).sort((a, b) => (b.number ?? 0) - (a.number ?? 0))[0] ?? null;
|
|
8030
8036
|
}
|
|
8031
8037
|
async function resolveHotfixSource(deps, ctx, from) {
|
|
8032
8038
|
const prMatch = /^#?(\d+)$/.exec(from.trim());
|
|
@@ -8162,9 +8168,9 @@ async function runHotfixRelease(deps, versionInput, options = {}) {
|
|
|
8162
8168
|
await deps.run("git", ["merge-base", "--is-ancestor", mergedSha, "origin/main"]).catch(() => {
|
|
8163
8169
|
throw new Error(`merged hotfix SHA ${mergedSha.slice(0, 7)} is not on origin/main \u2014 refusing to tag`);
|
|
8164
8170
|
});
|
|
8171
|
+
const tagNote = await ensureTagPushed(deps, tag, mergedSha);
|
|
8165
8172
|
const required = await discoverRequiredCheckContexts(deps, ctx, "main");
|
|
8166
8173
|
const checks = await waitForRequiredTrainChecks(deps, ctx, mergedSha, required);
|
|
8167
|
-
const tagNote = await ensureTagPushed(deps, tag, mergedSha);
|
|
8168
8174
|
let releaseNote;
|
|
8169
8175
|
let releaseExists = false;
|
|
8170
8176
|
try {
|
|
@@ -11237,6 +11243,7 @@ async function fetchReleasedVersion() {
|
|
|
11237
11243
|
}
|
|
11238
11244
|
}
|
|
11239
11245
|
var NPM_UPDATE_TIMEOUT_MS = 12e4;
|
|
11246
|
+
var NPM_VIEW_TIMEOUT_MS = 15e3;
|
|
11240
11247
|
var PLUGIN_PULL_TIMEOUT_MS = 3e4;
|
|
11241
11248
|
async function applyVersionAutoUpdate(report, log) {
|
|
11242
11249
|
const action = versionAutoUpdateAction(report, Boolean(process.env.CLAUDE_PLUGIN_ROOT));
|
|
@@ -11260,10 +11267,18 @@ async function applyVersionAutoUpdate(report, log) {
|
|
|
11260
11267
|
return report;
|
|
11261
11268
|
}
|
|
11262
11269
|
}
|
|
11270
|
+
async function fetchNpmReleasedVersion() {
|
|
11271
|
+
try {
|
|
11272
|
+
const { stdout } = await runHostBin("npm", npmReleasedVersionArgs(), { timeout: NPM_VIEW_TIMEOUT_MS });
|
|
11273
|
+
return parseNpmVersion(stdout);
|
|
11274
|
+
} catch {
|
|
11275
|
+
return void 0;
|
|
11276
|
+
}
|
|
11277
|
+
}
|
|
11263
11278
|
async function requireFreshTrainCli(commandName) {
|
|
11264
11279
|
const report = buildVersionLagReport({
|
|
11265
11280
|
currentVersion: resolveClientVersion(),
|
|
11266
|
-
releasedVersion: await
|
|
11281
|
+
releasedVersion: await fetchNpmReleasedVersion()
|
|
11267
11282
|
});
|
|
11268
11283
|
if (report.ok) return;
|
|
11269
11284
|
throw new Error(`running mmi-cli ${report.currentVersion} is stale against released ${report.releasedVersion}; run doctor/update first so ${commandName} uses the current train path`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mutmutco/cli",
|
|
3
|
-
"version": "2.20.
|
|
3
|
+
"version": "2.20.1",
|
|
4
4
|
"description": "MMI Future CLI — delivers the org rules (whole-file), plus saga and KB access. The cross-IDE engine the plugin's SessionStart hook drives.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|