@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,646 @@
|
|
|
1
|
+
import { INTERNAL, Internal, assertInternal, Point, Edit, SIZE_OF_INT, SIZE_OF_NODE, SIZE_OF_POINT, ZERO_POINT, isPoint, C } from './constants';
|
|
2
|
+
import { getText, Tree } from './tree';
|
|
3
|
+
import { TreeCursor } from './tree_cursor';
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5
|
+
import { Language } from './language';
|
|
6
|
+
import { marshalNode, marshalPoint, unmarshalNode, unmarshalPoint } from './marshal';
|
|
7
|
+
import { TRANSFER_BUFFER } from './parser';
|
|
8
|
+
|
|
9
|
+
/** A single node within a syntax {@link Tree}. */
|
|
10
|
+
export class Node {
|
|
11
|
+
/** @internal */
|
|
12
|
+
// @ts-expect-error: never read
|
|
13
|
+
private [0] = 0; // Internal handle for Wasm
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
private _children?: (Node | null)[];
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
private _namedChildren?: (Node | null)[];
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
constructor(
|
|
23
|
+
internal: Internal,
|
|
24
|
+
{
|
|
25
|
+
id,
|
|
26
|
+
tree,
|
|
27
|
+
startIndex,
|
|
28
|
+
startPosition,
|
|
29
|
+
other,
|
|
30
|
+
}: {
|
|
31
|
+
id: number;
|
|
32
|
+
tree: Tree;
|
|
33
|
+
startIndex: number;
|
|
34
|
+
startPosition: Point;
|
|
35
|
+
other: number;
|
|
36
|
+
}
|
|
37
|
+
) {
|
|
38
|
+
assertInternal(internal);
|
|
39
|
+
this[0] = other;
|
|
40
|
+
this.id = id;
|
|
41
|
+
this.tree = tree;
|
|
42
|
+
this.startIndex = startIndex;
|
|
43
|
+
this.startPosition = startPosition;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The numeric id for this node that is unique.
|
|
48
|
+
*
|
|
49
|
+
* Within a given syntax tree, no two nodes have the same id. However:
|
|
50
|
+
*
|
|
51
|
+
* * If a new tree is created based on an older tree, and a node from the old tree is reused in
|
|
52
|
+
* the process, then that node will have the same id in both trees.
|
|
53
|
+
*
|
|
54
|
+
* * A node not marked as having changes does not guarantee it was reused.
|
|
55
|
+
*
|
|
56
|
+
* * If a node is marked as having changed in the old tree, it will not be reused.
|
|
57
|
+
*/
|
|
58
|
+
id: number;
|
|
59
|
+
|
|
60
|
+
/** The byte index where this node starts. */
|
|
61
|
+
startIndex: number;
|
|
62
|
+
|
|
63
|
+
/** The position where this node starts. */
|
|
64
|
+
startPosition: Point;
|
|
65
|
+
|
|
66
|
+
/** The tree that this node belongs to. */
|
|
67
|
+
tree: Tree;
|
|
68
|
+
|
|
69
|
+
/** Get this node's type as a numerical id. */
|
|
70
|
+
get typeId(): number {
|
|
71
|
+
marshalNode(this);
|
|
72
|
+
return C._ts_node_symbol_wasm(this.tree[0]);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Get the node's type as a numerical id as it appears in the grammar,
|
|
77
|
+
* ignoring aliases.
|
|
78
|
+
*/
|
|
79
|
+
get grammarId(): number {
|
|
80
|
+
marshalNode(this);
|
|
81
|
+
return C._ts_node_grammar_symbol_wasm(this.tree[0]);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** Get this node's type as a string. */
|
|
85
|
+
get type(): string {
|
|
86
|
+
return this.tree.language.types[this.typeId] || 'ERROR';
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Get this node's symbol name as it appears in the grammar, ignoring
|
|
91
|
+
* aliases as a string.
|
|
92
|
+
*/
|
|
93
|
+
get grammarType(): string {
|
|
94
|
+
return this.tree.language.types[this.grammarId] || 'ERROR';
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Check if this node is *named*.
|
|
99
|
+
*
|
|
100
|
+
* Named nodes correspond to named rules in the grammar, whereas
|
|
101
|
+
* *anonymous* nodes correspond to string literals in the grammar.
|
|
102
|
+
*/
|
|
103
|
+
get isNamed(): boolean {
|
|
104
|
+
marshalNode(this);
|
|
105
|
+
return C._ts_node_is_named_wasm(this.tree[0]) === 1;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Check if this node is *extra*.
|
|
110
|
+
*
|
|
111
|
+
* Extra nodes represent things like comments, which are not required
|
|
112
|
+
* by the grammar, but can appear anywhere.
|
|
113
|
+
*/
|
|
114
|
+
get isExtra(): boolean {
|
|
115
|
+
marshalNode(this);
|
|
116
|
+
return C._ts_node_is_extra_wasm(this.tree[0]) === 1;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Check if this node represents a syntax error.
|
|
121
|
+
*
|
|
122
|
+
* Syntax errors represent parts of the code that could not be incorporated
|
|
123
|
+
* into a valid syntax tree.
|
|
124
|
+
*/
|
|
125
|
+
get isError(): boolean {
|
|
126
|
+
marshalNode(this);
|
|
127
|
+
return C._ts_node_is_error_wasm(this.tree[0]) === 1;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Check if this node is *missing*.
|
|
132
|
+
*
|
|
133
|
+
* Missing nodes are inserted by the parser in order to recover from
|
|
134
|
+
* certain kinds of syntax errors.
|
|
135
|
+
*/
|
|
136
|
+
get isMissing(): boolean {
|
|
137
|
+
marshalNode(this);
|
|
138
|
+
return C._ts_node_is_missing_wasm(this.tree[0]) === 1;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/** Check if this node has been edited. */
|
|
142
|
+
get hasChanges(): boolean {
|
|
143
|
+
marshalNode(this);
|
|
144
|
+
return C._ts_node_has_changes_wasm(this.tree[0]) === 1;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Check if this node represents a syntax error or contains any syntax
|
|
149
|
+
* errors anywhere within it.
|
|
150
|
+
*/
|
|
151
|
+
get hasError(): boolean {
|
|
152
|
+
marshalNode(this);
|
|
153
|
+
return C._ts_node_has_error_wasm(this.tree[0]) === 1;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/** Get the byte index where this node ends. */
|
|
157
|
+
get endIndex(): number {
|
|
158
|
+
marshalNode(this);
|
|
159
|
+
return C._ts_node_end_index_wasm(this.tree[0]);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** Get the position where this node ends. */
|
|
163
|
+
get endPosition(): Point {
|
|
164
|
+
marshalNode(this);
|
|
165
|
+
C._ts_node_end_point_wasm(this.tree[0]);
|
|
166
|
+
return unmarshalPoint(TRANSFER_BUFFER);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/** Get the string content of this node. */
|
|
170
|
+
get text(): string {
|
|
171
|
+
return getText(this.tree, this.startIndex, this.endIndex, this.startPosition);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/** Get this node's parse state. */
|
|
175
|
+
get parseState(): number {
|
|
176
|
+
marshalNode(this);
|
|
177
|
+
return C._ts_node_parse_state_wasm(this.tree[0]);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/** Get the parse state after this node. */
|
|
181
|
+
get nextParseState(): number {
|
|
182
|
+
marshalNode(this);
|
|
183
|
+
return C._ts_node_next_parse_state_wasm(this.tree[0]);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/** Check if this node is equal to another node. */
|
|
187
|
+
equals(other: Node): boolean {
|
|
188
|
+
return this.tree === other.tree && this.id === other.id;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Get the node's child at the given index, where zero represents the first child.
|
|
193
|
+
*
|
|
194
|
+
* This method is fairly fast, but its cost is technically log(n), so if
|
|
195
|
+
* you might be iterating over a long list of children, you should use
|
|
196
|
+
* {@link Node#children} instead.
|
|
197
|
+
*/
|
|
198
|
+
child(index: number): Node | null {
|
|
199
|
+
marshalNode(this);
|
|
200
|
+
C._ts_node_child_wasm(this.tree[0], index);
|
|
201
|
+
return unmarshalNode(this.tree);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Get this node's *named* child at the given index.
|
|
206
|
+
*
|
|
207
|
+
* See also {@link Node#isNamed}.
|
|
208
|
+
* This method is fairly fast, but its cost is technically log(n), so if
|
|
209
|
+
* you might be iterating over a long list of children, you should use
|
|
210
|
+
* {@link Node#namedChildren} instead.
|
|
211
|
+
*/
|
|
212
|
+
namedChild(index: number): Node | null {
|
|
213
|
+
marshalNode(this);
|
|
214
|
+
C._ts_node_named_child_wasm(this.tree[0], index);
|
|
215
|
+
return unmarshalNode(this.tree);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Get this node's child with the given numerical field id.
|
|
220
|
+
*
|
|
221
|
+
* See also {@link Node#childForFieldName}. You can
|
|
222
|
+
* convert a field name to an id using {@link Language#fieldIdForName}.
|
|
223
|
+
*/
|
|
224
|
+
childForFieldId(fieldId: number): Node | null {
|
|
225
|
+
marshalNode(this);
|
|
226
|
+
C._ts_node_child_by_field_id_wasm(this.tree[0], fieldId);
|
|
227
|
+
return unmarshalNode(this.tree);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Get the first child with the given field name.
|
|
232
|
+
*
|
|
233
|
+
* If multiple children may have the same field name, access them using
|
|
234
|
+
* {@link Node#childrenForFieldName}.
|
|
235
|
+
*/
|
|
236
|
+
childForFieldName(fieldName: string): Node | null {
|
|
237
|
+
const fieldId = this.tree.language.fields.indexOf(fieldName);
|
|
238
|
+
if (fieldId !== -1) return this.childForFieldId(fieldId);
|
|
239
|
+
return null;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/** Get the field name of this node's child at the given index. */
|
|
243
|
+
fieldNameForChild(index: number): string | null {
|
|
244
|
+
marshalNode(this);
|
|
245
|
+
const address = C._ts_node_field_name_for_child_wasm(this.tree[0], index);
|
|
246
|
+
if (!address) return null;
|
|
247
|
+
return C.AsciiToString(address);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/** Get the field name of this node's named child at the given index. */
|
|
251
|
+
fieldNameForNamedChild(index: number): string | null {
|
|
252
|
+
marshalNode(this);
|
|
253
|
+
const address = C._ts_node_field_name_for_named_child_wasm(this.tree[0], index);
|
|
254
|
+
if (!address) return null;
|
|
255
|
+
return C.AsciiToString(address);
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Get an array of this node's children with a given field name.
|
|
259
|
+
*
|
|
260
|
+
* See also {@link Node#children}.
|
|
261
|
+
*/
|
|
262
|
+
childrenForFieldName(fieldName: string): (Node | null)[] {
|
|
263
|
+
const fieldId = this.tree.language.fields.indexOf(fieldName);
|
|
264
|
+
if (fieldId !== -1 && fieldId !== 0) return this.childrenForFieldId(fieldId);
|
|
265
|
+
return [];
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Get an array of this node's children with a given field id.
|
|
270
|
+
*
|
|
271
|
+
* See also {@link Node#childrenForFieldName}.
|
|
272
|
+
*/
|
|
273
|
+
childrenForFieldId(fieldId: number): (Node | null)[] {
|
|
274
|
+
marshalNode(this);
|
|
275
|
+
C._ts_node_children_by_field_id_wasm(this.tree[0], fieldId);
|
|
276
|
+
const count = C.getValue(TRANSFER_BUFFER, 'i32');
|
|
277
|
+
const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, 'i32');
|
|
278
|
+
const result = new Array<Node | null>(count);
|
|
279
|
+
|
|
280
|
+
if (count > 0) {
|
|
281
|
+
let address = buffer;
|
|
282
|
+
for (let i = 0; i < count; i++) {
|
|
283
|
+
result[i] = unmarshalNode(this.tree, address);
|
|
284
|
+
address += SIZE_OF_NODE;
|
|
285
|
+
}
|
|
286
|
+
C._free(buffer);
|
|
287
|
+
}
|
|
288
|
+
return result;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/** Get the node's first child that contains or starts after the given byte offset. */
|
|
292
|
+
firstChildForIndex(index: number): Node | null {
|
|
293
|
+
marshalNode(this);
|
|
294
|
+
const address = TRANSFER_BUFFER + SIZE_OF_NODE;
|
|
295
|
+
C.setValue(address, index, 'i32');
|
|
296
|
+
C._ts_node_first_child_for_byte_wasm(this.tree[0]);
|
|
297
|
+
return unmarshalNode(this.tree);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/** Get the node's first named child that contains or starts after the given byte offset. */
|
|
301
|
+
firstNamedChildForIndex(index: number): Node | null {
|
|
302
|
+
marshalNode(this);
|
|
303
|
+
const address = TRANSFER_BUFFER + SIZE_OF_NODE;
|
|
304
|
+
C.setValue(address, index, 'i32');
|
|
305
|
+
C._ts_node_first_named_child_for_byte_wasm(this.tree[0]);
|
|
306
|
+
return unmarshalNode(this.tree);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/** Get this node's number of children. */
|
|
310
|
+
get childCount(): number {
|
|
311
|
+
marshalNode(this);
|
|
312
|
+
return C._ts_node_child_count_wasm(this.tree[0]);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Get this node's number of *named* children.
|
|
318
|
+
*
|
|
319
|
+
* See also {@link Node#isNamed}.
|
|
320
|
+
*/
|
|
321
|
+
get namedChildCount(): number {
|
|
322
|
+
marshalNode(this);
|
|
323
|
+
return C._ts_node_named_child_count_wasm(this.tree[0]);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/** Get this node's first child. */
|
|
327
|
+
get firstChild(): Node | null {
|
|
328
|
+
return this.child(0);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Get this node's first named child.
|
|
333
|
+
*
|
|
334
|
+
* See also {@link Node#isNamed}.
|
|
335
|
+
*/
|
|
336
|
+
get firstNamedChild(): Node | null {
|
|
337
|
+
return this.namedChild(0);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/** Get this node's last child. */
|
|
341
|
+
get lastChild(): Node | null {
|
|
342
|
+
return this.child(this.childCount - 1);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Get this node's last named child.
|
|
347
|
+
*
|
|
348
|
+
* See also {@link Node#isNamed}.
|
|
349
|
+
*/
|
|
350
|
+
get lastNamedChild(): Node | null {
|
|
351
|
+
return this.namedChild(this.namedChildCount - 1);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Iterate over this node's children.
|
|
356
|
+
*
|
|
357
|
+
* If you're walking the tree recursively, you may want to use the
|
|
358
|
+
* {@link TreeCursor} APIs directly instead.
|
|
359
|
+
*/
|
|
360
|
+
get children(): (Node | null)[] {
|
|
361
|
+
if (!this._children) {
|
|
362
|
+
marshalNode(this);
|
|
363
|
+
C._ts_node_children_wasm(this.tree[0]);
|
|
364
|
+
const count = C.getValue(TRANSFER_BUFFER, 'i32');
|
|
365
|
+
const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, 'i32');
|
|
366
|
+
this._children = new Array<Node>(count);
|
|
367
|
+
if (count > 0) {
|
|
368
|
+
let address = buffer;
|
|
369
|
+
for (let i = 0; i < count; i++) {
|
|
370
|
+
this._children[i] = unmarshalNode(this.tree, address);
|
|
371
|
+
address += SIZE_OF_NODE;
|
|
372
|
+
}
|
|
373
|
+
C._free(buffer);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
return this._children;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Iterate over this node's named children.
|
|
381
|
+
*
|
|
382
|
+
* See also {@link Node#children}.
|
|
383
|
+
*/
|
|
384
|
+
get namedChildren(): (Node | null)[] {
|
|
385
|
+
if (!this._namedChildren) {
|
|
386
|
+
marshalNode(this);
|
|
387
|
+
C._ts_node_named_children_wasm(this.tree[0]);
|
|
388
|
+
const count = C.getValue(TRANSFER_BUFFER, 'i32');
|
|
389
|
+
const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, 'i32');
|
|
390
|
+
this._namedChildren = new Array<Node>(count);
|
|
391
|
+
if (count > 0) {
|
|
392
|
+
let address = buffer;
|
|
393
|
+
for (let i = 0; i < count; i++) {
|
|
394
|
+
this._namedChildren[i] = unmarshalNode(this.tree, address);
|
|
395
|
+
address += SIZE_OF_NODE;
|
|
396
|
+
}
|
|
397
|
+
C._free(buffer);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
return this._namedChildren;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Get the descendants of this node that are the given type, or in the given types array.
|
|
405
|
+
*
|
|
406
|
+
* The types array should contain node type strings, which can be retrieved from {@link Language#types}.
|
|
407
|
+
*
|
|
408
|
+
* Additionally, a `startPosition` and `endPosition` can be passed in to restrict the search to a byte range.
|
|
409
|
+
*/
|
|
410
|
+
descendantsOfType(
|
|
411
|
+
types: string | string[],
|
|
412
|
+
startPosition: Point = ZERO_POINT,
|
|
413
|
+
endPosition: Point = ZERO_POINT
|
|
414
|
+
): (Node | null)[] {
|
|
415
|
+
if (!Array.isArray(types)) types = [types];
|
|
416
|
+
|
|
417
|
+
// Convert the type strings to numeric type symbols
|
|
418
|
+
const symbols: number[] = [];
|
|
419
|
+
const typesBySymbol = this.tree.language.types;
|
|
420
|
+
for (const node_type of types) {
|
|
421
|
+
if (node_type == "ERROR") {
|
|
422
|
+
symbols.push(65535); // Internally, ts_builtin_sym_error is -1, which is UINT_16MAX
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
for (let i = 0, n = typesBySymbol.length; i < n; i++) {
|
|
426
|
+
if (types.includes(typesBySymbol[i])) {
|
|
427
|
+
symbols.push(i);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
// Copy the array of symbols to the WASM heap
|
|
432
|
+
const symbolsAddress = C._malloc(SIZE_OF_INT * symbols.length);
|
|
433
|
+
for (let i = 0, n = symbols.length; i < n; i++) {
|
|
434
|
+
C.setValue(symbolsAddress + i * SIZE_OF_INT, symbols[i], 'i32');
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
// Call the C API to compute the descendants
|
|
438
|
+
marshalNode(this);
|
|
439
|
+
C._ts_node_descendants_of_type_wasm(
|
|
440
|
+
this.tree[0],
|
|
441
|
+
symbolsAddress,
|
|
442
|
+
symbols.length,
|
|
443
|
+
startPosition.row,
|
|
444
|
+
startPosition.column,
|
|
445
|
+
endPosition.row,
|
|
446
|
+
endPosition.column
|
|
447
|
+
);
|
|
448
|
+
|
|
449
|
+
// Instantiate the nodes based on the data returned
|
|
450
|
+
const descendantCount = C.getValue(TRANSFER_BUFFER, 'i32');
|
|
451
|
+
const descendantAddress = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, 'i32');
|
|
452
|
+
const result = new Array<Node | null>(descendantCount);
|
|
453
|
+
if (descendantCount > 0) {
|
|
454
|
+
let address = descendantAddress;
|
|
455
|
+
for (let i = 0; i < descendantCount; i++) {
|
|
456
|
+
result[i] = unmarshalNode(this.tree, address);
|
|
457
|
+
address += SIZE_OF_NODE;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
// Free the intermediate buffers
|
|
462
|
+
C._free(descendantAddress);
|
|
463
|
+
C._free(symbolsAddress);
|
|
464
|
+
return result;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
/** Get this node's next sibling. */
|
|
468
|
+
get nextSibling(): Node | null {
|
|
469
|
+
marshalNode(this);
|
|
470
|
+
C._ts_node_next_sibling_wasm(this.tree[0]);
|
|
471
|
+
return unmarshalNode(this.tree);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
/** Get this node's previous sibling. */
|
|
475
|
+
get previousSibling(): Node | null {
|
|
476
|
+
marshalNode(this);
|
|
477
|
+
C._ts_node_prev_sibling_wasm(this.tree[0]);
|
|
478
|
+
return unmarshalNode(this.tree);
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* Get this node's next *named* sibling.
|
|
483
|
+
*
|
|
484
|
+
* See also {@link Node#isNamed}.
|
|
485
|
+
*/
|
|
486
|
+
get nextNamedSibling(): Node | null {
|
|
487
|
+
marshalNode(this);
|
|
488
|
+
C._ts_node_next_named_sibling_wasm(this.tree[0]);
|
|
489
|
+
return unmarshalNode(this.tree);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Get this node's previous *named* sibling.
|
|
494
|
+
*
|
|
495
|
+
* See also {@link Node#isNamed}.
|
|
496
|
+
*/
|
|
497
|
+
get previousNamedSibling(): Node | null {
|
|
498
|
+
marshalNode(this);
|
|
499
|
+
C._ts_node_prev_named_sibling_wasm(this.tree[0]);
|
|
500
|
+
return unmarshalNode(this.tree);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/** Get the node's number of descendants, including one for the node itself. */
|
|
504
|
+
get descendantCount(): number {
|
|
505
|
+
marshalNode(this);
|
|
506
|
+
return C._ts_node_descendant_count_wasm(this.tree[0]);
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* Get this node's immediate parent.
|
|
511
|
+
* Prefer {@link Node#childWithDescendant} for iterating over this node's ancestors.
|
|
512
|
+
*/
|
|
513
|
+
get parent(): Node | null {
|
|
514
|
+
marshalNode(this);
|
|
515
|
+
C._ts_node_parent_wasm(this.tree[0]);
|
|
516
|
+
return unmarshalNode(this.tree);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Get the node that contains `descendant`.
|
|
521
|
+
*
|
|
522
|
+
* Note that this can return `descendant` itself.
|
|
523
|
+
*/
|
|
524
|
+
childWithDescendant(descendant: Node): Node | null {
|
|
525
|
+
marshalNode(this);
|
|
526
|
+
marshalNode(descendant, 1);
|
|
527
|
+
C._ts_node_child_with_descendant_wasm(this.tree[0]);
|
|
528
|
+
return unmarshalNode(this.tree);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
/** Get the smallest node within this node that spans the given byte range. */
|
|
532
|
+
descendantForIndex(start: number, end: number = start): Node | null {
|
|
533
|
+
if (typeof start !== 'number' || typeof end !== 'number') {
|
|
534
|
+
throw new Error('Arguments must be numbers');
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
marshalNode(this);
|
|
538
|
+
const address = TRANSFER_BUFFER + SIZE_OF_NODE;
|
|
539
|
+
C.setValue(address, start, 'i32');
|
|
540
|
+
C.setValue(address + SIZE_OF_INT, end, 'i32');
|
|
541
|
+
C._ts_node_descendant_for_index_wasm(this.tree[0]);
|
|
542
|
+
return unmarshalNode(this.tree);
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
/** Get the smallest named node within this node that spans the given byte range. */
|
|
546
|
+
namedDescendantForIndex(start: number, end: number = start): Node | null {
|
|
547
|
+
if (typeof start !== 'number' || typeof end !== 'number') {
|
|
548
|
+
throw new Error('Arguments must be numbers');
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
marshalNode(this);
|
|
552
|
+
const address = TRANSFER_BUFFER + SIZE_OF_NODE;
|
|
553
|
+
C.setValue(address, start, 'i32');
|
|
554
|
+
C.setValue(address + SIZE_OF_INT, end, 'i32');
|
|
555
|
+
C._ts_node_named_descendant_for_index_wasm(this.tree[0]);
|
|
556
|
+
return unmarshalNode(this.tree);
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
/** Get the smallest node within this node that spans the given point range. */
|
|
560
|
+
descendantForPosition(start: Point, end: Point = start) {
|
|
561
|
+
if (!isPoint(start) || !isPoint(end)) {
|
|
562
|
+
throw new Error('Arguments must be {row, column} objects');
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
marshalNode(this);
|
|
566
|
+
const address = TRANSFER_BUFFER + SIZE_OF_NODE;
|
|
567
|
+
marshalPoint(address, start);
|
|
568
|
+
marshalPoint(address + SIZE_OF_POINT, end);
|
|
569
|
+
C._ts_node_descendant_for_position_wasm(this.tree[0]);
|
|
570
|
+
return unmarshalNode(this.tree);
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
/** Get the smallest named node within this node that spans the given point range. */
|
|
574
|
+
namedDescendantForPosition(start: Point, end: Point = start) {
|
|
575
|
+
if (!isPoint(start) || !isPoint(end)) {
|
|
576
|
+
throw new Error('Arguments must be {row, column} objects');
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
marshalNode(this);
|
|
580
|
+
const address = TRANSFER_BUFFER + SIZE_OF_NODE;
|
|
581
|
+
marshalPoint(address, start);
|
|
582
|
+
marshalPoint(address + SIZE_OF_POINT, end);
|
|
583
|
+
C._ts_node_named_descendant_for_position_wasm(this.tree[0]);
|
|
584
|
+
return unmarshalNode(this.tree);
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* Create a new {@link TreeCursor} starting from this node.
|
|
589
|
+
*
|
|
590
|
+
* Note that the given node is considered the root of the cursor,
|
|
591
|
+
* and the cursor cannot walk outside this node.
|
|
592
|
+
*/
|
|
593
|
+
walk(): TreeCursor {
|
|
594
|
+
marshalNode(this);
|
|
595
|
+
C._ts_tree_cursor_new_wasm(this.tree[0]);
|
|
596
|
+
return new TreeCursor(INTERNAL, this.tree);
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* Edit this node to keep it in-sync with source code that has been edited.
|
|
601
|
+
*
|
|
602
|
+
* This function is only rarely needed. When you edit a syntax tree with
|
|
603
|
+
* the {@link Tree#edit} method, all of the nodes that you retrieve from
|
|
604
|
+
* the tree afterward will already reflect the edit. You only need to
|
|
605
|
+
* use {@link Node#edit} when you have a specific {@link Node} instance that
|
|
606
|
+
* you want to keep and continue to use after an edit.
|
|
607
|
+
*/
|
|
608
|
+
edit(edit: Edit) {
|
|
609
|
+
if (this.startIndex >= edit.oldEndIndex) {
|
|
610
|
+
this.startIndex = edit.newEndIndex + (this.startIndex - edit.oldEndIndex);
|
|
611
|
+
let subbedPointRow;
|
|
612
|
+
let subbedPointColumn;
|
|
613
|
+
if (this.startPosition.row > edit.oldEndPosition.row) {
|
|
614
|
+
subbedPointRow = this.startPosition.row - edit.oldEndPosition.row;
|
|
615
|
+
subbedPointColumn = this.startPosition.column;
|
|
616
|
+
} else {
|
|
617
|
+
subbedPointRow = 0;
|
|
618
|
+
subbedPointColumn = this.startPosition.column;
|
|
619
|
+
if (this.startPosition.column >= edit.oldEndPosition.column) {
|
|
620
|
+
subbedPointColumn =
|
|
621
|
+
this.startPosition.column - edit.oldEndPosition.column;
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
if (subbedPointRow > 0) {
|
|
626
|
+
this.startPosition.row += subbedPointRow;
|
|
627
|
+
this.startPosition.column = subbedPointColumn;
|
|
628
|
+
} else {
|
|
629
|
+
this.startPosition.column += subbedPointColumn;
|
|
630
|
+
}
|
|
631
|
+
} else if (this.startIndex > edit.startIndex) {
|
|
632
|
+
this.startIndex = edit.newEndIndex;
|
|
633
|
+
this.startPosition.row = edit.newEndPosition.row;
|
|
634
|
+
this.startPosition.column = edit.newEndPosition.column;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/** Get the S-expression representation of this node. */
|
|
639
|
+
toString(): string {
|
|
640
|
+
marshalNode(this);
|
|
641
|
+
const address = C._ts_node_to_string_wasm(this.tree[0]);
|
|
642
|
+
const result = C.AsciiToString(address);
|
|
643
|
+
C._free(address);
|
|
644
|
+
return result;
|
|
645
|
+
}
|
|
646
|
+
}
|