@doccov/cli 0.29.3 → 0.30.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/cli.js +9 -6
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -1293,11 +1293,12 @@ function computeStats(openpkg, doccov) {
1293
1293
  // src/reports/writer.ts
1294
1294
  import * as fs3 from "node:fs";
1295
1295
  import * as path5 from "node:path";
1296
- import { DEFAULT_REPORT_DIR, getReportPath } from "@doccov/sdk";
1296
+ import { DEFAULT_REPORT_DIR, getDoccovDir, getReportPath } from "@doccov/sdk";
1297
1297
  import chalk5 from "chalk";
1298
1298
  function writeReport(options) {
1299
1299
  const { format, content, outputPath, cwd = process.cwd(), silent = false } = options;
1300
- const reportPath = outputPath ? path5.resolve(cwd, outputPath) : path5.resolve(cwd, getReportPath(format));
1300
+ const doccovDir = getDoccovDir(cwd);
1301
+ const reportPath = outputPath ? path5.resolve(cwd, outputPath) : path5.join(doccovDir, getReportPath(format).replace(DEFAULT_REPORT_DIR + "/", ""));
1301
1302
  const dir = path5.dirname(reportPath);
1302
1303
  if (!fs3.existsSync(dir)) {
1303
1304
  fs3.mkdirSync(dir, { recursive: true });
@@ -1654,13 +1655,14 @@ import { validateExamples } from "@doccov/sdk";
1654
1655
  // src/commands/check/docs-fetcher.ts
1655
1656
  import * as cheerio from "cheerio";
1656
1657
 
1657
- // src/commands/check/docsCache.ts
1658
+ // src/commands/check/docs-cache.ts
1658
1659
  import * as crypto from "node:crypto";
1659
1660
  import * as fs4 from "node:fs";
1660
1661
  import * as path6 from "node:path";
1662
+ import { getDoccovDir as getDoccovDir2 } from "@doccov/sdk";
1661
1663
  var DEFAULT_TTL = 60 * 60 * 1000;
1662
1664
  function getCacheDir(cwd) {
1663
- return path6.join(cwd, ".doccov", "cache");
1665
+ return path6.join(getDoccovDir2(cwd), "cache");
1664
1666
  }
1665
1667
  function getCacheSubdir(cwd, type) {
1666
1668
  return path6.join(getCacheDir(cwd), type);
@@ -3732,7 +3734,7 @@ function registerCheckCommand(program, dependencies = {}) {
3732
3734
  });
3733
3735
  const format = options.format ?? "text";
3734
3736
  const specWarnings = specResult.diagnostics.filter((d) => d.severity === "warning");
3735
- const specInfos = specResult.diagnostics.filter((d) => d.severity === "info");
3737
+ const specInfos = specResult.diagnostics.filter((d) => d.severity === "info" && !d.code?.startsWith("EXTERNAL_TYPE"));
3736
3738
  const isPreview = options.preview;
3737
3739
  const shouldFix = options.fix || isPreview;
3738
3740
  let typecheckErrors = [];
@@ -4359,6 +4361,7 @@ import {
4359
4361
  buildDocCovSpec as buildDocCovSpec2,
4360
4362
  DocCov as DocCov2,
4361
4363
  detectPackageManager,
4364
+ getDoccovDir as getDoccovDir3,
4362
4365
  NodeFileSystem as NodeFileSystem2,
4363
4366
  renderApiSurface,
4364
4367
  resolveTarget as resolveTarget2
@@ -4475,7 +4478,7 @@ function registerSpecCommand(program, dependencies = {}) {
4475
4478
  packageName = "unknown";
4476
4479
  }
4477
4480
  }
4478
- const baseOutputDir = path10.resolve(options.cwd, options.output);
4481
+ const baseOutputDir = options.output === ".doccov" ? getDoccovDir3(options.cwd) : path10.resolve(options.cwd, options.output);
4479
4482
  const outputDir = path10.join(baseOutputDir, packageName);
4480
4483
  fs7.mkdirSync(outputDir, { recursive: true });
4481
4484
  const displayPath = `${options.output}/${packageName}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doccov/cli",
3
- "version": "0.29.3",
3
+ "version": "0.30.0",
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.29.0",
51
+ "@doccov/sdk": "^0.30.0",
52
52
  "@doccov/spec": "^0.27.0",
53
53
  "@inquirer/prompts": "^7.8.0",
54
54
  "@openpkg-ts/spec": "^0.12.0",