truecourse 0.6.0-next.1 → 0.6.0-next.3

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.
Files changed (3) hide show
  1. package/cli.mjs +62 -24
  2. package/package.json +1 -1
  3. package/server.mjs +1 -1
package/cli.mjs CHANGED
@@ -128242,7 +128242,7 @@ function readToolVersion() {
128242
128242
  if (cachedVersion)
128243
128243
  return cachedVersion;
128244
128244
  if (true) {
128245
- cachedVersion = "0.6.0-next.1";
128245
+ cachedVersion = "0.6.0-next.3";
128246
128246
  return cachedVersion;
128247
128247
  }
128248
128248
  try {
@@ -149166,7 +149166,7 @@ async function runContractsGenerate(options = {}) {
149166
149166
  }
149167
149167
  stampGeneratedMarker(repoRoot5);
149168
149168
  if (result.write.written.length === 0) {
149169
- gt("Up to date \u2014 no contract files needed updating.");
149169
+ gt("Up to date \u2014 run `truecourse verify`.");
149170
149170
  return;
149171
149171
  }
149172
149172
  O2.success(`Wrote ${result.write.written.length} contract file${result.write.written.length === 1 ? "" : "s"}.`);
@@ -149197,7 +149197,7 @@ async function runContractsList(options = {}) {
149197
149197
  }
149198
149198
  mt(`Contracts (${files.length})`);
149199
149199
  for (const f2 of files) console.log(` ${path54.relative(repoRoot5, f2)}`);
149200
- gt("");
149200
+ gt("`truecourse contracts validate` then `truecourse verify`.");
149201
149201
  }
149202
149202
  async function runContractsValidate(options = {}) {
149203
149203
  const repoRoot5 = options.cwd ?? process.cwd();
@@ -149233,6 +149233,7 @@ async function runContractsValidate(options = {}) {
149233
149233
  }
149234
149234
  if (issues.length === 0) {
149235
149235
  O2.success(`Validated ${resolution.index.size} artifact${resolution.index.size === 1 ? "" : "s"} \u2014 no issues.`);
149236
+ gt("Run `truecourse verify`.");
149236
149237
  return;
149237
149238
  }
149238
149239
  O2.error(`${issues.length} issue${issues.length === 1 ? "" : "s"}:`);
@@ -149341,14 +149342,22 @@ async function runSpecScan(opts = {}) {
149341
149342
  O2.message("Open conflicts:");
149342
149343
  for (const c2 of merge2.openConflicts.slice(0, 10)) {
149343
149344
  O2.message(` \u2022 ${c2.subject} (${c2.candidates.length} candidates, default: ${c2.candidates[c2.defaultPick].claim.provenance.file})`);
149345
+ O2.message(` id: ${c2.id}`);
149344
149346
  }
149345
149347
  if (merge2.openConflicts.length > 10) {
149346
- O2.message(` \u2026 (+${merge2.openConflicts.length - 10} more)`);
149348
+ O2.message(` \u2026 (+${merge2.openConflicts.length - 10} more \u2014 run \`truecourse spec conflicts list\`)`);
149347
149349
  }
149348
149350
  O2.message("");
149349
- O2.message("Resolve in the dashboard, or run `truecourse spec resolve --all-defaults`.");
149351
+ O2.message("Resolve them:");
149352
+ O2.message(" \u2022 dashboard: truecourse dashboard (Spec tab)");
149353
+ O2.message(" \u2022 per conflict: truecourse spec conflicts show <id>");
149354
+ O2.message(" truecourse spec conflicts pick <id> <candidateIndex>");
149355
+ O2.message(' truecourse spec conflicts custom <id> --text "\u2026"');
149356
+ O2.message(" \u2022 accept defaults: truecourse spec resolve --all-defaults");
149350
149357
  }
149351
- gt(merge2.openConflicts.length === 0 ? "No open conflicts." : `${merge2.openConflicts.length} open.`);
149358
+ gt(
149359
+ merge2.openConflicts.length === 0 ? "No open conflicts \u2014 run `truecourse contracts generate`." : `${merge2.openConflicts.length} open.`
149360
+ );
149352
149361
  } catch (e) {
149353
149362
  renderer.dispose();
149354
149363
  pt(`Failed: ${e.message}`);
@@ -149399,7 +149408,9 @@ async function runSpecStatus(opts = {}) {
149399
149408
  O2.message("");
149400
149409
  summarizeConflicts("Open", merge2.openConflicts);
149401
149410
  }
149402
- gt(merge2.openConflicts.length === 0 ? "Up to date." : "Pending decisions.");
149411
+ gt(
149412
+ merge2.openConflicts.length === 0 ? "Up to date \u2014 run `truecourse contracts generate`." : "Pending decisions \u2014 see `truecourse spec conflicts list`."
149413
+ );
149403
149414
  } catch (e) {
149404
149415
  renderer.dispose();
149405
149416
  pt(`Failed: ${e.message}`);
@@ -149563,9 +149574,9 @@ async function runSpecConflictsList(opts = {}) {
149563
149574
  const list = opts.all ? [...open, ...decided.map((d3) => d3.conflict)] : opts.decided ? decided.map((d3) => d3.conflict) : open;
149564
149575
  O2.step(`${list.length} ${which} conflicts`);
149565
149576
  for (const c2 of list) {
149566
- O2.message(` \u2022 ${c2.id.slice(0, 12)}\u2026 [${c2.topic}] ${c2.subject} (${c2.candidates.length} candidates)`);
149577
+ O2.message(` \u2022 ${c2.id} [${c2.topic}] ${c2.subject} (${c2.candidates.length} candidates)`);
149567
149578
  }
149568
- gt("Use `truecourse spec conflicts show <id>` for full detail.");
149579
+ gt('`show <id>` for detail \xB7 resolve with `pick <id> <n>` or `custom <id> --text "\u2026"`.');
149569
149580
  }
149570
149581
  async function runSpecConflictsShow(conflictId2, opts = {}) {
149571
149582
  const root = repoRoot2(opts);
@@ -149575,7 +149586,7 @@ async function runSpecConflictsShow(conflictId2, opts = {}) {
149575
149586
  pt(`Conflict ${conflictId2} not found.`);
149576
149587
  process.exit(1);
149577
149588
  }
149578
- mt(`Conflict ${conflict.id.slice(0, 12)}\u2026 \u2014 ${conflict.subject}`);
149589
+ mt(`Conflict ${conflict.id} \u2014 ${conflict.subject}`);
149579
149590
  O2.step(`topic: ${conflict.topic}`);
149580
149591
  if (conflict.explanation) O2.message(conflict.explanation);
149581
149592
  O2.step(`${conflict.candidates.length} candidates (default-pick: ${conflict.defaultPick})`);
@@ -149599,7 +149610,10 @@ async function runSpecConflictsShow(conflictId2, opts = {}) {
149599
149610
  if (diffs.length > 12) O2.message(` \u2026 and ${diffs.length - 12} more`);
149600
149611
  }
149601
149612
  }
149602
- gt("");
149613
+ if (!opts.diff) O2.message("add --diff to see field-level differences.");
149614
+ gt(
149615
+ `resolve: truecourse spec conflicts pick ${conflict.id} <n> \xB7 custom ${conflict.id} --text "\u2026"`
149616
+ );
149603
149617
  }
149604
149618
  async function runSpecConflictsPick(conflictId2, candidateIndex, opts = {}) {
149605
149619
  const root = repoRoot2(opts);
@@ -149618,7 +149632,10 @@ async function runSpecConflictsPick(conflictId2, candidateIndex, opts = {}) {
149618
149632
  note: opts.note
149619
149633
  });
149620
149634
  await refreshScan(root);
149621
- emitOk(`Picked candidate ${candidateIndex} on ${conflictId2.slice(0, 12)}\u2026`);
149635
+ emitOk(
149636
+ `Picked candidate ${candidateIndex} on ${conflictId2.slice(0, 12)}\u2026`,
149637
+ "next: resolve remaining (`truecourse spec conflicts list`) or `truecourse contracts generate`."
149638
+ );
149622
149639
  }
149623
149640
  async function runSpecConflictsCustom(conflictId2, text, opts = {}) {
149624
149641
  const root = repoRoot2(opts);
@@ -149634,13 +149651,19 @@ async function runSpecConflictsCustom(conflictId2, text, opts = {}) {
149634
149651
  candidateFingerprint: candidateFingerprint(conflict)
149635
149652
  });
149636
149653
  await refreshScan(root);
149637
- emitOk(`Wrote custom answer for ${conflictId2.slice(0, 12)}\u2026`);
149654
+ emitOk(
149655
+ `Wrote custom answer for ${conflictId2.slice(0, 12)}\u2026`,
149656
+ "next: resolve remaining (`truecourse spec conflicts list`) or `truecourse contracts generate`."
149657
+ );
149638
149658
  }
149639
149659
  async function runSpecConflictsRevoke(conflictId2, opts = {}) {
149640
149660
  const root = repoRoot2(opts);
149641
149661
  revokeDecision(root, conflictId2);
149642
149662
  await refreshScan(root);
149643
- emitOk(`Revoked decision for ${conflictId2.slice(0, 12)}\u2026`);
149663
+ emitOk(
149664
+ `Revoked decision for ${conflictId2.slice(0, 12)}\u2026`,
149665
+ `re-resolve: truecourse spec conflicts pick ${conflictId2} <n> \xB7 custom ${conflictId2} --text "\u2026"`
149666
+ );
149644
149667
  }
149645
149668
  function serializeConflict(c2) {
149646
149669
  return {
@@ -149651,7 +149674,8 @@ function serializeConflict(c2) {
149651
149674
  async function refreshScan(root) {
149652
149675
  await scanInProcess(root, {});
149653
149676
  }
149654
- function emitOk(msg) {
149677
+ function emitOk(msg, hint) {
149678
+ if (hint) O2.message(hint);
149655
149679
  gt(msg);
149656
149680
  }
149657
149681
  function fail(msg) {
@@ -149733,22 +149757,29 @@ async function runSpecChainsList(opts = {}) {
149733
149757
  for (const c2 of manual) {
149734
149758
  O2.message(` ${c2.older} \u2192 ${c2.newer} ${c2.note ? `\xB7 ${c2.note}` : ""}`);
149735
149759
  }
149736
- gt("");
149760
+ gt("manage with `truecourse spec chains add/remove`.");
149737
149761
  }
149738
149762
  async function runSpecChainsAdd(opts) {
149739
149763
  const root = repoRoot3(opts);
149740
149764
  if (opts.older === opts.newer) return fail2("older and newer must be different docs");
149741
149765
  addManualChain(root, { older: opts.older, newer: opts.newer, note: opts.note });
149742
149766
  await scanInProcess(root, {});
149743
- emitOk2(`Marked ${opts.older} as superseded by ${opts.newer}`);
149767
+ emitOk2(
149768
+ `Marked ${opts.older} as superseded by ${opts.newer}`,
149769
+ "re-run `truecourse spec scan` to apply."
149770
+ );
149744
149771
  }
149745
149772
  async function runSpecChainsRemove(opts) {
149746
149773
  const root = repoRoot3(opts);
149747
149774
  removeManualChain(root, { older: opts.older, newer: opts.newer });
149748
149775
  await scanInProcess(root, {});
149749
- emitOk2(`Removed chain ${opts.older} \u2192 ${opts.newer}`);
149776
+ emitOk2(
149777
+ `Removed chain ${opts.older} \u2192 ${opts.newer}`,
149778
+ "re-run `truecourse spec scan` to apply."
149779
+ );
149750
149780
  }
149751
- function emitOk2(msg) {
149781
+ function emitOk2(msg, hint) {
149782
+ if (hint) O2.message(hint);
149752
149783
  gt(msg);
149753
149784
  }
149754
149785
  function fail2(msg) {
@@ -149776,23 +149807,30 @@ async function runSpecDocsSkipped(opts = {}) {
149776
149807
  O2.step(`Manual includes (${manualIncludes.length})`);
149777
149808
  for (const inc of manualIncludes) O2.message(` ${inc}`);
149778
149809
  }
149779
- gt("");
149810
+ gt("force-include with `truecourse spec docs include <path>`.");
149780
149811
  }
149781
149812
  async function runSpecDocsInclude(docPath, opts = {}) {
149782
149813
  const root = repoRoot4(opts);
149783
149814
  if (!docPath) return fail3("Missing doc path");
149784
149815
  addManualInclude(root, docPath);
149785
149816
  await scanInProcess(root, {});
149786
- emitOk3(`Force-include ${docPath}`);
149817
+ emitOk3(
149818
+ `Force-include ${docPath}`,
149819
+ "re-scanned \u2014 review `truecourse spec conflicts list`."
149820
+ );
149787
149821
  }
149788
149822
  async function runSpecDocsUninclude(docPath, opts = {}) {
149789
149823
  const root = repoRoot4(opts);
149790
149824
  if (!docPath) return fail3("Missing doc path");
149791
149825
  removeManualInclude(root, docPath);
149792
149826
  await scanInProcess(root, {});
149793
- emitOk3(`Removed force-include for ${docPath}`);
149827
+ emitOk3(
149828
+ `Removed force-include for ${docPath}`,
149829
+ "re-scanned \u2014 review `truecourse spec conflicts list`."
149830
+ );
149794
149831
  }
149795
- function emitOk3(msg) {
149832
+ function emitOk3(msg, hint) {
149833
+ if (hint) O2.message(hint);
149796
149834
  gt(msg);
149797
149835
  }
149798
149836
  function fail3(msg) {
@@ -152745,7 +152783,7 @@ async function runHooksRun() {
152745
152783
 
152746
152784
  // tools/cli/src/index.ts
152747
152785
  var program2 = new Command();
152748
- program2.name("truecourse").version("0.6.0-next.1").description("TrueCourse CLI \u2014 analyze your repository and open the dashboard");
152786
+ program2.name("truecourse").version("0.6.0-next.3").description("TrueCourse CLI \u2014 analyze your repository and open the dashboard");
152749
152787
  var dashboardCmd = program2.command("dashboard").description("Start the TrueCourse dashboard and open it in your browser").option("--reconfigure", "Re-prompt for console vs background service mode").option("--service", "Run as a background service (skips mode prompt)").option("--console", "Run in this terminal (skips mode prompt)").action(async (options) => {
152750
152788
  if (options.service && options.console) {
152751
152789
  console.error("error: --service and --console are mutually exclusive");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "truecourse",
3
- "version": "0.6.0-next.1",
3
+ "version": "0.6.0-next.3",
4
4
  "description": "Visualize your codebase architecture as an interactive graph",
5
5
  "type": "module",
6
6
  "bin": {
package/server.mjs CHANGED
@@ -156920,7 +156920,7 @@ function readToolVersion() {
156920
156920
  if (cachedVersion)
156921
156921
  return cachedVersion;
156922
156922
  if (true) {
156923
- cachedVersion = "0.6.0-next.1";
156923
+ cachedVersion = "0.6.0-next.3";
156924
156924
  return cachedVersion;
156925
156925
  }
156926
156926
  try {