truecourse 0.6.0-next.3 → 0.6.0-next.5

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 +19 -7
  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.3";
128245
+ cachedVersion = "0.6.0-next.5";
128246
128246
  return cachedVersion;
128247
128247
  }
128248
128248
  try {
@@ -149105,12 +149105,16 @@ async function runContractsGenerate(options = {}) {
149105
149105
  const extractModel = resolveModel("contract.extract", void 0, repoRoot5);
149106
149106
  const repairModel = resolveModel("contract.repair", void 0, repoRoot5);
149107
149107
  const fallbackModel = resolveFallbackModel(repoRoot5) ?? void 0;
149108
+ let totalSlices = 0;
149109
+ let doneSlices = 0;
149108
149110
  const runner = spawnRunner2({
149109
149111
  concurrency,
149110
149112
  model: extractModel,
149111
149113
  fallbackModel,
149112
- onSliceStart: (s) => {
149113
- O2.step(`extracting ${s.specPath} :: ${s.headingPath.join(" \u2192 ")}`);
149114
+ onSliceDone: (s, ok) => {
149115
+ O2.step(
149116
+ `extracted ${++doneSlices}/${totalSlices} ${s.specPath} :: ${s.headingPath.join(" \u2192 ")}${ok ? "" : " (failed)"}`
149117
+ );
149114
149118
  }
149115
149119
  });
149116
149120
  let result;
@@ -149120,8 +149124,11 @@ async function runContractsGenerate(options = {}) {
149120
149124
  runner,
149121
149125
  models: { extract: extractModel, repair: repairModel, fallback: fallbackModel },
149122
149126
  dryRun: !!options.diff,
149127
+ onSlicesReady: (t2) => {
149128
+ totalSlices = t2;
149129
+ },
149123
149130
  onSliceCacheHit: (s) => {
149124
- O2.message(` cache hit ${s.specPath} :: ${s.headingPath.join(" \u2192 ")}`, { symbol: "\xB7" });
149131
+ O2.message(` cache hit ${++doneSlices}/${totalSlices} ${s.specPath} :: ${s.headingPath.join(" \u2192 ")}`, { symbol: "\xB7" });
149125
149132
  }
149126
149133
  });
149127
149134
  } catch (e) {
@@ -149154,13 +149161,18 @@ async function runContractsGenerate(options = {}) {
149154
149161
  for (const d3 of result.mergeDiagnostics) {
149155
149162
  O2.warn(d3.message);
149156
149163
  }
149164
+ const LIST_CAP = 20;
149165
+ const printFileList = (files, marker) => {
149166
+ for (const f2 of files.slice(0, LIST_CAP)) console.log(` ${marker} ${path54.relative(repoRoot5, f2)}`);
149167
+ if (files.length > LIST_CAP) console.log(` \u2026 and ${files.length - LIST_CAP} more`);
149168
+ };
149157
149169
  if (options.diff) {
149158
149170
  if (result.write.proposed.length === 0) {
149159
149171
  gt("No changes \u2014 every contract is already up to date.");
149160
149172
  return;
149161
149173
  }
149162
149174
  O2.info(`Would write ${result.write.proposed.length} file${result.write.proposed.length === 1 ? "" : "s"}:`);
149163
- for (const f2 of result.write.proposed) console.log(` + ${path54.relative(repoRoot5, f2)}`);
149175
+ printFileList(result.write.proposed, "+");
149164
149176
  gt("Run `truecourse contracts generate` to apply.");
149165
149177
  return;
149166
149178
  }
@@ -149170,7 +149182,7 @@ async function runContractsGenerate(options = {}) {
149170
149182
  return;
149171
149183
  }
149172
149184
  O2.success(`Wrote ${result.write.written.length} contract file${result.write.written.length === 1 ? "" : "s"}.`);
149173
- for (const f2 of result.write.written) console.log(` \u2022 ${path54.relative(repoRoot5, f2)}`);
149185
+ printFileList(result.write.written, "\u2022");
149174
149186
  syncShippedTcSyntax();
149175
149187
  gt(`Run \`truecourse verify\` to check code against the new contracts.`);
149176
149188
  }
@@ -152783,7 +152795,7 @@ async function runHooksRun() {
152783
152795
 
152784
152796
  // tools/cli/src/index.ts
152785
152797
  var program2 = new Command();
152786
- program2.name("truecourse").version("0.6.0-next.3").description("TrueCourse CLI \u2014 analyze your repository and open the dashboard");
152798
+ program2.name("truecourse").version("0.6.0-next.5").description("TrueCourse CLI \u2014 analyze your repository and open the dashboard");
152787
152799
  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) => {
152788
152800
  if (options.service && options.console) {
152789
152801
  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.3",
3
+ "version": "0.6.0-next.5",
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.3";
156923
+ cachedVersion = "0.6.0-next.5";
156924
156924
  return cachedVersion;
156925
156925
  }
156926
156926
  try {