@doccov/cli 0.34.0 → 0.34.1

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/drift.js +47 -22
  2. package/package.json +1 -1
package/dist/drift.js CHANGED
@@ -175568,6 +175568,9 @@ function renderBatchCoverage(data) {
175568
175568
  }
175569
175569
  lines.push("");
175570
175570
  lines.push(indent(`${c.bold("Total")}: ${data.aggregate.score}% (${data.aggregate.documented}/${data.aggregate.total})`));
175571
+ if (data.skipped && data.skipped.length > 0) {
175572
+ lines.push(indent(`${c.gray(`Skipped ${data.skipped.length} private: ${data.skipped.join(", ")}`)}`));
175573
+ }
175571
175574
  lines.push("");
175572
175575
  return lines.join(`
175573
175576
  `);
@@ -175583,6 +175586,9 @@ function renderBatchLint(data) {
175583
175586
  }
175584
175587
  lines.push("");
175585
175588
  lines.push(indent(`${c.bold("Total")}: ${data.aggregate.count} issue${data.aggregate.count === 1 ? "" : "s"}`));
175589
+ if (data.skipped && data.skipped.length > 0) {
175590
+ lines.push(indent(`${c.gray(`Skipped ${data.skipped.length} private: ${data.skipped.join(", ")}`)}`));
175591
+ }
175586
175592
  lines.push("");
175587
175593
  return lines.join(`
175588
175594
  `);
@@ -175937,10 +175943,14 @@ function registerHealthCommand(program) {
175937
175943
  const version = getVersion();
175938
175944
  try {
175939
175945
  if (options.all) {
175940
- let packages = discoverPackages(process.cwd());
175941
- if (packages && !options.private)
175942
- packages = filterPublic(packages);
175943
- if (!packages || packages.length === 0) {
175946
+ const allPackages = discoverPackages(process.cwd());
175947
+ if (!allPackages || allPackages.length === 0) {
175948
+ formatError("health", "No workspace packages found", startTime, version);
175949
+ return;
175950
+ }
175951
+ const skipped = options.private ? [] : allPackages.filter((p) => p.private).map((p) => p.name);
175952
+ const packages = options.private ? allPackages : filterPublic(allPackages);
175953
+ if (packages.length === 0) {
175944
175954
  formatError("health", "No workspace packages found", startTime, version);
175945
175955
  return;
175946
175956
  }
@@ -175961,7 +175971,7 @@ function registerHealthCommand(program) {
175961
175971
  totalAll += exps.length;
175962
175972
  }
175963
175973
  const aggScore = totalAll > 0 ? Math.round(totalDoc / totalAll * 100) : 100;
175964
- const data2 = { packages: rows, aggregate: { score: aggScore, documented: totalDoc, total: totalAll } };
175974
+ const data2 = { packages: rows, aggregate: { score: aggScore, documented: totalDoc, total: totalAll }, ...skipped.length > 0 ? { skipped } : {} };
175965
175975
  formatOutput("health", data2, startTime, version, renderBatchCoverage);
175966
175976
  return;
175967
175977
  }
@@ -176620,6 +176630,7 @@ function registerCiCommand(program) {
176620
176630
  packageDirs = allDirs;
176621
176631
  const minThreshold = config.coverage?.min ?? 0;
176622
176632
  const results = [];
176633
+ const skipped = [];
176623
176634
  const commit = gh.sha?.slice(0, 7) ?? getCommitSha();
176624
176635
  for (const dir of packageDirs) {
176625
176636
  const absDir = dir === "." ? cwd : path23.join(cwd, dir);
@@ -176637,8 +176648,10 @@ function registerCiCommand(program) {
176637
176648
  isPrivate = true;
176638
176649
  } catch {}
176639
176650
  }
176640
- if (isPrivate && !options.private)
176651
+ if (isPrivate && !options.private) {
176652
+ skipped.push(name);
176641
176653
  continue;
176654
+ }
176642
176655
  try {
176643
176656
  const entryFile = detectEntry(absDir);
176644
176657
  const { spec } = await cachedExtract(entryFile);
@@ -176698,7 +176711,7 @@ function registerCiCommand(program) {
176698
176711
  } catch {}
176699
176712
  }
176700
176713
  }
176701
- const data = { results, pass: allPass, min: minThreshold };
176714
+ const data = { results, pass: allPass, min: minThreshold, ...skipped.length > 0 ? { skipped } : {} };
176702
176715
  formatOutput("ci", data, startTime, version, renderCi);
176703
176716
  if (!allPass)
176704
176717
  process.exitCode = 1;
@@ -176753,10 +176766,14 @@ function registerCoverageCommand(program) {
176753
176766
  const version = getVersion6();
176754
176767
  try {
176755
176768
  if (options.all) {
176756
- let packages = discoverPackages(process.cwd());
176757
- if (packages && !options.private)
176758
- packages = filterPublic(packages);
176759
- if (!packages || packages.length === 0) {
176769
+ const allPackages = discoverPackages(process.cwd());
176770
+ if (!allPackages || allPackages.length === 0) {
176771
+ formatError("coverage", "No workspace packages found", startTime, version);
176772
+ return;
176773
+ }
176774
+ const skipped = options.private ? [] : allPackages.filter((p) => p.private).map((p) => p.name);
176775
+ const packages = options.private ? allPackages : filterPublic(allPackages);
176776
+ if (packages.length === 0) {
176760
176777
  formatError("coverage", "No workspace packages found", startTime, version);
176761
176778
  return;
176762
176779
  }
@@ -176777,7 +176794,7 @@ function registerCoverageCommand(program) {
176777
176794
  totalAll += exps.length;
176778
176795
  }
176779
176796
  const aggScore = totalAll > 0 ? Math.round(totalDoc / totalAll * 100) : 100;
176780
- const data2 = { packages: rows, aggregate: { score: aggScore, documented: totalDoc, total: totalAll } };
176797
+ const data2 = { packages: rows, aggregate: { score: aggScore, documented: totalDoc, total: totalAll }, ...skipped.length > 0 ? { skipped } : {} };
176781
176798
  formatOutput("coverage", data2, startTime, version, renderBatchCoverage);
176782
176799
  const minT = options.min ? parseInt(options.min, 10) : undefined;
176783
176800
  if (minT !== undefined && aggScore < minT)
@@ -176966,10 +176983,14 @@ function registerExtractCommand(program) {
176966
176983
  const version = getVersion8();
176967
176984
  try {
176968
176985
  if (options.all) {
176969
- let packages = discoverPackages(process.cwd());
176970
- if (packages && !options.private)
176971
- packages = filterPublic(packages);
176972
- if (!packages || packages.length === 0) {
176986
+ const allPackages = discoverPackages(process.cwd());
176987
+ if (!allPackages || allPackages.length === 0) {
176988
+ formatError("extract", "No workspace packages found", startTime, version);
176989
+ return;
176990
+ }
176991
+ const skipped = options.private ? [] : allPackages.filter((p) => p.private).map((p) => p.name);
176992
+ const packages = options.private ? allPackages : filterPublic(allPackages);
176993
+ if (packages.length === 0) {
176973
176994
  formatError("extract", "No workspace packages found", startTime, version);
176974
176995
  return;
176975
176996
  }
@@ -176978,7 +176999,7 @@ function registerExtractCommand(program) {
176978
176999
  const { spec: spec2 } = await cachedExtract(pkg.entry);
176979
177000
  specs.push({ name: pkg.name, spec: spec2 });
176980
177001
  }
176981
- formatOutput("extract", { packages: specs }, startTime, version);
177002
+ formatOutput("extract", { packages: specs, ...skipped.length > 0 ? { skipped } : {} }, startTime, version);
176982
177003
  return;
176983
177004
  }
176984
177005
  const entryFile = entry ? path26.resolve(process.cwd(), entry) : detectEntry();
@@ -177490,10 +177511,14 @@ function registerLintCommand(program) {
177490
177511
  const version = getVersion12();
177491
177512
  try {
177492
177513
  if (options.all) {
177493
- let packages = discoverPackages(process.cwd());
177494
- if (packages && !options.private)
177495
- packages = filterPublic(packages);
177496
- if (!packages || packages.length === 0) {
177514
+ const allPackages = discoverPackages(process.cwd());
177515
+ if (!allPackages || allPackages.length === 0) {
177516
+ formatError("lint", "No workspace packages found", startTime, version);
177517
+ return;
177518
+ }
177519
+ const skipped = options.private ? [] : allPackages.filter((p) => p.private).map((p) => p.name);
177520
+ const packages = options.private ? allPackages : filterPublic(allPackages);
177521
+ if (packages.length === 0) {
177497
177522
  formatError("lint", "No workspace packages found", startTime, version);
177498
177523
  return;
177499
177524
  }
@@ -177508,7 +177533,7 @@ function registerLintCommand(program) {
177508
177533
  rows.push({ name: pkg.name, exports: (spec2.exports ?? []).length, issues: issues2 });
177509
177534
  totalIssues += issues2;
177510
177535
  }
177511
- const data2 = { packages: rows, aggregate: { count: totalIssues } };
177536
+ const data2 = { packages: rows, aggregate: { count: totalIssues }, ...skipped.length > 0 ? { skipped } : {} };
177512
177537
  formatOutput("lint", data2, startTime, version, renderBatchLint);
177513
177538
  if (totalIssues > 0)
177514
177539
  process.exitCode = 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doccov/cli",
3
- "version": "0.34.0",
3
+ "version": "0.34.1",
4
4
  "description": "DocCov CLI - Documentation coverage and drift detection for TypeScript",
5
5
  "keywords": [
6
6
  "typescript",