@colbymchenry/codegraph-win32-arm64 1.6.1 → 1.6.3
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 +427 -684
- package/lib/dist/bin/codegraph.js.map +1 -1
- package/lib/dist/bin/command-supervision.d.ts +7 -0
- package/lib/dist/bin/command-supervision.d.ts.map +1 -1
- package/lib/dist/bin/command-supervision.js +30 -74
- 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 +641 -40
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +1370 -1398
- 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 +81 -0
- package/lib/dist/directory.d.ts.map +1 -1
- package/lib/dist/directory.js +91 -500
- 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 +34 -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 +15 -133
- package/lib/dist/extraction/astro-extractor.js.map +1 -1
- package/lib/dist/extraction/cfml-extractor.d.ts +102 -10
- package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/cfml-extractor.js +260 -179
- package/lib/dist/extraction/cfml-extractor.js.map +1 -1
- package/lib/dist/extraction/commonjs-requires.d.ts +23 -0
- package/lib/dist/extraction/commonjs-requires.d.ts.map +1 -0
- package/lib/dist/extraction/commonjs-requires.js +37 -0
- package/lib/dist/extraction/commonjs-requires.js.map +1 -0
- 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 +145 -206
- package/lib/dist/extraction/function-ref.js.map +1 -1
- package/lib/dist/extraction/generated-detection.d.ts +9 -0
- package/lib/dist/extraction/generated-detection.d.ts.map +1 -1
- package/lib/dist/extraction/generated-detection.js +29 -154
- package/lib/dist/extraction/generated-detection.js.map +1 -1
- package/lib/dist/extraction/grammars.d.ts +47 -4
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +91 -374
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +216 -11
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +703 -1368
- 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 +29 -131
- 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.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 +140 -28
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.js +876 -823
- 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.d.ts.map +1 -1
- package/lib/dist/extraction/languages/csharp.js +11 -54
- package/lib/dist/extraction/languages/csharp.js.map +1 -1
- package/lib/dist/extraction/languages/dart.d.ts +84 -0
- package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
- package/lib/dist/extraction/languages/dart.js +335 -159
- 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 +15 -0
- package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
- package/lib/dist/extraction/languages/kotlin.js +69 -150
- 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.js +5 -42
- 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.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.d.ts +15 -0
- package/lib/dist/extraction/languages/swift.d.ts.map +1 -1
- package/lib/dist/extraction/languages/swift.js +33 -27
- 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 +71 -0
- package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/typescript.js +86 -41
- 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 +16 -0
- package/lib/dist/extraction/parse-budget.d.ts.map +1 -0
- package/lib/dist/extraction/parse-budget.js +11 -0
- package/lib/dist/extraction/parse-budget.js.map +1 -0
- package/lib/dist/extraction/parse-pool.d.ts +41 -5
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
- package/lib/dist/extraction/parse-pool.js +74 -158
- 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 +7 -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 +85 -0
- package/lib/dist/extraction/sfc-script.d.ts.map +1 -0
- package/lib/dist/extraction/sfc-script.js +136 -0
- package/lib/dist/extraction/sfc-script.js.map +1 -0
- 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 +5 -37
- package/lib/dist/extraction/store-worker.js.map +1 -1
- package/lib/dist/extraction/store-writer.d.ts +10 -2
- package/lib/dist/extraction/store-writer.d.ts.map +1 -1
- package/lib/dist/extraction/store-writer.js +8 -32
- 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 +16 -122
- 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 +6 -153
- 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 +455 -9
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +1998 -2517
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/extraction/vue-extractor.d.ts +20 -0
- package/lib/dist/extraction/vue-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/vue-extractor.js +113 -115
- package/lib/dist/extraction/vue-extractor.js.map +1 -1
- package/lib/dist/extraction/vue-options-api.d.ts +28 -0
- package/lib/dist/extraction/vue-options-api.d.ts.map +1 -0
- package/lib/dist/extraction/vue-options-api.js +164 -0
- package/lib/dist/extraction/vue-options-api.js.map +1 -0
- 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-cobol.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts +6 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts.map +1 -1
- package/lib/dist/extraction/wasm-runtime-flags.js +1 -88
- 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 +17 -0
- package/lib/dist/graph/branch-guards.d.ts.map +1 -1
- package/lib/dist/graph/branch-guards.js +98 -250
- 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/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 +85 -219
- 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 +2 -2
- package/lib/dist/graph/queries.d.ts.map +1 -1
- package/lib/dist/graph/queries.js +2 -135
- 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/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 +21 -0
- package/lib/dist/graph/test-code.d.ts.map +1 -0
- package/lib/dist/graph/test-code.js +50 -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 +98 -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 +195 -25
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +697 -1105
- 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 +9 -5
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +25 -159
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/instructions-template.d.ts +1 -1
- package/lib/dist/installer/instructions-template.js +0 -37
- 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.js +0 -102
- 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 +81 -11
- package/lib/dist/installer/targets/shared.d.ts.map +1 -1
- package/lib/dist/installer/targets/shared.js +183 -129
- 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.map +1 -1
- package/lib/dist/mcp/daemon-paths.js +2 -79
- package/lib/dist/mcp/daemon-paths.js.map +1 -1
- package/lib/dist/mcp/daemon-registry.d.ts +44 -0
- package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-registry.js +189 -118
- package/lib/dist/mcp/daemon-registry.js.map +1 -1
- package/lib/dist/mcp/daemon.d.ts +23 -0
- package/lib/dist/mcp/daemon.d.ts.map +1 -1
- package/lib/dist/mcp/daemon.js +89 -373
- 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 +10 -0
- package/lib/dist/mcp/engine.d.ts.map +1 -1
- package/lib/dist/mcp/engine.js +41 -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.js +0 -116
- package/lib/dist/mcp/explore-diagnostics.js.map +1 -1
- 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/index-freshness-worker.js +5 -4
- package/lib/dist/mcp/index-freshness-worker.js.map +1 -1
- package/lib/dist/mcp/index-freshness.d.ts +7 -1
- package/lib/dist/mcp/index-freshness.d.ts.map +1 -1
- package/lib/dist/mcp/index-freshness.js +20 -12
- 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 +19 -1
- package/lib/dist/mcp/index.d.ts.map +1 -1
- package/lib/dist/mcp/index.js +118 -293
- 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/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.map +1 -1
- package/lib/dist/mcp/project-lifecycle.js +55 -21
- package/lib/dist/mcp/project-lifecycle.js.map +1 -1
- package/lib/dist/mcp/proxy.d.ts +26 -8
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +209 -223
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/query-pool.d.ts +58 -3
- package/lib/dist/mcp/query-pool.d.ts.map +1 -1
- package/lib/dist/mcp/query-pool.js +140 -100
- 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.js +0 -31
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/mcp/session.d.ts +27 -0
- package/lib/dist/mcp/session.d.ts.map +1 -1
- package/lib/dist/mcp/session.js +29 -130
- 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 +159 -20
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +730 -3545
- 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.js +1 -138
- 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 +19 -52
- 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 +96 -0
- package/lib/dist/resolution/angular-template-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/angular-template-synthesizer.js +695 -0
- package/lib/dist/resolution/angular-template-synthesizer.js.map +1 -0
- 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 +15 -1
- package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.js +1487 -1234
- 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 +60 -61
- 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/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 +142 -0
- package/lib/dist/resolution/frameworks/angular-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/angular-router.js +959 -0
- package/lib/dist/resolution/frameworks/angular-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/astro.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/astro.js +30 -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 +106 -101
- 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/expo-modules.d.ts +10 -0
- package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/expo-modules.js +79 -65
- package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.d.ts +6 -0
- package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.js +64 -183
- package/lib/dist/resolution/frameworks/expo-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/express.js +215 -173
- package/lib/dist/resolution/frameworks/express.js.map +1 -1
- package/lib/dist/resolution/frameworks/fabric.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/fabric.js +11 -112
- 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 +15 -61
- 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 +16 -2
- package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/index.js +20 -48
- 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 +209 -147
- 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 +291 -71
- package/lib/dist/resolution/frameworks/laravel.js.map +1 -1
- package/lib/dist/resolution/frameworks/name-heuristic.d.ts +35 -0
- package/lib/dist/resolution/frameworks/name-heuristic.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/name-heuristic.js +33 -0
- package/lib/dist/resolution/frameworks/name-heuristic.js.map +1 -0
- package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/nestjs.js +236 -192
- 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 +11 -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.d.ts +20 -0
- package/lib/dist/resolution/frameworks/page-component.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/page-component.js +31 -0
- package/lib/dist/resolution/frameworks/page-component.js.map +1 -0
- package/lib/dist/resolution/frameworks/play.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/play.js +27 -33
- package/lib/dist/resolution/frameworks/play.js.map +1 -1
- package/lib/dist/resolution/frameworks/python.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/python.js +106 -116
- 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 +17 -7
- package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react-router.js +21 -79
- package/lib/dist/resolution/frameworks/react-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/react.d.ts +68 -1
- package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react.js +1721 -114
- package/lib/dist/resolution/frameworks/react.js.map +1 -1
- package/lib/dist/resolution/frameworks/ruby.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/ruby.js +152 -52
- 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 +51 -70
- 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 +9 -74
- 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.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/swift.js +199 -167
- 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 +26 -10
- package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/vue-router.js +147 -147
- package/lib/dist/resolution/frameworks/vue-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/vue.d.ts +9 -2
- package/lib/dist/resolution/frameworks/vue.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/vue.js +69 -107
- 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 +298 -23
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/import-resolver.js +1802 -1280
- package/lib/dist/resolution/import-resolver.js.map +1 -1
- package/lib/dist/resolution/index.d.ts +449 -5
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +1477 -981
- package/lib/dist/resolution/index.js.map +1 -1
- package/lib/dist/resolution/js-builtins.d.ts +14 -0
- package/lib/dist/resolution/js-builtins.d.ts.map +1 -1
- package/lib/dist/resolution/js-builtins.js +15 -13
- 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 +185 -0
- package/lib/dist/resolution/module-importers.d.ts.map +1 -0
- package/lib/dist/resolution/module-importers.js +588 -0
- package/lib/dist/resolution/module-importers.js.map +1 -0
- package/lib/dist/resolution/name-matcher.d.ts +891 -8
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +25013 -2928
- 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/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/react-router-synthesizer.d.ts +2 -0
- package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/react-router-synthesizer.js +67 -48
- package/lib/dist/resolution/react-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/resolver-pool.d.ts +43 -3
- package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
- package/lib/dist/resolution/resolver-pool.js +55 -97
- 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 +10 -36
- 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 +68 -0
- package/lib/dist/resolution/swift-type-visibility.d.ts.map +1 -0
- package/lib/dist/resolution/swift-type-visibility.js +355 -0
- package/lib/dist/resolution/swift-type-visibility.js.map +1 -0
- 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 +7 -2
- package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/tier-synthesizer.js +318 -121
- package/lib/dist/resolution/tier-synthesizer.js.map +1 -1
- package/lib/dist/resolution/type-parameters.d.ts +34 -0
- package/lib/dist/resolution/type-parameters.d.ts.map +1 -0
- package/lib/dist/resolution/type-parameters.js +285 -0
- package/lib/dist/resolution/type-parameters.js.map +1 -0
- package/lib/dist/resolution/types.d.ts +209 -10
- 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 +570 -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 +29 -2
- package/lib/dist/sync/worktree.d.ts.map +1 -1
- package/lib/dist/sync/worktree.js +59 -78
- 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 +68 -146
- 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.d.ts +7 -0
- package/lib/dist/ui-server/api/effects.d.ts.map +1 -1
- package/lib/dist/ui-server/api/effects.js +20 -103
- package/lib/dist/ui-server/api/effects.js.map +1 -1
- package/lib/dist/ui-server/api/entrypoints.d.ts +6 -0
- package/lib/dist/ui-server/api/entrypoints.d.ts.map +1 -1
- package/lib/dist/ui-server/api/entrypoints.js +73 -130
- 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 +41 -6
- package/lib/dist/ui-server/api/map.d.ts.map +1 -1
- package/lib/dist/ui-server/api/map.js +95 -308
- package/lib/dist/ui-server/api/map.js.map +1 -1
- package/lib/dist/ui-server/api/node.d.ts.map +1 -1
- package/lib/dist/ui-server/api/node.js +4 -109
- 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 +6 -0
- package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -1
- package/lib/dist/ui-server/api/route-roots.js +18 -39
- package/lib/dist/ui-server/api/route-roots.js.map +1 -1
- package/lib/dist/ui-server/api/routes.d.ts +2 -0
- package/lib/dist/ui-server/api/routes.d.ts.map +1 -1
- package/lib/dist/ui-server/api/routes.js +47 -47
- 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 +16 -171
- 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 +105 -373
- 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 +20 -94
- package/lib/dist/ui-server/api/trails.js.map +1 -1
- package/lib/dist/ui-server/api/when.d.ts +10 -2
- package/lib/dist/ui-server/api/when.d.ts.map +1 -1
- package/lib/dist/ui-server/api/when.js +32 -44
- 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.d.ts +28 -0
- package/lib/dist/ui-server/highlight/bounded-tokenize.d.ts.map +1 -0
- package/lib/dist/ui-server/highlight/bounded-tokenize.js +114 -0
- package/lib/dist/ui-server/highlight/bounded-tokenize.js.map +1 -0
- package/lib/dist/ui-server/highlight/index.d.ts.map +1 -1
- package/lib/dist/ui-server/highlight/index.js +7 -133
- 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.d.ts +7 -0
- package/lib/dist/ui-server/highlight/tokenize-worker.d.ts.map +1 -0
- package/lib/dist/ui-server/highlight/tokenize-worker.js +15 -0
- package/lib/dist/ui-server/highlight/tokenize-worker.js.map +1 -0
- 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 +61 -10
- package/lib/dist/upgrade/index.d.ts.map +1 -1
- package/lib/dist/upgrade/index.js +191 -225
- 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/viewer/assets/{index-D4S7YUPf.js → index-BSGpxBr9.js} +60 -58
- package/lib/dist/viewer/index.html +1 -1
- package/lib/dist/worker-teardown.d.ts +48 -0
- package/lib/dist/worker-teardown.d.ts.map +1 -0
- package/lib/dist/worker-teardown.js +53 -0
- package/lib/dist/worker-teardown.js.map +1 -0
- 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);
|
|
@@ -84,6 +54,9 @@ exports.loopsInSource = loopsInSource;
|
|
|
84
54
|
exports.loopsInTree = loopsInTree;
|
|
85
55
|
exports.loopsForFile = loopsForFile;
|
|
86
56
|
exports.guardsInTree = guardsInTree;
|
|
57
|
+
exports.returnsForFile = returnsForFile;
|
|
58
|
+
exports.returnsInSource = returnsInSource;
|
|
59
|
+
exports.returnsInTree = returnsInTree;
|
|
87
60
|
exports.decoratorsForFile = decoratorsForFile;
|
|
88
61
|
exports.decoratorsInSource = decoratorsInSource;
|
|
89
62
|
exports.decoratorsInTree = decoratorsInTree;
|
|
@@ -92,42 +65,30 @@ exports.memberTypesInSource = memberTypesInSource;
|
|
|
92
65
|
exports.memberTypesInTree = memberTypesInTree;
|
|
93
66
|
const fs = __importStar(require("fs"));
|
|
94
67
|
const grammars_1 = require("../extraction/grammars");
|
|
95
|
-
|
|
68
|
+
const parse_budget_1 = require("../extraction/parse-budget");
|
|
69
|
+
const utils_1 = require("../utils");
|
|
96
70
|
const MAX_TEXT = 80;
|
|
97
71
|
const JS_FAMILY = new Set(['typescript', 'javascript', 'tsx', 'jsx']);
|
|
98
|
-
/** Languages with walk rules below. Others yield no guards (never a wrong one). */
|
|
99
72
|
function supportsBranchGuards(language) {
|
|
100
73
|
return !!language && RULES_BY_LANGUAGE.has(language);
|
|
101
74
|
}
|
|
102
|
-
/**
|
|
103
|
-
* The label a rail or a flow connector prints: the conditions in execution
|
|
104
|
-
* order, joined with `&&`, each negated one written as `!x`. Empty when the
|
|
105
|
-
* site is unconditional.
|
|
106
|
-
*/
|
|
107
75
|
function guardLabel(guards) {
|
|
108
76
|
return guards.map(renderGuard).join(' && ');
|
|
109
77
|
}
|
|
110
78
|
function renderGuard(g) {
|
|
111
79
|
if (g.form === 'catch')
|
|
112
80
|
return g.text;
|
|
113
|
-
// `if (!object?.id || !object?.name)` joined to the guard before it with
|
|
114
|
-
// `&&` would read as two conditions: it keeps its parentheses.
|
|
115
81
|
if (!g.negated)
|
|
116
82
|
return hasTopLevelOr(g.text) ? `(${g.text})` : g.text;
|
|
117
|
-
// `!x` negated reads back as `x`; a simple operand takes a bare `!`;
|
|
118
|
-
// anything with operators is parenthesised so the negation is unambiguous.
|
|
119
83
|
if (/^!(?![=])/.test(g.text) && isSimpleOperand(g.text.slice(1)))
|
|
120
84
|
return g.text.slice(1);
|
|
121
85
|
if (/^not\s+/.test(g.text) && isSimpleOperand(g.text.slice(4).trim()))
|
|
122
86
|
return g.text.slice(4).trim();
|
|
123
|
-
// One comparison flips instead of wrapping: the reader of a Go `if err !=
|
|
124
|
-
// nil { return }` wants `err == nil`, not `!(err != nil)`.
|
|
125
87
|
const flipped = flipComparison(g.text);
|
|
126
88
|
if (flipped !== null)
|
|
127
89
|
return flipped;
|
|
128
90
|
return isSimpleOperand(g.text) ? `!${g.text}` : `!(${g.text})`;
|
|
129
91
|
}
|
|
130
|
-
/** `a != b` → `a == b`, `x is None` → `x is not None`; null when the text is not one plain comparison. */
|
|
131
92
|
function flipComparison(text) {
|
|
132
93
|
if (/&&|\|\||\band\b|\bor\b|\?/.test(text))
|
|
133
94
|
return null;
|
|
@@ -140,7 +101,6 @@ function flipComparison(text) {
|
|
|
140
101
|
const op = flip[m[2]];
|
|
141
102
|
return op ? `${m[1].trim()} ${op} ${m[3].trim()}` : null;
|
|
142
103
|
}
|
|
143
|
-
/** A `||` outside every bracket and string — the condition is a disjunction as written. */
|
|
144
104
|
function hasTopLevelOr(text) {
|
|
145
105
|
let depth = 0;
|
|
146
106
|
let quote = null;
|
|
@@ -165,8 +125,6 @@ function hasTopLevelOr(text) {
|
|
|
165
125
|
return false;
|
|
166
126
|
}
|
|
167
127
|
function isSimpleOperand(text) {
|
|
168
|
-
// A name, a member chain, or one call on it — `Objects.equals(owner.getId(), id)`
|
|
169
|
-
// included: the parens must balance and nothing may sit outside them.
|
|
170
128
|
if (/[=<>]/.test(text) || /\s(?:&&|\|\||and|or)\s/.test(text))
|
|
171
129
|
return false;
|
|
172
130
|
const m = /^([\w$.?!]+)(\(.*\))?$/s.exec(text);
|
|
@@ -189,13 +147,7 @@ function isSimpleOperand(text) {
|
|
|
189
147
|
}
|
|
190
148
|
const TREE_CACHE_SIZE = 8;
|
|
191
149
|
const treeCache = new Map();
|
|
192
|
-
/**
|
|
193
|
-
* Files above this size are not parsed for labels. A 300 KB source file costs
|
|
194
|
-
* tens of milliseconds to parse, and a Symbol view is budgeted at 100 ms end
|
|
195
|
-
* to end; a call site in such a file simply shows no `when`.
|
|
196
|
-
*/
|
|
197
150
|
exports.MAX_PARSE_BYTES = 256 * 1024;
|
|
198
|
-
/** The `web-tree-sitter` trees held above are native memory: evict explicitly. */
|
|
199
151
|
function remember(path, entry) {
|
|
200
152
|
const old = treeCache.get(path);
|
|
201
153
|
if (old)
|
|
@@ -242,7 +194,7 @@ async function parse(source, language) {
|
|
|
242
194
|
const parser = (0, grammars_1.getParser)(language);
|
|
243
195
|
if (!parser)
|
|
244
196
|
return null;
|
|
245
|
-
return
|
|
197
|
+
return (0, parse_budget_1.parseWithinBudget)(parser, source);
|
|
246
198
|
}
|
|
247
199
|
catch {
|
|
248
200
|
return null;
|
|
@@ -251,12 +203,6 @@ async function parse(source, language) {
|
|
|
251
203
|
function siteKey(site) {
|
|
252
204
|
return `${site.line}:${typeof site.column === 'number' ? site.column : ''}${site.callee ? `:${site.callee}` : ''}`;
|
|
253
205
|
}
|
|
254
|
-
/**
|
|
255
|
-
* Guards for many call sites in one file, keyed by {@link siteKey}. The file
|
|
256
|
-
* is parsed once (and cached across requests until it changes on disk). A
|
|
257
|
-
* language without rules, or a file that cannot be read or parsed, yields an
|
|
258
|
-
* empty map.
|
|
259
|
-
*/
|
|
260
206
|
async function guardsForFile(absPath, language, sites) {
|
|
261
207
|
const out = new Map();
|
|
262
208
|
if (!supportsBranchGuards(language) || sites.length === 0)
|
|
@@ -272,12 +218,6 @@ async function guardsForFile(absPath, language, sites) {
|
|
|
272
218
|
}
|
|
273
219
|
return out;
|
|
274
220
|
}
|
|
275
|
-
/**
|
|
276
|
-
* Synchronous twin of {@link guardsForFile} for callers that cannot await
|
|
277
|
-
* (the explore text builder). It only serves languages whose grammar is
|
|
278
|
-
* ALREADY loaded — see {@link warmBranchGuardGrammars} — and yields an empty
|
|
279
|
-
* map otherwise, never a wrong label.
|
|
280
|
-
*/
|
|
281
221
|
function guardsForFileSync(absPath, language, sites) {
|
|
282
222
|
const out = new Map();
|
|
283
223
|
if (!supportsBranchGuards(language) || sites.length === 0)
|
|
@@ -304,7 +244,7 @@ function guardsForFileSync(absPath, language, sites) {
|
|
|
304
244
|
catch {
|
|
305
245
|
return out;
|
|
306
246
|
}
|
|
307
|
-
const tree =
|
|
247
|
+
const tree = (0, parse_budget_1.parseWithinBudget)(parser, source);
|
|
308
248
|
if (!tree)
|
|
309
249
|
return out;
|
|
310
250
|
cached = { key, tree, source };
|
|
@@ -317,7 +257,6 @@ function guardsForFileSync(absPath, language, sites) {
|
|
|
317
257
|
}
|
|
318
258
|
return out;
|
|
319
259
|
}
|
|
320
|
-
/** The languages with rules here — what {@link warmBranchGuardGrammars} loads. */
|
|
321
260
|
exports.BRANCH_GUARD_LANGUAGES = [
|
|
322
261
|
'typescript',
|
|
323
262
|
'tsx',
|
|
@@ -333,16 +272,9 @@ exports.BRANCH_GUARD_LANGUAGES = [
|
|
|
333
272
|
'cpp',
|
|
334
273
|
'objc',
|
|
335
274
|
];
|
|
336
|
-
// =============================================================================
|
|
337
|
-
// Call arguments — what a site passes
|
|
338
|
-
// =============================================================================
|
|
339
|
-
/** Longest argument list kept before it is cut with an ellipsis. */
|
|
340
275
|
const MAX_ARGS_TEXT = 96;
|
|
341
|
-
/** Longest single argument (a string literal, a name) kept whole. */
|
|
342
276
|
const MAX_ARG_TEXT = 40;
|
|
343
|
-
/** Object keys listed before `…` stands for the rest. */
|
|
344
277
|
const MAX_OBJECT_KEYS = 4;
|
|
345
|
-
/** Call nodes, across the grammars with rules here: JS, Swift, Python, Java, Kotlin, C#, Go, C. */
|
|
346
278
|
const CALL_TYPES = new Set([
|
|
347
279
|
'call_expression',
|
|
348
280
|
'new_expression',
|
|
@@ -391,17 +323,6 @@ const FUNCTION_TYPES = new Set([
|
|
|
391
323
|
'anonymous_function',
|
|
392
324
|
'anonymous_method_expression',
|
|
393
325
|
]);
|
|
394
|
-
/**
|
|
395
|
-
* The arguments a call site passes, as written, abbreviated to what a reader
|
|
396
|
-
* scans for: a string literal whole (a storage key, a URL, a message), a name
|
|
397
|
-
* whole, an object as its keys (`{ email, password }`), an array as `[…]`, a
|
|
398
|
-
* function as `() => …`, a nested call as `f(…)`. The conditions say WHEN a
|
|
399
|
-
* step runs; this says WITH WHAT — `SecureStore.setItemAsync('userEmail',
|
|
400
|
-
* values.email)` is a different fact from `SecureStore.setItemAsync`.
|
|
401
|
-
*
|
|
402
|
-
* Keyed by {@link siteKey} like the guards, read from the same cached tree.
|
|
403
|
-
* A site that is not inside a call, or a language without rules, is absent.
|
|
404
|
-
*/
|
|
405
326
|
async function callArgumentsForFile(absPath, language, sites) {
|
|
406
327
|
const out = new Map();
|
|
407
328
|
if (!supportsBranchGuards(language) || sites.length === 0)
|
|
@@ -419,7 +340,6 @@ async function callArgumentsForFile(absPath, language, sites) {
|
|
|
419
340
|
}
|
|
420
341
|
return out;
|
|
421
342
|
}
|
|
422
|
-
/** {@link callArgumentsForFile} over source text — the test surface. */
|
|
423
343
|
async function callArgumentsInSource(source, language, line, column) {
|
|
424
344
|
if (!supportsBranchGuards(language))
|
|
425
345
|
return null;
|
|
@@ -436,9 +356,7 @@ async function callArgumentsInSource(source, language, line, column) {
|
|
|
436
356
|
function callArgumentsInTree(root, source, line, column) {
|
|
437
357
|
return callSiteInTree(root, source, line, column)?.args ?? null;
|
|
438
358
|
}
|
|
439
|
-
/** A node the climb to an enclosing call must not cross: the call is then a statement of its own inside a callback. */
|
|
440
359
|
const CALL_BOUNDARY = /function|lambda|closure|block|statement|body|declaration/;
|
|
441
|
-
/** The nearest call whose ARGUMENTS contain `call`, as its callee chain; null when there is none this side of a function or block. */
|
|
442
360
|
function enclosingCallText(call) {
|
|
443
361
|
for (let node = call.parent, up = 0; node && up < 12; node = node.parent, up++) {
|
|
444
362
|
if (CALL_BOUNDARY.test(node.type))
|
|
@@ -453,7 +371,6 @@ function enclosingCallText(call) {
|
|
|
453
371
|
return null;
|
|
454
372
|
}
|
|
455
373
|
const STATUS_KEY = /^(?:status|statusCode|status_code|code)$/;
|
|
456
|
-
/** `{ status: 201 }` inside an argument — the literal an abbreviated object hides. */
|
|
457
374
|
function statusPropertyIn(node, depth = 0) {
|
|
458
375
|
if (depth > 2)
|
|
459
376
|
return null;
|
|
@@ -471,13 +388,9 @@ function statusPropertyIn(node, depth = 0) {
|
|
|
471
388
|
}
|
|
472
389
|
return null;
|
|
473
390
|
}
|
|
474
|
-
/** Longest callee text kept before it is cut. */
|
|
475
391
|
const MAX_CALLEE_TEXT = 96;
|
|
476
|
-
/** The call node a site belongs to: climb from the callee to the call. A few levels cover a member chain. */
|
|
477
392
|
function callAt(root, source, line, column, callee) {
|
|
478
393
|
const row = line - 1;
|
|
479
|
-
// The recorded column may sit a character off the callee (a 1-based
|
|
480
|
-
// column, the space before `prisma`): a near miss is tried before giving up.
|
|
481
394
|
const columns = column === null ? [firstNonBlankColumn(source, row)] : [column, column + 1, Math.max(0, column - 1), firstNonBlankColumn(source, row)];
|
|
482
395
|
const want = callee ? callee.split(/[.:]/).pop() ?? callee : null;
|
|
483
396
|
for (const col of columns) {
|
|
@@ -493,8 +406,6 @@ function callAt(root, source, line, column, callee) {
|
|
|
493
406
|
first = node;
|
|
494
407
|
if (want === null)
|
|
495
408
|
return node;
|
|
496
|
-
// A chain's position is its start: `res.status(201).json(…)` at `res`
|
|
497
|
-
// meets `res.status(…)` first; the call that is THIS one names `json`.
|
|
498
409
|
const container = argumentsOf(node);
|
|
499
410
|
const text = container ? calleeChainText(node, container) : '';
|
|
500
411
|
if ((text.replace(/\([^()]*\)/g, '').split(/[.:]/).pop() ?? '') === want)
|
|
@@ -544,14 +455,7 @@ function callSiteInTree(root, source, line, column, want) {
|
|
|
544
455
|
}
|
|
545
456
|
const BODY_REPLY = /^(?:res|response|reply|rep|ctx|c|context)\.(?:json|jsonp|send|render|sendFile|download|end|text|html|body)$/;
|
|
546
457
|
const STATEMENT_BLOCKS = new Set(['statement_block', 'program', 'block', 'class_body', 'module']);
|
|
547
|
-
/** Statements looked back through for a status the reply's own chain does not carry. */
|
|
548
458
|
const STATUS_LOOKBACK = 6;
|
|
549
|
-
/**
|
|
550
|
-
* `res.status(202); res.json(user)` — the status set by an earlier statement
|
|
551
|
-
* in the same block, when the reply's own chain sets none. Only a statement
|
|
552
|
-
* that IS the status call counts (`res.status(404)` inside an `if` before it
|
|
553
|
-
* is another path, not this reply's); the first one found walking back wins.
|
|
554
|
-
*/
|
|
555
459
|
function statusSetBefore(call, callee) {
|
|
556
460
|
const bare = callee.replace(/\([^()]*\)/g, '');
|
|
557
461
|
if (!BODY_REPLY.test(bare) || /\b(?:status|code|sendStatus|writeHead)\(/.test(callee))
|
|
@@ -560,7 +464,7 @@ function statusSetBefore(call, callee) {
|
|
|
560
464
|
let statement = call;
|
|
561
465
|
while (statement.parent && !STATEMENT_BLOCKS.has(statement.parent.type))
|
|
562
466
|
statement = statement.parent;
|
|
563
|
-
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*$`);
|
|
564
468
|
let prev = statement.previousNamedSibling;
|
|
565
469
|
for (let i = 0; prev && i < STATUS_LOOKBACK; i++, prev = prev.previousNamedSibling) {
|
|
566
470
|
if (prev.type === 'comment')
|
|
@@ -571,20 +475,13 @@ function statusSetBefore(call, callee) {
|
|
|
571
475
|
}
|
|
572
476
|
return null;
|
|
573
477
|
}
|
|
574
|
-
/** The text of a call before its arguments, normalised to a member chain. */
|
|
575
478
|
function calleeChainText(call, container) {
|
|
576
|
-
// Kotlin and Swift wrap the arguments in a `call_suffix`; the callee is
|
|
577
|
-
// everything before that suffix.
|
|
578
479
|
let end = container.startIndex;
|
|
579
480
|
const suffix = container.parent && container.parent.type === 'call_suffix' ? container.parent : null;
|
|
580
481
|
if (suffix)
|
|
581
482
|
end = suffix.startIndex;
|
|
582
483
|
let text = collapse(call.text.slice(0, Math.max(0, end - call.startIndex)));
|
|
583
484
|
text = text.replace(/^(?:await|new|yield|return)\s+/, '').replace(/^(?:await|new)\s+/, '');
|
|
584
|
-
// Empty every nested argument list, innermost first: `a(b(c)).d` → `a().d`
|
|
585
|
-
// — keeping one short literal or name (`res.status(404).json`,
|
|
586
|
-
// `ResponseEntity.status(HttpStatus.NOT_FOUND).body`), which is the fact a
|
|
587
|
-
// reader of the chain wants.
|
|
588
485
|
for (let i = 0; i < 6 && /\([^()]*\)/.test(text); i++) {
|
|
589
486
|
text = text.replace(/\(([^()]*)\)/g, (_m, inner) => (/^\s*[\w.]{1,28}\s*$/.test(inner) ? `(${inner.trim()})` : '()'));
|
|
590
487
|
}
|
|
@@ -596,7 +493,6 @@ function calleeChainText(call, container) {
|
|
|
596
493
|
.replace(/\([^()]*\)$/, '');
|
|
597
494
|
return text.length > MAX_CALLEE_TEXT ? `${text.slice(0, MAX_CALLEE_TEXT - 1)}…` : text;
|
|
598
495
|
}
|
|
599
|
-
/** Both halves of every site, keyed by {@link siteKey}, from one cached tree. */
|
|
600
496
|
async function callSitesForFile(absPath, language, sites) {
|
|
601
497
|
const out = new Map();
|
|
602
498
|
if (!supportsBranchGuards(language) || sites.length === 0)
|
|
@@ -614,7 +510,6 @@ async function callSitesForFile(absPath, language, sites) {
|
|
|
614
510
|
}
|
|
615
511
|
return out;
|
|
616
512
|
}
|
|
617
|
-
/** {@link callSitesForFile} over source text — the test surface. */
|
|
618
513
|
async function callSiteInSource(source, language, line, column) {
|
|
619
514
|
if (!supportsBranchGuards(language))
|
|
620
515
|
return null;
|
|
@@ -628,7 +523,6 @@ async function callSiteInSource(source, language, line, column) {
|
|
|
628
523
|
tree.delete();
|
|
629
524
|
}
|
|
630
525
|
}
|
|
631
|
-
/** The node holding a call's arguments: the `arguments` field, a container child, or Swift's `call_suffix` contents. */
|
|
632
526
|
function argumentsOf(call) {
|
|
633
527
|
const field = call.childForFieldName('arguments');
|
|
634
528
|
if (field)
|
|
@@ -652,20 +546,17 @@ function argumentsOf(call) {
|
|
|
652
546
|
}
|
|
653
547
|
function abbreviateArgument(node, source) {
|
|
654
548
|
const type = node.type;
|
|
655
|
-
// Python `name=value`, C# `name: value` — the name is half the meaning.
|
|
656
549
|
if (type === 'keyword_argument') {
|
|
657
550
|
const name = node.childForFieldName('name');
|
|
658
551
|
const value = node.childForFieldName('value');
|
|
659
552
|
return `${name?.text ?? ''}=${value ? abbreviateArgument(value, source) : ''}`;
|
|
660
553
|
}
|
|
661
554
|
if (type === 'argument') {
|
|
662
|
-
// C#: an `argument` wraps the expression, optionally with a name.
|
|
663
555
|
const name = node.childForFieldName('name');
|
|
664
556
|
const inner = lastNamed(node);
|
|
665
557
|
const value = inner ? abbreviateArgument(inner, source) : cut(collapse(node.text), MAX_ARG_TEXT);
|
|
666
558
|
return name && inner && name.id !== inner.id ? `${name.text}: ${value}` : value;
|
|
667
559
|
}
|
|
668
|
-
// Go `gin.H{"error": err}` / `User{Name: n}`: the type, then the braces.
|
|
669
560
|
if (type === 'composite_literal') {
|
|
670
561
|
const t = node.childForFieldName('type');
|
|
671
562
|
return `${t ? cut(collapse(t.text), 24) : ''}{…}`;
|
|
@@ -691,7 +582,6 @@ function abbreviateArgument(node, source) {
|
|
|
691
582
|
const name = callee ? cut(collapse(callee.text), 28) : '';
|
|
692
583
|
return `${type === 'new_expression' ? 'new ' : ''}${name}(…)`;
|
|
693
584
|
}
|
|
694
|
-
// Swift `label: value` — the label is half the meaning (`withName:`).
|
|
695
585
|
if (type === 'value_argument') {
|
|
696
586
|
const named = [];
|
|
697
587
|
for (let i = 0; i < node.namedChildCount; i++) {
|
|
@@ -708,7 +598,6 @@ function abbreviateArgument(node, source) {
|
|
|
708
598
|
return '{ … }';
|
|
709
599
|
return cut(collapse(node.text), MAX_ARG_TEXT);
|
|
710
600
|
}
|
|
711
|
-
/** `{ email, password, …}` — the keys an object literal passes, not its bulk. */
|
|
712
601
|
function objectKeys(node, source) {
|
|
713
602
|
const keys = [];
|
|
714
603
|
let more = 0;
|
|
@@ -738,7 +627,6 @@ function objectKeys(node, source) {
|
|
|
738
627
|
return '{…}';
|
|
739
628
|
return `{ ${keys.join(', ')}${more > 0 ? ', …' : ''} }`;
|
|
740
629
|
}
|
|
741
|
-
/** Callees whose function argument runs LATER — a callback, not a call. Matched on the last segment. */
|
|
742
630
|
const LATER_CALLEES = new Set([
|
|
743
631
|
'useEffect',
|
|
744
632
|
'useLayoutEffect',
|
|
@@ -761,7 +649,6 @@ const LATER_CALLEES = new Set([
|
|
|
761
649
|
'runOnUI',
|
|
762
650
|
'scheduleOnRN',
|
|
763
651
|
]);
|
|
764
|
-
/** The walk up never leaves the function the site belongs to — unless that function is inline. */
|
|
765
652
|
const TRIGGER_BOUNDARIES = new Set(['function_declaration', 'method_definition', 'class_declaration', 'class_body', 'program']);
|
|
766
653
|
const MAX_TRIGGER_CLIMB = 24;
|
|
767
654
|
async function triggersForFile(absPath, language, sites) {
|
|
@@ -781,7 +668,6 @@ async function triggersForFile(absPath, language, sites) {
|
|
|
781
668
|
}
|
|
782
669
|
return out;
|
|
783
670
|
}
|
|
784
|
-
/** {@link triggersForFile} over source text — the test surface. */
|
|
785
671
|
async function triggerInSource(source, language, line, column) {
|
|
786
672
|
if (!JS_FAMILY.has(language))
|
|
787
673
|
return null;
|
|
@@ -800,15 +686,11 @@ function triggerInTree(root, source, line, column) {
|
|
|
800
686
|
const col = column ?? firstNonBlankColumn(source, row);
|
|
801
687
|
let node = innermostAt(root, row, col);
|
|
802
688
|
let prev = null;
|
|
803
|
-
// Whether the climb crossed an inline function: `onPress={() => go()}`
|
|
804
|
-
// fires later, `behavior={isAndroid() ? 'a' : 'b'}` runs at render.
|
|
805
689
|
let deferred = false;
|
|
806
690
|
for (let up = 0; node && up < MAX_TRIGGER_CLIMB; up++, prev = node, node = node.parent) {
|
|
807
691
|
const type = node.type;
|
|
808
692
|
if (TRIGGER_BOUNDARIES.has(type))
|
|
809
693
|
return null;
|
|
810
|
-
// A named handler is its own story: `const handleX = useCallback(() => …)`
|
|
811
|
-
// binds a name, and whoever uses the name is the trigger of what is inside.
|
|
812
694
|
if (type === 'arrow_function' || type === 'function_expression') {
|
|
813
695
|
const p = node.parent;
|
|
814
696
|
if (p?.type === 'variable_declarator')
|
|
@@ -823,8 +705,6 @@ function triggerInTree(root, source, line, column) {
|
|
|
823
705
|
if (type === 'jsx_attribute') {
|
|
824
706
|
const name = node.namedChild(0);
|
|
825
707
|
const propName = name ? name.text : 'prop';
|
|
826
|
-
// An event prop, or any prop given a function: fired later. A value
|
|
827
|
-
// computed in the attribute (`behavior={isAndroid() ? …}`) is not.
|
|
828
708
|
if (!deferred && !/^on[A-Z]/.test(propName))
|
|
829
709
|
return null;
|
|
830
710
|
const element = node.parent;
|
|
@@ -835,8 +715,6 @@ function triggerInTree(root, source, line, column) {
|
|
|
835
715
|
const key = node.childForFieldName('key');
|
|
836
716
|
const keyText = key ? key.text.replace(/^['"`]|['"`]$/g, '') : '';
|
|
837
717
|
if (/^on[A-Z]\w*$/.test(keyText)) {
|
|
838
|
-
// `useFormik({ onSubmit: … })`, `Alert.alert(t, m, [{ onPress: … }])`:
|
|
839
|
-
// the object — possibly inside an array — is an argument of a call.
|
|
840
718
|
let holder = node.parent;
|
|
841
719
|
for (let hop = 0; holder && hop < 4 && (holder.type === 'object' || holder.type === 'array' || holder.type === 'pair'); hop++) {
|
|
842
720
|
holder = holder.parent;
|
|
@@ -856,12 +734,10 @@ function triggerInTree(root, source, line, column) {
|
|
|
856
734
|
}
|
|
857
735
|
return null;
|
|
858
736
|
}
|
|
859
|
-
/** A call's callee as written: `nativeEmitter.addListener`, `Alert.alert`, `useFormik`. */
|
|
860
737
|
function calleeText(call) {
|
|
861
738
|
const callee = call.childForFieldName('function') ?? call.childForFieldName('constructor');
|
|
862
739
|
return callee ? cut(collapseText(callee.text), 40) : null;
|
|
863
740
|
}
|
|
864
|
-
/** The last segment of a callee: `nativeEmitter.addListener` → `addListener`. */
|
|
865
741
|
function lastSegment(text) {
|
|
866
742
|
if (text === null)
|
|
867
743
|
return null;
|
|
@@ -882,7 +758,6 @@ function firstNonBlankColumn(source, row) {
|
|
|
882
758
|
const m = line.match(/\S/);
|
|
883
759
|
return m ? (m.index ?? 0) : 0;
|
|
884
760
|
}
|
|
885
|
-
/** Load the grammars {@link guardsForFileSync} needs; a no-op once loaded, never throws. */
|
|
886
761
|
async function warmBranchGuardGrammars(only) {
|
|
887
762
|
const wanted = exports.BRANCH_GUARD_LANGUAGES.filter((l) => !only || only.includes(l));
|
|
888
763
|
if (wanted.length === 0)
|
|
@@ -891,10 +766,8 @@ async function warmBranchGuardGrammars(only) {
|
|
|
891
766
|
await (0, grammars_1.loadGrammarsForLanguages)(wanted);
|
|
892
767
|
}
|
|
893
768
|
catch {
|
|
894
|
-
// Explore prints no `when` for that language; nothing else changes.
|
|
895
769
|
}
|
|
896
770
|
}
|
|
897
|
-
/** Guards for one site in source text — the test seam; production reads files. */
|
|
898
771
|
async function guardsInSource(source, language, line, column = null) {
|
|
899
772
|
if (!supportsBranchGuards(language))
|
|
900
773
|
return [];
|
|
@@ -908,7 +781,6 @@ async function guardsInSource(source, language, line, column = null) {
|
|
|
908
781
|
tree.delete();
|
|
909
782
|
}
|
|
910
783
|
}
|
|
911
|
-
/** Loops for one site in source text — the test seam; production reads files. */
|
|
912
784
|
async function loopsInSource(source, language, line, column = null) {
|
|
913
785
|
if (!supportsBranchGuards(language))
|
|
914
786
|
return [];
|
|
@@ -922,7 +794,6 @@ async function loopsInSource(source, language, line, column = null) {
|
|
|
922
794
|
tree.delete();
|
|
923
795
|
}
|
|
924
796
|
}
|
|
925
|
-
/** Loop node types across the grammars with rules here. A type absent yields nothing, never a wrong label. */
|
|
926
797
|
const LOOP_TYPES = new Map([
|
|
927
798
|
['for_statement', 'each'],
|
|
928
799
|
['for_in_statement', 'each'],
|
|
@@ -938,13 +809,6 @@ const LOOP_TYPES = new Map([
|
|
|
938
809
|
['do_while_statement', 'while'],
|
|
939
810
|
['repeat_while_statement', 'while'],
|
|
940
811
|
]);
|
|
941
|
-
/**
|
|
942
|
-
* The loops a site is written inside, outermost first — what tells a reading in
|
|
943
|
-
* the code's order that a run of calls happens once PER ITEM rather than once.
|
|
944
|
-
* The climb is the guards' climb (the same boundaries, the same transparent
|
|
945
|
-
* inline functions), so a callback's body is read in its own function and a
|
|
946
|
-
* `.forEach` body under the loop it is written in.
|
|
947
|
-
*/
|
|
948
812
|
function loopsInTree(root, source, language, line, column) {
|
|
949
813
|
const rules = RULES_BY_LANGUAGE.get(language);
|
|
950
814
|
if (!rules)
|
|
@@ -974,7 +838,6 @@ function loopsInTree(root, source, language, line, column) {
|
|
|
974
838
|
continue;
|
|
975
839
|
}
|
|
976
840
|
const kind = LOOP_TYPES.get(parent.type);
|
|
977
|
-
// The header, not the body: a site is in the loop only when it is under it.
|
|
978
841
|
if (kind && !isField(parent, 'condition', node) && !isField(parent, 'value', node)) {
|
|
979
842
|
const text = loopHeader(parent);
|
|
980
843
|
if (text)
|
|
@@ -985,7 +848,6 @@ function loopsInTree(root, source, language, line, column) {
|
|
|
985
848
|
found.reverse();
|
|
986
849
|
return found;
|
|
987
850
|
}
|
|
988
|
-
/** Loops for many sites in one file, keyed by {@link siteKey}. */
|
|
989
851
|
async function loopsForFile(absPath, language, sites) {
|
|
990
852
|
const out = new Map();
|
|
991
853
|
if (!supportsBranchGuards(language) || sites.length === 0)
|
|
@@ -1000,7 +862,6 @@ async function loopsForFile(absPath, language, sites) {
|
|
|
1000
862
|
}
|
|
1001
863
|
return out;
|
|
1002
864
|
}
|
|
1003
|
-
/** A loop's header as written, keyword and braces dropped: `item of items`, `queue.length > 0`. */
|
|
1004
865
|
function loopHeader(loop) {
|
|
1005
866
|
const body = loop.childForFieldName('body') ?? namedChildren(loop).find((c) => BLOCKISH.has(c.type)) ?? null;
|
|
1006
867
|
const raw = body && body.startIndex > loop.startIndex ? loop.text.slice(0, body.startIndex - loop.startIndex) : loop.text;
|
|
@@ -1010,15 +871,9 @@ function loopHeader(loop) {
|
|
|
1010
871
|
const inner = /^\((.*)\)$/s.exec(text);
|
|
1011
872
|
if (inner)
|
|
1012
873
|
text = inner[1].trim();
|
|
1013
|
-
// `const item of items` reads as `item of items`; the binding word is noise here.
|
|
1014
874
|
text = text.replace(/^(?:const|let|var|val|final)\s+/, '');
|
|
1015
875
|
return cut(text, 60);
|
|
1016
876
|
}
|
|
1017
|
-
/**
|
|
1018
|
-
* The walk. `line` is 1-based, `column` 0-based (null → first non-blank).
|
|
1019
|
-
* Returns the guards outermost first — execution order, the way a reader
|
|
1020
|
-
* would list them.
|
|
1021
|
-
*/
|
|
1022
877
|
function guardsInTree(root, source, language, line, column) {
|
|
1023
878
|
const row = line - 1;
|
|
1024
879
|
if (row < 0)
|
|
@@ -1036,8 +891,6 @@ function guardsInTree(root, source, language, line, column) {
|
|
|
1036
891
|
if (!rules)
|
|
1037
892
|
return [];
|
|
1038
893
|
const found = [];
|
|
1039
|
-
// Innermost → outermost. `found` is reversed at the end, so within one level
|
|
1040
|
-
// anything meant to read as OUTER must be pushed LATER.
|
|
1041
894
|
while (node) {
|
|
1042
895
|
const parent = node.parent;
|
|
1043
896
|
if (!parent || rules.boundaries.has(parent.type))
|
|
@@ -1049,9 +902,6 @@ function guardsInTree(root, source, language, line, column) {
|
|
|
1049
902
|
node = parent;
|
|
1050
903
|
continue;
|
|
1051
904
|
}
|
|
1052
|
-
// Anything `enclosing` pushed came from THIS construct, and the arm the
|
|
1053
|
-
// site is in is the child the walk came up through: stamp both, unless the
|
|
1054
|
-
// rule already named a different branch (a `switch` case's is the switch).
|
|
1055
905
|
const before = found.length;
|
|
1056
906
|
rules.enclosing(parent, node, found);
|
|
1057
907
|
for (let i = before; i < found.length; i++) {
|
|
@@ -1069,12 +919,6 @@ function guardsInTree(root, source, language, line, column) {
|
|
|
1069
919
|
found.reverse();
|
|
1070
920
|
return found;
|
|
1071
921
|
}
|
|
1072
|
-
/**
|
|
1073
|
-
* The innermost named node containing (row, col). `descendantForPosition` is
|
|
1074
|
-
* the fast path, but some grammars (Swift's `statements`) answer with the
|
|
1075
|
-
* container, so the result is refined by descending while a named child still
|
|
1076
|
-
* contains the point.
|
|
1077
|
-
*/
|
|
1078
922
|
function innermostAt(root, row, col) {
|
|
1079
923
|
let node = root.descendantForPosition({ row, column: col });
|
|
1080
924
|
if (!node)
|
|
@@ -1102,23 +946,13 @@ function condText(node) {
|
|
|
1102
946
|
if (!node)
|
|
1103
947
|
return '';
|
|
1104
948
|
let n = node;
|
|
1105
|
-
// `(x)` — the parens are the statement's, not the condition's.
|
|
1106
949
|
while (n.type === 'parenthesized_expression' && n.namedChildCount === 1)
|
|
1107
950
|
n = n.namedChild(0);
|
|
1108
951
|
const text = n.text.replace(/\s+/g, ' ').trim();
|
|
1109
|
-
// A bare keyword is a grammar's error recovery (`let` from an `if let` it
|
|
1110
|
-
// could not parse), never a condition a reader can use.
|
|
1111
952
|
if (/^(?:let|var|case|try|await|guard|if|else|some|any)$/.test(text))
|
|
1112
953
|
return '';
|
|
1113
954
|
return text.length > MAX_TEXT ? text.slice(0, MAX_TEXT - 1) + '…' : text;
|
|
1114
955
|
}
|
|
1115
|
-
/**
|
|
1116
|
-
* One guard. `branch` names the construct the arm belongs to: by default the
|
|
1117
|
-
* node the walk is climbing THROUGH (an `if`, a ternary, a `catch`), which is
|
|
1118
|
-
* right whenever the construct is the site's parent — and overridden where it
|
|
1119
|
-
* is not, by a `switch` case (whose parent is the case) and by an early exit
|
|
1120
|
-
* (whose branch is the `if` that returned, several statements back).
|
|
1121
|
-
*/
|
|
1122
956
|
function guard(form, cond, negated, text, branch, exit) {
|
|
1123
957
|
const t = text ?? condText(cond);
|
|
1124
958
|
if (!t)
|
|
@@ -1132,17 +966,9 @@ function guard(form, cond, negated, text, branch, exit) {
|
|
|
1132
966
|
...(exit ? { exit } : {}),
|
|
1133
967
|
};
|
|
1134
968
|
}
|
|
1135
|
-
/** A branching construct's identity: where it starts, `line:column`. */
|
|
1136
969
|
function branchKey(node) {
|
|
1137
970
|
return `${node.startPosition.row + 1}:${node.startPosition.column}`;
|
|
1138
971
|
}
|
|
1139
|
-
/**
|
|
1140
|
-
* Containers whose LAST statement decides how the whole thing leaves: a block,
|
|
1141
|
-
* and the clause wrappers a grammar puts an arm's block inside (`else_clause`,
|
|
1142
|
-
* `except_clause`) — the walk climbs through those, so the node it hands back
|
|
1143
|
-
* is the wrapper, not the block. A CONDITIONAL wrapper is not one of them: an
|
|
1144
|
-
* `elif` whose body raises does not mean the arm it is in always raises.
|
|
1145
|
-
*/
|
|
1146
972
|
const BLOCKISH = new Set([
|
|
1147
973
|
'statement_block',
|
|
1148
974
|
'block',
|
|
@@ -1157,12 +983,6 @@ const BLOCKISH = new Set([
|
|
|
1157
983
|
'except_clause',
|
|
1158
984
|
'finally_clause',
|
|
1159
985
|
]);
|
|
1160
|
-
/**
|
|
1161
|
-
* How a statement — or a block, by its last statement — leaves: `throw` for a
|
|
1162
|
-
* raised error, `return` for a return / break / continue, `exit` for a
|
|
1163
|
-
* language's other way out (Go's `panic`, C's `exit`) that the language rules
|
|
1164
|
-
* count as an exit but no keyword names. Null when it does not always leave.
|
|
1165
|
-
*/
|
|
1166
986
|
function exitKind(node) {
|
|
1167
987
|
if (!node)
|
|
1168
988
|
return null;
|
|
@@ -1171,15 +991,12 @@ function exitKind(node) {
|
|
|
1171
991
|
return 'throw';
|
|
1172
992
|
if (/^(?:return|break|continue|goto|yield)_statement$/.test(t))
|
|
1173
993
|
return 'return';
|
|
1174
|
-
// Swift's `control_transfer_statement` and Kotlin's `jump_expression` say
|
|
1175
|
-
// which in their first word.
|
|
1176
994
|
if (t === 'control_transfer_statement' || t === 'jump_expression')
|
|
1177
995
|
return /^\s*throw\b/.test(node.text) ? 'throw' : 'return';
|
|
1178
996
|
if (BLOCKISH.has(t))
|
|
1179
997
|
return exitKind(lastNamed(node));
|
|
1180
998
|
return null;
|
|
1181
999
|
}
|
|
1182
|
-
/** {@link exitKind}, or `exit` when the language's rules call it an exit and no keyword names it. */
|
|
1183
1000
|
function exitKindOr(node, exits) {
|
|
1184
1001
|
if (!exits)
|
|
1185
1002
|
return null;
|
|
@@ -1196,7 +1013,6 @@ function isField(parent, field, child) {
|
|
|
1196
1013
|
function lastNamed(node) {
|
|
1197
1014
|
return node.namedChildCount > 0 ? node.namedChild(node.namedChildCount - 1) : null;
|
|
1198
1015
|
}
|
|
1199
|
-
/** The named children of `parent` that come before `child`, in source order. */
|
|
1200
1016
|
function precedingSiblings(parent, child) {
|
|
1201
1017
|
const out = [];
|
|
1202
1018
|
for (let i = 0; i < parent.namedChildCount; i++) {
|
|
@@ -1207,9 +1023,7 @@ function precedingSiblings(parent, child) {
|
|
|
1207
1023
|
}
|
|
1208
1024
|
return out;
|
|
1209
1025
|
}
|
|
1210
|
-
// ----------------------------------------------------------------------- JS --
|
|
1211
1026
|
const JS_EXITS = new Set(['return_statement', 'throw_statement', 'break_statement', 'continue_statement']);
|
|
1212
|
-
/** A statement that always leaves the block: an exit, or a block ending in one. */
|
|
1213
1027
|
function jsAlwaysExits(node) {
|
|
1214
1028
|
if (!node)
|
|
1215
1029
|
return false;
|
|
@@ -1259,11 +1073,10 @@ const JS = {
|
|
|
1259
1073
|
}
|
|
1260
1074
|
case 'switch_case':
|
|
1261
1075
|
case 'switch_default': {
|
|
1262
|
-
// `child` is one of the case's body statements (not its value).
|
|
1263
1076
|
if (parent.type === 'switch_case' && isField(parent, 'value', child))
|
|
1264
1077
|
return;
|
|
1265
|
-
const body = parent.parent;
|
|
1266
|
-
const stmt = body?.parent;
|
|
1078
|
+
const body = parent.parent;
|
|
1079
|
+
const stmt = body?.parent;
|
|
1267
1080
|
const subject = condText(stmt?.childForFieldName('value'));
|
|
1268
1081
|
if (parent.type === 'switch_default')
|
|
1269
1082
|
push(out, guard('case', stmt?.childForFieldName('value'), false, subject ? `${subject}: default` : 'default', stmt));
|
|
@@ -1293,9 +1106,6 @@ const JS = {
|
|
|
1293
1106
|
}
|
|
1294
1107
|
},
|
|
1295
1108
|
earlyExits(parent, child, out) {
|
|
1296
|
-
// Outer-most last (the list is reversed once at the end): walk the
|
|
1297
|
-
// preceding statements backwards so the FIRST guard in the source ends up
|
|
1298
|
-
// first in the final order.
|
|
1299
1109
|
const before = precedingSiblings(parent, child);
|
|
1300
1110
|
for (let i = before.length - 1; i >= 0; i--) {
|
|
1301
1111
|
const s = before[i];
|
|
@@ -1308,7 +1118,6 @@ const JS = {
|
|
|
1308
1118
|
}
|
|
1309
1119
|
},
|
|
1310
1120
|
};
|
|
1311
|
-
// -------------------------------------------------------------------- Swift --
|
|
1312
1121
|
function swiftAlwaysExits(node) {
|
|
1313
1122
|
if (!node)
|
|
1314
1123
|
return false;
|
|
@@ -1318,7 +1127,6 @@ function swiftAlwaysExits(node) {
|
|
|
1318
1127
|
return swiftAlwaysExits(lastNamed(node));
|
|
1319
1128
|
return false;
|
|
1320
1129
|
}
|
|
1321
|
-
/** For a Swift `if`: is `child` after the `else` keyword? */
|
|
1322
1130
|
function afterElse(parent, child) {
|
|
1323
1131
|
let seenElse = false;
|
|
1324
1132
|
for (let i = 0; i < parent.childCount; i++) {
|
|
@@ -1330,11 +1138,7 @@ function afterElse(parent, child) {
|
|
|
1330
1138
|
}
|
|
1331
1139
|
return false;
|
|
1332
1140
|
}
|
|
1333
|
-
/** All `condition` fields of a Swift `if`/`guard`, joined — `if let x, y > 0`. */
|
|
1334
1141
|
function swiftConditions(node) {
|
|
1335
|
-
// The grammar labels several tokens of `if let x = y, z > 0` as `condition`
|
|
1336
|
-
// (the binding's own pieces included), so the readable text is the SPAN from
|
|
1337
|
-
// the first to the last of them, not the pieces joined.
|
|
1338
1142
|
const parts = [];
|
|
1339
1143
|
for (let i = 0; i < node.childCount; i++) {
|
|
1340
1144
|
if (node.fieldNameForChild(i) === 'condition')
|
|
@@ -1373,7 +1177,6 @@ const SWIFT = {
|
|
|
1373
1177
|
return;
|
|
1374
1178
|
}
|
|
1375
1179
|
case 'guard_statement': {
|
|
1376
|
-
// Inside the guard's body the condition FAILED.
|
|
1377
1180
|
if (parent.fieldNameForChild(indexOf(parent, child)) === 'condition')
|
|
1378
1181
|
return;
|
|
1379
1182
|
const c = swiftConditions(parent);
|
|
@@ -1432,17 +1235,12 @@ function indexOf(parent, child) {
|
|
|
1432
1235
|
return i;
|
|
1433
1236
|
return -1;
|
|
1434
1237
|
}
|
|
1435
|
-
/** The named children of a node, in order. */
|
|
1436
1238
|
function namedChildren(node) {
|
|
1437
1239
|
const out = [];
|
|
1438
1240
|
for (let i = 0; i < node.namedChildCount; i++)
|
|
1439
1241
|
out.push(node.namedChild(i));
|
|
1440
1242
|
return out;
|
|
1441
1243
|
}
|
|
1442
|
-
/**
|
|
1443
|
-
* Shared shape of "an early exit before the site": the preceding statements
|
|
1444
|
-
* of the block that are an `if` with no else whose body always leaves.
|
|
1445
|
-
*/
|
|
1446
1244
|
function guardsBefore(parent, child, out, isIf, hasElse, body, alwaysExits, condition) {
|
|
1447
1245
|
const before = precedingSiblings(parent, child);
|
|
1448
1246
|
for (let i = before.length - 1; i >= 0; i--) {
|
|
@@ -1456,7 +1254,6 @@ function guardsBefore(parent, child, out, isIf, hasElse, body, alwaysExits, cond
|
|
|
1456
1254
|
push(out, guard('guard', c.node, true, c.text, s, exitKindOr(arm, true)));
|
|
1457
1255
|
}
|
|
1458
1256
|
}
|
|
1459
|
-
// ------------------------------------------------------------------- Python --
|
|
1460
1257
|
const PY_EXITS = new Set(['return_statement', 'raise_statement', 'break_statement', 'continue_statement']);
|
|
1461
1258
|
function pyAlwaysExits(node) {
|
|
1462
1259
|
if (!node)
|
|
@@ -1490,7 +1287,6 @@ const PYTHON = {
|
|
|
1490
1287
|
if (isField(parent, 'consequence', child))
|
|
1491
1288
|
push(out, guard('if', cond, false));
|
|
1492
1289
|
else if (child.type === 'elif_clause' || child.type === 'else_clause') {
|
|
1493
|
-
// An elif/else arm runs when the `if` and every earlier elif failed.
|
|
1494
1290
|
push(out, guard('else', cond, true));
|
|
1495
1291
|
for (const s of precedingSiblings(parent, child)) {
|
|
1496
1292
|
if (s.type === 'elif_clause')
|
|
@@ -1505,7 +1301,6 @@ const PYTHON = {
|
|
|
1505
1301
|
return;
|
|
1506
1302
|
}
|
|
1507
1303
|
case 'conditional_expression': {
|
|
1508
|
-
// `a if cond else b`: children are [a, cond, b].
|
|
1509
1304
|
const kids = namedChildren(parent);
|
|
1510
1305
|
if (kids.length < 3)
|
|
1511
1306
|
return;
|
|
@@ -1551,7 +1346,6 @@ const PYTHON = {
|
|
|
1551
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')) }));
|
|
1552
1347
|
},
|
|
1553
1348
|
};
|
|
1554
|
-
// --------------------------------------------------------------------- Java --
|
|
1555
1349
|
const JAVA_EXITS = new Set(['return_statement', 'throw_statement', 'break_statement', 'continue_statement', 'yield_statement']);
|
|
1556
1350
|
function javaAlwaysExits(node) {
|
|
1557
1351
|
if (!node)
|
|
@@ -1562,7 +1356,6 @@ function javaAlwaysExits(node) {
|
|
|
1562
1356
|
return javaAlwaysExits(lastNamed(node));
|
|
1563
1357
|
return false;
|
|
1564
1358
|
}
|
|
1565
|
-
/** `case A:` / `case A ->` / `default` labels of a Java switch group or rule, as one condition text. */
|
|
1566
1359
|
function javaCaseText(labels, subject) {
|
|
1567
1360
|
const values = labels.map((l) => namedChildren(l).map((n) => condText(n)).filter(Boolean).join(', ')).filter(Boolean);
|
|
1568
1361
|
if (values.length === 0)
|
|
@@ -1635,7 +1428,6 @@ const JAVA = {
|
|
|
1635
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')) }));
|
|
1636
1429
|
},
|
|
1637
1430
|
};
|
|
1638
|
-
// ------------------------------------------------------------------- Kotlin --
|
|
1639
1431
|
function ktAlwaysExits(node) {
|
|
1640
1432
|
if (!node)
|
|
1641
1433
|
return false;
|
|
@@ -1645,7 +1437,6 @@ function ktAlwaysExits(node) {
|
|
|
1645
1437
|
return ktAlwaysExits(lastNamed(node));
|
|
1646
1438
|
return false;
|
|
1647
1439
|
}
|
|
1648
|
-
/** The two arms of a Kotlin `if`: the bodies, in order (then, else). */
|
|
1649
1440
|
function ktArms(ifExpr) {
|
|
1650
1441
|
return namedChildren(ifExpr).filter((n) => n.type === 'control_structure_body');
|
|
1651
1442
|
}
|
|
@@ -1718,7 +1509,6 @@ const KOTLIN = {
|
|
|
1718
1509
|
});
|
|
1719
1510
|
},
|
|
1720
1511
|
};
|
|
1721
|
-
// ----------------------------------------------------------------------- C# --
|
|
1722
1512
|
const CS_EXITS = new Set(['return_statement', 'throw_statement', 'break_statement', 'continue_statement']);
|
|
1723
1513
|
function csAlwaysExits(node) {
|
|
1724
1514
|
if (!node)
|
|
@@ -1810,7 +1600,6 @@ const CSHARP = {
|
|
|
1810
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')) }));
|
|
1811
1601
|
},
|
|
1812
1602
|
};
|
|
1813
|
-
// ----------------------------------------------------------------------- Go --
|
|
1814
1603
|
const GO_EXITS = new Set(['return_statement', 'break_statement', 'continue_statement', 'goto_statement']);
|
|
1815
1604
|
function goAlwaysExits(node) {
|
|
1816
1605
|
if (!node)
|
|
@@ -1881,7 +1670,6 @@ const GO = {
|
|
|
1881
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')) }));
|
|
1882
1671
|
},
|
|
1883
1672
|
};
|
|
1884
|
-
// -------------------------------------------------------------------- C/C++ --
|
|
1885
1673
|
const C_EXITS = new Set(['return_statement', 'break_statement', 'continue_statement', 'goto_statement', 'throw_statement']);
|
|
1886
1674
|
function cAlwaysExits(node) {
|
|
1887
1675
|
if (!node)
|
|
@@ -1964,7 +1752,6 @@ const C = {
|
|
|
1964
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')) }));
|
|
1965
1753
|
},
|
|
1966
1754
|
};
|
|
1967
|
-
/** The rules per language. A language absent here yields no guards — never a wrong one. */
|
|
1968
1755
|
const RULES_BY_LANGUAGE = new Map([
|
|
1969
1756
|
['typescript', JS],
|
|
1970
1757
|
['tsx', JS],
|
|
@@ -1980,6 +1767,94 @@ const RULES_BY_LANGUAGE = new Map([
|
|
|
1980
1767
|
['cpp', C],
|
|
1981
1768
|
['objc', C],
|
|
1982
1769
|
]);
|
|
1770
|
+
const NESTED_SCOPE_TYPES = new Set([
|
|
1771
|
+
'lambda_expression',
|
|
1772
|
+
'class_body',
|
|
1773
|
+
'lambda_literal',
|
|
1774
|
+
'anonymous_function',
|
|
1775
|
+
'object_literal',
|
|
1776
|
+
'arrow_function',
|
|
1777
|
+
'function_expression',
|
|
1778
|
+
'function_declaration',
|
|
1779
|
+
'function_definition',
|
|
1780
|
+
'method_declaration',
|
|
1781
|
+
'method_definition',
|
|
1782
|
+
'lambda',
|
|
1783
|
+
]);
|
|
1784
|
+
async function returnsForFile(absPath, language, line) {
|
|
1785
|
+
if (!supportsBranchGuards(language))
|
|
1786
|
+
return [];
|
|
1787
|
+
const cached = await treeFor(absPath, language);
|
|
1788
|
+
if (!cached)
|
|
1789
|
+
return [];
|
|
1790
|
+
return returnsInTree(cached.tree.rootNode, line);
|
|
1791
|
+
}
|
|
1792
|
+
async function returnsInSource(source, language, line) {
|
|
1793
|
+
if (!supportsBranchGuards(language))
|
|
1794
|
+
return [];
|
|
1795
|
+
const tree = await parse(source, language);
|
|
1796
|
+
if (!tree)
|
|
1797
|
+
return [];
|
|
1798
|
+
try {
|
|
1799
|
+
return returnsInTree(tree.rootNode, line);
|
|
1800
|
+
}
|
|
1801
|
+
finally {
|
|
1802
|
+
tree.delete();
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1805
|
+
function returnsInTree(root, line) {
|
|
1806
|
+
const row = line - 1;
|
|
1807
|
+
let node = innermostAt(root, row, firstNonBlankColumn(root.text, row));
|
|
1808
|
+
let definition = null;
|
|
1809
|
+
for (let up = 0; node && up < 12; up++, node = node.parent) {
|
|
1810
|
+
if (DEFINITION_TYPES.has(node.type)) {
|
|
1811
|
+
definition = node;
|
|
1812
|
+
break;
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
if (!definition)
|
|
1816
|
+
return [];
|
|
1817
|
+
const out = [];
|
|
1818
|
+
const visit = (n) => {
|
|
1819
|
+
for (const c of namedChildren(n)) {
|
|
1820
|
+
if (NESTED_SCOPE_TYPES.has(c.type))
|
|
1821
|
+
continue;
|
|
1822
|
+
const isReturn = c.type === 'return_statement' || (c.type === 'jump_expression' && /^return\b/.test(c.text));
|
|
1823
|
+
if (isReturn) {
|
|
1824
|
+
const expr = namedChildren(c)[0];
|
|
1825
|
+
if (expr)
|
|
1826
|
+
out.push({ line: c.startPosition.row + 1, column: c.startPosition.column, expression: collapse(expr.text) });
|
|
1827
|
+
continue;
|
|
1828
|
+
}
|
|
1829
|
+
visit(c);
|
|
1830
|
+
}
|
|
1831
|
+
};
|
|
1832
|
+
visit(definition);
|
|
1833
|
+
let cls = definition.parent;
|
|
1834
|
+
for (let up = 0; cls && up < 6 && !CLASS_TYPES.has(cls.type); up++)
|
|
1835
|
+
cls = cls.parent;
|
|
1836
|
+
if (cls) {
|
|
1837
|
+
const strings = new Map();
|
|
1838
|
+
const collect = (n) => {
|
|
1839
|
+
for (const c of namedChildren(n)) {
|
|
1840
|
+
if (c.type === 'variable_declarator') {
|
|
1841
|
+
const name = c.childForFieldName('name')?.text;
|
|
1842
|
+
const value = c.childForFieldName('value');
|
|
1843
|
+
if (name && value?.type === 'string_literal')
|
|
1844
|
+
strings.set(name, value.text.replace(/^"|"$/g, ''));
|
|
1845
|
+
}
|
|
1846
|
+
else if (c.type === 'field_declaration' || c.type === 'class_body')
|
|
1847
|
+
collect(c);
|
|
1848
|
+
}
|
|
1849
|
+
};
|
|
1850
|
+
collect(cls);
|
|
1851
|
+
for (const r of out) {
|
|
1852
|
+
if (/^[A-Za-z_$][\w$]*$/.test(r.expression) && strings.has(r.expression))
|
|
1853
|
+
r.value = strings.get(r.expression);
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1856
|
+
return out;
|
|
1857
|
+
}
|
|
1983
1858
|
const DEFINITION_TYPES = new Set([
|
|
1984
1859
|
'function_declaration',
|
|
1985
1860
|
'function_definition',
|
|
@@ -2013,7 +1888,6 @@ async function decoratorsForFile(absPath, language, lines) {
|
|
|
2013
1888
|
}
|
|
2014
1889
|
return out;
|
|
2015
1890
|
}
|
|
2016
|
-
/** {@link decoratorsForFile} over source text — the test surface. */
|
|
2017
1891
|
async function decoratorsInSource(source, language, line) {
|
|
2018
1892
|
if (!supportsBranchGuards(language))
|
|
2019
1893
|
return null;
|
|
@@ -2033,7 +1907,6 @@ function decoratorsInTree(root, source, line) {
|
|
|
2033
1907
|
let node = innermostAt(root, row, col);
|
|
2034
1908
|
if (!node)
|
|
2035
1909
|
return null;
|
|
2036
|
-
// Up to the definition the line belongs to.
|
|
2037
1910
|
let definition = null;
|
|
2038
1911
|
for (let up = 0; node && up < 12; up++, node = node.parent) {
|
|
2039
1912
|
if (DEFINITION_TYPES.has(node.type)) {
|
|
@@ -2043,7 +1916,6 @@ function decoratorsInTree(root, source, line) {
|
|
|
2043
1916
|
}
|
|
2044
1917
|
if (!definition)
|
|
2045
1918
|
return null;
|
|
2046
|
-
// A Python decorated function is the child of the node that holds the decorators.
|
|
2047
1919
|
const holder = definition.parent && definition.parent.type === 'decorated_definition' ? definition.parent : definition;
|
|
2048
1920
|
const own = decoratorsOn(holder);
|
|
2049
1921
|
let cls = holder.parent;
|
|
@@ -2052,7 +1924,6 @@ function decoratorsInTree(root, source, line) {
|
|
|
2052
1924
|
const clsHolder = cls && cls.parent && cls.parent.type === 'decorated_definition' ? cls.parent : cls;
|
|
2053
1925
|
return { own, class: clsHolder ? decoratorsOn(clsHolder) : [] };
|
|
2054
1926
|
}
|
|
2055
|
-
/** Decorator texts on one definition node: its own leading decorator children, its modifiers/attribute lists, or the siblings before it. */
|
|
2056
1927
|
function decoratorsOn(definition) {
|
|
2057
1928
|
const out = [];
|
|
2058
1929
|
const add = (n) => {
|
|
@@ -2072,7 +1943,6 @@ function decoratorsOn(definition) {
|
|
|
2072
1943
|
else
|
|
2073
1944
|
add(c);
|
|
2074
1945
|
}
|
|
2075
|
-
// JS: decorators are siblings that precede the member in the class body.
|
|
2076
1946
|
if (out.length === 0 && definition.parent) {
|
|
2077
1947
|
const before = precedingSiblings(definition.parent, definition);
|
|
2078
1948
|
for (let i = before.length - 1; i >= 0; i--) {
|
|
@@ -2090,23 +1960,6 @@ function decoratorText(node) {
|
|
|
2090
1960
|
text = text.replace(/^\[|\]$/g, '');
|
|
2091
1961
|
return cut(text, MAX_DECORATOR_TEXT);
|
|
2092
1962
|
}
|
|
2093
|
-
// =============================================================================
|
|
2094
|
-
// Member types — what a class declares its members to be
|
|
2095
|
-
// =============================================================================
|
|
2096
|
-
/**
|
|
2097
|
-
* The declared types of a class's members, read from the tree: the
|
|
2098
|
-
* constructor's parameter properties (`private readonly usersService:
|
|
2099
|
-
* UsersService`), its fields (`private final OwnerRepository owners`,
|
|
2100
|
-
* `val owners: OwnerRepository`, `private readonly IRepo _repo`), its typed
|
|
2101
|
-
* properties. The index keeps no type for these, and a member call the
|
|
2102
|
-
* extractor kept only the last segment of (`this.usersService.findByEmail`
|
|
2103
|
-
* → `findByEmail`) resolves by name alone; the declared type is what says
|
|
2104
|
-
* where it really goes, and whether it leaves the index.
|
|
2105
|
-
*
|
|
2106
|
-
* Keyed by member name, the type as written without generics'
|
|
2107
|
-
* arguments (`Repository<Cat>` → `Repository<Cat>` is kept whole; callers
|
|
2108
|
-
* strip what they need).
|
|
2109
|
-
*/
|
|
2110
1963
|
async function memberTypesForFile(absPath, language, line) {
|
|
2111
1964
|
const out = new Map();
|
|
2112
1965
|
if (!supportsBranchGuards(language))
|
|
@@ -2116,7 +1969,6 @@ async function memberTypesForFile(absPath, language, line) {
|
|
|
2116
1969
|
return out;
|
|
2117
1970
|
return memberTypesInTree(cached.tree.rootNode, cached.source, line);
|
|
2118
1971
|
}
|
|
2119
|
-
/** {@link memberTypesForFile} over source text — the test surface. */
|
|
2120
1972
|
async function memberTypesInSource(source, language, line) {
|
|
2121
1973
|
if (!supportsBranchGuards(language))
|
|
2122
1974
|
return new Map();
|
|
@@ -2153,7 +2005,6 @@ function memberTypesInTree(root, source, line) {
|
|
|
2153
2005
|
if (!params)
|
|
2154
2006
|
return;
|
|
2155
2007
|
for (const p of namedChildren(params)) {
|
|
2156
|
-
// TS: `private readonly x: T` (a parameter property); Kotlin: `val x: T`; C#/Java: `T x` — a field of the same name may follow.
|
|
2157
2008
|
if (p.type === 'required_parameter' || p.type === 'optional_parameter') {
|
|
2158
2009
|
if (!namedChildren(p).some((c) => c.type === 'accessibility_modifier' || c.type === 'override_modifier') && !/^\s*(?:public|private|protected|readonly)\b/.test(p.text))
|
|
2159
2010
|
continue;
|
|
@@ -2171,7 +2022,6 @@ function memberTypesInTree(root, source, line) {
|
|
|
2171
2022
|
}
|
|
2172
2023
|
}
|
|
2173
2024
|
};
|
|
2174
|
-
// Kotlin's primary constructor sits on the class node itself.
|
|
2175
2025
|
for (const c of namedChildren(cls))
|
|
2176
2026
|
if (c.type === 'primary_constructor')
|
|
2177
2027
|
visitParams(namedChildren(c).find((n) => n.type === 'class_parameters') ?? c);
|
|
@@ -2189,7 +2039,6 @@ function memberTypesInTree(root, source, line) {
|
|
|
2189
2039
|
visitParams(m.childForFieldName('parameters'));
|
|
2190
2040
|
break;
|
|
2191
2041
|
case 'field_declaration': {
|
|
2192
|
-
// Java: `type` + `declarator`; C#: a `variable_declaration` inside.
|
|
2193
2042
|
const type = m.childForFieldName('type');
|
|
2194
2043
|
if (type) {
|
|
2195
2044
|
for (const d of namedChildren(m))
|
|
@@ -2206,7 +2055,6 @@ function memberTypesInTree(root, source, line) {
|
|
|
2206
2055
|
break;
|
|
2207
2056
|
}
|
|
2208
2057
|
case 'property_declaration': {
|
|
2209
|
-
// C#: `type` + `name`; Kotlin: `variable_declaration (name) (type)`.
|
|
2210
2058
|
const csType = m.childForFieldName('type');
|
|
2211
2059
|
if (csType)
|
|
2212
2060
|
put(m.childForFieldName('name')?.text, typeText(csType));
|