@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
@@ -4,7 +4,14 @@ import path from "path";
4
4
  import { build } from "esbuild";
5
5
  import { execa, execaCommand } from "execa";
6
6
  import { fileURLToPath } from "url";
7
- import { resolveServiceCwd } from "../config/index.mjs";
7
+ import {
8
+ collectConfiguredInputs,
9
+ parseModuleSpecifier,
10
+ resolveConfiguredCwd,
11
+ resolveConfiguredPath,
12
+ summarizeConfiguredStep,
13
+ } from "../shared/configured-steps.mjs";
14
+ export { collectConfiguredInputs, parseModuleSpecifier, resolveConfiguredCwd, resolveConfiguredPath } from "../shared/configured-steps.mjs";
8
15
  import {
9
16
  announceResolvedToolchain,
10
17
  applyToolchainEnv,
@@ -72,35 +79,6 @@ export async function runConfiguredSteps({
72
79
  }
73
80
  }
74
81
 
75
- export function collectConfiguredInputs(productDir, { inputs = [], steps = [] } = {}) {
76
- const collected = new Set();
77
- for (const input of inputs) {
78
- collected.add(resolveConfiguredPath(productDir, null, input));
79
- }
80
- for (const step of steps) {
81
- if (step.kind === "sql-file") {
82
- collected.add(resolveConfiguredPath(productDir, step.cwd, step.path));
83
- }
84
- if (step.kind === "module") {
85
- collected.add(
86
- resolveConfiguredPath(productDir, step.cwd, parseModuleSpecifier(step.specifier).modulePath)
87
- );
88
- }
89
- for (const input of step.inputs || []) {
90
- collected.add(resolveConfiguredPath(productDir, step.cwd, input));
91
- }
92
- }
93
- return [...collected].sort();
94
- }
95
-
96
- export function resolveConfiguredCwd(productDir, stepCwd) {
97
- return resolveServiceCwd(productDir, stepCwd || ".");
98
- }
99
-
100
- export function resolveConfiguredPath(productDir, stepCwd, targetPath) {
101
- return path.resolve(resolveConfiguredCwd(productDir, stepCwd), targetPath);
102
- }
103
-
104
82
  async function runConfiguredStep(config, step, env, resolvedToolchain, options = {}) {
105
83
  const runtimeEnv = applyToolchainEnv(env, resolvedToolchain);
106
84
  const cwd = resolveConfiguredCwd(config.productDir, step.cwd);
@@ -253,21 +231,6 @@ function resolvePackageSubpath(specifier) {
253
231
  throw new Error(`Unsupported @elench/testkit import "${specifier}" while loading template step`);
254
232
  }
255
233
 
256
- function parseModuleSpecifier(specifier) {
257
- const [modulePath, exportName] = String(specifier).split("#", 2);
258
- return {
259
- modulePath,
260
- exportName: exportName || "default",
261
- };
262
- }
263
-
264
- function summarizeConfiguredStep(step) {
265
- if (step.kind === "command") return `command: ${String(step.cmd).trim()}`;
266
- if (step.kind === "sql-file") return `sql: ${step.path}`;
267
- if (step.kind === "module") return `module: ${step.specifier}`;
268
- return step.kind;
269
- }
270
-
271
234
  async function awaitCapturedProcess(child, { livePrefix = "", liveWriter = null, logRecord = null } = {}) {
272
235
  const drains = [
273
236
  captureProcessOutput(child.stdout, "stdout", livePrefix, liveWriter, logRecord),
@@ -1,4 +1,5 @@
1
1
  import path from "path";
2
+ import { finalizeConfiguredInputs, finalizeConfiguredSteps } from "../shared/configured-steps.mjs";
2
3
  import { readDatabaseInfo } from "./state-io.mjs";
3
4
 
4
5
  const PORT_STRIDE = 100;
@@ -183,22 +184,11 @@ function finalizeDatabaseTemplate(template, context) {
183
184
  };
184
185
  }
185
186
 
186
- const finalizeStep = (step) => ({
187
- ...step,
188
- ...(typeof step.cmd === "string" ? { cmd: finalizeString(step.cmd, context) } : {}),
189
- ...(typeof step.cwd === "string" ? { cwd: finalizeString(step.cwd, context) } : {}),
190
- ...(typeof step.path === "string" ? { path: finalizeString(step.path, context) } : {}),
191
- ...(typeof step.specifier === "string"
192
- ? { specifier: finalizeString(step.specifier, context) }
193
- : {}),
194
- inputs: (step.inputs || []).map((input) => finalizeString(input, context)),
195
- });
196
-
197
187
  return {
198
- inputs: (template.inputs || []).map((input) => finalizeString(input, context)),
199
- migrate: (template.migrate || []).map(finalizeStep),
200
- seed: (template.seed || []).map(finalizeStep),
201
- verify: (template.verify || []).map(finalizeStep),
188
+ inputs: finalizeConfiguredInputs(template.inputs || [], (value) => finalizeString(value, context)),
189
+ migrate: finalizeConfiguredSteps(template.migrate || [], (value) => finalizeString(value, context)),
190
+ seed: finalizeConfiguredSteps(template.seed || [], (value) => finalizeString(value, context)),
191
+ verify: finalizeConfiguredSteps(template.verify || [], (value) => finalizeString(value, context)),
202
192
  };
203
193
  }
204
194
 
@@ -356,20 +346,9 @@ function finalizeRuntimePrepare(prepare, context) {
356
346
  };
357
347
  }
358
348
 
359
- const finalizeStep = (step) => ({
360
- ...step,
361
- ...(typeof step.cmd === "string" ? { cmd: finalizeString(step.cmd, context) } : {}),
362
- ...(typeof step.cwd === "string" ? { cwd: finalizeString(step.cwd, context) } : {}),
363
- ...(typeof step.path === "string" ? { path: finalizeString(step.path, context) } : {}),
364
- ...(typeof step.specifier === "string"
365
- ? { specifier: finalizeString(step.specifier, context) }
366
- : {}),
367
- inputs: (step.inputs || []).map((input) => finalizeString(input, context)),
368
- });
369
-
370
349
  return {
371
- inputs: (prepare.inputs || []).map((input) => finalizeString(input, context)),
372
- steps: (prepare.steps || []).map(finalizeStep),
350
+ inputs: finalizeConfiguredInputs(prepare.inputs || [], (value) => finalizeString(value, context)),
351
+ steps: finalizeConfiguredSteps(prepare.steps || [], (value) => finalizeString(value, context)),
373
352
  };
374
353
  }
375
354
 
@@ -7,7 +7,7 @@ export interface DatabaseTemplateConfig {
7
7
  verify?: TemplateLifecycleStepConfig[];
8
8
  }
9
9
 
10
- export interface SeededDatabaseTemplateOptions {
10
+ export interface DatabaseTemplateOptions {
11
11
  inputs?: string[];
12
12
  schema?: string | TemplateSqlFileStepConfig;
13
13
  migrate?: TemplateLifecycleStepConfig | TemplateLifecycleStepConfig[];
@@ -40,6 +40,30 @@ export type TemplateLifecycleStepConfig =
40
40
  | TemplateSqlFileStepConfig
41
41
  | TemplateModuleStepConfig;
42
42
 
43
+ export interface TscBuildConfig {
44
+ kind: "tsc";
45
+ cwd?: string;
46
+ entry?: string;
47
+ inputs?: string[];
48
+ outDir?: string;
49
+ tsconfig?: string;
50
+ }
51
+
52
+ export interface ScriptBuildConfig {
53
+ kind: "script";
54
+ cwd?: string;
55
+ inputs?: string[];
56
+ script: string;
57
+ }
58
+
59
+ export interface StepsBuildConfig {
60
+ kind: "steps";
61
+ inputs?: string[];
62
+ steps?: TemplateLifecycleStepConfig[];
63
+ }
64
+
65
+ export type BuildConfig = TscBuildConfig | ScriptBuildConfig | StepsBuildConfig;
66
+
43
67
  export interface LocalDatabaseConfig {
44
68
  provider: "local";
45
69
  binding?: "shared" | "per-runtime";
@@ -66,6 +90,7 @@ export interface SkipConfig {
66
90
  }
67
91
 
68
92
  export interface RuntimeConfig {
93
+ build?: BuildConfig | null;
69
94
  instances?: number;
70
95
  maxConcurrentTasks?: number;
71
96
  prepare?: {
@@ -126,7 +151,6 @@ export interface ServiceConfig {
126
151
  databaseFrom?: string;
127
152
  dependsOn?: string[];
128
153
  discovery?: DiscoveryConfig;
129
- env?: Record<string, string>;
130
154
  envFile?: string;
131
155
  envFiles?: string[];
132
156
  browser?: BrowserServiceConfig;
@@ -144,6 +168,44 @@ export interface ServiceConfig {
144
168
  skip?: SkipConfig;
145
169
  }
146
170
 
171
+ export interface TestkitFileMetadata {
172
+ locks?: string[];
173
+ skip?: string | { reason: string };
174
+ }
175
+
176
+ export interface NodeAppOptions extends Omit<ServiceConfig, "local" | "runtime"> {
177
+ baseUrl?: string;
178
+ build?: BuildConfig | null;
179
+ buildInputs?: string[];
180
+ cwd?: string;
181
+ entry?: string;
182
+ env?: Record<string, string>;
183
+ outDir?: string;
184
+ port: number;
185
+ readyPath?: string;
186
+ readyTimeoutMs?: number;
187
+ readyUrl?: string;
188
+ runtime?: Omit<RuntimeConfig, "build">;
189
+ start?: string;
190
+ toolchain?: string | NodeToolchainConfig;
191
+ tsconfig?: string;
192
+ }
193
+
194
+ export interface NextAppOptions extends Omit<ServiceConfig, "local" | "runtime"> {
195
+ baseUrl?: string;
196
+ build?: BuildConfig | null;
197
+ buildInputs?: string[];
198
+ cwd?: string;
199
+ env?: Record<string, string>;
200
+ mode?: "dev" | "start";
201
+ port: number;
202
+ readyTimeoutMs?: number;
203
+ readyUrl?: string;
204
+ runtime?: Omit<RuntimeConfig, "build">;
205
+ start?: string;
206
+ toolchain?: string | NodeToolchainConfig;
207
+ }
208
+
147
209
  export interface TestkitSetup {
148
210
  discovery?: DiscoveryConfig;
149
211
  execution?: TestkitExecutionConfig;
@@ -166,8 +228,8 @@ export interface TestkitSetup {
166
228
 
167
229
  export declare function defineTestkitSetup<T extends TestkitSetup>(setup: T): T;
168
230
  export declare function defineHttpProfile<T extends HttpSuiteConfig>(profile: T): T;
169
- export declare function service<T extends ServiceConfig>(config: T): T;
170
- export declare function localDatabase(options?: Omit<LocalDatabaseConfig, "provider">): LocalDatabaseConfig;
231
+ export declare function defineTestkitFile<T extends TestkitFileMetadata>(metadata: T): T;
232
+ export declare function postgresDatabase(options?: Omit<LocalDatabaseConfig, "provider">): LocalDatabaseConfig;
171
233
  export declare function commandStep(
172
234
  cmd: string,
173
235
  options?: Omit<TemplateCommandStepConfig, "kind" | "cmd">
@@ -200,24 +262,29 @@ export declare function verifyModule(
200
262
  specifier: string,
201
263
  options?: Omit<TemplateModuleStepConfig, "kind" | "specifier">
202
264
  ): TemplateModuleStepConfig;
203
- export declare function seededDatabaseTemplate(
204
- options?: SeededDatabaseTemplateOptions
205
- ): DatabaseTemplateConfig;
265
+ export declare function templateDatabase(
266
+ options?: DatabaseTemplateOptions & Omit<LocalDatabaseConfig, "provider" | "template">
267
+ ): LocalDatabaseConfig;
268
+ export declare function postgresFixture(
269
+ options?: Omit<LocalDatabaseConfig, "provider"> & {
270
+ discovery?: DiscoveryConfig;
271
+ envFiles?: string[];
272
+ }
273
+ ): ServiceConfig;
274
+ export declare function databaseServiceEnv(
275
+ prefix: string,
276
+ serviceName: string
277
+ ): Record<string, string>;
206
278
  export declare function nodeToolchain(options?: NodeToolchainConfig): NodeToolchainConfig;
207
- export declare function goService(options: ServiceConfig["local"] & {
208
- command?: string;
209
- entrypoint?: string;
210
- envFiles?: string[];
211
- readyPath?: string;
212
- }): ServiceConfig;
213
- export declare function nextService(options: ServiceConfig["local"] & {
214
- envFiles?: string[];
215
- }): ServiceConfig;
216
- export declare function tsxService(options: ServiceConfig["local"] & {
217
- entry?: string;
218
- envFiles?: string[];
219
- readyPath?: string;
220
- }): ServiceConfig;
279
+ export declare function tscBuild(options?: Omit<TscBuildConfig, "kind">): TscBuildConfig;
280
+ export declare function scriptBuild(
281
+ script: string,
282
+ options?: Omit<ScriptBuildConfig, "kind" | "script">
283
+ ): ScriptBuildConfig;
284
+ export declare function stepsBuild(options?: Omit<StepsBuildConfig, "kind">): StepsBuildConfig;
285
+ export declare function nextBuild(options?: Omit<ScriptBuildConfig, "kind" | "script">): ScriptBuildConfig;
286
+ export declare function nodeApp(options: NodeAppOptions): ServiceConfig;
287
+ export declare function nextApp(options: NextAppOptions): ServiceConfig;
221
288
  export declare function clerkSessionProfile(options?: {
222
289
  apiBase?: string;
223
290
  needsAuth?: boolean;
@@ -18,11 +18,11 @@ export function defineHttpProfile(profile) {
18
18
  return profile || {};
19
19
  }
20
20
 
21
- export function service(config) {
22
- return config || {};
21
+ export function defineTestkitFile(metadata) {
22
+ return metadata || {};
23
23
  }
24
24
 
25
- export function localDatabase(options = {}) {
25
+ export function postgresDatabase(options = {}) {
26
26
  return {
27
27
  provider: "local",
28
28
  ...options,
@@ -76,7 +76,7 @@ export function verifyModule(specifier, options = {}) {
76
76
  return moduleStep(specifier, options);
77
77
  }
78
78
 
79
- export function seededDatabaseTemplate(options = {}) {
79
+ function buildDatabaseTemplateConfig(options = {}) {
80
80
  const migrate = normalizeTemplateStepList(options.migrate);
81
81
  const seed = normalizeTemplateStepList(options.seed);
82
82
  const verify = normalizeTemplateStepList(options.verify);
@@ -90,6 +90,52 @@ export function seededDatabaseTemplate(options = {}) {
90
90
  };
91
91
  }
92
92
 
93
+ export function templateDatabase(options = {}) {
94
+ const {
95
+ inputs,
96
+ schema,
97
+ migrate,
98
+ seed,
99
+ verify,
100
+ ...databaseOptions
101
+ } = options;
102
+ return postgresDatabase({
103
+ ...databaseOptions,
104
+ template: buildDatabaseTemplateConfig(options.template || { inputs, schema, migrate, seed, verify }),
105
+ });
106
+ }
107
+
108
+ export function postgresFixture(options = {}) {
109
+ const { discovery, envFiles, ...databaseOptions } = options;
110
+ return {
111
+ discovery: discovery || {
112
+ roots: [".testkit-fixture"],
113
+ },
114
+ envFiles,
115
+ local: false,
116
+ database: postgresDatabase(databaseOptions),
117
+ };
118
+ }
119
+
120
+ export function databaseServiceEnv(prefix, serviceName) {
121
+ const normalizedPrefix = String(prefix || "").trim().replace(/[^A-Za-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
122
+ if (!normalizedPrefix) {
123
+ throw new Error("databaseServiceEnv prefix must be a non-empty string");
124
+ }
125
+ if (!serviceName || !String(serviceName).trim()) {
126
+ throw new Error("databaseServiceEnv serviceName must be a non-empty string");
127
+ }
128
+
129
+ return {
130
+ [`${normalizedPrefix}_DATABASE_HOST`]: `{dbHost:${serviceName}}`,
131
+ [`${normalizedPrefix}_DATABASE_PORT`]: `{dbPort:${serviceName}}`,
132
+ [`${normalizedPrefix}_DATABASE_NAME`]: `{dbName:${serviceName}}`,
133
+ [`${normalizedPrefix}_DATABASE_USER`]: `{dbUser:${serviceName}}`,
134
+ [`${normalizedPrefix}_DATABASE_PASSWORD`]: `{dbPassword:${serviceName}}`,
135
+ [`${normalizedPrefix}_DATABASE_SSL`]: "0",
136
+ };
137
+ }
138
+
93
139
  export function nodeToolchain(options = {}) {
94
140
  return {
95
141
  kind: "node",
@@ -97,61 +143,137 @@ export function nodeToolchain(options = {}) {
97
143
  };
98
144
  }
99
145
 
100
- export function goService(options = {}) {
101
- const cwd = options.cwd || ".";
102
- const port = requiredNumber(options.port, "goService port");
103
- const readyPath = options.readyPath || "/health";
104
- const baseUrl = options.baseUrl || "http://127.0.0.1:{port}";
146
+ export function tscBuild(options = {}) {
147
+ return {
148
+ kind: "tsc",
149
+ cwd: options.cwd,
150
+ entry: options.entry || "src/index.ts",
151
+ tsconfig: options.tsconfig || "tsconfig.json",
152
+ outDir: options.outDir || "dist",
153
+ inputs: Array.isArray(options.inputs) ? [...options.inputs] : undefined,
154
+ };
155
+ }
105
156
 
157
+ export function scriptBuild(script, options = {}) {
106
158
  return {
107
- ...service(options),
108
- local: {
109
- cwd,
110
- start: options.start || defaultGoStartCommand(options),
111
- port,
112
- baseUrl,
113
- readyUrl: options.readyUrl || `${baseUrl}${readyPath}`,
114
- readyTimeoutMs: options.readyTimeoutMs,
115
- env: options.env || {},
116
- },
159
+ kind: "script",
160
+ script,
161
+ cwd: options.cwd,
162
+ inputs: Array.isArray(options.inputs) ? [...options.inputs] : undefined,
163
+ };
164
+ }
165
+
166
+ export function stepsBuild(options = {}) {
167
+ return {
168
+ kind: "steps",
169
+ inputs: Array.isArray(options.inputs) ? [...options.inputs] : undefined,
170
+ steps: Array.isArray(options.steps) ? [...options.steps] : [],
117
171
  };
118
172
  }
119
173
 
120
- export function nextService(options = {}) {
121
- const cwd = options.cwd || ".";
122
- const port = requiredNumber(options.port, "nextService port");
123
- const baseUrl = options.baseUrl || "http://127.0.0.1:{port}";
174
+ export function nextBuild(options = {}) {
175
+ return scriptBuild("./node_modules/.bin/next build", options);
176
+ }
177
+
178
+ export function nodeApp(options = {}) {
179
+ const {
180
+ baseUrl: explicitBaseUrl,
181
+ build: explicitBuild,
182
+ buildInputs,
183
+ cwd = ".",
184
+ entry = "src/index.ts",
185
+ env = {},
186
+ envFiles,
187
+ outDir = "dist",
188
+ port,
189
+ readyPath = "/health",
190
+ readyTimeoutMs,
191
+ readyUrl: explicitReadyUrl,
192
+ runtime,
193
+ start: explicitStart,
194
+ toolchain,
195
+ tsconfig = "tsconfig.json",
196
+ ...serviceConfig
197
+ } = options;
198
+
199
+ const normalizedPort = requiredNumber(port, "nodeApp port");
200
+ const baseUrl = explicitBaseUrl || "http://127.0.0.1:{port}";
201
+ const build = explicitBuild === undefined ? tscBuild({
202
+ cwd,
203
+ entry,
204
+ tsconfig,
205
+ outDir,
206
+ inputs: buildInputs,
207
+ }) : explicitBuild;
208
+ const start = explicitStart || resolveNodeAppStart(build, entry);
124
209
 
125
210
  return {
126
- ...service(options),
211
+ ...serviceConfig,
212
+ envFiles,
213
+ runtime: {
214
+ ...(runtime || {}),
215
+ build,
216
+ toolchain: toolchain ?? runtime?.toolchain,
217
+ },
127
218
  local: {
128
219
  cwd,
129
- start: options.start || "./node_modules/.bin/next dev -p {port}",
130
- port,
220
+ start,
221
+ port: normalizedPort,
131
222
  baseUrl,
132
- readyUrl: options.readyUrl || baseUrl,
133
- readyTimeoutMs: options.readyTimeoutMs,
134
- env: options.env || {},
223
+ readyUrl: explicitReadyUrl || `${baseUrl}${readyPath}`,
224
+ readyTimeoutMs,
225
+ env,
135
226
  },
136
227
  };
137
228
  }
138
229
 
139
- export function tsxService(options = {}) {
140
- const cwd = options.cwd || ".";
141
- const port = requiredNumber(options.port, "tsxService port");
142
- const baseUrl = options.baseUrl || "http://127.0.0.1:{port}";
143
- const entry = options.entry || "src/index.ts";
230
+ export function nextApp(options = {}) {
231
+ const {
232
+ baseUrl: explicitBaseUrl,
233
+ browser,
234
+ build: explicitBuild,
235
+ buildInputs,
236
+ cwd = ".",
237
+ dependsOn,
238
+ env = {},
239
+ envFiles,
240
+ mode = "dev",
241
+ port,
242
+ readyTimeoutMs,
243
+ readyUrl: explicitReadyUrl,
244
+ runtime,
245
+ start: explicitStart,
246
+ toolchain,
247
+ ...serviceConfig
248
+ } = options;
249
+
250
+ const normalizedPort = requiredNumber(port, "nextApp port");
251
+ const baseUrl = explicitBaseUrl || "http://127.0.0.1:{port}";
252
+ const build = mode === "start" ? explicitBuild || nextBuild({ cwd, inputs: buildInputs }) : explicitBuild || null;
253
+ const start =
254
+ explicitStart ||
255
+ (mode === "start"
256
+ ? "./node_modules/.bin/next start --port {port}"
257
+ : "./node_modules/.bin/next dev -p {port}");
144
258
 
145
259
  return {
146
- ...service(options),
260
+ ...serviceConfig,
261
+ envFiles,
262
+ dependsOn: Array.isArray(dependsOn) ? [...dependsOn] : dependsOn,
263
+ browser,
264
+ runtime: {
265
+ ...(runtime || {}),
266
+ build,
267
+ toolchain: toolchain ?? runtime?.toolchain,
268
+ },
147
269
  local: {
148
270
  cwd,
149
- start: options.start || `./node_modules/.bin/tsx watch ${entry}`,
150
- port,
271
+ start,
272
+ port: normalizedPort,
151
273
  baseUrl,
152
- readyUrl: options.readyUrl || `${baseUrl}${options.readyPath || "/health"}`,
153
- readyTimeoutMs: options.readyTimeoutMs,
154
- env: options.env || {},
274
+ readyUrl: explicitReadyUrl || baseUrl,
275
+ readyTimeoutMs,
276
+ env,
155
277
  },
156
278
  };
157
279
  }
@@ -235,16 +357,6 @@ export {
235
357
  runtimeJson,
236
358
  };
237
359
 
238
- function defaultGoStartCommand(options) {
239
- if (options.command) {
240
- return `go run ${options.command}`;
241
- }
242
- if (options.entrypoint) {
243
- return `go run ${options.entrypoint}`;
244
- }
245
- return "go run ./cmd/server";
246
- }
247
-
248
360
  function requiredNumber(value, label) {
249
361
  if (!Number.isInteger(value) || value <= 0) {
250
362
  throw new Error(`${label} must be a positive integer`);
@@ -252,6 +364,14 @@ function requiredNumber(value, label) {
252
364
  return value;
253
365
  }
254
366
 
367
+ function resolveNodeAppStart(build, entry) {
368
+ if (build?.kind === "tsc") {
369
+ const compiled = compiledEntryFromSource(entry || build.entry || "src/index.ts", build.outDir || "dist");
370
+ return `node {prepareDir}/${compiled}`;
371
+ }
372
+ return `./node_modules/.bin/tsx ${entry || "src/index.ts"}`;
373
+ }
374
+
255
375
  function normalizeTemplateStepList(value) {
256
376
  if (value == null) return [];
257
377
  return Array.isArray(value) ? [...value] : [value];
@@ -265,6 +385,13 @@ function normalizeSchemaStep(value) {
265
385
  return value;
266
386
  }
267
387
 
388
+ function compiledEntryFromSource(entry, outDir) {
389
+ const normalized = String(entry || "src/index.ts").replaceAll("\\", "/");
390
+ const compiled = normalized.replace(/\.[cm]?[jt]sx?$/i, ".js");
391
+ const relative = compiled.startsWith("src/") ? compiled.slice(4) : compiled;
392
+ return `${outDir}/${relative}`.replace(/\/+/g, "/");
393
+ }
394
+
268
395
  function envValue(name) {
269
396
  const env = getRuntimeEnv();
270
397
  const value = env?.rawEnv?.[name] || env?.[name];