@mutmutco/cli 4.3.40 → 4.3.41
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 +32 -18
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -14099,7 +14099,7 @@ function expectedHosts(cfg) {
|
|
|
14099
14099
|
if (cfg.fofuSubdomain !== void 0) {
|
|
14100
14100
|
out.push(cfg.fofuSubdomain ? `${cfg.fofuSubdomain}.fofu.ai` : "fofu.ai");
|
|
14101
14101
|
}
|
|
14102
|
-
return uniq(out);
|
|
14102
|
+
return uniq([...out, ...cfg.edgeHosts ?? []]);
|
|
14103
14103
|
}
|
|
14104
14104
|
function expectedJsOrigins(cfg) {
|
|
14105
14105
|
return uniq([...expectedHosts(cfg).map((h) => `https://${h}`), ...LOOPBACK]);
|
|
@@ -14166,7 +14166,7 @@ function parseOauthConfig(mmiConfig, slug) {
|
|
|
14166
14166
|
const meta = mmiConfig ?? {};
|
|
14167
14167
|
const rawFofuSub = raw.fofuSubdomain;
|
|
14168
14168
|
const fofuSubdomain = meta.fofuEnabled === true ? typeof rawFofuSub === "string" ? rawFofuSub : defaultSubdomain(slug) : void 0;
|
|
14169
|
-
return { subdomains, domains, callbackPath, extraCallbackPaths, fofuSubdomain };
|
|
14169
|
+
return { subdomains, domains, callbackPath, extraCallbackPaths, fofuSubdomain, edgeHosts: Object.values(edgeDomainsByStage(mmiConfig)) };
|
|
14170
14170
|
}
|
|
14171
14171
|
function probeRedirectUri(callbackPath, port = 9123) {
|
|
14172
14172
|
return `http://localhost:${port}${callbackPath}`;
|
|
@@ -14185,6 +14185,20 @@ function buildAuthorizeProbeUrl(clientId, redirectUri) {
|
|
|
14185
14185
|
function authorizeBodyHasMismatch(body) {
|
|
14186
14186
|
return /redirect_uri_mismatch/i.test(body);
|
|
14187
14187
|
}
|
|
14188
|
+
async function probeOauthRedirects(cfg, clientId, request = fetch) {
|
|
14189
|
+
const uris = uniq([probeRedirectUri(cfg.callbackPath), ...expectedRedirectUris(cfg)]);
|
|
14190
|
+
const signal = AbortSignal.timeout(1e4);
|
|
14191
|
+
const results = [];
|
|
14192
|
+
for (let i = 0; i < uris.length; i += 4) {
|
|
14193
|
+
results.push(...await Promise.all(uris.slice(i, i + 4).map(async (redirectUri) => {
|
|
14194
|
+
const response = await request(buildAuthorizeProbeUrl(clientId, redirectUri), { redirect: "follow", signal });
|
|
14195
|
+
const mismatch = authorizeBodyHasMismatch(await response.text());
|
|
14196
|
+
if (!mismatch && !response.ok) throw new Error(`authorize probe returned HTTP ${response.status}`);
|
|
14197
|
+
return { redirectUri, mismatch };
|
|
14198
|
+
})));
|
|
14199
|
+
}
|
|
14200
|
+
return results;
|
|
14201
|
+
}
|
|
14188
14202
|
|
|
14189
14203
|
// src/project-runtime.ts
|
|
14190
14204
|
function hasRuntimeSecretContract(contract) {
|
|
@@ -15694,10 +15708,10 @@ var rollout_plan_default = {
|
|
|
15694
15708
|
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)."
|
|
15695
15709
|
},
|
|
15696
15710
|
baseline: {
|
|
15697
|
-
version: "4.3.
|
|
15698
|
-
tag: "v4.3.
|
|
15699
|
-
commit: "
|
|
15700
|
-
npm: "@mutmutco/cli@4.3.
|
|
15711
|
+
version: "4.3.41",
|
|
15712
|
+
tag: "v4.3.41",
|
|
15713
|
+
commit: "02cc438cfbf4",
|
|
15714
|
+
npm: "@mutmutco/cli@4.3.41"
|
|
15701
15715
|
},
|
|
15702
15716
|
exitCriterion: "fleet-n-of-n",
|
|
15703
15717
|
hubOnlyShortcut: "forbidden",
|
|
@@ -15714,14 +15728,14 @@ var rollout_plan_default = {
|
|
|
15714
15728
|
repo: "mutmutco/mmi-hub",
|
|
15715
15729
|
role: "canary",
|
|
15716
15730
|
schedule: "train",
|
|
15717
|
-
v3Target: "v4.3.
|
|
15731
|
+
v3Target: "v4.3.41"
|
|
15718
15732
|
}
|
|
15719
15733
|
],
|
|
15720
15734
|
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.",
|
|
15721
15735
|
rollback: {
|
|
15722
15736
|
independent: true,
|
|
15723
|
-
mechanism: "npm dist-tag latest -> 4.3.
|
|
15724
|
-
v3Target: "v4.3.
|
|
15737
|
+
mechanism: "npm dist-tag latest -> 4.3.41 and redeploy the Hub Lambda from tag v4.3.41 (02cc438cfbf4); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
|
|
15738
|
+
v3Target: "v4.3.41 (@mutmutco/cli@4.3.41, tag commit 02cc438cfbf4 \u2014 last known-good release carrying the repo-index v4-only contract)"
|
|
15725
15739
|
}
|
|
15726
15740
|
},
|
|
15727
15741
|
{
|
|
@@ -45559,22 +45573,22 @@ oauth.command("verify").description("probe Google authorize with an arbitrary po
|
|
|
45559
45573
|
return failGraceful("org oauth verify: no client_id (pass --client-id, or provision the repo so GOOGLE_CLIENT_ID exists)");
|
|
45560
45574
|
}
|
|
45561
45575
|
const redirectUri = probeRedirectUri(oc.callbackPath);
|
|
45562
|
-
let
|
|
45576
|
+
let probes;
|
|
45563
45577
|
try {
|
|
45564
|
-
|
|
45565
|
-
body = await res.text();
|
|
45578
|
+
probes = await probeOauthRedirects(oc, clientId);
|
|
45566
45579
|
} catch (e) {
|
|
45567
45580
|
return failGraceful(`org oauth verify: probe request failed: ${e.message}`);
|
|
45568
45581
|
}
|
|
45569
|
-
const
|
|
45582
|
+
const portAgnostic = !probes[0].mismatch;
|
|
45583
|
+
const mismatches = probes.filter((probe) => probe.mismatch);
|
|
45570
45584
|
if (o.json) {
|
|
45571
|
-
console.log(JSON.stringify({ slug, redirectUri, portAgnostic
|
|
45572
|
-
} else if (
|
|
45573
|
-
console.error(`FAIL ${slug}: redirect_uri_mismatch for ${redirectUri} \u2014
|
|
45585
|
+
console.log(JSON.stringify({ slug, redirectUri, portAgnostic, probes }));
|
|
45586
|
+
} else if (mismatches.length) {
|
|
45587
|
+
for (const probe of mismatches) console.error(`FAIL ${slug}: redirect_uri_mismatch for ${probe.redirectUri} \u2014 run /oauth-provision`);
|
|
45574
45588
|
} else {
|
|
45575
|
-
console.log(`PASS ${slug}: ${
|
|
45589
|
+
console.log(`PASS ${slug}: no redirect_uri_mismatch across ${probes.length} callbacks, including the arbitrary-port loopback`);
|
|
45576
45590
|
}
|
|
45577
|
-
if (
|
|
45591
|
+
if (mismatches.length) process.exitCode = 1;
|
|
45578
45592
|
});
|
|
45579
45593
|
registerCollaborationCommands(program2);
|
|
45580
45594
|
function ciAuditDeps2() {
|
package/package.json
CHANGED