@mycodemap/mycodemap 0.1.1 → 0.2.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/CHANGELOG.md +78 -0
- package/README.md +241 -67
- package/dist/cli/commands/ci.d.ts +7 -1
- package/dist/cli/commands/ci.d.ts.map +1 -1
- package/dist/cli/commands/ci.js +38 -0
- package/dist/cli/commands/ci.js.map +1 -1
- package/dist/cli/commands/export.d.ts +6 -0
- package/dist/cli/commands/export.d.ts.map +1 -0
- package/dist/cli/commands/export.js +108 -0
- package/dist/cli/commands/export.js.map +1 -0
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +96 -0
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/server.d.ts +9 -0
- package/dist/cli/commands/server.d.ts.map +1 -0
- package/dist/cli/commands/server.js +68 -0
- package/dist/cli/commands/server.js.map +1 -0
- package/dist/cli/index.js +22 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli-new/commands/export.d.ts +15 -0
- package/dist/cli-new/commands/export.d.ts.map +1 -0
- package/dist/cli-new/commands/export.js +107 -0
- package/dist/cli-new/commands/export.js.map +1 -0
- package/dist/cli-new/commands/query.d.ts +14 -0
- package/dist/cli-new/commands/query.d.ts.map +1 -0
- package/dist/cli-new/commands/query.js +120 -0
- package/dist/cli-new/commands/query.js.map +1 -0
- package/dist/cli-new/commands/server.d.ts +13 -0
- package/dist/cli-new/commands/server.d.ts.map +1 -0
- package/dist/cli-new/commands/server.js +94 -0
- package/dist/cli-new/commands/server.js.map +1 -0
- package/dist/cli-new/index.d.ts +11 -0
- package/dist/cli-new/index.d.ts.map +1 -0
- package/dist/cli-new/index.js +63 -0
- package/dist/cli-new/index.js.map +1 -0
- package/dist/cli-new/types/index.d.ts +88 -0
- package/dist/cli-new/types/index.d.ts.map +1 -0
- package/dist/cli-new/types/index.js +7 -0
- package/dist/cli-new/types/index.js.map +1 -0
- package/dist/domain/entities/CodeGraph.d.ts +134 -0
- package/dist/domain/entities/CodeGraph.d.ts.map +1 -0
- package/dist/domain/entities/CodeGraph.js +316 -0
- package/dist/domain/entities/CodeGraph.js.map +1 -0
- package/dist/domain/entities/Dependency.d.ts +78 -0
- package/dist/domain/entities/Dependency.d.ts.map +1 -0
- package/dist/domain/entities/Dependency.js +132 -0
- package/dist/domain/entities/Dependency.js.map +1 -0
- package/dist/domain/entities/Module.d.ts +75 -0
- package/dist/domain/entities/Module.d.ts.map +1 -0
- package/dist/domain/entities/Module.js +151 -0
- package/dist/domain/entities/Module.js.map +1 -0
- package/dist/domain/entities/Project.d.ts +50 -0
- package/dist/domain/entities/Project.d.ts.map +1 -0
- package/dist/domain/entities/Project.js +99 -0
- package/dist/domain/entities/Project.js.map +1 -0
- package/dist/domain/entities/Symbol.d.ts +75 -0
- package/dist/domain/entities/Symbol.d.ts.map +1 -0
- package/dist/domain/entities/Symbol.js +130 -0
- package/dist/domain/entities/Symbol.js.map +1 -0
- package/dist/domain/events/DomainEvent.d.ts +76 -0
- package/dist/domain/events/DomainEvent.d.ts.map +1 -0
- package/dist/domain/events/DomainEvent.js +153 -0
- package/dist/domain/events/DomainEvent.js.map +1 -0
- package/dist/domain/index.d.ts +10 -0
- package/dist/domain/index.d.ts.map +1 -0
- package/dist/domain/index.js +18 -0
- package/dist/domain/index.js.map +1 -0
- package/dist/domain/repositories/CodeGraphRepository.d.ts +58 -0
- package/dist/domain/repositories/CodeGraphRepository.d.ts.map +1 -0
- package/dist/domain/repositories/CodeGraphRepository.js +37 -0
- package/dist/domain/repositories/CodeGraphRepository.js.map +1 -0
- package/dist/domain/services/CodeGraphBuilder.d.ts +50 -0
- package/dist/domain/services/CodeGraphBuilder.d.ts.map +1 -0
- package/dist/domain/services/CodeGraphBuilder.js +121 -0
- package/dist/domain/services/CodeGraphBuilder.js.map +1 -0
- package/dist/infrastructure/parser/implementations/GoParser.d.ts +25 -0
- package/dist/infrastructure/parser/implementations/GoParser.d.ts.map +1 -0
- package/dist/infrastructure/parser/implementations/GoParser.js +158 -0
- package/dist/infrastructure/parser/implementations/GoParser.js.map +1 -0
- package/dist/infrastructure/parser/implementations/PythonParser.d.ts +30 -0
- package/dist/infrastructure/parser/implementations/PythonParser.d.ts.map +1 -0
- package/dist/infrastructure/parser/implementations/PythonParser.js +201 -0
- package/dist/infrastructure/parser/implementations/PythonParser.js.map +1 -0
- package/dist/infrastructure/parser/implementations/TypeScriptParser.d.ts +63 -0
- package/dist/infrastructure/parser/implementations/TypeScriptParser.d.ts.map +1 -0
- package/dist/infrastructure/parser/implementations/TypeScriptParser.js +420 -0
- package/dist/infrastructure/parser/implementations/TypeScriptParser.js.map +1 -0
- package/dist/infrastructure/parser/index.d.ts +13 -0
- package/dist/infrastructure/parser/index.d.ts.map +1 -0
- package/dist/infrastructure/parser/index.js +32 -0
- package/dist/infrastructure/parser/index.js.map +1 -0
- package/dist/infrastructure/parser/interfaces/ParserBase.d.ts +124 -0
- package/dist/infrastructure/parser/interfaces/ParserBase.d.ts.map +1 -0
- package/dist/infrastructure/parser/interfaces/ParserBase.js +200 -0
- package/dist/infrastructure/parser/interfaces/ParserBase.js.map +1 -0
- package/dist/infrastructure/parser/registry/ParserRegistry.d.ts +68 -0
- package/dist/infrastructure/parser/registry/ParserRegistry.d.ts.map +1 -0
- package/dist/infrastructure/parser/registry/ParserRegistry.js +116 -0
- package/dist/infrastructure/parser/registry/ParserRegistry.js.map +1 -0
- package/dist/infrastructure/repositories/CodeGraphRepositoryImpl.d.ts +44 -0
- package/dist/infrastructure/repositories/CodeGraphRepositoryImpl.d.ts.map +1 -0
- package/dist/infrastructure/repositories/CodeGraphRepositoryImpl.js +129 -0
- package/dist/infrastructure/repositories/CodeGraphRepositoryImpl.js.map +1 -0
- package/dist/infrastructure/repositories/index.d.ts +3 -0
- package/dist/infrastructure/repositories/index.d.ts.map +1 -0
- package/dist/infrastructure/repositories/index.js +7 -0
- package/dist/infrastructure/repositories/index.js.map +1 -0
- package/dist/infrastructure/storage/StorageFactory.d.ts +53 -0
- package/dist/infrastructure/storage/StorageFactory.d.ts.map +1 -0
- package/dist/infrastructure/storage/StorageFactory.js +150 -0
- package/dist/infrastructure/storage/StorageFactory.js.map +1 -0
- package/dist/infrastructure/storage/adapters/FileSystemStorage.d.ts +52 -0
- package/dist/infrastructure/storage/adapters/FileSystemStorage.d.ts.map +1 -0
- package/dist/infrastructure/storage/adapters/FileSystemStorage.js +315 -0
- package/dist/infrastructure/storage/adapters/FileSystemStorage.js.map +1 -0
- package/dist/infrastructure/storage/adapters/KuzuDBStorage.d.ts +52 -0
- package/dist/infrastructure/storage/adapters/KuzuDBStorage.d.ts.map +1 -0
- package/dist/infrastructure/storage/adapters/KuzuDBStorage.js +235 -0
- package/dist/infrastructure/storage/adapters/KuzuDBStorage.js.map +1 -0
- package/dist/infrastructure/storage/adapters/MemoryStorage.d.ts +37 -0
- package/dist/infrastructure/storage/adapters/MemoryStorage.d.ts.map +1 -0
- package/dist/infrastructure/storage/adapters/MemoryStorage.js +229 -0
- package/dist/infrastructure/storage/adapters/MemoryStorage.js.map +1 -0
- package/dist/infrastructure/storage/adapters/Neo4jStorage.d.ts +49 -0
- package/dist/infrastructure/storage/adapters/Neo4jStorage.d.ts.map +1 -0
- package/dist/infrastructure/storage/adapters/Neo4jStorage.js +222 -0
- package/dist/infrastructure/storage/adapters/Neo4jStorage.js.map +1 -0
- package/dist/infrastructure/storage/index.d.ts +6 -0
- package/dist/infrastructure/storage/index.d.ts.map +1 -0
- package/dist/infrastructure/storage/index.js +13 -0
- package/dist/infrastructure/storage/index.js.map +1 -0
- package/dist/infrastructure/storage/interfaces/StorageBase.d.ts +76 -0
- package/dist/infrastructure/storage/interfaces/StorageBase.d.ts.map +1 -0
- package/dist/infrastructure/storage/interfaces/StorageBase.js +116 -0
- package/dist/infrastructure/storage/interfaces/StorageBase.js.map +1 -0
- package/dist/interface/config/index.d.ts +102 -0
- package/dist/interface/config/index.d.ts.map +1 -0
- package/dist/interface/config/index.js +7 -0
- package/dist/interface/config/index.js.map +1 -0
- package/dist/interface/types/index.d.ts +425 -0
- package/dist/interface/types/index.d.ts.map +1 -0
- package/dist/interface/types/index.js +8 -0
- package/dist/interface/types/index.js.map +1 -0
- package/dist/interface/types/parser.d.ts +103 -0
- package/dist/interface/types/parser.d.ts.map +1 -0
- package/dist/interface/types/parser.js +7 -0
- package/dist/interface/types/parser.js.map +1 -0
- package/dist/interface/types/storage.d.ts +98 -0
- package/dist/interface/types/storage.d.ts.map +1 -0
- package/dist/interface/types/storage.js +7 -0
- package/dist/interface/types/storage.js.map +1 -0
- package/dist/orchestrator/test-linker.js +1 -1
- package/dist/orchestrator/test-linker.js.map +1 -1
- package/dist/server/CodeMapServer.d.ts +51 -0
- package/dist/server/CodeMapServer.d.ts.map +1 -0
- package/dist/server/CodeMapServer.js +146 -0
- package/dist/server/CodeMapServer.js.map +1 -0
- package/dist/server/handlers/AnalysisHandler.d.ts +82 -0
- package/dist/server/handlers/AnalysisHandler.d.ts.map +1 -0
- package/dist/server/handlers/AnalysisHandler.js +196 -0
- package/dist/server/handlers/AnalysisHandler.js.map +1 -0
- package/dist/server/handlers/QueryHandler.d.ts +57 -0
- package/dist/server/handlers/QueryHandler.d.ts.map +1 -0
- package/dist/server/handlers/QueryHandler.js +260 -0
- package/dist/server/handlers/QueryHandler.js.map +1 -0
- package/dist/server/index.d.ts +7 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +13 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/routes/api.d.ts +8 -0
- package/dist/server/routes/api.d.ts.map +1 -0
- package/dist/server/routes/api.js +372 -0
- package/dist/server/routes/api.js.map +1 -0
- package/dist/server/types/index.d.ts +171 -0
- package/dist/server/types/index.d.ts.map +1 -0
- package/dist/server/types/index.js +7 -0
- package/dist/server/types/index.js.map +1 -0
- package/dist/types/index.d.ts +6 -372
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +9 -3
- package/dist/types/index.js.map +1 -1
- package/docs/AI_ASSISTANT_SETUP.md +68 -0
- package/docs/PUBLISHING.md +162 -0
- package/docs/README.md +37 -0
- package/docs/SETUP_GUIDE.md +91 -5
- package/docs/ai-guide/COMMANDS.md +369 -0
- package/docs/ai-guide/INTEGRATION.md +513 -0
- package/docs/ai-guide/OUTPUT.md +465 -0
- package/docs/ai-guide/PATTERNS.md +409 -0
- package/docs/ai-guide/PROMPTS.md +414 -0
- package/docs/ai-guide/QUICKSTART.md +114 -0
- package/docs/ai-guide/README.md +66 -0
- package/docs/archive/AI_INTEGRATION_GUIDE_ARCHIVED.md +7 -1
- package/docs/archive/ARCHIVE.md +39 -0
- package/docs/archive/MYCLAUDE_GUIDE.md +305 -0
- package/docs/archive/PUBLISH_NPM_DESIGN_V1.md +6 -0
- package/docs/archive/PUBLISH_NPM_DESIGN_V2.md +6 -0
- package/docs/archive/README.md +29 -0
- package/docs/archive/TASK_DESIGN_COVERAGE_REPORT.md +6 -0
- package/docs/archive/TEST_SUMMARY.md +140 -0
- package/docs/archive/comprehensive_test_report.md +337 -0
- package/docs/{CI_GATEWAY_DESIGN.md → archive/design-docs/CI_GATEWAY_DESIGN.md} +6 -0
- package/docs/{PUBLISH_NPM_DESIGN_FINAL.md → archive/design-docs/PUBLISH_NPM_DESIGN_FINAL.md} +7 -1
- package/docs/{REFACTOR_ARCHITECTURE_OVERVIEW.md → archive/design-docs/REFACTOR_ARCHITECTURE_OVERVIEW.md} +8 -2
- package/docs/{REFACTOR_CONFIDENCE_DESIGN.md → archive/design-docs/REFACTOR_CONFIDENCE_DESIGN.md} +6 -0
- package/docs/{REFACTOR_GIT_ANALYZER_DESIGN.md → archive/design-docs/REFACTOR_GIT_ANALYZER_DESIGN.md} +8 -2
- package/docs/{REFACTOR_ORCHESTRATOR_DESIGN.md → archive/design-docs/REFACTOR_ORCHESTRATOR_DESIGN.md} +6 -0
- package/docs/{REFACTOR_RESULT_FUSION_DESIGN.md → archive/design-docs/REFACTOR_RESULT_FUSION_DESIGN.md} +6 -0
- package/docs/{REFACTOR_TEST_LINKER_DESIGN.md → archive/design-docs/REFACTOR_TEST_LINKER_DESIGN.md} +6 -0
- package/docs/archive/myclaude.md +1084 -0
- package/docs/archive/plans/2026-03-14-go-language-support-design.md +92 -0
- package/docs/{REFACTOR_REQUIREMENTS.md → archive/product-specs/REFACTOR_REQUIREMENTS.md} +11 -5
- package/docs/archive/scenario-2-deps-analysis.md +353 -0
- package/docs/archive/test-report-symbol-search.md +384 -0
- package/docs/archive/test-scenario-4-complexity-analysis.md +460 -0
- package/docs/archive/test_report_scenario5.md +615 -0
- package/docs/archive/test_scenario_3_impact_analysis_report.md +520 -0
- package/docs/design-docs/README.md +26 -0
- package/docs/exec-plans/MVP3-IMPLEMENTATION-ROADMAP.md +524 -0
- package/docs/exec-plans/README.md +29 -0
- package/docs/exec-plans/active/.gitkeep +0 -0
- package/docs/exec-plans/completed/.gitkeep +0 -0
- package/docs/{plans/POST_TASK_PLAN.md → exec-plans/completed/2026-03-03-post-task-plan.md} +9 -3
- package/docs/exec-plans/completed/harness-engineering-rollout.md +184 -0
- package/docs/exec-plans/tech-debt/.gitkeep +0 -0
- package/docs/exec-plans/tech-debt/2026-03-15-lint-guardrail-gap.md +30 -0
- package/docs/generated/README.md +19 -0
- package/docs/product-specs/MVP3-ARCHITECTURE-COMPARISON.md +504 -0
- package/docs/product-specs/MVP3-ARCHITECTURE-REDESIGN-PRD.md +322 -0
- package/docs/product-specs/MVP3-ARCHITECTURE-REDESIGN-TECH-PRD.md +1374 -0
- package/docs/product-specs/README.md +22 -0
- package/docs/references/README.md +15 -0
- package/docs/references/tmp.md +527 -0
- package/docs/rules/README.md +16 -0
- package/docs/rules/architecture-guardrails.md +349 -0
- package/docs/rules/code-quality-redlines.md +321 -0
- package/docs/rules/deployment.md +23 -0
- package/docs/rules/engineering-with-codex-openai.md +202 -0
- package/docs/rules/testing.md +73 -0
- package/docs/rules/validation.md +39 -0
- package/package.json +19 -6
- package/docs/OMC_TEAM_DEBUG_REPORT.md +0 -285
- /package/docs/{plans/archive → exec-plans/completed}/2026-03-03-deps-path-extension-fix.md +0 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 领域事件基类
|
|
3
|
+
*
|
|
4
|
+
* 职责:
|
|
5
|
+
* - 记录事件发生时间
|
|
6
|
+
* - 提供事件身份标识
|
|
7
|
+
* - 支持事件追溯和审计
|
|
8
|
+
*/
|
|
9
|
+
export declare abstract class DomainEvent {
|
|
10
|
+
readonly id: string;
|
|
11
|
+
readonly occurredAt: Date;
|
|
12
|
+
readonly type: string;
|
|
13
|
+
constructor(type: string);
|
|
14
|
+
/**
|
|
15
|
+
* 获取事件描述
|
|
16
|
+
*/
|
|
17
|
+
abstract getDescription(): string;
|
|
18
|
+
/**
|
|
19
|
+
* 转换为 JSON
|
|
20
|
+
*/
|
|
21
|
+
toJSON(): Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 模块添加事件
|
|
25
|
+
*/
|
|
26
|
+
export declare class ModuleAddedEvent extends DomainEvent {
|
|
27
|
+
readonly moduleId: string;
|
|
28
|
+
readonly path: string;
|
|
29
|
+
constructor(moduleId: string, path: string);
|
|
30
|
+
getDescription(): string;
|
|
31
|
+
toJSON(): Record<string, unknown>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* 模块移除事件
|
|
35
|
+
*/
|
|
36
|
+
export declare class ModuleRemovedEvent extends DomainEvent {
|
|
37
|
+
readonly moduleId: string;
|
|
38
|
+
readonly path: string;
|
|
39
|
+
constructor(moduleId: string, path: string);
|
|
40
|
+
getDescription(): string;
|
|
41
|
+
toJSON(): Record<string, unknown>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* 符号添加事件
|
|
45
|
+
*/
|
|
46
|
+
export declare class SymbolAddedEvent extends DomainEvent {
|
|
47
|
+
readonly symbolId: string;
|
|
48
|
+
readonly name: string;
|
|
49
|
+
readonly moduleId: string;
|
|
50
|
+
constructor(symbolId: string, name: string, moduleId: string);
|
|
51
|
+
getDescription(): string;
|
|
52
|
+
toJSON(): Record<string, unknown>;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* 依赖添加事件
|
|
56
|
+
*/
|
|
57
|
+
export declare class DependencyAddedEvent extends DomainEvent {
|
|
58
|
+
readonly dependencyId: string;
|
|
59
|
+
readonly sourceId: string;
|
|
60
|
+
readonly targetId: string;
|
|
61
|
+
readonly dependencyType: string;
|
|
62
|
+
constructor(dependencyId: string, sourceId: string, targetId: string, dependencyType: string);
|
|
63
|
+
getDescription(): string;
|
|
64
|
+
toJSON(): Record<string, unknown>;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* 循环依赖检测事件
|
|
68
|
+
*/
|
|
69
|
+
export declare class CycleDetectedEvent extends DomainEvent {
|
|
70
|
+
readonly cycleModules: string[];
|
|
71
|
+
readonly cycleLength: number;
|
|
72
|
+
constructor(cycleModules: string[], cycleLength: number);
|
|
73
|
+
getDescription(): string;
|
|
74
|
+
toJSON(): Record<string, unknown>;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=DomainEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DomainEvent.d.ts","sourceRoot":"","sources":["../../../src/domain/events/DomainEvent.ts"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AACH,8BAAsB,WAAW;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAEV,IAAI,EAAE,MAAM;IAMxB;;OAEG;IACH,QAAQ,CAAC,cAAc,IAAI,MAAM;IAEjC;;OAEG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAOlC;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,WAA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AW;IAE/C,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE;IAC/B,QAAQ,CAAC,WAAW,EAAE,MAAM;gBADnB,YAAY,EAAE,MAAM,EAAE,EACtB,WAAW,EAAE,MAAM;IAK9B,cAAc,IAAI,MAAM;IAIf,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAO3C"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
// [META] since:2026-03 | owner:architecture-team | stable:true
|
|
2
|
+
// [WHY] Domain event base class - represents something that happened in the domain
|
|
3
|
+
// ============================================
|
|
4
|
+
// 领域事件基类 - 表示领域中发生的事情
|
|
5
|
+
// ============================================
|
|
6
|
+
/**
|
|
7
|
+
* 领域事件基类
|
|
8
|
+
*
|
|
9
|
+
* 职责:
|
|
10
|
+
* - 记录事件发生时间
|
|
11
|
+
* - 提供事件身份标识
|
|
12
|
+
* - 支持事件追溯和审计
|
|
13
|
+
*/
|
|
14
|
+
export class DomainEvent {
|
|
15
|
+
id;
|
|
16
|
+
occurredAt;
|
|
17
|
+
type;
|
|
18
|
+
constructor(type) {
|
|
19
|
+
this.id = `${type}_${Date.now()}_${Math.random().toString(36).slice(2, 9)}`;
|
|
20
|
+
this.occurredAt = new Date();
|
|
21
|
+
this.type = type;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 转换为 JSON
|
|
25
|
+
*/
|
|
26
|
+
toJSON() {
|
|
27
|
+
return {
|
|
28
|
+
id: this.id,
|
|
29
|
+
type: this.type,
|
|
30
|
+
occurredAt: this.occurredAt.toISOString(),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* 模块添加事件
|
|
36
|
+
*/
|
|
37
|
+
export class ModuleAddedEvent extends DomainEvent {
|
|
38
|
+
moduleId;
|
|
39
|
+
path;
|
|
40
|
+
constructor(moduleId, path) {
|
|
41
|
+
super('MODULE_ADDED');
|
|
42
|
+
this.moduleId = moduleId;
|
|
43
|
+
this.path = path;
|
|
44
|
+
}
|
|
45
|
+
getDescription() {
|
|
46
|
+
return `Module added: ${this.path} (${this.moduleId})`;
|
|
47
|
+
}
|
|
48
|
+
toJSON() {
|
|
49
|
+
return {
|
|
50
|
+
...super.toJSON(),
|
|
51
|
+
moduleId: this.moduleId,
|
|
52
|
+
path: this.path,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* 模块移除事件
|
|
58
|
+
*/
|
|
59
|
+
export class ModuleRemovedEvent extends DomainEvent {
|
|
60
|
+
moduleId;
|
|
61
|
+
path;
|
|
62
|
+
constructor(moduleId, path) {
|
|
63
|
+
super('MODULE_REMOVED');
|
|
64
|
+
this.moduleId = moduleId;
|
|
65
|
+
this.path = path;
|
|
66
|
+
}
|
|
67
|
+
getDescription() {
|
|
68
|
+
return `Module removed: ${this.path} (${this.moduleId})`;
|
|
69
|
+
}
|
|
70
|
+
toJSON() {
|
|
71
|
+
return {
|
|
72
|
+
...super.toJSON(),
|
|
73
|
+
moduleId: this.moduleId,
|
|
74
|
+
path: this.path,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* 符号添加事件
|
|
80
|
+
*/
|
|
81
|
+
export class SymbolAddedEvent extends DomainEvent {
|
|
82
|
+
symbolId;
|
|
83
|
+
name;
|
|
84
|
+
moduleId;
|
|
85
|
+
constructor(symbolId, name, moduleId) {
|
|
86
|
+
super('SYMBOL_ADDED');
|
|
87
|
+
this.symbolId = symbolId;
|
|
88
|
+
this.name = name;
|
|
89
|
+
this.moduleId = moduleId;
|
|
90
|
+
}
|
|
91
|
+
getDescription() {
|
|
92
|
+
return `Symbol added: ${this.name} (${this.symbolId}) in module ${this.moduleId}`;
|
|
93
|
+
}
|
|
94
|
+
toJSON() {
|
|
95
|
+
return {
|
|
96
|
+
...super.toJSON(),
|
|
97
|
+
symbolId: this.symbolId,
|
|
98
|
+
name: this.name,
|
|
99
|
+
moduleId: this.moduleId,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* 依赖添加事件
|
|
105
|
+
*/
|
|
106
|
+
export class DependencyAddedEvent extends DomainEvent {
|
|
107
|
+
dependencyId;
|
|
108
|
+
sourceId;
|
|
109
|
+
targetId;
|
|
110
|
+
dependencyType;
|
|
111
|
+
constructor(dependencyId, sourceId, targetId, dependencyType) {
|
|
112
|
+
super('DEPENDENCY_ADDED');
|
|
113
|
+
this.dependencyId = dependencyId;
|
|
114
|
+
this.sourceId = sourceId;
|
|
115
|
+
this.targetId = targetId;
|
|
116
|
+
this.dependencyType = dependencyType;
|
|
117
|
+
}
|
|
118
|
+
getDescription() {
|
|
119
|
+
return `Dependency added: ${this.sourceId} -> ${this.targetId} (${this.dependencyType})`;
|
|
120
|
+
}
|
|
121
|
+
toJSON() {
|
|
122
|
+
return {
|
|
123
|
+
...super.toJSON(),
|
|
124
|
+
dependencyId: this.dependencyId,
|
|
125
|
+
sourceId: this.sourceId,
|
|
126
|
+
targetId: this.targetId,
|
|
127
|
+
dependencyType: this.dependencyType,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* 循环依赖检测事件
|
|
133
|
+
*/
|
|
134
|
+
export class CycleDetectedEvent extends DomainEvent {
|
|
135
|
+
cycleModules;
|
|
136
|
+
cycleLength;
|
|
137
|
+
constructor(cycleModules, cycleLength) {
|
|
138
|
+
super('CYCLE_DETECTED');
|
|
139
|
+
this.cycleModules = cycleModules;
|
|
140
|
+
this.cycleLength = cycleLength;
|
|
141
|
+
}
|
|
142
|
+
getDescription() {
|
|
143
|
+
return `Cycle detected: ${this.cycleModules.join(' -> ')} (${this.cycleLength} modules)`;
|
|
144
|
+
}
|
|
145
|
+
toJSON() {
|
|
146
|
+
return {
|
|
147
|
+
...super.toJSON(),
|
|
148
|
+
cycleModules: this.cycleModules,
|
|
149
|
+
cycleLength: this.cycleLength,
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=DomainEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DomainEvent.js","sourceRoot":"","sources":["../../../src/domain/events/DomainEvent.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,mFAAmF;AACnF,+CAA+C;AAC/C,sBAAsB;AACtB,+CAA+C;AAE/C;;;;;;;GAOG;AACH,MAAM,OAAgB,WAAW;IACtB,EAAE,CAAS;IACX,UAAU,CAAO;IACjB,IAAI,CAAS;IAEtB,YAAY,IAAY;QACtB,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI,IAAI,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;QAC5E,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,EAAE,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAOD;;OAEG;IACH,MAAM;QACJ,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE;SAC1C,CAAC;IACJ,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAEpC;IACA;IAFX,YACW,QAAgB,EAChB,IAAY;QAErB,KAAK,CAAC,cAAc,CAAC,CAAC;QAHb,aAAQ,GAAR,QAAQ,CAAQ;QAChB,SAAI,GAAJ,IAAI,CAAQ;IAGvB,CAAC;IAED,cAAc;QACZ,OAAO,iBAAiB,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,QAAQ,GAAG,CAAC;IACzD,CAAC;IAEQ,MAAM;QACb,OAA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Module.js';
|
|
3
|
+
export { Symbol as SymbolEntity } from './entities/Symbol.js';
|
|
4
|
+
export { Dependency } from './entities/Dependency.js';
|
|
5
|
+
export { CodeGraph } from './entities/CodeGraph.js';
|
|
6
|
+
export { CodeGraphBuilder } from './services/CodeGraphBuilder.js';
|
|
7
|
+
export { DomainEvent, ModuleAddedEvent, ModuleRemovedEvent, SymbolAddedEvent, DependencyAddedEvent, CycleDetectedEvent, } from './events/DomainEvent.js';
|
|
8
|
+
export { CodeGraphRepository, RepositoryError, EntityNotFoundError, ConcurrencyConflictError, } from './repositories/CodeGraphRepository.js';
|
|
9
|
+
export type { ModuleAnalysisResult } from './services/CodeGraphBuilder.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/domain/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAGlE,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,uCAAuC,CAAC;AAG/C,YAAY,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// [META] since:2026-03 | owner:architecture-team | stable:true
|
|
2
|
+
// [WHY] Domain layer exports - central entry point for domain logic
|
|
3
|
+
// ============================================
|
|
4
|
+
// Domain 层导出 - 领域逻辑的中央入口点
|
|
5
|
+
// ============================================
|
|
6
|
+
// 领域实体
|
|
7
|
+
export { Project } from './entities/Project.js';
|
|
8
|
+
export { Module } from './entities/Module.js';
|
|
9
|
+
export { Symbol as SymbolEntity } from './entities/Symbol.js';
|
|
10
|
+
export { Dependency } from './entities/Dependency.js';
|
|
11
|
+
export { CodeGraph } from './entities/CodeGraph.js';
|
|
12
|
+
// 领域服务
|
|
13
|
+
export { CodeGraphBuilder } from './services/CodeGraphBuilder.js';
|
|
14
|
+
// 领域事件
|
|
15
|
+
export { DomainEvent, ModuleAddedEvent, ModuleRemovedEvent, SymbolAddedEvent, DependencyAddedEvent, CycleDetectedEvent, } from './events/DomainEvent.js';
|
|
16
|
+
// 仓库接口
|
|
17
|
+
export { RepositoryError, EntityNotFoundError, ConcurrencyConflictError, } from './repositories/CodeGraphRepository.js';
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/domain/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,oEAAoE;AACpE,+CAA+C;AAC/C,0BAA0B;AAC1B,+CAA+C;AAE/C,OAAO;AACP,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO;AACP,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,OAAO;AACP,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AAEjC,OAAO;AACP,OAAO,EAEL,eAAe,EACf,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,uCAAuC,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { CodeGraph } from '../entities/CodeGraph.js';
|
|
2
|
+
/**
|
|
3
|
+
* 代码图仓库接口
|
|
4
|
+
*
|
|
5
|
+
* 职责:
|
|
6
|
+
* - 抽象代码图的持久化机制
|
|
7
|
+
* - 定义领域对象的存储和检索契约
|
|
8
|
+
* - 支持领域驱动设计的仓库模式
|
|
9
|
+
*
|
|
10
|
+
* 注意:实际实现由 Infrastructure 层提供
|
|
11
|
+
*/
|
|
12
|
+
export interface CodeGraphRepository {
|
|
13
|
+
/**
|
|
14
|
+
* 保存代码图
|
|
15
|
+
*/
|
|
16
|
+
save(graph: CodeGraph): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* 根据项目 ID 加载代码图
|
|
19
|
+
*/
|
|
20
|
+
findByProjectId(projectId: string): Promise<CodeGraph | null>;
|
|
21
|
+
/**
|
|
22
|
+
* 根据项目路径加载代码图
|
|
23
|
+
*/
|
|
24
|
+
findByProjectPath(projectPath: string): Promise<CodeGraph | null>;
|
|
25
|
+
/**
|
|
26
|
+
* 检查项目是否存在
|
|
27
|
+
*/
|
|
28
|
+
exists(projectId: string): Promise<boolean>;
|
|
29
|
+
/**
|
|
30
|
+
* 删除项目代码图
|
|
31
|
+
*/
|
|
32
|
+
delete(projectId: string): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* 获取所有保存的项目 ID
|
|
35
|
+
*/
|
|
36
|
+
getAllProjectIds(): Promise<string[]>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* 仓库错误
|
|
40
|
+
*/
|
|
41
|
+
export declare class RepositoryError extends Error {
|
|
42
|
+
readonly code: string;
|
|
43
|
+
readonly cause?: unknown | undefined;
|
|
44
|
+
constructor(message: string, code: string, cause?: unknown | undefined);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* 实体未找到错误
|
|
48
|
+
*/
|
|
49
|
+
export declare class EntityNotFoundError extends RepositoryError {
|
|
50
|
+
constructor(entityType: string, entityId: string);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* 并发冲突错误
|
|
54
|
+
*/
|
|
55
|
+
export declare class ConcurrencyConflictError extends RepositoryError {
|
|
56
|
+
constructor(entityType: string, entityId: string);
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=CodeGraphRepository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeGraphRepository.d.ts","sourceRoot":"","sources":["../../../src/domain/repositories/CodeGraphRepository.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D;;;;;;;;;GASG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtC;;OAEG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IAE9D;;OAEG;IACH,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IAElE;;OAEG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE5C;;OAEG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzC;;OAEG;IACH,gBAAgB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CACvC;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;aAGtB,IAAI,EAAE,MAAM;aACZ,KAAK,CAAC,EAAE,OAAO;gBAF/B,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,OAAO,YAAA;CAKlC;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,eAAe;gBAC1C,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAOjD;AAED;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,eAAe;gBAC/C,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAOjD"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// [META] since:2026-03 | owner:architecture-team | stable:true
|
|
2
|
+
// [WHY] Repository interface - abstracts persistence for CodeGraph aggregate
|
|
3
|
+
// ============================================
|
|
4
|
+
// 仓库接口:代码图聚合的持久化抽象
|
|
5
|
+
// ============================================
|
|
6
|
+
/**
|
|
7
|
+
* 仓库错误
|
|
8
|
+
*/
|
|
9
|
+
export class RepositoryError extends Error {
|
|
10
|
+
code;
|
|
11
|
+
cause;
|
|
12
|
+
constructor(message, code, cause) {
|
|
13
|
+
super(message);
|
|
14
|
+
this.code = code;
|
|
15
|
+
this.cause = cause;
|
|
16
|
+
this.name = 'RepositoryError';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 实体未找到错误
|
|
21
|
+
*/
|
|
22
|
+
export class EntityNotFoundError extends RepositoryError {
|
|
23
|
+
constructor(entityType, entityId) {
|
|
24
|
+
super(`${entityType} with ID ${entityId} not found`, 'ENTITY_NOT_FOUND');
|
|
25
|
+
this.name = 'EntityNotFoundError';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 并发冲突错误
|
|
30
|
+
*/
|
|
31
|
+
export class ConcurrencyConflictError extends RepositoryError {
|
|
32
|
+
constructor(entityType, entityId) {
|
|
33
|
+
super(`${entityType} with ID ${entityId} has been modified by another process`, 'CONCURRENCY_CONFLICT');
|
|
34
|
+
this.name = 'ConcurrencyConflictError';
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=CodeGraphRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeGraphRepository.js","sourceRoot":"","sources":["../../../src/domain/repositories/CodeGraphRepository.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,6EAA6E;AAC7E,+CAA+C;AAC/C,mBAAmB;AACnB,+CAA+C;AA8C/C;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAGtB;IACA;IAHlB,YACE,OAAe,EACC,IAAY,EACZ,KAAe;QAE/B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHC,SAAI,GAAJ,IAAI,CAAQ;QACZ,UAAK,GAAL,KAAK,CAAU;QAG/B,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,eAAe;IACtD,YAAY,UAAkB,EAAE,QAAgB;QAC9C,KAAK,CACH,GAAG,UAAU,YAAY,QAAQ,YAAY,EAC7C,kBAAkB,CACnB,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,wBAAyB,SAAQ,eAAe;IAC3D,YAAY,UAAkB,EAAE,QAAgB;QAC9C,KAAK,CACH,GAAG,UAAU,YAAY,QAAQ,uCAAuC,EACxE,sBAAsB,CACvB,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;IACzC,CAAC;CACF"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { AnalysisOptions, ModuleInfo } from '../../interface/types/index.js';
|
|
2
|
+
import { CodeGraph } from '../entities/CodeGraph.js';
|
|
3
|
+
/**
|
|
4
|
+
* 模块分析结果
|
|
5
|
+
*/
|
|
6
|
+
export interface ModuleAnalysisResult {
|
|
7
|
+
info: ModuleInfo;
|
|
8
|
+
dependencies: Array<{
|
|
9
|
+
targetPath: string;
|
|
10
|
+
type: 'import' | 'inherit' | 'implement' | 'call' | 'type-ref';
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 代码图构建服务
|
|
15
|
+
*
|
|
16
|
+
* 职责:
|
|
17
|
+
* - 从分析结果构建领域模型
|
|
18
|
+
* - 生成唯一标识符
|
|
19
|
+
* - 建立实体间关系
|
|
20
|
+
* - 确保数据一致性
|
|
21
|
+
*/
|
|
22
|
+
export declare class CodeGraphBuilder {
|
|
23
|
+
private moduleIdMap;
|
|
24
|
+
private options;
|
|
25
|
+
constructor(options: AnalysisOptions);
|
|
26
|
+
/**
|
|
27
|
+
* 构建代码图
|
|
28
|
+
* @param projectName - 项目名称
|
|
29
|
+
* @param projectRoot - 项目根路径
|
|
30
|
+
* @param moduleResults - 模块分析结果列表
|
|
31
|
+
*/
|
|
32
|
+
build(projectName: string, projectRoot: string, moduleResults: ModuleAnalysisResult[]): CodeGraph;
|
|
33
|
+
/**
|
|
34
|
+
* 从 CodeMap JSON 重建代码图
|
|
35
|
+
*/
|
|
36
|
+
rebuildFromJSON(data: ReturnType<CodeGraph['toInterface']>): CodeGraph;
|
|
37
|
+
/**
|
|
38
|
+
* 生成唯一 ID
|
|
39
|
+
*/
|
|
40
|
+
private generateId;
|
|
41
|
+
/**
|
|
42
|
+
* 根据文件路径检测语言
|
|
43
|
+
*/
|
|
44
|
+
private detectLanguage;
|
|
45
|
+
/**
|
|
46
|
+
* 创建构建器的工厂方法
|
|
47
|
+
*/
|
|
48
|
+
static create(options: AnalysisOptions): CodeGraphBuilder;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=CodeGraphBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeGraphBuilder.d.ts","sourceRoot":"","sources":["../../../src/domain/services/CodeGraphBuilder.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,eAAe,EACf,UAAU,EAEX,MAAM,gCAAgC,CAAC;AAKxC,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,UAAU,CAAC;IACjB,YAAY,EAAE,KAAK,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,MAAM,GAAG,UAAU,CAAC;KAChE,CAAC,CAAC;CACJ;AAED;;;;;;;;GAQG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,WAAW,CAA6B;IAChD,OAAO,CAAC,OAAO,CAAkB;gBAErB,OAAO,EAAE,eAAe;IAIpC;;;;;OAKG;IACH,KAAK,CACH,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,oBAAoB,EAAE,GACpC,SAAS;IA8EZ;;OAEG;IACH,eAAe,CAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,GAAG,SAAS;IAItE;;OAEG;IACH,OAAO,CAAC,UAAU;IAIlB;;OAEG;IACH,OAAO,CAAC,cAAc;IAsBtB;;OAEG;IACH,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG,gBAAgB;CAG1D"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
// [META] since:2026-03 | owner:architecture-team | stable:true
|
|
2
|
+
// [WHY] Domain service: CodeGraphBuilder - builds CodeGraph from analysis results
|
|
3
|
+
// ============================================
|
|
4
|
+
// 领域服务:代码图构建器 - 从分析结果构建代码图
|
|
5
|
+
// ============================================
|
|
6
|
+
import { randomUUID } from 'crypto';
|
|
7
|
+
import { Project } from '../entities/Project.js';
|
|
8
|
+
import { Module } from '../entities/Module.js';
|
|
9
|
+
import { Symbol as SymbolEntity } from '../entities/Symbol.js';
|
|
10
|
+
import { Dependency } from '../entities/Dependency.js';
|
|
11
|
+
import { CodeGraph } from '../entities/CodeGraph.js';
|
|
12
|
+
/**
|
|
13
|
+
* 代码图构建服务
|
|
14
|
+
*
|
|
15
|
+
* 职责:
|
|
16
|
+
* - 从分析结果构建领域模型
|
|
17
|
+
* - 生成唯一标识符
|
|
18
|
+
* - 建立实体间关系
|
|
19
|
+
* - 确保数据一致性
|
|
20
|
+
*/
|
|
21
|
+
export class CodeGraphBuilder {
|
|
22
|
+
moduleIdMap = new Map(); // path -> id
|
|
23
|
+
options;
|
|
24
|
+
constructor(options) {
|
|
25
|
+
this.options = options;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* 构建代码图
|
|
29
|
+
* @param projectName - 项目名称
|
|
30
|
+
* @param projectRoot - 项目根路径
|
|
31
|
+
* @param moduleResults - 模块分析结果列表
|
|
32
|
+
*/
|
|
33
|
+
build(projectName, projectRoot, moduleResults) {
|
|
34
|
+
// 创建项目
|
|
35
|
+
const project = new Project(this.generateId('proj'), projectName, projectRoot);
|
|
36
|
+
// 创建代码图
|
|
37
|
+
const codeGraph = new CodeGraph(project);
|
|
38
|
+
// 第一遍:创建模块并建立路径到 ID 的映射
|
|
39
|
+
for (const result of moduleResults) {
|
|
40
|
+
const moduleId = this.generateId('mod');
|
|
41
|
+
this.moduleIdMap.set(result.info.path, moduleId);
|
|
42
|
+
const module = new Module(moduleId, project.id, result.info.path, this.detectLanguage(result.info.path), {
|
|
43
|
+
lines: result.info.stats.lines,
|
|
44
|
+
codeLines: result.info.stats.codeLines,
|
|
45
|
+
commentLines: result.info.stats.commentLines,
|
|
46
|
+
blankLines: result.info.stats.blankLines,
|
|
47
|
+
});
|
|
48
|
+
codeGraph.addModule(module);
|
|
49
|
+
}
|
|
50
|
+
// 第二遍:创建符号
|
|
51
|
+
for (const result of moduleResults) {
|
|
52
|
+
const moduleId = this.moduleIdMap.get(result.info.path);
|
|
53
|
+
if (!moduleId)
|
|
54
|
+
continue;
|
|
55
|
+
for (const symbolInfo of result.info.symbols) {
|
|
56
|
+
const symbol = new SymbolEntity(this.generateId('sym'), moduleId, symbolInfo.name, symbolInfo.kind, symbolInfo.location, symbolInfo.visibility);
|
|
57
|
+
codeGraph.addSymbol(symbol);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
// 第三遍:创建依赖关系
|
|
61
|
+
for (const result of moduleResults) {
|
|
62
|
+
const sourceId = this.moduleIdMap.get(result.info.path);
|
|
63
|
+
if (!sourceId)
|
|
64
|
+
continue;
|
|
65
|
+
for (const dep of result.dependencies) {
|
|
66
|
+
const targetId = this.moduleIdMap.get(dep.targetPath);
|
|
67
|
+
if (!targetId)
|
|
68
|
+
continue; // 外部依赖,跳过
|
|
69
|
+
const dependency = new Dependency(this.generateId('dep'), sourceId, targetId, dep.type);
|
|
70
|
+
try {
|
|
71
|
+
codeGraph.addDependency(dependency);
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
// 依赖已存在,忽略
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return codeGraph;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* 从 CodeMap JSON 重建代码图
|
|
82
|
+
*/
|
|
83
|
+
rebuildFromJSON(data) {
|
|
84
|
+
return CodeGraph.fromInterface(data);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* 生成唯一 ID
|
|
88
|
+
*/
|
|
89
|
+
generateId(prefix) {
|
|
90
|
+
return `${prefix}_${randomUUID().replace(/-/g, '').slice(0, 16)}`;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* 根据文件路径检测语言
|
|
94
|
+
*/
|
|
95
|
+
detectLanguage(filePath) {
|
|
96
|
+
const ext = filePath.split('.').pop()?.toLowerCase() ?? '';
|
|
97
|
+
const languageMap = {
|
|
98
|
+
'ts': 'typescript',
|
|
99
|
+
'tsx': 'typescript',
|
|
100
|
+
'js': 'javascript',
|
|
101
|
+
'jsx': 'javascript',
|
|
102
|
+
'py': 'python',
|
|
103
|
+
'go': 'go',
|
|
104
|
+
'java': 'java',
|
|
105
|
+
'rs': 'rust',
|
|
106
|
+
'cpp': 'cpp',
|
|
107
|
+
'cc': 'cpp',
|
|
108
|
+
'c': 'c',
|
|
109
|
+
'h': 'c',
|
|
110
|
+
'hpp': 'cpp',
|
|
111
|
+
};
|
|
112
|
+
return languageMap[ext] ?? 'unknown';
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* 创建构建器的工厂方法
|
|
116
|
+
*/
|
|
117
|
+
static create(options) {
|
|
118
|
+
return new CodeGraphBuilder(options);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=CodeGraphBuilder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeGraphBuilder.js","sourceRoot":"","sources":["../../../src/domain/services/CodeGraphBuilder.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,kFAAkF;AAClF,+CAA+C;AAC/C,2BAA2B;AAC3B,+CAA+C;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAMpC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAarD;;;;;;;;GAQG;AACH,MAAM,OAAO,gBAAgB;IACnB,WAAW,GAAG,IAAI,GAAG,EAAkB,CAAC,CAAC,aAAa;IACtD,OAAO,CAAkB;IAEjC,YAAY,OAAwB;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CACH,WAAmB,EACnB,WAAmB,EACnB,aAAqC;QAErC,OAAO;QACP,MAAM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AAC;IAED;;OAEG;IACK,cAAc,CAAC,QAAgB;QACrC,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;QAE3D,MAAM,WAAW,GAA2B;YAC1C,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,KAAK;YACZ,IAAI,EAAE,KAAK;YACX,GAAG,EAAE,GAAG;YACR,GAAG,EAAE,GAAG;YACR,KAAK,EAAE,KAAK;SACb,CAAC;QAEF,OAAO,WAAW,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC;IACvC,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,MAAM,CAAC,OAAwB;QACpC,OAAO,IAAI,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;CACF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ParseOptions, ParseResult } from '../../../interface/types/parser.js';
|
|
2
|
+
import type { ModuleSymbol, ImportInfo, ExportInfo } from '../../../interface/types/index.js';
|
|
3
|
+
import { ParserBase } from '../interfaces/ParserBase.js';
|
|
4
|
+
/**
|
|
5
|
+
* Go 语言解析器
|
|
6
|
+
*
|
|
7
|
+
* TODO-DEBT [L1] [日期:2026-03-17] [作者:AI] [原因:MVP阶段仅实现框架]
|
|
8
|
+
* 问题:目前仅返回空结果
|
|
9
|
+
* 风险:无法实际解析 Go 代码
|
|
10
|
+
* 偿还计划:V1.0 实现完整 Go 解析器
|
|
11
|
+
*/
|
|
12
|
+
export declare class GoParser extends ParserBase {
|
|
13
|
+
readonly languageId: "go";
|
|
14
|
+
readonly fileExtensions: string[];
|
|
15
|
+
readonly name = "Go Parser";
|
|
16
|
+
protected supportedFeatures: Set<"call-graph" | "cross-file-analysis" | "complexity-metrics">;
|
|
17
|
+
protected doInitialize(): Promise<void>;
|
|
18
|
+
protected doDispose(): Promise<void>;
|
|
19
|
+
parseFile(filePath: string, content: string, options?: ParseOptions): Promise<ParseResult>;
|
|
20
|
+
extractImports(content: string): Promise<ImportInfo[]>;
|
|
21
|
+
extractExports(content: string): Promise<ExportInfo[]>;
|
|
22
|
+
extractSymbols(content: string): Promise<ModuleSymbol[]>;
|
|
23
|
+
private getLineNumber;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=GoParser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GoParser.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/parser/implementations/GoParser.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EACZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAEV,YAAY,EACZ,UAAU,EACV,UAAU,EAEX,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAc,MAAM,6BAA6B,CAAC;AAErE;;;;;;;GAOG;AACH,qBAAa,QAAS,SAAQ,UAAU;IACtC,QAAQ,CAAC,UAAU,EAAG,IAAI,CAAU;IACpC,QAAQ,CAAC,cAAc,WAAU;IACjC,QAAQ,CAAC,IAAI,eAAe;IAE5B,SAAS,CAAC,iBAAiB,mEAIf;cAEI,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;cAI7B,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAIpC,SAAS,CACb,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,WAAW,CAAC;IAkDjB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAwCtD,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAuBtD,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAwC9D,OAAO,CAAC,aAAa;CAGtB"}
|