@doccov/cli 0.33.1 → 0.34.0

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 +29 -10
  2. package/package.json +1 -1
package/dist/drift.js CHANGED
@@ -175700,21 +175700,27 @@ function discoverPackages(cwd) {
175700
175700
  if (!existsSync10(absDir))
175701
175701
  continue;
175702
175702
  let name = dir;
175703
+ let isPrivate = false;
175703
175704
  const pkgPath = path13.join(absDir, "package.json");
175704
175705
  if (existsSync10(pkgPath)) {
175705
175706
  try {
175706
175707
  const pkg = JSON.parse(readFileSync9(pkgPath, "utf-8"));
175707
175708
  if (pkg.name)
175708
175709
  name = pkg.name;
175710
+ if (pkg.private === true)
175711
+ isPrivate = true;
175709
175712
  } catch {}
175710
175713
  }
175711
175714
  try {
175712
175715
  const entry = detectEntry(absDir);
175713
- packages.push({ name, dir, entry });
175716
+ packages.push({ name, dir, entry, ...isPrivate ? { private: true } : {} });
175714
175717
  } catch {}
175715
175718
  }
175716
175719
  return packages;
175717
175720
  }
175721
+ function filterPublic(packages) {
175722
+ return packages.filter((p) => !p.private);
175723
+ }
175718
175724
 
175719
175725
  // src/utils/detect-entry.ts
175720
175726
  function detectEntry(cwd = process.cwd()) {
@@ -175926,12 +175932,14 @@ function getPackageInfo(cwd) {
175926
175932
  }
175927
175933
  }
175928
175934
  function registerHealthCommand(program) {
175929
- program.command("health [entry]", { isDefault: true }).description("Show documentation health score (default command)").option("--min <n>", "Minimum health threshold (exit 1 if below)").option("--all", "Run across all workspace packages").action(async (entry, options) => {
175935
+ program.command("health [entry]", { isDefault: true }).description("Show documentation health score (default command)").option("--min <n>", "Minimum health threshold (exit 1 if below)").option("--all", "Run across all workspace packages").option("--private", "Include private packages in --all mode").action(async (entry, options) => {
175930
175936
  const startTime = Date.now();
175931
175937
  const version = getVersion();
175932
175938
  try {
175933
175939
  if (options.all) {
175934
- const packages = discoverPackages(process.cwd());
175940
+ let packages = discoverPackages(process.cwd());
175941
+ if (packages && !options.private)
175942
+ packages = filterPublic(packages);
175935
175943
  if (!packages || packages.length === 0) {
175936
175944
  formatError("health", "No workspace packages found", startTime, version);
175937
175945
  return;
@@ -176593,7 +176601,7 @@ function buildMarkdownTable(results, pass) {
176593
176601
  `);
176594
176602
  }
176595
176603
  function registerCiCommand(program) {
176596
- program.command("ci").description("Run CI checks on changed packages").option("--all", "Check all packages, not just changed ones").action(async (options) => {
176604
+ program.command("ci").description("Run CI checks on changed packages").option("--all", "Check all packages, not just changed ones").option("--private", "Include private packages").action(async (options) => {
176597
176605
  const startTime = Date.now();
176598
176606
  const version = getVersion5();
176599
176607
  const cwd = process.cwd();
@@ -176618,14 +176626,19 @@ function registerCiCommand(program) {
176618
176626
  if (!existsSync17(absDir))
176619
176627
  continue;
176620
176628
  let name = dir;
176629
+ let isPrivate = false;
176621
176630
  const pkgPath = path23.join(absDir, "package.json");
176622
176631
  if (existsSync17(pkgPath)) {
176623
176632
  try {
176624
176633
  const pkg = JSON.parse(readFileSync20(pkgPath, "utf-8"));
176625
176634
  if (pkg.name)
176626
176635
  name = pkg.name;
176636
+ if (pkg.private === true)
176637
+ isPrivate = true;
176627
176638
  } catch {}
176628
176639
  }
176640
+ if (isPrivate && !options.private)
176641
+ continue;
176629
176642
  try {
176630
176643
  const entryFile = detectEntry(absDir);
176631
176644
  const { spec } = await cachedExtract(entryFile);
@@ -176735,12 +176748,14 @@ function getVersion6() {
176735
176748
  }
176736
176749
  }
176737
176750
  function registerCoverageCommand(program) {
176738
- program.command("coverage [entry]").description("Measure documentation coverage for a TypeScript entry file").option("--min <n>", "Minimum coverage threshold (exit 1 if below)").option("--all", "Run across all workspace packages").action(async (entry, options) => {
176751
+ program.command("coverage [entry]").description("Measure documentation coverage for a TypeScript entry file").option("--min <n>", "Minimum coverage threshold (exit 1 if below)").option("--all", "Run across all workspace packages").option("--private", "Include private packages in --all mode").action(async (entry, options) => {
176739
176752
  const startTime = Date.now();
176740
176753
  const version = getVersion6();
176741
176754
  try {
176742
176755
  if (options.all) {
176743
- const packages = discoverPackages(process.cwd());
176756
+ let packages = discoverPackages(process.cwd());
176757
+ if (packages && !options.private)
176758
+ packages = filterPublic(packages);
176744
176759
  if (!packages || packages.length === 0) {
176745
176760
  formatError("coverage", "No workspace packages found", startTime, version);
176746
176761
  return;
@@ -176946,12 +176961,14 @@ function getVersion8() {
176946
176961
  }
176947
176962
  }
176948
176963
  function registerExtractCommand(program) {
176949
- program.command("extract [entry]").description("Extract OpenPkg spec from TypeScript entry file").option("-o, --output <file>", "Write JSON to file instead of stdout").option("--only <patterns>", "Include exports matching glob (comma-separated)").option("--ignore <patterns>", "Exclude exports matching glob (comma-separated)").option("--max-depth <n>", "Max type resolution depth", "10").option("--all", "Extract from all workspace packages").action(async (entry, options) => {
176964
+ program.command("extract [entry]").description("Extract OpenPkg spec from TypeScript entry file").option("-o, --output <file>", "Write JSON to file instead of stdout").option("--only <patterns>", "Include exports matching glob (comma-separated)").option("--ignore <patterns>", "Exclude exports matching glob (comma-separated)").option("--max-depth <n>", "Max type resolution depth", "10").option("--all", "Extract from all workspace packages").option("--private", "Include private packages in --all mode").action(async (entry, options) => {
176950
176965
  const startTime = Date.now();
176951
176966
  const version = getVersion8();
176952
176967
  try {
176953
176968
  if (options.all) {
176954
- const packages = discoverPackages(process.cwd());
176969
+ let packages = discoverPackages(process.cwd());
176970
+ if (packages && !options.private)
176971
+ packages = filterPublic(packages);
176955
176972
  if (!packages || packages.length === 0) {
176956
176973
  formatError("extract", "No workspace packages found", startTime, version);
176957
176974
  return;
@@ -177468,12 +177485,14 @@ function getVersion12() {
177468
177485
  }
177469
177486
  }
177470
177487
  function registerLintCommand(program) {
177471
- program.command("lint [entry]").description("Cross-reference JSDoc against code for accuracy issues").option("--all", "Run across all workspace packages").action(async (entry, options) => {
177488
+ program.command("lint [entry]").description("Cross-reference JSDoc against code for accuracy issues").option("--all", "Run across all workspace packages").option("--private", "Include private packages in --all mode").action(async (entry, options) => {
177472
177489
  const startTime = Date.now();
177473
177490
  const version = getVersion12();
177474
177491
  try {
177475
177492
  if (options.all) {
177476
- const packages = discoverPackages(process.cwd());
177493
+ let packages = discoverPackages(process.cwd());
177494
+ if (packages && !options.private)
177495
+ packages = filterPublic(packages);
177477
177496
  if (!packages || packages.length === 0) {
177478
177497
  formatError("lint", "No workspace packages found", startTime, version);
177479
177498
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doccov/cli",
3
- "version": "0.33.1",
3
+ "version": "0.34.0",
4
4
  "description": "DocCov CLI - Documentation coverage and drift detection for TypeScript",
5
5
  "keywords": [
6
6
  "typescript",