@bharanidev/bhgraph-darwin-arm64 1.0.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/bin/bhgraph +19 -0
- package/lib/dist/bin/bhgraph.d.ts +26 -0
- package/lib/dist/bin/bhgraph.d.ts.map +1 -0
- package/lib/dist/bin/bhgraph.js +2207 -0
- package/lib/dist/bin/bhgraph.js.map +1 -0
- package/lib/dist/bin/command-supervision.d.ts +12 -0
- package/lib/dist/bin/command-supervision.d.ts.map +1 -0
- package/lib/dist/bin/command-supervision.js +89 -0
- package/lib/dist/bin/command-supervision.js.map +1 -0
- package/lib/dist/bin/fatal-handler.d.ts +20 -0
- package/lib/dist/bin/fatal-handler.d.ts.map +1 -0
- package/lib/dist/bin/fatal-handler.js +118 -0
- package/lib/dist/bin/fatal-handler.js.map +1 -0
- package/lib/dist/bin/node-version-check.d.ts +37 -0
- package/lib/dist/bin/node-version-check.d.ts.map +1 -0
- package/lib/dist/bin/node-version-check.js +79 -0
- package/lib/dist/bin/node-version-check.js.map +1 -0
- package/lib/dist/bin/uninstall.d.ts +14 -0
- package/lib/dist/bin/uninstall.d.ts.map +1 -0
- package/lib/dist/bin/uninstall.js +36 -0
- package/lib/dist/bin/uninstall.js.map +1 -0
- package/lib/dist/context/formatter.d.ts +30 -0
- package/lib/dist/context/formatter.d.ts.map +1 -0
- package/lib/dist/context/formatter.js +263 -0
- package/lib/dist/context/formatter.js.map +1 -0
- package/lib/dist/context/index.d.ts +119 -0
- package/lib/dist/context/index.d.ts.map +1 -0
- package/lib/dist/context/index.js +1296 -0
- package/lib/dist/context/index.js.map +1 -0
- package/lib/dist/context/markers.d.ts +19 -0
- package/lib/dist/context/markers.d.ts.map +1 -0
- package/lib/dist/context/markers.js +22 -0
- package/lib/dist/context/markers.js.map +1 -0
- package/lib/dist/db/index.d.ts +142 -0
- package/lib/dist/db/index.d.ts.map +1 -0
- package/lib/dist/db/index.js +335 -0
- package/lib/dist/db/index.js.map +1 -0
- package/lib/dist/db/migrations.d.ts +44 -0
- package/lib/dist/db/migrations.d.ts.map +1 -0
- package/lib/dist/db/migrations.js +182 -0
- package/lib/dist/db/migrations.js.map +1 -0
- package/lib/dist/db/queries.d.ts +452 -0
- package/lib/dist/db/queries.d.ts.map +1 -0
- package/lib/dist/db/queries.js +1740 -0
- package/lib/dist/db/queries.js.map +1 -0
- package/lib/dist/db/schema.sql +182 -0
- package/lib/dist/db/sqlite-adapter.d.ts +53 -0
- package/lib/dist/db/sqlite-adapter.d.ts.map +1 -0
- package/lib/dist/db/sqlite-adapter.js +117 -0
- package/lib/dist/db/sqlite-adapter.js.map +1 -0
- package/lib/dist/directory.d.ts +183 -0
- package/lib/dist/directory.d.ts.map +1 -0
- package/lib/dist/directory.js +797 -0
- package/lib/dist/directory.js.map +1 -0
- package/lib/dist/errors.d.ts +136 -0
- package/lib/dist/errors.d.ts.map +1 -0
- package/lib/dist/errors.js +219 -0
- package/lib/dist/errors.js.map +1 -0
- package/lib/dist/extraction/astro-extractor.d.ts +79 -0
- package/lib/dist/extraction/astro-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/astro-extractor.js +320 -0
- package/lib/dist/extraction/astro-extractor.js.map +1 -0
- package/lib/dist/extraction/cfml-extractor.d.ts +107 -0
- package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/cfml-extractor.js +494 -0
- package/lib/dist/extraction/cfml-extractor.js.map +1 -0
- package/lib/dist/extraction/dfm-extractor.d.ts +31 -0
- package/lib/dist/extraction/dfm-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/dfm-extractor.js +151 -0
- package/lib/dist/extraction/dfm-extractor.js.map +1 -0
- package/lib/dist/extraction/extraction-version.d.ts +25 -0
- package/lib/dist/extraction/extraction-version.d.ts.map +1 -0
- package/lib/dist/extraction/extraction-version.js +28 -0
- package/lib/dist/extraction/extraction-version.js.map +1 -0
- package/lib/dist/extraction/function-ref.d.ts +118 -0
- package/lib/dist/extraction/function-ref.d.ts.map +1 -0
- package/lib/dist/extraction/function-ref.js +727 -0
- package/lib/dist/extraction/function-ref.js.map +1 -0
- package/lib/dist/extraction/generated-detection.d.ts +30 -0
- package/lib/dist/extraction/generated-detection.d.ts.map +1 -0
- package/lib/dist/extraction/generated-detection.js +83 -0
- package/lib/dist/extraction/generated-detection.js.map +1 -0
- package/lib/dist/extraction/grammars.d.ts +123 -0
- package/lib/dist/extraction/grammars.d.ts.map +1 -0
- package/lib/dist/extraction/grammars.js +589 -0
- package/lib/dist/extraction/grammars.js.map +1 -0
- package/lib/dist/extraction/index.d.ts +232 -0
- package/lib/dist/extraction/index.d.ts.map +1 -0
- package/lib/dist/extraction/index.js +2269 -0
- package/lib/dist/extraction/index.js.map +1 -0
- package/lib/dist/extraction/languages/arkts.d.ts +3 -0
- package/lib/dist/extraction/languages/arkts.d.ts.map +1 -0
- package/lib/dist/extraction/languages/arkts.js +127 -0
- package/lib/dist/extraction/languages/arkts.js.map +1 -0
- package/lib/dist/extraction/languages/c-cpp.d.ts +110 -0
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -0
- package/lib/dist/extraction/languages/c-cpp.js +837 -0
- package/lib/dist/extraction/languages/c-cpp.js.map +1 -0
- package/lib/dist/extraction/languages/cfquery.d.ts +12 -0
- package/lib/dist/extraction/languages/cfquery.d.ts.map +1 -0
- package/lib/dist/extraction/languages/cfquery.js +28 -0
- package/lib/dist/extraction/languages/cfquery.js.map +1 -0
- package/lib/dist/extraction/languages/cfscript.d.ts +3 -0
- package/lib/dist/extraction/languages/cfscript.d.ts.map +1 -0
- package/lib/dist/extraction/languages/cfscript.js +73 -0
- package/lib/dist/extraction/languages/cfscript.js.map +1 -0
- package/lib/dist/extraction/languages/cobol.d.ts +33 -0
- package/lib/dist/extraction/languages/cobol.d.ts.map +1 -0
- package/lib/dist/extraction/languages/cobol.js +499 -0
- package/lib/dist/extraction/languages/cobol.js.map +1 -0
- package/lib/dist/extraction/languages/csharp.d.ts +25 -0
- package/lib/dist/extraction/languages/csharp.d.ts.map +1 -0
- package/lib/dist/extraction/languages/csharp.js +175 -0
- package/lib/dist/extraction/languages/csharp.js.map +1 -0
- package/lib/dist/extraction/languages/dart.d.ts +3 -0
- package/lib/dist/extraction/languages/dart.d.ts.map +1 -0
- package/lib/dist/extraction/languages/dart.js +374 -0
- package/lib/dist/extraction/languages/dart.js.map +1 -0
- package/lib/dist/extraction/languages/erlang.d.ts +3 -0
- package/lib/dist/extraction/languages/erlang.d.ts.map +1 -0
- package/lib/dist/extraction/languages/erlang.js +350 -0
- package/lib/dist/extraction/languages/erlang.js.map +1 -0
- package/lib/dist/extraction/languages/go.d.ts +3 -0
- package/lib/dist/extraction/languages/go.d.ts.map +1 -0
- package/lib/dist/extraction/languages/go.js +111 -0
- package/lib/dist/extraction/languages/go.js.map +1 -0
- package/lib/dist/extraction/languages/index.d.ts +10 -0
- package/lib/dist/extraction/languages/index.d.ts.map +1 -0
- package/lib/dist/extraction/languages/index.js +71 -0
- package/lib/dist/extraction/languages/index.js.map +1 -0
- package/lib/dist/extraction/languages/java.d.ts +3 -0
- package/lib/dist/extraction/languages/java.d.ts.map +1 -0
- package/lib/dist/extraction/languages/java.js +315 -0
- package/lib/dist/extraction/languages/java.js.map +1 -0
- package/lib/dist/extraction/languages/javascript.d.ts +3 -0
- package/lib/dist/extraction/languages/javascript.d.ts.map +1 -0
- package/lib/dist/extraction/languages/javascript.js +106 -0
- package/lib/dist/extraction/languages/javascript.js.map +1 -0
- package/lib/dist/extraction/languages/kotlin.d.ts +3 -0
- package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -0
- package/lib/dist/extraction/languages/kotlin.js +379 -0
- package/lib/dist/extraction/languages/kotlin.js.map +1 -0
- package/lib/dist/extraction/languages/lua.d.ts +3 -0
- package/lib/dist/extraction/languages/lua.d.ts.map +1 -0
- package/lib/dist/extraction/languages/lua.js +150 -0
- package/lib/dist/extraction/languages/lua.js.map +1 -0
- package/lib/dist/extraction/languages/luau.d.ts +3 -0
- package/lib/dist/extraction/languages/luau.d.ts.map +1 -0
- package/lib/dist/extraction/languages/luau.js +37 -0
- package/lib/dist/extraction/languages/luau.js.map +1 -0
- package/lib/dist/extraction/languages/nix.d.ts +3 -0
- package/lib/dist/extraction/languages/nix.d.ts.map +1 -0
- package/lib/dist/extraction/languages/nix.js +294 -0
- package/lib/dist/extraction/languages/nix.js.map +1 -0
- package/lib/dist/extraction/languages/objc.d.ts +3 -0
- package/lib/dist/extraction/languages/objc.d.ts.map +1 -0
- package/lib/dist/extraction/languages/objc.js +175 -0
- package/lib/dist/extraction/languages/objc.js.map +1 -0
- package/lib/dist/extraction/languages/pascal.d.ts +3 -0
- package/lib/dist/extraction/languages/pascal.d.ts.map +1 -0
- package/lib/dist/extraction/languages/pascal.js +77 -0
- package/lib/dist/extraction/languages/pascal.js.map +1 -0
- package/lib/dist/extraction/languages/php.d.ts +3 -0
- package/lib/dist/extraction/languages/php.d.ts.map +1 -0
- package/lib/dist/extraction/languages/php.js +196 -0
- package/lib/dist/extraction/languages/php.js.map +1 -0
- package/lib/dist/extraction/languages/python.d.ts +3 -0
- package/lib/dist/extraction/languages/python.d.ts.map +1 -0
- package/lib/dist/extraction/languages/python.js +56 -0
- package/lib/dist/extraction/languages/python.js.map +1 -0
- package/lib/dist/extraction/languages/r.d.ts +3 -0
- package/lib/dist/extraction/languages/r.d.ts.map +1 -0
- package/lib/dist/extraction/languages/r.js +314 -0
- package/lib/dist/extraction/languages/r.js.map +1 -0
- package/lib/dist/extraction/languages/ruby.d.ts +3 -0
- package/lib/dist/extraction/languages/ruby.d.ts.map +1 -0
- package/lib/dist/extraction/languages/ruby.js +149 -0
- package/lib/dist/extraction/languages/ruby.js.map +1 -0
- package/lib/dist/extraction/languages/rust.d.ts +3 -0
- package/lib/dist/extraction/languages/rust.d.ts.map +1 -0
- package/lib/dist/extraction/languages/rust.js +142 -0
- package/lib/dist/extraction/languages/rust.js.map +1 -0
- package/lib/dist/extraction/languages/scala.d.ts +3 -0
- package/lib/dist/extraction/languages/scala.d.ts.map +1 -0
- package/lib/dist/extraction/languages/scala.js +209 -0
- package/lib/dist/extraction/languages/scala.js.map +1 -0
- package/lib/dist/extraction/languages/solidity.d.ts +3 -0
- package/lib/dist/extraction/languages/solidity.d.ts.map +1 -0
- package/lib/dist/extraction/languages/solidity.js +293 -0
- package/lib/dist/extraction/languages/solidity.js.map +1 -0
- package/lib/dist/extraction/languages/swift.d.ts +3 -0
- package/lib/dist/extraction/languages/swift.d.ts.map +1 -0
- package/lib/dist/extraction/languages/swift.js +152 -0
- package/lib/dist/extraction/languages/swift.js.map +1 -0
- package/lib/dist/extraction/languages/terraform.d.ts +3 -0
- package/lib/dist/extraction/languages/terraform.d.ts.map +1 -0
- package/lib/dist/extraction/languages/terraform.js +641 -0
- package/lib/dist/extraction/languages/terraform.js.map +1 -0
- package/lib/dist/extraction/languages/typescript.d.ts +16 -0
- package/lib/dist/extraction/languages/typescript.d.ts.map +1 -0
- package/lib/dist/extraction/languages/typescript.js +167 -0
- package/lib/dist/extraction/languages/typescript.js.map +1 -0
- package/lib/dist/extraction/languages/vbnet.d.ts +11 -0
- package/lib/dist/extraction/languages/vbnet.d.ts.map +1 -0
- package/lib/dist/extraction/languages/vbnet.js +141 -0
- package/lib/dist/extraction/languages/vbnet.js.map +1 -0
- package/lib/dist/extraction/liquid-extractor.d.ts +59 -0
- package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/liquid-extractor.js +357 -0
- package/lib/dist/extraction/liquid-extractor.js.map +1 -0
- package/lib/dist/extraction/mybatis-extractor.d.ts +68 -0
- package/lib/dist/extraction/mybatis-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/mybatis-extractor.js +300 -0
- package/lib/dist/extraction/mybatis-extractor.js.map +1 -0
- package/lib/dist/extraction/parse-pool.d.ts +126 -0
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -0
- package/lib/dist/extraction/parse-pool.js +319 -0
- package/lib/dist/extraction/parse-pool.js.map +1 -0
- package/lib/dist/extraction/parse-worker.d.ts +8 -0
- package/lib/dist/extraction/parse-worker.d.ts.map +1 -0
- package/lib/dist/extraction/parse-worker.js +97 -0
- package/lib/dist/extraction/parse-worker.js.map +1 -0
- package/lib/dist/extraction/razor-extractor.d.ts +42 -0
- package/lib/dist/extraction/razor-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/razor-extractor.js +285 -0
- package/lib/dist/extraction/razor-extractor.js.map +1 -0
- package/lib/dist/extraction/svelte-extractor.d.ts +56 -0
- package/lib/dist/extraction/svelte-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/svelte-extractor.js +275 -0
- package/lib/dist/extraction/svelte-extractor.js.map +1 -0
- package/lib/dist/extraction/tree-sitter-helpers.d.ts +28 -0
- package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -0
- package/lib/dist/extraction/tree-sitter-helpers.js +153 -0
- package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -0
- package/lib/dist/extraction/tree-sitter-types.d.ts +258 -0
- package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -0
- package/lib/dist/extraction/tree-sitter-types.js +10 -0
- package/lib/dist/extraction/tree-sitter-types.js.map +1 -0
- package/lib/dist/extraction/tree-sitter.d.ts +706 -0
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -0
- package/lib/dist/extraction/tree-sitter.js +6506 -0
- package/lib/dist/extraction/tree-sitter.js.map +1 -0
- package/lib/dist/extraction/vue-extractor.d.ts +51 -0
- package/lib/dist/extraction/vue-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/vue-extractor.js +254 -0
- package/lib/dist/extraction/vue-extractor.js.map +1 -0
- package/lib/dist/extraction/wasm/tree-sitter-arkts.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-c_sharp.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-cfml.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-cfquery.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-cfscript.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-erlang.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-lua.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-luau.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-nix.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-r.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-terraform.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts +38 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts.map +1 -0
- package/lib/dist/extraction/wasm-runtime-flags.js +106 -0
- package/lib/dist/extraction/wasm-runtime-flags.js.map +1 -0
- package/lib/dist/graph/index.d.ts +8 -0
- package/lib/dist/graph/index.d.ts.map +1 -0
- package/lib/dist/graph/index.js +13 -0
- package/lib/dist/graph/index.js.map +1 -0
- package/lib/dist/graph/queries.d.ts +106 -0
- package/lib/dist/graph/queries.d.ts.map +1 -0
- package/lib/dist/graph/queries.js +339 -0
- package/lib/dist/graph/queries.js.map +1 -0
- package/lib/dist/graph/traversal.d.ts +127 -0
- package/lib/dist/graph/traversal.d.ts.map +1 -0
- package/lib/dist/graph/traversal.js +599 -0
- package/lib/dist/graph/traversal.js.map +1 -0
- package/lib/dist/index.d.ts +642 -0
- package/lib/dist/index.d.ts.map +1 -0
- package/lib/dist/index.js +1387 -0
- package/lib/dist/index.js.map +1 -0
- package/lib/dist/installer/config-writer.d.ts +28 -0
- package/lib/dist/installer/config-writer.d.ts.map +1 -0
- package/lib/dist/installer/config-writer.js +91 -0
- package/lib/dist/installer/config-writer.js.map +1 -0
- package/lib/dist/installer/index.d.ts +100 -0
- package/lib/dist/installer/index.d.ts.map +1 -0
- package/lib/dist/installer/index.js +526 -0
- package/lib/dist/installer/index.js.map +1 -0
- package/lib/dist/installer/instructions-template.d.ts +41 -0
- package/lib/dist/installer/instructions-template.d.ts.map +1 -0
- package/lib/dist/installer/instructions-template.js +53 -0
- package/lib/dist/installer/instructions-template.js.map +1 -0
- package/lib/dist/installer/targets/antigravity.d.ts +57 -0
- package/lib/dist/installer/targets/antigravity.d.ts.map +1 -0
- package/lib/dist/installer/targets/antigravity.js +308 -0
- package/lib/dist/installer/targets/antigravity.js.map +1 -0
- package/lib/dist/installer/targets/claude.d.ts +62 -0
- package/lib/dist/installer/targets/claude.d.ts.map +1 -0
- package/lib/dist/installer/targets/claude.js +454 -0
- package/lib/dist/installer/targets/claude.js.map +1 -0
- package/lib/dist/installer/targets/codex.d.ts +18 -0
- package/lib/dist/installer/targets/codex.d.ts.map +1 -0
- package/lib/dist/installer/targets/codex.js +185 -0
- package/lib/dist/installer/targets/codex.js.map +1 -0
- package/lib/dist/installer/targets/cursor.d.ts +35 -0
- package/lib/dist/installer/targets/cursor.d.ts.map +1 -0
- package/lib/dist/installer/targets/cursor.js +254 -0
- package/lib/dist/installer/targets/cursor.js.map +1 -0
- package/lib/dist/installer/targets/gemini.d.ts +26 -0
- package/lib/dist/installer/targets/gemini.d.ts.map +1 -0
- package/lib/dist/installer/targets/gemini.js +165 -0
- package/lib/dist/installer/targets/gemini.js.map +1 -0
- package/lib/dist/installer/targets/hermes.d.ts +18 -0
- package/lib/dist/installer/targets/hermes.d.ts.map +1 -0
- package/lib/dist/installer/targets/hermes.js +359 -0
- package/lib/dist/installer/targets/hermes.js.map +1 -0
- package/lib/dist/installer/targets/kiro.d.ts +27 -0
- package/lib/dist/installer/targets/kiro.d.ts.map +1 -0
- package/lib/dist/installer/targets/kiro.js +178 -0
- package/lib/dist/installer/targets/kiro.js.map +1 -0
- package/lib/dist/installer/targets/opencode.d.ts +38 -0
- package/lib/dist/installer/targets/opencode.d.ts.map +1 -0
- package/lib/dist/installer/targets/opencode.js +288 -0
- package/lib/dist/installer/targets/opencode.js.map +1 -0
- package/lib/dist/installer/targets/registry.d.ts +35 -0
- package/lib/dist/installer/targets/registry.d.ts.map +1 -0
- package/lib/dist/installer/targets/registry.js +91 -0
- package/lib/dist/installer/targets/registry.js.map +1 -0
- package/lib/dist/installer/targets/shared.d.ts +101 -0
- package/lib/dist/installer/targets/shared.d.ts.map +1 -0
- package/lib/dist/installer/targets/shared.js +264 -0
- package/lib/dist/installer/targets/shared.js.map +1 -0
- package/lib/dist/installer/targets/toml.d.ts +52 -0
- package/lib/dist/installer/targets/toml.d.ts.map +1 -0
- package/lib/dist/installer/targets/toml.js +147 -0
- package/lib/dist/installer/targets/toml.js.map +1 -0
- package/lib/dist/installer/targets/types.d.ts +108 -0
- package/lib/dist/installer/targets/types.d.ts.map +1 -0
- package/lib/dist/installer/targets/types.js +16 -0
- package/lib/dist/installer/targets/types.js.map +1 -0
- package/lib/dist/mcp/daemon-manager.d.ts +42 -0
- package/lib/dist/mcp/daemon-manager.d.ts.map +1 -0
- package/lib/dist/mcp/daemon-manager.js +129 -0
- package/lib/dist/mcp/daemon-manager.js.map +1 -0
- package/lib/dist/mcp/daemon-paths.d.ts +73 -0
- package/lib/dist/mcp/daemon-paths.d.ts.map +1 -0
- package/lib/dist/mcp/daemon-paths.js +165 -0
- package/lib/dist/mcp/daemon-paths.js.map +1 -0
- package/lib/dist/mcp/daemon-registry.d.ts +47 -0
- package/lib/dist/mcp/daemon-registry.d.ts.map +1 -0
- package/lib/dist/mcp/daemon-registry.js +233 -0
- package/lib/dist/mcp/daemon-registry.js.map +1 -0
- package/lib/dist/mcp/daemon.d.ts +290 -0
- package/lib/dist/mcp/daemon.d.ts.map +1 -0
- package/lib/dist/mcp/daemon.js +840 -0
- package/lib/dist/mcp/daemon.js.map +1 -0
- package/lib/dist/mcp/dynamic-boundaries.d.ts +41 -0
- package/lib/dist/mcp/dynamic-boundaries.d.ts.map +1 -0
- package/lib/dist/mcp/dynamic-boundaries.js +360 -0
- package/lib/dist/mcp/dynamic-boundaries.js.map +1 -0
- package/lib/dist/mcp/early-ppid.d.ts +26 -0
- package/lib/dist/mcp/early-ppid.d.ts.map +1 -0
- package/lib/dist/mcp/early-ppid.js +29 -0
- package/lib/dist/mcp/early-ppid.js.map +1 -0
- package/lib/dist/mcp/engine.d.ts +122 -0
- package/lib/dist/mcp/engine.d.ts.map +1 -0
- package/lib/dist/mcp/engine.js +350 -0
- package/lib/dist/mcp/engine.js.map +1 -0
- package/lib/dist/mcp/index.d.ts +113 -0
- package/lib/dist/mcp/index.d.ts.map +1 -0
- package/lib/dist/mcp/index.js +498 -0
- package/lib/dist/mcp/index.js.map +1 -0
- package/lib/dist/mcp/liveness-watchdog.d.ts +18 -0
- package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -0
- package/lib/dist/mcp/liveness-watchdog.js +207 -0
- package/lib/dist/mcp/liveness-watchdog.js.map +1 -0
- package/lib/dist/mcp/ppid-watchdog.d.ts +62 -0
- package/lib/dist/mcp/ppid-watchdog.d.ts.map +1 -0
- package/lib/dist/mcp/ppid-watchdog.js +64 -0
- package/lib/dist/mcp/ppid-watchdog.js.map +1 -0
- package/lib/dist/mcp/proxy.d.ts +87 -0
- package/lib/dist/mcp/proxy.d.ts.map +1 -0
- package/lib/dist/mcp/proxy.js +659 -0
- package/lib/dist/mcp/proxy.js.map +1 -0
- package/lib/dist/mcp/query-pool.d.ts +94 -0
- package/lib/dist/mcp/query-pool.d.ts.map +1 -0
- package/lib/dist/mcp/query-pool.js +297 -0
- package/lib/dist/mcp/query-pool.js.map +1 -0
- package/lib/dist/mcp/query-worker.d.ts +24 -0
- package/lib/dist/mcp/query-worker.d.ts.map +1 -0
- package/lib/dist/mcp/query-worker.js +87 -0
- package/lib/dist/mcp/query-worker.js.map +1 -0
- package/lib/dist/mcp/server-instructions.d.ts +34 -0
- package/lib/dist/mcp/server-instructions.d.ts.map +1 -0
- package/lib/dist/mcp/server-instructions.js +106 -0
- package/lib/dist/mcp/server-instructions.js.map +1 -0
- package/lib/dist/mcp/session.d.ts +79 -0
- package/lib/dist/mcp/session.d.ts.map +1 -0
- package/lib/dist/mcp/session.js +330 -0
- package/lib/dist/mcp/session.js.map +1 -0
- package/lib/dist/mcp/startup-handshake.d.ts +44 -0
- package/lib/dist/mcp/startup-handshake.d.ts.map +1 -0
- package/lib/dist/mcp/startup-handshake.js +73 -0
- package/lib/dist/mcp/startup-handshake.js.map +1 -0
- package/lib/dist/mcp/stdin-teardown.d.ts +27 -0
- package/lib/dist/mcp/stdin-teardown.d.ts.map +1 -0
- package/lib/dist/mcp/stdin-teardown.js +49 -0
- package/lib/dist/mcp/stdin-teardown.js.map +1 -0
- package/lib/dist/mcp/tools.d.ts +613 -0
- package/lib/dist/mcp/tools.d.ts.map +1 -0
- package/lib/dist/mcp/tools.js +4424 -0
- package/lib/dist/mcp/tools.js.map +1 -0
- package/lib/dist/mcp/transport.d.ts +188 -0
- package/lib/dist/mcp/transport.d.ts.map +1 -0
- package/lib/dist/mcp/transport.js +359 -0
- package/lib/dist/mcp/transport.js.map +1 -0
- package/lib/dist/mcp/version.d.ts +19 -0
- package/lib/dist/mcp/version.d.ts.map +1 -0
- package/lib/dist/mcp/version.js +71 -0
- package/lib/dist/mcp/version.js.map +1 -0
- package/lib/dist/project-config.d.ts +94 -0
- package/lib/dist/project-config.d.ts.map +1 -0
- package/lib/dist/project-config.js +374 -0
- package/lib/dist/project-config.js.map +1 -0
- package/lib/dist/resolution/c-fnptr-synthesizer.d.ts +5 -0
- package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/c-fnptr-synthesizer.js +1038 -0
- package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -0
- package/lib/dist/resolution/callback-synthesizer.d.ts +15 -0
- package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/callback-synthesizer.js +3658 -0
- package/lib/dist/resolution/callback-synthesizer.js.map +1 -0
- package/lib/dist/resolution/cooperative-yield.d.ts +32 -0
- package/lib/dist/resolution/cooperative-yield.d.ts.map +1 -0
- package/lib/dist/resolution/cooperative-yield.js +42 -0
- package/lib/dist/resolution/cooperative-yield.js.map +1 -0
- package/lib/dist/resolution/frameworks/astro.d.ts +9 -0
- package/lib/dist/resolution/frameworks/astro.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/astro.js +169 -0
- package/lib/dist/resolution/frameworks/astro.js.map +1 -0
- package/lib/dist/resolution/frameworks/cargo-workspace.d.ts +18 -0
- package/lib/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/cargo-workspace.js +225 -0
- package/lib/dist/resolution/frameworks/cargo-workspace.js.map +1 -0
- package/lib/dist/resolution/frameworks/cics.d.ts +20 -0
- package/lib/dist/resolution/frameworks/cics.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/cics.js +90 -0
- package/lib/dist/resolution/frameworks/cics.js.map +1 -0
- package/lib/dist/resolution/frameworks/csharp.d.ts +8 -0
- package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/csharp.js +241 -0
- package/lib/dist/resolution/frameworks/csharp.js.map +1 -0
- package/lib/dist/resolution/frameworks/drupal.d.ts +51 -0
- package/lib/dist/resolution/frameworks/drupal.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/drupal.js +367 -0
- package/lib/dist/resolution/frameworks/drupal.js.map +1 -0
- package/lib/dist/resolution/frameworks/expo-modules.d.ts +3 -0
- package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/expo-modules.js +148 -0
- package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -0
- package/lib/dist/resolution/frameworks/express.d.ts +8 -0
- package/lib/dist/resolution/frameworks/express.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/express.js +308 -0
- package/lib/dist/resolution/frameworks/express.js.map +1 -0
- package/lib/dist/resolution/frameworks/fabric.d.ts +3 -0
- package/lib/dist/resolution/frameworks/fabric.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/fabric.js +354 -0
- package/lib/dist/resolution/frameworks/fabric.js.map +1 -0
- package/lib/dist/resolution/frameworks/go.d.ts +8 -0
- package/lib/dist/resolution/frameworks/go.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/go.js +161 -0
- package/lib/dist/resolution/frameworks/go.js.map +1 -0
- package/lib/dist/resolution/frameworks/goframe.d.ts +41 -0
- package/lib/dist/resolution/frameworks/goframe.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/goframe.js +112 -0
- package/lib/dist/resolution/frameworks/goframe.js.map +1 -0
- package/lib/dist/resolution/frameworks/index.d.ts +50 -0
- package/lib/dist/resolution/frameworks/index.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/index.js +175 -0
- package/lib/dist/resolution/frameworks/index.js.map +1 -0
- package/lib/dist/resolution/frameworks/java.d.ts +8 -0
- package/lib/dist/resolution/frameworks/java.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/java.js +517 -0
- package/lib/dist/resolution/frameworks/java.js.map +1 -0
- package/lib/dist/resolution/frameworks/laravel.d.ts +13 -0
- package/lib/dist/resolution/frameworks/laravel.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/laravel.js +257 -0
- package/lib/dist/resolution/frameworks/laravel.js.map +1 -0
- package/lib/dist/resolution/frameworks/nestjs.d.ts +26 -0
- package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/nestjs.js +698 -0
- package/lib/dist/resolution/frameworks/nestjs.js.map +1 -0
- package/lib/dist/resolution/frameworks/play.d.ts +19 -0
- package/lib/dist/resolution/frameworks/play.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/play.js +111 -0
- package/lib/dist/resolution/frameworks/play.js.map +1 -0
- package/lib/dist/resolution/frameworks/python.d.ts +10 -0
- package/lib/dist/resolution/frameworks/python.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/python.js +400 -0
- package/lib/dist/resolution/frameworks/python.js.map +1 -0
- package/lib/dist/resolution/frameworks/react-native.d.ts +3 -0
- package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/react-native.js +410 -0
- package/lib/dist/resolution/frameworks/react-native.js.map +1 -0
- package/lib/dist/resolution/frameworks/react.d.ts +8 -0
- package/lib/dist/resolution/frameworks/react.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/react.js +334 -0
- package/lib/dist/resolution/frameworks/react.js.map +1 -0
- package/lib/dist/resolution/frameworks/ruby.d.ts +8 -0
- package/lib/dist/resolution/frameworks/ruby.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/ruby.js +302 -0
- package/lib/dist/resolution/frameworks/ruby.js.map +1 -0
- package/lib/dist/resolution/frameworks/rust.d.ts +8 -0
- package/lib/dist/resolution/frameworks/rust.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/rust.js +304 -0
- package/lib/dist/resolution/frameworks/rust.js.map +1 -0
- package/lib/dist/resolution/frameworks/svelte.d.ts +9 -0
- package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/svelte.js +253 -0
- package/lib/dist/resolution/frameworks/svelte.js.map +1 -0
- package/lib/dist/resolution/frameworks/swift-objc.d.ts +37 -0
- package/lib/dist/resolution/frameworks/swift-objc.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/swift-objc.js +252 -0
- package/lib/dist/resolution/frameworks/swift-objc.js.map +1 -0
- package/lib/dist/resolution/frameworks/swift.d.ts +10 -0
- package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/swift.js +400 -0
- package/lib/dist/resolution/frameworks/swift.js.map +1 -0
- package/lib/dist/resolution/frameworks/terraform.d.ts +38 -0
- package/lib/dist/resolution/frameworks/terraform.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/terraform.js +277 -0
- package/lib/dist/resolution/frameworks/terraform.js.map +1 -0
- package/lib/dist/resolution/frameworks/vue.d.ts +9 -0
- package/lib/dist/resolution/frameworks/vue.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/vue.js +303 -0
- package/lib/dist/resolution/frameworks/vue.js.map +1 -0
- package/lib/dist/resolution/go-module.d.ts +26 -0
- package/lib/dist/resolution/go-module.d.ts.map +1 -0
- package/lib/dist/resolution/go-module.js +78 -0
- package/lib/dist/resolution/go-module.js.map +1 -0
- package/lib/dist/resolution/goframe-synthesizer.d.ts +28 -0
- package/lib/dist/resolution/goframe-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/goframe-synthesizer.js +158 -0
- package/lib/dist/resolution/goframe-synthesizer.js.map +1 -0
- package/lib/dist/resolution/import-resolver.d.ts +85 -0
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -0
- package/lib/dist/resolution/import-resolver.js +1974 -0
- package/lib/dist/resolution/import-resolver.js.map +1 -0
- package/lib/dist/resolution/index.d.ts +238 -0
- package/lib/dist/resolution/index.d.ts.map +1 -0
- package/lib/dist/resolution/index.js +1633 -0
- package/lib/dist/resolution/index.js.map +1 -0
- package/lib/dist/resolution/lru-cache.d.ts +24 -0
- package/lib/dist/resolution/lru-cache.d.ts.map +1 -0
- package/lib/dist/resolution/lru-cache.js +62 -0
- package/lib/dist/resolution/lru-cache.js.map +1 -0
- package/lib/dist/resolution/name-matcher.d.ts +112 -0
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -0
- package/lib/dist/resolution/name-matcher.js +1701 -0
- package/lib/dist/resolution/name-matcher.js.map +1 -0
- package/lib/dist/resolution/path-aliases.d.ts +68 -0
- package/lib/dist/resolution/path-aliases.d.ts.map +1 -0
- package/lib/dist/resolution/path-aliases.js +238 -0
- package/lib/dist/resolution/path-aliases.js.map +1 -0
- package/lib/dist/resolution/strip-comments.d.ts +27 -0
- package/lib/dist/resolution/strip-comments.d.ts.map +1 -0
- package/lib/dist/resolution/strip-comments.js +492 -0
- package/lib/dist/resolution/strip-comments.js.map +1 -0
- package/lib/dist/resolution/swift-objc-bridge.d.ts +134 -0
- package/lib/dist/resolution/swift-objc-bridge.d.ts.map +1 -0
- package/lib/dist/resolution/swift-objc-bridge.js +256 -0
- package/lib/dist/resolution/swift-objc-bridge.js.map +1 -0
- package/lib/dist/resolution/types.d.ts +253 -0
- package/lib/dist/resolution/types.d.ts.map +1 -0
- package/lib/dist/resolution/types.js +8 -0
- package/lib/dist/resolution/types.js.map +1 -0
- package/lib/dist/resolution/workspace-packages.d.ts +58 -0
- package/lib/dist/resolution/workspace-packages.d.ts.map +1 -0
- package/lib/dist/resolution/workspace-packages.js +346 -0
- package/lib/dist/resolution/workspace-packages.js.map +1 -0
- package/lib/dist/search/identifier-segments.d.ts +60 -0
- package/lib/dist/search/identifier-segments.d.ts.map +1 -0
- package/lib/dist/search/identifier-segments.js +176 -0
- package/lib/dist/search/identifier-segments.js.map +1 -0
- package/lib/dist/search/query-parser.d.ts +57 -0
- package/lib/dist/search/query-parser.d.ts.map +1 -0
- package/lib/dist/search/query-parser.js +177 -0
- package/lib/dist/search/query-parser.js.map +1 -0
- package/lib/dist/search/query-utils.d.ts +87 -0
- package/lib/dist/search/query-utils.d.ts.map +1 -0
- package/lib/dist/search/query-utils.js +449 -0
- package/lib/dist/search/query-utils.js.map +1 -0
- package/lib/dist/sync/git-hooks.d.ts +45 -0
- package/lib/dist/sync/git-hooks.d.ts.map +1 -0
- package/lib/dist/sync/git-hooks.js +227 -0
- package/lib/dist/sync/git-hooks.js.map +1 -0
- package/lib/dist/sync/index.d.ts +19 -0
- package/lib/dist/sync/index.d.ts.map +1 -0
- package/lib/dist/sync/index.js +35 -0
- package/lib/dist/sync/index.js.map +1 -0
- package/lib/dist/sync/watch-policy.d.ts +48 -0
- package/lib/dist/sync/watch-policy.d.ts.map +1 -0
- package/lib/dist/sync/watch-policy.js +124 -0
- package/lib/dist/sync/watch-policy.js.map +1 -0
- package/lib/dist/sync/watcher.d.ts +355 -0
- package/lib/dist/sync/watcher.d.ts.map +1 -0
- package/lib/dist/sync/watcher.js +848 -0
- package/lib/dist/sync/watcher.js.map +1 -0
- package/lib/dist/sync/worktree.d.ts +63 -0
- package/lib/dist/sync/worktree.d.ts.map +1 -0
- package/lib/dist/sync/worktree.js +182 -0
- package/lib/dist/sync/worktree.js.map +1 -0
- package/lib/dist/telemetry/index.d.ts +143 -0
- package/lib/dist/telemetry/index.d.ts.map +1 -0
- package/lib/dist/telemetry/index.js +541 -0
- package/lib/dist/telemetry/index.js.map +1 -0
- package/lib/dist/types.d.ts +415 -0
- package/lib/dist/types.d.ts.map +1 -0
- package/lib/dist/types.js +91 -0
- package/lib/dist/types.js.map +1 -0
- package/lib/dist/ui/glyphs.d.ts +42 -0
- package/lib/dist/ui/glyphs.d.ts.map +1 -0
- package/lib/dist/ui/glyphs.js +78 -0
- package/lib/dist/ui/glyphs.js.map +1 -0
- package/lib/dist/ui/shimmer-progress.d.ts +11 -0
- package/lib/dist/ui/shimmer-progress.d.ts.map +1 -0
- package/lib/dist/ui/shimmer-progress.js +90 -0
- package/lib/dist/ui/shimmer-progress.js.map +1 -0
- package/lib/dist/ui/shimmer-worker.d.ts +2 -0
- package/lib/dist/ui/shimmer-worker.d.ts.map +1 -0
- package/lib/dist/ui/shimmer-worker.js +118 -0
- package/lib/dist/ui/shimmer-worker.js.map +1 -0
- package/lib/dist/ui/types.d.ts +17 -0
- package/lib/dist/ui/types.d.ts.map +1 -0
- package/lib/dist/ui/types.js +3 -0
- package/lib/dist/ui/types.js.map +1 -0
- package/lib/dist/upgrade/index.d.ts +132 -0
- package/lib/dist/upgrade/index.d.ts.map +1 -0
- package/lib/dist/upgrade/index.js +498 -0
- package/lib/dist/upgrade/index.js.map +1 -0
- package/lib/dist/utils.d.ts +224 -0
- package/lib/dist/utils.d.ts.map +1 -0
- package/lib/dist/utils.js +583 -0
- package/lib/dist/utils.js.map +1 -0
- package/lib/node_modules/.package-lock.json +125 -0
- package/lib/node_modules/@clack/core/CHANGELOG.md +348 -0
- package/lib/node_modules/@clack/core/LICENSE +9 -0
- package/lib/node_modules/@clack/core/README.md +22 -0
- package/lib/node_modules/@clack/core/dist/index.d.mts +363 -0
- package/lib/node_modules/@clack/core/dist/index.mjs +17 -0
- package/lib/node_modules/@clack/core/dist/index.mjs.map +1 -0
- package/lib/node_modules/@clack/core/package.json +63 -0
- package/lib/node_modules/@clack/prompts/CHANGELOG.md +591 -0
- package/lib/node_modules/@clack/prompts/LICENSE +9 -0
- package/lib/node_modules/@clack/prompts/README.md +375 -0
- package/lib/node_modules/@clack/prompts/dist/index.d.mts +396 -0
- package/lib/node_modules/@clack/prompts/dist/index.mjs +144 -0
- package/lib/node_modules/@clack/prompts/dist/index.mjs.map +1 -0
- package/lib/node_modules/@clack/prompts/package.json +68 -0
- package/lib/node_modules/commander/LICENSE +22 -0
- package/lib/node_modules/commander/Readme.md +1176 -0
- package/lib/node_modules/commander/esm.mjs +16 -0
- package/lib/node_modules/commander/index.js +24 -0
- package/lib/node_modules/commander/lib/argument.js +150 -0
- package/lib/node_modules/commander/lib/command.js +2777 -0
- package/lib/node_modules/commander/lib/error.js +39 -0
- package/lib/node_modules/commander/lib/help.js +747 -0
- package/lib/node_modules/commander/lib/option.js +380 -0
- package/lib/node_modules/commander/lib/suggestSimilar.js +101 -0
- package/lib/node_modules/commander/package-support.json +19 -0
- package/lib/node_modules/commander/package.json +82 -0
- package/lib/node_modules/commander/typings/esm.d.mts +3 -0
- package/lib/node_modules/commander/typings/index.d.ts +1113 -0
- package/lib/node_modules/fast-string-truncated-width/dist/index.d.ts +4 -0
- package/lib/node_modules/fast-string-truncated-width/dist/index.js +111 -0
- package/lib/node_modules/fast-string-truncated-width/dist/types.d.ts +19 -0
- package/lib/node_modules/fast-string-truncated-width/dist/types.js +2 -0
- package/lib/node_modules/fast-string-truncated-width/dist/utils.d.ts +4 -0
- package/lib/node_modules/fast-string-truncated-width/dist/utils.js +20 -0
- package/lib/node_modules/fast-string-truncated-width/license +21 -0
- package/lib/node_modules/fast-string-truncated-width/package.json +35 -0
- package/lib/node_modules/fast-string-truncated-width/readme.md +59 -0
- package/lib/node_modules/fast-string-width/dist/index.d.ts +4 -0
- package/lib/node_modules/fast-string-width/dist/index.js +14 -0
- package/lib/node_modules/fast-string-width/license +21 -0
- package/lib/node_modules/fast-string-width/package.json +34 -0
- package/lib/node_modules/fast-string-width/readme.md +42 -0
- package/lib/node_modules/fast-wrap-ansi/LICENSE +23 -0
- package/lib/node_modules/fast-wrap-ansi/README.md +26 -0
- package/lib/node_modules/fast-wrap-ansi/lib/main.d.ts +6 -0
- package/lib/node_modules/fast-wrap-ansi/lib/main.js +219 -0
- package/lib/node_modules/fast-wrap-ansi/lib/main.js.map +1 -0
- package/lib/node_modules/fast-wrap-ansi/package.json +51 -0
- package/lib/node_modules/ignore/LICENSE-MIT +21 -0
- package/lib/node_modules/ignore/README.md +452 -0
- package/lib/node_modules/ignore/index.d.ts +81 -0
- package/lib/node_modules/ignore/index.js +784 -0
- package/lib/node_modules/ignore/legacy.js +681 -0
- package/lib/node_modules/ignore/package.json +87 -0
- package/lib/node_modules/jsonc-parser/CHANGELOG.md +76 -0
- package/lib/node_modules/jsonc-parser/LICENSE.md +21 -0
- package/lib/node_modules/jsonc-parser/README.md +364 -0
- package/lib/node_modules/jsonc-parser/SECURITY.md +41 -0
- package/lib/node_modules/jsonc-parser/lib/esm/impl/edit.js +185 -0
- package/lib/node_modules/jsonc-parser/lib/esm/impl/format.js +261 -0
- package/lib/node_modules/jsonc-parser/lib/esm/impl/parser.js +659 -0
- package/lib/node_modules/jsonc-parser/lib/esm/impl/scanner.js +443 -0
- package/lib/node_modules/jsonc-parser/lib/esm/impl/string-intern.js +29 -0
- package/lib/node_modules/jsonc-parser/lib/esm/main.d.ts +351 -0
- package/lib/node_modules/jsonc-parser/lib/esm/main.js +178 -0
- package/lib/node_modules/jsonc-parser/lib/umd/impl/edit.js +201 -0
- package/lib/node_modules/jsonc-parser/lib/umd/impl/format.js +275 -0
- package/lib/node_modules/jsonc-parser/lib/umd/impl/parser.js +682 -0
- package/lib/node_modules/jsonc-parser/lib/umd/impl/scanner.js +456 -0
- package/lib/node_modules/jsonc-parser/lib/umd/impl/string-intern.js +42 -0
- package/lib/node_modules/jsonc-parser/lib/umd/main.d.ts +351 -0
- package/lib/node_modules/jsonc-parser/lib/umd/main.js +194 -0
- package/lib/node_modules/jsonc-parser/package.json +37 -0
- package/lib/node_modules/picomatch/LICENSE +21 -0
- package/lib/node_modules/picomatch/README.md +738 -0
- package/lib/node_modules/picomatch/index.js +17 -0
- package/lib/node_modules/picomatch/lib/constants.js +180 -0
- package/lib/node_modules/picomatch/lib/parse.js +1085 -0
- package/lib/node_modules/picomatch/lib/picomatch.js +341 -0
- package/lib/node_modules/picomatch/lib/scan.js +391 -0
- package/lib/node_modules/picomatch/lib/utils.js +72 -0
- package/lib/node_modules/picomatch/package.json +83 -0
- package/lib/node_modules/picomatch/posix.js +3 -0
- package/lib/node_modules/sisteransi/license +21 -0
- package/lib/node_modules/sisteransi/package.json +34 -0
- package/lib/node_modules/sisteransi/readme.md +113 -0
- package/lib/node_modules/sisteransi/src/index.js +58 -0
- package/lib/node_modules/sisteransi/src/sisteransi.d.ts +35 -0
- package/lib/node_modules/tree-sitter-wasms/LICENSE +24 -0
- package/lib/node_modules/tree-sitter-wasms/README.md +23 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-bash.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-c.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-c_sharp.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-cpp.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-css.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-dart.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-elisp.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-elixir.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-elm.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-embedded_template.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-go.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-html.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-java.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-javascript.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-json.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-kotlin.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-lua.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-objc.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-ocaml.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-php.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-python.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-ql.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-rescript.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-ruby.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-rust.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-scala.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-solidity.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-swift.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-systemrdl.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-tlaplus.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-toml.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-tsx.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-typescript.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-vue.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-yaml.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-zig.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/package.json +64 -0
- package/lib/node_modules/web-tree-sitter/LICENSE +21 -0
- package/lib/node_modules/web-tree-sitter/README.md +269 -0
- package/lib/node_modules/web-tree-sitter/debug/tree-sitter.cjs +4558 -0
- package/lib/node_modules/web-tree-sitter/debug/tree-sitter.cjs.map +7 -0
- package/lib/node_modules/web-tree-sitter/debug/tree-sitter.js +4516 -0
- package/lib/node_modules/web-tree-sitter/debug/tree-sitter.js.map +7 -0
- package/lib/node_modules/web-tree-sitter/debug/tree-sitter.wasm +0 -0
- package/lib/node_modules/web-tree-sitter/debug/tree-sitter.wasm.map +31 -0
- package/lib/node_modules/web-tree-sitter/lib/alloc.c +48 -0
- package/lib/node_modules/web-tree-sitter/lib/alloc.h +41 -0
- package/lib/node_modules/web-tree-sitter/lib/array.h +291 -0
- package/lib/node_modules/web-tree-sitter/lib/atomic.h +68 -0
- package/lib/node_modules/web-tree-sitter/lib/clock.h +146 -0
- package/lib/node_modules/web-tree-sitter/lib/error_costs.h +11 -0
- package/lib/node_modules/web-tree-sitter/lib/get_changed_ranges.c +523 -0
- package/lib/node_modules/web-tree-sitter/lib/get_changed_ranges.h +36 -0
- package/lib/node_modules/web-tree-sitter/lib/host.h +21 -0
- package/lib/node_modules/web-tree-sitter/lib/language.c +293 -0
- package/lib/node_modules/web-tree-sitter/lib/language.h +293 -0
- package/lib/node_modules/web-tree-sitter/lib/length.h +52 -0
- package/lib/node_modules/web-tree-sitter/lib/lexer.c +483 -0
- package/lib/node_modules/web-tree-sitter/lib/lexer.h +54 -0
- package/lib/node_modules/web-tree-sitter/lib/lib.c +12 -0
- package/lib/node_modules/web-tree-sitter/lib/node.c +875 -0
- package/lib/node_modules/web-tree-sitter/lib/parser.c +2297 -0
- package/lib/node_modules/web-tree-sitter/lib/parser.h +286 -0
- package/lib/node_modules/web-tree-sitter/lib/point.h +48 -0
- package/lib/node_modules/web-tree-sitter/lib/query.c +4347 -0
- package/lib/node_modules/web-tree-sitter/lib/reduce_action.h +34 -0
- package/lib/node_modules/web-tree-sitter/lib/reusable_node.h +95 -0
- package/lib/node_modules/web-tree-sitter/lib/stack.c +912 -0
- package/lib/node_modules/web-tree-sitter/lib/stack.h +133 -0
- package/lib/node_modules/web-tree-sitter/lib/subtree.c +1034 -0
- package/lib/node_modules/web-tree-sitter/lib/subtree.h +399 -0
- package/lib/node_modules/web-tree-sitter/lib/tree-sitter.c +987 -0
- package/lib/node_modules/web-tree-sitter/lib/tree-sitter.cjs +2988 -0
- package/lib/node_modules/web-tree-sitter/lib/tree-sitter.wasm +0 -0
- package/lib/node_modules/web-tree-sitter/lib/tree-sitter.wasm.map +1 -0
- package/lib/node_modules/web-tree-sitter/lib/tree.c +170 -0
- package/lib/node_modules/web-tree-sitter/lib/tree.h +31 -0
- package/lib/node_modules/web-tree-sitter/lib/tree_cursor.c +716 -0
- package/lib/node_modules/web-tree-sitter/lib/tree_cursor.h +48 -0
- package/lib/node_modules/web-tree-sitter/lib/ts_assert.h +11 -0
- package/lib/node_modules/web-tree-sitter/lib/unicode.h +75 -0
- package/lib/node_modules/web-tree-sitter/lib/wasm_store.c +1937 -0
- package/lib/node_modules/web-tree-sitter/lib/wasm_store.h +31 -0
- package/lib/node_modules/web-tree-sitter/package.json +98 -0
- package/lib/node_modules/web-tree-sitter/src/bindings.ts +26 -0
- package/lib/node_modules/web-tree-sitter/src/constants.ts +133 -0
- package/lib/node_modules/web-tree-sitter/src/index.ts +31 -0
- package/lib/node_modules/web-tree-sitter/src/language.ts +291 -0
- package/lib/node_modules/web-tree-sitter/src/lookahead_iterator.ts +75 -0
- package/lib/node_modules/web-tree-sitter/src/marshal.ts +176 -0
- package/lib/node_modules/web-tree-sitter/src/node.ts +646 -0
- package/lib/node_modules/web-tree-sitter/src/parser.ts +325 -0
- package/lib/node_modules/web-tree-sitter/src/query.ts +973 -0
- package/lib/node_modules/web-tree-sitter/src/tree.ts +145 -0
- package/lib/node_modules/web-tree-sitter/src/tree_cursor.ts +318 -0
- package/lib/node_modules/web-tree-sitter/tree-sitter.cjs +4031 -0
- package/lib/node_modules/web-tree-sitter/tree-sitter.cjs.map +7 -0
- package/lib/node_modules/web-tree-sitter/tree-sitter.js +3980 -0
- package/lib/node_modules/web-tree-sitter/tree-sitter.js.map +7 -0
- package/lib/node_modules/web-tree-sitter/tree-sitter.wasm +0 -0
- package/lib/node_modules/web-tree-sitter/tree-sitter.wasm.map +30 -0
- package/lib/node_modules/web-tree-sitter/web-tree-sitter.d.ts +1030 -0
- package/lib/node_modules/web-tree-sitter/web-tree-sitter.d.ts.map +56 -0
- package/lib/package.json +64 -0
- package/node +0 -0
- package/package.json +17 -0
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Terraform Framework Resolver
|
|
4
|
+
*
|
|
5
|
+
* Terraform's scoping rule is narrow and directory-shaped: `var.X`,
|
|
6
|
+
* `local.X`, `module.M`, and resource/data references resolve ONLY inside
|
|
7
|
+
* the same module directory as the reference site. The generic name matcher
|
|
8
|
+
* resolves by qualified-name alone, so a reference to `var.project_id` from
|
|
9
|
+
* `modules/net-vpc/main.tf` could bind to a `variable "project_id"` declared
|
|
10
|
+
* in an unrelated module — a wrong cross-module edge that poisons impact
|
|
11
|
+
* analysis. This resolver enforces the real semantics:
|
|
12
|
+
*
|
|
13
|
+
* 1. Same directory as the reference site → resolve (highest confidence).
|
|
14
|
+
* 2. `.tfvars` files additionally walk UP to the nearest ancestor
|
|
15
|
+
* directory declaring the variable (`terraform apply -var-file=envs/prod.tfvars`
|
|
16
|
+
* sets ROOT module variables from a subdirectory).
|
|
17
|
+
* 3. Otherwise: no edge. Terraform cannot reference across sibling module
|
|
18
|
+
* directories, so a non-local candidate is never a correct target.
|
|
19
|
+
*
|
|
20
|
+
* It also bridges the module boundary through `:`-scoped references that
|
|
21
|
+
* only this resolver understands (see the extractor's emitModuleWiring):
|
|
22
|
+
*
|
|
23
|
+
* - `module.M:file` → the entry file of the module's local source
|
|
24
|
+
* directory (an `imports` edge, so a module call connects to the code
|
|
25
|
+
* it instantiates).
|
|
26
|
+
* - `module.M:var.<in>` → the child module's `variable "<in>"` node —
|
|
27
|
+
* the module block sets that variable, so "what depends on the child's
|
|
28
|
+
* var.cidr" reaches every caller.
|
|
29
|
+
* - `module.M:output.<o>` → the child module's `output "<o>"` node —
|
|
30
|
+
* `module.M.o` uses flow through to the output's definition instead of
|
|
31
|
+
* dead-ending at the module declaration.
|
|
32
|
+
*
|
|
33
|
+
* The module's `source` is re-read from the declaration's file (cached
|
|
34
|
+
* lines); only local `./`/`../` sources bridge. Registry/git sources stay
|
|
35
|
+
* unresolved — an out-of-repo module is a visible boundary, never a guess.
|
|
36
|
+
*/
|
|
37
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
38
|
+
if (k2 === undefined) k2 = k;
|
|
39
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
40
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
41
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
42
|
+
}
|
|
43
|
+
Object.defineProperty(o, k2, desc);
|
|
44
|
+
}) : (function(o, m, k, k2) {
|
|
45
|
+
if (k2 === undefined) k2 = k;
|
|
46
|
+
o[k2] = m[k];
|
|
47
|
+
}));
|
|
48
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
49
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
50
|
+
}) : function(o, v) {
|
|
51
|
+
o["default"] = v;
|
|
52
|
+
});
|
|
53
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
54
|
+
var ownKeys = function(o) {
|
|
55
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
56
|
+
var ar = [];
|
|
57
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
58
|
+
return ar;
|
|
59
|
+
};
|
|
60
|
+
return ownKeys(o);
|
|
61
|
+
};
|
|
62
|
+
return function (mod) {
|
|
63
|
+
if (mod && mod.__esModule) return mod;
|
|
64
|
+
var result = {};
|
|
65
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
66
|
+
__setModuleDefault(result, mod);
|
|
67
|
+
return result;
|
|
68
|
+
};
|
|
69
|
+
})();
|
|
70
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
71
|
+
exports.terraformResolver = void 0;
|
|
72
|
+
const path = __importStar(require("path"));
|
|
73
|
+
/** `module.M:file` / `module.M:var.X` / `module.M:output.X` / `module.M:remote-output.X` — extractor-emitted scoped refs. */
|
|
74
|
+
const SCOPED_REF = /^module\.([^.:\s]+):(file$|var\.|output\.|remote-output\.)/;
|
|
75
|
+
exports.terraformResolver = {
|
|
76
|
+
name: 'terraform',
|
|
77
|
+
languages: ['terraform'],
|
|
78
|
+
detect(context) {
|
|
79
|
+
return context.getAllFiles().some((f) => f.endsWith('.tf') || f.endsWith('.tfvars') || f.endsWith('.tofu'));
|
|
80
|
+
},
|
|
81
|
+
// Scoped refs name no declared symbol; opt them through the resolver's
|
|
82
|
+
// name-exists pre-filter so they reach resolve() at all.
|
|
83
|
+
claimsReference(name) {
|
|
84
|
+
return SCOPED_REF.test(name);
|
|
85
|
+
},
|
|
86
|
+
resolve(ref, context) {
|
|
87
|
+
if (ref.language !== 'terraform')
|
|
88
|
+
return null;
|
|
89
|
+
const qname = ref.referenceName;
|
|
90
|
+
const refDir = dirOf(ref.filePath);
|
|
91
|
+
// --- module-boundary bridge: module.M:file / module.M:var.X / module.M:output.X ---
|
|
92
|
+
const scoped = qname.match(/^module\.([^.:\s]+):(.+)$/);
|
|
93
|
+
if (scoped) {
|
|
94
|
+
return resolveScopedModuleRef(ref, scoped[1], scoped[2], refDir, context);
|
|
95
|
+
}
|
|
96
|
+
const candidates = context.getNodesByQualifiedName(qname);
|
|
97
|
+
if (candidates.length === 0)
|
|
98
|
+
return null;
|
|
99
|
+
// 1. Same directory — the only scope Terraform can actually reference.
|
|
100
|
+
const sameDir = candidates.filter((c) => dirOf(c.filePath) === refDir);
|
|
101
|
+
if (sameDir.length > 0) {
|
|
102
|
+
return {
|
|
103
|
+
original: ref,
|
|
104
|
+
targetNodeId: sameDir[0].id,
|
|
105
|
+
confidence: 0.95,
|
|
106
|
+
resolvedBy: 'framework',
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
// 2. `.tfvars` assignments set ROOT module variables, and var-files are
|
|
110
|
+
// routinely kept in a subdirectory (`envs/prod.tfvars`). Walk up to
|
|
111
|
+
// the nearest ancestor directory that declares the variable.
|
|
112
|
+
if (ref.filePath.endsWith('.tfvars') && qname.startsWith('var.')) {
|
|
113
|
+
const up = nearestAncestorMatch(candidates, refDir);
|
|
114
|
+
if (up) {
|
|
115
|
+
return { original: ref, targetNodeId: up.id, confidence: 0.9, resolvedBy: 'framework' };
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
// 2b. Provider configurations are the one construct Terraform inherits
|
|
119
|
+
// across the module tree: they're declared in the root (or a parent)
|
|
120
|
+
// module and passed down, so `provider = aws.east` inside a child
|
|
121
|
+
// module legitimately names a configuration declared above it.
|
|
122
|
+
if (qname.startsWith('provider.')) {
|
|
123
|
+
const configs = candidates.filter((c) => c.kind === 'namespace');
|
|
124
|
+
const up = nearestAncestorMatch(configs, refDir);
|
|
125
|
+
if (up) {
|
|
126
|
+
return { original: ref, targetNodeId: up.id, confidence: 0.9, resolvedBy: 'framework' };
|
|
127
|
+
}
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
// 3. No same-directory declaration → no edge. A candidate in another
|
|
131
|
+
// module directory is never the real target (cross-module access only
|
|
132
|
+
// exists through module.M inputs/outputs, bridged above), and a wrong
|
|
133
|
+
// edge is worse than none.
|
|
134
|
+
return null;
|
|
135
|
+
},
|
|
136
|
+
};
|
|
137
|
+
/** Nearest candidate walking UP the directory tree from refDir (exclusive). */
|
|
138
|
+
function nearestAncestorMatch(candidates, refDir) {
|
|
139
|
+
for (let dir = parentOf(refDir); dir !== null; dir = parentOf(dir)) {
|
|
140
|
+
const inDir = candidates.filter((c) => dirOf(c.filePath) === dir);
|
|
141
|
+
if (inDir.length > 0)
|
|
142
|
+
return inDir[0];
|
|
143
|
+
}
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Resolve `module.M:<child>` by locating the `module "M"` declaration in the
|
|
148
|
+
* reference's own directory, reading its `source` attribute, and looking the
|
|
149
|
+
* child symbol up inside that directory.
|
|
150
|
+
*/
|
|
151
|
+
function resolveScopedModuleRef(ref, moduleName, child, refDir, context) {
|
|
152
|
+
const decls = context
|
|
153
|
+
.getNodesByQualifiedName(`module.${moduleName}`)
|
|
154
|
+
.filter((n) => n.kind === 'module');
|
|
155
|
+
if (decls.length === 0)
|
|
156
|
+
return null;
|
|
157
|
+
// Terraform scoping: the declaration lives in the reference's directory.
|
|
158
|
+
const decl = decls.find((d) => dirOf(d.filePath) === refDir) ?? (decls.length === 1 ? decls[0] : null);
|
|
159
|
+
if (!decl)
|
|
160
|
+
return null;
|
|
161
|
+
const source = readModuleAttr(decl, 'source', context);
|
|
162
|
+
if (!source)
|
|
163
|
+
return null;
|
|
164
|
+
// --- cloudposse/atmos remote-state: module.M.outputs.X where M is the
|
|
165
|
+
// stack-config remote-state module reading another COMPONENT's state. The
|
|
166
|
+
// component name is static in the monorepo case (`component = "vpc"` or
|
|
167
|
+
// "eks/cluster"), so bridge to that component directory's own
|
|
168
|
+
// `output "X"` — but only when every gate holds: the module source is the
|
|
169
|
+
// remote-state module, the component is a string literal, and exactly ONE
|
|
170
|
+
// directory in the repo matches the component name and declares that
|
|
171
|
+
// output. Anything dynamic or ambiguous stays a visible boundary.
|
|
172
|
+
if (child.startsWith('remote-output.')) {
|
|
173
|
+
if (!/\/remote-state(\/|$)/.test(source))
|
|
174
|
+
return null;
|
|
175
|
+
let component = readModuleAttr(decl, 'component', context);
|
|
176
|
+
if (!component) {
|
|
177
|
+
// The other half of real-world declarations indirect through a
|
|
178
|
+
// variable with a literal default in the same directory
|
|
179
|
+
// (`component = var.vpc_component_name` + `default = "vpc"`) — the
|
|
180
|
+
// component's declared static wiring. One hop, same literal gate.
|
|
181
|
+
const viaVar = readNodeSpanMatch(decl, /^\s*component\s*=\s*var\.([A-Za-z0-9_-]+)\s*$/, context);
|
|
182
|
+
if (viaVar) {
|
|
183
|
+
const declared = context
|
|
184
|
+
.getNodesByQualifiedName(`var.${viaVar}`)
|
|
185
|
+
.filter((n) => dirOf(n.filePath) === dirOf(decl.filePath));
|
|
186
|
+
if (declared.length === 1) {
|
|
187
|
+
component = readNodeSpanMatch(declared[0], /^\s*default\s*=\s*"([^"]+)"/, context);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
if (!component)
|
|
192
|
+
return null;
|
|
193
|
+
const outName = child.slice('remote-output.'.length);
|
|
194
|
+
const outs = context
|
|
195
|
+
.getNodesByQualifiedName(`output.${outName}`)
|
|
196
|
+
.filter((o) => {
|
|
197
|
+
const d = dirOf(o.filePath);
|
|
198
|
+
return d === component || d.endsWith('/' + component);
|
|
199
|
+
});
|
|
200
|
+
if (outs.length === 0)
|
|
201
|
+
return null;
|
|
202
|
+
const dirs = new Set(outs.map((o) => dirOf(o.filePath)));
|
|
203
|
+
if (dirs.size > 1)
|
|
204
|
+
return null; // two directories claim this component name — never guess
|
|
205
|
+
return { original: ref, targetNodeId: outs[0].id, confidence: 0.9, resolvedBy: 'framework' };
|
|
206
|
+
}
|
|
207
|
+
if (!(source.startsWith('./') || source.startsWith('../'))) {
|
|
208
|
+
// Registry / git / absolute sources are out-of-repo: stay unresolved.
|
|
209
|
+
return null;
|
|
210
|
+
}
|
|
211
|
+
const targetDir = normalizeRel(joinDirs(dirOf(decl.filePath), source));
|
|
212
|
+
if (child === 'file') {
|
|
213
|
+
const tfFiles = context
|
|
214
|
+
.getAllFiles()
|
|
215
|
+
.filter((f) => dirOf(f) === targetDir && (f.endsWith('.tf') || f.endsWith('.tofu')))
|
|
216
|
+
.sort();
|
|
217
|
+
if (tfFiles.length === 0)
|
|
218
|
+
return null;
|
|
219
|
+
const entry = tfFiles.find((f) => f.endsWith('/main.tf') || f === 'main.tf') ?? tfFiles[0];
|
|
220
|
+
const fileNode = context.getNodesInFile(entry).find((n) => n.kind === 'file');
|
|
221
|
+
if (!fileNode)
|
|
222
|
+
return null;
|
|
223
|
+
return { original: ref, targetNodeId: fileNode.id, confidence: 0.95, resolvedBy: 'framework' };
|
|
224
|
+
}
|
|
225
|
+
// child is `var.X` or `output.X` — the child module's own qualified names.
|
|
226
|
+
const target = context
|
|
227
|
+
.getNodesByQualifiedName(child)
|
|
228
|
+
.filter((c) => dirOf(c.filePath) === targetDir);
|
|
229
|
+
if (target.length === 0)
|
|
230
|
+
return null;
|
|
231
|
+
return { original: ref, targetNodeId: target[0].id, confidence: 0.95, resolvedBy: 'framework' };
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* A direct string-literal attribute (`source = "…"`, `component = "…"`) of a
|
|
235
|
+
* module declaration, re-read from its file (project paths are stored
|
|
236
|
+
* relative; node metadata isn't persisted, so the declaration's line span +
|
|
237
|
+
* cached file lines are the durable carrier). Non-literal values (variables,
|
|
238
|
+
* expressions) return null — dynamic wiring is never guessed.
|
|
239
|
+
*/
|
|
240
|
+
function readModuleAttr(decl, name, context) {
|
|
241
|
+
return readNodeSpanMatch(decl, new RegExp(`^\\s*${name}\\s*=\\s*"([^"]+)"`), context);
|
|
242
|
+
}
|
|
243
|
+
/** First capture of `re` across the node's line span, or null. */
|
|
244
|
+
function readNodeSpanMatch(node, re, context) {
|
|
245
|
+
const lines = context.getFileLines?.(node.filePath) ?? context.readFile(node.filePath)?.split('\n') ?? null;
|
|
246
|
+
if (!lines)
|
|
247
|
+
return null;
|
|
248
|
+
const end = Math.min(node.endLine, lines.length);
|
|
249
|
+
for (let i = Math.max(node.startLine - 1, 0); i < end; i++) {
|
|
250
|
+
const m = lines[i].match(re);
|
|
251
|
+
if (m)
|
|
252
|
+
return m[1];
|
|
253
|
+
}
|
|
254
|
+
return null;
|
|
255
|
+
}
|
|
256
|
+
/** Directory of a stored (forward-slash, project-relative) path. */
|
|
257
|
+
function dirOf(p) {
|
|
258
|
+
const d = path.dirname(p);
|
|
259
|
+
return d === '' ? '.' : d;
|
|
260
|
+
}
|
|
261
|
+
/** Parent directory, or null above the project root. */
|
|
262
|
+
function parentOf(dir) {
|
|
263
|
+
if (dir === '.' || dir === '')
|
|
264
|
+
return null;
|
|
265
|
+
const parent = path.dirname(dir);
|
|
266
|
+
return parent === dir ? null : parent;
|
|
267
|
+
}
|
|
268
|
+
/** Join a base directory with a `./`/`../` relative source path. */
|
|
269
|
+
function joinDirs(base, rel) {
|
|
270
|
+
return path.join(base === '.' ? '' : base, rel);
|
|
271
|
+
}
|
|
272
|
+
/** Normalize to the stored path shape: forward slashes, '.' for the root. */
|
|
273
|
+
function normalizeRel(p) {
|
|
274
|
+
const n = path.normalize(p).replace(/\\/g, '/').replace(/\/+$/, '');
|
|
275
|
+
return n === '' ? '.' : n;
|
|
276
|
+
}
|
|
277
|
+
//# sourceMappingURL=terraform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"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AAW;IAC3B,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IAC3C,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACjC,OAAO,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;AACxC,CAAC;AAED,oEAAoE;AACpE,SAAS,QAAQ,CAAC,IAAY,EAAE,GAAW;IACzC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AAClD,CAAC;AAED,6EAA6E;AAC7E,SAAS,YAAY,CAAC,CAAS;IAC7B,MAAM,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACpE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vue / Nuxt Framework Resolver
|
|
3
|
+
*
|
|
4
|
+
* Handles Vue component references, compiler macros (defineProps, etc.),
|
|
5
|
+
* Nuxt auto-imports, and Nuxt file-based routing patterns.
|
|
6
|
+
*/
|
|
7
|
+
import { FrameworkResolver } from '../types';
|
|
8
|
+
export declare const vueResolver: FrameworkResolver;
|
|
9
|
+
//# sourceMappingURL=vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vue.d.ts","sourceRoot":"","sources":["../../../src/resolution/frameworks/vue.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,iBAAiB,EAAiD,MAAM,UAAU,CAAC;AAuE5F,eAAO,MAAM,WAAW,EAAE,iBAyLzB,CAAC"}
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Vue / Nuxt Framework Resolver
|
|
4
|
+
*
|
|
5
|
+
* Handles Vue component references, compiler macros (defineProps, etc.),
|
|
6
|
+
* Nuxt auto-imports, and Nuxt file-based routing patterns.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.vueResolver = void 0;
|
|
10
|
+
/**
|
|
11
|
+
* Vue 3 compiler macros — compiler-provided, not user code
|
|
12
|
+
*/
|
|
13
|
+
const VUE_COMPILER_MACROS = new Set([
|
|
14
|
+
'defineProps',
|
|
15
|
+
'defineEmits',
|
|
16
|
+
'defineExpose',
|
|
17
|
+
'defineOptions',
|
|
18
|
+
'defineSlots',
|
|
19
|
+
'defineModel',
|
|
20
|
+
'withDefaults',
|
|
21
|
+
]);
|
|
22
|
+
/**
|
|
23
|
+
* Nuxt auto-imported composables and utilities
|
|
24
|
+
*/
|
|
25
|
+
const NUXT_AUTO_IMPORTS = new Set([
|
|
26
|
+
// Routing
|
|
27
|
+
'useRoute',
|
|
28
|
+
'useRouter',
|
|
29
|
+
'navigateTo',
|
|
30
|
+
'abortNavigation',
|
|
31
|
+
// Data fetching
|
|
32
|
+
'useFetch',
|
|
33
|
+
'useAsyncData',
|
|
34
|
+
'useLazyFetch',
|
|
35
|
+
'useLazyAsyncData',
|
|
36
|
+
'refreshNuxtData',
|
|
37
|
+
// State
|
|
38
|
+
'useState',
|
|
39
|
+
'clearNuxtState',
|
|
40
|
+
// Head
|
|
41
|
+
'useHead',
|
|
42
|
+
'useSeoMeta',
|
|
43
|
+
'useServerSeoMeta',
|
|
44
|
+
// Runtime
|
|
45
|
+
'useRuntimeConfig',
|
|
46
|
+
'useAppConfig',
|
|
47
|
+
'useNuxtApp',
|
|
48
|
+
// Cookies
|
|
49
|
+
'useCookie',
|
|
50
|
+
// Error
|
|
51
|
+
'useError',
|
|
52
|
+
'createError',
|
|
53
|
+
'showError',
|
|
54
|
+
'clearError',
|
|
55
|
+
// Page/layout
|
|
56
|
+
'definePageMeta',
|
|
57
|
+
'defineNuxtConfig',
|
|
58
|
+
'defineNuxtPlugin',
|
|
59
|
+
'defineNuxtRouteMiddleware',
|
|
60
|
+
// Request
|
|
61
|
+
'useRequestHeaders',
|
|
62
|
+
'useRequestEvent',
|
|
63
|
+
'useRequestFetch',
|
|
64
|
+
'useRequestURL',
|
|
65
|
+
]);
|
|
66
|
+
/**
|
|
67
|
+
* Nuxt virtual module prefixes (auto-import namespaces)
|
|
68
|
+
*/
|
|
69
|
+
const NUXT_VIRTUAL_MODULES = [
|
|
70
|
+
'#imports',
|
|
71
|
+
'#components',
|
|
72
|
+
'#app',
|
|
73
|
+
'#build',
|
|
74
|
+
'#head',
|
|
75
|
+
];
|
|
76
|
+
exports.vueResolver = {
|
|
77
|
+
name: 'vue',
|
|
78
|
+
detect(context) {
|
|
79
|
+
// Check for vue or nuxt in package.json
|
|
80
|
+
const packageJson = context.readFile('package.json');
|
|
81
|
+
if (packageJson) {
|
|
82
|
+
try {
|
|
83
|
+
const pkg = JSON.parse(packageJson);
|
|
84
|
+
const deps = { ...pkg.dependencies, ...pkg.devDependencies };
|
|
85
|
+
if (deps.vue || deps.nuxt || deps['@nuxt/kit']) {
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
// Invalid JSON
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
// Check for .vue files in project
|
|
94
|
+
const allFiles = context.getAllFiles();
|
|
95
|
+
return allFiles.some((f) => f.endsWith('.vue'));
|
|
96
|
+
},
|
|
97
|
+
resolve(ref, context) {
|
|
98
|
+
// Pattern 1: Vue compiler macros (defineProps, defineEmits, etc.)
|
|
99
|
+
if (VUE_COMPILER_MACROS.has(ref.referenceName)) {
|
|
100
|
+
return {
|
|
101
|
+
original: ref,
|
|
102
|
+
targetNodeId: ref.fromNodeId,
|
|
103
|
+
confidence: 1.0,
|
|
104
|
+
resolvedBy: 'framework',
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
// Pattern 2: Nuxt auto-imported composables
|
|
108
|
+
if (NUXT_AUTO_IMPORTS.has(ref.referenceName)) {
|
|
109
|
+
return {
|
|
110
|
+
original: ref,
|
|
111
|
+
targetNodeId: ref.fromNodeId,
|
|
112
|
+
confidence: 1.0,
|
|
113
|
+
resolvedBy: 'framework',
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
// Pattern 3: Nuxt virtual module imports (#imports, #components, etc.)
|
|
117
|
+
if (ref.referenceKind === 'imports' && ref.referenceName.startsWith('#')) {
|
|
118
|
+
if (NUXT_VIRTUAL_MODULES.some((prefix) => ref.referenceName.startsWith(prefix))) {
|
|
119
|
+
return {
|
|
120
|
+
original: ref,
|
|
121
|
+
targetNodeId: ref.fromNodeId,
|
|
122
|
+
confidence: 1.0,
|
|
123
|
+
resolvedBy: 'framework',
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
// Pattern 4: @ alias imports (@/components/Foo -> src/components/Foo)
|
|
128
|
+
if (ref.referenceKind === 'imports' && ref.referenceName.startsWith('@/')) {
|
|
129
|
+
const aliasPath = ref.referenceName.replace('@/', 'src/');
|
|
130
|
+
for (const ext of ['', '.ts', '.js', '.vue', '/index.ts', '/index.js', '/index.vue']) {
|
|
131
|
+
const fullPath = aliasPath + ext;
|
|
132
|
+
if (context.fileExists(fullPath)) {
|
|
133
|
+
const nodes = context.getNodesInFile(fullPath);
|
|
134
|
+
if (nodes.length > 0) {
|
|
135
|
+
return {
|
|
136
|
+
original: ref,
|
|
137
|
+
targetNodeId: nodes[0].id,
|
|
138
|
+
confidence: 0.9,
|
|
139
|
+
resolvedBy: 'framework',
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
// Pattern 5: ~ alias imports (~/components/Foo -> src/components/Foo, Nuxt convention)
|
|
146
|
+
if (ref.referenceKind === 'imports' && ref.referenceName.startsWith('~/')) {
|
|
147
|
+
const aliasPath = ref.referenceName.replace('~/', 'src/');
|
|
148
|
+
for (const ext of ['', '.ts', '.js', '.vue', '/index.ts', '/index.js', '/index.vue']) {
|
|
149
|
+
const fullPath = aliasPath + ext;
|
|
150
|
+
if (context.fileExists(fullPath)) {
|
|
151
|
+
const nodes = context.getNodesInFile(fullPath);
|
|
152
|
+
if (nodes.length > 0) {
|
|
153
|
+
return {
|
|
154
|
+
original: ref,
|
|
155
|
+
targetNodeId: nodes[0].id,
|
|
156
|
+
confidence: 0.9,
|
|
157
|
+
resolvedBy: 'framework',
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
// Pattern 6: Component references (PascalCase) — resolve to .vue files
|
|
164
|
+
if (isPascalCase(ref.referenceName) && ref.referenceKind === 'calls') {
|
|
165
|
+
const result = resolveComponent(ref.referenceName, ref.filePath, context);
|
|
166
|
+
if (result) {
|
|
167
|
+
return {
|
|
168
|
+
original: ref,
|
|
169
|
+
targetNodeId: result,
|
|
170
|
+
confidence: 0.8,
|
|
171
|
+
resolvedBy: 'framework',
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
return null;
|
|
176
|
+
},
|
|
177
|
+
extract(filePath, _content) {
|
|
178
|
+
const nodes = [];
|
|
179
|
+
const now = Date.now();
|
|
180
|
+
// Normalize to forward slashes
|
|
181
|
+
const normalized = filePath.replace(/\\/g, '/');
|
|
182
|
+
// Detect Nuxt page routes (pages/ directory)
|
|
183
|
+
const pagesIndex = normalized.indexOf('/pages/');
|
|
184
|
+
if (pagesIndex !== -1 && normalized.endsWith('.vue')) {
|
|
185
|
+
const routePath = filePathToNuxtRoute(normalized, pagesIndex + '/pages/'.length);
|
|
186
|
+
if (routePath !== null) {
|
|
187
|
+
nodes.push({
|
|
188
|
+
id: `route:${filePath}:${routePath}:1`,
|
|
189
|
+
kind: 'route',
|
|
190
|
+
name: routePath,
|
|
191
|
+
qualifiedName: `${filePath}::route:${routePath}`,
|
|
192
|
+
filePath,
|
|
193
|
+
startLine: 1,
|
|
194
|
+
endLine: 1,
|
|
195
|
+
startColumn: 0,
|
|
196
|
+
endColumn: 0,
|
|
197
|
+
language: 'vue',
|
|
198
|
+
updatedAt: now,
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
// Detect Nuxt API routes (server/api/ directory)
|
|
203
|
+
const apiIndex = normalized.indexOf('/server/api/');
|
|
204
|
+
if (apiIndex !== -1) {
|
|
205
|
+
const afterApi = normalized.substring(apiIndex + '/server/api/'.length);
|
|
206
|
+
const routeName = afterApi
|
|
207
|
+
.replace(/\.[^/.]+$/, '') // Remove extension
|
|
208
|
+
.replace(/\/index$/, ''); // index -> parent path
|
|
209
|
+
const apiRoute = '/api/' + routeName;
|
|
210
|
+
nodes.push({
|
|
211
|
+
id: `route:${filePath}:${apiRoute}:1`,
|
|
212
|
+
kind: 'route',
|
|
213
|
+
name: apiRoute,
|
|
214
|
+
qualifiedName: `${filePath}::route:${apiRoute}`,
|
|
215
|
+
filePath,
|
|
216
|
+
startLine: 1,
|
|
217
|
+
endLine: 1,
|
|
218
|
+
startColumn: 0,
|
|
219
|
+
endColumn: 0,
|
|
220
|
+
language: normalized.endsWith('.vue') ? 'vue' : 'typescript',
|
|
221
|
+
updatedAt: now,
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
// Detect Nuxt middleware (middleware/ directory)
|
|
225
|
+
const middlewareIndex = normalized.indexOf('/middleware/');
|
|
226
|
+
if (middlewareIndex !== -1) {
|
|
227
|
+
const afterMiddleware = normalized.substring(middlewareIndex + '/middleware/'.length);
|
|
228
|
+
const middlewareName = afterMiddleware.replace(/\.[^/.]+$/, '');
|
|
229
|
+
nodes.push({
|
|
230
|
+
id: `middleware:${filePath}:${middlewareName}:1`,
|
|
231
|
+
kind: 'function',
|
|
232
|
+
name: middlewareName,
|
|
233
|
+
qualifiedName: `${filePath}::middleware:${middlewareName}`,
|
|
234
|
+
filePath,
|
|
235
|
+
startLine: 1,
|
|
236
|
+
endLine: 1,
|
|
237
|
+
startColumn: 0,
|
|
238
|
+
endColumn: 0,
|
|
239
|
+
language: normalized.endsWith('.vue') ? 'vue' : 'typescript',
|
|
240
|
+
updatedAt: now,
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
return { nodes, references: [] };
|
|
244
|
+
},
|
|
245
|
+
};
|
|
246
|
+
/**
|
|
247
|
+
* Check if string is PascalCase
|
|
248
|
+
*/
|
|
249
|
+
function isPascalCase(str) {
|
|
250
|
+
return /^[A-Z][a-zA-Z0-9]*$/.test(str);
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Resolve a Vue component reference to its .vue file
|
|
254
|
+
*/
|
|
255
|
+
function resolveComponent(name, fromFile, context) {
|
|
256
|
+
// Collect ALL basename matches first. The previous version returned the
|
|
257
|
+
// FIRST `Button.vue` found anywhere in the tree (its same-directory pass
|
|
258
|
+
// below was unreachable), so a multi-app monorepo with one `Button.vue`
|
|
259
|
+
// per app resolved to an arbitrary one (#764).
|
|
260
|
+
const matches = [];
|
|
261
|
+
for (const file of context.getAllFiles()) {
|
|
262
|
+
if (!file.endsWith('.vue'))
|
|
263
|
+
continue;
|
|
264
|
+
const fileName = file.split(/[/\\]/).pop() || '';
|
|
265
|
+
if (fileName.replace(/\.vue$/, '') === name)
|
|
266
|
+
matches.push(file);
|
|
267
|
+
}
|
|
268
|
+
if (matches.length === 0)
|
|
269
|
+
return null;
|
|
270
|
+
const componentIn = (file) => {
|
|
271
|
+
const nodes = context.getNodesInFile(file);
|
|
272
|
+
const component = nodes.find((n) => n.kind === 'component' && n.name === name);
|
|
273
|
+
return component ? component.id : null;
|
|
274
|
+
};
|
|
275
|
+
// Same directory first for specificity
|
|
276
|
+
const fromDir = fromFile.substring(0, fromFile.lastIndexOf('/'));
|
|
277
|
+
const sameDir = matches.filter((f) => f.startsWith(fromDir));
|
|
278
|
+
if (sameDir.length > 0)
|
|
279
|
+
return componentIn(sameDir[0]);
|
|
280
|
+
// No positional signal: only an UNAMBIGUOUS basename may resolve;
|
|
281
|
+
// ambiguity falls through to the name-matcher's proximity scoring.
|
|
282
|
+
return matches.length === 1 ? componentIn(matches[0]) : null;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Convert a file path to a Nuxt route path
|
|
286
|
+
*/
|
|
287
|
+
function filePathToNuxtRoute(normalized, afterPagesStart) {
|
|
288
|
+
const afterPages = normalized.substring(afterPagesStart);
|
|
289
|
+
// Remove the .vue extension
|
|
290
|
+
const withoutExt = afterPages.replace(/\.vue$/, '');
|
|
291
|
+
// Remove /index suffix (index.vue -> parent route)
|
|
292
|
+
const withoutIndex = withoutExt.replace(/\/index$/, '');
|
|
293
|
+
// Convert Nuxt param syntax [param] to :param
|
|
294
|
+
let route = '/' + withoutIndex
|
|
295
|
+
.replace(/\[\.\.\.([^\]]+)\]/g, '*$1') // [...slug] -> *slug (catch-all)
|
|
296
|
+
.replace(/\[{2}([^\]]+)\]{2}/g, ':$1?') // [[optional]] -> :optional?
|
|
297
|
+
.replace(/\[([^\]]+)\]/g, ':$1'); // [param] -> :param
|
|
298
|
+
if (route === '/')
|
|
299
|
+
return '/';
|
|
300
|
+
// Remove trailing slash
|
|
301
|
+
return route.replace(/\/$/, '');
|
|
302
|
+
}
|
|
303
|
+
//# sourceMappingURL=vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vue.js","sourceRoot":"","sources":["../../../src/resolution/frameworks/vue.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAKH;;GAEG;AACH,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IAClC,aAAa;IACb,aAAa;IACb,cAAc;IACd,eAAe;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AAC,CAAC,CAAC,IAAI,CAAC;AAChE,CAAC;AAED;;GAEG;AACH,SAAS,mBAAmB,CAAC,UAAkB,EAAE,eAAuB;IACtE,MAAM,UAAU,GAAG,UAAU,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IAEzD,4BAA4B;IAC5B,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAEpD,mDAAmD;IACnD,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAExD,8CAA8C;IAC9C,IAAI,KAAK,GAAG,GAAG,GAAG,YAAY;SAC3B,OAAO,CAAC,qBAAqB,EAAE,KAAK,CAAC,CAAE,iCAAiC;SACxE,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,6BAA6B;SACpE,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC,CAAQ,oBAAoB;IAE/D,IAAI,KAAK,KAAK,GAAG;QAAE,OAAO,GAAG,CAAC;IAC9B,wBAAwB;IACxB,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Go module path detection.
|
|
3
|
+
*
|
|
4
|
+
* A Go monorepo's cross-package calls (`pkga.FuncX(...)`) only resolve when
|
|
5
|
+
* the resolver knows the project's module path (the `module ...` directive
|
|
6
|
+
* in `go.mod`). Without it, `isExternalImport` treats every in-module import
|
|
7
|
+
* — `github.com/example/myproject/pkga` — as a third-party package, so
|
|
8
|
+
* resolution falls through to name-matching with path proximity and returns
|
|
9
|
+
* a tiny fraction of the real call sites. See issue #388.
|
|
10
|
+
*/
|
|
11
|
+
export interface GoModule {
|
|
12
|
+
/** The module path declared in `go.mod`, e.g. `github.com/example/myproject` */
|
|
13
|
+
modulePath: string;
|
|
14
|
+
/** Absolute path to the directory containing the `go.mod` file. */
|
|
15
|
+
rootDir: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Read the `go.mod` file at the project root and extract the module path.
|
|
19
|
+
* Returns `null` if no `go.mod` exists or it has no `module` directive.
|
|
20
|
+
*
|
|
21
|
+
* Limitation: only the project-root `go.mod` is read. Nested `go.mod` files
|
|
22
|
+
* (Go workspaces, monorepos with multiple modules) are not yet resolved —
|
|
23
|
+
* a follow-up if a real repro shows up.
|
|
24
|
+
*/
|
|
25
|
+
export declare function loadGoModule(projectRoot: string): GoModule | null;
|
|
26
|
+
//# sourceMappingURL=go-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"go-module.d.ts","sourceRoot":"","sources":["../../src/resolution/go-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,MAAM,WAAW,QAAQ;IACvB,gFAAgF;IAChF,UAAU,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAiBjE"}
|