@elench/testkit 0.1.64 → 0.1.66

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 (342) hide show
  1. package/lib/app/browser-bridge.mjs +66 -0
  2. package/lib/app/configs.mjs +81 -0
  3. package/lib/app/configs.test.mjs +34 -0
  4. package/lib/cli/command-helpers.mjs +2 -10
  5. package/lib/cli/commands/browser/serve.mjs +3 -62
  6. package/lib/cli/db.mjs +3 -68
  7. package/lib/config/binaries.mjs +34 -0
  8. package/lib/config/database.mjs +9 -6
  9. package/lib/config/index.mjs +2 -31
  10. package/lib/config/runtime.mjs +24 -95
  11. package/lib/config/validation.mjs +18 -62
  12. package/lib/coverage/backend-discovery.mjs +68 -85
  13. package/lib/coverage/backend-discovery.test.mjs +55 -46
  14. package/lib/coverage/evidence.mjs +15 -3
  15. package/lib/coverage/evidence.test.mjs +13 -4
  16. package/lib/coverage/graph-builder.mjs +25 -26
  17. package/lib/coverage/next-ir-to-graph.mjs +239 -0
  18. package/lib/coverage/routing.mjs +2 -29
  19. package/lib/coverage/routing.test.mjs +0 -16
  20. package/lib/coverage/shared.mjs +22 -82
  21. package/lib/database/fingerprint.mjs +1 -1
  22. package/lib/known-failures/github-cache.mjs +159 -0
  23. package/lib/known-failures/github-transport.mjs +174 -0
  24. package/lib/known-failures/github.mjs +17 -325
  25. package/lib/runner/default-runtime-runner.mjs +4 -10
  26. package/lib/runner/execution-config.mjs +12 -83
  27. package/lib/runner/live-run.mjs +45 -0
  28. package/lib/runner/managed-processes.mjs +29 -0
  29. package/lib/runner/orchestrator.mjs +57 -188
  30. package/lib/runner/playwright-runner.mjs +4 -11
  31. package/lib/runner/run-finalization.mjs +132 -0
  32. package/lib/runner/run-guards.mjs +45 -0
  33. package/lib/runner/runtime-preparation.mjs +1 -1
  34. package/lib/runner/services.mjs +3 -4
  35. package/lib/runner/template-steps.mjs +8 -45
  36. package/lib/runner/template.mjs +7 -28
  37. package/lib/shared/configured-steps.mjs +178 -0
  38. package/lib/shared/configured-steps.test.mjs +73 -0
  39. package/lib/shared/execution-schema.mjs +74 -0
  40. package/lib/shared/execution-schema.test.mjs +26 -0
  41. package/node_modules/@elench/next-analysis/dist/api-routes.d.ts +7 -0
  42. package/node_modules/@elench/next-analysis/dist/api-routes.d.ts.map +1 -0
  43. package/node_modules/@elench/next-analysis/dist/api-routes.js +66 -0
  44. package/node_modules/@elench/next-analysis/dist/api-routes.js.map +1 -0
  45. package/node_modules/@elench/next-analysis/dist/app-root.d.ts +2 -0
  46. package/node_modules/@elench/next-analysis/dist/app-root.d.ts.map +1 -0
  47. package/node_modules/@elench/next-analysis/dist/app-root.js +7 -0
  48. package/node_modules/@elench/next-analysis/dist/app-root.js.map +1 -0
  49. package/node_modules/@elench/next-analysis/dist/backend-links.d.ts +8 -0
  50. package/node_modules/@elench/next-analysis/dist/backend-links.d.ts.map +1 -0
  51. package/node_modules/@elench/next-analysis/dist/backend-links.js +30 -0
  52. package/node_modules/@elench/next-analysis/dist/backend-links.js.map +1 -0
  53. package/node_modules/@elench/next-analysis/dist/index.d.ts +11 -0
  54. package/node_modules/@elench/next-analysis/dist/index.d.ts.map +1 -0
  55. package/node_modules/@elench/next-analysis/dist/index.js +10 -0
  56. package/node_modules/@elench/next-analysis/dist/index.js.map +1 -0
  57. package/node_modules/@elench/next-analysis/dist/pages.d.ts +7 -0
  58. package/node_modules/@elench/next-analysis/dist/pages.d.ts.map +1 -0
  59. package/node_modules/@elench/next-analysis/dist/pages.js +47 -0
  60. package/node_modules/@elench/next-analysis/dist/pages.js.map +1 -0
  61. package/node_modules/@elench/next-analysis/dist/project.d.ts +3 -0
  62. package/node_modules/@elench/next-analysis/dist/project.d.ts.map +1 -0
  63. package/node_modules/@elench/next-analysis/dist/project.js +102 -0
  64. package/node_modules/@elench/next-analysis/dist/project.js.map +1 -0
  65. package/node_modules/@elench/next-analysis/dist/route-tree.d.ts +7 -0
  66. package/node_modules/@elench/next-analysis/dist/route-tree.d.ts.map +1 -0
  67. package/node_modules/@elench/next-analysis/dist/route-tree.js +575 -0
  68. package/node_modules/@elench/next-analysis/dist/route-tree.js.map +1 -0
  69. package/node_modules/@elench/next-analysis/dist/routes.d.ts +6 -0
  70. package/node_modules/@elench/next-analysis/dist/routes.d.ts.map +1 -0
  71. package/node_modules/@elench/next-analysis/dist/routes.js +41 -0
  72. package/node_modules/@elench/next-analysis/dist/routes.js.map +1 -0
  73. package/node_modules/@elench/next-analysis/dist/server-actions.d.ts +7 -0
  74. package/node_modules/@elench/next-analysis/dist/server-actions.d.ts.map +1 -0
  75. package/node_modules/@elench/next-analysis/dist/server-actions.js +37 -0
  76. package/node_modules/@elench/next-analysis/dist/server-actions.js.map +1 -0
  77. package/node_modules/@elench/next-analysis/dist/shared.d.ts +57 -0
  78. package/node_modules/@elench/next-analysis/dist/shared.d.ts.map +1 -0
  79. package/node_modules/@elench/next-analysis/dist/shared.js +229 -0
  80. package/node_modules/@elench/next-analysis/dist/shared.js.map +1 -0
  81. package/node_modules/@elench/next-analysis/dist/swc.d.ts +53 -0
  82. package/node_modules/@elench/next-analysis/dist/swc.d.ts.map +1 -0
  83. package/node_modules/@elench/next-analysis/dist/swc.js +387 -0
  84. package/node_modules/@elench/next-analysis/dist/swc.js.map +1 -0
  85. package/node_modules/@elench/next-analysis/dist/types.d.ts +125 -0
  86. package/node_modules/@elench/next-analysis/dist/types.d.ts.map +1 -0
  87. package/node_modules/@elench/next-analysis/dist/types.js +2 -0
  88. package/node_modules/@elench/next-analysis/dist/types.js.map +1 -0
  89. package/node_modules/@elench/next-analysis/package.json +27 -0
  90. package/node_modules/@elench/testkit-bridge/dist/index.d.ts +36 -0
  91. package/node_modules/@elench/testkit-bridge/dist/index.d.ts.map +1 -0
  92. package/node_modules/@elench/testkit-bridge/dist/index.js +538 -0
  93. package/node_modules/@elench/testkit-bridge/dist/index.js.map +1 -0
  94. package/node_modules/@elench/testkit-bridge/package.json +16 -5
  95. package/node_modules/@elench/testkit-protocol/dist/index.d.ts +190 -0
  96. package/node_modules/@elench/testkit-protocol/dist/index.d.ts.map +1 -0
  97. package/node_modules/@elench/testkit-protocol/dist/index.js +296 -0
  98. package/node_modules/@elench/testkit-protocol/dist/index.js.map +1 -0
  99. package/node_modules/@elench/testkit-protocol/package.json +14 -7
  100. package/node_modules/@elench/ts-analysis/dist/callables.d.ts +8 -0
  101. package/node_modules/@elench/ts-analysis/dist/callables.d.ts.map +1 -0
  102. package/node_modules/@elench/ts-analysis/dist/callables.js +126 -0
  103. package/node_modules/@elench/ts-analysis/dist/callables.js.map +1 -0
  104. package/node_modules/@elench/ts-analysis/dist/exports.d.ts +6 -0
  105. package/node_modules/@elench/ts-analysis/dist/exports.d.ts.map +1 -0
  106. package/node_modules/@elench/ts-analysis/dist/exports.js +70 -0
  107. package/node_modules/@elench/ts-analysis/dist/exports.js.map +1 -0
  108. package/node_modules/@elench/ts-analysis/dist/index.d.ts +10 -0
  109. package/node_modules/@elench/ts-analysis/dist/index.d.ts.map +1 -0
  110. package/node_modules/@elench/ts-analysis/{src/index.mjs → dist/index.js} +9 -14
  111. package/node_modules/@elench/ts-analysis/dist/index.js.map +1 -0
  112. package/node_modules/@elench/ts-analysis/dist/jsx.d.ts +9 -0
  113. package/node_modules/@elench/ts-analysis/dist/jsx.d.ts.map +1 -0
  114. package/node_modules/@elench/ts-analysis/dist/jsx.js +68 -0
  115. package/node_modules/@elench/ts-analysis/dist/jsx.js.map +1 -0
  116. package/node_modules/@elench/ts-analysis/dist/project.d.ts +5 -0
  117. package/node_modules/@elench/ts-analysis/dist/project.d.ts.map +1 -0
  118. package/node_modules/@elench/ts-analysis/dist/project.js +90 -0
  119. package/node_modules/@elench/ts-analysis/dist/project.js.map +1 -0
  120. package/node_modules/@elench/ts-analysis/dist/requests.d.ts +6 -0
  121. package/node_modules/@elench/ts-analysis/dist/requests.d.ts.map +1 -0
  122. package/node_modules/@elench/ts-analysis/dist/requests.js +140 -0
  123. package/node_modules/@elench/ts-analysis/dist/requests.js.map +1 -0
  124. package/node_modules/@elench/ts-analysis/dist/resolution.d.ts +4 -0
  125. package/node_modules/@elench/ts-analysis/dist/resolution.d.ts.map +1 -0
  126. package/node_modules/@elench/ts-analysis/dist/resolution.js +53 -0
  127. package/node_modules/@elench/ts-analysis/dist/resolution.js.map +1 -0
  128. package/node_modules/@elench/ts-analysis/dist/shared.d.ts +6 -0
  129. package/node_modules/@elench/ts-analysis/dist/shared.d.ts.map +1 -0
  130. package/node_modules/@elench/ts-analysis/dist/shared.js +31 -0
  131. package/node_modules/@elench/ts-analysis/dist/shared.js.map +1 -0
  132. package/node_modules/@elench/ts-analysis/dist/syntax.d.ts +7 -0
  133. package/node_modules/@elench/ts-analysis/dist/syntax.d.ts.map +1 -0
  134. package/node_modules/@elench/ts-analysis/dist/syntax.js +27 -0
  135. package/node_modules/@elench/ts-analysis/dist/syntax.js.map +1 -0
  136. package/node_modules/@elench/ts-analysis/dist/types.d.ts +58 -0
  137. package/node_modules/@elench/ts-analysis/dist/types.d.ts.map +1 -0
  138. package/node_modules/@elench/ts-analysis/dist/types.js +2 -0
  139. package/node_modules/@elench/ts-analysis/dist/types.js.map +1 -0
  140. package/node_modules/@elench/ts-analysis/package.json +18 -2
  141. package/node_modules/@next/routing/README.md +91 -0
  142. package/node_modules/@next/routing/dist/__tests__/captures.test.d.ts +1 -0
  143. package/node_modules/@next/routing/dist/__tests__/conditions.test.d.ts +1 -0
  144. package/node_modules/@next/routing/dist/__tests__/dynamic-after-rewrites.test.d.ts +1 -0
  145. package/node_modules/@next/routing/dist/__tests__/i18n-resolve-routes.test.d.ts +1 -0
  146. package/node_modules/@next/routing/dist/__tests__/i18n.test.d.ts +1 -0
  147. package/node_modules/@next/routing/dist/__tests__/middleware.test.d.ts +1 -0
  148. package/node_modules/@next/routing/dist/__tests__/normalize-next-data.test.d.ts +1 -0
  149. package/node_modules/@next/routing/dist/__tests__/redirects.test.d.ts +1 -0
  150. package/node_modules/@next/routing/dist/__tests__/resolve-routes.test.d.ts +1 -0
  151. package/node_modules/@next/routing/dist/__tests__/rewrites.test.d.ts +1 -0
  152. package/node_modules/@next/routing/dist/destination.d.ts +22 -0
  153. package/node_modules/@next/routing/dist/i18n.d.ts +48 -0
  154. package/node_modules/@next/routing/dist/index.d.ts +5 -0
  155. package/node_modules/@next/routing/dist/index.js +1 -0
  156. package/node_modules/@next/routing/dist/matchers.d.ts +12 -0
  157. package/node_modules/@next/routing/dist/middleware.d.ts +12 -0
  158. package/node_modules/@next/routing/dist/next-data.d.ts +10 -0
  159. package/node_modules/@next/routing/dist/resolve-routes.d.ts +2 -0
  160. package/node_modules/@next/routing/dist/types.d.ts +97 -0
  161. package/node_modules/@next/routing/package.json +39 -0
  162. package/node_modules/@swc/core/README.md +100 -0
  163. package/node_modules/@swc/core/Visitor.d.ts +218 -0
  164. package/node_modules/@swc/core/Visitor.js +1399 -0
  165. package/node_modules/@swc/core/binding.d.ts +59 -0
  166. package/node_modules/@swc/core/binding.js +368 -0
  167. package/node_modules/@swc/core/index.d.ts +120 -0
  168. package/node_modules/@swc/core/index.js +443 -0
  169. package/node_modules/@swc/core/package.json +120 -0
  170. package/node_modules/@swc/core/postinstall.js +148 -0
  171. package/node_modules/@swc/core/spack.d.ts +51 -0
  172. package/node_modules/@swc/core/spack.js +87 -0
  173. package/node_modules/@swc/core/util.d.ts +1 -0
  174. package/node_modules/@swc/core/util.js +104 -0
  175. package/node_modules/@swc/core-linux-x64-gnu/README.md +3 -0
  176. package/node_modules/@swc/core-linux-x64-gnu/package.json +46 -0
  177. package/node_modules/@swc/core-linux-x64-gnu/swc.linux-x64-gnu.node +0 -0
  178. package/node_modules/@swc/counter/CHANGELOG.md +7 -0
  179. package/node_modules/@swc/counter/README.md +7 -0
  180. package/node_modules/@swc/counter/index.js +1 -0
  181. package/node_modules/@swc/counter/package.json +27 -0
  182. package/node_modules/@swc/types/LICENSE +201 -0
  183. package/node_modules/@swc/types/README.md +4 -0
  184. package/node_modules/@swc/types/assumptions.d.ts +92 -0
  185. package/node_modules/@swc/types/assumptions.js +2 -0
  186. package/node_modules/@swc/types/index.d.ts +2049 -0
  187. package/node_modules/@swc/types/index.js +2 -0
  188. package/node_modules/@swc/types/package.json +40 -0
  189. package/node_modules/typescript/LICENSE.txt +55 -0
  190. package/node_modules/typescript/README.md +50 -0
  191. package/node_modules/typescript/SECURITY.md +41 -0
  192. package/node_modules/typescript/ThirdPartyNoticeText.txt +193 -0
  193. package/node_modules/typescript/bin/tsc +2 -0
  194. package/node_modules/typescript/bin/tsserver +2 -0
  195. package/node_modules/typescript/lib/_tsc.js +133818 -0
  196. package/node_modules/typescript/lib/_tsserver.js +659 -0
  197. package/node_modules/typescript/lib/_typingsInstaller.js +222 -0
  198. package/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +2122 -0
  199. package/node_modules/typescript/lib/de/diagnosticMessages.generated.json +2122 -0
  200. package/node_modules/typescript/lib/es/diagnosticMessages.generated.json +2122 -0
  201. package/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +2122 -0
  202. package/node_modules/typescript/lib/it/diagnosticMessages.generated.json +2122 -0
  203. package/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +2122 -0
  204. package/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +2122 -0
  205. package/node_modules/typescript/lib/lib.d.ts +22 -0
  206. package/node_modules/typescript/lib/lib.decorators.d.ts +384 -0
  207. package/node_modules/typescript/lib/lib.decorators.legacy.d.ts +22 -0
  208. package/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +41 -0
  209. package/node_modules/typescript/lib/lib.dom.d.ts +39429 -0
  210. package/node_modules/typescript/lib/lib.dom.iterable.d.ts +571 -0
  211. package/node_modules/typescript/lib/lib.es2015.collection.d.ts +147 -0
  212. package/node_modules/typescript/lib/lib.es2015.core.d.ts +597 -0
  213. package/node_modules/typescript/lib/lib.es2015.d.ts +28 -0
  214. package/node_modules/typescript/lib/lib.es2015.generator.d.ts +77 -0
  215. package/node_modules/typescript/lib/lib.es2015.iterable.d.ts +605 -0
  216. package/node_modules/typescript/lib/lib.es2015.promise.d.ts +81 -0
  217. package/node_modules/typescript/lib/lib.es2015.proxy.d.ts +128 -0
  218. package/node_modules/typescript/lib/lib.es2015.reflect.d.ts +144 -0
  219. package/node_modules/typescript/lib/lib.es2015.symbol.d.ts +46 -0
  220. package/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
  221. package/node_modules/typescript/lib/lib.es2016.array.include.d.ts +116 -0
  222. package/node_modules/typescript/lib/lib.es2016.d.ts +21 -0
  223. package/node_modules/typescript/lib/lib.es2016.full.d.ts +23 -0
  224. package/node_modules/typescript/lib/lib.es2016.intl.d.ts +31 -0
  225. package/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +21 -0
  226. package/node_modules/typescript/lib/lib.es2017.d.ts +26 -0
  227. package/node_modules/typescript/lib/lib.es2017.date.d.ts +31 -0
  228. package/node_modules/typescript/lib/lib.es2017.full.d.ts +23 -0
  229. package/node_modules/typescript/lib/lib.es2017.intl.d.ts +44 -0
  230. package/node_modules/typescript/lib/lib.es2017.object.d.ts +49 -0
  231. package/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +135 -0
  232. package/node_modules/typescript/lib/lib.es2017.string.d.ts +45 -0
  233. package/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +53 -0
  234. package/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +77 -0
  235. package/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +53 -0
  236. package/node_modules/typescript/lib/lib.es2018.d.ts +24 -0
  237. package/node_modules/typescript/lib/lib.es2018.full.d.ts +24 -0
  238. package/node_modules/typescript/lib/lib.es2018.intl.d.ts +83 -0
  239. package/node_modules/typescript/lib/lib.es2018.promise.d.ts +30 -0
  240. package/node_modules/typescript/lib/lib.es2018.regexp.d.ts +37 -0
  241. package/node_modules/typescript/lib/lib.es2019.array.d.ts +79 -0
  242. package/node_modules/typescript/lib/lib.es2019.d.ts +24 -0
  243. package/node_modules/typescript/lib/lib.es2019.full.d.ts +24 -0
  244. package/node_modules/typescript/lib/lib.es2019.intl.d.ts +23 -0
  245. package/node_modules/typescript/lib/lib.es2019.object.d.ts +33 -0
  246. package/node_modules/typescript/lib/lib.es2019.string.d.ts +37 -0
  247. package/node_modules/typescript/lib/lib.es2019.symbol.d.ts +24 -0
  248. package/node_modules/typescript/lib/lib.es2020.bigint.d.ts +765 -0
  249. package/node_modules/typescript/lib/lib.es2020.d.ts +27 -0
  250. package/node_modules/typescript/lib/lib.es2020.date.d.ts +42 -0
  251. package/node_modules/typescript/lib/lib.es2020.full.d.ts +24 -0
  252. package/node_modules/typescript/lib/lib.es2020.intl.d.ts +474 -0
  253. package/node_modules/typescript/lib/lib.es2020.number.d.ts +28 -0
  254. package/node_modules/typescript/lib/lib.es2020.promise.d.ts +47 -0
  255. package/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +99 -0
  256. package/node_modules/typescript/lib/lib.es2020.string.d.ts +44 -0
  257. package/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
  258. package/node_modules/typescript/lib/lib.es2021.d.ts +23 -0
  259. package/node_modules/typescript/lib/lib.es2021.full.d.ts +24 -0
  260. package/node_modules/typescript/lib/lib.es2021.intl.d.ts +166 -0
  261. package/node_modules/typescript/lib/lib.es2021.promise.d.ts +48 -0
  262. package/node_modules/typescript/lib/lib.es2021.string.d.ts +33 -0
  263. package/node_modules/typescript/lib/lib.es2021.weakref.d.ts +78 -0
  264. package/node_modules/typescript/lib/lib.es2022.array.d.ts +121 -0
  265. package/node_modules/typescript/lib/lib.es2022.d.ts +25 -0
  266. package/node_modules/typescript/lib/lib.es2022.error.d.ts +75 -0
  267. package/node_modules/typescript/lib/lib.es2022.full.d.ts +24 -0
  268. package/node_modules/typescript/lib/lib.es2022.intl.d.ts +145 -0
  269. package/node_modules/typescript/lib/lib.es2022.object.d.ts +26 -0
  270. package/node_modules/typescript/lib/lib.es2022.regexp.d.ts +39 -0
  271. package/node_modules/typescript/lib/lib.es2022.string.d.ts +25 -0
  272. package/node_modules/typescript/lib/lib.es2023.array.d.ts +924 -0
  273. package/node_modules/typescript/lib/lib.es2023.collection.d.ts +21 -0
  274. package/node_modules/typescript/lib/lib.es2023.d.ts +22 -0
  275. package/node_modules/typescript/lib/lib.es2023.full.d.ts +24 -0
  276. package/node_modules/typescript/lib/lib.es2023.intl.d.ts +56 -0
  277. package/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +65 -0
  278. package/node_modules/typescript/lib/lib.es2024.collection.d.ts +29 -0
  279. package/node_modules/typescript/lib/lib.es2024.d.ts +26 -0
  280. package/node_modules/typescript/lib/lib.es2024.full.d.ts +24 -0
  281. package/node_modules/typescript/lib/lib.es2024.object.d.ts +29 -0
  282. package/node_modules/typescript/lib/lib.es2024.promise.d.ts +35 -0
  283. package/node_modules/typescript/lib/lib.es2024.regexp.d.ts +25 -0
  284. package/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +68 -0
  285. package/node_modules/typescript/lib/lib.es2024.string.d.ts +29 -0
  286. package/node_modules/typescript/lib/lib.es5.d.ts +4601 -0
  287. package/node_modules/typescript/lib/lib.es6.d.ts +23 -0
  288. package/node_modules/typescript/lib/lib.esnext.array.d.ts +35 -0
  289. package/node_modules/typescript/lib/lib.esnext.collection.d.ts +96 -0
  290. package/node_modules/typescript/lib/lib.esnext.d.ts +29 -0
  291. package/node_modules/typescript/lib/lib.esnext.decorators.d.ts +28 -0
  292. package/node_modules/typescript/lib/lib.esnext.disposable.d.ts +193 -0
  293. package/node_modules/typescript/lib/lib.esnext.error.d.ts +24 -0
  294. package/node_modules/typescript/lib/lib.esnext.float16.d.ts +445 -0
  295. package/node_modules/typescript/lib/lib.esnext.full.d.ts +24 -0
  296. package/node_modules/typescript/lib/lib.esnext.intl.d.ts +21 -0
  297. package/node_modules/typescript/lib/lib.esnext.iterator.d.ts +148 -0
  298. package/node_modules/typescript/lib/lib.esnext.promise.d.ts +34 -0
  299. package/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +25 -0
  300. package/node_modules/typescript/lib/lib.scripthost.d.ts +322 -0
  301. package/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +41 -0
  302. package/node_modules/typescript/lib/lib.webworker.d.ts +13150 -0
  303. package/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +23 -0
  304. package/node_modules/typescript/lib/lib.webworker.iterable.d.ts +340 -0
  305. package/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +2122 -0
  306. package/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +2122 -0
  307. package/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +2122 -0
  308. package/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +2122 -0
  309. package/node_modules/typescript/lib/tsc.js +8 -0
  310. package/node_modules/typescript/lib/tsserver.js +8 -0
  311. package/node_modules/typescript/lib/tsserverlibrary.d.ts +17 -0
  312. package/node_modules/typescript/lib/tsserverlibrary.js +21 -0
  313. package/node_modules/typescript/lib/typesMap.json +497 -0
  314. package/node_modules/typescript/lib/typescript.d.ts +11437 -0
  315. package/node_modules/typescript/lib/typescript.js +200276 -0
  316. package/node_modules/typescript/lib/typingsInstaller.js +8 -0
  317. package/node_modules/typescript/lib/watchGuard.js +53 -0
  318. package/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +2122 -0
  319. package/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +2122 -0
  320. package/node_modules/typescript/package.json +120 -0
  321. package/package.json +13 -8
  322. package/lib/coverage/fs-walk.mjs +0 -64
  323. package/lib/coverage/next-discovery.mjs +0 -205
  324. package/lib/coverage/next-static-analysis.mjs +0 -1045
  325. package/node_modules/@elench/testkit-bridge/src/index.mjs +0 -583
  326. package/node_modules/@elench/testkit-bridge/src/index.test.mjs +0 -409
  327. package/node_modules/@elench/testkit-protocol/src/index.d.ts +0 -231
  328. package/node_modules/@elench/testkit-protocol/src/index.mjs +0 -265
  329. package/node_modules/@elench/testkit-protocol/src/index.test.mjs +0 -242
  330. package/node_modules/@elench/ts-analysis/src/callables.mjs +0 -135
  331. package/node_modules/@elench/ts-analysis/src/callables.test.mjs +0 -55
  332. package/node_modules/@elench/ts-analysis/src/exports.mjs +0 -69
  333. package/node_modules/@elench/ts-analysis/src/exports.test.mjs +0 -50
  334. package/node_modules/@elench/ts-analysis/src/jsx.mjs +0 -69
  335. package/node_modules/@elench/ts-analysis/src/jsx.test.mjs +0 -43
  336. package/node_modules/@elench/ts-analysis/src/project.mjs +0 -100
  337. package/node_modules/@elench/ts-analysis/src/project.test.mjs +0 -54
  338. package/node_modules/@elench/ts-analysis/src/requests.mjs +0 -141
  339. package/node_modules/@elench/ts-analysis/src/requests.test.mjs +0 -35
  340. package/node_modules/@elench/ts-analysis/src/resolution.mjs +0 -53
  341. package/node_modules/@elench/ts-analysis/src/shared.mjs +0 -32
  342. package/node_modules/@elench/ts-analysis/src/syntax.mjs +0 -27
@@ -0,0 +1,575 @@
1
+ import * as path from "node:path";
2
+ import { collectExportedCallables, collectImports, collectJsxAttributes, collectScopeLocalFunctions, collectTopLevelFunctions, extractJsxLabel, extractLineNumber, parseModule, walkJsx, } from "./swc.js";
3
+ import { createDiagnostic, dedupeById, dedupeRefs, dedupeRequests, HTTP_WRAPPER_METHODS, humanizeTagName, normalizePath, SURFACE_COMPONENT_NAMES, } from "./shared.js";
4
+ export function analyzeRouteTree({ project, routeOrPageFile, diagnostics = [], }) {
5
+ const pageEntry = resolvePageEntry(project, routeOrPageFile);
6
+ if (!pageEntry)
7
+ return null;
8
+ const routeTree = {
9
+ id: `route-tree:${pageEntry.route}`,
10
+ kind: "route_tree",
11
+ route: pageEntry.route,
12
+ pageFile: pageEntry.filePath,
13
+ rootFiles: [...pageEntry.rootFiles],
14
+ surfaces: [],
15
+ actions: [],
16
+ requests: [],
17
+ serverActionRefs: [],
18
+ reachableModules: [],
19
+ diagnostics: [],
20
+ };
21
+ const analyzerContext = {
22
+ project,
23
+ route: pageEntry.route,
24
+ pageId: pageEntry.id,
25
+ rootFiles: pageEntry.rootFiles,
26
+ routeTree,
27
+ diagnostics,
28
+ visitedExports: new Set(),
29
+ visitedComponentImports: new Set(),
30
+ };
31
+ for (const rootFile of pageEntry.rootFiles) {
32
+ const moduleInfo = loadModuleInfo(project, rootFile);
33
+ if (!moduleInfo)
34
+ continue;
35
+ analyzeModuleExport(moduleInfo, "default", analyzerContext);
36
+ }
37
+ routeTree.surfaces = dedupeById(routeTree.surfaces);
38
+ routeTree.actions = dedupeById(routeTree.actions);
39
+ routeTree.requests = dedupeRequests(routeTree.requests);
40
+ routeTree.serverActionRefs = dedupeRefs(routeTree.serverActionRefs);
41
+ routeTree.reachableModules = [...new Set(routeTree.reachableModules)].sort();
42
+ routeTree.diagnostics = dedupeDiagnostics(routeTree.diagnostics);
43
+ return routeTree;
44
+ }
45
+ function resolvePageEntry(project, routeOrPageFile) {
46
+ const normalized = normalizePath(routeOrPageFile);
47
+ const pages = project.discoverPages();
48
+ return pages.find((page) => page.route === normalized || page.filePath === normalized) || null;
49
+ }
50
+ function loadModuleInfo(project, relativeFilePath) {
51
+ if (project.isExcluded(relativeFilePath))
52
+ return null;
53
+ const existing = project.loadModule(relativeFilePath);
54
+ if (existing)
55
+ return existing;
56
+ const content = project.readSourceFile(relativeFilePath);
57
+ if (!content)
58
+ return null;
59
+ const ast = parseModule(content, relativeFilePath);
60
+ const imports = collectImports(ast, {
61
+ rootDir: project.rootDir,
62
+ filePath: relativeFilePath,
63
+ readSourceFile: (absolutePath) => {
64
+ try {
65
+ return project.readSourceFile(normalizePath(path.relative(project.rootDir, absolutePath)));
66
+ }
67
+ catch {
68
+ return null;
69
+ }
70
+ },
71
+ });
72
+ const topLevelFunctions = collectTopLevelFunctions(ast);
73
+ const { exports, defaultExport } = collectExportedCallables(ast, topLevelFunctions);
74
+ const moduleInfo = {
75
+ filePath: relativeFilePath,
76
+ content,
77
+ ast,
78
+ imports,
79
+ topLevelFunctions,
80
+ exports,
81
+ defaultExport,
82
+ };
83
+ project.setModule(relativeFilePath, moduleInfo);
84
+ return moduleInfo;
85
+ }
86
+ function analyzeModuleExport(moduleInfo, exportName, context) {
87
+ const visitKey = `${moduleInfo.filePath}#${exportName}`;
88
+ if (context.visitedExports.has(visitKey))
89
+ return;
90
+ context.visitedExports.add(visitKey);
91
+ pushReachableModule(context, moduleInfo.filePath);
92
+ const callable = resolveModuleExportCallable(moduleInfo, exportName);
93
+ if (!callable) {
94
+ pushDiagnostic(context, {
95
+ level: "info",
96
+ code: "missing-export-callable",
97
+ filePath: moduleInfo.filePath,
98
+ message: `No callable export "${exportName}" found in "${moduleInfo.filePath}".`,
99
+ });
100
+ return;
101
+ }
102
+ const localFunctions = new Map(moduleInfo.topLevelFunctions);
103
+ for (const [name, node] of collectScopeLocalFunctions(callable)) {
104
+ localFunctions.set(name, node);
105
+ }
106
+ const directAnalysis = analyzeCallableLikeNode(callable, {
107
+ moduleInfo,
108
+ localFunctions,
109
+ context,
110
+ }, new Set(), { skipNestedFunctions: true });
111
+ for (const request of directAnalysis.requests) {
112
+ context.routeTree.requests.push({
113
+ ...request,
114
+ ownerId: context.pageId,
115
+ ownerKind: "page",
116
+ route: context.route,
117
+ filePath: moduleInfo.filePath,
118
+ });
119
+ }
120
+ for (const ref of directAnalysis.serverActionRefs) {
121
+ context.routeTree.serverActionRefs.push({
122
+ ...ref,
123
+ ownerId: context.pageId,
124
+ ownerKind: "page",
125
+ });
126
+ }
127
+ walkJsx(callable, (element, formContext) => {
128
+ const descriptor = describeSurface(moduleInfo, element, formContext);
129
+ if (descriptor) {
130
+ const surfaceId = descriptor.targetHint?.value
131
+ ? `surface:${context.route}:${descriptor.targetHint.value}`
132
+ : `surface:${context.route}:${moduleInfo.filePath}:${descriptor.tagName}:${descriptor.line}`;
133
+ const surface = {
134
+ id: surfaceId,
135
+ kind: "ui_surface",
136
+ route: context.route,
137
+ filePath: moduleInfo.filePath,
138
+ label: descriptor.label,
139
+ line: descriptor.line,
140
+ surfaceKind: descriptor.surfaceKind,
141
+ tagName: descriptor.tagName,
142
+ ...(descriptor.actionBinding ? { actionId: `action:${context.route}:${descriptor.actionBinding.key}` } : {}),
143
+ ...(descriptor.targetHint ? { targetHint: descriptor.targetHint } : {}),
144
+ };
145
+ context.routeTree.surfaces.push(surface);
146
+ if (descriptor.actionBinding) {
147
+ const actionId = `action:${context.route}:${descriptor.actionBinding.key}`;
148
+ const action = {
149
+ id: actionId,
150
+ kind: "ui_action",
151
+ route: context.route,
152
+ filePath: moduleInfo.filePath,
153
+ line: descriptor.line,
154
+ label: descriptor.actionBinding.label,
155
+ bindingKind: descriptor.actionBinding.kind,
156
+ actionProp: descriptor.actionBinding.actionProp,
157
+ };
158
+ context.routeTree.actions.push(action);
159
+ const bindingAnalysis = analyzeActionBinding(descriptor.actionBinding, {
160
+ moduleInfo,
161
+ localFunctions,
162
+ context,
163
+ });
164
+ for (const request of bindingAnalysis.requests) {
165
+ context.routeTree.requests.push({
166
+ ...request,
167
+ ownerId: actionId,
168
+ ownerKind: "action",
169
+ route: context.route,
170
+ filePath: moduleInfo.filePath,
171
+ });
172
+ }
173
+ for (const ref of bindingAnalysis.serverActionRefs) {
174
+ context.routeTree.serverActionRefs.push({
175
+ ...ref,
176
+ ownerId: actionId,
177
+ ownerKind: "action",
178
+ });
179
+ }
180
+ }
181
+ return descriptor.formContext ?? formContext;
182
+ }
183
+ const componentRef = resolveImportedComponentRef(element, moduleInfo.imports);
184
+ if (componentRef)
185
+ analyzeImportedComponent(componentRef, context);
186
+ return formContext;
187
+ });
188
+ }
189
+ function describeSurface(moduleInfo, node, inheritedFormContext) {
190
+ const opening = node.type === "JSXElement" ? node.opening : node;
191
+ const tagName = opening.name?.value || null;
192
+ if (!tagName || !SURFACE_COMPONENT_NAMES.has(tagName))
193
+ return null;
194
+ const attributes = collectJsxAttributes(opening);
195
+ const targetValue = attributes["data-testid"]?.stringValue || null;
196
+ const role = tagName === "form" || tagName === "Form" ? "form" : tagName === "a" || tagName === "Link" ? "link" : "button";
197
+ const surfaceKind = role === "form" ? "form" : role === "link" ? "link" : attributes.type?.stringValue === "submit" ? "submit" : "control";
198
+ const ownBinding = buildActionBinding(attributes.onClick?.expression, "onClick") ||
199
+ buildActionBinding(attributes.action?.expression, "action") ||
200
+ buildActionBinding(attributes.onSubmit?.expression, "onSubmit");
201
+ const inheritedSubmitBinding = !ownBinding && isSubmitSurface(tagName, attributes) && inheritedFormContext?.actionBinding
202
+ ? inheritedFormContext.actionBinding
203
+ : null;
204
+ const actionBinding = ownBinding || inheritedSubmitBinding;
205
+ if (!actionBinding && !targetValue) {
206
+ return tagName === "form" || tagName === "Form"
207
+ ? { tagName, surfaceKind, label: humanizeTagName(tagName), line: extractLineNumber(moduleInfo.content, node), targetHint: null, actionBinding: null, formContext: buildFormContext(attributes) }
208
+ : null;
209
+ }
210
+ const label = extractJsxLabel(node, attributes) || actionBinding?.label || targetValue || humanizeTagName(tagName);
211
+ const line = extractLineNumber(moduleInfo.content, node);
212
+ return {
213
+ tagName,
214
+ surfaceKind,
215
+ label,
216
+ line,
217
+ targetHint: targetValue
218
+ ? {
219
+ kind: "testId",
220
+ value: targetValue,
221
+ label,
222
+ confidence: "high",
223
+ }
224
+ : null,
225
+ actionBinding,
226
+ formContext: buildFormContext(attributes, actionBinding),
227
+ };
228
+ }
229
+ function buildFormContext(attributes, explicitBinding = null) {
230
+ const actionBinding = explicitBinding ||
231
+ buildActionBinding(attributes.action?.expression, "action") ||
232
+ buildActionBinding(attributes.onSubmit?.expression, "onSubmit");
233
+ return actionBinding ? { actionBinding } : null;
234
+ }
235
+ function buildActionBinding(expression, actionProp) {
236
+ if (!expression)
237
+ return null;
238
+ if (expression.type === "Identifier") {
239
+ return {
240
+ kind: "identifier",
241
+ actionProp,
242
+ key: expression.value,
243
+ label: expression.value,
244
+ node: expression,
245
+ confidence: actionProp === "action" ? "high" : "medium",
246
+ };
247
+ }
248
+ if (expression.type === "ArrowFunctionExpression" || expression.type === "FunctionExpression") {
249
+ return {
250
+ kind: "inline",
251
+ actionProp,
252
+ key: `inline:${expression.span?.start || 0}`,
253
+ label: actionProp === "action" ? "Inline action" : "Inline handler",
254
+ node: expression,
255
+ confidence: "medium",
256
+ };
257
+ }
258
+ return null;
259
+ }
260
+ function analyzeActionBinding(binding, options) {
261
+ if (!binding)
262
+ return emptyActionAnalysis();
263
+ if (binding.kind === "identifier" && binding.node?.type === "Identifier") {
264
+ const identifier = binding.node.value;
265
+ const imported = options.moduleInfo.imports.get(identifier);
266
+ if (imported?.isServerAction) {
267
+ return {
268
+ requests: [],
269
+ serverActionRefs: [{
270
+ exportKey: `${imported.resolvedFilePath}#${imported.importedName}`,
271
+ confidence: "high",
272
+ }],
273
+ };
274
+ }
275
+ if (imported?.resolvedFilePath) {
276
+ return analyzeImportedCallable(imported, options, new Set([imported.resolvedFilePath]));
277
+ }
278
+ const localFunction = options.localFunctions.get(identifier);
279
+ if (!localFunction)
280
+ return emptyActionAnalysis();
281
+ return analyzeCallableLikeNode(localFunction, options, new Set([identifier]));
282
+ }
283
+ if (binding.kind === "inline") {
284
+ return analyzeCallableLikeNode(binding.node, options, new Set());
285
+ }
286
+ return emptyActionAnalysis();
287
+ }
288
+ function analyzeImportedCallable(imported, options, visited) {
289
+ if (!imported?.resolvedFilePath || imported.isServerAction || visited.has(imported.resolvedFilePath)) {
290
+ return emptyActionAnalysis();
291
+ }
292
+ const moduleInfo = loadModuleInfo(options.context.project, imported.resolvedFilePath);
293
+ if (!moduleInfo)
294
+ return emptyActionAnalysis();
295
+ pushReachableModule(options.context, imported.resolvedFilePath);
296
+ const callable = resolveModuleExportCallable(moduleInfo, imported.importedName);
297
+ if (!callable)
298
+ return emptyActionAnalysis();
299
+ const localFunctions = new Map(moduleInfo.topLevelFunctions);
300
+ for (const [name, node] of collectScopeLocalFunctions(callable)) {
301
+ localFunctions.set(name, node);
302
+ }
303
+ const nextVisited = new Set(visited);
304
+ nextVisited.add(imported.resolvedFilePath);
305
+ return analyzeCallableLikeNode(callable, {
306
+ moduleInfo,
307
+ localFunctions,
308
+ context: options.context,
309
+ }, nextVisited);
310
+ }
311
+ function analyzeCallableLikeNode(node, options, visited = new Set(), settings = {}) {
312
+ const requests = [];
313
+ const serverActionRefs = [];
314
+ walkCallableNode(node, (child) => {
315
+ if (settings.skipNestedFunctions &&
316
+ child !== node &&
317
+ (child.type === "ArrowFunctionExpression" || child.type === "FunctionExpression" || child.type === "FunctionDeclaration")) {
318
+ return "skip";
319
+ }
320
+ if (child.type === "CallExpression") {
321
+ const request = resolveHttpRequestCall(child);
322
+ if (request) {
323
+ requests.push(request);
324
+ return;
325
+ }
326
+ const serverAction = resolveServerActionCall(child, options.moduleInfo.imports);
327
+ if (serverAction) {
328
+ serverActionRefs.push(serverAction);
329
+ return;
330
+ }
331
+ const localCall = resolveLocalFunctionCall(child, options, visited);
332
+ if (localCall) {
333
+ requests.push(...localCall.requests);
334
+ serverActionRefs.push(...localCall.serverActionRefs);
335
+ return;
336
+ }
337
+ const importedCall = resolveImportedLocalCall(child, options, visited);
338
+ if (importedCall) {
339
+ requests.push(...importedCall.requests);
340
+ serverActionRefs.push(...importedCall.serverActionRefs);
341
+ return;
342
+ }
343
+ for (const callbackAnalysis of resolveExecutedCallbackAnalyses(child, options, visited)) {
344
+ requests.push(...callbackAnalysis.requests);
345
+ serverActionRefs.push(...callbackAnalysis.serverActionRefs);
346
+ }
347
+ }
348
+ });
349
+ return {
350
+ requests: dedupeRequests(requests),
351
+ serverActionRefs: dedupeRefs(serverActionRefs),
352
+ };
353
+ }
354
+ function resolveLocalFunctionCall(callExpression, options, visited) {
355
+ const callee = callExpression.callee;
356
+ if (callee?.type !== "Identifier")
357
+ return null;
358
+ const functionName = callee.value;
359
+ const localFunction = options.localFunctions.get(functionName);
360
+ if (!localFunction || visited.has(functionName))
361
+ return null;
362
+ const nextVisited = new Set(visited);
363
+ nextVisited.add(functionName);
364
+ return analyzeCallableLikeNode(localFunction, options, nextVisited);
365
+ }
366
+ function resolveImportedLocalCall(callExpression, options, visited) {
367
+ const callee = callExpression.callee;
368
+ if (callee?.type !== "Identifier")
369
+ return null;
370
+ const imported = options.moduleInfo.imports.get(callee.value);
371
+ if (!imported?.resolvedFilePath || imported.isServerAction)
372
+ return null;
373
+ return analyzeImportedCallable(imported, options, visited);
374
+ }
375
+ function resolveExecutedCallbackAnalyses(callExpression, options, visited) {
376
+ const callbacks = [];
377
+ const callee = callExpression.callee;
378
+ if (callee?.type === "Identifier" && (callee.value === "useEffect" || callee.value === "useLayoutEffect")) {
379
+ const callbackArg = callExpression.arguments?.[0]?.expression;
380
+ if (callbackArg && (callbackArg.type === "ArrowFunctionExpression" || callbackArg.type === "FunctionExpression")) {
381
+ callbacks.push(analyzeCallableLikeNode(callbackArg, options, new Set(visited)));
382
+ }
383
+ }
384
+ return callbacks;
385
+ }
386
+ function resolveServerActionCall(callExpression, imports) {
387
+ const callee = callExpression.callee;
388
+ if (callee?.type !== "Identifier")
389
+ return null;
390
+ const imported = imports.get(callee.value);
391
+ if (!imported?.isServerAction)
392
+ return null;
393
+ return {
394
+ exportKey: `${imported.resolvedFilePath}#${imported.importedName}`,
395
+ confidence: "high",
396
+ };
397
+ }
398
+ function resolveHttpRequestCall(callExpression) {
399
+ const callee = callExpression.callee;
400
+ if (callee?.type === "Identifier") {
401
+ if (callee.value === "fetch") {
402
+ const path = extractRequestPath(callExpression.arguments?.[0]?.expression);
403
+ if (!path || !path.startsWith("/api/"))
404
+ return null;
405
+ const method = extractFetchMethod(callExpression.arguments?.[1]?.expression) || "GET";
406
+ return {
407
+ id: `request:${callee.span?.start || 0}:${method}:${path}`,
408
+ method,
409
+ path,
410
+ confidence: "high",
411
+ };
412
+ }
413
+ if (callee.value === "rawReq") {
414
+ const methodLiteral = extractStringLiteral(callExpression.arguments?.[0]?.expression);
415
+ const path = extractRequestPath(callExpression.arguments?.[1]?.expression);
416
+ if (!methodLiteral || !path)
417
+ return null;
418
+ return {
419
+ id: `request:${callee.span?.start || 0}:${methodLiteral.toUpperCase()}:${path}`,
420
+ method: methodLiteral.toUpperCase(),
421
+ path,
422
+ confidence: "high",
423
+ };
424
+ }
425
+ const wrapperMethod = HTTP_WRAPPER_METHODS[callee.value];
426
+ if (wrapperMethod) {
427
+ const path = extractRequestPath(callExpression.arguments?.[0]?.expression);
428
+ if (!path || !path.startsWith("/api/"))
429
+ return null;
430
+ return {
431
+ id: `request:${callee.span?.start || 0}:${wrapperMethod}:${path}`,
432
+ method: wrapperMethod,
433
+ path,
434
+ confidence: "high",
435
+ };
436
+ }
437
+ }
438
+ if (callee?.type === "MemberExpression" && callee.property?.type === "Identifier" && callee.property.value === "rawReq") {
439
+ const methodLiteral = extractStringLiteral(callExpression.arguments?.[0]?.expression);
440
+ const path = extractRequestPath(callExpression.arguments?.[1]?.expression);
441
+ if (!methodLiteral || !path)
442
+ return null;
443
+ return {
444
+ id: `request:${callee.span?.start || 0}:${methodLiteral.toUpperCase()}:${path}`,
445
+ method: methodLiteral.toUpperCase(),
446
+ path,
447
+ confidence: "high",
448
+ };
449
+ }
450
+ return null;
451
+ }
452
+ function resolveImportedComponentRef(node, imports) {
453
+ const opening = node.type === "JSXElement" ? node.opening : node;
454
+ const tagName = opening.name?.value || null;
455
+ if (!tagName || !/^[A-Z]/u.test(tagName))
456
+ return null;
457
+ const imported = imports.get(tagName);
458
+ if (!imported?.resolvedFilePath || imported.isServerAction)
459
+ return null;
460
+ if (imported.resolvedFilePath.includes("/components/ui/"))
461
+ return null;
462
+ return {
463
+ filePath: imported.resolvedFilePath,
464
+ exportName: imported.importedName,
465
+ };
466
+ }
467
+ function analyzeImportedComponent(componentRef, context) {
468
+ const key = `${componentRef.filePath}#${componentRef.exportName}`;
469
+ if (context.visitedComponentImports.has(key))
470
+ return;
471
+ context.visitedComponentImports.add(key);
472
+ const moduleInfo = loadModuleInfo(context.project, componentRef.filePath);
473
+ if (!moduleInfo)
474
+ return;
475
+ analyzeModuleExport(moduleInfo, componentRef.exportName, context);
476
+ }
477
+ function resolveModuleExportCallable(moduleInfo, exportName) {
478
+ if (exportName === "default")
479
+ return moduleInfo.defaultExport || null;
480
+ const direct = moduleInfo.exports.get(exportName);
481
+ if (direct?.type === "Identifier") {
482
+ return moduleInfo.topLevelFunctions.get(direct.value) || null;
483
+ }
484
+ return direct || null;
485
+ }
486
+ function pushReachableModule(context, filePath) {
487
+ context.routeTree.reachableModules.push(filePath);
488
+ }
489
+ function pushDiagnostic(context, diagnostic) {
490
+ const entry = createDiagnostic(diagnostic);
491
+ context.routeTree.diagnostics.push(entry);
492
+ context.diagnostics.push(entry);
493
+ }
494
+ function dedupeDiagnostics(entries) {
495
+ const seen = new Set();
496
+ return entries.filter((entry) => {
497
+ const key = `${entry.code}:${entry.filePath || ""}:${entry.line || ""}:${entry.message}`;
498
+ if (seen.has(key))
499
+ return false;
500
+ seen.add(key);
501
+ return true;
502
+ });
503
+ }
504
+ function walkCallableNode(node, visitor) {
505
+ const visit = (current) => {
506
+ const action = visitor(current);
507
+ if (action === "skip")
508
+ return;
509
+ for (const value of Object.values(current || {})) {
510
+ if (!value)
511
+ continue;
512
+ if (Array.isArray(value)) {
513
+ for (const item of value) {
514
+ if (item && typeof item === "object" && "type" in item)
515
+ visit(item);
516
+ }
517
+ }
518
+ else if (value && typeof value === "object" && "type" in value) {
519
+ visit(value);
520
+ }
521
+ }
522
+ };
523
+ if (node?.body?.type === "BlockStatement") {
524
+ visit(node.body);
525
+ }
526
+ else if (node?.type) {
527
+ visit(node);
528
+ }
529
+ }
530
+ function extractStringLiteral(node) {
531
+ if (!node)
532
+ return null;
533
+ if (node.type === "StringLiteral")
534
+ return node.value;
535
+ if (node.type === "TemplateLiteral") {
536
+ let value = node.quasis?.[0]?.raw || "";
537
+ for (let index = 0; index < (node.expressions || []).length; index += 1) {
538
+ value += "[id]";
539
+ value += node.quasis?.[index + 1]?.raw || "";
540
+ }
541
+ return value;
542
+ }
543
+ return null;
544
+ }
545
+ function extractRequestPath(node) {
546
+ const literal = extractStringLiteral(node);
547
+ if (!literal)
548
+ return null;
549
+ return literal.split("?")[0];
550
+ }
551
+ function extractFetchMethod(node) {
552
+ if (!node || node.type !== "ObjectExpression")
553
+ return null;
554
+ for (const property of node.properties || []) {
555
+ if (property.type !== "KeyValueProperty")
556
+ continue;
557
+ const key = property.key?.value || property.key?.name?.value || property.key?.name;
558
+ if (key !== "method")
559
+ continue;
560
+ const value = extractStringLiteral(property.value);
561
+ return value ? value.toUpperCase() : null;
562
+ }
563
+ return null;
564
+ }
565
+ function isSubmitSurface(tagName, attributes) {
566
+ const type = attributes.type?.stringValue || "";
567
+ return tagName === "button" || tagName === "Button" || (tagName === "input" && type === "submit");
568
+ }
569
+ function emptyActionAnalysis() {
570
+ return {
571
+ requests: [],
572
+ serverActionRefs: [],
573
+ };
574
+ }
575
+ //# sourceMappingURL=route-tree.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route-tree.js","sourceRoot":"","sources":["../src/route-tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAWlC,OAAO,EACL,wBAAwB,EACxB,cAAc,EACd,oBAAoB,EACpB,0BAA0B,EAC1B,wBAAwB,EACxB,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,OAAO,GACR,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAmCrB,MAAM,UAAU,gBAAgB,CAAC,EAC/B,OAAO,EACP,eAAe,EACf,WAAW,GAAG,EAAE,GAKjB;IACC,MAAM,SAAS,GAAG,gBAAgB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IAC7D,IAAI,CAAC,SAAS;QAAE,OAAO,IAAI,CAAC;IAE5B,MAAM,SAAS,GAAkB;QAC/B,EAAE,EAAE,cAAc,SAAS,CAAC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L,QAAQ,EAAE,EAAE;QACZ,gBAAgB,EAAE,EAAE;KACrB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare function routeFromAppFile(appRoot: string, filePath: string): string;
2
+ export declare function routeFromApiFile(appRoot: string, filePath: string): string;
3
+ export declare function requestPathPatternFromLiteral(literal: string): string | null;
4
+ export declare function routePatternMatches(routePattern: string, candidatePath: string): boolean;
5
+ export declare function normalizeRequestPathFromRoute(route: string): string;
6
+ //# sourceMappingURL=routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAGA,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAM1E;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAK1E;AAED,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQ5E;AAED,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAQxF;AAED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEnE"}
@@ -0,0 +1,41 @@
1
+ import * as path from "node:path";
2
+ import { normalizePath, normalizeRouteSegments } from "./shared.js";
3
+ export function routeFromAppFile(appRoot, filePath) {
4
+ const absolutePath = path.isAbsolute(filePath) ? filePath : path.resolve(appRoot, filePath);
5
+ const relative = normalizePath(path.relative(appRoot, absolutePath));
6
+ const segments = relative.split("/");
7
+ segments.pop();
8
+ return normalizeRouteSegments(segments);
9
+ }
10
+ export function routeFromApiFile(appRoot, filePath) {
11
+ const appRelative = normalizePath(path.relative(appRoot, path.dirname(filePath)));
12
+ const segments = appRelative.split("/").filter(Boolean);
13
+ if (segments[0] === "api")
14
+ segments.shift();
15
+ return normalizeRouteSegments(segments);
16
+ }
17
+ export function requestPathPatternFromLiteral(literal) {
18
+ const normalized = String(literal || "").trim();
19
+ if (!normalized)
20
+ return null;
21
+ const withoutQuery = normalized.split("?")[0];
22
+ const withDynamicSegments = withoutQuery
23
+ .replace(/\$\{[^}]+\}/gu, "[id]")
24
+ .replace(/__TESTKIT_DYNAMIC_SEGMENT__/gu, "[id]");
25
+ return withDynamicSegments.startsWith("/") ? withDynamicSegments : `/${withDynamicSegments}`;
26
+ }
27
+ export function routePatternMatches(routePattern, candidatePath) {
28
+ const routeSegments = normalizePath(routePattern).split("/").filter(Boolean);
29
+ const candidateSegments = normalizePath(candidatePath).split("/").filter(Boolean);
30
+ if (routeSegments.length !== candidateSegments.length)
31
+ return false;
32
+ return routeSegments.every((segment, index) => {
33
+ if (segment.startsWith("[") && segment.endsWith("]"))
34
+ return true;
35
+ return segment === candidateSegments[index];
36
+ });
37
+ }
38
+ export function normalizeRequestPathFromRoute(route) {
39
+ return route === "/" ? "/api" : `/api${route}`;
40
+ }
41
+ //# sourceMappingURL=routes.js.map