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 @@
|
|
|
1
|
+
{"version":3,"file":"fingerprint.d.ts","sourceRoot":"","sources":["../../src/fs/fingerprint.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,yEAAyE;AACzE,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,WAAW,EAAE,MAAM,CAAC;CACrB;AAID;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,CAoB9D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAYzE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,IAAI,CAUN;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CACvB,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,MAAM,EAAE,EAC1B,cAAc,EAAE,MAAM,GACrB,OAAO,CAQT"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Workspace fingerprint — shared staleness detection for KB artifacts.
|
|
4
|
+
*
|
|
5
|
+
* Computes a SHA-256 hash from file paths, sizes, and modification times.
|
|
6
|
+
* Used by both the CLI watch command and the VS Code extension to determine
|
|
7
|
+
* whether the KB needs regeneration.
|
|
8
|
+
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
26
|
+
var ownKeys = function(o) {
|
|
27
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
28
|
+
var ar = [];
|
|
29
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
30
|
+
return ar;
|
|
31
|
+
};
|
|
32
|
+
return ownKeys(o);
|
|
33
|
+
};
|
|
34
|
+
return function (mod) {
|
|
35
|
+
if (mod && mod.__esModule) return mod;
|
|
36
|
+
var result = {};
|
|
37
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
38
|
+
__setModuleDefault(result, mod);
|
|
39
|
+
return result;
|
|
40
|
+
};
|
|
41
|
+
})();
|
|
42
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
+
exports.computeFingerprint = computeFingerprint;
|
|
44
|
+
exports.readFingerprint = readFingerprint;
|
|
45
|
+
exports.writeFingerprint = writeFingerprint;
|
|
46
|
+
exports.isKbStale = isKbStale;
|
|
47
|
+
const crypto = __importStar(require("crypto"));
|
|
48
|
+
const fs = __importStar(require("fs"));
|
|
49
|
+
const path = __importStar(require("path"));
|
|
50
|
+
const FINGERPRINT_FILE = '.fingerprint.json';
|
|
51
|
+
/**
|
|
52
|
+
* Compute a fingerprint hash from a list of file paths.
|
|
53
|
+
* Uses `path:mtime:size` for each file, sorted for determinism.
|
|
54
|
+
*/
|
|
55
|
+
function computeFingerprint(filePaths) {
|
|
56
|
+
const entries = [];
|
|
57
|
+
for (const filePath of filePaths) {
|
|
58
|
+
try {
|
|
59
|
+
const stat = fs.statSync(filePath);
|
|
60
|
+
const normalized = filePath.replace(/\\/g, '/');
|
|
61
|
+
entries.push(`${normalized}:${stat.mtimeMs}:${stat.size}`);
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
// File may have been deleted between discovery and fingerprinting
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
entries.sort();
|
|
68
|
+
const hash = crypto.createHash('sha256');
|
|
69
|
+
for (const entry of entries) {
|
|
70
|
+
hash.update(entry);
|
|
71
|
+
hash.update('\n');
|
|
72
|
+
}
|
|
73
|
+
return hash.digest('hex');
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Read the stored fingerprint from `.aspect/.fingerprint.json`.
|
|
77
|
+
* Returns `null` if the file doesn't exist or is invalid.
|
|
78
|
+
*/
|
|
79
|
+
function readFingerprint(aspectDir) {
|
|
80
|
+
const filePath = path.join(aspectDir, FINGERPRINT_FILE);
|
|
81
|
+
try {
|
|
82
|
+
const raw = fs.readFileSync(filePath, 'utf-8');
|
|
83
|
+
const data = JSON.parse(raw);
|
|
84
|
+
if (typeof data.hash === 'string' && typeof data.version === 'string') {
|
|
85
|
+
return data;
|
|
86
|
+
}
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Write a fingerprint to `.aspect/.fingerprint.json`.
|
|
95
|
+
* Creates the `.aspect/` directory if it doesn't exist.
|
|
96
|
+
*/
|
|
97
|
+
function writeFingerprint(aspectDir, hash, version) {
|
|
98
|
+
const data = {
|
|
99
|
+
hash,
|
|
100
|
+
version,
|
|
101
|
+
generatedAt: new Date().toISOString(),
|
|
102
|
+
};
|
|
103
|
+
fs.mkdirSync(aspectDir, { recursive: true });
|
|
104
|
+
const filePath = path.join(aspectDir, FINGERPRINT_FILE);
|
|
105
|
+
fs.writeFileSync(filePath, JSON.stringify(data, null, 2) + '\n', 'utf-8');
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Check whether the KB is stale by comparing the current file fingerprint
|
|
109
|
+
* against the stored one.
|
|
110
|
+
*
|
|
111
|
+
* Returns `true` if:
|
|
112
|
+
* - No stored fingerprint exists
|
|
113
|
+
* - The hash doesn't match
|
|
114
|
+
* - The version doesn't match (generator was updated)
|
|
115
|
+
*/
|
|
116
|
+
function isKbStale(aspectDir, currentFilePaths, currentVersion) {
|
|
117
|
+
const stored = readFingerprint(aspectDir);
|
|
118
|
+
if (!stored)
|
|
119
|
+
return true;
|
|
120
|
+
if (stored.version !== currentVersion)
|
|
121
|
+
return true;
|
|
122
|
+
const currentHash = computeFingerprint(currentFilePaths);
|
|
123
|
+
return currentHash !== stored.hash;
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=fingerprint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fingerprint.js","sourceRoot":"","sources":["../../src/fs/fingerprint.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBH,gDAoBC;AAMD,0CAYC;AAMD,4CAcC;AAWD,8BAYC;AArGD,+CAAiC;AACjC,uCAAyB;AACzB,2CAA6B;AAY7B,MAAM,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IDE_DIRS, TEST_OUTPUT_DIRS, GENERATED_DIRS, VENV_MARKERS, BUILD_OUTPUT_MARKERS, } from './exclusions';
|
|
5
|
+
export { discoverFiles } from './walker';
|
|
6
|
+
export type { DiscoverOptions } from './walker';
|
|
7
|
+
export { computeFingerprint, readFingerprint, writeFingerprint, isKbStale, } from './fingerprint';
|
|
8
|
+
export type { FingerprintData } from './fingerprint';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fs/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,oBAAoB,GACrB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,SAAS,GACV,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* File system utilities — discovery, exclusions, and supported extensions.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.isKbStale = exports.writeFingerprint = exports.readFingerprint = exports.computeFingerprint = exports.discoverFiles = exports.BUILD_OUTPUT_MARKERS = exports.VENV_MARKERS = exports.GENERATED_DIRS = exports.TEST_OUTPUT_DIRS = exports.VCS_IDE_DIRS = exports.CACHE_DIRS = exports.VENV_DIRS = exports.BUILD_OUTPUT_DIRS = exports.PACKAGE_MANAGER_DIRS = exports.SUPPORTED_EXTENSIONS = exports.DEFAULT_EXCLUSIONS = void 0;
|
|
7
|
+
var exclusions_1 = require("./exclusions");
|
|
8
|
+
Object.defineProperty(exports, "DEFAULT_EXCLUSIONS", { enumerable: true, get: function () { return exclusions_1.DEFAULT_EXCLUSIONS; } });
|
|
9
|
+
Object.defineProperty(exports, "SUPPORTED_EXTENSIONS", { enumerable: true, get: function () { return exclusions_1.SUPPORTED_EXTENSIONS; } });
|
|
10
|
+
Object.defineProperty(exports, "PACKAGE_MANAGER_DIRS", { enumerable: true, get: function () { return exclusions_1.PACKAGE_MANAGER_DIRS; } });
|
|
11
|
+
Object.defineProperty(exports, "BUILD_OUTPUT_DIRS", { enumerable: true, get: function () { return exclusions_1.BUILD_OUTPUT_DIRS; } });
|
|
12
|
+
Object.defineProperty(exports, "VENV_DIRS", { enumerable: true, get: function () { return exclusions_1.VENV_DIRS; } });
|
|
13
|
+
Object.defineProperty(exports, "CACHE_DIRS", { enumerable: true, get: function () { return exclusions_1.CACHE_DIRS; } });
|
|
14
|
+
Object.defineProperty(exports, "VCS_IDE_DIRS", { enumerable: true, get: function () { return exclusions_1.VCS_IDE_DIRS; } });
|
|
15
|
+
Object.defineProperty(exports, "TEST_OUTPUT_DIRS", { enumerable: true, get: function () { return exclusions_1.TEST_OUTPUT_DIRS; } });
|
|
16
|
+
Object.defineProperty(exports, "GENERATED_DIRS", { enumerable: true, get: function () { return exclusions_1.GENERATED_DIRS; } });
|
|
17
|
+
Object.defineProperty(exports, "VENV_MARKERS", { enumerable: true, get: function () { return exclusions_1.VENV_MARKERS; } });
|
|
18
|
+
Object.defineProperty(exports, "BUILD_OUTPUT_MARKERS", { enumerable: true, get: function () { return exclusions_1.BUILD_OUTPUT_MARKERS; } });
|
|
19
|
+
var walker_1 = require("./walker");
|
|
20
|
+
Object.defineProperty(exports, "discoverFiles", { enumerable: true, get: function () { return walker_1.discoverFiles; } });
|
|
21
|
+
var fingerprint_1 = require("./fingerprint");
|
|
22
|
+
Object.defineProperty(exports, "computeFingerprint", { enumerable: true, get: function () { return fingerprint_1.computeFingerprint; } });
|
|
23
|
+
Object.defineProperty(exports, "readFingerprint", { enumerable: true, get: function () { return fingerprint_1.readFingerprint; } });
|
|
24
|
+
Object.defineProperty(exports, "writeFingerprint", { enumerable: true, get: function () { return fingerprint_1.writeFingerprint; } });
|
|
25
|
+
Object.defineProperty(exports, "isKbStale", { enumerable: true, get: function () { return fingerprint_1.isKbStale; } });
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fs/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,2CAYsB;AAXpB,gHAAA,kBAAkB,OAAA;AAClB,kHAAA,oBAAoB,OAAA;AACpB,kHAAA,oBAAoB,OAAA;AACpB,+GAAA,iBAAiB,OAAA;AACjB,uGAAA,SAAS,OAAA;AACT,wGAAA,UAAU,OAAA;AACV,0GAAA,YAAY,OAAA;AACZ,8GAAA,gBAAgB,OAAA;AAChB,4GAAA,cAAc,OAAA;AACd,0GAAA,YAAY,OAAA;AACZ,kHAAA,oBAAoB,OAAA;AAGtB,mCAAyC;AAAhC,uGAAA,aAAa,OAAA;AAGtB,6CAKuB;AAJrB,iHAAA,kBAAkB,OAAA;AAClB,8GAAA,eAAe,OAAA;AACf,+GAAA,gBAAgB,OAAA;AAChB,wGAAA,SAAS,OAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure Node.js recursive file walker for source file discovery.
|
|
3
|
+
*
|
|
4
|
+
* No vscode dependency — uses only `fs` and `path`.
|
|
5
|
+
*/
|
|
6
|
+
export interface DiscoverOptions {
|
|
7
|
+
/** Directory names to exclude (defaults to DEFAULT_EXCLUSIONS) */
|
|
8
|
+
exclude?: readonly string[];
|
|
9
|
+
/** File extensions to include, with leading dot (defaults to SUPPORTED_EXTENSIONS) */
|
|
10
|
+
extensions?: readonly string[];
|
|
11
|
+
/** Maximum number of files to return (0 = unlimited) */
|
|
12
|
+
maxFiles?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Recursively discover source files under `root`.
|
|
16
|
+
*
|
|
17
|
+
* Returns absolute paths, sorted lexicographically for determinism.
|
|
18
|
+
*
|
|
19
|
+
* @param root Absolute path to the workspace root
|
|
20
|
+
* @param options Optional filters
|
|
21
|
+
*/
|
|
22
|
+
export declare function discoverFiles(root: string, options?: DiscoverOptions): Promise<string[]>;
|
|
23
|
+
//# sourceMappingURL=walker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"walker.d.ts","sourceRoot":"","sources":["../../src/fs/walker.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,MAAM,WAAW,eAAe;IAC9B,kEAAkE;IAClE,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,sFAAsF;IACtF,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAID;;;;;;;GAOG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,MAAM,EAAE,CAAC,CAenB"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Pure Node.js recursive file walker for source file discovery.
|
|
4
|
+
*
|
|
5
|
+
* No vscode dependency — uses only `fs` and `path`.
|
|
6
|
+
*/
|
|
7
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
+
if (k2 === undefined) k2 = k;
|
|
9
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
+
}
|
|
13
|
+
Object.defineProperty(o, k2, desc);
|
|
14
|
+
}) : (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
o[k2] = m[k];
|
|
17
|
+
}));
|
|
18
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
19
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
20
|
+
}) : function(o, v) {
|
|
21
|
+
o["default"] = v;
|
|
22
|
+
});
|
|
23
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
24
|
+
var ownKeys = function(o) {
|
|
25
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
26
|
+
var ar = [];
|
|
27
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
28
|
+
return ar;
|
|
29
|
+
};
|
|
30
|
+
return ownKeys(o);
|
|
31
|
+
};
|
|
32
|
+
return function (mod) {
|
|
33
|
+
if (mod && mod.__esModule) return mod;
|
|
34
|
+
var result = {};
|
|
35
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
36
|
+
__setModuleDefault(result, mod);
|
|
37
|
+
return result;
|
|
38
|
+
};
|
|
39
|
+
})();
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.discoverFiles = discoverFiles;
|
|
42
|
+
const fs = __importStar(require("fs"));
|
|
43
|
+
const path = __importStar(require("path"));
|
|
44
|
+
const exclusions_1 = require("./exclusions");
|
|
45
|
+
// ── Public API ───────────────────────────────────────────────
|
|
46
|
+
/**
|
|
47
|
+
* Recursively discover source files under `root`.
|
|
48
|
+
*
|
|
49
|
+
* Returns absolute paths, sorted lexicographically for determinism.
|
|
50
|
+
*
|
|
51
|
+
* @param root Absolute path to the workspace root
|
|
52
|
+
* @param options Optional filters
|
|
53
|
+
*/
|
|
54
|
+
async function discoverFiles(root, options) {
|
|
55
|
+
const excludeSet = new Set((options?.exclude ?? exclusions_1.DEFAULT_EXCLUSIONS).map((d) => d.toLowerCase()));
|
|
56
|
+
const extSet = new Set((options?.extensions ?? exclusions_1.SUPPORTED_EXTENSIONS).map((e) => e.toLowerCase()));
|
|
57
|
+
const maxFiles = options?.maxFiles ?? 0;
|
|
58
|
+
const result = [];
|
|
59
|
+
await walkDir(root, excludeSet, extSet, maxFiles, result);
|
|
60
|
+
result.sort();
|
|
61
|
+
return result;
|
|
62
|
+
}
|
|
63
|
+
// ── Internals ────────────────────────────────────────────────
|
|
64
|
+
async function walkDir(dir, excludeSet, extSet, maxFiles, result) {
|
|
65
|
+
if (maxFiles > 0 && result.length >= maxFiles)
|
|
66
|
+
return;
|
|
67
|
+
let entries;
|
|
68
|
+
try {
|
|
69
|
+
entries = await fs.promises.readdir(dir, { withFileTypes: true });
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
// Permission denied, symlink loop, etc. — skip silently.
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
// Sort entries for deterministic traversal order
|
|
76
|
+
entries.sort((a, b) => a.name.localeCompare(b.name));
|
|
77
|
+
for (const entry of entries) {
|
|
78
|
+
if (maxFiles > 0 && result.length >= maxFiles)
|
|
79
|
+
return;
|
|
80
|
+
const full = path.join(dir, entry.name);
|
|
81
|
+
if (entry.isDirectory()) {
|
|
82
|
+
if (excludeSet.has(entry.name.toLowerCase()))
|
|
83
|
+
continue;
|
|
84
|
+
await walkDir(full, excludeSet, extSet, maxFiles, result);
|
|
85
|
+
}
|
|
86
|
+
else if (entry.isFile()) {
|
|
87
|
+
const ext = path.extname(entry.name).toLowerCase();
|
|
88
|
+
if (extSet.has(ext)) {
|
|
89
|
+
result.push(full);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=walker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
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E,CAAC;IAAC,MAAM,CAAC;QACP,yDAAyD;QACzD,OAAO;IACT,CAAC;IAED,iDAAiD;IACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAErD,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,IAAI,QAAQ,GAAG,CAAC,IAAI,MAAM,CAAC,MAAM,IAAI,QAAQ;YAAE,OAAO;QAEtD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAExC,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;YACxB,IAAI,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;gBAAE,SAAS;YACvD,MAAM,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC5D,CAAC;aAAM,IAAI,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC;YAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;YACnD,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;gBACpB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACpB,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CoreHost — abstraction layer for environment-specific I/O.
|
|
3
|
+
*
|
|
4
|
+
* The extension provides a vscode-backed host; tests and CLI callers
|
|
5
|
+
* use the Node.js host created by `createNodeHost()`.
|
|
6
|
+
*/
|
|
7
|
+
/** I/O host that core delegates to for file reads and WASM paths. */
|
|
8
|
+
export interface CoreHost {
|
|
9
|
+
/** Read a file by absolute path, returning its UTF-8 content. */
|
|
10
|
+
readFile(absolutePath: string): Promise<string>;
|
|
11
|
+
/** Absolute paths to the WASM runtime and per-language grammars. */
|
|
12
|
+
wasmPaths: WasmPaths;
|
|
13
|
+
}
|
|
14
|
+
export interface WasmPaths {
|
|
15
|
+
/** Path to the core tree-sitter.wasm runtime */
|
|
16
|
+
treeSitter: string;
|
|
17
|
+
/** Map of language id → absolute path to its .wasm grammar */
|
|
18
|
+
grammars: Record<string, string>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Resolve a likely wasm directory for a workspace.
|
|
22
|
+
*
|
|
23
|
+
* Search order favors workspace-local parser bundles, then common
|
|
24
|
+
* repo-relative paths used in this monorepo.
|
|
25
|
+
*/
|
|
26
|
+
export declare function resolveWasmDirForWorkspace(workspaceRoot: string): string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Create a CoreHost backed by Node.js `fs` APIs.
|
|
29
|
+
*
|
|
30
|
+
* @param wasmDir Directory containing tree-sitter.wasm and language grammars
|
|
31
|
+
*/
|
|
32
|
+
export declare function createNodeHost(wasmDir: string): CoreHost;
|
|
33
|
+
/**
|
|
34
|
+
* Create a Node host for a workspace by auto-resolving a wasm directory.
|
|
35
|
+
* Returns undefined when no runtime bundle can be found.
|
|
36
|
+
*/
|
|
37
|
+
export declare function createNodeHostForWorkspace(workspaceRoot: string): CoreHost | undefined;
|
|
38
|
+
//# sourceMappingURL=host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,qEAAqE;AACrE,MAAM,WAAW,QAAQ;IACvB,iEAAiE;IACjE,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEhD,oEAAoE;IACpE,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,WAAW,SAAS;IACxB,gDAAgD;IAChD,UAAU,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAMD;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAqBpF;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAiBxD;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,aAAa,EAAE,MAAM,GACpB,QAAQ,GAAG,SAAS,CAMtB"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CoreHost — abstraction layer for environment-specific I/O.
|
|
4
|
+
*
|
|
5
|
+
* The extension provides a vscode-backed host; tests and CLI callers
|
|
6
|
+
* use the Node.js host created by `createNodeHost()`.
|
|
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.resolveWasmDirForWorkspace = resolveWasmDirForWorkspace;
|
|
43
|
+
exports.createNodeHost = createNodeHost;
|
|
44
|
+
exports.createNodeHostForWorkspace = createNodeHostForWorkspace;
|
|
45
|
+
const fs = __importStar(require("fs"));
|
|
46
|
+
const path = __importStar(require("path"));
|
|
47
|
+
const languages_1 = require("./parsers/languages");
|
|
48
|
+
function hasTreeSitterRuntime(wasmDir) {
|
|
49
|
+
return fs.existsSync(path.join(wasmDir, 'tree-sitter.wasm'));
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Resolve a likely wasm directory for a workspace.
|
|
53
|
+
*
|
|
54
|
+
* Search order favors workspace-local parser bundles, then common
|
|
55
|
+
* repo-relative paths used in this monorepo.
|
|
56
|
+
*/
|
|
57
|
+
function resolveWasmDirForWorkspace(workspaceRoot) {
|
|
58
|
+
const candidates = [
|
|
59
|
+
// Installed via npm — parsers bundled inside @aspectcode/core
|
|
60
|
+
path.resolve(__dirname, '..', 'parsers'),
|
|
61
|
+
// Workspace-local overrides
|
|
62
|
+
path.join(workspaceRoot, 'parsers'),
|
|
63
|
+
path.join(workspaceRoot, 'extension', 'parsers'),
|
|
64
|
+
path.join(process.cwd(), 'parsers'),
|
|
65
|
+
path.join(process.cwd(), 'extension', 'parsers'),
|
|
66
|
+
// Monorepo dev layout
|
|
67
|
+
path.resolve(__dirname, '../../../extension/parsers'),
|
|
68
|
+
path.resolve(__dirname, '../../../../extension/parsers'),
|
|
69
|
+
];
|
|
70
|
+
for (const candidate of candidates) {
|
|
71
|
+
if (hasTreeSitterRuntime(candidate)) {
|
|
72
|
+
return candidate;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Create a CoreHost backed by Node.js `fs` APIs.
|
|
79
|
+
*
|
|
80
|
+
* @param wasmDir Directory containing tree-sitter.wasm and language grammars
|
|
81
|
+
*/
|
|
82
|
+
function createNodeHost(wasmDir) {
|
|
83
|
+
const grammarFiles = (0, languages_1.getGrammarFileMap)();
|
|
84
|
+
const grammars = {};
|
|
85
|
+
for (const [lang, filename] of Object.entries(grammarFiles)) {
|
|
86
|
+
const p = path.join(wasmDir, filename);
|
|
87
|
+
if (fs.existsSync(p)) {
|
|
88
|
+
grammars[lang] = p;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return {
|
|
92
|
+
readFile: (absolutePath) => fs.promises.readFile(absolutePath, 'utf-8'),
|
|
93
|
+
wasmPaths: {
|
|
94
|
+
treeSitter: path.join(wasmDir, 'tree-sitter.wasm'),
|
|
95
|
+
grammars,
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Create a Node host for a workspace by auto-resolving a wasm directory.
|
|
101
|
+
* Returns undefined when no runtime bundle can be found.
|
|
102
|
+
*/
|
|
103
|
+
function createNodeHostForWorkspace(workspaceRoot) {
|
|
104
|
+
const wasmDir = resolveWasmDirForWorkspace(workspaceRoot);
|
|
105
|
+
if (!wasmDir) {
|
|
106
|
+
return undefined;
|
|
107
|
+
}
|
|
108
|
+
return createNodeHost(w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AgB,cAAc,CAAC,OAAe;IAC5C,MAAM,YAAY,GAAG,IAAA,6BAAiB,GAAE,CAAC;IACzC,MAAM,QAAQ,GAA2B,EAAE,CAAC;IAC5C,KAAK,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;QAC5D,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACvC,IAAI,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;YACrB,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC;IACH,CAAC;IAED,OAAO;QACL,QAAQ,EAAE,CAAC,YAAoB,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;QAC/E,SAAS,EAAE;YACT,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,kBAAkB,CAAC;YAClD,QAAQ;SACT;KACF,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,SAAgB,0BAA0B,CACxC,aAAqB;IAErB,MAAM,OAAO,GAAG,0BAA0B,CAAC,aAAa,CAAC,CAAC;IAC1D,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @aspectcode/core — public API surface
|
|
3
|
+
*
|
|
4
|
+
* This package contains pure-logic code with ZERO dependency on the `vscode`
|
|
5
|
+
* module. Everything here must be usable from a CLI, a test harness, or the
|
|
6
|
+
* VS Code extension equally.
|
|
7
|
+
*/
|
|
8
|
+
export type { AnalysisModel, AnalyzedFile, ExtractedSymbol, FileSymbols, Graph, GraphNode, GraphEdge, DependencyLink, Metrics, HubMetric, RepoMeta, } from './model';
|
|
9
|
+
export type { CoreHost, WasmPaths } from './host';
|
|
10
|
+
export { createNodeHost, createNodeHostForWorkspace, resolveWasmDirForWorkspace, } from './host';
|
|
11
|
+
export { toPosix, makeRelativePath } from './paths';
|
|
12
|
+
export { classifyFile, isStructuralAppFile, isConfigOrToolingFile } from './classifiers';
|
|
13
|
+
export type { FileKind } from './classifiers';
|
|
14
|
+
export { computeModelStats, deriveHubs } from './stats';
|
|
15
|
+
export type { ModelStats } from './stats';
|
|
16
|
+
export { SUPPORTED_EXTENSIONS, PACKAGE_MANAGER_DIRS, BUILD_OUTPUT_DIRS, VENV_DIRS, CACHE_DIRS, VCS_IDE_DIRS, TEST_OUTPUT_DIRS, GENERATED_DIRS, VENV_MARKERS, BUILD_OUTPUT_MARKERS, discoverFiles, } from './fs/index';
|
|
17
|
+
export type { DiscoverOptions } from './fs/index';
|
|
18
|
+
export { loadGrammars, createEmptyGrammarSummary, textFor, extractPythonImports, extractPythonSymbols, extractTSJSImports, extractTSJSSymbols, extractJavaSymbols, extractCSharpSymbols, } from './parsers/index';
|
|
19
|
+
export type { LoadedGrammars, GrammarSummary, LogFn } from './parsers/index';
|
|
20
|
+
export { DependencyAnalyzer, } from './analysis/index';
|
|
21
|
+
export type { DependencyProgressCallback, DependencyWarningCallback, ImportStatement, CallSite, FileIndex, DependencyLanguageAdapter, } from './analysis/index';
|
|
22
|
+
export { analyzeRepo, analyzeRepoWithDependencies } from './analysis/repo';
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,YAAY,EACV,aAAa,EACb,YAAY,EACZ,eAAe,EACf,WAAW,EACX,KAAK,EACL,SAAS,EACT,SAAS,EACT,cAAc,EACd,OAAO,EACP,SAAS,EACT,QAAQ,GACT,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,Q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
|
5
|
+
* This package contains pure-logic code with ZERO dependency on the `vscode`
|
|
6
|
+
* module. Everything here must be usable from a CLI, a test harness, or the
|
|
7
|
+
* VS Code extension equally.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.analyzeRepoWithDependencies = exports.analyzeRepo = exports.DependencyAnalyzer = exports.extractCSharpSymbols = exports.extractJavaSymbols = exports.extractTSJSSymbols = exports.extractTSJSImports = exports.extractPythonSymbols = exports.extractPythonImports = exports.textFor = exports.createEmptyGrammarSummary = exports.loadGrammars = exports.discoverFiles = exports.BUILD_OUTPUT_MARKERS = exports.VENV_MARKERS = exports.GENERATED_DIRS = exports.TEST_OUTPUT_DIRS = exports.VCS_IDE_DIRS = exports.CACHE_DIRS = exports.VENV_DIRS = exports.BUILD_OUTPUT_DIRS = exports.PACKAGE_MANAGER_DIRS = exports.SUPPORTED_EXTENSIONS = exports.deriveHubs = exports.computeModelStats = exports.isConfigOrToolingFile = exports.isStructuralAppFile = exports.classifyFile = exports.makeRelativePath = exports.toPosix = exports.resolveWasmDirForWorkspace = exports.createNodeHostForWorkspace = exports.createNodeHost = void 0;
|
|
11
|
+
var host_1 = require("./host");
|
|
12
|
+
Object.defineProperty(exports, "createNodeHost", { enumerable: true, get: function () { return host_1.createNodeHost; } });
|
|
13
|
+
Object.defineProperty(exports, "createNodeHostForWorkspace", { enumerable: true, get: function () { return host_1.createNodeHostForWorkspace; } });
|
|
14
|
+
Object.defineProperty(exports, "resolveWasmDirForWorkspace", { enumerable: true, get: function () { return host_1.resolveWasmDirForWorkspace; } });
|
|
15
|
+
// ── Re-exports: paths ────────────────────────────────────────
|
|
16
|
+
var paths_1 = require("./paths");
|
|
17
|
+
Object.defineProperty(exports, "toPosix", { enumerable: true, get: function () { return paths_1.toPosix; } });
|
|
18
|
+
Object.defineProperty(exports, "makeRelativePath", { enumerable: true, get: function () { return paths_1.makeRelativePath; } });
|
|
19
|
+
// ── Re-exports: classifiers ──────────────────────────────────
|
|
20
|
+
var classifiers_1 = require("./classifiers");
|
|
21
|
+
Object.defineProperty(exports, "classifyFile", { enumerable: true, get: function () { return classifiers_1.classifyFile; } });
|
|
22
|
+
Object.defineProperty(exports, "isStructuralAppFile", { enumerable: true, get: function () { return classifiers_1.isStructuralAppFile; } });
|
|
23
|
+
Object.defineProperty(exports, "isConfigOrToolingFile", { enumerable: true, get: function () { return classifiers_1.isConfigOrToolingFile; } });
|
|
24
|
+
// ── Re-exports: stats ────────────────────────────────────────
|
|
25
|
+
var stats_1 = require("./stats");
|
|
26
|
+
Object.defineProperty(exports, "computeModelStats", { enumerable: true, get: function () { return stats_1.computeModelStats; } });
|
|
27
|
+
Object.defineProperty(exports, "deriveHubs", { enumerable: true, get: function () { return stats_1.deriveHubs; } });
|
|
28
|
+
// ── Re-exports: file system ──────────────────────────────────
|
|
29
|
+
var index_1 = require("./fs/index");
|
|
30
|
+
Object.defineProperty(exports, "SUPPORTED_EXTENSIONS", { enumerable: true, get: function () { return index_1.SUPPORTED_EXTENSIONS; } });
|
|
31
|
+
Object.defineProperty(exports, "PACKAGE_MANAGER_DIRS", { enumerable: true, get: function () { return index_1.PACKAGE_MANAGER_DIRS; } });
|
|
32
|
+
Object.defineProperty(exports, "BUILD_OUTPUT_DIRS", { enumerable: true, get: function () { return index_1.BUILD_OUTPUT_DIRS; } });
|
|
33
|
+
Object.defineProperty(exports, "VENV_DIRS", { enumerable: true, get: function () { return index_1.VENV_DIRS; } });
|
|
34
|
+
Object.defineProperty(exports, "CACHE_DIRS", { enumerable: true, get: function () { return index_1.CACHE_DIRS; } });
|
|
35
|
+
Object.defineProperty(exports, "VCS_IDE_DIRS", { enumerable: true, get: function () { return index_1.VCS_IDE_DIRS; } });
|
|
36
|
+
Object.defineProperty(exports, "TEST_OUTPUT_DIRS", { enumerable: true, get: function () { return index_1.TEST_OUTPUT_DIRS; } });
|
|
37
|
+
Object.defineProperty(exports, "GENERATED_DIRS", { enumerable: true, get: function () { return index_1.GENERATED_DIRS; } });
|
|
38
|
+
Object.defineProperty(exports, "VENV_MARKERS", { enumerable: true, get: function () { return index_1.VENV_MARKERS; } });
|
|
39
|
+
Object.defineProperty(exports, "BUILD_OUTPUT_MARKERS", { enumerable: true, get: function () { return index_1.BUILD_OUTPUT_MARKERS; } });
|
|
40
|
+
Object.defineProperty(exports, "discoverFiles", { enumerable: true, get: function () { return index_1.discoverFiles; } });
|
|
41
|
+
// ── Re-exports: parsers ──────────────────────────────────────
|
|
42
|
+
var index_2 = require("./parsers/index");
|
|
43
|
+
Object.defineProperty(exports, "loadGrammars", { enumerable: true, get: function () { return index_2.loadGrammars; } });
|
|
44
|
+
Object.defineProperty(exports, "createEmptyGrammarSummary", { enumerable: true, get: function () { return index_2.createEmptyGrammarSummary; } });
|
|
45
|
+
Object.defineProperty(exports, "textFor", { enumerable: true, get: function () { return index_2.textFor; } });
|
|
46
|
+
Object.defineProperty(exports, "extractPythonImports", { enumerable: true, get: function () { return index_2.extractPythonImports; } });
|
|
47
|
+
Object.defineProperty(exports, "extractPythonSymbols", { enumerable: true, get: function () { return index_2.extractPythonSymbols; } });
|
|
48
|
+
Object.defineProperty(exports, "extractTSJSImports", { enumerable: true, get: function () { return index_2.extractTSJSImports; } });
|
|
49
|
+
Object.defineProperty(exports, "extractTSJSSymbols", { enumerable: true, get: function () { return index_2.extractTSJSSymbols; } });
|
|
50
|
+
Object.defineProperty(exports, "extractJavaSymbols", { enumerable: true, get: function () { return index_2.extractJavaSymbols; } });
|
|
51
|
+
Object.defineProperty(exports, "extractCSharpSymbols", { enumerable: true, get: function () { return index_2.extractCSharpSymbols; } });
|
|
52
|
+
// ── Re-exports: analysis ─────────────────────────────────────
|
|
53
|
+
var index_3 = require("./analysis/index");
|
|
54
|
+
Object.defineProperty(exports, "DependencyAnalyzer", { enumerable: true, get: function () { return index_3.DependencyAnalyzer; } });
|
|
55
|
+
// ── Re-exports: repo-level analysis ──────────────────────────
|
|
56
|
+
var repo_1 = require("./analysis/repo");
|
|
57
|
+
Object.defineProperty(exports, "analyzeRepo", { enumerable: true, get: function () { return repo_1.analyzeRepo; } });
|
|
58
|
+
Object.defineProperty(exports, "analyzeRepoWithDependencies", { enumerable: true, get: function () { return repo_1.analyzeRepoWithDependencies; } });
|
|
59
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAmBH,+BAIgB;AAHd,sGAAA,cAAc,OAAA;AACd,kHAAA,0BAA0B,OAAA;AAC1B,kHAAA,0BAA0B,OAAA;AAG5B,gEAAgE;AAEhE,iCAAoD;AAA3C,gGAAA,OAAO,OAAA;AAAE,yGAAA,gBAAgB,OAAA;AAElC,gEAAgE;AAEhE,6CAAyF;AAAhF,2GAAA,YAAY,OAAA;AAAE,kHAAA,mBAAmB,OAAA;AAAE,oHAAA,qBAAqB,OAAA;AAGjE,gEAAgE;AAEhE,iCAAwD;AAA/C,0GAAA,iBAAiB,OAAA;AAAE,mGAAA,UAAU,OAAA;AAGtC,gEAAgE;AAEhE,oCAYoB;AAXlB,6GAAA,oBAAoB,OAAA;AACpB,6GAAA,oBAAoB,OAAA;AACpB,0GAAA,iBAAiB,OAAA;AACjB,kGAAA,SAAS,OAAA;AACT,mGAAA,UAAU,OAAA;AACV,qGAAA,YAAY,OAAA;AACZ,yGAAA,gBAAgB,OAAA;AAChB,uGAAA,cAAc,OAAA;AACd,qGAAA,YAAY,OAAA;AACZ,6GAAA,oBAAoB,OAAA;AACpB,sGAAA,aAAa,OAAA;AAIf,gEAAgE;AAEhE,yCAUyB;AATvB,qGAAA,YAAY,OAAA;AACZ,kHAAA,yBAAyB,OAAA;AACzB,gGAAA,OAAO,OAAA;AACP,6GAAA,oBAAoB,OAAA;AACpB,6GAAA,oBAAoB,OAAA;AACpB,2GAAA,kBAAkB,OAAA;AAClB,2GAAA,kBAAkB,OAAA;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