@vibgrate/cli 1.0.87 → 1.0.89

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.
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  baselineCommand,
3
3
  runBaseline
4
- } from "./chunk-2VJCLUTR.js";
5
- import "./chunk-XCIPC2J7.js";
4
+ } from "./chunk-257KSYYQ.js";
5
+ import "./chunk-V6ML65PC.js";
6
6
  import "./chunk-JQHUH6A3.js";
7
7
  export {
8
8
  baselineCommand,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runScan
3
- } from "./chunk-XCIPC2J7.js";
3
+ } from "./chunk-V6ML65PC.js";
4
4
  import {
5
5
  writeJsonFile
6
6
  } from "./chunk-JQHUH6A3.js";
@@ -7241,6 +7241,7 @@ var ScanProgress = class {
7241
7241
  startTime = Date.now();
7242
7242
  isTTY;
7243
7243
  useLiveUpdates;
7244
+ output;
7244
7245
  rootDir = "";
7245
7246
  /** Last rendered frame content (strip to compare for dirty-checking) */
7246
7247
  lastFrame = "";
@@ -7257,13 +7258,14 @@ var ScanProgress = class {
7257
7258
  /** Last emitted step snapshot for append-only output modes */
7258
7259
  lastLoggedStates = /* @__PURE__ */ new Map();
7259
7260
  constructor(rootDir) {
7260
- this.isTTY = process.stderr.isTTY ?? false;
7261
+ this.output = process.stderr.isTTY ? process.stderr : process.stdout;
7262
+ this.isTTY = this.output.isTTY ?? false;
7261
7263
  this.useLiveUpdates = this.isTTY && process.env.VIBGRATE_PROGRESS_MODE !== "plain";
7262
7264
  this.rootDir = rootDir;
7263
7265
  if (this.isTTY) {
7264
7266
  const restore = () => {
7265
7267
  if (this.cursorHidden) {
7266
- process.stderr.write("\x1B[?25h");
7268
+ this.output.write("\x1B[?25h");
7267
7269
  this.cursorHidden = false;
7268
7270
  }
7269
7271
  };
@@ -7302,7 +7304,7 @@ var ScanProgress = class {
7302
7304
  ` ${ROBOT[3]} ${chalk4.dim(this.rootDir)}`,
7303
7305
  ""
7304
7306
  ].join("\n") + "\n";
7305
- process.stderr.write(header);
7307
+ this.output.write(header);
7306
7308
  if (this.useLiveUpdates) {
7307
7309
  this.startSpinner();
7308
7310
  }
@@ -7402,25 +7404,25 @@ var ScanProgress = class {
7402
7404
  buf += "\x1B[J";
7403
7405
  }
7404
7406
  buf += "\x1B[?25h";
7405
- if (buf) process.stderr.write(buf);
7407
+ if (buf) this.output.write(buf);
7406
7408
  this.cursorHidden = false;
7407
7409
  this.lastRowCount = 0;
7408
7410
  }
7409
7411
  const elapsed = this.formatElapsed(Date.now() - this.startTime);
7410
7412
  const doneCount = this.steps.filter((s) => s.status === "done").length;
7411
- process.stderr.write(
7413
+ this.output.write(
7412
7414
  chalk4.dim(` \u2714 ${doneCount} scanners completed in ${elapsed}
7413
7415
 
7414
7416
  `)
7415
7417
  );
7416
7418
  if (this.isTTY && process.platform === "win32") {
7417
- process.stdout.write("\x1B[0G\x1B[K");
7419
+ this.output.write("\x1B[0G\x1B[K");
7418
7420
  }
7419
7421
  }
7420
7422
  // ── Internal rendering ──
7421
7423
  startSpinner() {
7422
7424
  if (!this.cursorHidden) {
7423
- process.stderr.write("\x1B[?25l");
7425
+ this.output.write("\x1B[?25l");
7424
7426
  this.cursorHidden = true;
7425
7427
  }
7426
7428
  this.timer = setInterval(() => {
@@ -7436,10 +7438,6 @@ var ScanProgress = class {
7436
7438
  return;
7437
7439
  }
7438
7440
  const lines = [];
7439
- for (const step of this.steps) {
7440
- lines.push(this.renderStep(step));
7441
- }
7442
- lines.push("");
7443
7441
  const totalWeight = this.steps.reduce((sum, s) => sum + (s.weight ?? 1), 0);
7444
7442
  let completedWeight = 0;
7445
7443
  for (const step of this.steps) {
@@ -7469,6 +7467,10 @@ var ScanProgress = class {
7469
7467
  lines.push("");
7470
7468
  lines.push(this.renderStats());
7471
7469
  lines.push("");
7470
+ for (const step of this.steps) {
7471
+ lines.push(this.renderStep(step));
7472
+ }
7473
+ lines.push("");
7472
7474
  const content = lines.join("\n") + "\n";
7473
7475
  const rowCount = this.countRenderedRows(lines);
7474
7476
  if (content === this.lastFrame && this.lastRowCount === rowCount) {
@@ -7481,11 +7483,11 @@ var ScanProgress = class {
7481
7483
  buf += "\x1B[J";
7482
7484
  }
7483
7485
  buf += content;
7484
- process.stderr.write(buf);
7486
+ this.output.write(buf);
7485
7487
  this.lastRowCount = rowCount;
7486
7488
  }
7487
7489
  countRenderedRows(lines) {
7488
- const columns = Math.max(process.stderr.columns ?? 80, 20);
7490
+ const columns = Math.max(this.output.columns ?? 80, 20);
7489
7491
  return lines.reduce((total, line) => total + this.countWrappedRows(line, columns), 0);
7490
7492
  }
7491
7493
  countWrappedRows(line, columns) {
@@ -7582,19 +7584,19 @@ var ScanProgress = class {
7582
7584
  }
7583
7585
  this.lastLoggedStates.set(step.id, stateKey);
7584
7586
  if (step.status === "active") {
7585
- process.stderr.write(` \u25C9 ${step.label}...
7587
+ this.output.write(` \u25C9 ${step.label}...
7586
7588
  `);
7587
7589
  continue;
7588
7590
  }
7589
7591
  if (step.status === "done") {
7590
7592
  const detail = this.formatLoggedStepDetail(step);
7591
- process.stderr.write(` \u2714 ${step.label}${detail}
7593
+ this.output.write(` \u2714 ${step.label}${detail}
7592
7594
  `);
7593
7595
  continue;
7594
7596
  }
7595
7597
  if (step.status === "skipped") {
7596
7598
  const detail = step.detail ? ` \xB7 ${step.detail}` : "";
7597
- process.stderr.write(` \u25CC ${step.label}${detail}
7599
+ this.output.write(` \u25CC ${step.label}${detail}
7598
7600
  `);
7599
7601
  }
7600
7602
  }
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  baselineCommand
4
- } from "./chunk-2VJCLUTR.js";
4
+ } from "./chunk-257KSYYQ.js";
5
5
  import {
6
6
  VERSION,
7
7
  computeHmac,
@@ -12,7 +12,7 @@ import {
12
12
  pushCommand,
13
13
  scanCommand,
14
14
  writeDefaultConfig
15
- } from "./chunk-XCIPC2J7.js";
15
+ } from "./chunk-V6ML65PC.js";
16
16
  import {
17
17
  Semaphore,
18
18
  ensureDir,
@@ -42,7 +42,7 @@ var initCommand = new Command("init").description("Initialize vibgrate in a proj
42
42
  console.log(chalk.green("\u2714") + ` Created ${chalk.bold("vibgrate.config.ts")}`);
43
43
  }
44
44
  if (opts.baseline) {
45
- const { runBaseline } = await import("./baseline-QZZXBT74.js");
45
+ const { runBaseline } = await import("./baseline-BRTNOHRU.js");
46
46
  await runBaseline(rootDir);
47
47
  }
48
48
  console.log("");
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  formatText,
6
6
  generateFindings,
7
7
  runScan
8
- } from "./chunk-XCIPC2J7.js";
8
+ } from "./chunk-V6ML65PC.js";
9
9
  import "./chunk-JQHUH6A3.js";
10
10
  export {
11
11
  computeDriftScore,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibgrate/cli",
3
- "version": "1.0.87",
3
+ "version": "1.0.89",
4
4
  "description": "CLI for measuring upgrade drift across Node, .NET, Python & Java projects",
5
5
  "type": "module",
6
6
  "bin": {