aspectcode 0.2.2 → 0.3.1
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 +15 -47
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +18 -17
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +14 -24
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +5 -60
- 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 +45 -124
- 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/node_modules/dotenv/CHANGELOG.md +520 -0
- package/node_modules/dotenv/LICENSE +23 -0
- package/node_modules/dotenv/README-es.md +411 -0
- package/node_modules/dotenv/README.md +645 -0
- package/node_modules/dotenv/SECURITY.md +1 -0
- package/node_modules/dotenv/config.d.ts +1 -0
- package/node_modules/dotenv/config.js +9 -0
- package/node_modules/dotenv/lib/cli-options.js +17 -0
- package/node_modules/dotenv/lib/env-options.js +28 -0
- package/node_modules/dotenv/lib/main.d.ts +162 -0
- package/node_modules/dotenv/lib/main.js +386 -0
- package/node_modules/dotenv/package.json +62 -0
- package/package.json +16 -4
- package/dist/commands/deps.d.ts +0 -11
- package/dist/commands/deps.d.ts.map +0 -1
- package/dist/commands/deps.js +0 -197
- 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 -162
- package/dist/commands/generate.js.map +0 -1
- package/dist/commands/settings.d.ts +0 -9
- package/dist/commands/settings.d.ts.map +0 -1
- package/dist/commands/settings.js +0 -165
- 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 -180
- 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,391 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Convention-analysis helpers — file-naming, function-naming, class-naming,
|
|
4
|
+
* import patterns, test-naming, and framework detection.
|
|
5
|
+
*
|
|
6
|
+
* Functions that originally did I/O via vscode.workspace.fs now accept
|
|
7
|
+
* a `fileContentCache` parameter.
|
|
8
|
+
*
|
|
9
|
+
* All functions are pure (no I/O, no vscode).
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.analyzeFileNaming = analyzeFileNaming;
|
|
13
|
+
exports.analyzeFunctionNaming = analyzeFunctionNaming;
|
|
14
|
+
exports.analyzeClassNaming = analyzeClassNaming;
|
|
15
|
+
exports.analyzeImportPatterns = analyzeImportPatterns;
|
|
16
|
+
exports.analyzeTestNaming = analyzeTestNaming;
|
|
17
|
+
exports.detectFrameworkPatterns = detectFrameworkPatterns;
|
|
18
|
+
exports.getFixTemplate = getFixTemplate;
|
|
19
|
+
exports.analyzeTestOrganization = analyzeTestOrganization;
|
|
20
|
+
const core_1 = require("@aspectcode/core");
|
|
21
|
+
const helpers_1 = require("./helpers");
|
|
22
|
+
// ── File naming ──────────────────────────────────────────────
|
|
23
|
+
function analyzeFileNaming(files, _workspaceRoot) {
|
|
24
|
+
const styleCounts = {
|
|
25
|
+
'kebab-case': { count: 0, examples: [] },
|
|
26
|
+
snake_case: { count: 0, examples: [] },
|
|
27
|
+
camelCase: { count: 0, examples: [] },
|
|
28
|
+
PascalCase: { count: 0, examples: [] },
|
|
29
|
+
};
|
|
30
|
+
for (const file of files) {
|
|
31
|
+
const basename = getBasenameNoExt(file);
|
|
32
|
+
if (basename === 'index' || basename.includes('test') || basename.includes('spec'))
|
|
33
|
+
continue;
|
|
34
|
+
const fileName = getFilename(file);
|
|
35
|
+
if (basename.includes('-')) {
|
|
36
|
+
styleCounts['kebab-case'].count++;
|
|
37
|
+
if (styleCounts['kebab-case'].examples.length < 3)
|
|
38
|
+
styleCounts['kebab-case'].examples.push(fileName);
|
|
39
|
+
}
|
|
40
|
+
else if (basename.includes('_')) {
|
|
41
|
+
styleCounts['snake_case'].count++;
|
|
42
|
+
if (styleCounts['snake_case'].examples.length < 3)
|
|
43
|
+
styleCounts['snake_case'].examples.push(fileName);
|
|
44
|
+
}
|
|
45
|
+
else if (basename[0] === basename[0].toUpperCase() &&
|
|
46
|
+
basename[0] !== basename[0].toLowerCase()) {
|
|
47
|
+
styleCounts['PascalCase'].count++;
|
|
48
|
+
if (styleCounts['PascalCase'].examples.length < 3)
|
|
49
|
+
styleCounts['PascalCase'].examples.push(fileName);
|
|
50
|
+
}
|
|
51
|
+
else if (/[a-z][A-Z]/.test(basename)) {
|
|
52
|
+
styleCounts['camelCase'].count++;
|
|
53
|
+
if (styleCounts['camelCase'].examples.length < 3)
|
|
54
|
+
styleCounts['camelCase'].examples.push(fileName);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
const patterns = Object.entries(styleCounts)
|
|
58
|
+
.filter(([_, data]) => data.count > 0)
|
|
59
|
+
.sort((a, b) => b[1].count - a[1].count || a[0].localeCompare(b[0]))
|
|
60
|
+
.map(([style, data]) => ({ style, example: data.examples[0] || '', count: data.count }));
|
|
61
|
+
const dominant = patterns.length > 0 && patterns[0].count > files.length * 0.3 ? patterns[0].style : null;
|
|
62
|
+
return { patterns, dominant };
|
|
63
|
+
}
|
|
64
|
+
// ── Function naming ──────────────────────────────────────────
|
|
65
|
+
function analyzeFunctionNaming(files, fileContentCache) {
|
|
66
|
+
const patternCounts = {
|
|
67
|
+
'get_*': { count: 0, examples: [] },
|
|
68
|
+
'set_*': { count: 0, examples: [] },
|
|
69
|
+
'create_*': { count: 0, examples: [] },
|
|
70
|
+
'delete_*': { count: 0, examples: [] },
|
|
71
|
+
'update_*': { count: 0, examples: [] },
|
|
72
|
+
'is_*': { count: 0, examples: [] },
|
|
73
|
+
'has_*': { count: 0, examples: [] },
|
|
74
|
+
'handle_*': { count: 0, examples: [] },
|
|
75
|
+
'process_*': { count: 0, examples: [] },
|
|
76
|
+
'validate_*': { count: 0, examples: [] },
|
|
77
|
+
};
|
|
78
|
+
const sampleFiles = [...files].sort().slice(0, 50);
|
|
79
|
+
for (const file of sampleFiles) {
|
|
80
|
+
const text = fileContentCache.get(file);
|
|
81
|
+
if (!text)
|
|
82
|
+
continue;
|
|
83
|
+
// Python
|
|
84
|
+
for (const match of text.matchAll(/def\s+(\w+)\s*\(/g)) {
|
|
85
|
+
categorizeFunction(match[1], patternCounts);
|
|
86
|
+
}
|
|
87
|
+
// TypeScript / JavaScript
|
|
88
|
+
for (const match of text.matchAll(/function\s+(\w+)\s*\(|const\s+(\w+)\s*=\s*(?:async\s+)?\(/g)) {
|
|
89
|
+
categorizeFunction(match[1] || match[2], patternCounts);
|
|
90
|
+
}
|
|
91
|
+
// Java
|
|
92
|
+
for (const match of text.matchAll(/(?:public|protected|private)\s+(?:static\s+)?\w+\s+(\w+)\s*\(/g)) {
|
|
93
|
+
categorizeFunction(match[1], patternCounts);
|
|
94
|
+
}
|
|
95
|
+
// C#
|
|
96
|
+
for (const match of text.matchAll(/(?:public|protected|private|internal)\s+(?:static\s+)?(?:async\s+)?\w+\s+(\w+)\s*\(/g)) {
|
|
97
|
+
categorizeFunction(match[1], patternCounts);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const patterns = Object.entries(patternCounts)
|
|
101
|
+
.filter(([_, data]) => data.count > 0)
|
|
102
|
+
.sort((a, b) => b[1].count - a[1].count || a[0].localeCompare(b[0]))
|
|
103
|
+
.map(([pattern, data]) => ({
|
|
104
|
+
pattern,
|
|
105
|
+
example: data.examples[0] || pattern.replace('*', 'example'),
|
|
106
|
+
usage: `${data.count} occurrences`,
|
|
107
|
+
}));
|
|
108
|
+
return { patterns };
|
|
109
|
+
}
|
|
110
|
+
function categorizeFunction(name, counts) {
|
|
111
|
+
const funPatterns = [
|
|
112
|
+
['get_*', /^get[_A-Z]/],
|
|
113
|
+
['set_*', /^set[_A-Z]/],
|
|
114
|
+
['create_*', /^create[_A-Z]/],
|
|
115
|
+
['delete_*', /^delete[_A-Z]/],
|
|
116
|
+
['update_*', /^update[_A-Z]/],
|
|
117
|
+
['is_*', /^is[_A-Z]/],
|
|
118
|
+
['has_*', /^has[_A-Z]/],
|
|
119
|
+
['handle_*', /^handle[_A-Z]/],
|
|
120
|
+
['process_*', /^process[_A-Z]/],
|
|
121
|
+
['validate_*', /^validate[_A-Z]/],
|
|
122
|
+
];
|
|
123
|
+
for (const [pattern, regex] of funPatterns) {
|
|
124
|
+
if (regex.test(name)) {
|
|
125
|
+
counts[pattern].count++;
|
|
126
|
+
if (counts[pattern].examples.length < 3)
|
|
127
|
+
counts[pattern].examples.push(name);
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
// ── Class naming ─────────────────────────────────────────────
|
|
133
|
+
function analyzeClassNaming(files, fileContentCache) {
|
|
134
|
+
const suffixCounts = {
|
|
135
|
+
'*Service': { count: 0, examples: [] },
|
|
136
|
+
'*Controller': { count: 0, examples: [] },
|
|
137
|
+
'*Handler': { count: 0, examples: [] },
|
|
138
|
+
'*Model': { count: 0, examples: [] },
|
|
139
|
+
'*Repository': { count: 0, examples: [] },
|
|
140
|
+
'*Manager': { count: 0, examples: [] },
|
|
141
|
+
'*Provider': { count: 0, examples: [] },
|
|
142
|
+
'*Factory': { count: 0, examples: [] },
|
|
143
|
+
'*Component': { count: 0, examples: [] },
|
|
144
|
+
'*View': { count: 0, examples: [] },
|
|
145
|
+
};
|
|
146
|
+
const sampleFiles = [...files].sort().slice(0, 50);
|
|
147
|
+
for (const file of sampleFiles) {
|
|
148
|
+
const text = fileContentCache.get(file);
|
|
149
|
+
if (!text)
|
|
150
|
+
continue;
|
|
151
|
+
for (const match of text.matchAll(/class\s+(\w+)/g)) {
|
|
152
|
+
categorizeClass(match[1], suffixCounts);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
const patterns = Object.entries(suffixCounts)
|
|
156
|
+
.filter(([_, data]) => data.count > 0)
|
|
157
|
+
.sort((a, b) => b[1].count - a[1].count || a[0].localeCompare(b[0]))
|
|
158
|
+
.map(([pattern, data]) => ({
|
|
159
|
+
pattern,
|
|
160
|
+
example: data.examples[0] || pattern.replace('*', 'User'),
|
|
161
|
+
usage: `${data.count} classes`,
|
|
162
|
+
}));
|
|
163
|
+
return { patterns };
|
|
164
|
+
}
|
|
165
|
+
function categorizeClass(name, counts) {
|
|
166
|
+
const suffixes = [
|
|
167
|
+
'Service', 'Controller', 'Handler', 'Model', 'Repository',
|
|
168
|
+
'Manager', 'Provider', 'Factory', 'Component', 'View',
|
|
169
|
+
];
|
|
170
|
+
for (const suffix of suffixes) {
|
|
171
|
+
if (name.endsWith(suffix)) {
|
|
172
|
+
const key = `*${suffix}`;
|
|
173
|
+
counts[key].count++;
|
|
174
|
+
if (counts[key].examples.length < 3)
|
|
175
|
+
counts[key].examples.push(name);
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
// ── Import patterns ──────────────────────────────────────────
|
|
181
|
+
function analyzeImportPatterns(files, fileContentCache) {
|
|
182
|
+
const patterns = [];
|
|
183
|
+
const languageExtMap = [
|
|
184
|
+
{ lang: 'Python', extensions: ['.py'], lineFilter: (l) => l.startsWith('import ') || l.startsWith('from ') },
|
|
185
|
+
{ lang: 'TypeScript', extensions: ['.ts', '.tsx'], lineFilter: (l) => l.startsWith('import ') },
|
|
186
|
+
{ lang: 'Java', extensions: ['.java'], lineFilter: (l) => l.trim().startsWith('import ') },
|
|
187
|
+
{ lang: 'C#', extensions: ['.cs'], lineFilter: (l) => l.trim().startsWith('using ') && l.includes(';') },
|
|
188
|
+
];
|
|
189
|
+
for (const { lang, extensions, lineFilter } of languageExtMap) {
|
|
190
|
+
if (patterns.some((p) => p.language === lang))
|
|
191
|
+
continue;
|
|
192
|
+
const langFiles = files
|
|
193
|
+
.filter((f) => extensions.some((e) => f.endsWith(e)))
|
|
194
|
+
.sort()
|
|
195
|
+
.slice(0, 3);
|
|
196
|
+
for (const file of langFiles) {
|
|
197
|
+
const text = fileContentCache.get(file);
|
|
198
|
+
if (!text)
|
|
199
|
+
continue;
|
|
200
|
+
const lines = text.split('\n').slice(0, 30);
|
|
201
|
+
const imports = lines.filter(lineFilter);
|
|
202
|
+
if (imports.length >= 2) {
|
|
203
|
+
patterns.push({ language: lang, example: imports.slice(0, 4).join('\n') });
|
|
204
|
+
break;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return patterns;
|
|
209
|
+
}
|
|
210
|
+
// ── Test naming ──────────────────────────────────────────────
|
|
211
|
+
function analyzeTestNaming(files, _workspaceRoot) {
|
|
212
|
+
const patterns = [];
|
|
213
|
+
const seenPatterns = new Set();
|
|
214
|
+
const testFiles = files.filter((f) => {
|
|
215
|
+
const basename = getFilename(f).toLowerCase();
|
|
216
|
+
return basename.includes('test') || basename.includes('spec');
|
|
217
|
+
});
|
|
218
|
+
for (const file of testFiles.sort().slice(0, 10)) {
|
|
219
|
+
const basename = getFilename(file);
|
|
220
|
+
if (basename.startsWith('test_') && !seenPatterns.has('test_*.py')) {
|
|
221
|
+
patterns.push({ pattern: 'test_*.py', example: basename });
|
|
222
|
+
seenPatterns.add('test_*.py');
|
|
223
|
+
}
|
|
224
|
+
else if (basename.endsWith('.test.ts') && !seenPatterns.has('*.test.ts')) {
|
|
225
|
+
patterns.push({ pattern: '*.test.ts', example: basename });
|
|
226
|
+
seenPatterns.add('*.test.ts');
|
|
227
|
+
}
|
|
228
|
+
else if (basename.endsWith('.spec.ts') && !seenPatterns.has('*.spec.ts')) {
|
|
229
|
+
patterns.push({ pattern: '*.spec.ts', example: basename });
|
|
230
|
+
seenPatterns.add('*.spec.ts');
|
|
231
|
+
}
|
|
232
|
+
else if (basename.endsWith('_test.py') && !seenPatterns.has('*_test.py')) {
|
|
233
|
+
patterns.push({ pattern: '*_test.py', example: basename });
|
|
234
|
+
seenPatterns.add('*_test.py');
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return { patterns };
|
|
238
|
+
}
|
|
239
|
+
// ── Framework detection ──────────────────────────────────────
|
|
240
|
+
function detectFrameworkPatterns(files, _workspaceRoot) {
|
|
241
|
+
const frameworks = [];
|
|
242
|
+
const fileNames = files.map((f) => getFilename(f).toLowerCase());
|
|
243
|
+
const dirNames = files.map((f) => f.toLowerCase());
|
|
244
|
+
// FastAPI
|
|
245
|
+
if (fileNames.some((f) => f.includes('fastapi')) ||
|
|
246
|
+
dirNames.some((d) => d.includes('/api/') || d.includes('/routes/'))) {
|
|
247
|
+
frameworks.push({
|
|
248
|
+
name: 'FastAPI',
|
|
249
|
+
patterns: [
|
|
250
|
+
'Use `@app.get()`, `@app.post()` decorators for routes',
|
|
251
|
+
'Use Pydantic models for request/response schemas',
|
|
252
|
+
'Use `Depends()` for dependency injection',
|
|
253
|
+
'Place routes in `/routes` or `/api` directories',
|
|
254
|
+
],
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
// React
|
|
258
|
+
if (fileNames.some((f) => f.endsWith('.tsx') || f.endsWith('.jsx')) ||
|
|
259
|
+
dirNames.some((d) => d.includes('/components/'))) {
|
|
260
|
+
frameworks.push({
|
|
261
|
+
name: 'React',
|
|
262
|
+
patterns: [
|
|
263
|
+
'Components in `/components` directory',
|
|
264
|
+
'Hooks start with `use` prefix (e.g., `useAuth`)',
|
|
265
|
+
'State management with hooks or context',
|
|
266
|
+
'PascalCase for component file names',
|
|
267
|
+
],
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
// Next.js
|
|
271
|
+
if (dirNames.some((d) => d.includes('/pages/') || d.includes('/app/'))) {
|
|
272
|
+
frameworks.push({
|
|
273
|
+
name: 'Next.js',
|
|
274
|
+
patterns: [
|
|
275
|
+
'Pages in `/pages` or `/app` for routing',
|
|
276
|
+
'API routes in `/pages/api` or `/app/api`',
|
|
277
|
+
'Use `getServerSideProps` or server components',
|
|
278
|
+
'Static assets in `/public`',
|
|
279
|
+
],
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
// Django (conservative — require multiple signals)
|
|
283
|
+
const baseNames = new Set(fileNames);
|
|
284
|
+
const strongProjectSignal = baseNames.has('manage.py') && (baseNames.has('settings.py') || baseNames.has('urls.py'));
|
|
285
|
+
const strongAppSignal = baseNames.has('models.py') && (baseNames.has('views.py') || baseNames.has('urls.py'));
|
|
286
|
+
if (strongProjectSignal || strongAppSignal) {
|
|
287
|
+
frameworks.push({
|
|
288
|
+
name: 'Django',
|
|
289
|
+
patterns: [
|
|
290
|
+
'Models in `models.py`, views in `views.py`',
|
|
291
|
+
'URL patterns in `urls.py`',
|
|
292
|
+
'Forms in `forms.py`',
|
|
293
|
+
'Admin customization in `admin.py`',
|
|
294
|
+
],
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
// Spring Boot
|
|
298
|
+
const javaFiles = fileNames.filter((f) => f.endsWith('.java'));
|
|
299
|
+
const hasSpringApp = javaFiles.some((f) => f.includes('application'));
|
|
300
|
+
const hasController = dirNames.some((d) => d.includes('/controller/') || d.includes('/controllers/'));
|
|
301
|
+
const hasService = dirNames.some((d) => d.includes('/service/') || d.includes('/services/'));
|
|
302
|
+
if (javaFiles.length > 0 && (hasSpringApp || (hasController && hasService))) {
|
|
303
|
+
frameworks.push({
|
|
304
|
+
name: 'Spring Boot',
|
|
305
|
+
patterns: [
|
|
306
|
+
'Use `@RestController` or `@Controller` for HTTP endpoints',
|
|
307
|
+
'Use `@Service` for business logic, `@Repository` for data access',
|
|
308
|
+
'Use `@Autowired` or constructor injection for dependencies',
|
|
309
|
+
'Use `@Entity` with JPA for ORM models',
|
|
310
|
+
'Place controllers in `/controller`, services in `/service`',
|
|
311
|
+
],
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
// ASP.NET Core
|
|
315
|
+
const csFiles = fileNames.filter((f) => f.endsWith('.cs'));
|
|
316
|
+
const hasProgramCs = csFiles.some((f) => f === 'program.cs');
|
|
317
|
+
const hasStartupCs = csFiles.some((f) => f === 'startup.cs');
|
|
318
|
+
const hasCsControllers = dirNames.some((d) => d.includes('/controllers/'));
|
|
319
|
+
if (csFiles.length > 0 && (hasProgramCs || hasStartupCs || hasCsControllers)) {
|
|
320
|
+
frameworks.push({
|
|
321
|
+
name: 'ASP.NET Core',
|
|
322
|
+
patterns: [
|
|
323
|
+
'Use `[ApiController]` and `[Route]` attributes for HTTP endpoints',
|
|
324
|
+
'Use `[HttpGet]`, `[HttpPost]` etc. for HTTP methods',
|
|
325
|
+
'Register services in `Program.cs` or `Startup.cs`',
|
|
326
|
+
'Use Entity Framework Core with `DbContext` for data access',
|
|
327
|
+
'Place controllers in `/Controllers`, models in `/Models`',
|
|
328
|
+
],
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
return frameworks;
|
|
332
|
+
}
|
|
333
|
+
// ── Fix templates (for awareness/context content) ────────────
|
|
334
|
+
function getFixTemplate(rule) {
|
|
335
|
+
const templates = {
|
|
336
|
+
'sec.sql_injection_concat': 'Use parameterized queries: `db.execute(sql, (param,))`',
|
|
337
|
+
'sec.hardcoded_secret': 'Use environment variables: `os.environ.get("SECRET")`',
|
|
338
|
+
'sec.path_traversal': 'Validate paths: `os.path.realpath(path).startswith(allowed_dir)`',
|
|
339
|
+
'sec.open_redirect': 'Validate redirect URLs against allowlist',
|
|
340
|
+
'sec.insecure_random': 'Use `secrets` module for security-sensitive randomness',
|
|
341
|
+
'bug.float_equality': 'Use `math.isclose(a, b)` for float comparison',
|
|
342
|
+
'bug.iteration_modification': 'Iterate over a copy: `for item in list(items):`',
|
|
343
|
+
'errors.swallowed_exception': 'Log exceptions: `except Exception as e: logger.error(e)`',
|
|
344
|
+
'errors.broad_catch': 'Catch specific exceptions: `except ValueError:`',
|
|
345
|
+
'deadcode.unused_variable': 'Remove or prefix with `_`: `_unused = value`',
|
|
346
|
+
'imports.unused': 'Remove unused imports',
|
|
347
|
+
'complexity.high_cyclomatic': 'Extract helper functions to reduce branches',
|
|
348
|
+
'complexity.long_function': 'Split into smaller, focused functions',
|
|
349
|
+
};
|
|
350
|
+
return templates[rule] || null;
|
|
351
|
+
}
|
|
352
|
+
// ── Test organization ────────────────────────────────────────
|
|
353
|
+
function analyzeTestOrganization(files, workspaceRoot) {
|
|
354
|
+
const testFiles = [];
|
|
355
|
+
const testDirs = new Set();
|
|
356
|
+
const testPatterns = new Set();
|
|
357
|
+
for (const file of files) {
|
|
358
|
+
const basename = getFilename(file).toLowerCase();
|
|
359
|
+
const relPath = (0, helpers_1.makeRelativePath)(file, workspaceRoot);
|
|
360
|
+
const relDir = (0, core_1.toPosix)(relPath).split('/').slice(0, -1).join('/');
|
|
361
|
+
if (basename.includes('test') || basename.includes('spec')) {
|
|
362
|
+
testFiles.push(relPath);
|
|
363
|
+
if (relDir.includes('test'))
|
|
364
|
+
testDirs.add(relDir);
|
|
365
|
+
if (basename.startsWith('test_'))
|
|
366
|
+
testPatterns.add('test_*.py');
|
|
367
|
+
else if (basename.endsWith('.test.ts'))
|
|
368
|
+
testPatterns.add('*.test.ts');
|
|
369
|
+
else if (basename.endsWith('.spec.ts'))
|
|
370
|
+
testPatterns.add('*.spec.ts');
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
// Sort for deterministic output
|
|
374
|
+
return {
|
|
375
|
+
testFiles: testFiles.sort(),
|
|
376
|
+
testDirs: Array.from(testDirs).sort(),
|
|
377
|
+
testPatterns: Array.from(testPatterns).sort(),
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
// ── Internal ─────────────────────────────────────────────────
|
|
381
|
+
function getFilename(filePath) {
|
|
382
|
+
const p = (0, core_1.toPosix)(filePath);
|
|
383
|
+
const lastSlash = p.lastIndexOf('/');
|
|
384
|
+
return lastSlash >= 0 ? p.substring(lastSlash + 1) : p;
|
|
385
|
+
}
|
|
386
|
+
function getBasenameNoExt(filePath) {
|
|
387
|
+
const name = getFilename(filePath);
|
|
388
|
+
const lastDot = name.lastIndexOf('.');
|
|
389
|
+
return lastDot > 0 ? name.substring(0, lastDot) : name;
|
|
390
|
+
}
|
|
391
|
+
//# sourceMappingURL=conventions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conventions.js","sourceRoot":"","sources":["../../src/kb/conventions.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;AAOH,8CA+CC;AAID,sDAqDC;AA8BD,gDAwCC;AAsBD,sDAuCC;AAID,8CAiCC;AAID,0DA+GC;AAID,wCAiBC;AAID,0DAiCC;AAlcD,2CAA2C;AAC3C,uCAA6C;AAE7C,gEAAgE;AAEhE,SAAgB,iBAAiB,CAC/B,KAAe,EACf,cAAsB;IAKtB,MAAM,WAAW,GAA0D;QACzE,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;QACxC,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;QACtC,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;QACrC,UAAU,EAAE,E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AAC,CAAC;IACnC,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACzD,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dependency-statistics helpers.
|
|
3
|
+
*
|
|
4
|
+
* Builds per-file in/out-degree maps from an already-computed set
|
|
5
|
+
* of DependencyLinks. The I/O-heavy dependency analysis itself
|
|
6
|
+
* (DependencyAnalyzer) is orchestrated at a higher level.
|
|
7
|
+
*
|
|
8
|
+
* All functions are pure (no I/O, no vscode).
|
|
9
|
+
*/
|
|
10
|
+
import { DependencyLink } from '@aspectcode/core';
|
|
11
|
+
/**
|
|
12
|
+
* Build per-file in/out-degree stats from a link set.
|
|
13
|
+
*/
|
|
14
|
+
export declare function buildDepStats(files: string[], links: DependencyLink[]): Map<string, {
|
|
15
|
+
inDegree: number;
|
|
16
|
+
outDegree: number;
|
|
17
|
+
}>;
|
|
18
|
+
//# sourceMappingURL=depData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"depData.d.ts","sourceRoot":"","sources":["../../src/kb/depData.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;GAEG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EAAE,EACf,KAAK,EAAE,cAAc,EAAE,GACtB,GAAG,CAAC,MAAM,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAetD"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Dependency-statistics helpers.
|
|
4
|
+
*
|
|
5
|
+
* Builds per-file in/out-degree maps from an already-computed set
|
|
6
|
+
* of DependencyLinks. The I/O-heavy dependency analysis itself
|
|
7
|
+
* (DependencyAnalyzer) is orchestrated at a higher level.
|
|
8
|
+
*
|
|
9
|
+
* All functions are pure (no I/O, no vscode).
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.buildDepStats = buildDepStats;
|
|
13
|
+
/**
|
|
14
|
+
* Build per-file in/out-degree stats from a link set.
|
|
15
|
+
*/
|
|
16
|
+
function buildDepStats(files, links) {
|
|
17
|
+
const stats = new Map();
|
|
18
|
+
for (const file of files) {
|
|
19
|
+
stats.set(file, { inDegree: 0, outDegree: 0 });
|
|
20
|
+
}
|
|
21
|
+
for (const link of links) {
|
|
22
|
+
const sourceStats = stats.get(link.source);
|
|
23
|
+
const targetStats = stats.get(link.target);
|
|
24
|
+
if (sourceStats)
|
|
25
|
+
sourceStats.outDegree++;
|
|
26
|
+
if (targetStats)
|
|
27
|
+
targetStats.inDegree++;
|
|
28
|
+
}
|
|
29
|
+
return stats;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=depData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"depData.js","sourceRoot":"","sources":["../../src/kb/depData.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;AAOH,sCAkBC;AArBD;;GAEG;AACH,SAAgB,aAAa,CAC3B,KAAe,EACf,KAAuB;IAEvB,MAAM,KAAK,GAAG,IAAI,GAAG,EAAmD,CAAC;IAEzE,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;IACjD,CAAC;IAED,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC3C,MAAM,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC3C,IAAI,WAAW;YAAE,WAAW,CAAC,SAAS,EAAE,CAAC;QACzC,IAAI,WAAW;YAAE,WAAW,CAAC,QAAQ,EAAE,CAAC;IAC1C,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KB enrichment detectors — regex-based pattern matching on file contents.
|
|
3
|
+
*
|
|
4
|
+
* Each detector scans files for a specific category of patterns (data models,
|
|
5
|
+
* external integrations, global state) and returns sorted, deduplicated findings.
|
|
6
|
+
*
|
|
7
|
+
* All functions are pure (no I/O, no vscode).
|
|
8
|
+
*/
|
|
9
|
+
import type { KBEnrichingFinding } from './helpers';
|
|
10
|
+
export declare function detectDataModelsLocally(files: string[], _workspaceRoot: string, fileContentCache: Map<string, string>): KBEnrichingFinding[];
|
|
11
|
+
export declare function detectExternalIntegrationsLocally(files: string[], _workspaceRoot: string, fileContentCache: Map<string, string>): KBEnrichingFinding[];
|
|
12
|
+
export declare function detectGlobalStateLocally(files: string[], _workspaceRoot: string, fileContentCache: Map<string, string>): KBEnrichingFinding[];
|
|
13
|
+
export type EnrichmentRuleType = 'DATA_MODEL' | 'EXTERNAL_INTEGRATION' | 'GLOBAL_STATE' | 'ENTRY_POINT';
|
|
14
|
+
/**
|
|
15
|
+
* Get KB enrichments by running the appropriate local detector.
|
|
16
|
+
*/
|
|
17
|
+
export declare function getKBEnrichments(ruleType: EnrichmentRuleType, files: string[], workspaceRoot: string, fileContentCache: Map<string, string>): KBEnrichingFinding[];
|
|
18
|
+
//# sourceMappingURL=detectors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detectors.d.ts","sourceRoot":"","sources":["../../src/kb/detectors.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAKpD,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,MAAM,EAAE,EACf,cAAc,EAAE,MAAM,EACtB,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GACpC,kBAAkB,EAAE,CAgCtB;AA+JD,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,MAAM,EAAE,EACf,cAAc,EAAE,MAAM,EACtB,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GACpC,kBAAkB,EAAE,CA2CtB;AAID,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EAAE,EACf,cAAc,EAAE,MAAM,EACtB,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GACpC,kBAAkB,EAAE,CA4CtB;AAID,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,sBAAsB,GAAG,cAAc,GAAG,aAAa,CAAC;AAExG;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,kBAAkB,EAC5B,KAAK,EAAE,MAAM,EAAE,EACf,aAAa,EAAE,MAAM,EACrB,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GACpC,kBAAkB,EAAE,CAWtB"}
|