@colbymchenry/codegraph-win32-arm64 1.6.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 (622) 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 +599 -291
  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/index.d.ts.map +1 -1
  13. package/lib/dist/context/index.js +43 -2
  14. package/lib/dist/context/index.js.map +1 -1
  15. package/lib/dist/db/index.d.ts +21 -2
  16. package/lib/dist/db/index.d.ts.map +1 -1
  17. package/lib/dist/db/index.js +86 -31
  18. package/lib/dist/db/index.js.map +1 -1
  19. package/lib/dist/db/migrations.d.ts +1 -1
  20. package/lib/dist/db/migrations.d.ts.map +1 -1
  21. package/lib/dist/db/migrations.js +40 -1
  22. package/lib/dist/db/migrations.js.map +1 -1
  23. package/lib/dist/db/queries.d.ts +423 -3
  24. package/lib/dist/db/queries.d.ts.map +1 -1
  25. package/lib/dist/db/queries.js +1026 -33
  26. package/lib/dist/db/queries.js.map +1 -1
  27. package/lib/dist/db/schema.sql +11 -1
  28. package/lib/dist/db/sqlite-adapter.d.ts +2 -0
  29. package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
  30. package/lib/dist/db/sqlite-adapter.js +56 -7
  31. package/lib/dist/db/sqlite-adapter.js.map +1 -1
  32. package/lib/dist/db/synthesis-stage.d.ts +12 -0
  33. package/lib/dist/db/synthesis-stage.d.ts.map +1 -0
  34. package/lib/dist/db/synthesis-stage.js +89 -0
  35. package/lib/dist/db/synthesis-stage.js.map +1 -0
  36. package/lib/dist/db/wal-valve.d.ts +32 -12
  37. package/lib/dist/db/wal-valve.d.ts.map +1 -1
  38. package/lib/dist/db/wal-valve.js +65 -22
  39. package/lib/dist/db/wal-valve.js.map +1 -1
  40. package/lib/dist/db/wsl-shared-index.d.ts +53 -0
  41. package/lib/dist/db/wsl-shared-index.d.ts.map +1 -0
  42. package/lib/dist/db/wsl-shared-index.js +121 -0
  43. package/lib/dist/db/wsl-shared-index.js.map +1 -0
  44. package/lib/dist/directory.d.ts +101 -2
  45. package/lib/dist/directory.d.ts.map +1 -1
  46. package/lib/dist/directory.js +254 -23
  47. package/lib/dist/directory.js.map +1 -1
  48. package/lib/dist/errors.d.ts +14 -0
  49. package/lib/dist/errors.d.ts.map +1 -1
  50. package/lib/dist/errors.js +16 -1
  51. package/lib/dist/errors.js.map +1 -1
  52. package/lib/dist/extraction/cfml-extractor.d.ts +1 -0
  53. package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
  54. package/lib/dist/extraction/cfml-extractor.js +15 -3
  55. package/lib/dist/extraction/cfml-extractor.js.map +1 -1
  56. package/lib/dist/extraction/dfm-extractor.d.ts.map +1 -1
  57. package/lib/dist/extraction/dfm-extractor.js +14 -10
  58. package/lib/dist/extraction/dfm-extractor.js.map +1 -1
  59. package/lib/dist/extraction/extraction-version.d.ts +1 -1
  60. package/lib/dist/extraction/extraction-version.js +1 -1
  61. package/lib/dist/extraction/function-ref.d.ts +6 -4
  62. package/lib/dist/extraction/function-ref.d.ts.map +1 -1
  63. package/lib/dist/extraction/function-ref.js +35 -14
  64. package/lib/dist/extraction/function-ref.js.map +1 -1
  65. package/lib/dist/extraction/grammars.d.ts +38 -0
  66. package/lib/dist/extraction/grammars.d.ts.map +1 -1
  67. package/lib/dist/extraction/grammars.js +77 -1
  68. package/lib/dist/extraction/grammars.js.map +1 -1
  69. package/lib/dist/extraction/index.d.ts +113 -15
  70. package/lib/dist/extraction/index.d.ts.map +1 -1
  71. package/lib/dist/extraction/index.js +599 -132
  72. package/lib/dist/extraction/index.js.map +1 -1
  73. package/lib/dist/extraction/languages/c-cpp.d.ts +58 -0
  74. package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
  75. package/lib/dist/extraction/languages/c-cpp.js +291 -15
  76. package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
  77. package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
  78. package/lib/dist/extraction/languages/dart.js +8 -3
  79. package/lib/dist/extraction/languages/dart.js.map +1 -1
  80. package/lib/dist/extraction/languages/javascript.js +1 -1
  81. package/lib/dist/extraction/languages/javascript.js.map +1 -1
  82. package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
  83. package/lib/dist/extraction/languages/kotlin.js +169 -36
  84. package/lib/dist/extraction/languages/kotlin.js.map +1 -1
  85. package/lib/dist/extraction/languages/lua.d.ts.map +1 -1
  86. package/lib/dist/extraction/languages/lua.js +4 -1
  87. package/lib/dist/extraction/languages/lua.js.map +1 -1
  88. package/lib/dist/extraction/languages/python.d.ts.map +1 -1
  89. package/lib/dist/extraction/languages/python.js +71 -0
  90. package/lib/dist/extraction/languages/python.js.map +1 -1
  91. package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
  92. package/lib/dist/extraction/languages/rust.js +3 -0
  93. package/lib/dist/extraction/languages/rust.js.map +1 -1
  94. package/lib/dist/extraction/languages/scala.d.ts.map +1 -1
  95. package/lib/dist/extraction/languages/scala.js +18 -3
  96. package/lib/dist/extraction/languages/scala.js.map +1 -1
  97. package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
  98. package/lib/dist/extraction/languages/typescript.js +9 -2
  99. package/lib/dist/extraction/languages/typescript.js.map +1 -1
  100. package/lib/dist/extraction/liquid-extractor.d.ts +18 -0
  101. package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
  102. package/lib/dist/extraction/liquid-extractor.js +98 -22
  103. package/lib/dist/extraction/liquid-extractor.js.map +1 -1
  104. package/lib/dist/extraction/mybatis-extractor.d.ts.map +1 -1
  105. package/lib/dist/extraction/mybatis-extractor.js +6 -4
  106. package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
  107. package/lib/dist/extraction/syntax-tokens.d.ts +103 -0
  108. package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -0
  109. package/lib/dist/extraction/syntax-tokens.js +381 -0
  110. package/lib/dist/extraction/syntax-tokens.js.map +1 -0
  111. package/lib/dist/extraction/tree-sitter-helpers.d.ts +5 -0
  112. package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
  113. package/lib/dist/extraction/tree-sitter-helpers.js +17 -0
  114. package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
  115. package/lib/dist/extraction/tree-sitter-types.d.ts +29 -3
  116. package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
  117. package/lib/dist/extraction/tree-sitter.d.ts +96 -17
  118. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
  119. package/lib/dist/extraction/tree-sitter.js +820 -82
  120. package/lib/dist/extraction/tree-sitter.js.map +1 -1
  121. package/lib/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
  122. package/lib/dist/file-limits.d.ts +40 -0
  123. package/lib/dist/file-limits.d.ts.map +1 -0
  124. package/lib/dist/file-limits.js +147 -0
  125. package/lib/dist/file-limits.js.map +1 -0
  126. package/lib/dist/graph/branch-guards.d.ts +248 -0
  127. package/lib/dist/graph/branch-guards.d.ts.map +1 -0
  128. package/lib/dist/graph/branch-guards.js +2231 -0
  129. package/lib/dist/graph/branch-guards.js.map +1 -0
  130. package/lib/dist/graph/dead-code.d.ts +251 -0
  131. package/lib/dist/graph/dead-code.d.ts.map +1 -0
  132. package/lib/dist/graph/dead-code.js +776 -0
  133. package/lib/dist/graph/dead-code.js.map +1 -0
  134. package/lib/dist/graph/dynamic-boundary-report.d.ts +121 -0
  135. package/lib/dist/graph/dynamic-boundary-report.d.ts.map +1 -0
  136. package/lib/dist/graph/dynamic-boundary-report.js +283 -0
  137. package/lib/dist/graph/dynamic-boundary-report.js.map +1 -0
  138. package/lib/dist/graph/index.d.ts +4 -0
  139. package/lib/dist/graph/index.d.ts.map +1 -1
  140. package/lib/dist/graph/index.js +16 -1
  141. package/lib/dist/graph/index.js.map +1 -1
  142. package/lib/dist/graph/named-symbol-flow.d.ts +125 -0
  143. package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -0
  144. package/lib/dist/graph/named-symbol-flow.js +552 -0
  145. package/lib/dist/graph/named-symbol-flow.js.map +1 -0
  146. package/lib/dist/graph/symbol-lookup.d.ts +83 -0
  147. package/lib/dist/graph/symbol-lookup.d.ts.map +1 -0
  148. package/lib/dist/graph/symbol-lookup.js +181 -0
  149. package/lib/dist/graph/symbol-lookup.js.map +1 -0
  150. package/lib/dist/graph/traversal.d.ts +9 -0
  151. package/lib/dist/graph/traversal.d.ts.map +1 -1
  152. package/lib/dist/graph/traversal.js +61 -35
  153. package/lib/dist/graph/traversal.js.map +1 -1
  154. package/lib/dist/graph/type-hierarchy.d.ts +155 -0
  155. package/lib/dist/graph/type-hierarchy.d.ts.map +1 -0
  156. package/lib/dist/graph/type-hierarchy.js +382 -0
  157. package/lib/dist/graph/type-hierarchy.js.map +1 -0
  158. package/lib/dist/index.d.ts +251 -11
  159. package/lib/dist/index.d.ts.map +1 -1
  160. package/lib/dist/index.js +395 -34
  161. package/lib/dist/index.js.map +1 -1
  162. package/lib/dist/installer/index.d.ts.map +1 -1
  163. package/lib/dist/installer/index.js +3 -2
  164. package/lib/dist/installer/index.js.map +1 -1
  165. package/lib/dist/installer/targets/antigravity.d.ts.map +1 -1
  166. package/lib/dist/installer/targets/antigravity.js +14 -2
  167. package/lib/dist/installer/targets/antigravity.js.map +1 -1
  168. package/lib/dist/installer/targets/claude.d.ts +3 -0
  169. package/lib/dist/installer/targets/claude.d.ts.map +1 -1
  170. package/lib/dist/installer/targets/claude.js +35 -7
  171. package/lib/dist/installer/targets/claude.js.map +1 -1
  172. package/lib/dist/installer/targets/codex.d.ts +2 -1
  173. package/lib/dist/installer/targets/codex.d.ts.map +1 -1
  174. package/lib/dist/installer/targets/codex.js +14 -4
  175. package/lib/dist/installer/targets/codex.js.map +1 -1
  176. package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -1
  177. package/lib/dist/installer/targets/copilot-cli.js +7 -1
  178. package/lib/dist/installer/targets/copilot-cli.js.map +1 -1
  179. package/lib/dist/installer/targets/opencode.d.ts +16 -5
  180. package/lib/dist/installer/targets/opencode.d.ts.map +1 -1
  181. package/lib/dist/installer/targets/opencode.js +73 -22
  182. package/lib/dist/installer/targets/opencode.js.map +1 -1
  183. package/lib/dist/installer/targets/shared.d.ts +14 -3
  184. package/lib/dist/installer/targets/shared.d.ts.map +1 -1
  185. package/lib/dist/installer/targets/shared.js +39 -11
  186. package/lib/dist/installer/targets/shared.js.map +1 -1
  187. package/lib/dist/installer/targets/types.d.ts +7 -0
  188. package/lib/dist/installer/targets/types.d.ts.map +1 -1
  189. package/lib/dist/mcp/answer-freshness.d.ts +10 -0
  190. package/lib/dist/mcp/answer-freshness.d.ts.map +1 -0
  191. package/lib/dist/mcp/answer-freshness.js +68 -0
  192. package/lib/dist/mcp/answer-freshness.js.map +1 -0
  193. package/lib/dist/mcp/daemon-manager.d.ts.map +1 -1
  194. package/lib/dist/mcp/daemon-manager.js +16 -0
  195. package/lib/dist/mcp/daemon-manager.js.map +1 -1
  196. package/lib/dist/mcp/daemon-paths.d.ts +2 -0
  197. package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
  198. package/lib/dist/mcp/daemon-paths.js +12 -3
  199. package/lib/dist/mcp/daemon-paths.js.map +1 -1
  200. package/lib/dist/mcp/daemon-registry.d.ts +7 -4
  201. package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
  202. package/lib/dist/mcp/daemon-registry.js +91 -29
  203. package/lib/dist/mcp/daemon-registry.js.map +1 -1
  204. package/lib/dist/mcp/daemon.d.ts +17 -7
  205. package/lib/dist/mcp/daemon.d.ts.map +1 -1
  206. package/lib/dist/mcp/daemon.js +116 -24
  207. package/lib/dist/mcp/daemon.js.map +1 -1
  208. package/lib/dist/mcp/dynamic-boundaries.d.ts +1 -10
  209. package/lib/dist/mcp/dynamic-boundaries.d.ts.map +1 -1
  210. package/lib/dist/mcp/dynamic-boundaries.js +46 -42
  211. package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
  212. package/lib/dist/mcp/engine.d.ts +28 -9
  213. package/lib/dist/mcp/engine.d.ts.map +1 -1
  214. package/lib/dist/mcp/engine.js +146 -62
  215. package/lib/dist/mcp/engine.js.map +1 -1
  216. package/lib/dist/mcp/explore-dedup.d.ts +5 -2
  217. package/lib/dist/mcp/explore-dedup.d.ts.map +1 -1
  218. package/lib/dist/mcp/explore-dedup.js +8 -5
  219. package/lib/dist/mcp/explore-dedup.js.map +1 -1
  220. package/lib/dist/mcp/index-freshness-worker.d.ts +2 -0
  221. package/lib/dist/mcp/index-freshness-worker.d.ts.map +1 -0
  222. package/lib/dist/mcp/index-freshness-worker.js +30 -0
  223. package/lib/dist/mcp/index-freshness-worker.js.map +1 -0
  224. package/lib/dist/mcp/index-freshness.d.ts +7 -0
  225. package/lib/dist/mcp/index-freshness.d.ts.map +1 -0
  226. package/lib/dist/mcp/index-freshness.js +94 -0
  227. package/lib/dist/mcp/index-freshness.js.map +1 -0
  228. package/lib/dist/mcp/index.d.ts +3 -1
  229. package/lib/dist/mcp/index.d.ts.map +1 -1
  230. package/lib/dist/mcp/index.js +95 -11
  231. package/lib/dist/mcp/index.js.map +1 -1
  232. package/lib/dist/mcp/liveness-watchdog.d.ts +4 -1
  233. package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
  234. package/lib/dist/mcp/liveness-watchdog.js +11 -2
  235. package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
  236. package/lib/dist/mcp/project-lifecycle.d.ts +9 -0
  237. package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -0
  238. package/lib/dist/mcp/project-lifecycle.js +181 -0
  239. package/lib/dist/mcp/project-lifecycle.js.map +1 -0
  240. package/lib/dist/mcp/proxy.d.ts.map +1 -1
  241. package/lib/dist/mcp/proxy.js +9 -0
  242. package/lib/dist/mcp/proxy.js.map +1 -1
  243. package/lib/dist/mcp/query-pool.d.ts +2 -2
  244. package/lib/dist/mcp/query-pool.d.ts.map +1 -1
  245. package/lib/dist/mcp/query-pool.js +9 -7
  246. package/lib/dist/mcp/query-pool.js.map +1 -1
  247. package/lib/dist/mcp/query-worker.js +2 -2
  248. package/lib/dist/mcp/query-worker.js.map +1 -1
  249. package/lib/dist/mcp/server-instructions.d.ts +1 -1
  250. package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
  251. package/lib/dist/mcp/server-instructions.js +6 -3
  252. package/lib/dist/mcp/server-instructions.js.map +1 -1
  253. package/lib/dist/mcp/startup-handshake.d.ts +3 -1
  254. package/lib/dist/mcp/startup-handshake.d.ts.map +1 -1
  255. package/lib/dist/mcp/startup-handshake.js +10 -2
  256. package/lib/dist/mcp/startup-handshake.js.map +1 -1
  257. package/lib/dist/mcp/tools.d.ts +276 -36
  258. package/lib/dist/mcp/tools.d.ts.map +1 -1
  259. package/lib/dist/mcp/tools.js +2295 -980
  260. package/lib/dist/mcp/tools.js.map +1 -1
  261. package/lib/dist/mcp/writer-lock.d.ts +61 -0
  262. package/lib/dist/mcp/writer-lock.d.ts.map +1 -0
  263. package/lib/dist/mcp/writer-lock.js +260 -0
  264. package/lib/dist/mcp/writer-lock.js.map +1 -0
  265. package/lib/dist/resolution/alias-binding.d.ts +56 -0
  266. package/lib/dist/resolution/alias-binding.d.ts.map +1 -0
  267. package/lib/dist/resolution/alias-binding.js +127 -0
  268. package/lib/dist/resolution/alias-binding.js.map +1 -0
  269. package/lib/dist/resolution/callback-synthesizer.d.ts +23 -1
  270. package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
  271. package/lib/dist/resolution/callback-synthesizer.js +291 -143
  272. package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
  273. package/lib/dist/resolution/cpp-constructor.d.ts +4 -0
  274. package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -0
  275. package/lib/dist/resolution/cpp-constructor.js +123 -0
  276. package/lib/dist/resolution/cpp-constructor.js.map +1 -0
  277. package/lib/dist/resolution/cpp-macro-visibility.d.ts +12 -0
  278. package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -0
  279. package/lib/dist/resolution/cpp-macro-visibility.js +342 -0
  280. package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -0
  281. package/lib/dist/resolution/expo-router-synthesizer.d.ts +32 -0
  282. package/lib/dist/resolution/expo-router-synthesizer.d.ts.map +1 -0
  283. package/lib/dist/resolution/expo-router-synthesizer.js +189 -0
  284. package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -0
  285. package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
  286. package/lib/dist/resolution/frameworks/csharp.js +96 -2
  287. package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
  288. package/lib/dist/resolution/frameworks/expo-router.d.ts +189 -0
  289. package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -0
  290. package/lib/dist/resolution/frameworks/expo-router.js +785 -0
  291. package/lib/dist/resolution/frameworks/expo-router.js.map +1 -0
  292. package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
  293. package/lib/dist/resolution/frameworks/express.js +251 -16
  294. package/lib/dist/resolution/frameworks/express.js.map +1 -1
  295. package/lib/dist/resolution/frameworks/index.d.ts +5 -0
  296. package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
  297. package/lib/dist/resolution/frameworks/index.js +29 -1
  298. package/lib/dist/resolution/frameworks/index.js.map +1 -1
  299. package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
  300. package/lib/dist/resolution/frameworks/java.js +79 -47
  301. package/lib/dist/resolution/frameworks/java.js.map +1 -1
  302. package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -1
  303. package/lib/dist/resolution/frameworks/nestjs.js +6 -14
  304. package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
  305. package/lib/dist/resolution/frameworks/nextjs.d.ts +76 -0
  306. package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -0
  307. package/lib/dist/resolution/frameworks/nextjs.js +328 -0
  308. package/lib/dist/resolution/frameworks/nextjs.js.map +1 -0
  309. package/lib/dist/resolution/frameworks/object-literal.d.ts +32 -0
  310. package/lib/dist/resolution/frameworks/object-literal.d.ts.map +1 -0
  311. package/lib/dist/resolution/frameworks/object-literal.js +139 -0
  312. package/lib/dist/resolution/frameworks/object-literal.js.map +1 -0
  313. package/lib/dist/resolution/frameworks/package-deps.d.ts +14 -0
  314. package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -0
  315. package/lib/dist/resolution/frameworks/package-deps.js +78 -0
  316. package/lib/dist/resolution/frameworks/package-deps.js.map +1 -0
  317. package/lib/dist/resolution/frameworks/python.d.ts.map +1 -1
  318. package/lib/dist/resolution/frameworks/python.js +166 -0
  319. package/lib/dist/resolution/frameworks/python.js.map +1 -1
  320. package/lib/dist/resolution/frameworks/react-native.d.ts +26 -0
  321. package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
  322. package/lib/dist/resolution/frameworks/react-native.js +153 -14
  323. package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
  324. package/lib/dist/resolution/frameworks/react-router.d.ts +46 -0
  325. package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -0
  326. package/lib/dist/resolution/frameworks/react-router.js +187 -0
  327. package/lib/dist/resolution/frameworks/react-router.js.map +1 -0
  328. package/lib/dist/resolution/frameworks/react.d.ts +2 -1
  329. package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
  330. package/lib/dist/resolution/frameworks/react.js +188 -139
  331. package/lib/dist/resolution/frameworks/react.js.map +1 -1
  332. package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
  333. package/lib/dist/resolution/frameworks/svelte.js +6 -1
  334. package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
  335. package/lib/dist/resolution/frameworks/sveltekit-router.d.ts +36 -0
  336. package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -0
  337. package/lib/dist/resolution/frameworks/sveltekit-router.js +156 -0
  338. package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -0
  339. package/lib/dist/resolution/frameworks/tanstack-router.d.ts +84 -0
  340. package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -0
  341. package/lib/dist/resolution/frameworks/tanstack-router.js +437 -0
  342. package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -0
  343. package/lib/dist/resolution/frameworks/vue-router.d.ts +82 -0
  344. package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -0
  345. package/lib/dist/resolution/frameworks/vue-router.js +377 -0
  346. package/lib/dist/resolution/frameworks/vue-router.js.map +1 -0
  347. package/lib/dist/resolution/import-resolver.d.ts +38 -0
  348. package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
  349. package/lib/dist/resolution/import-resolver.js +376 -26
  350. package/lib/dist/resolution/import-resolver.js.map +1 -1
  351. package/lib/dist/resolution/index.d.ts +89 -25
  352. package/lib/dist/resolution/index.d.ts.map +1 -1
  353. package/lib/dist/resolution/index.js +552 -145
  354. package/lib/dist/resolution/index.js.map +1 -1
  355. package/lib/dist/resolution/js-builtins.d.ts +13 -0
  356. package/lib/dist/resolution/js-builtins.d.ts.map +1 -0
  357. package/lib/dist/resolution/js-builtins.js +46 -0
  358. package/lib/dist/resolution/js-builtins.js.map +1 -0
  359. package/lib/dist/resolution/name-matcher.d.ts +69 -22
  360. package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
  361. package/lib/dist/resolution/name-matcher.js +1902 -87
  362. package/lib/dist/resolution/name-matcher.js.map +1 -1
  363. package/lib/dist/resolution/next-router-synthesizer.d.ts +27 -0
  364. package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -0
  365. package/lib/dist/resolution/next-router-synthesizer.js +113 -0
  366. package/lib/dist/resolution/next-router-synthesizer.js.map +1 -0
  367. package/lib/dist/resolution/react-router-synthesizer.d.ts +33 -0
  368. package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -0
  369. package/lib/dist/resolution/react-router-synthesizer.js +126 -0
  370. package/lib/dist/resolution/react-router-synthesizer.js.map +1 -0
  371. package/lib/dist/resolution/resolver-pool.d.ts +2 -0
  372. package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
  373. package/lib/dist/resolution/resolver-pool.js +4 -0
  374. package/lib/dist/resolution/resolver-pool.js.map +1 -1
  375. package/lib/dist/resolution/strip-comments.d.ts +6 -0
  376. package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
  377. package/lib/dist/resolution/strip-comments.js +58 -0
  378. package/lib/dist/resolution/strip-comments.js.map +1 -1
  379. package/lib/dist/resolution/sveltekit-synthesizer.d.ts +58 -0
  380. package/lib/dist/resolution/sveltekit-synthesizer.d.ts.map +1 -0
  381. package/lib/dist/resolution/sveltekit-synthesizer.js +173 -0
  382. package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -0
  383. package/lib/dist/resolution/synth-utils.d.ts +26 -0
  384. package/lib/dist/resolution/synth-utils.d.ts.map +1 -0
  385. package/lib/dist/resolution/synth-utils.js +75 -0
  386. package/lib/dist/resolution/synth-utils.js.map +1 -0
  387. package/lib/dist/resolution/tanstack-router-synthesizer.d.ts +31 -0
  388. package/lib/dist/resolution/tanstack-router-synthesizer.d.ts.map +1 -0
  389. package/lib/dist/resolution/tanstack-router-synthesizer.js +114 -0
  390. package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -0
  391. package/lib/dist/resolution/tier-synthesizer.d.ts +49 -0
  392. package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -0
  393. package/lib/dist/resolution/tier-synthesizer.js +931 -0
  394. package/lib/dist/resolution/tier-synthesizer.js.map +1 -0
  395. package/lib/dist/resolution/types.d.ts +78 -2
  396. package/lib/dist/resolution/types.d.ts.map +1 -1
  397. package/lib/dist/resolution/types.js +64 -0
  398. package/lib/dist/resolution/types.js.map +1 -1
  399. package/lib/dist/resolution/vue-router-synthesizer.d.ts +30 -0
  400. package/lib/dist/resolution/vue-router-synthesizer.d.ts.map +1 -0
  401. package/lib/dist/resolution/vue-router-synthesizer.js +115 -0
  402. package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -0
  403. package/lib/dist/search/query-paths.d.ts +50 -1
  404. package/lib/dist/search/query-paths.d.ts.map +1 -1
  405. package/lib/dist/search/query-paths.js +227 -12
  406. package/lib/dist/search/query-paths.js.map +1 -1
  407. package/lib/dist/search/query-utils.d.ts +15 -0
  408. package/lib/dist/search/query-utils.d.ts.map +1 -1
  409. package/lib/dist/search/query-utils.js +35 -7
  410. package/lib/dist/search/query-utils.js.map +1 -1
  411. package/lib/dist/sync/watch-policy.d.ts +14 -0
  412. package/lib/dist/sync/watch-policy.d.ts.map +1 -1
  413. package/lib/dist/sync/watch-policy.js +19 -0
  414. package/lib/dist/sync/watch-policy.js.map +1 -1
  415. package/lib/dist/sync/watcher.d.ts +52 -35
  416. package/lib/dist/sync/watcher.d.ts.map +1 -1
  417. package/lib/dist/sync/watcher.js +236 -100
  418. package/lib/dist/sync/watcher.js.map +1 -1
  419. package/lib/dist/telemetry/index.d.ts +4 -2
  420. package/lib/dist/telemetry/index.d.ts.map +1 -1
  421. package/lib/dist/telemetry/index.js +92 -41
  422. package/lib/dist/telemetry/index.js.map +1 -1
  423. package/lib/dist/types.d.ts +1 -1
  424. package/lib/dist/types.d.ts.map +1 -1
  425. package/lib/dist/types.js +1 -0
  426. package/lib/dist/types.js.map +1 -1
  427. package/lib/dist/ui-server/api/deadcode.d.ts +84 -0
  428. package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -0
  429. package/lib/dist/ui-server/api/deadcode.js +136 -0
  430. package/lib/dist/ui-server/api/deadcode.js.map +1 -0
  431. package/lib/dist/ui-server/api/effects.d.ts +87 -0
  432. package/lib/dist/ui-server/api/effects.d.ts.map +1 -0
  433. package/lib/dist/ui-server/api/effects.js +499 -0
  434. package/lib/dist/ui-server/api/effects.js.map +1 -0
  435. package/lib/dist/ui-server/api/entrypoints.d.ts +86 -0
  436. package/lib/dist/ui-server/api/entrypoints.d.ts.map +1 -0
  437. package/lib/dist/ui-server/api/entrypoints.js +279 -0
  438. package/lib/dist/ui-server/api/entrypoints.js.map +1 -0
  439. package/lib/dist/ui-server/api/events.d.ts +183 -0
  440. package/lib/dist/ui-server/api/events.d.ts.map +1 -0
  441. package/lib/dist/ui-server/api/events.js +430 -0
  442. package/lib/dist/ui-server/api/events.js.map +1 -0
  443. package/lib/dist/ui-server/api/file.d.ts +66 -0
  444. package/lib/dist/ui-server/api/file.d.ts.map +1 -0
  445. package/lib/dist/ui-server/api/file.js +235 -0
  446. package/lib/dist/ui-server/api/file.js.map +1 -0
  447. package/lib/dist/ui-server/api/filecode.d.ts +126 -0
  448. package/lib/dist/ui-server/api/filecode.d.ts.map +1 -0
  449. package/lib/dist/ui-server/api/filecode.js +205 -0
  450. package/lib/dist/ui-server/api/filecode.js.map +1 -0
  451. package/lib/dist/ui-server/api/flow.d.ts +226 -0
  452. package/lib/dist/ui-server/api/flow.d.ts.map +1 -0
  453. package/lib/dist/ui-server/api/flow.js +612 -0
  454. package/lib/dist/ui-server/api/flow.js.map +1 -0
  455. package/lib/dist/ui-server/api/hierarchy.d.ts +81 -0
  456. package/lib/dist/ui-server/api/hierarchy.d.ts.map +1 -0
  457. package/lib/dist/ui-server/api/hierarchy.js +92 -0
  458. package/lib/dist/ui-server/api/hierarchy.js.map +1 -0
  459. package/lib/dist/ui-server/api/index.d.ts +90 -0
  460. package/lib/dist/ui-server/api/index.d.ts.map +1 -0
  461. package/lib/dist/ui-server/api/index.js +332 -0
  462. package/lib/dist/ui-server/api/index.js.map +1 -0
  463. package/lib/dist/ui-server/api/map.d.ts +238 -0
  464. package/lib/dist/ui-server/api/map.d.ts.map +1 -0
  465. package/lib/dist/ui-server/api/map.js +681 -0
  466. package/lib/dist/ui-server/api/map.js.map +1 -0
  467. package/lib/dist/ui-server/api/node.d.ts +81 -0
  468. package/lib/dist/ui-server/api/node.d.ts.map +1 -0
  469. package/lib/dist/ui-server/api/node.js +388 -0
  470. package/lib/dist/ui-server/api/node.js.map +1 -0
  471. package/lib/dist/ui-server/api/nodes.d.ts +25 -0
  472. package/lib/dist/ui-server/api/nodes.d.ts.map +1 -0
  473. package/lib/dist/ui-server/api/nodes.js +45 -0
  474. package/lib/dist/ui-server/api/nodes.js.map +1 -0
  475. package/lib/dist/ui-server/api/program.d.ts +139 -0
  476. package/lib/dist/ui-server/api/program.d.ts.map +1 -0
  477. package/lib/dist/ui-server/api/program.js +315 -0
  478. package/lib/dist/ui-server/api/program.js.map +1 -0
  479. package/lib/dist/ui-server/api/respond.d.ts +76 -0
  480. package/lib/dist/ui-server/api/respond.d.ts.map +1 -0
  481. package/lib/dist/ui-server/api/respond.js +186 -0
  482. package/lib/dist/ui-server/api/respond.js.map +1 -0
  483. package/lib/dist/ui-server/api/route-roots.d.ts +39 -0
  484. package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -0
  485. package/lib/dist/ui-server/api/route-roots.js +96 -0
  486. package/lib/dist/ui-server/api/route-roots.js.map +1 -0
  487. package/lib/dist/ui-server/api/routes.d.ts +59 -0
  488. package/lib/dist/ui-server/api/routes.d.ts.map +1 -0
  489. package/lib/dist/ui-server/api/routes.js +108 -0
  490. package/lib/dist/ui-server/api/routes.js.map +1 -0
  491. package/lib/dist/ui-server/api/screens.d.ts +117 -0
  492. package/lib/dist/ui-server/api/screens.d.ts.map +1 -0
  493. package/lib/dist/ui-server/api/screens.js +611 -0
  494. package/lib/dist/ui-server/api/screens.js.map +1 -0
  495. package/lib/dist/ui-server/api/search.d.ts +29 -0
  496. package/lib/dist/ui-server/api/search.d.ts.map +1 -0
  497. package/lib/dist/ui-server/api/search.js +232 -0
  498. package/lib/dist/ui-server/api/search.js.map +1 -0
  499. package/lib/dist/ui-server/api/session.d.ts +52 -0
  500. package/lib/dist/ui-server/api/session.d.ts.map +1 -0
  501. package/lib/dist/ui-server/api/session.js +196 -0
  502. package/lib/dist/ui-server/api/session.js.map +1 -0
  503. package/lib/dist/ui-server/api/source.d.ts +200 -0
  504. package/lib/dist/ui-server/api/source.d.ts.map +1 -0
  505. package/lib/dist/ui-server/api/source.js +422 -0
  506. package/lib/dist/ui-server/api/source.js.map +1 -0
  507. package/lib/dist/ui-server/api/stats.d.ts +27 -0
  508. package/lib/dist/ui-server/api/stats.d.ts.map +1 -0
  509. package/lib/dist/ui-server/api/stats.js +164 -0
  510. package/lib/dist/ui-server/api/stats.js.map +1 -0
  511. package/lib/dist/ui-server/api/steps.d.ts +274 -0
  512. package/lib/dist/ui-server/api/steps.d.ts.map +1 -0
  513. package/lib/dist/ui-server/api/steps.js +1446 -0
  514. package/lib/dist/ui-server/api/steps.js.map +1 -0
  515. package/lib/dist/ui-server/api/trail-store.d.ts +142 -0
  516. package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -0
  517. package/lib/dist/ui-server/api/trail-store.js +323 -0
  518. package/lib/dist/ui-server/api/trail-store.js.map +1 -0
  519. package/lib/dist/ui-server/api/trails.d.ts +163 -0
  520. package/lib/dist/ui-server/api/trails.d.ts.map +1 -0
  521. package/lib/dist/ui-server/api/trails.js +369 -0
  522. package/lib/dist/ui-server/api/trails.js.map +1 -0
  523. package/lib/dist/ui-server/api/when.d.ts +125 -0
  524. package/lib/dist/ui-server/api/when.d.ts.map +1 -0
  525. package/lib/dist/ui-server/api/when.js +251 -0
  526. package/lib/dist/ui-server/api/when.js.map +1 -0
  527. package/lib/dist/ui-server/api/wire.d.ts +179 -0
  528. package/lib/dist/ui-server/api/wire.d.ts.map +1 -0
  529. package/lib/dist/ui-server/api/wire.js +231 -0
  530. package/lib/dist/ui-server/api/wire.js.map +1 -0
  531. package/lib/dist/ui-server/assets.d.ts +40 -0
  532. package/lib/dist/ui-server/assets.d.ts.map +1 -0
  533. package/lib/dist/ui-server/assets.js +110 -0
  534. package/lib/dist/ui-server/assets.js.map +1 -0
  535. package/lib/dist/ui-server/constants.d.ts +32 -0
  536. package/lib/dist/ui-server/constants.d.ts.map +1 -0
  537. package/lib/dist/ui-server/constants.js +35 -0
  538. package/lib/dist/ui-server/constants.js.map +1 -0
  539. package/lib/dist/ui-server/highlight/index.d.ts +113 -0
  540. package/lib/dist/ui-server/highlight/index.d.ts.map +1 -0
  541. package/lib/dist/ui-server/highlight/index.js +307 -0
  542. package/lib/dist/ui-server/highlight/index.js.map +1 -0
  543. package/lib/dist/ui-server/highlight/languages.d.ts +36 -0
  544. package/lib/dist/ui-server/highlight/languages.d.ts.map +1 -0
  545. package/lib/dist/ui-server/highlight/languages.js +50 -0
  546. package/lib/dist/ui-server/highlight/languages.js.map +1 -0
  547. package/lib/dist/ui-server/index.d.ts +92 -0
  548. package/lib/dist/ui-server/index.d.ts.map +1 -0
  549. package/lib/dist/ui-server/index.js +399 -0
  550. package/lib/dist/ui-server/index.js.map +1 -0
  551. package/lib/dist/ui-server/open-browser.d.ts +31 -0
  552. package/lib/dist/ui-server/open-browser.d.ts.map +1 -0
  553. package/lib/dist/ui-server/open-browser.js +79 -0
  554. package/lib/dist/ui-server/open-browser.js.map +1 -0
  555. package/lib/dist/ui-server/security.d.ts +127 -0
  556. package/lib/dist/ui-server/security.d.ts.map +1 -0
  557. package/lib/dist/ui-server/security.js +332 -0
  558. package/lib/dist/ui-server/security.js.map +1 -0
  559. package/lib/dist/ui-server/static.d.ts +45 -0
  560. package/lib/dist/ui-server/static.d.ts.map +1 -0
  561. package/lib/dist/ui-server/static.js +165 -0
  562. package/lib/dist/ui-server/static.js.map +1 -0
  563. package/lib/dist/utils.d.ts +14 -2
  564. package/lib/dist/utils.d.ts.map +1 -1
  565. package/lib/dist/utils.js +25 -10
  566. package/lib/dist/utils.js.map +1 -1
  567. package/lib/dist/viewer/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 +0 -0
  568. package/lib/dist/viewer/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 +0 -0
  569. package/lib/dist/viewer/assets/archivo-vietnamese-wght-normal-XAtsl5Q_.woff2 +0 -0
  570. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-2syK4fUT.woff +0 -0
  571. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-CBJ8pzag.woff2 +0 -0
  572. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
  573. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
  574. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
  575. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
  576. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-CTOM6hUh.woff2 +0 -0
  577. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-fLZuRloM.woff +0 -0
  578. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-B4oTjJdl.woff +0 -0
  579. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-CBjNughH.woff2 +0 -0
  580. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
  581. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
  582. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
  583. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
  584. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-9HEixskS.woff +0 -0
  585. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-V-xxqcpd.woff2 +0 -0
  586. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-66oory27.woff +0 -0
  587. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-BqAiT5Ww.woff2 +0 -0
  588. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
  589. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
  590. package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
  591. package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
  592. package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2 +0 -0
  593. package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-DWFSQ4vo.woff +0 -0
  594. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-B7_fu1kp.woff2 +0 -0
  595. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-Bg0ZHwF4.woff +0 -0
  596. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
  597. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
  598. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
  599. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
  600. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-D38SheWl.woff2 +0 -0
  601. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-DmB0ttJJ.woff +0 -0
  602. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-D6eaYXMU.woff +0 -0
  603. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-DRuN92E5.woff2 +0 -0
  604. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
  605. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
  606. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
  607. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
  608. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-D2EvbN8M.woff2 +0 -0
  609. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-iLQfcSjf.woff +0 -0
  610. package/lib/dist/viewer/assets/index-CF9yvio6.css +1 -0
  611. package/lib/dist/viewer/assets/index-D4S7YUPf.js +97 -0
  612. package/lib/dist/viewer/index.html +16 -0
  613. package/lib/kernel/codegraph-kernel.node +2 -2
  614. package/lib/node_modules/.package-lock.json +4 -4
  615. package/lib/node_modules/picomatch/README.md +56 -51
  616. package/lib/node_modules/picomatch/lib/constants.js +4 -0
  617. package/lib/node_modules/picomatch/lib/parse.js +341 -1
  618. package/lib/node_modules/picomatch/lib/picomatch.js +25 -5
  619. package/lib/node_modules/picomatch/lib/scan.js +30 -18
  620. package/lib/node_modules/picomatch/package.json +4 -4
  621. package/lib/package.json +9 -2
  622. package/package.json +1 -1
@@ -0,0 +1,173 @@
1
+ "use strict";
2
+ /**
3
+ * SvelteKit — navigation written as markup.
4
+ *
5
+ * <a href="/login">Sign in</a>
6
+ * <a href="/profile/@{user.username}">…</a>
7
+ * <a href={`/article/${slug}`}>…</a>
8
+ *
9
+ * SvelteKit has no link component: an ordinary `<a href>` IS the navigation,
10
+ * intercepted by the router. So a page's outgoing links are plain markup, the
11
+ * extractor records no reference for them, and the resolver in
12
+ * `frameworks/sveltekit-router.ts` — which binds `goto` and `redirect` —
13
+ * never sees them. This pass reads every internal `<a href>` out of the
14
+ * source, attributes it to the component (the innermost function) it is
15
+ * written in, matches it against the SvelteKit route table, and synthesizes
16
+ * one `navigates` edge from the component to the page.
17
+ *
18
+ * Edges are `provenance:'heuristic'`, `synthesizedBy:'sveltekit-link'`, with
19
+ * the href as written and `registeredAt` = the markup site. An external href
20
+ * is a link out of the site, not a transition; a computed one is nothing; a
21
+ * path no page serves is nothing. Nothing here runs on a project with no
22
+ * SvelteKit pages.
23
+ *
24
+ * This is `next-router-synthesizer.ts`'s twin over `<a href>` alone — Next
25
+ * reads `<Link href>` too, and Svelte has no such component.
26
+ *
27
+ * A second pass here binds a route to the `+page.svelte` that serves it
28
+ * (`svelteKitPageComponentEdges`): the route node and the component sit in the
29
+ * same file, but nothing joined them, so a SvelteKit page had no body for the
30
+ * Steps picture to walk and opened as a lone box.
31
+ *
32
+ * The other half of the join — a page and the `+page.server.js` beside it — is
33
+ * `callback-synthesizer.ts`'s `svelteKitLoadEdges`, which already existed: a
34
+ * SvelteKit page and its loader are two halves of one route joined by the file
35
+ * system rather than by a call, and without that join a page's own auth guard
36
+ * (`redirect(302, '/login')` in its loader) belongs to no screen at all.
37
+ */
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.svelteKitLinkEdges = svelteKitLinkEdges;
40
+ exports.svelteKitPageComponentEdges = svelteKitPageComponentEdges;
41
+ const query_utils_1 = require("../search/query-utils");
42
+ const expo_router_1 = require("./frameworks/expo-router");
43
+ const nextjs_1 = require("./frameworks/nextjs");
44
+ const sveltekit_router_1 = require("./frameworks/sveltekit-router");
45
+ const synth_utils_1 = require("./synth-utils");
46
+ const MARKUP_FILE = /\.svelte$/;
47
+ /** `<a … href=…`, the attribute anywhere in the tag, quoted or bound. */
48
+ const LINK_TAG = /<a\b([^>]*?)\bhref\s*=\s*(?:"([^"]*)"|'([^']*)'|\{\s*)/g;
49
+ /** Links a single component may carry before it is a navigation menu, not a decision. */
50
+ const MAX_LINKS_PER_COMPONENT = 24;
51
+ async function svelteKitLinkEdges(ctx, onYield) {
52
+ const table = (0, sveltekit_router_1.svelteKitTable)(ctx);
53
+ if (table.byRoot.size === 0)
54
+ return [];
55
+ const edges = [];
56
+ const seen = new Set();
57
+ const perComponent = new Map();
58
+ let scanned = 0;
59
+ for (const file of ctx.getAllFiles()) {
60
+ if (!MARKUP_FILE.test(file) || (0, query_utils_1.isTestPath)(file))
61
+ continue;
62
+ const routes = (0, expo_router_1.routesForFile)(table, file);
63
+ if (!routes || routes.exact.size === 0)
64
+ continue;
65
+ if ((++scanned & 63) === 0)
66
+ await onYield();
67
+ const source = ctx.readFile(file);
68
+ if (!source || !source.includes('href'))
69
+ continue;
70
+ const nodes = ctx.getNodesInFile(file);
71
+ const lineOf = (0, synth_utils_1.makeLineAt)(source, 1);
72
+ LINK_TAG.lastIndex = 0;
73
+ let m;
74
+ while ((m = LINK_TAG.exec(source)) !== null) {
75
+ let literal = m[2] ?? m[3] ?? null;
76
+ if (literal === null) {
77
+ // `href={…}`: a string or a template with holes.
78
+ const at = m.index + m[0].length;
79
+ const ch = source[at];
80
+ if (ch === '"' || ch === "'" || ch === '`')
81
+ literal = (0, expo_router_1.readStringAt)(source, at);
82
+ }
83
+ if (literal === null)
84
+ continue;
85
+ // An external href is a link out of the site, not a transition. A
86
+ // Svelte `{expr}` inside a quoted attribute is an interpolation, so it
87
+ // becomes the same hole a template literal's `${…}` does — which is how
88
+ // `/profile/@{user.username}` reaches the `/profile/@:user` page.
89
+ if (!literal.startsWith('/'))
90
+ continue;
91
+ const href = (0, expo_router_1.toHref)(literal.replace(/\{[^}]*\}/g, expo_router_1.HOLE));
92
+ if (!href)
93
+ continue;
94
+ const line = lineOf(m.index);
95
+ const component = (0, synth_utils_1.enclosingFn)(nodes, line);
96
+ if (!component)
97
+ continue;
98
+ // A destination written as a choice names one route per arm, and the
99
+ // user reaches every one of them — each is drawn.
100
+ for (const { node: page, href: arm } of (0, nextjs_1.destinationsForHref)(href, routes)) {
101
+ const key = `${component.id}>${page.id}`;
102
+ if (seen.has(key))
103
+ continue;
104
+ const count = (perComponent.get(component.id) ?? 0) + 1;
105
+ perComponent.set(component.id, count);
106
+ if (count > MAX_LINKS_PER_COMPONENT)
107
+ continue;
108
+ seen.add(key);
109
+ edges.push({
110
+ source: component.id,
111
+ target: page.id,
112
+ kind: 'navigates',
113
+ line,
114
+ provenance: 'heuristic',
115
+ metadata: {
116
+ synthesizedBy: 'sveltekit-link',
117
+ href: arm.display,
118
+ navMethod: 'a',
119
+ registeredAt: `${file}:${line}`,
120
+ },
121
+ });
122
+ }
123
+ }
124
+ }
125
+ return edges;
126
+ }
127
+ // =============================================================================
128
+ // A route and the page that serves it
129
+ // =============================================================================
130
+ /**
131
+ * One `calls` edge from each `+page.svelte` route to the component in its own
132
+ * file — the page that renders when a navigation lands there.
133
+ *
134
+ * Every other framework's resolver names this at extraction: a Next page route
135
+ * points at the file's default export, a React Router route at the component
136
+ * the markup named. SvelteKit's route is derived from the file's PATH, and its
137
+ * component has no name of its own to reference (every page file's component
138
+ * is called `+page`), so the two are joined here, where both are already in
139
+ * hand and the match is the file itself rather than a name.
140
+ *
141
+ * With it, `route-roots.ts` reads the page as the route's root: the Steps
142
+ * picture starts at the page instead of at an empty box, and the Screens walk
143
+ * attributes a navigation to the screen whose component holds it rather than
144
+ * falling back to the file it was written in.
145
+ */
146
+ async function svelteKitPageComponentEdges(ctx, onYield) {
147
+ const table = (0, sveltekit_router_1.svelteKitTable)(ctx);
148
+ if (table.byRoot.size === 0)
149
+ return [];
150
+ const edges = [];
151
+ let scanned = 0;
152
+ const pages = new Set();
153
+ for (const routes of table.byRoot.values())
154
+ for (const page of routes.exact.values())
155
+ pages.add(page);
156
+ for (const page of pages) {
157
+ if ((++scanned & 31) === 0)
158
+ await onYield();
159
+ const component = ctx.getNodesInFile(page.filePath).find((n) => n.kind === 'component');
160
+ if (!component)
161
+ continue;
162
+ edges.push({
163
+ source: page.id,
164
+ target: component.id,
165
+ kind: 'calls',
166
+ line: component.startLine,
167
+ provenance: 'heuristic',
168
+ metadata: { synthesizedBy: 'sveltekit-page', registeredAt: page.filePath },
169
+ });
170
+ }
171
+ return edges;
172
+ }
173
+ //# sourceMappingURL=sveltekit-synthesizer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sveltekit-synthesizer.js","sourceRoot":"","sources":["../../src/resolution/sveltekit-synthesizer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;;AAmBH,gDA+DC;AAwBD,kEAqBC;AA1HD,uDAAmD;AACnD,0DAAqF;AACrF,gDAA0D;AAC1D,oEAA+D;AAC/D,+CAAwD;AAExD,MAAM,WAAW,GAAG,WAAW,CAAC;AAEhC,yEAAyE;AACzE,MAAM,QAAQ,GAAG,yDAAyD,CAAC;AAE3E,yFAAyF;AACzF,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAE5B,KAAK,UAAU,kBAAkB,CAAC,GAAsB,EAAE,OAAmB;IAClF,MAAM,KAAK,GAAG,IAAA,iCAAc,EAAC,GAAG,CAAC,CAAC;IAClC,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACvC,MAAM,KAAK,GAAW,EAAE,CAAC;IACzB,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,MAAM,YAAY,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC/C,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC;QACrC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAA,wBAAU,EAAC,IAAI,CAAC;YAAE,SAAS;QAC1D,MAAM,MAAM,GAAG,IAAA,2BAAa,EAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAC1C,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK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AI,CAAC,QAAQ,EAAE;SAC3E,CAAC,CAAC;IACL,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Small helpers the dynamic-edge synthesizers share: a per-match line
3
+ * resolver over one source string, and "the function this line is in".
4
+ */
5
+ import type { Node } from '../types';
6
+ /** The kinds a call site can be attributed to. */
7
+ export declare const FN_KINDS: ReadonlySet<string>;
8
+ /**
9
+ * Per-match line resolver over `src`, 1-based at `baseLine`. The inline
10
+ * `src.slice(0, idx).split('\n').length` idiom is O(source-length) PER MATCH,
11
+ * which goes quadratic on a match-dense source (a generated function full of
12
+ * `.push(` calls re-scanned tens of thousands of times was most of the #1235
13
+ * indexing wedge). Builds the newline index once — lazily, since most sources
14
+ * never produce a match — then answers each call with a binary search.
15
+ */
16
+ export declare function makeLineAt(src: string, baseLine: number): (idx: number) => number;
17
+ /** Innermost function/method node whose line range contains `line`. */
18
+ export declare function enclosingFn(nodesInFile: readonly Node[], line: number): Node | null;
19
+ /**
20
+ * The smallest `constant` / `variable` node whose lines contain `line` — the
21
+ * value a top-level registration is written inside (`const worker = new
22
+ * Worker('q', async (job) => …)`): what a caller imports and a walk can start
23
+ * from when no function encloses the site.
24
+ */
25
+ export declare function enclosingValue(nodesInFile: readonly Node[], line: number): Node | null;
26
+ //# sourceMappingURL=synth-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"synth-utils.d.ts","sourceRoot":"","sources":["../../src/resolution/synth-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAErC,kDAAkD;AAClD,eAAO,MAAM,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAgD,CAAC;AAE1F;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAiBjF;AAED,uEAAuE;AACvE,wBAAgB,WAAW,CAAC,WAAW,EAAE,SAAS,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAUnF;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,SAAS,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAUtF"}
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ /**
3
+ * Small helpers the dynamic-edge synthesizers share: a per-match line
4
+ * resolver over one source string, and "the function this line is in".
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.FN_KINDS = void 0;
8
+ exports.makeLineAt = makeLineAt;
9
+ exports.enclosingFn = enclosingFn;
10
+ exports.enclosingValue = enclosingValue;
11
+ /** The kinds a call site can be attributed to. */
12
+ exports.FN_KINDS = new Set(['method', 'function', 'component']);
13
+ /**
14
+ * Per-match line resolver over `src`, 1-based at `baseLine`. The inline
15
+ * `src.slice(0, idx).split('\n').length` idiom is O(source-length) PER MATCH,
16
+ * which goes quadratic on a match-dense source (a generated function full of
17
+ * `.push(` calls re-scanned tens of thousands of times was most of the #1235
18
+ * indexing wedge). Builds the newline index once — lazily, since most sources
19
+ * never produce a match — then answers each call with a binary search.
20
+ */
21
+ function makeLineAt(src, baseLine) {
22
+ let nl = null;
23
+ return (idx) => {
24
+ if (!nl) {
25
+ nl = [];
26
+ for (let i = src.indexOf('\n'); i !== -1; i = src.indexOf('\n', i + 1))
27
+ nl.push(i);
28
+ }
29
+ // Count newlines strictly before idx.
30
+ let lo = 0;
31
+ let hi = nl.length;
32
+ while (lo < hi) {
33
+ const mid = (lo + hi) >> 1;
34
+ if (nl[mid] < idx)
35
+ lo = mid + 1;
36
+ else
37
+ hi = mid;
38
+ }
39
+ return baseLine + lo;
40
+ };
41
+ }
42
+ /** Innermost function/method node whose line range contains `line`. */
43
+ function enclosingFn(nodesInFile, line) {
44
+ let best = null;
45
+ for (const n of nodesInFile) {
46
+ if (!exports.FN_KINDS.has(n.kind))
47
+ continue;
48
+ const end = n.endLine ?? n.startLine;
49
+ if (n.startLine <= line && end >= line) {
50
+ if (!best || n.startLine >= best.startLine)
51
+ best = n; // prefer the tightest (latest-starting) encloser
52
+ }
53
+ }
54
+ return best;
55
+ }
56
+ /**
57
+ * The smallest `constant` / `variable` node whose lines contain `line` — the
58
+ * value a top-level registration is written inside (`const worker = new
59
+ * Worker('q', async (job) => …)`): what a caller imports and a walk can start
60
+ * from when no function encloses the site.
61
+ */
62
+ function enclosingValue(nodesInFile, line) {
63
+ let best = null;
64
+ for (const n of nodesInFile) {
65
+ if (n.kind !== 'constant' && n.kind !== 'variable')
66
+ continue;
67
+ const end = n.endLine ?? n.startLine;
68
+ if (n.startLine <= line && end >= line) {
69
+ if (!best || n.startLine >= best.startLine)
70
+ best = n;
71
+ }
72
+ }
73
+ return best;
74
+ }
75
+ //# sourceMappingURL=synth-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"synth-utils.js","sourceRoot":"","sources":["../../src/resolution/synth-utils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAeH,gCAiBC;AAGD,kCAUC;AAQD,wCAUC;AA3DD,kDAAkD;AACrC,QAAA,QAAQ,GAAwB,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;AAE1F;;;;;;;GAOG;AACH,SAAgB,UAAU,CAAC,GAAW,EAAE,QAAgB;IACtD,IAAI,EAAE,GAAoB,IAAI,CAAC;IAC/B,OAAO,CAAC,GAAW,EAAE,EAAE;QACrB,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,EAAE,GAAG,EAAE,CAAC;YACR,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,G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IAAI,CAAC,CAAC,IAAI,KAAK,UAAU;YAAE,SAAS;QAC7D,MAAM,GAAG,GAAG,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,SAAS,CAAC;QACrC,IAAI,CAAC,CAAC,SAAS,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YACvC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS;gBAAE,IAAI,GAAG,CAAC,CAAC;QACvD,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * TanStack Router — navigation written as markup.
3
+ *
4
+ * <Link to="/dashboard/invoices/$invoiceId" params={{ invoiceId: 3 }}>…</Link>
5
+ * <Link to="/login">Sign in</Link>
6
+ * <Navigate to="/dashboard" />
7
+ *
8
+ * A JSX attribute is not a call, so the extractor records no reference for it
9
+ * and the resolver in `frameworks/tanstack-router.ts` — which binds
10
+ * `navigate({ to })` and `redirect({ to })` — never sees it. This pass reads
11
+ * every `to` out of the source, attributes it to the component (the innermost
12
+ * function) it is written in, matches it against the TanStack route table, and
13
+ * synthesizes one `navigates` edge from the component to the route.
14
+ *
15
+ * What makes this different from React Router's identical-looking `<Link to>`:
16
+ * TanStack's `to` is the route PATTERN and the values ride beside it in
17
+ * `params`, so `to="/posts/$postId"` names the route rather than an address —
18
+ * and it is normalised the same way a route name is instead of being read as a
19
+ * URL. A `<Link from=…>` with no `to` is a relative link within the route it
20
+ * is already on, and names no destination of its own.
21
+ *
22
+ * Edges are `provenance:'heuristic'`, `synthesizedBy:'tanstack-link'`, with the
23
+ * destination as written and `registeredAt` = the JSX site. A computed `to` is
24
+ * nothing; a pattern no route serves is nothing. Nothing here runs on a project
25
+ * with no TanStack routes.
26
+ */
27
+ import type { Edge } from '../types';
28
+ import type { ResolutionContext } from './types';
29
+ import type { MaybeYield } from './cooperative-yield';
30
+ export declare function tanstackLinkEdges(ctx: ResolutionContext, onYield: MaybeYield): Promise<Edge[]>;
31
+ //# sourceMappingURL=tanstack-router-synthesizer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tanstack-router-synthesizer.d.ts","sourceRoot":"","sources":["../../src/resolution/tanstack-router-synthesizer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAmBtD,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,iBAAiB,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CA2DpG"}
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ /**
3
+ * TanStack Router — navigation written as markup.
4
+ *
5
+ * <Link to="/dashboard/invoices/$invoiceId" params={{ invoiceId: 3 }}>…</Link>
6
+ * <Link to="/login">Sign in</Link>
7
+ * <Navigate to="/dashboard" />
8
+ *
9
+ * A JSX attribute is not a call, so the extractor records no reference for it
10
+ * and the resolver in `frameworks/tanstack-router.ts` — which binds
11
+ * `navigate({ to })` and `redirect({ to })` — never sees it. This pass reads
12
+ * every `to` out of the source, attributes it to the component (the innermost
13
+ * function) it is written in, matches it against the TanStack route table, and
14
+ * synthesizes one `navigates` edge from the component to the route.
15
+ *
16
+ * What makes this different from React Router's identical-looking `<Link to>`:
17
+ * TanStack's `to` is the route PATTERN and the values ride beside it in
18
+ * `params`, so `to="/posts/$postId"` names the route rather than an address —
19
+ * and it is normalised the same way a route name is instead of being read as a
20
+ * URL. A `<Link from=…>` with no `to` is a relative link within the route it
21
+ * is already on, and names no destination of its own.
22
+ *
23
+ * Edges are `provenance:'heuristic'`, `synthesizedBy:'tanstack-link'`, with the
24
+ * destination as written and `registeredAt` = the JSX site. A computed `to` is
25
+ * nothing; a pattern no route serves is nothing. Nothing here runs on a project
26
+ * with no TanStack routes.
27
+ */
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.tanstackLinkEdges = tanstackLinkEdges;
30
+ const strip_comments_1 = require("./strip-comments");
31
+ const query_utils_1 = require("../search/query-utils");
32
+ const expo_router_1 = require("./frameworks/expo-router");
33
+ const nextjs_1 = require("./frameworks/nextjs");
34
+ const tanstack_router_1 = require("./frameworks/tanstack-router");
35
+ const synth_utils_1 = require("./synth-utils");
36
+ const JSX_FILE = /\.(?:[cm]?[jt]sx?)$/;
37
+ /** `<Link … to=` / `<Navigate … to=`, the attribute anywhere in the tag. */
38
+ const LINK_TAG = /<(Link|Navigate)\b([^>]*?)\bto\s*=\s*(?:"([^"]*)"|'([^']*)'|\{\s*)/g;
39
+ /** A tag this pass could possibly match — the cheap prefilter. */
40
+ const HAS_LINK_TAG = /<(?:Link|Navigate)\b/;
41
+ /** Links a single component may carry before it is a navigation menu, not a decision. */
42
+ const MAX_LINKS_PER_COMPONENT = 24;
43
+ async function tanstackLinkEdges(ctx, onYield) {
44
+ const table = (0, tanstack_router_1.tanstackTable)(ctx);
45
+ if (table.byRoot.size === 0)
46
+ return [];
47
+ const edges = [];
48
+ const seen = new Set();
49
+ const perComponent = new Map();
50
+ let scanned = 0;
51
+ for (const file of ctx.getAllFiles()) {
52
+ if (!JSX_FILE.test(file) || (0, query_utils_1.isTestPath)(file))
53
+ continue;
54
+ const routes = (0, expo_router_1.routesForFile)(table, file);
55
+ if (!routes || routes.exact.size === 0)
56
+ continue;
57
+ if ((++scanned & 63) === 0)
58
+ await onYield();
59
+ const source = ctx.readFile(file);
60
+ if (!source || !HAS_LINK_TAG.test(source))
61
+ continue;
62
+ const safe = (0, strip_comments_1.stripCommentsForRegex)(source, 'typescript');
63
+ const nodes = ctx.getNodesInFile(file);
64
+ const lineOf = (0, synth_utils_1.makeLineAt)(safe, 1);
65
+ LINK_TAG.lastIndex = 0;
66
+ let m;
67
+ while ((m = LINK_TAG.exec(safe)) !== null) {
68
+ let literal = m[3] ?? m[4] ?? null;
69
+ if (literal === null) {
70
+ // `to={…}`: a string or a template.
71
+ const at = m.index + m[0].length;
72
+ const ch = safe[at];
73
+ if (ch === '"' || ch === "'" || ch === '`')
74
+ literal = (0, expo_router_1.readStringAt)(safe, at);
75
+ }
76
+ if (literal === null)
77
+ continue;
78
+ const href = (0, tanstack_router_1.tanstackDestination)(JSON.stringify(literal));
79
+ if (!href)
80
+ continue;
81
+ const line = lineOf(m.index);
82
+ const component = (0, synth_utils_1.enclosingFn)(nodes, line);
83
+ if (!component)
84
+ continue;
85
+ // A destination written as a choice names one route per arm, and the
86
+ // user reaches every one of them — each is drawn.
87
+ for (const { node: route, href: arm } of (0, nextjs_1.destinationsForHref)(href, routes)) {
88
+ const key = `${component.id}>${route.id}`;
89
+ if (seen.has(key))
90
+ continue;
91
+ const count = (perComponent.get(component.id) ?? 0) + 1;
92
+ perComponent.set(component.id, count);
93
+ if (count > MAX_LINKS_PER_COMPONENT)
94
+ continue;
95
+ seen.add(key);
96
+ edges.push({
97
+ source: component.id,
98
+ target: route.id,
99
+ kind: 'navigates',
100
+ line,
101
+ provenance: 'heuristic',
102
+ metadata: {
103
+ synthesizedBy: 'tanstack-link',
104
+ href: arm.display,
105
+ navMethod: m[1] === 'Navigate' ? 'navigate' : 'link',
106
+ registeredAt: `${file}:${line}`,
107
+ },
108
+ });
109
+ }
110
+ }
111
+ }
112
+ return edges;
113
+ }
114
+ //# sourceMappingURL=tanstack-router-synthesizer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tanstack-router-synthesizer.js","sourceRoot":"","sources":["../../src/resolution/tanstack-router-synthesizer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;;AAuBH,8CA2DC;AA7ED,qDAAyD;AACzD,uDAAmD;AACnD,0DAAuE;AACvE,gDAA0D;AAC1D,kEAAkF;AAClF,+CAAwD;AAExD,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IAAI,EAAE,MAAM,CAAC,EAAE,CAAC;gBAC3E,MAAM,GAAG,GAAG,GAAG,SAAS,CAAC,EAAE,IAAI,KAAK,CAAC,EAAE,EAAE,CAAC;gBAC1C,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;oBAAE,SAAS;gBAC5B,MAAM,KAAK,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;gBACxD,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;gBACtC,IAAI,KAAK,GAAG,uBAAuB;oBAAE,SAAS;gBAC9C,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBACd,KAAK,CAAC,IAAI,CAAC;oBACT,MAAM,EAAE,SAAS,CAAC,EAAE;oBACpB,MAAM,EAAE,KAAK,CAAC,EAAE;oBAChB,IAAI,EAAE,WAAW;oBACjB,IAAI;oBACJ,UAAU,EAAE,WAAW;oBACvB,QAAQ,EAAE;wBACR,aAAa,EAAE,eAAe;wBAC9B,IAAI,EAAE,GAAG,CAAC,OAAO;wBACjB,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM;wBACpD,YAAY,EAAE,GAAG,IAAI,IAAI,IAAI,EAAE;qBAChC;iBACF,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Cross-tier channels — the web's equivalent of the React Native bridge.
3
+ *
4
+ * A web app is two programs that talk over a wire the graph cannot see: the
5
+ * page calls `fetch('/api/users', { method: 'POST' })` and the API's
6
+ * `app.post('/api/users', createUser)` answers; a service puts `'welcome'` on
7
+ * the `email` queue and a `@Process('welcome')` method picks it up; a
8
+ * gateway's `this.server.emit('message')` lands in the component that wrote
9
+ * `socket.on('message', …)`. Each hop is a string on both sides, which is the
10
+ * evidence that lets a synthesizer close it — exactly as the RN event channel
11
+ * pairs `sendEvent(withName: "x")` with `addListener('x')`.
12
+ *
13
+ * Three channels, one scan:
14
+ *
15
+ * 1. **`http-client`** — a literal path in a client call (`fetch`, `axios.post`,
16
+ * `ky`, `got`, `$fetch`, `useFetch`, `useSWR`, or a project instance made by
17
+ * `axios.create(…)` / `ky.extend(…)`) → the ONE route node `METHOD path` it
18
+ * denotes. Template holes match a `:param`; a hole in front of the path
19
+ * (`${API_URL}/users`) matches a route by its tail; a variable url, a path
20
+ * no route serves, or a path two routes serve alike produce nothing.
21
+ * Edge: enclosing function → route, `tier: 'client→server'`.
22
+ * 2. **`queue-job`** — `queue.add('job', …)` where the queue is named (`new
23
+ * Queue('email')`, `@InjectQueue('email')`) → the `@Process('job')` method
24
+ * of the `@Processor('email')` class, a WorkerHost's `process`, a
25
+ * `new Worker('email', handler)`, or Bull's `queue.process('job', handler)`.
26
+ * 3. **`event-bus`** — `eventEmitter.emit('user.created')` → `@OnEvent('user.created')`
27
+ * (globs honoured); and sockets in both directions: a client's
28
+ * `socket.emit('x')` → the server's `@SubscribeMessage('x')` / `socket.on('x')`
29
+ * (`tier: 'client→server'`), the server's `server.emit('x')` → the client's
30
+ * `socket.on('x', …)` (`tier: 'server→client'`). The in-process
31
+ * `.on('x', fn)` ↔ `.emit('x')` pairing stays the emitter pass's.
32
+ *
33
+ * Every edge is `kind: 'calls'`, `provenance: 'heuristic'`, and carries
34
+ * `synthesizedBy`, `channel` (`http` | `queue` | `event` | `socket`), the
35
+ * `tier` when the direction is known, the `event` / `queue` / `method` /
36
+ * `href` it was paired on, and `registeredAt` — the route registration, the
37
+ * decorator, the `.on` — so a reader can check the pairing. Fan-out is capped
38
+ * per event as the emitter pass caps it; an HTTP pairing needs no cap because
39
+ * it is exact. Test suites and generated files are never sources: a supertest
40
+ * call is the test's story, and forty of them would make the route a hub.
41
+ */
42
+ import type { Edge } from '../types';
43
+ import type { ResolutionContext } from './types';
44
+ import type { MaybeYield } from './cooperative-yield';
45
+ export declare const TIER_CLIENT_TO_SERVER = "client\u2192server";
46
+ export declare const TIER_SERVER_TO_CLIENT = "server\u2192client";
47
+ export declare function hasCrossTierPattern(content: string): boolean;
48
+ export declare function crossTierEdges(ctx: ResolutionContext, onYield: MaybeYield): Promise<Edge[]>;
49
+ //# sourceMappingURL=tier-synthesizer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tier-synthesizer.d.ts","sourceRoot":"","sources":["../../src/resolution/tier-synthesizer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAkB,MAAM,UAAU,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAetD,eAAO,MAAM,qBAAqB,uBAAkB,CAAC;AACrD,eAAO,MAAM,qBAAqB,uBAAkB,CAAC;AA20BrD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,iBAAiB,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CA4DjG"}