agent-ide 0.13.6 → 0.13.7
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/README.md +14 -7
- package/dist/core/call-hierarchy/call-hierarchy-analyzer.d.ts +11 -2
- package/dist/core/call-hierarchy/call-hierarchy-analyzer.d.ts.map +1 -1
- package/dist/core/call-hierarchy/call-hierarchy-analyzer.js +233 -25
- package/dist/core/call-hierarchy/call-hierarchy-analyzer.js.map +1 -1
- package/dist/core/change-signature/call-site-updater.d.ts +0 -1
- package/dist/core/change-signature/call-site-updater.d.ts.map +1 -1
- package/dist/core/change-signature/call-site-updater.js +0 -2
- package/dist/core/change-signature/call-site-updater.js.map +1 -1
- package/dist/core/change-signature/change-signature-engine.d.ts +9 -1
- package/dist/core/change-signature/change-signature-engine.d.ts.map +1 -1
- package/dist/core/change-signature/change-signature-engine.js +190 -5
- package/dist/core/change-signature/change-signature-engine.js.map +1 -1
- package/dist/core/change-signature/signature-parser.d.ts +0 -5
- package/dist/core/change-signature/signature-parser.d.ts.map +1 -1
- package/dist/core/change-signature/signature-parser.js +6 -34
- package/dist/core/change-signature/signature-parser.js.map +1 -1
- package/dist/core/deadcode/file-operations.d.ts.map +1 -1
- package/dist/core/deadcode/file-operations.js +3 -1
- package/dist/core/deadcode/file-operations.js.map +1 -1
- package/dist/core/deadcode/import-cleaner.d.ts.map +1 -1
- package/dist/core/deadcode/import-cleaner.js +3 -1
- package/dist/core/deadcode/import-cleaner.js.map +1 -1
- package/dist/core/deadcode/range-expander.d.ts +9 -1
- package/dist/core/deadcode/range-expander.d.ts.map +1 -1
- package/dist/core/deadcode/range-expander.js +115 -41
- package/dist/core/deadcode/range-expander.js.map +1 -1
- package/dist/core/foundations/file-utils.d.ts.map +1 -1
- package/dist/core/foundations/file-utils.js +6 -3
- package/dist/core/foundations/file-utils.js.map +1 -1
- package/dist/core/foundations/indexing/file-index.d.ts +5 -2
- package/dist/core/foundations/indexing/file-index.d.ts.map +1 -1
- package/dist/core/foundations/indexing/file-index.js +11 -3
- package/dist/core/foundations/indexing/file-index.js.map +1 -1
- package/dist/core/foundations/indexing/index-cache-serializer.d.ts +133 -0
- package/dist/core/foundations/indexing/index-cache-serializer.d.ts.map +1 -0
- package/dist/core/foundations/indexing/index-cache-serializer.js +217 -0
- package/dist/core/foundations/indexing/index-cache-serializer.js.map +1 -0
- package/dist/core/foundations/indexing/index-engine.d.ts +11 -5
- package/dist/core/foundations/indexing/index-engine.d.ts.map +1 -1
- package/dist/core/foundations/indexing/index-engine.js +31 -22
- package/dist/core/foundations/indexing/index-engine.js.map +1 -1
- package/dist/core/foundations/indexing/index.d.ts +4 -1
- package/dist/core/foundations/indexing/index.d.ts.map +1 -1
- package/dist/core/foundations/indexing/index.js +2 -1
- package/dist/core/foundations/indexing/index.js.map +1 -1
- package/dist/core/foundations/indexing/symbol-index.d.ts +7 -1
- package/dist/core/foundations/indexing/symbol-index.d.ts.map +1 -1
- package/dist/core/foundations/indexing/symbol-index.js +54 -3
- package/dist/core/foundations/indexing/symbol-index.js.map +1 -1
- package/dist/core/foundations/indexing/types.d.ts +3 -2
- package/dist/core/foundations/indexing/types.d.ts.map +1 -1
- package/dist/core/foundations/indexing/types.js +8 -6
- package/dist/core/foundations/indexing/types.js.map +1 -1
- package/dist/core/foundations/symbol-finder/call-site-parser.d.ts.map +1 -1
- package/dist/core/foundations/symbol-finder/call-site-parser.js +3 -1
- package/dist/core/foundations/symbol-finder/call-site-parser.js.map +1 -1
- package/dist/core/foundations/symbol-finder/symbol-finder.d.ts +0 -2
- package/dist/core/foundations/symbol-finder/symbol-finder.d.ts.map +1 -1
- package/dist/core/foundations/symbol-finder/symbol-finder.js +15 -11
- package/dist/core/foundations/symbol-finder/symbol-finder.js.map +1 -1
- package/dist/core/impact/dependency-extractor.d.ts +11 -3
- package/dist/core/impact/dependency-extractor.d.ts.map +1 -1
- package/dist/core/impact/dependency-extractor.js +149 -34
- package/dist/core/impact/dependency-extractor.js.map +1 -1
- package/dist/core/impact/file-scanner.d.ts.map +1 -1
- package/dist/core/impact/file-scanner.js +3 -2
- package/dist/core/impact/file-scanner.js.map +1 -1
- package/dist/core/impact/impact-analyzer.d.ts +8 -1
- package/dist/core/impact/impact-analyzer.d.ts.map +1 -1
- package/dist/core/impact/impact-analyzer.js +27 -8
- package/dist/core/impact/impact-analyzer.js.map +1 -1
- package/dist/core/impact/path-resolver.d.ts.map +1 -1
- package/dist/core/impact/path-resolver.js +11 -10
- package/dist/core/impact/path-resolver.js.map +1 -1
- package/dist/core/impact/types.d.ts.map +1 -1
- package/dist/core/impact/types.js +2 -1
- package/dist/core/impact/types.js.map +1 -1
- package/dist/core/move/file-scanner.d.ts +12 -0
- package/dist/core/move/file-scanner.d.ts.map +1 -1
- package/dist/core/move/file-scanner.js +58 -30
- package/dist/core/move/file-scanner.js.map +1 -1
- package/dist/core/move/glob-move-planner.d.ts +29 -0
- package/dist/core/move/glob-move-planner.d.ts.map +1 -0
- package/dist/core/move/glob-move-planner.js +48 -0
- package/dist/core/move/glob-move-planner.js.map +1 -0
- package/dist/core/move/index.d.ts +2 -0
- package/dist/core/move/index.d.ts.map +1 -1
- package/dist/core/move/index.js +1 -0
- package/dist/core/move/index.js.map +1 -1
- package/dist/core/move/move-engine.js +2 -2
- package/dist/core/move/move-engine.js.map +1 -1
- package/dist/core/move/path-calculator.d.ts +2 -0
- package/dist/core/move/path-calculator.d.ts.map +1 -1
- package/dist/core/move/path-calculator.js +36 -16
- package/dist/core/move/path-calculator.js.map +1 -1
- package/dist/core/move/path-utils.d.ts +2 -1
- package/dist/core/move/path-utils.d.ts.map +1 -1
- package/dist/core/move/path-utils.js +18 -28
- package/dist/core/move/path-utils.js.map +1 -1
- package/dist/core/move-member/change-applier.d.ts.map +1 -1
- package/dist/core/move-member/change-applier.js +3 -1
- package/dist/core/move-member/change-applier.js.map +1 -1
- package/dist/core/move-member/extractors/typescript-extractor.d.ts.map +1 -1
- package/dist/core/move-member/extractors/typescript-extractor.js +32 -28
- package/dist/core/move-member/extractors/typescript-extractor.js.map +1 -1
- package/dist/core/move-member/file-change-preparer.d.ts +5 -0
- package/dist/core/move-member/file-change-preparer.d.ts.map +1 -1
- package/dist/core/move-member/file-change-preparer.js +51 -11
- package/dist/core/move-member/file-change-preparer.js.map +1 -1
- package/dist/core/move-member/member-extractor.d.ts +0 -2
- package/dist/core/move-member/member-extractor.d.ts.map +1 -1
- package/dist/core/move-member/member-extractor.js +13 -22
- package/dist/core/move-member/member-extractor.js.map +1 -1
- package/dist/core/move-member/move-member-engine.d.ts +0 -1
- package/dist/core/move-member/move-member-engine.d.ts.map +1 -1
- package/dist/core/move-member/move-member-engine.js +0 -2
- package/dist/core/move-member/move-member-engine.js.map +1 -1
- package/dist/core/move-member/reference-updater.d.ts.map +1 -1
- package/dist/core/move-member/reference-updater.js +7 -10
- package/dist/core/move-member/reference-updater.js.map +1 -1
- package/dist/core/rename/reference-updater.d.ts +1 -0
- package/dist/core/rename/reference-updater.d.ts.map +1 -1
- package/dist/core/rename/reference-updater.js +48 -46
- package/dist/core/rename/reference-updater.js.map +1 -1
- package/dist/core/rename/rename-engine.d.ts +0 -1
- package/dist/core/rename/rename-engine.d.ts.map +1 -1
- package/dist/core/rename/rename-engine.js +9 -22
- package/dist/core/rename/rename-engine.js.map +1 -1
- package/dist/infrastructure/cache/cache-manager.d.ts.map +1 -1
- package/dist/infrastructure/cache/cache-manager.js +4 -5
- package/dist/infrastructure/cache/cache-manager.js.map +1 -1
- package/dist/infrastructure/cache/index-disk-cache.d.ts +46 -0
- package/dist/infrastructure/cache/index-disk-cache.d.ts.map +1 -0
- package/dist/infrastructure/cache/index-disk-cache.js +150 -0
- package/dist/infrastructure/cache/index-disk-cache.js.map +1 -0
- package/dist/infrastructure/cache/index.d.ts.map +1 -1
- package/dist/infrastructure/cache/index.js +1 -0
- 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 +3 -1
- package/dist/infrastructure/cache/memory-cache.js.map +1 -1
- package/dist/infrastructure/formatters/index.d.ts +1 -2
- package/dist/infrastructure/formatters/index.d.ts.map +1 -1
- package/dist/infrastructure/formatters/index.js +1 -2
- package/dist/infrastructure/formatters/index.js.map +1 -1
- package/dist/infrastructure/formatters/query-formatter.d.ts.map +1 -1
- package/dist/infrastructure/formatters/query-formatter.js +9 -18
- package/dist/infrastructure/formatters/query-formatter.js.map +1 -1
- package/dist/infrastructure/formatters/query-types.d.ts +15 -145
- package/dist/infrastructure/formatters/query-types.d.ts.map +1 -1
- package/dist/infrastructure/formatters/query-types.js +3 -18
- package/dist/infrastructure/formatters/query-types.js.map +1 -1
- package/dist/infrastructure/formatters/strategies/base-formatter.d.ts +1 -20
- package/dist/infrastructure/formatters/strategies/base-formatter.d.ts.map +1 -1
- package/dist/infrastructure/formatters/strategies/base-formatter.js +0 -8
- package/dist/infrastructure/formatters/strategies/base-formatter.js.map +1 -1
- package/dist/infrastructure/formatters/strategies/call-hierarchy-formatter.d.ts.map +1 -1
- package/dist/infrastructure/formatters/strategies/call-hierarchy-formatter.js +7 -0
- package/dist/infrastructure/formatters/strategies/call-hierarchy-formatter.js.map +1 -1
- package/dist/infrastructure/formatters/strategies/cycles-formatter.d.ts +15 -0
- package/dist/infrastructure/formatters/strategies/cycles-formatter.d.ts.map +1 -0
- package/dist/infrastructure/formatters/strategies/cycles-formatter.js +29 -0
- package/dist/infrastructure/formatters/strategies/cycles-formatter.js.map +1 -0
- package/dist/infrastructure/formatters/strategies/impact-formatter.d.ts +15 -0
- package/dist/infrastructure/formatters/strategies/impact-formatter.d.ts.map +1 -0
- package/dist/infrastructure/formatters/strategies/impact-formatter.js +31 -0
- package/dist/infrastructure/formatters/strategies/impact-formatter.js.map +1 -0
- package/dist/infrastructure/formatters/strategies/index.d.ts +3 -4
- package/dist/infrastructure/formatters/strategies/index.d.ts.map +1 -1
- package/dist/infrastructure/formatters/strategies/index.js +3 -4
- package/dist/infrastructure/formatters/strategies/index.js.map +1 -1
- package/dist/infrastructure/logging/index.d.ts +2 -0
- package/dist/infrastructure/logging/index.d.ts.map +1 -0
- package/dist/infrastructure/logging/index.js +2 -0
- package/dist/infrastructure/logging/index.js.map +1 -0
- package/dist/infrastructure/logging/logger.d.ts +25 -0
- package/dist/infrastructure/logging/logger.d.ts.map +1 -0
- package/dist/infrastructure/logging/logger.js +54 -0
- package/dist/infrastructure/logging/logger.js.map +1 -0
- package/dist/infrastructure/parser/analysis-types.d.ts.map +1 -1
- package/dist/infrastructure/parser/base.d.ts +1 -6
- package/dist/infrastructure/parser/base.d.ts.map +1 -1
- package/dist/infrastructure/parser/base.js +4 -16
- package/dist/infrastructure/parser/base.js.map +1 -1
- package/dist/infrastructure/parser/index.d.ts +2 -2
- package/dist/infrastructure/parser/index.d.ts.map +1 -1
- package/dist/infrastructure/parser/index.js +1 -1
- package/dist/infrastructure/parser/index.js.map +1 -1
- package/dist/infrastructure/parser/interface.d.ts +0 -7
- package/dist/infrastructure/parser/interface.d.ts.map +1 -1
- package/dist/infrastructure/parser/interface.js +0 -1
- package/dist/infrastructure/parser/interface.js.map +1 -1
- package/dist/infrastructure/parser/registry.d.ts.map +1 -1
- package/dist/infrastructure/parser/registry.js +2 -1
- package/dist/infrastructure/parser/registry.js.map +1 -1
- package/dist/infrastructure/parser/types.d.ts +12 -3
- package/dist/infrastructure/parser/types.d.ts.map +1 -1
- package/dist/infrastructure/parser/types.js +7 -2
- package/dist/infrastructure/parser/types.js.map +1 -1
- package/dist/infrastructure/storage/file-system.d.ts.map +1 -1
- package/dist/infrastructure/storage/file-system.js +5 -1
- package/dist/infrastructure/storage/file-system.js.map +1 -1
- package/dist/interfaces/cli/cached-index-engine.d.ts +25 -0
- package/dist/interfaces/cli/cached-index-engine.d.ts.map +1 -0
- package/dist/interfaces/cli/cached-index-engine.js +59 -0
- package/dist/interfaces/cli/cached-index-engine.js.map +1 -0
- package/dist/interfaces/cli/cli.d.ts +1 -0
- package/dist/interfaces/cli/cli.d.ts.map +1 -1
- package/dist/interfaces/cli/cli.js +33 -19
- package/dist/interfaces/cli/cli.js.map +1 -1
- package/dist/interfaces/cli/command-utils.d.ts +17 -1
- package/dist/interfaces/cli/command-utils.d.ts.map +1 -1
- package/dist/interfaces/cli/command-utils.js +53 -3
- package/dist/interfaces/cli/command-utils.js.map +1 -1
- package/dist/interfaces/cli/commands/call-hierarchy.command.d.ts.map +1 -1
- package/dist/interfaces/cli/commands/call-hierarchy.command.js +57 -17
- package/dist/interfaces/cli/commands/call-hierarchy.command.js.map +1 -1
- package/dist/interfaces/cli/commands/change-signature.command.d.ts +12 -0
- package/dist/interfaces/cli/commands/change-signature.command.d.ts.map +1 -1
- package/dist/interfaces/cli/commands/change-signature.command.js +131 -12
- package/dist/interfaces/cli/commands/change-signature.command.js.map +1 -1
- package/dist/interfaces/cli/commands/cycles.command.d.ts +1 -1
- package/dist/interfaces/cli/commands/cycles.command.d.ts.map +1 -1
- package/dist/interfaces/cli/commands/cycles.command.js +13 -11
- package/dist/interfaces/cli/commands/cycles.command.js.map +1 -1
- package/dist/interfaces/cli/commands/deadcode.command.d.ts.map +1 -1
- package/dist/interfaces/cli/commands/deadcode.command.js +18 -19
- 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 +35 -11
- package/dist/interfaces/cli/commands/find-references.command.js.map +1 -1
- package/dist/interfaces/cli/commands/impact.command.d.ts +1 -1
- package/dist/interfaces/cli/commands/impact.command.js +6 -13
- package/dist/interfaces/cli/commands/impact.command.js.map +1 -1
- package/dist/interfaces/cli/commands/index.d.ts +1 -1
- package/dist/interfaces/cli/commands/index.d.ts.map +1 -1
- package/dist/interfaces/cli/commands/index.js +1 -1
- package/dist/interfaces/cli/commands/index.js.map +1 -1
- package/dist/interfaces/cli/commands/move-command-options.d.ts +14 -0
- package/dist/interfaces/cli/commands/move-command-options.d.ts.map +1 -0
- package/dist/interfaces/cli/commands/move-command-options.js +2 -0
- package/dist/interfaces/cli/commands/move-command-options.js.map +1 -0
- package/dist/interfaces/cli/commands/move-glob-command-handler.d.ts +8 -0
- package/dist/interfaces/cli/commands/move-glob-command-handler.d.ts.map +1 -0
- package/dist/interfaces/cli/commands/move-glob-command-handler.js +186 -0
- package/dist/interfaces/cli/commands/move-glob-command-handler.js.map +1 -0
- package/dist/interfaces/cli/commands/move.command.d.ts.map +1 -1
- package/dist/interfaces/cli/commands/move.command.js +62 -241
- package/dist/interfaces/cli/commands/move.command.js.map +1 -1
- package/dist/interfaces/cli/commands/rename.command.d.ts.map +1 -1
- package/dist/interfaces/cli/commands/rename.command.js +40 -26
- package/dist/interfaces/cli/commands/rename.command.js.map +1 -1
- package/dist/interfaces/cli/commands/search.command.d.ts +11 -0
- package/dist/interfaces/cli/commands/search.command.d.ts.map +1 -0
- package/dist/interfaces/cli/commands/search.command.js +110 -0
- package/dist/interfaces/cli/commands/search.command.js.map +1 -0
- package/dist/interfaces/cli/unified-output-handler.d.ts +5 -0
- package/dist/interfaces/cli/unified-output-handler.d.ts.map +1 -1
- package/dist/interfaces/cli/unified-output-handler.js +8 -1
- package/dist/interfaces/cli/unified-output-handler.js.map +1 -1
- package/dist/plugins/javascript/declaration-analyzer.d.ts.map +1 -1
- package/dist/plugins/javascript/declaration-analyzer.js +5 -2
- package/dist/plugins/javascript/declaration-analyzer.js.map +1 -1
- package/dist/plugins/javascript/parser.d.ts +6 -4
- package/dist/plugins/javascript/parser.d.ts.map +1 -1
- package/dist/plugins/javascript/parser.js +97 -15
- package/dist/plugins/javascript/parser.js.map +1 -1
- package/dist/plugins/javascript/reference-finder.d.ts.map +1 -1
- package/dist/plugins/javascript/reference-finder.js +3 -1
- package/dist/plugins/javascript/reference-finder.js.map +1 -1
- package/dist/plugins/javascript/types.js +10 -10
- package/dist/plugins/javascript/types.js.map +1 -1
- package/dist/plugins/shared/constants.d.ts +1 -1
- package/dist/plugins/shared/constants.d.ts.map +1 -1
- package/dist/plugins/shared/constants.js +7 -1
- package/dist/plugins/shared/constants.js.map +1 -1
- package/dist/plugins/shared/parser-helpers.d.ts.map +1 -1
- package/dist/plugins/shared/parser-helpers.js +1 -0
- package/dist/plugins/shared/parser-helpers.js.map +1 -1
- package/dist/plugins/shared/utils/memory-monitor.d.ts.map +1 -1
- package/dist/plugins/shared/utils/memory-monitor.js +3 -2
- package/dist/plugins/shared/utils/memory-monitor.js.map +1 -1
- package/dist/plugins/shared/utils/object.d.ts.map +1 -1
- package/dist/plugins/shared/utils/object.js +8 -12
- package/dist/plugins/shared/utils/object.js.map +1 -1
- package/dist/plugins/typescript/declaration-analyzer.d.ts.map +1 -1
- package/dist/plugins/typescript/declaration-analyzer.js +9 -4
- package/dist/plugins/typescript/declaration-analyzer.js.map +1 -1
- package/dist/plugins/typescript/language-service.js +1 -1
- package/dist/plugins/typescript/language-service.js.map +1 -1
- package/dist/plugins/typescript/parser.d.ts +1 -6
- package/dist/plugins/typescript/parser.d.ts.map +1 -1
- package/dist/plugins/typescript/parser.js +7 -33
- package/dist/plugins/typescript/parser.js.map +1 -1
- package/dist/plugins/typescript/pattern-analyzer.d.ts.map +1 -1
- package/dist/plugins/typescript/pattern-analyzer.js +3 -1
- package/dist/plugins/typescript/pattern-analyzer.js.map +1 -1
- package/dist/plugins/typescript/reference-finder.d.ts.map +1 -1
- package/dist/plugins/typescript/reference-finder.js +3 -1
- package/dist/plugins/typescript/reference-finder.js.map +1 -1
- package/dist/plugins/typescript/tsconfig-loader.d.ts.map +1 -1
- package/dist/plugins/typescript/tsconfig-loader.js +162 -24
- package/dist/plugins/typescript/tsconfig-loader.js.map +1 -1
- package/dist/plugins/typescript/types.js +3 -3
- package/dist/plugins/typescript/types.js.map +1 -1
- package/dist/shared/errors/diagnostic-collector.d.ts +47 -0
- package/dist/shared/errors/diagnostic-collector.d.ts.map +1 -0
- package/dist/shared/errors/diagnostic-collector.js +89 -0
- package/dist/shared/errors/diagnostic-collector.js.map +1 -0
- package/dist/shared/errors/index.d.ts +3 -0
- package/dist/shared/errors/index.d.ts.map +1 -1
- package/dist/shared/errors/index.js +5 -1
- package/dist/shared/errors/index.js.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/source-file-extensions.d.ts +14 -0
- package/dist/shared/types/source-file-extensions.d.ts.map +1 -0
- package/dist/shared/types/source-file-extensions.js +42 -0
- package/dist/shared/types/source-file-extensions.js.map +1 -0
- package/dist/shared/types/symbol.d.ts +1 -0
- package/dist/shared/types/symbol.d.ts.map +1 -1
- package/dist/shared/types/symbol.js.map +1 -1
- package/package.json +18 -12
- package/dist/application/events/event-bus.d.ts +0 -107
- package/dist/application/events/event-bus.d.ts.map +0 -1
- package/dist/application/events/event-bus.js +0 -369
- package/dist/application/events/event-bus.js.map +0 -1
- package/dist/application/events/event-types.d.ts +0 -195
- package/dist/application/events/event-types.d.ts.map +0 -1
- package/dist/application/events/event-types.js +0 -36
- package/dist/application/events/event-types.js.map +0 -1
- package/dist/application/events/index.d.ts +0 -6
- package/dist/application/events/index.d.ts.map +0 -1
- package/dist/application/events/index.js +0 -6
- package/dist/application/events/index.js.map +0 -1
- package/dist/application/index.d.ts +0 -76
- package/dist/application/index.d.ts.map +0 -1
- package/dist/application/index.js +0 -127
- package/dist/application/index.js.map +0 -1
- package/dist/application/services/cache-coordinator.service.d.ts +0 -69
- package/dist/application/services/cache-coordinator.service.d.ts.map +0 -1
- package/dist/application/services/cache-coordinator.service.js +0 -251
- package/dist/application/services/cache-coordinator.service.js.map +0 -1
- package/dist/application/services/error-handler.service.d.ts +0 -56
- package/dist/application/services/error-handler.service.d.ts.map +0 -1
- package/dist/application/services/error-handler.service.js +0 -273
- package/dist/application/services/error-handler.service.js.map +0 -1
- package/dist/application/services/index.d.ts +0 -8
- package/dist/application/services/index.d.ts.map +0 -1
- package/dist/application/services/index.js +0 -8
- package/dist/application/services/index.js.map +0 -1
- package/dist/application/services/module-coordinator.service.d.ts +0 -55
- package/dist/application/services/module-coordinator.service.d.ts.map +0 -1
- package/dist/application/services/module-coordinator.service.js +0 -185
- package/dist/application/services/module-coordinator.service.js.map +0 -1
- package/dist/application/services/session-manager.service.d.ts +0 -86
- package/dist/application/services/session-manager.service.d.ts.map +0 -1
- package/dist/application/services/session-manager.service.js +0 -321
- package/dist/application/services/session-manager.service.js.map +0 -1
- package/dist/application/state/application-state.d.ts +0 -164
- package/dist/application/state/application-state.d.ts.map +0 -1
- package/dist/application/state/application-state.js +0 -290
- package/dist/application/state/application-state.js.map +0 -1
- package/dist/application/state/index.d.ts +0 -15
- package/dist/application/state/index.d.ts.map +0 -1
- package/dist/application/state/index.js +0 -15
- package/dist/application/state/index.js.map +0 -1
- package/dist/application/state/session-state.d.ts +0 -114
- package/dist/application/state/session-state.d.ts.map +0 -1
- package/dist/application/state/session-state.js +0 -188
- package/dist/application/state/session-state.js.map +0 -1
- package/dist/application/state/state-manager.d.ts +0 -122
- package/dist/application/state/state-manager.d.ts.map +0 -1
- package/dist/application/state/state-manager.js +0 -234
- package/dist/application/state/state-manager.js.map +0 -1
- package/dist/application/types.d.ts +0 -217
- package/dist/application/types.d.ts.map +0 -1
- package/dist/application/types.js +0 -5
- package/dist/application/types.js.map +0 -1
- package/dist/core/find-references/index.d.ts +0 -12
- package/dist/core/find-references/index.d.ts.map +0 -1
- package/dist/core/find-references/index.js +0 -14
- package/dist/core/find-references/index.js.map +0 -1
- package/dist/core/find-references/reference-finder-engine.d.ts +0 -75
- package/dist/core/find-references/reference-finder-engine.d.ts.map +0 -1
- package/dist/core/find-references/reference-finder-engine.js +0 -87
- package/dist/core/find-references/reference-finder-engine.js.map +0 -1
- package/dist/core/find-references/types.d.ts +0 -6
- package/dist/core/find-references/types.d.ts.map +0 -1
- package/dist/core/find-references/types.js +0 -7
- package/dist/core/find-references/types.js.map +0 -1
- package/dist/core/snapshot/index.d.ts +0 -9
- package/dist/core/snapshot/index.d.ts.map +0 -1
- package/dist/core/snapshot/index.js +0 -7
- package/dist/core/snapshot/index.js.map +0 -1
- package/dist/core/snapshot/snapshot-cache.d.ts +0 -103
- package/dist/core/snapshot/snapshot-cache.d.ts.map +0 -1
- package/dist/core/snapshot/snapshot-cache.js +0 -249
- package/dist/core/snapshot/snapshot-cache.js.map +0 -1
- package/dist/core/snapshot/snapshot-generator.d.ts +0 -79
- package/dist/core/snapshot/snapshot-generator.d.ts.map +0 -1
- package/dist/core/snapshot/snapshot-generator.js +0 -381
- package/dist/core/snapshot/snapshot-generator.js.map +0 -1
- package/dist/core/snapshot/types.d.ts +0 -67
- package/dist/core/snapshot/types.d.ts.map +0 -1
- package/dist/core/snapshot/types.js +0 -25
- package/dist/core/snapshot/types.js.map +0 -1
- package/dist/core/snapshot/utils/bracket-balancer.d.ts +0 -27
- package/dist/core/snapshot/utils/bracket-balancer.d.ts.map +0 -1
- package/dist/core/snapshot/utils/bracket-balancer.js +0 -70
- package/dist/core/snapshot/utils/bracket-balancer.js.map +0 -1
- package/dist/core/snapshot/utils/factory-pattern-detector.d.ts +0 -22
- package/dist/core/snapshot/utils/factory-pattern-detector.d.ts.map +0 -1
- package/dist/core/snapshot/utils/factory-pattern-detector.js +0 -70
- package/dist/core/snapshot/utils/factory-pattern-detector.js.map +0 -1
- package/dist/core/snapshot/utils/index.d.ts +0 -7
- package/dist/core/snapshot/utils/index.d.ts.map +0 -1
- package/dist/core/snapshot/utils/index.js +0 -7
- package/dist/core/snapshot/utils/index.js.map +0 -1
- package/dist/core/snapshot/utils/symbol-formatter.d.ts +0 -37
- package/dist/core/snapshot/utils/symbol-formatter.d.ts.map +0 -1
- package/dist/core/snapshot/utils/symbol-formatter.js +0 -89
- package/dist/core/snapshot/utils/symbol-formatter.js.map +0 -1
- package/dist/infrastructure/formatters/diff-utils.d.ts +0 -24
- package/dist/infrastructure/formatters/diff-utils.d.ts.map +0 -1
- package/dist/infrastructure/formatters/diff-utils.js +0 -104
- package/dist/infrastructure/formatters/diff-utils.js.map +0 -1
- package/dist/infrastructure/formatters/preview-converter.d.ts +0 -148
- package/dist/infrastructure/formatters/preview-converter.d.ts.map +0 -1
- package/dist/infrastructure/formatters/preview-converter.js +0 -329
- package/dist/infrastructure/formatters/preview-converter.js.map +0 -1
- package/dist/infrastructure/formatters/strategies/analyze-formatter.d.ts +0 -24
- package/dist/infrastructure/formatters/strategies/analyze-formatter.d.ts.map +0 -1
- package/dist/infrastructure/formatters/strategies/analyze-formatter.js +0 -102
- package/dist/infrastructure/formatters/strategies/analyze-formatter.js.map +0 -1
- package/dist/infrastructure/formatters/strategies/deps-formatter.d.ts +0 -15
- package/dist/infrastructure/formatters/strategies/deps-formatter.d.ts.map +0 -1
- package/dist/infrastructure/formatters/strategies/deps-formatter.js +0 -47
- package/dist/infrastructure/formatters/strategies/deps-formatter.js.map +0 -1
- package/dist/infrastructure/formatters/strategies/snapshot-formatter.d.ts +0 -20
- package/dist/infrastructure/formatters/strategies/snapshot-formatter.d.ts.map +0 -1
- package/dist/infrastructure/formatters/strategies/snapshot-formatter.js +0 -101
- package/dist/infrastructure/formatters/strategies/snapshot-formatter.js.map +0 -1
- package/dist/interfaces/cli/commands/snapshot.command.d.ts +0 -11
- package/dist/interfaces/cli/commands/snapshot.command.d.ts.map +0 -1
- package/dist/interfaces/cli/commands/snapshot.command.js +0 -86
- package/dist/interfaces/cli/commands/snapshot.command.js.map +0 -1
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Factory 模式識別器
|
|
3
|
-
* 使用 Parser 語義分析識別模組內的 factory 模式
|
|
4
|
-
*/
|
|
5
|
-
import * as path from 'path';
|
|
6
|
-
import { ParserRegistry } from '../../../infrastructure/parser/index.js';
|
|
7
|
-
/**
|
|
8
|
-
* 識別模組內的 factory 模式
|
|
9
|
-
* @param modulePath 模組路徑
|
|
10
|
-
* @param fileSystem 檔案系統
|
|
11
|
-
* @returns Factory 模式 Map(symbolName → PatternInfo)
|
|
12
|
-
*/
|
|
13
|
-
export async function identifyFactoryPatterns(modulePath, fileSystem) {
|
|
14
|
-
const factoryMap = new Map();
|
|
15
|
-
try {
|
|
16
|
-
const entries = await fileSystem.readDirectory(modulePath);
|
|
17
|
-
for (const entry of entries) {
|
|
18
|
-
if (entry.isDirectory) {
|
|
19
|
-
continue;
|
|
20
|
-
}
|
|
21
|
-
const ext = path.extname(entry.name);
|
|
22
|
-
if (!['.ts', '.js', '.tsx', '.jsx'].includes(ext)) {
|
|
23
|
-
continue;
|
|
24
|
-
}
|
|
25
|
-
const filePath = path.join(modulePath, entry.name);
|
|
26
|
-
const parser = ParserRegistry.getInstance().getParser(ext);
|
|
27
|
-
if (!parser || !parser.identifyPatterns) {
|
|
28
|
-
continue;
|
|
29
|
-
}
|
|
30
|
-
try {
|
|
31
|
-
const content = await fileSystem.readFile(filePath);
|
|
32
|
-
const codeString = typeof content === 'string' ? content : content.toString('utf-8');
|
|
33
|
-
const patterns = parser.identifyPatterns(codeString);
|
|
34
|
-
if (patterns) {
|
|
35
|
-
for (const pattern of patterns) {
|
|
36
|
-
if (pattern.type === 'factory') {
|
|
37
|
-
factoryMap.set(pattern.symbolName, pattern);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
catch {
|
|
43
|
-
// 忽略單一檔案的解析錯誤,繼續處理其他檔案
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
catch {
|
|
48
|
-
// 忽略目錄讀取錯誤,返回空 Map(fallback 到名稱比對)
|
|
49
|
-
}
|
|
50
|
-
return factoryMap;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* 判斷函數是否為 factory
|
|
54
|
-
* 優先使用 Parser 語義分析結果,若無則 fallback 到名稱比對
|
|
55
|
-
* @param funcName 函數名稱
|
|
56
|
-
* @param factoryPatterns Parser 識別的 factory 模式
|
|
57
|
-
* @returns 是否為 factory
|
|
58
|
-
*/
|
|
59
|
-
export function isFactory(funcName, factoryPatterns) {
|
|
60
|
-
// 優先使用 Parser 語義分析結果
|
|
61
|
-
if (factoryPatterns.has(funcName)) {
|
|
62
|
-
return true;
|
|
63
|
-
}
|
|
64
|
-
// Fallback:Parser 未提供任何結果時,使用名稱比對(向後相容)
|
|
65
|
-
if (factoryPatterns.size === 0 && funcName.startsWith('create')) {
|
|
66
|
-
return true;
|
|
67
|
-
}
|
|
68
|
-
return false;
|
|
69
|
-
}
|
|
70
|
-
//# sourceMappingURL=factory-pattern-detector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"factory-pattern-detector.js","sourceRoot":"","sources":["../../../../src/core/snapshot/utils/factory-pattern-detector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGjE;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,UAAkB,EAClB,UAAuB;IAEvB,MAAM,UAAU,GAAG,IAAI,GAAG,EAAuB,CAAC;IAElD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,UAAU,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QAE3D,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;gBAAC,SAAS;YAAC,CAAC;YAEpC,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACrC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;gBAAC,SAAS;YAAC,CAAC;YAEhE,MAAM,QAAQ,GAAG,IAAI,CAAC,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AChE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/snapshot/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/snapshot/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 符號簽章格式化器
|
|
3
|
-
* 提供統一的符號簽章格式化邏輯
|
|
4
|
-
*/
|
|
5
|
-
import type { Symbol } from '../../../shared/types/index.js';
|
|
6
|
-
/**
|
|
7
|
-
* 擴展 Symbol 型別,包含 Parser 額外資訊
|
|
8
|
-
*/
|
|
9
|
-
export interface ExtendedSymbol extends Symbol {
|
|
10
|
-
readonly signature?: string;
|
|
11
|
-
readonly typeInfo?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* 格式化符號簽章(方法或函數)
|
|
15
|
-
* 優先使用 Parser AST 解析,fallback 到 simplifySignature
|
|
16
|
-
* @param symbol 符號
|
|
17
|
-
* @param fileContents 檔案內容 Map(供 Parser 使用)
|
|
18
|
-
* @returns 格式化後的簽章字串
|
|
19
|
-
*/
|
|
20
|
-
export declare function formatSymbolSignature(symbol: ExtendedSymbol, fileContents: Map<string, string>): string;
|
|
21
|
-
/**
|
|
22
|
-
* 使用 Parser AST 格式化簽章
|
|
23
|
-
* @param filePath 檔案路徑(用於選擇 Parser)
|
|
24
|
-
* @param symbolName 符號名稱
|
|
25
|
-
* @param line 行號(1-based)
|
|
26
|
-
* @param code 檔案內容
|
|
27
|
-
* @returns 格式化後的簽章字串,如果無法解析則返回 null
|
|
28
|
-
*/
|
|
29
|
-
export declare function formatSignatureWithParser(filePath: string, symbolName: string, line: number, code: string): string | null;
|
|
30
|
-
/**
|
|
31
|
-
* 簡化簽章格式(移除函數名稱,保留參數和回傳型別)
|
|
32
|
-
* 使用括號平衡算法處理巢狀泛型
|
|
33
|
-
* @param signature 原始簽章字串
|
|
34
|
-
* @returns 簡化後的簽章
|
|
35
|
-
*/
|
|
36
|
-
export declare function simplifySignature(signature: string): string;
|
|
37
|
-
//# sourceMappingURL=symbol-formatter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"symbol-formatter.d.ts","sourceRoot":"","sources":["../../../../src/core/snapshot/utils/symbol-formatter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAMrD;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,MAAM;IAC5C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,cAAc,EACtB,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAChC,MAAM,CAkBR;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,IAAI,CAqBf;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAe3D"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 符號簽章格式化器
|
|
3
|
-
* 提供統一的符號簽章格式化邏輯
|
|
4
|
-
*/
|
|
5
|
-
import * as path from 'path';
|
|
6
|
-
import { ParserRegistry } from '../../../infrastructure/parser/index.js';
|
|
7
|
-
import { parseSignatureWithBalancing, formatParsedSignature } from './bracket-balancer.js';
|
|
8
|
-
/**
|
|
9
|
-
* 格式化符號簽章(方法或函數)
|
|
10
|
-
* 優先使用 Parser AST 解析,fallback 到 simplifySignature
|
|
11
|
-
* @param symbol 符號
|
|
12
|
-
* @param fileContents 檔案內容 Map(供 Parser 使用)
|
|
13
|
-
* @returns 格式化後的簽章字串
|
|
14
|
-
*/
|
|
15
|
-
export function formatSymbolSignature(symbol, fileContents) {
|
|
16
|
-
// 優先使用 Parser AST 解析簽章
|
|
17
|
-
const filePath = symbol.location?.filePath;
|
|
18
|
-
const line = symbol.location?.range?.start?.line;
|
|
19
|
-
const code = filePath ? fileContents.get(filePath) : undefined;
|
|
20
|
-
if (filePath && line !== undefined && code) {
|
|
21
|
-
const parserResult = formatSignatureWithParser(filePath, symbol.name, line, code);
|
|
22
|
-
if (parserResult) {
|
|
23
|
-
return parserResult;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
// Fallback:使用 IndexEngine 提取的簽章
|
|
27
|
-
if (symbol.signature) {
|
|
28
|
-
return simplifySignature(symbol.signature);
|
|
29
|
-
}
|
|
30
|
-
return '() → unknown';
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* 使用 Parser AST 格式化簽章
|
|
34
|
-
* @param filePath 檔案路徑(用於選擇 Parser)
|
|
35
|
-
* @param symbolName 符號名稱
|
|
36
|
-
* @param line 行號(1-based)
|
|
37
|
-
* @param code 檔案內容
|
|
38
|
-
* @returns 格式化後的簽章字串,如果無法解析則返回 null
|
|
39
|
-
*/
|
|
40
|
-
export function formatSignatureWithParser(filePath, symbolName, line, code) {
|
|
41
|
-
const ext = path.extname(filePath);
|
|
42
|
-
const parser = ParserRegistry.getInstance().getParser(ext);
|
|
43
|
-
if (!parser?.formatSignature) {
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
const sig = parser.formatSignature(code, symbolName, line);
|
|
47
|
-
if (!sig) {
|
|
48
|
-
return null;
|
|
49
|
-
}
|
|
50
|
-
// 轉換 FormattedSignature → 簡化字串
|
|
51
|
-
const params = sig.parameters
|
|
52
|
-
.map(p => {
|
|
53
|
-
let str = p.name;
|
|
54
|
-
if (p.optional && !p.defaultValue) {
|
|
55
|
-
str += '?';
|
|
56
|
-
}
|
|
57
|
-
if (p.type && p.type !== 'any') {
|
|
58
|
-
str += `: ${p.type}`;
|
|
59
|
-
}
|
|
60
|
-
if (p.defaultValue) {
|
|
61
|
-
str += ` = ${p.defaultValue}`;
|
|
62
|
-
}
|
|
63
|
-
return str;
|
|
64
|
-
})
|
|
65
|
-
.join(', ');
|
|
66
|
-
return params ? `(${params}) → ${sig.returnType}` : `() → ${sig.returnType}`;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* 簡化簽章格式(移除函數名稱,保留參數和回傳型別)
|
|
70
|
-
* 使用括號平衡算法處理巢狀泛型
|
|
71
|
-
* @param signature 原始簽章字串
|
|
72
|
-
* @returns 簡化後的簽章
|
|
73
|
-
*/
|
|
74
|
-
export function simplifySignature(signature) {
|
|
75
|
-
// 使用括號平衡算法找到參數列表的開始和結束位置
|
|
76
|
-
const result = parseSignatureWithBalancing(signature);
|
|
77
|
-
if (result) {
|
|
78
|
-
return formatParsedSignature(result);
|
|
79
|
-
}
|
|
80
|
-
// Fallback:原始正則邏輯(向後相容)
|
|
81
|
-
const match = signature.match(/^[^(]*\(([^)]*)\)(?:\s*:\s*(.+))?$/);
|
|
82
|
-
if (match) {
|
|
83
|
-
const params = match[1].trim();
|
|
84
|
-
const returnType = match[2]?.trim() || 'void';
|
|
85
|
-
return params ? `(${params}) → ${returnType}` : `() → ${returnType}`;
|
|
86
|
-
}
|
|
87
|
-
return signature;
|
|
88
|
-
}
|
|
89
|
-
//# sourceMappingURL=symbol-formatter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"symbol-formatter.js","sourceRoot":"","sources":["../../../../src/core/snapshot/utils/symbol-formatter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGjE,OAAO,EACL,2BAA2B,EAC3B,qBAAqB,EACtB,MAAM,uBAAuB,CAAC;AAU/B;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACnC,MAAsB,EACtB,YAAiC;IAEjC,uBAAuB;IACvB,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC3C,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC;IACjD,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAE/D,IAAI,QAAQ,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,EAAE,CAAC;QAC3C,MAAM,YAAY,GAAG,yBAAyB,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAClF,IAAI,YAAY,EAAE,CAAC;YACjB,OAAO,YAAY,CAAC;QACtB,CAAC;IACH,CAAC;IAED,gCAAgC;IAChC,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;QACrB,OAAO,iBAAiB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,cAAc,CAAC;AACxB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,yBAAyB,CACvC,QAAgB,EAChB,UAAkB,EAClB,IAAY,EACZ,IAAY;IAEZ,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,Q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AE,CAAC;QACX,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC;IAED,wBAAwB;IACxB,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC;IACpE,IAAI,KAAK,EAAE,CAAC;QACV,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAC/B,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,MAAM,CAAC;QAC9C,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,OAAO,UAAU,EAAE,CAAC,CAAC,CAAC,QAAQ,UAAU,EAAE,CAAC;IACvE,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Diff 計算工具函數
|
|
3
|
-
* 提供 LCS(最長共同子序列)算法和行級變更計算
|
|
4
|
-
*/
|
|
5
|
-
import type { LineChange } from './types.js';
|
|
6
|
-
/**
|
|
7
|
-
* 計算兩段程式碼之間的行級變更
|
|
8
|
-
* 使用 LCS(最長共同子序列)算法來找出差異
|
|
9
|
-
*
|
|
10
|
-
* @param original - 原始程式碼
|
|
11
|
-
* @param modified - 修改後的程式碼
|
|
12
|
-
* @returns 行級變更列表
|
|
13
|
-
*/
|
|
14
|
-
export declare function calculateLineChanges(original: string, modified: string): LineChange[];
|
|
15
|
-
/**
|
|
16
|
-
* 計算兩個字串陣列的最長共同子序列(LCS)
|
|
17
|
-
* 使用動態規劃算法,時間複雜度 O(mn),空間複雜度 O(mn)
|
|
18
|
-
*
|
|
19
|
-
* @param a - 第一個字串陣列
|
|
20
|
-
* @param b - 第二個字串陣列
|
|
21
|
-
* @returns 最長共同子序列
|
|
22
|
-
*/
|
|
23
|
-
export declare function computeLCS(a: string[], b: string[]): string[];
|
|
24
|
-
//# sourceMappingURL=diff-utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"diff-utils.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/formatters/diff-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,UAAU,EAAE,CAkDrF;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAuC7D"}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Diff 計算工具函數
|
|
3
|
-
* 提供 LCS(最長共同子序列)算法和行級變更計算
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* 計算兩段程式碼之間的行級變更
|
|
7
|
-
* 使用 LCS(最長共同子序列)算法來找出差異
|
|
8
|
-
*
|
|
9
|
-
* @param original - 原始程式碼
|
|
10
|
-
* @param modified - 修改後的程式碼
|
|
11
|
-
* @returns 行級變更列表
|
|
12
|
-
*/
|
|
13
|
-
export function calculateLineChanges(original, modified) {
|
|
14
|
-
const originalLines = original.split('\n');
|
|
15
|
-
const modifiedLines = modified.split('\n');
|
|
16
|
-
const changes = [];
|
|
17
|
-
const lcs = computeLCS(originalLines, modifiedLines);
|
|
18
|
-
// 使用命令式遍歷(非聲明式):LCS 演算法需要同步追蹤三個索引狀態
|
|
19
|
-
let origIdx = 0;
|
|
20
|
-
let modIdx = 0;
|
|
21
|
-
let lcsIdx = 0;
|
|
22
|
-
let virtualLineNum = 1; // 用於追蹤輸出行號
|
|
23
|
-
while (origIdx < originalLines.length || modIdx < modifiedLines.length) {
|
|
24
|
-
const isCommonLine = lcsIdx < lcs.length
|
|
25
|
-
&& origIdx < originalLines.length
|
|
26
|
-
&& modIdx < modifiedLines.length
|
|
27
|
-
&& originalLines[origIdx] === lcs[lcsIdx]
|
|
28
|
-
&& modifiedLines[modIdx] === lcs[lcsIdx];
|
|
29
|
-
if (isCommonLine) {
|
|
30
|
-
// 共同行(context)- 不需要記錄為變更
|
|
31
|
-
origIdx++;
|
|
32
|
-
modIdx++;
|
|
33
|
-
lcsIdx++;
|
|
34
|
-
virtualLineNum++;
|
|
35
|
-
}
|
|
36
|
-
else if (origIdx < originalLines.length
|
|
37
|
-
&& (lcsIdx >= lcs.length || originalLines[origIdx] !== lcs[lcsIdx])) {
|
|
38
|
-
// 刪除行
|
|
39
|
-
changes.push({
|
|
40
|
-
line: virtualLineNum,
|
|
41
|
-
oldContent: originalLines[origIdx],
|
|
42
|
-
newContent: null
|
|
43
|
-
});
|
|
44
|
-
origIdx++;
|
|
45
|
-
virtualLineNum++;
|
|
46
|
-
}
|
|
47
|
-
else if (modIdx < modifiedLines.length
|
|
48
|
-
&& (lcsIdx >= lcs.length || modifiedLines[modIdx] !== lcs[lcsIdx])) {
|
|
49
|
-
// 新增行 - 使用當前 virtualLineNum 作為參考行號
|
|
50
|
-
changes.push({
|
|
51
|
-
line: virtualLineNum,
|
|
52
|
-
oldContent: null,
|
|
53
|
-
newContent: modifiedLines[modIdx]
|
|
54
|
-
});
|
|
55
|
-
modIdx++;
|
|
56
|
-
virtualLineNum++;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return changes;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* 計算兩個字串陣列的最長共同子序列(LCS)
|
|
63
|
-
* 使用動態規劃算法,時間複雜度 O(mn),空間複雜度 O(mn)
|
|
64
|
-
*
|
|
65
|
-
* @param a - 第一個字串陣列
|
|
66
|
-
* @param b - 第二個字串陣列
|
|
67
|
-
* @returns 最長共同子序列
|
|
68
|
-
*/
|
|
69
|
-
export function computeLCS(a, b) {
|
|
70
|
-
const m = a.length;
|
|
71
|
-
const n = b.length;
|
|
72
|
-
// 建立 DP 表格
|
|
73
|
-
const dp = Array.from({ length: m + 1 }, () => Array(n + 1).fill(0));
|
|
74
|
-
// 填充 DP 表格
|
|
75
|
-
for (let i = 1; i <= m; i++) {
|
|
76
|
-
for (let j = 1; j <= n; j++) {
|
|
77
|
-
if (a[i - 1] === b[j - 1]) {
|
|
78
|
-
dp[i][j] = dp[i - 1][j - 1] + 1;
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
dp[i][j] = Math.max(dp[i - 1][j], dp[i][j - 1]);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
// 回溯找出 LCS
|
|
86
|
-
const lcs = [];
|
|
87
|
-
let i = m;
|
|
88
|
-
let j = n;
|
|
89
|
-
while (i > 0 && j > 0) {
|
|
90
|
-
if (a[i - 1] === b[j - 1]) {
|
|
91
|
-
lcs.unshift(a[i - 1]);
|
|
92
|
-
i--;
|
|
93
|
-
j--;
|
|
94
|
-
}
|
|
95
|
-
else if (dp[i - 1][j] > dp[i][j - 1]) {
|
|
96
|
-
i--;
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
j--;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
return lcs;
|
|
103
|
-
}
|
|
104
|
-
//# sourceMappingURL=diff-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"diff-utils.js","sourceRoot":"","sources":["../../../src/infrastructure/formatters/diff-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,QAAgB,EAAE,QAAgB;IACrE,MAAM,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,OAAO,GAAiB,EAAE,CAAC;IAEjC,MAAM,GAAG,GAAG,UAAU,CAAC,aAAa,EAAE,aAA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CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAClD,CAAC;QACH,CAAC;IACH,CAAC;IAED,WAAW;IACX,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,IAAI,CAAC,GAAG,CAAC,CAAC;IAEV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACtB,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;YAC1B,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACtB,CAAC,EAAE,CAAC;YACJ,CAAC,EAAE,CAAC;QACN,CAAC;aAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;YACvC,CAAC,EAAE,CAAC;QACN,CAAC;aAAM,CAAC;YACN,CAAC,EAAE,CAAC;QACN,CAAC;IACH,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Preview 輸入轉換器
|
|
3
|
-
* 將各 Core 模組的 preview 結果轉換為統一的 PreviewInput 格式
|
|
4
|
-
*/
|
|
5
|
-
import { type PreviewInput } from './types.js';
|
|
6
|
-
/**
|
|
7
|
-
* 操作介面 - 所有模組的操作都符合此結構
|
|
8
|
-
*/
|
|
9
|
-
interface OperationLike {
|
|
10
|
-
readonly filePath: string;
|
|
11
|
-
readonly oldText: string;
|
|
12
|
-
readonly newText: string;
|
|
13
|
-
readonly range: {
|
|
14
|
-
readonly start: {
|
|
15
|
-
readonly line: number;
|
|
16
|
-
readonly column: number;
|
|
17
|
-
};
|
|
18
|
-
readonly end: {
|
|
19
|
-
readonly line: number;
|
|
20
|
-
readonly column: number;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
/** 引用所在行的完整程式碼(用於 diff 輸出顯示完整行) */
|
|
24
|
-
readonly context?: string;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* 衝突介面 - rename 模組的衝突結構
|
|
28
|
-
*/
|
|
29
|
-
interface ConflictLike {
|
|
30
|
-
readonly type: string;
|
|
31
|
-
readonly message: string;
|
|
32
|
-
readonly location?: {
|
|
33
|
-
readonly filePath?: string;
|
|
34
|
-
readonly range?: {
|
|
35
|
-
readonly start: {
|
|
36
|
-
readonly line: number;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
/** Rename 操作選項 */
|
|
42
|
-
export interface RenamePreviewOptions {
|
|
43
|
-
/** 原始符號名稱 */
|
|
44
|
-
oldName?: string;
|
|
45
|
-
/** 新符號名稱 */
|
|
46
|
-
newName?: string;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* 從 Rename 模組的 preview 結果轉換為 PreviewInput
|
|
50
|
-
*/
|
|
51
|
-
export declare function convertRenamePreview(operations: readonly OperationLike[], conflicts: readonly ConflictLike[], originalContents: Map<string, string>, options?: RenamePreviewOptions): PreviewInput;
|
|
52
|
-
/**
|
|
53
|
-
* 從 Move 模組的結果轉換為 PreviewInput
|
|
54
|
-
*/
|
|
55
|
-
export declare function convertMovePreview(sourceFile: string, targetFile: string, pathUpdates: Array<{
|
|
56
|
-
filePath: string;
|
|
57
|
-
oldImport: string;
|
|
58
|
-
newImport: string;
|
|
59
|
-
line: number;
|
|
60
|
-
}>, originalContents: Map<string, string>): PreviewInput;
|
|
61
|
-
/**
|
|
62
|
-
* 從 Shift 模組的結果轉換為 PreviewInput
|
|
63
|
-
*/
|
|
64
|
-
export declare function convertShiftPreview(sourceFile: string, targetFile: string, fromLine: number, toLine: number, position: number, sourceOriginalContent: string, targetOriginalContent: string | null, movedLines: readonly string[]): PreviewInput;
|
|
65
|
-
/** Refactor 操作選項 */
|
|
66
|
-
export interface RefactorPreviewOptions {
|
|
67
|
-
/** 提取的函數名稱 */
|
|
68
|
-
functionName?: string;
|
|
69
|
-
/** 操作類型 */
|
|
70
|
-
action?: string;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* 從 Refactor/Extract 模組的結果轉換為 PreviewInput
|
|
74
|
-
*/
|
|
75
|
-
export declare function convertRefactorPreview(edits: Array<{
|
|
76
|
-
range: {
|
|
77
|
-
start: {
|
|
78
|
-
line: number;
|
|
79
|
-
};
|
|
80
|
-
end: {
|
|
81
|
-
line: number;
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
newText: string;
|
|
85
|
-
}>, filePath: string, originalContent: string, targetFileContent?: string, targetFilePath?: string, options?: RefactorPreviewOptions): PreviewInput;
|
|
86
|
-
/**
|
|
87
|
-
* Dead Code 刪除操作介面
|
|
88
|
-
*/
|
|
89
|
-
interface RemovalOperationLike {
|
|
90
|
-
readonly filePath: string;
|
|
91
|
-
readonly range: {
|
|
92
|
-
readonly start: {
|
|
93
|
-
readonly line: number;
|
|
94
|
-
readonly column: number;
|
|
95
|
-
};
|
|
96
|
-
readonly end: {
|
|
97
|
-
readonly line: number;
|
|
98
|
-
readonly column: number;
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
readonly originalCode: string;
|
|
102
|
-
readonly symbolName: string;
|
|
103
|
-
readonly symbolType: string;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Import 清理操作介面
|
|
107
|
-
*/
|
|
108
|
-
interface ImportCleanupLike {
|
|
109
|
-
readonly filePath: string;
|
|
110
|
-
readonly range: {
|
|
111
|
-
readonly start: {
|
|
112
|
-
readonly line: number;
|
|
113
|
-
readonly column: number;
|
|
114
|
-
};
|
|
115
|
-
readonly end: {
|
|
116
|
-
readonly line: number;
|
|
117
|
-
readonly column: number;
|
|
118
|
-
};
|
|
119
|
-
};
|
|
120
|
-
readonly originalImport: string;
|
|
121
|
-
readonly unusedSymbols: readonly string[];
|
|
122
|
-
readonly cleanupType: 'delete' | 'partial';
|
|
123
|
-
readonly newImport?: string;
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Dead Code 刪除預覽介面
|
|
127
|
-
*/
|
|
128
|
-
interface DeadCodeRemovalPreviewLike {
|
|
129
|
-
readonly success: boolean;
|
|
130
|
-
readonly removals: readonly RemovalOperationLike[];
|
|
131
|
-
readonly importCleanups: readonly ImportCleanupLike[];
|
|
132
|
-
readonly affectedFiles: readonly string[];
|
|
133
|
-
readonly summary: {
|
|
134
|
-
readonly totalRemovals: number;
|
|
135
|
-
readonly byType: Record<string, number>;
|
|
136
|
-
readonly filesAffected: number;
|
|
137
|
-
readonly linesRemoved: number;
|
|
138
|
-
readonly importsCleanedUp: number;
|
|
139
|
-
};
|
|
140
|
-
readonly warnings?: readonly string[];
|
|
141
|
-
readonly errors?: readonly string[];
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* 從 DeadCodeRemover 的 preview 結果轉換為 PreviewInput
|
|
145
|
-
*/
|
|
146
|
-
export declare function convertDeadCodeRemovalPreview(preview: DeadCodeRemovalPreviewLike, originalContents: Map<string, string>): PreviewInput;
|
|
147
|
-
export {};
|
|
148
|
-
//# sourceMappingURL=preview-converter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preview-converter.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/formatters/preview-converter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,KAAK,YAAY,EAIlB,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,UAAU,aAAa;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAA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