aspectcode 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.d.ts +16 -56
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +18 -21
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +14 -25
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +5 -61
- package/dist/config.js.map +1 -1
- package/dist/kbBuilder.d.ts +14 -0
- package/dist/kbBuilder.d.ts.map +1 -0
- package/dist/kbBuilder.js +106 -0
- package/dist/kbBuilder.js.map +1 -0
- package/dist/main.d.ts +4 -5
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +46 -145
- package/dist/main.js.map +1 -1
- package/dist/optimize.d.ts +14 -0
- package/dist/optimize.d.ts.map +1 -0
- package/dist/optimize.js +131 -0
- package/dist/optimize.js.map +1 -0
- package/dist/pipeline.d.ts +15 -0
- package/dist/pipeline.d.ts.map +1 -0
- package/dist/pipeline.js +212 -0
- package/dist/pipeline.js.map +1 -0
- package/dist/toolIngestion.d.ts +15 -0
- package/dist/toolIngestion.d.ts.map +1 -0
- package/dist/toolIngestion.js +47 -0
- package/dist/toolIngestion.js.map +1 -0
- package/dist/writer.d.ts +17 -0
- package/dist/writer.d.ts.map +1 -0
- package/dist/writer.js +26 -0
- package/dist/writer.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/analyzer.d.ts +34 -0
- package/node_modules/@aspectcode/core/dist/analysis/analyzer.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/analyzer.js +240 -0
- package/node_modules/@aspectcode/core/dist/analysis/analyzer.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/dependencyAdapters.d.ts +32 -0
- package/node_modules/@aspectcode/core/dist/analysis/dependencyAdapters.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/dependencyAdapters.js +133 -0
- package/node_modules/@aspectcode/core/dist/analysis/dependencyAdapters.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/importParsers.d.ts +30 -0
- package/node_modules/@aspectcode/core/dist/analysis/importParsers.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/importParsers.js +92 -0
- package/node_modules/@aspectcode/core/dist/analysis/importParsers.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/index.d.ts +9 -0
- package/node_modules/@aspectcode/core/dist/analysis/index.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/index.js +9 -0
- package/node_modules/@aspectcode/core/dist/analysis/index.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/moduleResolver.d.ts +34 -0
- package/node_modules/@aspectcode/core/dist/analysis/moduleResolver.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/moduleResolver.js +240 -0
- package/node_modules/@aspectcode/core/dist/analysis/moduleResolver.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/repo.d.ts +33 -0
- package/node_modules/@aspectcode/core/dist/analysis/repo.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/repo.js +246 -0
- package/node_modules/@aspectcode/core/dist/analysis/repo.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/classifiers.d.ts +24 -0
- package/node_modules/@aspectcode/core/dist/classifiers.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/classifiers.js +119 -0
- package/node_modules/@aspectcode/core/dist/classifiers.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/fs/exclusions.d.ts +26 -0
- package/node_modules/@aspectcode/core/dist/fs/exclusions.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/fs/exclusions.js +130 -0
- package/node_modules/@aspectcode/core/dist/fs/exclusions.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/fs/fingerprint.d.ts +42 -0
- package/node_modules/@aspectcode/core/dist/fs/fingerprint.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/fs/fingerprint.js +125 -0
- package/node_modules/@aspectcode/core/dist/fs/fingerprint.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/fs/index.d.ts +9 -0
- package/node_modules/@aspectcode/core/dist/fs/index.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/fs/index.js +26 -0
- package/node_modules/@aspectcode/core/dist/fs/index.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/fs/walker.d.ts +23 -0
- package/node_modules/@aspectcode/core/dist/fs/walker.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/fs/walker.js +94 -0
- package/node_modules/@aspectcode/core/dist/fs/walker.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/host.d.ts +38 -0
- package/node_modules/@aspectcode/core/dist/host.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/host.js +110 -0
- package/node_modules/@aspectcode/core/dist/host.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/index.d.ts +23 -0
- package/node_modules/@aspectcode/core/dist/index.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/index.js +59 -0
- package/node_modules/@aspectcode/core/dist/index.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/model.d.ts +90 -0
- package/node_modules/@aspectcode/core/dist/model.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/model.js +9 -0
- package/node_modules/@aspectcode/core/dist/model.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/csharpExtractors.d.ts +17 -0
- package/node_modules/@aspectcode/core/dist/parsers/csharpExtractors.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/csharpExtractors.js +225 -0
- package/node_modules/@aspectcode/core/dist/parsers/csharpExtractors.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/grammarLoader.d.ts +30 -0
- package/node_modules/@aspectcode/core/dist/parsers/grammarLoader.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/grammarLoader.js +71 -0
- package/node_modules/@aspectcode/core/dist/parsers/grammarLoader.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/index.d.ts +13 -0
- package/node_modules/@aspectcode/core/dist/parsers/index.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/index.js +32 -0
- package/node_modules/@aspectcode/core/dist/parsers/index.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/javaExtractors.d.ts +17 -0
- package/node_modules/@aspectcode/core/dist/parsers/javaExtractors.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/javaExtractors.js +182 -0
- package/node_modules/@aspectcode/core/dist/parsers/javaExtractors.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/languages.d.ts +44 -0
- package/node_modules/@aspectcode/core/dist/parsers/languages.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/languages.js +64 -0
- package/node_modules/@aspectcode/core/dist/parsers/languages.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/pythonExtractors.d.ts +18 -0
- package/node_modules/@aspectcode/core/dist/parsers/pythonExtractors.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/pythonExtractors.js +139 -0
- package/node_modules/@aspectcode/core/dist/parsers/pythonExtractors.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/tsJsExtractors.d.ts +22 -0
- package/node_modules/@aspectcode/core/dist/parsers/tsJsExtractors.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/tsJsExtractors.js +240 -0
- package/node_modules/@aspectcode/core/dist/parsers/tsJsExtractors.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/utils.d.ts +7 -0
- package/node_modules/@aspectcode/core/dist/parsers/utils.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/utils.js +11 -0
- package/node_modules/@aspectcode/core/dist/parsers/utils.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/paths.d.ts +27 -0
- package/node_modules/@aspectcode/core/dist/paths.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/paths.js +45 -0
- package/node_modules/@aspectcode/core/dist/paths.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/stats.d.ts +41 -0
- package/node_modules/@aspectcode/core/dist/stats.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/stats.js +88 -0
- package/node_modules/@aspectcode/core/dist/stats.js.map +1 -0
- package/node_modules/@aspectcode/core/package.json +41 -0
- package/node_modules/@aspectcode/core/parsers/c_sharp.wasm +0 -0
- package/node_modules/@aspectcode/core/parsers/java.wasm +0 -0
- package/node_modules/@aspectcode/core/parsers/javascript.wasm +0 -0
- package/node_modules/@aspectcode/core/parsers/python.wasm +0 -0
- package/node_modules/@aspectcode/core/parsers/tree-sitter.wasm +0 -0
- package/node_modules/@aspectcode/core/parsers/tsx.wasm +0 -0
- package/node_modules/@aspectcode/core/parsers/typescript.wasm +0 -0
- package/node_modules/@aspectcode/emitters/dist/emitter.d.ts +72 -0
- package/node_modules/@aspectcode/emitters/dist/emitter.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/emitter.js +10 -0
- package/node_modules/@aspectcode/emitters/dist/emitter.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/host.d.ts +31 -0
- package/node_modules/@aspectcode/emitters/dist/host.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/host.js +86 -0
- package/node_modules/@aspectcode/emitters/dist/host.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/index.d.ts +27 -0
- package/node_modules/@aspectcode/emitters/dist/index.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/index.js +116 -0
- package/node_modules/@aspectcode/emitters/dist/index.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/content.d.ts +15 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/content.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/content.js +289 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/content.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/detection.d.ts +13 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/detection.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/detection.js +55 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/detection.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/formats.d.ts +17 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/formats.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/formats.js +23 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/formats.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/index.d.ts +5 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/index.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/index.js +12 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/index.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/instructionsEmitter.d.ts +9 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/instructionsEmitter.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/instructionsEmitter.js +30 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/instructionsEmitter.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/analyzers.d.ts +64 -0
- package/node_modules/@aspectcode/emitters/dist/kb/analyzers.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/analyzers.js +504 -0
- package/node_modules/@aspectcode/emitters/dist/kb/analyzers.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/architectureEmitter.d.ts +24 -0
- package/node_modules/@aspectcode/emitters/dist/kb/architectureEmitter.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/architectureEmitter.js +238 -0
- package/node_modules/@aspectcode/emitters/dist/kb/architectureEmitter.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/classifiers.d.ts +8 -0
- package/node_modules/@aspectcode/emitters/dist/kb/classifiers.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/classifiers.js +14 -0
- package/node_modules/@aspectcode/emitters/dist/kb/classifiers.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/constants.d.ts +35 -0
- package/node_modules/@aspectcode/emitters/dist/kb/constants.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/constants.js +38 -0
- package/node_modules/@aspectcode/emitters/dist/kb/constants.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/contextEmitter.d.ts +20 -0
- package/node_modules/@aspectcode/emitters/dist/kb/contextEmitter.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/contextEmitter.js +155 -0
- package/node_modules/@aspectcode/emitters/dist/kb/contextEmitter.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/conventions.d.ts +52 -0
- package/node_modules/@aspectcode/emitters/dist/kb/conventions.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/conventions.js +391 -0
- package/node_modules/@aspectcode/emitters/dist/kb/conventions.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/depData.d.ts +18 -0
- package/node_modules/@aspectcode/emitters/dist/kb/depData.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/depData.js +31 -0
- package/node_modules/@aspectcode/emitters/dist/kb/depData.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/detectors.d.ts +18 -0
- package/node_modules/@aspectcode/emitters/dist/kb/detectors.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/detectors.js +317 -0
- package/node_modules/@aspectcode/emitters/dist/kb/detectors.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/entryPoints.d.ts +33 -0
- package/node_modules/@aspectcode/emitters/dist/kb/entryPoints.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/entryPoints.js +323 -0
- package/node_modules/@aspectcode/emitters/dist/kb/entryPoints.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/helpers.d.ts +27 -0
- package/node_modules/@aspectcode/emitters/dist/kb/helpers.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/helpers.js +63 -0
- package/node_modules/@aspectcode/emitters/dist/kb/helpers.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/index.d.ts +27 -0
- package/node_modules/@aspectcode/emitters/dist/kb/index.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/index.js +72 -0
- package/node_modules/@aspectcode/emitters/dist/kb/index.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/kbEmitter.d.ts +21 -0
- package/node_modules/@aspectcode/emitters/dist/kb/kbEmitter.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/kbEmitter.js +125 -0
- package/node_modules/@aspectcode/emitters/dist/kb/kbEmitter.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/mapEmitter.d.ts +26 -0
- package/node_modules/@aspectcode/emitters/dist/kb/mapEmitter.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/mapEmitter.js +255 -0
- package/node_modules/@aspectcode/emitters/dist/kb/mapEmitter.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/policy.d.ts +12 -0
- package/node_modules/@aspectcode/emitters/dist/kb/policy.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/policy.js +29 -0
- package/node_modules/@aspectcode/emitters/dist/kb/policy.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/symbols.d.ts +43 -0
- package/node_modules/@aspectcode/emitters/dist/kb/symbols.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/symbols.js +343 -0
- package/node_modules/@aspectcode/emitters/dist/kb/symbols.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/manifest.d.ts +37 -0
- package/node_modules/@aspectcode/emitters/dist/manifest.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/manifest.js +50 -0
- package/node_modules/@aspectcode/emitters/dist/manifest.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/report.d.ts +22 -0
- package/node_modules/@aspectcode/emitters/dist/report.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/report.js +3 -0
- package/node_modules/@aspectcode/emitters/dist/report.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/stableJson.d.ts +14 -0
- package/node_modules/@aspectcode/emitters/dist/stableJson.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/stableJson.js +40 -0
- package/node_modules/@aspectcode/emitters/dist/stableJson.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/transaction.d.ts +29 -0
- package/node_modules/@aspectcode/emitters/dist/transaction.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/transaction.js +104 -0
- package/node_modules/@aspectcode/emitters/dist/transaction.js.map +1 -0
- package/node_modules/@aspectcode/emitters/package.json +39 -0
- package/node_modules/@aspectcode/optimizer/dist/agent.d.ts +18 -0
- package/node_modules/@aspectcode/optimizer/dist/agent.d.ts.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/agent.js +123 -0
- package/node_modules/@aspectcode/optimizer/dist/agent.js.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/index.d.ts +15 -0
- package/node_modules/@aspectcode/optimizer/dist/index.d.ts.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/index.js +31 -0
- package/node_modules/@aspectcode/optimizer/dist/index.js.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/prompts.d.ts +39 -0
- package/node_modules/@aspectcode/optimizer/dist/prompts.d.ts.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/prompts.js +156 -0
- package/node_modules/@aspectcode/optimizer/dist/prompts.js.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/anthropic.d.ts +20 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/anthropic.d.ts.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/anthropic.js +126 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/anthropic.js.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/index.d.ts +28 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/index.d.ts.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/index.js +142 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/index.js.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/openai.d.ts +19 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/openai.d.ts.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/openai.js +98 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/openai.js.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/retry.d.ts +19 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/retry.d.ts.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/retry.js +87 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/retry.js.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/types.d.ts +93 -0
- package/node_modules/@aspectcode/optimizer/dist/types.d.ts.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/types.js +20 -0
- package/node_modules/@aspectcode/optimizer/dist/types.js.map +1 -0
- package/node_modules/@aspectcode/optimizer/package.json +41 -0
- package/package.json +11 -3
- package/dist/commands/deps.d.ts +0 -3
- package/dist/commands/deps.d.ts.map +0 -1
- package/dist/commands/deps.js +0 -39
- package/dist/commands/deps.js.map +0 -1
- package/dist/commands/generate.d.ts +0 -8
- package/dist/commands/generate.d.ts.map +0 -1
- package/dist/commands/generate.js +0 -176
- package/dist/commands/generate.js.map +0 -1
- package/dist/commands/impact.d.ts +0 -9
- package/dist/commands/impact.d.ts.map +0 -1
- package/dist/commands/impact.js +0 -162
- package/dist/commands/impact.js.map +0 -1
- package/dist/commands/init.d.ts +0 -11
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -204
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/settings.d.ts +0 -13
- package/dist/commands/settings.d.ts.map +0 -1
- package/dist/commands/settings.js +0 -196
- package/dist/commands/settings.js.map +0 -1
- package/dist/commands/watch.d.ts +0 -6
- package/dist/commands/watch.d.ts.map +0 -1
- package/dist/commands/watch.js +0 -181
- package/dist/commands/watch.js.map +0 -1
- package/dist/connections.d.ts +0 -24
- package/dist/connections.d.ts.map +0 -1
- package/dist/connections.js +0 -89
- package/dist/connections.js.map +0 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registry-backed dependency extraction adapters.
|
|
3
|
+
*
|
|
4
|
+
* This layer centralizes language dispatch for dependency extraction,
|
|
5
|
+
* so analyzers do not hardcode per-extension switches.
|
|
6
|
+
*
|
|
7
|
+
* Current adapters use existing parser functions. The interface is
|
|
8
|
+
* intentionally tree-sitter-ready for phased migration.
|
|
9
|
+
*/
|
|
10
|
+
import type { CallSite, ImportStatement } from './importParsers';
|
|
11
|
+
import type { LoadedGrammars } from '../parsers/grammarLoader';
|
|
12
|
+
export type DependencyWarningKind = 'grammar-missing' | 'tree-sitter-extract-failed';
|
|
13
|
+
export type DependencyWarningLogger = (kind: DependencyWarningKind, language: string, filePath: string, message: string) => void;
|
|
14
|
+
export interface DependencyLanguageAdapter {
|
|
15
|
+
id: string;
|
|
16
|
+
extensions: readonly string[];
|
|
17
|
+
extractImports(filePath: string, content: string, ctx: AdapterContext): ImportStatement[];
|
|
18
|
+
extractCalls(filePath: string, content: string): CallSite[];
|
|
19
|
+
}
|
|
20
|
+
interface AdapterContext {
|
|
21
|
+
grammars: LoadedGrammars;
|
|
22
|
+
warn?: DependencyWarningLogger;
|
|
23
|
+
}
|
|
24
|
+
export declare function setDependencyAdapterGrammars(grammars: LoadedGrammars): void;
|
|
25
|
+
export declare function getDependencyAdapterForFile(filePath: string): DependencyLanguageAdapter | undefined;
|
|
26
|
+
export declare function analyzeDependenciesForFile(filePath: string, content: string, warn?: DependencyWarningLogger): {
|
|
27
|
+
imports: ImportStatement[];
|
|
28
|
+
calls: CallSite[];
|
|
29
|
+
};
|
|
30
|
+
export declare function getRegisteredDependencyAdapters(): readonly DependencyLanguageAdapter[];
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=dependencyAdapters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependencyAdapters.d.ts","sourceRoot":"","sources":["../../src/analysis/dependencyAdapters.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAIjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAM/D,MAAM,MAAM,qBAAqB,GAC7B,iBAAiB,GACjB,4BAA4B,CAAC;AAEjC,MAAM,MAAM,uBAAuB,GAAG,CACpC,IAAI,EAAE,qBAAqB,EAC3B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,KACZ,IAAI,CAAC;AAEV,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,cAAc,CACZ,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,cAAc,GAClB,eAAe,EAAE,CAAC;IACrB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,QAAQ,EAAE,CAAC;CAC7D;AAED,UAAU,cAAc;IACtB,QAAQ,EAAE,cAAc,CAAC;IACzB,IAAI,CAAC,EAAE,uBAAuB,CAAC;CAChC;AA0FD,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAE3E;AAED,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,MAAM,GACf,yBAAyB,GAAG,SAAS,CAGvC;AAED,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,uBAAuB,GAC7B;IAAE,OAAO,EAAE,eAAe,EAAE,CAAC;IAAC,KAAK,EAAE,QAAQ,EAAE,CAAA;CAAE,CAkBnD;AAED,wBAAgB,+BAA+B,IAAI,SAAS,yBAAyB,EAAE,CAEtF"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Registry-backed dependency extraction adapters.
|
|
4
|
+
*
|
|
5
|
+
* This layer centralizes language dispatch for dependency extraction,
|
|
6
|
+
* so analyzers do not hardcode per-extension switches.
|
|
7
|
+
*
|
|
8
|
+
* Current adapters use existing parser functions. The interface is
|
|
9
|
+
* intentionally tree-sitter-ready for phased migration.
|
|
10
|
+
*/
|
|
11
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
14
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
15
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
16
|
+
}
|
|
17
|
+
Object.defineProperty(o, k2, desc);
|
|
18
|
+
}) : (function(o, m, k, k2) {
|
|
19
|
+
if (k2 === undefined) k2 = k;
|
|
20
|
+
o[k2] = m[k];
|
|
21
|
+
}));
|
|
22
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
23
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
24
|
+
}) : function(o, v) {
|
|
25
|
+
o["default"] = v;
|
|
26
|
+
});
|
|
27
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
28
|
+
var ownKeys = function(o) {
|
|
29
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
30
|
+
var ar = [];
|
|
31
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
32
|
+
return ar;
|
|
33
|
+
};
|
|
34
|
+
return ownKeys(o);
|
|
35
|
+
};
|
|
36
|
+
return function (mod) {
|
|
37
|
+
if (mod && mod.__esModule) return mod;
|
|
38
|
+
var result = {};
|
|
39
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
40
|
+
__setModuleDefault(result, mod);
|
|
41
|
+
return result;
|
|
42
|
+
};
|
|
43
|
+
})();
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.setDependencyAdapterGrammars = setDependencyAdapterGrammars;
|
|
46
|
+
exports.getDependencyAdapterForFile = getDependencyAdapterForFile;
|
|
47
|
+
exports.analyzeDependenciesForFile = analyzeDependenciesForFile;
|
|
48
|
+
exports.getRegisteredDependencyAdapters = getRegisteredDependencyAdapters;
|
|
49
|
+
const path = __importStar(require("path"));
|
|
50
|
+
const importParsers_1 = require("./importParsers");
|
|
51
|
+
const pythonExtractors_1 = require("../parsers/pythonExtractors");
|
|
52
|
+
const tsJsExtractors_1 = require("../parsers/tsJsExtractors");
|
|
53
|
+
const javaExtractors_1 = require("../parsers/javaExtractors");
|
|
54
|
+
const csharpExtractors_1 = require("../parsers/csharpExtractors");
|
|
55
|
+
function createTreeSitterPreferredAdapter(id, extensions, selectGrammar, extractWithTreeSitter) {
|
|
56
|
+
return {
|
|
57
|
+
id,
|
|
58
|
+
extensions,
|
|
59
|
+
extractImports: (filePath, content, ctx) => {
|
|
60
|
+
const grammar = selectGrammar(filePath, ctx.grammars);
|
|
61
|
+
if (grammar) {
|
|
62
|
+
try {
|
|
63
|
+
const modules = extractWithTreeSitter(grammar, content);
|
|
64
|
+
return modules.map((module) => ({
|
|
65
|
+
module,
|
|
66
|
+
symbols: [module],
|
|
67
|
+
isDefault: true,
|
|
68
|
+
line: 1,
|
|
69
|
+
raw: `tree-sitter:${module}`,
|
|
70
|
+
}));
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
ctx.warn?.('tree-sitter-extract-failed', id, filePath, `Tree-sitter import extraction failed; skipping imports (${String(error)})`);
|
|
74
|
+
return [];
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
ctx.warn?.('grammar-missing', id, filePath, 'No grammar loaded for language; skipping imports');
|
|
79
|
+
return [];
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
extractCalls: (filePath, content) => (0, importParsers_1.analyzeFileCalls)(filePath, content),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
const ADAPTERS = [
|
|
86
|
+
createTreeSitterPreferredAdapter('python', ['.py'], (_filePath, grammars) => grammars.python, pythonExtractors_1.extractPythonImports),
|
|
87
|
+
createTreeSitterPreferredAdapter('javascript', ['.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs'], (filePath, grammars) => {
|
|
88
|
+
const ext = path.extname(filePath).toLowerCase();
|
|
89
|
+
if (ext === '.tsx')
|
|
90
|
+
return grammars.tsx ?? grammars.typescript;
|
|
91
|
+
if (ext === '.js' || ext === '.jsx' || ext === '.mjs' || ext === '.cjs') {
|
|
92
|
+
return grammars.javascript ?? grammars.typescript;
|
|
93
|
+
}
|
|
94
|
+
return grammars.typescript ?? grammars.javascript;
|
|
95
|
+
}, tsJsExtractors_1.extractTSJSImports),
|
|
96
|
+
createTreeSitterPreferredAdapter('java', ['.java'], (_filePath, grammars) => grammars.java, javaExtractors_1.extractJavaImports),
|
|
97
|
+
createTreeSitterPreferredAdapter('csharp', ['.cs'], (_filePath, grammars) => grammars.csharp, csharpExtractors_1.extractCSharpImports),
|
|
98
|
+
];
|
|
99
|
+
const adapterByExtension = new Map();
|
|
100
|
+
for (const adapter of ADAPTERS) {
|
|
101
|
+
for (const ext of adapter.extensions) {
|
|
102
|
+
adapterByExtension.set(ext, adapter);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
let activeGrammars = {};
|
|
106
|
+
function setDependencyAdapterGrammars(grammars) {
|
|
107
|
+
activeGrammars = grammars;
|
|
108
|
+
}
|
|
109
|
+
function getDependencyAdapterForFile(filePath) {
|
|
110
|
+
const ext = path.extname(filePath).toLowerCase();
|
|
111
|
+
return adapterByExtension.get(ext);
|
|
112
|
+
}
|
|
113
|
+
function analyzeDependenciesForFile(filePath, content, warn) {
|
|
114
|
+
const adapter = getDependencyAdapterForFile(filePath);
|
|
115
|
+
const ctx = {
|
|
116
|
+
grammars: activeGrammars,
|
|
117
|
+
warn,
|
|
118
|
+
};
|
|
119
|
+
if (!adapter) {
|
|
120
|
+
return {
|
|
121
|
+
imports: [],
|
|
122
|
+
calls: (0, importParsers_1.analyzeFileCalls)(filePath, content),
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
return {
|
|
126
|
+
imports: adapter.extractImports(filePath, content, ctx),
|
|
127
|
+
calls: adapter.extractCalls(filePath, content),
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
function getRegisteredDependencyAdapters() {
|
|
131
|
+
return ADAPTERS;
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=dependencyAdapters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependencyAdapters.js","sourceRoot":"","sources":["../../src/analysis/dependencyAdapters.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgIH,oEAEC;AAED,kEAKC;AAED,gEAsBC;AAED,0EAEC;AAnKD,2CAA6B;AAE7B,mDAEyB;AAEzB,kEAAmE;AACnE,8DAA+D;AAC/D,8DAA+D;AAC/D,kEAAmE;AA6BnE,SAAS,gCAAgC,CACvC,EAAU,EACV,UAA6B,EAC7B,aAA+G,EAC/G,qBAA6G;IAE7G,OAAO;QACL,EAAE;QACF,UAAU;QACV,cAAc,EAAE,CAAC,QAAQ,EAAE,OAAO,EA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,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC;IACjD,OAAO,kBAAkB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACrC,CAAC;AAED,SAAgB,0BAA0B,CACxC,QAAgB,EAChB,OAAe,EACf,IAA8B;IAE9B,MAAM,OAAO,GAAG,2BAA2B,CAAC,QAAQ,CAAC,CAAC;IACtD,MAAM,GAAG,GAAmB;QAC1B,QAAQ,EAAE,cAAc;QACxB,IAAI;KACL,CAAC;IAEF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO;YACL,OAAO,EAAE,EAAE;YACX,KAAK,EAAE,IAAA,gCAAgB,EAAC,QAAQ,EAAE,OAAO,CAAC;SAC3C,CAAC;IACJ,CAAC;IAED,OAAO;QACL,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC;QACvD,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC;KAC/C,CAAC;AACJ,CAAC;AAED,SAAgB,+BAA+B;IAC7C,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lightweight call-site and import-strength helpers.
|
|
3
|
+
*
|
|
4
|
+
* Tree-sitter-based import extraction now lives in the per-language
|
|
5
|
+
* extractors (pythonExtractors, tsJsExtractors, javaExtractors,
|
|
6
|
+
* csharpExtractors) and is wired through dependencyAdapters.ts.
|
|
7
|
+
* This module retains only the call-site scanner and the
|
|
8
|
+
* import-strength heuristic used by DependencyAnalyzer.
|
|
9
|
+
*/
|
|
10
|
+
export interface ImportStatement {
|
|
11
|
+
module: string;
|
|
12
|
+
symbols: string[];
|
|
13
|
+
isDefault: boolean;
|
|
14
|
+
line: number;
|
|
15
|
+
raw: string;
|
|
16
|
+
}
|
|
17
|
+
export interface CallSite {
|
|
18
|
+
callee: string;
|
|
19
|
+
line: number;
|
|
20
|
+
isExternal: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Analyze function/method calls in a single file.
|
|
24
|
+
*/
|
|
25
|
+
export declare function analyzeFileCalls(filePath: string, content: string): CallSite[];
|
|
26
|
+
/**
|
|
27
|
+
* Calculate import strength based on number of symbols and pattern.
|
|
28
|
+
*/
|
|
29
|
+
export declare function calculateImportStrength(imp: ImportStatement): number;
|
|
30
|
+
//# sourceMappingURL=importParsers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"importParsers.d.ts","sourceRoot":"","sources":["../../src/analysis/importParsers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;CACrB;AAID;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,GACd,QAAQ,EAAE,CAuBZ;AAID;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAOpE"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Lightweight call-site and import-strength helpers.
|
|
4
|
+
*
|
|
5
|
+
* Tree-sitter-based import extraction now lives in the per-language
|
|
6
|
+
* extractors (pythonExtractors, tsJsExtractors, javaExtractors,
|
|
7
|
+
* csharpExtractors) and is wired through dependencyAdapters.ts.
|
|
8
|
+
* This module retains only the call-site scanner and the
|
|
9
|
+
* import-strength heuristic used by DependencyAnalyzer.
|
|
10
|
+
*/
|
|
11
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
14
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
15
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
16
|
+
}
|
|
17
|
+
Object.defineProperty(o, k2, desc);
|
|
18
|
+
}) : (function(o, m, k, k2) {
|
|
19
|
+
if (k2 === undefined) k2 = k;
|
|
20
|
+
o[k2] = m[k];
|
|
21
|
+
}));
|
|
22
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
23
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
24
|
+
}) : function(o, v) {
|
|
25
|
+
o["default"] = v;
|
|
26
|
+
});
|
|
27
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
28
|
+
var ownKeys = function(o) {
|
|
29
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
30
|
+
var ar = [];
|
|
31
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
32
|
+
return ar;
|
|
33
|
+
};
|
|
34
|
+
return ownKeys(o);
|
|
35
|
+
};
|
|
36
|
+
return function (mod) {
|
|
37
|
+
if (mod && mod.__esModule) return mod;
|
|
38
|
+
var result = {};
|
|
39
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
40
|
+
__setModuleDefault(result, mod);
|
|
41
|
+
return result;
|
|
42
|
+
};
|
|
43
|
+
})();
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.analyzeFileCalls = analyzeFileCalls;
|
|
46
|
+
exports.calculateImportStrength = calculateImportStrength;
|
|
47
|
+
const path = __importStar(require("path"));
|
|
48
|
+
// ── Call-site analysis ───────────────────────────────────────
|
|
49
|
+
/**
|
|
50
|
+
* Analyze function/method calls in a single file.
|
|
51
|
+
*/
|
|
52
|
+
function analyzeFileCalls(filePath, content) {
|
|
53
|
+
const extension = path.extname(filePath).toLowerCase();
|
|
54
|
+
const lines = content.split('\n');
|
|
55
|
+
const calls = [];
|
|
56
|
+
for (let i = 0; i < lines.length; i++) {
|
|
57
|
+
const line = lines[i];
|
|
58
|
+
const lineNum = i + 1;
|
|
59
|
+
const callPattern = /(\w+\.)*(\w+)\s*\(/g;
|
|
60
|
+
let match;
|
|
61
|
+
while ((match = callPattern.exec(line)) !== null) {
|
|
62
|
+
const fullCall = match[0];
|
|
63
|
+
const callee = match[2];
|
|
64
|
+
if (isLikelyExternalCall(fullCall, extension)) {
|
|
65
|
+
calls.push({ callee, line: lineNum, isExternal: true });
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return calls;
|
|
70
|
+
}
|
|
71
|
+
// ── Helpers ──────────────────────────────────────────────────
|
|
72
|
+
/**
|
|
73
|
+
* Calculate import strength based on number of symbols and pattern.
|
|
74
|
+
*/
|
|
75
|
+
function calculateImportStrength(imp) {
|
|
76
|
+
let strength = 0.7;
|
|
77
|
+
strength += Math.min(0.2, imp.symbols.length * 0.05);
|
|
78
|
+
if (imp.isDefault) {
|
|
79
|
+
strength += 0.1;
|
|
80
|
+
}
|
|
81
|
+
return Math.min(1.0, strength);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Detect if a function call is likely external (module-qualified).
|
|
85
|
+
*/
|
|
86
|
+
function isLikelyExternalCall(callExpr, _fileExtension) {
|
|
87
|
+
if (callExpr.startsWith('this.') || callExpr.startsWith('self.')) {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
return /^\w+\.\w+/.test(callExpr);
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=importParsers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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AI,QAAQ,GAAG,GAAG,CAAC;IACnB,QAAQ,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACrD,IAAI,GAAG,CAAC,SAAS,EAAE,CAAC;QAClB,QAAQ,IAAI,GAAG,CAAC;IAClB,CAAC;IACD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;AACjC,CAAC;AAED;;GAEG;AACH,SAAS,oBAAoB,CAC3B,QAAgB,EAChB,cAAsB;IAEtB,IAAI,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QACjE,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Analysis module — dependency analysis with no vscode coupling.
|
|
3
|
+
*/
|
|
4
|
+
export type { ImportStatement, CallSite } from './importParsers';
|
|
5
|
+
export type { FileIndex } from './moduleResolver';
|
|
6
|
+
export type { DependencyProgressCallback, DependencyWarningCallback } from './analyzer';
|
|
7
|
+
export { DependencyAnalyzer } from './analyzer';
|
|
8
|
+
export type { DependencyLanguageAdapter } from './dependencyAdapters';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/analysis/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,YAAY,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGjE,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,YAAY,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAGhD,YAAY,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Analysis module — dependency analysis with no vscode coupling.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DependencyAnalyzer = void 0;
|
|
7
|
+
var analyzer_1 = require("./analyzer");
|
|
8
|
+
Object.defineProperty(exports, "DependencyAnalyzer", { enumerable: true, get: function () { return analyzer_1.DependencyAnalyzer; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/analysis/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAUH,uCAAgD;AAAvC,8GAAA,kBAAkB,OAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fast module resolution using pre-built file indexes.
|
|
3
|
+
*
|
|
4
|
+
* Provides O(1) average-case lookups for resolving import specifiers
|
|
5
|
+
* to concrete file paths within the workspace.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Pre-built indexes for fast module resolution.
|
|
9
|
+
* Built once per analysis run; lookups are O(1) average.
|
|
10
|
+
*/
|
|
11
|
+
export interface FileIndex {
|
|
12
|
+
/** basename (no ext) -> list of full paths */
|
|
13
|
+
byBasename: Map<string, string[]>;
|
|
14
|
+
/** normalized lowercase path -> original path */
|
|
15
|
+
byNormalizedPath: Map<string, string>;
|
|
16
|
+
/** Set of all normalized lowercase paths for O(1) existence check */
|
|
17
|
+
normalizedPathSet: Set<string>;
|
|
18
|
+
/** For package-style imports: "pkg/subpkg/module" -> full path */
|
|
19
|
+
byPackagePath: Map<string, string[]>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Build indexes for fast lookups. O(N) once, then O(1) per lookup.
|
|
23
|
+
*/
|
|
24
|
+
export declare function buildFileIndex(files: string[]): FileIndex;
|
|
25
|
+
/**
|
|
26
|
+
* Fast module path resolution using pre-built indexes.
|
|
27
|
+
* O(1) average per lookup instead of O(N).
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveModulePathFast(module: string, sourceFile: string, fileIndex: FileIndex): string | null;
|
|
30
|
+
/**
|
|
31
|
+
* Fast call target resolution using cached file contents.
|
|
32
|
+
*/
|
|
33
|
+
export declare function resolveCallTargetFast(callee: string, _sourceFile: string, fileIndex: FileIndex, fileContents: Map<string, string>): string | null;
|
|
34
|
+
//# sourceMappingURL=moduleResolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moduleResolver.d.ts","sourceRoot":"","sources":["../../src/analysis/moduleResolver.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,8CAA8C;IAC9C,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAClC,iDAAiD;IACjD,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,qEAAqE;IACrE,iBAAiB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC/B,kEAAkE;IAClE,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CACtC;AAID;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAS,CAoCzD;AAID;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,SAAS,GACnB,MAAM,GAAG,IAAI,CA8Gf;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAChC,MAAM,GAAG,IAAI,CAsBf"}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Fast module resolution using pre-built file indexes.
|
|
4
|
+
*
|
|
5
|
+
* Provides O(1) average-case lookups for resolving import specifiers
|
|
6
|
+
* to concrete file paths within the workspace.
|
|
7
|
+
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
+
}) : function(o, v) {
|
|
22
|
+
o["default"] = v;
|
|
23
|
+
});
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.buildFileIndex = buildFileIndex;
|
|
43
|
+
exports.resolveModulePathFast = resolveModulePathFast;
|
|
44
|
+
exports.resolveCallTargetFast = resolveCallTargetFast;
|
|
45
|
+
const path = __importStar(require("path"));
|
|
46
|
+
// ── Index construction ───────────────────────────────────────
|
|
47
|
+
/**
|
|
48
|
+
* Build indexes for fast lookups. O(N) once, then O(1) per lookup.
|
|
49
|
+
*/
|
|
50
|
+
function buildFileIndex(files) {
|
|
51
|
+
const byBasename = new Map();
|
|
52
|
+
const byNormalizedPath = new Map();
|
|
53
|
+
const normalizedPathSet = new Set();
|
|
54
|
+
const byPackagePath = new Map();
|
|
55
|
+
for (const file of files) {
|
|
56
|
+
const normalized = path.normalize(file);
|
|
57
|
+
const normalizedLower = normalized.toLowerCase();
|
|
58
|
+
const basename = path.basename(file, path.extname(file));
|
|
59
|
+
// Index by basename
|
|
60
|
+
const basenameKey = basename.toLowerCase();
|
|
61
|
+
if (!byBasename.has(basenameKey)) {
|
|
62
|
+
byBasename.set(basenameKey, []);
|
|
63
|
+
}
|
|
64
|
+
byBasename.get(basenameKey).push(file);
|
|
65
|
+
// Index by normalized path
|
|
66
|
+
byNormalizedPath.set(normalizedLower, file);
|
|
67
|
+
normalizedPathSet.add(normalizedLower);
|
|
68
|
+
// Index by package-style path segments
|
|
69
|
+
const parts = normalized.replace(/\\/g, '/').split('/');
|
|
70
|
+
const basenameNoExt = path.basename(file, path.extname(file));
|
|
71
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
72
|
+
const pkgPath = parts.slice(i, -1).join('/') + '/' + basenameNoExt;
|
|
73
|
+
const pkgKey = pkgPath.toLowerCase();
|
|
74
|
+
if (!byPackagePath.has(pkgKey)) {
|
|
75
|
+
byPackagePath.set(pkgKey, []);
|
|
76
|
+
}
|
|
77
|
+
byPackagePath.get(pkgKey).push(file);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return { byBasename, byNormalizedPath, normalizedPathSet, byPackagePath };
|
|
81
|
+
}
|
|
82
|
+
// ── Module resolution ────────────────────────────────────────
|
|
83
|
+
/**
|
|
84
|
+
* Fast module path resolution using pre-built indexes.
|
|
85
|
+
* O(1) average per lookup instead of O(N).
|
|
86
|
+
*/
|
|
87
|
+
function resolveModulePathFast(module, sourceFile, fileIndex) {
|
|
88
|
+
const sourceDir = path.dirname(sourceFile);
|
|
89
|
+
const extension = path.extname(sourceFile).toLowerCase();
|
|
90
|
+
const { byBasename, byNormalizedPath, normalizedPathSet, byPackagePath } = fileIndex;
|
|
91
|
+
const allowedTargetExts = allowedExtensionsForSource(extension);
|
|
92
|
+
const filterByExts = (candidates) => {
|
|
93
|
+
if (allowedTargetExts.size === 0)
|
|
94
|
+
return candidates;
|
|
95
|
+
return candidates.filter((c) => allowedTargetExts.has(path.extname(c).toLowerCase()));
|
|
96
|
+
};
|
|
97
|
+
// Build module variants
|
|
98
|
+
const moduleVariants = [module];
|
|
99
|
+
if (module.includes('.')) {
|
|
100
|
+
const parts = module.split('.');
|
|
101
|
+
moduleVariants.push(parts[parts.length - 1]);
|
|
102
|
+
moduleVariants.push(parts.join('/'));
|
|
103
|
+
}
|
|
104
|
+
// Try relative path resolution first (O(1) lookup)
|
|
105
|
+
for (const moduleVariant of moduleVariants) {
|
|
106
|
+
const candidates = [];
|
|
107
|
+
if (extension === '.py') {
|
|
108
|
+
candidates.push(path.resolve(sourceDir, moduleVariant + '.py'), path.resolve(sourceDir, moduleVariant, '__init__.py'));
|
|
109
|
+
}
|
|
110
|
+
else if (['.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs'].includes(extension)) {
|
|
111
|
+
candidates.push(path.resolve(sourceDir, moduleVariant + '.ts'), path.resolve(sourceDir, moduleVariant + '.tsx'), path.resolve(sourceDir, moduleVariant + '.js'), path.resolve(sourceDir, moduleVariant + '.jsx'), path.resolve(sourceDir, moduleVariant + '.mjs'), path.resolve(sourceDir, moduleVariant + '.cjs'), path.resolve(sourceDir, moduleVariant, 'index.ts'), path.resolve(sourceDir, moduleVariant, 'index.tsx'), path.resolve(sourceDir, moduleVariant, 'index.js'), path.resolve(sourceDir, moduleVariant, 'index.jsx'));
|
|
112
|
+
}
|
|
113
|
+
else if (extension === '.go') {
|
|
114
|
+
const pkgName = moduleVariant.split('/').pop() || moduleVariant;
|
|
115
|
+
candidates.push(path.resolve(sourceDir, moduleVariant + '.go'), path.resolve(sourceDir, pkgName + '.go'), path.resolve(sourceDir, moduleVariant, pkgName + '.go'));
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
candidates.push(path.resolve(sourceDir, moduleVariant + extension), path.resolve(sourceDir, moduleVariant, 'index' + extension));
|
|
119
|
+
}
|
|
120
|
+
for (const candidate of candidates) {
|
|
121
|
+
const normalized = path.normalize(candidate);
|
|
122
|
+
const normalizedLower = normalized.toLowerCase();
|
|
123
|
+
const match = byNormalizedPath.get(normalizedLower);
|
|
124
|
+
if (match)
|
|
125
|
+
return match;
|
|
126
|
+
if (normalizedPathSet.has(normalizedLower)) {
|
|
127
|
+
return byNormalizedPath.get(normalizedLower) || normalized;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
// Try basename index (O(1) average)
|
|
132
|
+
for (const moduleVariant of moduleVariants) {
|
|
133
|
+
const filesWithBasename = byBasename.get(moduleVariant.toLowerCase());
|
|
134
|
+
if (filesWithBasename && filesWithBasename.length > 0) {
|
|
135
|
+
const chosen = chooseBestCandidate(filterByExts(filesWithBasename), sourceDir, extension);
|
|
136
|
+
if (chosen)
|
|
137
|
+
return chosen;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
// Try package/path index
|
|
141
|
+
const packageKeys = new Set();
|
|
142
|
+
if (module.includes('.')) {
|
|
143
|
+
packageKeys.add(module.replace(/\./g, '/'));
|
|
144
|
+
}
|
|
145
|
+
for (const variant of moduleVariants) {
|
|
146
|
+
const normalizedVariant = variant.replace(/\\/g, '/');
|
|
147
|
+
if (normalizedVariant.includes('/') && !normalizedVariant.startsWith('.')) {
|
|
148
|
+
packageKeys.add(normalizedVariant);
|
|
149
|
+
if (normalizedVariant.startsWith('@')) {
|
|
150
|
+
packageKeys.add(normalizedVariant.slice(1));
|
|
151
|
+
const segs = normalizedVariant.split('/');
|
|
152
|
+
if (segs.length >= 2) {
|
|
153
|
+
packageKeys.add(segs.slice(1).join('/'));
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
for (const key of packageKeys) {
|
|
159
|
+
const keyNoExt = stripKnownExt(key).replace(/^\//, '');
|
|
160
|
+
const keyLower = keyNoExt.toLowerCase();
|
|
161
|
+
const matches = byPackagePath.get(keyLower);
|
|
162
|
+
if (matches && matches.length > 0) {
|
|
163
|
+
const chosen = chooseBestCandidate(filterByExts(matches), sourceDir, extension);
|
|
164
|
+
if (chosen)
|
|
165
|
+
return chosen;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Fast call target resolution using cached file contents.
|
|
172
|
+
*/
|
|
173
|
+
function resolveCallTargetFast(callee, _sourceFile, fileIndex, fileContents) {
|
|
174
|
+
const parts = callee.split('.');
|
|
175
|
+
if (parts.length < 2)
|
|
176
|
+
return null;
|
|
177
|
+
const moduleName = parts[0];
|
|
178
|
+
const candidateFiles = fileIndex.byBasename.get(moduleName) || [];
|
|
179
|
+
const patterns = [
|
|
180
|
+
new RegExp(`def\\s+${parts[parts.length - 1]}\\s*\\(`, 'i'),
|
|
181
|
+
new RegExp(`function\\s+${parts[parts.length - 1]}\\s*\\(`, 'i'),
|
|
182
|
+
new RegExp(`${parts[parts.length - 1]}\\s*\\(.*\\)\\s*{`, 'i'),
|
|
183
|
+
new RegExp(`${parts[parts.length - 1]}\\s*=\\s*\\(`, 'i'),
|
|
184
|
+
];
|
|
185
|
+
for (const file of candidateFiles) {
|
|
186
|
+
const content = fileContents.get(file);
|
|
187
|
+
if (content && patterns.some((pattern) => pattern.test(content))) {
|
|
188
|
+
return file;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
return null;
|
|
192
|
+
}
|
|
193
|
+
// ── Helpers ──────────────────────────────────────────────────
|
|
194
|
+
function allowedExtensionsForSource(sourceExt) {
|
|
195
|
+
if (sourceExt === '.py')
|
|
196
|
+
return new Set(['.py']);
|
|
197
|
+
if (['.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs'].includes(sourceExt)) {
|
|
198
|
+
return new Set(['.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs']);
|
|
199
|
+
}
|
|
200
|
+
if (sourceExt === '.java')
|
|
201
|
+
return new Set(['.java']);
|
|
202
|
+
if (sourceExt === '.cs')
|
|
203
|
+
return new Set(['.cs']);
|
|
204
|
+
if (sourceExt === '.go')
|
|
205
|
+
return new Set(['.go']);
|
|
206
|
+
return new Set();
|
|
207
|
+
}
|
|
208
|
+
function chooseBestCandidate(candidates, sourceDir, extension) {
|
|
209
|
+
if (candidates.length === 0)
|
|
210
|
+
return null;
|
|
211
|
+
if (candidates.length === 1)
|
|
212
|
+
return candidates[0];
|
|
213
|
+
// Prefer same directory
|
|
214
|
+
for (const candidate of candidates) {
|
|
215
|
+
if (path.dirname(candidate) === sourceDir)
|
|
216
|
+
return candidate;
|
|
217
|
+
}
|
|
218
|
+
// Prefer matching extension
|
|
219
|
+
const sameExt = candidates.filter((c) => path.extname(c).toLowerCase() === extension);
|
|
220
|
+
if (sameExt.length === 1)
|
|
221
|
+
return sameExt[0];
|
|
222
|
+
if (sameExt.length > 1)
|
|
223
|
+
candidates = sameExt;
|
|
224
|
+
// Prefer shortest relative path
|
|
225
|
+
let best = candidates[0];
|
|
226
|
+
let bestScore = Number.POSITIVE_INFINITY;
|
|
227
|
+
for (const candidate of candidates) {
|
|
228
|
+
const rel = path.relative(sourceDir, path.dirname(candidate));
|
|
229
|
+
const score = rel.split(path.sep).filter(Boolean).length;
|
|
230
|
+
if (score < bestScore) {
|
|
231
|
+
best = candidate;
|
|
232
|
+
bestScore = score;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
return best;
|
|
236
|
+
}
|
|
237
|
+
function stripKnownExt(key) {
|
|
238
|
+
return key.replace(/\.(ts|tsx|js|jsx|mjs|cjs|py|java|cs|go|rs|rb|php)$/i, '');
|
|
239
|
+
}
|
|
240
|
+
//# sourceMappingURL=moduleResolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moduleResolver.js","sourceRoot":"","sources":["../../src/analysis/moduleResolver.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BH,wCAoCC;AAQD,sDAkHC;AAKD,sDA2BC;AAtND,2CAA6B;AAmB7B,gEAAgE;AAEhE;;GAEG;AACH,SAAgB,cAAc,CAAC,KAAe;IAC5C,MAAM,UAAU,GAAG,IAAI,GAAG,EAAoB,CAAC;IAC/C,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAkB,CAAC;IACnD,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAU,CAAC;IAC5C,MAAM,aAAa,GAAG,IAAI,GAAG,EAAoB,CAAC;IAElD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACxC,MAAM,eAAe,GAAG,UAAU,CAAC,WAAW,EAAE,CAAC;QACjD,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QAEzD,oBAAoB;QACpB,MAAM,WAAW,GA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