@theglitchking/hit-em-with-the-docs 2.0.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.
- package/.claude-plugin/marketplace.json +46 -0
- package/.claude-plugin/plugin.json +114 -0
- package/LICENSE +21 -0
- package/MIGRATION.md +255 -0
- package/README.backup.md +714 -0
- package/README.md +869 -0
- package/action.yml +56 -0
- package/dist/action/action/index.d.ts +2 -0
- package/dist/action/action/index.d.ts.map +1 -0
- package/dist/action/cli/index.d.ts +3 -0
- package/dist/action/cli/index.d.ts.map +1 -0
- package/dist/action/core/audit/auditor.d.ts +43 -0
- package/dist/action/core/audit/auditor.d.ts.map +1 -0
- package/dist/action/core/audit/rules.d.ts +37 -0
- package/dist/action/core/audit/rules.d.ts.map +1 -0
- package/dist/action/core/discover/antipatterns.d.ts +24 -0
- package/dist/action/core/discover/antipatterns.d.ts.map +1 -0
- package/dist/action/core/discover/dependencies.d.ts +57 -0
- package/dist/action/core/discover/dependencies.d.ts.map +1 -0
- package/dist/action/core/discover/patterns.d.ts +38 -0
- package/dist/action/core/discover/patterns.d.ts.map +1 -0
- package/dist/action/core/discover/standards.d.ts +58 -0
- package/dist/action/core/discover/standards.d.ts.map +1 -0
- package/dist/action/core/domains/classifier.d.ts +41 -0
- package/dist/action/core/domains/classifier.d.ts.map +1 -0
- package/dist/action/core/domains/constants.d.ts +40 -0
- package/dist/action/core/domains/constants.d.ts.map +1 -0
- package/dist/action/core/domains/detector.d.ts +35 -0
- package/dist/action/core/domains/detector.d.ts.map +1 -0
- package/dist/action/core/integrate/integrator.d.ts +35 -0
- package/dist/action/core/integrate/integrator.d.ts.map +1 -0
- package/dist/action/core/links/checker.d.ts +64 -0
- package/dist/action/core/links/checker.d.ts.map +1 -0
- package/dist/action/core/links/tracker.d.ts +69 -0
- package/dist/action/core/links/tracker.d.ts.map +1 -0
- package/dist/action/core/maintain/orchestrator.d.ts +39 -0
- package/dist/action/core/maintain/orchestrator.d.ts.map +1 -0
- package/dist/action/core/metadata/generator.d.ts +26 -0
- package/dist/action/core/metadata/generator.d.ts.map +1 -0
- package/dist/action/core/metadata/schema.d.ts +201 -0
- package/dist/action/core/metadata/schema.d.ts.map +1 -0
- package/dist/action/core/metadata/sync.d.ts +36 -0
- package/dist/action/core/metadata/sync.d.ts.map +1 -0
- package/dist/action/generators/index-generator.d.ts +19 -0
- package/dist/action/generators/index-generator.d.ts.map +1 -0
- package/dist/action/generators/registry-generator.d.ts +11 -0
- package/dist/action/generators/registry-generator.d.ts.map +1 -0
- package/dist/action/generators/scaffold.d.ts +30 -0
- package/dist/action/generators/scaffold.d.ts.map +1 -0
- package/dist/action/generators/templates/document.d.ts +14 -0
- package/dist/action/generators/templates/document.d.ts.map +1 -0
- package/dist/action/generators/templates/domain-index.d.ts +6 -0
- package/dist/action/generators/templates/domain-index.d.ts.map +1 -0
- package/dist/action/generators/templates/domain-registry.d.ts +6 -0
- package/dist/action/generators/templates/domain-registry.d.ts.map +1 -0
- package/dist/action/index.d.ts +31 -0
- package/dist/action/index.d.ts.map +1 -0
- package/dist/action/index.js +17 -0
- package/dist/action/index.js.map +1 -0
- package/dist/action/package.json +3 -0
- package/dist/action/reports/audit-report.d.ts +15 -0
- package/dist/action/reports/audit-report.d.ts.map +1 -0
- package/dist/action/reports/health-report.d.ts +15 -0
- package/dist/action/reports/health-report.d.ts.map +1 -0
- package/dist/action/reports/link-report.d.ts +15 -0
- package/dist/action/reports/link-report.d.ts.map +1 -0
- package/dist/action/utils/frontmatter.d.ts +50 -0
- package/dist/action/utils/frontmatter.d.ts.map +1 -0
- package/dist/action/utils/glob.d.ts +63 -0
- package/dist/action/utils/glob.d.ts.map +1 -0
- package/dist/action/utils/logger.d.ts +42 -0
- package/dist/action/utils/logger.d.ts.map +1 -0
- package/dist/action/utils/markdown.d.ts +89 -0
- package/dist/action/utils/markdown.d.ts.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +287 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/core/audit/auditor.d.ts +43 -0
- package/dist/core/audit/auditor.d.ts.map +1 -0
- package/dist/core/audit/auditor.js +273 -0
- package/dist/core/audit/auditor.js.map +1 -0
- package/dist/core/audit/rules.d.ts +37 -0
- package/dist/core/audit/rules.d.ts.map +1 -0
- package/dist/core/audit/rules.js +223 -0
- package/dist/core/audit/rules.js.map +1 -0
- package/dist/core/discover/antipatterns.d.ts +24 -0
- package/dist/core/discover/antipatterns.d.ts.map +1 -0
- package/dist/core/discover/antipatterns.js +354 -0
- package/dist/core/discover/antipatterns.js.map +1 -0
- package/dist/core/discover/dependencies.d.ts +57 -0
- package/dist/core/discover/dependencies.d.ts.map +1 -0
- package/dist/core/discover/dependencies.js +311 -0
- package/dist/core/discover/dependencies.js.map +1 -0
- package/dist/core/discover/patterns.d.ts +38 -0
- package/dist/core/discover/patterns.d.ts.map +1 -0
- package/dist/core/discover/patterns.js +371 -0
- package/dist/core/discover/patterns.js.map +1 -0
- package/dist/core/discover/standards.d.ts +58 -0
- package/dist/core/discover/standards.d.ts.map +1 -0
- package/dist/core/discover/standards.js +359 -0
- package/dist/core/discover/standards.js.map +1 -0
- package/dist/core/domains/classifier.d.ts +41 -0
- package/dist/core/domains/classifier.d.ts.map +1 -0
- package/dist/core/domains/classifier.js +208 -0
- package/dist/core/domains/classifier.js.map +1 -0
- package/dist/core/domains/constants.d.ts +40 -0
- package/dist/core/domains/constants.d.ts.map +1 -0
- package/dist/core/domains/constants.js +252 -0
- package/dist/core/domains/constants.js.map +1 -0
- package/dist/core/domains/detector.d.ts +35 -0
- package/dist/core/domains/detector.d.ts.map +1 -0
- package/dist/core/domains/detector.js +176 -0
- package/dist/core/domains/detector.js.map +1 -0
- package/dist/core/integrate/integrator.d.ts +35 -0
- package/dist/core/integrate/integrator.d.ts.map +1 -0
- package/dist/core/integrate/integrator.js +216 -0
- package/dist/core/integrate/integrator.js.map +1 -0
- package/dist/core/links/checker.d.ts +64 -0
- package/dist/core/links/checker.d.ts.map +1 -0
- package/dist/core/links/checker.js +190 -0
- package/dist/core/links/checker.js.map +1 -0
- package/dist/core/links/tracker.d.ts +69 -0
- package/dist/core/links/tracker.d.ts.map +1 -0
- package/dist/core/links/tracker.js +184 -0
- package/dist/core/links/tracker.js.map +1 -0
- package/dist/core/maintain/orchestrator.d.ts +39 -0
- package/dist/core/maintain/orchestrator.d.ts.map +1 -0
- package/dist/core/maintain/orchestrator.js +372 -0
- package/dist/core/maintain/orchestrator.js.map +1 -0
- package/dist/core/metadata/generator.d.ts +26 -0
- package/dist/core/metadata/generator.d.ts.map +1 -0
- package/dist/core/metadata/generator.js +221 -0
- package/dist/core/metadata/generator.js.map +1 -0
- package/dist/core/metadata/schema.d.ts +201 -0
- package/dist/core/metadata/schema.d.ts.map +1 -0
- package/dist/core/metadata/schema.js +184 -0
- package/dist/core/metadata/schema.js.map +1 -0
- package/dist/core/metadata/sync.d.ts +36 -0
- package/dist/core/metadata/sync.d.ts.map +1 -0
- package/dist/core/metadata/sync.js +195 -0
- package/dist/core/metadata/sync.js.map +1 -0
- package/dist/generators/index-generator.d.ts +19 -0
- package/dist/generators/index-generator.d.ts.map +1 -0
- package/dist/generators/index-generator.js +191 -0
- package/dist/generators/index-generator.js.map +1 -0
- package/dist/generators/registry-generator.d.ts +11 -0
- package/dist/generators/registry-generator.d.ts.map +1 -0
- package/dist/generators/registry-generator.js +156 -0
- package/dist/generators/registry-generator.js.map +1 -0
- package/dist/generators/scaffold.d.ts +30 -0
- package/dist/generators/scaffold.d.ts.map +1 -0
- package/dist/generators/scaffold.js +213 -0
- package/dist/generators/scaffold.js.map +1 -0
- package/dist/generators/templates/document.d.ts +14 -0
- package/dist/generators/templates/document.d.ts.map +1 -0
- package/dist/generators/templates/document.js +305 -0
- package/dist/generators/templates/document.js.map +1 -0
- package/dist/generators/templates/domain-index.d.ts +6 -0
- package/dist/generators/templates/domain-index.d.ts.map +1 -0
- package/dist/generators/templates/domain-index.js +68 -0
- package/dist/generators/templates/domain-index.js.map +1 -0
- package/dist/generators/templates/domain-registry.d.ts +6 -0
- package/dist/generators/templates/domain-registry.d.ts.map +1 -0
- package/dist/generators/templates/domain-registry.js +59 -0
- package/dist/generators/templates/domain-registry.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +39 -0
- package/dist/index.js.map +1 -0
- package/dist/reports/audit-report.d.ts +15 -0
- package/dist/reports/audit-report.d.ts.map +1 -0
- package/dist/reports/audit-report.js +150 -0
- package/dist/reports/audit-report.js.map +1 -0
- package/dist/reports/health-report.d.ts +15 -0
- package/dist/reports/health-report.d.ts.map +1 -0
- package/dist/reports/health-report.js +175 -0
- package/dist/reports/health-report.js.map +1 -0
- package/dist/reports/link-report.d.ts +15 -0
- package/dist/reports/link-report.d.ts.map +1 -0
- package/dist/reports/link-report.js +165 -0
- package/dist/reports/link-report.js.map +1 -0
- package/dist/utils/frontmatter.d.ts +50 -0
- package/dist/utils/frontmatter.d.ts.map +1 -0
- package/dist/utils/frontmatter.js +93 -0
- package/dist/utils/frontmatter.js.map +1 -0
- package/dist/utils/glob.d.ts +63 -0
- package/dist/utils/glob.d.ts.map +1 -0
- package/dist/utils/glob.js +128 -0
- package/dist/utils/glob.js.map +1 -0
- package/dist/utils/logger.d.ts +42 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +118 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/markdown.d.ts +89 -0
- package/dist/utils/markdown.d.ts.map +1 -0
- package/dist/utils/markdown.js +192 -0
- package/dist/utils/markdown.js.map +1 -0
- package/package.json +100 -0
- package/templates/claude/CLAUDE.md +204 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/action/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,OAAO,E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AAE,CAAC;QACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC1B,CAAC;AACH,CAAC;AAED,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AuditResult } from '../core/audit/auditor.js';
|
|
2
|
+
export interface AuditReportOptions {
|
|
3
|
+
docsPath: string;
|
|
4
|
+
result: AuditResult;
|
|
5
|
+
format?: 'markdown' | 'json';
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Generate an audit report
|
|
9
|
+
*/
|
|
10
|
+
export declare function generateAuditReport(options: AuditReportOptions): Promise<string>;
|
|
11
|
+
/**
|
|
12
|
+
* Save audit report to file
|
|
13
|
+
*/
|
|
14
|
+
export declare function saveAuditReport(docsPath: string, result: AuditResult, format?: 'markdown' | 'json'): Promise<string>;
|
|
15
|
+
//# sourceMappingURL=audit-report.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-report.d.ts","sourceRoot":"","sources":["file:///mnt/e/docker-containers/hit-em-with-the-docs/src/reports/audit-report.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,MAAM,CAAC,CAQjB;AAmID;;GAEG;AACH,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,WAAW,EACnB,MAAM,GAAE,UAAU,GAAG,MAAmB,GACvC,OAAO,CAAC,MAAM,CAAC,CAgBjB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { MaintainResult } from '../core/maintain/orchestrator.js';
|
|
2
|
+
export interface HealthReportOptions {
|
|
3
|
+
docsPath: string;
|
|
4
|
+
result: MaintainResult;
|
|
5
|
+
format?: 'markdown' | 'json';
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Generate a health report
|
|
9
|
+
*/
|
|
10
|
+
export declare function generateHealthReport(options: HealthReportOptions): Promise<string>;
|
|
11
|
+
/**
|
|
12
|
+
* Save health report to file
|
|
13
|
+
*/
|
|
14
|
+
export declare function saveHealthReport(docsPath: string, result: MaintainResult, format?: 'markdown' | 'json'): Promise<string>;
|
|
15
|
+
//# sourceMappingURL=health-report.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"health-report.d.ts","sourceRoot":"","sources":["file:///mnt/e/docker-containers/hit-em-with-the-docs/src/reports/health-report.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAEvE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,MAAM,CAAC,CAQjB;AA0JD;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,cAAc,EACtB,MAAM,GAAE,UAAU,GAAG,MAAmB,GACvC,OAAO,CAAC,MAAM,CAAC,CAgBjB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { LinkCheckResult } from '../core/links/checker.js';
|
|
2
|
+
export interface LinkReportOptions {
|
|
3
|
+
docsPath: string;
|
|
4
|
+
result: LinkCheckResult;
|
|
5
|
+
format?: 'markdown' | 'json';
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Generate a link report
|
|
9
|
+
*/
|
|
10
|
+
export declare function generateLinkReport(options: LinkReportOptions): Promise<string>;
|
|
11
|
+
/**
|
|
12
|
+
* Save link report to file
|
|
13
|
+
*/
|
|
14
|
+
export declare function saveLinkReport(docsPath: string, result: LinkCheckResult, format?: 'markdown' | 'json'): Promise<string>;
|
|
15
|
+
//# sourceMappingURL=link-report.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link-report.d.ts","sourceRoot":"","sources":["file:///mnt/e/docker-containers/hit-em-with-the-docs/src/reports/link-report.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,eAAe,CAAC;IACxB,MAAM,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,MAAM,CAAC,CAQjB;AAgJD;;GAEG;AACH,wBAAsB,cAAc,CAClC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,eAAe,EACvB,MAAM,GAAE,UAAU,GAAG,MAAmB,GACvC,OAAO,CAAC,MAAM,CAAC,CAgBjB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export interface FrontmatterResult<T = Record<string, unknown>> {
|
|
2
|
+
data: T;
|
|
3
|
+
content: string;
|
|
4
|
+
isEmpty: boolean;
|
|
5
|
+
excerpt?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Parse frontmatter from markdown content
|
|
9
|
+
*/
|
|
10
|
+
export declare function parseFrontmatter<T = Record<string, unknown>>(content: string): FrontmatterResult<T>;
|
|
11
|
+
/**
|
|
12
|
+
* Check if content has frontmatter
|
|
13
|
+
*/
|
|
14
|
+
export declare function hasFrontmatter(content: string): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Extract frontmatter string from content
|
|
17
|
+
*/
|
|
18
|
+
export declare function extractFrontmatterString(content: string): string | null;
|
|
19
|
+
/**
|
|
20
|
+
* Stringify frontmatter data to YAML
|
|
21
|
+
*/
|
|
22
|
+
export declare function stringifyFrontmatter(data: Record<string, unknown>): string;
|
|
23
|
+
/**
|
|
24
|
+
* Add or update frontmatter in content
|
|
25
|
+
*/
|
|
26
|
+
export declare function setFrontmatter(content: string, data: Record<string, unknown>): string;
|
|
27
|
+
/**
|
|
28
|
+
* Merge frontmatter data with existing
|
|
29
|
+
*/
|
|
30
|
+
export declare function mergeFrontmatter(content: string, newData: Record<string, unknown>): string;
|
|
31
|
+
/**
|
|
32
|
+
* Remove frontmatter from content
|
|
33
|
+
*/
|
|
34
|
+
export declare function removeFrontmatter(content: string): string;
|
|
35
|
+
/**
|
|
36
|
+
* Get specific frontmatter field
|
|
37
|
+
*/
|
|
38
|
+
export declare function getFrontmatterField<T>(content: string, field: string): T | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Set specific frontmatter field
|
|
41
|
+
*/
|
|
42
|
+
export declare function setFrontmatterField(content: string, field: string, value: unknown): string;
|
|
43
|
+
/**
|
|
44
|
+
* Validate frontmatter structure
|
|
45
|
+
*/
|
|
46
|
+
export declare function validateFrontmatter(content: string, requiredFields: string[]): {
|
|
47
|
+
valid: boolean;
|
|
48
|
+
missingFields: string[];
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=frontmatter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmatter.d.ts","sourceRoot":"","sources":["file:///mnt/e/docker-containers/hit-em-with-the-docs/src/utils/frontmatter.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,iBAAiB,CAAC,CAAC,GAAG,MAAM,CAAC,MAA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AM,EAAE,GACvB;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,MAAM,EAAE,CAAA;CAAE,CAS7C"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export interface GlobOptions {
|
|
2
|
+
cwd?: string;
|
|
3
|
+
absolute?: boolean;
|
|
4
|
+
ignore?: string[];
|
|
5
|
+
dot?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Find files matching a glob pattern
|
|
9
|
+
*/
|
|
10
|
+
export declare function glob(pattern: string, options?: GlobOptions): Promise<string[]>;
|
|
11
|
+
/**
|
|
12
|
+
* Find all markdown files in a directory
|
|
13
|
+
*/
|
|
14
|
+
export declare function findMarkdownFiles(dir: string, options?: Omit<GlobOptions, 'absolute'>): Promise<string[]>;
|
|
15
|
+
/**
|
|
16
|
+
* Check if a path exists
|
|
17
|
+
*/
|
|
18
|
+
export declare function pathExists(path: string): Promise<boolean>;
|
|
19
|
+
/**
|
|
20
|
+
* Check if a path exists (sync)
|
|
21
|
+
*/
|
|
22
|
+
export declare function pathExistsSync(path: string): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Check if a path is a directory
|
|
25
|
+
*/
|
|
26
|
+
export declare function isDirectory(path: string): Promise<boolean>;
|
|
27
|
+
/**
|
|
28
|
+
* Check if a path is a file
|
|
29
|
+
*/
|
|
30
|
+
export declare function isFile(path: string): Promise<boolean>;
|
|
31
|
+
/**
|
|
32
|
+
* Get all subdirectories in a directory
|
|
33
|
+
*/
|
|
34
|
+
export declare function getSubdirectories(dir: string): Promise<string[]>;
|
|
35
|
+
/**
|
|
36
|
+
* Resolve a path relative to a base
|
|
37
|
+
*/
|
|
38
|
+
export declare function resolvePath(base: string, relativePath: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Get relative path from base to target
|
|
41
|
+
*/
|
|
42
|
+
export declare function getRelativePath(base: string, target: string): string;
|
|
43
|
+
/**
|
|
44
|
+
* Get directory name from path
|
|
45
|
+
*/
|
|
46
|
+
export declare function getDirname(path: string): string;
|
|
47
|
+
/**
|
|
48
|
+
* Get base name from path
|
|
49
|
+
*/
|
|
50
|
+
export declare function getBasename(path: string): string;
|
|
51
|
+
/**
|
|
52
|
+
* Get file extension
|
|
53
|
+
*/
|
|
54
|
+
export declare function getExtension(path: string): string;
|
|
55
|
+
/**
|
|
56
|
+
* Remove file extension from path
|
|
57
|
+
*/
|
|
58
|
+
export declare function removeExtension(path: string): string;
|
|
59
|
+
/**
|
|
60
|
+
* Normalize path separators
|
|
61
|
+
*/
|
|
62
|
+
export declare function normalizePath(path: string): string;
|
|
63
|
+
//# sourceMappingURL=glob.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["file:///mnt/e/docker-containers/hit-em-with-the-docs/src/utils/glob.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,WAAW;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;GAEG;AACH,wBAAsB,IAAI,CACxB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,WAAgB,GACxB,OAAO,CAAC,MAAM,EAAE,CAAC,CAiBnB;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,IAAI,CAAC,WAAW,EAAE,UAAU,CAAM,GAC1C,OAAO,CAAC,MAAM,EAAE,CAAC,CAMnB;AAED;;GAEG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO/D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOhE;AAED;;GAEG;AACH,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO3D;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAStE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEpE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGpD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'success';
|
|
2
|
+
export interface LoggerOptions {
|
|
3
|
+
silent?: boolean;
|
|
4
|
+
verbose?: boolean;
|
|
5
|
+
prefix?: string;
|
|
6
|
+
}
|
|
7
|
+
declare class Logger {
|
|
8
|
+
private silent;
|
|
9
|
+
private verbose;
|
|
10
|
+
private prefix;
|
|
11
|
+
configure(options: LoggerOptions): void;
|
|
12
|
+
private formatMessage;
|
|
13
|
+
debug(message: string, ...args: unknown[]): void;
|
|
14
|
+
info(message: string, ...args: unknown[]): void;
|
|
15
|
+
success(message: string, ...args: unknown[]): void;
|
|
16
|
+
warn(message: string, ...args: unknown[]): void;
|
|
17
|
+
error(message: string, ...args: unknown[]): void;
|
|
18
|
+
header(title: string): void;
|
|
19
|
+
subheader(title: string): void;
|
|
20
|
+
list(items: string[], indent?: number): void;
|
|
21
|
+
table(headers: string[], rows: string[][]): void;
|
|
22
|
+
progress(current: number, total: number, label?: string): void;
|
|
23
|
+
newline(): void;
|
|
24
|
+
emoji: {
|
|
25
|
+
docs: string;
|
|
26
|
+
check: string;
|
|
27
|
+
cross: string;
|
|
28
|
+
warn: string;
|
|
29
|
+
info: string;
|
|
30
|
+
search: string;
|
|
31
|
+
stats: string;
|
|
32
|
+
fix: string;
|
|
33
|
+
link: string;
|
|
34
|
+
folder: string;
|
|
35
|
+
file: string;
|
|
36
|
+
clock: string;
|
|
37
|
+
sparkles: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export declare const logger: Logger;
|
|
41
|
+
export default logger;
|
|
42
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["file:///mnt/e/docker-containers/hit-em-with-the-docs/src/utils/logger.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEvE,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,cAAM,MAAM;IACV,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,MAAM,CAAc;IAE5B,SAAS,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAMvC,OAAO,CAAC,aAAa;IAIrB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAKhD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAK/C,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAKlD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAK/C,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAKhD,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAO3B,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAM9B,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,GAAE,MAAU,GAAG,IAAI;IAQ/C,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,IAAI;IAyBhD,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI;IAY9D,OAAO,IAAI,IAAI;IAMf,KAAK;;;;;;;;;;;;;;MAcH;CACH;AAED,eAAO,MAAM,MAAM,QAAe,CAAC;AACnC,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Markdown utilities for parsing and generating markdown content
|
|
3
|
+
*/
|
|
4
|
+
export interface MarkdownLink {
|
|
5
|
+
text: string;
|
|
6
|
+
url: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
isInternal: boolean;
|
|
9
|
+
lineNumber: number;
|
|
10
|
+
startIndex: number;
|
|
11
|
+
endIndex: number;
|
|
12
|
+
}
|
|
13
|
+
export interface MarkdownHeading {
|
|
14
|
+
level: number;
|
|
15
|
+
text: string;
|
|
16
|
+
lineNumber: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Extract all links from markdown content
|
|
20
|
+
*/
|
|
21
|
+
export declare function extractLinks(content: string): MarkdownLink[];
|
|
22
|
+
/**
|
|
23
|
+
* Extract only internal links
|
|
24
|
+
*/
|
|
25
|
+
export declare function extractInternalLinks(content: string): MarkdownLink[];
|
|
26
|
+
/**
|
|
27
|
+
* Extract all headings from markdown content
|
|
28
|
+
*/
|
|
29
|
+
export declare function extractHeadings(content: string): MarkdownHeading[];
|
|
30
|
+
/**
|
|
31
|
+
* Get the title (first h1) from markdown content
|
|
32
|
+
*/
|
|
33
|
+
export declare function extractTitle(content: string): string | null;
|
|
34
|
+
/**
|
|
35
|
+
* Count words in markdown content (excluding code blocks and frontmatter)
|
|
36
|
+
*/
|
|
37
|
+
export declare function countWords(content: string): number;
|
|
38
|
+
/**
|
|
39
|
+
* Calculate estimated read time in minutes
|
|
40
|
+
*/
|
|
41
|
+
export declare function calculateReadTime(content: string, wordsPerMinute?: number): number;
|
|
42
|
+
/**
|
|
43
|
+
* Format read time as string
|
|
44
|
+
*/
|
|
45
|
+
export declare function formatReadTime(content: string): string;
|
|
46
|
+
/**
|
|
47
|
+
* Generate a markdown link
|
|
48
|
+
*/
|
|
49
|
+
export declare function createLink(text: string, url: string, title?: string): string;
|
|
50
|
+
/**
|
|
51
|
+
* Generate a markdown heading
|
|
52
|
+
*/
|
|
53
|
+
export declare function createHeading(text: string, level?: number): string;
|
|
54
|
+
/**
|
|
55
|
+
* Generate a markdown table
|
|
56
|
+
*/
|
|
57
|
+
export declare function createTable(headers: string[], rows: string[][]): string;
|
|
58
|
+
/**
|
|
59
|
+
* Generate a markdown list
|
|
60
|
+
*/
|
|
61
|
+
export declare function createList(items: string[], ordered?: boolean): string;
|
|
62
|
+
/**
|
|
63
|
+
* Generate a markdown checkbox list
|
|
64
|
+
*/
|
|
65
|
+
export declare function createCheckboxList(items: {
|
|
66
|
+
text: string;
|
|
67
|
+
checked: boolean;
|
|
68
|
+
}[]): string;
|
|
69
|
+
/**
|
|
70
|
+
* Wrap text in a code block
|
|
71
|
+
*/
|
|
72
|
+
export declare function createCodeBlock(code: string, language?: string): string;
|
|
73
|
+
/**
|
|
74
|
+
* Create an inline code span
|
|
75
|
+
*/
|
|
76
|
+
export declare function createInlineCode(code: string): string;
|
|
77
|
+
/**
|
|
78
|
+
* Create a blockquote
|
|
79
|
+
*/
|
|
80
|
+
export declare function createBlockquote(text: string): string;
|
|
81
|
+
/**
|
|
82
|
+
* Slugify text for use in URLs/anchors
|
|
83
|
+
*/
|
|
84
|
+
export declare function slugify(text: string): string;
|
|
85
|
+
/**
|
|
86
|
+
* Extract first paragraph as excerpt
|
|
87
|
+
*/
|
|
88
|
+
export declare function extractExcerpt(content: string, maxLength?: number): string;
|
|
89
|
+
//# sourceMappingURL=markdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["file:///mnt/e/docker-containers/hit-em-with-the-docs/src/utils/markdown.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,EAAE,CAmC5D;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,EAAE,CAEpE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC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GAEG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAO5C;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,GAAE,MAAY,GAAG,MAAM,CAiB/E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from 'commander';
|
|
3
|
+
import { resolve } from 'path';
|
|
4
|
+
import { logger } from '../utils/logger.js';
|
|
5
|
+
import { createScaffold, scaffoldExists } from '../generators/scaffold.js';
|
|
6
|
+
import { syncMetadata } from '../core/metadata/sync.js';
|
|
7
|
+
import { checkLinks } from '../core/links/checker.js';
|
|
8
|
+
import { auditDocumentation } from '../core/audit/auditor.js';
|
|
9
|
+
import { integrateDocument } from '../core/integrate/integrator.js';
|
|
10
|
+
import { runMaintenance } from '../core/maintain/orchestrator.js';
|
|
11
|
+
import { discoverPatterns } from '../core/discover/patterns.js';
|
|
12
|
+
import { discoverAntiPatterns } from '../core/discover/antipatterns.js';
|
|
13
|
+
import { discoverStandards } from '../core/discover/standards.js';
|
|
14
|
+
import { analyzeDependencies } from '../core/discover/dependencies.js';
|
|
15
|
+
import { saveHealthReport } from '../reports/health-report.js';
|
|
16
|
+
import { saveAuditReport } from '../reports/audit-report.js';
|
|
17
|
+
import { saveLinkReport } from '../reports/link-report.js';
|
|
18
|
+
import { DOMAINS, DOMAIN_DEFINITIONS } from '../core/domains/constants.js';
|
|
19
|
+
const program = new Command();
|
|
20
|
+
program
|
|
21
|
+
.name('hit-em-with-the-docs')
|
|
22
|
+
.description('Self-managing documentation system with hierarchical structure and intelligent automation')
|
|
23
|
+
.version('2.0.0');
|
|
24
|
+
// Init command
|
|
25
|
+
program
|
|
26
|
+
.command('init')
|
|
27
|
+
.description('Initialize documentation structure')
|
|
28
|
+
.option('-p, --path <path>', 'Path to create documentation', '.documentation')
|
|
29
|
+
.option('-f, --force', 'Overwrite existing files', false)
|
|
30
|
+
.action(async (options) => {
|
|
31
|
+
const docsPath = resolve(process.cwd(), options.path);
|
|
32
|
+
if (await scaffoldExists(docsPath) && !options.force) {
|
|
33
|
+
logger.warn('Documentation structure already exists. Use --force to overwrite.');
|
|
34
|
+
process.exit(1);
|
|
35
|
+
}
|
|
36
|
+
const result = await createScaffold({
|
|
37
|
+
rootPath: docsPath,
|
|
38
|
+
overwrite: options.force,
|
|
39
|
+
});
|
|
40
|
+
if (!result.success) {
|
|
41
|
+
logger.error('Failed to initialize documentation');
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
// Maintain command
|
|
46
|
+
program
|
|
47
|
+
.command('maintain')
|
|
48
|
+
.description('Run full documentation maintenance')
|
|
49
|
+
.option('-p, --path <path>', 'Documentation path', '.documentation')
|
|
50
|
+
.option('-q, --quick', 'Quick mode (skip link checking)', false)
|
|
51
|
+
.option('-f, --fix', 'Auto-fix issues', false)
|
|
52
|
+
.action(async (options) => {
|
|
53
|
+
const docsPath = resolve(process.cwd(), options.path);
|
|
54
|
+
const result = await runMaintenance({
|
|
55
|
+
docsPath,
|
|
56
|
+
quick: options.quick,
|
|
57
|
+
fix: options.fix,
|
|
58
|
+
});
|
|
59
|
+
process.exit(result.success ? 0 : 1);
|
|
60
|
+
});
|
|
61
|
+
// Metadata sync command
|
|
62
|
+
program
|
|
63
|
+
.command('metadata-sync')
|
|
64
|
+
.description('Sync metadata across all documentation')
|
|
65
|
+
.option('-p, --path <path>', 'Documentation path', '.documentation')
|
|
66
|
+
.option('-d, --domain <domain>', 'Specific domain to sync')
|
|
67
|
+
.option('--dry-run', 'Preview changes without writing', false)
|
|
68
|
+
.option('-f, --fix', 'Auto-fix missing metadata', false)
|
|
69
|
+
.action(async (options) => {
|
|
70
|
+
const docsPath = resolve(process.cwd(), options.path);
|
|
71
|
+
const result = await syncMetadata({
|
|
72
|
+
docsPath,
|
|
73
|
+
domain: options.domain,
|
|
74
|
+
dryRun: options.dryRun,
|
|
75
|
+
fix: options.fix,
|
|
76
|
+
});
|
|
77
|
+
if (result.errors.length > 0) {
|
|
78
|
+
process.exit(1);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
// Link check command
|
|
82
|
+
program
|
|
83
|
+
.command('link-check')
|
|
84
|
+
.description('Check all internal documentation links')
|
|
85
|
+
.option('-p, --path <path>', 'Documentation path', '.documentation')
|
|
86
|
+
.option('-d, --domain <domain>', 'Specific domain to check')
|
|
87
|
+
.option('-r, --report', 'Generate detailed report', false)
|
|
88
|
+
.action(async (options) => {
|
|
89
|
+
const docsPath = resolve(process.cwd(), options.path);
|
|
90
|
+
const result = await checkLinks({
|
|
91
|
+
docsPath,
|
|
92
|
+
domain: options.domain,
|
|
93
|
+
});
|
|
94
|
+
if (options.report) {
|
|
95
|
+
const reportPath = await saveLinkReport(docsPath, result);
|
|
96
|
+
logger.success(`Report saved: ${reportPath}`);
|
|
97
|
+
}
|
|
98
|
+
if (result.brokenLinks.length > 0) {
|
|
99
|
+
process.exit(1);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
// Audit command
|
|
103
|
+
program
|
|
104
|
+
.command('audit')
|
|
105
|
+
.description('Audit documentation for compliance')
|
|
106
|
+
.option('-p, --path <path>', 'Documentation path', '.documentation')
|
|
107
|
+
.option('-d, --domain <domain>', 'Specific domain to audit')
|
|
108
|
+
.option('-i, --issues-only', 'Show only issues', false)
|
|
109
|
+
.option('-r, --report', 'Generate detailed report', false)
|
|
110
|
+
.action(async (options) => {
|
|
111
|
+
const docsPath = resolve(process.cwd(), options.path);
|
|
112
|
+
const result = await auditDocumentation({
|
|
113
|
+
docsPath,
|
|
114
|
+
domain: options.domain,
|
|
115
|
+
issuesOnly: options.issuesOnly,
|
|
116
|
+
});
|
|
117
|
+
if (options.report) {
|
|
118
|
+
const reportPath = await saveAuditReport(docsPath, result);
|
|
119
|
+
logger.success(`Report saved: ${reportPath}`);
|
|
120
|
+
}
|
|
121
|
+
if (result.failedFiles > 0) {
|
|
122
|
+
process.exit(1);
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
// Integrate command
|
|
126
|
+
program
|
|
127
|
+
.command('integrate <file>')
|
|
128
|
+
.description('Integrate a document into the documentation system')
|
|
129
|
+
.option('-p, --path <path>', 'Documentation path', '.documentation')
|
|
130
|
+
.option('-a, --auto', 'Auto mode (no prompts)', false)
|
|
131
|
+
.option('--dry-run', 'Preview without writing', false)
|
|
132
|
+
.option('-f, --force', 'Force integration even with duplicates', false)
|
|
133
|
+
.action(async (file, options) => {
|
|
134
|
+
const docsPath = resolve(process.cwd(), options.path);
|
|
135
|
+
const filePath = resolve(process.cwd(), file);
|
|
136
|
+
const result = await integrateDocument({
|
|
137
|
+
filePath,
|
|
138
|
+
docsPath,
|
|
139
|
+
auto: options.auto,
|
|
140
|
+
dryRun: options.dryRun,
|
|
141
|
+
force: options.force,
|
|
142
|
+
});
|
|
143
|
+
if (!result.success) {
|
|
144
|
+
logger.error(result.error ?? 'Integration failed');
|
|
145
|
+
process.exit(1);
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
// Discover command with subcommands
|
|
149
|
+
const discover = program
|
|
150
|
+
.command('discover')
|
|
151
|
+
.description('Discover patterns and standards from codebase');
|
|
152
|
+
discover
|
|
153
|
+
.command('patterns')
|
|
154
|
+
.description('Discover coding patterns')
|
|
155
|
+
.option('-r, --root <path>', 'Root path to scan', '.')
|
|
156
|
+
.option('-l, --language <lang>', 'Filter by language')
|
|
157
|
+
.option('-c, --category <cat>', 'Filter by category')
|
|
158
|
+
.action(async (options) => {
|
|
159
|
+
const rootPath = resolve(process.cwd(), options.root);
|
|
160
|
+
await discoverPatterns({
|
|
161
|
+
rootPath,
|
|
162
|
+
language: options.language,
|
|
163
|
+
category: options.category,
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
discover
|
|
167
|
+
.command('anti-patterns')
|
|
168
|
+
.description('Detect anti-patterns in codebase')
|
|
169
|
+
.option('-r, --root <path>', 'Root path to scan', '.')
|
|
170
|
+
.action(async (options) => {
|
|
171
|
+
const rootPath = resolve(process.cwd(), options.root);
|
|
172
|
+
await discoverAntiPatterns({
|
|
173
|
+
rootPath,
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
discover
|
|
177
|
+
.command('standards')
|
|
178
|
+
.description('Extract implicit standards from codebase')
|
|
179
|
+
.option('-r, --root <path>', 'Root path to scan', '.')
|
|
180
|
+
.action(async (options) => {
|
|
181
|
+
const rootPath = resolve(process.cwd(), options.root);
|
|
182
|
+
await discoverStandards({
|
|
183
|
+
rootPath,
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
discover
|
|
187
|
+
.command('dependencies')
|
|
188
|
+
.description('Analyze project dependencies')
|
|
189
|
+
.option('-r, --root <path>', 'Root path to scan', '.')
|
|
190
|
+
.action(async (options) => {
|
|
191
|
+
const rootPath = resolve(process.cwd(), options.root);
|
|
192
|
+
await analyzeDependencies({
|
|
193
|
+
rootPath,
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
// Report command
|
|
197
|
+
program
|
|
198
|
+
.command('report <type>')
|
|
199
|
+
.description('Generate a report (health, audit, links)')
|
|
200
|
+
.option('-p, --path <path>', 'Documentation path', '.documentation')
|
|
201
|
+
.option('-f, --format <format>', 'Output format (markdown, json)', 'markdown')
|
|
202
|
+
.action(async (type, options) => {
|
|
203
|
+
const docsPath = resolve(process.cwd(), options.path);
|
|
204
|
+
switch (type) {
|
|
205
|
+
case 'health': {
|
|
206
|
+
const result = await runMaintenance({ docsPath, quick: true, silent: true });
|
|
207
|
+
const reportPath = await saveHealthReport(docsPath, result, options.format);
|
|
208
|
+
logger.success(`Health report saved: ${reportPath}`);
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
case 'audit': {
|
|
212
|
+
const result = await auditDocumentation({ docsPath, silent: true });
|
|
213
|
+
const reportPath = await saveAuditReport(docsPath, result, options.format);
|
|
214
|
+
logger.success(`Audit report saved: ${reportPath}`);
|
|
215
|
+
break;
|
|
216
|
+
}
|
|
217
|
+
case 'links': {
|
|
218
|
+
const result = await checkLinks({ docsPath, silent: true });
|
|
219
|
+
const reportPath = await saveLinkReport(docsPath, result, options.format);
|
|
220
|
+
logger.success(`Link report saved: ${reportPath}`);
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
default:
|
|
224
|
+
logger.error(`Unknown report type: ${type}`);
|
|
225
|
+
logger.info('Available types: health, audit, links');
|
|
226
|
+
process.exit(1);
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
// List command
|
|
230
|
+
program
|
|
231
|
+
.command('list')
|
|
232
|
+
.description('List all documentation domains')
|
|
233
|
+
.action(() => {
|
|
234
|
+
logger.header('Documentation Domains');
|
|
235
|
+
const headers = ['Domain', 'Category', 'Priority', 'Description'];
|
|
236
|
+
const rows = DOMAINS.map((d) => {
|
|
237
|
+
const def = DOMAIN_DEFINITIONS[d];
|
|
238
|
+
return [d, def.category, `${def.loadPriority}/10`, def.description];
|
|
239
|
+
});
|
|
240
|
+
logger.table(headers, rows);
|
|
241
|
+
});
|
|
242
|
+
// Search command
|
|
243
|
+
program
|
|
244
|
+
.command('search <query>')
|
|
245
|
+
.description('Search documentation')
|
|
246
|
+
.option('-p, --path <path>', 'Documentation path', '.documentation')
|
|
247
|
+
.action(async (query, options) => {
|
|
248
|
+
const docsPath = resolve(process.cwd(), options.path);
|
|
249
|
+
const { findMarkdownFiles } = await import('../utils/glob.js');
|
|
250
|
+
const { readFile } = await import('fs/promises');
|
|
251
|
+
const { relative } = await import('path');
|
|
252
|
+
logger.header(`Search: "${query}"`);
|
|
253
|
+
const files = await findMarkdownFiles(docsPath);
|
|
254
|
+
const results = [];
|
|
255
|
+
const searchRegex = new RegExp(query, 'gi');
|
|
256
|
+
for (const file of files) {
|
|
257
|
+
try {
|
|
258
|
+
const content = await readFile(file, 'utf-8');
|
|
259
|
+
const matches = content.match(searchRegex);
|
|
260
|
+
if (matches) {
|
|
261
|
+
results.push({
|
|
262
|
+
file: relative(docsPath, file),
|
|
263
|
+
matches: matches.length,
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
catch {
|
|
268
|
+
// Skip unreadable files
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
if (results.length === 0) {
|
|
272
|
+
logger.info('No results found.');
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
results.sort((a, b) => b.matches - a.matches);
|
|
276
|
+
logger.info(`Found ${results.length} files with matches:`);
|
|
277
|
+
logger.newline();
|
|
278
|
+
for (const result of results.slice(0, 20)) {
|
|
279
|
+
logger.info(` ${result.file} (${result.matches} matches)`);
|
|
280
|
+
}
|
|
281
|
+
if (results.length > 20) {
|
|
282
|
+
logger.info(` ...and ${results.length - 20} more`);
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
// Parse and execute
|
|
286
|
+
program.parse();
|
|
287
|
+
//# sourceMappingURL=index.js.map
|