@doccov/cli 0.28.1 → 0.28.2

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 +12 -3
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -1352,7 +1352,7 @@ function displayHealthTree(health, log) {
1352
1352
  const completenessLabel = missingTotal > 0 ? `${health.completeness.score}% (${missingTotal} missing docs)` : `${health.completeness.score}%`;
1353
1353
  const completenessColor = getHealthColor(getHealthStatus(health.completeness.score));
1354
1354
  log(`${tree.branch} ${colors.muted("completeness")} ${completenessColor(completenessLabel)}`);
1355
- const accuracyLabel = health.accuracy.issues > 0 ? `${health.accuracy.score}% (${health.accuracy.issues} drift issues${health.accuracy.fixable > 0 ? `, ${health.accuracy.fixable} fixable` : ""})` : `${health.accuracy.score}%`;
1355
+ const accuracyLabel = health.accuracy.fixable > 0 ? `${health.accuracy.score}% (${health.accuracy.fixable} fixable with --fix)` : `${health.accuracy.score}%`;
1356
1356
  const accuracyColor = getHealthColor(getHealthStatus(health.accuracy.score));
1357
1357
  const lastBranch = !health.examples ? tree.corner : tree.branch;
1358
1358
  log(`${lastBranch} ${colors.muted("accuracy")} ${accuracyColor(accuracyLabel)}`);
@@ -1401,6 +1401,7 @@ function displayTextOutput(options, deps) {
1401
1401
  warnBelowApiSurface,
1402
1402
  driftExports,
1403
1403
  typecheckErrors,
1404
+ runtimeErrors,
1404
1405
  staleRefs,
1405
1406
  specWarnings,
1406
1407
  specInfos,
@@ -1420,6 +1421,7 @@ function displayTextOutput(options, deps) {
1420
1421
  const apiSurfaceFailed = minApiSurface !== undefined && apiSurfaceScore < minApiSurface;
1421
1422
  const apiSurfaceWarn = warnBelowApiSurface !== undefined && apiSurfaceScore < warnBelowApiSurface && !apiSurfaceFailed;
1422
1423
  const hasTypecheckErrors = typecheckErrors.length > 0;
1424
+ const hasRuntimeErrors = runtimeErrors > 0;
1423
1425
  if (specWarnings.length > 0 || specInfos.length > 0) {
1424
1426
  log("");
1425
1427
  for (const diag of specWarnings) {
@@ -1514,7 +1516,7 @@ function displayTextOutput(options, deps) {
1514
1516
  }
1515
1517
  }
1516
1518
  log("");
1517
- const failed = healthFailed || apiSurfaceFailed || hasTypecheckErrors || hasStaleRefs;
1519
+ const failed = healthFailed || apiSurfaceFailed || hasTypecheckErrors || hasRuntimeErrors || hasStaleRefs;
1518
1520
  if (!failed) {
1519
1521
  const thresholdParts = [];
1520
1522
  thresholdParts.push(`health ${healthScore}% ≥ ${minHealth}%`);
@@ -1539,6 +1541,9 @@ function displayTextOutput(options, deps) {
1539
1541
  if (hasTypecheckErrors) {
1540
1542
  log(colors.error(`${sym.error} ${typecheckErrors.length} example type errors`));
1541
1543
  }
1544
+ if (hasRuntimeErrors) {
1545
+ log(colors.error(`${sym.error} ${runtimeErrors} example runtime errors`));
1546
+ }
1542
1547
  if (hasStaleRefs) {
1543
1548
  log(colors.error(`${sym.error} ${staleRefs.length} stale references in docs`));
1544
1549
  }
@@ -1556,6 +1561,7 @@ function handleNonTextOutput(options, deps) {
1556
1561
  minHealth,
1557
1562
  minApiSurface,
1558
1563
  typecheckErrors,
1564
+ runtimeErrors,
1559
1565
  limit,
1560
1566
  stdout,
1561
1567
  outputPath,
@@ -1592,7 +1598,8 @@ function handleNonTextOutput(options, deps) {
1592
1598
  const apiSurfaceScore = doccov.apiSurface?.completeness ?? 100;
1593
1599
  const apiSurfaceFailed = minApiSurface !== undefined && apiSurfaceScore < minApiSurface;
1594
1600
  const hasTypecheckErrors = typecheckErrors.length > 0;
1595
- return !(healthFailed || apiSurfaceFailed || hasTypecheckErrors);
1601
+ const hasRuntimeErrors = runtimeErrors > 0;
1602
+ return !(healthFailed || apiSurfaceFailed || hasTypecheckErrors || hasRuntimeErrors);
1596
1603
  }
1597
1604
  function displayApiSurfaceOutput(doccov, deps) {
1598
1605
  const { log } = deps;
@@ -1842,6 +1849,7 @@ function registerCheckCommand(program, dependencies = {}) {
1842
1849
  minHealth,
1843
1850
  minApiSurface,
1844
1851
  typecheckErrors,
1852
+ runtimeErrors: runtimeDrifts.length,
1845
1853
  limit: parseInt(options.limit, 10) || 20,
1846
1854
  stdout: options.stdout,
1847
1855
  outputPath: options.output,
@@ -1861,6 +1869,7 @@ function registerCheckCommand(program, dependencies = {}) {
1861
1869
  warnBelowApiSurface,
1862
1870
  driftExports,
1863
1871
  typecheckErrors,
1872
+ runtimeErrors: runtimeDrifts.length,
1864
1873
  staleRefs,
1865
1874
  specWarnings,
1866
1875
  specInfos,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doccov/cli",
3
- "version": "0.28.1",
3
+ "version": "0.28.2",
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.28.1",
51
+ "@doccov/sdk": "^0.28.2",
52
52
  "@doccov/spec": "^0.27.0",
53
53
  "@inquirer/prompts": "^7.8.0",
54
54
  "@openpkg-ts/spec": "^0.12.0",