@colbymchenry/codegraph-win32-arm64 1.6.2 → 1.6.4
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/codegraph +1 -1
- package/bin/codegraph.cmd +1 -1
- package/lib/dist/.test-build-engine.json +1 -1
- package/lib/dist/.test-build-viewer.json +1 -1
- package/lib/dist/bin/codegraph.d.ts +3 -0
- package/lib/dist/bin/codegraph.d.ts.map +1 -1
- package/lib/dist/bin/codegraph.js +507 -702
- package/lib/dist/bin/codegraph.js.map +1 -1
- package/lib/dist/bin/command-supervision.js +1 -57
- package/lib/dist/bin/command-supervision.js.map +1 -1
- package/lib/dist/bin/fatal-handler.js +0 -46
- package/lib/dist/bin/fatal-handler.js.map +1 -1
- package/lib/dist/bin/node-version-check.js +0 -33
- package/lib/dist/bin/node-version-check.js.map +1 -1
- package/lib/dist/bin/uninstall.js +0 -19
- package/lib/dist/bin/uninstall.js.map +1 -1
- package/lib/dist/bin/viewer-gate.js +0 -14
- package/lib/dist/bin/viewer-gate.js.map +1 -1
- package/lib/dist/compile-cache.d.ts +2 -0
- package/lib/dist/compile-cache.d.ts.map +1 -0
- package/lib/dist/compile-cache.js +45 -0
- package/lib/dist/compile-cache.js.map +1 -0
- package/lib/dist/context/formatter.js +3 -66
- package/lib/dist/context/formatter.js.map +1 -1
- package/lib/dist/context/index.d.ts +44 -1
- package/lib/dist/context/index.d.ts.map +1 -1
- package/lib/dist/context/index.js +123 -430
- package/lib/dist/context/index.js.map +1 -1
- package/lib/dist/context/markers.js +0 -17
- package/lib/dist/context/markers.js.map +1 -1
- package/lib/dist/db/index.d.ts +44 -1
- package/lib/dist/db/index.d.ts.map +1 -1
- package/lib/dist/db/index.js +123 -395
- package/lib/dist/db/index.js.map +1 -1
- package/lib/dist/db/migrations.d.ts +11 -1
- package/lib/dist/db/migrations.d.ts.map +1 -1
- package/lib/dist/db/migrations.js +71 -79
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/name-substring-index.d.ts +63 -0
- package/lib/dist/db/name-substring-index.d.ts.map +1 -0
- package/lib/dist/db/name-substring-index.js +151 -0
- package/lib/dist/db/name-substring-index.js.map +1 -0
- package/lib/dist/db/node-sqlite.d.ts +19 -0
- package/lib/dist/db/node-sqlite.d.ts.map +1 -0
- package/lib/dist/db/node-sqlite.js +23 -0
- package/lib/dist/db/node-sqlite.js.map +1 -0
- package/lib/dist/db/open-error.d.ts +36 -0
- package/lib/dist/db/open-error.d.ts.map +1 -0
- package/lib/dist/db/open-error.js +63 -0
- package/lib/dist/db/open-error.js.map +1 -0
- package/lib/dist/db/parameter-flow-queries.d.ts +120 -0
- package/lib/dist/db/parameter-flow-queries.d.ts.map +1 -0
- package/lib/dist/db/parameter-flow-queries.js +168 -0
- package/lib/dist/db/parameter-flow-queries.js.map +1 -0
- package/lib/dist/db/queries.d.ts +654 -34
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +1466 -1470
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/db/reference-tail.d.ts +83 -0
- package/lib/dist/db/reference-tail.d.ts.map +1 -0
- package/lib/dist/db/reference-tail.js +68 -0
- package/lib/dist/db/reference-tail.js.map +1 -0
- package/lib/dist/db/schema.sql +18 -2
- package/lib/dist/db/sqlite-adapter.d.ts +18 -1
- package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
- package/lib/dist/db/sqlite-adapter.js +12 -62
- package/lib/dist/db/sqlite-adapter.js.map +1 -1
- package/lib/dist/db/synthesis-stage.d.ts.map +1 -1
- package/lib/dist/db/synthesis-stage.js +2 -6
- package/lib/dist/db/synthesis-stage.js.map +1 -1
- package/lib/dist/db/wal-valve.js +1 -153
- package/lib/dist/db/wal-valve.js.map +1 -1
- package/lib/dist/db/wsl-shared-index.js +0 -37
- package/lib/dist/db/wsl-shared-index.js.map +1 -1
- package/lib/dist/directory.d.ts +51 -0
- package/lib/dist/directory.d.ts.map +1 -1
- package/lib/dist/directory.js +76 -530
- package/lib/dist/directory.js.map +1 -1
- package/lib/dist/engine.d.ts +15 -0
- package/lib/dist/engine.d.ts.map +1 -0
- package/lib/dist/engine.js +35 -0
- package/lib/dist/engine.js.map +1 -0
- package/lib/dist/errors.d.ts +10 -0
- package/lib/dist/errors.d.ts.map +1 -1
- package/lib/dist/errors.js +8 -101
- package/lib/dist/errors.js.map +1 -1
- package/lib/dist/extraction/astro-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/astro-extractor.js +11 -101
- package/lib/dist/extraction/astro-extractor.js.map +1 -1
- package/lib/dist/extraction/cfml-extractor.d.ts +27 -1
- package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/cfml-extractor.js +70 -206
- package/lib/dist/extraction/cfml-extractor.js.map +1 -1
- package/lib/dist/extraction/commonjs-requires.js +0 -31
- package/lib/dist/extraction/commonjs-requires.js.map +1 -1
- package/lib/dist/extraction/dfm-extractor.js +0 -21
- package/lib/dist/extraction/dfm-extractor.js.map +1 -1
- package/lib/dist/extraction/extraction-version.d.ts +1 -1
- package/lib/dist/extraction/extraction-version.js +1 -24
- package/lib/dist/extraction/extraction-version.js.map +1 -1
- package/lib/dist/extraction/function-ref.d.ts +40 -0
- package/lib/dist/extraction/function-ref.d.ts.map +1 -1
- package/lib/dist/extraction/function-ref.js +157 -207
- package/lib/dist/extraction/function-ref.js.map +1 -1
- package/lib/dist/extraction/generated-detection.js +0 -165
- package/lib/dist/extraction/generated-detection.js.map +1 -1
- package/lib/dist/extraction/grammars.d.ts +73 -4
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +160 -431
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +208 -7
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +594 -1383
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/kernel/decode.js +0 -16
- package/lib/dist/extraction/kernel/decode.js.map +1 -1
- package/lib/dist/extraction/kernel/index.d.ts +3 -1
- package/lib/dist/extraction/kernel/index.d.ts.map +1 -1
- package/lib/dist/extraction/kernel/index.js +48 -135
- package/lib/dist/extraction/kernel/index.js.map +1 -1
- package/lib/dist/extraction/kernel/layout.js +42 -76
- package/lib/dist/extraction/kernel/layout.js.map +1 -1
- package/lib/dist/extraction/kernel/loader.d.ts +5 -1
- package/lib/dist/extraction/kernel/loader.d.ts.map +1 -1
- package/lib/dist/extraction/kernel/loader.js +0 -37
- package/lib/dist/extraction/kernel/loader.js.map +1 -1
- package/lib/dist/extraction/languages/arkts.js +0 -59
- package/lib/dist/extraction/languages/arkts.js.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.d.ts +125 -28
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.js +789 -856
- package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
- package/lib/dist/extraction/languages/cfquery.js +0 -9
- package/lib/dist/extraction/languages/cfquery.js.map +1 -1
- package/lib/dist/extraction/languages/cfscript.d.ts +20 -0
- package/lib/dist/extraction/languages/cfscript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/cfscript.js +80 -9
- package/lib/dist/extraction/languages/cfscript.js.map +1 -1
- package/lib/dist/extraction/languages/cobol.js +0 -114
- package/lib/dist/extraction/languages/cobol.js.map +1 -1
- package/lib/dist/extraction/languages/cpp-brace-scopes.d.ts +66 -0
- package/lib/dist/extraction/languages/cpp-brace-scopes.d.ts.map +1 -0
- package/lib/dist/extraction/languages/cpp-brace-scopes.js +343 -0
- package/lib/dist/extraction/languages/cpp-brace-scopes.js.map +1 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.d.ts +41 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.d.ts.map +1 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.js +487 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.js.map +1 -0
- package/lib/dist/extraction/languages/csharp.js +3 -55
- package/lib/dist/extraction/languages/csharp.js.map +1 -1
- package/lib/dist/extraction/languages/dart.d.ts +129 -0
- package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
- package/lib/dist/extraction/languages/dart.js +517 -162
- package/lib/dist/extraction/languages/dart.js.map +1 -1
- package/lib/dist/extraction/languages/erlang.d.ts.map +1 -1
- package/lib/dist/extraction/languages/erlang.js +15 -102
- package/lib/dist/extraction/languages/erlang.js.map +1 -1
- package/lib/dist/extraction/languages/go.d.ts +48 -0
- package/lib/dist/extraction/languages/go.d.ts.map +1 -1
- package/lib/dist/extraction/languages/go.js +102 -31
- package/lib/dist/extraction/languages/go.js.map +1 -1
- package/lib/dist/extraction/languages/index.js +0 -6
- package/lib/dist/extraction/languages/index.js.map +1 -1
- package/lib/dist/extraction/languages/java.d.ts.map +1 -1
- package/lib/dist/extraction/languages/java.js +67 -78
- package/lib/dist/extraction/languages/java.js.map +1 -1
- package/lib/dist/extraction/languages/javascript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/javascript.js +2 -12
- package/lib/dist/extraction/languages/javascript.js.map +1 -1
- package/lib/dist/extraction/languages/kotlin.d.ts +11 -0
- package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
- package/lib/dist/extraction/languages/kotlin.js +43 -197
- package/lib/dist/extraction/languages/kotlin.js.map +1 -1
- package/lib/dist/extraction/languages/lua.js +2 -39
- package/lib/dist/extraction/languages/lua.js.map +1 -1
- package/lib/dist/extraction/languages/luau.js +0 -14
- package/lib/dist/extraction/languages/luau.js.map +1 -1
- package/lib/dist/extraction/languages/nix.js +0 -16
- package/lib/dist/extraction/languages/nix.js.map +1 -1
- package/lib/dist/extraction/languages/objc.d.ts.map +1 -1
- package/lib/dist/extraction/languages/objc.js +5 -16
- package/lib/dist/extraction/languages/objc.js.map +1 -1
- package/lib/dist/extraction/languages/pascal-preparse.d.ts +66 -0
- package/lib/dist/extraction/languages/pascal-preparse.d.ts.map +1 -0
- package/lib/dist/extraction/languages/pascal-preparse.js +958 -0
- package/lib/dist/extraction/languages/pascal-preparse.js.map +1 -0
- package/lib/dist/extraction/languages/pascal-system.d.ts +11 -0
- package/lib/dist/extraction/languages/pascal-system.d.ts.map +1 -0
- package/lib/dist/extraction/languages/pascal-system.js +23 -0
- package/lib/dist/extraction/languages/pascal-system.js.map +1 -0
- package/lib/dist/extraction/languages/pascal.d.ts.map +1 -1
- package/lib/dist/extraction/languages/pascal.js +3 -4
- package/lib/dist/extraction/languages/pascal.js.map +1 -1
- package/lib/dist/extraction/languages/php.d.ts +9 -0
- package/lib/dist/extraction/languages/php.d.ts.map +1 -1
- package/lib/dist/extraction/languages/php.js +207 -44
- package/lib/dist/extraction/languages/php.js.map +1 -1
- package/lib/dist/extraction/languages/python.js +2 -20
- package/lib/dist/extraction/languages/python.js.map +1 -1
- package/lib/dist/extraction/languages/r.js +8 -78
- package/lib/dist/extraction/languages/r.js.map +1 -1
- package/lib/dist/extraction/languages/ruby.d.ts.map +1 -1
- package/lib/dist/extraction/languages/ruby.js +17 -25
- package/lib/dist/extraction/languages/ruby.js.map +1 -1
- package/lib/dist/extraction/languages/rust-macro-calls.d.ts +32 -0
- package/lib/dist/extraction/languages/rust-macro-calls.d.ts.map +1 -0
- package/lib/dist/extraction/languages/rust-macro-calls.js +306 -0
- package/lib/dist/extraction/languages/rust-macro-calls.js.map +1 -0
- package/lib/dist/extraction/languages/rust.d.ts +10 -0
- package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
- package/lib/dist/extraction/languages/rust.js +15 -47
- package/lib/dist/extraction/languages/rust.js.map +1 -1
- package/lib/dist/extraction/languages/scala.js +5 -41
- package/lib/dist/extraction/languages/scala.js.map +1 -1
- package/lib/dist/extraction/languages/solidity.js +1 -82
- package/lib/dist/extraction/languages/solidity.js.map +1 -1
- package/lib/dist/extraction/languages/swift.js +3 -47
- package/lib/dist/extraction/languages/swift.js.map +1 -1
- package/lib/dist/extraction/languages/terraform.js +6 -152
- package/lib/dist/extraction/languages/terraform.js.map +1 -1
- package/lib/dist/extraction/languages/typescript.d.ts +64 -0
- package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/typescript.js +73 -49
- package/lib/dist/extraction/languages/typescript.js.map +1 -1
- package/lib/dist/extraction/languages/vbnet.d.ts.map +1 -1
- package/lib/dist/extraction/languages/vbnet.js +9 -42
- package/lib/dist/extraction/languages/vbnet.js.map +1 -1
- package/lib/dist/extraction/lazy-frameworks.d.ts +15 -0
- package/lib/dist/extraction/lazy-frameworks.d.ts.map +1 -0
- package/lib/dist/extraction/lazy-frameworks.js +8 -0
- package/lib/dist/extraction/lazy-frameworks.js.map +1 -0
- package/lib/dist/extraction/liquid-extractor.d.ts +29 -3
- package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/liquid-extractor.js +89 -148
- package/lib/dist/extraction/liquid-extractor.js.map +1 -1
- package/lib/dist/extraction/mybatis-extractor.js +0 -78
- package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
- package/lib/dist/extraction/parse-budget.d.ts +42 -7
- package/lib/dist/extraction/parse-budget.d.ts.map +1 -1
- package/lib/dist/extraction/parse-budget.js +39 -15
- package/lib/dist/extraction/parse-budget.js.map +1 -1
- package/lib/dist/extraction/parse-pool.d.ts +29 -17
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
- package/lib/dist/extraction/parse-pool.js +49 -193
- package/lib/dist/extraction/parse-pool.js.map +1 -1
- package/lib/dist/extraction/parse-worker.d.ts +1 -1
- package/lib/dist/extraction/parse-worker.d.ts.map +1 -1
- package/lib/dist/extraction/parse-worker.js +5 -58
- package/lib/dist/extraction/parse-worker.js.map +1 -1
- package/lib/dist/extraction/razor-extractor.d.ts +9 -0
- package/lib/dist/extraction/razor-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/razor-extractor.js +45 -69
- package/lib/dist/extraction/razor-extractor.js.map +1 -1
- package/lib/dist/extraction/razor-script.d.ts +23 -0
- package/lib/dist/extraction/razor-script.d.ts.map +1 -0
- package/lib/dist/extraction/razor-script.js +244 -0
- package/lib/dist/extraction/razor-script.js.map +1 -0
- package/lib/dist/extraction/sfc-script.d.ts +42 -0
- package/lib/dist/extraction/sfc-script.d.ts.map +1 -1
- package/lib/dist/extraction/sfc-script.js +32 -31
- package/lib/dist/extraction/sfc-script.js.map +1 -1
- package/lib/dist/extraction/store-worker.d.ts +1 -1
- package/lib/dist/extraction/store-worker.d.ts.map +1 -1
- package/lib/dist/extraction/store-worker.js +1 -38
- package/lib/dist/extraction/store-worker.js.map +1 -1
- package/lib/dist/extraction/store-writer.js +2 -34
- package/lib/dist/extraction/store-writer.js.map +1 -1
- package/lib/dist/extraction/svelte-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/svelte-extractor.js +11 -87
- package/lib/dist/extraction/svelte-extractor.js.map +1 -1
- package/lib/dist/extraction/syntax-tokens.d.ts +6 -5
- package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -1
- package/lib/dist/extraction/syntax-tokens.js +4 -152
- package/lib/dist/extraction/syntax-tokens.js.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.d.ts +37 -1
- package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.js +76 -68
- package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
- package/lib/dist/extraction/tree-sitter-types.d.ts +102 -22
- package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter-types.js +0 -7
- package/lib/dist/extraction/tree-sitter-types.js.map +1 -1
- package/lib/dist/extraction/tree-sitter.d.ts +518 -10
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +2118 -2554
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/extraction/vue-extractor.d.ts +13 -0
- package/lib/dist/extraction/vue-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/vue-extractor.js +52 -92
- package/lib/dist/extraction/vue-extractor.js.map +1 -1
- package/lib/dist/extraction/vue-options-api.js +0 -32
- package/lib/dist/extraction/vue-options-api.js.map +1 -1
- package/lib/dist/extraction/vue-template-calls.d.ts +37 -0
- package/lib/dist/extraction/vue-template-calls.d.ts.map +1 -0
- package/lib/dist/extraction/vue-template-calls.js +497 -0
- package/lib/dist/extraction/vue-template-calls.js.map +1 -0
- package/lib/dist/extraction/wasm/tree-sitter-dart.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-swift.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts +15 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts.map +1 -1
- package/lib/dist/extraction/wasm-runtime-flags.js +18 -89
- package/lib/dist/extraction/wasm-runtime-flags.js.map +1 -1
- package/lib/dist/file-limits.d.ts +8 -0
- package/lib/dist/file-limits.d.ts.map +1 -1
- package/lib/dist/file-limits.js +13 -28
- package/lib/dist/file-limits.js.map +1 -1
- package/lib/dist/graph/branch-guards.d.ts.map +1 -1
- package/lib/dist/graph/branch-guards.js +4 -251
- package/lib/dist/graph/branch-guards.js.map +1 -1
- package/lib/dist/graph/call-sites.d.ts +12 -0
- package/lib/dist/graph/call-sites.d.ts.map +1 -0
- package/lib/dist/graph/call-sites.js +17 -0
- package/lib/dist/graph/call-sites.js.map +1 -0
- package/lib/dist/graph/cobol-copybooks.d.ts +75 -0
- package/lib/dist/graph/cobol-copybooks.d.ts.map +1 -0
- package/lib/dist/graph/cobol-copybooks.js +45 -0
- package/lib/dist/graph/cobol-copybooks.js.map +1 -0
- package/lib/dist/graph/dead-code.d.ts +26 -4
- package/lib/dist/graph/dead-code.d.ts.map +1 -1
- package/lib/dist/graph/dead-code.js +157 -311
- package/lib/dist/graph/dead-code.js.map +1 -1
- package/lib/dist/graph/dynamic-boundary-report.js +1 -88
- package/lib/dist/graph/dynamic-boundary-report.js.map +1 -1
- package/lib/dist/graph/file-cycles.d.ts +20 -0
- package/lib/dist/graph/file-cycles.d.ts.map +1 -0
- package/lib/dist/graph/file-cycles.js +79 -0
- package/lib/dist/graph/file-cycles.js.map +1 -0
- package/lib/dist/graph/file-drift.d.ts +35 -0
- package/lib/dist/graph/file-drift.d.ts.map +1 -0
- package/lib/dist/graph/file-drift.js +46 -0
- package/lib/dist/graph/file-drift.js.map +1 -0
- package/lib/dist/graph/go-package.d.ts +27 -0
- package/lib/dist/graph/go-package.d.ts.map +1 -0
- package/lib/dist/graph/go-package.js +49 -0
- package/lib/dist/graph/go-package.js.map +1 -0
- package/lib/dist/graph/index.d.ts +2 -0
- package/lib/dist/graph/index.d.ts.map +1 -1
- package/lib/dist/graph/index.js +4 -6
- package/lib/dist/graph/index.js.map +1 -1
- package/lib/dist/graph/named-symbol-flow.d.ts +5 -1
- package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -1
- package/lib/dist/graph/named-symbol-flow.js +82 -223
- package/lib/dist/graph/named-symbol-flow.js.map +1 -1
- package/lib/dist/graph/owning-package.d.ts +59 -0
- package/lib/dist/graph/owning-package.d.ts.map +1 -0
- package/lib/dist/graph/owning-package.js +120 -0
- package/lib/dist/graph/owning-package.js.map +1 -0
- package/lib/dist/graph/queries.d.ts +6 -3
- package/lib/dist/graph/queries.d.ts.map +1 -1
- package/lib/dist/graph/queries.js +4 -137
- package/lib/dist/graph/queries.js.map +1 -1
- package/lib/dist/graph/symbol-lookup.d.ts +15 -3
- package/lib/dist/graph/symbol-lookup.d.ts.map +1 -1
- package/lib/dist/graph/symbol-lookup.js +47 -89
- package/lib/dist/graph/symbol-lookup.js.map +1 -1
- package/lib/dist/graph/symbol-references.d.ts +86 -0
- package/lib/dist/graph/symbol-references.d.ts.map +1 -0
- package/lib/dist/graph/symbol-references.js +304 -0
- package/lib/dist/graph/symbol-references.js.map +1 -0
- package/lib/dist/graph/synthesized-hop.d.ts +37 -0
- package/lib/dist/graph/synthesized-hop.d.ts.map +1 -0
- package/lib/dist/graph/synthesized-hop.js +62 -0
- package/lib/dist/graph/synthesized-hop.js.map +1 -0
- package/lib/dist/graph/test-code.d.ts +33 -0
- package/lib/dist/graph/test-code.d.ts.map +1 -0
- package/lib/dist/graph/test-code.js +104 -0
- package/lib/dist/graph/test-code.js.map +1 -0
- package/lib/dist/graph/traversal.d.ts +31 -2
- package/lib/dist/graph/traversal.d.ts.map +1 -1
- package/lib/dist/graph/traversal.js +96 -226
- package/lib/dist/graph/traversal.js.map +1 -1
- package/lib/dist/graph/type-hierarchy.js +0 -138
- package/lib/dist/graph/type-hierarchy.js.map +1 -1
- package/lib/dist/index.d.ts +214 -26
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +736 -1112
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/beta-signup.js +0 -39
- package/lib/dist/installer/beta-signup.js.map +1 -1
- package/lib/dist/installer/config-writer.js +0 -24
- package/lib/dist/installer/config-writer.js.map +1 -1
- package/lib/dist/installer/index.d.ts +13 -6
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +27 -160
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/instructions-template.d.ts +16 -1
- package/lib/dist/installer/instructions-template.d.ts.map +1 -1
- package/lib/dist/installer/instructions-template.js +10 -38
- package/lib/dist/installer/instructions-template.js.map +1 -1
- package/lib/dist/installer/targets/antigravity.js +0 -113
- package/lib/dist/installer/targets/antigravity.js.map +1 -1
- package/lib/dist/installer/targets/bob.d.ts +20 -0
- package/lib/dist/installer/targets/bob.d.ts.map +1 -0
- package/lib/dist/installer/targets/bob.js +83 -0
- package/lib/dist/installer/targets/bob.js.map +1 -0
- package/lib/dist/installer/targets/claude.d.ts.map +1 -1
- package/lib/dist/installer/targets/claude.js +1 -185
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/installer/targets/codex.d.ts.map +1 -1
- package/lib/dist/installer/targets/codex.js +17 -109
- package/lib/dist/installer/targets/codex.js.map +1 -1
- package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -1
- package/lib/dist/installer/targets/copilot-cli.js +2 -54
- package/lib/dist/installer/targets/copilot-cli.js.map +1 -1
- package/lib/dist/installer/targets/copilot-jetbrains.js +0 -57
- package/lib/dist/installer/targets/copilot-jetbrains.js.map +1 -1
- package/lib/dist/installer/targets/copilot-vscode.js +0 -58
- package/lib/dist/installer/targets/copilot-vscode.js.map +1 -1
- package/lib/dist/installer/targets/cursor.js +7 -88
- package/lib/dist/installer/targets/cursor.js.map +1 -1
- package/lib/dist/installer/targets/droid.d.ts +18 -0
- package/lib/dist/installer/targets/droid.d.ts.map +1 -0
- package/lib/dist/installer/targets/droid.js +92 -0
- package/lib/dist/installer/targets/droid.js.map +1 -0
- package/lib/dist/installer/targets/dsh.d.ts +35 -0
- package/lib/dist/installer/targets/dsh.d.ts.map +1 -0
- package/lib/dist/installer/targets/dsh.js +267 -0
- package/lib/dist/installer/targets/dsh.js.map +1 -0
- package/lib/dist/installer/targets/gemini.js +0 -37
- package/lib/dist/installer/targets/gemini.js.map +1 -1
- package/lib/dist/installer/targets/grok.d.ts +25 -0
- package/lib/dist/installer/targets/grok.d.ts.map +1 -0
- package/lib/dist/installer/targets/grok.js +96 -0
- package/lib/dist/installer/targets/grok.js.map +1 -0
- package/lib/dist/installer/targets/hermes.d.ts +19 -7
- package/lib/dist/installer/targets/hermes.d.ts.map +1 -1
- package/lib/dist/installer/targets/hermes.js +218 -214
- package/lib/dist/installer/targets/hermes.js.map +1 -1
- package/lib/dist/installer/targets/json-config.d.ts +45 -0
- package/lib/dist/installer/targets/json-config.d.ts.map +1 -0
- package/lib/dist/installer/targets/json-config.js +128 -0
- package/lib/dist/installer/targets/json-config.js.map +1 -0
- package/lib/dist/installer/targets/kimi.d.ts +21 -0
- package/lib/dist/installer/targets/kimi.d.ts.map +1 -0
- package/lib/dist/installer/targets/kimi.js +97 -0
- package/lib/dist/installer/targets/kimi.js.map +1 -0
- package/lib/dist/installer/targets/kiro.js +1 -41
- package/lib/dist/installer/targets/kiro.js.map +1 -1
- package/lib/dist/installer/targets/opencode.d.ts.map +1 -1
- package/lib/dist/installer/targets/opencode.js +1 -103
- package/lib/dist/installer/targets/opencode.js.map +1 -1
- package/lib/dist/installer/targets/pi.d.ts +24 -0
- package/lib/dist/installer/targets/pi.d.ts.map +1 -0
- package/lib/dist/installer/targets/pi.js +100 -0
- package/lib/dist/installer/targets/pi.js.map +1 -0
- package/lib/dist/installer/targets/qoder.d.ts +23 -0
- package/lib/dist/installer/targets/qoder.d.ts.map +1 -0
- package/lib/dist/installer/targets/qoder.js +83 -0
- package/lib/dist/installer/targets/qoder.js.map +1 -0
- package/lib/dist/installer/targets/qwen.d.ts +21 -0
- package/lib/dist/installer/targets/qwen.d.ts.map +1 -0
- package/lib/dist/installer/targets/qwen.js +115 -0
- package/lib/dist/installer/targets/qwen.js.map +1 -0
- package/lib/dist/installer/targets/registry.d.ts.map +1 -1
- package/lib/dist/installer/targets/registry.js +18 -25
- package/lib/dist/installer/targets/registry.js.map +1 -1
- package/lib/dist/installer/targets/shared.d.ts +83 -13
- package/lib/dist/installer/targets/shared.d.ts.map +1 -1
- package/lib/dist/installer/targets/shared.js +201 -131
- package/lib/dist/installer/targets/shared.js.map +1 -1
- package/lib/dist/installer/targets/toml.d.ts +82 -6
- package/lib/dist/installer/targets/toml.d.ts.map +1 -1
- package/lib/dist/installer/targets/toml.js +318 -112
- package/lib/dist/installer/targets/toml.js.map +1 -1
- package/lib/dist/installer/targets/types.d.ts +1 -1
- package/lib/dist/installer/targets/types.d.ts.map +1 -1
- package/lib/dist/installer/targets/types.js +0 -13
- package/lib/dist/installer/targets/types.js.map +1 -1
- package/lib/dist/installer/targets/windsurf.d.ts +22 -0
- package/lib/dist/installer/targets/windsurf.d.ts.map +1 -0
- package/lib/dist/installer/targets/windsurf.js +90 -0
- package/lib/dist/installer/targets/windsurf.js.map +1 -0
- package/lib/dist/lazy-engine.d.ts +22 -0
- package/lib/dist/lazy-engine.d.ts.map +1 -0
- package/lib/dist/lazy-engine.js +16 -0
- package/lib/dist/lazy-engine.js.map +1 -0
- package/lib/dist/mcp/answer-freshness.js +0 -6
- package/lib/dist/mcp/answer-freshness.js.map +1 -1
- package/lib/dist/mcp/daemon-manager.js +2 -23
- package/lib/dist/mcp/daemon-manager.js.map +1 -1
- package/lib/dist/mcp/daemon-paths.d.ts +2 -0
- package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-paths.js +9 -85
- package/lib/dist/mcp/daemon-paths.js.map +1 -1
- package/lib/dist/mcp/daemon-proof.d.ts +19 -0
- package/lib/dist/mcp/daemon-proof.d.ts.map +1 -0
- package/lib/dist/mcp/daemon-proof.js +126 -0
- package/lib/dist/mcp/daemon-proof.js.map +1 -0
- package/lib/dist/mcp/daemon-registry.d.ts +47 -2
- package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-registry.js +188 -139
- package/lib/dist/mcp/daemon-registry.js.map +1 -1
- package/lib/dist/mcp/daemon.d.ts +69 -0
- package/lib/dist/mcp/daemon.d.ts.map +1 -1
- package/lib/dist/mcp/daemon.js +186 -376
- package/lib/dist/mcp/daemon.js.map +1 -1
- package/lib/dist/mcp/dynamic-boundaries.js +4 -78
- package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
- package/lib/dist/mcp/early-ppid.js +0 -24
- package/lib/dist/mcp/early-ppid.js.map +1 -1
- package/lib/dist/mcp/engine.d.ts +24 -0
- package/lib/dist/mcp/engine.d.ts.map +1 -1
- package/lib/dist/mcp/engine.js +47 -152
- package/lib/dist/mcp/engine.js.map +1 -1
- package/lib/dist/mcp/explore-dedup.js +0 -108
- package/lib/dist/mcp/explore-dedup.js.map +1 -1
- package/lib/dist/mcp/explore-diagnostics.d.ts +6 -0
- package/lib/dist/mcp/explore-diagnostics.d.ts.map +1 -1
- package/lib/dist/mcp/explore-diagnostics.js +8 -116
- package/lib/dist/mcp/explore-diagnostics.js.map +1 -1
- package/lib/dist/mcp/explore-one-symbol.d.ts +77 -0
- package/lib/dist/mcp/explore-one-symbol.d.ts.map +1 -0
- package/lib/dist/mcp/explore-one-symbol.js +431 -0
- package/lib/dist/mcp/explore-one-symbol.js.map +1 -0
- package/lib/dist/mcp/explore-session-state.js +0 -129
- package/lib/dist/mcp/explore-session-state.js.map +1 -1
- package/lib/dist/mcp/hook-client.d.ts +44 -0
- package/lib/dist/mcp/hook-client.d.ts.map +1 -0
- package/lib/dist/mcp/hook-client.js +202 -0
- package/lib/dist/mcp/hook-client.js.map +1 -0
- package/lib/dist/mcp/index-freshness-worker.js +1 -6
- package/lib/dist/mcp/index-freshness-worker.js.map +1 -1
- package/lib/dist/mcp/index-freshness.js +0 -15
- package/lib/dist/mcp/index-freshness.js.map +1 -1
- package/lib/dist/mcp/index-version-warning.d.ts +21 -0
- package/lib/dist/mcp/index-version-warning.d.ts.map +1 -0
- package/lib/dist/mcp/index-version-warning.js +38 -0
- package/lib/dist/mcp/index-version-warning.js.map +1 -0
- package/lib/dist/mcp/index.d.ts +29 -1
- package/lib/dist/mcp/index.d.ts.map +1 -1
- package/lib/dist/mcp/index.js +131 -300
- package/lib/dist/mcp/index.js.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts +13 -3
- package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.js +106 -121
- package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
- package/lib/dist/mcp/opencode-tool-names.d.ts +32 -0
- package/lib/dist/mcp/opencode-tool-names.d.ts.map +1 -0
- package/lib/dist/mcp/opencode-tool-names.js +24 -0
- package/lib/dist/mcp/opencode-tool-names.js.map +1 -0
- package/lib/dist/mcp/ppid-watchdog.js +0 -24
- package/lib/dist/mcp/ppid-watchdog.js.map +1 -1
- package/lib/dist/mcp/process-identity.d.ts +42 -0
- package/lib/dist/mcp/process-identity.d.ts.map +1 -0
- package/lib/dist/mcp/process-identity.js +130 -0
- package/lib/dist/mcp/process-identity.js.map +1 -0
- package/lib/dist/mcp/project-lifecycle.d.ts +6 -0
- package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -1
- package/lib/dist/mcp/project-lifecycle.js +70 -19
- package/lib/dist/mcp/project-lifecycle.js.map +1 -1
- package/lib/dist/mcp/prompt-explore.d.ts +19 -0
- package/lib/dist/mcp/prompt-explore.d.ts.map +1 -0
- package/lib/dist/mcp/prompt-explore.js +6 -0
- package/lib/dist/mcp/prompt-explore.js.map +1 -0
- package/lib/dist/mcp/proxy.d.ts +25 -7
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +145 -274
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/query-pool.d.ts +52 -3
- package/lib/dist/mcp/query-pool.d.ts.map +1 -1
- package/lib/dist/mcp/query-pool.js +114 -123
- package/lib/dist/mcp/query-pool.js.map +1 -1
- package/lib/dist/mcp/query-worker.js +24 -36
- package/lib/dist/mcp/query-worker.js.map +1 -1
- package/lib/dist/mcp/server-instructions.d.ts +18 -0
- package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
- package/lib/dist/mcp/server-instructions.js +12 -32
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/mcp/session.d.ts +46 -0
- package/lib/dist/mcp/session.d.ts.map +1 -1
- package/lib/dist/mcp/session.js +70 -132
- package/lib/dist/mcp/session.js.map +1 -1
- package/lib/dist/mcp/startup-handshake.js +1 -48
- package/lib/dist/mcp/startup-handshake.js.map +1 -1
- package/lib/dist/mcp/stdin-teardown.js +0 -28
- package/lib/dist/mcp/stdin-teardown.js.map +1 -1
- package/lib/dist/mcp/stdout-teardown.d.ts +26 -0
- package/lib/dist/mcp/stdout-teardown.d.ts.map +1 -0
- package/lib/dist/mcp/stdout-teardown.js +20 -0
- package/lib/dist/mcp/stdout-teardown.js.map +1 -0
- package/lib/dist/mcp/tools.d.ts +157 -18
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +797 -3621
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/mcp/transport.d.ts.map +1 -1
- package/lib/dist/mcp/transport.js +4 -96
- package/lib/dist/mcp/transport.js.map +1 -1
- package/lib/dist/mcp/version.d.ts +13 -1
- package/lib/dist/mcp/version.d.ts.map +1 -1
- package/lib/dist/mcp/version.js +19 -21
- package/lib/dist/mcp/version.js.map +1 -1
- package/lib/dist/mcp/writer-lock.d.ts +11 -0
- package/lib/dist/mcp/writer-lock.d.ts.map +1 -1
- package/lib/dist/mcp/writer-lock.js +49 -46
- package/lib/dist/mcp/writer-lock.js.map +1 -1
- package/lib/dist/project-config.d.ts +20 -0
- package/lib/dist/project-config.d.ts.map +1 -1
- package/lib/dist/project-config.js +31 -140
- package/lib/dist/project-config.js.map +1 -1
- package/lib/dist/resolution/alias-binding.d.ts +7 -0
- package/lib/dist/resolution/alias-binding.d.ts.map +1 -1
- package/lib/dist/resolution/alias-binding.js +7 -56
- package/lib/dist/resolution/alias-binding.js.map +1 -1
- package/lib/dist/resolution/ambient-modules.d.ts +185 -0
- package/lib/dist/resolution/ambient-modules.d.ts.map +1 -0
- package/lib/dist/resolution/ambient-modules.js +732 -0
- package/lib/dist/resolution/ambient-modules.js.map +1 -0
- package/lib/dist/resolution/angular-template-synthesizer.d.ts +48 -1
- package/lib/dist/resolution/angular-template-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/angular-template-synthesizer.js +401 -65
- package/lib/dist/resolution/angular-template-synthesizer.js.map +1 -1
- package/lib/dist/resolution/c-feature-variants.d.ts +40 -0
- package/lib/dist/resolution/c-feature-variants.d.ts.map +1 -0
- package/lib/dist/resolution/c-feature-variants.js +249 -0
- package/lib/dist/resolution/c-feature-variants.js.map +1 -0
- package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/c-fnptr-synthesizer.js +23 -391
- package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
- package/lib/dist/resolution/c-macro-renames.d.ts +25 -0
- package/lib/dist/resolution/c-macro-renames.d.ts.map +1 -0
- package/lib/dist/resolution/c-macro-renames.js +95 -0
- package/lib/dist/resolution/c-macro-renames.js.map +1 -0
- package/lib/dist/resolution/callback-synthesizer.d.ts +19 -5
- package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.js +1395 -1343
- package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
- package/lib/dist/resolution/const-alias-synthesizer.d.ts +48 -0
- package/lib/dist/resolution/const-alias-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/const-alias-synthesizer.js +234 -0
- package/lib/dist/resolution/const-alias-synthesizer.js.map +1 -0
- package/lib/dist/resolution/cooperative-yield.js +0 -27
- package/lib/dist/resolution/cooperative-yield.js.map +1 -1
- package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -1
- package/lib/dist/resolution/cpp-constructor.js +15 -17
- package/lib/dist/resolution/cpp-constructor.js.map +1 -1
- package/lib/dist/resolution/cpp-includers.d.ts +46 -0
- package/lib/dist/resolution/cpp-includers.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-includers.js +153 -0
- package/lib/dist/resolution/cpp-includers.js.map +1 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts +16 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -1
- package/lib/dist/resolution/cpp-macro-visibility.js +17 -68
- package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -1
- package/lib/dist/resolution/cpp-namespaces.d.ts +54 -0
- package/lib/dist/resolution/cpp-namespaces.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-namespaces.js +151 -0
- package/lib/dist/resolution/cpp-namespaces.js.map +1 -0
- package/lib/dist/resolution/cpp-raw-strings.d.ts +33 -0
- package/lib/dist/resolution/cpp-raw-strings.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-raw-strings.js +167 -0
- package/lib/dist/resolution/cpp-raw-strings.js.map +1 -0
- package/lib/dist/resolution/cpp-supertypes.d.ts +118 -0
- package/lib/dist/resolution/cpp-supertypes.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-supertypes.js +322 -0
- package/lib/dist/resolution/cpp-supertypes.js.map +1 -0
- package/lib/dist/resolution/cpp-template-instantiations.d.ts +83 -0
- package/lib/dist/resolution/cpp-template-instantiations.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-template-instantiations.js +983 -0
- package/lib/dist/resolution/cpp-template-instantiations.js.map +1 -0
- package/lib/dist/resolution/cpp-type-aliases.d.ts +194 -0
- package/lib/dist/resolution/cpp-type-aliases.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-type-aliases.js +648 -0
- package/lib/dist/resolution/cpp-type-aliases.js.map +1 -0
- package/lib/dist/resolution/dart-libraries.d.ts +75 -0
- package/lib/dist/resolution/dart-libraries.d.ts.map +1 -0
- package/lib/dist/resolution/dart-libraries.js +721 -0
- package/lib/dist/resolution/dart-libraries.js.map +1 -0
- package/lib/dist/resolution/dart-local-scope.d.ts +41 -0
- package/lib/dist/resolution/dart-local-scope.d.ts.map +1 -0
- package/lib/dist/resolution/dart-local-scope.js +565 -0
- package/lib/dist/resolution/dart-local-scope.js.map +1 -0
- package/lib/dist/resolution/event-emitter-synthesizer.d.ts +39 -0
- package/lib/dist/resolution/event-emitter-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/event-emitter-synthesizer.js +656 -0
- package/lib/dist/resolution/event-emitter-synthesizer.js.map +1 -0
- package/lib/dist/resolution/expo-router-synthesizer.js +0 -52
- package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/frameworks/angular-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/angular-router.js +41 -208
- package/lib/dist/resolution/frameworks/angular-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/aspnet-routes.d.ts +62 -0
- package/lib/dist/resolution/frameworks/aspnet-routes.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/aspnet-routes.js +382 -0
- package/lib/dist/resolution/frameworks/aspnet-routes.js.map +1 -0
- package/lib/dist/resolution/frameworks/astro.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/astro.js +4 -60
- package/lib/dist/resolution/frameworks/astro.js.map +1 -1
- package/lib/dist/resolution/frameworks/cargo-workspace.d.ts +18 -1
- package/lib/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/cargo-workspace.js +65 -15
- package/lib/dist/resolution/frameworks/cargo-workspace.js.map +1 -1
- package/lib/dist/resolution/frameworks/cics.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/cics.js +7 -33
- package/lib/dist/resolution/frameworks/cics.js.map +1 -1
- package/lib/dist/resolution/frameworks/codeigniter.d.ts +23 -0
- package/lib/dist/resolution/frameworks/codeigniter.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/codeigniter.js +271 -0
- package/lib/dist/resolution/frameworks/codeigniter.js.map +1 -0
- package/lib/dist/resolution/frameworks/component-folder.d.ts +17 -0
- package/lib/dist/resolution/frameworks/component-folder.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/component-folder.js +11 -0
- package/lib/dist/resolution/frameworks/component-folder.js.map +1 -0
- package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/csharp.js +85 -102
- package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
- package/lib/dist/resolution/frameworks/drupal.d.ts +17 -8
- package/lib/dist/resolution/frameworks/drupal.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/drupal.js +377 -142
- package/lib/dist/resolution/frameworks/drupal.js.map +1 -1
- package/lib/dist/resolution/frameworks/elysia.d.ts +38 -0
- package/lib/dist/resolution/frameworks/elysia.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/elysia.js +683 -0
- package/lib/dist/resolution/frameworks/elysia.js.map +1 -0
- package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/expo-modules.js +8 -88
- package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.js +9 -190
- package/lib/dist/resolution/frameworks/expo-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/express.d.ts +48 -1
- package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/express.js +193 -199
- package/lib/dist/resolution/frameworks/express.js.map +1 -1
- package/lib/dist/resolution/frameworks/fabric.js +1 -104
- package/lib/dist/resolution/frameworks/fabric.js.map +1 -1
- package/lib/dist/resolution/frameworks/go.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/go.js +14 -43
- package/lib/dist/resolution/frameworks/go.js.map +1 -1
- package/lib/dist/resolution/frameworks/goframe.js +1 -55
- package/lib/dist/resolution/frameworks/goframe.js.map +1 -1
- package/lib/dist/resolution/frameworks/index.d.ts +14 -0
- package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/index.js +16 -50
- package/lib/dist/resolution/frameworks/index.js.map +1 -1
- package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/java.js +203 -129
- package/lib/dist/resolution/frameworks/java.js.map +1 -1
- package/lib/dist/resolution/frameworks/laravel.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/laravel.js +71 -136
- package/lib/dist/resolution/frameworks/laravel.js.map +1 -1
- package/lib/dist/resolution/frameworks/name-heuristic.js +0 -12
- package/lib/dist/resolution/frameworks/name-heuristic.js.map +1 -1
- package/lib/dist/resolution/frameworks/nestjs.js +2 -199
- package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
- package/lib/dist/resolution/frameworks/next-proxy.d.ts +67 -0
- package/lib/dist/resolution/frameworks/next-proxy.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/next-proxy.js +239 -0
- package/lib/dist/resolution/frameworks/next-proxy.js.map +1 -0
- package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/nextjs.js +10 -66
- package/lib/dist/resolution/frameworks/nextjs.js.map +1 -1
- package/lib/dist/resolution/frameworks/object-literal.js +0 -21
- package/lib/dist/resolution/frameworks/object-literal.js.map +1 -1
- package/lib/dist/resolution/frameworks/package-deps.d.ts +11 -7
- package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/package-deps.js +35 -26
- package/lib/dist/resolution/frameworks/package-deps.js.map +1 -1
- package/lib/dist/resolution/frameworks/page-component.js +0 -14
- package/lib/dist/resolution/frameworks/page-component.js.map +1 -1
- package/lib/dist/resolution/frameworks/play.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/play.js +26 -34
- package/lib/dist/resolution/frameworks/play.js.map +1 -1
- package/lib/dist/resolution/frameworks/python.js +5 -102
- package/lib/dist/resolution/frameworks/python.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.js +1 -166
- package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-router.d.ts +13 -4
- package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react-router.js +10 -82
- package/lib/dist/resolution/frameworks/react-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/react.d.ts +57 -0
- package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react.js +1449 -191
- package/lib/dist/resolution/frameworks/react.js.map +1 -1
- package/lib/dist/resolution/frameworks/ruby.js +1 -61
- package/lib/dist/resolution/frameworks/ruby.js.map +1 -1
- package/lib/dist/resolution/frameworks/rust.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/rust.js +35 -56
- package/lib/dist/resolution/frameworks/rust.js.map +1 -1
- package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/svelte.js +7 -75
- package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
- package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/sveltekit-router.js +8 -46
- package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/swift-objc.js +0 -97
- package/lib/dist/resolution/frameworks/swift-objc.js.map +1 -1
- package/lib/dist/resolution/frameworks/swift.js +0 -97
- package/lib/dist/resolution/frameworks/swift.js.map +1 -1
- package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/tanstack-router.js +9 -130
- package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/terraform.js +1 -85
- package/lib/dist/resolution/frameworks/terraform.js.map +1 -1
- package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/vue-router.js +11 -134
- package/lib/dist/resolution/frameworks/vue-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/vue.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/vue.js +42 -114
- package/lib/dist/resolution/frameworks/vue.js.map +1 -1
- package/lib/dist/resolution/go-func-field-synthesizer.d.ts +58 -0
- package/lib/dist/resolution/go-func-field-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/go-func-field-synthesizer.js +696 -0
- package/lib/dist/resolution/go-func-field-synthesizer.js.map +1 -0
- package/lib/dist/resolution/go-module.d.ts +23 -7
- package/lib/dist/resolution/go-module.d.ts.map +1 -1
- package/lib/dist/resolution/go-module.js +21 -24
- package/lib/dist/resolution/go-module.js.map +1 -1
- package/lib/dist/resolution/go-stdlib-methods.d.ts +9 -0
- package/lib/dist/resolution/go-stdlib-methods.d.ts.map +1 -0
- package/lib/dist/resolution/go-stdlib-methods.js +224 -0
- package/lib/dist/resolution/go-stdlib-methods.js.map +1 -0
- package/lib/dist/resolution/goframe-synthesizer.js +2 -53
- package/lib/dist/resolution/goframe-synthesizer.js.map +1 -1
- package/lib/dist/resolution/import-resolver.d.ts +278 -29
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/import-resolver.js +1825 -1396
- package/lib/dist/resolution/import-resolver.js.map +1 -1
- package/lib/dist/resolution/index.d.ts +517 -6
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +1604 -1042
- package/lib/dist/resolution/index.js.map +1 -1
- package/lib/dist/resolution/js-builtins.d.ts +23 -0
- package/lib/dist/resolution/js-builtins.d.ts.map +1 -1
- package/lib/dist/resolution/js-builtins.js +34 -14
- package/lib/dist/resolution/js-builtins.js.map +1 -1
- package/lib/dist/resolution/js-class-expressions.d.ts +48 -0
- package/lib/dist/resolution/js-class-expressions.d.ts.map +1 -0
- package/lib/dist/resolution/js-class-expressions.js +25 -0
- package/lib/dist/resolution/js-class-expressions.js.map +1 -0
- package/lib/dist/resolution/js-super-calls.d.ts +18 -0
- package/lib/dist/resolution/js-super-calls.d.ts.map +1 -0
- package/lib/dist/resolution/js-super-calls.js +94 -0
- package/lib/dist/resolution/js-super-calls.js.map +1 -0
- package/lib/dist/resolution/jsx-code.d.ts +28 -0
- package/lib/dist/resolution/jsx-code.d.ts.map +1 -0
- package/lib/dist/resolution/jsx-code.js +459 -0
- package/lib/dist/resolution/jsx-code.js.map +1 -0
- package/lib/dist/resolution/lru-cache.d.ts +5 -13
- package/lib/dist/resolution/lru-cache.d.ts.map +1 -1
- package/lib/dist/resolution/lru-cache.js +43 -32
- package/lib/dist/resolution/lru-cache.js.map +1 -1
- package/lib/dist/resolution/memory-budget.js +0 -52
- package/lib/dist/resolution/memory-budget.js.map +1 -1
- package/lib/dist/resolution/module-importers.d.ts +210 -0
- package/lib/dist/resolution/module-importers.d.ts.map +1 -0
- package/lib/dist/resolution/module-importers.js +673 -0
- package/lib/dist/resolution/module-importers.js.map +1 -0
- package/lib/dist/resolution/name-matcher.d.ts +986 -7
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +24176 -6745
- package/lib/dist/resolution/name-matcher.js.map +1 -1
- package/lib/dist/resolution/next-router-synthesizer.d.ts +19 -0
- package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/next-router-synthesizer.js +46 -28
- package/lib/dist/resolution/next-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/override-parameters.d.ts +40 -0
- package/lib/dist/resolution/override-parameters.d.ts.map +1 -0
- package/lib/dist/resolution/override-parameters.js +339 -0
- package/lib/dist/resolution/override-parameters.js.map +1 -0
- package/lib/dist/resolution/parameter-flow.d.ts +218 -0
- package/lib/dist/resolution/parameter-flow.d.ts.map +1 -0
- package/lib/dist/resolution/parameter-flow.js +474 -0
- package/lib/dist/resolution/parameter-flow.js.map +1 -0
- package/lib/dist/resolution/pascal-scope.d.ts +91 -0
- package/lib/dist/resolution/pascal-scope.d.ts.map +1 -0
- package/lib/dist/resolution/pascal-scope.js +961 -0
- package/lib/dist/resolution/pascal-scope.js.map +1 -0
- package/lib/dist/resolution/path-aliases.d.ts +32 -4
- package/lib/dist/resolution/path-aliases.d.ts.map +1 -1
- package/lib/dist/resolution/path-aliases.js +43 -110
- package/lib/dist/resolution/path-aliases.js.map +1 -1
- package/lib/dist/resolution/php-web-root.d.ts +39 -0
- package/lib/dist/resolution/php-web-root.d.ts.map +1 -0
- package/lib/dist/resolution/php-web-root.js +141 -0
- package/lib/dist/resolution/php-web-root.js.map +1 -0
- package/lib/dist/resolution/project-scans.d.ts +38 -0
- package/lib/dist/resolution/project-scans.d.ts.map +1 -0
- package/lib/dist/resolution/project-scans.js +30 -0
- package/lib/dist/resolution/project-scans.js.map +1 -0
- package/lib/dist/resolution/python-overloads.d.ts +10 -0
- package/lib/dist/resolution/python-overloads.d.ts.map +1 -0
- package/lib/dist/resolution/python-overloads.js +75 -0
- package/lib/dist/resolution/python-overloads.js.map +1 -0
- package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/react-router-synthesizer.js +3 -55
- package/lib/dist/resolution/react-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/resolver-pool.d.ts +23 -2
- package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
- package/lib/dist/resolution/resolver-pool.js +43 -111
- package/lib/dist/resolution/resolver-pool.js.map +1 -1
- package/lib/dist/resolution/resolver-worker.d.ts +1 -1
- package/lib/dist/resolution/resolver-worker.d.ts.map +1 -1
- package/lib/dist/resolution/resolver-worker.js +8 -37
- package/lib/dist/resolution/resolver-worker.js.map +1 -1
- package/lib/dist/resolution/resurrect-ref.d.ts +25 -0
- package/lib/dist/resolution/resurrect-ref.d.ts.map +1 -0
- package/lib/dist/resolution/resurrect-ref.js +19 -0
- package/lib/dist/resolution/resurrect-ref.js.map +1 -0
- package/lib/dist/resolution/ruby-constant-paths.d.ts +56 -0
- package/lib/dist/resolution/ruby-constant-paths.d.ts.map +1 -0
- package/lib/dist/resolution/ruby-constant-paths.js +255 -0
- package/lib/dist/resolution/ruby-constant-paths.js.map +1 -0
- package/lib/dist/resolution/ruby-parameter-flow.d.ts +10 -0
- package/lib/dist/resolution/ruby-parameter-flow.d.ts.map +1 -0
- package/lib/dist/resolution/ruby-parameter-flow.js +801 -0
- package/lib/dist/resolution/ruby-parameter-flow.js.map +1 -0
- package/lib/dist/resolution/rust-scopes.d.ts +120 -0
- package/lib/dist/resolution/rust-scopes.d.ts.map +1 -0
- package/lib/dist/resolution/rust-scopes.js +730 -0
- package/lib/dist/resolution/rust-scopes.js.map +1 -0
- package/lib/dist/resolution/shopify-themes.d.ts +10 -0
- package/lib/dist/resolution/shopify-themes.d.ts.map +1 -0
- package/lib/dist/resolution/shopify-themes.js +19 -0
- package/lib/dist/resolution/shopify-themes.js.map +1 -0
- package/lib/dist/resolution/strip-comments.d.ts +20 -1
- package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
- package/lib/dist/resolution/strip-comments.js +164 -119
- package/lib/dist/resolution/strip-comments.js.map +1 -1
- package/lib/dist/resolution/sveltekit-synthesizer.js +0 -64
- package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -1
- package/lib/dist/resolution/swift-objc-bridge.js +0 -160
- package/lib/dist/resolution/swift-objc-bridge.js.map +1 -1
- package/lib/dist/resolution/swift-type-visibility.d.ts.map +1 -1
- package/lib/dist/resolution/swift-type-visibility.js +62 -104
- package/lib/dist/resolution/swift-type-visibility.js.map +1 -1
- package/lib/dist/resolution/synth-utils.js +1 -22
- package/lib/dist/resolution/synth-utils.js.map +1 -1
- package/lib/dist/resolution/tanstack-router-synthesizer.js +0 -32
- package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/tauri-synthesizer.d.ts +37 -0
- package/lib/dist/resolution/tauri-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/tauri-synthesizer.js +1038 -0
- package/lib/dist/resolution/tauri-synthesizer.js.map +1 -0
- package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/tier-synthesizer.js +35 -177
- package/lib/dist/resolution/tier-synthesizer.js.map +1 -1
- package/lib/dist/resolution/type-parameters.d.ts +23 -0
- package/lib/dist/resolution/type-parameters.d.ts.map +1 -1
- package/lib/dist/resolution/type-parameters.js +52 -54
- package/lib/dist/resolution/type-parameters.js.map +1 -1
- package/lib/dist/resolution/types.d.ts +192 -11
- package/lib/dist/resolution/types.d.ts.map +1 -1
- package/lib/dist/resolution/types.js +0 -47
- package/lib/dist/resolution/types.js.map +1 -1
- package/lib/dist/resolution/vbnet-receivers.d.ts +92 -0
- package/lib/dist/resolution/vbnet-receivers.d.ts.map +1 -0
- package/lib/dist/resolution/vbnet-receivers.js +1482 -0
- package/lib/dist/resolution/vbnet-receivers.js.map +1 -0
- package/lib/dist/resolution/vue-router-synthesizer.js +0 -31
- package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/workspace-packages.d.ts +206 -15
- package/lib/dist/resolution/workspace-packages.d.ts.map +1 -1
- package/lib/dist/resolution/workspace-packages.js +573 -152
- package/lib/dist/resolution/workspace-packages.js.map +1 -1
- package/lib/dist/search/identifier-segments.js +2 -93
- package/lib/dist/search/identifier-segments.js.map +1 -1
- package/lib/dist/search/query-parser.js +0 -54
- package/lib/dist/search/query-parser.js.map +1 -1
- package/lib/dist/search/query-paths.js +0 -167
- package/lib/dist/search/query-paths.js.map +1 -1
- package/lib/dist/search/query-utils.d.ts +44 -0
- package/lib/dist/search/query-utils.d.ts.map +1 -1
- package/lib/dist/search/query-utils.js +120 -198
- package/lib/dist/search/query-utils.js.map +1 -1
- package/lib/dist/sync/git-hooks.d.ts +14 -5
- package/lib/dist/sync/git-hooks.d.ts.map +1 -1
- package/lib/dist/sync/git-hooks.js +118 -65
- package/lib/dist/sync/git-hooks.js.map +1 -1
- package/lib/dist/sync/index.js +0 -14
- package/lib/dist/sync/index.js.map +1 -1
- package/lib/dist/sync/watch-policy.js +0 -45
- package/lib/dist/sync/watch-policy.js.map +1 -1
- package/lib/dist/sync/watcher.d.ts +29 -11
- package/lib/dist/sync/watcher.d.ts.map +1 -1
- package/lib/dist/sync/watcher.js +83 -487
- package/lib/dist/sync/watcher.js.map +1 -1
- package/lib/dist/sync/worktree.d.ts +7 -2
- package/lib/dist/sync/worktree.d.ts.map +1 -1
- package/lib/dist/sync/worktree.js +24 -97
- package/lib/dist/sync/worktree.js.map +1 -1
- package/lib/dist/telemetry/index.d.ts.map +1 -1
- package/lib/dist/telemetry/index.js +15 -135
- package/lib/dist/telemetry/index.js.map +1 -1
- package/lib/dist/types.d.ts +46 -0
- package/lib/dist/types.d.ts.map +1 -1
- package/lib/dist/types.js +15 -44
- package/lib/dist/types.js.map +1 -1
- package/lib/dist/ui/color.js +0 -19
- package/lib/dist/ui/color.js.map +1 -1
- package/lib/dist/ui/glyphs.js +2 -45
- package/lib/dist/ui/glyphs.js.map +1 -1
- package/lib/dist/ui/shimmer-progress.js +0 -21
- package/lib/dist/ui/shimmer-progress.js.map +1 -1
- package/lib/dist/ui/shimmer-worker.js +0 -22
- package/lib/dist/ui/shimmer-worker.js.map +1 -1
- package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -1
- package/lib/dist/ui-server/api/deadcode.js +2 -31
- package/lib/dist/ui-server/api/deadcode.js.map +1 -1
- package/lib/dist/ui-server/api/effects.js +0 -111
- package/lib/dist/ui-server/api/effects.js.map +1 -1
- package/lib/dist/ui-server/api/entrypoints.js +0 -142
- package/lib/dist/ui-server/api/entrypoints.js.map +1 -1
- package/lib/dist/ui-server/api/events.js +0 -145
- package/lib/dist/ui-server/api/events.js.map +1 -1
- package/lib/dist/ui-server/api/file.js +0 -80
- package/lib/dist/ui-server/api/file.js.map +1 -1
- package/lib/dist/ui-server/api/filecode.js +0 -95
- package/lib/dist/ui-server/api/filecode.js.map +1 -1
- package/lib/dist/ui-server/api/flow.js +0 -149
- package/lib/dist/ui-server/api/flow.js.map +1 -1
- package/lib/dist/ui-server/api/hierarchy.js +0 -28
- package/lib/dist/ui-server/api/hierarchy.js.map +1 -1
- package/lib/dist/ui-server/api/index.js +0 -88
- package/lib/dist/ui-server/api/index.js.map +1 -1
- package/lib/dist/ui-server/api/map.d.ts.map +1 -1
- package/lib/dist/ui-server/api/map.js +4 -317
- package/lib/dist/ui-server/api/map.js.map +1 -1
- package/lib/dist/ui-server/api/node.js +0 -111
- package/lib/dist/ui-server/api/node.js.map +1 -1
- package/lib/dist/ui-server/api/nodes.js +0 -16
- package/lib/dist/ui-server/api/nodes.js.map +1 -1
- package/lib/dist/ui-server/api/program.js +0 -90
- package/lib/dist/ui-server/api/program.js.map +1 -1
- package/lib/dist/ui-server/api/respond.js +0 -60
- package/lib/dist/ui-server/api/respond.js.map +1 -1
- package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -1
- package/lib/dist/ui-server/api/route-roots.js +2 -44
- package/lib/dist/ui-server/api/route-roots.js.map +1 -1
- package/lib/dist/ui-server/api/routes.d.ts.map +1 -1
- package/lib/dist/ui-server/api/routes.js +4 -60
- package/lib/dist/ui-server/api/routes.js.map +1 -1
- package/lib/dist/ui-server/api/screens.d.ts.map +1 -1
- package/lib/dist/ui-server/api/screens.js +4 -174
- package/lib/dist/ui-server/api/screens.js.map +1 -1
- package/lib/dist/ui-server/api/search.js +0 -62
- package/lib/dist/ui-server/api/search.js.map +1 -1
- package/lib/dist/ui-server/api/session.js +0 -58
- package/lib/dist/ui-server/api/session.js.map +1 -1
- package/lib/dist/ui-server/api/source.d.ts.map +1 -1
- package/lib/dist/ui-server/api/source.js +0 -161
- package/lib/dist/ui-server/api/source.js.map +1 -1
- package/lib/dist/ui-server/api/stats.js +0 -58
- package/lib/dist/ui-server/api/stats.js.map +1 -1
- package/lib/dist/ui-server/api/steps.d.ts.map +1 -1
- package/lib/dist/ui-server/api/steps.js +5 -381
- package/lib/dist/ui-server/api/steps.js.map +1 -1
- package/lib/dist/ui-server/api/trail-store.d.ts +3 -3
- package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -1
- package/lib/dist/ui-server/api/trail-store.js +24 -106
- package/lib/dist/ui-server/api/trail-store.js.map +1 -1
- package/lib/dist/ui-server/api/trails.d.ts.map +1 -1
- package/lib/dist/ui-server/api/trails.js +19 -94
- package/lib/dist/ui-server/api/trails.js.map +1 -1
- package/lib/dist/ui-server/api/when.js +0 -36
- package/lib/dist/ui-server/api/when.js.map +1 -1
- package/lib/dist/ui-server/api/wire.js +0 -58
- package/lib/dist/ui-server/api/wire.js.map +1 -1
- package/lib/dist/ui-server/assets.js +0 -35
- package/lib/dist/ui-server/assets.js.map +1 -1
- package/lib/dist/ui-server/constants.js +0 -26
- package/lib/dist/ui-server/constants.js.map +1 -1
- package/lib/dist/ui-server/highlight/bounded-tokenize.js +0 -25
- package/lib/dist/ui-server/highlight/bounded-tokenize.js.map +1 -1
- package/lib/dist/ui-server/highlight/index.js +1 -132
- package/lib/dist/ui-server/highlight/index.js.map +1 -1
- package/lib/dist/ui-server/highlight/languages.d.ts +3 -3
- package/lib/dist/ui-server/highlight/languages.js +0 -31
- package/lib/dist/ui-server/highlight/languages.js.map +1 -1
- package/lib/dist/ui-server/highlight/tokenize-worker.js +0 -5
- package/lib/dist/ui-server/highlight/tokenize-worker.js.map +1 -1
- package/lib/dist/ui-server/index.d.ts +25 -0
- package/lib/dist/ui-server/index.d.ts.map +1 -1
- package/lib/dist/ui-server/index.js +35 -103
- package/lib/dist/ui-server/index.js.map +1 -1
- package/lib/dist/ui-server/open-browser.js +0 -34
- package/lib/dist/ui-server/open-browser.js.map +1 -1
- package/lib/dist/ui-server/security.d.ts +5 -0
- package/lib/dist/ui-server/security.d.ts.map +1 -1
- package/lib/dist/ui-server/security.js +11 -147
- package/lib/dist/ui-server/security.js.map +1 -1
- package/lib/dist/ui-server/static.js +0 -41
- package/lib/dist/ui-server/static.js.map +1 -1
- package/lib/dist/upgrade/index.d.ts +18 -5
- package/lib/dist/upgrade/index.d.ts.map +1 -1
- package/lib/dist/upgrade/index.js +73 -229
- package/lib/dist/upgrade/index.js.map +1 -1
- package/lib/dist/upgrade/remove-binary.js +2 -67
- package/lib/dist/upgrade/remove-binary.js.map +1 -1
- package/lib/dist/upgrade/update-check.js +1 -81
- package/lib/dist/upgrade/update-check.js.map +1 -1
- package/lib/dist/utils.d.ts +69 -1
- package/lib/dist/utils.d.ts.map +1 -1
- package/lib/dist/utils.js +224 -266
- package/lib/dist/utils.js.map +1 -1
- package/lib/dist/worker-teardown.js +0 -47
- package/lib/dist/worker-teardown.js.map +1 -1
- package/lib/kernel/codegraph-kernel.node +2 -2
- package/lib/node_modules/.package-lock.json +4 -4
- package/lib/node_modules/ignore/README.md +138 -8
- package/lib/node_modules/ignore/index.d.ts +56 -20
- package/lib/node_modules/ignore/index.js +1033 -221
- package/lib/node_modules/ignore/legacy.js +871 -178
- package/lib/node_modules/ignore/package.json +10 -4
- package/lib/package.json +14 -8
- package/node.exe +2 -2
- package/package.json +1 -1
|
@@ -1,34 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Branch guards — the conditions under which a call site runs.
|
|
4
|
-
*
|
|
5
|
-
* An edge says `handlePress → openObjectDetail`. What a reader wants to know
|
|
6
|
-
* is that it happens **when `isCollected`** and **not while `isUploading`**:
|
|
7
|
-
*
|
|
8
|
-
* if (isUploading) return ← early-return guard: !isUploading
|
|
9
|
-
* if (isCollected) { ← if: isCollected
|
|
10
|
-
* openObjectDetail(item) ← the call site
|
|
11
|
-
*
|
|
12
|
-
* This module derives that from the AST at query time. Given a file, its
|
|
13
|
-
* language and a call site (line, column), it walks from the innermost node at
|
|
14
|
-
* that position up to the enclosing function boundary and records every
|
|
15
|
-
* branch it passes through: `if` / `else` / `else if`, the arms of a ternary,
|
|
16
|
-
* `switch` cases, the right side of `&&` / `||`, a `catch`, and — at each
|
|
17
|
-
* statement block on the way — the early exits that precede the site
|
|
18
|
-
* (`if (x) return`, Swift `guard x else { return }`).
|
|
19
|
-
*
|
|
20
|
-
* Nothing is stored in the index. The viewer and `codegraph_explore` already
|
|
21
|
-
* re-read source per request (drift checks, source windows, highlighting), the
|
|
22
|
-
* grammars are loaded in both processes, and a file parses in about a
|
|
23
|
-
* millisecond — so labels are computed where they are shown, from the source
|
|
24
|
-
* as it is now, and the index schema and the native kernel are untouched. A
|
|
25
|
-
* small LRU keeps the last few parsed trees so a Symbol view that asks about
|
|
26
|
-
* forty call sites in one file parses it once.
|
|
27
|
-
*
|
|
28
|
-
* Only what the AST states is reported. Loops are not conditions and are not
|
|
29
|
-
* listed; a condition that cannot be read (a language without rules here, a
|
|
30
|
-
* file that will not parse) yields no label rather than a wrong one.
|
|
31
|
-
*/
|
|
32
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
33
3
|
if (k2 === undefined) k2 = k;
|
|
34
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -96,42 +66,29 @@ exports.memberTypesInTree = memberTypesInTree;
|
|
|
96
66
|
const fs = __importStar(require("fs"));
|
|
97
67
|
const grammars_1 = require("../extraction/grammars");
|
|
98
68
|
const parse_budget_1 = require("../extraction/parse-budget");
|
|
99
|
-
|
|
69
|
+
const utils_1 = require("../utils");
|
|
100
70
|
const MAX_TEXT = 80;
|
|
101
71
|
const JS_FAMILY = new Set(['typescript', 'javascript', 'tsx', 'jsx']);
|
|
102
|
-
/** Languages with walk rules below. Others yield no guards (never a wrong one). */
|
|
103
72
|
function supportsBranchGuards(language) {
|
|
104
73
|
return !!language && RULES_BY_LANGUAGE.has(language);
|
|
105
74
|
}
|
|
106
|
-
/**
|
|
107
|
-
* The label a rail or a flow connector prints: the conditions in execution
|
|
108
|
-
* order, joined with `&&`, each negated one written as `!x`. Empty when the
|
|
109
|
-
* site is unconditional.
|
|
110
|
-
*/
|
|
111
75
|
function guardLabel(guards) {
|
|
112
76
|
return guards.map(renderGuard).join(' && ');
|
|
113
77
|
}
|
|
114
78
|
function renderGuard(g) {
|
|
115
79
|
if (g.form === 'catch')
|
|
116
80
|
return g.text;
|
|
117
|
-
// `if (!object?.id || !object?.name)` joined to the guard before it with
|
|
118
|
-
// `&&` would read as two conditions: it keeps its parentheses.
|
|
119
81
|
if (!g.negated)
|
|
120
82
|
return hasTopLevelOr(g.text) ? `(${g.text})` : g.text;
|
|
121
|
-
// `!x` negated reads back as `x`; a simple operand takes a bare `!`;
|
|
122
|
-
// anything with operators is parenthesised so the negation is unambiguous.
|
|
123
83
|
if (/^!(?![=])/.test(g.text) && isSimpleOperand(g.text.slice(1)))
|
|
124
84
|
return g.text.slice(1);
|
|
125
85
|
if (/^not\s+/.test(g.text) && isSimpleOperand(g.text.slice(4).trim()))
|
|
126
86
|
return g.text.slice(4).trim();
|
|
127
|
-
// One comparison flips instead of wrapping: the reader of a Go `if err !=
|
|
128
|
-
// nil { return }` wants `err == nil`, not `!(err != nil)`.
|
|
129
87
|
const flipped = flipComparison(g.text);
|
|
130
88
|
if (flipped !== null)
|
|
131
89
|
return flipped;
|
|
132
90
|
return isSimpleOperand(g.text) ? `!${g.text}` : `!(${g.text})`;
|
|
133
91
|
}
|
|
134
|
-
/** `a != b` → `a == b`, `x is None` → `x is not None`; null when the text is not one plain comparison. */
|
|
135
92
|
function flipComparison(text) {
|
|
136
93
|
if (/&&|\|\||\band\b|\bor\b|\?/.test(text))
|
|
137
94
|
return null;
|
|
@@ -144,7 +101,6 @@ function flipComparison(text) {
|
|
|
144
101
|
const op = flip[m[2]];
|
|
145
102
|
return op ? `${m[1].trim()} ${op} ${m[3].trim()}` : null;
|
|
146
103
|
}
|
|
147
|
-
/** A `||` outside every bracket and string — the condition is a disjunction as written. */
|
|
148
104
|
function hasTopLevelOr(text) {
|
|
149
105
|
let depth = 0;
|
|
150
106
|
let quote = null;
|
|
@@ -169,8 +125,6 @@ function hasTopLevelOr(text) {
|
|
|
169
125
|
return false;
|
|
170
126
|
}
|
|
171
127
|
function isSimpleOperand(text) {
|
|
172
|
-
// A name, a member chain, or one call on it — `Objects.equals(owner.getId(), id)`
|
|
173
|
-
// included: the parens must balance and nothing may sit outside them.
|
|
174
128
|
if (/[=<>]/.test(text) || /\s(?:&&|\|\||and|or)\s/.test(text))
|
|
175
129
|
return false;
|
|
176
130
|
const m = /^([\w$.?!]+)(\(.*\))?$/s.exec(text);
|
|
@@ -193,13 +147,7 @@ function isSimpleOperand(text) {
|
|
|
193
147
|
}
|
|
194
148
|
const TREE_CACHE_SIZE = 8;
|
|
195
149
|
const treeCache = new Map();
|
|
196
|
-
/**
|
|
197
|
-
* Files above this size are not parsed for labels. A 300 KB source file costs
|
|
198
|
-
* tens of milliseconds to parse, and a Symbol view is budgeted at 100 ms end
|
|
199
|
-
* to end; a call site in such a file simply shows no `when`.
|
|
200
|
-
*/
|
|
201
150
|
exports.MAX_PARSE_BYTES = 256 * 1024;
|
|
202
|
-
/** The `web-tree-sitter` trees held above are native memory: evict explicitly. */
|
|
203
151
|
function remember(path, entry) {
|
|
204
152
|
const old = treeCache.get(path);
|
|
205
153
|
if (old)
|
|
@@ -255,12 +203,6 @@ async function parse(source, language) {
|
|
|
255
203
|
function siteKey(site) {
|
|
256
204
|
return `${site.line}:${typeof site.column === 'number' ? site.column : ''}${site.callee ? `:${site.callee}` : ''}`;
|
|
257
205
|
}
|
|
258
|
-
/**
|
|
259
|
-
* Guards for many call sites in one file, keyed by {@link siteKey}. The file
|
|
260
|
-
* is parsed once (and cached across requests until it changes on disk). A
|
|
261
|
-
* language without rules, or a file that cannot be read or parsed, yields an
|
|
262
|
-
* empty map.
|
|
263
|
-
*/
|
|
264
206
|
async function guardsForFile(absPath, language, sites) {
|
|
265
207
|
const out = new Map();
|
|
266
208
|
if (!supportsBranchGuards(language) || sites.length === 0)
|
|
@@ -276,12 +218,6 @@ async function guardsForFile(absPath, language, sites) {
|
|
|
276
218
|
}
|
|
277
219
|
return out;
|
|
278
220
|
}
|
|
279
|
-
/**
|
|
280
|
-
* Synchronous twin of {@link guardsForFile} for callers that cannot await
|
|
281
|
-
* (the explore text builder). It only serves languages whose grammar is
|
|
282
|
-
* ALREADY loaded — see {@link warmBranchGuardGrammars} — and yields an empty
|
|
283
|
-
* map otherwise, never a wrong label.
|
|
284
|
-
*/
|
|
285
221
|
function guardsForFileSync(absPath, language, sites) {
|
|
286
222
|
const out = new Map();
|
|
287
223
|
if (!supportsBranchGuards(language) || sites.length === 0)
|
|
@@ -321,7 +257,6 @@ function guardsForFileSync(absPath, language, sites) {
|
|
|
321
257
|
}
|
|
322
258
|
return out;
|
|
323
259
|
}
|
|
324
|
-
/** The languages with rules here — what {@link warmBranchGuardGrammars} loads. */
|
|
325
260
|
exports.BRANCH_GUARD_LANGUAGES = [
|
|
326
261
|
'typescript',
|
|
327
262
|
'tsx',
|
|
@@ -337,16 +272,9 @@ exports.BRANCH_GUARD_LANGUAGES = [
|
|
|
337
272
|
'cpp',
|
|
338
273
|
'objc',
|
|
339
274
|
];
|
|
340
|
-
// =============================================================================
|
|
341
|
-
// Call arguments — what a site passes
|
|
342
|
-
// =============================================================================
|
|
343
|
-
/** Longest argument list kept before it is cut with an ellipsis. */
|
|
344
275
|
const MAX_ARGS_TEXT = 96;
|
|
345
|
-
/** Longest single argument (a string literal, a name) kept whole. */
|
|
346
276
|
const MAX_ARG_TEXT = 40;
|
|
347
|
-
/** Object keys listed before `…` stands for the rest. */
|
|
348
277
|
const MAX_OBJECT_KEYS = 4;
|
|
349
|
-
/** Call nodes, across the grammars with rules here: JS, Swift, Python, Java, Kotlin, C#, Go, C. */
|
|
350
278
|
const CALL_TYPES = new Set([
|
|
351
279
|
'call_expression',
|
|
352
280
|
'new_expression',
|
|
@@ -395,17 +323,6 @@ const FUNCTION_TYPES = new Set([
|
|
|
395
323
|
'anonymous_function',
|
|
396
324
|
'anonymous_method_expression',
|
|
397
325
|
]);
|
|
398
|
-
/**
|
|
399
|
-
* The arguments a call site passes, as written, abbreviated to what a reader
|
|
400
|
-
* scans for: a string literal whole (a storage key, a URL, a message), a name
|
|
401
|
-
* whole, an object as its keys (`{ email, password }`), an array as `[…]`, a
|
|
402
|
-
* function as `() => …`, a nested call as `f(…)`. The conditions say WHEN a
|
|
403
|
-
* step runs; this says WITH WHAT — `SecureStore.setItemAsync('userEmail',
|
|
404
|
-
* values.email)` is a different fact from `SecureStore.setItemAsync`.
|
|
405
|
-
*
|
|
406
|
-
* Keyed by {@link siteKey} like the guards, read from the same cached tree.
|
|
407
|
-
* A site that is not inside a call, or a language without rules, is absent.
|
|
408
|
-
*/
|
|
409
326
|
async function callArgumentsForFile(absPath, language, sites) {
|
|
410
327
|
const out = new Map();
|
|
411
328
|
if (!supportsBranchGuards(language) || sites.length === 0)
|
|
@@ -423,7 +340,6 @@ async function callArgumentsForFile(absPath, language, sites) {
|
|
|
423
340
|
}
|
|
424
341
|
return out;
|
|
425
342
|
}
|
|
426
|
-
/** {@link callArgumentsForFile} over source text — the test surface. */
|
|
427
343
|
async function callArgumentsInSource(source, language, line, column) {
|
|
428
344
|
if (!supportsBranchGuards(language))
|
|
429
345
|
return null;
|
|
@@ -440,9 +356,7 @@ async function callArgumentsInSource(source, language, line, column) {
|
|
|
440
356
|
function callArgumentsInTree(root, source, line, column) {
|
|
441
357
|
return callSiteInTree(root, source, line, column)?.args ?? null;
|
|
442
358
|
}
|
|
443
|
-
/** A node the climb to an enclosing call must not cross: the call is then a statement of its own inside a callback. */
|
|
444
359
|
const CALL_BOUNDARY = /function|lambda|closure|block|statement|body|declaration/;
|
|
445
|
-
/** The nearest call whose ARGUMENTS contain `call`, as its callee chain; null when there is none this side of a function or block. */
|
|
446
360
|
function enclosingCallText(call) {
|
|
447
361
|
for (let node = call.parent, up = 0; node && up < 12; node = node.parent, up++) {
|
|
448
362
|
if (CALL_BOUNDARY.test(node.type))
|
|
@@ -457,7 +371,6 @@ function enclosingCallText(call) {
|
|
|
457
371
|
return null;
|
|
458
372
|
}
|
|
459
373
|
const STATUS_KEY = /^(?:status|statusCode|status_code|code)$/;
|
|
460
|
-
/** `{ status: 201 }` inside an argument — the literal an abbreviated object hides. */
|
|
461
374
|
function statusPropertyIn(node, depth = 0) {
|
|
462
375
|
if (depth > 2)
|
|
463
376
|
return null;
|
|
@@ -475,13 +388,9 @@ function statusPropertyIn(node, depth = 0) {
|
|
|
475
388
|
}
|
|
476
389
|
return null;
|
|
477
390
|
}
|
|
478
|
-
/** Longest callee text kept before it is cut. */
|
|
479
391
|
const MAX_CALLEE_TEXT = 96;
|
|
480
|
-
/** The call node a site belongs to: climb from the callee to the call. A few levels cover a member chain. */
|
|
481
392
|
function callAt(root, source, line, column, callee) {
|
|
482
393
|
const row = line - 1;
|
|
483
|
-
// The recorded column may sit a character off the callee (a 1-based
|
|
484
|
-
// column, the space before `prisma`): a near miss is tried before giving up.
|
|
485
394
|
const columns = column === null ? [firstNonBlankColumn(source, row)] : [column, column + 1, Math.max(0, column - 1), firstNonBlankColumn(source, row)];
|
|
486
395
|
const want = callee ? callee.split(/[.:]/).pop() ?? callee : null;
|
|
487
396
|
for (const col of columns) {
|
|
@@ -497,8 +406,6 @@ function callAt(root, source, line, column, callee) {
|
|
|
497
406
|
first = node;
|
|
498
407
|
if (want === null)
|
|
499
408
|
return node;
|
|
500
|
-
// A chain's position is its start: `res.status(201).json(…)` at `res`
|
|
501
|
-
// meets `res.status(…)` first; the call that is THIS one names `json`.
|
|
502
409
|
const container = argumentsOf(node);
|
|
503
410
|
const text = container ? calleeChainText(node, container) : '';
|
|
504
411
|
if ((text.replace(/\([^()]*\)/g, '').split(/[.:]/).pop() ?? '') === want)
|
|
@@ -548,14 +455,7 @@ function callSiteInTree(root, source, line, column, want) {
|
|
|
548
455
|
}
|
|
549
456
|
const BODY_REPLY = /^(?:res|response|reply|rep|ctx|c|context)\.(?:json|jsonp|send|render|sendFile|download|end|text|html|body)$/;
|
|
550
457
|
const STATEMENT_BLOCKS = new Set(['statement_block', 'program', 'block', 'class_body', 'module']);
|
|
551
|
-
/** Statements looked back through for a status the reply's own chain does not carry. */
|
|
552
458
|
const STATUS_LOOKBACK = 6;
|
|
553
|
-
/**
|
|
554
|
-
* `res.status(202); res.json(user)` — the status set by an earlier statement
|
|
555
|
-
* in the same block, when the reply's own chain sets none. Only a statement
|
|
556
|
-
* that IS the status call counts (`res.status(404)` inside an `if` before it
|
|
557
|
-
* is another path, not this reply's); the first one found walking back wins.
|
|
558
|
-
*/
|
|
559
459
|
function statusSetBefore(call, callee) {
|
|
560
460
|
const bare = callee.replace(/\([^()]*\)/g, '');
|
|
561
461
|
if (!BODY_REPLY.test(bare) || /\b(?:status|code|sendStatus|writeHead)\(/.test(callee))
|
|
@@ -564,7 +464,7 @@ function statusSetBefore(call, callee) {
|
|
|
564
464
|
let statement = call;
|
|
565
465
|
while (statement.parent && !STATEMENT_BLOCKS.has(statement.parent.type))
|
|
566
466
|
statement = statement.parent;
|
|
567
|
-
const re = new RegExp(`^\\s*(?:await\\s+)?${receiver}\\s*\\.\\s*(?:status|code)\\s*\\(\\s*([1-5]\\d{2})\\s*\\)\\s*;?\\s*$|^\\s*${receiver}\\s*\\.\\s*statusCode\\s*=\\s*([1-5]\\d{2})\\s*;?\\s*$`);
|
|
467
|
+
const re = new RegExp(`^\\s*(?:await\\s+)?${(0, utils_1.escapeRegExp)(receiver)}\\s*\\.\\s*(?:status|code)\\s*\\(\\s*([1-5]\\d{2})\\s*\\)\\s*;?\\s*$|^\\s*${(0, utils_1.escapeRegExp)(receiver)}\\s*\\.\\s*statusCode\\s*=\\s*([1-5]\\d{2})\\s*;?\\s*$`);
|
|
568
468
|
let prev = statement.previousNamedSibling;
|
|
569
469
|
for (let i = 0; prev && i < STATUS_LOOKBACK; i++, prev = prev.previousNamedSibling) {
|
|
570
470
|
if (prev.type === 'comment')
|
|
@@ -575,20 +475,13 @@ function statusSetBefore(call, callee) {
|
|
|
575
475
|
}
|
|
576
476
|
return null;
|
|
577
477
|
}
|
|
578
|
-
/** The text of a call before its arguments, normalised to a member chain. */
|
|
579
478
|
function calleeChainText(call, container) {
|
|
580
|
-
// Kotlin and Swift wrap the arguments in a `call_suffix`; the callee is
|
|
581
|
-
// everything before that suffix.
|
|
582
479
|
let end = container.startIndex;
|
|
583
480
|
const suffix = container.parent && container.parent.type === 'call_suffix' ? container.parent : null;
|
|
584
481
|
if (suffix)
|
|
585
482
|
end = suffix.startIndex;
|
|
586
483
|
let text = collapse(call.text.slice(0, Math.max(0, end - call.startIndex)));
|
|
587
484
|
text = text.replace(/^(?:await|new|yield|return)\s+/, '').replace(/^(?:await|new)\s+/, '');
|
|
588
|
-
// Empty every nested argument list, innermost first: `a(b(c)).d` → `a().d`
|
|
589
|
-
// — keeping one short literal or name (`res.status(404).json`,
|
|
590
|
-
// `ResponseEntity.status(HttpStatus.NOT_FOUND).body`), which is the fact a
|
|
591
|
-
// reader of the chain wants.
|
|
592
485
|
for (let i = 0; i < 6 && /\([^()]*\)/.test(text); i++) {
|
|
593
486
|
text = text.replace(/\(([^()]*)\)/g, (_m, inner) => (/^\s*[\w.]{1,28}\s*$/.test(inner) ? `(${inner.trim()})` : '()'));
|
|
594
487
|
}
|
|
@@ -600,7 +493,6 @@ function calleeChainText(call, container) {
|
|
|
600
493
|
.replace(/\([^()]*\)$/, '');
|
|
601
494
|
return text.length > MAX_CALLEE_TEXT ? `${text.slice(0, MAX_CALLEE_TEXT - 1)}…` : text;
|
|
602
495
|
}
|
|
603
|
-
/** Both halves of every site, keyed by {@link siteKey}, from one cached tree. */
|
|
604
496
|
async function callSitesForFile(absPath, language, sites) {
|
|
605
497
|
const out = new Map();
|
|
606
498
|
if (!supportsBranchGuards(language) || sites.length === 0)
|
|
@@ -618,7 +510,6 @@ async function callSitesForFile(absPath, language, sites) {
|
|
|
618
510
|
}
|
|
619
511
|
return out;
|
|
620
512
|
}
|
|
621
|
-
/** {@link callSitesForFile} over source text — the test surface. */
|
|
622
513
|
async function callSiteInSource(source, language, line, column) {
|
|
623
514
|
if (!supportsBranchGuards(language))
|
|
624
515
|
return null;
|
|
@@ -632,7 +523,6 @@ async function callSiteInSource(source, language, line, column) {
|
|
|
632
523
|
tree.delete();
|
|
633
524
|
}
|
|
634
525
|
}
|
|
635
|
-
/** The node holding a call's arguments: the `arguments` field, a container child, or Swift's `call_suffix` contents. */
|
|
636
526
|
function argumentsOf(call) {
|
|
637
527
|
const field = call.childForFieldName('arguments');
|
|
638
528
|
if (field)
|
|
@@ -656,20 +546,17 @@ function argumentsOf(call) {
|
|
|
656
546
|
}
|
|
657
547
|
function abbreviateArgument(node, source) {
|
|
658
548
|
const type = node.type;
|
|
659
|
-
// Python `name=value`, C# `name: value` — the name is half the meaning.
|
|
660
549
|
if (type === 'keyword_argument') {
|
|
661
550
|
const name = node.childForFieldName('name');
|
|
662
551
|
const value = node.childForFieldName('value');
|
|
663
552
|
return `${name?.text ?? ''}=${value ? abbreviateArgument(value, source) : ''}`;
|
|
664
553
|
}
|
|
665
554
|
if (type === 'argument') {
|
|
666
|
-
// C#: an `argument` wraps the expression, optionally with a name.
|
|
667
555
|
const name = node.childForFieldName('name');
|
|
668
556
|
const inner = lastNamed(node);
|
|
669
557
|
const value = inner ? abbreviateArgument(inner, source) : cut(collapse(node.text), MAX_ARG_TEXT);
|
|
670
558
|
return name && inner && name.id !== inner.id ? `${name.text}: ${value}` : value;
|
|
671
559
|
}
|
|
672
|
-
// Go `gin.H{"error": err}` / `User{Name: n}`: the type, then the braces.
|
|
673
560
|
if (type === 'composite_literal') {
|
|
674
561
|
const t = node.childForFieldName('type');
|
|
675
562
|
return `${t ? cut(collapse(t.text), 24) : ''}{…}`;
|
|
@@ -695,7 +582,6 @@ function abbreviateArgument(node, source) {
|
|
|
695
582
|
const name = callee ? cut(collapse(callee.text), 28) : '';
|
|
696
583
|
return `${type === 'new_expression' ? 'new ' : ''}${name}(…)`;
|
|
697
584
|
}
|
|
698
|
-
// Swift `label: value` — the label is half the meaning (`withName:`).
|
|
699
585
|
if (type === 'value_argument') {
|
|
700
586
|
const named = [];
|
|
701
587
|
for (let i = 0; i < node.namedChildCount; i++) {
|
|
@@ -712,7 +598,6 @@ function abbreviateArgument(node, source) {
|
|
|
712
598
|
return '{ … }';
|
|
713
599
|
return cut(collapse(node.text), MAX_ARG_TEXT);
|
|
714
600
|
}
|
|
715
|
-
/** `{ email, password, …}` — the keys an object literal passes, not its bulk. */
|
|
716
601
|
function objectKeys(node, source) {
|
|
717
602
|
const keys = [];
|
|
718
603
|
let more = 0;
|
|
@@ -742,7 +627,6 @@ function objectKeys(node, source) {
|
|
|
742
627
|
return '{…}';
|
|
743
628
|
return `{ ${keys.join(', ')}${more > 0 ? ', …' : ''} }`;
|
|
744
629
|
}
|
|
745
|
-
/** Callees whose function argument runs LATER — a callback, not a call. Matched on the last segment. */
|
|
746
630
|
const LATER_CALLEES = new Set([
|
|
747
631
|
'useEffect',
|
|
748
632
|
'useLayoutEffect',
|
|
@@ -765,7 +649,6 @@ const LATER_CALLEES = new Set([
|
|
|
765
649
|
'runOnUI',
|
|
766
650
|
'scheduleOnRN',
|
|
767
651
|
]);
|
|
768
|
-
/** The walk up never leaves the function the site belongs to — unless that function is inline. */
|
|
769
652
|
const TRIGGER_BOUNDARIES = new Set(['function_declaration', 'method_definition', 'class_declaration', 'class_body', 'program']);
|
|
770
653
|
const MAX_TRIGGER_CLIMB = 24;
|
|
771
654
|
async function triggersForFile(absPath, language, sites) {
|
|
@@ -785,7 +668,6 @@ async function triggersForFile(absPath, language, sites) {
|
|
|
785
668
|
}
|
|
786
669
|
return out;
|
|
787
670
|
}
|
|
788
|
-
/** {@link triggersForFile} over source text — the test surface. */
|
|
789
671
|
async function triggerInSource(source, language, line, column) {
|
|
790
672
|
if (!JS_FAMILY.has(language))
|
|
791
673
|
return null;
|
|
@@ -804,15 +686,11 @@ function triggerInTree(root, source, line, column) {
|
|
|
804
686
|
const col = column ?? firstNonBlankColumn(source, row);
|
|
805
687
|
let node = innermostAt(root, row, col);
|
|
806
688
|
let prev = null;
|
|
807
|
-
// Whether the climb crossed an inline function: `onPress={() => go()}`
|
|
808
|
-
// fires later, `behavior={isAndroid() ? 'a' : 'b'}` runs at render.
|
|
809
689
|
let deferred = false;
|
|
810
690
|
for (let up = 0; node && up < MAX_TRIGGER_CLIMB; up++, prev = node, node = node.parent) {
|
|
811
691
|
const type = node.type;
|
|
812
692
|
if (TRIGGER_BOUNDARIES.has(type))
|
|
813
693
|
return null;
|
|
814
|
-
// A named handler is its own story: `const handleX = useCallback(() => …)`
|
|
815
|
-
// binds a name, and whoever uses the name is the trigger of what is inside.
|
|
816
694
|
if (type === 'arrow_function' || type === 'function_expression') {
|
|
817
695
|
const p = node.parent;
|
|
818
696
|
if (p?.type === 'variable_declarator')
|
|
@@ -827,8 +705,6 @@ function triggerInTree(root, source, line, column) {
|
|
|
827
705
|
if (type === 'jsx_attribute') {
|
|
828
706
|
const name = node.namedChild(0);
|
|
829
707
|
const propName = name ? name.text : 'prop';
|
|
830
|
-
// An event prop, or any prop given a function: fired later. A value
|
|
831
|
-
// computed in the attribute (`behavior={isAndroid() ? …}`) is not.
|
|
832
708
|
if (!deferred && !/^on[A-Z]/.test(propName))
|
|
833
709
|
return null;
|
|
834
710
|
const element = node.parent;
|
|
@@ -839,8 +715,6 @@ function triggerInTree(root, source, line, column) {
|
|
|
839
715
|
const key = node.childForFieldName('key');
|
|
840
716
|
const keyText = key ? key.text.replace(/^['"`]|['"`]$/g, '') : '';
|
|
841
717
|
if (/^on[A-Z]\w*$/.test(keyText)) {
|
|
842
|
-
// `useFormik({ onSubmit: … })`, `Alert.alert(t, m, [{ onPress: … }])`:
|
|
843
|
-
// the object — possibly inside an array — is an argument of a call.
|
|
844
718
|
let holder = node.parent;
|
|
845
719
|
for (let hop = 0; holder && hop < 4 && (holder.type === 'object' || holder.type === 'array' || holder.type === 'pair'); hop++) {
|
|
846
720
|
holder = holder.parent;
|
|
@@ -860,12 +734,10 @@ function triggerInTree(root, source, line, column) {
|
|
|
860
734
|
}
|
|
861
735
|
return null;
|
|
862
736
|
}
|
|
863
|
-
/** A call's callee as written: `nativeEmitter.addListener`, `Alert.alert`, `useFormik`. */
|
|
864
737
|
function calleeText(call) {
|
|
865
738
|
const callee = call.childForFieldName('function') ?? call.childForFieldName('constructor');
|
|
866
739
|
return callee ? cut(collapseText(callee.text), 40) : null;
|
|
867
740
|
}
|
|
868
|
-
/** The last segment of a callee: `nativeEmitter.addListener` → `addListener`. */
|
|
869
741
|
function lastSegment(text) {
|
|
870
742
|
if (text === null)
|
|
871
743
|
return null;
|
|
@@ -886,7 +758,6 @@ function firstNonBlankColumn(source, row) {
|
|
|
886
758
|
const m = line.match(/\S/);
|
|
887
759
|
return m ? (m.index ?? 0) : 0;
|
|
888
760
|
}
|
|
889
|
-
/** Load the grammars {@link guardsForFileSync} needs; a no-op once loaded, never throws. */
|
|
890
761
|
async function warmBranchGuardGrammars(only) {
|
|
891
762
|
const wanted = exports.BRANCH_GUARD_LANGUAGES.filter((l) => !only || only.includes(l));
|
|
892
763
|
if (wanted.length === 0)
|
|
@@ -895,10 +766,8 @@ async function warmBranchGuardGrammars(only) {
|
|
|
895
766
|
await (0, grammars_1.loadGrammarsForLanguages)(wanted);
|
|
896
767
|
}
|
|
897
768
|
catch {
|
|
898
|
-
// Explore prints no `when` for that language; nothing else changes.
|
|
899
769
|
}
|
|
900
770
|
}
|
|
901
|
-
/** Guards for one site in source text — the test seam; production reads files. */
|
|
902
771
|
async function guardsInSource(source, language, line, column = null) {
|
|
903
772
|
if (!supportsBranchGuards(language))
|
|
904
773
|
return [];
|
|
@@ -912,7 +781,6 @@ async function guardsInSource(source, language, line, column = null) {
|
|
|
912
781
|
tree.delete();
|
|
913
782
|
}
|
|
914
783
|
}
|
|
915
|
-
/** Loops for one site in source text — the test seam; production reads files. */
|
|
916
784
|
async function loopsInSource(source, language, line, column = null) {
|
|
917
785
|
if (!supportsBranchGuards(language))
|
|
918
786
|
return [];
|
|
@@ -926,7 +794,6 @@ async function loopsInSource(source, language, line, column = null) {
|
|
|
926
794
|
tree.delete();
|
|
927
795
|
}
|
|
928
796
|
}
|
|
929
|
-
/** Loop node types across the grammars with rules here. A type absent yields nothing, never a wrong label. */
|
|
930
797
|
const LOOP_TYPES = new Map([
|
|
931
798
|
['for_statement', 'each'],
|
|
932
799
|
['for_in_statement', 'each'],
|
|
@@ -942,13 +809,6 @@ const LOOP_TYPES = new Map([
|
|
|
942
809
|
['do_while_statement', 'while'],
|
|
943
810
|
['repeat_while_statement', 'while'],
|
|
944
811
|
]);
|
|
945
|
-
/**
|
|
946
|
-
* The loops a site is written inside, outermost first — what tells a reading in
|
|
947
|
-
* the code's order that a run of calls happens once PER ITEM rather than once.
|
|
948
|
-
* The climb is the guards' climb (the same boundaries, the same transparent
|
|
949
|
-
* inline functions), so a callback's body is read in its own function and a
|
|
950
|
-
* `.forEach` body under the loop it is written in.
|
|
951
|
-
*/
|
|
952
812
|
function loopsInTree(root, source, language, line, column) {
|
|
953
813
|
const rules = RULES_BY_LANGUAGE.get(language);
|
|
954
814
|
if (!rules)
|
|
@@ -978,7 +838,6 @@ function loopsInTree(root, source, language, line, column) {
|
|
|
978
838
|
continue;
|
|
979
839
|
}
|
|
980
840
|
const kind = LOOP_TYPES.get(parent.type);
|
|
981
|
-
// The header, not the body: a site is in the loop only when it is under it.
|
|
982
841
|
if (kind && !isField(parent, 'condition', node) && !isField(parent, 'value', node)) {
|
|
983
842
|
const text = loopHeader(parent);
|
|
984
843
|
if (text)
|
|
@@ -989,7 +848,6 @@ function loopsInTree(root, source, language, line, column) {
|
|
|
989
848
|
found.reverse();
|
|
990
849
|
return found;
|
|
991
850
|
}
|
|
992
|
-
/** Loops for many sites in one file, keyed by {@link siteKey}. */
|
|
993
851
|
async function loopsForFile(absPath, language, sites) {
|
|
994
852
|
const out = new Map();
|
|
995
853
|
if (!supportsBranchGuards(language) || sites.length === 0)
|
|
@@ -1004,7 +862,6 @@ async function loopsForFile(absPath, language, sites) {
|
|
|
1004
862
|
}
|
|
1005
863
|
return out;
|
|
1006
864
|
}
|
|
1007
|
-
/** A loop's header as written, keyword and braces dropped: `item of items`, `queue.length > 0`. */
|
|
1008
865
|
function loopHeader(loop) {
|
|
1009
866
|
const body = loop.childForFieldName('body') ?? namedChildren(loop).find((c) => BLOCKISH.has(c.type)) ?? null;
|
|
1010
867
|
const raw = body && body.startIndex > loop.startIndex ? loop.text.slice(0, body.startIndex - loop.startIndex) : loop.text;
|
|
@@ -1014,15 +871,9 @@ function loopHeader(loop) {
|
|
|
1014
871
|
const inner = /^\((.*)\)$/s.exec(text);
|
|
1015
872
|
if (inner)
|
|
1016
873
|
text = inner[1].trim();
|
|
1017
|
-
// `const item of items` reads as `item of items`; the binding word is noise here.
|
|
1018
874
|
text = text.replace(/^(?:const|let|var|val|final)\s+/, '');
|
|
1019
875
|
return cut(text, 60);
|
|
1020
876
|
}
|
|
1021
|
-
/**
|
|
1022
|
-
* The walk. `line` is 1-based, `column` 0-based (null → first non-blank).
|
|
1023
|
-
* Returns the guards outermost first — execution order, the way a reader
|
|
1024
|
-
* would list them.
|
|
1025
|
-
*/
|
|
1026
877
|
function guardsInTree(root, source, language, line, column) {
|
|
1027
878
|
const row = line - 1;
|
|
1028
879
|
if (row < 0)
|
|
@@ -1040,8 +891,6 @@ function guardsInTree(root, source, language, line, column) {
|
|
|
1040
891
|
if (!rules)
|
|
1041
892
|
return [];
|
|
1042
893
|
const found = [];
|
|
1043
|
-
// Innermost → outermost. `found` is reversed at the end, so within one level
|
|
1044
|
-
// anything meant to read as OUTER must be pushed LATER.
|
|
1045
894
|
while (node) {
|
|
1046
895
|
const parent = node.parent;
|
|
1047
896
|
if (!parent || rules.boundaries.has(parent.type))
|
|
@@ -1053,9 +902,6 @@ function guardsInTree(root, source, language, line, column) {
|
|
|
1053
902
|
node = parent;
|
|
1054
903
|
continue;
|
|
1055
904
|
}
|
|
1056
|
-
// Anything `enclosing` pushed came from THIS construct, and the arm the
|
|
1057
|
-
// site is in is the child the walk came up through: stamp both, unless the
|
|
1058
|
-
// rule already named a different branch (a `switch` case's is the switch).
|
|
1059
905
|
const before = found.length;
|
|
1060
906
|
rules.enclosing(parent, node, found);
|
|
1061
907
|
for (let i = before; i < found.length; i++) {
|
|
@@ -1073,12 +919,6 @@ function guardsInTree(root, source, language, line, column) {
|
|
|
1073
919
|
found.reverse();
|
|
1074
920
|
return found;
|
|
1075
921
|
}
|
|
1076
|
-
/**
|
|
1077
|
-
* The innermost named node containing (row, col). `descendantForPosition` is
|
|
1078
|
-
* the fast path, but some grammars (Swift's `statements`) answer with the
|
|
1079
|
-
* container, so the result is refined by descending while a named child still
|
|
1080
|
-
* contains the point.
|
|
1081
|
-
*/
|
|
1082
922
|
function innermostAt(root, row, col) {
|
|
1083
923
|
let node = root.descendantForPosition({ row, column: col });
|
|
1084
924
|
if (!node)
|
|
@@ -1106,23 +946,13 @@ function condText(node) {
|
|
|
1106
946
|
if (!node)
|
|
1107
947
|
return '';
|
|
1108
948
|
let n = node;
|
|
1109
|
-
// `(x)` — the parens are the statement's, not the condition's.
|
|
1110
949
|
while (n.type === 'parenthesized_expression' && n.namedChildCount === 1)
|
|
1111
950
|
n = n.namedChild(0);
|
|
1112
951
|
const text = n.text.replace(/\s+/g, ' ').trim();
|
|
1113
|
-
// A bare keyword is a grammar's error recovery (`let` from an `if let` it
|
|
1114
|
-
// could not parse), never a condition a reader can use.
|
|
1115
952
|
if (/^(?:let|var|case|try|await|guard|if|else|some|any)$/.test(text))
|
|
1116
953
|
return '';
|
|
1117
954
|
return text.length > MAX_TEXT ? text.slice(0, MAX_TEXT - 1) + '…' : text;
|
|
1118
955
|
}
|
|
1119
|
-
/**
|
|
1120
|
-
* One guard. `branch` names the construct the arm belongs to: by default the
|
|
1121
|
-
* node the walk is climbing THROUGH (an `if`, a ternary, a `catch`), which is
|
|
1122
|
-
* right whenever the construct is the site's parent — and overridden where it
|
|
1123
|
-
* is not, by a `switch` case (whose parent is the case) and by an early exit
|
|
1124
|
-
* (whose branch is the `if` that returned, several statements back).
|
|
1125
|
-
*/
|
|
1126
956
|
function guard(form, cond, negated, text, branch, exit) {
|
|
1127
957
|
const t = text ?? condText(cond);
|
|
1128
958
|
if (!t)
|
|
@@ -1136,17 +966,9 @@ function guard(form, cond, negated, text, branch, exit) {
|
|
|
1136
966
|
...(exit ? { exit } : {}),
|
|
1137
967
|
};
|
|
1138
968
|
}
|
|
1139
|
-
/** A branching construct's identity: where it starts, `line:column`. */
|
|
1140
969
|
function branchKey(node) {
|
|
1141
970
|
return `${node.startPosition.row + 1}:${node.startPosition.column}`;
|
|
1142
971
|
}
|
|
1143
|
-
/**
|
|
1144
|
-
* Containers whose LAST statement decides how the whole thing leaves: a block,
|
|
1145
|
-
* and the clause wrappers a grammar puts an arm's block inside (`else_clause`,
|
|
1146
|
-
* `except_clause`) — the walk climbs through those, so the node it hands back
|
|
1147
|
-
* is the wrapper, not the block. A CONDITIONAL wrapper is not one of them: an
|
|
1148
|
-
* `elif` whose body raises does not mean the arm it is in always raises.
|
|
1149
|
-
*/
|
|
1150
972
|
const BLOCKISH = new Set([
|
|
1151
973
|
'statement_block',
|
|
1152
974
|
'block',
|
|
@@ -1161,12 +983,6 @@ const BLOCKISH = new Set([
|
|
|
1161
983
|
'except_clause',
|
|
1162
984
|
'finally_clause',
|
|
1163
985
|
]);
|
|
1164
|
-
/**
|
|
1165
|
-
* How a statement — or a block, by its last statement — leaves: `throw` for a
|
|
1166
|
-
* raised error, `return` for a return / break / continue, `exit` for a
|
|
1167
|
-
* language's other way out (Go's `panic`, C's `exit`) that the language rules
|
|
1168
|
-
* count as an exit but no keyword names. Null when it does not always leave.
|
|
1169
|
-
*/
|
|
1170
986
|
function exitKind(node) {
|
|
1171
987
|
if (!node)
|
|
1172
988
|
return null;
|
|
@@ -1175,15 +991,12 @@ function exitKind(node) {
|
|
|
1175
991
|
return 'throw';
|
|
1176
992
|
if (/^(?:return|break|continue|goto|yield)_statement$/.test(t))
|
|
1177
993
|
return 'return';
|
|
1178
|
-
// Swift's `control_transfer_statement` and Kotlin's `jump_expression` say
|
|
1179
|
-
// which in their first word.
|
|
1180
994
|
if (t === 'control_transfer_statement' || t === 'jump_expression')
|
|
1181
995
|
return /^\s*throw\b/.test(node.text) ? 'throw' : 'return';
|
|
1182
996
|
if (BLOCKISH.has(t))
|
|
1183
997
|
return exitKind(lastNamed(node));
|
|
1184
998
|
return null;
|
|
1185
999
|
}
|
|
1186
|
-
/** {@link exitKind}, or `exit` when the language's rules call it an exit and no keyword names it. */
|
|
1187
1000
|
function exitKindOr(node, exits) {
|
|
1188
1001
|
if (!exits)
|
|
1189
1002
|
return null;
|
|
@@ -1200,7 +1013,6 @@ function isField(parent, field, child) {
|
|
|
1200
1013
|
function lastNamed(node) {
|
|
1201
1014
|
return node.namedChildCount > 0 ? node.namedChild(node.namedChildCount - 1) : null;
|
|
1202
1015
|
}
|
|
1203
|
-
/** The named children of `parent` that come before `child`, in source order. */
|
|
1204
1016
|
function precedingSiblings(parent, child) {
|
|
1205
1017
|
const out = [];
|
|
1206
1018
|
for (let i = 0; i < parent.namedChildCount; i++) {
|
|
@@ -1211,9 +1023,7 @@ function precedingSiblings(parent, child) {
|
|
|
1211
1023
|
}
|
|
1212
1024
|
return out;
|
|
1213
1025
|
}
|
|
1214
|
-
// ----------------------------------------------------------------------- JS --
|
|
1215
1026
|
const JS_EXITS = new Set(['return_statement', 'throw_statement', 'break_statement', 'continue_statement']);
|
|
1216
|
-
/** A statement that always leaves the block: an exit, or a block ending in one. */
|
|
1217
1027
|
function jsAlwaysExits(node) {
|
|
1218
1028
|
if (!node)
|
|
1219
1029
|
return false;
|
|
@@ -1263,11 +1073,10 @@ const JS = {
|
|
|
1263
1073
|
}
|
|
1264
1074
|
case 'switch_case':
|
|
1265
1075
|
case 'switch_default': {
|
|
1266
|
-
// `child` is one of the case's body statements (not its value).
|
|
1267
1076
|
if (parent.type === 'switch_case' && isField(parent, 'value', child))
|
|
1268
1077
|
return;
|
|
1269
|
-
const body = parent.parent;
|
|
1270
|
-
const stmt = body?.parent;
|
|
1078
|
+
const body = parent.parent;
|
|
1079
|
+
const stmt = body?.parent;
|
|
1271
1080
|
const subject = condText(stmt?.childForFieldName('value'));
|
|
1272
1081
|
if (parent.type === 'switch_default')
|
|
1273
1082
|
push(out, guard('case', stmt?.childForFieldName('value'), false, subject ? `${subject}: default` : 'default', stmt));
|
|
@@ -1297,9 +1106,6 @@ const JS = {
|
|
|
1297
1106
|
}
|
|
1298
1107
|
},
|
|
1299
1108
|
earlyExits(parent, child, out) {
|
|
1300
|
-
// Outer-most last (the list is reversed once at the end): walk the
|
|
1301
|
-
// preceding statements backwards so the FIRST guard in the source ends up
|
|
1302
|
-
// first in the final order.
|
|
1303
1109
|
const before = precedingSiblings(parent, child);
|
|
1304
1110
|
for (let i = before.length - 1; i >= 0; i--) {
|
|
1305
1111
|
const s = before[i];
|
|
@@ -1312,7 +1118,6 @@ const JS = {
|
|
|
1312
1118
|
}
|
|
1313
1119
|
},
|
|
1314
1120
|
};
|
|
1315
|
-
// -------------------------------------------------------------------- Swift --
|
|
1316
1121
|
function swiftAlwaysExits(node) {
|
|
1317
1122
|
if (!node)
|
|
1318
1123
|
return false;
|
|
@@ -1322,7 +1127,6 @@ function swiftAlwaysExits(node) {
|
|
|
1322
1127
|
return swiftAlwaysExits(lastNamed(node));
|
|
1323
1128
|
return false;
|
|
1324
1129
|
}
|
|
1325
|
-
/** For a Swift `if`: is `child` after the `else` keyword? */
|
|
1326
1130
|
function afterElse(parent, child) {
|
|
1327
1131
|
let seenElse = false;
|
|
1328
1132
|
for (let i = 0; i < parent.childCount; i++) {
|
|
@@ -1334,11 +1138,7 @@ function afterElse(parent, child) {
|
|
|
1334
1138
|
}
|
|
1335
1139
|
return false;
|
|
1336
1140
|
}
|
|
1337
|
-
/** All `condition` fields of a Swift `if`/`guard`, joined — `if let x, y > 0`. */
|
|
1338
1141
|
function swiftConditions(node) {
|
|
1339
|
-
// The grammar labels several tokens of `if let x = y, z > 0` as `condition`
|
|
1340
|
-
// (the binding's own pieces included), so the readable text is the SPAN from
|
|
1341
|
-
// the first to the last of them, not the pieces joined.
|
|
1342
1142
|
const parts = [];
|
|
1343
1143
|
for (let i = 0; i < node.childCount; i++) {
|
|
1344
1144
|
if (node.fieldNameForChild(i) === 'condition')
|
|
@@ -1377,7 +1177,6 @@ const SWIFT = {
|
|
|
1377
1177
|
return;
|
|
1378
1178
|
}
|
|
1379
1179
|
case 'guard_statement': {
|
|
1380
|
-
// Inside the guard's body the condition FAILED.
|
|
1381
1180
|
if (parent.fieldNameForChild(indexOf(parent, child)) === 'condition')
|
|
1382
1181
|
return;
|
|
1383
1182
|
const c = swiftConditions(parent);
|
|
@@ -1436,17 +1235,12 @@ function indexOf(parent, child) {
|
|
|
1436
1235
|
return i;
|
|
1437
1236
|
return -1;
|
|
1438
1237
|
}
|
|
1439
|
-
/** The named children of a node, in order. */
|
|
1440
1238
|
function namedChildren(node) {
|
|
1441
1239
|
const out = [];
|
|
1442
1240
|
for (let i = 0; i < node.namedChildCount; i++)
|
|
1443
1241
|
out.push(node.namedChild(i));
|
|
1444
1242
|
return out;
|
|
1445
1243
|
}
|
|
1446
|
-
/**
|
|
1447
|
-
* Shared shape of "an early exit before the site": the preceding statements
|
|
1448
|
-
* of the block that are an `if` with no else whose body always leaves.
|
|
1449
|
-
*/
|
|
1450
1244
|
function guardsBefore(parent, child, out, isIf, hasElse, body, alwaysExits, condition) {
|
|
1451
1245
|
const before = precedingSiblings(parent, child);
|
|
1452
1246
|
for (let i = before.length - 1; i >= 0; i--) {
|
|
@@ -1460,7 +1254,6 @@ function guardsBefore(parent, child, out, isIf, hasElse, body, alwaysExits, cond
|
|
|
1460
1254
|
push(out, guard('guard', c.node, true, c.text, s, exitKindOr(arm, true)));
|
|
1461
1255
|
}
|
|
1462
1256
|
}
|
|
1463
|
-
// ------------------------------------------------------------------- Python --
|
|
1464
1257
|
const PY_EXITS = new Set(['return_statement', 'raise_statement', 'break_statement', 'continue_statement']);
|
|
1465
1258
|
function pyAlwaysExits(node) {
|
|
1466
1259
|
if (!node)
|
|
@@ -1494,7 +1287,6 @@ const PYTHON = {
|
|
|
1494
1287
|
if (isField(parent, 'consequence', child))
|
|
1495
1288
|
push(out, guard('if', cond, false));
|
|
1496
1289
|
else if (child.type === 'elif_clause' || child.type === 'else_clause') {
|
|
1497
|
-
// An elif/else arm runs when the `if` and every earlier elif failed.
|
|
1498
1290
|
push(out, guard('else', cond, true));
|
|
1499
1291
|
for (const s of precedingSiblings(parent, child)) {
|
|
1500
1292
|
if (s.type === 'elif_clause')
|
|
@@ -1509,7 +1301,6 @@ const PYTHON = {
|
|
|
1509
1301
|
return;
|
|
1510
1302
|
}
|
|
1511
1303
|
case 'conditional_expression': {
|
|
1512
|
-
// `a if cond else b`: children are [a, cond, b].
|
|
1513
1304
|
const kids = namedChildren(parent);
|
|
1514
1305
|
if (kids.length < 3)
|
|
1515
1306
|
return;
|
|
@@ -1555,7 +1346,6 @@ const PYTHON = {
|
|
|
1555
1346
|
guardsBefore(parent, child, out, (s) => s.type === 'if_statement', (s) => namedChildren(s).some((n) => n.type === 'elif_clause' || n.type === 'else_clause'), (s) => s.childForFieldName('consequence'), pyAlwaysExits, (s) => ({ node: s.childForFieldName('condition'), text: condText(s.childForFieldName('condition')) }));
|
|
1556
1347
|
},
|
|
1557
1348
|
};
|
|
1558
|
-
// --------------------------------------------------------------------- Java --
|
|
1559
1349
|
const JAVA_EXITS = new Set(['return_statement', 'throw_statement', 'break_statement', 'continue_statement', 'yield_statement']);
|
|
1560
1350
|
function javaAlwaysExits(node) {
|
|
1561
1351
|
if (!node)
|
|
@@ -1566,7 +1356,6 @@ function javaAlwaysExits(node) {
|
|
|
1566
1356
|
return javaAlwaysExits(lastNamed(node));
|
|
1567
1357
|
return false;
|
|
1568
1358
|
}
|
|
1569
|
-
/** `case A:` / `case A ->` / `default` labels of a Java switch group or rule, as one condition text. */
|
|
1570
1359
|
function javaCaseText(labels, subject) {
|
|
1571
1360
|
const values = labels.map((l) => namedChildren(l).map((n) => condText(n)).filter(Boolean).join(', ')).filter(Boolean);
|
|
1572
1361
|
if (values.length === 0)
|
|
@@ -1639,7 +1428,6 @@ const JAVA = {
|
|
|
1639
1428
|
guardsBefore(parent, child, out, (s) => s.type === 'if_statement', (s) => !!s.childForFieldName('alternative'), (s) => s.childForFieldName('consequence'), javaAlwaysExits, (s) => ({ node: s.childForFieldName('condition'), text: condText(s.childForFieldName('condition')) }));
|
|
1640
1429
|
},
|
|
1641
1430
|
};
|
|
1642
|
-
// ------------------------------------------------------------------- Kotlin --
|
|
1643
1431
|
function ktAlwaysExits(node) {
|
|
1644
1432
|
if (!node)
|
|
1645
1433
|
return false;
|
|
@@ -1649,7 +1437,6 @@ function ktAlwaysExits(node) {
|
|
|
1649
1437
|
return ktAlwaysExits(lastNamed(node));
|
|
1650
1438
|
return false;
|
|
1651
1439
|
}
|
|
1652
|
-
/** The two arms of a Kotlin `if`: the bodies, in order (then, else). */
|
|
1653
1440
|
function ktArms(ifExpr) {
|
|
1654
1441
|
return namedChildren(ifExpr).filter((n) => n.type === 'control_structure_body');
|
|
1655
1442
|
}
|
|
@@ -1722,7 +1509,6 @@ const KOTLIN = {
|
|
|
1722
1509
|
});
|
|
1723
1510
|
},
|
|
1724
1511
|
};
|
|
1725
|
-
// ----------------------------------------------------------------------- C# --
|
|
1726
1512
|
const CS_EXITS = new Set(['return_statement', 'throw_statement', 'break_statement', 'continue_statement']);
|
|
1727
1513
|
function csAlwaysExits(node) {
|
|
1728
1514
|
if (!node)
|
|
@@ -1814,7 +1600,6 @@ const CSHARP = {
|
|
|
1814
1600
|
guardsBefore(parent, child, out, (s) => s.type === 'if_statement', (s) => !!s.childForFieldName('alternative'), (s) => s.childForFieldName('consequence'), csAlwaysExits, (s) => ({ node: s.childForFieldName('condition'), text: condText(s.childForFieldName('condition')) }));
|
|
1815
1601
|
},
|
|
1816
1602
|
};
|
|
1817
|
-
// ----------------------------------------------------------------------- Go --
|
|
1818
1603
|
const GO_EXITS = new Set(['return_statement', 'break_statement', 'continue_statement', 'goto_statement']);
|
|
1819
1604
|
function goAlwaysExits(node) {
|
|
1820
1605
|
if (!node)
|
|
@@ -1885,7 +1670,6 @@ const GO = {
|
|
|
1885
1670
|
guardsBefore(parent, child, out, (s) => s.type === 'if_statement', (s) => !!s.childForFieldName('alternative'), (s) => s.childForFieldName('consequence'), goAlwaysExits, (s) => ({ node: s.childForFieldName('condition'), text: condText(s.childForFieldName('condition')) }));
|
|
1886
1671
|
},
|
|
1887
1672
|
};
|
|
1888
|
-
// -------------------------------------------------------------------- C/C++ --
|
|
1889
1673
|
const C_EXITS = new Set(['return_statement', 'break_statement', 'continue_statement', 'goto_statement', 'throw_statement']);
|
|
1890
1674
|
function cAlwaysExits(node) {
|
|
1891
1675
|
if (!node)
|
|
@@ -1968,7 +1752,6 @@ const C = {
|
|
|
1968
1752
|
guardsBefore(parent, child, out, (s) => s.type === 'if_statement', (s) => !!s.childForFieldName('alternative') || namedChildren(s).some((n) => n.type === 'else_clause'), (s) => s.childForFieldName('consequence'), cAlwaysExits, (s) => ({ node: s.childForFieldName('condition'), text: condText(s.childForFieldName('condition')) }));
|
|
1969
1753
|
},
|
|
1970
1754
|
};
|
|
1971
|
-
/** The rules per language. A language absent here yields no guards — never a wrong one. */
|
|
1972
1755
|
const RULES_BY_LANGUAGE = new Map([
|
|
1973
1756
|
['typescript', JS],
|
|
1974
1757
|
['tsx', JS],
|
|
@@ -1984,7 +1767,6 @@ const RULES_BY_LANGUAGE = new Map([
|
|
|
1984
1767
|
['cpp', C],
|
|
1985
1768
|
['objc', C],
|
|
1986
1769
|
]);
|
|
1987
|
-
/** Scopes whose `return`s belong to something else. */
|
|
1988
1770
|
const NESTED_SCOPE_TYPES = new Set([
|
|
1989
1771
|
'lambda_expression',
|
|
1990
1772
|
'class_body',
|
|
@@ -2007,7 +1789,6 @@ async function returnsForFile(absPath, language, line) {
|
|
|
2007
1789
|
return [];
|
|
2008
1790
|
return returnsInTree(cached.tree.rootNode, line);
|
|
2009
1791
|
}
|
|
2010
|
-
/** {@link returnsForFile} over source text — the test surface. */
|
|
2011
1792
|
async function returnsInSource(source, language, line) {
|
|
2012
1793
|
if (!supportsBranchGuards(language))
|
|
2013
1794
|
return [];
|
|
@@ -2049,7 +1830,6 @@ function returnsInTree(root, line) {
|
|
|
2049
1830
|
}
|
|
2050
1831
|
};
|
|
2051
1832
|
visit(definition);
|
|
2052
|
-
// A bare name: the string a same-class constant holds (`static final String X = "…"`).
|
|
2053
1833
|
let cls = definition.parent;
|
|
2054
1834
|
for (let up = 0; cls && up < 6 && !CLASS_TYPES.has(cls.type); up++)
|
|
2055
1835
|
cls = cls.parent;
|
|
@@ -2108,7 +1888,6 @@ async function decoratorsForFile(absPath, language, lines) {
|
|
|
2108
1888
|
}
|
|
2109
1889
|
return out;
|
|
2110
1890
|
}
|
|
2111
|
-
/** {@link decoratorsForFile} over source text — the test surface. */
|
|
2112
1891
|
async function decoratorsInSource(source, language, line) {
|
|
2113
1892
|
if (!supportsBranchGuards(language))
|
|
2114
1893
|
return null;
|
|
@@ -2128,7 +1907,6 @@ function decoratorsInTree(root, source, line) {
|
|
|
2128
1907
|
let node = innermostAt(root, row, col);
|
|
2129
1908
|
if (!node)
|
|
2130
1909
|
return null;
|
|
2131
|
-
// Up to the definition the line belongs to.
|
|
2132
1910
|
let definition = null;
|
|
2133
1911
|
for (let up = 0; node && up < 12; up++, node = node.parent) {
|
|
2134
1912
|
if (DEFINITION_TYPES.has(node.type)) {
|
|
@@ -2138,7 +1916,6 @@ function decoratorsInTree(root, source, line) {
|
|
|
2138
1916
|
}
|
|
2139
1917
|
if (!definition)
|
|
2140
1918
|
return null;
|
|
2141
|
-
// A Python decorated function is the child of the node that holds the decorators.
|
|
2142
1919
|
const holder = definition.parent && definition.parent.type === 'decorated_definition' ? definition.parent : definition;
|
|
2143
1920
|
const own = decoratorsOn(holder);
|
|
2144
1921
|
let cls = holder.parent;
|
|
@@ -2147,7 +1924,6 @@ function decoratorsInTree(root, source, line) {
|
|
|
2147
1924
|
const clsHolder = cls && cls.parent && cls.parent.type === 'decorated_definition' ? cls.parent : cls;
|
|
2148
1925
|
return { own, class: clsHolder ? decoratorsOn(clsHolder) : [] };
|
|
2149
1926
|
}
|
|
2150
|
-
/** Decorator texts on one definition node: its own leading decorator children, its modifiers/attribute lists, or the siblings before it. */
|
|
2151
1927
|
function decoratorsOn(definition) {
|
|
2152
1928
|
const out = [];
|
|
2153
1929
|
const add = (n) => {
|
|
@@ -2167,7 +1943,6 @@ function decoratorsOn(definition) {
|
|
|
2167
1943
|
else
|
|
2168
1944
|
add(c);
|
|
2169
1945
|
}
|
|
2170
|
-
// JS: decorators are siblings that precede the member in the class body.
|
|
2171
1946
|
if (out.length === 0 && definition.parent) {
|
|
2172
1947
|
const before = precedingSiblings(definition.parent, definition);
|
|
2173
1948
|
for (let i = before.length - 1; i >= 0; i--) {
|
|
@@ -2185,23 +1960,6 @@ function decoratorText(node) {
|
|
|
2185
1960
|
text = text.replace(/^\[|\]$/g, '');
|
|
2186
1961
|
return cut(text, MAX_DECORATOR_TEXT);
|
|
2187
1962
|
}
|
|
2188
|
-
// =============================================================================
|
|
2189
|
-
// Member types — what a class declares its members to be
|
|
2190
|
-
// =============================================================================
|
|
2191
|
-
/**
|
|
2192
|
-
* The declared types of a class's members, read from the tree: the
|
|
2193
|
-
* constructor's parameter properties (`private readonly usersService:
|
|
2194
|
-
* UsersService`), its fields (`private final OwnerRepository owners`,
|
|
2195
|
-
* `val owners: OwnerRepository`, `private readonly IRepo _repo`), its typed
|
|
2196
|
-
* properties. The index keeps no type for these, and a member call the
|
|
2197
|
-
* extractor kept only the last segment of (`this.usersService.findByEmail`
|
|
2198
|
-
* → `findByEmail`) resolves by name alone; the declared type is what says
|
|
2199
|
-
* where it really goes, and whether it leaves the index.
|
|
2200
|
-
*
|
|
2201
|
-
* Keyed by member name, the type as written without generics'
|
|
2202
|
-
* arguments (`Repository<Cat>` → `Repository<Cat>` is kept whole; callers
|
|
2203
|
-
* strip what they need).
|
|
2204
|
-
*/
|
|
2205
1963
|
async function memberTypesForFile(absPath, language, line) {
|
|
2206
1964
|
const out = new Map();
|
|
2207
1965
|
if (!supportsBranchGuards(language))
|
|
@@ -2211,7 +1969,6 @@ async function memberTypesForFile(absPath, language, line) {
|
|
|
2211
1969
|
return out;
|
|
2212
1970
|
return memberTypesInTree(cached.tree.rootNode, cached.source, line);
|
|
2213
1971
|
}
|
|
2214
|
-
/** {@link memberTypesForFile} over source text — the test surface. */
|
|
2215
1972
|
async function memberTypesInSource(source, language, line) {
|
|
2216
1973
|
if (!supportsBranchGuards(language))
|
|
2217
1974
|
return new Map();
|
|
@@ -2248,7 +2005,6 @@ function memberTypesInTree(root, source, line) {
|
|
|
2248
2005
|
if (!params)
|
|
2249
2006
|
return;
|
|
2250
2007
|
for (const p of namedChildren(params)) {
|
|
2251
|
-
// TS: `private readonly x: T` (a parameter property); Kotlin: `val x: T`; C#/Java: `T x` — a field of the same name may follow.
|
|
2252
2008
|
if (p.type === 'required_parameter' || p.type === 'optional_parameter') {
|
|
2253
2009
|
if (!namedChildren(p).some((c) => c.type === 'accessibility_modifier' || c.type === 'override_modifier') && !/^\s*(?:public|private|protected|readonly)\b/.test(p.text))
|
|
2254
2010
|
continue;
|
|
@@ -2266,7 +2022,6 @@ function memberTypesInTree(root, source, line) {
|
|
|
2266
2022
|
}
|
|
2267
2023
|
}
|
|
2268
2024
|
};
|
|
2269
|
-
// Kotlin's primary constructor sits on the class node itself.
|
|
2270
2025
|
for (const c of namedChildren(cls))
|
|
2271
2026
|
if (c.type === 'primary_constructor')
|
|
2272
2027
|
visitParams(namedChildren(c).find((n) => n.type === 'class_parameters') ?? c);
|
|
@@ -2284,7 +2039,6 @@ function memberTypesInTree(root, source, line) {
|
|
|
2284
2039
|
visitParams(m.childForFieldName('parameters'));
|
|
2285
2040
|
break;
|
|
2286
2041
|
case 'field_declaration': {
|
|
2287
|
-
// Java: `type` + `declarator`; C#: a `variable_declaration` inside.
|
|
2288
2042
|
const type = m.childForFieldName('type');
|
|
2289
2043
|
if (type) {
|
|
2290
2044
|
for (const d of namedChildren(m))
|
|
@@ -2301,7 +2055,6 @@ function memberTypesInTree(root, source, line) {
|
|
|
2301
2055
|
break;
|
|
2302
2056
|
}
|
|
2303
2057
|
case 'property_declaration': {
|
|
2304
|
-
// C#: `type` + `name`; Kotlin: `variable_declaration (name) (type)`.
|
|
2305
2058
|
const csType = m.childForFieldName('type');
|
|
2306
2059
|
if (csType)
|
|
2307
2060
|
put(m.childForFieldName('name')?.text, typeText(csType));
|