@colbymchenry/codegraph-win32-arm64 1.6.0 → 1.6.2

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.
Files changed (761) hide show
  1. package/bin/codegraph +5 -0
  2. package/lib/dist/.test-build-engine.json +1 -0
  3. package/lib/dist/.test-build-viewer.json +1 -0
  4. package/lib/dist/bin/codegraph.d.ts +1 -0
  5. package/lib/dist/bin/codegraph.d.ts.map +1 -1
  6. package/lib/dist/bin/codegraph.js +605 -291
  7. package/lib/dist/bin/codegraph.js.map +1 -1
  8. package/lib/dist/bin/command-supervision.d.ts +7 -0
  9. package/lib/dist/bin/command-supervision.d.ts.map +1 -1
  10. package/lib/dist/bin/command-supervision.js +39 -27
  11. package/lib/dist/bin/command-supervision.js.map +1 -1
  12. package/lib/dist/bin/viewer-gate.d.ts +17 -0
  13. package/lib/dist/bin/viewer-gate.d.ts.map +1 -0
  14. package/lib/dist/bin/viewer-gate.js +31 -0
  15. package/lib/dist/bin/viewer-gate.js.map +1 -0
  16. package/lib/dist/context/index.d.ts.map +1 -1
  17. package/lib/dist/context/index.js +43 -2
  18. package/lib/dist/context/index.js.map +1 -1
  19. package/lib/dist/db/index.d.ts +21 -2
  20. package/lib/dist/db/index.d.ts.map +1 -1
  21. package/lib/dist/db/index.js +86 -31
  22. package/lib/dist/db/index.js.map +1 -1
  23. package/lib/dist/db/migrations.d.ts +1 -1
  24. package/lib/dist/db/migrations.d.ts.map +1 -1
  25. package/lib/dist/db/migrations.js +40 -1
  26. package/lib/dist/db/migrations.js.map +1 -1
  27. package/lib/dist/db/queries.d.ts +454 -10
  28. package/lib/dist/db/queries.d.ts.map +1 -1
  29. package/lib/dist/db/queries.js +1080 -41
  30. package/lib/dist/db/queries.js.map +1 -1
  31. package/lib/dist/db/schema.sql +11 -1
  32. package/lib/dist/db/sqlite-adapter.d.ts +2 -0
  33. package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
  34. package/lib/dist/db/sqlite-adapter.js +56 -7
  35. package/lib/dist/db/sqlite-adapter.js.map +1 -1
  36. package/lib/dist/db/synthesis-stage.d.ts +12 -0
  37. package/lib/dist/db/synthesis-stage.d.ts.map +1 -0
  38. package/lib/dist/db/synthesis-stage.js +89 -0
  39. package/lib/dist/db/synthesis-stage.js.map +1 -0
  40. package/lib/dist/db/wal-valve.d.ts +32 -12
  41. package/lib/dist/db/wal-valve.d.ts.map +1 -1
  42. package/lib/dist/db/wal-valve.js +65 -22
  43. package/lib/dist/db/wal-valve.js.map +1 -1
  44. package/lib/dist/db/wsl-shared-index.d.ts +53 -0
  45. package/lib/dist/db/wsl-shared-index.d.ts.map +1 -0
  46. package/lib/dist/db/wsl-shared-index.js +121 -0
  47. package/lib/dist/db/wsl-shared-index.js.map +1 -0
  48. package/lib/dist/directory.d.ts +131 -2
  49. package/lib/dist/directory.d.ts.map +1 -1
  50. package/lib/dist/directory.js +299 -23
  51. package/lib/dist/directory.js.map +1 -1
  52. package/lib/dist/errors.d.ts +14 -0
  53. package/lib/dist/errors.d.ts.map +1 -1
  54. package/lib/dist/errors.js +16 -1
  55. package/lib/dist/errors.js.map +1 -1
  56. package/lib/dist/extraction/astro-extractor.d.ts.map +1 -1
  57. package/lib/dist/extraction/astro-extractor.js +7 -35
  58. package/lib/dist/extraction/astro-extractor.js.map +1 -1
  59. package/lib/dist/extraction/cfml-extractor.d.ts +77 -10
  60. package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
  61. package/lib/dist/extraction/cfml-extractor.js +302 -71
  62. package/lib/dist/extraction/cfml-extractor.js.map +1 -1
  63. package/lib/dist/extraction/commonjs-requires.d.ts +23 -0
  64. package/lib/dist/extraction/commonjs-requires.d.ts.map +1 -0
  65. package/lib/dist/extraction/commonjs-requires.js +68 -0
  66. package/lib/dist/extraction/commonjs-requires.js.map +1 -0
  67. package/lib/dist/extraction/dfm-extractor.d.ts.map +1 -1
  68. package/lib/dist/extraction/dfm-extractor.js +14 -10
  69. package/lib/dist/extraction/dfm-extractor.js.map +1 -1
  70. package/lib/dist/extraction/extraction-version.d.ts +1 -1
  71. package/lib/dist/extraction/extraction-version.js +1 -1
  72. package/lib/dist/extraction/function-ref.d.ts +6 -4
  73. package/lib/dist/extraction/function-ref.d.ts.map +1 -1
  74. package/lib/dist/extraction/function-ref.js +35 -14
  75. package/lib/dist/extraction/function-ref.js.map +1 -1
  76. package/lib/dist/extraction/generated-detection.d.ts +9 -0
  77. package/lib/dist/extraction/generated-detection.d.ts.map +1 -1
  78. package/lib/dist/extraction/generated-detection.js +42 -2
  79. package/lib/dist/extraction/generated-detection.js.map +1 -1
  80. package/lib/dist/extraction/grammars.d.ts +40 -0
  81. package/lib/dist/extraction/grammars.d.ts.map +1 -1
  82. package/lib/dist/extraction/grammars.js +171 -1
  83. package/lib/dist/extraction/grammars.js.map +1 -1
  84. package/lib/dist/extraction/index.d.ts +132 -19
  85. package/lib/dist/extraction/index.d.ts.map +1 -1
  86. package/lib/dist/extraction/index.js +825 -195
  87. package/lib/dist/extraction/index.js.map +1 -1
  88. package/lib/dist/extraction/kernel/index.d.ts.map +1 -1
  89. package/lib/dist/extraction/kernel/index.js +6 -0
  90. package/lib/dist/extraction/kernel/index.js.map +1 -1
  91. package/lib/dist/extraction/languages/c-cpp.d.ts +73 -0
  92. package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
  93. package/lib/dist/extraction/languages/c-cpp.js +412 -16
  94. package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
  95. package/lib/dist/extraction/languages/csharp.d.ts.map +1 -1
  96. package/lib/dist/extraction/languages/csharp.js +14 -5
  97. package/lib/dist/extraction/languages/csharp.js.map +1 -1
  98. package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
  99. package/lib/dist/extraction/languages/dart.js +16 -3
  100. package/lib/dist/extraction/languages/dart.js.map +1 -1
  101. package/lib/dist/extraction/languages/javascript.js +1 -1
  102. package/lib/dist/extraction/languages/javascript.js.map +1 -1
  103. package/lib/dist/extraction/languages/kotlin.d.ts +4 -0
  104. package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
  105. package/lib/dist/extraction/languages/kotlin.js +237 -36
  106. package/lib/dist/extraction/languages/kotlin.js.map +1 -1
  107. package/lib/dist/extraction/languages/lua.d.ts.map +1 -1
  108. package/lib/dist/extraction/languages/lua.js +4 -1
  109. package/lib/dist/extraction/languages/lua.js.map +1 -1
  110. package/lib/dist/extraction/languages/python.d.ts.map +1 -1
  111. package/lib/dist/extraction/languages/python.js +71 -0
  112. package/lib/dist/extraction/languages/python.js.map +1 -1
  113. package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
  114. package/lib/dist/extraction/languages/rust.js +3 -0
  115. package/lib/dist/extraction/languages/rust.js.map +1 -1
  116. package/lib/dist/extraction/languages/scala.d.ts.map +1 -1
  117. package/lib/dist/extraction/languages/scala.js +18 -3
  118. package/lib/dist/extraction/languages/scala.js.map +1 -1
  119. package/lib/dist/extraction/languages/swift.d.ts +15 -0
  120. package/lib/dist/extraction/languages/swift.d.ts.map +1 -1
  121. package/lib/dist/extraction/languages/swift.js +50 -0
  122. package/lib/dist/extraction/languages/swift.js.map +1 -1
  123. package/lib/dist/extraction/languages/typescript.d.ts +7 -0
  124. package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
  125. package/lib/dist/extraction/languages/typescript.js +30 -2
  126. package/lib/dist/extraction/languages/typescript.js.map +1 -1
  127. package/lib/dist/extraction/liquid-extractor.d.ts +18 -0
  128. package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
  129. package/lib/dist/extraction/liquid-extractor.js +98 -22
  130. package/lib/dist/extraction/liquid-extractor.js.map +1 -1
  131. package/lib/dist/extraction/mybatis-extractor.d.ts.map +1 -1
  132. package/lib/dist/extraction/mybatis-extractor.js +6 -4
  133. package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
  134. package/lib/dist/extraction/parse-budget.d.ts +16 -0
  135. package/lib/dist/extraction/parse-budget.d.ts.map +1 -0
  136. package/lib/dist/extraction/parse-budget.js +24 -0
  137. package/lib/dist/extraction/parse-budget.js.map +1 -0
  138. package/lib/dist/extraction/parse-pool.d.ts +12 -0
  139. package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
  140. package/lib/dist/extraction/parse-pool.js +51 -3
  141. package/lib/dist/extraction/parse-pool.js.map +1 -1
  142. package/lib/dist/extraction/parse-worker.js +3 -1
  143. package/lib/dist/extraction/parse-worker.js.map +1 -1
  144. package/lib/dist/extraction/sfc-script.d.ts +43 -0
  145. package/lib/dist/extraction/sfc-script.d.ts.map +1 -0
  146. package/lib/dist/extraction/sfc-script.js +135 -0
  147. package/lib/dist/extraction/sfc-script.js.map +1 -0
  148. package/lib/dist/extraction/store-worker.js +5 -0
  149. package/lib/dist/extraction/store-worker.js.map +1 -1
  150. package/lib/dist/extraction/store-writer.d.ts +10 -2
  151. package/lib/dist/extraction/store-writer.d.ts.map +1 -1
  152. package/lib/dist/extraction/store-writer.js +12 -4
  153. package/lib/dist/extraction/store-writer.js.map +1 -1
  154. package/lib/dist/extraction/svelte-extractor.d.ts.map +1 -1
  155. package/lib/dist/extraction/svelte-extractor.js +7 -37
  156. package/lib/dist/extraction/svelte-extractor.js.map +1 -1
  157. package/lib/dist/extraction/syntax-tokens.d.ts +103 -0
  158. package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -0
  159. package/lib/dist/extraction/syntax-tokens.js +382 -0
  160. package/lib/dist/extraction/syntax-tokens.js.map +1 -0
  161. package/lib/dist/extraction/tree-sitter-helpers.d.ts +5 -0
  162. package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
  163. package/lib/dist/extraction/tree-sitter-helpers.js +17 -0
  164. package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
  165. package/lib/dist/extraction/tree-sitter-types.d.ts +29 -3
  166. package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
  167. package/lib/dist/extraction/tree-sitter.d.ts +104 -17
  168. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
  169. package/lib/dist/extraction/tree-sitter.js +943 -88
  170. package/lib/dist/extraction/tree-sitter.js.map +1 -1
  171. package/lib/dist/extraction/vue-extractor.d.ts +7 -0
  172. package/lib/dist/extraction/vue-extractor.d.ts.map +1 -1
  173. package/lib/dist/extraction/vue-extractor.js +73 -35
  174. package/lib/dist/extraction/vue-extractor.js.map +1 -1
  175. package/lib/dist/extraction/vue-options-api.d.ts +28 -0
  176. package/lib/dist/extraction/vue-options-api.d.ts.map +1 -0
  177. package/lib/dist/extraction/vue-options-api.js +196 -0
  178. package/lib/dist/extraction/vue-options-api.js.map +1 -0
  179. package/lib/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
  180. package/lib/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
  181. package/lib/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
  182. package/lib/dist/file-limits.d.ts +40 -0
  183. package/lib/dist/file-limits.d.ts.map +1 -0
  184. package/lib/dist/file-limits.js +147 -0
  185. package/lib/dist/file-limits.js.map +1 -0
  186. package/lib/dist/graph/branch-guards.d.ts +265 -0
  187. package/lib/dist/graph/branch-guards.d.ts.map +1 -0
  188. package/lib/dist/graph/branch-guards.js +2326 -0
  189. package/lib/dist/graph/branch-guards.js.map +1 -0
  190. package/lib/dist/graph/dead-code.d.ts +251 -0
  191. package/lib/dist/graph/dead-code.d.ts.map +1 -0
  192. package/lib/dist/graph/dead-code.js +776 -0
  193. package/lib/dist/graph/dead-code.js.map +1 -0
  194. package/lib/dist/graph/dynamic-boundary-report.d.ts +121 -0
  195. package/lib/dist/graph/dynamic-boundary-report.d.ts.map +1 -0
  196. package/lib/dist/graph/dynamic-boundary-report.js +283 -0
  197. package/lib/dist/graph/dynamic-boundary-report.js.map +1 -0
  198. package/lib/dist/graph/index.d.ts +4 -0
  199. package/lib/dist/graph/index.d.ts.map +1 -1
  200. package/lib/dist/graph/index.js +16 -1
  201. package/lib/dist/graph/index.js.map +1 -1
  202. package/lib/dist/graph/named-symbol-flow.d.ts +125 -0
  203. package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -0
  204. package/lib/dist/graph/named-symbol-flow.js +559 -0
  205. package/lib/dist/graph/named-symbol-flow.js.map +1 -0
  206. package/lib/dist/graph/symbol-lookup.d.ts +83 -0
  207. package/lib/dist/graph/symbol-lookup.d.ts.map +1 -0
  208. package/lib/dist/graph/symbol-lookup.js +181 -0
  209. package/lib/dist/graph/symbol-lookup.js.map +1 -0
  210. package/lib/dist/graph/traversal.d.ts +9 -0
  211. package/lib/dist/graph/traversal.d.ts.map +1 -1
  212. package/lib/dist/graph/traversal.js +61 -35
  213. package/lib/dist/graph/traversal.js.map +1 -1
  214. package/lib/dist/graph/type-hierarchy.d.ts +155 -0
  215. package/lib/dist/graph/type-hierarchy.d.ts.map +1 -0
  216. package/lib/dist/graph/type-hierarchy.js +382 -0
  217. package/lib/dist/graph/type-hierarchy.js.map +1 -0
  218. package/lib/dist/index.d.ts +256 -11
  219. package/lib/dist/index.d.ts.map +1 -1
  220. package/lib/dist/index.js +402 -34
  221. package/lib/dist/index.js.map +1 -1
  222. package/lib/dist/installer/index.d.ts.map +1 -1
  223. package/lib/dist/installer/index.js +3 -2
  224. package/lib/dist/installer/index.js.map +1 -1
  225. package/lib/dist/installer/targets/antigravity.d.ts.map +1 -1
  226. package/lib/dist/installer/targets/antigravity.js +14 -2
  227. package/lib/dist/installer/targets/antigravity.js.map +1 -1
  228. package/lib/dist/installer/targets/claude.d.ts +3 -0
  229. package/lib/dist/installer/targets/claude.d.ts.map +1 -1
  230. package/lib/dist/installer/targets/claude.js +35 -7
  231. package/lib/dist/installer/targets/claude.js.map +1 -1
  232. package/lib/dist/installer/targets/codex.d.ts +2 -1
  233. package/lib/dist/installer/targets/codex.d.ts.map +1 -1
  234. package/lib/dist/installer/targets/codex.js +14 -4
  235. package/lib/dist/installer/targets/codex.js.map +1 -1
  236. package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -1
  237. package/lib/dist/installer/targets/copilot-cli.js +7 -1
  238. package/lib/dist/installer/targets/copilot-cli.js.map +1 -1
  239. package/lib/dist/installer/targets/opencode.d.ts +16 -5
  240. package/lib/dist/installer/targets/opencode.d.ts.map +1 -1
  241. package/lib/dist/installer/targets/opencode.js +73 -22
  242. package/lib/dist/installer/targets/opencode.js.map +1 -1
  243. package/lib/dist/installer/targets/shared.d.ts +14 -3
  244. package/lib/dist/installer/targets/shared.d.ts.map +1 -1
  245. package/lib/dist/installer/targets/shared.js +39 -11
  246. package/lib/dist/installer/targets/shared.js.map +1 -1
  247. package/lib/dist/installer/targets/types.d.ts +7 -0
  248. package/lib/dist/installer/targets/types.d.ts.map +1 -1
  249. package/lib/dist/mcp/answer-freshness.d.ts +10 -0
  250. package/lib/dist/mcp/answer-freshness.d.ts.map +1 -0
  251. package/lib/dist/mcp/answer-freshness.js +68 -0
  252. package/lib/dist/mcp/answer-freshness.js.map +1 -0
  253. package/lib/dist/mcp/daemon-manager.d.ts.map +1 -1
  254. package/lib/dist/mcp/daemon-manager.js +16 -0
  255. package/lib/dist/mcp/daemon-manager.js.map +1 -1
  256. package/lib/dist/mcp/daemon-paths.d.ts +2 -0
  257. package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
  258. package/lib/dist/mcp/daemon-paths.js +20 -5
  259. package/lib/dist/mcp/daemon-paths.js.map +1 -1
  260. package/lib/dist/mcp/daemon-registry.d.ts +11 -4
  261. package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
  262. package/lib/dist/mcp/daemon-registry.js +132 -36
  263. package/lib/dist/mcp/daemon-registry.js.map +1 -1
  264. package/lib/dist/mcp/daemon.d.ts +17 -7
  265. package/lib/dist/mcp/daemon.d.ts.map +1 -1
  266. package/lib/dist/mcp/daemon.js +116 -24
  267. package/lib/dist/mcp/daemon.js.map +1 -1
  268. package/lib/dist/mcp/dynamic-boundaries.d.ts +1 -10
  269. package/lib/dist/mcp/dynamic-boundaries.d.ts.map +1 -1
  270. package/lib/dist/mcp/dynamic-boundaries.js +46 -42
  271. package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
  272. package/lib/dist/mcp/engine.d.ts +30 -9
  273. package/lib/dist/mcp/engine.d.ts.map +1 -1
  274. package/lib/dist/mcp/engine.js +158 -66
  275. package/lib/dist/mcp/engine.js.map +1 -1
  276. package/lib/dist/mcp/explore-dedup.d.ts +5 -2
  277. package/lib/dist/mcp/explore-dedup.d.ts.map +1 -1
  278. package/lib/dist/mcp/explore-dedup.js +8 -5
  279. package/lib/dist/mcp/explore-dedup.js.map +1 -1
  280. package/lib/dist/mcp/index-freshness-worker.d.ts +2 -0
  281. package/lib/dist/mcp/index-freshness-worker.d.ts.map +1 -0
  282. package/lib/dist/mcp/index-freshness-worker.js +36 -0
  283. package/lib/dist/mcp/index-freshness-worker.js.map +1 -0
  284. package/lib/dist/mcp/index-freshness.d.ts +13 -0
  285. package/lib/dist/mcp/index-freshness.d.ts.map +1 -0
  286. package/lib/dist/mcp/index-freshness.js +117 -0
  287. package/lib/dist/mcp/index-freshness.js.map +1 -0
  288. package/lib/dist/mcp/index.d.ts +3 -1
  289. package/lib/dist/mcp/index.d.ts.map +1 -1
  290. package/lib/dist/mcp/index.js +95 -11
  291. package/lib/dist/mcp/index.js.map +1 -1
  292. package/lib/dist/mcp/liveness-watchdog.d.ts +4 -1
  293. package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
  294. package/lib/dist/mcp/liveness-watchdog.js +11 -2
  295. package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
  296. package/lib/dist/mcp/project-lifecycle.d.ts +9 -0
  297. package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -0
  298. package/lib/dist/mcp/project-lifecycle.js +182 -0
  299. package/lib/dist/mcp/project-lifecycle.js.map +1 -0
  300. package/lib/dist/mcp/proxy.d.ts +9 -2
  301. package/lib/dist/mcp/proxy.d.ts.map +1 -1
  302. package/lib/dist/mcp/proxy.js +201 -32
  303. package/lib/dist/mcp/proxy.js.map +1 -1
  304. package/lib/dist/mcp/query-pool.d.ts +18 -3
  305. package/lib/dist/mcp/query-pool.d.ts.map +1 -1
  306. package/lib/dist/mcp/query-pool.js +67 -11
  307. package/lib/dist/mcp/query-pool.js.map +1 -1
  308. package/lib/dist/mcp/query-worker.js +2 -2
  309. package/lib/dist/mcp/query-worker.js.map +1 -1
  310. package/lib/dist/mcp/server-instructions.d.ts +1 -1
  311. package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
  312. package/lib/dist/mcp/server-instructions.js +6 -3
  313. package/lib/dist/mcp/server-instructions.js.map +1 -1
  314. package/lib/dist/mcp/startup-handshake.d.ts +3 -1
  315. package/lib/dist/mcp/startup-handshake.d.ts.map +1 -1
  316. package/lib/dist/mcp/startup-handshake.js +10 -2
  317. package/lib/dist/mcp/startup-handshake.js.map +1 -1
  318. package/lib/dist/mcp/tools.d.ts +306 -36
  319. package/lib/dist/mcp/tools.d.ts.map +1 -1
  320. package/lib/dist/mcp/tools.js +2395 -966
  321. package/lib/dist/mcp/tools.js.map +1 -1
  322. package/lib/dist/mcp/writer-lock.d.ts +61 -0
  323. package/lib/dist/mcp/writer-lock.d.ts.map +1 -0
  324. package/lib/dist/mcp/writer-lock.js +260 -0
  325. package/lib/dist/mcp/writer-lock.js.map +1 -0
  326. package/lib/dist/resolution/alias-binding.d.ts +56 -0
  327. package/lib/dist/resolution/alias-binding.d.ts.map +1 -0
  328. package/lib/dist/resolution/alias-binding.js +143 -0
  329. package/lib/dist/resolution/alias-binding.js.map +1 -0
  330. package/lib/dist/resolution/angular-template-synthesizer.d.ts +49 -0
  331. package/lib/dist/resolution/angular-template-synthesizer.d.ts.map +1 -0
  332. package/lib/dist/resolution/angular-template-synthesizer.js +359 -0
  333. package/lib/dist/resolution/angular-template-synthesizer.js.map +1 -0
  334. package/lib/dist/resolution/callback-synthesizer.d.ts +23 -1
  335. package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
  336. package/lib/dist/resolution/callback-synthesizer.js +460 -144
  337. package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
  338. package/lib/dist/resolution/cpp-constructor.d.ts +4 -0
  339. package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -0
  340. package/lib/dist/resolution/cpp-constructor.js +123 -0
  341. package/lib/dist/resolution/cpp-constructor.js.map +1 -0
  342. package/lib/dist/resolution/cpp-macro-visibility.d.ts +12 -0
  343. package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -0
  344. package/lib/dist/resolution/cpp-macro-visibility.js +392 -0
  345. package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -0
  346. package/lib/dist/resolution/expo-router-synthesizer.d.ts +32 -0
  347. package/lib/dist/resolution/expo-router-synthesizer.d.ts.map +1 -0
  348. package/lib/dist/resolution/expo-router-synthesizer.js +189 -0
  349. package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -0
  350. package/lib/dist/resolution/frameworks/angular-router.d.ts +142 -0
  351. package/lib/dist/resolution/frameworks/angular-router.d.ts.map +1 -0
  352. package/lib/dist/resolution/frameworks/angular-router.js +1126 -0
  353. package/lib/dist/resolution/frameworks/angular-router.js.map +1 -0
  354. package/lib/dist/resolution/frameworks/astro.d.ts.map +1 -1
  355. package/lib/dist/resolution/frameworks/astro.js +32 -6
  356. package/lib/dist/resolution/frameworks/astro.js.map +1 -1
  357. package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
  358. package/lib/dist/resolution/frameworks/csharp.js +186 -24
  359. package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
  360. package/lib/dist/resolution/frameworks/expo-modules.d.ts +10 -0
  361. package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -1
  362. package/lib/dist/resolution/frameworks/expo-modules.js +95 -1
  363. package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -1
  364. package/lib/dist/resolution/frameworks/expo-router.d.ts +195 -0
  365. package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -0
  366. package/lib/dist/resolution/frameworks/expo-router.js +847 -0
  367. package/lib/dist/resolution/frameworks/expo-router.js.map +1 -0
  368. package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
  369. package/lib/dist/resolution/frameworks/express.js +339 -45
  370. package/lib/dist/resolution/frameworks/express.js.map +1 -1
  371. package/lib/dist/resolution/frameworks/fabric.d.ts.map +1 -1
  372. package/lib/dist/resolution/frameworks/fabric.js +13 -11
  373. package/lib/dist/resolution/frameworks/fabric.js.map +1 -1
  374. package/lib/dist/resolution/frameworks/go.d.ts.map +1 -1
  375. package/lib/dist/resolution/frameworks/go.js +11 -28
  376. package/lib/dist/resolution/frameworks/go.js.map +1 -1
  377. package/lib/dist/resolution/frameworks/index.d.ts +8 -2
  378. package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
  379. package/lib/dist/resolution/frameworks/index.js +39 -1
  380. package/lib/dist/resolution/frameworks/index.js.map +1 -1
  381. package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
  382. package/lib/dist/resolution/frameworks/java.js +88 -68
  383. package/lib/dist/resolution/frameworks/java.js.map +1 -1
  384. package/lib/dist/resolution/frameworks/laravel.d.ts.map +1 -1
  385. package/lib/dist/resolution/frameworks/laravel.js +369 -26
  386. package/lib/dist/resolution/frameworks/laravel.js.map +1 -1
  387. package/lib/dist/resolution/frameworks/name-heuristic.d.ts +35 -0
  388. package/lib/dist/resolution/frameworks/name-heuristic.d.ts.map +1 -0
  389. package/lib/dist/resolution/frameworks/name-heuristic.js +45 -0
  390. package/lib/dist/resolution/frameworks/name-heuristic.js.map +1 -0
  391. package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -1
  392. package/lib/dist/resolution/frameworks/nestjs.js +288 -55
  393. package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
  394. package/lib/dist/resolution/frameworks/nextjs.d.ts +76 -0
  395. package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -0
  396. package/lib/dist/resolution/frameworks/nextjs.js +329 -0
  397. package/lib/dist/resolution/frameworks/nextjs.js.map +1 -0
  398. package/lib/dist/resolution/frameworks/object-literal.d.ts +32 -0
  399. package/lib/dist/resolution/frameworks/object-literal.d.ts.map +1 -0
  400. package/lib/dist/resolution/frameworks/object-literal.js +139 -0
  401. package/lib/dist/resolution/frameworks/object-literal.js.map +1 -0
  402. package/lib/dist/resolution/frameworks/package-deps.d.ts +14 -0
  403. package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -0
  404. package/lib/dist/resolution/frameworks/package-deps.js +78 -0
  405. package/lib/dist/resolution/frameworks/package-deps.js.map +1 -0
  406. package/lib/dist/resolution/frameworks/page-component.d.ts +20 -0
  407. package/lib/dist/resolution/frameworks/page-component.d.ts.map +1 -0
  408. package/lib/dist/resolution/frameworks/page-component.js +45 -0
  409. package/lib/dist/resolution/frameworks/page-component.js.map +1 -0
  410. package/lib/dist/resolution/frameworks/play.d.ts.map +1 -1
  411. package/lib/dist/resolution/frameworks/play.js +3 -1
  412. package/lib/dist/resolution/frameworks/play.js.map +1 -1
  413. package/lib/dist/resolution/frameworks/python.d.ts.map +1 -1
  414. package/lib/dist/resolution/frameworks/python.js +279 -26
  415. package/lib/dist/resolution/frameworks/python.js.map +1 -1
  416. package/lib/dist/resolution/frameworks/react-native.d.ts +26 -0
  417. package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
  418. package/lib/dist/resolution/frameworks/react-native.js +153 -14
  419. package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
  420. package/lib/dist/resolution/frameworks/react-router.d.ts +47 -0
  421. package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -0
  422. package/lib/dist/resolution/frameworks/react-router.js +201 -0
  423. package/lib/dist/resolution/frameworks/react-router.js.map +1 -0
  424. package/lib/dist/resolution/frameworks/react.d.ts +13 -2
  425. package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
  426. package/lib/dist/resolution/frameworks/react.js +542 -144
  427. package/lib/dist/resolution/frameworks/react.js.map +1 -1
  428. package/lib/dist/resolution/frameworks/ruby.d.ts.map +1 -1
  429. package/lib/dist/resolution/frameworks/ruby.js +177 -17
  430. package/lib/dist/resolution/frameworks/ruby.js.map +1 -1
  431. package/lib/dist/resolution/frameworks/rust.d.ts.map +1 -1
  432. package/lib/dist/resolution/frameworks/rust.js +24 -22
  433. package/lib/dist/resolution/frameworks/rust.js.map +1 -1
  434. package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
  435. package/lib/dist/resolution/frameworks/svelte.js +14 -6
  436. package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
  437. package/lib/dist/resolution/frameworks/sveltekit-router.d.ts +36 -0
  438. package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -0
  439. package/lib/dist/resolution/frameworks/sveltekit-router.js +156 -0
  440. package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -0
  441. package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -1
  442. package/lib/dist/resolution/frameworks/swift.js +253 -124
  443. package/lib/dist/resolution/frameworks/swift.js.map +1 -1
  444. package/lib/dist/resolution/frameworks/tanstack-router.d.ts +84 -0
  445. package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -0
  446. package/lib/dist/resolution/frameworks/tanstack-router.js +437 -0
  447. package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -0
  448. package/lib/dist/resolution/frameworks/vue-router.d.ts +98 -0
  449. package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -0
  450. package/lib/dist/resolution/frameworks/vue-router.js +500 -0
  451. package/lib/dist/resolution/frameworks/vue-router.js.map +1 -0
  452. package/lib/dist/resolution/frameworks/vue.d.ts +9 -2
  453. package/lib/dist/resolution/frameworks/vue.d.ts.map +1 -1
  454. package/lib/dist/resolution/frameworks/vue.js +45 -11
  455. package/lib/dist/resolution/frameworks/vue.js.map +1 -1
  456. package/lib/dist/resolution/import-resolver.d.ts +66 -0
  457. package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
  458. package/lib/dist/resolution/import-resolver.js +643 -61
  459. package/lib/dist/resolution/import-resolver.js.map +1 -1
  460. package/lib/dist/resolution/index.d.ts +124 -25
  461. package/lib/dist/resolution/index.d.ts.map +1 -1
  462. package/lib/dist/resolution/index.js +769 -152
  463. package/lib/dist/resolution/index.js.map +1 -1
  464. package/lib/dist/resolution/js-builtins.d.ts +13 -0
  465. package/lib/dist/resolution/js-builtins.d.ts.map +1 -0
  466. package/lib/dist/resolution/js-builtins.js +48 -0
  467. package/lib/dist/resolution/js-builtins.js.map +1 -0
  468. package/lib/dist/resolution/name-matcher.d.ts +101 -22
  469. package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
  470. package/lib/dist/resolution/name-matcher.js +8267 -287
  471. package/lib/dist/resolution/name-matcher.js.map +1 -1
  472. package/lib/dist/resolution/next-router-synthesizer.d.ts +27 -0
  473. package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -0
  474. package/lib/dist/resolution/next-router-synthesizer.js +113 -0
  475. package/lib/dist/resolution/next-router-synthesizer.js.map +1 -0
  476. package/lib/dist/resolution/react-router-synthesizer.d.ts +35 -0
  477. package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -0
  478. package/lib/dist/resolution/react-router-synthesizer.js +197 -0
  479. package/lib/dist/resolution/react-router-synthesizer.js.map +1 -0
  480. package/lib/dist/resolution/resolver-pool.d.ts +22 -1
  481. package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
  482. package/lib/dist/resolution/resolver-pool.js +35 -5
  483. package/lib/dist/resolution/resolver-pool.js.map +1 -1
  484. package/lib/dist/resolution/resolver-worker.js +3 -0
  485. package/lib/dist/resolution/resolver-worker.js.map +1 -1
  486. package/lib/dist/resolution/strip-comments.d.ts +6 -0
  487. package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
  488. package/lib/dist/resolution/strip-comments.js +58 -0
  489. package/lib/dist/resolution/strip-comments.js.map +1 -1
  490. package/lib/dist/resolution/sveltekit-synthesizer.d.ts +58 -0
  491. package/lib/dist/resolution/sveltekit-synthesizer.d.ts.map +1 -0
  492. package/lib/dist/resolution/sveltekit-synthesizer.js +173 -0
  493. package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -0
  494. package/lib/dist/resolution/swift-type-visibility.d.ts +68 -0
  495. package/lib/dist/resolution/swift-type-visibility.d.ts.map +1 -0
  496. package/lib/dist/resolution/swift-type-visibility.js +454 -0
  497. package/lib/dist/resolution/swift-type-visibility.js.map +1 -0
  498. package/lib/dist/resolution/synth-utils.d.ts +26 -0
  499. package/lib/dist/resolution/synth-utils.d.ts.map +1 -0
  500. package/lib/dist/resolution/synth-utils.js +75 -0
  501. package/lib/dist/resolution/synth-utils.js.map +1 -0
  502. package/lib/dist/resolution/tanstack-router-synthesizer.d.ts +31 -0
  503. package/lib/dist/resolution/tanstack-router-synthesizer.d.ts.map +1 -0
  504. package/lib/dist/resolution/tanstack-router-synthesizer.js +114 -0
  505. package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -0
  506. package/lib/dist/resolution/tier-synthesizer.d.ts +54 -0
  507. package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -0
  508. package/lib/dist/resolution/tier-synthesizer.js +1294 -0
  509. package/lib/dist/resolution/tier-synthesizer.js.map +1 -0
  510. package/lib/dist/resolution/type-parameters.d.ts +11 -0
  511. package/lib/dist/resolution/type-parameters.d.ts.map +1 -0
  512. package/lib/dist/resolution/type-parameters.js +287 -0
  513. package/lib/dist/resolution/type-parameters.js.map +1 -0
  514. package/lib/dist/resolution/types.d.ts +105 -2
  515. package/lib/dist/resolution/types.d.ts.map +1 -1
  516. package/lib/dist/resolution/types.js +64 -0
  517. package/lib/dist/resolution/types.js.map +1 -1
  518. package/lib/dist/resolution/vue-router-synthesizer.d.ts +30 -0
  519. package/lib/dist/resolution/vue-router-synthesizer.d.ts.map +1 -0
  520. package/lib/dist/resolution/vue-router-synthesizer.js +115 -0
  521. package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -0
  522. package/lib/dist/search/query-paths.d.ts +50 -1
  523. package/lib/dist/search/query-paths.d.ts.map +1 -1
  524. package/lib/dist/search/query-paths.js +227 -12
  525. package/lib/dist/search/query-paths.js.map +1 -1
  526. package/lib/dist/search/query-utils.d.ts +15 -0
  527. package/lib/dist/search/query-utils.d.ts.map +1 -1
  528. package/lib/dist/search/query-utils.js +35 -7
  529. package/lib/dist/search/query-utils.js.map +1 -1
  530. package/lib/dist/sync/watch-policy.d.ts +14 -0
  531. package/lib/dist/sync/watch-policy.d.ts.map +1 -1
  532. package/lib/dist/sync/watch-policy.js +19 -0
  533. package/lib/dist/sync/watch-policy.js.map +1 -1
  534. package/lib/dist/sync/watcher.d.ts +52 -35
  535. package/lib/dist/sync/watcher.d.ts.map +1 -1
  536. package/lib/dist/sync/watcher.js +236 -100
  537. package/lib/dist/sync/watcher.js.map +1 -1
  538. package/lib/dist/sync/worktree.d.ts +22 -0
  539. package/lib/dist/sync/worktree.d.ts.map +1 -1
  540. package/lib/dist/sync/worktree.js +54 -0
  541. package/lib/dist/sync/worktree.js.map +1 -1
  542. package/lib/dist/telemetry/index.d.ts +4 -2
  543. package/lib/dist/telemetry/index.d.ts.map +1 -1
  544. package/lib/dist/telemetry/index.js +159 -66
  545. package/lib/dist/telemetry/index.js.map +1 -1
  546. package/lib/dist/types.d.ts +1 -1
  547. package/lib/dist/types.d.ts.map +1 -1
  548. package/lib/dist/types.js +1 -0
  549. package/lib/dist/types.js.map +1 -1
  550. package/lib/dist/ui-server/api/deadcode.d.ts +84 -0
  551. package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -0
  552. package/lib/dist/ui-server/api/deadcode.js +136 -0
  553. package/lib/dist/ui-server/api/deadcode.js.map +1 -0
  554. package/lib/dist/ui-server/api/effects.d.ts +94 -0
  555. package/lib/dist/ui-server/api/effects.d.ts.map +1 -0
  556. package/lib/dist/ui-server/api/effects.js +527 -0
  557. package/lib/dist/ui-server/api/effects.js.map +1 -0
  558. package/lib/dist/ui-server/api/entrypoints.d.ts +92 -0
  559. package/lib/dist/ui-server/api/entrypoints.d.ts.map +1 -0
  560. package/lib/dist/ui-server/api/entrypoints.js +364 -0
  561. package/lib/dist/ui-server/api/entrypoints.js.map +1 -0
  562. package/lib/dist/ui-server/api/events.d.ts +183 -0
  563. package/lib/dist/ui-server/api/events.d.ts.map +1 -0
  564. package/lib/dist/ui-server/api/events.js +430 -0
  565. package/lib/dist/ui-server/api/events.js.map +1 -0
  566. package/lib/dist/ui-server/api/file.d.ts +66 -0
  567. package/lib/dist/ui-server/api/file.d.ts.map +1 -0
  568. package/lib/dist/ui-server/api/file.js +235 -0
  569. package/lib/dist/ui-server/api/file.js.map +1 -0
  570. package/lib/dist/ui-server/api/filecode.d.ts +126 -0
  571. package/lib/dist/ui-server/api/filecode.d.ts.map +1 -0
  572. package/lib/dist/ui-server/api/filecode.js +205 -0
  573. package/lib/dist/ui-server/api/filecode.js.map +1 -0
  574. package/lib/dist/ui-server/api/flow.d.ts +226 -0
  575. package/lib/dist/ui-server/api/flow.d.ts.map +1 -0
  576. package/lib/dist/ui-server/api/flow.js +612 -0
  577. package/lib/dist/ui-server/api/flow.js.map +1 -0
  578. package/lib/dist/ui-server/api/hierarchy.d.ts +81 -0
  579. package/lib/dist/ui-server/api/hierarchy.d.ts.map +1 -0
  580. package/lib/dist/ui-server/api/hierarchy.js +92 -0
  581. package/lib/dist/ui-server/api/hierarchy.js.map +1 -0
  582. package/lib/dist/ui-server/api/index.d.ts +90 -0
  583. package/lib/dist/ui-server/api/index.d.ts.map +1 -0
  584. package/lib/dist/ui-server/api/index.js +332 -0
  585. package/lib/dist/ui-server/api/index.js.map +1 -0
  586. package/lib/dist/ui-server/api/map.d.ts +273 -0
  587. package/lib/dist/ui-server/api/map.d.ts.map +1 -0
  588. package/lib/dist/ui-server/api/map.js +781 -0
  589. package/lib/dist/ui-server/api/map.js.map +1 -0
  590. package/lib/dist/ui-server/api/node.d.ts +81 -0
  591. package/lib/dist/ui-server/api/node.d.ts.map +1 -0
  592. package/lib/dist/ui-server/api/node.js +394 -0
  593. package/lib/dist/ui-server/api/node.js.map +1 -0
  594. package/lib/dist/ui-server/api/nodes.d.ts +25 -0
  595. package/lib/dist/ui-server/api/nodes.d.ts.map +1 -0
  596. package/lib/dist/ui-server/api/nodes.js +45 -0
  597. package/lib/dist/ui-server/api/nodes.js.map +1 -0
  598. package/lib/dist/ui-server/api/program.d.ts +139 -0
  599. package/lib/dist/ui-server/api/program.d.ts.map +1 -0
  600. package/lib/dist/ui-server/api/program.js +315 -0
  601. package/lib/dist/ui-server/api/program.js.map +1 -0
  602. package/lib/dist/ui-server/api/respond.d.ts +76 -0
  603. package/lib/dist/ui-server/api/respond.d.ts.map +1 -0
  604. package/lib/dist/ui-server/api/respond.js +186 -0
  605. package/lib/dist/ui-server/api/respond.js.map +1 -0
  606. package/lib/dist/ui-server/api/route-roots.d.ts +45 -0
  607. package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -0
  608. package/lib/dist/ui-server/api/route-roots.js +117 -0
  609. package/lib/dist/ui-server/api/route-roots.js.map +1 -0
  610. package/lib/dist/ui-server/api/routes.d.ts +61 -0
  611. package/lib/dist/ui-server/api/routes.d.ts.map +1 -0
  612. package/lib/dist/ui-server/api/routes.js +164 -0
  613. package/lib/dist/ui-server/api/routes.js.map +1 -0
  614. package/lib/dist/ui-server/api/screens.d.ts +117 -0
  615. package/lib/dist/ui-server/api/screens.d.ts.map +1 -0
  616. package/lib/dist/ui-server/api/screens.js +626 -0
  617. package/lib/dist/ui-server/api/screens.js.map +1 -0
  618. package/lib/dist/ui-server/api/search.d.ts +29 -0
  619. package/lib/dist/ui-server/api/search.d.ts.map +1 -0
  620. package/lib/dist/ui-server/api/search.js +232 -0
  621. package/lib/dist/ui-server/api/search.js.map +1 -0
  622. package/lib/dist/ui-server/api/session.d.ts +52 -0
  623. package/lib/dist/ui-server/api/session.d.ts.map +1 -0
  624. package/lib/dist/ui-server/api/session.js +196 -0
  625. package/lib/dist/ui-server/api/session.js.map +1 -0
  626. package/lib/dist/ui-server/api/source.d.ts +200 -0
  627. package/lib/dist/ui-server/api/source.d.ts.map +1 -0
  628. package/lib/dist/ui-server/api/source.js +422 -0
  629. package/lib/dist/ui-server/api/source.js.map +1 -0
  630. package/lib/dist/ui-server/api/stats.d.ts +27 -0
  631. package/lib/dist/ui-server/api/stats.d.ts.map +1 -0
  632. package/lib/dist/ui-server/api/stats.js +164 -0
  633. package/lib/dist/ui-server/api/stats.js.map +1 -0
  634. package/lib/dist/ui-server/api/steps.d.ts +274 -0
  635. package/lib/dist/ui-server/api/steps.d.ts.map +1 -0
  636. package/lib/dist/ui-server/api/steps.js +1554 -0
  637. package/lib/dist/ui-server/api/steps.js.map +1 -0
  638. package/lib/dist/ui-server/api/trail-store.d.ts +142 -0
  639. package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -0
  640. package/lib/dist/ui-server/api/trail-store.js +323 -0
  641. package/lib/dist/ui-server/api/trail-store.js.map +1 -0
  642. package/lib/dist/ui-server/api/trails.d.ts +163 -0
  643. package/lib/dist/ui-server/api/trails.d.ts.map +1 -0
  644. package/lib/dist/ui-server/api/trails.js +370 -0
  645. package/lib/dist/ui-server/api/trails.js.map +1 -0
  646. package/lib/dist/ui-server/api/when.d.ts +133 -0
  647. package/lib/dist/ui-server/api/when.d.ts.map +1 -0
  648. package/lib/dist/ui-server/api/when.js +275 -0
  649. package/lib/dist/ui-server/api/when.js.map +1 -0
  650. package/lib/dist/ui-server/api/wire.d.ts +179 -0
  651. package/lib/dist/ui-server/api/wire.d.ts.map +1 -0
  652. package/lib/dist/ui-server/api/wire.js +231 -0
  653. package/lib/dist/ui-server/api/wire.js.map +1 -0
  654. package/lib/dist/ui-server/assets.d.ts +40 -0
  655. package/lib/dist/ui-server/assets.d.ts.map +1 -0
  656. package/lib/dist/ui-server/assets.js +110 -0
  657. package/lib/dist/ui-server/assets.js.map +1 -0
  658. package/lib/dist/ui-server/constants.d.ts +32 -0
  659. package/lib/dist/ui-server/constants.d.ts.map +1 -0
  660. package/lib/dist/ui-server/constants.js +35 -0
  661. package/lib/dist/ui-server/constants.js.map +1 -0
  662. package/lib/dist/ui-server/highlight/bounded-tokenize.d.ts +28 -0
  663. package/lib/dist/ui-server/highlight/bounded-tokenize.d.ts.map +1 -0
  664. package/lib/dist/ui-server/highlight/bounded-tokenize.js +139 -0
  665. package/lib/dist/ui-server/highlight/bounded-tokenize.js.map +1 -0
  666. package/lib/dist/ui-server/highlight/index.d.ts +113 -0
  667. package/lib/dist/ui-server/highlight/index.d.ts.map +1 -0
  668. package/lib/dist/ui-server/highlight/index.js +312 -0
  669. package/lib/dist/ui-server/highlight/index.js.map +1 -0
  670. package/lib/dist/ui-server/highlight/languages.d.ts +36 -0
  671. package/lib/dist/ui-server/highlight/languages.d.ts.map +1 -0
  672. package/lib/dist/ui-server/highlight/languages.js +50 -0
  673. package/lib/dist/ui-server/highlight/languages.js.map +1 -0
  674. package/lib/dist/ui-server/highlight/tokenize-worker.d.ts +7 -0
  675. package/lib/dist/ui-server/highlight/tokenize-worker.d.ts.map +1 -0
  676. package/lib/dist/ui-server/highlight/tokenize-worker.js +20 -0
  677. package/lib/dist/ui-server/highlight/tokenize-worker.js.map +1 -0
  678. package/lib/dist/ui-server/index.d.ts +92 -0
  679. package/lib/dist/ui-server/index.d.ts.map +1 -0
  680. package/lib/dist/ui-server/index.js +399 -0
  681. package/lib/dist/ui-server/index.js.map +1 -0
  682. package/lib/dist/ui-server/open-browser.d.ts +31 -0
  683. package/lib/dist/ui-server/open-browser.d.ts.map +1 -0
  684. package/lib/dist/ui-server/open-browser.js +79 -0
  685. package/lib/dist/ui-server/open-browser.js.map +1 -0
  686. package/lib/dist/ui-server/security.d.ts +127 -0
  687. package/lib/dist/ui-server/security.d.ts.map +1 -0
  688. package/lib/dist/ui-server/security.js +332 -0
  689. package/lib/dist/ui-server/security.js.map +1 -0
  690. package/lib/dist/ui-server/static.d.ts +45 -0
  691. package/lib/dist/ui-server/static.d.ts.map +1 -0
  692. package/lib/dist/ui-server/static.js +165 -0
  693. package/lib/dist/ui-server/static.js.map +1 -0
  694. package/lib/dist/upgrade/index.d.ts +43 -5
  695. package/lib/dist/upgrade/index.d.ts.map +1 -1
  696. package/lib/dist/upgrade/index.js +157 -35
  697. package/lib/dist/upgrade/index.js.map +1 -1
  698. package/lib/dist/utils.d.ts +14 -2
  699. package/lib/dist/utils.d.ts.map +1 -1
  700. package/lib/dist/utils.js +25 -10
  701. package/lib/dist/utils.js.map +1 -1
  702. package/lib/dist/viewer/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 +0 -0
  703. package/lib/dist/viewer/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 +0 -0
  704. package/lib/dist/viewer/assets/archivo-vietnamese-wght-normal-XAtsl5Q_.woff2 +0 -0
  705. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-2syK4fUT.woff +0 -0
  706. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-CBJ8pzag.woff2 +0 -0
  707. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
  708. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
  709. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
  710. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
  711. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-CTOM6hUh.woff2 +0 -0
  712. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-fLZuRloM.woff +0 -0
  713. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-B4oTjJdl.woff +0 -0
  714. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-CBjNughH.woff2 +0 -0
  715. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
  716. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
  717. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
  718. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
  719. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-9HEixskS.woff +0 -0
  720. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-V-xxqcpd.woff2 +0 -0
  721. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-66oory27.woff +0 -0
  722. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-BqAiT5Ww.woff2 +0 -0
  723. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
  724. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
  725. package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
  726. package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
  727. package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2 +0 -0
  728. package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-DWFSQ4vo.woff +0 -0
  729. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-B7_fu1kp.woff2 +0 -0
  730. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-Bg0ZHwF4.woff +0 -0
  731. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
  732. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
  733. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
  734. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
  735. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-D38SheWl.woff2 +0 -0
  736. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-DmB0ttJJ.woff +0 -0
  737. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-D6eaYXMU.woff +0 -0
  738. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-DRuN92E5.woff2 +0 -0
  739. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
  740. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
  741. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
  742. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
  743. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-D2EvbN8M.woff2 +0 -0
  744. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-iLQfcSjf.woff +0 -0
  745. package/lib/dist/viewer/assets/index-BSGpxBr9.js +99 -0
  746. package/lib/dist/viewer/assets/index-CF9yvio6.css +1 -0
  747. package/lib/dist/viewer/index.html +16 -0
  748. package/lib/dist/worker-teardown.d.ts +48 -0
  749. package/lib/dist/worker-teardown.d.ts.map +1 -0
  750. package/lib/dist/worker-teardown.js +100 -0
  751. package/lib/dist/worker-teardown.js.map +1 -0
  752. package/lib/kernel/codegraph-kernel.node +2 -2
  753. package/lib/node_modules/.package-lock.json +4 -4
  754. package/lib/node_modules/picomatch/README.md +56 -51
  755. package/lib/node_modules/picomatch/lib/constants.js +4 -0
  756. package/lib/node_modules/picomatch/lib/parse.js +341 -1
  757. package/lib/node_modules/picomatch/lib/picomatch.js +25 -5
  758. package/lib/node_modules/picomatch/lib/scan.js +30 -18
  759. package/lib/node_modules/picomatch/package.json +4 -4
  760. package/lib/package.json +9 -2
  761. package/package.json +1 -1
@@ -41,6 +41,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
41
41
  exports.isNixPathImportRef = isNixPathImportRef;
42
42
  exports.clearImportResolverMemos = clearImportResolverMemos;
43
43
  exports.resolveImportPath = resolveImportPath;
44
+ exports.isExternalImport = isExternalImport;
44
45
  exports.clearCppIncludeDirCache = clearCppIncludeDirCache;
45
46
  exports.loadCppIncludeDirs = loadCppIncludeDirs;
46
47
  exports.isPhpIncludePathRef = isPhpIncludePathRef;
@@ -49,11 +50,17 @@ exports.extractImportMappings = extractImportMappings;
49
50
  exports.clearImportMappingCache = clearImportMappingCache;
50
51
  exports.extractReExports = extractReExports;
51
52
  exports.resolveJvmImport = resolveJvmImport;
53
+ exports.resolvePhpImportedStaticCall = resolvePhpImportedStaticCall;
54
+ exports.isJsPathImportRef = isJsPathImportRef;
55
+ exports.resolvePhpQualifiedClassRef = resolvePhpQualifiedClassRef;
52
56
  exports.resolveViaImport = resolveViaImport;
57
+ exports.isBoundToOutOfRepoImport = isBoundToOutOfRepoImport;
53
58
  const fs = __importStar(require("fs"));
54
59
  const path = __importStar(require("path"));
55
60
  const path_aliases_1 = require("./path-aliases");
61
+ const alias_binding_1 = require("./alias-binding");
56
62
  const workspace_packages_1 = require("./workspace-packages");
63
+ const strip_comments_1 = require("./strip-comments");
57
64
  const name_matcher_1 = require("./name-matcher");
58
65
  /**
59
66
  * Extension resolution order by language
@@ -102,7 +109,38 @@ function isNixPathImportRef(ref) {
102
109
  // there, so the staleness discipline matches the resolver's own caches.
103
110
  const importPathMemos = new WeakMap();
104
111
  const exportedSymbolMemos = new WeakMap();
112
+ const DEFAULT_BINDING_KINDS = new Set(['function', 'class', 'component', 'constant', 'variable']);
113
+ const DEFAULT_EXPORT_BINDING_RE = /^[ \t]*export\s+default\s+([A-Za-z_$][\w$]*)\s*;?[ \t]*$/m;
114
+ const JS_FAMILY_FILE = /\.(?:[cm]?[jt]sx?)$/;
115
+ /** The identifier `export default NAME` names in a JS-family file, or null. */
116
+ function defaultExportBinding(filePath, context) {
117
+ if (!JS_FAMILY_FILE.test(filePath))
118
+ return null;
119
+ const source = context.readFile(filePath);
120
+ if (!source || !source.includes('export default'))
121
+ return null;
122
+ return source.match(DEFAULT_EXPORT_BINDING_RE)?.[1] ?? null;
123
+ }
105
124
  const fileExportIndexes = new WeakMap();
125
+ /**
126
+ * `module.exports = …` (also `exports = module.exports = …`): the name it
127
+ * binds (`createApplication`, `function name(`, `class Name`) or the module
128
+ * it forwards (`require('./lib/express')`), or null.
129
+ */
130
+ const COMMONJS_DEFAULT_EXPORT = /^[ \t]*(?:exports\s*=\s*)?module\.exports\s*=\s*(?:exports\s*=\s*)?(?:require\(\s*['"]([^'"]+)['"]\s*\)\s*;?[ \t]*$|(?:async\s+)?function\s*\*?\s*([A-Za-z_$][\w$]*)\s*\(|class\s+([A-Za-z_$][\w$]*)|([A-Za-z_$][\w$]*)\s*;?[ \t]*$)/m;
131
+ function commonJsDefaultExport(filePath, context) {
132
+ if (!JS_FAMILY_FILE.test(filePath))
133
+ return null;
134
+ if (context.fileContains && !context.fileContains(filePath, 'module.exports'))
135
+ return null;
136
+ const source = context.readFile(filePath);
137
+ if (!source || !source.includes('module.exports'))
138
+ return null;
139
+ const m = COMMONJS_DEFAULT_EXPORT.exec(source);
140
+ if (!m)
141
+ return null;
142
+ return m[1] ? { source: m[1] } : { name: m[2] ?? m[3] ?? m[4] };
143
+ }
106
144
  function getFileExportIndex(filePath, context) {
107
145
  let perFile = fileExportIndexes.get(context);
108
146
  if (!perFile) {
@@ -112,9 +150,8 @@ function getFileExportIndex(filePath, context) {
112
150
  let idx = perFile.get(filePath);
113
151
  if (!idx) {
114
152
  idx = { byName: new Map(), defaultComponent: undefined, defaultFnClass: undefined };
115
- for (const n of context.getNodesInFile(filePath)) {
116
- if (!n.isExported)
117
- continue;
153
+ const exported = context.getExportedNodesInFile?.(filePath) ?? context.getNodesInFile(filePath).filter((n) => n.isExported);
154
+ for (const n of exported) {
118
155
  if (!idx.byName.has(n.name))
119
156
  idx.byName.set(n.name, n);
120
157
  if (idx.defaultComponent === undefined && n.kind === 'component')
@@ -126,6 +163,47 @@ function getFileExportIndex(filePath, context) {
126
163
  }
127
164
  return idx;
128
165
  }
166
+ /** The file's nodes named `name`, in `getNodesInFile` order. */
167
+ function nodesInFileNamed(filePath, name, context) {
168
+ return context.getNodesInFileNamed?.(filePath, name) ?? context.getNodesInFile(filePath).filter((n) => n.name === name);
169
+ }
170
+ /** The declaration `export default NAME` names in this file (see FileExportIndex.defaultBinding). */
171
+ function defaultExportBindingNode(filePath, idx, context) {
172
+ if (idx.defaultBinding === undefined) {
173
+ const bound = defaultExportBinding(filePath, context);
174
+ idx.defaultBinding =
175
+ bound === null
176
+ ? null
177
+ : (nodesInFileNamed(filePath, bound, context)
178
+ .filter((n) => DEFAULT_BINDING_KINDS.has(n.kind))
179
+ .sort((a, b) => a.startLine - b.startLine || a.startColumn - b.startColumn)[0] ?? null);
180
+ }
181
+ return idx.defaultBinding ?? undefined;
182
+ }
183
+ /** What this file exports as `name`: an exported declaration, else a local export clause's binding. */
184
+ function exportedByName(filePath, idx, name, context) {
185
+ const direct = idx.byName.get(name);
186
+ if (direct)
187
+ return direct;
188
+ if (idx.clauseAliases === undefined) {
189
+ // Bind names introduced by a local export clause to their declarations, so
190
+ // an importer asking for the renamed name gets the real symbol instead of
191
+ // falling through to the name-matcher (which cannot cross the rename).
192
+ // The declaration is the file's first node of that name, exported or not.
193
+ idx.clauseAliases = new Map();
194
+ const content = context.readFile(filePath);
195
+ if (content && content.includes('export')) {
196
+ for (const { exportedName, localName } of (0, alias_binding_1.extractLocalExportAliases)(content)) {
197
+ if (idx.byName.has(exportedName) || idx.clauseAliases.has(exportedName))
198
+ continue;
199
+ const decl = nodesInFileNamed(filePath, localName, context)[0];
200
+ if (decl)
201
+ idx.clauseAliases.set(exportedName, decl);
202
+ }
203
+ }
204
+ }
205
+ return idx.clauseAliases.get(name);
206
+ }
129
207
  /** Drop the per-context memo tables (see ReferenceResolver.clearCaches). */
130
208
  function clearImportResolverMemos(context) {
131
209
  importPathMemos.delete(context);
@@ -133,6 +211,8 @@ function clearImportResolverMemos(context) {
133
211
  fileExportIndexes.delete(context);
134
212
  luaFileBasenameIndexes.delete(context);
135
213
  cobolCopybookIndexes.delete(context);
214
+ pythonModuleFileMemos.delete(context);
215
+ PY_MODULE_SYMBOLS.delete(context);
136
216
  }
137
217
  function resolveImportPath(importPath, fromFile, language, context) {
138
218
  let memo = importPathMemos.get(context);
@@ -170,7 +250,7 @@ function resolveImportPathUncached(importPath, fromFile, language, context) {
170
250
  return resolveRelativeImport(importPath, fromDir, language, context);
171
251
  }
172
252
  // Handle absolute/aliased imports (like @/ or src/)
173
- const aliased = resolveAliasedImport(importPath, projectRoot, language, context);
253
+ const aliased = resolveAliasedImport(importPath, projectRoot, language, context, fromFile);
174
254
  if (aliased)
175
255
  return aliased;
176
256
  // C/C++ include directory search: when neither relative nor aliased
@@ -292,6 +372,19 @@ const C_CPP_STDLIB_HEADERS = new Set([
292
372
  'unordered_set', 'utility', 'valarray', 'variant', 'vector',
293
373
  'version',
294
374
  ]);
375
+ /**
376
+ * Languages whose imports are ES-module specifiers, extracted by
377
+ * `extractJSImports` and therefore classified by the same bare-specifier /
378
+ * alias / workspace rules. Svelte, Vue and Astro belong here: an SFC imports
379
+ * inside its `<script>` block (Astro: the `---` frontmatter) with exactly the
380
+ * same syntax, and leaving them out made `isExternalImport` answer "not
381
+ * external" for every npm specifier in an SFC.
382
+ */
383
+ const ESM_IMPORT_LANGUAGES = new Set([
384
+ 'typescript', 'tsx', 'javascript', 'jsx', 'arkts', 'svelte', 'vue', 'astro',
385
+ ]);
386
+ /** Rust path roots that always name a standard-library crate. */
387
+ const RUST_STDLIB_ROOTS = new Set(['std', 'core', 'alloc', 'proc_macro']);
295
388
  /**
296
389
  * Check if an import is external (npm package, etc.)
297
390
  *
@@ -314,7 +407,7 @@ function isExternalImport(importPath, language, context) {
314
407
  return false;
315
408
  }
316
409
  // Common external patterns
317
- if (language === 'typescript' || language === 'javascript' || language === 'tsx' || language === 'jsx' || language === 'arkts') {
410
+ if (ESM_IMPORT_LANGUAGES.has(language)) {
318
411
  // Node built-ins
319
412
  if (['fs', 'path', 'os', 'crypto', 'http', 'https', 'url', 'util', 'events', 'stream', 'child_process', 'buffer'].includes(importPath)) {
320
413
  return true;
@@ -401,9 +494,11 @@ function resolveRelativeImport(importPath, fromDir, language, context) {
401
494
  // Try the path as-is first
402
495
  const basePath = path.resolve(fromDir, importPath);
403
496
  const relativePath = path.relative(projectRoot, basePath).replace(/\\/g, '/');
404
- // Try each extension
497
+ // Try each extension. `require('..')` up to the project root is its `index.js`.
405
498
  for (const ext of extensions) {
406
- const candidatePath = relativePath + ext;
499
+ if (relativePath === '' && !ext.startsWith('/'))
500
+ continue;
501
+ const candidatePath = relativePath === '' ? ext.slice(1) : relativePath + ext;
407
502
  if (context.fileExists(candidatePath)) {
408
503
  return candidatePath;
409
504
  }
@@ -412,8 +507,44 @@ function resolveRelativeImport(importPath, fromDir, language, context) {
412
507
  if (context.fileExists(relativePath)) {
413
508
  return relativePath;
414
509
  }
510
+ return findSourceForEmittedSpecifier(relativePath, language, context);
511
+ }
512
+ /**
513
+ * TypeScript under `moduleResolution: node16 | nodenext | bundler` writes the
514
+ * EMITTED extension in the specifier (`import x from './util.js'` for
515
+ * `util.ts`, `.mjs` for `.mts`, `.cjs` for `.cts`), and the source file with that
516
+ * exact name never exists in the repo. Without this remap the import resolver
517
+ * returned null for every such import, so each imported name fell through to
518
+ * bare-name matching: a method wrapping the same-named helper it imports
519
+ * (`renderDockStyles() { return renderDockStyles() }`) resolved to ITSELF, and
520
+ * any repo-wide same-named symbol could win the cross-module edge.
521
+ */
522
+ const EMITTED_TO_SOURCE_EXTENSIONS = [
523
+ [/\.js$/, ['.ts', '.tsx', '.d.ts']],
524
+ [/\.jsx$/, ['.tsx']],
525
+ [/\.mjs$/, ['.mts', '.d.mts']],
526
+ [/\.cjs$/, ['.cts', '.d.cts']],
527
+ ];
528
+ function findSourceForEmittedSpecifier(relativePath, language, context) {
529
+ if (!EMITTED_SPECIFIER_LANGUAGES.has(language))
530
+ return null;
531
+ for (const [emitted, sources] of EMITTED_TO_SOURCE_EXTENSIONS) {
532
+ if (!emitted.test(relativePath))
533
+ continue;
534
+ const stem = relativePath.replace(emitted, '');
535
+ for (const ext of sources) {
536
+ const candidate = stem + ext;
537
+ if (context.fileExists(candidate))
538
+ return candidate;
539
+ }
540
+ return null;
541
+ }
415
542
  return null;
416
543
  }
544
+ /** Languages whose import specifiers can name the emitted `.js` of a `.ts` source. */
545
+ const EMITTED_SPECIFIER_LANGUAGES = new Set([
546
+ 'typescript', 'tsx', 'javascript', 'jsx', 'vue', 'svelte', 'astro', 'arkts',
547
+ ]);
417
548
  /**
418
549
  * Resolve an aliased/absolute import.
419
550
  *
@@ -425,7 +556,7 @@ function resolveRelativeImport(importPath, fromDir, language, context) {
425
556
  * for projects that have aliases but no tsconfig paths block.
426
557
  * 3. Direct path lookup (with extensions).
427
558
  */
428
- function resolveAliasedImport(importPath, projectRoot, language, context) {
559
+ function resolveAliasedImport(importPath, projectRoot, language, context, fromFile) {
429
560
  const extensions = EXTENSION_RESOLUTION[language] || [];
430
561
  const tryWithExt = (basePath) => {
431
562
  for (const ext of extensions) {
@@ -435,11 +566,15 @@ function resolveAliasedImport(importPath, projectRoot, language, context) {
435
566
  }
436
567
  if (context.fileExists(basePath))
437
568
  return basePath;
438
- return null;
569
+ return findSourceForEmittedSpecifier(basePath, language, context);
439
570
  };
440
- // 1. Project tsconfig/jsconfig paths.
441
- const aliasMap = context.getProjectAliases?.();
442
- if (aliasMap) {
571
+ // 1. tsconfig/jsconfig paths: the config nearest the importing file (an
572
+ // app of a monorepo keeps its own `@/*`), then the project root's.
573
+ const nearest = fromFile ? context.getNearestAliases?.(fromFile) : null;
574
+ const rootMap = context.getProjectAliases?.();
575
+ for (const aliasMap of nearest && nearest !== rootMap ? [nearest, rootMap] : [rootMap]) {
576
+ if (!aliasMap)
577
+ continue;
443
578
  const candidates = (0, path_aliases_1.applyAliases)(importPath, aliasMap, projectRoot);
444
579
  for (const c of candidates) {
445
580
  const hit = tryWithExt(c);
@@ -752,7 +887,7 @@ function extractImportMappings(_filePath, content, language) {
752
887
  mappings.push(...extractJSImports(content));
753
888
  }
754
889
  else if (language === 'python') {
755
- mappings.push(...extractPythonImports(content));
890
+ mappings.push(...extractPythonImports((0, strip_comments_1.stripCommentsForRegex)(content, 'python')));
756
891
  }
757
892
  else if (language === 'go') {
758
893
  mappings.push(...extractGoImports(content));
@@ -773,8 +908,11 @@ function extractImportMappings(_filePath, content, language) {
773
908
  */
774
909
  function extractJSImports(content) {
775
910
  const mappings = [];
776
- // ES6 imports
777
- const importRegex = /import\s+(?:(\w+)\s*,?\s*)?(?:\{([^}]+)\})?\s*(?:(\*)\s+as\s+(\w+))?\s*from\s*['"]([^'"]+)['"]/g;
911
+ // ES6 imports. `import type { X }` / `import type * as ns` is TypeScript's
912
+ // type-only form, not a default import named `type` — which every such
913
+ // line used to add, making `type.innerType()` a call on an import.
914
+ // (`import type from './x'` still binds `type`: backtracking gives it back.)
915
+ const importRegex = /import\s+(?:type\s+(?=[{*]|(?!from\b)\w))?(?:(\w+)\s*,?\s*)?(?:\{([^}]+)\})?\s*(?:(\*)\s+as\s+(\w+))?\s*from\s*['"]([^'"]+)['"]/g;
778
916
  let match;
779
917
  while ((match = importRegex.exec(content)) !== null) {
780
918
  const [, defaultImport, namedImports, star, namespaceAlias, source] = match;
@@ -790,7 +928,8 @@ function extractJSImports(content) {
790
928
  }
791
929
  // Named imports
792
930
  if (namedImports) {
793
- const names = namedImports.split(',').map((s) => s.trim());
931
+ // `{ util, type objectUtil }`: an inline `type` modifier is not part of the name.
932
+ const names = namedImports.split(',').map((s) => s.trim().replace(/^type\s+(?=\w)/, ''));
794
933
  for (const name of names) {
795
934
  const aliasMatch = name.match(/(\w+)\s+as\s+(\w+)/);
796
935
  if (aliasMatch) {
@@ -824,16 +963,17 @@ function extractJSImports(content) {
824
963
  });
825
964
  }
826
965
  }
827
- // Require statements
828
- const requireRegex = /(?:const|let|var)\s+(?:(\w+)|{([^}]+)})\s*=\s*require\(['"]([^'"]+)['"]\)/g;
966
+ // Require statements — each declarator of a list too (`var express = require('../'),
967
+ // request = require('supertest')`), and a member of the module (`require('./utils').methods`).
968
+ const requireRegex = /(?:\b(?:const|let|var)\s+|,\s*)(?:([A-Za-z_$][\w$]*)|{([^}]+)})\s*=\s*require\(\s*['"]([^'"]+)['"]\s*\)(?:\s*\.\s*([A-Za-z_$][\w$]*))?/g;
829
969
  while ((match = requireRegex.exec(content)) !== null) {
830
- const [, defaultName, destructured, source] = match;
970
+ const [, defaultName, destructured, source, member] = match;
831
971
  if (defaultName) {
832
972
  mappings.push({
833
973
  localName: defaultName,
834
- exportedName: 'default',
974
+ exportedName: member ?? 'default',
835
975
  source: source,
836
- isDefault: true,
976
+ isDefault: member === undefined,
837
977
  isNamespace: false,
838
978
  });
839
979
  }
@@ -869,12 +1009,13 @@ function extractJSImports(content) {
869
1009
  */
870
1010
  function extractPythonImports(content) {
871
1011
  const mappings = [];
872
- // from X import Y
873
- const fromImportRegex = /from\s+([\w.]+)\s+import\s+([^#\n]+)/g;
1012
+ // from X import Y, and the parenthesized form `from X import (\n Y,\n Z,\n)`
1013
+ const fromImportRegex = /from\s+([\w.]+)\s+import\s+(\([^)]*\)|[^#\n]+)/g;
874
1014
  let match;
875
1015
  while ((match = fromImportRegex.exec(content)) !== null) {
876
1016
  const [, source, imports] = match;
877
- const names = imports.split(',').map((s) => s.trim());
1017
+ const names = imports.trim().replace(/^\(|\)$/g, '')
1018
+ .split(',').map((s) => s.trim());
878
1019
  for (const name of names) {
879
1020
  const aliasMatch = name.match(/(\w+)\s+as\s+(\w+)/);
880
1021
  if (aliasMatch) {
@@ -971,8 +1112,8 @@ function extractJavaImports(content) {
971
1112
  const stripped = content
972
1113
  .replace(/\/\*[\s\S]*?\*\//g, '')
973
1114
  .replace(/\/\/[^\n]*/g, '');
974
- // `import [static] <fqn>[.*];`
975
- const re = /^\s*import\s+(static\s+)?([\w.]+(?:\.\*)?)\s*;/gm;
1115
+ // `import [static] <fqn>[.*];` — and Kotlin's `import <fqn> [as Alias]`, with no `;`.
1116
+ const re = /^\s*import\s+(static\s+)?([\w.]+(?:\.\*)?)(?:\s+as\s+([\w]+))?\s*(?:;|$)/gm;
976
1117
  let match;
977
1118
  while ((match = re.exec(stripped)) !== null) {
978
1119
  const fqn = match[2];
@@ -982,12 +1123,12 @@ function extractJavaImports(content) {
982
1123
  if (fqn.endsWith('.*'))
983
1124
  continue;
984
1125
  const parts = fqn.split('.');
985
- const localName = parts[parts.length - 1];
1126
+ const localName = match[3] ?? parts[parts.length - 1];
986
1127
  if (!localName)
987
1128
  continue;
988
1129
  mappings.push({
989
1130
  localName,
990
- exportedName: localName,
1131
+ exportedName: parts[parts.length - 1],
991
1132
  source: fqn,
992
1133
  isDefault: false,
993
1134
  isNamespace: false,
@@ -1136,11 +1277,11 @@ function extractReExports(content, language) {
1136
1277
  // a project that builds export statements as runtime strings is
1137
1278
  // out of scope.)
1138
1279
  const cleaned = stripJsComments(content);
1139
- // Wildcard: `export * from '...'` or `export * as ns from '...'`
1140
- const wildcardRe = /export\s*\*(?:\s+as\s+\w+)?\s*from\s*['"]([^'"]+)['"]/g;
1280
+ // Wildcard: `export * from '...'`; `export * as ns from '...'` exports `ns` alone.
1281
+ const wildcardRe = /export\s*\*(?:\s+as\s+([A-Za-z_$][\w$]*))?\s*from\s*['"]([^'"]+)['"]/g;
1141
1282
  let m;
1142
1283
  while ((m = wildcardRe.exec(cleaned)) !== null) {
1143
- out.push({ kind: 'wildcard', source: m[1] });
1284
+ out.push(m[1] ? { kind: 'namespace', exportedName: m[1], source: m[2] } : { kind: 'wildcard', source: m[2] });
1144
1285
  }
1145
1286
  // Named: `export { a, b as c } from '...'`
1146
1287
  const namedRe = /export\s*\{([^}]+)\}\s*from\s*['"]([^'"]+)['"]/g;
@@ -1216,6 +1357,29 @@ function resolveJvmImport(ref, context) {
1216
1357
  resolvedBy: 'import',
1217
1358
  };
1218
1359
  }
1360
+ /** `Alias` / `Alias.member` through a renaming Kotlin import, by the imported FQN. */
1361
+ function resolveJvmAlias(ref, imports, context) {
1362
+ const dot = ref.referenceName.indexOf('.');
1363
+ const root = dot < 0 ? ref.referenceName : ref.referenceName.slice(0, dot);
1364
+ const imp = imports.find((m) => m.localName === root && m.localName !== m.exportedName);
1365
+ if (!imp)
1366
+ return null;
1367
+ const parts = imp.source.split('.');
1368
+ // The package is some prefix of the FQN; the rest is the type path (`Outer::Inner`).
1369
+ for (let i = parts.length - 1; i > 0; i--) {
1370
+ const target = context.getNodesByQualifiedName(`${parts.slice(0, i).join('.')}::${parts.slice(i).join('::')}`)[0];
1371
+ if (!target)
1372
+ continue;
1373
+ const member = dot < 0 ? null : ref.referenceName.slice(dot + 1);
1374
+ if (member === null)
1375
+ return { original: ref, targetNodeId: target.id, confidence: 0.9, resolvedBy: 'import' };
1376
+ if (member.includes('.'))
1377
+ return null;
1378
+ const found = context.getNodesByQualifiedName(`${target.qualifiedName}::${member}`)[0];
1379
+ return found ? { original: ref, targetNodeId: found.id, confidence: 0.9, resolvedBy: 'import' } : null;
1380
+ }
1381
+ return null;
1382
+ }
1219
1383
  /**
1220
1384
  * Pick the same-FQN candidate closest to `fromPath` by shared directory
1221
1385
  * prefix, preferring an `expect` declaration on a tie. Used to keep a Kotlin
@@ -1248,7 +1412,146 @@ function pickClosestJvmCandidate(candidates, fromPath) {
1248
1412
  }
1249
1413
  return best;
1250
1414
  }
1415
+ /**
1416
+ * PHP scoped calls are encoded as "Alias.method" by both extractors. A use
1417
+ * mapping names a namespace, not a filesystem path, so resolve the receiver
1418
+ * through its localName and look up the method on that exact imported type.
1419
+ * undefined means this is not an imported static call; null means the import
1420
+ * owns the call but its method is unavailable, so name fallbacks must not guess.
1421
+ */
1422
+ function resolvePhpImportedStaticCall(ref, context) {
1423
+ if (ref.language !== 'php' || ref.referenceKind !== 'calls')
1424
+ return undefined;
1425
+ const call = /^(\w+)\.(\w+)$/.exec(ref.referenceName);
1426
+ if (!call)
1427
+ return undefined;
1428
+ const [, receiver, member] = call;
1429
+ const imp = context.getImportMappings(ref.filePath, ref.language)
1430
+ .find((i) => i.localName === receiver);
1431
+ if (!imp)
1432
+ return undefined;
1433
+ // PHP variables occupy a different namespace from class imports. Extraction
1434
+ // strips the leading "$" from "$Alias->method()" too; leave that receiver to
1435
+ // local type inference even when a class import has the same local name.
1436
+ const lines = context.getFileLines?.(ref.filePath) ?? context.readFile(ref.filePath)?.split('\n');
1437
+ const line = lines?.[ref.line - 1];
1438
+ if (line?.slice(ref.column).startsWith('$'))
1439
+ return undefined;
1440
+ const fqn = imp.source.replace(/^\\/, '');
1441
+ const separator = fqn.lastIndexOf('\\');
1442
+ const typeName = separator < 0
1443
+ ? fqn
1444
+ : `${fqn.slice(0, separator)}::${fqn.slice(separator + 1)}`;
1445
+ const owners = context.getNodesByQualifiedName(typeName)
1446
+ .filter((n) => n.language === 'php' && STATIC_MEMBER_CONTAINERS.has(n.kind));
1447
+ if (owners.length !== 1)
1448
+ return null;
1449
+ const owner = owners[0];
1450
+ const methods = context.getNodesByQualifiedName(`${owner.qualifiedName}::${member}`)
1451
+ .filter((n) => n.language === 'php' && n.kind === 'method' && n.filePath === owner.filePath);
1452
+ if (methods.length !== 1)
1453
+ return null;
1454
+ return { original: ref, targetNodeId: methods[0].id, confidence: 0.95, resolvedBy: 'import' };
1455
+ }
1456
+ const JS_MODULE_LANGUAGES = new Set(['javascript', 'jsx', 'typescript', 'tsx', 'arkts']);
1457
+ /**
1458
+ * A module specifier written as a path — relative (`./x`, `../x`), rooted, or
1459
+ * an alias with a folder in it (`@/lib/x`, `~/x`, `$lib/x`) — rather than an
1460
+ * imported binding's name or a bare package (`react`, `lodash`).
1461
+ */
1462
+ function isJsPathSpecifier(name) {
1463
+ return name.startsWith('./') || name.startsWith('../') || name === '.' || name === '..' ||
1464
+ (name.includes('/') && !/\s/.test(name) && !/^@[\w.-]+\/[\w.-]+$/.test(name));
1465
+ }
1466
+ /**
1467
+ * A JS/TS `imports` reference that names a module by path. It names a FILE, not
1468
+ * a symbol, so it skips the resolver's name-exists pre-filter — a CommonJS
1469
+ * `require('./x')` has no import node of that name to pass it.
1470
+ */
1471
+ function isJsPathImportRef(ref) {
1472
+ return ref.referenceKind === 'imports' && JS_MODULE_LANGUAGES.has(ref.language) && isJsPathSpecifier(ref.referenceName);
1473
+ }
1474
+ /** PHP reference kinds whose name is a class name, written as in the source. */
1475
+ const PHP_CLASS_NAME_REFS = new Set(['instantiates', 'extends', 'implements', 'references']);
1476
+ /**
1477
+ * A PHP class name written with a namespace in it (#2256). `use App\Fields as
1478
+ * Field;` aliases a namespace, so `new Field\FirstName()`, `extends Field\Base`
1479
+ * and `Field\FirstName::make()` all name `App\Fields\FirstName`. PHP reads a
1480
+ * qualified name one way: a leading `\` makes it absolute; otherwise a first
1481
+ * segment a `use` imports is replaced by what it imports, and any other name is
1482
+ * relative to the current namespace. Both extractors emit the written name
1483
+ * verbatim, and with no `.` or `::` in it the pre-filter would drop it.
1484
+ * undefined means the ref is not a qualified class name (or names a method the
1485
+ * class inherits); null means it is but no single project class has that name
1486
+ * — it lives outside the project — so name fallbacks must not guess.
1487
+ */
1488
+ function resolvePhpQualifiedClassRef(ref, context) {
1489
+ if (ref.language !== 'php')
1490
+ return undefined;
1491
+ let name = ref.referenceName;
1492
+ let member = null;
1493
+ if (ref.referenceKind === 'calls') {
1494
+ // A static call on the class: `Field\FirstName::make()` is written `Field\FirstName.make`.
1495
+ const call = /^(.*\\[^\\.:]+)(?:\.|::)(\w+)$/.exec(name);
1496
+ if (!call)
1497
+ return undefined;
1498
+ name = call[1];
1499
+ member = call[2];
1500
+ }
1501
+ else if (!PHP_CLASS_NAME_REFS.has(ref.referenceKind)) {
1502
+ return undefined;
1503
+ }
1504
+ const separator = name.indexOf('\\');
1505
+ if (separator < 0)
1506
+ return undefined;
1507
+ let fqn;
1508
+ if (separator === 0) {
1509
+ fqn = name.slice(1);
1510
+ }
1511
+ else {
1512
+ const head = name.slice(0, separator);
1513
+ const imp = context.getImportMappings(ref.filePath, ref.language).find((i) => i.localName === head);
1514
+ if (imp) {
1515
+ fqn = imp.source.replace(/^\\/, '') + name.slice(separator);
1516
+ }
1517
+ else {
1518
+ // `namespace App;` applies until the next namespace statement.
1519
+ const namespace = context.getNodesInFile(ref.filePath)
1520
+ .filter((n) => n.kind === 'namespace' && n.startLine <= ref.line)
1521
+ .sort((a, b) => b.startLine - a.startLine)[0];
1522
+ fqn = namespace ? `${namespace.qualifiedName}\\${name}` : name;
1523
+ }
1524
+ }
1525
+ const cut = fqn.lastIndexOf('\\');
1526
+ const qualifiedName = cut < 0 ? fqn : `${fqn.slice(0, cut)}::${fqn.slice(cut + 1)}`;
1527
+ const classes = context.getNodesByQualifiedName(qualifiedName)
1528
+ .filter((n) => n.language === 'php' && STATIC_MEMBER_CONTAINERS.has(n.kind));
1529
+ // A type mention can name something other than a class (a namespaced
1530
+ // constant or function), so it keeps the ordinary strategies.
1531
+ if (classes.length !== 1)
1532
+ return ref.referenceKind === 'references' ? undefined : null;
1533
+ const owner = classes[0];
1534
+ if (!member)
1535
+ return { original: ref, targetNodeId: owner.id, confidence: 0.95, resolvedBy: 'import' };
1536
+ const methods = context.getNodesByQualifiedName(`${owner.qualifiedName}::${member}`)
1537
+ .filter((n) => n.language === 'php' && n.kind === 'method' && n.filePath === owner.filePath);
1538
+ // A method the class inherits is left to the strategies that walk supertypes.
1539
+ if (methods.length !== 1)
1540
+ return undefined;
1541
+ return { original: ref, targetNodeId: methods[0].id, confidence: 0.95, resolvedBy: 'import' };
1542
+ }
1251
1543
  function resolveViaImport(ref, context) {
1544
+ // A JS/TS module specifier — `import './polyfills'`, the module of `import x
1545
+ // from '../lib/a'`, a CommonJS `require('./application')` — names a FILE,
1546
+ // found the way the runtime finds it: extensions, `index` files, path
1547
+ // aliases. Matching the basename instead missed every extensionless one
1548
+ // (the common spelling) and could land on a same-named file elsewhere.
1549
+ if (isJsPathImportRef(ref)) {
1550
+ const file = resolveImportPath(ref.referenceName, ref.filePath, ref.language, context);
1551
+ const fileNode = file && file !== ref.filePath ? context.getNodesInFile(file).find((n) => n.kind === 'file') : undefined;
1552
+ if (fileNode)
1553
+ return { original: ref, targetNodeId: fileNode.id, confidence: 0.9, resolvedBy: 'import' };
1554
+ }
1252
1555
  // C/C++ #include references — resolve directly to the included file
1253
1556
  // (file→file edge), bypassing symbol lookup. The extractor emits these
1254
1557
  // with `referenceKind: 'imports'` and `referenceName: <include path>`
@@ -1438,17 +1741,31 @@ function resolveViaImport(ref, context) {
1438
1741
  if (moduleFile)
1439
1742
  return moduleFile;
1440
1743
  }
1744
+ // Kotlin's `import app.model.Outer.Inner as Made`: `Made.create()` is the
1745
+ // aliased class's member, found by its FQN — nothing else binds the alias.
1746
+ if (ref.language === 'kotlin' && ref.referenceKind !== 'imports') {
1747
+ const aliased = resolveJvmAlias(ref, imports, context);
1748
+ if (aliased)
1749
+ return aliased;
1750
+ }
1441
1751
  // Check if the reference name matches any import
1442
1752
  for (const imp of imports) {
1443
1753
  if (imp.localName === ref.referenceName || ref.referenceName.startsWith(imp.localName + '.')) {
1444
1754
  // Resolve the import path
1445
- const resolvedPath = resolveImportPath(imp.source, ref.filePath, ref.language, context);
1755
+ let resolvedPath = resolveImportPath(imp.source, ref.filePath, ref.language, context);
1756
+ // Named Python imports need the same absolute-module lookup as namespace
1757
+ // imports, including aliases used as receiver types (#1820).
1758
+ if (!resolvedPath && ref.language === 'python') {
1759
+ resolvedPath = findPythonModuleFile(imp.source, context, ref.filePath)?.filePath ?? null;
1760
+ }
1446
1761
  if (resolvedPath) {
1447
1762
  const exportedName = imp.isDefault ? 'default' : imp.exportedName;
1448
1763
  const memberName = imp.isNamespace
1449
1764
  ? ref.referenceName.replace(imp.localName + '.', '')
1450
1765
  : null;
1451
- const targetNode = findExportedSymbol(resolvedPath, { isDefault: imp.isDefault, isNamespace: imp.isNamespace, exportedName, memberName }, ref.language, context, new Set());
1766
+ const targetNode = findExportedSymbol(resolvedPath, { isDefault: imp.isDefault, isNamespace: imp.isNamespace, exportedName, memberName }, ref.language, context, new Set()) ?? (ref.language === 'python'
1767
+ ? pythonModuleSymbol(resolvedPath, memberName ?? exportedName, context, 0)
1768
+ : undefined);
1452
1769
  if (targetNode) {
1453
1770
  // `Foo.bar()` / `Foo.CONST` — a NAMED (non-namespace) class import
1454
1771
  // accessed through a member. `findExportedSymbol` resolved `Foo` to
@@ -1480,6 +1797,9 @@ function resolveViaImport(ref, context) {
1480
1797
  const literalMember = (0, name_matcher_1.resolveObjectLiteralMember)(targetNode, member, ref, context, 0.9, 'import');
1481
1798
  if (literalMember)
1482
1799
  return literalMember;
1800
+ const aliasMember = resolveObjectLiteralAlias(targetNode, member, ref, context);
1801
+ if (aliasMember)
1802
+ return aliasMember;
1483
1803
  }
1484
1804
  }
1485
1805
  // An imported VALUE (singleton constant / shared instance) called
@@ -1495,6 +1815,13 @@ function resolveViaImport(ref, context) {
1495
1815
  const instanceMember = resolveImportedInstanceMember(targetNode, ref, imp.localName, context);
1496
1816
  if (instanceMember)
1497
1817
  return instanceMember;
1818
+ // Finding a named Python import proves the receiver exists, not
1819
+ // its requested attribute. In particular, task.delay() enqueues
1820
+ // work; it does not call the imported task function directly.
1821
+ // Keep unknown members unresolved (including callback values)
1822
+ // instead of falling back to the receiver as their target.
1823
+ if (ref.language === 'python')
1824
+ return null;
1498
1825
  }
1499
1826
  return {
1500
1827
  original: ref,
@@ -1539,11 +1866,19 @@ function resolvePythonModuleMember(ref, imports, context) {
1539
1866
  // `import mod` / `import numpy as np` bind the module at `source` itself;
1540
1867
  // `from . import certs` / `from pkg import mod` bind a SUBMODULE whose
1541
1868
  // dotted path is the source joined with the imported name.
1869
+ //
1870
+ // Join with the EXPORTED name, not the local one: under
1871
+ // `from pkg import mod as alias` the receiver is `alias` but the module on
1872
+ // disk is `pkg.mod`, and building `pkg.alias` looked for a file that does
1873
+ // not exist — so the aliased form dropped its `calls` edge while the plain
1874
+ // form (where the two names coincide) worked (#1626). For an unaliased
1875
+ // import the two are identical, so this changes nothing there.
1876
+ const moduleName = imp.exportedName === '*' ? imp.localName : imp.exportedName;
1542
1877
  const modulePath = imp.isNamespace
1543
1878
  ? imp.source
1544
1879
  : imp.source.endsWith('.')
1545
- ? imp.source + imp.localName
1546
- : imp.source + '.' + imp.localName;
1880
+ ? imp.source + moduleName
1881
+ : imp.source + '.' + moduleName;
1547
1882
  // resolveImportPath only maps RELATIVE dotted paths (`.mod`, `..pkg.mod`); an
1548
1883
  // ABSOLUTE package path (`pkg.module` from `from pkg import module`, or a bare
1549
1884
  // `import pkg.mod`) resolves to null there, so fall back to the dotted-module
@@ -1557,13 +1892,10 @@ function resolvePythonModuleMember(ref, imports, context) {
1557
1892
  }
1558
1893
  if (!resolvedPath || resolvedPath === ref.filePath)
1559
1894
  continue;
1560
- // Find the member as a top-level definition in the module file. Exclude
1561
- // `method` so `mod.foo` never lands on a same-named class method.
1562
- const target = context.getNodesInFile(resolvedPath).find((n) => n.name === member &&
1563
- (n.kind === 'function' ||
1564
- n.kind === 'class' ||
1565
- n.kind === 'variable' ||
1566
- n.kind === 'constant'));
1895
+ // Find the member as a top-level definition in the module file, or one it
1896
+ // re-exports (a package's `__init__.py`). Exclude `method` so `mod.foo`
1897
+ // never lands on a same-named class method.
1898
+ const target = pythonModuleSymbol(resolvedPath, member, context, 0);
1567
1899
  if (target) {
1568
1900
  return { original: ref, targetNodeId: target.id, confidence: 0.85, resolvedBy: 'import' };
1569
1901
  }
@@ -1632,6 +1964,30 @@ function resolveLuaRequire(ref, context) {
1632
1964
  }
1633
1965
  return null;
1634
1966
  }
1967
+ /**
1968
+ * `UploadApi.uploadARCapture()` where `UploadApi` is a NAMESPACE OBJECT — the
1969
+ * default-export façade most React Native API layers are written as:
1970
+ *
1971
+ * import { uploadARCapture } from './frames'
1972
+ * const UploadApi = { uploadARCapture, createFolder }
1973
+ * export default UploadApi
1974
+ *
1975
+ * The member is a shorthand (or `key: ident`) property whose value is a
1976
+ * binding of the object's file, not a function defined inside the literal,
1977
+ * so containment (`resolveObjectLiteralMember`) finds nothing and the call
1978
+ * landed on the constant — every cross-file caller of the API function went
1979
+ * missing. Read the literal's source, take the binding the member names, and
1980
+ * resolve it where the object's file would: a symbol declared there, else
1981
+ * through its own imports. Calls accept callable targets only.
1982
+ */
1983
+ function resolveObjectLiteralAlias(container, member, ref, context) {
1984
+ if (container.kind !== 'constant' && container.kind !== 'variable')
1985
+ return null;
1986
+ if (!JS_FAMILY_FILE.test(container.filePath))
1987
+ return null;
1988
+ const resolved = (0, name_matcher_1.resolveObjectLiteralBinding)(container, member, ref, context);
1989
+ return resolved ? { ...resolved, confidence: 0.9, resolvedBy: 'import' } : null;
1990
+ }
1635
1991
  function resolveModuleImportToFile(ref, imports, context) {
1636
1992
  if (ref.referenceKind !== 'imports')
1637
1993
  return null;
@@ -1653,9 +2009,12 @@ function resolveModuleImportToFile(ref, imports, context) {
1653
2009
  }
1654
2010
  else if (ref.language === 'python') {
1655
2011
  // `from . import certs` — the imported NAME is a submodule of the source.
2012
+ // As in resolvePythonModuleMember, use the exported name so an alias
2013
+ // still links to the real module file (#1626).
2014
+ const moduleName = imp.exportedName === '*' ? imp.localName : imp.exportedName;
1656
2015
  modulePath = imp.source.endsWith('.')
1657
- ? imp.source + imp.localName
1658
- : imp.source + '.' + imp.localName;
2016
+ ? imp.source + moduleName
2017
+ : imp.source + '.' + moduleName;
1659
2018
  }
1660
2019
  else {
1661
2020
  // A named TS/JS import binds a symbol, not a module — leave it alone.
@@ -1689,21 +2048,86 @@ function resolveModuleImportToFile(ref, imports, context) {
1689
2048
  * no edge. Shared by absolute `import a.b.c` and absolute `from a.b import c`
1690
2049
  * (where `c` is a submodule) resolution.
1691
2050
  */
2051
+ /**
2052
+ * Per-context memo for findPythonModuleFile: module path → the `<mod>.py` and
2053
+ * `<mod>/__init__.py` file nodes whose path ends with it, in name-lookup
2054
+ * order. Only the importing file's own path is excluded per call, so taking
2055
+ * the first survivor returns the node the unmemoized scan found. Without it,
2056
+ * every ref naming a module outside the project (`from unittest import mock`)
2057
+ * rescanned every `__init__.py` in the tree. Same stable window as the name
2058
+ * caches; dropped by clearImportResolverMemos.
2059
+ */
2060
+ const pythonModuleFileMemos = new WeakMap();
2061
+ /**
2062
+ * A top-level class / function / value named `name` in a Python module, or
2063
+ * one the module re-exports — `from .users import *`, `from .users import
2064
+ * User` — a few packages deep. netbox's `from users.models import User` names
2065
+ * `users/models/__init__.py`, which star-imports `.users`, where `User` is.
2066
+ */
2067
+ const PY_MODULE_SYMBOLS = new WeakMap();
2068
+ function pythonModuleSymbol(file, name, context, depth) {
2069
+ let memo = PY_MODULE_SYMBOLS.get(context);
2070
+ if (!memo)
2071
+ PY_MODULE_SYMBOLS.set(context, (memo = new Map()));
2072
+ const key = `${file}\0${name}`;
2073
+ const hit = memo.get(key);
2074
+ if (hit !== undefined)
2075
+ return hit ?? undefined;
2076
+ // (A cycle of star imports reads as "not here" while it is being walked.)
2077
+ memo.set(key, null);
2078
+ const found = pythonModuleSymbolUncached(file, name, context, depth);
2079
+ memo.set(key, found ?? null);
2080
+ return found;
2081
+ }
2082
+ function pythonModuleSymbolUncached(file, name, context, depth) {
2083
+ const own = context.getNodesInFile(file).find((n) => n.name === name && !n.qualifiedName.includes('::') &&
2084
+ (n.kind === 'class' || n.kind === 'function' || n.kind === 'variable' || n.kind === 'constant'));
2085
+ if (own || depth >= 3)
2086
+ return own;
2087
+ // Re-exported by name (`from .users import User`), else through a star import
2088
+ // (`from .users import *` — not among the import mappings, so read here).
2089
+ const sources = context.getImportMappings(file, 'python')
2090
+ .filter((imp) => !imp.isNamespace && imp.localName === name)
2091
+ .map((imp) => ({ source: imp.source, exported: imp.exportedName }));
2092
+ for (const m of (context.readFile(file) ?? '').matchAll(/^\s*from\s+([\w.]+)\s+import\s+\*/gm)) {
2093
+ sources.push({ source: m[1], exported: name });
2094
+ }
2095
+ for (const { source, exported } of sources) {
2096
+ const target = resolveImportPath(source, file, 'python', context) ?? findPythonModuleFile(source, context, file)?.filePath ?? null;
2097
+ if (!target || target === file)
2098
+ continue;
2099
+ const found = pythonModuleSymbol(target, exported, context, depth + 1);
2100
+ if (found)
2101
+ return found;
2102
+ }
2103
+ return undefined;
2104
+ }
1692
2105
  function findPythonModuleFile(mod, context, excludeFilePath) {
1693
2106
  if (!mod || mod.startsWith('.'))
1694
2107
  return null; // relative imports handled elsewhere
1695
- const rel = mod.replace(/\./g, '/');
1696
- const lastSeg = mod.split('.').pop();
1697
- const endsWith = (p, want) => p === want || p.endsWith('/' + want);
1698
- const moduleFile = context
1699
- .getNodesByName(`${lastSeg}.py`)
1700
- .find((n) => n.kind === 'file' && n.filePath !== excludeFilePath && endsWith(n.filePath, `${rel}.py`));
1701
- if (moduleFile)
1702
- return moduleFile;
1703
- const pkgFile = context
1704
- .getNodesByName('__init__.py')
1705
- .find((n) => n.kind === 'file' && n.filePath !== excludeFilePath && endsWith(n.filePath, `${rel}/__init__.py`));
1706
- return pkgFile ?? null;
2108
+ let memo = pythonModuleFileMemos.get(context);
2109
+ if (!memo) {
2110
+ memo = new Map();
2111
+ pythonModuleFileMemos.set(context, memo);
2112
+ }
2113
+ let files = memo.get(mod);
2114
+ if (!files) {
2115
+ const rel = mod.replace(/\./g, '/');
2116
+ const lastSeg = mod.split('.').pop();
2117
+ const endsWith = (p, want) => p === want || p.endsWith('/' + want);
2118
+ files = {
2119
+ module: context
2120
+ .getNodesByName(`${lastSeg}.py`)
2121
+ .filter((n) => n.kind === 'file' && endsWith(n.filePath, `${rel}.py`)),
2122
+ pkg: context
2123
+ .getNodesByName('__init__.py')
2124
+ .filter((n) => n.kind === 'file' && endsWith(n.filePath, `${rel}/__init__.py`)),
2125
+ };
2126
+ memo.set(mod, files);
2127
+ }
2128
+ return (files.module.find((n) => n.filePath !== excludeFilePath) ??
2129
+ files.pkg.find((n) => n.filePath !== excludeFilePath) ??
2130
+ null);
1707
2131
  }
1708
2132
  /**
1709
2133
  * Resolve a Python ABSOLUTE dotted module import (`import a.b.c`) to its file —
@@ -2016,17 +2440,33 @@ function findExportedSymbolWalk(filePath, want, language, context, visited, dept
2016
2440
  // `.ts`/`.tsx` `export default fn`/`class` case. Without the component
2017
2441
  // branch, an `export { default as X } from './X.svelte'` barrel never
2018
2442
  // resolves and the component shows a false 0 callers (#629).
2019
- const direct = exportIndex.defaultComponent ?? exportIndex.defaultFnClass;
2443
+ // A component file IS its default export; otherwise the statement that
2444
+ // names the binding beats the first-exported-function guess.
2445
+ const direct = exportIndex.defaultComponent ?? defaultExportBindingNode(filePath, exportIndex, context) ?? exportIndex.defaultFnClass;
2020
2446
  if (direct)
2021
2447
  return direct;
2448
+ // CommonJS: `module.exports = createApplication`, or `= require('./lib/express')`.
2449
+ const commonJs = commonJsDefaultExport(filePath, context);
2450
+ if (commonJs?.source) {
2451
+ const next = resolveImportPath(commonJs.source, filePath, language, context);
2452
+ if (next)
2453
+ return findExportedSymbol(next, want, language, context, visited, depth + 1);
2454
+ }
2455
+ else if (commonJs?.name) {
2456
+ const bound = nodesInFileNamed(filePath, commonJs.name, context)
2457
+ .filter((n) => DEFAULT_BINDING_KINDS.has(n.kind))
2458
+ .sort((a, b) => a.startLine - b.startLine || a.startColumn - b.startColumn)[0];
2459
+ if (bound)
2460
+ return bound;
2461
+ }
2022
2462
  }
2023
2463
  else if (want.isNamespace && want.memberName) {
2024
- const direct = exportIndex.byName.get(want.memberName);
2464
+ const direct = exportedByName(filePath, exportIndex, want.memberName, context);
2025
2465
  if (direct)
2026
2466
  return direct;
2027
2467
  }
2028
2468
  else {
2029
- const direct = exportIndex.byName.get(want.exportedName);
2469
+ const direct = exportedByName(filePath, exportIndex, want.exportedName, context);
2030
2470
  if (direct)
2031
2471
  return direct;
2032
2472
  }
@@ -2034,8 +2474,9 @@ function findExportedSymbolWalk(filePath, want, language, context, visited, dept
2034
2474
  const reExports = context.getReExports?.(filePath, language) ?? [];
2035
2475
  if (reExports.length === 0)
2036
2476
  return undefined;
2037
- // Look for explicit `export { want } from './other'` (with optional rename).
2038
- const targetName = want.isDefault ? 'default' : want.exportedName;
2477
+ // Look for explicit `export { want } from './other'` (with optional rename) — for
2478
+ // `ns.member` through `import * as ns`, the member is the name wanted.
2479
+ const targetName = want.isDefault ? 'default' : want.isNamespace && want.memberName ? want.memberName : want.exportedName;
2039
2480
  for (const rex of reExports) {
2040
2481
  if (rex.kind === 'named' && rex.exportedName === targetName) {
2041
2482
  const next = resolveImportPath(rex.source, filePath, language, context);
@@ -2053,6 +2494,19 @@ function findExportedSymbolWalk(filePath, want, language, context, visited, dept
2053
2494
  return chained;
2054
2495
  }
2055
2496
  }
2497
+ // `z.core.util.fn` through `export * as core from './core'`: the member continues in that module.
2498
+ if (want.isNamespace && want.memberName) {
2499
+ const dot = want.memberName.indexOf('.');
2500
+ const head = dot < 0 ? want.memberName : want.memberName.slice(0, dot);
2501
+ const rex = dot < 0 ? undefined : reExports.find((r) => r.kind === 'namespace' && r.exportedName === head);
2502
+ if (rex) {
2503
+ const next = resolveImportPath(rex.source, filePath, language, context);
2504
+ const rest = want.memberName.slice(dot + 1);
2505
+ return next
2506
+ ? findExportedSymbol(next, { ...want, exportedName: rest.split('.')[0], memberName: rest }, language, context, visited, depth + 1)
2507
+ : undefined;
2508
+ }
2509
+ }
2056
2510
  // 3. Wildcard re-export: `export * from './other'` — try every
2057
2511
  // forwarding source. This is the barrel-of-barrels case.
2058
2512
  for (const rex of reExports) {
@@ -2146,4 +2600,132 @@ function resolveStaticMember(container, ref, localName, context) {
2146
2600
  }
2147
2601
  return candidates[0];
2148
2602
  }
2603
+ /**
2604
+ * Rust `use` declarations, flattened to `localName → full path`.
2605
+ *
2606
+ * Rust is the one supported language with NO `ImportMapping` extraction (see
2607
+ * `extractImportMappings`), so this is the only channel that can tell whether
2608
+ * a bare type name in a Rust file was brought in by a `use`. Handles nested
2609
+ * groups (`use a::{b::C, d as E}`), globs (skipped — they bind no single
2610
+ * name), and `as` aliases.
2611
+ */
2612
+ function collectRustUseBindings(content) {
2613
+ const out = new Map();
2614
+ // Expand one level of `{...}` at a time so `a::{b::{C, D}, E}` flattens.
2615
+ const expand = (spec) => {
2616
+ const open = spec.indexOf('{');
2617
+ if (open === -1)
2618
+ return [spec.trim()];
2619
+ const prefix = spec.slice(0, open);
2620
+ let depth = 0;
2621
+ let close = -1;
2622
+ for (let i = open; i < spec.length; i++) {
2623
+ if (spec[i] === '{')
2624
+ depth++;
2625
+ else if (spec[i] === '}') {
2626
+ depth--;
2627
+ if (depth === 0) {
2628
+ close = i;
2629
+ break;
2630
+ }
2631
+ }
2632
+ }
2633
+ if (close === -1)
2634
+ return [];
2635
+ const suffix = spec.slice(close + 1);
2636
+ const inner = spec.slice(open + 1, close);
2637
+ const parts = [];
2638
+ let depth2 = 0;
2639
+ let start = 0;
2640
+ for (let i = 0; i <= inner.length; i++) {
2641
+ const ch = inner[i];
2642
+ if (ch === '{')
2643
+ depth2++;
2644
+ else if (ch === '}')
2645
+ depth2--;
2646
+ if (i === inner.length || (ch === ',' && depth2 === 0)) {
2647
+ const seg = inner.slice(start, i).trim();
2648
+ if (seg)
2649
+ parts.push(seg);
2650
+ start = i + 1;
2651
+ }
2652
+ }
2653
+ return parts.flatMap((p) => expand(prefix + p + suffix));
2654
+ };
2655
+ // `use` items end at the first `;`. Attributes/visibility (`pub use`) are
2656
+ // irrelevant to the binding itself.
2657
+ const useRe = /(^|\n)\s*(?:pub(?:\([^)]*\))?\s+)?use\s+([^;]+);/g;
2658
+ let m;
2659
+ while ((m = useRe.exec(content)) !== null) {
2660
+ for (const spec of expand(m[2].replace(/\s+/g, ' '))) {
2661
+ const aliasMatch = /^(.*?)\s+as\s+([A-Za-z_]\w*)$/.exec(spec);
2662
+ const rawPath = (aliasMatch ? aliasMatch[1] : spec).trim();
2663
+ if (!rawPath || rawPath.endsWith('*'))
2664
+ continue;
2665
+ const segments = rawPath.split('::').map((s) => s.trim()).filter(Boolean);
2666
+ const leaf = segments[segments.length - 1];
2667
+ if (!leaf)
2668
+ continue;
2669
+ const local = aliasMatch ? aliasMatch[2] : leaf;
2670
+ out.set(local, segments.join('::'));
2671
+ }
2672
+ }
2673
+ return out;
2674
+ }
2675
+ /**
2676
+ * Is `name`, as used in `ref`'s file, bound by an import whose module lives
2677
+ * OUTSIDE the repository?
2678
+ *
2679
+ * When it is, no in-repo node can be the referent: the symbol is defined in a
2680
+ * third-party crate/package, and any same-named local symbol the name-matcher
2681
+ * finds is a coincidence. Rust `use std::error::Error;` + `impl Error for
2682
+ * MapperError {}` bound to a local `MapperError::Error` variant, and once
2683
+ * non-type kinds were filtered out it simply moved to an unrelated local
2684
+ * `type Error` alias — restricting kinds alone RELOCATES the false edge
2685
+ * instead of removing it, so locality has to be checked too.
2686
+ *
2687
+ * Answers only when it can be CERTAIN, because a false "yes" deletes a real
2688
+ * edge. Two languages qualify, each with an oracle that cannot be wrong:
2689
+ *
2690
+ * - **Rust** — the `use` path is rooted at a standard-library crate
2691
+ * (`std`/`core`/`alloc`/`proc_macro`), which by definition ships outside
2692
+ * any repository. Deliberately NOT generalized to "the module path doesn't
2693
+ * resolve to a file": a crate can re-export another workspace crate's
2694
+ * modules (`pub use pupil_core::{ports, domain};`), so `crate::ports::X`
2695
+ * has no `src/ports/` directory to walk yet is entirely in-repo — that
2696
+ * generalization measured 13 real trait implementations deleted.
2697
+ * - **ES modules** — `isExternalImport`, which already accounts for tsconfig
2698
+ * path aliases and monorepo workspace packages.
2699
+ *
2700
+ * Everything else returns false and resolves exactly as before. JVM and Python
2701
+ * imports notably do NOT go through `resolveImportPath` (they have dedicated
2702
+ * FQN/module matchers), so there is no trustworthy oracle to consult here.
2703
+ */
2704
+ function isBoundToOutOfRepoImport(ref, context) {
2705
+ const name = ref.referenceName;
2706
+ if (name.includes('::') || name.includes('.'))
2707
+ return false; // qualified refs resolve by path
2708
+ if (ref.language === 'rust') {
2709
+ const content = context.readFile(ref.filePath);
2710
+ if (!content)
2711
+ return false;
2712
+ const usePath = collectRustUseBindings(content).get(name);
2713
+ if (!usePath)
2714
+ return false;
2715
+ const segments = usePath.split('::');
2716
+ if (segments.length < 2 || !RUST_STDLIB_ROOTS.has(segments[0]))
2717
+ return false;
2718
+ // 2015-edition crate-relative paths can shadow a stdlib root with a local
2719
+ // module of the same name — if the path walks to a real file, it's local.
2720
+ return resolveRustModuleFile(segments.slice(0, -1), ref.filePath, context) === null;
2721
+ }
2722
+ if (!ESM_IMPORT_LANGUAGES.has(ref.language))
2723
+ return false;
2724
+ for (const imp of context.getImportMappings(ref.filePath, ref.language)) {
2725
+ if (imp.localName !== name)
2726
+ continue;
2727
+ return isExternalImport(imp.source, ref.language, context);
2728
+ }
2729
+ return false;
2730
+ }
2149
2731
  //# sourceMappingURL=import-resolver.js.map