@elench/testkit 0.1.65 → 0.1.67

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 (324) hide show
  1. package/README.md +37 -62
  2. package/lib/app/browser-bridge.mjs +66 -0
  3. package/lib/app/configs.mjs +81 -0
  4. package/lib/app/configs.test.mjs +34 -0
  5. package/lib/app/doctor.mjs +139 -0
  6. package/lib/app/typecheck.mjs +203 -0
  7. package/lib/cli/command-helpers.mjs +2 -10
  8. package/lib/cli/commands/browser/serve.mjs +3 -62
  9. package/lib/cli/commands/doctor.mjs +39 -0
  10. package/lib/cli/commands/typecheck.mjs +28 -0
  11. package/lib/cli/db.mjs +3 -68
  12. package/lib/cli/entrypoint.mjs +2 -0
  13. package/lib/config/binaries.mjs +34 -0
  14. package/lib/config/database.mjs +9 -6
  15. package/lib/config/index.mjs +13 -31
  16. package/lib/config/runtime.mjs +35 -96
  17. package/lib/config/runtime.test.mjs +26 -0
  18. package/lib/config/validation.mjs +18 -62
  19. package/lib/coverage/backend-discovery.mjs +68 -85
  20. package/lib/coverage/backend-discovery.test.mjs +55 -46
  21. package/lib/coverage/graph-builder.mjs +5 -5
  22. package/lib/coverage/index.test.mjs +4 -2
  23. package/lib/coverage/next-ir-to-graph.mjs +0 -1
  24. package/lib/coverage/routing.mjs +2 -29
  25. package/lib/coverage/routing.test.mjs +0 -16
  26. package/lib/coverage/shared.mjs +22 -82
  27. package/lib/database/fingerprint.mjs +1 -1
  28. package/lib/discovery/file-metadata.mjs +122 -0
  29. package/lib/discovery/file-metadata.test.mjs +51 -0
  30. package/lib/discovery/index.mjs +10 -2
  31. package/lib/discovery/index.test.mjs +19 -19
  32. package/lib/known-failures/github-cache.mjs +159 -0
  33. package/lib/known-failures/github-transport.mjs +174 -0
  34. package/lib/known-failures/github.mjs +17 -325
  35. package/lib/runner/default-runtime-runner.mjs +4 -10
  36. package/lib/runner/execution-config.mjs +12 -83
  37. package/lib/runner/live-run.mjs +45 -0
  38. package/lib/runner/managed-processes.mjs +29 -0
  39. package/lib/runner/orchestrator.mjs +57 -188
  40. package/lib/runner/planning.mjs +10 -3
  41. package/lib/runner/planning.test.mjs +26 -0
  42. package/lib/runner/playwright-runner.mjs +4 -11
  43. package/lib/runner/run-finalization.mjs +132 -0
  44. package/lib/runner/run-guards.mjs +45 -0
  45. package/lib/runner/runtime-preparation.mjs +1 -1
  46. package/lib/runner/services.mjs +3 -4
  47. package/lib/runner/template-steps.mjs +8 -45
  48. package/lib/runner/template.mjs +7 -28
  49. package/lib/setup/index.d.ts +88 -21
  50. package/lib/setup/index.mjs +177 -50
  51. package/lib/setup/index.test.mjs +194 -64
  52. package/lib/shared/build-config.mjs +144 -0
  53. package/lib/shared/build-config.test.mjs +81 -0
  54. package/lib/shared/configured-steps.mjs +178 -0
  55. package/lib/shared/configured-steps.test.mjs +73 -0
  56. package/lib/shared/execution-schema.mjs +74 -0
  57. package/lib/shared/execution-schema.test.mjs +26 -0
  58. package/node_modules/@elench/next-analysis/dist/api-routes.d.ts +7 -0
  59. package/node_modules/@elench/next-analysis/dist/api-routes.d.ts.map +1 -0
  60. package/node_modules/@elench/next-analysis/dist/api-routes.js +66 -0
  61. package/node_modules/@elench/next-analysis/dist/api-routes.js.map +1 -0
  62. package/node_modules/@elench/next-analysis/dist/app-root.d.ts +2 -0
  63. package/node_modules/@elench/next-analysis/dist/app-root.d.ts.map +1 -0
  64. package/node_modules/@elench/next-analysis/dist/app-root.js +7 -0
  65. package/node_modules/@elench/next-analysis/dist/app-root.js.map +1 -0
  66. package/node_modules/@elench/next-analysis/dist/backend-links.d.ts +8 -0
  67. package/node_modules/@elench/next-analysis/dist/backend-links.d.ts.map +1 -0
  68. package/node_modules/@elench/next-analysis/dist/backend-links.js +30 -0
  69. package/node_modules/@elench/next-analysis/dist/backend-links.js.map +1 -0
  70. package/node_modules/@elench/next-analysis/dist/index.d.ts +11 -0
  71. package/node_modules/@elench/next-analysis/dist/index.d.ts.map +1 -0
  72. package/node_modules/@elench/next-analysis/dist/index.js +10 -0
  73. package/node_modules/@elench/next-analysis/dist/index.js.map +1 -0
  74. package/node_modules/@elench/next-analysis/dist/pages.d.ts +7 -0
  75. package/node_modules/@elench/next-analysis/dist/pages.d.ts.map +1 -0
  76. package/node_modules/@elench/next-analysis/dist/pages.js +47 -0
  77. package/node_modules/@elench/next-analysis/dist/pages.js.map +1 -0
  78. package/node_modules/@elench/next-analysis/dist/project.d.ts +3 -0
  79. package/node_modules/@elench/next-analysis/dist/project.d.ts.map +1 -0
  80. package/node_modules/@elench/next-analysis/dist/project.js +102 -0
  81. package/node_modules/@elench/next-analysis/dist/project.js.map +1 -0
  82. package/node_modules/@elench/next-analysis/dist/route-tree.d.ts +7 -0
  83. package/node_modules/@elench/next-analysis/dist/route-tree.d.ts.map +1 -0
  84. package/node_modules/@elench/next-analysis/dist/route-tree.js +575 -0
  85. package/node_modules/@elench/next-analysis/dist/route-tree.js.map +1 -0
  86. package/node_modules/@elench/next-analysis/dist/routes.d.ts +6 -0
  87. package/node_modules/@elench/next-analysis/dist/routes.d.ts.map +1 -0
  88. package/node_modules/@elench/next-analysis/dist/routes.js +41 -0
  89. package/node_modules/@elench/next-analysis/dist/routes.js.map +1 -0
  90. package/node_modules/@elench/next-analysis/dist/server-actions.d.ts +7 -0
  91. package/node_modules/@elench/next-analysis/dist/server-actions.d.ts.map +1 -0
  92. package/node_modules/@elench/next-analysis/dist/server-actions.js +37 -0
  93. package/node_modules/@elench/next-analysis/dist/server-actions.js.map +1 -0
  94. package/node_modules/@elench/next-analysis/dist/shared.d.ts +57 -0
  95. package/node_modules/@elench/next-analysis/dist/shared.d.ts.map +1 -0
  96. package/node_modules/@elench/next-analysis/dist/shared.js +229 -0
  97. package/node_modules/@elench/next-analysis/dist/shared.js.map +1 -0
  98. package/node_modules/@elench/next-analysis/dist/swc.d.ts +53 -0
  99. package/node_modules/@elench/next-analysis/dist/swc.d.ts.map +1 -0
  100. package/node_modules/@elench/next-analysis/dist/swc.js +387 -0
  101. package/node_modules/@elench/next-analysis/dist/swc.js.map +1 -0
  102. package/node_modules/@elench/next-analysis/dist/types.d.ts +125 -0
  103. package/node_modules/@elench/next-analysis/dist/types.d.ts.map +1 -0
  104. package/node_modules/@elench/next-analysis/dist/types.js +2 -0
  105. package/node_modules/@elench/next-analysis/dist/types.js.map +1 -0
  106. package/node_modules/@elench/next-analysis/package.json +15 -2
  107. package/node_modules/@elench/testkit-bridge/dist/index.d.ts +36 -0
  108. package/node_modules/@elench/testkit-bridge/dist/index.d.ts.map +1 -0
  109. package/node_modules/@elench/testkit-bridge/dist/index.js +538 -0
  110. package/node_modules/@elench/testkit-bridge/dist/index.js.map +1 -0
  111. package/node_modules/@elench/testkit-bridge/package.json +16 -5
  112. package/node_modules/@elench/testkit-protocol/dist/index.d.ts +190 -0
  113. package/node_modules/@elench/testkit-protocol/dist/index.d.ts.map +1 -0
  114. package/node_modules/@elench/testkit-protocol/dist/index.js +296 -0
  115. package/node_modules/@elench/testkit-protocol/dist/index.js.map +1 -0
  116. package/node_modules/@elench/testkit-protocol/package.json +14 -7
  117. package/node_modules/@elench/ts-analysis/dist/callables.d.ts +8 -0
  118. package/node_modules/@elench/ts-analysis/dist/callables.d.ts.map +1 -0
  119. package/node_modules/@elench/ts-analysis/dist/callables.js +126 -0
  120. package/node_modules/@elench/ts-analysis/dist/callables.js.map +1 -0
  121. package/node_modules/@elench/ts-analysis/dist/exports.d.ts +6 -0
  122. package/node_modules/@elench/ts-analysis/dist/exports.d.ts.map +1 -0
  123. package/node_modules/@elench/ts-analysis/dist/exports.js +70 -0
  124. package/node_modules/@elench/ts-analysis/dist/exports.js.map +1 -0
  125. package/node_modules/@elench/ts-analysis/dist/index.d.ts +10 -0
  126. package/node_modules/@elench/ts-analysis/dist/index.d.ts.map +1 -0
  127. package/node_modules/@elench/ts-analysis/{src/index.mjs → dist/index.js} +9 -14
  128. package/node_modules/@elench/ts-analysis/dist/index.js.map +1 -0
  129. package/node_modules/@elench/ts-analysis/dist/jsx.d.ts +9 -0
  130. package/node_modules/@elench/ts-analysis/dist/jsx.d.ts.map +1 -0
  131. package/node_modules/@elench/ts-analysis/dist/jsx.js +68 -0
  132. package/node_modules/@elench/ts-analysis/dist/jsx.js.map +1 -0
  133. package/node_modules/@elench/ts-analysis/dist/project.d.ts +5 -0
  134. package/node_modules/@elench/ts-analysis/dist/project.d.ts.map +1 -0
  135. package/node_modules/@elench/ts-analysis/dist/project.js +90 -0
  136. package/node_modules/@elench/ts-analysis/dist/project.js.map +1 -0
  137. package/node_modules/@elench/ts-analysis/dist/requests.d.ts +6 -0
  138. package/node_modules/@elench/ts-analysis/dist/requests.d.ts.map +1 -0
  139. package/node_modules/@elench/ts-analysis/dist/requests.js +140 -0
  140. package/node_modules/@elench/ts-analysis/dist/requests.js.map +1 -0
  141. package/node_modules/@elench/ts-analysis/dist/resolution.d.ts +4 -0
  142. package/node_modules/@elench/ts-analysis/dist/resolution.d.ts.map +1 -0
  143. package/node_modules/@elench/ts-analysis/dist/resolution.js +53 -0
  144. package/node_modules/@elench/ts-analysis/dist/resolution.js.map +1 -0
  145. package/node_modules/@elench/ts-analysis/dist/shared.d.ts +6 -0
  146. package/node_modules/@elench/ts-analysis/dist/shared.d.ts.map +1 -0
  147. package/node_modules/@elench/ts-analysis/dist/shared.js +31 -0
  148. package/node_modules/@elench/ts-analysis/dist/shared.js.map +1 -0
  149. package/node_modules/@elench/ts-analysis/dist/syntax.d.ts +7 -0
  150. package/node_modules/@elench/ts-analysis/dist/syntax.d.ts.map +1 -0
  151. package/node_modules/@elench/ts-analysis/dist/syntax.js +27 -0
  152. package/node_modules/@elench/ts-analysis/dist/syntax.js.map +1 -0
  153. package/node_modules/@elench/ts-analysis/dist/types.d.ts +58 -0
  154. package/node_modules/@elench/ts-analysis/dist/types.d.ts.map +1 -0
  155. package/node_modules/@elench/ts-analysis/dist/types.js +2 -0
  156. package/node_modules/@elench/ts-analysis/dist/types.js.map +1 -0
  157. package/node_modules/@elench/ts-analysis/package.json +18 -2
  158. package/node_modules/typescript/LICENSE.txt +55 -0
  159. package/node_modules/typescript/README.md +50 -0
  160. package/node_modules/typescript/SECURITY.md +41 -0
  161. package/node_modules/typescript/ThirdPartyNoticeText.txt +193 -0
  162. package/node_modules/typescript/bin/tsc +2 -0
  163. package/node_modules/typescript/bin/tsserver +2 -0
  164. package/node_modules/typescript/lib/_tsc.js +133818 -0
  165. package/node_modules/typescript/lib/_tsserver.js +659 -0
  166. package/node_modules/typescript/lib/_typingsInstaller.js +222 -0
  167. package/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +2122 -0
  168. package/node_modules/typescript/lib/de/diagnosticMessages.generated.json +2122 -0
  169. package/node_modules/typescript/lib/es/diagnosticMessages.generated.json +2122 -0
  170. package/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +2122 -0
  171. package/node_modules/typescript/lib/it/diagnosticMessages.generated.json +2122 -0
  172. package/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +2122 -0
  173. package/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +2122 -0
  174. package/node_modules/typescript/lib/lib.d.ts +22 -0
  175. package/node_modules/typescript/lib/lib.decorators.d.ts +384 -0
  176. package/node_modules/typescript/lib/lib.decorators.legacy.d.ts +22 -0
  177. package/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +41 -0
  178. package/node_modules/typescript/lib/lib.dom.d.ts +39429 -0
  179. package/node_modules/typescript/lib/lib.dom.iterable.d.ts +571 -0
  180. package/node_modules/typescript/lib/lib.es2015.collection.d.ts +147 -0
  181. package/node_modules/typescript/lib/lib.es2015.core.d.ts +597 -0
  182. package/node_modules/typescript/lib/lib.es2015.d.ts +28 -0
  183. package/node_modules/typescript/lib/lib.es2015.generator.d.ts +77 -0
  184. package/node_modules/typescript/lib/lib.es2015.iterable.d.ts +605 -0
  185. package/node_modules/typescript/lib/lib.es2015.promise.d.ts +81 -0
  186. package/node_modules/typescript/lib/lib.es2015.proxy.d.ts +128 -0
  187. package/node_modules/typescript/lib/lib.es2015.reflect.d.ts +144 -0
  188. package/node_modules/typescript/lib/lib.es2015.symbol.d.ts +46 -0
  189. package/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
  190. package/node_modules/typescript/lib/lib.es2016.array.include.d.ts +116 -0
  191. package/node_modules/typescript/lib/lib.es2016.d.ts +21 -0
  192. package/node_modules/typescript/lib/lib.es2016.full.d.ts +23 -0
  193. package/node_modules/typescript/lib/lib.es2016.intl.d.ts +31 -0
  194. package/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +21 -0
  195. package/node_modules/typescript/lib/lib.es2017.d.ts +26 -0
  196. package/node_modules/typescript/lib/lib.es2017.date.d.ts +31 -0
  197. package/node_modules/typescript/lib/lib.es2017.full.d.ts +23 -0
  198. package/node_modules/typescript/lib/lib.es2017.intl.d.ts +44 -0
  199. package/node_modules/typescript/lib/lib.es2017.object.d.ts +49 -0
  200. package/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +135 -0
  201. package/node_modules/typescript/lib/lib.es2017.string.d.ts +45 -0
  202. package/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +53 -0
  203. package/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +77 -0
  204. package/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +53 -0
  205. package/node_modules/typescript/lib/lib.es2018.d.ts +24 -0
  206. package/node_modules/typescript/lib/lib.es2018.full.d.ts +24 -0
  207. package/node_modules/typescript/lib/lib.es2018.intl.d.ts +83 -0
  208. package/node_modules/typescript/lib/lib.es2018.promise.d.ts +30 -0
  209. package/node_modules/typescript/lib/lib.es2018.regexp.d.ts +37 -0
  210. package/node_modules/typescript/lib/lib.es2019.array.d.ts +79 -0
  211. package/node_modules/typescript/lib/lib.es2019.d.ts +24 -0
  212. package/node_modules/typescript/lib/lib.es2019.full.d.ts +24 -0
  213. package/node_modules/typescript/lib/lib.es2019.intl.d.ts +23 -0
  214. package/node_modules/typescript/lib/lib.es2019.object.d.ts +33 -0
  215. package/node_modules/typescript/lib/lib.es2019.string.d.ts +37 -0
  216. package/node_modules/typescript/lib/lib.es2019.symbol.d.ts +24 -0
  217. package/node_modules/typescript/lib/lib.es2020.bigint.d.ts +765 -0
  218. package/node_modules/typescript/lib/lib.es2020.d.ts +27 -0
  219. package/node_modules/typescript/lib/lib.es2020.date.d.ts +42 -0
  220. package/node_modules/typescript/lib/lib.es2020.full.d.ts +24 -0
  221. package/node_modules/typescript/lib/lib.es2020.intl.d.ts +474 -0
  222. package/node_modules/typescript/lib/lib.es2020.number.d.ts +28 -0
  223. package/node_modules/typescript/lib/lib.es2020.promise.d.ts +47 -0
  224. package/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +99 -0
  225. package/node_modules/typescript/lib/lib.es2020.string.d.ts +44 -0
  226. package/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
  227. package/node_modules/typescript/lib/lib.es2021.d.ts +23 -0
  228. package/node_modules/typescript/lib/lib.es2021.full.d.ts +24 -0
  229. package/node_modules/typescript/lib/lib.es2021.intl.d.ts +166 -0
  230. package/node_modules/typescript/lib/lib.es2021.promise.d.ts +48 -0
  231. package/node_modules/typescript/lib/lib.es2021.string.d.ts +33 -0
  232. package/node_modules/typescript/lib/lib.es2021.weakref.d.ts +78 -0
  233. package/node_modules/typescript/lib/lib.es2022.array.d.ts +121 -0
  234. package/node_modules/typescript/lib/lib.es2022.d.ts +25 -0
  235. package/node_modules/typescript/lib/lib.es2022.error.d.ts +75 -0
  236. package/node_modules/typescript/lib/lib.es2022.full.d.ts +24 -0
  237. package/node_modules/typescript/lib/lib.es2022.intl.d.ts +145 -0
  238. package/node_modules/typescript/lib/lib.es2022.object.d.ts +26 -0
  239. package/node_modules/typescript/lib/lib.es2022.regexp.d.ts +39 -0
  240. package/node_modules/typescript/lib/lib.es2022.string.d.ts +25 -0
  241. package/node_modules/typescript/lib/lib.es2023.array.d.ts +924 -0
  242. package/node_modules/typescript/lib/lib.es2023.collection.d.ts +21 -0
  243. package/node_modules/typescript/lib/lib.es2023.d.ts +22 -0
  244. package/node_modules/typescript/lib/lib.es2023.full.d.ts +24 -0
  245. package/node_modules/typescript/lib/lib.es2023.intl.d.ts +56 -0
  246. package/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +65 -0
  247. package/node_modules/typescript/lib/lib.es2024.collection.d.ts +29 -0
  248. package/node_modules/typescript/lib/lib.es2024.d.ts +26 -0
  249. package/node_modules/typescript/lib/lib.es2024.full.d.ts +24 -0
  250. package/node_modules/typescript/lib/lib.es2024.object.d.ts +29 -0
  251. package/node_modules/typescript/lib/lib.es2024.promise.d.ts +35 -0
  252. package/node_modules/typescript/lib/lib.es2024.regexp.d.ts +25 -0
  253. package/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +68 -0
  254. package/node_modules/typescript/lib/lib.es2024.string.d.ts +29 -0
  255. package/node_modules/typescript/lib/lib.es5.d.ts +4601 -0
  256. package/node_modules/typescript/lib/lib.es6.d.ts +23 -0
  257. package/node_modules/typescript/lib/lib.esnext.array.d.ts +35 -0
  258. package/node_modules/typescript/lib/lib.esnext.collection.d.ts +96 -0
  259. package/node_modules/typescript/lib/lib.esnext.d.ts +29 -0
  260. package/node_modules/typescript/lib/lib.esnext.decorators.d.ts +28 -0
  261. package/node_modules/typescript/lib/lib.esnext.disposable.d.ts +193 -0
  262. package/node_modules/typescript/lib/lib.esnext.error.d.ts +24 -0
  263. package/node_modules/typescript/lib/lib.esnext.float16.d.ts +445 -0
  264. package/node_modules/typescript/lib/lib.esnext.full.d.ts +24 -0
  265. package/node_modules/typescript/lib/lib.esnext.intl.d.ts +21 -0
  266. package/node_modules/typescript/lib/lib.esnext.iterator.d.ts +148 -0
  267. package/node_modules/typescript/lib/lib.esnext.promise.d.ts +34 -0
  268. package/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +25 -0
  269. package/node_modules/typescript/lib/lib.scripthost.d.ts +322 -0
  270. package/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +41 -0
  271. package/node_modules/typescript/lib/lib.webworker.d.ts +13150 -0
  272. package/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +23 -0
  273. package/node_modules/typescript/lib/lib.webworker.iterable.d.ts +340 -0
  274. package/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +2122 -0
  275. package/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +2122 -0
  276. package/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +2122 -0
  277. package/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +2122 -0
  278. package/node_modules/typescript/lib/tsc.js +8 -0
  279. package/node_modules/typescript/lib/tsserver.js +8 -0
  280. package/node_modules/typescript/lib/tsserverlibrary.d.ts +17 -0
  281. package/node_modules/typescript/lib/tsserverlibrary.js +21 -0
  282. package/node_modules/typescript/lib/typesMap.json +497 -0
  283. package/node_modules/typescript/lib/typescript.d.ts +11437 -0
  284. package/node_modules/typescript/lib/typescript.js +200276 -0
  285. package/node_modules/typescript/lib/typingsInstaller.js +8 -0
  286. package/node_modules/typescript/lib/watchGuard.js +53 -0
  287. package/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +2122 -0
  288. package/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +2122 -0
  289. package/node_modules/typescript/package.json +120 -0
  290. package/package.json +12 -9
  291. package/lib/coverage/fs-walk.mjs +0 -64
  292. package/node_modules/@elench/next-analysis/src/api-routes.mjs +0 -81
  293. package/node_modules/@elench/next-analysis/src/api-routes.test.mjs +0 -22
  294. package/node_modules/@elench/next-analysis/src/app-root.mjs +0 -7
  295. package/node_modules/@elench/next-analysis/src/backend-links.mjs +0 -31
  296. package/node_modules/@elench/next-analysis/src/index.mjs +0 -21
  297. package/node_modules/@elench/next-analysis/src/pages.mjs +0 -68
  298. package/node_modules/@elench/next-analysis/src/project.mjs +0 -94
  299. package/node_modules/@elench/next-analysis/src/project.test.mjs +0 -35
  300. package/node_modules/@elench/next-analysis/src/route-tree.mjs +0 -621
  301. package/node_modules/@elench/next-analysis/src/routes.mjs +0 -41
  302. package/node_modules/@elench/next-analysis/src/routes.test.mjs +0 -25
  303. package/node_modules/@elench/next-analysis/src/server-actions.mjs +0 -53
  304. package/node_modules/@elench/next-analysis/src/server-actions.test.mjs +0 -37
  305. package/node_modules/@elench/next-analysis/src/shared.mjs +0 -209
  306. package/node_modules/@elench/next-analysis/src/swc.mjs +0 -388
  307. package/node_modules/@elench/testkit-bridge/src/index.mjs +0 -583
  308. package/node_modules/@elench/testkit-bridge/src/index.test.mjs +0 -409
  309. package/node_modules/@elench/testkit-protocol/src/index.d.ts +0 -231
  310. package/node_modules/@elench/testkit-protocol/src/index.mjs +0 -265
  311. package/node_modules/@elench/testkit-protocol/src/index.test.mjs +0 -242
  312. package/node_modules/@elench/ts-analysis/src/callables.mjs +0 -135
  313. package/node_modules/@elench/ts-analysis/src/callables.test.mjs +0 -55
  314. package/node_modules/@elench/ts-analysis/src/exports.mjs +0 -69
  315. package/node_modules/@elench/ts-analysis/src/exports.test.mjs +0 -50
  316. package/node_modules/@elench/ts-analysis/src/jsx.mjs +0 -69
  317. package/node_modules/@elench/ts-analysis/src/jsx.test.mjs +0 -43
  318. package/node_modules/@elench/ts-analysis/src/project.mjs +0 -100
  319. package/node_modules/@elench/ts-analysis/src/project.test.mjs +0 -54
  320. package/node_modules/@elench/ts-analysis/src/requests.mjs +0 -141
  321. package/node_modules/@elench/ts-analysis/src/requests.test.mjs +0 -35
  322. package/node_modules/@elench/ts-analysis/src/resolution.mjs +0 -53
  323. package/node_modules/@elench/ts-analysis/src/shared.mjs +0 -32
  324. package/node_modules/@elench/ts-analysis/src/syntax.mjs +0 -27
@@ -1,38 +1,49 @@
1
1
  import { describe, expect, it } from "vitest";
2
2
  import {
3
- goService,
4
- nextService,
3
+ databaseServiceEnv,
4
+ defineTestkitFile,
5
+ nextApp,
6
+ nextBuild,
5
7
  nodeToolchain,
8
+ nodeApp,
9
+ postgresDatabase,
10
+ postgresFixture,
6
11
  schemaSql,
7
12
  seedCommand,
8
13
  seedModule,
9
- seededDatabaseTemplate,
10
- tsxService,
14
+ stepsBuild,
15
+ templateDatabase,
16
+ tscBuild,
11
17
  verifyCommand,
12
18
  verifyModule,
13
19
  } from "./index.mjs";
14
20
 
15
21
  describe("setup helpers", () => {
16
- it("emits plain next start commands without an exec prefix", () => {
17
- const config = nextService({ port: 3000 });
18
-
19
- expect(config.local.start).toBe("./node_modules/.bin/next dev -p {port}");
22
+ it("defines file-local metadata plainly", () => {
23
+ expect(defineTestkitFile({ skip: "Auth is stubbed", locks: ["background-workers"] })).toEqual({
24
+ skip: "Auth is stubbed",
25
+ locks: ["background-workers"],
26
+ });
20
27
  });
21
28
 
22
- it("emits plain tsx start commands without an exec prefix", () => {
23
- const config = tsxService({ port: 3000, entry: "src/server.ts" });
29
+ it("builds a Next app preset for dev mode", () => {
30
+ const config = nextApp({ port: 3000 });
24
31
 
25
- expect(config.local.start).toBe("./node_modules/.bin/tsx watch src/server.ts");
32
+ expect(config.local.start).toBe("./node_modules/.bin/next dev -p {port}");
26
33
  });
27
34
 
28
- it("emits plain go start commands without an exec prefix", () => {
29
- expect(goService({ port: 3000 }).local.start).toBe("go run ./cmd/server");
30
- expect(goService({ port: 3000, entrypoint: "./cmd/api" }).local.start).toBe(
31
- "go run ./cmd/api"
32
- );
33
- expect(goService({ port: 3000, command: "./cmd/worker" }).local.start).toBe(
34
- "go run ./cmd/worker"
35
- );
35
+ it("builds a Node app preset with tsc build defaults", () => {
36
+ const config = nodeApp({ port: 3000, entry: "src/server.ts" });
37
+
38
+ expect(config.local.start).toBe("node {prepareDir}/dist/server.js");
39
+ expect(config.runtime.build).toEqual({
40
+ kind: "tsc",
41
+ cwd: ".",
42
+ entry: "src/server.ts",
43
+ tsconfig: "tsconfig.json",
44
+ outDir: "dist",
45
+ inputs: undefined,
46
+ });
36
47
  });
37
48
 
38
49
  it("builds node toolchain profiles with a node kind", () => {
@@ -43,6 +54,40 @@ describe("setup helpers", () => {
43
54
  });
44
55
  });
45
56
 
57
+ it("builds explicit build presets", () => {
58
+ expect(tscBuild({ entry: "src/server.ts", outDir: "build" })).toEqual({
59
+ kind: "tsc",
60
+ cwd: undefined,
61
+ entry: "src/server.ts",
62
+ tsconfig: "tsconfig.json",
63
+ outDir: "build",
64
+ inputs: undefined,
65
+ });
66
+ expect(nextBuild({ cwd: "frontend" })).toEqual({
67
+ kind: "script",
68
+ script: "./node_modules/.bin/next build",
69
+ cwd: "frontend",
70
+ inputs: undefined,
71
+ });
72
+ expect(
73
+ stepsBuild({
74
+ inputs: ["scripts/prepare.mjs"],
75
+ steps: [seedCommand("node scripts/prepare.mjs")],
76
+ })
77
+ ).toEqual({
78
+ kind: "steps",
79
+ inputs: ["scripts/prepare.mjs"],
80
+ steps: [
81
+ {
82
+ kind: "command",
83
+ cmd: "node scripts/prepare.mjs",
84
+ cwd: undefined,
85
+ inputs: undefined,
86
+ },
87
+ ],
88
+ });
89
+ });
90
+
46
91
  it("emits semantic database template steps using the underlying step shapes", () => {
47
92
  expect(schemaSql("db/schema.sql")).toEqual({
48
93
  kind: "sql-file",
@@ -76,67 +121,152 @@ describe("setup helpers", () => {
76
121
  });
77
122
  });
78
123
 
79
- it("builds a seeded database template from schema, seed, and verify intents", () => {
124
+ it("builds declarative template databases from schema, seed, and verify intents", () => {
80
125
  expect(
81
- seededDatabaseTemplate({
126
+ templateDatabase({
82
127
  inputs: ["db/schema.sql", "scripts/seed.ts"],
83
128
  schema: "db/schema.sql",
84
129
  seed: seedCommand("npm run db:seed"),
85
130
  verify: verifyModule("scripts/verify.ts#verifySeed"),
86
131
  })
87
132
  ).toEqual({
88
- inputs: ["db/schema.sql", "scripts/seed.ts"],
89
- migrate: [
90
- {
91
- kind: "sql-file",
92
- path: "db/schema.sql",
93
- cwd: undefined,
94
- inputs: undefined,
95
- },
96
- ],
97
- seed: [
98
- {
99
- kind: "command",
100
- cmd: "npm run db:seed",
101
- cwd: undefined,
102
- inputs: undefined,
103
- },
104
- ],
105
- verify: [
106
- {
107
- kind: "module",
108
- specifier: "scripts/verify.ts#verifySeed",
109
- cwd: undefined,
110
- inputs: undefined,
111
- },
112
- ],
133
+ provider: "local",
134
+ template: {
135
+ inputs: ["db/schema.sql", "scripts/seed.ts"],
136
+ migrate: [
137
+ {
138
+ kind: "sql-file",
139
+ path: "db/schema.sql",
140
+ cwd: undefined,
141
+ inputs: undefined,
142
+ },
143
+ ],
144
+ seed: [
145
+ {
146
+ kind: "command",
147
+ cmd: "npm run db:seed",
148
+ cwd: undefined,
149
+ inputs: undefined,
150
+ },
151
+ ],
152
+ verify: [
153
+ {
154
+ kind: "module",
155
+ specifier: "scripts/verify.ts#verifySeed",
156
+ cwd: undefined,
157
+ inputs: undefined,
158
+ },
159
+ ],
160
+ },
113
161
  });
114
162
  });
115
163
 
116
164
  it("prepends schema before explicit migrate steps and normalizes singletons to arrays", () => {
117
165
  expect(
118
- seededDatabaseTemplate({
166
+ templateDatabase({
119
167
  schema: schemaSql("db/schema.sql", { cwd: "db" }),
120
168
  migrate: seedCommand("echo migrate"),
121
169
  })
122
170
  ).toEqual({
123
- inputs: undefined,
124
- migrate: [
125
- {
126
- kind: "sql-file",
127
- path: "db/schema.sql",
128
- cwd: "db",
129
- inputs: undefined,
130
- },
131
- {
132
- kind: "command",
133
- cmd: "echo migrate",
134
- cwd: undefined,
135
- inputs: undefined,
136
- },
137
- ],
138
- seed: [],
139
- verify: [],
171
+ provider: "local",
172
+ template: {
173
+ inputs: undefined,
174
+ migrate: [
175
+ {
176
+ kind: "sql-file",
177
+ path: "db/schema.sql",
178
+ cwd: "db",
179
+ inputs: undefined,
180
+ },
181
+ {
182
+ kind: "command",
183
+ cmd: "echo migrate",
184
+ cwd: undefined,
185
+ inputs: undefined,
186
+ },
187
+ ],
188
+ seed: [],
189
+ verify: [],
190
+ },
191
+ });
192
+ });
193
+
194
+ it("builds declarative postgres database helpers", () => {
195
+ expect(postgresDatabase({ reset: false })).toEqual({
196
+ provider: "local",
197
+ reset: false,
140
198
  });
199
+ expect(
200
+ templateDatabase({
201
+ reset: true,
202
+ schema: "db/schema.sql",
203
+ seed: seedCommand("npm run db:seed"),
204
+ })
205
+ ).toEqual({
206
+ provider: "local",
207
+ reset: true,
208
+ template: {
209
+ inputs: undefined,
210
+ migrate: [
211
+ {
212
+ kind: "sql-file",
213
+ path: "db/schema.sql",
214
+ cwd: undefined,
215
+ inputs: undefined,
216
+ },
217
+ ],
218
+ seed: [
219
+ {
220
+ kind: "command",
221
+ cmd: "npm run db:seed",
222
+ cwd: undefined,
223
+ inputs: undefined,
224
+ },
225
+ ],
226
+ verify: [],
227
+ },
228
+ });
229
+ });
230
+
231
+ it("builds support database presets and env bindings", () => {
232
+ expect(
233
+ postgresFixture({
234
+ reset: true,
235
+ })
236
+ ).toEqual({
237
+ discovery: {
238
+ roots: [".testkit-fixture"],
239
+ },
240
+ envFiles: undefined,
241
+ local: false,
242
+ database: {
243
+ provider: "local",
244
+ reset: true,
245
+ },
246
+ });
247
+ expect(databaseServiceEnv("ONIX", "catalog")).toEqual({
248
+ ONIX_DATABASE_HOST: "{dbHost:catalog}",
249
+ ONIX_DATABASE_PORT: "{dbPort:catalog}",
250
+ ONIX_DATABASE_NAME: "{dbName:catalog}",
251
+ ONIX_DATABASE_USER: "{dbUser:catalog}",
252
+ ONIX_DATABASE_PASSWORD: "{dbPassword:catalog}",
253
+ ONIX_DATABASE_SSL: "0",
254
+ });
255
+ });
256
+
257
+ it("does not leak preset-only helper fields into node app configs", () => {
258
+ const config = nodeApp({
259
+ port: 3000,
260
+ entry: "src/server.ts",
261
+ buildInputs: ["src", "package.json"],
262
+ env: { API_KEY: "test" },
263
+ readyPath: "/live",
264
+ });
265
+
266
+ expect(config).not.toHaveProperty("entry");
267
+ expect(config).not.toHaveProperty("buildInputs");
268
+ expect(config).not.toHaveProperty("readyPath");
269
+ expect(config.local.env).toEqual({ API_KEY: "test" });
270
+ expect(config.local.readyUrl).toBe("http://127.0.0.1:{port}/live");
141
271
  });
142
272
  });
@@ -0,0 +1,144 @@
1
+ import path from "path";
2
+ import { normalizeConfiguredInputs, normalizeConfiguredSteps, normalizeOptionalString } from "./configured-steps.mjs";
3
+
4
+ export function normalizeBuildConfig(value, label) {
5
+ if (value == null) return null;
6
+ if (!value || typeof value !== "object") {
7
+ throw new Error(`${label} must be an object`);
8
+ }
9
+
10
+ const kind = normalizeOptionalString(value.kind);
11
+ if (kind === "tsc") {
12
+ return {
13
+ kind,
14
+ cwd: normalizeOptionalString(value.cwd),
15
+ entry: normalizeOptionalString(value.entry) || "src/index.ts",
16
+ tsconfig: normalizeOptionalString(value.tsconfig) || "tsconfig.json",
17
+ outDir: normalizeOptionalString(value.outDir) || "dist",
18
+ inputs: normalizeConfiguredInputs(value.inputs, `${label}.inputs`),
19
+ };
20
+ }
21
+
22
+ if (kind === "script") {
23
+ const script = normalizeOptionalString(value.script);
24
+ if (!script) throw new Error(`${label}.script must be a non-empty string`);
25
+ return {
26
+ kind,
27
+ cwd: normalizeOptionalString(value.cwd),
28
+ script,
29
+ inputs: normalizeConfiguredInputs(value.inputs, `${label}.inputs`),
30
+ };
31
+ }
32
+
33
+ if (kind === "steps") {
34
+ return {
35
+ kind,
36
+ inputs: normalizeConfiguredInputs(value.inputs, `${label}.inputs`),
37
+ steps: normalizeConfiguredSteps(value.steps, `${label}.steps`),
38
+ };
39
+ }
40
+
41
+ throw new Error(`${label}.kind must be one of: tsc, script, steps`);
42
+ }
43
+
44
+ export function finalizeBuildConfig(build, transform) {
45
+ if (!build) return null;
46
+ if (build.kind === "tsc") {
47
+ return {
48
+ ...build,
49
+ cwd: build.cwd ? transform(build.cwd) : build.cwd,
50
+ entry: transform(build.entry),
51
+ tsconfig: transform(build.tsconfig),
52
+ outDir: transform(build.outDir),
53
+ inputs: build.inputs.map((input) => transform(input)),
54
+ };
55
+ }
56
+ if (build.kind === "script") {
57
+ return {
58
+ ...build,
59
+ cwd: build.cwd ? transform(build.cwd) : build.cwd,
60
+ script: transform(build.script),
61
+ inputs: build.inputs.map((input) => transform(input)),
62
+ };
63
+ }
64
+ return {
65
+ ...build,
66
+ inputs: build.inputs.map((input) => transform(input)),
67
+ steps: build.steps.map((step) => ({
68
+ ...step,
69
+ ...(typeof step.cmd === "string" ? { cmd: transform(step.cmd) } : {}),
70
+ ...(typeof step.cwd === "string" ? { cwd: transform(step.cwd) } : {}),
71
+ ...(typeof step.path === "string" ? { path: transform(step.path) } : {}),
72
+ ...(typeof step.specifier === "string" ? { specifier: transform(step.specifier) } : {}),
73
+ inputs: (step.inputs || []).map((input) => transform(input)),
74
+ })),
75
+ };
76
+ }
77
+
78
+ export function buildConfigToPrepare(build) {
79
+ if (!build) {
80
+ return {
81
+ inputs: [],
82
+ steps: [],
83
+ };
84
+ }
85
+
86
+ if (build.kind === "steps") {
87
+ return {
88
+ inputs: [...build.inputs],
89
+ steps: [...build.steps],
90
+ };
91
+ }
92
+
93
+ if (build.kind === "script") {
94
+ return {
95
+ inputs: [...build.inputs],
96
+ steps: [
97
+ {
98
+ kind: "command",
99
+ cmd: build.script,
100
+ cwd: build.cwd || undefined,
101
+ inputs: [...build.inputs],
102
+ },
103
+ ],
104
+ };
105
+ }
106
+
107
+ const inputs = build.inputs.length > 0 ? [...build.inputs] : defaultTscInputs(build);
108
+ const cmd = `./node_modules/.bin/tsc -p ${build.tsconfig} --outDir "{prepareDir}/${build.outDir}"`;
109
+ return {
110
+ inputs,
111
+ steps: [
112
+ {
113
+ kind: "command",
114
+ cmd,
115
+ cwd: build.cwd || undefined,
116
+ inputs,
117
+ },
118
+ ],
119
+ };
120
+ }
121
+
122
+ export function compiledEntryFromBuild(build) {
123
+ if (!build || build.kind !== "tsc") return null;
124
+ return path.posix.join(build.outDir, sourceEntryToOutputPath(build.entry));
125
+ }
126
+
127
+ function sourceEntryToOutputPath(entry) {
128
+ const normalized = String(entry).split(path.sep).join("/");
129
+ const withoutExtension = normalized.replace(/\.[cm]?[jt]sx?$/i, ".js");
130
+ if (withoutExtension.startsWith("src/")) {
131
+ return withoutExtension.slice(4);
132
+ }
133
+ return withoutExtension;
134
+ }
135
+
136
+ function defaultTscInputs(build) {
137
+ const inputs = new Set([build.tsconfig, "package.json"]);
138
+ const normalizedEntry = String(build.entry).split(path.sep).join("/");
139
+ const topLevelDir = normalizedEntry.includes("/") ? normalizedEntry.slice(0, normalizedEntry.indexOf("/")) : normalizedEntry;
140
+ if (topLevelDir) {
141
+ inputs.add(topLevelDir);
142
+ }
143
+ return [...inputs];
144
+ }
@@ -0,0 +1,81 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import {
3
+ buildConfigToPrepare,
4
+ compiledEntryFromBuild,
5
+ normalizeBuildConfig,
6
+ } from "./build-config.mjs";
7
+
8
+ describe("shared build config helpers", () => {
9
+ it("normalizes tsc build config and derives prepare steps", () => {
10
+ const build = normalizeBuildConfig(
11
+ {
12
+ kind: "tsc",
13
+ entry: "src/server.ts",
14
+ outDir: "dist",
15
+ },
16
+ "runtime.build"
17
+ );
18
+
19
+ expect(build).toEqual({
20
+ kind: "tsc",
21
+ cwd: null,
22
+ entry: "src/server.ts",
23
+ tsconfig: "tsconfig.json",
24
+ outDir: "dist",
25
+ inputs: [],
26
+ });
27
+ expect(compiledEntryFromBuild(build)).toBe("dist/server.js");
28
+ expect(buildConfigToPrepare(build)).toEqual({
29
+ inputs: ["tsconfig.json", "package.json", "src"],
30
+ steps: [
31
+ {
32
+ kind: "command",
33
+ cmd: './node_modules/.bin/tsc -p tsconfig.json --outDir "{prepareDir}/dist"',
34
+ cwd: undefined,
35
+ inputs: ["tsconfig.json", "package.json", "src"],
36
+ },
37
+ ],
38
+ });
39
+ });
40
+
41
+ it("normalizes script and steps builds", () => {
42
+ expect(
43
+ normalizeBuildConfig(
44
+ {
45
+ kind: "script",
46
+ script: "npm run build",
47
+ cwd: "frontend",
48
+ inputs: ["frontend/package.json"],
49
+ },
50
+ "runtime.build"
51
+ )
52
+ ).toEqual({
53
+ kind: "script",
54
+ script: "npm run build",
55
+ cwd: "frontend",
56
+ inputs: ["frontend/package.json"],
57
+ });
58
+
59
+ expect(
60
+ normalizeBuildConfig(
61
+ {
62
+ kind: "steps",
63
+ inputs: ["scripts/prepare.mjs"],
64
+ steps: [{ kind: "command", cmd: "node scripts/prepare.mjs" }],
65
+ },
66
+ "runtime.build"
67
+ )
68
+ ).toEqual({
69
+ kind: "steps",
70
+ inputs: ["scripts/prepare.mjs"],
71
+ steps: [
72
+ {
73
+ kind: "command",
74
+ cmd: "node scripts/prepare.mjs",
75
+ cwd: null,
76
+ inputs: [],
77
+ },
78
+ ],
79
+ });
80
+ });
81
+ });