@doccov/cli 0.4.7 → 0.5.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.
- package/dist/cli.js +617 -802
- package/dist/config/index.d.ts +15 -2
- package/dist/config/index.js +19 -2
- package/package.json +2 -2
package/dist/config/index.d.ts
CHANGED
|
@@ -1,15 +1,28 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
declare const stringList: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
3
|
+
/**
|
|
4
|
+
* Docs configuration schema
|
|
5
|
+
*/
|
|
6
|
+
declare const docsConfigSchema: z.ZodObject<{
|
|
7
|
+
include: z.ZodOptional<typeof stringList>
|
|
8
|
+
exclude: z.ZodOptional<typeof stringList>
|
|
9
|
+
}>;
|
|
3
10
|
declare const docCovConfigSchema: z.ZodObject<{
|
|
4
11
|
include: z.ZodOptional<typeof stringList>
|
|
5
12
|
exclude: z.ZodOptional<typeof stringList>
|
|
6
|
-
plugins: z.ZodOptional<z.ZodArray<z.ZodUnknown
|
|
13
|
+
plugins: z.ZodOptional<z.ZodArray<z.ZodUnknown>>
|
|
14
|
+
docs: z.ZodOptional<typeof docsConfigSchema>
|
|
7
15
|
}>;
|
|
8
16
|
type DocCovConfigInput = z.infer<typeof docCovConfigSchema>;
|
|
17
|
+
interface DocsConfig {
|
|
18
|
+
include?: string[];
|
|
19
|
+
exclude?: string[];
|
|
20
|
+
}
|
|
9
21
|
interface NormalizedDocCovConfig {
|
|
10
22
|
include?: string[];
|
|
11
23
|
exclude?: string[];
|
|
12
24
|
plugins?: unknown[];
|
|
25
|
+
docs?: DocsConfig;
|
|
13
26
|
}
|
|
14
27
|
declare const DOCCOV_CONFIG_FILENAMES: readonly ["doccov.config.ts", "doccov.config.mts", "doccov.config.cts", "doccov.config.js", "doccov.config.mjs", "doccov.config.cjs"];
|
|
15
28
|
interface LoadedDocCovConfig extends NormalizedDocCovConfig {
|
|
@@ -17,4 +30,4 @@ interface LoadedDocCovConfig extends NormalizedDocCovConfig {
|
|
|
17
30
|
}
|
|
18
31
|
declare const loadDocCovConfig: (cwd: string) => Promise<LoadedDocCovConfig | null>;
|
|
19
32
|
declare const defineConfig: (config: DocCovConfigInput) => DocCovConfigInput;
|
|
20
|
-
export { loadDocCovConfig, defineConfig, NormalizedDocCovConfig, LoadedDocCovConfig, DocCovConfigInput, DOCCOV_CONFIG_FILENAMES };
|
|
33
|
+
export { loadDocCovConfig, defineConfig, NormalizedDocCovConfig, LoadedDocCovConfig, DocsConfig, DocCovConfigInput, DOCCOV_CONFIG_FILENAMES };
|
package/dist/config/index.js
CHANGED
|
@@ -28,10 +28,15 @@ var stringList = z.union([
|
|
|
28
28
|
z.string(),
|
|
29
29
|
z.array(z.string())
|
|
30
30
|
]);
|
|
31
|
+
var docsConfigSchema = z.object({
|
|
32
|
+
include: stringList.optional(),
|
|
33
|
+
exclude: stringList.optional()
|
|
34
|
+
});
|
|
31
35
|
var docCovConfigSchema = z.object({
|
|
32
36
|
include: stringList.optional(),
|
|
33
37
|
exclude: stringList.optional(),
|
|
34
|
-
plugins: z.array(z.unknown()).optional()
|
|
38
|
+
plugins: z.array(z.unknown()).optional(),
|
|
39
|
+
docs: docsConfigSchema.optional()
|
|
35
40
|
});
|
|
36
41
|
var normalizeList = (value) => {
|
|
37
42
|
if (!value) {
|
|
@@ -44,10 +49,22 @@ var normalizeList = (value) => {
|
|
|
44
49
|
var normalizeConfig = (input) => {
|
|
45
50
|
const include = normalizeList(input.include);
|
|
46
51
|
const exclude = normalizeList(input.exclude);
|
|
52
|
+
let docs;
|
|
53
|
+
if (input.docs) {
|
|
54
|
+
const docsInclude = normalizeList(input.docs.include);
|
|
55
|
+
const docsExclude = normalizeList(input.docs.exclude);
|
|
56
|
+
if (docsInclude || docsExclude) {
|
|
57
|
+
docs = {
|
|
58
|
+
include: docsInclude,
|
|
59
|
+
exclude: docsExclude
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
}
|
|
47
63
|
return {
|
|
48
64
|
include,
|
|
49
65
|
exclude,
|
|
50
|
-
plugins: input.plugins
|
|
66
|
+
plugins: input.plugins,
|
|
67
|
+
docs
|
|
51
68
|
};
|
|
52
69
|
};
|
|
53
70
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doccov/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "DocCov CLI - Documentation coverage and drift detection for TypeScript",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@ai-sdk/anthropic": "^1.0.0",
|
|
50
50
|
"@ai-sdk/openai": "^1.0.0",
|
|
51
51
|
"@inquirer/prompts": "^7.8.0",
|
|
52
|
-
"@doccov/sdk": "^0.3.
|
|
52
|
+
"@doccov/sdk": "^0.3.3",
|
|
53
53
|
"@openpkg-ts/spec": "^0.3.1",
|
|
54
54
|
"ai": "^4.0.0",
|
|
55
55
|
"chalk": "^5.4.1",
|