@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,1126 @@
1
+ "use strict";
2
+ /**
3
+ * Angular Router — routes declared in `Routes` arrays, navigation written as
4
+ * command arrays.
5
+ *
6
+ * export const routes: Routes = [
7
+ * { path: 'login', component: AuthComponent },
8
+ * { path: 'article/:slug', loadComponent: () => import('./article.component') },
9
+ * { path: 'editor', children: [{ path: ':slug', loadComponent: … }] },
10
+ * { path: 'profile', loadChildren: () => import('./profile/profile.routes') },
11
+ * ];
12
+ *
13
+ * `extract()` reads every such array — typed `Routes` / `Route[]`, passed to
14
+ * `RouterModule.forRoot/forChild(…)` or `provideRouter(…)`, or a routes
15
+ * file's `export default [...]` — into one `route` node per screen, named by
16
+ * its path the way every other framework's routes are. Angular paths are
17
+ * relative: a child's path joins its parent's, and a `loadChildren` file's
18
+ * routes sit under the path that lazy-loads them, which only a cross-file
19
+ * pass can know — so `extract()` names a routes file's routes as if it were
20
+ * mounted at `/`, and `postExtract()` puts each under its mount (following an
21
+ * NgModule `loadChildren` through to the routing module it imports).
22
+ *
23
+ * A route with `children` is a layout, not a screen: its component renders
24
+ * an outlet the children fill, and the `''` child is the screen at its
25
+ * address. It is a screen only when no child claims that address. A
26
+ * `redirectTo` entry and a `**` catch-all are not screens either.
27
+ *
28
+ * A path written as a constant (`path: internalRoutes.account.path`) is read
29
+ * from the object the constant names, `$localize` defaults included, in the
30
+ * same cross-file pass.
31
+ *
32
+ * A route binds to its component with a `references` edge — `route-roots.ts`
33
+ * takes a class as the handler a resolver named. A lazy `loadComponent`
34
+ * names a file, and its component is the `@Component` class that file
35
+ * exports.
36
+ *
37
+ * **Navigation is a command array.** `router.navigate(['/article', slug])`
38
+ * is `/article/${…}`; `navigateByUrl('/login')`, a guard's
39
+ * `router.createUrlTree(['/login'])` and `parseUrl('/login')` name a path the
40
+ * way every other router's calls do. A relative navigation (`relativeTo`) is
41
+ * left unresolved rather than guessed. `routerLink` is markup, read by
42
+ * `angular-template-synthesizer.ts`.
43
+ */
44
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
45
+ if (k2 === undefined) k2 = k;
46
+ var desc = Object.getOwnPropertyDescriptor(m, k);
47
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
48
+ desc = { enumerable: true, get: function() { return m[k]; } };
49
+ }
50
+ Object.defineProperty(o, k2, desc);
51
+ }) : (function(o, m, k, k2) {
52
+ if (k2 === undefined) k2 = k;
53
+ o[k2] = m[k];
54
+ }));
55
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
56
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
57
+ }) : function(o, v) {
58
+ o["default"] = v;
59
+ });
60
+ var __importStar = (this && this.__importStar) || (function () {
61
+ var ownKeys = function(o) {
62
+ ownKeys = Object.getOwnPropertyNames || function (o) {
63
+ var ar = [];
64
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
65
+ return ar;
66
+ };
67
+ return ownKeys(o);
68
+ };
69
+ return function (mod) {
70
+ if (mod && mod.__esModule) return mod;
71
+ var result = {};
72
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
73
+ __setModuleDefault(result, mod);
74
+ return result;
75
+ };
76
+ })();
77
+ Object.defineProperty(exports, "__esModule", { value: true });
78
+ exports.angularRouterResolver = void 0;
79
+ exports.localizeDefault = localizeDefault;
80
+ exports.staticString = staticString;
81
+ exports.parseAngularRoutes = parseAngularRoutes;
82
+ exports.isAngularRoute = isAngularRoute;
83
+ exports.componentClassesIn = componentClassesIn;
84
+ exports.constantText = constantText;
85
+ exports.angularRouteTable = angularRouteTable;
86
+ exports.angularRoutesFor = angularRoutesFor;
87
+ exports.commandsHref = commandsHref;
88
+ exports.namesSomewhere = namesSomewhere;
89
+ exports.propertyInitializer = propertyInitializer;
90
+ exports.angularDestination = angularDestination;
91
+ exports.templatePathFor = templatePathFor;
92
+ const path = __importStar(require("path"));
93
+ const import_resolver_1 = require("../import-resolver");
94
+ const strip_comments_1 = require("../strip-comments");
95
+ const object_literal_1 = require("./object-literal");
96
+ const package_deps_1 = require("./package-deps");
97
+ const expo_router_1 = require("./expo-router");
98
+ const nextjs_1 = require("./nextjs");
99
+ /** A file that could hold a routes array — the cheap gate before scanning. */
100
+ const ROUTER_IMPORT = /['"]@angular\/router['"]/;
101
+ /**
102
+ * Where a routes array opens: typed `Routes` / `Route[]`, handed to
103
+ * `RouterModule.forRoot/forChild` or `provideRouter`, or a routes file's
104
+ * default export. `children: [` is reached by walking an entry, never here.
105
+ */
106
+ const ARRAY_OPENERS = /(?::\s*(?:Routes|Route\s*\[\s*\])\s*=\s*|\bRouterModule\s*\.\s*for(?:Root|Child)\s*\(\s*|\bprovideRouter\s*\(\s*|\bexport\s+default\s+(?:<\s*Routes\s*>\s*)?|\b(?:const|let)\s+[A-Za-z_$][\w$]*\s*=\s*)\[/g;
107
+ /** The fields that make an object a route rather than any object in an array. */
108
+ const ROUTE_KEYS = ['component', 'loadComponent', 'children', 'loadChildren', 'redirectTo'];
109
+ /** A path value the pass can name later: `internalRoutes.account.path`. */
110
+ const CONSTANT_PATH = /^[A-Za-z_$][\w$]*(?:\s*\.\s*[A-Za-z_$][\w$]*)+$/;
111
+ /** A `$localize` tagged template's default text: `` $localize`:kebab-case@@routes.about:about` `` is `about`. */
112
+ function localizeDefault(text) {
113
+ const m = /^\$localize\s*`((?:[^`\\$]|\\.)*)`$/.exec(text.trim());
114
+ if (!m)
115
+ return null;
116
+ const body = m[1];
117
+ // `:meaning|description@@id:text` — the metadata block is the leading `:…:`.
118
+ const meta = /^:[^:]*:/.exec(body);
119
+ return meta ? body.slice(meta[0].length) : body;
120
+ }
121
+ /**
122
+ * A string written statically: a literal, a `$localize` default, or `+`
123
+ * between those — `'/' + $localize`:…:about``, as Ghostfolio builds its
124
+ * links. Null when any part is computed.
125
+ */
126
+ function staticString(text) {
127
+ const parts = [];
128
+ let rest = text.trim();
129
+ while (rest.length > 0) {
130
+ let part = null;
131
+ let used = 0;
132
+ const q = rest[0];
133
+ if (q === '"' || q === "'") {
134
+ part = (0, expo_router_1.readStringAt)(rest, 0);
135
+ used = part === null ? 0 : (0, object_literal_1.skipString)(rest, 0) + 1;
136
+ }
137
+ else if (rest.startsWith('$localize')) {
138
+ const tick = rest.indexOf('`');
139
+ const end = tick < 0 ? -1 : (0, object_literal_1.skipString)(rest, tick);
140
+ if (end > 0) {
141
+ part = localizeDefault(rest.slice(0, end + 1));
142
+ used = end + 1;
143
+ }
144
+ }
145
+ else if (q === '`') {
146
+ const end = (0, object_literal_1.skipString)(rest, 0);
147
+ const body = end > 0 ? rest.slice(1, end) : '';
148
+ if (end > 0 && !body.includes('${')) {
149
+ part = body;
150
+ used = end + 1;
151
+ }
152
+ }
153
+ if (part === null || used === 0)
154
+ return null;
155
+ parts.push(part);
156
+ rest = rest.slice(used).trim();
157
+ if (rest.length === 0)
158
+ break;
159
+ if (rest[0] !== '+')
160
+ return null;
161
+ rest = rest.slice(1).trim();
162
+ }
163
+ return parts.length > 0 ? parts.join('') : null;
164
+ }
165
+ /** A route's own path segment(s): a string, a `$localize` default, or a constant kept as `{expr}`; null when it cannot be named. */
166
+ function pathSegments(text) {
167
+ const trimmed = text.trim();
168
+ const value = staticString(trimmed);
169
+ if (value !== null) {
170
+ if (value.includes('**'))
171
+ return null;
172
+ return value.split('/').filter((s) => s.length > 0);
173
+ }
174
+ if (CONSTANT_PATH.test(trimmed))
175
+ return [`{${trimmed.replace(/\s+/g, '')}}`];
176
+ // `` `issue/:${ProjectConst.IssueId}` ``: a template whose holes are constants.
177
+ if (trimmed.startsWith('`') && (0, object_literal_1.skipString)(trimmed, 0) === trimmed.length - 1) {
178
+ let ok = true;
179
+ const body = trimmed.slice(1, -1).replace(/\$\{([^}]*)\}/g, (_all, hole) => {
180
+ if (!CONSTANT_PATH.test(hole.trim()))
181
+ ok = false;
182
+ return `{${hole.replace(/\s+/g, '')}}`;
183
+ });
184
+ if (ok && !body.includes('**'))
185
+ return body.split('/').filter((seg) => seg.length > 0);
186
+ return null;
187
+ }
188
+ // `internalRoutes.account.subRoutes.access.path + '/:id'`: each part a
189
+ // string or a constant, the constant a whole segment of its own.
190
+ if (trimmed.includes('+')) {
191
+ const joined = [];
192
+ for (const part of splitPlus(trimmed)) {
193
+ const literal = staticString(part);
194
+ if (literal !== null)
195
+ joined.push(literal);
196
+ else if (CONSTANT_PATH.test(part.trim()))
197
+ joined.push(`{${part.trim().replace(/\s+/g, '')}}`);
198
+ else
199
+ return null;
200
+ }
201
+ const value = joined.join('');
202
+ return value.includes('**') ? null : value.split('/').filter((seg) => seg.length > 0);
203
+ }
204
+ return null;
205
+ }
206
+ /** An expression's `+` operands at depth 0, strings and brackets stepped over. */
207
+ function splitPlus(text) {
208
+ const parts = [];
209
+ let start = 0;
210
+ for (let i = 0; i < text.length; i++) {
211
+ const ch = text[i];
212
+ if (ch === '"' || ch === "'" || ch === '`') {
213
+ const end = (0, object_literal_1.skipString)(text, i);
214
+ if (end < 0)
215
+ return [text];
216
+ i = end;
217
+ }
218
+ else if (ch === '(' || ch === '[' || ch === '{') {
219
+ const end = (0, object_literal_1.matchBracket)(text, i);
220
+ if (end < 0)
221
+ return [text];
222
+ i = end;
223
+ }
224
+ else if (ch === '+') {
225
+ parts.push(text.slice(start, i));
226
+ start = i + 1;
227
+ }
228
+ }
229
+ parts.push(text.slice(start));
230
+ return parts;
231
+ }
232
+ /** The component a `component:` / `loadComponent:` value names. */
233
+ function componentRef(field, text) {
234
+ if (field === 'component') {
235
+ const ident = /^\s*([A-Z][\w$]*)\s*$/.exec(text);
236
+ return ident ? { name: ident[1], spec: null } : null;
237
+ }
238
+ const lazy = lazyImport(text);
239
+ return lazy ? { name: lazy.member, spec: lazy.spec } : null;
240
+ }
241
+ /** `() => import('./x')` → `./x`; `.then(m => m.X)` / `.then((c) => c.X)` names the member. */
242
+ function lazyImport(text) {
243
+ const imp = /\bimport\s*\(\s*(['"`])([^'"`]+)\1\s*\)/.exec(text);
244
+ if (!imp)
245
+ return null;
246
+ const after = text.slice(imp.index + imp[0].length);
247
+ const then = /^\s*\.then\s*\(\s*\(?\s*([A-Za-z_$][\w$]*)\s*\)?\s*=>\s*\(?\s*\1\s*\.\s*([A-Za-z_$][\w$]*)/.exec(after);
248
+ // `async () => (await import('./x')).HomeModule`
249
+ const awaited = /^\s*\)\s*\.\s*([A-Za-z_$][\w$]*)/.exec(after);
250
+ return { spec: imp[2], member: then ? then[2] : awaited ? awaited[1] : null };
251
+ }
252
+ function joinPath(segs) {
253
+ return '/' + segs.join('/');
254
+ }
255
+ /**
256
+ * Every screen and lazy mount a file's routes arrays declare. Entries are
257
+ * walked as objects (`object-literal.ts`), never read out of a window of
258
+ * text: `path` may be written after `component`.
259
+ */
260
+ function parseAngularRoutes(content) {
261
+ const routes = [];
262
+ const mounts = [];
263
+ const redirects = [];
264
+ if (!ROUTER_IMPORT.test(content))
265
+ return { routes, mounts, redirects };
266
+ const safe = (0, strip_comments_1.stripCommentsForRegex)(content, 'typescript');
267
+ const lineOf = (at) => safe.slice(0, at).split('\n').length;
268
+ const seenPaths = new Set();
269
+ const walked = new Set();
270
+ const walk = (open, close, prefix, depth, layouts) => {
271
+ if (walked.has(open) || depth > 12)
272
+ return;
273
+ walked.add(open);
274
+ for (const obj of (0, object_literal_1.topLevelObjects)(safe, open + 1, close)) {
275
+ const fields = (0, object_literal_1.readFields)(safe, obj.start, obj.end);
276
+ if (!ROUTE_KEYS.some((k) => fields.has(k)))
277
+ continue;
278
+ // A custom `matcher` decides the address at run time — no path to name.
279
+ if (fields.has('matcher'))
280
+ continue;
281
+ const pathField = fields.get('path');
282
+ // `{ path: '**', redirectTo: 'home' }`: where an address nothing else matches lands.
283
+ if (pathField && fields.has('redirectTo') && staticString(pathField.text) === '**') {
284
+ const target = staticString(fields.get('redirectTo').text);
285
+ if (target !== null && !target.includes('**')) {
286
+ const absolute = target.startsWith('/');
287
+ redirects.push({ from: joinPath([...prefix, '**']), to: joinPath([...(absolute ? [] : prefix), ...target.split('/').filter((t) => t.length > 0)]), absolute });
288
+ }
289
+ continue;
290
+ }
291
+ const own = pathField ? pathSegments(pathField.text) : [];
292
+ if (own === null)
293
+ continue; // a computed path, or a `**` catch-all
294
+ const segs = [...prefix, ...own];
295
+ const line = lineOf(pathField ? pathField.at : obj.start);
296
+ const redirectTo = fields.get('redirectTo');
297
+ if (redirectTo) {
298
+ // `{ path: '', redirectTo: 'home' }`: arriving at `/` is arriving at
299
+ // `/home`. A relative target is a sibling, under the same parent.
300
+ const target = staticString(redirectTo.text);
301
+ if (target !== null && !target.includes('**')) {
302
+ const absolute = target.startsWith('/');
303
+ const to = joinPath([...(absolute ? [] : prefix), ...target.split('/').filter((t) => t.length > 0)]);
304
+ redirects.push({ from: joinPath(segs), to, absolute });
305
+ }
306
+ continue;
307
+ }
308
+ const loadChildren = fields.get('loadChildren');
309
+ if (loadChildren) {
310
+ const lazy = lazyImport(loadChildren.text);
311
+ if (lazy)
312
+ mounts.push({ prefix: joinPath(segs), spec: lazy.spec, line });
313
+ continue;
314
+ }
315
+ const componentField = fields.get('component') ? 'component' : fields.get('loadComponent') ? 'loadComponent' : null;
316
+ const component = componentField ? componentRef(componentField, fields.get(componentField).text) : null;
317
+ const children = fields.get('children');
318
+ let childClaimsAddress = false;
319
+ if (children) {
320
+ const childOpen = safe.indexOf('[', children.at);
321
+ const childClose = childOpen < 0 ? -1 : (0, object_literal_1.matchBracket)(safe, childOpen);
322
+ if (childOpen >= 0 && childClose > childOpen) {
323
+ for (const child of (0, object_literal_1.topLevelObjects)(safe, childOpen + 1, childClose)) {
324
+ const childPath = (0, object_literal_1.readFields)(safe, child.start, child.end).get('path');
325
+ if (!childPath || pathSegments(childPath.text)?.length === 0)
326
+ childClaimsAddress = true;
327
+ }
328
+ walk(childOpen, childClose, segs, depth + 1, component ? [...layouts, component] : layouts);
329
+ }
330
+ }
331
+ // A layout is a screen only where no child claims its address; a
332
+ // redirect and a componentless grouping are no screen at all.
333
+ if (!componentField || (children && childClaimsAddress))
334
+ continue;
335
+ const route = joinPath(segs);
336
+ if (seenPaths.has(route))
337
+ continue;
338
+ seenPaths.add(route);
339
+ routes.push({ path: route, line, component, layouts: [...layouts] });
340
+ }
341
+ };
342
+ ARRAY_OPENERS.lastIndex = 0;
343
+ let m;
344
+ while ((m = ARRAY_OPENERS.exec(safe)) !== null) {
345
+ const open = m.index + m[0].length - 1;
346
+ const close = (0, object_literal_1.matchBracket)(safe, open);
347
+ if (close < 0)
348
+ continue;
349
+ // `const x = [` is a routes array only when it says so: `] as Routes` / `] satisfies Routes`.
350
+ if (/^\b(?:const|let)\b/.test(m[0]) && !/^\]\s*(?:as|satisfies)\s+Routes\b/.test(safe.slice(close, close + 32)))
351
+ continue;
352
+ walk(open, close, [], 0, []);
353
+ }
354
+ return { routes, mounts, redirects };
355
+ }
356
+ /** The id a config-declared route carries — reconstructed exactly, so the resolver recognises its own. */
357
+ function routeId(filePath, line, inFilePath) {
358
+ return `route:${filePath}:${line}:${inFilePath}:angular`;
359
+ }
360
+ /** True for a route node this resolver emitted. */
361
+ function isAngularRoute(node) {
362
+ return node.kind === 'route' && node.id.endsWith(':angular') && node.id === routeId(node.filePath, node.startLine, inFilePath(node));
363
+ }
364
+ /** The path a route has within its own file, before any mount — kept in the qualified name so the cross-file pass is idempotent. */
365
+ function inFilePath(node) {
366
+ const marker = '::route:';
367
+ const at = node.qualifiedName.indexOf(marker);
368
+ return at < 0 ? node.name : node.qualifiedName.slice(at + marker.length);
369
+ }
370
+ // =============================================================================
371
+ // The component a file lazily exports
372
+ // =============================================================================
373
+ /** `@Component({…}) export default class X` / `export class X` — the classes a file declares as components. */
374
+ const COMPONENT_CLASS = /@Component\s*\(/g;
375
+ /** The `@Component` classes a file declares, in order, with whether each is the default export. */
376
+ function componentClassesIn(content) {
377
+ const out = [];
378
+ const safe = (0, strip_comments_1.stripCommentsForRegex)(content, 'typescript');
379
+ COMPONENT_CLASS.lastIndex = 0;
380
+ let m;
381
+ while ((m = COMPONENT_CLASS.exec(safe)) !== null) {
382
+ const open = m.index + m[0].length - 1;
383
+ const close = (0, object_literal_1.matchBracket)(safe, open);
384
+ if (close < 0)
385
+ continue;
386
+ const after = /^\s*(export\s+)?(default\s+)?(?:abstract\s+)?class\s+([A-Za-z_$][\w$]*)/.exec(safe.slice(close + 1, close + 400));
387
+ if (after)
388
+ out.push({ name: after[3], isDefault: !!after[2], decoratorAt: m.index });
389
+ COMPONENT_CLASS.lastIndex = close;
390
+ }
391
+ return out;
392
+ }
393
+ /** The component class a lazily loaded file provides: the member named, else its default export, else its only component. */
394
+ function lazyComponent(spec, member, fromFile, context) {
395
+ const file = (0, import_resolver_1.resolveImportPath)(spec, fromFile, 'typescript', context);
396
+ if (!file)
397
+ return null;
398
+ let name = member;
399
+ if (!name) {
400
+ const content = context.readFile(file);
401
+ if (!content)
402
+ return null;
403
+ const classes = componentClassesIn(content);
404
+ name = (classes.find((c) => c.isDefault) ?? (classes.length === 1 ? classes[0] : undefined))?.name ?? null;
405
+ if (!name) {
406
+ const plain = /\bexport\s+default\s+class\s+([A-Za-z_$][\w$]*)/.exec(content);
407
+ name = plain ? plain[1] : null;
408
+ }
409
+ }
410
+ if (!name)
411
+ return null;
412
+ return context.getNodesInFile(file).find((n) => n.kind === 'class' && n.name === name) ?? null;
413
+ }
414
+ /** A path's segments with each `{expr}` read from the constant it names, as seen from `file` — where the route (or the mount) is written. */
415
+ function resolvedSegments(pathText, file, context) {
416
+ return pathText
417
+ .split('/')
418
+ .filter((seg) => seg.length > 0)
419
+ .flatMap((seg) => {
420
+ if (seg.startsWith('{') && seg.endsWith('}') && seg.indexOf('{', 1) < 0) {
421
+ const value = constantValue(seg.slice(1, -1), file, context);
422
+ return value === null ? [seg] : value.split('/').filter((v) => v.length > 0);
423
+ }
424
+ // `:{ProjectConst.IssueId}` — a constant inside a segment.
425
+ return [seg.replace(/\{([^{}]+)\}/g, (all, expr) => constantValue(expr, file, context) ?? all)];
426
+ });
427
+ }
428
+ /** The class a route's component names, by its import (or this file) — or a lazy import's. */
429
+ function routeComponent(encoded, fromFile, context) {
430
+ const lazy = LAZY_COMPONENT_REF.exec(encoded);
431
+ if (lazy)
432
+ return lazyComponent(lazy[1], lazy[2] === 'default' ? null : lazy[2], fromFile, context);
433
+ const file = declaringFile(encoded, fromFile, context);
434
+ return file ? (context.getNodesInFile(file).find((n) => n.kind === 'class' && n.name === encoded) ?? null) : null;
435
+ }
436
+ // =============================================================================
437
+ // The cross-file pass: mounts and constant paths
438
+ // =============================================================================
439
+ /**
440
+ * The file a routes import names, and — for an NgModule — the routing modules
441
+ * it imports. A barrel is looked through first: an Nx library is imported by
442
+ * its alias (`@angular-spotify/web/home/feature`), which names the library's
443
+ * `src/index.ts`, whose `export * from './lib/home.module'` names the module.
444
+ */
445
+ function routeFilesLoadedBy(spec, fromFile, context, routeFiles, mountFiles) {
446
+ const target = (0, import_resolver_1.resolveImportPath)(spec, fromFile, 'typescript', context);
447
+ const seen = new Set();
448
+ const out = [];
449
+ // A barrel can re-export another barrel; a few hops settle it.
450
+ let barrels = target ? [target] : [];
451
+ for (let hop = 0; hop < 4 && barrels.length > 0; hop++) {
452
+ const next = [];
453
+ for (const file of barrels) {
454
+ if (seen.has(file))
455
+ continue;
456
+ seen.add(file);
457
+ if (routeFiles.has(file) || mountFiles.has(file)) {
458
+ out.push(file);
459
+ continue;
460
+ }
461
+ const content = context.readFile(file);
462
+ if (!content)
463
+ continue;
464
+ // `loadChildren: () => import('./layout/layout.module').then(m => m.LayoutModule)`:
465
+ // the module holds no routes; the routing module it imports does.
466
+ if (/@NgModule\s*\(/.test(content)) {
467
+ const imports = /\bimport\s+[^'"]*?from\s+(['"])([^'"]+)\1/g;
468
+ let m;
469
+ while ((m = imports.exec(content)) !== null) {
470
+ const imported = (0, import_resolver_1.resolveImportPath)(m[2], file, 'typescript', context);
471
+ if (imported && (routeFiles.has(imported) || mountFiles.has(imported)) && !out.includes(imported))
472
+ out.push(imported);
473
+ }
474
+ continue;
475
+ }
476
+ const reexports = /\bexport\s+(?:\*|\{[^}]*\})\s*(?:as\s+[\w$]+\s*)?from\s+(['"])([^'"]+)\1/g;
477
+ let m;
478
+ while ((m = reexports.exec(content)) !== null) {
479
+ const reexported = (0, import_resolver_1.resolveImportPath)(m[2], file, 'typescript', context);
480
+ if (reexported && !seen.has(reexported))
481
+ next.push(reexported);
482
+ }
483
+ }
484
+ barrels = next;
485
+ }
486
+ return out;
487
+ }
488
+ /** Per context, renewed with the route list (whose identity changes when the resolver's caches do). */
489
+ const constantTexts = new WeakMap();
490
+ /**
491
+ * The source text a constant member chain names — `internalRoutes.account.path`
492
+ * is the `path:` field of `account` in `export const internalRoutes = {…}` —
493
+ * read from the file the chain's root is imported from (or declared in).
494
+ */
495
+ function constantText(expr, fromFile, context) {
496
+ const source = context.getNodesByKind('route');
497
+ let entry = constantTexts.get(context);
498
+ if (!entry || entry.source !== source)
499
+ constantTexts.set(context, (entry = { source, memo: new Map() }));
500
+ const memo = entry.memo;
501
+ const key = `${fromFile}\0${expr}`;
502
+ if (memo.has(key))
503
+ return memo.get(key);
504
+ // `const { create } = internalRoutes.accounts.subRoutes;` / `const accounts = internalRoutes.accounts;`
505
+ // make `create.path` a chain rooted at the import.
506
+ const aliased = localAlias(expr, fromFile, context);
507
+ if (aliased !== null && aliased !== expr) {
508
+ const value = constantText(aliased, fromFile, context);
509
+ memo.set(key, value);
510
+ return value;
511
+ }
512
+ const [root, ...chain] = expr.split('.').map((part) => part.trim());
513
+ let value = null;
514
+ const file = root ? declaringFile(root, fromFile, context) : null;
515
+ const content = file && root ? declarationSource(root, file, context, 0) : null;
516
+ if (content && root && chain.length > 0) {
517
+ const safe = (0, strip_comments_1.stripCommentsForRegex)(content, 'typescript');
518
+ const readChain = (open, links) => {
519
+ let start = open;
520
+ let end = (0, object_literal_1.matchBracket)(safe, start);
521
+ for (let i = 0; i < links.length && end > start; i++) {
522
+ const field = (0, object_literal_1.readFields)(safe, start, end).get(links[i]);
523
+ if (!field)
524
+ return null;
525
+ if (i === links.length - 1)
526
+ return field.text.trim();
527
+ start = safe.indexOf('{', field.at);
528
+ end = start < 0 ? -1 : (0, object_literal_1.matchBracket)(safe, start);
529
+ }
530
+ return null;
531
+ };
532
+ const decl = new RegExp(String.raw `\b(?:const|let)\s+${root}\s*(?::[^=]+)?=\s*\{`).exec(safe);
533
+ const enumDecl = decl ? null : new RegExp(String.raw `\benum\s+${root}\s*\{`).exec(safe);
534
+ const classDecl = decl || enumDecl ? null : new RegExp(String.raw `\bclass\s+${root}\b[^{]*\{`).exec(safe);
535
+ if (decl)
536
+ value = readChain(decl.index + decl[0].length - 1, chain);
537
+ else if (enumDecl && chain.length === 1) {
538
+ // `enum Paths { Board = 'board' }`
539
+ const open = enumDecl.index + enumDecl[0].length - 1;
540
+ const body = safe.slice(open, Math.max(open, (0, object_literal_1.matchBracket)(safe, open)));
541
+ value = new RegExp(String.raw `\b${chain[0]}\s*=\s*(['"\`][^'"\`]*['"\`])`).exec(body)?.[1] ?? null;
542
+ }
543
+ else if (classDecl) {
544
+ // `class ProjectConst { static readonly IssueId = 'issueId' }`, and
545
+ // `class RouterUtil { static Configuration = { Visualizer: 'visualizer' } }`.
546
+ const open = classDecl.index + classDecl[0].length - 1;
547
+ const close = (0, object_literal_1.matchBracket)(safe, open);
548
+ const body = close > open ? safe.slice(open, close) : '';
549
+ const field = new RegExp(String.raw `\bstatic\s+(?:readonly\s+)?${chain[0]}\s*(?::[^=;]+)?=\s*`).exec(body);
550
+ if (field) {
551
+ const at = open + field.index + field[0].length;
552
+ if (safe[at] === '{')
553
+ value = chain.length > 1 ? readChain(at, chain.slice(1)) : null;
554
+ else if (chain.length === 1)
555
+ value = /^(['"\`])[^'"\`]*\1/.exec(safe.slice(at))?.[0] ?? null;
556
+ }
557
+ }
558
+ }
559
+ memo.set(key, value);
560
+ return value;
561
+ }
562
+ /**
563
+ * The source that declares `root`: `file` itself, or — when `file` is a
564
+ * barrel (an Nx library's `src/index.ts`) — the module it re-exports it from.
565
+ */
566
+ function declarationSource(root, file, context, hops) {
567
+ const content = context.readFile(file);
568
+ if (!content)
569
+ return null;
570
+ if (new RegExp(String.raw `\b(?:const|let|class|enum)\s+${root}\b`).test(content))
571
+ return content;
572
+ if (hops >= 3)
573
+ return null;
574
+ const reexports = /\bexport\s+(\*|\{[^}]*\})\s*from\s+(['"])([^'"]+)\2/g;
575
+ let m;
576
+ while ((m = reexports.exec(content)) !== null) {
577
+ if (m[1] !== '*' && !new RegExp(String.raw `\b${root}\b`).test(m[1]))
578
+ continue;
579
+ const target = (0, import_resolver_1.resolveImportPath)(m[3], file, 'typescript', context);
580
+ const found = target ? declarationSource(root, target, context, hops + 1) : null;
581
+ if (found)
582
+ return found;
583
+ }
584
+ return null;
585
+ }
586
+ /** `create.path` as the chain its root was destructured from in `fromFile`, or null when the root is no local alias. */
587
+ function localAlias(expr, fromFile, context) {
588
+ const content = context.readFile(fromFile);
589
+ if (!content)
590
+ return null;
591
+ const [root, ...rest] = expr.split('.');
592
+ if (!root)
593
+ return null;
594
+ const destructure = /\b(?:const|let)\s*\{([^}]*)\}\s*=\s*([A-Za-z_$][\w$]*(?:\s*\.\s*[A-Za-z_$][\w$]*)*)\s*;?/g;
595
+ let m;
596
+ while ((m = destructure.exec(content)) !== null) {
597
+ for (const binding of m[1].split(',')) {
598
+ const [prop, local] = binding.split(':').map((part) => part.trim());
599
+ if ((local ?? prop) === root && prop)
600
+ return [`${m[2].replace(/\s+/g, '')}.${prop}`, ...rest].join('.');
601
+ }
602
+ }
603
+ const simple = new RegExp(String.raw `\b(?:const|let)\s+${root}\s*=\s*([A-Za-z_$][\w$]*(?:\s*\.\s*[A-Za-z_$][\w$]*)+)\s*;`).exec(content);
604
+ return simple ? [simple[1].replace(/\s+/g, ''), ...rest].join('.') : null;
605
+ }
606
+ /** A constant path's value: `internalRoutes.account.path` → `account`. */
607
+ function constantValue(expr, fromFile, context) {
608
+ const text = constantText(expr, fromFile, context);
609
+ return text === null ? null : staticString(text);
610
+ }
611
+ /** The file declaring `name` for code in `fromFile`: its import, else the file itself. */
612
+ function declaringFile(name, fromFile, context) {
613
+ const content = context.readFile(fromFile);
614
+ if (!content)
615
+ return null;
616
+ const imports = /\bimport\s*\{([^}]*)\}\s*from\s*(['"])([^'"]+)\2/g;
617
+ let m;
618
+ while ((m = imports.exec(content)) !== null) {
619
+ const names = m[1].split(',').map((s) => s.trim().split(/\s+as\s+/).pop().trim());
620
+ if (names.includes(name))
621
+ return (0, import_resolver_1.resolveImportPath)(m[3], fromFile, 'typescript', context);
622
+ }
623
+ return fromFile;
624
+ }
625
+ const mountMemo = new WeakMap();
626
+ /**
627
+ * Where every routes file is mounted — the `loadChildren` chain from the app
628
+ * down, settled from the top. Shared by the cross-file pass, which names the
629
+ * routes, and the route table, which reads the redirects in files that only
630
+ * mount others (jira-clone's `app.routes.ts` holds nothing but two mounts and
631
+ * `'' → 'project'`).
632
+ */
633
+ function angularMounts(context, routes) {
634
+ const source = context.getNodesByKind('route');
635
+ const cached = mountMemo.get(context);
636
+ if (cached && cached.source === source)
637
+ return cached.mounts;
638
+ const routeFiles = new Set(routes.map((r) => r.filePath));
639
+ const mountsByFile = new Map();
640
+ for (const file of context.getAllFiles()) {
641
+ if (!/\.[cm]?ts$/.test(file) || !(context.fileContains?.(file, 'loadChildren') ?? context.readFile(file)?.includes('loadChildren')))
642
+ continue;
643
+ const content = context.readFile(file);
644
+ if (!content)
645
+ continue;
646
+ const { mounts } = parseAngularRoutes(content);
647
+ if (mounts.length > 0)
648
+ mountsByFile.set(file, mounts);
649
+ }
650
+ const mountFiles = new Set(mountsByFile.keys());
651
+ const loadedBy = new Map();
652
+ for (const [file, mounts] of mountsByFile) {
653
+ for (const mount of mounts) {
654
+ for (const target of routeFilesLoadedBy(mount.spec, file, context, routeFiles, mountFiles)) {
655
+ // A file mounted from two places keeps its first mount.
656
+ if (target !== file && !loadedBy.has(target))
657
+ loadedBy.set(target, { parent: file, prefix: mount.prefix });
658
+ }
659
+ }
660
+ }
661
+ const memo = new Map();
662
+ const prefixOf = (file, seen = new Set()) => {
663
+ const hit = memo.get(file);
664
+ if (hit !== undefined)
665
+ return hit;
666
+ const mount = loadedBy.get(file);
667
+ let prefix = [];
668
+ if (mount && !seen.has(file)) {
669
+ seen.add(file);
670
+ prefix = [...prefixOf(mount.parent, seen), ...resolvedSegments(mount.prefix, mount.parent, context)];
671
+ }
672
+ memo.set(file, prefix);
673
+ return prefix;
674
+ };
675
+ const mounts = { mountFiles, prefixOf: (file) => prefixOf(file) };
676
+ mountMemo.set(context, { source, mounts });
677
+ return mounts;
678
+ }
679
+ const workspaceRoots = new WeakMap();
680
+ /**
681
+ * The app a routes file belongs to. An Angular workspace — the directory an
682
+ * `angular.json` or an Nx `nx.json` sits in — is one app however its routes
683
+ * are split: angular-spotify declares its screens across a dozen `libs/*`
684
+ * packages, each with a `src/` of its own, and keyed by those every
685
+ * template's `routerLink` looked for its routes in the wrong table. Outside a
686
+ * workspace, the conventional app root.
687
+ */
688
+ function angularAppRoot(filePath, context) {
689
+ let memo = workspaceRoots.get(context);
690
+ if (!memo)
691
+ workspaceRoots.set(context, (memo = new Map()));
692
+ const slash = filePath.lastIndexOf('/');
693
+ const dir = slash < 0 ? '' : filePath.slice(0, slash);
694
+ let found = memo.get(dir);
695
+ if (found === undefined) {
696
+ found = null;
697
+ for (let d = dir; d !== null; d = d === '' ? null : d.includes('/') ? d.slice(0, d.lastIndexOf('/')) : '') {
698
+ const at = d === '' ? '' : `${d}/`;
699
+ if (context.fileExists(`${at}angular.json`) || context.fileExists(`${at}nx.json`)) {
700
+ found = at;
701
+ break;
702
+ }
703
+ }
704
+ memo.set(dir, found);
705
+ }
706
+ return found ?? (0, expo_router_1.appRootFor)(filePath);
707
+ }
708
+ const tables = new WeakMap();
709
+ function angularRouteTable(context) {
710
+ const all = context.getNodesByKind('route');
711
+ const cached = tables.get(context);
712
+ if (cached && cached.source === all)
713
+ return cached;
714
+ const byRoot = new Map();
715
+ const byFile = new Map();
716
+ for (const node of all) {
717
+ if (!isAngularRoute(node) || !node.name.startsWith('/'))
718
+ continue;
719
+ const root = angularAppRoot(node.filePath, context);
720
+ let t = byRoot.get(root);
721
+ if (!t)
722
+ byRoot.set(root, (t = { source: all, exact: new Map(), dynamic: [] }));
723
+ (0, expo_router_1.addRouteTo)(t, node.name, node);
724
+ if (!byFile.has(node.filePath))
725
+ byFile.set(node.filePath, node);
726
+ }
727
+ // Redirects: arriving at `/` is arriving at wherever `redirectTo` sends
728
+ // the user. A file's mount prefix is what its routes' names add to their
729
+ // in-file paths. A chain (`/` → `/pages` → `/pages/dashboard`) settles in
730
+ // a few passes.
731
+ const aliases = [];
732
+ const mounts = byFile.size > 0 ? angularMounts(context, all.filter(isAngularRoute)) : null;
733
+ const redirectFiles = new Map();
734
+ for (const [file, sample] of byFile) {
735
+ const own = resolvedSegments(inFilePath(sample), file, context);
736
+ const full = sample.name.split('/').filter((seg) => seg.length > 0);
737
+ redirectFiles.set(file, full.slice(0, Math.max(0, full.length - own.length)));
738
+ }
739
+ // A file that only mounts others can still redirect: its prefix is where it is mounted.
740
+ for (const file of mounts?.mountFiles ?? []) {
741
+ if (!redirectFiles.has(file))
742
+ redirectFiles.set(file, mounts.prefixOf(file));
743
+ }
744
+ for (const [file, prefix] of redirectFiles) {
745
+ const content = context.readFile(file);
746
+ if (!content || !content.includes('redirectTo'))
747
+ continue;
748
+ const table = byRoot.get(angularAppRoot(file, context)) ?? (byRoot.size === 1 ? [...byRoot.values()][0] : undefined);
749
+ if (!table)
750
+ continue;
751
+ for (const r of parseAngularRoutes(content).redirects) {
752
+ const from = joinPath([...prefix, ...resolvedSegments(r.from, file, context)]);
753
+ const to = joinPath([...(r.absolute ? [] : prefix), ...resolvedSegments(r.to, file, context)]);
754
+ aliases.push({ table, from, to });
755
+ }
756
+ }
757
+ for (let pass = 0; pass < 4; pass++) {
758
+ let added = false;
759
+ for (const a of aliases) {
760
+ const target = a.table.exact.get(a.to);
761
+ if (target && !a.table.exact.has(a.from)) {
762
+ a.table.exact.set(a.from, target);
763
+ added = true;
764
+ }
765
+ }
766
+ if (!added)
767
+ break;
768
+ }
769
+ // `/` that no route or redirect serves falls through to the app's root
770
+ // `**` redirect. Only `/`: letting the wildcard answer any path would draw
771
+ // every destination this reading could not name as a trip home.
772
+ for (const a of aliases) {
773
+ if (a.from !== '/**')
774
+ continue;
775
+ const target = a.table.exact.get(a.to);
776
+ if (target && !a.table.exact.has('/'))
777
+ a.table.exact.set('/', target);
778
+ }
779
+ const table = { source: all, byRoot };
780
+ tables.set(context, table);
781
+ return table;
782
+ }
783
+ /**
784
+ * The routes a file navigates among: its app's, or — for a shared library
785
+ * outside any app (an Nx `libs/ui`) — the one app's, when there is only one.
786
+ */
787
+ function angularRoutesFor(table, filePath) {
788
+ const own = (0, expo_router_1.routesForFile)(table, filePath);
789
+ if (own && own.exact.size > 0)
790
+ return own;
791
+ return table.byRoot.size === 1 ? [...table.byRoot.values()][0] : null;
792
+ }
793
+ // =============================================================================
794
+ // Navigation
795
+ // =============================================================================
796
+ /** `this.router.navigate`, `router.navigateByUrl`, `this._router.createUrlTree`, `router.parseUrl`. */
797
+ const NAV_CALL = /^(?:this\.)?_?[rR]outer\.(navigate|navigateByUrl|createUrlTree|parseUrl)$/;
798
+ /** The destination a command array names: `['/article', slug]` is `/article/${…}`; null when it is relative or not a literal array. */
799
+ function commandsHref(text, fromRoot = false) {
800
+ const arr = text.trim();
801
+ if (arr[0] !== '[')
802
+ return null;
803
+ const close = (0, object_literal_1.matchBracket)(arr, 0);
804
+ if (close < 0)
805
+ return null;
806
+ const parts = [];
807
+ let i = 1;
808
+ let element = '';
809
+ const flush = () => {
810
+ const e = element.trim();
811
+ element = '';
812
+ if (e.length === 0)
813
+ return true;
814
+ const literal = staticString(e);
815
+ if (literal !== null) {
816
+ parts.push(...literal.split('/').filter((seg) => seg.length > 0));
817
+ return true;
818
+ }
819
+ // A matrix-params object says nothing about the path.
820
+ if (e.startsWith('{'))
821
+ return true;
822
+ parts.push(expo_router_1.HOLE);
823
+ return true;
824
+ };
825
+ while (i < close) {
826
+ const ch = arr[i];
827
+ if (ch === '"' || ch === "'" || ch === '`') {
828
+ const end = (0, object_literal_1.skipString)(arr, i);
829
+ if (end < 0)
830
+ return null;
831
+ element += arr.slice(i, end + 1);
832
+ i = end + 1;
833
+ continue;
834
+ }
835
+ if (ch === '[' || ch === '{' || ch === '(') {
836
+ const end = (0, object_literal_1.matchBracket)(arr, i);
837
+ if (end < 0)
838
+ return null;
839
+ element += arr.slice(i, end + 1);
840
+ i = end + 1;
841
+ continue;
842
+ }
843
+ if (ch === ',')
844
+ flush();
845
+ else
846
+ element += ch;
847
+ i++;
848
+ }
849
+ flush();
850
+ // Only an absolute destination: `['/login']`. In a template, `['../', id]`
851
+ // and a bare `['edit']` are relative to wherever the component is; a
852
+ // `router.navigate(['project', 'issue', id])` with no `relativeTo` starts
853
+ // from the root.
854
+ const firstElement = arr.slice(1, close).split(',')[0] ?? '';
855
+ const first = staticString(firstElement);
856
+ if (first === null || (!first.startsWith('/') && !(fromRoot && !first.startsWith('.'))))
857
+ return null;
858
+ const pathText = '/' + parts.filter((p) => p.length > 0).join('/');
859
+ return namesSomewhere({ path: pathText, display: pathText.split(expo_router_1.HOLE).join('${…}') });
860
+ }
861
+ /**
862
+ * The href, when it names at least one segment of its own. A path made only
863
+ * of holes (`[\`/${a}\`, b, c]`) would match any route of its length — a
864
+ * hole scores against a literal segment — so it names nothing.
865
+ */
866
+ function namesSomewhere(href) {
867
+ if (!href)
868
+ return null;
869
+ const segs = href.path.split('/').filter((seg) => seg.length > 0);
870
+ return segs.length === 0 || segs.some((seg) => !seg.includes(expo_router_1.HOLE)) ? href : null;
871
+ }
872
+ /** A class property's initializer, read from its body: `routerLinkAbout = publicRoutes.about.routerLink;`. */
873
+ function propertyInitializer(owner, name, content) {
874
+ const body = content.split('\n').slice(owner.startLine - 1, owner.endLine).join('\n');
875
+ const decl = new RegExp(String.raw `(?:^|[\s;{])(?:(?:public|private|protected|readonly|static|override)\s+)*${name}\s*(?::[^=;\n]+)?=\s*`).exec(body);
876
+ if (!decl)
877
+ return null;
878
+ let i = decl.index + decl[0].length;
879
+ const start = i;
880
+ while (i < body.length) {
881
+ const ch = body[i];
882
+ if (ch === '"' || ch === "'" || ch === '`') {
883
+ const end = (0, object_literal_1.skipString)(body, i);
884
+ if (end < 0)
885
+ return null;
886
+ i = end + 1;
887
+ continue;
888
+ }
889
+ if (ch === '[' || ch === '{' || ch === '(') {
890
+ const end = (0, object_literal_1.matchBracket)(body, i);
891
+ if (end < 0)
892
+ return null;
893
+ i = end + 1;
894
+ continue;
895
+ }
896
+ if (ch === ';' || ch === '\n')
897
+ break;
898
+ i++;
899
+ }
900
+ return body.slice(start, i).trim() || null;
901
+ }
902
+ /** The array an arrow function returns: `(id) => ['/x', id]` or `(id) => { return ['/x', id]; }`. */
903
+ function arrowReturn(fn) {
904
+ const arrow = fn.indexOf('=>');
905
+ if (arrow < 0)
906
+ return null;
907
+ let i = arrow + 2;
908
+ while (i < fn.length && /\s/.test(fn[i]))
909
+ i++;
910
+ if (fn[i] === '(')
911
+ i++;
912
+ if (fn[i] === '[') {
913
+ const end = (0, object_literal_1.matchBracket)(fn, i);
914
+ return end > i ? fn.slice(i, end + 1) : null;
915
+ }
916
+ if (fn[i] === '{') {
917
+ const ret = /\breturn\s*\[/.exec(fn.slice(i));
918
+ if (!ret)
919
+ return null;
920
+ const open = i + ret.index + ret[0].length - 1;
921
+ const end = (0, object_literal_1.matchBracket)(fn, open);
922
+ return end > open ? fn.slice(open, end + 1) : null;
923
+ }
924
+ return null;
925
+ }
926
+ /**
927
+ * Where an Angular destination expression leads — the argument of
928
+ * `router.navigate(…)`, or a `[routerLink]` binding:
929
+ *
930
+ * - a command array, `['/article', slug]`;
931
+ * - a static string, `'/login'` or `'/' + $localize…`, and `'/editor/' + slug`;
932
+ * - a route constant, `internalRoutes.zen.routerLink`;
933
+ * - a property of the class it is written in, `this.routerLinkAbout`,
934
+ * holding one of those;
935
+ * - any of those `.concat(id)`, one more segment.
936
+ *
937
+ * `owner` is the class the expression is written in, for `this.` properties.
938
+ */
939
+ function angularDestination(expr, file, owner, context, depth = 0, fromRoot = false) {
940
+ return namesSomewhere(destinationOf(expr, file, owner, context, depth, fromRoot));
941
+ }
942
+ function destinationOf(expr, file, owner, context, depth, fromRoot) {
943
+ const text = expr.trim();
944
+ if (text.length === 0 || depth > 4)
945
+ return null;
946
+ if (text[0] === '[')
947
+ return commandsHref(text, fromRoot);
948
+ const literal = staticString(text);
949
+ if (literal !== null)
950
+ return (0, expo_router_1.toHref)(literal);
951
+ // `'/editor/' + article.slug`: the literal head, a hole for the rest.
952
+ if (/^['"]/.test(text) && text.includes('+')) {
953
+ const head = staticString(text.slice(0, text.indexOf('+')));
954
+ if (head !== null && head.startsWith('/'))
955
+ return (0, expo_router_1.toHref)(head.replace(/\/?$/, '/') + expo_router_1.HOLE);
956
+ }
957
+ // `this.routerLinkAdminControlUsers.concat(userId)`: one segment more.
958
+ const concat = /^(.*?)\.concat\s*\((.*)\)$/s.exec(text);
959
+ if (concat) {
960
+ const base = angularDestination(concat[1], file, owner, context, depth + 1, fromRoot);
961
+ const added = concat[2].split(',').filter((a) => a.trim().length > 0).length;
962
+ return base && added > 0 ? (0, expo_router_1.toHref)(base.path.replace(/\/$/, '') + ('/' + expo_router_1.HOLE).repeat(added)) : base;
963
+ }
964
+ // `update.routerLink(dataSource, symbol)`: a route constant that builds its
965
+ // commands — its returned array, the arguments holes.
966
+ const call = /^((?:this\s*\.\s*)?[A-Za-z_$][\w$]*(?:\s*\.\s*[A-Za-z_$][\w$]*)+)\s*\((.*)\)$/s.exec(text);
967
+ if (call) {
968
+ const fn = constantText(call[1].replace(/\s+/g, '').replace(/^this\./, ''), file, context);
969
+ const returned = fn ? arrowReturn(fn) : null;
970
+ return returned ? commandsHref(returned, fromRoot) : null;
971
+ }
972
+ const chain = /^(?:this\s*\.\s*)?([A-Za-z_$][\w$]*(?:\s*\.\s*[A-Za-z_$][\w$]*)*)$/.exec(text);
973
+ if (!chain)
974
+ return (0, expo_router_1.parseHrefExpression)(text);
975
+ const parts = chain[1].replace(/\s+/g, '').split('.');
976
+ const content = context.readFile(file);
977
+ if (content && owner && (text.startsWith('this') || parts.length === 1)) {
978
+ const init = propertyInitializer(owner, parts[0], content);
979
+ if (init !== null) {
980
+ if (parts.length === 1)
981
+ return angularDestination(init, file, owner, context, depth + 1, fromRoot);
982
+ return angularDestination(`${init}.${parts.slice(1).join('.')}`, file, owner, context, depth + 1, fromRoot);
983
+ }
984
+ }
985
+ const constant = constantText(parts.join('.'), file, context);
986
+ return constant ? angularDestination(constant, file, owner, context, depth + 1, fromRoot) : null;
987
+ }
988
+ // =============================================================================
989
+ // The resolver
990
+ // =============================================================================
991
+ /** A route's lazily loaded component: `import:./x.component#default` / `#XComponent`. */
992
+ const LAZY_COMPONENT_REF = /^import:([^#]+)#([\w$]+)$/;
993
+ /** A layout a screen renders inside: `layout:ProfileComponent`, `layout:import:./x#default`. */
994
+ const LAYOUT_REF = /^layout:(.+)$/;
995
+ exports.angularRouterResolver = {
996
+ name: 'angular-router',
997
+ languages: ['typescript', 'javascript'],
998
+ detect(context) {
999
+ return (0, package_deps_1.dependsOn)(context, '@angular/router', '@angular/core');
1000
+ },
1001
+ claimsReference(name) {
1002
+ return NAV_CALL.test(name) || LAZY_COMPONENT_REF.test(name) || LAYOUT_REF.test(name);
1003
+ },
1004
+ extract(filePath, content) {
1005
+ if (!/\.[cm]?ts$/.test(filePath) || filePath.endsWith('.d.ts'))
1006
+ return { nodes: [], references: [] };
1007
+ const { routes } = parseAngularRoutes(content);
1008
+ if (routes.length === 0)
1009
+ return { nodes: [], references: [] };
1010
+ const now = Date.now();
1011
+ const nodes = [];
1012
+ const references = [];
1013
+ for (const route of routes) {
1014
+ const node = {
1015
+ id: routeId(filePath, route.line, route.path),
1016
+ kind: 'route',
1017
+ name: route.path,
1018
+ qualifiedName: `${filePath}::route:${route.path}`,
1019
+ filePath,
1020
+ startLine: route.line,
1021
+ endLine: route.line,
1022
+ startColumn: 0,
1023
+ endColumn: 0,
1024
+ language: 'typescript',
1025
+ updatedAt: now,
1026
+ };
1027
+ nodes.push(node);
1028
+ const ref = (component, layout) => ({
1029
+ fromNodeId: node.id,
1030
+ referenceName: `${layout ? 'layout:' : ''}${component.spec === null ? component.name : `import:${component.spec}#${component.name ?? 'default'}`}`,
1031
+ referenceKind: 'references',
1032
+ line: route.line,
1033
+ column: 0,
1034
+ filePath,
1035
+ language: 'typescript',
1036
+ });
1037
+ if (route.component)
1038
+ references.push(ref(route.component, false));
1039
+ // The layouts around it: their links and buttons are on this screen too.
1040
+ for (const layout of route.layouts)
1041
+ references.push(ref(layout, true));
1042
+ }
1043
+ return { nodes, references };
1044
+ },
1045
+ /**
1046
+ * Put each routes file's routes under the path that lazy-loads it, and read
1047
+ * constant path segments. Recomputed from each route's in-file path (its
1048
+ * qualified name), so a second run changes nothing.
1049
+ */
1050
+ postExtract(context) {
1051
+ const routes = context.getNodesByKind('route').filter(isAngularRoute);
1052
+ if (routes.length === 0)
1053
+ return [];
1054
+ const { prefixOf } = angularMounts(context, routes);
1055
+ const resolved = (pathText, file) => resolvedSegments(pathText, file, context);
1056
+ const changed = [];
1057
+ for (const route of routes) {
1058
+ const name = joinPath([...prefixOf(route.filePath), ...resolved(inFilePath(route), route.filePath)]);
1059
+ if (name !== route.name)
1060
+ changed.push({ ...route, name });
1061
+ }
1062
+ return changed;
1063
+ },
1064
+ resolve(ref, context) {
1065
+ const layout = LAYOUT_REF.exec(ref.referenceName);
1066
+ if (layout) {
1067
+ if (!ref.fromNodeId.endsWith(':angular'))
1068
+ return null;
1069
+ const component = routeComponent(layout[1], ref.filePath, context);
1070
+ return component
1071
+ ? { original: ref, targetNodeId: component.id, confidence: 0.95, resolvedBy: 'framework', metadata: { layout: true } }
1072
+ : null;
1073
+ }
1074
+ const lazy = LAZY_COMPONENT_REF.exec(ref.referenceName);
1075
+ if (lazy) {
1076
+ if (!ref.fromNodeId.endsWith(':angular'))
1077
+ return null;
1078
+ const component = lazyComponent(lazy[1], lazy[2] === 'default' ? null : lazy[2], ref.filePath, context);
1079
+ return component ? { original: ref, targetNodeId: component.id, confidence: 0.95, resolvedBy: 'framework' } : null;
1080
+ }
1081
+ const nav = NAV_CALL.exec(ref.referenceName);
1082
+ if (!nav || ref.referenceKind !== 'calls')
1083
+ return null;
1084
+ const verb = nav[1];
1085
+ const routes = angularRoutesFor(angularRouteTable(context), ref.filePath);
1086
+ if (!routes || routes.exact.size === 0)
1087
+ return null;
1088
+ const lines = context.getFileLines?.(ref.filePath) ?? context.readFile(ref.filePath)?.split(/\r?\n/) ?? null;
1089
+ if (!lines)
1090
+ return null;
1091
+ const arg = (0, expo_router_1.firstArgumentText)(lines, ref.line, ref.column, verb);
1092
+ if (arg === null)
1093
+ return null;
1094
+ // `navigate(['..', id], { relativeTo: this.route })` goes somewhere relative to here.
1095
+ const extras = (0, expo_router_1.nthArgumentText)(lines, ref.line, ref.column, verb, 1);
1096
+ if (extras && /\brelativeTo\b/.test(extras))
1097
+ return null;
1098
+ const owner = context
1099
+ .getNodesInFile(ref.filePath)
1100
+ .filter((n) => n.kind === 'class' && n.startLine <= ref.line && n.endLine >= ref.line)
1101
+ .reduce((inner, n) => (!inner || n.startLine >= inner.startLine ? n : inner), null);
1102
+ const href = angularDestination(arg, ref.filePath, owner, context, 0, true);
1103
+ if (!href || !href.path.startsWith('/'))
1104
+ return null;
1105
+ const targets = (0, nextjs_1.destinationsForHref)(href, routes);
1106
+ const target = targets[0];
1107
+ if (!target)
1108
+ return null;
1109
+ return {
1110
+ original: ref,
1111
+ targetNodeId: target.node.id,
1112
+ ...(targets.length > 1
1113
+ ? { alsoTargets: targets.slice(1).map((t) => ({ targetNodeId: t.node.id, metadata: { href: t.href.display, navMethod: verb } })) }
1114
+ : {}),
1115
+ confidence: 0.95,
1116
+ resolvedBy: 'framework',
1117
+ edgeKind: 'navigates',
1118
+ metadata: { href: target.href.display, navMethod: verb },
1119
+ };
1120
+ },
1121
+ };
1122
+ /** For the template synthesizer: a template file's path, from the component file that names it. */
1123
+ function templatePathFor(componentFile, templateUrl) {
1124
+ return path.posix.normalize(path.posix.join(path.posix.dirname(componentFile), templateUrl));
1125
+ }
1126
+ //# sourceMappingURL=angular-router.js.map