agent-ide 0.8.0 → 0.8.2
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/application/index.d.ts +1 -12
- package/dist/application/index.d.ts.map +1 -1
- package/dist/application/index.js +0 -16
- package/dist/application/index.js.map +1 -1
- package/dist/application/services/cache-coordinator.service.d.ts.map +1 -1
- package/dist/application/services/cache-coordinator.service.js.map +1 -1
- package/dist/application/services/module-coordinator.service.d.ts +3 -8
- package/dist/application/services/module-coordinator.service.d.ts.map +1 -1
- package/dist/application/services/module-coordinator.service.js +5 -139
- package/dist/application/services/module-coordinator.service.js.map +1 -1
- package/dist/application/types.d.ts +0 -63
- package/dist/application/types.d.ts.map +1 -1
- package/dist/application/types.js +1 -9
- package/dist/application/types.js.map +1 -1
- package/dist/core/call-hierarchy/call-hierarchy-analyzer.d.ts.map +1 -1
- package/dist/core/call-hierarchy/call-hierarchy-analyzer.js +3 -5
- package/dist/core/call-hierarchy/call-hierarchy-analyzer.js.map +1 -1
- package/dist/core/change-signature/change-signature-service.d.ts +9 -0
- package/dist/core/change-signature/change-signature-service.d.ts.map +1 -1
- package/dist/core/change-signature/change-signature-service.js +86 -4
- package/dist/core/change-signature/change-signature-service.js.map +1 -1
- package/dist/core/change-signature/signature-parser.d.ts +46 -4
- package/dist/core/change-signature/signature-parser.d.ts.map +1 -1
- package/dist/core/change-signature/signature-parser.js +180 -9
- package/dist/core/change-signature/signature-parser.js.map +1 -1
- package/dist/core/deadcode/dead-code-detector.d.ts +22 -1
- package/dist/core/deadcode/dead-code-detector.d.ts.map +1 -1
- package/dist/core/deadcode/dead-code-detector.js +134 -61
- package/dist/core/deadcode/dead-code-detector.js.map +1 -1
- package/dist/core/deadcode/dead-code-remover.d.ts +11 -93
- package/dist/core/deadcode/dead-code-remover.d.ts.map +1 -1
- package/dist/core/deadcode/dead-code-remover.js +71 -690
- package/dist/core/deadcode/dead-code-remover.js.map +1 -1
- package/dist/core/deadcode/file-operations.d.ts +85 -0
- package/dist/core/deadcode/file-operations.d.ts.map +1 -0
- package/dist/core/deadcode/file-operations.js +263 -0
- package/dist/core/deadcode/file-operations.js.map +1 -0
- package/dist/core/deadcode/import-cleaner.d.ts +63 -0
- package/dist/core/deadcode/import-cleaner.d.ts.map +1 -0
- package/dist/core/deadcode/import-cleaner.js +229 -0
- package/dist/core/deadcode/import-cleaner.js.map +1 -0
- package/dist/core/deadcode/import-parser.d.ts +79 -0
- package/dist/core/deadcode/import-parser.d.ts.map +1 -0
- package/dist/core/deadcode/import-parser.js +229 -0
- package/dist/core/deadcode/import-parser.js.map +1 -0
- package/dist/core/deadcode/range-expander.d.ts +38 -0
- package/dist/core/deadcode/range-expander.d.ts.map +1 -0
- package/dist/core/deadcode/range-expander.js +175 -0
- package/dist/core/deadcode/range-expander.js.map +1 -0
- package/dist/core/deadcode/types.d.ts +2 -0
- package/dist/core/deadcode/types.d.ts.map +1 -1
- package/dist/core/deadcode/types.js.map +1 -1
- package/dist/core/find-references/index.d.ts +2 -2
- package/dist/core/find-references/index.d.ts.map +1 -1
- package/dist/core/find-references/index.js +1 -1
- package/dist/core/find-references/index.js.map +1 -1
- package/dist/core/move/import-resolver.d.ts +5 -0
- package/dist/core/move/import-resolver.d.ts.map +1 -1
- package/dist/core/move/import-resolver.js +7 -0
- package/dist/core/move/import-resolver.js.map +1 -1
- package/dist/core/move/move-service.d.ts +39 -1
- package/dist/core/move/move-service.d.ts.map +1 -1
- package/dist/core/move/move-service.js +230 -63
- package/dist/core/move/move-service.js.map +1 -1
- package/dist/core/move/types.d.ts.map +1 -1
- package/dist/core/move-member/member-extractor.d.ts.map +1 -1
- package/dist/core/move-member/member-extractor.js +2 -2
- package/dist/core/move-member/member-extractor.js.map +1 -1
- package/dist/core/move-member/move-member-service.d.ts +6 -0
- package/dist/core/move-member/move-member-service.d.ts.map +1 -1
- package/dist/core/move-member/move-member-service.js +60 -3
- package/dist/core/move-member/move-member-service.js.map +1 -1
- package/dist/core/move-member/types.d.ts.map +1 -1
- package/dist/core/rename/reference-updater.d.ts +1 -35
- package/dist/core/rename/reference-updater.d.ts.map +1 -1
- package/dist/core/rename/reference-updater.js +4 -250
- package/dist/core/rename/reference-updater.js.map +1 -1
- package/dist/core/rename/rename-engine.d.ts +14 -22
- package/dist/core/rename/rename-engine.d.ts.map +1 -1
- package/dist/core/rename/rename-engine.js +37 -207
- package/dist/core/rename/rename-engine.js.map +1 -1
- package/dist/core/rename/scope-analyzer.d.ts.map +1 -1
- package/dist/core/shared/index.d.ts +1 -1
- package/dist/core/shared/index.d.ts.map +1 -1
- package/dist/core/shared/index.js +1 -1
- package/dist/core/shared/index.js.map +1 -1
- package/dist/core/shared/indexing/index-engine.d.ts +1 -1
- package/dist/core/shared/indexing/index-engine.d.ts.map +1 -1
- package/dist/core/shared/indexing/index-engine.js +1 -1
- package/dist/core/shared/indexing/index-engine.js.map +1 -1
- package/dist/core/shared/symbol-finder/call-site-parser.d.ts +71 -0
- package/dist/core/shared/symbol-finder/call-site-parser.d.ts.map +1 -0
- package/dist/core/shared/symbol-finder/call-site-parser.js +369 -0
- package/dist/core/shared/symbol-finder/call-site-parser.js.map +1 -0
- package/dist/core/shared/symbol-finder/index.d.ts +9 -0
- package/dist/core/shared/symbol-finder/index.d.ts.map +1 -0
- package/dist/core/shared/symbol-finder/index.js +12 -0
- package/dist/core/shared/symbol-finder/index.js.map +1 -0
- package/dist/core/shared/{symbol-finder.d.ts → symbol-finder/symbol-finder.d.ts} +27 -133
- package/dist/core/shared/symbol-finder/symbol-finder.d.ts.map +1 -0
- package/dist/core/shared/symbol-finder/symbol-finder.js +544 -0
- package/dist/core/shared/symbol-finder/symbol-finder.js.map +1 -0
- package/dist/core/shared/symbol-finder/text-matcher.d.ts +45 -0
- package/dist/core/shared/symbol-finder/text-matcher.d.ts.map +1 -0
- package/dist/core/shared/symbol-finder/text-matcher.js +195 -0
- package/dist/core/shared/symbol-finder/text-matcher.js.map +1 -0
- package/dist/core/shared/symbol-finder/types.d.ts +108 -0
- package/dist/core/shared/symbol-finder/types.d.ts.map +1 -0
- package/dist/core/shared/symbol-finder/types.js +71 -0
- package/dist/core/shared/symbol-finder/types.js.map +1 -0
- package/dist/core/snapshot/snapshot-generator.d.ts +16 -4
- package/dist/core/snapshot/snapshot-generator.d.ts.map +1 -1
- package/dist/core/snapshot/snapshot-generator.js +91 -18
- package/dist/core/snapshot/snapshot-generator.js.map +1 -1
- package/dist/infrastructure/cache/cache-manager.d.ts.map +1 -1
- package/dist/infrastructure/cache/cache-manager.js +4 -0
- package/dist/infrastructure/cache/cache-manager.js.map +1 -1
- package/dist/infrastructure/cache/index.d.ts +15 -9
- package/dist/infrastructure/cache/index.d.ts.map +1 -1
- package/dist/infrastructure/cache/index.js +5 -5
- package/dist/infrastructure/cache/index.js.map +1 -1
- package/dist/infrastructure/cache/memory-cache.d.ts.map +1 -1
- package/dist/infrastructure/cache/memory-cache.js.map +1 -1
- package/dist/infrastructure/cache/strategies.d.ts.map +1 -1
- package/dist/infrastructure/cache/strategies.js +2 -1
- package/dist/infrastructure/cache/strategies.js.map +1 -1
- package/dist/infrastructure/cache/types.d.ts +4 -4
- package/dist/infrastructure/cache/types.d.ts.map +1 -1
- package/dist/infrastructure/changeset/change-applicator.d.ts +95 -0
- package/dist/infrastructure/changeset/change-applicator.d.ts.map +1 -0
- package/dist/infrastructure/changeset/change-applicator.js +466 -0
- package/dist/infrastructure/changeset/change-applicator.js.map +1 -0
- package/dist/infrastructure/changeset/changeset-builder.d.ts +107 -0
- package/dist/infrastructure/changeset/changeset-builder.d.ts.map +1 -0
- package/dist/infrastructure/changeset/changeset-builder.js +183 -0
- package/dist/infrastructure/changeset/changeset-builder.js.map +1 -0
- package/dist/infrastructure/changeset/changeset-converter.d.ts +15 -0
- package/dist/infrastructure/changeset/changeset-converter.d.ts.map +1 -0
- package/dist/infrastructure/changeset/changeset-converter.js +369 -0
- package/dist/infrastructure/changeset/changeset-converter.js.map +1 -0
- package/dist/infrastructure/changeset/index.d.ts +9 -0
- package/dist/infrastructure/changeset/index.d.ts.map +1 -0
- package/dist/infrastructure/changeset/index.js +11 -0
- package/dist/infrastructure/changeset/index.js.map +1 -0
- package/dist/infrastructure/changeset/types.d.ts +110 -0
- package/dist/infrastructure/changeset/types.d.ts.map +1 -0
- package/dist/infrastructure/changeset/types.js +6 -0
- package/dist/infrastructure/changeset/types.js.map +1 -0
- package/dist/infrastructure/parser/base.d.ts.map +1 -1
- package/dist/infrastructure/parser/base.js +4 -3
- package/dist/infrastructure/parser/base.js.map +1 -1
- package/dist/infrastructure/parser/interface.d.ts +4 -2
- package/dist/infrastructure/parser/interface.d.ts.map +1 -1
- package/dist/infrastructure/parser/interface.js.map +1 -1
- package/dist/infrastructure/storage/file-system.d.ts.map +1 -1
- package/dist/infrastructure/storage/file-system.js +61 -54
- package/dist/infrastructure/storage/file-system.js.map +1 -1
- package/dist/interfaces/cli/commands/change-signature.command.d.ts.map +1 -1
- package/dist/interfaces/cli/commands/change-signature.command.js +31 -107
- package/dist/interfaces/cli/commands/change-signature.command.js.map +1 -1
- package/dist/interfaces/cli/commands/deadcode.command.js +51 -46
- package/dist/interfaces/cli/commands/deadcode.command.js.map +1 -1
- package/dist/interfaces/cli/commands/find-references.command.d.ts.map +1 -1
- package/dist/interfaces/cli/commands/find-references.command.js +18 -3
- package/dist/interfaces/cli/commands/find-references.command.js.map +1 -1
- package/dist/interfaces/cli/commands/move-member.command.d.ts.map +1 -1
- package/dist/interfaces/cli/commands/move-member.command.js +32 -103
- package/dist/interfaces/cli/commands/move-member.command.js.map +1 -1
- package/dist/interfaces/cli/commands/move.command.js +43 -54
- package/dist/interfaces/cli/commands/move.command.js.map +1 -1
- package/dist/interfaces/cli/commands/rename.command.js +27 -61
- package/dist/interfaces/cli/commands/rename.command.js.map +1 -1
- package/dist/interfaces/cli/output-formatter.d.ts +2 -2
- package/dist/interfaces/cli/output-formatter.d.ts.map +1 -1
- package/dist/interfaces/cli/output-formatter.js.map +1 -1
- package/dist/plugins/javascript/declaration-analyzer.d.ts.map +1 -1
- package/dist/plugins/javascript/declaration-analyzer.js +7 -0
- package/dist/plugins/javascript/declaration-analyzer.js.map +1 -1
- package/dist/plugins/javascript/parser.d.ts +11 -10
- package/dist/plugins/javascript/parser.d.ts.map +1 -1
- package/dist/plugins/javascript/parser.js +57 -53
- package/dist/plugins/javascript/parser.js.map +1 -1
- package/dist/plugins/javascript/pattern-analyzer.d.ts.map +1 -1
- package/dist/plugins/javascript/pattern-analyzer.js +4 -3
- package/dist/plugins/javascript/pattern-analyzer.js.map +1 -1
- package/dist/plugins/javascript/reference-finder.d.ts +21 -0
- package/dist/plugins/javascript/reference-finder.d.ts.map +1 -1
- package/dist/plugins/javascript/reference-finder.js +119 -76
- package/dist/plugins/javascript/reference-finder.js.map +1 -1
- package/dist/plugins/javascript/types.d.ts +4 -7
- package/dist/plugins/javascript/types.d.ts.map +1 -1
- package/dist/plugins/javascript/types.js +9 -9
- package/dist/plugins/javascript/types.js.map +1 -1
- package/dist/plugins/shared/parser-helpers.js.map +1 -1
- package/dist/{shared → plugins/shared}/utils/array.d.ts +6 -1
- package/dist/plugins/shared/utils/array.d.ts.map +1 -0
- package/dist/plugins/shared/utils/array.js.map +1 -0
- package/dist/{shared → plugins/shared}/utils/async.d.ts +1 -1
- package/dist/plugins/shared/utils/async.d.ts.map +1 -0
- package/dist/{shared → plugins/shared}/utils/async.js +2 -0
- package/dist/plugins/shared/utils/async.js.map +1 -0
- package/dist/{shared → plugins/shared}/utils/index.d.ts +0 -20
- package/dist/plugins/shared/utils/index.d.ts.map +1 -0
- package/dist/{shared → plugins/shared}/utils/index.js +0 -20
- package/dist/plugins/shared/utils/index.js.map +1 -0
- package/dist/plugins/shared/utils/memory-monitor.d.ts.map +1 -0
- package/dist/plugins/shared/utils/memory-monitor.js.map +1 -0
- package/dist/{shared → plugins/shared}/utils/object.d.ts +6 -6
- package/dist/plugins/shared/utils/object.d.ts.map +1 -0
- package/dist/{shared → plugins/shared}/utils/object.js +21 -3
- package/dist/plugins/shared/utils/object.js.map +1 -0
- package/dist/plugins/shared/utils/path.d.ts.map +1 -0
- package/dist/plugins/shared/utils/path.js.map +1 -0
- package/dist/{shared → plugins/shared}/utils/string.d.ts +1 -1
- package/dist/plugins/shared/utils/string.d.ts.map +1 -0
- package/dist/{shared → plugins/shared}/utils/string.js +7 -4
- package/dist/plugins/shared/utils/string.js.map +1 -0
- package/dist/plugins/typescript/declaration-analyzer.d.ts +4 -4
- package/dist/plugins/typescript/declaration-analyzer.d.ts.map +1 -1
- package/dist/plugins/typescript/declaration-analyzer.js +21 -8
- package/dist/plugins/typescript/declaration-analyzer.js.map +1 -1
- package/dist/plugins/typescript/language-service.d.ts +1 -1
- package/dist/plugins/typescript/language-service.d.ts.map +1 -1
- package/dist/plugins/typescript/parser.d.ts +3 -2
- package/dist/plugins/typescript/parser.d.ts.map +1 -1
- package/dist/plugins/typescript/parser.js +18 -13
- package/dist/plugins/typescript/parser.js.map +1 -1
- package/dist/plugins/typescript/reference-finder.d.ts +3 -0
- package/dist/plugins/typescript/reference-finder.d.ts.map +1 -1
- package/dist/plugins/typescript/reference-finder.js +5 -2
- package/dist/plugins/typescript/reference-finder.js.map +1 -1
- package/dist/plugins/typescript/symbol-extractor.d.ts +4 -0
- package/dist/plugins/typescript/symbol-extractor.d.ts.map +1 -1
- package/dist/plugins/typescript/symbol-extractor.js +18 -4
- package/dist/plugins/typescript/symbol-extractor.js.map +1 -1
- package/dist/plugins/typescript/types.d.ts +0 -3
- package/dist/plugins/typescript/types.d.ts.map +1 -1
- package/dist/plugins/typescript/types.js +6 -9
- package/dist/plugins/typescript/types.js.map +1 -1
- package/dist/shared/errors/index.d.ts +1 -1
- package/dist/shared/errors/index.d.ts.map +1 -1
- package/dist/shared/errors/parser-error.js +5 -5
- package/dist/shared/errors/parser-error.js.map +1 -1
- package/dist/shared/errors/validation-error.d.ts +2 -2
- package/dist/shared/errors/validation-error.d.ts.map +1 -1
- package/dist/shared/errors/validation-error.js.map +1 -1
- package/dist/shared/types/ast.d.ts +4 -4
- package/dist/shared/types/ast.d.ts.map +1 -1
- package/dist/shared/types/ast.js.map +1 -1
- package/dist/shared/types/core.d.ts +1 -1
- package/dist/shared/types/core.d.ts.map +1 -1
- package/dist/shared/types/index.d.ts +1 -0
- package/dist/shared/types/index.d.ts.map +1 -1
- package/dist/shared/types/index.js +2 -0
- package/dist/shared/types/index.js.map +1 -1
- package/dist/shared/types/line-number.d.ts +22 -0
- package/dist/shared/types/line-number.d.ts.map +1 -0
- package/dist/shared/types/line-number.js +28 -0
- package/dist/shared/types/line-number.js.map +1 -0
- package/package.json +2 -2
- package/dist/application/services/workflow-engine.service.d.ts +0 -76
- package/dist/application/services/workflow-engine.service.d.ts.map +0 -1
- package/dist/application/services/workflow-engine.service.js +0 -405
- package/dist/application/services/workflow-engine.service.js.map +0 -1
- package/dist/application/workflows/analysis-workflow.d.ts +0 -239
- package/dist/application/workflows/analysis-workflow.d.ts.map +0 -1
- package/dist/application/workflows/analysis-workflow.js +0 -395
- package/dist/application/workflows/analysis-workflow.js.map +0 -1
- package/dist/application/workflows/base-workflow.d.ts +0 -108
- package/dist/application/workflows/base-workflow.d.ts.map +0 -1
- package/dist/application/workflows/base-workflow.js +0 -236
- package/dist/application/workflows/base-workflow.js.map +0 -1
- package/dist/application/workflows/index.d.ts +0 -115
- package/dist/application/workflows/index.d.ts.map +0 -1
- package/dist/application/workflows/index.js +0 -218
- package/dist/application/workflows/index.js.map +0 -1
- package/dist/application/workflows/refactor-workflow.d.ts +0 -107
- package/dist/application/workflows/refactor-workflow.d.ts.map +0 -1
- package/dist/application/workflows/refactor-workflow.js +0 -310
- package/dist/application/workflows/refactor-workflow.js.map +0 -1
- package/dist/core/shared/symbol-finder.d.ts.map +0 -1
- package/dist/core/shared/symbol-finder.js +0 -882
- package/dist/core/shared/symbol-finder.js.map +0 -1
- package/dist/plugins/javascript/code-analyzer.d.ts +0 -68
- package/dist/plugins/javascript/code-analyzer.d.ts.map +0 -1
- package/dist/plugins/javascript/code-analyzer.js +0 -302
- package/dist/plugins/javascript/code-analyzer.js.map +0 -1
- package/dist/plugins/javascript/index.d.ts +0 -12
- package/dist/plugins/javascript/index.d.ts.map +0 -1
- package/dist/plugins/javascript/index.js +0 -16
- package/dist/plugins/javascript/index.js.map +0 -1
- package/dist/plugins/typescript/index.d.ts +0 -14
- package/dist/plugins/typescript/index.d.ts.map +0 -1
- package/dist/plugins/typescript/index.js +0 -13
- package/dist/plugins/typescript/index.js.map +0 -1
- package/dist/shared/utils/array.d.ts.map +0 -1
- package/dist/shared/utils/array.js.map +0 -1
- package/dist/shared/utils/async.d.ts.map +0 -1
- package/dist/shared/utils/async.js.map +0 -1
- package/dist/shared/utils/index.d.ts.map +0 -1
- package/dist/shared/utils/index.js.map +0 -1
- package/dist/shared/utils/memory-monitor.d.ts.map +0 -1
- package/dist/shared/utils/memory-monitor.js.map +0 -1
- package/dist/shared/utils/object.d.ts.map +0 -1
- package/dist/shared/utils/object.js.map +0 -1
- package/dist/shared/utils/path.d.ts.map +0 -1
- package/dist/shared/utils/path.js.map +0 -1
- package/dist/shared/utils/string.d.ts.map +0 -1
- package/dist/shared/utils/string.js.map +0 -1
- /package/dist/{shared → plugins/shared}/utils/array.js +0 -0
- /package/dist/{shared → plugins/shared}/utils/memory-monitor.d.ts +0 -0
- /package/dist/{shared → plugins/shared}/utils/memory-monitor.js +0 -0
- /package/dist/{shared → plugins/shared}/utils/path.d.ts +0 -0
- /package/dist/{shared → plugins/shared}/utils/path.js +0 -0
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AnalysisWorkflow 程式碼分析工作流程實作
|
|
3
|
-
* 實作程式碼分析的完整工作流程:索引 → 複雜度分析 → 依賴分析 → 生成報告
|
|
4
|
-
*/
|
|
5
|
-
import { BaseWorkflow } from '../workflows/base-workflow.js';
|
|
6
|
-
import { BaseError } from '../../shared/errors/base-error.js';
|
|
7
|
-
import type { IModuleCoordinatorService } from '../types.js';
|
|
8
|
-
/**
|
|
9
|
-
* 分析類型枚舉
|
|
10
|
-
*/
|
|
11
|
-
export declare enum AnalysisType {
|
|
12
|
-
COMPLEXITY = "complexity",
|
|
13
|
-
DEPENDENCY = "dependency",
|
|
14
|
-
QUALITY = "quality",
|
|
15
|
-
DEAD_CODE = "dead-code",
|
|
16
|
-
DUPLICATION = "duplication",
|
|
17
|
-
COMPREHENSIVE = "comprehensive"
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* 分析工作流程輸入
|
|
21
|
-
*/
|
|
22
|
-
export interface AnalysisWorkflowInput {
|
|
23
|
-
target: string;
|
|
24
|
-
analysisTypes: AnalysisType[];
|
|
25
|
-
options?: {
|
|
26
|
-
includeTests?: boolean;
|
|
27
|
-
excludePatterns?: string[];
|
|
28
|
-
outputFormat?: 'json' | 'markdown' | 'html';
|
|
29
|
-
includeRecommendations?: boolean;
|
|
30
|
-
detailLevel?: 'basic' | 'detailed' | 'comprehensive';
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* 分析工作流程上下文
|
|
35
|
-
*/
|
|
36
|
-
export interface AnalysisWorkflowContext {
|
|
37
|
-
target: string;
|
|
38
|
-
analysisTypes: AnalysisType[];
|
|
39
|
-
options: Required<AnalysisWorkflowInput['options']>;
|
|
40
|
-
indexResult?: {
|
|
41
|
-
totalFiles: number;
|
|
42
|
-
indexedFiles: string[];
|
|
43
|
-
symbols: unknown[];
|
|
44
|
-
dependencies: unknown[];
|
|
45
|
-
};
|
|
46
|
-
complexityResult?: {
|
|
47
|
-
overallComplexity: number;
|
|
48
|
-
fileComplexities: Map<string, number>;
|
|
49
|
-
hotspots: Array<{
|
|
50
|
-
file: string;
|
|
51
|
-
complexity: number;
|
|
52
|
-
line?: number;
|
|
53
|
-
}>;
|
|
54
|
-
};
|
|
55
|
-
dependencyResult?: {
|
|
56
|
-
dependencies: unknown[];
|
|
57
|
-
circularDependencies: unknown[];
|
|
58
|
-
dependencyGraph: unknown;
|
|
59
|
-
metrics: unknown;
|
|
60
|
-
};
|
|
61
|
-
qualityResult?: {
|
|
62
|
-
codeSmells: unknown[];
|
|
63
|
-
suggestions: string[];
|
|
64
|
-
metrics: unknown;
|
|
65
|
-
};
|
|
66
|
-
deadCodeResult?: {
|
|
67
|
-
deadFunctions: unknown[];
|
|
68
|
-
deadVariables: unknown[];
|
|
69
|
-
deadImports: unknown[];
|
|
70
|
-
};
|
|
71
|
-
duplicationResult?: {
|
|
72
|
-
duplicatedBlocks: unknown[];
|
|
73
|
-
duplicationRate: number;
|
|
74
|
-
suggestions: string[];
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* 分析報告
|
|
79
|
-
*/
|
|
80
|
-
export interface AnalysisReport {
|
|
81
|
-
summary: {
|
|
82
|
-
target: string;
|
|
83
|
-
analysisTypes: AnalysisType[];
|
|
84
|
-
totalFiles: number;
|
|
85
|
-
analysisDate: string;
|
|
86
|
-
duration: number;
|
|
87
|
-
};
|
|
88
|
-
complexity?: {
|
|
89
|
-
overallScore: number;
|
|
90
|
-
averageComplexity: number;
|
|
91
|
-
highComplexityFiles: Array<{
|
|
92
|
-
file: string;
|
|
93
|
-
score: number;
|
|
94
|
-
}>;
|
|
95
|
-
recommendations: string[];
|
|
96
|
-
};
|
|
97
|
-
dependencies?: {
|
|
98
|
-
totalDependencies: number;
|
|
99
|
-
circularDependencies: number;
|
|
100
|
-
dependencyDepth: number;
|
|
101
|
-
recommendations: string[];
|
|
102
|
-
};
|
|
103
|
-
quality?: {
|
|
104
|
-
overallQuality: number;
|
|
105
|
-
codeSmellCount: number;
|
|
106
|
-
maintainabilityIndex: number;
|
|
107
|
-
recommendations: string[];
|
|
108
|
-
};
|
|
109
|
-
deadCode?: {
|
|
110
|
-
deadCodePercentage: number;
|
|
111
|
-
functionsToRemove: number;
|
|
112
|
-
variablesToRemove: number;
|
|
113
|
-
importsToRemove: number;
|
|
114
|
-
recommendations: string[];
|
|
115
|
-
};
|
|
116
|
-
duplication?: {
|
|
117
|
-
duplicationRate: number;
|
|
118
|
-
duplicatedLinesCount: number;
|
|
119
|
-
blocksToRefactor: number;
|
|
120
|
-
recommendations: string[];
|
|
121
|
-
};
|
|
122
|
-
recommendations: string[];
|
|
123
|
-
actionItems: Array<{
|
|
124
|
-
priority: 'high' | 'medium' | 'low';
|
|
125
|
-
category: string;
|
|
126
|
-
description: string;
|
|
127
|
-
effort: 'low' | 'medium' | 'high';
|
|
128
|
-
}>;
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* 分析工作流程結果
|
|
132
|
-
*/
|
|
133
|
-
export interface AnalysisWorkflowResult {
|
|
134
|
-
success: boolean;
|
|
135
|
-
report: AnalysisReport;
|
|
136
|
-
rawData?: {
|
|
137
|
-
complexity?: unknown;
|
|
138
|
-
dependencies?: unknown;
|
|
139
|
-
quality?: unknown;
|
|
140
|
-
deadCode?: unknown;
|
|
141
|
-
duplication?: unknown;
|
|
142
|
-
};
|
|
143
|
-
error?: BaseError;
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* AnalysisWorkflow 實作
|
|
147
|
-
*/
|
|
148
|
-
export declare class AnalysisWorkflow extends BaseWorkflow<AnalysisWorkflowContext, AnalysisWorkflowResult> {
|
|
149
|
-
constructor(moduleCoordinator: IModuleCoordinatorService);
|
|
150
|
-
/**
|
|
151
|
-
* 定義分析工作流程步驟
|
|
152
|
-
*/
|
|
153
|
-
protected defineSteps(): void;
|
|
154
|
-
/**
|
|
155
|
-
* 初始化工作流程上下文
|
|
156
|
-
*/
|
|
157
|
-
protected initializeContext(input: unknown): Promise<AnalysisWorkflowContext>;
|
|
158
|
-
/**
|
|
159
|
-
* 處理工作流程結果
|
|
160
|
-
*/
|
|
161
|
-
protected processResult(context: AnalysisWorkflowContext): Promise<AnalysisWorkflowResult>;
|
|
162
|
-
/**
|
|
163
|
-
* 步驟 1: 建立索引
|
|
164
|
-
*/
|
|
165
|
-
private createIndex;
|
|
166
|
-
/**
|
|
167
|
-
* 步驟 2: 複雜度分析
|
|
168
|
-
*/
|
|
169
|
-
private analyzeComplexity;
|
|
170
|
-
/**
|
|
171
|
-
* 步驟 3: 依賴分析
|
|
172
|
-
*/
|
|
173
|
-
private analyzeDependencies;
|
|
174
|
-
/**
|
|
175
|
-
* 步驟 4: 品質分析
|
|
176
|
-
*/
|
|
177
|
-
private analyzeQuality;
|
|
178
|
-
/**
|
|
179
|
-
* 步驟 5: 死代碼檢測
|
|
180
|
-
*/
|
|
181
|
-
private detectDeadCode;
|
|
182
|
-
/**
|
|
183
|
-
* 步驟 6: 重複代碼檢測
|
|
184
|
-
*/
|
|
185
|
-
private detectDuplication;
|
|
186
|
-
/**
|
|
187
|
-
* 步驟 7: 生成報告
|
|
188
|
-
*/
|
|
189
|
-
private generateReport;
|
|
190
|
-
/**
|
|
191
|
-
* 驗證輸入格式
|
|
192
|
-
*/
|
|
193
|
-
private isValidInput;
|
|
194
|
-
/**
|
|
195
|
-
* 從元數據獲取上下文
|
|
196
|
-
*/
|
|
197
|
-
private getContextFromMetadata;
|
|
198
|
-
/**
|
|
199
|
-
* 檢查是否應該執行特定分析
|
|
200
|
-
*/
|
|
201
|
-
private shouldRunAnalysis;
|
|
202
|
-
/**
|
|
203
|
-
* 執行索引建立
|
|
204
|
-
*/
|
|
205
|
-
private performIndexing;
|
|
206
|
-
/**
|
|
207
|
-
* 執行複雜度分析
|
|
208
|
-
*/
|
|
209
|
-
private performComplexityAnalysis;
|
|
210
|
-
/**
|
|
211
|
-
* 執行依賴分析
|
|
212
|
-
*/
|
|
213
|
-
private performDependencyAnalysis;
|
|
214
|
-
/**
|
|
215
|
-
* 執行品質分析
|
|
216
|
-
*/
|
|
217
|
-
private performQualityAnalysis;
|
|
218
|
-
/**
|
|
219
|
-
* 執行死代碼檢測
|
|
220
|
-
*/
|
|
221
|
-
private performDeadCodeDetection;
|
|
222
|
-
/**
|
|
223
|
-
* 執行重複代碼檢測
|
|
224
|
-
*/
|
|
225
|
-
private performDuplicationDetection;
|
|
226
|
-
/**
|
|
227
|
-
* 建立分析報告
|
|
228
|
-
*/
|
|
229
|
-
private createAnalysisReport;
|
|
230
|
-
/**
|
|
231
|
-
* 生成整體建議
|
|
232
|
-
*/
|
|
233
|
-
private generateOverallRecommendations;
|
|
234
|
-
/**
|
|
235
|
-
* 生成行動項目
|
|
236
|
-
*/
|
|
237
|
-
private generateActionItems;
|
|
238
|
-
}
|
|
239
|
-
//# sourceMappingURL=analysis-workflow.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"analysis-workflow.d.ts","sourceRoot":"","sources":["../../../src/application/workflows/analysis-workflow.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAmC,MAAM,yCAAyC,CAAC;AACxG,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,EACV,yBAAyB,EAE1B,MAAM,aAAa,CAAC;AAErB;;GAEG;AACH,oBAAY,YAAY;IACtB,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,OAAO,CAAC,EAAE;QACR,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;QAC3B,YAAY,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC;QAC5C,sBAAsB,CAAC,EAAE,OAAO,CAAC;QACjC,WAAW,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,eAAe,CAAC;KACtD,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,MAAM,E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BAAsB;IAUpC;;OAEG;YACW,wBAAwB;IAUtC;;OAEG;YACW,2BAA2B;IAUzC;;OAEG;IACH,OAAO,CAAC,oBAAoB;IA4C5B;;OAEG;IACH,OAAO,CAAC,8BAA8B;IActC;;OAEG;IACH,OAAO,CAAC,mBAAmB;CAsB5B"}
|
|
@@ -1,395 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AnalysisWorkflow 程式碼分析工作流程實作
|
|
3
|
-
* 實作程式碼分析的完整工作流程:索引 → 複雜度分析 → 依賴分析 → 生成報告
|
|
4
|
-
*/
|
|
5
|
-
import { BaseWorkflow, WorkflowError } from '../workflows/base-workflow.js';
|
|
6
|
-
/**
|
|
7
|
-
* 分析類型枚舉
|
|
8
|
-
*/
|
|
9
|
-
export var AnalysisType;
|
|
10
|
-
(function (AnalysisType) {
|
|
11
|
-
AnalysisType["COMPLEXITY"] = "complexity";
|
|
12
|
-
AnalysisType["DEPENDENCY"] = "dependency";
|
|
13
|
-
AnalysisType["QUALITY"] = "quality";
|
|
14
|
-
AnalysisType["DEAD_CODE"] = "dead-code";
|
|
15
|
-
AnalysisType["DUPLICATION"] = "duplication";
|
|
16
|
-
AnalysisType["COMPREHENSIVE"] = "comprehensive";
|
|
17
|
-
})(AnalysisType || (AnalysisType = {}));
|
|
18
|
-
/**
|
|
19
|
-
* AnalysisWorkflow 實作
|
|
20
|
-
*/
|
|
21
|
-
export class AnalysisWorkflow extends BaseWorkflow {
|
|
22
|
-
constructor(moduleCoordinator) {
|
|
23
|
-
super({
|
|
24
|
-
id: 'analysis-workflow',
|
|
25
|
-
name: 'analysis',
|
|
26
|
-
description: '程式碼分析工作流程',
|
|
27
|
-
timeout: 60000, // 60 秒
|
|
28
|
-
maxRetries: 1,
|
|
29
|
-
enableRollback: false // 分析操作不需要回滾
|
|
30
|
-
}, moduleCoordinator);
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* 定義分析工作流程步驟
|
|
34
|
-
*/
|
|
35
|
-
defineSteps() {
|
|
36
|
-
// 步驟 1: 建立索引
|
|
37
|
-
this.addStep(this.createStep('create-index', '建立程式碼索引', this.createIndex.bind(this), {
|
|
38
|
-
canRetry: true,
|
|
39
|
-
maxRetries: 2
|
|
40
|
-
}));
|
|
41
|
-
// 步驟 2: 複雜度分析
|
|
42
|
-
this.addStep(this.createStep('analyze-complexity', '分析程式碼複雜度', this.analyzeComplexity.bind(this), {
|
|
43
|
-
canRetry: true,
|
|
44
|
-
maxRetries: 1
|
|
45
|
-
}));
|
|
46
|
-
// 步驟 3: 依賴分析
|
|
47
|
-
this.addStep(this.createStep('analyze-dependencies', '分析依賴關係', this.analyzeDependencies.bind(this), {
|
|
48
|
-
canRetry: true,
|
|
49
|
-
maxRetries: 1
|
|
50
|
-
}));
|
|
51
|
-
// 步驟 4: 品質分析
|
|
52
|
-
this.addStep(this.createStep('analyze-quality', '分析程式碼品質', this.analyzeQuality.bind(this), {
|
|
53
|
-
canRetry: true,
|
|
54
|
-
maxRetries: 1
|
|
55
|
-
}));
|
|
56
|
-
// 步驟 5: 死代碼檢測
|
|
57
|
-
this.addStep(this.createStep('detect-dead-code', '檢測死代碼', this.detectDeadCode.bind(this), {
|
|
58
|
-
canRetry: true,
|
|
59
|
-
maxRetries: 1
|
|
60
|
-
}));
|
|
61
|
-
// 步驟 6: 重複代碼檢測
|
|
62
|
-
this.addStep(this.createStep('detect-duplication', '檢測重複代碼', this.detectDuplication.bind(this), {
|
|
63
|
-
canRetry: true,
|
|
64
|
-
maxRetries: 1
|
|
65
|
-
}));
|
|
66
|
-
// 步驟 7: 生成報告
|
|
67
|
-
this.addStep(this.createStep('generate-report', '生成分析報告', this.generateReport.bind(this), {
|
|
68
|
-
canRetry: false // 報告生成不重試
|
|
69
|
-
}));
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* 初始化工作流程上下文
|
|
73
|
-
*/
|
|
74
|
-
async initializeContext(input) {
|
|
75
|
-
if (!this.isValidInput(input)) {
|
|
76
|
-
throw new WorkflowError('無效的分析工作流程輸入', { input });
|
|
77
|
-
}
|
|
78
|
-
const analysisInput = input;
|
|
79
|
-
// 設定預設選項
|
|
80
|
-
const defaultOptions = {
|
|
81
|
-
includeTests: false,
|
|
82
|
-
excludePatterns: ['node_modules', '.git', 'dist', 'build'],
|
|
83
|
-
outputFormat: 'json',
|
|
84
|
-
includeRecommendations: true,
|
|
85
|
-
detailLevel: 'detailed'
|
|
86
|
-
};
|
|
87
|
-
return {
|
|
88
|
-
target: analysisInput.target,
|
|
89
|
-
analysisTypes: analysisInput.analysisTypes,
|
|
90
|
-
options: { ...defaultOptions, ...analysisInput.options }
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* 處理工作流程結果
|
|
95
|
-
*/
|
|
96
|
-
async processResult(context) {
|
|
97
|
-
// 從上下文獲取報告(應該在 generate-report 步驟中設定)
|
|
98
|
-
const report = this.createAnalysisReport(context);
|
|
99
|
-
return {
|
|
100
|
-
success: true,
|
|
101
|
-
report,
|
|
102
|
-
rawData: {
|
|
103
|
-
complexity: context.complexityResult,
|
|
104
|
-
dependencies: context.dependencyResult,
|
|
105
|
-
quality: context.qualityResult,
|
|
106
|
-
deadCode: context.deadCodeResult,
|
|
107
|
-
duplication: context.duplicationResult
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* 步驟 1: 建立索引
|
|
113
|
-
*/
|
|
114
|
-
async createIndex(context) {
|
|
115
|
-
try {
|
|
116
|
-
const workflowContext = await this.getContextFromMetadata(context);
|
|
117
|
-
// 模擬索引建立過程
|
|
118
|
-
const indexResult = await this.performIndexing(workflowContext.target, workflowContext.options);
|
|
119
|
-
workflowContext.indexResult = indexResult;
|
|
120
|
-
return this.createSuccessResult(indexResult);
|
|
121
|
-
}
|
|
122
|
-
catch (error) {
|
|
123
|
-
return this.createFailureResult(new WorkflowError(`索引建立失敗: ${error.message}`, { stepId: context.stepId }, error));
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* 步驟 2: 複雜度分析
|
|
128
|
-
*/
|
|
129
|
-
async analyzeComplexity(context) {
|
|
130
|
-
try {
|
|
131
|
-
const workflowContext = await this.getContextFromMetadata(context);
|
|
132
|
-
if (!this.shouldRunAnalysis(AnalysisType.COMPLEXITY, workflowContext.analysisTypes)) {
|
|
133
|
-
return this.createSuccessResult({ skipped: true });
|
|
134
|
-
}
|
|
135
|
-
const complexityResult = await this.performComplexityAnalysis(workflowContext.target, workflowContext.indexResult);
|
|
136
|
-
workflowContext.complexityResult = complexityResult;
|
|
137
|
-
return this.createSuccessResult(complexityResult);
|
|
138
|
-
}
|
|
139
|
-
catch (error) {
|
|
140
|
-
return this.createFailureResult(new WorkflowError(`複雜度分析失敗: ${error.message}`, { stepId: context.stepId }, error));
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* 步驟 3: 依賴分析
|
|
145
|
-
*/
|
|
146
|
-
async analyzeDependencies(context) {
|
|
147
|
-
try {
|
|
148
|
-
const workflowContext = await this.getContextFromMetadata(context);
|
|
149
|
-
if (!this.shouldRunAnalysis(AnalysisType.DEPENDENCY, workflowContext.analysisTypes)) {
|
|
150
|
-
return this.createSuccessResult({ skipped: true });
|
|
151
|
-
}
|
|
152
|
-
const dependencyResult = await this.performDependencyAnalysis(workflowContext.target, workflowContext.indexResult);
|
|
153
|
-
workflowContext.dependencyResult = dependencyResult;
|
|
154
|
-
return this.createSuccessResult(dependencyResult);
|
|
155
|
-
}
|
|
156
|
-
catch (error) {
|
|
157
|
-
return this.createFailureResult(new WorkflowError(`依賴分析失敗: ${error.message}`, { stepId: context.stepId }, error));
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* 步驟 4: 品質分析
|
|
162
|
-
*/
|
|
163
|
-
async analyzeQuality(context) {
|
|
164
|
-
try {
|
|
165
|
-
const workflowContext = await this.getContextFromMetadata(context);
|
|
166
|
-
if (!this.shouldRunAnalysis(AnalysisType.QUALITY, workflowContext.analysisTypes)) {
|
|
167
|
-
return this.createSuccessResult({ skipped: true });
|
|
168
|
-
}
|
|
169
|
-
const qualityResult = await this.performQualityAnalysis(workflowContext.target, workflowContext.indexResult);
|
|
170
|
-
workflowContext.qualityResult = qualityResult;
|
|
171
|
-
return this.createSuccessResult(qualityResult);
|
|
172
|
-
}
|
|
173
|
-
catch (error) {
|
|
174
|
-
return this.createFailureResult(new WorkflowError(`品質分析失敗: ${error.message}`, { stepId: context.stepId }, error));
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* 步驟 5: 死代碼檢測
|
|
179
|
-
*/
|
|
180
|
-
async detectDeadCode(context) {
|
|
181
|
-
try {
|
|
182
|
-
const workflowContext = await this.getContextFromMetadata(context);
|
|
183
|
-
if (!this.shouldRunAnalysis(AnalysisType.DEAD_CODE, workflowContext.analysisTypes)) {
|
|
184
|
-
return this.createSuccessResult({ skipped: true });
|
|
185
|
-
}
|
|
186
|
-
const deadCodeResult = await this.performDeadCodeDetection(workflowContext.target, workflowContext.indexResult);
|
|
187
|
-
workflowContext.deadCodeResult = deadCodeResult;
|
|
188
|
-
return this.createSuccessResult(deadCodeResult);
|
|
189
|
-
}
|
|
190
|
-
catch (error) {
|
|
191
|
-
return this.createFailureResult(new WorkflowError(`死代碼檢測失敗: ${error.message}`, { stepId: context.stepId }, error));
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* 步驟 6: 重複代碼檢測
|
|
196
|
-
*/
|
|
197
|
-
async detectDuplication(context) {
|
|
198
|
-
try {
|
|
199
|
-
const workflowContext = await this.getContextFromMetadata(context);
|
|
200
|
-
if (!this.shouldRunAnalysis(AnalysisType.DUPLICATION, workflowContext.analysisTypes)) {
|
|
201
|
-
return this.createSuccessResult({ skipped: true });
|
|
202
|
-
}
|
|
203
|
-
const duplicationResult = await this.performDuplicationDetection(workflowContext.target, workflowContext.indexResult);
|
|
204
|
-
workflowContext.duplicationResult = duplicationResult;
|
|
205
|
-
return this.createSuccessResult(duplicationResult);
|
|
206
|
-
}
|
|
207
|
-
catch (error) {
|
|
208
|
-
return this.createFailureResult(new WorkflowError(`重複代碼檢測失敗: ${error.message}`, { stepId: context.stepId }, error));
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
/**
|
|
212
|
-
* 步驟 7: 生成報告
|
|
213
|
-
*/
|
|
214
|
-
async generateReport(context) {
|
|
215
|
-
try {
|
|
216
|
-
const workflowContext = await this.getContextFromMetadata(context);
|
|
217
|
-
const report = this.createAnalysisReport(workflowContext);
|
|
218
|
-
return this.createSuccessResult(report);
|
|
219
|
-
}
|
|
220
|
-
catch (error) {
|
|
221
|
-
return this.createFailureResult(new WorkflowError(`報告生成失敗: ${error.message}`, { stepId: context.stepId }, error));
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* 驗證輸入格式
|
|
226
|
-
*/
|
|
227
|
-
isValidInput(input) {
|
|
228
|
-
return (typeof input === 'object' &&
|
|
229
|
-
input !== null &&
|
|
230
|
-
'target' in input &&
|
|
231
|
-
'analysisTypes' in input &&
|
|
232
|
-
typeof input.target === 'string' &&
|
|
233
|
-
Array.isArray(input.analysisTypes));
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* 從元數據獲取上下文
|
|
237
|
-
*/
|
|
238
|
-
async getContextFromMetadata(context) {
|
|
239
|
-
return context.metadata.workflowContext;
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* 檢查是否應該執行特定分析
|
|
243
|
-
*/
|
|
244
|
-
shouldRunAnalysis(analysisType, requestedTypes) {
|
|
245
|
-
return requestedTypes.includes(analysisType) || requestedTypes.includes(AnalysisType.COMPREHENSIVE);
|
|
246
|
-
}
|
|
247
|
-
/**
|
|
248
|
-
* 執行索引建立
|
|
249
|
-
*/
|
|
250
|
-
async performIndexing(target, options) {
|
|
251
|
-
// 模擬索引建立
|
|
252
|
-
await this.sleep(100);
|
|
253
|
-
return {
|
|
254
|
-
totalFiles: 50,
|
|
255
|
-
indexedFiles: [`${target}/file1.ts`, `${target}/file2.ts`],
|
|
256
|
-
symbols: [],
|
|
257
|
-
dependencies: []
|
|
258
|
-
};
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* 執行複雜度分析
|
|
262
|
-
*/
|
|
263
|
-
async performComplexityAnalysis(target, indexResult) {
|
|
264
|
-
await this.sleep(200);
|
|
265
|
-
return {
|
|
266
|
-
overallComplexity: 7.5,
|
|
267
|
-
fileComplexities: new Map([
|
|
268
|
-
[`${target}/file1.ts`, 5.2],
|
|
269
|
-
[`${target}/file2.ts`, 9.8]
|
|
270
|
-
]),
|
|
271
|
-
hotspots: [
|
|
272
|
-
{ file: `${target}/file2.ts`, complexity: 9.8, line: 45 }
|
|
273
|
-
]
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* 執行依賴分析
|
|
278
|
-
*/
|
|
279
|
-
async performDependencyAnalysis(target, indexResult) {
|
|
280
|
-
await this.sleep(150);
|
|
281
|
-
return {
|
|
282
|
-
dependencies: [],
|
|
283
|
-
circularDependencies: [],
|
|
284
|
-
dependencyGraph: {},
|
|
285
|
-
metrics: { depth: 3, breadth: 12 }
|
|
286
|
-
};
|
|
287
|
-
}
|
|
288
|
-
/**
|
|
289
|
-
* 執行品質分析
|
|
290
|
-
*/
|
|
291
|
-
async performQualityAnalysis(target, indexResult) {
|
|
292
|
-
await this.sleep(250);
|
|
293
|
-
return {
|
|
294
|
-
codeSmells: [],
|
|
295
|
-
suggestions: ['Consider extracting large functions', 'Reduce complexity'],
|
|
296
|
-
metrics: { maintainabilityIndex: 78 }
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* 執行死代碼檢測
|
|
301
|
-
*/
|
|
302
|
-
async performDeadCodeDetection(target, indexResult) {
|
|
303
|
-
await this.sleep(180);
|
|
304
|
-
return {
|
|
305
|
-
deadFunctions: [],
|
|
306
|
-
deadVariables: [],
|
|
307
|
-
deadImports: []
|
|
308
|
-
};
|
|
309
|
-
}
|
|
310
|
-
/**
|
|
311
|
-
* 執行重複代碼檢測
|
|
312
|
-
*/
|
|
313
|
-
async performDuplicationDetection(target, indexResult) {
|
|
314
|
-
await this.sleep(220);
|
|
315
|
-
return {
|
|
316
|
-
duplicatedBlocks: [],
|
|
317
|
-
duplicationRate: 0.15,
|
|
318
|
-
suggestions: ['Extract common functionality']
|
|
319
|
-
};
|
|
320
|
-
}
|
|
321
|
-
/**
|
|
322
|
-
* 建立分析報告
|
|
323
|
-
*/
|
|
324
|
-
createAnalysisReport(context) {
|
|
325
|
-
const summary = {
|
|
326
|
-
target: context.target,
|
|
327
|
-
analysisTypes: context.analysisTypes,
|
|
328
|
-
totalFiles: context.indexResult?.totalFiles || 0,
|
|
329
|
-
analysisDate: new Date().toISOString(),
|
|
330
|
-
duration: 0 // 實際實作中會計算
|
|
331
|
-
};
|
|
332
|
-
const report = {
|
|
333
|
-
summary,
|
|
334
|
-
recommendations: [],
|
|
335
|
-
actionItems: []
|
|
336
|
-
};
|
|
337
|
-
// 根據執行的分析添加對應的報告部分
|
|
338
|
-
if (context.complexityResult) {
|
|
339
|
-
report.complexity = {
|
|
340
|
-
overallScore: context.complexityResult.overallComplexity,
|
|
341
|
-
averageComplexity: context.complexityResult.overallComplexity,
|
|
342
|
-
highComplexityFiles: context.complexityResult.hotspots.map(h => ({
|
|
343
|
-
file: h.file,
|
|
344
|
-
score: h.complexity
|
|
345
|
-
})),
|
|
346
|
-
recommendations: ['重構高複雜度函式', '考慮拆分大型類別']
|
|
347
|
-
};
|
|
348
|
-
}
|
|
349
|
-
if (context.dependencyResult) {
|
|
350
|
-
report.dependencies = {
|
|
351
|
-
totalDependencies: 0,
|
|
352
|
-
circularDependencies: 0,
|
|
353
|
-
dependencyDepth: 3,
|
|
354
|
-
recommendations: ['解決循環依賴', '減少依賴深度']
|
|
355
|
-
};
|
|
356
|
-
}
|
|
357
|
-
// 生成總體建議和行動項目
|
|
358
|
-
report.recommendations = this.generateOverallRecommendations(context);
|
|
359
|
-
report.actionItems = this.generateActionItems(context);
|
|
360
|
-
return report;
|
|
361
|
-
}
|
|
362
|
-
/**
|
|
363
|
-
* 生成整體建議
|
|
364
|
-
*/
|
|
365
|
-
generateOverallRecommendations(context) {
|
|
366
|
-
const recommendations = [];
|
|
367
|
-
if (context.complexityResult?.overallComplexity && context.complexityResult.overallComplexity > 8) {
|
|
368
|
-
recommendations.push('整體程式碼複雜度偏高,建議進行重構');
|
|
369
|
-
}
|
|
370
|
-
if (context.duplicationResult?.duplicationRate && context.duplicationResult.duplicationRate > 0.1) {
|
|
371
|
-
recommendations.push('重複程式碼比率偏高,建議提取共用功能');
|
|
372
|
-
}
|
|
373
|
-
return recommendations;
|
|
374
|
-
}
|
|
375
|
-
/**
|
|
376
|
-
* 生成行動項目
|
|
377
|
-
*/
|
|
378
|
-
generateActionItems(context) {
|
|
379
|
-
return [
|
|
380
|
-
{
|
|
381
|
-
priority: 'high',
|
|
382
|
-
category: 'complexity',
|
|
383
|
-
description: '重構高複雜度函式',
|
|
384
|
-
effort: 'medium'
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
priority: 'medium',
|
|
388
|
-
category: 'duplication',
|
|
389
|
-
description: '提取重複程式碼',
|
|
390
|
-
effort: 'low'
|
|
391
|
-
}
|
|
392
|
-
];
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
//# sourceMappingURL=analysis-workflow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"analysis-workflow.js","sourceRoot":"","sources":["../../../src/application/workflows/analysis-workflow.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAoB,MAAM,yCAAyC,CAAC;AAOxG;;GAEG;AACH,MAAM,CAA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