@doccov/cli 0.5.6 → 0.5.8
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 +946 -239
- package/dist/config/index.d.ts +29 -1
- package/dist/config/index.js +29 -2
- package/package.json +3 -3
package/dist/config/index.d.ts
CHANGED
|
@@ -7,22 +7,50 @@ declare const docsConfigSchema: z.ZodObject<{
|
|
|
7
7
|
include: z.ZodOptional<typeof stringList>
|
|
8
8
|
exclude: z.ZodOptional<typeof stringList>
|
|
9
9
|
}>;
|
|
10
|
+
/** Lint severity levels */
|
|
11
|
+
declare const lintSeveritySchema: z.ZodEnum<["error", "warn", "off"]>;
|
|
12
|
+
/**
|
|
13
|
+
* Check command configuration schema
|
|
14
|
+
*/
|
|
15
|
+
declare const checkConfigSchema: z.ZodObject<{
|
|
16
|
+
lint: z.ZodOptional<z.ZodBoolean>
|
|
17
|
+
typecheck: z.ZodOptional<z.ZodBoolean>
|
|
18
|
+
exec: z.ZodOptional<z.ZodBoolean>
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* Lint configuration schema
|
|
22
|
+
*/
|
|
23
|
+
declare const lintConfigSchema: z.ZodObject<{
|
|
24
|
+
rules: z.ZodOptional<z.ZodRecord<z.ZodString, typeof lintSeveritySchema>>
|
|
25
|
+
}>;
|
|
10
26
|
declare const docCovConfigSchema: z.ZodObject<{
|
|
11
27
|
include: z.ZodOptional<typeof stringList>
|
|
12
28
|
exclude: z.ZodOptional<typeof stringList>
|
|
13
29
|
plugins: z.ZodOptional<z.ZodArray<z.ZodUnknown>>
|
|
14
30
|
docs: z.ZodOptional<typeof docsConfigSchema>
|
|
31
|
+
check: z.ZodOptional<typeof checkConfigSchema>
|
|
32
|
+
lint: z.ZodOptional<typeof lintConfigSchema>
|
|
15
33
|
}>;
|
|
16
34
|
type DocCovConfigInput = z.infer<typeof docCovConfigSchema>;
|
|
17
35
|
interface DocsConfig {
|
|
18
36
|
include?: string[];
|
|
19
37
|
exclude?: string[];
|
|
20
38
|
}
|
|
39
|
+
interface CheckConfig {
|
|
40
|
+
lint?: boolean;
|
|
41
|
+
typecheck?: boolean;
|
|
42
|
+
exec?: boolean;
|
|
43
|
+
}
|
|
44
|
+
interface LintRulesConfig {
|
|
45
|
+
rules?: Record<string, "error" | "warn" | "off">;
|
|
46
|
+
}
|
|
21
47
|
interface NormalizedDocCovConfig {
|
|
22
48
|
include?: string[];
|
|
23
49
|
exclude?: string[];
|
|
24
50
|
plugins?: unknown[];
|
|
25
51
|
docs?: DocsConfig;
|
|
52
|
+
check?: CheckConfig;
|
|
53
|
+
lint?: LintRulesConfig;
|
|
26
54
|
}
|
|
27
55
|
declare const DOCCOV_CONFIG_FILENAMES: readonly ["doccov.config.ts", "doccov.config.mts", "doccov.config.cts", "doccov.config.js", "doccov.config.mjs", "doccov.config.cjs"];
|
|
28
56
|
interface LoadedDocCovConfig extends NormalizedDocCovConfig {
|
|
@@ -30,4 +58,4 @@ interface LoadedDocCovConfig extends NormalizedDocCovConfig {
|
|
|
30
58
|
}
|
|
31
59
|
declare const loadDocCovConfig: (cwd: string) => Promise<LoadedDocCovConfig | null>;
|
|
32
60
|
declare const defineConfig: (config: DocCovConfigInput) => DocCovConfigInput;
|
|
33
|
-
export { loadDocCovConfig, defineConfig, NormalizedDocCovConfig, LoadedDocCovConfig, DocsConfig, DocCovConfigInput, DOCCOV_CONFIG_FILENAMES };
|
|
61
|
+
export { loadDocCovConfig, defineConfig, NormalizedDocCovConfig, LoadedDocCovConfig, LintRulesConfig, DocsConfig, DocCovConfigInput, DOCCOV_CONFIG_FILENAMES, CheckConfig };
|
package/dist/config/index.js
CHANGED
|
@@ -32,11 +32,22 @@ var docsConfigSchema = z.object({
|
|
|
32
32
|
include: stringList.optional(),
|
|
33
33
|
exclude: stringList.optional()
|
|
34
34
|
});
|
|
35
|
+
var lintSeveritySchema = z.enum(["error", "warn", "off"]);
|
|
36
|
+
var checkConfigSchema = z.object({
|
|
37
|
+
lint: z.boolean().optional(),
|
|
38
|
+
typecheck: z.boolean().optional(),
|
|
39
|
+
exec: z.boolean().optional()
|
|
40
|
+
});
|
|
41
|
+
var lintConfigSchema = z.object({
|
|
42
|
+
rules: z.record(lintSeveritySchema).optional()
|
|
43
|
+
});
|
|
35
44
|
var docCovConfigSchema = z.object({
|
|
36
45
|
include: stringList.optional(),
|
|
37
46
|
exclude: stringList.optional(),
|
|
38
47
|
plugins: z.array(z.unknown()).optional(),
|
|
39
|
-
docs: docsConfigSchema.optional()
|
|
48
|
+
docs: docsConfigSchema.optional(),
|
|
49
|
+
check: checkConfigSchema.optional(),
|
|
50
|
+
lint: lintConfigSchema.optional()
|
|
40
51
|
});
|
|
41
52
|
var normalizeList = (value) => {
|
|
42
53
|
if (!value) {
|
|
@@ -60,11 +71,27 @@ var normalizeConfig = (input) => {
|
|
|
60
71
|
};
|
|
61
72
|
}
|
|
62
73
|
}
|
|
74
|
+
let check;
|
|
75
|
+
if (input.check) {
|
|
76
|
+
check = {
|
|
77
|
+
lint: input.check.lint,
|
|
78
|
+
typecheck: input.check.typecheck,
|
|
79
|
+
exec: input.check.exec
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
let lint;
|
|
83
|
+
if (input.lint) {
|
|
84
|
+
lint = {
|
|
85
|
+
rules: input.lint.rules
|
|
86
|
+
};
|
|
87
|
+
}
|
|
63
88
|
return {
|
|
64
89
|
include,
|
|
65
90
|
exclude,
|
|
66
91
|
plugins: input.plugins,
|
|
67
|
-
docs
|
|
92
|
+
docs,
|
|
93
|
+
check,
|
|
94
|
+
lint
|
|
68
95
|
};
|
|
69
96
|
};
|
|
70
97
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doccov/cli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
4
4
|
"description": "DocCov CLI - Documentation coverage and drift detection for TypeScript",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -49,8 +49,8 @@
|
|
|
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.5.
|
|
53
|
-
"@openpkg-ts/spec": "^0.
|
|
52
|
+
"@doccov/sdk": "^0.5.8",
|
|
53
|
+
"@openpkg-ts/spec": "^0.4.0",
|
|
54
54
|
"ai": "^4.0.0",
|
|
55
55
|
"chalk": "^5.4.1",
|
|
56
56
|
"commander": "^14.0.0",
|