@inixiative/config 0.5.7 → 0.5.9
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/README.md +2 -2
- package/dist/cli.js +28 -1
- package/package.json +1 -1
- package/versions.json +3 -3
package/README.md
CHANGED
|
@@ -60,9 +60,9 @@ bunx @inixiative/config train [root]
|
|
|
60
60
|
|
|
61
61
|
`sync` applies every fix, re-locks via `bun install`, and runs `bun update` on stale ecosystem entries. It refuses to run on a dirty working tree without `--force`. The react preset is inferred from a `react` dependency; override with `--preset`. Missing scripts are filled with defaults; existing script bodies are never touched.
|
|
62
62
|
|
|
63
|
-
`scan` runs `check` across every ecosystem checkout under a root directory. Targets are derived from the BOM's `ecosystem` keys and matched by package name, so directory names and local layout never need declaring. Origin is the truth, not the checkout: scan fetches per repo and fails on checkouts behind origin (their findings describe a stale tree), fails when a BOM entry has no checkout at all, and surfaces unmerged `claude/*` session branches.
|
|
63
|
+
`scan` runs `check` across every ecosystem checkout under a root directory. Targets are derived from the BOM's `ecosystem` keys and matched by package name, so directory names and local layout never need declaring. Origin is the truth, not the checkout: scan fetches per repo and fails on checkouts behind origin (their findings describe a stale tree), fails when a BOM entry has no checkout at all, warns when a checkout sits on a non-default branch (its findings describe the branch, not what ships), and surfaces unmerged `claude/*` session branches.
|
|
64
64
|
|
|
65
|
-
`train` is the release cascade, run from this repo's checkout. Origin is the truth: it refuses to run from a config checkout behind origin or with any BOM repo missing a checkout, and it fast-forwards clean checkouts to origin before working (dirty or diverged repos still skip). It walks the ecosystem in dependency order; per repo it: bumps ecosystem ranges to the BOM → re-locks → runs the repo's `check` → commits only its own changes (`package.json` + `bun.lock`) → publishes via `npm publish` when the local version is ahead of npm (OTP prompts pass through) → records the published version in the BOM. It never pushes; review its commits, push, then commit and publish this package so the BOM names the new state.
|
|
65
|
+
`train` is the release cascade, run from this repo's checkout. Origin is the truth: it refuses to run from a config checkout behind origin or with any BOM repo missing a checkout, and it fast-forwards clean checkouts to origin before working (dirty or diverged repos still skip). It only ships the default branch: a checkout on a feature branch is skipped whole — never re-locked, committed to, or published from. It walks the ecosystem in dependency order; per repo it: bumps ecosystem ranges to the BOM → re-locks → runs the repo's `check` → commits only its own changes (`package.json` + `bun.lock`) → publishes via `npm publish` when the local version is ahead of npm (OTP prompts pass through) → records the published version in the BOM. It never pushes; review its commits, push, then commit and publish this package so the BOM names the new state.
|
|
66
66
|
|
|
67
67
|
Division of labor: this CLI owns the toolchain set, ecosystem coherence, stubs, and lockfile format. Renovate owns everything else plus bumping `@inixiative/config` itself, and must be fenced off the toolchain packages.
|
|
68
68
|
|
package/dist/cli.js
CHANGED
|
@@ -544,6 +544,14 @@ var unmergedSessionBranches = (cwd) => {
|
|
|
544
544
|
if (branches.status !== 0) return [];
|
|
545
545
|
return branches.stdout.split("\n").map((line) => line.trim()).filter(Boolean);
|
|
546
546
|
};
|
|
547
|
+
var offDefaultBranch = (cwd) => {
|
|
548
|
+
const branch = git(cwd, "rev-parse", "--abbrev-ref", "HEAD");
|
|
549
|
+
if (branch.status !== 0) return null;
|
|
550
|
+
const head = git(cwd, "symbolic-ref", "--short", "refs/remotes/origin/HEAD");
|
|
551
|
+
const main = head.status === 0 ? head.stdout.trim().replace(/^origin\//, "") : "main";
|
|
552
|
+
const current = branch.stdout.trim();
|
|
553
|
+
return current === main ? null : { branch: current, main };
|
|
554
|
+
};
|
|
547
555
|
if (command === "check") {
|
|
548
556
|
const { findings } = inspect(dir, manifest, presetFlag);
|
|
549
557
|
process.exit(report(findings) > 0 ? 1 : 0);
|
|
@@ -559,7 +567,18 @@ if (command === "scan") {
|
|
|
559
567
|
for (const repo of repos) {
|
|
560
568
|
console.log(`
|
|
561
569
|
${repo.name} \u2014 ${repo.dir}`);
|
|
562
|
-
const
|
|
570
|
+
const off = offDefaultBranch(repo.dir);
|
|
571
|
+
const branchFindings = off ? [
|
|
572
|
+
{
|
|
573
|
+
level: "warn",
|
|
574
|
+
message: `checkout is on ${off.branch}, not ${off.main} \u2014 findings reflect the branch, not what ships`
|
|
575
|
+
}
|
|
576
|
+
] : [];
|
|
577
|
+
const findings = [
|
|
578
|
+
...branchFindings,
|
|
579
|
+
...staleCheckoutFindings(repo.dir),
|
|
580
|
+
...inspect(repo.dir, manifest).findings
|
|
581
|
+
];
|
|
563
582
|
if (report(findings) > 0) drifted.push(repo.name);
|
|
564
583
|
for (const branch of unmergedSessionBranches(repo.dir)) {
|
|
565
584
|
console.log(`\u26A0 unmerged session branch: ${branch}`);
|
|
@@ -607,6 +626,14 @@ if (command === "train") {
|
|
|
607
626
|
skipped.push(repo.name);
|
|
608
627
|
continue;
|
|
609
628
|
}
|
|
629
|
+
const off = offDefaultBranch(repo.dir);
|
|
630
|
+
if (off) {
|
|
631
|
+
console.log(
|
|
632
|
+
`\u26A0 on ${off.branch}, not ${off.main} \u2014 the train only ships the default branch, skipping`
|
|
633
|
+
);
|
|
634
|
+
skipped.push(repo.name);
|
|
635
|
+
continue;
|
|
636
|
+
}
|
|
610
637
|
if (porcelain.stdout.trim().length > 0) {
|
|
611
638
|
console.log("\u26A0 dirty working tree \u2014 commit or stash your work first, skipping");
|
|
612
639
|
skipped.push(repo.name);
|
package/package.json
CHANGED
package/versions.json
CHANGED
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"@types/bun"
|
|
14
14
|
],
|
|
15
15
|
"ecosystem": {
|
|
16
|
-
"@inixiative/config": "0.5.
|
|
17
|
-
"@inixiative/json-rules": "2.
|
|
16
|
+
"@inixiative/config": "0.5.9",
|
|
17
|
+
"@inixiative/json-rules": "2.18.0",
|
|
18
18
|
"@inixiative/permissions": "0.3.2",
|
|
19
19
|
"@inixiative/transitions": "0.1.0",
|
|
20
|
-
"@inixiative/rules-builder": "0.
|
|
20
|
+
"@inixiative/rules-builder": "0.20.0",
|
|
21
21
|
"@inixiative/prisma-map": "0.1.0",
|
|
22
22
|
"@inixiative/atlas": "0.1.1"
|
|
23
23
|
}
|