@doccov/cli 0.25.9 → 0.25.11

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 (2) hide show
  1. package/dist/cli.js +10 -9
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -154,6 +154,7 @@ import { Command } from "commander";
154
154
  // ../cli-utils/dist/index.js
155
155
  import chalk from "chalk";
156
156
  import chalk2 from "chalk";
157
+ import { Worker } from "node:worker_threads";
157
158
  var colors = {
158
159
  success: chalk.green,
159
160
  error: chalk.red,
@@ -312,8 +313,8 @@ class MultiProgress {
312
313
  hideCursor();
313
314
  this.setupSignalHandler();
314
315
  this.timer = setInterval(() => {
315
- this.spinnerIndex = (this.spinnerIndex + 1) % this.spinnerFrames.length;
316
316
  if (this.bars.size > 0 && [...this.bars.values()].some((b) => b.status === "active")) {
317
+ this.spinnerIndex = (this.spinnerIndex + 1) % this.spinnerFrames.length;
317
318
  this.render();
318
319
  }
319
320
  }, this.options.spinnerInterval);
@@ -686,11 +687,13 @@ class Spinner {
686
687
  symbols = getSymbols(supportsUnicode());
687
688
  lastRenderedLines = 0;
688
689
  sigintHandler = null;
690
+ animate;
689
691
  constructor(options = {}) {
690
692
  this.label = options.label ?? "";
691
693
  this.detail = options.detail;
692
694
  this.interval = options.interval ?? 80;
693
695
  this.colorFn = spinnerColors[options.color ?? "cyan"];
696
+ this.animate = options.animate ?? true;
694
697
  const style = options.style ?? "circle";
695
698
  this.frames = supportsUnicode() ? FRAME_SETS[style] : ASCII_FRAME_SET;
696
699
  }
@@ -702,7 +705,7 @@ class Spinner {
702
705
  this.state = "spinning";
703
706
  this.frameIndex = 0;
704
707
  this.lastRenderedLines = 0;
705
- if (!isInteractive()) {
708
+ if (!isInteractive() || !this.animate) {
706
709
  console.log(`${this.symbols.bullet} ${this.label}`);
707
710
  return this;
708
711
  }
@@ -760,14 +763,12 @@ class Spinner {
760
763
  this.timer = null;
761
764
  }
762
765
  this.state = state;
763
- if (!isInteractive()) {
764
- const symbol = state === "success" ? this.symbols.success : this.symbols.error;
765
- const colorFn = state === "success" ? colors.success : colors.error;
766
+ const symbol = state === "success" ? this.symbols.success : this.symbols.error;
767
+ const colorFn = state === "success" ? colors.success : colors.error;
768
+ if (!isInteractive() || !this.animate) {
766
769
  console.log(`${colorFn(symbol)} ${this.label}`);
767
770
  } else {
768
771
  this.clearOutput();
769
- const symbol = state === "success" ? this.symbols.success : this.symbols.error;
770
- const colorFn = state === "success" ? colors.success : colors.error;
771
772
  process.stdout.write(`${colorFn(symbol)} ${this.label}
772
773
  `);
773
774
  }
@@ -843,8 +844,8 @@ class StepProgress {
843
844
  this.setupSignalHandler();
844
845
  this.render();
845
846
  this.timer = setInterval(() => {
846
- this.spinnerIndex = (this.spinnerIndex + 1) % this.spinnerFrames.length;
847
847
  if (this.steps.some((s) => s.status === "active")) {
848
+ this.spinnerIndex = (this.spinnerIndex + 1) % this.spinnerFrames.length;
848
849
  this.render();
849
850
  }
850
851
  }, this.spinnerInterval);
@@ -3314,7 +3315,7 @@ import { validateDocCovSpec } from "@doccov/spec";
3314
3315
  import { normalize, validateSpec } from "@openpkg-ts/spec";
3315
3316
  import chalk11 from "chalk";
3316
3317
  // package.json
3317
- var version = "0.25.8";
3318
+ var version = "0.25.9";
3318
3319
 
3319
3320
  // src/commands/spec.ts
3320
3321
  var defaultDependencies4 = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doccov/cli",
3
- "version": "0.25.9",
3
+ "version": "0.25.11",
4
4
  "description": "DocCov CLI - Documentation coverage and drift detection for TypeScript",
5
5
  "keywords": [
6
6
  "typescript",
@@ -48,7 +48,7 @@
48
48
  "dependencies": {
49
49
  "@ai-sdk/anthropic": "^1.0.0",
50
50
  "@ai-sdk/openai": "^1.0.0",
51
- "@doccov/sdk": "^0.25.9",
51
+ "@doccov/sdk": "^0.25.11",
52
52
  "@doccov/spec": "^0.24.1",
53
53
  "@inquirer/prompts": "^7.8.0",
54
54
  "@openpkg-ts/spec": "^0.12.0",