@colbymchenry/codegraph-win32-arm64 1.6.2 → 1.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/codegraph +1 -1
- package/bin/codegraph.cmd +1 -1
- package/lib/dist/.test-build-engine.json +1 -1
- package/lib/dist/.test-build-viewer.json +1 -1
- package/lib/dist/bin/codegraph.d.ts +3 -0
- package/lib/dist/bin/codegraph.d.ts.map +1 -1
- package/lib/dist/bin/codegraph.js +507 -702
- package/lib/dist/bin/codegraph.js.map +1 -1
- package/lib/dist/bin/command-supervision.js +1 -57
- package/lib/dist/bin/command-supervision.js.map +1 -1
- package/lib/dist/bin/fatal-handler.js +0 -46
- package/lib/dist/bin/fatal-handler.js.map +1 -1
- package/lib/dist/bin/node-version-check.js +0 -33
- package/lib/dist/bin/node-version-check.js.map +1 -1
- package/lib/dist/bin/uninstall.js +0 -19
- package/lib/dist/bin/uninstall.js.map +1 -1
- package/lib/dist/bin/viewer-gate.js +0 -14
- package/lib/dist/bin/viewer-gate.js.map +1 -1
- package/lib/dist/compile-cache.d.ts +2 -0
- package/lib/dist/compile-cache.d.ts.map +1 -0
- package/lib/dist/compile-cache.js +45 -0
- package/lib/dist/compile-cache.js.map +1 -0
- package/lib/dist/context/formatter.js +3 -66
- package/lib/dist/context/formatter.js.map +1 -1
- package/lib/dist/context/index.d.ts +44 -1
- package/lib/dist/context/index.d.ts.map +1 -1
- package/lib/dist/context/index.js +123 -430
- package/lib/dist/context/index.js.map +1 -1
- package/lib/dist/context/markers.js +0 -17
- package/lib/dist/context/markers.js.map +1 -1
- package/lib/dist/db/index.d.ts +44 -1
- package/lib/dist/db/index.d.ts.map +1 -1
- package/lib/dist/db/index.js +123 -395
- package/lib/dist/db/index.js.map +1 -1
- package/lib/dist/db/migrations.d.ts +11 -1
- package/lib/dist/db/migrations.d.ts.map +1 -1
- package/lib/dist/db/migrations.js +71 -79
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/name-substring-index.d.ts +63 -0
- package/lib/dist/db/name-substring-index.d.ts.map +1 -0
- package/lib/dist/db/name-substring-index.js +151 -0
- package/lib/dist/db/name-substring-index.js.map +1 -0
- package/lib/dist/db/node-sqlite.d.ts +19 -0
- package/lib/dist/db/node-sqlite.d.ts.map +1 -0
- package/lib/dist/db/node-sqlite.js +23 -0
- package/lib/dist/db/node-sqlite.js.map +1 -0
- package/lib/dist/db/open-error.d.ts +36 -0
- package/lib/dist/db/open-error.d.ts.map +1 -0
- package/lib/dist/db/open-error.js +63 -0
- package/lib/dist/db/open-error.js.map +1 -0
- package/lib/dist/db/parameter-flow-queries.d.ts +120 -0
- package/lib/dist/db/parameter-flow-queries.d.ts.map +1 -0
- package/lib/dist/db/parameter-flow-queries.js +168 -0
- package/lib/dist/db/parameter-flow-queries.js.map +1 -0
- package/lib/dist/db/queries.d.ts +654 -34
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +1466 -1470
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/db/reference-tail.d.ts +83 -0
- package/lib/dist/db/reference-tail.d.ts.map +1 -0
- package/lib/dist/db/reference-tail.js +68 -0
- package/lib/dist/db/reference-tail.js.map +1 -0
- package/lib/dist/db/schema.sql +18 -2
- package/lib/dist/db/sqlite-adapter.d.ts +18 -1
- package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
- package/lib/dist/db/sqlite-adapter.js +12 -62
- package/lib/dist/db/sqlite-adapter.js.map +1 -1
- package/lib/dist/db/synthesis-stage.d.ts.map +1 -1
- package/lib/dist/db/synthesis-stage.js +2 -6
- package/lib/dist/db/synthesis-stage.js.map +1 -1
- package/lib/dist/db/wal-valve.js +1 -153
- package/lib/dist/db/wal-valve.js.map +1 -1
- package/lib/dist/db/wsl-shared-index.js +0 -37
- package/lib/dist/db/wsl-shared-index.js.map +1 -1
- package/lib/dist/directory.d.ts +51 -0
- package/lib/dist/directory.d.ts.map +1 -1
- package/lib/dist/directory.js +76 -530
- package/lib/dist/directory.js.map +1 -1
- package/lib/dist/engine.d.ts +15 -0
- package/lib/dist/engine.d.ts.map +1 -0
- package/lib/dist/engine.js +35 -0
- package/lib/dist/engine.js.map +1 -0
- package/lib/dist/errors.d.ts +10 -0
- package/lib/dist/errors.d.ts.map +1 -1
- package/lib/dist/errors.js +8 -101
- package/lib/dist/errors.js.map +1 -1
- package/lib/dist/extraction/astro-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/astro-extractor.js +11 -101
- package/lib/dist/extraction/astro-extractor.js.map +1 -1
- package/lib/dist/extraction/cfml-extractor.d.ts +27 -1
- package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/cfml-extractor.js +70 -206
- package/lib/dist/extraction/cfml-extractor.js.map +1 -1
- package/lib/dist/extraction/commonjs-requires.js +0 -31
- package/lib/dist/extraction/commonjs-requires.js.map +1 -1
- package/lib/dist/extraction/dfm-extractor.js +0 -21
- package/lib/dist/extraction/dfm-extractor.js.map +1 -1
- package/lib/dist/extraction/extraction-version.d.ts +1 -1
- package/lib/dist/extraction/extraction-version.js +1 -24
- package/lib/dist/extraction/extraction-version.js.map +1 -1
- package/lib/dist/extraction/function-ref.d.ts +40 -0
- package/lib/dist/extraction/function-ref.d.ts.map +1 -1
- package/lib/dist/extraction/function-ref.js +157 -207
- package/lib/dist/extraction/function-ref.js.map +1 -1
- package/lib/dist/extraction/generated-detection.js +0 -165
- package/lib/dist/extraction/generated-detection.js.map +1 -1
- package/lib/dist/extraction/grammars.d.ts +73 -4
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +160 -431
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +208 -7
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +594 -1383
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/kernel/decode.js +0 -16
- package/lib/dist/extraction/kernel/decode.js.map +1 -1
- package/lib/dist/extraction/kernel/index.d.ts +3 -1
- package/lib/dist/extraction/kernel/index.d.ts.map +1 -1
- package/lib/dist/extraction/kernel/index.js +48 -135
- package/lib/dist/extraction/kernel/index.js.map +1 -1
- package/lib/dist/extraction/kernel/layout.js +42 -76
- package/lib/dist/extraction/kernel/layout.js.map +1 -1
- package/lib/dist/extraction/kernel/loader.d.ts +5 -1
- package/lib/dist/extraction/kernel/loader.d.ts.map +1 -1
- package/lib/dist/extraction/kernel/loader.js +0 -37
- package/lib/dist/extraction/kernel/loader.js.map +1 -1
- package/lib/dist/extraction/languages/arkts.js +0 -59
- package/lib/dist/extraction/languages/arkts.js.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.d.ts +125 -28
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.js +789 -856
- package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
- package/lib/dist/extraction/languages/cfquery.js +0 -9
- package/lib/dist/extraction/languages/cfquery.js.map +1 -1
- package/lib/dist/extraction/languages/cfscript.d.ts +20 -0
- package/lib/dist/extraction/languages/cfscript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/cfscript.js +80 -9
- package/lib/dist/extraction/languages/cfscript.js.map +1 -1
- package/lib/dist/extraction/languages/cobol.js +0 -114
- package/lib/dist/extraction/languages/cobol.js.map +1 -1
- package/lib/dist/extraction/languages/cpp-brace-scopes.d.ts +66 -0
- package/lib/dist/extraction/languages/cpp-brace-scopes.d.ts.map +1 -0
- package/lib/dist/extraction/languages/cpp-brace-scopes.js +343 -0
- package/lib/dist/extraction/languages/cpp-brace-scopes.js.map +1 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.d.ts +41 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.d.ts.map +1 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.js +487 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.js.map +1 -0
- package/lib/dist/extraction/languages/csharp.js +3 -55
- package/lib/dist/extraction/languages/csharp.js.map +1 -1
- package/lib/dist/extraction/languages/dart.d.ts +129 -0
- package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
- package/lib/dist/extraction/languages/dart.js +517 -162
- package/lib/dist/extraction/languages/dart.js.map +1 -1
- package/lib/dist/extraction/languages/erlang.d.ts.map +1 -1
- package/lib/dist/extraction/languages/erlang.js +15 -102
- package/lib/dist/extraction/languages/erlang.js.map +1 -1
- package/lib/dist/extraction/languages/go.d.ts +48 -0
- package/lib/dist/extraction/languages/go.d.ts.map +1 -1
- package/lib/dist/extraction/languages/go.js +102 -31
- package/lib/dist/extraction/languages/go.js.map +1 -1
- package/lib/dist/extraction/languages/index.js +0 -6
- package/lib/dist/extraction/languages/index.js.map +1 -1
- package/lib/dist/extraction/languages/java.d.ts.map +1 -1
- package/lib/dist/extraction/languages/java.js +67 -78
- package/lib/dist/extraction/languages/java.js.map +1 -1
- package/lib/dist/extraction/languages/javascript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/javascript.js +2 -12
- package/lib/dist/extraction/languages/javascript.js.map +1 -1
- package/lib/dist/extraction/languages/kotlin.d.ts +11 -0
- package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
- package/lib/dist/extraction/languages/kotlin.js +43 -197
- package/lib/dist/extraction/languages/kotlin.js.map +1 -1
- package/lib/dist/extraction/languages/lua.js +2 -39
- package/lib/dist/extraction/languages/lua.js.map +1 -1
- package/lib/dist/extraction/languages/luau.js +0 -14
- package/lib/dist/extraction/languages/luau.js.map +1 -1
- package/lib/dist/extraction/languages/nix.js +0 -16
- package/lib/dist/extraction/languages/nix.js.map +1 -1
- package/lib/dist/extraction/languages/objc.d.ts.map +1 -1
- package/lib/dist/extraction/languages/objc.js +5 -16
- package/lib/dist/extraction/languages/objc.js.map +1 -1
- package/lib/dist/extraction/languages/pascal-preparse.d.ts +66 -0
- package/lib/dist/extraction/languages/pascal-preparse.d.ts.map +1 -0
- package/lib/dist/extraction/languages/pascal-preparse.js +958 -0
- package/lib/dist/extraction/languages/pascal-preparse.js.map +1 -0
- package/lib/dist/extraction/languages/pascal-system.d.ts +11 -0
- package/lib/dist/extraction/languages/pascal-system.d.ts.map +1 -0
- package/lib/dist/extraction/languages/pascal-system.js +23 -0
- package/lib/dist/extraction/languages/pascal-system.js.map +1 -0
- package/lib/dist/extraction/languages/pascal.d.ts.map +1 -1
- package/lib/dist/extraction/languages/pascal.js +3 -4
- package/lib/dist/extraction/languages/pascal.js.map +1 -1
- package/lib/dist/extraction/languages/php.d.ts +9 -0
- package/lib/dist/extraction/languages/php.d.ts.map +1 -1
- package/lib/dist/extraction/languages/php.js +207 -44
- package/lib/dist/extraction/languages/php.js.map +1 -1
- package/lib/dist/extraction/languages/python.js +2 -20
- package/lib/dist/extraction/languages/python.js.map +1 -1
- package/lib/dist/extraction/languages/r.js +8 -78
- package/lib/dist/extraction/languages/r.js.map +1 -1
- package/lib/dist/extraction/languages/ruby.d.ts.map +1 -1
- package/lib/dist/extraction/languages/ruby.js +17 -25
- package/lib/dist/extraction/languages/ruby.js.map +1 -1
- package/lib/dist/extraction/languages/rust-macro-calls.d.ts +32 -0
- package/lib/dist/extraction/languages/rust-macro-calls.d.ts.map +1 -0
- package/lib/dist/extraction/languages/rust-macro-calls.js +306 -0
- package/lib/dist/extraction/languages/rust-macro-calls.js.map +1 -0
- package/lib/dist/extraction/languages/rust.d.ts +10 -0
- package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
- package/lib/dist/extraction/languages/rust.js +15 -47
- package/lib/dist/extraction/languages/rust.js.map +1 -1
- package/lib/dist/extraction/languages/scala.js +5 -41
- package/lib/dist/extraction/languages/scala.js.map +1 -1
- package/lib/dist/extraction/languages/solidity.js +1 -82
- package/lib/dist/extraction/languages/solidity.js.map +1 -1
- package/lib/dist/extraction/languages/swift.js +3 -47
- package/lib/dist/extraction/languages/swift.js.map +1 -1
- package/lib/dist/extraction/languages/terraform.js +6 -152
- package/lib/dist/extraction/languages/terraform.js.map +1 -1
- package/lib/dist/extraction/languages/typescript.d.ts +64 -0
- package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/typescript.js +73 -49
- package/lib/dist/extraction/languages/typescript.js.map +1 -1
- package/lib/dist/extraction/languages/vbnet.d.ts.map +1 -1
- package/lib/dist/extraction/languages/vbnet.js +9 -42
- package/lib/dist/extraction/languages/vbnet.js.map +1 -1
- package/lib/dist/extraction/lazy-frameworks.d.ts +15 -0
- package/lib/dist/extraction/lazy-frameworks.d.ts.map +1 -0
- package/lib/dist/extraction/lazy-frameworks.js +8 -0
- package/lib/dist/extraction/lazy-frameworks.js.map +1 -0
- package/lib/dist/extraction/liquid-extractor.d.ts +29 -3
- package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/liquid-extractor.js +89 -148
- package/lib/dist/extraction/liquid-extractor.js.map +1 -1
- package/lib/dist/extraction/mybatis-extractor.js +0 -78
- package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
- package/lib/dist/extraction/parse-budget.d.ts +42 -7
- package/lib/dist/extraction/parse-budget.d.ts.map +1 -1
- package/lib/dist/extraction/parse-budget.js +39 -15
- package/lib/dist/extraction/parse-budget.js.map +1 -1
- package/lib/dist/extraction/parse-pool.d.ts +29 -17
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
- package/lib/dist/extraction/parse-pool.js +49 -193
- package/lib/dist/extraction/parse-pool.js.map +1 -1
- package/lib/dist/extraction/parse-worker.d.ts +1 -1
- package/lib/dist/extraction/parse-worker.d.ts.map +1 -1
- package/lib/dist/extraction/parse-worker.js +5 -58
- package/lib/dist/extraction/parse-worker.js.map +1 -1
- package/lib/dist/extraction/razor-extractor.d.ts +9 -0
- package/lib/dist/extraction/razor-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/razor-extractor.js +45 -69
- package/lib/dist/extraction/razor-extractor.js.map +1 -1
- package/lib/dist/extraction/razor-script.d.ts +23 -0
- package/lib/dist/extraction/razor-script.d.ts.map +1 -0
- package/lib/dist/extraction/razor-script.js +244 -0
- package/lib/dist/extraction/razor-script.js.map +1 -0
- package/lib/dist/extraction/sfc-script.d.ts +42 -0
- package/lib/dist/extraction/sfc-script.d.ts.map +1 -1
- package/lib/dist/extraction/sfc-script.js +32 -31
- package/lib/dist/extraction/sfc-script.js.map +1 -1
- package/lib/dist/extraction/store-worker.d.ts +1 -1
- package/lib/dist/extraction/store-worker.d.ts.map +1 -1
- package/lib/dist/extraction/store-worker.js +1 -38
- package/lib/dist/extraction/store-worker.js.map +1 -1
- package/lib/dist/extraction/store-writer.js +2 -34
- package/lib/dist/extraction/store-writer.js.map +1 -1
- package/lib/dist/extraction/svelte-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/svelte-extractor.js +11 -87
- package/lib/dist/extraction/svelte-extractor.js.map +1 -1
- package/lib/dist/extraction/syntax-tokens.d.ts +6 -5
- package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -1
- package/lib/dist/extraction/syntax-tokens.js +4 -152
- package/lib/dist/extraction/syntax-tokens.js.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.d.ts +37 -1
- package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.js +76 -68
- package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
- package/lib/dist/extraction/tree-sitter-types.d.ts +102 -22
- package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter-types.js +0 -7
- package/lib/dist/extraction/tree-sitter-types.js.map +1 -1
- package/lib/dist/extraction/tree-sitter.d.ts +518 -10
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +2118 -2554
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/extraction/vue-extractor.d.ts +13 -0
- package/lib/dist/extraction/vue-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/vue-extractor.js +52 -92
- package/lib/dist/extraction/vue-extractor.js.map +1 -1
- package/lib/dist/extraction/vue-options-api.js +0 -32
- package/lib/dist/extraction/vue-options-api.js.map +1 -1
- package/lib/dist/extraction/vue-template-calls.d.ts +37 -0
- package/lib/dist/extraction/vue-template-calls.d.ts.map +1 -0
- package/lib/dist/extraction/vue-template-calls.js +497 -0
- package/lib/dist/extraction/vue-template-calls.js.map +1 -0
- package/lib/dist/extraction/wasm/tree-sitter-dart.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-swift.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts +15 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts.map +1 -1
- package/lib/dist/extraction/wasm-runtime-flags.js +18 -89
- package/lib/dist/extraction/wasm-runtime-flags.js.map +1 -1
- package/lib/dist/file-limits.d.ts +8 -0
- package/lib/dist/file-limits.d.ts.map +1 -1
- package/lib/dist/file-limits.js +13 -28
- package/lib/dist/file-limits.js.map +1 -1
- package/lib/dist/graph/branch-guards.d.ts.map +1 -1
- package/lib/dist/graph/branch-guards.js +4 -251
- package/lib/dist/graph/branch-guards.js.map +1 -1
- package/lib/dist/graph/call-sites.d.ts +12 -0
- package/lib/dist/graph/call-sites.d.ts.map +1 -0
- package/lib/dist/graph/call-sites.js +17 -0
- package/lib/dist/graph/call-sites.js.map +1 -0
- package/lib/dist/graph/cobol-copybooks.d.ts +75 -0
- package/lib/dist/graph/cobol-copybooks.d.ts.map +1 -0
- package/lib/dist/graph/cobol-copybooks.js +45 -0
- package/lib/dist/graph/cobol-copybooks.js.map +1 -0
- package/lib/dist/graph/dead-code.d.ts +26 -4
- package/lib/dist/graph/dead-code.d.ts.map +1 -1
- package/lib/dist/graph/dead-code.js +157 -311
- package/lib/dist/graph/dead-code.js.map +1 -1
- package/lib/dist/graph/dynamic-boundary-report.js +1 -88
- package/lib/dist/graph/dynamic-boundary-report.js.map +1 -1
- package/lib/dist/graph/file-cycles.d.ts +20 -0
- package/lib/dist/graph/file-cycles.d.ts.map +1 -0
- package/lib/dist/graph/file-cycles.js +79 -0
- package/lib/dist/graph/file-cycles.js.map +1 -0
- package/lib/dist/graph/file-drift.d.ts +35 -0
- package/lib/dist/graph/file-drift.d.ts.map +1 -0
- package/lib/dist/graph/file-drift.js +46 -0
- package/lib/dist/graph/file-drift.js.map +1 -0
- package/lib/dist/graph/go-package.d.ts +27 -0
- package/lib/dist/graph/go-package.d.ts.map +1 -0
- package/lib/dist/graph/go-package.js +49 -0
- package/lib/dist/graph/go-package.js.map +1 -0
- package/lib/dist/graph/index.d.ts +2 -0
- package/lib/dist/graph/index.d.ts.map +1 -1
- package/lib/dist/graph/index.js +4 -6
- package/lib/dist/graph/index.js.map +1 -1
- package/lib/dist/graph/named-symbol-flow.d.ts +5 -1
- package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -1
- package/lib/dist/graph/named-symbol-flow.js +82 -223
- package/lib/dist/graph/named-symbol-flow.js.map +1 -1
- package/lib/dist/graph/owning-package.d.ts +59 -0
- package/lib/dist/graph/owning-package.d.ts.map +1 -0
- package/lib/dist/graph/owning-package.js +120 -0
- package/lib/dist/graph/owning-package.js.map +1 -0
- package/lib/dist/graph/queries.d.ts +6 -3
- package/lib/dist/graph/queries.d.ts.map +1 -1
- package/lib/dist/graph/queries.js +4 -137
- package/lib/dist/graph/queries.js.map +1 -1
- package/lib/dist/graph/symbol-lookup.d.ts +15 -3
- package/lib/dist/graph/symbol-lookup.d.ts.map +1 -1
- package/lib/dist/graph/symbol-lookup.js +47 -89
- package/lib/dist/graph/symbol-lookup.js.map +1 -1
- package/lib/dist/graph/symbol-references.d.ts +86 -0
- package/lib/dist/graph/symbol-references.d.ts.map +1 -0
- package/lib/dist/graph/symbol-references.js +304 -0
- package/lib/dist/graph/symbol-references.js.map +1 -0
- package/lib/dist/graph/synthesized-hop.d.ts +37 -0
- package/lib/dist/graph/synthesized-hop.d.ts.map +1 -0
- package/lib/dist/graph/synthesized-hop.js +62 -0
- package/lib/dist/graph/synthesized-hop.js.map +1 -0
- package/lib/dist/graph/test-code.d.ts +33 -0
- package/lib/dist/graph/test-code.d.ts.map +1 -0
- package/lib/dist/graph/test-code.js +104 -0
- package/lib/dist/graph/test-code.js.map +1 -0
- package/lib/dist/graph/traversal.d.ts +31 -2
- package/lib/dist/graph/traversal.d.ts.map +1 -1
- package/lib/dist/graph/traversal.js +96 -226
- package/lib/dist/graph/traversal.js.map +1 -1
- package/lib/dist/graph/type-hierarchy.js +0 -138
- package/lib/dist/graph/type-hierarchy.js.map +1 -1
- package/lib/dist/index.d.ts +214 -26
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +736 -1112
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/beta-signup.js +0 -39
- package/lib/dist/installer/beta-signup.js.map +1 -1
- package/lib/dist/installer/config-writer.js +0 -24
- package/lib/dist/installer/config-writer.js.map +1 -1
- package/lib/dist/installer/index.d.ts +13 -6
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +27 -160
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/instructions-template.d.ts +16 -1
- package/lib/dist/installer/instructions-template.d.ts.map +1 -1
- package/lib/dist/installer/instructions-template.js +10 -38
- package/lib/dist/installer/instructions-template.js.map +1 -1
- package/lib/dist/installer/targets/antigravity.js +0 -113
- package/lib/dist/installer/targets/antigravity.js.map +1 -1
- package/lib/dist/installer/targets/bob.d.ts +20 -0
- package/lib/dist/installer/targets/bob.d.ts.map +1 -0
- package/lib/dist/installer/targets/bob.js +83 -0
- package/lib/dist/installer/targets/bob.js.map +1 -0
- package/lib/dist/installer/targets/claude.d.ts.map +1 -1
- package/lib/dist/installer/targets/claude.js +1 -185
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/installer/targets/codex.d.ts.map +1 -1
- package/lib/dist/installer/targets/codex.js +17 -109
- package/lib/dist/installer/targets/codex.js.map +1 -1
- package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -1
- package/lib/dist/installer/targets/copilot-cli.js +2 -54
- package/lib/dist/installer/targets/copilot-cli.js.map +1 -1
- package/lib/dist/installer/targets/copilot-jetbrains.js +0 -57
- package/lib/dist/installer/targets/copilot-jetbrains.js.map +1 -1
- package/lib/dist/installer/targets/copilot-vscode.js +0 -58
- package/lib/dist/installer/targets/copilot-vscode.js.map +1 -1
- package/lib/dist/installer/targets/cursor.js +7 -88
- package/lib/dist/installer/targets/cursor.js.map +1 -1
- package/lib/dist/installer/targets/droid.d.ts +18 -0
- package/lib/dist/installer/targets/droid.d.ts.map +1 -0
- package/lib/dist/installer/targets/droid.js +92 -0
- package/lib/dist/installer/targets/droid.js.map +1 -0
- package/lib/dist/installer/targets/dsh.d.ts +35 -0
- package/lib/dist/installer/targets/dsh.d.ts.map +1 -0
- package/lib/dist/installer/targets/dsh.js +267 -0
- package/lib/dist/installer/targets/dsh.js.map +1 -0
- package/lib/dist/installer/targets/gemini.js +0 -37
- package/lib/dist/installer/targets/gemini.js.map +1 -1
- package/lib/dist/installer/targets/grok.d.ts +25 -0
- package/lib/dist/installer/targets/grok.d.ts.map +1 -0
- package/lib/dist/installer/targets/grok.js +96 -0
- package/lib/dist/installer/targets/grok.js.map +1 -0
- package/lib/dist/installer/targets/hermes.d.ts +19 -7
- package/lib/dist/installer/targets/hermes.d.ts.map +1 -1
- package/lib/dist/installer/targets/hermes.js +218 -214
- package/lib/dist/installer/targets/hermes.js.map +1 -1
- package/lib/dist/installer/targets/json-config.d.ts +45 -0
- package/lib/dist/installer/targets/json-config.d.ts.map +1 -0
- package/lib/dist/installer/targets/json-config.js +128 -0
- package/lib/dist/installer/targets/json-config.js.map +1 -0
- package/lib/dist/installer/targets/kimi.d.ts +21 -0
- package/lib/dist/installer/targets/kimi.d.ts.map +1 -0
- package/lib/dist/installer/targets/kimi.js +97 -0
- package/lib/dist/installer/targets/kimi.js.map +1 -0
- package/lib/dist/installer/targets/kiro.js +1 -41
- package/lib/dist/installer/targets/kiro.js.map +1 -1
- package/lib/dist/installer/targets/opencode.d.ts.map +1 -1
- package/lib/dist/installer/targets/opencode.js +1 -103
- package/lib/dist/installer/targets/opencode.js.map +1 -1
- package/lib/dist/installer/targets/pi.d.ts +24 -0
- package/lib/dist/installer/targets/pi.d.ts.map +1 -0
- package/lib/dist/installer/targets/pi.js +100 -0
- package/lib/dist/installer/targets/pi.js.map +1 -0
- package/lib/dist/installer/targets/qoder.d.ts +23 -0
- package/lib/dist/installer/targets/qoder.d.ts.map +1 -0
- package/lib/dist/installer/targets/qoder.js +83 -0
- package/lib/dist/installer/targets/qoder.js.map +1 -0
- package/lib/dist/installer/targets/qwen.d.ts +21 -0
- package/lib/dist/installer/targets/qwen.d.ts.map +1 -0
- package/lib/dist/installer/targets/qwen.js +115 -0
- package/lib/dist/installer/targets/qwen.js.map +1 -0
- package/lib/dist/installer/targets/registry.d.ts.map +1 -1
- package/lib/dist/installer/targets/registry.js +18 -25
- package/lib/dist/installer/targets/registry.js.map +1 -1
- package/lib/dist/installer/targets/shared.d.ts +83 -13
- package/lib/dist/installer/targets/shared.d.ts.map +1 -1
- package/lib/dist/installer/targets/shared.js +201 -131
- package/lib/dist/installer/targets/shared.js.map +1 -1
- package/lib/dist/installer/targets/toml.d.ts +82 -6
- package/lib/dist/installer/targets/toml.d.ts.map +1 -1
- package/lib/dist/installer/targets/toml.js +318 -112
- package/lib/dist/installer/targets/toml.js.map +1 -1
- package/lib/dist/installer/targets/types.d.ts +1 -1
- package/lib/dist/installer/targets/types.d.ts.map +1 -1
- package/lib/dist/installer/targets/types.js +0 -13
- package/lib/dist/installer/targets/types.js.map +1 -1
- package/lib/dist/installer/targets/windsurf.d.ts +22 -0
- package/lib/dist/installer/targets/windsurf.d.ts.map +1 -0
- package/lib/dist/installer/targets/windsurf.js +90 -0
- package/lib/dist/installer/targets/windsurf.js.map +1 -0
- package/lib/dist/lazy-engine.d.ts +22 -0
- package/lib/dist/lazy-engine.d.ts.map +1 -0
- package/lib/dist/lazy-engine.js +16 -0
- package/lib/dist/lazy-engine.js.map +1 -0
- package/lib/dist/mcp/answer-freshness.js +0 -6
- package/lib/dist/mcp/answer-freshness.js.map +1 -1
- package/lib/dist/mcp/daemon-manager.js +2 -23
- package/lib/dist/mcp/daemon-manager.js.map +1 -1
- package/lib/dist/mcp/daemon-paths.d.ts +2 -0
- package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-paths.js +9 -85
- package/lib/dist/mcp/daemon-paths.js.map +1 -1
- package/lib/dist/mcp/daemon-proof.d.ts +19 -0
- package/lib/dist/mcp/daemon-proof.d.ts.map +1 -0
- package/lib/dist/mcp/daemon-proof.js +126 -0
- package/lib/dist/mcp/daemon-proof.js.map +1 -0
- package/lib/dist/mcp/daemon-registry.d.ts +47 -2
- package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-registry.js +188 -139
- package/lib/dist/mcp/daemon-registry.js.map +1 -1
- package/lib/dist/mcp/daemon.d.ts +69 -0
- package/lib/dist/mcp/daemon.d.ts.map +1 -1
- package/lib/dist/mcp/daemon.js +186 -376
- package/lib/dist/mcp/daemon.js.map +1 -1
- package/lib/dist/mcp/dynamic-boundaries.js +4 -78
- package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
- package/lib/dist/mcp/early-ppid.js +0 -24
- package/lib/dist/mcp/early-ppid.js.map +1 -1
- package/lib/dist/mcp/engine.d.ts +24 -0
- package/lib/dist/mcp/engine.d.ts.map +1 -1
- package/lib/dist/mcp/engine.js +47 -152
- package/lib/dist/mcp/engine.js.map +1 -1
- package/lib/dist/mcp/explore-dedup.js +0 -108
- package/lib/dist/mcp/explore-dedup.js.map +1 -1
- package/lib/dist/mcp/explore-diagnostics.d.ts +6 -0
- package/lib/dist/mcp/explore-diagnostics.d.ts.map +1 -1
- package/lib/dist/mcp/explore-diagnostics.js +8 -116
- package/lib/dist/mcp/explore-diagnostics.js.map +1 -1
- package/lib/dist/mcp/explore-one-symbol.d.ts +77 -0
- package/lib/dist/mcp/explore-one-symbol.d.ts.map +1 -0
- package/lib/dist/mcp/explore-one-symbol.js +431 -0
- package/lib/dist/mcp/explore-one-symbol.js.map +1 -0
- package/lib/dist/mcp/explore-session-state.js +0 -129
- package/lib/dist/mcp/explore-session-state.js.map +1 -1
- package/lib/dist/mcp/hook-client.d.ts +44 -0
- package/lib/dist/mcp/hook-client.d.ts.map +1 -0
- package/lib/dist/mcp/hook-client.js +202 -0
- package/lib/dist/mcp/hook-client.js.map +1 -0
- package/lib/dist/mcp/index-freshness-worker.js +1 -6
- package/lib/dist/mcp/index-freshness-worker.js.map +1 -1
- package/lib/dist/mcp/index-freshness.js +0 -15
- package/lib/dist/mcp/index-freshness.js.map +1 -1
- package/lib/dist/mcp/index-version-warning.d.ts +21 -0
- package/lib/dist/mcp/index-version-warning.d.ts.map +1 -0
- package/lib/dist/mcp/index-version-warning.js +38 -0
- package/lib/dist/mcp/index-version-warning.js.map +1 -0
- package/lib/dist/mcp/index.d.ts +29 -1
- package/lib/dist/mcp/index.d.ts.map +1 -1
- package/lib/dist/mcp/index.js +131 -300
- package/lib/dist/mcp/index.js.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts +13 -3
- package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.js +106 -121
- package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
- package/lib/dist/mcp/opencode-tool-names.d.ts +32 -0
- package/lib/dist/mcp/opencode-tool-names.d.ts.map +1 -0
- package/lib/dist/mcp/opencode-tool-names.js +24 -0
- package/lib/dist/mcp/opencode-tool-names.js.map +1 -0
- package/lib/dist/mcp/ppid-watchdog.js +0 -24
- package/lib/dist/mcp/ppid-watchdog.js.map +1 -1
- package/lib/dist/mcp/process-identity.d.ts +42 -0
- package/lib/dist/mcp/process-identity.d.ts.map +1 -0
- package/lib/dist/mcp/process-identity.js +130 -0
- package/lib/dist/mcp/process-identity.js.map +1 -0
- package/lib/dist/mcp/project-lifecycle.d.ts +6 -0
- package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -1
- package/lib/dist/mcp/project-lifecycle.js +70 -19
- package/lib/dist/mcp/project-lifecycle.js.map +1 -1
- package/lib/dist/mcp/prompt-explore.d.ts +19 -0
- package/lib/dist/mcp/prompt-explore.d.ts.map +1 -0
- package/lib/dist/mcp/prompt-explore.js +6 -0
- package/lib/dist/mcp/prompt-explore.js.map +1 -0
- package/lib/dist/mcp/proxy.d.ts +25 -7
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +145 -274
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/query-pool.d.ts +52 -3
- package/lib/dist/mcp/query-pool.d.ts.map +1 -1
- package/lib/dist/mcp/query-pool.js +114 -123
- package/lib/dist/mcp/query-pool.js.map +1 -1
- package/lib/dist/mcp/query-worker.js +24 -36
- package/lib/dist/mcp/query-worker.js.map +1 -1
- package/lib/dist/mcp/server-instructions.d.ts +18 -0
- package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
- package/lib/dist/mcp/server-instructions.js +12 -32
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/mcp/session.d.ts +46 -0
- package/lib/dist/mcp/session.d.ts.map +1 -1
- package/lib/dist/mcp/session.js +70 -132
- package/lib/dist/mcp/session.js.map +1 -1
- package/lib/dist/mcp/startup-handshake.js +1 -48
- package/lib/dist/mcp/startup-handshake.js.map +1 -1
- package/lib/dist/mcp/stdin-teardown.js +0 -28
- package/lib/dist/mcp/stdin-teardown.js.map +1 -1
- package/lib/dist/mcp/stdout-teardown.d.ts +26 -0
- package/lib/dist/mcp/stdout-teardown.d.ts.map +1 -0
- package/lib/dist/mcp/stdout-teardown.js +20 -0
- package/lib/dist/mcp/stdout-teardown.js.map +1 -0
- package/lib/dist/mcp/tools.d.ts +157 -18
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +797 -3621
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/mcp/transport.d.ts.map +1 -1
- package/lib/dist/mcp/transport.js +4 -96
- package/lib/dist/mcp/transport.js.map +1 -1
- package/lib/dist/mcp/version.d.ts +13 -1
- package/lib/dist/mcp/version.d.ts.map +1 -1
- package/lib/dist/mcp/version.js +19 -21
- package/lib/dist/mcp/version.js.map +1 -1
- package/lib/dist/mcp/writer-lock.d.ts +11 -0
- package/lib/dist/mcp/writer-lock.d.ts.map +1 -1
- package/lib/dist/mcp/writer-lock.js +49 -46
- package/lib/dist/mcp/writer-lock.js.map +1 -1
- package/lib/dist/project-config.d.ts +20 -0
- package/lib/dist/project-config.d.ts.map +1 -1
- package/lib/dist/project-config.js +31 -140
- package/lib/dist/project-config.js.map +1 -1
- package/lib/dist/resolution/alias-binding.d.ts +7 -0
- package/lib/dist/resolution/alias-binding.d.ts.map +1 -1
- package/lib/dist/resolution/alias-binding.js +7 -56
- package/lib/dist/resolution/alias-binding.js.map +1 -1
- package/lib/dist/resolution/ambient-modules.d.ts +185 -0
- package/lib/dist/resolution/ambient-modules.d.ts.map +1 -0
- package/lib/dist/resolution/ambient-modules.js +732 -0
- package/lib/dist/resolution/ambient-modules.js.map +1 -0
- package/lib/dist/resolution/angular-template-synthesizer.d.ts +48 -1
- package/lib/dist/resolution/angular-template-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/angular-template-synthesizer.js +401 -65
- package/lib/dist/resolution/angular-template-synthesizer.js.map +1 -1
- package/lib/dist/resolution/c-feature-variants.d.ts +40 -0
- package/lib/dist/resolution/c-feature-variants.d.ts.map +1 -0
- package/lib/dist/resolution/c-feature-variants.js +249 -0
- package/lib/dist/resolution/c-feature-variants.js.map +1 -0
- package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/c-fnptr-synthesizer.js +23 -391
- package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
- package/lib/dist/resolution/c-macro-renames.d.ts +25 -0
- package/lib/dist/resolution/c-macro-renames.d.ts.map +1 -0
- package/lib/dist/resolution/c-macro-renames.js +95 -0
- package/lib/dist/resolution/c-macro-renames.js.map +1 -0
- package/lib/dist/resolution/callback-synthesizer.d.ts +19 -5
- package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.js +1395 -1343
- package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
- package/lib/dist/resolution/const-alias-synthesizer.d.ts +48 -0
- package/lib/dist/resolution/const-alias-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/const-alias-synthesizer.js +234 -0
- package/lib/dist/resolution/const-alias-synthesizer.js.map +1 -0
- package/lib/dist/resolution/cooperative-yield.js +0 -27
- package/lib/dist/resolution/cooperative-yield.js.map +1 -1
- package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -1
- package/lib/dist/resolution/cpp-constructor.js +15 -17
- package/lib/dist/resolution/cpp-constructor.js.map +1 -1
- package/lib/dist/resolution/cpp-includers.d.ts +46 -0
- package/lib/dist/resolution/cpp-includers.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-includers.js +153 -0
- package/lib/dist/resolution/cpp-includers.js.map +1 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts +16 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -1
- package/lib/dist/resolution/cpp-macro-visibility.js +17 -68
- package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -1
- package/lib/dist/resolution/cpp-namespaces.d.ts +54 -0
- package/lib/dist/resolution/cpp-namespaces.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-namespaces.js +151 -0
- package/lib/dist/resolution/cpp-namespaces.js.map +1 -0
- package/lib/dist/resolution/cpp-raw-strings.d.ts +33 -0
- package/lib/dist/resolution/cpp-raw-strings.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-raw-strings.js +167 -0
- package/lib/dist/resolution/cpp-raw-strings.js.map +1 -0
- package/lib/dist/resolution/cpp-supertypes.d.ts +118 -0
- package/lib/dist/resolution/cpp-supertypes.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-supertypes.js +322 -0
- package/lib/dist/resolution/cpp-supertypes.js.map +1 -0
- package/lib/dist/resolution/cpp-template-instantiations.d.ts +83 -0
- package/lib/dist/resolution/cpp-template-instantiations.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-template-instantiations.js +983 -0
- package/lib/dist/resolution/cpp-template-instantiations.js.map +1 -0
- package/lib/dist/resolution/cpp-type-aliases.d.ts +194 -0
- package/lib/dist/resolution/cpp-type-aliases.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-type-aliases.js +648 -0
- package/lib/dist/resolution/cpp-type-aliases.js.map +1 -0
- package/lib/dist/resolution/dart-libraries.d.ts +75 -0
- package/lib/dist/resolution/dart-libraries.d.ts.map +1 -0
- package/lib/dist/resolution/dart-libraries.js +721 -0
- package/lib/dist/resolution/dart-libraries.js.map +1 -0
- package/lib/dist/resolution/dart-local-scope.d.ts +41 -0
- package/lib/dist/resolution/dart-local-scope.d.ts.map +1 -0
- package/lib/dist/resolution/dart-local-scope.js +565 -0
- package/lib/dist/resolution/dart-local-scope.js.map +1 -0
- package/lib/dist/resolution/event-emitter-synthesizer.d.ts +39 -0
- package/lib/dist/resolution/event-emitter-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/event-emitter-synthesizer.js +656 -0
- package/lib/dist/resolution/event-emitter-synthesizer.js.map +1 -0
- package/lib/dist/resolution/expo-router-synthesizer.js +0 -52
- package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/frameworks/angular-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/angular-router.js +41 -208
- package/lib/dist/resolution/frameworks/angular-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/aspnet-routes.d.ts +62 -0
- package/lib/dist/resolution/frameworks/aspnet-routes.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/aspnet-routes.js +382 -0
- package/lib/dist/resolution/frameworks/aspnet-routes.js.map +1 -0
- package/lib/dist/resolution/frameworks/astro.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/astro.js +4 -60
- package/lib/dist/resolution/frameworks/astro.js.map +1 -1
- package/lib/dist/resolution/frameworks/cargo-workspace.d.ts +18 -1
- package/lib/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/cargo-workspace.js +65 -15
- package/lib/dist/resolution/frameworks/cargo-workspace.js.map +1 -1
- package/lib/dist/resolution/frameworks/cics.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/cics.js +7 -33
- package/lib/dist/resolution/frameworks/cics.js.map +1 -1
- package/lib/dist/resolution/frameworks/codeigniter.d.ts +23 -0
- package/lib/dist/resolution/frameworks/codeigniter.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/codeigniter.js +271 -0
- package/lib/dist/resolution/frameworks/codeigniter.js.map +1 -0
- package/lib/dist/resolution/frameworks/component-folder.d.ts +17 -0
- package/lib/dist/resolution/frameworks/component-folder.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/component-folder.js +11 -0
- package/lib/dist/resolution/frameworks/component-folder.js.map +1 -0
- package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/csharp.js +85 -102
- package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
- package/lib/dist/resolution/frameworks/drupal.d.ts +17 -8
- package/lib/dist/resolution/frameworks/drupal.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/drupal.js +377 -142
- package/lib/dist/resolution/frameworks/drupal.js.map +1 -1
- package/lib/dist/resolution/frameworks/elysia.d.ts +38 -0
- package/lib/dist/resolution/frameworks/elysia.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/elysia.js +683 -0
- package/lib/dist/resolution/frameworks/elysia.js.map +1 -0
- package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/expo-modules.js +8 -88
- package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.js +9 -190
- package/lib/dist/resolution/frameworks/expo-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/express.d.ts +48 -1
- package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/express.js +193 -199
- package/lib/dist/resolution/frameworks/express.js.map +1 -1
- package/lib/dist/resolution/frameworks/fabric.js +1 -104
- package/lib/dist/resolution/frameworks/fabric.js.map +1 -1
- package/lib/dist/resolution/frameworks/go.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/go.js +14 -43
- package/lib/dist/resolution/frameworks/go.js.map +1 -1
- package/lib/dist/resolution/frameworks/goframe.js +1 -55
- package/lib/dist/resolution/frameworks/goframe.js.map +1 -1
- package/lib/dist/resolution/frameworks/index.d.ts +14 -0
- package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/index.js +16 -50
- package/lib/dist/resolution/frameworks/index.js.map +1 -1
- package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/java.js +203 -129
- package/lib/dist/resolution/frameworks/java.js.map +1 -1
- package/lib/dist/resolution/frameworks/laravel.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/laravel.js +71 -136
- package/lib/dist/resolution/frameworks/laravel.js.map +1 -1
- package/lib/dist/resolution/frameworks/name-heuristic.js +0 -12
- package/lib/dist/resolution/frameworks/name-heuristic.js.map +1 -1
- package/lib/dist/resolution/frameworks/nestjs.js +2 -199
- package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
- package/lib/dist/resolution/frameworks/next-proxy.d.ts +67 -0
- package/lib/dist/resolution/frameworks/next-proxy.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/next-proxy.js +239 -0
- package/lib/dist/resolution/frameworks/next-proxy.js.map +1 -0
- package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/nextjs.js +10 -66
- package/lib/dist/resolution/frameworks/nextjs.js.map +1 -1
- package/lib/dist/resolution/frameworks/object-literal.js +0 -21
- package/lib/dist/resolution/frameworks/object-literal.js.map +1 -1
- package/lib/dist/resolution/frameworks/package-deps.d.ts +11 -7
- package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/package-deps.js +35 -26
- package/lib/dist/resolution/frameworks/package-deps.js.map +1 -1
- package/lib/dist/resolution/frameworks/page-component.js +0 -14
- package/lib/dist/resolution/frameworks/page-component.js.map +1 -1
- package/lib/dist/resolution/frameworks/play.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/play.js +26 -34
- package/lib/dist/resolution/frameworks/play.js.map +1 -1
- package/lib/dist/resolution/frameworks/python.js +5 -102
- package/lib/dist/resolution/frameworks/python.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.js +1 -166
- package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-router.d.ts +13 -4
- package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react-router.js +10 -82
- package/lib/dist/resolution/frameworks/react-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/react.d.ts +57 -0
- package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react.js +1449 -191
- package/lib/dist/resolution/frameworks/react.js.map +1 -1
- package/lib/dist/resolution/frameworks/ruby.js +1 -61
- package/lib/dist/resolution/frameworks/ruby.js.map +1 -1
- package/lib/dist/resolution/frameworks/rust.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/rust.js +35 -56
- package/lib/dist/resolution/frameworks/rust.js.map +1 -1
- package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/svelte.js +7 -75
- package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
- package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/sveltekit-router.js +8 -46
- package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/swift-objc.js +0 -97
- package/lib/dist/resolution/frameworks/swift-objc.js.map +1 -1
- package/lib/dist/resolution/frameworks/swift.js +0 -97
- package/lib/dist/resolution/frameworks/swift.js.map +1 -1
- package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/tanstack-router.js +9 -130
- package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/terraform.js +1 -85
- package/lib/dist/resolution/frameworks/terraform.js.map +1 -1
- package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/vue-router.js +11 -134
- package/lib/dist/resolution/frameworks/vue-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/vue.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/vue.js +42 -114
- package/lib/dist/resolution/frameworks/vue.js.map +1 -1
- package/lib/dist/resolution/go-func-field-synthesizer.d.ts +58 -0
- package/lib/dist/resolution/go-func-field-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/go-func-field-synthesizer.js +696 -0
- package/lib/dist/resolution/go-func-field-synthesizer.js.map +1 -0
- package/lib/dist/resolution/go-module.d.ts +23 -7
- package/lib/dist/resolution/go-module.d.ts.map +1 -1
- package/lib/dist/resolution/go-module.js +21 -24
- package/lib/dist/resolution/go-module.js.map +1 -1
- package/lib/dist/resolution/go-stdlib-methods.d.ts +9 -0
- package/lib/dist/resolution/go-stdlib-methods.d.ts.map +1 -0
- package/lib/dist/resolution/go-stdlib-methods.js +224 -0
- package/lib/dist/resolution/go-stdlib-methods.js.map +1 -0
- package/lib/dist/resolution/goframe-synthesizer.js +2 -53
- package/lib/dist/resolution/goframe-synthesizer.js.map +1 -1
- package/lib/dist/resolution/import-resolver.d.ts +278 -29
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/import-resolver.js +1825 -1396
- package/lib/dist/resolution/import-resolver.js.map +1 -1
- package/lib/dist/resolution/index.d.ts +517 -6
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +1604 -1042
- package/lib/dist/resolution/index.js.map +1 -1
- package/lib/dist/resolution/js-builtins.d.ts +23 -0
- package/lib/dist/resolution/js-builtins.d.ts.map +1 -1
- package/lib/dist/resolution/js-builtins.js +34 -14
- package/lib/dist/resolution/js-builtins.js.map +1 -1
- package/lib/dist/resolution/js-class-expressions.d.ts +48 -0
- package/lib/dist/resolution/js-class-expressions.d.ts.map +1 -0
- package/lib/dist/resolution/js-class-expressions.js +25 -0
- package/lib/dist/resolution/js-class-expressions.js.map +1 -0
- package/lib/dist/resolution/js-super-calls.d.ts +18 -0
- package/lib/dist/resolution/js-super-calls.d.ts.map +1 -0
- package/lib/dist/resolution/js-super-calls.js +94 -0
- package/lib/dist/resolution/js-super-calls.js.map +1 -0
- package/lib/dist/resolution/jsx-code.d.ts +28 -0
- package/lib/dist/resolution/jsx-code.d.ts.map +1 -0
- package/lib/dist/resolution/jsx-code.js +459 -0
- package/lib/dist/resolution/jsx-code.js.map +1 -0
- package/lib/dist/resolution/lru-cache.d.ts +5 -13
- package/lib/dist/resolution/lru-cache.d.ts.map +1 -1
- package/lib/dist/resolution/lru-cache.js +43 -32
- package/lib/dist/resolution/lru-cache.js.map +1 -1
- package/lib/dist/resolution/memory-budget.js +0 -52
- package/lib/dist/resolution/memory-budget.js.map +1 -1
- package/lib/dist/resolution/module-importers.d.ts +210 -0
- package/lib/dist/resolution/module-importers.d.ts.map +1 -0
- package/lib/dist/resolution/module-importers.js +673 -0
- package/lib/dist/resolution/module-importers.js.map +1 -0
- package/lib/dist/resolution/name-matcher.d.ts +986 -7
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +24176 -6745
- package/lib/dist/resolution/name-matcher.js.map +1 -1
- package/lib/dist/resolution/next-router-synthesizer.d.ts +19 -0
- package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/next-router-synthesizer.js +46 -28
- package/lib/dist/resolution/next-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/override-parameters.d.ts +40 -0
- package/lib/dist/resolution/override-parameters.d.ts.map +1 -0
- package/lib/dist/resolution/override-parameters.js +339 -0
- package/lib/dist/resolution/override-parameters.js.map +1 -0
- package/lib/dist/resolution/parameter-flow.d.ts +218 -0
- package/lib/dist/resolution/parameter-flow.d.ts.map +1 -0
- package/lib/dist/resolution/parameter-flow.js +474 -0
- package/lib/dist/resolution/parameter-flow.js.map +1 -0
- package/lib/dist/resolution/pascal-scope.d.ts +91 -0
- package/lib/dist/resolution/pascal-scope.d.ts.map +1 -0
- package/lib/dist/resolution/pascal-scope.js +961 -0
- package/lib/dist/resolution/pascal-scope.js.map +1 -0
- package/lib/dist/resolution/path-aliases.d.ts +32 -4
- package/lib/dist/resolution/path-aliases.d.ts.map +1 -1
- package/lib/dist/resolution/path-aliases.js +43 -110
- package/lib/dist/resolution/path-aliases.js.map +1 -1
- package/lib/dist/resolution/php-web-root.d.ts +39 -0
- package/lib/dist/resolution/php-web-root.d.ts.map +1 -0
- package/lib/dist/resolution/php-web-root.js +141 -0
- package/lib/dist/resolution/php-web-root.js.map +1 -0
- package/lib/dist/resolution/project-scans.d.ts +38 -0
- package/lib/dist/resolution/project-scans.d.ts.map +1 -0
- package/lib/dist/resolution/project-scans.js +30 -0
- package/lib/dist/resolution/project-scans.js.map +1 -0
- package/lib/dist/resolution/python-overloads.d.ts +10 -0
- package/lib/dist/resolution/python-overloads.d.ts.map +1 -0
- package/lib/dist/resolution/python-overloads.js +75 -0
- package/lib/dist/resolution/python-overloads.js.map +1 -0
- package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/react-router-synthesizer.js +3 -55
- package/lib/dist/resolution/react-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/resolver-pool.d.ts +23 -2
- package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
- package/lib/dist/resolution/resolver-pool.js +43 -111
- package/lib/dist/resolution/resolver-pool.js.map +1 -1
- package/lib/dist/resolution/resolver-worker.d.ts +1 -1
- package/lib/dist/resolution/resolver-worker.d.ts.map +1 -1
- package/lib/dist/resolution/resolver-worker.js +8 -37
- package/lib/dist/resolution/resolver-worker.js.map +1 -1
- package/lib/dist/resolution/resurrect-ref.d.ts +25 -0
- package/lib/dist/resolution/resurrect-ref.d.ts.map +1 -0
- package/lib/dist/resolution/resurrect-ref.js +19 -0
- package/lib/dist/resolution/resurrect-ref.js.map +1 -0
- package/lib/dist/resolution/ruby-constant-paths.d.ts +56 -0
- package/lib/dist/resolution/ruby-constant-paths.d.ts.map +1 -0
- package/lib/dist/resolution/ruby-constant-paths.js +255 -0
- package/lib/dist/resolution/ruby-constant-paths.js.map +1 -0
- package/lib/dist/resolution/ruby-parameter-flow.d.ts +10 -0
- package/lib/dist/resolution/ruby-parameter-flow.d.ts.map +1 -0
- package/lib/dist/resolution/ruby-parameter-flow.js +801 -0
- package/lib/dist/resolution/ruby-parameter-flow.js.map +1 -0
- package/lib/dist/resolution/rust-scopes.d.ts +120 -0
- package/lib/dist/resolution/rust-scopes.d.ts.map +1 -0
- package/lib/dist/resolution/rust-scopes.js +730 -0
- package/lib/dist/resolution/rust-scopes.js.map +1 -0
- package/lib/dist/resolution/shopify-themes.d.ts +10 -0
- package/lib/dist/resolution/shopify-themes.d.ts.map +1 -0
- package/lib/dist/resolution/shopify-themes.js +19 -0
- package/lib/dist/resolution/shopify-themes.js.map +1 -0
- package/lib/dist/resolution/strip-comments.d.ts +20 -1
- package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
- package/lib/dist/resolution/strip-comments.js +164 -119
- package/lib/dist/resolution/strip-comments.js.map +1 -1
- package/lib/dist/resolution/sveltekit-synthesizer.js +0 -64
- package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -1
- package/lib/dist/resolution/swift-objc-bridge.js +0 -160
- package/lib/dist/resolution/swift-objc-bridge.js.map +1 -1
- package/lib/dist/resolution/swift-type-visibility.d.ts.map +1 -1
- package/lib/dist/resolution/swift-type-visibility.js +62 -104
- package/lib/dist/resolution/swift-type-visibility.js.map +1 -1
- package/lib/dist/resolution/synth-utils.js +1 -22
- package/lib/dist/resolution/synth-utils.js.map +1 -1
- package/lib/dist/resolution/tanstack-router-synthesizer.js +0 -32
- package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/tauri-synthesizer.d.ts +37 -0
- package/lib/dist/resolution/tauri-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/tauri-synthesizer.js +1038 -0
- package/lib/dist/resolution/tauri-synthesizer.js.map +1 -0
- package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/tier-synthesizer.js +35 -177
- package/lib/dist/resolution/tier-synthesizer.js.map +1 -1
- package/lib/dist/resolution/type-parameters.d.ts +23 -0
- package/lib/dist/resolution/type-parameters.d.ts.map +1 -1
- package/lib/dist/resolution/type-parameters.js +52 -54
- package/lib/dist/resolution/type-parameters.js.map +1 -1
- package/lib/dist/resolution/types.d.ts +192 -11
- package/lib/dist/resolution/types.d.ts.map +1 -1
- package/lib/dist/resolution/types.js +0 -47
- package/lib/dist/resolution/types.js.map +1 -1
- package/lib/dist/resolution/vbnet-receivers.d.ts +92 -0
- package/lib/dist/resolution/vbnet-receivers.d.ts.map +1 -0
- package/lib/dist/resolution/vbnet-receivers.js +1482 -0
- package/lib/dist/resolution/vbnet-receivers.js.map +1 -0
- package/lib/dist/resolution/vue-router-synthesizer.js +0 -31
- package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/workspace-packages.d.ts +206 -15
- package/lib/dist/resolution/workspace-packages.d.ts.map +1 -1
- package/lib/dist/resolution/workspace-packages.js +573 -152
- package/lib/dist/resolution/workspace-packages.js.map +1 -1
- package/lib/dist/search/identifier-segments.js +2 -93
- package/lib/dist/search/identifier-segments.js.map +1 -1
- package/lib/dist/search/query-parser.js +0 -54
- package/lib/dist/search/query-parser.js.map +1 -1
- package/lib/dist/search/query-paths.js +0 -167
- package/lib/dist/search/query-paths.js.map +1 -1
- package/lib/dist/search/query-utils.d.ts +44 -0
- package/lib/dist/search/query-utils.d.ts.map +1 -1
- package/lib/dist/search/query-utils.js +120 -198
- package/lib/dist/search/query-utils.js.map +1 -1
- package/lib/dist/sync/git-hooks.d.ts +14 -5
- package/lib/dist/sync/git-hooks.d.ts.map +1 -1
- package/lib/dist/sync/git-hooks.js +118 -65
- package/lib/dist/sync/git-hooks.js.map +1 -1
- package/lib/dist/sync/index.js +0 -14
- package/lib/dist/sync/index.js.map +1 -1
- package/lib/dist/sync/watch-policy.js +0 -45
- package/lib/dist/sync/watch-policy.js.map +1 -1
- package/lib/dist/sync/watcher.d.ts +29 -11
- package/lib/dist/sync/watcher.d.ts.map +1 -1
- package/lib/dist/sync/watcher.js +83 -487
- package/lib/dist/sync/watcher.js.map +1 -1
- package/lib/dist/sync/worktree.d.ts +7 -2
- package/lib/dist/sync/worktree.d.ts.map +1 -1
- package/lib/dist/sync/worktree.js +24 -97
- package/lib/dist/sync/worktree.js.map +1 -1
- package/lib/dist/telemetry/index.d.ts.map +1 -1
- package/lib/dist/telemetry/index.js +15 -135
- package/lib/dist/telemetry/index.js.map +1 -1
- package/lib/dist/types.d.ts +46 -0
- package/lib/dist/types.d.ts.map +1 -1
- package/lib/dist/types.js +15 -44
- package/lib/dist/types.js.map +1 -1
- package/lib/dist/ui/color.js +0 -19
- package/lib/dist/ui/color.js.map +1 -1
- package/lib/dist/ui/glyphs.js +2 -45
- package/lib/dist/ui/glyphs.js.map +1 -1
- package/lib/dist/ui/shimmer-progress.js +0 -21
- package/lib/dist/ui/shimmer-progress.js.map +1 -1
- package/lib/dist/ui/shimmer-worker.js +0 -22
- package/lib/dist/ui/shimmer-worker.js.map +1 -1
- package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -1
- package/lib/dist/ui-server/api/deadcode.js +2 -31
- package/lib/dist/ui-server/api/deadcode.js.map +1 -1
- package/lib/dist/ui-server/api/effects.js +0 -111
- package/lib/dist/ui-server/api/effects.js.map +1 -1
- package/lib/dist/ui-server/api/entrypoints.js +0 -142
- package/lib/dist/ui-server/api/entrypoints.js.map +1 -1
- package/lib/dist/ui-server/api/events.js +0 -145
- package/lib/dist/ui-server/api/events.js.map +1 -1
- package/lib/dist/ui-server/api/file.js +0 -80
- package/lib/dist/ui-server/api/file.js.map +1 -1
- package/lib/dist/ui-server/api/filecode.js +0 -95
- package/lib/dist/ui-server/api/filecode.js.map +1 -1
- package/lib/dist/ui-server/api/flow.js +0 -149
- package/lib/dist/ui-server/api/flow.js.map +1 -1
- package/lib/dist/ui-server/api/hierarchy.js +0 -28
- package/lib/dist/ui-server/api/hierarchy.js.map +1 -1
- package/lib/dist/ui-server/api/index.js +0 -88
- package/lib/dist/ui-server/api/index.js.map +1 -1
- package/lib/dist/ui-server/api/map.d.ts.map +1 -1
- package/lib/dist/ui-server/api/map.js +4 -317
- package/lib/dist/ui-server/api/map.js.map +1 -1
- package/lib/dist/ui-server/api/node.js +0 -111
- package/lib/dist/ui-server/api/node.js.map +1 -1
- package/lib/dist/ui-server/api/nodes.js +0 -16
- package/lib/dist/ui-server/api/nodes.js.map +1 -1
- package/lib/dist/ui-server/api/program.js +0 -90
- package/lib/dist/ui-server/api/program.js.map +1 -1
- package/lib/dist/ui-server/api/respond.js +0 -60
- package/lib/dist/ui-server/api/respond.js.map +1 -1
- package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -1
- package/lib/dist/ui-server/api/route-roots.js +2 -44
- package/lib/dist/ui-server/api/route-roots.js.map +1 -1
- package/lib/dist/ui-server/api/routes.d.ts.map +1 -1
- package/lib/dist/ui-server/api/routes.js +4 -60
- package/lib/dist/ui-server/api/routes.js.map +1 -1
- package/lib/dist/ui-server/api/screens.d.ts.map +1 -1
- package/lib/dist/ui-server/api/screens.js +4 -174
- package/lib/dist/ui-server/api/screens.js.map +1 -1
- package/lib/dist/ui-server/api/search.js +0 -62
- package/lib/dist/ui-server/api/search.js.map +1 -1
- package/lib/dist/ui-server/api/session.js +0 -58
- package/lib/dist/ui-server/api/session.js.map +1 -1
- package/lib/dist/ui-server/api/source.d.ts.map +1 -1
- package/lib/dist/ui-server/api/source.js +0 -161
- package/lib/dist/ui-server/api/source.js.map +1 -1
- package/lib/dist/ui-server/api/stats.js +0 -58
- package/lib/dist/ui-server/api/stats.js.map +1 -1
- package/lib/dist/ui-server/api/steps.d.ts.map +1 -1
- package/lib/dist/ui-server/api/steps.js +5 -381
- package/lib/dist/ui-server/api/steps.js.map +1 -1
- package/lib/dist/ui-server/api/trail-store.d.ts +3 -3
- package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -1
- package/lib/dist/ui-server/api/trail-store.js +24 -106
- package/lib/dist/ui-server/api/trail-store.js.map +1 -1
- package/lib/dist/ui-server/api/trails.d.ts.map +1 -1
- package/lib/dist/ui-server/api/trails.js +19 -94
- package/lib/dist/ui-server/api/trails.js.map +1 -1
- package/lib/dist/ui-server/api/when.js +0 -36
- package/lib/dist/ui-server/api/when.js.map +1 -1
- package/lib/dist/ui-server/api/wire.js +0 -58
- package/lib/dist/ui-server/api/wire.js.map +1 -1
- package/lib/dist/ui-server/assets.js +0 -35
- package/lib/dist/ui-server/assets.js.map +1 -1
- package/lib/dist/ui-server/constants.js +0 -26
- package/lib/dist/ui-server/constants.js.map +1 -1
- package/lib/dist/ui-server/highlight/bounded-tokenize.js +0 -25
- package/lib/dist/ui-server/highlight/bounded-tokenize.js.map +1 -1
- package/lib/dist/ui-server/highlight/index.js +1 -132
- package/lib/dist/ui-server/highlight/index.js.map +1 -1
- package/lib/dist/ui-server/highlight/languages.d.ts +3 -3
- package/lib/dist/ui-server/highlight/languages.js +0 -31
- package/lib/dist/ui-server/highlight/languages.js.map +1 -1
- package/lib/dist/ui-server/highlight/tokenize-worker.js +0 -5
- package/lib/dist/ui-server/highlight/tokenize-worker.js.map +1 -1
- package/lib/dist/ui-server/index.d.ts +25 -0
- package/lib/dist/ui-server/index.d.ts.map +1 -1
- package/lib/dist/ui-server/index.js +35 -103
- package/lib/dist/ui-server/index.js.map +1 -1
- package/lib/dist/ui-server/open-browser.js +0 -34
- package/lib/dist/ui-server/open-browser.js.map +1 -1
- package/lib/dist/ui-server/security.d.ts +5 -0
- package/lib/dist/ui-server/security.d.ts.map +1 -1
- package/lib/dist/ui-server/security.js +11 -147
- package/lib/dist/ui-server/security.js.map +1 -1
- package/lib/dist/ui-server/static.js +0 -41
- package/lib/dist/ui-server/static.js.map +1 -1
- package/lib/dist/upgrade/index.d.ts +18 -5
- package/lib/dist/upgrade/index.d.ts.map +1 -1
- package/lib/dist/upgrade/index.js +73 -229
- package/lib/dist/upgrade/index.js.map +1 -1
- package/lib/dist/upgrade/remove-binary.js +2 -67
- package/lib/dist/upgrade/remove-binary.js.map +1 -1
- package/lib/dist/upgrade/update-check.js +1 -81
- package/lib/dist/upgrade/update-check.js.map +1 -1
- package/lib/dist/utils.d.ts +69 -1
- package/lib/dist/utils.d.ts.map +1 -1
- package/lib/dist/utils.js +224 -266
- package/lib/dist/utils.js.map +1 -1
- package/lib/dist/worker-teardown.js +0 -47
- package/lib/dist/worker-teardown.js.map +1 -1
- package/lib/kernel/codegraph-kernel.node +2 -2
- package/lib/node_modules/.package-lock.json +4 -4
- package/lib/node_modules/ignore/README.md +138 -8
- package/lib/node_modules/ignore/index.d.ts +56 -20
- package/lib/node_modules/ignore/index.js +1033 -221
- package/lib/node_modules/ignore/legacy.js +871 -178
- package/lib/node_modules/ignore/package.json +10 -4
- package/lib/package.json +14 -8
- package/node.exe +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,961 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isPascalParenlessRef = isPascalParenlessRef;
|
|
4
|
+
exports.matchPascalParenlessRef = matchPascalParenlessRef;
|
|
5
|
+
exports.isPascalSystemCall = isPascalSystemCall;
|
|
6
|
+
exports.matchPascalSystemCall = matchPascalSystemCall;
|
|
7
|
+
exports.gatePascalCall = gatePascalCall;
|
|
8
|
+
exports.matchPascalNestedCall = matchPascalNestedCall;
|
|
9
|
+
exports.clearPascalScopeMemos = clearPascalScopeMemos;
|
|
10
|
+
const name_matcher_1 = require("./name-matcher");
|
|
11
|
+
const pascal_system_1 = require("../extraction/languages/pascal-system");
|
|
12
|
+
const PARENLESS = /^\{(call|read|ref|recv|args)(?:=([^@}]+))?(?:@([^}]+))?\}\.(.+)$/;
|
|
13
|
+
const CLASS_KINDS = new Set(['class', 'struct', 'interface']);
|
|
14
|
+
const UNIT_KINDS = new Set([
|
|
15
|
+
'function', 'variable', 'constant', 'class', 'struct', 'interface', 'enum', 'type_alias', 'enum_member',
|
|
16
|
+
]);
|
|
17
|
+
const MEMBER_KINDS = new Set(['method', 'field', 'property', 'constant', 'variable']);
|
|
18
|
+
const DATA_KINDS = new Set(['field', 'property', 'variable', 'constant', 'enum_member']);
|
|
19
|
+
const RTL_PROCEDURAL_TYPES = new Set([
|
|
20
|
+
'tproc', 'tfunc', 'tpredicate', 'tcomparison', 'tthreadprocedure', 'tlistsortcompare', 'tstringlistsortcompare',
|
|
21
|
+
]);
|
|
22
|
+
const MAX_HIERARCHY_DEPTH = 8;
|
|
23
|
+
function isPascalParenlessRef(ref) {
|
|
24
|
+
return ref.language === 'pascal' && ref.referenceKind === 'references' && PARENLESS.test(ref.referenceName);
|
|
25
|
+
}
|
|
26
|
+
function matchPascalParenlessRef(ref, context) {
|
|
27
|
+
const m = PARENLESS.exec(ref.referenceName);
|
|
28
|
+
if (!m)
|
|
29
|
+
return null;
|
|
30
|
+
let mode = m[1];
|
|
31
|
+
const target = m[2];
|
|
32
|
+
const path = m[4].split('.');
|
|
33
|
+
if (mode !== 'args' && routineNames(context)?.has(path[path.length - 1].toLowerCase()) === false)
|
|
34
|
+
return null;
|
|
35
|
+
let cls = null;
|
|
36
|
+
if (m[3]) {
|
|
37
|
+
cls = classByQualifiedName(m[3], ref.filePath, context);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
const routine = context.getNodeById?.(ref.fromNodeId);
|
|
41
|
+
if (routine)
|
|
42
|
+
cls = classOfRoutine(routine, context);
|
|
43
|
+
}
|
|
44
|
+
const found = path.length === 1
|
|
45
|
+
? nameInScope(path[0], cls, ref, context)
|
|
46
|
+
: memberThroughPath(path, cls, ref, context, mode === 'args');
|
|
47
|
+
if (!found)
|
|
48
|
+
return null;
|
|
49
|
+
let edgeKind = 'calls';
|
|
50
|
+
if (mode !== 'args') {
|
|
51
|
+
if (target !== undefined) {
|
|
52
|
+
const routineTyped = assignedRoutineType(target, cls, ref, context);
|
|
53
|
+
if (routineTyped !== undefined)
|
|
54
|
+
mode = routineTyped ? 'ref' : 'read';
|
|
55
|
+
if (mode === 'ref' && returnsRoutineType(found.node, context))
|
|
56
|
+
mode = 'read';
|
|
57
|
+
}
|
|
58
|
+
const needsArgs = needsArguments(found.node);
|
|
59
|
+
if (needsArgs && routineKeyword(found.node, context) === 'constructor')
|
|
60
|
+
return null;
|
|
61
|
+
const pointer = mode === 'ref' || needsArgs || (mode !== 'call' && !yieldsValue(found.node, context));
|
|
62
|
+
if (pointer && (mode === 'call' || mode === 'recv'))
|
|
63
|
+
return null;
|
|
64
|
+
edgeKind = pointer ? 'references' : 'calls';
|
|
65
|
+
}
|
|
66
|
+
context.rememberNode?.(found.node);
|
|
67
|
+
return {
|
|
68
|
+
original: ref,
|
|
69
|
+
targetNodeId: found.node.id,
|
|
70
|
+
confidence: found.confidence,
|
|
71
|
+
resolvedBy: found.resolvedBy,
|
|
72
|
+
edgeKind,
|
|
73
|
+
...(edgeKind === 'references' ? { metadata: { fnRef: true } } : {}),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function isPascalSystemCall(ref, context) {
|
|
77
|
+
return ref.language === 'pascal' && ref.referenceKind === 'calls' && pascal_system_1.PASCAL_SYSTEM_NAMES.has(ref.referenceName.toLowerCase()) &&
|
|
78
|
+
isBareCall(ref, context);
|
|
79
|
+
}
|
|
80
|
+
function isBareCall(ref, context) {
|
|
81
|
+
if (!/^[A-Za-z_]\w*$/.test(ref.referenceName))
|
|
82
|
+
return false;
|
|
83
|
+
const line = fileLines(ref.filePath, context)[ref.line - 1] ?? '';
|
|
84
|
+
return /^[A-Za-z_]\w*/.exec(line.slice(ref.column ?? 0))?.[0].toLowerCase() === ref.referenceName.toLowerCase();
|
|
85
|
+
}
|
|
86
|
+
function matchPascalSystemCall(ref, context) {
|
|
87
|
+
const decl = declarationInScope(ref.referenceName.toLowerCase(), classOfCall(ref, context), ref, context);
|
|
88
|
+
if (!decl)
|
|
89
|
+
return null;
|
|
90
|
+
if (DATA_KINDS.has(decl.node.kind) && !isProceduralData(decl.node, context))
|
|
91
|
+
return null;
|
|
92
|
+
if (!decl.node.qualifiedName.includes('::') && declaredUnderCondition(decl.node, context))
|
|
93
|
+
return null;
|
|
94
|
+
context.rememberNode?.(decl.node);
|
|
95
|
+
return { original: ref, targetNodeId: decl.node.id, confidence: decl.confidence, resolvedBy: decl.resolvedBy };
|
|
96
|
+
}
|
|
97
|
+
function gatePascalCall(result, ref, context) {
|
|
98
|
+
const target = context.getNodeById?.(result.targetNodeId);
|
|
99
|
+
if (!target)
|
|
100
|
+
return result;
|
|
101
|
+
if (DATA_KINDS.has(target.kind))
|
|
102
|
+
return gatePascalDataCall(target, result, ref, context);
|
|
103
|
+
if (isNestedRoutine(target, context))
|
|
104
|
+
return gatePascalNestedTarget(result, ref, context);
|
|
105
|
+
return result;
|
|
106
|
+
}
|
|
107
|
+
function gatePascalDataCall(target, result, ref, context) {
|
|
108
|
+
if (!isBareCall(ref, context))
|
|
109
|
+
return target.language === 'pascal' && isProceduralData(target, context) ? result : null;
|
|
110
|
+
const lower = ref.referenceName.toLowerCase();
|
|
111
|
+
if (declaredInRoutine(lower, ref, context))
|
|
112
|
+
return null;
|
|
113
|
+
const decl = declarationInScope(lower, classOfCall(ref, context), ref, context);
|
|
114
|
+
if (!decl) {
|
|
115
|
+
const only = target.language === 'pascal' && pascalNamed(lower, context).every((n) => n.id === target.id || n.kind === 'import');
|
|
116
|
+
return only && isProceduralData(target, context) ? result : null;
|
|
117
|
+
}
|
|
118
|
+
if (!isRoutine(decl.node) && !(DATA_KINDS.has(decl.node.kind) && isProceduralData(decl.node, context)))
|
|
119
|
+
return null;
|
|
120
|
+
if (decl.node.id === target.id)
|
|
121
|
+
return result;
|
|
122
|
+
context.rememberNode?.(decl.node);
|
|
123
|
+
return { ...result, targetNodeId: decl.node.id, confidence: decl.confidence, resolvedBy: decl.resolvedBy };
|
|
124
|
+
}
|
|
125
|
+
function declaredInRoutine(lower, ref, context) {
|
|
126
|
+
const lines = fileLines(ref.filePath, context);
|
|
127
|
+
const from = routineHeaderAt(ref.filePath, ref.line, context);
|
|
128
|
+
const name = escapeRegExp(lower);
|
|
129
|
+
const mentions = new RegExp(`\\b${name}\\b`, 'i');
|
|
130
|
+
const declares = new RegExp(`\\b(?:procedure|function)\\s+${name}\\b|\\b${name}\\s*(?:,\\s*[A-Za-z_]\\w*\\s*)*:(?!=)`, 'i');
|
|
131
|
+
for (let i = Math.max(1, from); i <= ref.line && i <= lines.length; i++) {
|
|
132
|
+
const text = lines[i - 1];
|
|
133
|
+
if (mentions.test(text) && declares.test(text.replace(/\/\/.*$|\{[^}]*\}|'[^']*'/g, ' ')))
|
|
134
|
+
return true;
|
|
135
|
+
}
|
|
136
|
+
return false;
|
|
137
|
+
}
|
|
138
|
+
function routineHeaderAt(filePath, line, context) {
|
|
139
|
+
headerClassAt(filePath, line, context);
|
|
140
|
+
const headers = memos(context).headerClasses.get(filePath) ?? [];
|
|
141
|
+
let found = line;
|
|
142
|
+
for (const h of headers) {
|
|
143
|
+
if (h.line > line)
|
|
144
|
+
break;
|
|
145
|
+
if (h.routine)
|
|
146
|
+
found = h.line;
|
|
147
|
+
}
|
|
148
|
+
return found;
|
|
149
|
+
}
|
|
150
|
+
function declaredUnderCondition(node, context) {
|
|
151
|
+
const memo = memos(context).conditionDepths;
|
|
152
|
+
let depths = memo.get(node.filePath);
|
|
153
|
+
const lines = fileLines(node.filePath, context);
|
|
154
|
+
if (!depths) {
|
|
155
|
+
depths = [];
|
|
156
|
+
let depth = 0;
|
|
157
|
+
for (const text of lines) {
|
|
158
|
+
depths.push(depth);
|
|
159
|
+
if (text.includes('{$'))
|
|
160
|
+
depth = conditionDepthAfter(text, depth);
|
|
161
|
+
}
|
|
162
|
+
memo.set(node.filePath, depths);
|
|
163
|
+
}
|
|
164
|
+
const line = lines[node.startLine - 1] ?? '';
|
|
165
|
+
return conditionDepthAfter(line.slice(0, node.startColumn), depths[node.startLine - 1] ?? 0) > 0;
|
|
166
|
+
}
|
|
167
|
+
function conditionDepthAfter(text, depth) {
|
|
168
|
+
for (const m of text.matchAll(/\{\$(ifdef|ifndef|ifopt|ifend|endif|if)\b/gi)) {
|
|
169
|
+
const directive = m[1].toLowerCase();
|
|
170
|
+
depth = directive === 'endif' || directive === 'ifend' ? Math.max(0, depth - 1) : depth + 1;
|
|
171
|
+
}
|
|
172
|
+
return depth;
|
|
173
|
+
}
|
|
174
|
+
function classOfCall(ref, context) {
|
|
175
|
+
const qn = headerClassAt(ref.filePath, ref.line, context);
|
|
176
|
+
const cls = qn ? classByQualifiedName(qn, ref.filePath, context) : null;
|
|
177
|
+
if (cls)
|
|
178
|
+
return cls;
|
|
179
|
+
const routine = context.getNodeById?.(ref.fromNodeId);
|
|
180
|
+
return routine?.kind === 'method' ? classOfRoutine(routine, context) : null;
|
|
181
|
+
}
|
|
182
|
+
function headerClassAt(filePath, line, context) {
|
|
183
|
+
const memo = memos(context).headerClasses;
|
|
184
|
+
let headers = memo.get(filePath);
|
|
185
|
+
if (!headers) {
|
|
186
|
+
headers = [];
|
|
187
|
+
const lines = fileLines(filePath, context);
|
|
188
|
+
const header = /^(?:class\s+)?(?:procedure|function|constructor|destructor|operator)\s+([A-Za-z_][\w.<>, ]*?)\s*[(:;]/i;
|
|
189
|
+
for (let i = 0; i < lines.length; i++) {
|
|
190
|
+
const text = lines[i];
|
|
191
|
+
const first = text.charCodeAt(0) | 0x20;
|
|
192
|
+
if (first !== 0x63 && first !== 0x64 && first !== 0x65 && first !== 0x66 && first !== 0x69 && first !== 0x6f && first !== 0x70)
|
|
193
|
+
continue;
|
|
194
|
+
if (/^(?:end;|(?:initialization|finalization)\b)/i.test(text)) {
|
|
195
|
+
headers.push({ line: i + 1, classQn: null, routine: false });
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
const m = header.exec(text);
|
|
199
|
+
if (!m)
|
|
200
|
+
continue;
|
|
201
|
+
const parts = m[1].replace(/<[^>]*>/g, '').replace(/\s+/g, '').split('.');
|
|
202
|
+
headers.push({ line: i + 1, classQn: parts.length > 1 ? parts.slice(0, -1).join('::') : null, routine: true });
|
|
203
|
+
}
|
|
204
|
+
memo.set(filePath, headers);
|
|
205
|
+
}
|
|
206
|
+
let lo = 0;
|
|
207
|
+
let hi = headers.length - 1;
|
|
208
|
+
let hit = null;
|
|
209
|
+
while (lo <= hi) {
|
|
210
|
+
const mid = (lo + hi) >> 1;
|
|
211
|
+
if (headers[mid].line <= line) {
|
|
212
|
+
hit = headers[mid].classQn;
|
|
213
|
+
lo = mid + 1;
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
hi = mid - 1;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
return hit;
|
|
220
|
+
}
|
|
221
|
+
function isRoutine(node) {
|
|
222
|
+
return node.kind === 'method' || node.kind === 'function';
|
|
223
|
+
}
|
|
224
|
+
function nameInScope(name, cls, ref, context) {
|
|
225
|
+
const decl = declarationInScope(name.toLowerCase(), cls, ref, context);
|
|
226
|
+
return decl && isRoutine(decl.node) ? decl : null;
|
|
227
|
+
}
|
|
228
|
+
function nestedRoutineInScope(lower, ref, context) {
|
|
229
|
+
const named = pascalNamed(lower, context);
|
|
230
|
+
if (!named.some((n) => n.kind === 'function' && n.qualifiedName.includes('::')))
|
|
231
|
+
return null;
|
|
232
|
+
const memo = memos(context).nestedInScope;
|
|
233
|
+
const key = `${ref.fromNodeId}|${lower}`;
|
|
234
|
+
if (memo.has(key))
|
|
235
|
+
return memo.get(key);
|
|
236
|
+
let found = null;
|
|
237
|
+
const caller = routineNode(ref.fromNodeId, context);
|
|
238
|
+
if (caller && caller.language === 'pascal') {
|
|
239
|
+
const chain = caller.qualifiedName.toLowerCase();
|
|
240
|
+
let best = null;
|
|
241
|
+
let depth = -1;
|
|
242
|
+
for (const n of named) {
|
|
243
|
+
if (n.filePath !== caller.filePath || !isNestedRoutine(n, context))
|
|
244
|
+
continue;
|
|
245
|
+
if (n.startLine > ref.line && !declaredForward(n, ref.line, context))
|
|
246
|
+
continue;
|
|
247
|
+
const outer = ownerOf(n);
|
|
248
|
+
if (chain !== outer && !chain.startsWith(`${outer}::`))
|
|
249
|
+
continue;
|
|
250
|
+
if (outer.length > depth || (outer.length === depth && n.startLine < best.startLine)) {
|
|
251
|
+
best = n;
|
|
252
|
+
depth = outer.length;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
if (best)
|
|
256
|
+
found = { node: best, resolvedBy: 'exact-match', confidence: 0.95 };
|
|
257
|
+
}
|
|
258
|
+
memo.set(key, found);
|
|
259
|
+
return found;
|
|
260
|
+
}
|
|
261
|
+
function declaredForward(routine, line, context) {
|
|
262
|
+
const lines = fileLines(routine.filePath, context);
|
|
263
|
+
const name = routine.name.toLowerCase();
|
|
264
|
+
for (let i = Math.min(line, lines.length) - 1; i >= 0; i--) {
|
|
265
|
+
const m = /^(\s*)(?:class\s+)?(?:procedure|function|constructor|destructor)\s+([A-Za-z_]\w*)/i.exec(lines[i]);
|
|
266
|
+
if (!m)
|
|
267
|
+
continue;
|
|
268
|
+
if (m[1].length < routine.startColumn)
|
|
269
|
+
return false;
|
|
270
|
+
if (m[1].length !== routine.startColumn || m[2].toLowerCase() !== name)
|
|
271
|
+
continue;
|
|
272
|
+
let text = lines[i].replace(/\/\/.*$|\{[^}]*\}|\(\*.*?\*\)/g, ' ');
|
|
273
|
+
for (let j = i + 1; j < lines.length && j <= i + 4 && (text.split('(').length > text.split(')').length); j++) {
|
|
274
|
+
text += ' ' + lines[j].replace(/\/\/.*$|\{[^}]*\}|\(\*.*?\*\)/g, ' ');
|
|
275
|
+
}
|
|
276
|
+
if (/\bforward\s*;/i.test(text))
|
|
277
|
+
return true;
|
|
278
|
+
}
|
|
279
|
+
return false;
|
|
280
|
+
}
|
|
281
|
+
function isNestedRoutine(node, context) {
|
|
282
|
+
if (node.kind !== 'function' || node.language !== 'pascal')
|
|
283
|
+
return false;
|
|
284
|
+
const cut = node.qualifiedName.lastIndexOf('::');
|
|
285
|
+
if (cut < 0)
|
|
286
|
+
return false;
|
|
287
|
+
const outer = node.qualifiedName.slice(0, cut);
|
|
288
|
+
const memo = memos(context).routineQns;
|
|
289
|
+
let routine = memo.get(outer);
|
|
290
|
+
if (routine === undefined) {
|
|
291
|
+
routine = context.getNodesByQualifiedName(outer).some((n) => n.language === 'pascal' && isRoutine(n));
|
|
292
|
+
memo.set(outer, routine);
|
|
293
|
+
}
|
|
294
|
+
return routine;
|
|
295
|
+
}
|
|
296
|
+
function routineNode(id, context) {
|
|
297
|
+
const memo = memos(context).routineNodes;
|
|
298
|
+
if (memo.has(id))
|
|
299
|
+
return memo.get(id);
|
|
300
|
+
const node = context.getNodeById?.(id) ?? null;
|
|
301
|
+
const routine = node && isRoutine(node) ? node : null;
|
|
302
|
+
memo.set(id, routine);
|
|
303
|
+
return routine;
|
|
304
|
+
}
|
|
305
|
+
function matchPascalNestedCall(ref, context) {
|
|
306
|
+
if (ref.language !== 'pascal' || ref.referenceKind !== 'calls' || !isBareCall(ref, context))
|
|
307
|
+
return undefined;
|
|
308
|
+
const lower = ref.referenceName.toLowerCase();
|
|
309
|
+
let found = nestedRoutineInScope(lower, ref, context);
|
|
310
|
+
if (!found) {
|
|
311
|
+
const caller = routineNode(ref.fromNodeId, context);
|
|
312
|
+
if (!caller || !isNestedRoutine(caller, context))
|
|
313
|
+
return undefined;
|
|
314
|
+
const decl = declarationInScope(lower, classOfCall(ref, context), ref, context);
|
|
315
|
+
if (!decl || !(isRoutine(decl.node) || (DATA_KINDS.has(decl.node.kind) && isProceduralData(decl.node, context))))
|
|
316
|
+
return undefined;
|
|
317
|
+
found = decl;
|
|
318
|
+
}
|
|
319
|
+
context.rememberNode?.(found.node);
|
|
320
|
+
return { original: ref, targetNodeId: found.node.id, confidence: found.confidence, resolvedBy: found.resolvedBy };
|
|
321
|
+
}
|
|
322
|
+
function gatePascalNestedTarget(result, ref, context) {
|
|
323
|
+
if (!isBareCall(ref, context))
|
|
324
|
+
return null;
|
|
325
|
+
const lower = ref.referenceName.toLowerCase();
|
|
326
|
+
const decl = declarationInScope(lower, classOfCall(ref, context), ref, context);
|
|
327
|
+
if (!decl || (!isRoutine(decl.node) && !(DATA_KINDS.has(decl.node.kind) && isProceduralData(decl.node, context))))
|
|
328
|
+
return null;
|
|
329
|
+
if (decl.node.id === result.targetNodeId)
|
|
330
|
+
return result;
|
|
331
|
+
context.rememberNode?.(decl.node);
|
|
332
|
+
return { ...result, targetNodeId: decl.node.id, confidence: decl.confidence, resolvedBy: decl.resolvedBy };
|
|
333
|
+
}
|
|
334
|
+
function declarationInScope(lower, cls, ref, context) {
|
|
335
|
+
const nested = nestedRoutineInScope(lower, ref, context);
|
|
336
|
+
if (nested)
|
|
337
|
+
return nested;
|
|
338
|
+
const memo = memos(context).inScope;
|
|
339
|
+
const key = `${cls?.id ?? ''}|${ref.filePath}|${lower}`;
|
|
340
|
+
if (memo.has(key))
|
|
341
|
+
return memo.get(key);
|
|
342
|
+
let found = null;
|
|
343
|
+
const member = cls ? memberInHierarchy(cls, lower, context) : null;
|
|
344
|
+
if (member) {
|
|
345
|
+
found = { node: member, resolvedBy: 'instance-method', confidence: 0.9 };
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
348
|
+
const own = ownUnitDeclaration(ref.filePath, lower, context);
|
|
349
|
+
if (own) {
|
|
350
|
+
found = { node: own, resolvedBy: 'exact-match', confidence: 0.9 };
|
|
351
|
+
}
|
|
352
|
+
else {
|
|
353
|
+
const used = usedUnitFiles(ref.filePath, context);
|
|
354
|
+
for (let i = used.length - 1; i >= 0 && !found; i--) {
|
|
355
|
+
const decl = unitDeclaration(used[i], lower, context, ref.filePath);
|
|
356
|
+
if (decl)
|
|
357
|
+
found = { node: decl, resolvedBy: 'import', confidence: 0.85 };
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
memo.set(key, found);
|
|
362
|
+
return found;
|
|
363
|
+
}
|
|
364
|
+
function memberThroughPath(path, cls, ref, context, holdsRoutine = false) {
|
|
365
|
+
const last = memberAtPath(path, cls, ref, context);
|
|
366
|
+
if (!last)
|
|
367
|
+
return null;
|
|
368
|
+
if (!isRoutine(last.node) && !(holdsRoutine && DATA_KINDS.has(last.node.kind) && isProceduralData(last.node, context)))
|
|
369
|
+
return null;
|
|
370
|
+
return { node: last.node, resolvedBy: last.unit ? 'import' : 'instance-method', confidence: 0.9 };
|
|
371
|
+
}
|
|
372
|
+
function memberAtPath(path, cls, ref, context) {
|
|
373
|
+
let head = headOf(path[0], cls, ref, context);
|
|
374
|
+
let rest = path.slice(1);
|
|
375
|
+
for (let k = path.length - 1; !head && k >= 2; k--) {
|
|
376
|
+
const unitFile = unitFileNamed(path.slice(0, k).join('.').toLowerCase(), ref.filePath, context);
|
|
377
|
+
if (unitFile) {
|
|
378
|
+
head = { type: null, unitFile };
|
|
379
|
+
rest = path.slice(k);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
if (!head)
|
|
383
|
+
return null;
|
|
384
|
+
let type = head.type;
|
|
385
|
+
let classRef = head.classRef === true;
|
|
386
|
+
if (head.unitFile) {
|
|
387
|
+
const decl = unitDeclaration(head.unitFile, rest[0].toLowerCase(), context, ref.filePath);
|
|
388
|
+
if (!decl)
|
|
389
|
+
return null;
|
|
390
|
+
if (rest.length === 1)
|
|
391
|
+
return { node: decl, unit: true };
|
|
392
|
+
classRef = CLASS_KINDS.has(decl.kind);
|
|
393
|
+
type = classRef ? decl : typeOfMember(decl, context);
|
|
394
|
+
rest = rest.slice(1);
|
|
395
|
+
}
|
|
396
|
+
for (let i = 0; i < rest.length && type; i++) {
|
|
397
|
+
const lower = rest[i].toLowerCase();
|
|
398
|
+
const member = memberInHierarchy(type, lower, context);
|
|
399
|
+
if (i === rest.length - 1)
|
|
400
|
+
return member ? { node: member, unit: false } : null;
|
|
401
|
+
if (classRef && (member ? routineKeyword(member, context) === 'constructor' : lower === 'create')) {
|
|
402
|
+
classRef = false;
|
|
403
|
+
continue;
|
|
404
|
+
}
|
|
405
|
+
if (!member)
|
|
406
|
+
return null;
|
|
407
|
+
type = typeOfMember(member, context);
|
|
408
|
+
classRef = false;
|
|
409
|
+
}
|
|
410
|
+
return null;
|
|
411
|
+
}
|
|
412
|
+
function headOf(name, cls, ref, context) {
|
|
413
|
+
if (name.startsWith(':'))
|
|
414
|
+
return { type: classNamed(name.slice(1), ref.filePath, context) };
|
|
415
|
+
const lower = name.toLowerCase();
|
|
416
|
+
if (lower === 'self')
|
|
417
|
+
return cls ? { type: cls } : null;
|
|
418
|
+
if (cls) {
|
|
419
|
+
const member = memberInHierarchy(cls, lower, context);
|
|
420
|
+
if (member)
|
|
421
|
+
return { type: typeOfMember(member, context) };
|
|
422
|
+
}
|
|
423
|
+
const decl = ownUnitDeclaration(ref.filePath, lower, context) ??
|
|
424
|
+
usedUnitFiles(ref.filePath, context).reduceRight((hit, file) => hit ?? unitDeclaration(file, lower, context, ref.filePath), undefined);
|
|
425
|
+
if (decl)
|
|
426
|
+
return CLASS_KINDS.has(decl.kind) ? { type: decl, classRef: true } : { type: typeOfMember(decl, context) };
|
|
427
|
+
const unitFile = unitFileNamed(lower, ref.filePath, context);
|
|
428
|
+
return unitFile ? { type: null, unitFile } : null;
|
|
429
|
+
}
|
|
430
|
+
function assignedRoutineType(target, cls, ref, context) {
|
|
431
|
+
const links = target.split('.');
|
|
432
|
+
if (links.length === 1 && links[0].startsWith(':'))
|
|
433
|
+
return routineTypeVerdict(links[0].slice(1), context, 0);
|
|
434
|
+
const node = links.length === 1
|
|
435
|
+
? declarationInScope(links[0].toLowerCase(), cls, ref, context)?.node
|
|
436
|
+
: memberAtPath(links, cls, ref, context)?.node;
|
|
437
|
+
if (!node || !DATA_KINDS.has(node.kind) || node.kind === 'enum_member')
|
|
438
|
+
return undefined;
|
|
439
|
+
const text = declaredTypeText(node, context);
|
|
440
|
+
return text ? routineTypeVerdict(text, context, 0) : undefined;
|
|
441
|
+
}
|
|
442
|
+
function returnsRoutineType(routine, context) {
|
|
443
|
+
if (!isRoutine(routine))
|
|
444
|
+
return false;
|
|
445
|
+
const typeName = routine.returnType ?? /:\s*([A-Za-z_][\w.]*)\s*;?\s*$/.exec(routine.signature ?? '')?.[1];
|
|
446
|
+
return !!typeName && routineTypeVerdict(typeName, context, 0) === true;
|
|
447
|
+
}
|
|
448
|
+
const MEMOS = new WeakMap();
|
|
449
|
+
function memos(context) {
|
|
450
|
+
let m = MEMOS.get(context);
|
|
451
|
+
if (!m) {
|
|
452
|
+
m = {
|
|
453
|
+
named: new Map(), inScope: new Map(), classOfRoutine: new Map(), classByQn: new Map(),
|
|
454
|
+
ancestors: new Map(), usedFiles: new Map(), classByName: new Map(), unitFiles: new Map(), hierarchy: new Map(),
|
|
455
|
+
memberTypes: new Map(), keywords: new Map(), procedural: new Map(), headerClasses: new Map(), outlines: new Map(),
|
|
456
|
+
conditionDepths: new Map(), unitFileSets: new Map(), includes: new Map(), includers: new Map(), ownFiles: new Map(),
|
|
457
|
+
nestedInScope: new Map(), routineNodes: new Map(), routineQns: new Map(),
|
|
458
|
+
};
|
|
459
|
+
MEMOS.set(context, m);
|
|
460
|
+
}
|
|
461
|
+
return m;
|
|
462
|
+
}
|
|
463
|
+
function routineNames(context) {
|
|
464
|
+
const memo = memos(context);
|
|
465
|
+
if (memo.routineNames === undefined) {
|
|
466
|
+
const names = context.getNodeNamesOfKinds?.('pascal', ['method', 'function']);
|
|
467
|
+
memo.routineNames = names ? new Set(names.map((n) => n.toLowerCase())) : null;
|
|
468
|
+
}
|
|
469
|
+
return memo.routineNames;
|
|
470
|
+
}
|
|
471
|
+
function pascalNamed(lower, context) {
|
|
472
|
+
const memo = memos(context).named;
|
|
473
|
+
let nodes = memo.get(lower);
|
|
474
|
+
if (!nodes) {
|
|
475
|
+
nodes = context.getNodesByLowerName(lower).filter((n) => n.language === 'pascal');
|
|
476
|
+
memo.set(lower, nodes);
|
|
477
|
+
}
|
|
478
|
+
return nodes;
|
|
479
|
+
}
|
|
480
|
+
function clearPascalScopeMemos(context) {
|
|
481
|
+
MEMOS.delete(context);
|
|
482
|
+
}
|
|
483
|
+
function classByQualifiedName(qualifiedName, filePath, context) {
|
|
484
|
+
const memo = memos(context).classByQn;
|
|
485
|
+
const key = `${filePath}|${qualifiedName}`;
|
|
486
|
+
if (memo.has(key))
|
|
487
|
+
return memo.get(key);
|
|
488
|
+
const exact = context.getNodesByQualifiedName(qualifiedName).filter((n) => n.language === 'pascal' && CLASS_KINDS.has(n.kind));
|
|
489
|
+
const lower = qualifiedName.toLowerCase();
|
|
490
|
+
let cls = null;
|
|
491
|
+
for (const file of ownUnitFiles(filePath, context)) {
|
|
492
|
+
cls = declarationOf(exact.filter((n) => n.filePath === file)) ??
|
|
493
|
+
declarationOf(outlineOf(file, context).classes.filter((n) => n.qualifiedName.replace(/<[^>]*>/g, '').toLowerCase() === lower));
|
|
494
|
+
if (cls)
|
|
495
|
+
break;
|
|
496
|
+
}
|
|
497
|
+
cls ??= declarationOf(exact) ?? classNamed(qualifiedName.split('::').pop(), filePath, context);
|
|
498
|
+
memo.set(key, cls);
|
|
499
|
+
return cls;
|
|
500
|
+
}
|
|
501
|
+
function declarationOf(classes) {
|
|
502
|
+
let best = null;
|
|
503
|
+
for (const c of classes)
|
|
504
|
+
if (!best || c.endLine - c.startLine > best.endLine - best.startLine)
|
|
505
|
+
best = c;
|
|
506
|
+
return best;
|
|
507
|
+
}
|
|
508
|
+
function classOfRoutine(routine, context) {
|
|
509
|
+
if (routine.kind !== 'method')
|
|
510
|
+
return null;
|
|
511
|
+
const memo = memos(context).classOfRoutine;
|
|
512
|
+
if (memo.has(routine.id))
|
|
513
|
+
return memo.get(routine.id);
|
|
514
|
+
const owner = routine.qualifiedName.slice(0, Math.max(0, routine.qualifiedName.lastIndexOf('::')));
|
|
515
|
+
const candidates = owner ? context.getNodesByQualifiedName(owner).filter((n) => n.language === 'pascal' && CLASS_KINDS.has(n.kind)) : [];
|
|
516
|
+
const cls = declarationOf(candidates.filter((n) => n.filePath === routine.filePath)) ?? declarationOf(candidates);
|
|
517
|
+
memo.set(routine.id, cls);
|
|
518
|
+
return cls;
|
|
519
|
+
}
|
|
520
|
+
function ancestorsOf(cls, context) {
|
|
521
|
+
const memo = memos(context).ancestors;
|
|
522
|
+
const hit = memo.get(cls.id);
|
|
523
|
+
if (hit)
|
|
524
|
+
return hit;
|
|
525
|
+
const order = [];
|
|
526
|
+
const seen = new Set();
|
|
527
|
+
let frontier = [cls];
|
|
528
|
+
for (let depth = 0; depth < MAX_HIERARCHY_DEPTH && frontier.length > 0; depth++) {
|
|
529
|
+
const next = [];
|
|
530
|
+
for (const c of frontier) {
|
|
531
|
+
if (seen.has(c.id))
|
|
532
|
+
continue;
|
|
533
|
+
seen.add(c.id);
|
|
534
|
+
order.push(c);
|
|
535
|
+
for (const name of (0, name_matcher_1.declaredSupertypes)(c, context)) {
|
|
536
|
+
const sup = classNamed(name, c.filePath, context);
|
|
537
|
+
if (sup)
|
|
538
|
+
next.push(sup);
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
frontier = next;
|
|
542
|
+
}
|
|
543
|
+
memo.set(cls.id, order);
|
|
544
|
+
return order;
|
|
545
|
+
}
|
|
546
|
+
function ownerOf(node) {
|
|
547
|
+
return node.qualifiedName.slice(0, Math.max(0, node.qualifiedName.lastIndexOf('::'))).toLowerCase();
|
|
548
|
+
}
|
|
549
|
+
function memberInHierarchy(cls, lower, context) {
|
|
550
|
+
const memo = memos(context).hierarchy;
|
|
551
|
+
const key = `${cls.id}|${lower}`;
|
|
552
|
+
if (memo.has(key))
|
|
553
|
+
return memo.get(key);
|
|
554
|
+
let found = null;
|
|
555
|
+
const candidates = pascalNamed(lower, context).filter((n) => MEMBER_KINDS.has(n.kind));
|
|
556
|
+
if (candidates.length > 0) {
|
|
557
|
+
for (const c of ancestorsOf(cls, context)) {
|
|
558
|
+
const owner = c.qualifiedName.toLowerCase();
|
|
559
|
+
const members = candidates.filter((n) => n.filePath === c.filePath && ownerOf(n) === owner);
|
|
560
|
+
if (members.length > 0) {
|
|
561
|
+
found = members.find((n) => !needsArguments(n)) ?? members[0];
|
|
562
|
+
break;
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
memo.set(key, found);
|
|
567
|
+
return found;
|
|
568
|
+
}
|
|
569
|
+
function unitDeclaration(filePath, lower, context, fromFile = filePath) {
|
|
570
|
+
const decls = pascalNamed(lower, context).filter((n) => n.filePath === filePath && UNIT_KINDS.has(n.kind) && (n.kind === 'enum_member' || !n.qualifiedName.includes('::')) &&
|
|
571
|
+
!(fromFile !== filePath && n.kind === 'function' && n.startColumn > unitRoutineColumn(filePath, context)));
|
|
572
|
+
return decls.find((n) => !isRoutine(n)) ?? decls.find((n) => !needsArguments(n)) ?? decls[0];
|
|
573
|
+
}
|
|
574
|
+
function unitRoutineColumn(filePath, context) {
|
|
575
|
+
return outlineOf(filePath, context).routineColumn;
|
|
576
|
+
}
|
|
577
|
+
function outlineOf(filePath, context) {
|
|
578
|
+
const memo = memos(context).outlines;
|
|
579
|
+
let outline = memo.get(filePath);
|
|
580
|
+
if (!outline) {
|
|
581
|
+
const nodes = context.getNodesInFile(filePath);
|
|
582
|
+
let routineColumn = Infinity;
|
|
583
|
+
if (!nodes.some((n) => n.kind === 'module')) {
|
|
584
|
+
for (const n of nodes) {
|
|
585
|
+
if (n.kind === 'function' && !n.qualifiedName.includes('::'))
|
|
586
|
+
routineColumn = Math.min(routineColumn, n.startColumn);
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
outline = {
|
|
590
|
+
classes: nodes.filter((n) => CLASS_KINDS.has(n.kind)),
|
|
591
|
+
imports: nodes.filter((n) => n.kind === 'import' && n.language === 'pascal')
|
|
592
|
+
.sort((a, b) => a.startLine - b.startLine || a.startColumn - b.startColumn),
|
|
593
|
+
routineColumn,
|
|
594
|
+
};
|
|
595
|
+
memo.set(filePath, outline);
|
|
596
|
+
}
|
|
597
|
+
return outline;
|
|
598
|
+
}
|
|
599
|
+
function usedUnitFiles(fromFile, context) {
|
|
600
|
+
const memo = memos(context).usedFiles;
|
|
601
|
+
const hit = memo.get(fromFile);
|
|
602
|
+
if (hit)
|
|
603
|
+
return hit;
|
|
604
|
+
const unit = unitFilesOf(fromFile, context);
|
|
605
|
+
const files = [];
|
|
606
|
+
for (const own of unit) {
|
|
607
|
+
for (const imp of outlineOf(own, context).imports) {
|
|
608
|
+
const file = unitFileNamed(imp.name.toLowerCase(), own, context);
|
|
609
|
+
if (file && !unit.includes(file) && !files.includes(file))
|
|
610
|
+
files.push(file);
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
memo.set(fromFile, files);
|
|
614
|
+
return files;
|
|
615
|
+
}
|
|
616
|
+
function ownUnitDeclaration(fromFile, lower, context) {
|
|
617
|
+
for (const file of ownUnitFiles(fromFile, context)) {
|
|
618
|
+
const decl = unitDeclaration(file, lower, context);
|
|
619
|
+
if (decl)
|
|
620
|
+
return decl;
|
|
621
|
+
}
|
|
622
|
+
return undefined;
|
|
623
|
+
}
|
|
624
|
+
function ownUnitFiles(filePath, context) {
|
|
625
|
+
const memo = memos(context).ownFiles;
|
|
626
|
+
let own = memo.get(filePath);
|
|
627
|
+
if (!own) {
|
|
628
|
+
const unit = unitFilesOf(filePath, context);
|
|
629
|
+
own = unit[0] === filePath ? unit : [filePath, ...unit.filter((f) => f !== filePath)];
|
|
630
|
+
memo.set(filePath, own);
|
|
631
|
+
}
|
|
632
|
+
return own;
|
|
633
|
+
}
|
|
634
|
+
function unitFilesOf(filePath, context) {
|
|
635
|
+
const m = memos(context);
|
|
636
|
+
const hit = m.unitFileSets.get(filePath);
|
|
637
|
+
if (hit)
|
|
638
|
+
return hit;
|
|
639
|
+
let root = filePath;
|
|
640
|
+
for (let i = 0; i < 3 && /\.inc$/i.test(root); i++) {
|
|
641
|
+
const up = includerOf(root, context);
|
|
642
|
+
if (!up || up === filePath)
|
|
643
|
+
break;
|
|
644
|
+
root = up;
|
|
645
|
+
}
|
|
646
|
+
const files = [root];
|
|
647
|
+
for (let i = 0; i < files.length && files.length < 32; i++) {
|
|
648
|
+
for (const inc of includesOf(files[i], context))
|
|
649
|
+
if (!files.includes(inc))
|
|
650
|
+
files.push(inc);
|
|
651
|
+
}
|
|
652
|
+
if (!files.includes(filePath))
|
|
653
|
+
files.push(filePath);
|
|
654
|
+
m.unitFileSets.set(filePath, files);
|
|
655
|
+
return files;
|
|
656
|
+
}
|
|
657
|
+
function includesOf(filePath, context) {
|
|
658
|
+
const m = memos(context);
|
|
659
|
+
let includes = m.includes.get(filePath);
|
|
660
|
+
if (includes)
|
|
661
|
+
return includes;
|
|
662
|
+
includes = [];
|
|
663
|
+
if (PASCAL_SOURCE.test(filePath)) {
|
|
664
|
+
for (const text of fileLines(filePath, context)) {
|
|
665
|
+
if (!text.includes('{$') || !/\{\$i(?:nclude)?\s/i.test(text))
|
|
666
|
+
continue;
|
|
667
|
+
for (const match of text.matchAll(/\{\$(?:I|INCLUDE)\s+['"]?([^'"}\s*]+)/gi)) {
|
|
668
|
+
let name = match[1].replace(/\\/g, '/');
|
|
669
|
+
name = name.slice(name.lastIndexOf('/') + 1).toLowerCase();
|
|
670
|
+
if (!name.includes('.'))
|
|
671
|
+
name += '.inc';
|
|
672
|
+
const inc = nearest(projectFiles(context).byName.get(name) ?? [], filePath);
|
|
673
|
+
if (inc && inc !== filePath && !includes.includes(inc))
|
|
674
|
+
includes.push(inc);
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
m.includes.set(filePath, includes);
|
|
679
|
+
return includes;
|
|
680
|
+
}
|
|
681
|
+
function includerOf(incFile, context) {
|
|
682
|
+
const m = memos(context);
|
|
683
|
+
if (m.includers.has(incFile))
|
|
684
|
+
return m.includers.get(incFile);
|
|
685
|
+
const shared = (f) => {
|
|
686
|
+
let n = 0;
|
|
687
|
+
while (n < f.length && n < incFile.length && f.charCodeAt(n) === incFile.charCodeAt(n))
|
|
688
|
+
n++;
|
|
689
|
+
return f.lastIndexOf('/', n - 1) * 1000 + n;
|
|
690
|
+
};
|
|
691
|
+
const candidates = projectFiles(context).pascal.filter((f) => f !== incFile)
|
|
692
|
+
.map((f) => ({ f, n: shared(f) })).sort((a, b) => b.n - a.n).slice(0, 40);
|
|
693
|
+
const includer = candidates.find(({ f }) => includesOf(f, context).includes(incFile))?.f ?? null;
|
|
694
|
+
m.includers.set(incFile, includer);
|
|
695
|
+
return includer;
|
|
696
|
+
}
|
|
697
|
+
const PASCAL_SOURCE = /\.(?:pas|dpr|dpk|lpr|inc)$/i;
|
|
698
|
+
function projectFiles(context) {
|
|
699
|
+
const m = memos(context);
|
|
700
|
+
if (!m.projectFiles) {
|
|
701
|
+
const byName = new Map();
|
|
702
|
+
const pascal = [];
|
|
703
|
+
for (const file of context.getAllFiles()) {
|
|
704
|
+
const base = file.slice(file.lastIndexOf('/') + 1).toLowerCase();
|
|
705
|
+
const same = byName.get(base);
|
|
706
|
+
if (same)
|
|
707
|
+
same.push(file);
|
|
708
|
+
else
|
|
709
|
+
byName.set(base, [file]);
|
|
710
|
+
if (PASCAL_SOURCE.test(file))
|
|
711
|
+
pascal.push(file);
|
|
712
|
+
}
|
|
713
|
+
m.projectFiles = { byName, pascal };
|
|
714
|
+
}
|
|
715
|
+
return m.projectFiles;
|
|
716
|
+
}
|
|
717
|
+
function unitFileNamed(lower, fromFile, context) {
|
|
718
|
+
const m = memos(context);
|
|
719
|
+
const key = `${fromFile}|${lower}`;
|
|
720
|
+
if (m.unitFiles.has(key))
|
|
721
|
+
return m.unitFiles.get(key);
|
|
722
|
+
if (!m.unitsByName) {
|
|
723
|
+
const units = new Map();
|
|
724
|
+
const add = (name, file) => {
|
|
725
|
+
const files = units.get(name);
|
|
726
|
+
if (files)
|
|
727
|
+
files.push(file);
|
|
728
|
+
else
|
|
729
|
+
units.set(name, [file]);
|
|
730
|
+
};
|
|
731
|
+
const headed = new Set();
|
|
732
|
+
for (const n of context.getNodesByKind('module')) {
|
|
733
|
+
if (n.language !== 'pascal')
|
|
734
|
+
continue;
|
|
735
|
+
add(n.name.toLowerCase(), n.filePath);
|
|
736
|
+
headed.add(n.filePath);
|
|
737
|
+
}
|
|
738
|
+
for (const file of context.getAllFiles()) {
|
|
739
|
+
if (headed.has(file) || !/\.pas$/i.test(file))
|
|
740
|
+
continue;
|
|
741
|
+
add(file.slice(file.lastIndexOf('/') + 1, -'.pas'.length).toLowerCase(), file);
|
|
742
|
+
}
|
|
743
|
+
m.unitsByName = units;
|
|
744
|
+
}
|
|
745
|
+
const file = nearest(m.unitsByName.get(lower) ?? [], fromFile);
|
|
746
|
+
m.unitFiles.set(key, file);
|
|
747
|
+
return file;
|
|
748
|
+
}
|
|
749
|
+
function classNamed(typeName, fromFile, context) {
|
|
750
|
+
const simple = typeName.split('.').pop().toLowerCase();
|
|
751
|
+
const memo = memos(context).classByName;
|
|
752
|
+
const key = `${fromFile}|${simple}`;
|
|
753
|
+
if (memo.has(key))
|
|
754
|
+
return memo.get(key);
|
|
755
|
+
const cls = classThroughAliases(simple, fromFile, context, new Set([key]));
|
|
756
|
+
memo.set(key, cls);
|
|
757
|
+
return cls;
|
|
758
|
+
}
|
|
759
|
+
const MAX_ALIAS_WALK = 1000;
|
|
760
|
+
function classThroughAliases(simple, fromFile, context, seen) {
|
|
761
|
+
const named = pascalNamed(simple, context);
|
|
762
|
+
const visible = (kinds) => {
|
|
763
|
+
const candidates = named.filter((n) => kinds.has(n.kind));
|
|
764
|
+
for (const file of ownUnitFiles(fromFile, context)) {
|
|
765
|
+
const own = candidates.filter((n) => n.filePath === file);
|
|
766
|
+
if (own.length > 0)
|
|
767
|
+
return own;
|
|
768
|
+
}
|
|
769
|
+
const used = usedUnitFiles(fromFile, context);
|
|
770
|
+
for (let i = used.length - 1; i >= 0; i--) {
|
|
771
|
+
const there = candidates.filter((n) => n.filePath === used[i]);
|
|
772
|
+
if (there.length > 0)
|
|
773
|
+
return there;
|
|
774
|
+
}
|
|
775
|
+
return candidates.length > 0 && candidates.every((n) => n.filePath === candidates[0].filePath) ? candidates : [];
|
|
776
|
+
};
|
|
777
|
+
const cls = declarationOf(visible(CLASS_KINDS));
|
|
778
|
+
if (cls)
|
|
779
|
+
return cls;
|
|
780
|
+
for (const alias of visible(ALIAS_KINDS)) {
|
|
781
|
+
const line = (fileLines(alias.filePath, context)[alias.startLine - 1] ?? '').replace(/\/\/.*$|\{[^}]*\}/g, '');
|
|
782
|
+
const target = /=\s*(?:\^|class\s+of\b)?\s*([A-Za-z_][\w.]*)\s*;/i.exec(line)?.[1]?.split('.').pop().toLowerCase();
|
|
783
|
+
const key = `${alias.filePath}|${target}`;
|
|
784
|
+
if (!target || seen.has(key))
|
|
785
|
+
continue;
|
|
786
|
+
if (seen.size >= MAX_ALIAS_WALK)
|
|
787
|
+
return null;
|
|
788
|
+
seen.add(key);
|
|
789
|
+
const through = classThroughAliases(target, alias.filePath, context, seen);
|
|
790
|
+
if (through)
|
|
791
|
+
return through;
|
|
792
|
+
}
|
|
793
|
+
return null;
|
|
794
|
+
}
|
|
795
|
+
const ALIAS_KINDS = new Set(['type_alias']);
|
|
796
|
+
function nearest(files, from) {
|
|
797
|
+
if (files.length <= 1)
|
|
798
|
+
return files[0] ?? null;
|
|
799
|
+
const dirs = from.split('/');
|
|
800
|
+
let best = null;
|
|
801
|
+
let bestScore = -1;
|
|
802
|
+
for (const f of files) {
|
|
803
|
+
const parts = f.split('/');
|
|
804
|
+
let score = 0;
|
|
805
|
+
while (score < parts.length && score < dirs.length && parts[score] === dirs[score])
|
|
806
|
+
score++;
|
|
807
|
+
if (score > bestScore) {
|
|
808
|
+
best = f;
|
|
809
|
+
bestScore = score;
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
return best;
|
|
813
|
+
}
|
|
814
|
+
function fileLines(filePath, context) {
|
|
815
|
+
return context.getFileLines?.(filePath) ?? context.readFile(filePath)?.split(/\r?\n/) ?? [];
|
|
816
|
+
}
|
|
817
|
+
function escapeRegExp(s) {
|
|
818
|
+
return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
819
|
+
}
|
|
820
|
+
function typeOfMember(member, context) {
|
|
821
|
+
const memo = memos(context).memberTypes;
|
|
822
|
+
if (memo.has(member.id))
|
|
823
|
+
return memo.get(member.id);
|
|
824
|
+
let typeName;
|
|
825
|
+
if (member.kind === 'method' || member.kind === 'function') {
|
|
826
|
+
typeName = member.returnType ?? /:\s*([A-Za-z_][\w.]*)\s*;?\s*$/.exec(member.signature ?? '')?.[1];
|
|
827
|
+
}
|
|
828
|
+
else {
|
|
829
|
+
typeName = /^([A-Za-z_][\w.]*)/.exec(declaredTypeText(member, context))?.[1];
|
|
830
|
+
}
|
|
831
|
+
const type = typeName ? classNamed(typeName, member.filePath, context) : null;
|
|
832
|
+
memo.set(member.id, type);
|
|
833
|
+
return type;
|
|
834
|
+
}
|
|
835
|
+
function declaredTypeText(node, context) {
|
|
836
|
+
const lines = fileLines(node.filePath, context);
|
|
837
|
+
const name = escapeRegExp(node.name);
|
|
838
|
+
const re = node.kind === 'property'
|
|
839
|
+
? new RegExp(`\\bproperty\\s+${name}\\s*(?:\\[[^\\]]*\\])?\\s*:\\s*(.*)$`, 'i')
|
|
840
|
+
: new RegExp(`\\b${name}\\b(?:\\s*,\\s*[A-Za-z_]\\w*)*\\s*,?\\s*:(?!=)\\s*(.*)$`, 'i');
|
|
841
|
+
let text = '';
|
|
842
|
+
for (let i = node.startLine - 1; i < node.startLine + 5 && i < lines.length; i++) {
|
|
843
|
+
text += ' ' + lines[i].replace(/\/\/.*$|\{[^}]*\}|\(\*.*?\*\)/g, ' ');
|
|
844
|
+
const m = re.exec(text);
|
|
845
|
+
if (m)
|
|
846
|
+
return m[1].trim();
|
|
847
|
+
if (node.kind === 'property' || !/,\s*$/.test(text))
|
|
848
|
+
break;
|
|
849
|
+
}
|
|
850
|
+
return '';
|
|
851
|
+
}
|
|
852
|
+
function isProceduralData(node, context) {
|
|
853
|
+
const memo = memos(context).procedural;
|
|
854
|
+
const hit = memo.get(node.id);
|
|
855
|
+
if (hit !== undefined)
|
|
856
|
+
return hit;
|
|
857
|
+
const procedural = isProceduralTypeText(declaredTypeText(node, context), context, 0);
|
|
858
|
+
memo.set(node.id, procedural);
|
|
859
|
+
return procedural;
|
|
860
|
+
}
|
|
861
|
+
function isProceduralTypeText(text, context, depth) {
|
|
862
|
+
return routineTypeVerdict(text, context, depth) === true;
|
|
863
|
+
}
|
|
864
|
+
function routineTypeVerdict(text, context, depth) {
|
|
865
|
+
if (PROCEDURAL_TYPE.test(text))
|
|
866
|
+
return true;
|
|
867
|
+
const typeName = /^(?:type\s+)?([A-Za-z_][\w.]*)/i.exec(text)?.[1]?.split('.').pop()?.toLowerCase();
|
|
868
|
+
if (!typeName || depth > 3)
|
|
869
|
+
return undefined;
|
|
870
|
+
const types = typesNamed(typeName, context);
|
|
871
|
+
if (types.length === 0) {
|
|
872
|
+
if (RTL_PROCEDURAL_TYPES.has(typeName) || /^t\w*(?:event|proc|method|callback)$/.test(typeName))
|
|
873
|
+
return true;
|
|
874
|
+
return SYSTEM_VALUE_TYPES.has(typeName) ? false : undefined;
|
|
875
|
+
}
|
|
876
|
+
return types.some((t) => t.kind === 'type_alias' && isProceduralTypeText(aliasedTypeText(t, context), context, depth + 1));
|
|
877
|
+
}
|
|
878
|
+
const SYSTEM_VALUE_TYPES = new Set([
|
|
879
|
+
'boolean', 'bytebool', 'wordbool', 'longbool', 'integer', 'cardinal', 'shortint', 'smallint', 'longint', 'longword',
|
|
880
|
+
'int8', 'int16', 'int32', 'int64', 'uint8', 'uint16', 'uint32', 'uint64', 'byte', 'word', 'dword', 'nativeint',
|
|
881
|
+
'nativeuint', 'single', 'double', 'extended', 'real', 'currency', 'comp', 'char', 'ansichar', 'widechar', 'string',
|
|
882
|
+
'ansistring', 'widestring', 'unicodestring', 'shortstring', 'rawbytestring', 'utf8string', 'pchar', 'pansichar',
|
|
883
|
+
'pwidechar', 'pointer', 'variant', 'olevariant', 'tdatetime', 'tdate', 'ttime',
|
|
884
|
+
]);
|
|
885
|
+
function typesNamed(lower, context) {
|
|
886
|
+
const m = memos(context);
|
|
887
|
+
if (!m.genericTypes) {
|
|
888
|
+
const generic = new Map();
|
|
889
|
+
const add = (n) => {
|
|
890
|
+
const open = n.name.indexOf('<');
|
|
891
|
+
if (n.language !== 'pascal' || open <= 0 || !(n.kind === 'type_alias' || CLASS_KINDS.has(n.kind)))
|
|
892
|
+
return;
|
|
893
|
+
const base = n.name.slice(0, open).trim().toLowerCase();
|
|
894
|
+
const list = generic.get(base);
|
|
895
|
+
if (list)
|
|
896
|
+
list.push(n);
|
|
897
|
+
else
|
|
898
|
+
generic.set(base, [n]);
|
|
899
|
+
};
|
|
900
|
+
const kinds = ['type_alias', 'class', 'struct', 'interface'];
|
|
901
|
+
const names = context.getNodeNamesOfKinds?.('pascal', kinds);
|
|
902
|
+
if (names) {
|
|
903
|
+
for (const name of new Set(names))
|
|
904
|
+
if (name.includes('<'))
|
|
905
|
+
context.getNodesByName(name).forEach(add);
|
|
906
|
+
}
|
|
907
|
+
else {
|
|
908
|
+
for (const kind of kinds)
|
|
909
|
+
for (const n of context.iterateNodesByKind?.(kind) ?? context.getNodesByKind(kind))
|
|
910
|
+
add(n);
|
|
911
|
+
}
|
|
912
|
+
m.genericTypes = generic;
|
|
913
|
+
}
|
|
914
|
+
return pascalNamed(lower, context).filter((t) => t.kind === 'type_alias' || CLASS_KINDS.has(t.kind))
|
|
915
|
+
.concat(m.genericTypes.get(lower) ?? []);
|
|
916
|
+
}
|
|
917
|
+
function aliasedTypeText(alias, context) {
|
|
918
|
+
const lines = fileLines(alias.filePath, context);
|
|
919
|
+
let text = '';
|
|
920
|
+
for (let i = alias.startLine - 1; i < alias.startLine + 2 && i < lines.length; i++) {
|
|
921
|
+
text += ' ' + lines[i].replace(/\/\/.*$|\{[^}]*\}|\(\*.*?\*\)/g, ' ');
|
|
922
|
+
const eq = text.indexOf('=');
|
|
923
|
+
if (eq >= 0 && text.slice(eq + 1).trim())
|
|
924
|
+
return text.slice(eq + 1).trim();
|
|
925
|
+
}
|
|
926
|
+
return '';
|
|
927
|
+
}
|
|
928
|
+
const PROCEDURAL_TYPE = /^(?:reference\s+to\s+)?(?:procedure|function)\b/i;
|
|
929
|
+
function needsArguments(routine) {
|
|
930
|
+
const signature = routine.signature?.trim();
|
|
931
|
+
if (!signature?.startsWith('('))
|
|
932
|
+
return false;
|
|
933
|
+
let depth = 0;
|
|
934
|
+
let end = signature.length;
|
|
935
|
+
for (let i = 0; i < signature.length; i++) {
|
|
936
|
+
if (signature[i] === '(')
|
|
937
|
+
depth++;
|
|
938
|
+
else if (signature[i] === ')' && --depth === 0) {
|
|
939
|
+
end = i;
|
|
940
|
+
break;
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
return signature.slice(1, end).split(';').some((param) => param.trim() !== '' && !param.includes('='));
|
|
944
|
+
}
|
|
945
|
+
function yieldsValue(routine, context) {
|
|
946
|
+
if (routine.returnType)
|
|
947
|
+
return true;
|
|
948
|
+
const keyword = routineKeyword(routine, context);
|
|
949
|
+
return keyword === 'function' || keyword === 'constructor';
|
|
950
|
+
}
|
|
951
|
+
function routineKeyword(routine, context) {
|
|
952
|
+
const memo = memos(context).keywords;
|
|
953
|
+
const hit = memo.get(routine.id);
|
|
954
|
+
if (hit !== undefined)
|
|
955
|
+
return hit;
|
|
956
|
+
const line = fileLines(routine.filePath, context)[routine.startLine - 1] ?? '';
|
|
957
|
+
const keyword = /\b(function|procedure|constructor|destructor|operator)\s/i.exec(line)?.[1].toLowerCase() ?? null;
|
|
958
|
+
memo.set(routine.id, keyword);
|
|
959
|
+
return keyword;
|
|
960
|
+
}
|
|
961
|
+
//# sourceMappingURL=pascal-scope.js.map
|