@mutmutco/cli 2.48.0 → 2.48.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 +16 -1
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -32,6 +32,7 @@ var index_exports = {};
|
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
awsCallerArn: () => awsCallerArn,
|
|
34
34
|
gcPlan: () => gcPlan,
|
|
35
|
+
isOrgRegisteredRepo: () => isOrgRegisteredRepo,
|
|
35
36
|
registryClientDeps: () => registryClientDeps,
|
|
36
37
|
repoSlug: () => repoSlug
|
|
37
38
|
});
|
|
@@ -18490,6 +18491,13 @@ async function repoSlug() {
|
|
|
18490
18491
|
function registryClientDeps(cfg) {
|
|
18491
18492
|
return { baseUrl: cfg.sagaApiUrl, token: () => hubAuthToken({ baseUrl: cfg.sagaApiUrl, githubToken }) };
|
|
18492
18493
|
}
|
|
18494
|
+
async function isOrgRegisteredRepo(cfg, deps = {}) {
|
|
18495
|
+
const slug = await (deps.slug ?? repoSlug)();
|
|
18496
|
+
if (!slug || slug === "-") return false;
|
|
18497
|
+
const read = await (deps.read ?? fetchProjectBySlugChecked)(slug, registryClientDeps(cfg));
|
|
18498
|
+
if (!read.ok) return false;
|
|
18499
|
+
return read.project !== null;
|
|
18500
|
+
}
|
|
18493
18501
|
async function ghPrs(limit) {
|
|
18494
18502
|
const args = (state) => ["pr", "list", "--state", state, "--limit", String(limit), "--json", "number,headRefName,headRefOid,state"];
|
|
18495
18503
|
const [open, closed] = await Promise.all([
|
|
@@ -19683,6 +19691,10 @@ async function runRulesSync(opts, io = consoleIo) {
|
|
|
19683
19691
|
if (!opts.quiet) io.log('mmi-cli rules: source repo (orgRulesSource: "self") \u2014 skipping self-sync');
|
|
19684
19692
|
return true;
|
|
19685
19693
|
}
|
|
19694
|
+
if (!await isOrgRegisteredRepo(cfg)) {
|
|
19695
|
+
if (!opts.quiet) io.log("mmi-cli rules: not an org repo \u2014 skipping spine delivery");
|
|
19696
|
+
return true;
|
|
19697
|
+
}
|
|
19686
19698
|
const base = resolveRulesBase(cfg.orgRulesSource, DEFAULT_RULES_SOURCE);
|
|
19687
19699
|
const token = await githubToken();
|
|
19688
19700
|
let changed = 0;
|
|
@@ -22410,7 +22422,9 @@ program2.command("session-start").description("run the SessionStart verbs (rules
|
|
|
22410
22422
|
scheduleRefresh: () => spawnDetachedSelf(["board", "slice-refresh", "--quiet"], { spawn: import_node_child_process13.spawn, execPath: process.execPath, scriptPath: process.argv[1] })
|
|
22411
22423
|
}),
|
|
22412
22424
|
spineReconcile: async (io) => {
|
|
22413
|
-
const
|
|
22425
|
+
const cfg = await loadConfig();
|
|
22426
|
+
const isSource = isRulesSource(cfg.orgRulesSource);
|
|
22427
|
+
if (!isSource && !await isOrgRegisteredRepo(cfg)) return;
|
|
22414
22428
|
const restored = await restoreDirtyOrgSpineToHead(
|
|
22415
22429
|
{ run: async (cmd, args) => (await execFileP2(cmd, args, { timeout: GIT_TIMEOUT_MS })).stdout },
|
|
22416
22430
|
{ isRulesSource: isSource }
|
|
@@ -22439,6 +22453,7 @@ program2.parseAsync().catch((e) => failGraceful(e.message));
|
|
|
22439
22453
|
0 && (module.exports = {
|
|
22440
22454
|
awsCallerArn,
|
|
22441
22455
|
gcPlan,
|
|
22456
|
+
isOrgRegisteredRepo,
|
|
22442
22457
|
registryClientDeps,
|
|
22443
22458
|
repoSlug
|
|
22444
22459
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mutmutco/cli",
|
|
3
|
-
"version": "2.48.
|
|
3
|
+
"version": "2.48.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",
|