@colbymchenry/codegraph-win32-arm64 1.6.0 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (761) hide show
  1. package/bin/codegraph +5 -0
  2. package/lib/dist/.test-build-engine.json +1 -0
  3. package/lib/dist/.test-build-viewer.json +1 -0
  4. package/lib/dist/bin/codegraph.d.ts +1 -0
  5. package/lib/dist/bin/codegraph.d.ts.map +1 -1
  6. package/lib/dist/bin/codegraph.js +605 -291
  7. package/lib/dist/bin/codegraph.js.map +1 -1
  8. package/lib/dist/bin/command-supervision.d.ts +7 -0
  9. package/lib/dist/bin/command-supervision.d.ts.map +1 -1
  10. package/lib/dist/bin/command-supervision.js +39 -27
  11. package/lib/dist/bin/command-supervision.js.map +1 -1
  12. package/lib/dist/bin/viewer-gate.d.ts +17 -0
  13. package/lib/dist/bin/viewer-gate.d.ts.map +1 -0
  14. package/lib/dist/bin/viewer-gate.js +31 -0
  15. package/lib/dist/bin/viewer-gate.js.map +1 -0
  16. package/lib/dist/context/index.d.ts.map +1 -1
  17. package/lib/dist/context/index.js +43 -2
  18. package/lib/dist/context/index.js.map +1 -1
  19. package/lib/dist/db/index.d.ts +21 -2
  20. package/lib/dist/db/index.d.ts.map +1 -1
  21. package/lib/dist/db/index.js +86 -31
  22. package/lib/dist/db/index.js.map +1 -1
  23. package/lib/dist/db/migrations.d.ts +1 -1
  24. package/lib/dist/db/migrations.d.ts.map +1 -1
  25. package/lib/dist/db/migrations.js +40 -1
  26. package/lib/dist/db/migrations.js.map +1 -1
  27. package/lib/dist/db/queries.d.ts +454 -10
  28. package/lib/dist/db/queries.d.ts.map +1 -1
  29. package/lib/dist/db/queries.js +1080 -41
  30. package/lib/dist/db/queries.js.map +1 -1
  31. package/lib/dist/db/schema.sql +11 -1
  32. package/lib/dist/db/sqlite-adapter.d.ts +2 -0
  33. package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
  34. package/lib/dist/db/sqlite-adapter.js +56 -7
  35. package/lib/dist/db/sqlite-adapter.js.map +1 -1
  36. package/lib/dist/db/synthesis-stage.d.ts +12 -0
  37. package/lib/dist/db/synthesis-stage.d.ts.map +1 -0
  38. package/lib/dist/db/synthesis-stage.js +89 -0
  39. package/lib/dist/db/synthesis-stage.js.map +1 -0
  40. package/lib/dist/db/wal-valve.d.ts +32 -12
  41. package/lib/dist/db/wal-valve.d.ts.map +1 -1
  42. package/lib/dist/db/wal-valve.js +65 -22
  43. package/lib/dist/db/wal-valve.js.map +1 -1
  44. package/lib/dist/db/wsl-shared-index.d.ts +53 -0
  45. package/lib/dist/db/wsl-shared-index.d.ts.map +1 -0
  46. package/lib/dist/db/wsl-shared-index.js +121 -0
  47. package/lib/dist/db/wsl-shared-index.js.map +1 -0
  48. package/lib/dist/directory.d.ts +131 -2
  49. package/lib/dist/directory.d.ts.map +1 -1
  50. package/lib/dist/directory.js +299 -23
  51. package/lib/dist/directory.js.map +1 -1
  52. package/lib/dist/errors.d.ts +14 -0
  53. package/lib/dist/errors.d.ts.map +1 -1
  54. package/lib/dist/errors.js +16 -1
  55. package/lib/dist/errors.js.map +1 -1
  56. package/lib/dist/extraction/astro-extractor.d.ts.map +1 -1
  57. package/lib/dist/extraction/astro-extractor.js +7 -35
  58. package/lib/dist/extraction/astro-extractor.js.map +1 -1
  59. package/lib/dist/extraction/cfml-extractor.d.ts +77 -10
  60. package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
  61. package/lib/dist/extraction/cfml-extractor.js +302 -71
  62. package/lib/dist/extraction/cfml-extractor.js.map +1 -1
  63. package/lib/dist/extraction/commonjs-requires.d.ts +23 -0
  64. package/lib/dist/extraction/commonjs-requires.d.ts.map +1 -0
  65. package/lib/dist/extraction/commonjs-requires.js +68 -0
  66. package/lib/dist/extraction/commonjs-requires.js.map +1 -0
  67. package/lib/dist/extraction/dfm-extractor.d.ts.map +1 -1
  68. package/lib/dist/extraction/dfm-extractor.js +14 -10
  69. package/lib/dist/extraction/dfm-extractor.js.map +1 -1
  70. package/lib/dist/extraction/extraction-version.d.ts +1 -1
  71. package/lib/dist/extraction/extraction-version.js +1 -1
  72. package/lib/dist/extraction/function-ref.d.ts +6 -4
  73. package/lib/dist/extraction/function-ref.d.ts.map +1 -1
  74. package/lib/dist/extraction/function-ref.js +35 -14
  75. package/lib/dist/extraction/function-ref.js.map +1 -1
  76. package/lib/dist/extraction/generated-detection.d.ts +9 -0
  77. package/lib/dist/extraction/generated-detection.d.ts.map +1 -1
  78. package/lib/dist/extraction/generated-detection.js +42 -2
  79. package/lib/dist/extraction/generated-detection.js.map +1 -1
  80. package/lib/dist/extraction/grammars.d.ts +40 -0
  81. package/lib/dist/extraction/grammars.d.ts.map +1 -1
  82. package/lib/dist/extraction/grammars.js +171 -1
  83. package/lib/dist/extraction/grammars.js.map +1 -1
  84. package/lib/dist/extraction/index.d.ts +132 -19
  85. package/lib/dist/extraction/index.d.ts.map +1 -1
  86. package/lib/dist/extraction/index.js +825 -195
  87. package/lib/dist/extraction/index.js.map +1 -1
  88. package/lib/dist/extraction/kernel/index.d.ts.map +1 -1
  89. package/lib/dist/extraction/kernel/index.js +6 -0
  90. package/lib/dist/extraction/kernel/index.js.map +1 -1
  91. package/lib/dist/extraction/languages/c-cpp.d.ts +73 -0
  92. package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
  93. package/lib/dist/extraction/languages/c-cpp.js +412 -16
  94. package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
  95. package/lib/dist/extraction/languages/csharp.d.ts.map +1 -1
  96. package/lib/dist/extraction/languages/csharp.js +14 -5
  97. package/lib/dist/extraction/languages/csharp.js.map +1 -1
  98. package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
  99. package/lib/dist/extraction/languages/dart.js +16 -3
  100. package/lib/dist/extraction/languages/dart.js.map +1 -1
  101. package/lib/dist/extraction/languages/javascript.js +1 -1
  102. package/lib/dist/extraction/languages/javascript.js.map +1 -1
  103. package/lib/dist/extraction/languages/kotlin.d.ts +4 -0
  104. package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
  105. package/lib/dist/extraction/languages/kotlin.js +237 -36
  106. package/lib/dist/extraction/languages/kotlin.js.map +1 -1
  107. package/lib/dist/extraction/languages/lua.d.ts.map +1 -1
  108. package/lib/dist/extraction/languages/lua.js +4 -1
  109. package/lib/dist/extraction/languages/lua.js.map +1 -1
  110. package/lib/dist/extraction/languages/python.d.ts.map +1 -1
  111. package/lib/dist/extraction/languages/python.js +71 -0
  112. package/lib/dist/extraction/languages/python.js.map +1 -1
  113. package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
  114. package/lib/dist/extraction/languages/rust.js +3 -0
  115. package/lib/dist/extraction/languages/rust.js.map +1 -1
  116. package/lib/dist/extraction/languages/scala.d.ts.map +1 -1
  117. package/lib/dist/extraction/languages/scala.js +18 -3
  118. package/lib/dist/extraction/languages/scala.js.map +1 -1
  119. package/lib/dist/extraction/languages/swift.d.ts +15 -0
  120. package/lib/dist/extraction/languages/swift.d.ts.map +1 -1
  121. package/lib/dist/extraction/languages/swift.js +50 -0
  122. package/lib/dist/extraction/languages/swift.js.map +1 -1
  123. package/lib/dist/extraction/languages/typescript.d.ts +7 -0
  124. package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
  125. package/lib/dist/extraction/languages/typescript.js +30 -2
  126. package/lib/dist/extraction/languages/typescript.js.map +1 -1
  127. package/lib/dist/extraction/liquid-extractor.d.ts +18 -0
  128. package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
  129. package/lib/dist/extraction/liquid-extractor.js +98 -22
  130. package/lib/dist/extraction/liquid-extractor.js.map +1 -1
  131. package/lib/dist/extraction/mybatis-extractor.d.ts.map +1 -1
  132. package/lib/dist/extraction/mybatis-extractor.js +6 -4
  133. package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
  134. package/lib/dist/extraction/parse-budget.d.ts +16 -0
  135. package/lib/dist/extraction/parse-budget.d.ts.map +1 -0
  136. package/lib/dist/extraction/parse-budget.js +24 -0
  137. package/lib/dist/extraction/parse-budget.js.map +1 -0
  138. package/lib/dist/extraction/parse-pool.d.ts +12 -0
  139. package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
  140. package/lib/dist/extraction/parse-pool.js +51 -3
  141. package/lib/dist/extraction/parse-pool.js.map +1 -1
  142. package/lib/dist/extraction/parse-worker.js +3 -1
  143. package/lib/dist/extraction/parse-worker.js.map +1 -1
  144. package/lib/dist/extraction/sfc-script.d.ts +43 -0
  145. package/lib/dist/extraction/sfc-script.d.ts.map +1 -0
  146. package/lib/dist/extraction/sfc-script.js +135 -0
  147. package/lib/dist/extraction/sfc-script.js.map +1 -0
  148. package/lib/dist/extraction/store-worker.js +5 -0
  149. package/lib/dist/extraction/store-worker.js.map +1 -1
  150. package/lib/dist/extraction/store-writer.d.ts +10 -2
  151. package/lib/dist/extraction/store-writer.d.ts.map +1 -1
  152. package/lib/dist/extraction/store-writer.js +12 -4
  153. package/lib/dist/extraction/store-writer.js.map +1 -1
  154. package/lib/dist/extraction/svelte-extractor.d.ts.map +1 -1
  155. package/lib/dist/extraction/svelte-extractor.js +7 -37
  156. package/lib/dist/extraction/svelte-extractor.js.map +1 -1
  157. package/lib/dist/extraction/syntax-tokens.d.ts +103 -0
  158. package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -0
  159. package/lib/dist/extraction/syntax-tokens.js +382 -0
  160. package/lib/dist/extraction/syntax-tokens.js.map +1 -0
  161. package/lib/dist/extraction/tree-sitter-helpers.d.ts +5 -0
  162. package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
  163. package/lib/dist/extraction/tree-sitter-helpers.js +17 -0
  164. package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
  165. package/lib/dist/extraction/tree-sitter-types.d.ts +29 -3
  166. package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
  167. package/lib/dist/extraction/tree-sitter.d.ts +104 -17
  168. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
  169. package/lib/dist/extraction/tree-sitter.js +943 -88
  170. package/lib/dist/extraction/tree-sitter.js.map +1 -1
  171. package/lib/dist/extraction/vue-extractor.d.ts +7 -0
  172. package/lib/dist/extraction/vue-extractor.d.ts.map +1 -1
  173. package/lib/dist/extraction/vue-extractor.js +73 -35
  174. package/lib/dist/extraction/vue-extractor.js.map +1 -1
  175. package/lib/dist/extraction/vue-options-api.d.ts +28 -0
  176. package/lib/dist/extraction/vue-options-api.d.ts.map +1 -0
  177. package/lib/dist/extraction/vue-options-api.js +196 -0
  178. package/lib/dist/extraction/vue-options-api.js.map +1 -0
  179. package/lib/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
  180. package/lib/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
  181. package/lib/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
  182. package/lib/dist/file-limits.d.ts +40 -0
  183. package/lib/dist/file-limits.d.ts.map +1 -0
  184. package/lib/dist/file-limits.js +147 -0
  185. package/lib/dist/file-limits.js.map +1 -0
  186. package/lib/dist/graph/branch-guards.d.ts +265 -0
  187. package/lib/dist/graph/branch-guards.d.ts.map +1 -0
  188. package/lib/dist/graph/branch-guards.js +2326 -0
  189. package/lib/dist/graph/branch-guards.js.map +1 -0
  190. package/lib/dist/graph/dead-code.d.ts +251 -0
  191. package/lib/dist/graph/dead-code.d.ts.map +1 -0
  192. package/lib/dist/graph/dead-code.js +776 -0
  193. package/lib/dist/graph/dead-code.js.map +1 -0
  194. package/lib/dist/graph/dynamic-boundary-report.d.ts +121 -0
  195. package/lib/dist/graph/dynamic-boundary-report.d.ts.map +1 -0
  196. package/lib/dist/graph/dynamic-boundary-report.js +283 -0
  197. package/lib/dist/graph/dynamic-boundary-report.js.map +1 -0
  198. package/lib/dist/graph/index.d.ts +4 -0
  199. package/lib/dist/graph/index.d.ts.map +1 -1
  200. package/lib/dist/graph/index.js +16 -1
  201. package/lib/dist/graph/index.js.map +1 -1
  202. package/lib/dist/graph/named-symbol-flow.d.ts +125 -0
  203. package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -0
  204. package/lib/dist/graph/named-symbol-flow.js +559 -0
  205. package/lib/dist/graph/named-symbol-flow.js.map +1 -0
  206. package/lib/dist/graph/symbol-lookup.d.ts +83 -0
  207. package/lib/dist/graph/symbol-lookup.d.ts.map +1 -0
  208. package/lib/dist/graph/symbol-lookup.js +181 -0
  209. package/lib/dist/graph/symbol-lookup.js.map +1 -0
  210. package/lib/dist/graph/traversal.d.ts +9 -0
  211. package/lib/dist/graph/traversal.d.ts.map +1 -1
  212. package/lib/dist/graph/traversal.js +61 -35
  213. package/lib/dist/graph/traversal.js.map +1 -1
  214. package/lib/dist/graph/type-hierarchy.d.ts +155 -0
  215. package/lib/dist/graph/type-hierarchy.d.ts.map +1 -0
  216. package/lib/dist/graph/type-hierarchy.js +382 -0
  217. package/lib/dist/graph/type-hierarchy.js.map +1 -0
  218. package/lib/dist/index.d.ts +256 -11
  219. package/lib/dist/index.d.ts.map +1 -1
  220. package/lib/dist/index.js +402 -34
  221. package/lib/dist/index.js.map +1 -1
  222. package/lib/dist/installer/index.d.ts.map +1 -1
  223. package/lib/dist/installer/index.js +3 -2
  224. package/lib/dist/installer/index.js.map +1 -1
  225. package/lib/dist/installer/targets/antigravity.d.ts.map +1 -1
  226. package/lib/dist/installer/targets/antigravity.js +14 -2
  227. package/lib/dist/installer/targets/antigravity.js.map +1 -1
  228. package/lib/dist/installer/targets/claude.d.ts +3 -0
  229. package/lib/dist/installer/targets/claude.d.ts.map +1 -1
  230. package/lib/dist/installer/targets/claude.js +35 -7
  231. package/lib/dist/installer/targets/claude.js.map +1 -1
  232. package/lib/dist/installer/targets/codex.d.ts +2 -1
  233. package/lib/dist/installer/targets/codex.d.ts.map +1 -1
  234. package/lib/dist/installer/targets/codex.js +14 -4
  235. package/lib/dist/installer/targets/codex.js.map +1 -1
  236. package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -1
  237. package/lib/dist/installer/targets/copilot-cli.js +7 -1
  238. package/lib/dist/installer/targets/copilot-cli.js.map +1 -1
  239. package/lib/dist/installer/targets/opencode.d.ts +16 -5
  240. package/lib/dist/installer/targets/opencode.d.ts.map +1 -1
  241. package/lib/dist/installer/targets/opencode.js +73 -22
  242. package/lib/dist/installer/targets/opencode.js.map +1 -1
  243. package/lib/dist/installer/targets/shared.d.ts +14 -3
  244. package/lib/dist/installer/targets/shared.d.ts.map +1 -1
  245. package/lib/dist/installer/targets/shared.js +39 -11
  246. package/lib/dist/installer/targets/shared.js.map +1 -1
  247. package/lib/dist/installer/targets/types.d.ts +7 -0
  248. package/lib/dist/installer/targets/types.d.ts.map +1 -1
  249. package/lib/dist/mcp/answer-freshness.d.ts +10 -0
  250. package/lib/dist/mcp/answer-freshness.d.ts.map +1 -0
  251. package/lib/dist/mcp/answer-freshness.js +68 -0
  252. package/lib/dist/mcp/answer-freshness.js.map +1 -0
  253. package/lib/dist/mcp/daemon-manager.d.ts.map +1 -1
  254. package/lib/dist/mcp/daemon-manager.js +16 -0
  255. package/lib/dist/mcp/daemon-manager.js.map +1 -1
  256. package/lib/dist/mcp/daemon-paths.d.ts +2 -0
  257. package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
  258. package/lib/dist/mcp/daemon-paths.js +20 -5
  259. package/lib/dist/mcp/daemon-paths.js.map +1 -1
  260. package/lib/dist/mcp/daemon-registry.d.ts +11 -4
  261. package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
  262. package/lib/dist/mcp/daemon-registry.js +132 -36
  263. package/lib/dist/mcp/daemon-registry.js.map +1 -1
  264. package/lib/dist/mcp/daemon.d.ts +17 -7
  265. package/lib/dist/mcp/daemon.d.ts.map +1 -1
  266. package/lib/dist/mcp/daemon.js +116 -24
  267. package/lib/dist/mcp/daemon.js.map +1 -1
  268. package/lib/dist/mcp/dynamic-boundaries.d.ts +1 -10
  269. package/lib/dist/mcp/dynamic-boundaries.d.ts.map +1 -1
  270. package/lib/dist/mcp/dynamic-boundaries.js +46 -42
  271. package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
  272. package/lib/dist/mcp/engine.d.ts +30 -9
  273. package/lib/dist/mcp/engine.d.ts.map +1 -1
  274. package/lib/dist/mcp/engine.js +158 -66
  275. package/lib/dist/mcp/engine.js.map +1 -1
  276. package/lib/dist/mcp/explore-dedup.d.ts +5 -2
  277. package/lib/dist/mcp/explore-dedup.d.ts.map +1 -1
  278. package/lib/dist/mcp/explore-dedup.js +8 -5
  279. package/lib/dist/mcp/explore-dedup.js.map +1 -1
  280. package/lib/dist/mcp/index-freshness-worker.d.ts +2 -0
  281. package/lib/dist/mcp/index-freshness-worker.d.ts.map +1 -0
  282. package/lib/dist/mcp/index-freshness-worker.js +36 -0
  283. package/lib/dist/mcp/index-freshness-worker.js.map +1 -0
  284. package/lib/dist/mcp/index-freshness.d.ts +13 -0
  285. package/lib/dist/mcp/index-freshness.d.ts.map +1 -0
  286. package/lib/dist/mcp/index-freshness.js +117 -0
  287. package/lib/dist/mcp/index-freshness.js.map +1 -0
  288. package/lib/dist/mcp/index.d.ts +3 -1
  289. package/lib/dist/mcp/index.d.ts.map +1 -1
  290. package/lib/dist/mcp/index.js +95 -11
  291. package/lib/dist/mcp/index.js.map +1 -1
  292. package/lib/dist/mcp/liveness-watchdog.d.ts +4 -1
  293. package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
  294. package/lib/dist/mcp/liveness-watchdog.js +11 -2
  295. package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
  296. package/lib/dist/mcp/project-lifecycle.d.ts +9 -0
  297. package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -0
  298. package/lib/dist/mcp/project-lifecycle.js +182 -0
  299. package/lib/dist/mcp/project-lifecycle.js.map +1 -0
  300. package/lib/dist/mcp/proxy.d.ts +9 -2
  301. package/lib/dist/mcp/proxy.d.ts.map +1 -1
  302. package/lib/dist/mcp/proxy.js +201 -32
  303. package/lib/dist/mcp/proxy.js.map +1 -1
  304. package/lib/dist/mcp/query-pool.d.ts +18 -3
  305. package/lib/dist/mcp/query-pool.d.ts.map +1 -1
  306. package/lib/dist/mcp/query-pool.js +67 -11
  307. package/lib/dist/mcp/query-pool.js.map +1 -1
  308. package/lib/dist/mcp/query-worker.js +2 -2
  309. package/lib/dist/mcp/query-worker.js.map +1 -1
  310. package/lib/dist/mcp/server-instructions.d.ts +1 -1
  311. package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
  312. package/lib/dist/mcp/server-instructions.js +6 -3
  313. package/lib/dist/mcp/server-instructions.js.map +1 -1
  314. package/lib/dist/mcp/startup-handshake.d.ts +3 -1
  315. package/lib/dist/mcp/startup-handshake.d.ts.map +1 -1
  316. package/lib/dist/mcp/startup-handshake.js +10 -2
  317. package/lib/dist/mcp/startup-handshake.js.map +1 -1
  318. package/lib/dist/mcp/tools.d.ts +306 -36
  319. package/lib/dist/mcp/tools.d.ts.map +1 -1
  320. package/lib/dist/mcp/tools.js +2395 -966
  321. package/lib/dist/mcp/tools.js.map +1 -1
  322. package/lib/dist/mcp/writer-lock.d.ts +61 -0
  323. package/lib/dist/mcp/writer-lock.d.ts.map +1 -0
  324. package/lib/dist/mcp/writer-lock.js +260 -0
  325. package/lib/dist/mcp/writer-lock.js.map +1 -0
  326. package/lib/dist/resolution/alias-binding.d.ts +56 -0
  327. package/lib/dist/resolution/alias-binding.d.ts.map +1 -0
  328. package/lib/dist/resolution/alias-binding.js +143 -0
  329. package/lib/dist/resolution/alias-binding.js.map +1 -0
  330. package/lib/dist/resolution/angular-template-synthesizer.d.ts +49 -0
  331. package/lib/dist/resolution/angular-template-synthesizer.d.ts.map +1 -0
  332. package/lib/dist/resolution/angular-template-synthesizer.js +359 -0
  333. package/lib/dist/resolution/angular-template-synthesizer.js.map +1 -0
  334. package/lib/dist/resolution/callback-synthesizer.d.ts +23 -1
  335. package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
  336. package/lib/dist/resolution/callback-synthesizer.js +460 -144
  337. package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
  338. package/lib/dist/resolution/cpp-constructor.d.ts +4 -0
  339. package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -0
  340. package/lib/dist/resolution/cpp-constructor.js +123 -0
  341. package/lib/dist/resolution/cpp-constructor.js.map +1 -0
  342. package/lib/dist/resolution/cpp-macro-visibility.d.ts +12 -0
  343. package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -0
  344. package/lib/dist/resolution/cpp-macro-visibility.js +392 -0
  345. package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -0
  346. package/lib/dist/resolution/expo-router-synthesizer.d.ts +32 -0
  347. package/lib/dist/resolution/expo-router-synthesizer.d.ts.map +1 -0
  348. package/lib/dist/resolution/expo-router-synthesizer.js +189 -0
  349. package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -0
  350. package/lib/dist/resolution/frameworks/angular-router.d.ts +142 -0
  351. package/lib/dist/resolution/frameworks/angular-router.d.ts.map +1 -0
  352. package/lib/dist/resolution/frameworks/angular-router.js +1126 -0
  353. package/lib/dist/resolution/frameworks/angular-router.js.map +1 -0
  354. package/lib/dist/resolution/frameworks/astro.d.ts.map +1 -1
  355. package/lib/dist/resolution/frameworks/astro.js +32 -6
  356. package/lib/dist/resolution/frameworks/astro.js.map +1 -1
  357. package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
  358. package/lib/dist/resolution/frameworks/csharp.js +186 -24
  359. package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
  360. package/lib/dist/resolution/frameworks/expo-modules.d.ts +10 -0
  361. package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -1
  362. package/lib/dist/resolution/frameworks/expo-modules.js +95 -1
  363. package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -1
  364. package/lib/dist/resolution/frameworks/expo-router.d.ts +195 -0
  365. package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -0
  366. package/lib/dist/resolution/frameworks/expo-router.js +847 -0
  367. package/lib/dist/resolution/frameworks/expo-router.js.map +1 -0
  368. package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
  369. package/lib/dist/resolution/frameworks/express.js +339 -45
  370. package/lib/dist/resolution/frameworks/express.js.map +1 -1
  371. package/lib/dist/resolution/frameworks/fabric.d.ts.map +1 -1
  372. package/lib/dist/resolution/frameworks/fabric.js +13 -11
  373. package/lib/dist/resolution/frameworks/fabric.js.map +1 -1
  374. package/lib/dist/resolution/frameworks/go.d.ts.map +1 -1
  375. package/lib/dist/resolution/frameworks/go.js +11 -28
  376. package/lib/dist/resolution/frameworks/go.js.map +1 -1
  377. package/lib/dist/resolution/frameworks/index.d.ts +8 -2
  378. package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
  379. package/lib/dist/resolution/frameworks/index.js +39 -1
  380. package/lib/dist/resolution/frameworks/index.js.map +1 -1
  381. package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
  382. package/lib/dist/resolution/frameworks/java.js +88 -68
  383. package/lib/dist/resolution/frameworks/java.js.map +1 -1
  384. package/lib/dist/resolution/frameworks/laravel.d.ts.map +1 -1
  385. package/lib/dist/resolution/frameworks/laravel.js +369 -26
  386. package/lib/dist/resolution/frameworks/laravel.js.map +1 -1
  387. package/lib/dist/resolution/frameworks/name-heuristic.d.ts +35 -0
  388. package/lib/dist/resolution/frameworks/name-heuristic.d.ts.map +1 -0
  389. package/lib/dist/resolution/frameworks/name-heuristic.js +45 -0
  390. package/lib/dist/resolution/frameworks/name-heuristic.js.map +1 -0
  391. package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -1
  392. package/lib/dist/resolution/frameworks/nestjs.js +288 -55
  393. package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
  394. package/lib/dist/resolution/frameworks/nextjs.d.ts +76 -0
  395. package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -0
  396. package/lib/dist/resolution/frameworks/nextjs.js +329 -0
  397. package/lib/dist/resolution/frameworks/nextjs.js.map +1 -0
  398. package/lib/dist/resolution/frameworks/object-literal.d.ts +32 -0
  399. package/lib/dist/resolution/frameworks/object-literal.d.ts.map +1 -0
  400. package/lib/dist/resolution/frameworks/object-literal.js +139 -0
  401. package/lib/dist/resolution/frameworks/object-literal.js.map +1 -0
  402. package/lib/dist/resolution/frameworks/package-deps.d.ts +14 -0
  403. package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -0
  404. package/lib/dist/resolution/frameworks/package-deps.js +78 -0
  405. package/lib/dist/resolution/frameworks/package-deps.js.map +1 -0
  406. package/lib/dist/resolution/frameworks/page-component.d.ts +20 -0
  407. package/lib/dist/resolution/frameworks/page-component.d.ts.map +1 -0
  408. package/lib/dist/resolution/frameworks/page-component.js +45 -0
  409. package/lib/dist/resolution/frameworks/page-component.js.map +1 -0
  410. package/lib/dist/resolution/frameworks/play.d.ts.map +1 -1
  411. package/lib/dist/resolution/frameworks/play.js +3 -1
  412. package/lib/dist/resolution/frameworks/play.js.map +1 -1
  413. package/lib/dist/resolution/frameworks/python.d.ts.map +1 -1
  414. package/lib/dist/resolution/frameworks/python.js +279 -26
  415. package/lib/dist/resolution/frameworks/python.js.map +1 -1
  416. package/lib/dist/resolution/frameworks/react-native.d.ts +26 -0
  417. package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
  418. package/lib/dist/resolution/frameworks/react-native.js +153 -14
  419. package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
  420. package/lib/dist/resolution/frameworks/react-router.d.ts +47 -0
  421. package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -0
  422. package/lib/dist/resolution/frameworks/react-router.js +201 -0
  423. package/lib/dist/resolution/frameworks/react-router.js.map +1 -0
  424. package/lib/dist/resolution/frameworks/react.d.ts +13 -2
  425. package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
  426. package/lib/dist/resolution/frameworks/react.js +542 -144
  427. package/lib/dist/resolution/frameworks/react.js.map +1 -1
  428. package/lib/dist/resolution/frameworks/ruby.d.ts.map +1 -1
  429. package/lib/dist/resolution/frameworks/ruby.js +177 -17
  430. package/lib/dist/resolution/frameworks/ruby.js.map +1 -1
  431. package/lib/dist/resolution/frameworks/rust.d.ts.map +1 -1
  432. package/lib/dist/resolution/frameworks/rust.js +24 -22
  433. package/lib/dist/resolution/frameworks/rust.js.map +1 -1
  434. package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
  435. package/lib/dist/resolution/frameworks/svelte.js +14 -6
  436. package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
  437. package/lib/dist/resolution/frameworks/sveltekit-router.d.ts +36 -0
  438. package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -0
  439. package/lib/dist/resolution/frameworks/sveltekit-router.js +156 -0
  440. package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -0
  441. package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -1
  442. package/lib/dist/resolution/frameworks/swift.js +253 -124
  443. package/lib/dist/resolution/frameworks/swift.js.map +1 -1
  444. package/lib/dist/resolution/frameworks/tanstack-router.d.ts +84 -0
  445. package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -0
  446. package/lib/dist/resolution/frameworks/tanstack-router.js +437 -0
  447. package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -0
  448. package/lib/dist/resolution/frameworks/vue-router.d.ts +98 -0
  449. package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -0
  450. package/lib/dist/resolution/frameworks/vue-router.js +500 -0
  451. package/lib/dist/resolution/frameworks/vue-router.js.map +1 -0
  452. package/lib/dist/resolution/frameworks/vue.d.ts +9 -2
  453. package/lib/dist/resolution/frameworks/vue.d.ts.map +1 -1
  454. package/lib/dist/resolution/frameworks/vue.js +45 -11
  455. package/lib/dist/resolution/frameworks/vue.js.map +1 -1
  456. package/lib/dist/resolution/import-resolver.d.ts +66 -0
  457. package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
  458. package/lib/dist/resolution/import-resolver.js +643 -61
  459. package/lib/dist/resolution/import-resolver.js.map +1 -1
  460. package/lib/dist/resolution/index.d.ts +124 -25
  461. package/lib/dist/resolution/index.d.ts.map +1 -1
  462. package/lib/dist/resolution/index.js +769 -152
  463. package/lib/dist/resolution/index.js.map +1 -1
  464. package/lib/dist/resolution/js-builtins.d.ts +13 -0
  465. package/lib/dist/resolution/js-builtins.d.ts.map +1 -0
  466. package/lib/dist/resolution/js-builtins.js +48 -0
  467. package/lib/dist/resolution/js-builtins.js.map +1 -0
  468. package/lib/dist/resolution/name-matcher.d.ts +101 -22
  469. package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
  470. package/lib/dist/resolution/name-matcher.js +8267 -287
  471. package/lib/dist/resolution/name-matcher.js.map +1 -1
  472. package/lib/dist/resolution/next-router-synthesizer.d.ts +27 -0
  473. package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -0
  474. package/lib/dist/resolution/next-router-synthesizer.js +113 -0
  475. package/lib/dist/resolution/next-router-synthesizer.js.map +1 -0
  476. package/lib/dist/resolution/react-router-synthesizer.d.ts +35 -0
  477. package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -0
  478. package/lib/dist/resolution/react-router-synthesizer.js +197 -0
  479. package/lib/dist/resolution/react-router-synthesizer.js.map +1 -0
  480. package/lib/dist/resolution/resolver-pool.d.ts +22 -1
  481. package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
  482. package/lib/dist/resolution/resolver-pool.js +35 -5
  483. package/lib/dist/resolution/resolver-pool.js.map +1 -1
  484. package/lib/dist/resolution/resolver-worker.js +3 -0
  485. package/lib/dist/resolution/resolver-worker.js.map +1 -1
  486. package/lib/dist/resolution/strip-comments.d.ts +6 -0
  487. package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
  488. package/lib/dist/resolution/strip-comments.js +58 -0
  489. package/lib/dist/resolution/strip-comments.js.map +1 -1
  490. package/lib/dist/resolution/sveltekit-synthesizer.d.ts +58 -0
  491. package/lib/dist/resolution/sveltekit-synthesizer.d.ts.map +1 -0
  492. package/lib/dist/resolution/sveltekit-synthesizer.js +173 -0
  493. package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -0
  494. package/lib/dist/resolution/swift-type-visibility.d.ts +68 -0
  495. package/lib/dist/resolution/swift-type-visibility.d.ts.map +1 -0
  496. package/lib/dist/resolution/swift-type-visibility.js +454 -0
  497. package/lib/dist/resolution/swift-type-visibility.js.map +1 -0
  498. package/lib/dist/resolution/synth-utils.d.ts +26 -0
  499. package/lib/dist/resolution/synth-utils.d.ts.map +1 -0
  500. package/lib/dist/resolution/synth-utils.js +75 -0
  501. package/lib/dist/resolution/synth-utils.js.map +1 -0
  502. package/lib/dist/resolution/tanstack-router-synthesizer.d.ts +31 -0
  503. package/lib/dist/resolution/tanstack-router-synthesizer.d.ts.map +1 -0
  504. package/lib/dist/resolution/tanstack-router-synthesizer.js +114 -0
  505. package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -0
  506. package/lib/dist/resolution/tier-synthesizer.d.ts +54 -0
  507. package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -0
  508. package/lib/dist/resolution/tier-synthesizer.js +1294 -0
  509. package/lib/dist/resolution/tier-synthesizer.js.map +1 -0
  510. package/lib/dist/resolution/type-parameters.d.ts +11 -0
  511. package/lib/dist/resolution/type-parameters.d.ts.map +1 -0
  512. package/lib/dist/resolution/type-parameters.js +287 -0
  513. package/lib/dist/resolution/type-parameters.js.map +1 -0
  514. package/lib/dist/resolution/types.d.ts +105 -2
  515. package/lib/dist/resolution/types.d.ts.map +1 -1
  516. package/lib/dist/resolution/types.js +64 -0
  517. package/lib/dist/resolution/types.js.map +1 -1
  518. package/lib/dist/resolution/vue-router-synthesizer.d.ts +30 -0
  519. package/lib/dist/resolution/vue-router-synthesizer.d.ts.map +1 -0
  520. package/lib/dist/resolution/vue-router-synthesizer.js +115 -0
  521. package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -0
  522. package/lib/dist/search/query-paths.d.ts +50 -1
  523. package/lib/dist/search/query-paths.d.ts.map +1 -1
  524. package/lib/dist/search/query-paths.js +227 -12
  525. package/lib/dist/search/query-paths.js.map +1 -1
  526. package/lib/dist/search/query-utils.d.ts +15 -0
  527. package/lib/dist/search/query-utils.d.ts.map +1 -1
  528. package/lib/dist/search/query-utils.js +35 -7
  529. package/lib/dist/search/query-utils.js.map +1 -1
  530. package/lib/dist/sync/watch-policy.d.ts +14 -0
  531. package/lib/dist/sync/watch-policy.d.ts.map +1 -1
  532. package/lib/dist/sync/watch-policy.js +19 -0
  533. package/lib/dist/sync/watch-policy.js.map +1 -1
  534. package/lib/dist/sync/watcher.d.ts +52 -35
  535. package/lib/dist/sync/watcher.d.ts.map +1 -1
  536. package/lib/dist/sync/watcher.js +236 -100
  537. package/lib/dist/sync/watcher.js.map +1 -1
  538. package/lib/dist/sync/worktree.d.ts +22 -0
  539. package/lib/dist/sync/worktree.d.ts.map +1 -1
  540. package/lib/dist/sync/worktree.js +54 -0
  541. package/lib/dist/sync/worktree.js.map +1 -1
  542. package/lib/dist/telemetry/index.d.ts +4 -2
  543. package/lib/dist/telemetry/index.d.ts.map +1 -1
  544. package/lib/dist/telemetry/index.js +159 -66
  545. package/lib/dist/telemetry/index.js.map +1 -1
  546. package/lib/dist/types.d.ts +1 -1
  547. package/lib/dist/types.d.ts.map +1 -1
  548. package/lib/dist/types.js +1 -0
  549. package/lib/dist/types.js.map +1 -1
  550. package/lib/dist/ui-server/api/deadcode.d.ts +84 -0
  551. package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -0
  552. package/lib/dist/ui-server/api/deadcode.js +136 -0
  553. package/lib/dist/ui-server/api/deadcode.js.map +1 -0
  554. package/lib/dist/ui-server/api/effects.d.ts +94 -0
  555. package/lib/dist/ui-server/api/effects.d.ts.map +1 -0
  556. package/lib/dist/ui-server/api/effects.js +527 -0
  557. package/lib/dist/ui-server/api/effects.js.map +1 -0
  558. package/lib/dist/ui-server/api/entrypoints.d.ts +92 -0
  559. package/lib/dist/ui-server/api/entrypoints.d.ts.map +1 -0
  560. package/lib/dist/ui-server/api/entrypoints.js +364 -0
  561. package/lib/dist/ui-server/api/entrypoints.js.map +1 -0
  562. package/lib/dist/ui-server/api/events.d.ts +183 -0
  563. package/lib/dist/ui-server/api/events.d.ts.map +1 -0
  564. package/lib/dist/ui-server/api/events.js +430 -0
  565. package/lib/dist/ui-server/api/events.js.map +1 -0
  566. package/lib/dist/ui-server/api/file.d.ts +66 -0
  567. package/lib/dist/ui-server/api/file.d.ts.map +1 -0
  568. package/lib/dist/ui-server/api/file.js +235 -0
  569. package/lib/dist/ui-server/api/file.js.map +1 -0
  570. package/lib/dist/ui-server/api/filecode.d.ts +126 -0
  571. package/lib/dist/ui-server/api/filecode.d.ts.map +1 -0
  572. package/lib/dist/ui-server/api/filecode.js +205 -0
  573. package/lib/dist/ui-server/api/filecode.js.map +1 -0
  574. package/lib/dist/ui-server/api/flow.d.ts +226 -0
  575. package/lib/dist/ui-server/api/flow.d.ts.map +1 -0
  576. package/lib/dist/ui-server/api/flow.js +612 -0
  577. package/lib/dist/ui-server/api/flow.js.map +1 -0
  578. package/lib/dist/ui-server/api/hierarchy.d.ts +81 -0
  579. package/lib/dist/ui-server/api/hierarchy.d.ts.map +1 -0
  580. package/lib/dist/ui-server/api/hierarchy.js +92 -0
  581. package/lib/dist/ui-server/api/hierarchy.js.map +1 -0
  582. package/lib/dist/ui-server/api/index.d.ts +90 -0
  583. package/lib/dist/ui-server/api/index.d.ts.map +1 -0
  584. package/lib/dist/ui-server/api/index.js +332 -0
  585. package/lib/dist/ui-server/api/index.js.map +1 -0
  586. package/lib/dist/ui-server/api/map.d.ts +273 -0
  587. package/lib/dist/ui-server/api/map.d.ts.map +1 -0
  588. package/lib/dist/ui-server/api/map.js +781 -0
  589. package/lib/dist/ui-server/api/map.js.map +1 -0
  590. package/lib/dist/ui-server/api/node.d.ts +81 -0
  591. package/lib/dist/ui-server/api/node.d.ts.map +1 -0
  592. package/lib/dist/ui-server/api/node.js +394 -0
  593. package/lib/dist/ui-server/api/node.js.map +1 -0
  594. package/lib/dist/ui-server/api/nodes.d.ts +25 -0
  595. package/lib/dist/ui-server/api/nodes.d.ts.map +1 -0
  596. package/lib/dist/ui-server/api/nodes.js +45 -0
  597. package/lib/dist/ui-server/api/nodes.js.map +1 -0
  598. package/lib/dist/ui-server/api/program.d.ts +139 -0
  599. package/lib/dist/ui-server/api/program.d.ts.map +1 -0
  600. package/lib/dist/ui-server/api/program.js +315 -0
  601. package/lib/dist/ui-server/api/program.js.map +1 -0
  602. package/lib/dist/ui-server/api/respond.d.ts +76 -0
  603. package/lib/dist/ui-server/api/respond.d.ts.map +1 -0
  604. package/lib/dist/ui-server/api/respond.js +186 -0
  605. package/lib/dist/ui-server/api/respond.js.map +1 -0
  606. package/lib/dist/ui-server/api/route-roots.d.ts +45 -0
  607. package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -0
  608. package/lib/dist/ui-server/api/route-roots.js +117 -0
  609. package/lib/dist/ui-server/api/route-roots.js.map +1 -0
  610. package/lib/dist/ui-server/api/routes.d.ts +61 -0
  611. package/lib/dist/ui-server/api/routes.d.ts.map +1 -0
  612. package/lib/dist/ui-server/api/routes.js +164 -0
  613. package/lib/dist/ui-server/api/routes.js.map +1 -0
  614. package/lib/dist/ui-server/api/screens.d.ts +117 -0
  615. package/lib/dist/ui-server/api/screens.d.ts.map +1 -0
  616. package/lib/dist/ui-server/api/screens.js +626 -0
  617. package/lib/dist/ui-server/api/screens.js.map +1 -0
  618. package/lib/dist/ui-server/api/search.d.ts +29 -0
  619. package/lib/dist/ui-server/api/search.d.ts.map +1 -0
  620. package/lib/dist/ui-server/api/search.js +232 -0
  621. package/lib/dist/ui-server/api/search.js.map +1 -0
  622. package/lib/dist/ui-server/api/session.d.ts +52 -0
  623. package/lib/dist/ui-server/api/session.d.ts.map +1 -0
  624. package/lib/dist/ui-server/api/session.js +196 -0
  625. package/lib/dist/ui-server/api/session.js.map +1 -0
  626. package/lib/dist/ui-server/api/source.d.ts +200 -0
  627. package/lib/dist/ui-server/api/source.d.ts.map +1 -0
  628. package/lib/dist/ui-server/api/source.js +422 -0
  629. package/lib/dist/ui-server/api/source.js.map +1 -0
  630. package/lib/dist/ui-server/api/stats.d.ts +27 -0
  631. package/lib/dist/ui-server/api/stats.d.ts.map +1 -0
  632. package/lib/dist/ui-server/api/stats.js +164 -0
  633. package/lib/dist/ui-server/api/stats.js.map +1 -0
  634. package/lib/dist/ui-server/api/steps.d.ts +274 -0
  635. package/lib/dist/ui-server/api/steps.d.ts.map +1 -0
  636. package/lib/dist/ui-server/api/steps.js +1554 -0
  637. package/lib/dist/ui-server/api/steps.js.map +1 -0
  638. package/lib/dist/ui-server/api/trail-store.d.ts +142 -0
  639. package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -0
  640. package/lib/dist/ui-server/api/trail-store.js +323 -0
  641. package/lib/dist/ui-server/api/trail-store.js.map +1 -0
  642. package/lib/dist/ui-server/api/trails.d.ts +163 -0
  643. package/lib/dist/ui-server/api/trails.d.ts.map +1 -0
  644. package/lib/dist/ui-server/api/trails.js +370 -0
  645. package/lib/dist/ui-server/api/trails.js.map +1 -0
  646. package/lib/dist/ui-server/api/when.d.ts +133 -0
  647. package/lib/dist/ui-server/api/when.d.ts.map +1 -0
  648. package/lib/dist/ui-server/api/when.js +275 -0
  649. package/lib/dist/ui-server/api/when.js.map +1 -0
  650. package/lib/dist/ui-server/api/wire.d.ts +179 -0
  651. package/lib/dist/ui-server/api/wire.d.ts.map +1 -0
  652. package/lib/dist/ui-server/api/wire.js +231 -0
  653. package/lib/dist/ui-server/api/wire.js.map +1 -0
  654. package/lib/dist/ui-server/assets.d.ts +40 -0
  655. package/lib/dist/ui-server/assets.d.ts.map +1 -0
  656. package/lib/dist/ui-server/assets.js +110 -0
  657. package/lib/dist/ui-server/assets.js.map +1 -0
  658. package/lib/dist/ui-server/constants.d.ts +32 -0
  659. package/lib/dist/ui-server/constants.d.ts.map +1 -0
  660. package/lib/dist/ui-server/constants.js +35 -0
  661. package/lib/dist/ui-server/constants.js.map +1 -0
  662. package/lib/dist/ui-server/highlight/bounded-tokenize.d.ts +28 -0
  663. package/lib/dist/ui-server/highlight/bounded-tokenize.d.ts.map +1 -0
  664. package/lib/dist/ui-server/highlight/bounded-tokenize.js +139 -0
  665. package/lib/dist/ui-server/highlight/bounded-tokenize.js.map +1 -0
  666. package/lib/dist/ui-server/highlight/index.d.ts +113 -0
  667. package/lib/dist/ui-server/highlight/index.d.ts.map +1 -0
  668. package/lib/dist/ui-server/highlight/index.js +312 -0
  669. package/lib/dist/ui-server/highlight/index.js.map +1 -0
  670. package/lib/dist/ui-server/highlight/languages.d.ts +36 -0
  671. package/lib/dist/ui-server/highlight/languages.d.ts.map +1 -0
  672. package/lib/dist/ui-server/highlight/languages.js +50 -0
  673. package/lib/dist/ui-server/highlight/languages.js.map +1 -0
  674. package/lib/dist/ui-server/highlight/tokenize-worker.d.ts +7 -0
  675. package/lib/dist/ui-server/highlight/tokenize-worker.d.ts.map +1 -0
  676. package/lib/dist/ui-server/highlight/tokenize-worker.js +20 -0
  677. package/lib/dist/ui-server/highlight/tokenize-worker.js.map +1 -0
  678. package/lib/dist/ui-server/index.d.ts +92 -0
  679. package/lib/dist/ui-server/index.d.ts.map +1 -0
  680. package/lib/dist/ui-server/index.js +399 -0
  681. package/lib/dist/ui-server/index.js.map +1 -0
  682. package/lib/dist/ui-server/open-browser.d.ts +31 -0
  683. package/lib/dist/ui-server/open-browser.d.ts.map +1 -0
  684. package/lib/dist/ui-server/open-browser.js +79 -0
  685. package/lib/dist/ui-server/open-browser.js.map +1 -0
  686. package/lib/dist/ui-server/security.d.ts +127 -0
  687. package/lib/dist/ui-server/security.d.ts.map +1 -0
  688. package/lib/dist/ui-server/security.js +332 -0
  689. package/lib/dist/ui-server/security.js.map +1 -0
  690. package/lib/dist/ui-server/static.d.ts +45 -0
  691. package/lib/dist/ui-server/static.d.ts.map +1 -0
  692. package/lib/dist/ui-server/static.js +165 -0
  693. package/lib/dist/ui-server/static.js.map +1 -0
  694. package/lib/dist/upgrade/index.d.ts +43 -5
  695. package/lib/dist/upgrade/index.d.ts.map +1 -1
  696. package/lib/dist/upgrade/index.js +157 -35
  697. package/lib/dist/upgrade/index.js.map +1 -1
  698. package/lib/dist/utils.d.ts +14 -2
  699. package/lib/dist/utils.d.ts.map +1 -1
  700. package/lib/dist/utils.js +25 -10
  701. package/lib/dist/utils.js.map +1 -1
  702. package/lib/dist/viewer/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 +0 -0
  703. package/lib/dist/viewer/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 +0 -0
  704. package/lib/dist/viewer/assets/archivo-vietnamese-wght-normal-XAtsl5Q_.woff2 +0 -0
  705. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-2syK4fUT.woff +0 -0
  706. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-CBJ8pzag.woff2 +0 -0
  707. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
  708. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
  709. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
  710. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
  711. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-CTOM6hUh.woff2 +0 -0
  712. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-fLZuRloM.woff +0 -0
  713. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-B4oTjJdl.woff +0 -0
  714. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-CBjNughH.woff2 +0 -0
  715. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
  716. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
  717. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
  718. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
  719. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-9HEixskS.woff +0 -0
  720. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-V-xxqcpd.woff2 +0 -0
  721. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-66oory27.woff +0 -0
  722. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-BqAiT5Ww.woff2 +0 -0
  723. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
  724. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
  725. package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
  726. package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
  727. package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2 +0 -0
  728. package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-DWFSQ4vo.woff +0 -0
  729. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-B7_fu1kp.woff2 +0 -0
  730. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-Bg0ZHwF4.woff +0 -0
  731. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
  732. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
  733. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
  734. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
  735. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-D38SheWl.woff2 +0 -0
  736. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-DmB0ttJJ.woff +0 -0
  737. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-D6eaYXMU.woff +0 -0
  738. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-DRuN92E5.woff2 +0 -0
  739. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
  740. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
  741. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
  742. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
  743. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-D2EvbN8M.woff2 +0 -0
  744. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-iLQfcSjf.woff +0 -0
  745. package/lib/dist/viewer/assets/index-BSGpxBr9.js +99 -0
  746. package/lib/dist/viewer/assets/index-CF9yvio6.css +1 -0
  747. package/lib/dist/viewer/index.html +16 -0
  748. package/lib/dist/worker-teardown.d.ts +48 -0
  749. package/lib/dist/worker-teardown.d.ts.map +1 -0
  750. package/lib/dist/worker-teardown.js +100 -0
  751. package/lib/dist/worker-teardown.js.map +1 -0
  752. package/lib/kernel/codegraph-kernel.node +2 -2
  753. package/lib/node_modules/.package-lock.json +4 -4
  754. package/lib/node_modules/picomatch/README.md +56 -51
  755. package/lib/node_modules/picomatch/lib/constants.js +4 -0
  756. package/lib/node_modules/picomatch/lib/parse.js +341 -1
  757. package/lib/node_modules/picomatch/lib/picomatch.js +25 -5
  758. package/lib/node_modules/picomatch/lib/scan.js +30 -18
  759. package/lib/node_modules/picomatch/package.json +4 -4
  760. package/lib/package.json +9 -2
  761. package/package.json +1 -1
@@ -0,0 +1,454 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SWIFT_TYPE_PATH_CALL = void 0;
4
+ exports.clearSwiftTypeVisibility = clearSwiftTypeVisibility;
5
+ exports.isSwiftExtension = isSwiftExtension;
6
+ exports.declaresExtension = declaresExtension;
7
+ exports.swiftExtendedConformances = swiftExtendedConformances;
8
+ exports.gateSwiftTypeTarget = gateSwiftTypeTarget;
9
+ exports.resolveSwiftTypePathCall = resolveSwiftTypePathCall;
10
+ const TYPE_KINDS = new Set(['class', 'struct', 'enum', 'interface', 'protocol', 'type_alias']);
11
+ /** The first declaration keyword of a class_declaration, past its attributes and modifiers. */
12
+ const DECLARATION_KEYWORD = /\b(extension|class|struct|enum|actor|protocol)\b/;
13
+ const memos = new WeakMap();
14
+ function memoFor(context) {
15
+ let memo = memos.get(context);
16
+ if (!memo) {
17
+ memo = { extension: new Map(), declaration: new Map(), conformances: new Map(), clauses: new Map(), inherited: new Map(), owners: new Map() };
18
+ memos.set(context, memo);
19
+ }
20
+ return memo;
21
+ }
22
+ /** Drop the memos (see ReferenceResolver.clearCaches). */
23
+ function clearSwiftTypeVisibility(context) {
24
+ memos.delete(context);
25
+ }
26
+ /** Is this Swift node an `extension` of a type rather than its declaration? */
27
+ function isSwiftExtension(node, context) {
28
+ // Extraction classifies an extension as a class (it is neither struct nor enum).
29
+ if (node.language !== 'swift' || node.kind !== 'class')
30
+ return false;
31
+ const memo = memoFor(context).extension;
32
+ const hit = memo.get(node.id);
33
+ if (hit !== undefined)
34
+ return hit;
35
+ const lines = linesOf(node.filePath, context);
36
+ const extension = !!lines && declaresExtension(lines, node);
37
+ memo.set(node.id, extension);
38
+ return extension;
39
+ }
40
+ /** Does the class_declaration at `node`'s position open with `extension`? From the file's lines. */
41
+ function declaresExtension(lines, node) {
42
+ const head = [
43
+ (lines[node.startLine - 1] ?? '').slice(node.startColumn),
44
+ ...lines.slice(node.startLine, Math.min(node.endLine, node.startLine + 4)),
45
+ ]
46
+ .join(' ')
47
+ // An attribute's string argument (`message: "use class Foo"`) is not a keyword.
48
+ .replace(/"(?:[^"\\\n]|\\.)*"/g, '""');
49
+ return DECLARATION_KEYWORD.exec(head)?.[1] === 'extension';
50
+ }
51
+ /** A declaration's inheritance clause: `struct HomeView: View, Sendable {` → `View, Sendable`. */
52
+ const INHERITANCE_CLAUSE = /\b(?:class|struct|enum|actor|protocol|extension)\s+[A-Za-z_][\w.]*\s*(?:<[^{}]*?>)?\s*:\s*([^{]*?)\s*(?:\bwhere\b[^{]*)?\{/;
53
+ /** The supertypes a Swift type node's own declaration names: `View`, `Sendable` for `struct HomeView: View, Sendable {`. */
54
+ function declaredSupertypes(node, context) {
55
+ const memo = memoFor(context).clauses;
56
+ const hit = memo.get(node.id);
57
+ if (hit)
58
+ return hit;
59
+ let names = [];
60
+ const lines = linesOf(node.filePath, context);
61
+ if (lines) {
62
+ const head = [(lines[node.startLine - 1] ?? '').slice(node.startColumn), ...lines.slice(node.startLine, Math.min(node.endLine, node.startLine + 6))].join(' ');
63
+ const clause = INHERITANCE_CLAUSE.exec(head.replace(/"(?:[^"\\\n]|\\.)*"/g, '""'))?.[1];
64
+ if (clause) {
65
+ names = clause
66
+ .split(',')
67
+ .map((part) => part.replace(GENERIC_ARGS, '').trim().split('.').pop().trim())
68
+ .filter((name) => /^[A-Za-z_]\w*$/.test(name));
69
+ }
70
+ }
71
+ memo.set(node.id, names);
72
+ return names;
73
+ }
74
+ /**
75
+ * The types a Swift type node's own declaration conforms to that the project
76
+ * only extends — `View` for `struct HomeView: View` when `extension View {}`
77
+ * is all the index holds of it. Those conformances resolve to nothing (an
78
+ * extension is not the type), yet the members the extensions add are the
79
+ * conformer's: the supertype walk reads them from here. From the source, once
80
+ * per node — the resolved edges it would otherwise come from do not exist.
81
+ */
82
+ function swiftExtendedConformances(node, context) {
83
+ if (node.language !== 'swift')
84
+ return [];
85
+ const memo = memoFor(context).conformances;
86
+ const hit = memo.get(node.id);
87
+ if (hit)
88
+ return hit;
89
+ const names = declaredSupertypes(node, context).filter((name) => {
90
+ const typed = context.getNodesByName(name).filter((n) => n.language === 'swift' && TYPE_KINDS.has(n.kind));
91
+ return typed.length > 0 && typed.every((n) => isSwiftExtension(n, context));
92
+ });
93
+ memo.set(node.id, names);
94
+ return names;
95
+ }
96
+ /** Every type a Swift type inherits from or conforms to, as declared in the project — transitively, a few levels. */
97
+ function inheritedTypeNames(typeName, context) {
98
+ const memo = memoFor(context).inherited;
99
+ const hit = memo.get(typeName);
100
+ if (hit)
101
+ return hit;
102
+ const found = new Set();
103
+ let frontier = [typeName];
104
+ for (let depth = 0; depth < 4 && frontier.length > 0; depth++) {
105
+ const next = [];
106
+ for (const name of frontier) {
107
+ for (const node of context.getNodesByName(name)) {
108
+ if (node.language !== 'swift' || !TYPE_KINDS.has(node.kind))
109
+ continue;
110
+ for (const sup of declaredSupertypes(node, context)) {
111
+ if (sup === typeName || found.has(sup))
112
+ continue;
113
+ found.add(sup);
114
+ next.push(sup);
115
+ }
116
+ }
117
+ }
118
+ frontier = next;
119
+ }
120
+ memo.set(typeName, found);
121
+ return found;
122
+ }
123
+ /** The type path a nested type is declared in (`AccountsListViewModel` for `AccountsListViewModel::State`), or null at the top level. */
124
+ function parentPath(node) {
125
+ const sep = node.qualifiedName.lastIndexOf('::');
126
+ if (sep <= 0)
127
+ return null;
128
+ const parent = node.qualifiedName.slice(0, sep);
129
+ // A framework resolver's node is named after its file (`Sources/App/Home.swift::Home`), not a scope.
130
+ if (parent.includes('/') || parent.endsWith('.swift'))
131
+ return null;
132
+ return parent;
133
+ }
134
+ /**
135
+ * How deep the code at `from` sits in `target`'s scope, when it may name
136
+ * `target` bare: 0 for a top-level type, the parent's segment count inside
137
+ * the parent or a subtype of it, one more inside the type itself; null when
138
+ * out of scope. An `extension API.PackageController` carries only its last
139
+ * segment (`PackageController::get`), so a suffix of a path counts as inside
140
+ * it too.
141
+ */
142
+ function bareScopeDepth(target, from, context) {
143
+ const parent = parentPath(target);
144
+ if (!parent)
145
+ return 0;
146
+ if (!from)
147
+ return null;
148
+ const scope = from.qualifiedName;
149
+ const inside = (path) => {
150
+ const segs = path.split('::');
151
+ for (let i = 0; i < segs.length; i++) {
152
+ const suffix = segs.slice(i).join('::');
153
+ if (scope === suffix || scope.startsWith(`${suffix}::`))
154
+ return true;
155
+ }
156
+ return false;
157
+ };
158
+ const depth = parent.split('::').length;
159
+ // Inside the type itself — `extension NIOBSDSocket.Option { static let x: Option }` —
160
+ // or inside its parent.
161
+ if (inside(target.qualifiedName))
162
+ return depth + 1;
163
+ if (inside(parent))
164
+ return depth;
165
+ // A subclass (or conformer) names its supertype's nested types bare:
166
+ // `ReadResult` in `BaseStreamSocketChannel: BaseSocketChannel`.
167
+ const parentName = parent.split('::').pop();
168
+ const scopeTypes = scope.split('::');
169
+ for (const name of scopeTypes) {
170
+ if (inheritedTypeNames(name, context).has(parentName))
171
+ return depth;
172
+ }
173
+ return null;
174
+ }
175
+ /** The source lines of a file, through the resolver's line cache when it has one. */
176
+ function linesOf(filePath, context) {
177
+ return context.getFileLines?.(filePath) ?? context.readFile(filePath)?.split(/\r?\n/) ?? null;
178
+ }
179
+ /** `<Success>` / `<Key, [Value]>` — one level of nesting is all a qualifier carries in practice. */
180
+ const GENERIC_ARGS = /<[^<>]*(?:<[^<>]*>[^<>]*)*>/g;
181
+ const QUALIFIER_SEGMENT = String.raw `[A-Za-z_]\w*(?:<[^<>]*(?:<[^<>]*>[^<>]*)*>)?\s*\.\s*`;
182
+ const QUALIFIER_BEFORE = new RegExp(String.raw `((?:${QUALIFIER_SEGMENT})+)$`);
183
+ /**
184
+ * The reference as its site writes it. The index keeps a Swift type
185
+ * reference by its last segment — `Build.Id` is a ref named `Id` — so whether
186
+ * the name was qualified is read back from the line: a type annotation's
187
+ * column is the name's (`Build.|Id`), a construction's is the chain's
188
+ * (`|API.PackageController.GetRoute.Model(`).
189
+ */
190
+ function writtenName(ref, context) {
191
+ const name = ref.referenceName;
192
+ if (name.includes('.'))
193
+ return name;
194
+ const text = linesOf(ref.filePath, context)?.[ref.line - 1];
195
+ if (!text)
196
+ return name;
197
+ // `EventLoopFuture<Success>.Isolated`: the qualifier's generic arguments are not part of its path.
198
+ const clean = (qualifier) => `${qualifier.replace(GENERIC_ARGS, '').replace(/\s+/g, '')}${name}`;
199
+ // A composition's `&` line is parsed one column left of the file, its `&`
200
+ // moved onto the line before (joinSwiftCompositionContinuations).
201
+ const column = !text.startsWith(name, ref.column) && /^[ \t]*&[ \t]/.test(text) && text.startsWith(name, ref.column + 1) ? ref.column + 1 : ref.column;
202
+ if (text.startsWith(name, column)) {
203
+ const before = QUALIFIER_BEFORE.exec(text.slice(Math.max(0, column - 240), column));
204
+ return before ? clean(before[1]) : name;
205
+ }
206
+ const chain = new RegExp(String.raw `^((?:${QUALIFIER_SEGMENT})+)${name.replace(/[$\\]/g, '\\$&')}\b`).exec(text.slice(ref.column, ref.column + 240));
207
+ return chain ? clean(chain[1]) : name;
208
+ }
209
+ /** `API.PackageController.Model` as `API::PackageController::Model`, up to `name`; null when `name` is not a segment. */
210
+ function writtenPath(written, name) {
211
+ const segs = written.split('.');
212
+ const at = segs.lastIndexOf(name);
213
+ return at < 0 ? null : segs.slice(0, at + 1).join('::');
214
+ }
215
+ /**
216
+ * Does a type's qualified name fit the path a site wrote? A type declared in
217
+ * `extension API.PackageController.GetRoute` is `GetRoute::Model`, so its
218
+ * name may be a tail of the path; a module-qualified `Foundation.Date` names
219
+ * a top-level type.
220
+ */
221
+ function fitsPath(node, path, context) {
222
+ const qn = node.qualifiedName;
223
+ if (qn === path || qn.endsWith(`::${path}`))
224
+ return true;
225
+ if (!path.endsWith(`::${qn}`))
226
+ return false;
227
+ if (qn.includes('::'))
228
+ return true;
229
+ const head = path.slice(0, path.length - qn.length - 2);
230
+ const parentName = head.split('::').pop();
231
+ // A member declared under `#if` in a type's body can be indexed at the top
232
+ // level — the grammar ends `enum NIOBSDSocket {` at an `#if` right inside
233
+ // it, so `typealias Handle` loses its parent. It still shares a file with a
234
+ // declaration or extension of the parent the site names.
235
+ if (context.getNodesInFile(node.filePath).some((p) => p.name === parentName && TYPE_KINDS.has(p.kind) && p.id !== node.id))
236
+ return true;
237
+ // `App.Build`: a top-level type under a qualifier that names no type — a module.
238
+ return !head.includes('::') && !context.getNodesByName(head).some((n) => n.language === 'swift' && TYPE_KINDS.has(n.kind));
239
+ }
240
+ /** Segments two paths' directories share. */
241
+ function sharedDirs(a, b) {
242
+ const da = a.split('/').slice(0, -1);
243
+ const db = b.split('/').slice(0, -1);
244
+ let n = 0;
245
+ while (n < da.length && n < db.length && da[n] === db[n])
246
+ n++;
247
+ return n;
248
+ }
249
+ /** The project's own declaration of the type a site names, when exactly one fits. */
250
+ function declarationFor(name, written, ref, from, context) {
251
+ const memo = memoFor(context).declaration;
252
+ const key = `${ref.filePath}\0${from?.qualifiedName ?? ''}\0${written}\0${name}`;
253
+ if (memo.has(key))
254
+ return memo.get(key);
255
+ const bare = !written.includes('.');
256
+ const path = bare ? null : writtenPath(written, name);
257
+ const scored = [];
258
+ for (const node of context.getNodesByName(name)) {
259
+ if (node.language !== 'swift' || !TYPE_KINDS.has(node.kind) || isSwiftExtension(node, context))
260
+ continue;
261
+ if (path !== null) {
262
+ if (fitsPath(node, path, context))
263
+ scored.push({ node, depth: 0 });
264
+ continue;
265
+ }
266
+ const depth = bare ? bareScopeDepth(node, from, context) : 0;
267
+ if (depth !== null)
268
+ scored.push({ node, depth });
269
+ }
270
+ // Swift looks a bare name up innermost scope first.
271
+ const deepest = Math.max(-1, ...scored.map((s) => s.depth));
272
+ // One declaration per file: a framework resolver's one-line twin of a
273
+ // declaration (`@main struct App`) is the same type.
274
+ const byFile = new Map();
275
+ for (const { node, depth } of scored) {
276
+ if (depth !== deepest)
277
+ continue;
278
+ const had = byFile.get(node.filePath);
279
+ if (!had || node.endLine - node.startLine > had.endLine - had.startLine)
280
+ byFile.set(node.filePath, node);
281
+ }
282
+ const declarations = [...byFile.values()];
283
+ let found = null;
284
+ if (declarations.length === 1) {
285
+ found = declarations[0];
286
+ }
287
+ else if (declarations.length > 1) {
288
+ // The same file's, else the nearest by directory — a package's own type
289
+ // over another package's. A tie is left unresolved.
290
+ found = declarations.find((n) => n.filePath === ref.filePath) ?? null;
291
+ if (!found) {
292
+ const near = Math.max(...declarations.map((n) => sharedDirs(n.filePath, ref.filePath)));
293
+ const nearest = declarations.filter((n) => sharedDirs(n.filePath, ref.filePath) === near);
294
+ found = nearest.length === 1 ? nearest[0] : null;
295
+ }
296
+ }
297
+ memo.set(key, found);
298
+ return found;
299
+ }
300
+ /**
301
+ * A Swift reference's resolved type target, checked against what the site
302
+ * wrote: an extension moves to the declaration it extends, a qualified name
303
+ * to the type on that path, and a bare name of a nested type out of its
304
+ * scope to one in scope — or the reference is left unresolved.
305
+ */
306
+ function gateSwiftTypeTarget(result, ref, context) {
307
+ if (!result || ref.language !== 'swift' || ref.referenceKind === 'imports')
308
+ return result;
309
+ const target = context.getNodeById?.(result.targetNodeId);
310
+ if (!target || target.language !== 'swift' || !TYPE_KINDS.has(target.kind))
311
+ return result;
312
+ const from = context.getNodeById?.(ref.fromNodeId) ?? null;
313
+ const written = writtenName(ref, context);
314
+ if (!isSwiftExtension(target, context)) {
315
+ if (!written.includes('.')) {
316
+ if (bareScopeDepth(target, from, context) !== null)
317
+ return result;
318
+ }
319
+ else {
320
+ const path = writtenPath(written, target.name);
321
+ if (path === null || fitsPath(target, path, context))
322
+ return result;
323
+ }
324
+ }
325
+ const declared = declarationFor(target.name, written, ref, from, context);
326
+ if (!declared)
327
+ return null;
328
+ return declared.id === result.targetNodeId ? result : { ...result, targetNodeId: declared.id };
329
+ }
330
+ /**
331
+ * A call through a type path, `API.PackageController.GetRoute.query` — at
332
+ * least two capitalized segments before the member (the extractor keeps the
333
+ * path only for those; see SWIFT_TYPE_PATH_RECEIVER in tree-sitter.ts).
334
+ */
335
+ exports.SWIFT_TYPE_PATH_CALL = /^(?!Self\.)[A-Z]\w*(?:\.[A-Z]\w*)+\.[A-Za-z_]\w*$/;
336
+ /** What a type-path call can name: a method, or a case with associated values (`Gitlab.Error.requestFailed(status:)`). */
337
+ const PATH_MEMBER_KINDS = new Set(['method', 'function', 'enum_member']);
338
+ /**
339
+ * `API.PackageController.GetRoute.query(on:)` lands on the `query` of the
340
+ * type the path names, and `API.PackageController.Model(name:)` on that
341
+ * nested type — never on the member's name alone: in a Vapor app every
342
+ * route's type has a `query`. A path the call's own namespace lets it
343
+ * shorten (`PackageController.GetRoute` inside `extension API`) or a module
344
+ * qualifier (`Vapor.HTTPStatus`) still fits. No type on the path, or two,
345
+ * leaves the call unresolved.
346
+ */
347
+ function resolveSwiftTypePathCall(ref, context) {
348
+ const name = ref.referenceName;
349
+ const dot = name.lastIndexOf('.');
350
+ const member = name.slice(dot + 1);
351
+ const path = name.slice(0, dot).split('.').join('::');
352
+ const onPath = (kinds) => {
353
+ const exact = [];
354
+ const shortened = [];
355
+ for (const n of context.getNodesByName(member)) {
356
+ if (n.language !== 'swift' || !kinds.has(n.kind))
357
+ continue;
358
+ if (TYPE_KINDS.has(n.kind) && isSwiftExtension(n, context))
359
+ continue;
360
+ const owner = ownerPath(n, context);
361
+ if (owner === null)
362
+ continue;
363
+ if (owner === path)
364
+ exact.push(n);
365
+ else if (owner.endsWith(`::${path}`) || moduleQualified(owner, path, context))
366
+ shortened.push(n);
367
+ }
368
+ return exact.length > 0 ? exact : shortened;
369
+ };
370
+ // `API.PackageController.Model(name:)` constructs a nested type.
371
+ let fit = /^[A-Z]/.test(member) ? onPath(TYPE_KINDS) : [];
372
+ if (fit.length === 0)
373
+ fit = onPath(PATH_MEMBER_KINDS);
374
+ // The Composable Architecture's `@Reducer enum Path { case detail(Detail) }`
375
+ // generates `Path.State` and `Path.Action` with the same cases, so
376
+ // `Path.State.detail(…)` constructs the case written in `Path`.
377
+ if (fit.length === 0) {
378
+ const reducer = /^(.+)::(?:State|Action)$/.exec(path)?.[1];
379
+ if (reducer) {
380
+ fit = context.getNodesByName(member).filter((n) => {
381
+ if (n.language !== 'swift' || n.kind !== 'enum_member')
382
+ return false;
383
+ const owner = ownerPath(n, context);
384
+ return owner !== null && (owner === reducer || owner.endsWith(`::${reducer}`)) && isReducerEnum(n, context);
385
+ });
386
+ }
387
+ }
388
+ if (fit.length === 0 || new Set(fit.map((n) => ownerPath(n, context))).size > 1)
389
+ return null;
390
+ // Of one type's overloads, the first declared.
391
+ const target = fit.reduce((a, b) => (a.filePath < b.filePath || (a.filePath === b.filePath && a.startLine <= b.startLine) ? a : b));
392
+ return { original: ref, targetNodeId: target.id, confidence: 0.9, resolvedBy: 'qualified-name' };
393
+ }
394
+ /** Is this case declared in a `@Reducer enum`? */
395
+ function isReducerEnum(member, context) {
396
+ const owner = context
397
+ .getNodesInFile(member.filePath)
398
+ .filter((t) => t.kind === 'enum' && t.startLine <= member.startLine && t.endLine >= member.endLine)
399
+ .reduce((inner, t) => (!inner || t.startLine >= inner.startLine ? t : inner), null);
400
+ if (!owner)
401
+ return false;
402
+ const lines = linesOf(owner.filePath, context) ?? [];
403
+ // The node starts at its attributes; `@Reducer` may also sit on the line above.
404
+ return /@Reducer\b/.test(lines.slice(Math.max(0, owner.startLine - 2), owner.startLine + 1).join(' '));
405
+ }
406
+ /** `Vapor::HTTPStatus` for a type `HTTPStatus`: a qualifier that names no project type is a module. */
407
+ function moduleQualified(owner, path, context) {
408
+ if (!path.endsWith(`::${owner}`))
409
+ return false;
410
+ const head = path.slice(0, path.length - owner.length - 2);
411
+ return !head.includes('::') && !context.getNodesByName(head).some((n) => n.language === 'swift' && TYPE_KINDS.has(n.kind));
412
+ }
413
+ /**
414
+ * The full path of the type a member is declared on. Its qualified name
415
+ * starts at the outermost declaration in its file, and an extension is named
416
+ * by its last segment — the members of `extension API.PackageController {
417
+ * enum GetRoute { … } }` are `PackageController::GetRoute::…` — so the
418
+ * outermost extension's written path is read back from its line. Null for a
419
+ * top-level function.
420
+ */
421
+ function ownerPath(member, context) {
422
+ const memo = memoFor(context).owners;
423
+ const hit = memo.get(member.id);
424
+ if (hit !== undefined)
425
+ return hit;
426
+ const cut = member.qualifiedName.lastIndexOf('::');
427
+ let path = cut < 0 ? null : member.qualifiedName.slice(0, cut);
428
+ if (path !== null) {
429
+ const first = path.split('::')[0];
430
+ const outer = context
431
+ .getNodesInFile(member.filePath)
432
+ .filter((t) => t.name === first && TYPE_KINDS.has(t.kind) && t.startLine <= member.startLine && t.endLine >= member.endLine)
433
+ .reduce((out, t) => (!out || t.startLine < out.startLine ? t : out), null);
434
+ const extended = outer ? extendedPath(outer, context) : null;
435
+ if (extended)
436
+ path = extended + path.slice(first.length);
437
+ }
438
+ memo.set(member.id, path);
439
+ return path;
440
+ }
441
+ /** `extension API.PackageController {` → `API::PackageController`; null for anything but an extension of a nested type. */
442
+ function extendedPath(node, context) {
443
+ if (!isSwiftExtension(node, context))
444
+ return null;
445
+ const lines = linesOf(node.filePath, context);
446
+ if (!lines)
447
+ return null;
448
+ const head = [(lines[node.startLine - 1] ?? '').slice(node.startColumn), ...lines.slice(node.startLine, node.startLine + 3)]
449
+ .join(' ')
450
+ .replace(/"(?:[^"\\\n]|\\.)*"/g, '""');
451
+ const written = /\bextension\s+((?:[A-Za-z_]\w*\s*\.\s*)+[A-Za-z_]\w*)/.exec(head)?.[1];
452
+ return written ? written.replace(/\s+/g, '').split('.').join('::') : null;
453
+ }
454
+ //# sourceMappingURL=swift-type-visibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"swift-type-visibility.js","sourceRoot":"","sources":["../../src/resolution/swift-type-visibility.ts"],"names":[],"mappings":";;;AAuDA,4DAEC;AAGD,4CAUC;AAGD,8CASC;AAkCD,8DAWC;AAsMD,kDAiBC;AAqBD,4DAsCC;AAnXD,MAAM,UAAU,GAA8B,IAAI,GAAG,CAAe,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AO,IAAI,CAAC;IAClD,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC9C,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;SACzH,IAAI,CAAC,GAAG,CAAC;SACT,OAAO,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG,uDAAuD,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACxF,OAAO,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC5E,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,GAAG,CAAC,CAAC;gBAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACrF,CAAC;QACD,sCAAsC;QACtC,IAAI,EAAE,GAAG,CAAC,CAAC;QACX,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC;QACnB,OAAO,EAAE,GAAG,EAAE,EAAE,CAAC;YACf,MAAM,GAAG,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;YAC3B,IAAI,EAAE,CAAC,GAAG,CAAE,GAAG,GAAG;gBAAE,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;;gBAC5B,EAAE,GAAG,GAAG,CAAC;QAChB,CAAC;QACD,OAAO,QAAQ,GAAG,EAAE,CAAC;IACvB,CAAC,CAAC;AACJ,CAAC;AAED,uEAAuE;AACvE,SAAgB,WAAW,CAAC,WAA4B,EAAE,IAAY;IACpE,IAAI,IAAI,GAAgB,IAAI,CAAC;IAC7B,KAAK,MAAM,CAAC,IAAI,WAAW,EAAE,CAAC;QAC5B,IAAI,CAAC,gBAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;YAAE,SAAS;QACpC,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,CAAC,iDAAiD;QACzG,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,WAA4B,EAAE,IAAY;IACvE,IAAI,IAAI,GAAgB,IAAI,CAAC;IAC7B,KAAK,MAAM,CAAC,IAAI,WAAW,EAAE,CAAC;QAC5B,IAAI,CAAC,CAAC,IAAI,KAAK,UAAU,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"}