@colbymchenry/codegraph-win32-arm64 1.5.0 → 1.6.1

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 (693) 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 +744 -320
  7. package/lib/dist/bin/codegraph.js.map +1 -1
  8. package/lib/dist/bin/viewer-gate.d.ts +17 -0
  9. package/lib/dist/bin/viewer-gate.d.ts.map +1 -0
  10. package/lib/dist/bin/viewer-gate.js +31 -0
  11. package/lib/dist/bin/viewer-gate.js.map +1 -0
  12. package/lib/dist/context/formatter.d.ts +7 -1
  13. package/lib/dist/context/formatter.d.ts.map +1 -1
  14. package/lib/dist/context/formatter.js +12 -6
  15. package/lib/dist/context/formatter.js.map +1 -1
  16. package/lib/dist/context/index.d.ts +12 -0
  17. package/lib/dist/context/index.d.ts.map +1 -1
  18. package/lib/dist/context/index.js +103 -16
  19. package/lib/dist/context/index.js.map +1 -1
  20. package/lib/dist/db/index.d.ts +58 -2
  21. package/lib/dist/db/index.d.ts.map +1 -1
  22. package/lib/dist/db/index.js +187 -32
  23. package/lib/dist/db/index.js.map +1 -1
  24. package/lib/dist/db/migrations.d.ts +1 -1
  25. package/lib/dist/db/migrations.d.ts.map +1 -1
  26. package/lib/dist/db/migrations.js +64 -1
  27. package/lib/dist/db/migrations.js.map +1 -1
  28. package/lib/dist/db/queries.d.ts +583 -6
  29. package/lib/dist/db/queries.d.ts.map +1 -1
  30. package/lib/dist/db/queries.js +1417 -57
  31. package/lib/dist/db/queries.js.map +1 -1
  32. package/lib/dist/db/schema.sql +27 -4
  33. package/lib/dist/db/sqlite-adapter.d.ts +2 -0
  34. package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
  35. package/lib/dist/db/sqlite-adapter.js +56 -7
  36. package/lib/dist/db/sqlite-adapter.js.map +1 -1
  37. package/lib/dist/db/synthesis-stage.d.ts +12 -0
  38. package/lib/dist/db/synthesis-stage.d.ts.map +1 -0
  39. package/lib/dist/db/synthesis-stage.js +89 -0
  40. package/lib/dist/db/synthesis-stage.js.map +1 -0
  41. package/lib/dist/db/wal-valve.d.ts +32 -12
  42. package/lib/dist/db/wal-valve.d.ts.map +1 -1
  43. package/lib/dist/db/wal-valve.js +65 -22
  44. package/lib/dist/db/wal-valve.js.map +1 -1
  45. package/lib/dist/db/wsl-shared-index.d.ts +53 -0
  46. package/lib/dist/db/wsl-shared-index.d.ts.map +1 -0
  47. package/lib/dist/db/wsl-shared-index.js +121 -0
  48. package/lib/dist/db/wsl-shared-index.js.map +1 -0
  49. package/lib/dist/directory.d.ts +130 -2
  50. package/lib/dist/directory.d.ts.map +1 -1
  51. package/lib/dist/directory.js +306 -23
  52. package/lib/dist/directory.js.map +1 -1
  53. package/lib/dist/errors.d.ts +14 -0
  54. package/lib/dist/errors.d.ts.map +1 -1
  55. package/lib/dist/errors.js +16 -1
  56. package/lib/dist/errors.js.map +1 -1
  57. package/lib/dist/extraction/cfml-extractor.d.ts +1 -0
  58. package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
  59. package/lib/dist/extraction/cfml-extractor.js +15 -3
  60. package/lib/dist/extraction/cfml-extractor.js.map +1 -1
  61. package/lib/dist/extraction/dfm-extractor.d.ts.map +1 -1
  62. package/lib/dist/extraction/dfm-extractor.js +14 -10
  63. package/lib/dist/extraction/dfm-extractor.js.map +1 -1
  64. package/lib/dist/extraction/extraction-version.d.ts +1 -1
  65. package/lib/dist/extraction/extraction-version.js +1 -1
  66. package/lib/dist/extraction/function-ref.d.ts +6 -4
  67. package/lib/dist/extraction/function-ref.d.ts.map +1 -1
  68. package/lib/dist/extraction/function-ref.js +41 -14
  69. package/lib/dist/extraction/function-ref.js.map +1 -1
  70. package/lib/dist/extraction/generated-detection.d.ts +48 -12
  71. package/lib/dist/extraction/generated-detection.d.ts.map +1 -1
  72. package/lib/dist/extraction/generated-detection.js +176 -11
  73. package/lib/dist/extraction/generated-detection.js.map +1 -1
  74. package/lib/dist/extraction/grammars.d.ts +38 -0
  75. package/lib/dist/extraction/grammars.d.ts.map +1 -1
  76. package/lib/dist/extraction/grammars.js +115 -3
  77. package/lib/dist/extraction/grammars.js.map +1 -1
  78. package/lib/dist/extraction/index.d.ts +218 -14
  79. package/lib/dist/extraction/index.d.ts.map +1 -1
  80. package/lib/dist/extraction/index.js +874 -176
  81. package/lib/dist/extraction/index.js.map +1 -1
  82. package/lib/dist/extraction/languages/c-cpp.d.ts +58 -0
  83. package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
  84. package/lib/dist/extraction/languages/c-cpp.js +310 -19
  85. package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
  86. package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
  87. package/lib/dist/extraction/languages/dart.js +8 -3
  88. package/lib/dist/extraction/languages/dart.js.map +1 -1
  89. package/lib/dist/extraction/languages/erlang.d.ts.map +1 -1
  90. package/lib/dist/extraction/languages/erlang.js +58 -22
  91. package/lib/dist/extraction/languages/erlang.js.map +1 -1
  92. package/lib/dist/extraction/languages/javascript.js +1 -1
  93. package/lib/dist/extraction/languages/javascript.js.map +1 -1
  94. package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
  95. package/lib/dist/extraction/languages/kotlin.js +169 -36
  96. package/lib/dist/extraction/languages/kotlin.js.map +1 -1
  97. package/lib/dist/extraction/languages/lua.d.ts.map +1 -1
  98. package/lib/dist/extraction/languages/lua.js +4 -1
  99. package/lib/dist/extraction/languages/lua.js.map +1 -1
  100. package/lib/dist/extraction/languages/objc.d.ts.map +1 -1
  101. package/lib/dist/extraction/languages/objc.js +4 -0
  102. package/lib/dist/extraction/languages/objc.js.map +1 -1
  103. package/lib/dist/extraction/languages/python.d.ts.map +1 -1
  104. package/lib/dist/extraction/languages/python.js +71 -0
  105. package/lib/dist/extraction/languages/python.js.map +1 -1
  106. package/lib/dist/extraction/languages/rust.d.ts +20 -0
  107. package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
  108. package/lib/dist/extraction/languages/rust.js +50 -20
  109. package/lib/dist/extraction/languages/rust.js.map +1 -1
  110. package/lib/dist/extraction/languages/scala.d.ts.map +1 -1
  111. package/lib/dist/extraction/languages/scala.js +18 -3
  112. package/lib/dist/extraction/languages/scala.js.map +1 -1
  113. package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
  114. package/lib/dist/extraction/languages/typescript.js +9 -2
  115. package/lib/dist/extraction/languages/typescript.js.map +1 -1
  116. package/lib/dist/extraction/liquid-extractor.d.ts +18 -0
  117. package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
  118. package/lib/dist/extraction/liquid-extractor.js +98 -22
  119. package/lib/dist/extraction/liquid-extractor.js.map +1 -1
  120. package/lib/dist/extraction/mybatis-extractor.d.ts.map +1 -1
  121. package/lib/dist/extraction/mybatis-extractor.js +6 -4
  122. package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
  123. package/lib/dist/extraction/parse-pool.d.ts +7 -0
  124. package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
  125. package/lib/dist/extraction/parse-pool.js +20 -1
  126. package/lib/dist/extraction/parse-pool.js.map +1 -1
  127. package/lib/dist/extraction/syntax-tokens.d.ts +103 -0
  128. package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -0
  129. package/lib/dist/extraction/syntax-tokens.js +381 -0
  130. package/lib/dist/extraction/syntax-tokens.js.map +1 -0
  131. package/lib/dist/extraction/tree-sitter-helpers.d.ts +5 -0
  132. package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
  133. package/lib/dist/extraction/tree-sitter-helpers.js +17 -0
  134. package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
  135. package/lib/dist/extraction/tree-sitter-types.d.ts +31 -3
  136. package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
  137. package/lib/dist/extraction/tree-sitter.d.ts +101 -18
  138. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
  139. package/lib/dist/extraction/tree-sitter.js +926 -132
  140. package/lib/dist/extraction/tree-sitter.js.map +1 -1
  141. package/lib/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
  142. package/lib/dist/file-limits.d.ts +40 -0
  143. package/lib/dist/file-limits.d.ts.map +1 -0
  144. package/lib/dist/file-limits.js +147 -0
  145. package/lib/dist/file-limits.js.map +1 -0
  146. package/lib/dist/graph/branch-guards.d.ts +248 -0
  147. package/lib/dist/graph/branch-guards.d.ts.map +1 -0
  148. package/lib/dist/graph/branch-guards.js +2231 -0
  149. package/lib/dist/graph/branch-guards.js.map +1 -0
  150. package/lib/dist/graph/dead-code.d.ts +251 -0
  151. package/lib/dist/graph/dead-code.d.ts.map +1 -0
  152. package/lib/dist/graph/dead-code.js +776 -0
  153. package/lib/dist/graph/dead-code.js.map +1 -0
  154. package/lib/dist/graph/dynamic-boundary-report.d.ts +121 -0
  155. package/lib/dist/graph/dynamic-boundary-report.d.ts.map +1 -0
  156. package/lib/dist/graph/dynamic-boundary-report.js +283 -0
  157. package/lib/dist/graph/dynamic-boundary-report.js.map +1 -0
  158. package/lib/dist/graph/index.d.ts +4 -0
  159. package/lib/dist/graph/index.d.ts.map +1 -1
  160. package/lib/dist/graph/index.js +16 -1
  161. package/lib/dist/graph/index.js.map +1 -1
  162. package/lib/dist/graph/named-symbol-flow.d.ts +125 -0
  163. package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -0
  164. package/lib/dist/graph/named-symbol-flow.js +552 -0
  165. package/lib/dist/graph/named-symbol-flow.js.map +1 -0
  166. package/lib/dist/graph/queries.d.ts.map +1 -1
  167. package/lib/dist/graph/queries.js +2 -0
  168. package/lib/dist/graph/queries.js.map +1 -1
  169. package/lib/dist/graph/symbol-lookup.d.ts +83 -0
  170. package/lib/dist/graph/symbol-lookup.d.ts.map +1 -0
  171. package/lib/dist/graph/symbol-lookup.js +181 -0
  172. package/lib/dist/graph/symbol-lookup.js.map +1 -0
  173. package/lib/dist/graph/traversal.d.ts +9 -0
  174. package/lib/dist/graph/traversal.d.ts.map +1 -1
  175. package/lib/dist/graph/traversal.js +62 -36
  176. package/lib/dist/graph/traversal.js.map +1 -1
  177. package/lib/dist/graph/type-hierarchy.d.ts +155 -0
  178. package/lib/dist/graph/type-hierarchy.d.ts.map +1 -0
  179. package/lib/dist/graph/type-hierarchy.js +382 -0
  180. package/lib/dist/graph/type-hierarchy.js.map +1 -0
  181. package/lib/dist/index.d.ts +273 -11
  182. package/lib/dist/index.d.ts.map +1 -1
  183. package/lib/dist/index.js +511 -34
  184. package/lib/dist/index.js.map +1 -1
  185. package/lib/dist/installer/index.d.ts +4 -3
  186. package/lib/dist/installer/index.d.ts.map +1 -1
  187. package/lib/dist/installer/index.js +11 -8
  188. package/lib/dist/installer/index.js.map +1 -1
  189. package/lib/dist/installer/targets/antigravity.d.ts.map +1 -1
  190. package/lib/dist/installer/targets/antigravity.js +14 -2
  191. package/lib/dist/installer/targets/antigravity.js.map +1 -1
  192. package/lib/dist/installer/targets/claude.d.ts +3 -0
  193. package/lib/dist/installer/targets/claude.d.ts.map +1 -1
  194. package/lib/dist/installer/targets/claude.js +72 -12
  195. package/lib/dist/installer/targets/claude.js.map +1 -1
  196. package/lib/dist/installer/targets/codex.d.ts +23 -8
  197. package/lib/dist/installer/targets/codex.d.ts.map +1 -1
  198. package/lib/dist/installer/targets/codex.js +74 -47
  199. package/lib/dist/installer/targets/codex.js.map +1 -1
  200. package/lib/dist/installer/targets/copilot-cli.d.ts +32 -0
  201. package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -0
  202. package/lib/dist/installer/targets/copilot-cli.js +215 -0
  203. package/lib/dist/installer/targets/copilot-cli.js.map +1 -0
  204. package/lib/dist/installer/targets/copilot-jetbrains.d.ts +42 -0
  205. package/lib/dist/installer/targets/copilot-jetbrains.d.ts.map +1 -0
  206. package/lib/dist/installer/targets/copilot-jetbrains.js +238 -0
  207. package/lib/dist/installer/targets/copilot-jetbrains.js.map +1 -0
  208. package/lib/dist/installer/targets/copilot-vscode.d.ts +47 -0
  209. package/lib/dist/installer/targets/copilot-vscode.d.ts.map +1 -0
  210. package/lib/dist/installer/targets/copilot-vscode.js +219 -0
  211. package/lib/dist/installer/targets/copilot-vscode.js.map +1 -0
  212. package/lib/dist/installer/targets/opencode.d.ts +16 -5
  213. package/lib/dist/installer/targets/opencode.d.ts.map +1 -1
  214. package/lib/dist/installer/targets/opencode.js +73 -22
  215. package/lib/dist/installer/targets/opencode.js.map +1 -1
  216. package/lib/dist/installer/targets/registry.d.ts.map +1 -1
  217. package/lib/dist/installer/targets/registry.js +6 -0
  218. package/lib/dist/installer/targets/registry.js.map +1 -1
  219. package/lib/dist/installer/targets/shared.d.ts +14 -3
  220. package/lib/dist/installer/targets/shared.d.ts.map +1 -1
  221. package/lib/dist/installer/targets/shared.js +39 -11
  222. package/lib/dist/installer/targets/shared.js.map +1 -1
  223. package/lib/dist/installer/targets/toml.d.ts +6 -5
  224. package/lib/dist/installer/targets/toml.d.ts.map +1 -1
  225. package/lib/dist/installer/targets/toml.js +99 -20
  226. package/lib/dist/installer/targets/toml.js.map +1 -1
  227. package/lib/dist/installer/targets/types.d.ts +12 -5
  228. package/lib/dist/installer/targets/types.d.ts.map +1 -1
  229. package/lib/dist/mcp/answer-freshness.d.ts +10 -0
  230. package/lib/dist/mcp/answer-freshness.d.ts.map +1 -0
  231. package/lib/dist/mcp/answer-freshness.js +68 -0
  232. package/lib/dist/mcp/answer-freshness.js.map +1 -0
  233. package/lib/dist/mcp/daemon-manager.d.ts +1 -1
  234. package/lib/dist/mcp/daemon-manager.d.ts.map +1 -1
  235. package/lib/dist/mcp/daemon-manager.js +17 -1
  236. package/lib/dist/mcp/daemon-manager.js.map +1 -1
  237. package/lib/dist/mcp/daemon-paths.d.ts +8 -0
  238. package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
  239. package/lib/dist/mcp/daemon-paths.js +65 -2
  240. package/lib/dist/mcp/daemon-paths.js.map +1 -1
  241. package/lib/dist/mcp/daemon-registry.d.ts +17 -4
  242. package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
  243. package/lib/dist/mcp/daemon-registry.js +133 -23
  244. package/lib/dist/mcp/daemon-registry.js.map +1 -1
  245. package/lib/dist/mcp/daemon.d.ts +26 -13
  246. package/lib/dist/mcp/daemon.d.ts.map +1 -1
  247. package/lib/dist/mcp/daemon.js +126 -32
  248. package/lib/dist/mcp/daemon.js.map +1 -1
  249. package/lib/dist/mcp/dynamic-boundaries.d.ts +1 -10
  250. package/lib/dist/mcp/dynamic-boundaries.d.ts.map +1 -1
  251. package/lib/dist/mcp/dynamic-boundaries.js +46 -42
  252. package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
  253. package/lib/dist/mcp/engine.d.ts +31 -9
  254. package/lib/dist/mcp/engine.d.ts.map +1 -1
  255. package/lib/dist/mcp/engine.js +190 -64
  256. package/lib/dist/mcp/engine.js.map +1 -1
  257. package/lib/dist/mcp/explore-dedup.d.ts +140 -0
  258. package/lib/dist/mcp/explore-dedup.d.ts.map +1 -0
  259. package/lib/dist/mcp/explore-dedup.js +239 -0
  260. package/lib/dist/mcp/explore-dedup.js.map +1 -0
  261. package/lib/dist/mcp/explore-diagnostics.d.ts +289 -0
  262. package/lib/dist/mcp/explore-diagnostics.d.ts.map +1 -0
  263. package/lib/dist/mcp/explore-diagnostics.js +558 -0
  264. package/lib/dist/mcp/explore-diagnostics.js.map +1 -0
  265. package/lib/dist/mcp/explore-session-state.d.ts +217 -0
  266. package/lib/dist/mcp/explore-session-state.d.ts.map +1 -0
  267. package/lib/dist/mcp/explore-session-state.js +322 -0
  268. package/lib/dist/mcp/explore-session-state.js.map +1 -0
  269. package/lib/dist/mcp/index-freshness-worker.d.ts +2 -0
  270. package/lib/dist/mcp/index-freshness-worker.d.ts.map +1 -0
  271. package/lib/dist/mcp/index-freshness-worker.js +30 -0
  272. package/lib/dist/mcp/index-freshness-worker.js.map +1 -0
  273. package/lib/dist/mcp/index-freshness.d.ts +7 -0
  274. package/lib/dist/mcp/index-freshness.d.ts.map +1 -0
  275. package/lib/dist/mcp/index-freshness.js +94 -0
  276. package/lib/dist/mcp/index-freshness.js.map +1 -0
  277. package/lib/dist/mcp/index.d.ts +27 -1
  278. package/lib/dist/mcp/index.d.ts.map +1 -1
  279. package/lib/dist/mcp/index.js +159 -14
  280. package/lib/dist/mcp/index.js.map +1 -1
  281. package/lib/dist/mcp/liveness-watchdog.d.ts +4 -1
  282. package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
  283. package/lib/dist/mcp/liveness-watchdog.js +14 -3
  284. package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
  285. package/lib/dist/mcp/project-lifecycle.d.ts +9 -0
  286. package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -0
  287. package/lib/dist/mcp/project-lifecycle.js +181 -0
  288. package/lib/dist/mcp/project-lifecycle.js.map +1 -0
  289. package/lib/dist/mcp/proxy.d.ts.map +1 -1
  290. package/lib/dist/mcp/proxy.js +15 -1
  291. package/lib/dist/mcp/proxy.js.map +1 -1
  292. package/lib/dist/mcp/query-pool.d.ts +2 -2
  293. package/lib/dist/mcp/query-pool.d.ts.map +1 -1
  294. package/lib/dist/mcp/query-pool.js +9 -7
  295. package/lib/dist/mcp/query-pool.js.map +1 -1
  296. package/lib/dist/mcp/query-worker.js +2 -2
  297. package/lib/dist/mcp/query-worker.js.map +1 -1
  298. package/lib/dist/mcp/server-instructions.d.ts +2 -2
  299. package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
  300. package/lib/dist/mcp/server-instructions.js +13 -5
  301. package/lib/dist/mcp/server-instructions.js.map +1 -1
  302. package/lib/dist/mcp/session.d.ts +16 -0
  303. package/lib/dist/mcp/session.d.ts.map +1 -1
  304. package/lib/dist/mcp/session.js +36 -13
  305. package/lib/dist/mcp/session.js.map +1 -1
  306. package/lib/dist/mcp/startup-handshake.d.ts +3 -1
  307. package/lib/dist/mcp/startup-handshake.d.ts.map +1 -1
  308. package/lib/dist/mcp/startup-handshake.js +10 -2
  309. package/lib/dist/mcp/startup-handshake.js.map +1 -1
  310. package/lib/dist/mcp/tools.d.ts +544 -38
  311. package/lib/dist/mcp/tools.d.ts.map +1 -1
  312. package/lib/dist/mcp/tools.js +4246 -770
  313. package/lib/dist/mcp/tools.js.map +1 -1
  314. package/lib/dist/mcp/writer-lock.d.ts +61 -0
  315. package/lib/dist/mcp/writer-lock.d.ts.map +1 -0
  316. package/lib/dist/mcp/writer-lock.js +260 -0
  317. package/lib/dist/mcp/writer-lock.js.map +1 -0
  318. package/lib/dist/project-config.d.ts +23 -0
  319. package/lib/dist/project-config.d.ts.map +1 -1
  320. package/lib/dist/project-config.js +39 -2
  321. package/lib/dist/project-config.js.map +1 -1
  322. package/lib/dist/resolution/alias-binding.d.ts +56 -0
  323. package/lib/dist/resolution/alias-binding.d.ts.map +1 -0
  324. package/lib/dist/resolution/alias-binding.js +127 -0
  325. package/lib/dist/resolution/alias-binding.js.map +1 -0
  326. package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
  327. package/lib/dist/resolution/c-fnptr-synthesizer.js +21 -19
  328. package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
  329. package/lib/dist/resolution/callback-synthesizer.d.ts +23 -1
  330. package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
  331. package/lib/dist/resolution/callback-synthesizer.js +330 -154
  332. package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
  333. package/lib/dist/resolution/cpp-constructor.d.ts +4 -0
  334. package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -0
  335. package/lib/dist/resolution/cpp-constructor.js +123 -0
  336. package/lib/dist/resolution/cpp-constructor.js.map +1 -0
  337. package/lib/dist/resolution/cpp-macro-visibility.d.ts +12 -0
  338. package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -0
  339. package/lib/dist/resolution/cpp-macro-visibility.js +342 -0
  340. package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -0
  341. package/lib/dist/resolution/expo-router-synthesizer.d.ts +32 -0
  342. package/lib/dist/resolution/expo-router-synthesizer.d.ts.map +1 -0
  343. package/lib/dist/resolution/expo-router-synthesizer.js +189 -0
  344. package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -0
  345. package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
  346. package/lib/dist/resolution/frameworks/csharp.js +96 -2
  347. package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
  348. package/lib/dist/resolution/frameworks/expo-router.d.ts +189 -0
  349. package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -0
  350. package/lib/dist/resolution/frameworks/expo-router.js +785 -0
  351. package/lib/dist/resolution/frameworks/expo-router.js.map +1 -0
  352. package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
  353. package/lib/dist/resolution/frameworks/express.js +251 -16
  354. package/lib/dist/resolution/frameworks/express.js.map +1 -1
  355. package/lib/dist/resolution/frameworks/index.d.ts +5 -0
  356. package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
  357. package/lib/dist/resolution/frameworks/index.js +29 -1
  358. package/lib/dist/resolution/frameworks/index.js.map +1 -1
  359. package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
  360. package/lib/dist/resolution/frameworks/java.js +79 -47
  361. package/lib/dist/resolution/frameworks/java.js.map +1 -1
  362. package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -1
  363. package/lib/dist/resolution/frameworks/nestjs.js +6 -14
  364. package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
  365. package/lib/dist/resolution/frameworks/nextjs.d.ts +76 -0
  366. package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -0
  367. package/lib/dist/resolution/frameworks/nextjs.js +328 -0
  368. package/lib/dist/resolution/frameworks/nextjs.js.map +1 -0
  369. package/lib/dist/resolution/frameworks/object-literal.d.ts +32 -0
  370. package/lib/dist/resolution/frameworks/object-literal.d.ts.map +1 -0
  371. package/lib/dist/resolution/frameworks/object-literal.js +139 -0
  372. package/lib/dist/resolution/frameworks/object-literal.js.map +1 -0
  373. package/lib/dist/resolution/frameworks/package-deps.d.ts +14 -0
  374. package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -0
  375. package/lib/dist/resolution/frameworks/package-deps.js +78 -0
  376. package/lib/dist/resolution/frameworks/package-deps.js.map +1 -0
  377. package/lib/dist/resolution/frameworks/python.d.ts.map +1 -1
  378. package/lib/dist/resolution/frameworks/python.js +166 -0
  379. package/lib/dist/resolution/frameworks/python.js.map +1 -1
  380. package/lib/dist/resolution/frameworks/react-native.d.ts +26 -0
  381. package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
  382. package/lib/dist/resolution/frameworks/react-native.js +153 -14
  383. package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
  384. package/lib/dist/resolution/frameworks/react-router.d.ts +46 -0
  385. package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -0
  386. package/lib/dist/resolution/frameworks/react-router.js +187 -0
  387. package/lib/dist/resolution/frameworks/react-router.js.map +1 -0
  388. package/lib/dist/resolution/frameworks/react.d.ts +2 -1
  389. package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
  390. package/lib/dist/resolution/frameworks/react.js +188 -139
  391. package/lib/dist/resolution/frameworks/react.js.map +1 -1
  392. package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
  393. package/lib/dist/resolution/frameworks/svelte.js +6 -1
  394. package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
  395. package/lib/dist/resolution/frameworks/sveltekit-router.d.ts +36 -0
  396. package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -0
  397. package/lib/dist/resolution/frameworks/sveltekit-router.js +156 -0
  398. package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -0
  399. package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -1
  400. package/lib/dist/resolution/frameworks/swift.js +11 -1
  401. package/lib/dist/resolution/frameworks/swift.js.map +1 -1
  402. package/lib/dist/resolution/frameworks/tanstack-router.d.ts +84 -0
  403. package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -0
  404. package/lib/dist/resolution/frameworks/tanstack-router.js +437 -0
  405. package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -0
  406. package/lib/dist/resolution/frameworks/vue-router.d.ts +82 -0
  407. package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -0
  408. package/lib/dist/resolution/frameworks/vue-router.js +377 -0
  409. package/lib/dist/resolution/frameworks/vue-router.js.map +1 -0
  410. package/lib/dist/resolution/import-resolver.d.ts +38 -0
  411. package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
  412. package/lib/dist/resolution/import-resolver.js +394 -28
  413. package/lib/dist/resolution/import-resolver.js.map +1 -1
  414. package/lib/dist/resolution/index.d.ts +89 -25
  415. package/lib/dist/resolution/index.d.ts.map +1 -1
  416. package/lib/dist/resolution/index.js +567 -149
  417. package/lib/dist/resolution/index.js.map +1 -1
  418. package/lib/dist/resolution/js-builtins.d.ts +13 -0
  419. package/lib/dist/resolution/js-builtins.d.ts.map +1 -0
  420. package/lib/dist/resolution/js-builtins.js +46 -0
  421. package/lib/dist/resolution/js-builtins.js.map +1 -0
  422. package/lib/dist/resolution/name-matcher.d.ts +99 -22
  423. package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
  424. package/lib/dist/resolution/name-matcher.js +2192 -87
  425. package/lib/dist/resolution/name-matcher.js.map +1 -1
  426. package/lib/dist/resolution/next-router-synthesizer.d.ts +27 -0
  427. package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -0
  428. package/lib/dist/resolution/next-router-synthesizer.js +113 -0
  429. package/lib/dist/resolution/next-router-synthesizer.js.map +1 -0
  430. package/lib/dist/resolution/path-aliases.d.ts +6 -4
  431. package/lib/dist/resolution/path-aliases.d.ts.map +1 -1
  432. package/lib/dist/resolution/path-aliases.js +125 -17
  433. package/lib/dist/resolution/path-aliases.js.map +1 -1
  434. package/lib/dist/resolution/react-router-synthesizer.d.ts +33 -0
  435. package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -0
  436. package/lib/dist/resolution/react-router-synthesizer.js +126 -0
  437. package/lib/dist/resolution/react-router-synthesizer.js.map +1 -0
  438. package/lib/dist/resolution/resolver-pool.d.ts +2 -0
  439. package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
  440. package/lib/dist/resolution/resolver-pool.js +4 -0
  441. package/lib/dist/resolution/resolver-pool.js.map +1 -1
  442. package/lib/dist/resolution/strip-comments.d.ts +6 -0
  443. package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
  444. package/lib/dist/resolution/strip-comments.js +58 -0
  445. package/lib/dist/resolution/strip-comments.js.map +1 -1
  446. package/lib/dist/resolution/sveltekit-synthesizer.d.ts +58 -0
  447. package/lib/dist/resolution/sveltekit-synthesizer.d.ts.map +1 -0
  448. package/lib/dist/resolution/sveltekit-synthesizer.js +173 -0
  449. package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -0
  450. package/lib/dist/resolution/synth-utils.d.ts +26 -0
  451. package/lib/dist/resolution/synth-utils.d.ts.map +1 -0
  452. package/lib/dist/resolution/synth-utils.js +75 -0
  453. package/lib/dist/resolution/synth-utils.js.map +1 -0
  454. package/lib/dist/resolution/tanstack-router-synthesizer.d.ts +31 -0
  455. package/lib/dist/resolution/tanstack-router-synthesizer.d.ts.map +1 -0
  456. package/lib/dist/resolution/tanstack-router-synthesizer.js +114 -0
  457. package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -0
  458. package/lib/dist/resolution/tier-synthesizer.d.ts +49 -0
  459. package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -0
  460. package/lib/dist/resolution/tier-synthesizer.js +931 -0
  461. package/lib/dist/resolution/tier-synthesizer.js.map +1 -0
  462. package/lib/dist/resolution/types.d.ts +78 -2
  463. package/lib/dist/resolution/types.d.ts.map +1 -1
  464. package/lib/dist/resolution/types.js +64 -0
  465. package/lib/dist/resolution/types.js.map +1 -1
  466. package/lib/dist/resolution/vue-router-synthesizer.d.ts +30 -0
  467. package/lib/dist/resolution/vue-router-synthesizer.d.ts.map +1 -0
  468. package/lib/dist/resolution/vue-router-synthesizer.js +115 -0
  469. package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -0
  470. package/lib/dist/search/identifier-segments.d.ts +10 -0
  471. package/lib/dist/search/identifier-segments.d.ts.map +1 -1
  472. package/lib/dist/search/identifier-segments.js +29 -0
  473. package/lib/dist/search/identifier-segments.js.map +1 -1
  474. package/lib/dist/search/query-paths.d.ts +106 -0
  475. package/lib/dist/search/query-paths.d.ts.map +1 -0
  476. package/lib/dist/search/query-paths.js +513 -0
  477. package/lib/dist/search/query-paths.js.map +1 -0
  478. package/lib/dist/search/query-utils.d.ts +16 -1
  479. package/lib/dist/search/query-utils.d.ts.map +1 -1
  480. package/lib/dist/search/query-utils.js +48 -10
  481. package/lib/dist/search/query-utils.js.map +1 -1
  482. package/lib/dist/sync/watch-policy.d.ts +14 -0
  483. package/lib/dist/sync/watch-policy.d.ts.map +1 -1
  484. package/lib/dist/sync/watch-policy.js +19 -0
  485. package/lib/dist/sync/watch-policy.js.map +1 -1
  486. package/lib/dist/sync/watcher.d.ts +74 -35
  487. package/lib/dist/sync/watcher.d.ts.map +1 -1
  488. package/lib/dist/sync/watcher.js +281 -99
  489. package/lib/dist/sync/watcher.js.map +1 -1
  490. package/lib/dist/telemetry/index.d.ts +4 -2
  491. package/lib/dist/telemetry/index.d.ts.map +1 -1
  492. package/lib/dist/telemetry/index.js +92 -41
  493. package/lib/dist/telemetry/index.js.map +1 -1
  494. package/lib/dist/types.d.ts +21 -2
  495. package/lib/dist/types.d.ts.map +1 -1
  496. package/lib/dist/types.js +2 -0
  497. package/lib/dist/types.js.map +1 -1
  498. package/lib/dist/ui-server/api/deadcode.d.ts +84 -0
  499. package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -0
  500. package/lib/dist/ui-server/api/deadcode.js +136 -0
  501. package/lib/dist/ui-server/api/deadcode.js.map +1 -0
  502. package/lib/dist/ui-server/api/effects.d.ts +87 -0
  503. package/lib/dist/ui-server/api/effects.d.ts.map +1 -0
  504. package/lib/dist/ui-server/api/effects.js +499 -0
  505. package/lib/dist/ui-server/api/effects.js.map +1 -0
  506. package/lib/dist/ui-server/api/entrypoints.d.ts +86 -0
  507. package/lib/dist/ui-server/api/entrypoints.d.ts.map +1 -0
  508. package/lib/dist/ui-server/api/entrypoints.js +279 -0
  509. package/lib/dist/ui-server/api/entrypoints.js.map +1 -0
  510. package/lib/dist/ui-server/api/events.d.ts +183 -0
  511. package/lib/dist/ui-server/api/events.d.ts.map +1 -0
  512. package/lib/dist/ui-server/api/events.js +430 -0
  513. package/lib/dist/ui-server/api/events.js.map +1 -0
  514. package/lib/dist/ui-server/api/file.d.ts +66 -0
  515. package/lib/dist/ui-server/api/file.d.ts.map +1 -0
  516. package/lib/dist/ui-server/api/file.js +235 -0
  517. package/lib/dist/ui-server/api/file.js.map +1 -0
  518. package/lib/dist/ui-server/api/filecode.d.ts +126 -0
  519. package/lib/dist/ui-server/api/filecode.d.ts.map +1 -0
  520. package/lib/dist/ui-server/api/filecode.js +205 -0
  521. package/lib/dist/ui-server/api/filecode.js.map +1 -0
  522. package/lib/dist/ui-server/api/flow.d.ts +226 -0
  523. package/lib/dist/ui-server/api/flow.d.ts.map +1 -0
  524. package/lib/dist/ui-server/api/flow.js +612 -0
  525. package/lib/dist/ui-server/api/flow.js.map +1 -0
  526. package/lib/dist/ui-server/api/hierarchy.d.ts +81 -0
  527. package/lib/dist/ui-server/api/hierarchy.d.ts.map +1 -0
  528. package/lib/dist/ui-server/api/hierarchy.js +92 -0
  529. package/lib/dist/ui-server/api/hierarchy.js.map +1 -0
  530. package/lib/dist/ui-server/api/index.d.ts +90 -0
  531. package/lib/dist/ui-server/api/index.d.ts.map +1 -0
  532. package/lib/dist/ui-server/api/index.js +332 -0
  533. package/lib/dist/ui-server/api/index.js.map +1 -0
  534. package/lib/dist/ui-server/api/map.d.ts +238 -0
  535. package/lib/dist/ui-server/api/map.d.ts.map +1 -0
  536. package/lib/dist/ui-server/api/map.js +681 -0
  537. package/lib/dist/ui-server/api/map.js.map +1 -0
  538. package/lib/dist/ui-server/api/node.d.ts +81 -0
  539. package/lib/dist/ui-server/api/node.d.ts.map +1 -0
  540. package/lib/dist/ui-server/api/node.js +388 -0
  541. package/lib/dist/ui-server/api/node.js.map +1 -0
  542. package/lib/dist/ui-server/api/nodes.d.ts +25 -0
  543. package/lib/dist/ui-server/api/nodes.d.ts.map +1 -0
  544. package/lib/dist/ui-server/api/nodes.js +45 -0
  545. package/lib/dist/ui-server/api/nodes.js.map +1 -0
  546. package/lib/dist/ui-server/api/program.d.ts +139 -0
  547. package/lib/dist/ui-server/api/program.d.ts.map +1 -0
  548. package/lib/dist/ui-server/api/program.js +315 -0
  549. package/lib/dist/ui-server/api/program.js.map +1 -0
  550. package/lib/dist/ui-server/api/respond.d.ts +76 -0
  551. package/lib/dist/ui-server/api/respond.d.ts.map +1 -0
  552. package/lib/dist/ui-server/api/respond.js +186 -0
  553. package/lib/dist/ui-server/api/respond.js.map +1 -0
  554. package/lib/dist/ui-server/api/route-roots.d.ts +39 -0
  555. package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -0
  556. package/lib/dist/ui-server/api/route-roots.js +96 -0
  557. package/lib/dist/ui-server/api/route-roots.js.map +1 -0
  558. package/lib/dist/ui-server/api/routes.d.ts +59 -0
  559. package/lib/dist/ui-server/api/routes.d.ts.map +1 -0
  560. package/lib/dist/ui-server/api/routes.js +108 -0
  561. package/lib/dist/ui-server/api/routes.js.map +1 -0
  562. package/lib/dist/ui-server/api/screens.d.ts +117 -0
  563. package/lib/dist/ui-server/api/screens.d.ts.map +1 -0
  564. package/lib/dist/ui-server/api/screens.js +611 -0
  565. package/lib/dist/ui-server/api/screens.js.map +1 -0
  566. package/lib/dist/ui-server/api/search.d.ts +29 -0
  567. package/lib/dist/ui-server/api/search.d.ts.map +1 -0
  568. package/lib/dist/ui-server/api/search.js +232 -0
  569. package/lib/dist/ui-server/api/search.js.map +1 -0
  570. package/lib/dist/ui-server/api/session.d.ts +52 -0
  571. package/lib/dist/ui-server/api/session.d.ts.map +1 -0
  572. package/lib/dist/ui-server/api/session.js +196 -0
  573. package/lib/dist/ui-server/api/session.js.map +1 -0
  574. package/lib/dist/ui-server/api/source.d.ts +200 -0
  575. package/lib/dist/ui-server/api/source.d.ts.map +1 -0
  576. package/lib/dist/ui-server/api/source.js +422 -0
  577. package/lib/dist/ui-server/api/source.js.map +1 -0
  578. package/lib/dist/ui-server/api/stats.d.ts +27 -0
  579. package/lib/dist/ui-server/api/stats.d.ts.map +1 -0
  580. package/lib/dist/ui-server/api/stats.js +164 -0
  581. package/lib/dist/ui-server/api/stats.js.map +1 -0
  582. package/lib/dist/ui-server/api/steps.d.ts +274 -0
  583. package/lib/dist/ui-server/api/steps.d.ts.map +1 -0
  584. package/lib/dist/ui-server/api/steps.js +1446 -0
  585. package/lib/dist/ui-server/api/steps.js.map +1 -0
  586. package/lib/dist/ui-server/api/trail-store.d.ts +142 -0
  587. package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -0
  588. package/lib/dist/ui-server/api/trail-store.js +323 -0
  589. package/lib/dist/ui-server/api/trail-store.js.map +1 -0
  590. package/lib/dist/ui-server/api/trails.d.ts +163 -0
  591. package/lib/dist/ui-server/api/trails.d.ts.map +1 -0
  592. package/lib/dist/ui-server/api/trails.js +369 -0
  593. package/lib/dist/ui-server/api/trails.js.map +1 -0
  594. package/lib/dist/ui-server/api/when.d.ts +125 -0
  595. package/lib/dist/ui-server/api/when.d.ts.map +1 -0
  596. package/lib/dist/ui-server/api/when.js +251 -0
  597. package/lib/dist/ui-server/api/when.js.map +1 -0
  598. package/lib/dist/ui-server/api/wire.d.ts +179 -0
  599. package/lib/dist/ui-server/api/wire.d.ts.map +1 -0
  600. package/lib/dist/ui-server/api/wire.js +231 -0
  601. package/lib/dist/ui-server/api/wire.js.map +1 -0
  602. package/lib/dist/ui-server/assets.d.ts +40 -0
  603. package/lib/dist/ui-server/assets.d.ts.map +1 -0
  604. package/lib/dist/ui-server/assets.js +110 -0
  605. package/lib/dist/ui-server/assets.js.map +1 -0
  606. package/lib/dist/ui-server/constants.d.ts +32 -0
  607. package/lib/dist/ui-server/constants.d.ts.map +1 -0
  608. package/lib/dist/ui-server/constants.js +35 -0
  609. package/lib/dist/ui-server/constants.js.map +1 -0
  610. package/lib/dist/ui-server/highlight/index.d.ts +113 -0
  611. package/lib/dist/ui-server/highlight/index.d.ts.map +1 -0
  612. package/lib/dist/ui-server/highlight/index.js +307 -0
  613. package/lib/dist/ui-server/highlight/index.js.map +1 -0
  614. package/lib/dist/ui-server/highlight/languages.d.ts +36 -0
  615. package/lib/dist/ui-server/highlight/languages.d.ts.map +1 -0
  616. package/lib/dist/ui-server/highlight/languages.js +50 -0
  617. package/lib/dist/ui-server/highlight/languages.js.map +1 -0
  618. package/lib/dist/ui-server/index.d.ts +92 -0
  619. package/lib/dist/ui-server/index.d.ts.map +1 -0
  620. package/lib/dist/ui-server/index.js +399 -0
  621. package/lib/dist/ui-server/index.js.map +1 -0
  622. package/lib/dist/ui-server/open-browser.d.ts +31 -0
  623. package/lib/dist/ui-server/open-browser.d.ts.map +1 -0
  624. package/lib/dist/ui-server/open-browser.js +79 -0
  625. package/lib/dist/ui-server/open-browser.js.map +1 -0
  626. package/lib/dist/ui-server/security.d.ts +127 -0
  627. package/lib/dist/ui-server/security.d.ts.map +1 -0
  628. package/lib/dist/ui-server/security.js +332 -0
  629. package/lib/dist/ui-server/security.js.map +1 -0
  630. package/lib/dist/ui-server/static.d.ts +45 -0
  631. package/lib/dist/ui-server/static.d.ts.map +1 -0
  632. package/lib/dist/ui-server/static.js +165 -0
  633. package/lib/dist/ui-server/static.js.map +1 -0
  634. package/lib/dist/utils.d.ts +14 -2
  635. package/lib/dist/utils.d.ts.map +1 -1
  636. package/lib/dist/utils.js +25 -10
  637. package/lib/dist/utils.js.map +1 -1
  638. package/lib/dist/viewer/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 +0 -0
  639. package/lib/dist/viewer/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 +0 -0
  640. package/lib/dist/viewer/assets/archivo-vietnamese-wght-normal-XAtsl5Q_.woff2 +0 -0
  641. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-2syK4fUT.woff +0 -0
  642. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-CBJ8pzag.woff2 +0 -0
  643. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
  644. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
  645. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
  646. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
  647. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-CTOM6hUh.woff2 +0 -0
  648. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-fLZuRloM.woff +0 -0
  649. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-B4oTjJdl.woff +0 -0
  650. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-CBjNughH.woff2 +0 -0
  651. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
  652. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
  653. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
  654. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
  655. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-9HEixskS.woff +0 -0
  656. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-V-xxqcpd.woff2 +0 -0
  657. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-66oory27.woff +0 -0
  658. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-BqAiT5Ww.woff2 +0 -0
  659. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
  660. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
  661. package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
  662. package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
  663. package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2 +0 -0
  664. package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-DWFSQ4vo.woff +0 -0
  665. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-B7_fu1kp.woff2 +0 -0
  666. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-Bg0ZHwF4.woff +0 -0
  667. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
  668. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
  669. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
  670. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
  671. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-D38SheWl.woff2 +0 -0
  672. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-DmB0ttJJ.woff +0 -0
  673. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-D6eaYXMU.woff +0 -0
  674. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-DRuN92E5.woff2 +0 -0
  675. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
  676. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
  677. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
  678. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
  679. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-D2EvbN8M.woff2 +0 -0
  680. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-iLQfcSjf.woff +0 -0
  681. package/lib/dist/viewer/assets/index-CF9yvio6.css +1 -0
  682. package/lib/dist/viewer/assets/index-D4S7YUPf.js +97 -0
  683. package/lib/dist/viewer/index.html +16 -0
  684. package/lib/kernel/codegraph-kernel.node +2 -2
  685. package/lib/node_modules/.package-lock.json +4 -4
  686. package/lib/node_modules/picomatch/README.md +56 -51
  687. package/lib/node_modules/picomatch/lib/constants.js +4 -0
  688. package/lib/node_modules/picomatch/lib/parse.js +341 -1
  689. package/lib/node_modules/picomatch/lib/picomatch.js +25 -5
  690. package/lib/node_modules/picomatch/lib/scan.js +30 -18
  691. package/lib/node_modules/picomatch/package.json +4 -4
  692. package/lib/package.json +9 -2
  693. package/package.json +1 -1
@@ -0,0 +1,931 @@
1
+ "use strict";
2
+ /**
3
+ * Cross-tier channels — the web's equivalent of the React Native bridge.
4
+ *
5
+ * A web app is two programs that talk over a wire the graph cannot see: the
6
+ * page calls `fetch('/api/users', { method: 'POST' })` and the API's
7
+ * `app.post('/api/users', createUser)` answers; a service puts `'welcome'` on
8
+ * the `email` queue and a `@Process('welcome')` method picks it up; a
9
+ * gateway's `this.server.emit('message')` lands in the component that wrote
10
+ * `socket.on('message', …)`. Each hop is a string on both sides, which is the
11
+ * evidence that lets a synthesizer close it — exactly as the RN event channel
12
+ * pairs `sendEvent(withName: "x")` with `addListener('x')`.
13
+ *
14
+ * Three channels, one scan:
15
+ *
16
+ * 1. **`http-client`** — a literal path in a client call (`fetch`, `axios.post`,
17
+ * `ky`, `got`, `$fetch`, `useFetch`, `useSWR`, or a project instance made by
18
+ * `axios.create(…)` / `ky.extend(…)`) → the ONE route node `METHOD path` it
19
+ * denotes. Template holes match a `:param`; a hole in front of the path
20
+ * (`${API_URL}/users`) matches a route by its tail; a variable url, a path
21
+ * no route serves, or a path two routes serve alike produce nothing.
22
+ * Edge: enclosing function → route, `tier: 'client→server'`.
23
+ * 2. **`queue-job`** — `queue.add('job', …)` where the queue is named (`new
24
+ * Queue('email')`, `@InjectQueue('email')`) → the `@Process('job')` method
25
+ * of the `@Processor('email')` class, a WorkerHost's `process`, a
26
+ * `new Worker('email', handler)`, or Bull's `queue.process('job', handler)`.
27
+ * 3. **`event-bus`** — `eventEmitter.emit('user.created')` → `@OnEvent('user.created')`
28
+ * (globs honoured); and sockets in both directions: a client's
29
+ * `socket.emit('x')` → the server's `@SubscribeMessage('x')` / `socket.on('x')`
30
+ * (`tier: 'client→server'`), the server's `server.emit('x')` → the client's
31
+ * `socket.on('x', …)` (`tier: 'server→client'`). The in-process
32
+ * `.on('x', fn)` ↔ `.emit('x')` pairing stays the emitter pass's.
33
+ *
34
+ * Every edge is `kind: 'calls'`, `provenance: 'heuristic'`, and carries
35
+ * `synthesizedBy`, `channel` (`http` | `queue` | `event` | `socket`), the
36
+ * `tier` when the direction is known, the `event` / `queue` / `method` /
37
+ * `href` it was paired on, and `registeredAt` — the route registration, the
38
+ * decorator, the `.on` — so a reader can check the pairing. Fan-out is capped
39
+ * per event as the emitter pass caps it; an HTTP pairing needs no cap because
40
+ * it is exact. Test suites and generated files are never sources: a supertest
41
+ * call is the test's story, and forty of them would make the route a hub.
42
+ */
43
+ Object.defineProperty(exports, "__esModule", { value: true });
44
+ exports.TIER_SERVER_TO_CLIENT = exports.TIER_CLIENT_TO_SERVER = void 0;
45
+ exports.hasCrossTierPattern = hasCrossTierPattern;
46
+ exports.crossTierEdges = crossTierEdges;
47
+ const strip_comments_1 = require("./strip-comments");
48
+ const import_resolver_1 = require("./import-resolver");
49
+ const generated_detection_1 = require("../extraction/generated-detection");
50
+ const query_utils_1 = require("../search/query-utils");
51
+ const expo_router_1 = require("./frameworks/expo-router");
52
+ const synth_utils_1 = require("./synth-utils");
53
+ const JS_FILE = /\.(?:[cm]?[jt]sx?)$/;
54
+ /** Events with more handlers or dispatchers than this are too generic to pair without type information. */
55
+ const EVENT_FANOUT_CAP = 6;
56
+ const HTTP_VERBS = new Set(['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS', 'ALL', 'ANY']);
57
+ exports.TIER_CLIENT_TO_SERVER = 'client→server';
58
+ exports.TIER_SERVER_TO_CLIENT = 'server→client';
59
+ // =============================================================================
60
+ // Source reading
61
+ // =============================================================================
62
+ /** Index just past the `)` that closes the `(` at `open`, skipping strings; -1 if unbalanced. */
63
+ function closeParen(s, open) {
64
+ let depth = 0;
65
+ for (let i = open; i < s.length; i++) {
66
+ const ch = s[i];
67
+ if (ch === '"' || ch === "'") {
68
+ const q = ch;
69
+ i++;
70
+ while (i < s.length && s[i] !== q) {
71
+ if (s[i] === '\\')
72
+ i++;
73
+ i++;
74
+ }
75
+ continue;
76
+ }
77
+ if (ch === '`') {
78
+ i = templateEnd(s, i);
79
+ continue;
80
+ }
81
+ if (ch === '(')
82
+ depth++;
83
+ else if (ch === ')') {
84
+ depth--;
85
+ if (depth === 0)
86
+ return i;
87
+ }
88
+ }
89
+ return -1;
90
+ }
91
+ /** Index of the backtick closing the template opening at `open`. */
92
+ function templateEnd(s, open) {
93
+ let i = open + 1;
94
+ while (i < s.length) {
95
+ const ch = s[i];
96
+ if (ch === '\\') {
97
+ i += 2;
98
+ continue;
99
+ }
100
+ if (ch === '`')
101
+ return i;
102
+ if (ch === '$' && s[i + 1] === '{') {
103
+ let depth = 0;
104
+ for (i = i + 1; i < s.length; i++) {
105
+ if (s[i] === '{')
106
+ depth++;
107
+ else if (s[i] === '}') {
108
+ depth--;
109
+ if (depth === 0)
110
+ break;
111
+ }
112
+ else if (s[i] === '`')
113
+ i = templateEnd(s, i);
114
+ }
115
+ }
116
+ i++;
117
+ }
118
+ return s.length;
119
+ }
120
+ /** The arguments of the call whose `(` is at `open`, split at depth-0 commas. */
121
+ function argumentsAt(s, open) {
122
+ const close = closeParen(s, open);
123
+ if (close < 0)
124
+ return null;
125
+ const inner = s.slice(open + 1, close);
126
+ const out = [];
127
+ let depth = 0;
128
+ let start = 0;
129
+ for (let i = 0; i < inner.length; i++) {
130
+ const c = inner[i];
131
+ if (c === '"' || c === "'") {
132
+ const q = c;
133
+ i++;
134
+ while (i < inner.length && inner[i] !== q) {
135
+ if (inner[i] === '\\')
136
+ i++;
137
+ i++;
138
+ }
139
+ continue;
140
+ }
141
+ if (c === '`') {
142
+ i = templateEnd(inner, i);
143
+ continue;
144
+ }
145
+ if (c === '(' || c === '[' || c === '{')
146
+ depth++;
147
+ else if (c === ')' || c === ']' || c === '}')
148
+ depth--;
149
+ else if (c === ',' && depth === 0) {
150
+ out.push(inner.slice(start, i));
151
+ start = i + 1;
152
+ }
153
+ }
154
+ out.push(inner.slice(start));
155
+ return out.map((a) => a.trim()).filter((a, i) => a.length > 0 || i === 0);
156
+ }
157
+ /** The first string literal in `text`, holes kept; null when it opens with anything else. */
158
+ function leadingString(text) {
159
+ const t = text.trim().replace(/^\(\s*/, '');
160
+ // `new URL('/x', base)` — the path is the first argument of the URL.
161
+ const url = /^new\s+URL\s*\(/.exec(t);
162
+ if (url) {
163
+ const args = argumentsAt(t, url[0].length - 1);
164
+ return args && args[0] ? leadingString(args[0]) : null;
165
+ }
166
+ if (t[0] === '"' || t[0] === "'" || t[0] === '`')
167
+ return (0, expo_router_1.readStringAt)(t, 0);
168
+ return null;
169
+ }
170
+ /** `method: 'POST'` inside an options object / config, upper-cased; null when absent or computed. */
171
+ function methodIn(text) {
172
+ const m = /\bmethod\s*:\s*(['"`])([A-Za-z]+)\1/.exec(text);
173
+ return m ? m[2].toUpperCase() : null;
174
+ }
175
+ /** The first string literal anywhere in a decorator's arguments (`'x'`, `{ name: 'x' }`). */
176
+ function firstLiteral(args) {
177
+ const m = /(['"`])([^'"`]+)\1/.exec(args);
178
+ return m ? m[2] : null;
179
+ }
180
+ /** Every string literal in a decorator's arguments, for `@OnEvent(['a', 'b'])`. */
181
+ function allLiterals(args) {
182
+ const out = [];
183
+ const re = /(['"`])([^'"`]+)\1/g;
184
+ let m;
185
+ while ((m = re.exec(args)) !== null)
186
+ out.push(m[2]);
187
+ return out;
188
+ }
189
+ /**
190
+ * The name of the method a decorator sits on: skip further stacked decorators
191
+ * and modifiers after the decorator's `)`, then take the identifier before `(`.
192
+ */
193
+ function methodNameAfter(safe, from) {
194
+ let i = from;
195
+ const ws = /\s*/y;
196
+ const deco = /@[\w.]+/y;
197
+ const modifier = /(?:public|private|protected|async|static|readonly|override)\b/y;
198
+ const ident = /([A-Za-z_$][\w$]*)\s*[<(]/y;
199
+ const eat = () => {
200
+ ws.lastIndex = i;
201
+ if (ws.exec(safe))
202
+ i = ws.lastIndex;
203
+ };
204
+ for (;;) {
205
+ eat();
206
+ if (safe[i] !== '@')
207
+ break;
208
+ deco.lastIndex = i;
209
+ if (!deco.exec(safe))
210
+ break;
211
+ i = deco.lastIndex;
212
+ eat();
213
+ if (safe[i] === '(') {
214
+ const close = closeParen(safe, i);
215
+ if (close < 0)
216
+ return null;
217
+ i = close + 1;
218
+ }
219
+ }
220
+ for (;;) {
221
+ eat();
222
+ modifier.lastIndex = i;
223
+ if (modifier.exec(safe) && modifier.lastIndex > i) {
224
+ i = modifier.lastIndex;
225
+ continue;
226
+ }
227
+ break;
228
+ }
229
+ eat();
230
+ ident.lastIndex = i;
231
+ const m = ident.exec(safe);
232
+ return m ? { name: m[1], index: i } : null;
233
+ }
234
+ /** Every `@Name(` decorator in `safe` with its arguments and where it ends. */
235
+ function decorators(safe, name) {
236
+ const out = [];
237
+ const re = new RegExp(`@${name}\\s*\\(`, 'g');
238
+ let m;
239
+ while ((m = re.exec(safe)) !== null) {
240
+ const open = m.index + m[0].length - 1;
241
+ const close = closeParen(safe, open);
242
+ if (close < 0)
243
+ continue;
244
+ out.push({ args: safe.slice(open + 1, close), index: m.index, end: close + 1 });
245
+ re.lastIndex = close + 1;
246
+ }
247
+ return out;
248
+ }
249
+ const CLIENT_FACTORY = /\b(?:export\s+)?(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*(?::[^=;]*?)?=\s*(?:await\s+)?(?:(?:axios|ky|got|ofetch|\$fetch|wretch|redaxios)\s*\.\s*(?:create|extend)|new\s+Axios|wretch)\s*\(/g;
250
+ const DEFAULT_CLIENT_FACTORY = /\bexport\s+default\s+(?:(?:axios|ky|got|ofetch|\$fetch|wretch|redaxios)\s*\.\s*(?:create|extend)|new\s+Axios|wretch)\s*\(/;
251
+ const QUEUE_BINDING = /\b(?:export\s+)?(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*(?::[^=;]*?)?=\s*(?:new\s+)?(?:Queue|Bull|BullQueue)\s*(?:<[^>]*>)?\s*\(\s*(['"`])([^'"`]+)\2/g;
252
+ const INJECT_QUEUE = /@InjectQueue\s*\(\s*(['"`])([^'"`]+)\1\s*\)\s*(?:(?:private|public|protected|readonly)\s+)*([A-Za-z_$][\w$]*)/g;
253
+ const SOCKET_SERVER_FILE = /@WebSocketGateway\s*\(|@SubscribeMessage\s*\(|@WebSocketServer\s*\(|\bnew\s+(?:Server|SocketIOServer|WebSocketServer|WebSocket\.Server|WSServer)\b|\.on\s*\(\s*['"]connection['"]/;
254
+ function baseUrlIn(safe, open) {
255
+ const args = argumentsAt(safe, open);
256
+ const config = args?.[0] ?? '';
257
+ const m = /\b(?:baseURL|baseUrl|prefixUrl|baseURI)\s*:\s*/.exec(config);
258
+ if (!m)
259
+ return null;
260
+ return (0, expo_router_1.readStringAt)(config, m.index + m[0].length);
261
+ }
262
+ function readFacts(ctx, file) {
263
+ const content = ctx.readFile(file);
264
+ if (!content)
265
+ return null;
266
+ const safe = (0, strip_comments_1.stripCommentsForRegex)(content, 'typescript');
267
+ let nodes = null;
268
+ let routeLines = null;
269
+ const clients = new Map();
270
+ CLIENT_FACTORY.lastIndex = 0;
271
+ let m;
272
+ while ((m = CLIENT_FACTORY.exec(safe)) !== null) {
273
+ clients.set(m[1], { baseURL: baseUrlIn(safe, m.index + m[0].length - 1) });
274
+ }
275
+ const dm = DEFAULT_CLIENT_FACTORY.exec(safe);
276
+ const defaultClient = dm ? { baseURL: baseUrlIn(safe, dm.index + dm[0].length - 1) } : null;
277
+ const queues = new Map();
278
+ QUEUE_BINDING.lastIndex = 0;
279
+ while ((m = QUEUE_BINDING.exec(safe)) !== null)
280
+ queues.set(m[1], m[3]);
281
+ INJECT_QUEUE.lastIndex = 0;
282
+ while ((m = INJECT_QUEUE.exec(safe)) !== null)
283
+ queues.set(m[3], m[2]);
284
+ return {
285
+ file,
286
+ safe,
287
+ get nodes() {
288
+ return (nodes ??= ctx.getNodesInFile(file));
289
+ },
290
+ lineOf: (0, synth_utils_1.makeLineAt)(safe, 1),
291
+ columnOf: (idx) => idx - (safe.lastIndexOf('\n', idx - 1) + 1),
292
+ get routeLines() {
293
+ if (!routeLines) {
294
+ routeLines = new Set();
295
+ for (const n of this.nodes)
296
+ if (n.kind === 'route')
297
+ routeLines.add(n.startLine);
298
+ }
299
+ return routeLines;
300
+ },
301
+ clients,
302
+ defaultClient,
303
+ queues,
304
+ socketServer: SOCKET_SERVER_FILE.test(safe),
305
+ };
306
+ }
307
+ /** Facts for the file a local name is imported from, when the import resolves to a project file. */
308
+ function importedFacts(ctx, facts, localName, cache) {
309
+ const lang = facts.file.endsWith('x') ? 'tsx' : 'typescript';
310
+ const im = ctx.getImportMappings(facts.file, lang).find((i) => i.localName === localName);
311
+ if (!im)
312
+ return null;
313
+ // The mappings name the module as written; the file it is comes from the
314
+ // same resolution the import resolver uses (aliases, extensions, index files).
315
+ const resolved = im.resolvedPath ?? (0, import_resolver_1.resolveImportPath)(im.source, facts.file, lang, ctx);
316
+ if (!resolved)
317
+ return null;
318
+ let target = cache.get(resolved);
319
+ if (target === undefined) {
320
+ target = JS_FILE.test(resolved) ? readFacts(ctx, resolved) : null;
321
+ cache.set(resolved, target);
322
+ }
323
+ return target ? { facts: target, exportedName: im.exportedName, isDefault: im.isDefault } : null;
324
+ }
325
+ // =============================================================================
326
+ // 1. HTTP client → route
327
+ // =============================================================================
328
+ /** A receiver that is an HTTP client by name alone. */
329
+ const CLIENT_NAMES = /^(?:axios|ky|got|superagent|http|https|httpClient|httpService|api|apiClient|client|restClient|request|agent|fetcher|instance|\$api|\$http|\$axios|axiosInstance|Axios|HttpClient|backend|server)$/;
330
+ /** A receiver that registers routes, never a client — unless it was made by a client factory. */
331
+ const SERVER_NAMES = /^(?:app|router|route|routes|express|fastify|koa|hono|elysia|apiRouter|v1|v2|r)$/;
332
+ /** A type argument between the callee and its `(` — `useSWR<TeamData>('/api/team')`, `ky.get<User>('/x')`. */
333
+ const GENERIC = String.raw `(?:<[^()<>]*(?:<[^()<>]*>[^()<>]*)*>)?`;
334
+ /**
335
+ * Where a receiver chain (`this.api.client`) may begin: not after an earlier
336
+ * identifier-start character of the same word (the second lookbehind is the
337
+ * whole rule; the first is its one-character fast path). A match from the
338
+ * middle of a word implies one from its first letter — the chain regexes read
339
+ * the rest of the word either way — and each of their matches ends on a
340
+ * non-word character, so a scan never resumes mid-word: this only skips starts
341
+ * bound to fail. Without it every letter of every identifier re-read the
342
+ * dotted chain behind it, which on vscode made this the slowest pass.
343
+ */
344
+ const CHAIN_START = String.raw `(?<![A-Za-z_$])(?<![A-Za-z_$][\w$]+)`;
345
+ const BARE_CLIENT_CALL = new RegExp(String.raw `(?:(?:window|globalThis|global)\s*\.\s*)?\b(fetch|\$fetch|ofetch|axios|ky|got|useFetch|useSWR)\s*${GENERIC}\s*\(`, 'g');
346
+ const MEMBER_CLIENT_CALL = new RegExp(String.raw `${CHAIN_START}((?:this\s*\.\s*)?[A-Za-z_$][\w$]*(?:\s*\.\s*[A-Za-z_$][\w$]*)*)\s*\.\s*(get|post|put|patch|delete|head|options|request|\$get|\$post|\$put|\$patch|\$delete)\s*${GENERIC}\s*\(`, 'g');
347
+ function httpRoutes(ctx) {
348
+ const out = [];
349
+ for (const node of ctx.getNodesByKind('route')) {
350
+ const space = node.name.indexOf(' ');
351
+ if (space <= 0)
352
+ continue;
353
+ const method = node.name.slice(0, space).toUpperCase();
354
+ if (!HTTP_VERBS.has(method))
355
+ continue;
356
+ const path = node.name.slice(space + 1).trim();
357
+ if (!path.startsWith('/'))
358
+ continue;
359
+ out.push({ node, method, segs: path.split('/').filter((s) => s.length > 0) });
360
+ }
361
+ return out;
362
+ }
363
+ const PARAM_SEG = /^(?::|\{|\[|<|\*)|\?$/;
364
+ const CATCH_ALL = /^(?:\*|\[\.\.\.|\{\*|:[\w$]+\*$|\{[\w$]+:\*\}|\*[\w$]*$)/;
365
+ /** How well the client's segments match a route's; null when they do not. A literal match beats a parameter's. */
366
+ function scorePath(client, route) {
367
+ let score = 0;
368
+ let i = 0;
369
+ for (let r = 0; r < route.length; r++) {
370
+ const seg = route[r];
371
+ if (CATCH_ALL.test(seg)) {
372
+ if (i >= client.length)
373
+ return null;
374
+ score += client.length - i;
375
+ i = client.length;
376
+ continue;
377
+ }
378
+ if (i >= client.length)
379
+ return null;
380
+ const c = client[i];
381
+ // A hole (`${id}`) fills a route's parameter; it never stands in for a
382
+ // literal segment — `/api/products/${id}` is not `/api/products/top`.
383
+ if (PARAM_SEG.test(seg))
384
+ score += 2;
385
+ else if (c === seg)
386
+ score += 3;
387
+ else
388
+ return null;
389
+ i++;
390
+ }
391
+ return i === client.length ? score : null;
392
+ }
393
+ function matchHttp(site, routes) {
394
+ let best = null;
395
+ let bestScore = -1;
396
+ let tied = false;
397
+ for (const r of routes) {
398
+ if (r.method !== 'ALL' && r.method !== 'ANY' && r.method !== site.method)
399
+ continue;
400
+ let score;
401
+ if (site.suffix) {
402
+ // A base URL hides a prefix the route may spell out (`${API}/users` for
403
+ // `GET /api/users`) — but a one-segment tail names half the routes in
404
+ // an index, and a long hidden prefix is a different API. Two segments
405
+ // of tail at least, two of prefix at most.
406
+ if (site.segs.length < 2 || r.segs.length < site.segs.length || r.segs.length - site.segs.length > 2)
407
+ continue;
408
+ score = scorePath(site.segs, r.segs.slice(r.segs.length - site.segs.length));
409
+ }
410
+ else
411
+ score = scorePath(site.segs, r.segs);
412
+ if (score === null)
413
+ continue;
414
+ if (score > bestScore) {
415
+ best = r;
416
+ bestScore = score;
417
+ tied = false;
418
+ }
419
+ else if (score === bestScore)
420
+ tied = true;
421
+ }
422
+ return tied ? null : best;
423
+ }
424
+ /**
425
+ * The path a client call names, as segments, with `${…}` as `*`; `suffix`
426
+ * when a base URL came first. Null when the path is not literal enough: a
427
+ * relative path with no base, or nothing but holes.
428
+ */
429
+ function clientPath(raw, baseURL) {
430
+ let p = raw;
431
+ const cut = p.search(/[?#]/);
432
+ if (cut >= 0)
433
+ p = p.slice(0, cut);
434
+ let suffix = false;
435
+ const absolute = /^(?:[a-z][a-z0-9+.-]*:)?\/\/[^/]*(\/.*)?$/i.exec(p);
436
+ if (absolute)
437
+ p = absolute[1] ?? '/';
438
+ else if (!p.startsWith('/')) {
439
+ if (p.startsWith(expo_router_1.HOLE)) {
440
+ const rest = p.slice(1);
441
+ if (!rest.startsWith('/'))
442
+ return null;
443
+ p = rest;
444
+ suffix = true;
445
+ }
446
+ else if (baseURL !== null) {
447
+ const base = clientPath(baseURL, null);
448
+ if (!base) {
449
+ // A base that is itself a hole: match by the tail.
450
+ if (!baseURL.includes(expo_router_1.HOLE))
451
+ return null;
452
+ suffix = true;
453
+ p = '/' + p;
454
+ }
455
+ else {
456
+ suffix = base.suffix;
457
+ p = '/' + [...base.segs, ...p.split('/')].filter(Boolean).join('/');
458
+ }
459
+ }
460
+ else
461
+ return null;
462
+ }
463
+ else if (baseURL !== null) {
464
+ // An instance with a literal path base: axios joins `baseURL + url`.
465
+ const base = clientPath(baseURL, null);
466
+ if (base && base.segs.length > 0) {
467
+ suffix = base.suffix;
468
+ p = '/' + [...base.segs, ...p.split('/')].filter(Boolean).join('/');
469
+ }
470
+ else if (!base && baseURL.includes(expo_router_1.HOLE))
471
+ suffix = true;
472
+ }
473
+ const segs = p
474
+ .split('/')
475
+ .filter((s) => s.length > 0)
476
+ .map((s) => (s.includes(expo_router_1.HOLE) ? '*' : s));
477
+ if (segs.length > 0 && segs.every((s) => s === '*'))
478
+ return null;
479
+ return { segs, suffix, display: '/' + segs.map((s) => (s === '*' ? '${…}' : s)).join('/') };
480
+ }
481
+ /** What a member-call receiver is: a client (with its base URL), or nothing. */
482
+ function clientFor(ctx, facts, receiver, cache) {
483
+ const chain = receiver.replace(/\s+/g, '').replace(/^this\./, '').split('.');
484
+ const head = chain[0];
485
+ const last = chain[chain.length - 1];
486
+ const local = facts.clients.get(head);
487
+ if (local)
488
+ return local;
489
+ const imported = importedFacts(ctx, facts, head, cache);
490
+ if (imported) {
491
+ const bound = imported.isDefault ? imported.facts.defaultClient : imported.facts.clients.get(imported.exportedName) ?? null;
492
+ if (bound)
493
+ return bound;
494
+ }
495
+ if (SERVER_NAMES.test(last) || SERVER_NAMES.test(head))
496
+ return null;
497
+ if (CLIENT_NAMES.test(last))
498
+ return { baseURL: null };
499
+ return null;
500
+ }
501
+ function collectHttpSites(ctx, facts, sites, cache) {
502
+ const { safe, lineOf } = facts;
503
+ const add = (index, open, verb, baseURL) => {
504
+ const line = lineOf(index);
505
+ const callee = safe.slice(index, open).replace(/\s+/g, '').replace(/<.*>$/, '');
506
+ if (facts.routeLines.has(line))
507
+ return; // a registration the resolver already read
508
+ const fn = (0, synth_utils_1.enclosingFn)(facts.nodes, line);
509
+ if (!fn)
510
+ return;
511
+ const args = argumentsAt(safe, open);
512
+ if (!args || !args[0])
513
+ return;
514
+ let first = args[0];
515
+ let method = verb;
516
+ // `axios({ url, method })`, `.request({ url, method })`, `ky(url, { method })`.
517
+ if (first.trimStart().startsWith('{')) {
518
+ const url = /\burl\s*:\s*/.exec(first);
519
+ if (!url)
520
+ return;
521
+ method = method ?? methodIn(first) ?? 'GET';
522
+ first = first.slice(url.index + url[0].length);
523
+ }
524
+ else if (method === null) {
525
+ method = methodIn(args.slice(1).join(',')) ?? 'GET';
526
+ }
527
+ const literal = leadingString(first);
528
+ if (literal === null)
529
+ return;
530
+ const path = clientPath(literal, baseURL);
531
+ if (!path)
532
+ return;
533
+ sites.push({ fn, file: facts.file, line, column: facts.columnOf(index), callee, method, segs: path.segs, suffix: path.suffix, display: path.display });
534
+ };
535
+ BARE_CLIENT_CALL.lastIndex = 0;
536
+ let m;
537
+ while ((m = BARE_CLIENT_CALL.exec(safe)) !== null) {
538
+ // `this.fetch(…)` / `repo.fetch(…)` is a project method, not the platform's.
539
+ const before = safe[m.index - 1];
540
+ if (before === '.' && !/^(?:window|globalThis|global)\s*\./.test(m[0]))
541
+ continue;
542
+ add(m.index, m.index + m[0].length - 1, null, null);
543
+ }
544
+ MEMBER_CLIENT_CALL.lastIndex = 0;
545
+ while ((m = MEMBER_CLIENT_CALL.exec(safe)) !== null) {
546
+ const client = clientFor(ctx, facts, m[1], cache);
547
+ if (!client)
548
+ continue;
549
+ const verb = m[2].replace(/^\$/, '').toUpperCase();
550
+ add(m.index, m.index + m[0].length - 1, verb === 'REQUEST' ? null : verb, client.baseURL);
551
+ }
552
+ }
553
+ // =============================================================================
554
+ // 2. Queue job → consumer
555
+ // =============================================================================
556
+ const QUEUE_ADD = new RegExp(CHAIN_START + /((?:this\s*\.\s*)?[A-Za-z_$][\w$]*(?:\s*\.\s*[A-Za-z_$][\w$]*)*)\s*\.\s*add\s*\(\s*(['"`])([^'"`]+)\2/.source, 'g');
557
+ const QUEUE_SHAPED = /queue|jobs?$|worker|bull|flow|producer/i;
558
+ const NEW_WORKER = /\bnew\s+Worker\s*(?:<[^>]*>)?\s*\(\s*(['"`])([^'"`]+)\1\s*,\s*/g;
559
+ const QUEUE_PROCESS = new RegExp(CHAIN_START + /((?:this\s*\.\s*)?[A-Za-z_$][\w$]*(?:\s*\.\s*[A-Za-z_$][\w$]*)*)\s*\.\s*process\s*\(\s*(?:(['"`])([^'"`]+)\2\s*,\s*)?(?:\d+\s*,\s*)?/.source, 'g');
560
+ /** A handler argument: a named function (group 1), or an inline function. */
561
+ const HANDLER_ARG = /^(?:(?:async\s+)?([A-Za-z_$][\w$.]*)\s*(?:[,)]|$)|(?:async\s*)?(?:\(|function\b|[A-Za-z_$][\w$]*\s*=>))/;
562
+ /** The queue a receiver is bound to, by its binding in this file or the file it is imported from. */
563
+ function queueFor(ctx, facts, receiver, cache) {
564
+ const chain = receiver.replace(/\s+/g, '').replace(/^this\./, '').split('.');
565
+ const head = chain[0];
566
+ const own = facts.queues.get(head);
567
+ if (own)
568
+ return own;
569
+ const imported = importedFacts(ctx, facts, head, cache);
570
+ if (imported) {
571
+ const bound = imported.facts.queues.get(imported.exportedName);
572
+ if (bound)
573
+ return bound;
574
+ }
575
+ return null;
576
+ }
577
+ /** The function a handler argument names or encloses; null when it is neither. */
578
+ function handlerNode(ctx, facts, text, line, cache) {
579
+ const m = HANDLER_ARG.exec(text.trimStart());
580
+ if (!m)
581
+ return null;
582
+ if (m[1]) {
583
+ const name = m[1].split('.').pop();
584
+ const candidates = ctx.getNodesByName(name).filter((n) => n.kind === 'function' || n.kind === 'method');
585
+ const local = candidates.filter((n) => n.filePath === facts.file);
586
+ if (local.length === 1)
587
+ return local[0];
588
+ if (local.length > 1)
589
+ return null;
590
+ const imported = importedFacts(ctx, facts, m[1].split('.')[0], cache);
591
+ if (imported) {
592
+ const viaImport = candidates.filter((n) => n.filePath === imported.facts.file);
593
+ if (viaImport.length === 1)
594
+ return viaImport[0];
595
+ }
596
+ return candidates.length === 1 ? candidates[0] : null;
597
+ }
598
+ return (0, synth_utils_1.enclosingFn)(facts.nodes, line) ?? (0, synth_utils_1.enclosingValue)(facts.nodes, line);
599
+ }
600
+ /** The nearest class declared at or after `index`, as its node. */
601
+ function classAfter(facts, index) {
602
+ const m = /\bclass\s+([A-Za-z_$][\w$]*)/g;
603
+ m.lastIndex = index;
604
+ const hit = m.exec(facts.safe);
605
+ if (!hit)
606
+ return null;
607
+ const line = facts.lineOf(hit.index);
608
+ return facts.nodes.find((n) => n.kind === 'class' && n.name === hit[1] && n.startLine >= line - 2) ?? null;
609
+ }
610
+ /** The method node a decorator at `end` sits on, inside `cls` when given. */
611
+ function decoratedMethod(facts, end, cls) {
612
+ const named = methodNameAfter(facts.safe, end);
613
+ if (!named)
614
+ return null;
615
+ const line = facts.lineOf(named.index);
616
+ return (facts.nodes.find((n) => (n.kind === 'method' || n.kind === 'function') &&
617
+ n.name === named.name &&
618
+ n.startLine >= line - 1 &&
619
+ n.startLine <= line + 1 &&
620
+ (!cls || (n.startLine >= cls.startLine && n.endLine <= cls.endLine))) ?? null);
621
+ }
622
+ function collectQueue(ctx, facts, producers, consumers, cache) {
623
+ const { safe, lineOf } = facts;
624
+ let m;
625
+ QUEUE_ADD.lastIndex = 0;
626
+ while ((m = QUEUE_ADD.exec(safe)) !== null) {
627
+ const receiver = m[1];
628
+ const queue = queueFor(ctx, facts, receiver, cache);
629
+ const last = receiver.replace(/\s+/g, '').split('.').pop();
630
+ if (queue === null && !QUEUE_SHAPED.test(last))
631
+ continue;
632
+ const line = lineOf(m.index);
633
+ const fn = (0, synth_utils_1.enclosingFn)(facts.nodes, line);
634
+ if (!fn)
635
+ continue;
636
+ producers.push({ fn, file: facts.file, line, column: facts.columnOf(m.index), callee: `${receiver.replace(/\s+/g, '')}.add`, queue, job: m[3] });
637
+ }
638
+ // Nest: `@Processor('email')` on a class; `@Process('welcome')` on its methods,
639
+ // or a WorkerHost's `process(job)`.
640
+ for (const proc of decorators(safe, 'Processor')) {
641
+ const queue = firstLiteral(proc.args);
642
+ const cls = classAfter(facts, proc.end);
643
+ if (!cls)
644
+ continue;
645
+ let any = false;
646
+ for (const job of decorators(safe, 'Process')) {
647
+ const line = lineOf(job.index);
648
+ if (line < cls.startLine || line > cls.endLine)
649
+ continue;
650
+ const method = decoratedMethod(facts, job.end, cls);
651
+ if (!method)
652
+ continue;
653
+ any = true;
654
+ consumers.push({ node: method, file: facts.file, line, queue, job: firstLiteral(job.args) });
655
+ }
656
+ if (!any) {
657
+ const process = facts.nodes.find((n) => n.kind === 'method' && n.name === 'process' && n.startLine >= cls.startLine && n.endLine <= cls.endLine);
658
+ if (process)
659
+ consumers.push({ node: process, file: facts.file, line: process.startLine, queue, job: null });
660
+ }
661
+ }
662
+ // BullMQ: `new Worker('email', handler)`.
663
+ NEW_WORKER.lastIndex = 0;
664
+ while ((m = NEW_WORKER.exec(safe)) !== null) {
665
+ const line = lineOf(m.index);
666
+ const node = handlerNode(ctx, facts, safe.slice(m.index + m[0].length, m.index + m[0].length + 200), line, cache);
667
+ if (!node)
668
+ continue;
669
+ consumers.push({ node, file: facts.file, line, queue: m[2], job: null });
670
+ }
671
+ // Bull: `queue.process('welcome', handler)` / `queue.process(handler)`.
672
+ QUEUE_PROCESS.lastIndex = 0;
673
+ while ((m = QUEUE_PROCESS.exec(safe)) !== null) {
674
+ const receiver = m[1];
675
+ const queue = queueFor(ctx, facts, receiver, cache);
676
+ const last = receiver.replace(/\s+/g, '').split('.').pop();
677
+ if (queue === null && !QUEUE_SHAPED.test(last))
678
+ continue;
679
+ const line = lineOf(m.index);
680
+ const node = handlerNode(ctx, facts, safe.slice(m.index + m[0].length, m.index + m[0].length + 200), line, cache);
681
+ if (!node)
682
+ continue;
683
+ consumers.push({ node, file: facts.file, line, queue, job: m[3] ?? null });
684
+ }
685
+ }
686
+ function pairQueue(producers, consumers, edges, seen) {
687
+ for (const p of producers) {
688
+ let candidates = consumers.filter((c) => (p.queue === null || c.queue === null || c.queue === p.queue) && (c.job === null || c.job === p.job));
689
+ // The most specific pairing wins: the job by name on the named queue,
690
+ // then the job by name, then the queue's default consumer.
691
+ const exact = candidates.filter((c) => c.job === p.job && c.queue === p.queue && p.queue !== null);
692
+ if (exact.length > 0)
693
+ candidates = exact;
694
+ else {
695
+ const byJob = candidates.filter((c) => c.job === p.job);
696
+ if (byJob.length > 0)
697
+ candidates = byJob;
698
+ else if (p.queue === null)
699
+ continue; // an unnamed queue and no consumer naming the job: a guess
700
+ else
701
+ candidates = candidates.filter((c) => c.queue === p.queue);
702
+ }
703
+ if (candidates.length === 0 || candidates.length > EVENT_FANOUT_CAP)
704
+ continue;
705
+ for (const c of candidates) {
706
+ if (c.node.id === p.fn.id)
707
+ continue;
708
+ const key = `${p.fn.id}>${c.node.id}`;
709
+ if (seen.has(key))
710
+ continue;
711
+ seen.add(key);
712
+ edges.push({
713
+ source: p.fn.id,
714
+ target: c.node.id,
715
+ kind: 'calls',
716
+ line: p.line,
717
+ column: p.column,
718
+ provenance: 'heuristic',
719
+ metadata: {
720
+ synthesizedBy: 'queue-job',
721
+ channel: 'queue',
722
+ callee: p.callee,
723
+ event: p.job,
724
+ ...(p.queue ?? c.queue ? { queue: p.queue ?? c.queue } : {}),
725
+ registeredAt: `${c.file}:${c.line}`,
726
+ },
727
+ });
728
+ }
729
+ }
730
+ }
731
+ // =============================================================================
732
+ // 3. Events: a bus, and sockets both ways
733
+ // =============================================================================
734
+ // A word character opens these chains, so a word's first character is the
735
+ // only start that can match (same argument as CHAIN_START).
736
+ const EMIT = /(?<![\w$])((?:[\w$]+(?:\([^()]*\))?\s*\.\s*)*[\w$]+)\s*\.\s*(emit|emitAsync)\s*\(\s*(['"`])([^'"`\n]+)\3/g;
737
+ const SOCKET_ON = /(?<![\w$])((?:[\w$]+(?:\([^()]*\))?\s*\.\s*)*[\w$]+)\s*\.\s*(?:on|once)\s*\(\s*(['"`])([^'"`\n]+)\2\s*,\s*/g;
738
+ const SOCKET_WORDS = /^(?:socket|io|ws|wss|client|server|namespace|nsp|conn|connection|gateway|broadcast|to|in|of|except|volatile|local|sockets|socketServer|wsServer|room|channel|pusher|ably|ioClient|socketClient|sock)$/;
739
+ const BUS_WORDS = /^(?:eventEmitter|emitter|events|eventBus|bus|dispatcher|pubsub|publisher|eventPublisher|ee|hub|mediator|broker|messageBus|appEvents|domainEvents|eventsService|eventService)$/;
740
+ /** The transport's own events — every socket emits and handles them; pairing them says nothing. */
741
+ const GENERIC_EVENT = /^(?:error|connect|connect_error|connect_failed|connection|disconnect|disconnecting|reconnect|reconnect_attempt|reconnecting|reconnect_error|reconnect_failed|close|open|end|data|ready|drain|finish|pipe|unpipe|listening|timeout|ping|pong|upgrade|newListener|removeListener)$/;
742
+ function shapeOf(receiver) {
743
+ const segs = receiver.replace(/\([^()]*\)/g, '').replace(/\s+/g, '').split('.').filter((s) => s !== 'this');
744
+ if (segs.some((s) => SOCKET_WORDS.test(s)))
745
+ return 'socket';
746
+ if (segs.some((s) => BUS_WORDS.test(s)))
747
+ return 'bus';
748
+ return null;
749
+ }
750
+ function collectEvents(ctx, facts, dispatches, handlers, cache) {
751
+ const { safe, lineOf } = facts;
752
+ const side = facts.socketServer ? 'server' : 'client';
753
+ let m;
754
+ EMIT.lastIndex = 0;
755
+ while ((m = EMIT.exec(safe)) !== null) {
756
+ const shape = shapeOf(m[1]);
757
+ if (!shape || GENERIC_EVENT.test(m[4]))
758
+ continue;
759
+ const line = lineOf(m.index);
760
+ const fn = (0, synth_utils_1.enclosingFn)(facts.nodes, line);
761
+ if (!fn)
762
+ continue;
763
+ dispatches.push({ fn, file: facts.file, line, column: facts.columnOf(m.index), callee: `${m[1].replace(/\s+/g, '')}.${m[2]}`, event: m[4], shape, side });
764
+ }
765
+ for (const d of decorators(safe, 'OnEvent')) {
766
+ const method = decoratedMethod(facts, d.end, null);
767
+ if (!method)
768
+ continue;
769
+ const patterns = d.args.trimStart().startsWith('[') ? allLiterals(d.args) : [firstLiteral(d.args)].filter((x) => x !== null);
770
+ for (const pattern of patterns)
771
+ handlers.push({ node: method, file: facts.file, line: lineOf(d.index), pattern, kind: 'bus', side });
772
+ }
773
+ for (const d of decorators(safe, 'SubscribeMessage')) {
774
+ const method = decoratedMethod(facts, d.end, null);
775
+ const event = firstLiteral(d.args);
776
+ if (!method || event === null)
777
+ continue;
778
+ handlers.push({ node: method, file: facts.file, line: lineOf(d.index), pattern: event, kind: 'socket', side: 'server' });
779
+ }
780
+ SOCKET_ON.lastIndex = 0;
781
+ while ((m = SOCKET_ON.exec(safe)) !== null) {
782
+ if (shapeOf(m[1]) !== 'socket' || GENERIC_EVENT.test(m[3]))
783
+ continue;
784
+ const line = lineOf(m.index);
785
+ const node = handlerNode(ctx, facts, safe.slice(m.index + m[0].length, m.index + m[0].length + 200), line, cache);
786
+ if (!node)
787
+ continue;
788
+ handlers.push({ node, file: facts.file, line, pattern: m[3], kind: 'socket', side });
789
+ }
790
+ }
791
+ /** `user.*` matches one segment, `**` any; anything else is exact. */
792
+ function eventMatches(pattern, event) {
793
+ if (pattern === event)
794
+ return true;
795
+ if (!pattern.includes('*'))
796
+ return false;
797
+ const re = new RegExp('^' + pattern.split('**').map((part) => part.split('*').map(escapeRe).join('[^.]+')).join('.*') + '$');
798
+ return re.test(event);
799
+ }
800
+ function escapeRe(s) {
801
+ return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
802
+ }
803
+ function pairEvents(dispatches, handlers, edges, seen) {
804
+ // Fan-out is judged per event name on each side, as the emitter pass does.
805
+ const dispatchesByEvent = new Map();
806
+ for (const d of dispatches)
807
+ dispatchesByEvent.set(`${d.shape}:${d.event}`, [...(dispatchesByEvent.get(`${d.shape}:${d.event}`) ?? []), d]);
808
+ for (const [, group] of dispatchesByEvent) {
809
+ if (group.length > EVENT_FANOUT_CAP)
810
+ continue;
811
+ for (const d of group) {
812
+ let matched;
813
+ let tier = null;
814
+ if (d.shape === 'bus')
815
+ matched = handlers.filter((h) => h.kind === 'bus' && eventMatches(h.pattern, d.event));
816
+ else if (d.side === 'client') {
817
+ matched = handlers.filter((h) => h.kind === 'socket' && h.side === 'server' && h.pattern === d.event);
818
+ tier = exports.TIER_CLIENT_TO_SERVER;
819
+ }
820
+ else {
821
+ matched = handlers.filter((h) => h.kind === 'socket' && h.side === 'client' && h.pattern === d.event);
822
+ tier = exports.TIER_SERVER_TO_CLIENT;
823
+ }
824
+ if (matched.length === 0 || matched.length > EVENT_FANOUT_CAP)
825
+ continue;
826
+ for (const h of matched) {
827
+ if (h.node.id === d.fn.id)
828
+ continue;
829
+ const key = `${d.fn.id}>${h.node.id}`;
830
+ if (seen.has(key))
831
+ continue;
832
+ seen.add(key);
833
+ edges.push({
834
+ source: d.fn.id,
835
+ target: h.node.id,
836
+ kind: 'calls',
837
+ line: d.line,
838
+ column: d.column,
839
+ provenance: 'heuristic',
840
+ metadata: {
841
+ synthesizedBy: 'event-bus',
842
+ channel: d.shape === 'bus' ? 'event' : 'socket',
843
+ callee: d.callee,
844
+ event: d.event,
845
+ ...(tier ? { tier } : {}),
846
+ registeredAt: `${h.file}:${h.line}`,
847
+ },
848
+ });
849
+ }
850
+ }
851
+ }
852
+ }
853
+ // =============================================================================
854
+ // The pass
855
+ // =============================================================================
856
+ const HTTP_GATE = /\b(?:fetch|\$fetch|ofetch|axios|ky|got|useFetch|useSWR)\b|\.\s*(?:get|post|put|patch|delete|head|options|request|\$get|\$post)\s*[<(]/;
857
+ const QUEUE_GATE = /\.\s*add\s*\(|@Processor\s*\(|\bnew\s+Worker\s*[<(]|\.\s*process\s*\(/;
858
+ const EVENT_GATE = /\.\s*(?:emit|emitAsync|on|once)\s*\(|@OnEvent\s*\(|@SubscribeMessage\s*\(/;
859
+ function hasCrossTierPattern(content) {
860
+ return HTTP_GATE.test(content) || QUEUE_GATE.test(content) || EVENT_GATE.test(content);
861
+ }
862
+ async function crossTierEdges(ctx, onYield) {
863
+ const routes = httpRoutes(ctx);
864
+ const httpSites = [];
865
+ const producers = [];
866
+ const consumers = [];
867
+ const dispatches = [];
868
+ const handlers = [];
869
+ const cache = new Map();
870
+ let scanned = 0;
871
+ for (const file of ctx.getAllFiles()) {
872
+ if (!JS_FILE.test(file) || (0, query_utils_1.isTestPath)(file) || (0, generated_detection_1.isGeneratedFile)(file))
873
+ continue;
874
+ if ((++scanned & 63) === 0)
875
+ await onYield();
876
+ const content = ctx.readFile(file);
877
+ if (!content)
878
+ continue;
879
+ const wantsHttp = routes.length > 0 && HTTP_GATE.test(content);
880
+ const wantsQueue = QUEUE_GATE.test(content);
881
+ const wantsEvents = EVENT_GATE.test(content);
882
+ if (!wantsHttp && !wantsQueue && !wantsEvents)
883
+ continue;
884
+ let facts = cache.get(file);
885
+ if (facts === undefined) {
886
+ facts = readFacts(ctx, file);
887
+ cache.set(file, facts);
888
+ }
889
+ if (!facts)
890
+ continue;
891
+ if (wantsHttp)
892
+ collectHttpSites(ctx, facts, httpSites, cache);
893
+ if (wantsQueue)
894
+ collectQueue(ctx, facts, producers, consumers, cache);
895
+ if (wantsEvents)
896
+ collectEvents(ctx, facts, dispatches, handlers, cache);
897
+ }
898
+ const edges = [];
899
+ const seen = new Set();
900
+ for (const site of httpSites) {
901
+ const route = matchHttp(site, routes);
902
+ if (!route || route.node.id === site.fn.id)
903
+ continue;
904
+ const key = `${site.fn.id}>${route.node.id}`;
905
+ if (seen.has(key))
906
+ continue;
907
+ seen.add(key);
908
+ edges.push({
909
+ source: site.fn.id,
910
+ target: route.node.id,
911
+ kind: 'calls',
912
+ line: site.line,
913
+ column: site.column,
914
+ provenance: 'heuristic',
915
+ metadata: {
916
+ synthesizedBy: 'http-client',
917
+ channel: 'http',
918
+ callee: site.callee,
919
+ tier: exports.TIER_CLIENT_TO_SERVER,
920
+ method: site.method,
921
+ href: site.display,
922
+ registeredAt: `${route.node.filePath}:${route.node.startLine}`,
923
+ },
924
+ });
925
+ }
926
+ await onYield();
927
+ pairQueue(producers, consumers, edges, seen);
928
+ pairEvents(dispatches, handlers, edges, seen);
929
+ return edges;
930
+ }
931
+ //# sourceMappingURL=tier-synthesizer.js.map