@doccov/cli 0.4.2 → 0.4.4

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 +9 -4
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -567,10 +567,10 @@ function registerCheckCommand(program, dependencies = {}) {
567
567
  }
568
568
  }
569
569
  }
570
- throw new Error("Documentation coverage requirements not met.");
570
+ process.exit(1);
571
571
  } catch (commandError) {
572
572
  error(chalk.red("Error:"), commandError instanceof Error ? commandError.message : commandError);
573
- throw commandError instanceof Error ? commandError : new Error(String(commandError));
573
+ process.exit(1);
574
574
  }
575
575
  });
576
576
  }
@@ -1555,7 +1555,8 @@ function detectEntryPoint(repoDir) {
1555
1555
  }
1556
1556
  function resolveToTs(baseDir, filePath) {
1557
1557
  const normalized = filePath.replace(/^\.\//, "");
1558
- if (normalized.endsWith(".ts") || normalized.endsWith(".tsx")) {
1558
+ const isSourceTs = normalized.endsWith(".ts") && !normalized.endsWith(".d.ts") || normalized.endsWith(".tsx");
1559
+ if (isSourceTs) {
1559
1560
  if (fs8.existsSync(path9.join(baseDir, normalized))) {
1560
1561
  return normalized;
1561
1562
  }
@@ -1585,6 +1586,8 @@ function resolveToTs(baseDir, filePath) {
1585
1586
  candidates.push(`src/${baseName}.ts`);
1586
1587
  }
1587
1588
  for (const candidate of candidates) {
1589
+ if (candidate.endsWith(".d.ts"))
1590
+ continue;
1588
1591
  if (fs8.existsSync(path9.join(baseDir, candidate))) {
1589
1592
  return candidate;
1590
1593
  }
@@ -2177,4 +2180,6 @@ registerScanCommand(program);
2177
2180
  program.command("*", { hidden: true }).action(() => {
2178
2181
  program.outputHelp();
2179
2182
  });
2180
- program.parseAsync();
2183
+ program.parseAsync().catch(() => {
2184
+ process.exit(1);
2185
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doccov/cli",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "description": "DocCov CLI - Documentation coverage and drift detection for TypeScript",
5
5
  "keywords": [
6
6
  "typescript",