@geekmidas/cli 10.0.0-alpha.11 → 10.0.0-alpha.111

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 (513) hide show
  1. package/README.md +315 -414
  2. package/bin/adjacent-tsconfig.mjs +46 -8
  3. package/bin/gkm.mjs +11 -3
  4. package/bin/owning-tsconfig-jsx-register.mjs +18 -0
  5. package/bin/owning-tsconfig-jsx.mjs +108 -0
  6. package/dist/EndpointGenerator-BwbYTMtB.cjs +1090 -0
  7. package/dist/EndpointGenerator-BwbYTMtB.cjs.map +1 -0
  8. package/dist/EndpointGenerator-CvLX8bpx.mjs +1031 -0
  9. package/dist/EndpointGenerator-CvLX8bpx.mjs.map +1 -0
  10. package/dist/GoDaddyProvider-CPabc3XW.mjs +388 -0
  11. package/dist/GoDaddyProvider-CPabc3XW.mjs.map +1 -0
  12. package/dist/GoDaddyProvider-DWrDIXzQ.cjs +388 -0
  13. package/dist/GoDaddyProvider-DWrDIXzQ.cjs.map +1 -0
  14. package/dist/{HostingerProvider-BcyFRbqV.mjs → HostingerProvider-BNpS9aRJ.mjs} +29 -25
  15. package/dist/HostingerProvider-BNpS9aRJ.mjs.map +1 -0
  16. package/dist/{HostingerProvider-BOvsgATO.cjs → HostingerProvider-DR1iws1P.cjs} +29 -25
  17. package/dist/HostingerProvider-DR1iws1P.cjs.map +1 -0
  18. package/dist/LegacyStateStore-BdXoAlYY.mjs +124 -0
  19. package/dist/LegacyStateStore-BdXoAlYY.mjs.map +1 -0
  20. package/dist/LegacyStateStore-fsyPGBWu.cjs +124 -0
  21. package/dist/LegacyStateStore-fsyPGBWu.cjs.map +1 -0
  22. package/dist/LocalStateStore-AtviUBky.cjs +178 -0
  23. package/dist/LocalStateStore-AtviUBky.cjs.map +1 -0
  24. package/dist/LocalStateStore-BrAX5yy7.mjs +167 -0
  25. package/dist/LocalStateStore-BrAX5yy7.mjs.map +1 -0
  26. package/dist/OpenApiTsGenerator-BD6ZOQ51.cjs +541 -0
  27. package/dist/OpenApiTsGenerator-BD6ZOQ51.cjs.map +1 -0
  28. package/dist/OpenApiTsGenerator-DXXFXSbO.mjs +536 -0
  29. package/dist/OpenApiTsGenerator-DXXFXSbO.mjs.map +1 -0
  30. package/dist/{Route53Provider-CH9XH7bz.cjs → Route53Provider-Bllus2NR.cjs} +21 -22
  31. package/dist/Route53Provider-Bllus2NR.cjs.map +1 -0
  32. package/dist/{Route53Provider-C0xmer8U.mjs → Route53Provider-QXxjkZO1.mjs} +13 -13
  33. package/dist/Route53Provider-QXxjkZO1.mjs.map +1 -0
  34. package/dist/S3StateStore-Cx7njkBz.mjs +223 -0
  35. package/dist/S3StateStore-Cx7njkBz.mjs.map +1 -0
  36. package/dist/S3StateStore-tn5g80Sx.cjs +222 -0
  37. package/dist/S3StateStore-tn5g80Sx.cjs.map +1 -0
  38. package/dist/SSMStateStore-CAFde-Fq.cjs +204 -0
  39. package/dist/SSMStateStore-CAFde-Fq.cjs.map +1 -0
  40. package/dist/SSMStateStore-sqZ3oDmn.mjs +205 -0
  41. package/dist/SSMStateStore-sqZ3oDmn.mjs.map +1 -0
  42. package/dist/SubscriberGenerator-CeH7wbYt.cjs +571 -0
  43. package/dist/SubscriberGenerator-CeH7wbYt.cjs.map +1 -0
  44. package/dist/SubscriberGenerator-DHnIYwUU.mjs +518 -0
  45. package/dist/SubscriberGenerator-DHnIYwUU.mjs.map +1 -0
  46. package/dist/add-Cs8yT5iH.cjs +719 -0
  47. package/dist/add-Cs8yT5iH.cjs.map +1 -0
  48. package/dist/add-DJE7zqJ4.mjs +717 -0
  49. package/dist/add-DJE7zqJ4.mjs.map +1 -0
  50. package/dist/appPorts-BoXMwolc.mjs +249 -0
  51. package/dist/appPorts-BoXMwolc.mjs.map +1 -0
  52. package/dist/appPorts-IW-OZmRi.cjs +296 -0
  53. package/dist/appPorts-IW-OZmRi.cjs.map +1 -0
  54. package/dist/aws-8QQ8n-t6.mjs +89 -0
  55. package/dist/aws-8QQ8n-t6.mjs.map +1 -0
  56. package/dist/aws-DY9NqQIT.cjs +100 -0
  57. package/dist/aws-DY9NqQIT.cjs.map +1 -0
  58. package/dist/awsStore-Bx5nCFnS.mjs +121 -0
  59. package/dist/awsStore-Bx5nCFnS.mjs.map +1 -0
  60. package/dist/awsStore-u3ehhMoY.cjs +138 -0
  61. package/dist/awsStore-u3ehhMoY.cjs.map +1 -0
  62. package/dist/{backup-provisioner-DXXg6FIL.mjs → backup-provisioner-C8DnCmxK.mjs} +11 -8
  63. package/dist/backup-provisioner-C8DnCmxK.mjs.map +1 -0
  64. package/dist/{backup-provisioner-cE2PuCTb.cjs → backup-provisioner-oDEsPj02.cjs} +22 -20
  65. package/dist/backup-provisioner-oDEsPj02.cjs.map +1 -0
  66. package/dist/backups/runner.cjs +519 -0
  67. package/dist/backups/runner.cjs.map +1 -0
  68. package/dist/backups/runner.d.cts +102 -0
  69. package/dist/backups/runner.d.cts.map +1 -0
  70. package/dist/backups/runner.d.mts +102 -0
  71. package/dist/backups/runner.d.mts.map +1 -0
  72. package/dist/backups/runner.mjs +506 -0
  73. package/dist/backups/runner.mjs.map +1 -0
  74. package/dist/{bundler-S3ek7ea-.mjs → bundler-DrySVbXF.mjs} +36 -32
  75. package/dist/bundler-DrySVbXF.mjs.map +1 -0
  76. package/dist/{bundler-CaTGtiaO.cjs → bundler-NrtItVBp.cjs} +38 -35
  77. package/dist/bundler-NrtItVBp.cjs.map +1 -0
  78. package/dist/cli-Br5ApIgR.mjs +71 -0
  79. package/dist/cli-Br5ApIgR.mjs.map +1 -0
  80. package/dist/cli-CHzpFBh-.cjs +71 -0
  81. package/dist/cli-CHzpFBh-.cjs.map +1 -0
  82. package/dist/compose-ByIbIrzs.cjs +3345 -0
  83. package/dist/compose-ByIbIrzs.cjs.map +1 -0
  84. package/dist/compose-CDC2bCme.mjs +3202 -0
  85. package/dist/compose-CDC2bCme.mjs.map +1 -0
  86. package/dist/config-D48erO2j.d.mts +269 -0
  87. package/dist/config-D48erO2j.d.mts.map +1 -0
  88. package/dist/config-DHDtsQrB.d.cts +269 -0
  89. package/dist/config-DHDtsQrB.d.cts.map +1 -0
  90. package/dist/config.cjs +421 -11
  91. package/dist/config.cjs.map +1 -0
  92. package/dist/config.d.cts +4 -120
  93. package/dist/config.d.mts +4 -120
  94. package/dist/config.mjs +405 -4
  95. package/dist/config.mjs.map +1 -0
  96. package/dist/credentialSchemas-Cf5Pf8VE.mjs +237 -0
  97. package/dist/credentialSchemas-Cf5Pf8VE.mjs.map +1 -0
  98. package/dist/credentialSchemas-D_VUCDUh.cjs +272 -0
  99. package/dist/credentialSchemas-D_VUCDUh.cjs.map +1 -0
  100. package/dist/credentials-B5N5yKk6.mjs +267 -0
  101. package/dist/credentials-B5N5yKk6.mjs.map +1 -0
  102. package/dist/credentials-Zqr3QQYB.cjs +350 -0
  103. package/dist/credentials-Zqr3QQYB.cjs.map +1 -0
  104. package/dist/databases-BeGP5eDh.mjs +495 -0
  105. package/dist/databases-BeGP5eDh.mjs.map +1 -0
  106. package/dist/databases-DGALFDG3.cjs +598 -0
  107. package/dist/databases-DGALFDG3.cjs.map +1 -0
  108. package/dist/define-6poNqm5O.mjs +106 -0
  109. package/dist/define-6poNqm5O.mjs.map +1 -0
  110. package/dist/define-crmMcXFS.cjs +153 -0
  111. package/dist/define-crmMcXFS.cjs.map +1 -0
  112. package/dist/deploy/public.cjs +212 -0
  113. package/dist/deploy/public.cjs.map +1 -0
  114. package/dist/deploy/public.d.cts +653 -0
  115. package/dist/deploy/public.d.cts.map +1 -0
  116. package/dist/deploy/public.d.mts +653 -0
  117. package/dist/deploy/public.d.mts.map +1 -0
  118. package/dist/deploy/public.mjs +145 -0
  119. package/dist/deploy/public.mjs.map +1 -0
  120. package/dist/deploy/sniffer-envkit-patch.cjs +18 -10
  121. package/dist/deploy/sniffer-envkit-patch.cjs.map +1 -1
  122. package/dist/deploy/sniffer-envkit-patch.d.cts +0 -2
  123. package/dist/deploy/sniffer-envkit-patch.d.cts.map +1 -1
  124. package/dist/deploy/sniffer-envkit-patch.d.mts +0 -2
  125. package/dist/deploy/sniffer-envkit-patch.d.mts.map +1 -1
  126. package/dist/deploy/sniffer-envkit-patch.mjs +10 -2
  127. package/dist/deploy/sniffer-envkit-patch.mjs.map +1 -1
  128. package/dist/deploy/sniffer-envparser-worker.cjs +54 -0
  129. package/dist/deploy/sniffer-envparser-worker.cjs.map +1 -0
  130. package/dist/deploy/sniffer-envparser-worker.d.cts +1 -0
  131. package/dist/deploy/sniffer-envparser-worker.d.mts +1 -0
  132. package/dist/deploy/sniffer-envparser-worker.mjs +55 -0
  133. package/dist/deploy/sniffer-envparser-worker.mjs.map +1 -0
  134. package/dist/deploy/sniffer-hooks.cjs +13 -7
  135. package/dist/deploy/sniffer-hooks.cjs.map +1 -1
  136. package/dist/deploy/sniffer-hooks.d.cts +1 -2
  137. package/dist/deploy/sniffer-hooks.d.cts.map +1 -1
  138. package/dist/deploy/sniffer-hooks.d.mts +1 -2
  139. package/dist/deploy/sniffer-hooks.d.mts.map +1 -1
  140. package/dist/deploy/sniffer-hooks.mjs +10 -3
  141. package/dist/deploy/sniffer-hooks.mjs.map +1 -1
  142. package/dist/deploy/sniffer-loader.cjs +16 -7
  143. package/dist/deploy/sniffer-loader.cjs.map +1 -1
  144. package/dist/deploy/sniffer-loader.d.cts +1 -1
  145. package/dist/deploy/sniffer-loader.d.mts +1 -1
  146. package/dist/deploy/sniffer-loader.mjs +14 -3
  147. package/dist/deploy/sniffer-loader.mjs.map +1 -1
  148. package/dist/deploy/sniffer-routes-worker.cjs +11 -11
  149. package/dist/deploy/sniffer-routes-worker.cjs.map +1 -1
  150. package/dist/deploy/sniffer-routes-worker.d.cts +1 -1
  151. package/dist/deploy/sniffer-routes-worker.d.mts +1 -1
  152. package/dist/deploy/sniffer-routes-worker.mjs +4 -4
  153. package/dist/deploy/sniffer-routes-worker.mjs.map +1 -1
  154. package/dist/deploy/sniffer-worker.cjs +15 -6
  155. package/dist/deploy/sniffer-worker.cjs.map +1 -1
  156. package/dist/deploy/sniffer-worker.d.cts +1 -3
  157. package/dist/deploy/sniffer-worker.d.cts.map +1 -1
  158. package/dist/deploy/sniffer-worker.d.mts +1 -3
  159. package/dist/deploy/sniffer-worker.d.mts.map +1 -1
  160. package/dist/deploy/sniffer-worker.mjs +15 -4
  161. package/dist/deploy/sniffer-worker.mjs.map +1 -1
  162. package/dist/deploy-DLq9-m6H.mjs +2317 -0
  163. package/dist/deploy-DLq9-m6H.mjs.map +1 -0
  164. package/dist/deploy-Dl_NavYE.cjs +2390 -0
  165. package/dist/deploy-Dl_NavYE.cjs.map +1 -0
  166. package/dist/derive-B4vDpzgP.mjs +150 -0
  167. package/dist/derive-B4vDpzgP.mjs.map +1 -0
  168. package/dist/derive-DAbo49sm.cjs +161 -0
  169. package/dist/derive-DAbo49sm.cjs.map +1 -0
  170. package/dist/discover-Bsr7HjqJ.cjs +616 -0
  171. package/dist/discover-Bsr7HjqJ.cjs.map +1 -0
  172. package/dist/discover-Ca8U75dl.mjs +537 -0
  173. package/dist/discover-Ca8U75dl.mjs.map +1 -0
  174. package/dist/discover-CvTtV5ZD.d.cts +108 -0
  175. package/dist/discover-CvTtV5ZD.d.cts.map +1 -0
  176. package/dist/discover-W2kab9Lc.d.mts +108 -0
  177. package/dist/discover-W2kab9Lc.d.mts.map +1 -0
  178. package/dist/dns-C2TGXUF4.cjs +1057 -0
  179. package/dist/dns-C2TGXUF4.cjs.map +1 -0
  180. package/dist/dns-pzftumxg.mjs +926 -0
  181. package/dist/dns-pzftumxg.mjs.map +1 -0
  182. package/dist/dokploy-B7-OwY2s.mjs +38 -0
  183. package/dist/dokploy-B7-OwY2s.mjs.map +1 -0
  184. package/dist/dokploy-OqBh8G4g.cjs +38 -0
  185. package/dist/dokploy-OqBh8G4g.cjs.map +1 -0
  186. package/dist/drivers-D11JHxrD.mjs +177 -0
  187. package/dist/drivers-D11JHxrD.mjs.map +1 -0
  188. package/dist/drivers-GKaA6ITM.cjs +200 -0
  189. package/dist/drivers-GKaA6ITM.cjs.map +1 -0
  190. package/dist/eas-6ezdJtry.mjs +316 -0
  191. package/dist/eas-6ezdJtry.mjs.map +1 -0
  192. package/dist/eas-BkLA60P2.cjs +319 -0
  193. package/dist/eas-BkLA60P2.cjs.map +1 -0
  194. package/dist/{emit-CIlvnDvV.mjs → emit-C1e8qD08.mjs} +13 -26
  195. package/dist/emit-C1e8qD08.mjs.map +1 -0
  196. package/dist/{emit-CUD1BWls.cjs → emit-Dmc1nvdS.cjs} +31 -57
  197. package/dist/emit-Dmc1nvdS.cjs.map +1 -0
  198. package/dist/encryption-DJv_jEXi.mjs +89 -0
  199. package/dist/encryption-DJv_jEXi.mjs.map +1 -0
  200. package/dist/encryption-DoVnVU82.cjs +90 -0
  201. package/dist/encryption-DoVnVU82.cjs.map +1 -0
  202. package/dist/engine-CJhQb50j.cjs +3196 -0
  203. package/dist/engine-CJhQb50j.cjs.map +1 -0
  204. package/dist/engine-Db71-OZL.mjs +3083 -0
  205. package/dist/engine-Db71-OZL.mjs.map +1 -0
  206. package/dist/errors-D8Gwp5kU.mjs +23 -0
  207. package/dist/errors-D8Gwp5kU.mjs.map +1 -0
  208. package/dist/errors-DMC4Umsb.cjs +34 -0
  209. package/dist/errors-DMC4Umsb.cjs.map +1 -0
  210. package/dist/github-D2eABlxM.mjs +829 -0
  211. package/dist/github-D2eABlxM.mjs.map +1 -0
  212. package/dist/github-DDOHjdS9.cjs +829 -0
  213. package/dist/github-DDOHjdS9.cjs.map +1 -0
  214. package/dist/googlePlay-DNgybe5t.cjs +931 -0
  215. package/dist/googlePlay-DNgybe5t.cjs.map +1 -0
  216. package/dist/googlePlay-DY9vZQ1p.mjs +931 -0
  217. package/dist/googlePlay-DY9vZQ1p.mjs.map +1 -0
  218. package/dist/identity-CBXr4wNi.mjs +129 -0
  219. package/dist/identity-CBXr4wNi.mjs.map +1 -0
  220. package/dist/identity-CbLfgQNT.cjs +182 -0
  221. package/dist/identity-CbLfgQNT.cjs.map +1 -0
  222. package/dist/{index-Ayxg_DQY.d.mts → index-8OfpOtSI.d.cts} +39 -24
  223. package/dist/index-8OfpOtSI.d.cts.map +1 -0
  224. package/dist/{index-CR5urhWX.d.cts → index-Dpji6Bxq.d.mts} +39 -24
  225. package/dist/index-Dpji6Bxq.d.mts.map +1 -0
  226. package/dist/index.cjs +13571 -12366
  227. package/dist/index.cjs.map +1 -1
  228. package/dist/index.d.cts +1 -1
  229. package/dist/index.d.mts +1 -1
  230. package/dist/index.mjs +14106 -12914
  231. package/dist/index.mjs.map +1 -1
  232. package/dist/local-BwC2v2Y8.mjs +224 -0
  233. package/dist/local-BwC2v2Y8.mjs.map +1 -0
  234. package/dist/local-DNhnkugT.cjs +241 -0
  235. package/dist/local-DNhnkugT.cjs.map +1 -0
  236. package/dist/migrate-B9GswIAr.mjs +266 -0
  237. package/dist/migrate-B9GswIAr.mjs.map +1 -0
  238. package/dist/migrate-CQUGbptv.mjs +181 -0
  239. package/dist/migrate-CQUGbptv.mjs.map +1 -0
  240. package/dist/migrate-GLBZlrlJ.cjs +181 -0
  241. package/dist/migrate-GLBZlrlJ.cjs.map +1 -0
  242. package/dist/migrate-bDQzFvBN.cjs +271 -0
  243. package/dist/migrate-bDQzFvBN.cjs.map +1 -0
  244. package/dist/openapi.cjs +214 -10
  245. package/dist/openapi.cjs.map +1 -0
  246. package/dist/openapi.d.cts +38 -17
  247. package/dist/openapi.d.cts.map +1 -1
  248. package/dist/openapi.d.mts +38 -17
  249. package/dist/openapi.d.mts.map +1 -1
  250. package/dist/openapi.mjs +208 -5
  251. package/dist/openapi.mjs.map +1 -0
  252. package/dist/projectBucket-BBbQ1lHF.cjs +263 -0
  253. package/dist/projectBucket-BBbQ1lHF.cjs.map +1 -0
  254. package/dist/projectBucket-C_DN4WzF.mjs +222 -0
  255. package/dist/projectBucket-C_DN4WzF.mjs.map +1 -0
  256. package/dist/provider-BqpjG9QM.cjs +57 -0
  257. package/dist/provider-BqpjG9QM.cjs.map +1 -0
  258. package/dist/provider-CEOKk8NS.mjs +46 -0
  259. package/dist/provider-CEOKk8NS.mjs.map +1 -0
  260. package/dist/publish-B-EIjfQ0.mjs +123 -0
  261. package/dist/publish-B-EIjfQ0.mjs.map +1 -0
  262. package/dist/publish-CPgSbtcs.cjs +124 -0
  263. package/dist/publish-CPgSbtcs.cjs.map +1 -0
  264. package/dist/ready-BMFjxBYA.cjs +404 -0
  265. package/dist/ready-BMFjxBYA.cjs.map +1 -0
  266. package/dist/ready-CIt5SOtg.mjs +375 -0
  267. package/dist/ready-CIt5SOtg.mjs.map +1 -0
  268. package/dist/reconcile/public.cjs +3 -5
  269. package/dist/reconcile/public.d.cts +11 -87
  270. package/dist/reconcile/public.d.cts.map +1 -1
  271. package/dist/reconcile/public.d.mts +11 -87
  272. package/dist/reconcile/public.d.mts.map +1 -1
  273. package/dist/reconcile/public.mjs +3 -4
  274. package/dist/{reconcile-C13ERt1U.mjs → reconcile--I7V4Klj.mjs} +4 -7
  275. package/dist/reconcile--I7V4Klj.mjs.map +1 -0
  276. package/dist/{reconcile-CYMhFSYy.cjs → reconcile-CuCQBa5-.cjs} +5 -8
  277. package/dist/reconcile-CuCQBa5-.cjs.map +1 -0
  278. package/dist/resolve-CxDqDmCD.mjs +263 -0
  279. package/dist/resolve-CxDqDmCD.mjs.map +1 -0
  280. package/dist/resolve-wG49Woex.cjs +316 -0
  281. package/dist/resolve-wG49Woex.cjs.map +1 -0
  282. package/dist/rollback-BQgEdr_p.mjs +136 -0
  283. package/dist/rollback-BQgEdr_p.mjs.map +1 -0
  284. package/dist/rollback-Cw-Z0mWn.cjs +165 -0
  285. package/dist/rollback-Cw-Z0mWn.cjs.map +1 -0
  286. package/dist/rolldown-runtime-BhDjJH2R.mjs +15 -0
  287. package/dist/{chunk-CUT6urMc.cjs → rolldown-runtime-C0BPl7ul.cjs} +23 -10
  288. package/dist/run-BJLIerMM.mjs +133 -0
  289. package/dist/run-BJLIerMM.mjs.map +1 -0
  290. package/dist/run-fVZ-rLnc.cjs +174 -0
  291. package/dist/run-fVZ-rLnc.cjs.map +1 -0
  292. package/dist/runtime-ACdfK59n.d.cts +82 -0
  293. package/dist/runtime-ACdfK59n.d.cts.map +1 -0
  294. package/dist/runtime-YyQuekxi.d.mts +82 -0
  295. package/dist/runtime-YyQuekxi.d.mts.map +1 -0
  296. package/dist/s3-CrPoA89T.cjs +215 -0
  297. package/dist/s3-CrPoA89T.cjs.map +1 -0
  298. package/dist/s3-DQXZdmCM.mjs +215 -0
  299. package/dist/s3-DQXZdmCM.mjs.map +1 -0
  300. package/dist/sandbox/config-worker.cjs +43 -0
  301. package/dist/sandbox/config-worker.cjs.map +1 -0
  302. package/dist/sandbox/config-worker.d.cts +1 -0
  303. package/dist/sandbox/config-worker.d.mts +1 -0
  304. package/dist/sandbox/config-worker.mjs +44 -0
  305. package/dist/sandbox/config-worker.mjs.map +1 -0
  306. package/dist/sandbox/credentials-worker.cjs +54 -0
  307. package/dist/sandbox/credentials-worker.cjs.map +1 -0
  308. package/dist/sandbox/credentials-worker.d.cts +1 -0
  309. package/dist/sandbox/credentials-worker.d.mts +1 -0
  310. package/dist/sandbox/credentials-worker.mjs +55 -0
  311. package/dist/sandbox/credentials-worker.mjs.map +1 -0
  312. package/dist/sandbox/discover-worker.cjs +47 -0
  313. package/dist/sandbox/discover-worker.cjs.map +1 -0
  314. package/dist/sandbox/discover-worker.d.cts +1 -0
  315. package/dist/sandbox/discover-worker.d.mts +1 -0
  316. package/dist/sandbox/discover-worker.mjs +48 -0
  317. package/dist/sandbox/discover-worker.mjs.map +1 -0
  318. package/dist/sandbox/migrate-worker.cjs +75 -0
  319. package/dist/sandbox/migrate-worker.cjs.map +1 -0
  320. package/dist/sandbox/migrate-worker.d.cts +1 -0
  321. package/dist/sandbox/migrate-worker.d.mts +1 -0
  322. package/dist/sandbox/migrate-worker.mjs +76 -0
  323. package/dist/sandbox/migrate-worker.mjs.map +1 -0
  324. package/dist/sandbox-C4g1eG31.d.mts +104 -0
  325. package/dist/sandbox-C4g1eG31.d.mts.map +1 -0
  326. package/dist/sandbox-CHv3OYXg.cjs +165 -0
  327. package/dist/sandbox-CHv3OYXg.cjs.map +1 -0
  328. package/dist/sandbox-CbVB7uOD.mjs +118 -0
  329. package/dist/sandbox-CbVB7uOD.mjs.map +1 -0
  330. package/dist/sandbox-CdKgQ3XU.d.cts +104 -0
  331. package/dist/sandbox-CdKgQ3XU.d.cts.map +1 -0
  332. package/dist/{workspace-C-a3G_U0.cjs → schemas-BCwKKA42.mjs} +958 -1868
  333. package/dist/schemas-BCwKKA42.mjs.map +1 -0
  334. package/dist/{workspace-DaEX7FEg.mjs → schemas-BQ_v0lEX.cjs} +1048 -1678
  335. package/dist/schemas-BQ_v0lEX.cjs.map +1 -0
  336. package/dist/secretsManager-CQORubp9.mjs +97 -0
  337. package/dist/secretsManager-CQORubp9.mjs.map +1 -0
  338. package/dist/secretsManager-RAGcEDX1.cjs +108 -0
  339. package/dist/secretsManager-RAGcEDX1.cjs.map +1 -0
  340. package/dist/seeds-CIk0l4SC.mjs +8197 -0
  341. package/dist/seeds-CIk0l4SC.mjs.map +1 -0
  342. package/dist/seeds-Dk8YkLkM.cjs +9176 -0
  343. package/dist/seeds-Dk8YkLkM.cjs.map +1 -0
  344. package/dist/sniffer-2aK7cB2u.cjs +1998 -0
  345. package/dist/sniffer-2aK7cB2u.cjs.map +1 -0
  346. package/dist/sniffer-CABMO-Bh.mjs +1825 -0
  347. package/dist/sniffer-CABMO-Bh.mjs.map +1 -0
  348. package/dist/sst-B-Uz4cvm.cjs +464 -0
  349. package/dist/sst-B-Uz4cvm.cjs.map +1 -0
  350. package/dist/sst-C1pxbFEd.mjs +441 -0
  351. package/dist/sst-C1pxbFEd.mjs.map +1 -0
  352. package/dist/stage-DjxR_7C0.mjs +302 -0
  353. package/dist/stage-DjxR_7C0.mjs.map +1 -0
  354. package/dist/stage-DrCS0vKD.cjs +313 -0
  355. package/dist/stage-DrCS0vKD.cjs.map +1 -0
  356. package/dist/stages-DJrOYLZ-.mjs +176 -0
  357. package/dist/stages-DJrOYLZ-.mjs.map +1 -0
  358. package/dist/stages-_3RVNG83.cjs +176 -0
  359. package/dist/stages-_3RVNG83.cjs.map +1 -0
  360. package/dist/target/public.cjs +15 -0
  361. package/dist/target/public.d.cts +28 -0
  362. package/dist/target/public.d.cts.map +1 -0
  363. package/dist/target/public.d.mts +28 -0
  364. package/dist/target/public.d.mts.map +1 -0
  365. package/dist/target/public.mjs +4 -0
  366. package/dist/terminal-D_NRPW4W.cjs +85 -0
  367. package/dist/terminal-D_NRPW4W.cjs.map +1 -0
  368. package/dist/terminal-mXM-Lqc6.mjs +85 -0
  369. package/dist/terminal-mXM-Lqc6.mjs.map +1 -0
  370. package/dist/types-B6UXlEkf.d.cts +7650 -0
  371. package/dist/types-B6UXlEkf.d.cts.map +1 -0
  372. package/dist/types-HqVPddRK.d.mts +7649 -0
  373. package/dist/types-HqVPddRK.d.mts.map +1 -0
  374. package/dist/utils-D2Nk1Nv2.cjs +205 -0
  375. package/dist/utils-D2Nk1Nv2.cjs.map +1 -0
  376. package/dist/utils-D_fxUqvU.mjs +156 -0
  377. package/dist/utils-D_fxUqvU.mjs.map +1 -0
  378. package/dist/vitest.cjs +65 -0
  379. package/dist/vitest.cjs.map +1 -0
  380. package/dist/vitest.d.cts +29 -0
  381. package/dist/vitest.d.cts.map +1 -0
  382. package/dist/vitest.d.mts +29 -0
  383. package/dist/vitest.d.mts.map +1 -0
  384. package/dist/vitest.mjs +65 -0
  385. package/dist/vitest.mjs.map +1 -0
  386. package/dist/workerRuntime-BXfhbe13.cjs +108 -0
  387. package/dist/workerRuntime-BXfhbe13.cjs.map +1 -0
  388. package/dist/workerRuntime-CsOyBRx2.mjs +79 -0
  389. package/dist/workerRuntime-CsOyBRx2.mjs.map +1 -0
  390. package/dist/workspace/index.cjs +8 -4
  391. package/dist/workspace/index.d.cts +3 -3
  392. package/dist/workspace/index.d.mts +3 -3
  393. package/dist/workspace/index.mjs +2 -3
  394. package/dist/workspace-BwqQnool.cjs +2806 -0
  395. package/dist/workspace-BwqQnool.cjs.map +1 -0
  396. package/dist/workspace-D1QbNd55.mjs +2394 -0
  397. package/dist/workspace-D1QbNd55.mjs.map +1 -0
  398. package/package.json +54 -22
  399. package/dist/CachedStateProvider-BEBl2wQT.cjs +0 -60
  400. package/dist/CachedStateProvider-BEBl2wQT.cjs.map +0 -1
  401. package/dist/CachedStateProvider-C-8wtlto.mjs +0 -3
  402. package/dist/CachedStateProvider-Co4n5Wvs.mjs +0 -54
  403. package/dist/CachedStateProvider-Co4n5Wvs.mjs.map +0 -1
  404. package/dist/CachedStateProvider-DqhGpzsm.cjs +0 -3
  405. package/dist/HostingerProvider-BOvsgATO.cjs.map +0 -1
  406. package/dist/HostingerProvider-BcyFRbqV.mjs.map +0 -1
  407. package/dist/LocalStateProvider-Bq-0C0sg.mjs +0 -42
  408. package/dist/LocalStateProvider-Bq-0C0sg.mjs.map +0 -1
  409. package/dist/LocalStateProvider-yjXZXZDM.cjs +0 -43
  410. package/dist/LocalStateProvider-yjXZXZDM.cjs.map +0 -1
  411. package/dist/Route53Provider-C0xmer8U.mjs.map +0 -1
  412. package/dist/Route53Provider-CH9XH7bz.cjs.map +0 -1
  413. package/dist/SSMStateProvider-CXtNgPfy.cjs +0 -66
  414. package/dist/SSMStateProvider-CXtNgPfy.cjs.map +0 -1
  415. package/dist/SSMStateProvider-DOZifZfE.mjs +0 -66
  416. package/dist/SSMStateProvider-DOZifZfE.mjs.map +0 -1
  417. package/dist/backup-provisioner-DXXg6FIL.mjs.map +0 -1
  418. package/dist/backup-provisioner-cE2PuCTb.cjs.map +0 -1
  419. package/dist/bundler-CaTGtiaO.cjs.map +0 -1
  420. package/dist/bundler-S3ek7ea-.mjs.map +0 -1
  421. package/dist/chunk-Duj1WY3L.mjs +0 -7
  422. package/dist/config-B0L2tvvC.mjs +0 -402
  423. package/dist/config-B0L2tvvC.mjs.map +0 -1
  424. package/dist/config-HhDpJmLO.cjs +0 -462
  425. package/dist/config-HhDpJmLO.cjs.map +0 -1
  426. package/dist/config.d.cts.map +0 -1
  427. package/dist/config.d.mts.map +0 -1
  428. package/dist/credentials-B2Pyh3bJ.cjs +0 -2681
  429. package/dist/credentials-B2Pyh3bJ.cjs.map +0 -1
  430. package/dist/credentials-B5zRHdAl.mjs +0 -141
  431. package/dist/credentials-B5zRHdAl.mjs.map +0 -1
  432. package/dist/credentials-BapzjyV5.cjs +0 -195
  433. package/dist/credentials-BapzjyV5.cjs.map +0 -1
  434. package/dist/credentials-CZrys9C5.mjs +0 -2549
  435. package/dist/credentials-CZrys9C5.mjs.map +0 -1
  436. package/dist/discover-CAlFgYec.mjs +0 -229
  437. package/dist/discover-CAlFgYec.mjs.map +0 -1
  438. package/dist/discover-DTmFeloL.cjs +0 -271
  439. package/dist/discover-DTmFeloL.cjs.map +0 -1
  440. package/dist/dokploy-api-5cK2InBm.cjs +0 -3
  441. package/dist/dokploy-api-D2Ny4Jrc.mjs +0 -3
  442. package/dist/dokploy-api-pdaBryoY.mjs +0 -706
  443. package/dist/dokploy-api-pdaBryoY.mjs.map +0 -1
  444. package/dist/dokploy-api-zqKe9lHH.cjs +0 -718
  445. package/dist/dokploy-api-zqKe9lHH.cjs.map +0 -1
  446. package/dist/emit-CIlvnDvV.mjs.map +0 -1
  447. package/dist/emit-CUD1BWls.cjs.map +0 -1
  448. package/dist/encryption-D2pL3tHH.cjs +0 -54
  449. package/dist/encryption-D2pL3tHH.cjs.map +0 -1
  450. package/dist/encryption-YDsXXi6w.mjs +0 -3
  451. package/dist/encryption-_4zwjOAR.mjs +0 -42
  452. package/dist/encryption-_4zwjOAR.mjs.map +0 -1
  453. package/dist/encryption-sQ2Oxx0d.cjs +0 -4
  454. package/dist/fullstack-secrets-D6MyHhQP.cjs +0 -111
  455. package/dist/fullstack-secrets-D6MyHhQP.cjs.map +0 -1
  456. package/dist/fullstack-secrets-METaRLS1.mjs +0 -87
  457. package/dist/fullstack-secrets-METaRLS1.mjs.map +0 -1
  458. package/dist/generator-CNzBw7g5.cjs +0 -289
  459. package/dist/generator-CNzBw7g5.cjs.map +0 -1
  460. package/dist/generator-VE2JrFlY.mjs +0 -253
  461. package/dist/generator-VE2JrFlY.mjs.map +0 -1
  462. package/dist/github-BrvaPkFf.cjs +0 -197
  463. package/dist/github-BrvaPkFf.cjs.map +0 -1
  464. package/dist/github-CrpsXSfV.mjs +0 -196
  465. package/dist/github-CrpsXSfV.mjs.map +0 -1
  466. package/dist/index-Ayxg_DQY.d.mts.map +0 -1
  467. package/dist/index-CR5urhWX.d.cts.map +0 -1
  468. package/dist/keystore-C9rint2E.cjs +0 -101
  469. package/dist/keystore-C9rint2E.cjs.map +0 -1
  470. package/dist/keystore-TxeYM7an.mjs +0 -83
  471. package/dist/keystore-TxeYM7an.mjs.map +0 -1
  472. package/dist/openapi-DaKlTKxz.cjs +0 -2075
  473. package/dist/openapi-DaKlTKxz.cjs.map +0 -1
  474. package/dist/openapi-react-query-BKH334Ug.cjs +0 -173
  475. package/dist/openapi-react-query-BKH334Ug.cjs.map +0 -1
  476. package/dist/openapi-react-query-DoR5CmzQ.mjs +0 -167
  477. package/dist/openapi-react-query-DoR5CmzQ.mjs.map +0 -1
  478. package/dist/openapi-react-query.cjs +0 -4
  479. package/dist/openapi-react-query.d.cts +0 -11
  480. package/dist/openapi-react-query.d.cts.map +0 -1
  481. package/dist/openapi-react-query.d.mts +0 -11
  482. package/dist/openapi-react-query.d.mts.map +0 -1
  483. package/dist/openapi-react-query.mjs +0 -4
  484. package/dist/openapi-y1d7Kalt.mjs +0 -2021
  485. package/dist/openapi-y1d7Kalt.mjs.map +0 -1
  486. package/dist/reconcile-C13ERt1U.mjs.map +0 -1
  487. package/dist/reconcile-CYMhFSYy.cjs.map +0 -1
  488. package/dist/setup-BWgMs4gg.mjs +0 -12
  489. package/dist/setup-DOv92pIu.cjs +0 -473
  490. package/dist/setup-DOv92pIu.cjs.map +0 -1
  491. package/dist/setup-DQo_h_yK.mjs +0 -443
  492. package/dist/setup-DQo_h_yK.mjs.map +0 -1
  493. package/dist/setup-lCx_DcUo.cjs +0 -12
  494. package/dist/storage-B020InPW.mjs +0 -222
  495. package/dist/storage-B020InPW.mjs.map +0 -1
  496. package/dist/storage-CSNplaJn.cjs +0 -282
  497. package/dist/storage-CSNplaJn.cjs.map +0 -1
  498. package/dist/storage-DGBzMLZa.mjs +0 -4
  499. package/dist/storage-DlVol_oj.cjs +0 -8
  500. package/dist/sync-0ILCb-1S.cjs +0 -93
  501. package/dist/sync-0ILCb-1S.cjs.map +0 -1
  502. package/dist/sync-CzHXiR9c.mjs +0 -76
  503. package/dist/sync-CzHXiR9c.mjs.map +0 -1
  504. package/dist/sync-DYENfOt4.cjs +0 -4
  505. package/dist/sync-HAau6h_R.mjs +0 -3
  506. package/dist/types-CL7jPFM2.d.mts +0 -2220
  507. package/dist/types-CL7jPFM2.d.mts.map +0 -1
  508. package/dist/types-Y3fKQSAK.d.cts +0 -2220
  509. package/dist/types-Y3fKQSAK.d.cts.map +0 -1
  510. package/dist/workspace-C-a3G_U0.cjs.map +0 -1
  511. package/dist/workspace-DQxxs7Jk.cjs +0 -10
  512. package/dist/workspace-DaEX7FEg.mjs.map +0 -1
  513. package/dist/workspace-DbI580qS.mjs +0 -9
@@ -0,0 +1,616 @@
1
+ const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
2
+ const require_errors = require("./errors-DMC4Umsb.cjs");
3
+ const require_schemas = require("./schemas-BQ_v0lEX.cjs");
4
+ const require_sandbox = require("./sandbox-CHv3OYXg.cjs");
5
+ const require_workerRuntime = require("./workerRuntime-BXfhbe13.cjs");
6
+ let node_path = require("node:path");
7
+ let node_fs = require("node:fs");
8
+ let _geekmidas_manifest = require("@geekmidas/manifest");
9
+ let node_module = require("node:module");
10
+ let node_url = require("node:url");
11
+ let node_async_hooks = require("node:async_hooks");
12
+ let node_util = require("node:util");
13
+ let _geekmidas_constructs_crons = require("@geekmidas/constructs/crons");
14
+ let _geekmidas_constructs_queue = require("@geekmidas/constructs/queue");
15
+ let _geekmidas_constructs_subscribers = require("@geekmidas/constructs/subscribers");
16
+ let fast_glob = require("fast-glob");
17
+ fast_glob = require_rolldown_runtime.__toESM(fast_glob, 1);
18
+ let lodash_kebabcase = require("lodash.kebabcase");
19
+ lodash_kebabcase = require_rolldown_runtime.__toESM(lodash_kebabcase, 1);
20
+ //#region src/output.ts
21
+ /**
22
+ * Where the CLI's progress lines go.
23
+ *
24
+ * Commands write their progress through `output` rather than `console`. Run
25
+ * from the terminal that is the same thing. Run inside `deploy()`, each line
26
+ * goes to the run that wrote it instead — as an event its caller can iterate,
27
+ * and to the logger it was handed — so a deploy embedded in another program
28
+ * does not print over that program's own output.
29
+ *
30
+ * Carried by `AsyncLocalStorage` rather than passed down, because the lines
31
+ * come from everywhere a deploy reaches — the Dockerfile generator, the env
32
+ * sniffer, construct discovery — and two deploys running in one process must
33
+ * not hear each other.
34
+ */
35
+ const current = new node_async_hooks.AsyncLocalStorage();
36
+ /** Runs `fn` with every line written through `output` sent to `sink`. */
37
+ function withOutput(sink, fn) {
38
+ return current.run(sink, fn);
39
+ }
40
+ function write(level, fallback) {
41
+ return (...args) => {
42
+ const sink = current.getStore();
43
+ if (sink) sink(level, (0, node_util.format)(...args));
44
+ else fallback(...args);
45
+ };
46
+ }
47
+ /**
48
+ * `console`, for the methods the CLI logs through — routed to the current
49
+ * run's sink when there is one.
50
+ */
51
+ const output = {
52
+ log: write("info", (...args) => console.log(...args)),
53
+ info: write("info", (...args) => console.info(...args)),
54
+ warn: write("warn", (...args) => console.warn(...args)),
55
+ error: write("error", (...args) => console.error(...args))
56
+ };
57
+ //#endregion
58
+ //#region src/generators/Generator.ts
59
+ /**
60
+ * Zod v4 maintains a process-wide registry of schemas registered via
61
+ * `.meta({ id })`. When we cache-bust user module imports (by appending a
62
+ * `?t=timestamp` query), those modules re-execute and try to register the
63
+ * same ids again, which throws `ID X already exists in the registry`.
64
+ *
65
+ * Clearing the registry in the CLI process is safe: the user's running
66
+ * server lives in a subprocess and has its own isolated registry.
67
+ *
68
+ * Exported for tests.
69
+ */
70
+ function clearZodGlobalRegistry() {
71
+ const registry = globalThis.__zod_globalRegistry;
72
+ if (registry && typeof registry.clear === "function") registry.clear();
73
+ }
74
+ var ConstructGenerator = class {
75
+ static async build(context, outputDir, generator, patterns, options) {
76
+ const constructs = await generator.load(patterns);
77
+ return generator.build(context, constructs, outputDir, options);
78
+ }
79
+ async load(patterns, cwd = process.cwd(), bustCache = false) {
80
+ const logger = console;
81
+ const globPatterns = Array.isArray(patterns) ? patterns : patterns ? [patterns] : [];
82
+ const files = fast_glob.default.stream(globPatterns, {
83
+ cwd,
84
+ absolute: true
85
+ });
86
+ if (bustCache) clearZodGlobalRegistry();
87
+ const constructs = [];
88
+ for await (const f of files) try {
89
+ const file = f.toString();
90
+ const module = await (bustCache ? import(`${file}?t=${Date.now()}`) : import(file));
91
+ for (const [key, construct] of Object.entries(module)) if (this.isConstruct(construct)) constructs.push({
92
+ key,
93
+ name: (0, lodash_kebabcase.default)(key),
94
+ construct,
95
+ path: {
96
+ absolute: file,
97
+ relative: (0, node_path.relative)(process.cwd(), file)
98
+ }
99
+ });
100
+ } catch (error) {
101
+ const err = error;
102
+ logger.error(`Failed to load ${f}: ${err.message}`);
103
+ if (err.stack) logger.error(err.stack);
104
+ throw error;
105
+ }
106
+ return constructs;
107
+ }
108
+ };
109
+ //#endregion
110
+ //#region src/owningTsconfigJsx.ts
111
+ const REGISTER = "owning-tsconfig-jsx-register.mjs";
112
+ /** The CLI's `bin/` was not found above the module looking for it. */
113
+ var OwningTsconfigJsxHookMissing = class extends Error {
114
+ from;
115
+ constructor(from) {
116
+ super(`Could not find bin/${REGISTER} in any directory above '${from}'. It ships with @geekmidas/cli beside bin/gkm.mjs; reinstall the package if it is missing.`);
117
+ this.from = from;
118
+ this.name = "OwningTsconfigJsxHookMissing";
119
+ }
120
+ };
121
+ /**
122
+ * The CLI's `bin/owning-tsconfig-jsx-register.mjs`, as a file URL. Searched
123
+ * upward because this module runs from `src/` in the repo and from a chunk in
124
+ * `dist/` once built, and `bin/` sits beside both.
125
+ */
126
+ function registerUrl() {
127
+ const from = (0, node_path.dirname)((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
128
+ for (let dir = from;; dir = (0, node_path.dirname)(dir)) {
129
+ const candidate = (0, node_path.join)(dir, "bin", REGISTER);
130
+ if ((0, node_fs.existsSync)(candidate)) return (0, node_url.pathToFileURL)(candidate).href;
131
+ if ((0, node_path.dirname)(dir) === dir) throw new OwningTsconfigJsxHookMissing(from);
132
+ }
133
+ }
134
+ /**
135
+ * `NODE_OPTIONS` for a process that runs app code through tsx, with the hook
136
+ * that compiles each `.tsx` with its own tsconfig's JSX settings (see
137
+ * `bin/owning-tsconfig-jsx.mjs`) put in front of every other `--import`, so it
138
+ * is registered before tsx and reads the source on tsx's behalf.
139
+ *
140
+ * `bin/gkm.mjs` already starts the CLI this way, and its children inherit it;
141
+ * this is for those that set `NODE_OPTIONS` themselves, or whose CLI was
142
+ * started with tsx already imported.
143
+ */
144
+ function withOwningTsconfigJsx(nodeOptions = "") {
145
+ if (nodeOptions.includes(REGISTER)) return nodeOptions;
146
+ return [`--import=${registerUrl()}`, nodeOptions].filter(Boolean).join(" ");
147
+ }
148
+ //#endregion
149
+ //#region src/sandbox/worker.ts
150
+ /**
151
+ * Running one of the CLI's own worker scripts inside a sandbox, and reading
152
+ * back the one JSON value it answers with.
153
+ *
154
+ * The worker imports the project's TypeScript — `gkm.config.ts`, construct
155
+ * modules, an app's entry — so it starts with the CLI's own tsx and the two
156
+ * hooks `gkm` itself runs with (JSX by the owning tsconfig, path aliases by
157
+ * the adjacent one). The host process needs none of them loaded: a program
158
+ * calling `deploy()` without `--import tsx` still loads a TypeScript config.
159
+ */
160
+ const here = (0, node_path.dirname)((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
161
+ /**
162
+ * A worker's file: `dist/sandbox/<name>.mjs` once built — whether this module
163
+ * was bundled into `dist/` or sits beside it — or the `.ts` source under tsx.
164
+ */
165
+ function workerFile(name) {
166
+ return [
167
+ (0, node_path.join)(here, "sandbox", `${name}.mjs`),
168
+ (0, node_path.join)(here, `${name}.mjs`),
169
+ (0, node_path.join)(here, "..", "sandbox", `${name}.mjs`),
170
+ (0, node_path.join)(here, `${name}.ts`)
171
+ ].find((path) => (0, node_fs.existsSync)(path)) ?? (0, node_path.join)(here, `${name}.ts`);
172
+ }
173
+ /** tsx, from the CLI's own dependencies — never the project's. */
174
+ function tsxUrl() {
175
+ return (0, node_url.pathToFileURL)((0, node_module.createRequire)(require("url").pathToFileURL(__filename).href).resolve("tsx")).href;
176
+ }
177
+ /**
178
+ * `node`'s arguments for `script`: the CLI's TypeScript loaders, then any
179
+ * further `imports`, then the script and its `args` — an argument array, so
180
+ * nothing about a path is read by a shell.
181
+ */
182
+ function nodeWithTsx(script, args, imports = []) {
183
+ return [
184
+ ...withOwningTsconfigJsx(`--import=${tsxUrl()}`).split(" "),
185
+ ...imports.map((path) => `--import=${(0, node_url.pathToFileURL)(path).href}`),
186
+ script,
187
+ ...args
188
+ ];
189
+ }
190
+ /** A worker ended without the answer it exists to give. */
191
+ var SandboxWorkerFailed = class extends Error {
192
+ step;
193
+ exitCode;
194
+ stderr;
195
+ constructor(step, exitCode, stderr) {
196
+ super(`The sandboxed ${step} ended (exit code ${exitCode}) without an answer.${stderr.trim() ? `\n${stderr.trim()}` : ""}\nIts output above says why; the sandbox must be able to run \`node\` with the CLI's own files at the paths they have here.`);
197
+ this.step = step;
198
+ this.exitCode = exitCode;
199
+ this.stderr = stderr;
200
+ this.name = "SandboxWorkerFailed";
201
+ }
202
+ };
203
+ /**
204
+ * Run worker `name` in `sandbox`, and parse its answer with `schema`.
205
+ *
206
+ * The answer is the last marked line on stdout. Anything else the project's
207
+ * code printed is ignored, and an answer the schema refuses is a failure
208
+ * rather than data — a worker in an isolating sandbox runs code the host does
209
+ * not trust.
210
+ *
211
+ * Within a run (`withSandbox`), the same worker asked the same question is
212
+ * started once; every ask gets its own copy of the answer, and its stderr, as
213
+ * though it had run again.
214
+ */
215
+ async function runWorker(sandbox, step, options) {
216
+ if (options.secrets) return startWorker(sandbox, step, options);
217
+ const key = JSON.stringify([
218
+ options.name,
219
+ options.cwd,
220
+ options.args,
221
+ options.env ?? {}
222
+ ]);
223
+ const answer = await require_sandbox.oncePerRun(sandbox, key, () => startWorker(sandbox, step, options));
224
+ return structuredClone(answer);
225
+ }
226
+ async function startWorker(sandbox, step, options) {
227
+ const result = await sandbox.exec("node", nodeWithTsx(workerFile(options.name), options.args), {
228
+ cwd: options.cwd,
229
+ env: {
230
+ ...sandbox.env,
231
+ ...options.env
232
+ },
233
+ timeoutMs: options.timeoutMs,
234
+ output: "capture",
235
+ ...options.secrets ? { secrets: options.secrets } : {},
236
+ ...options.signal ? { signal: options.signal } : {}
237
+ });
238
+ const line = result.stdout.split("\n").reverse().find((l) => l.startsWith(require_workerRuntime.WORKER_RESULT_MARKER));
239
+ if (line) try {
240
+ const parsed = options.schema.safeParse(JSON.parse(line.slice(require_workerRuntime.WORKER_RESULT_MARKER.length)));
241
+ if (parsed.success) return {
242
+ value: parsed.data,
243
+ stderr: result.stderr
244
+ };
245
+ } catch {}
246
+ throw new SandboxWorkerFailed(step, result.exitCode, result.stderr);
247
+ }
248
+ //#endregion
249
+ //#region src/reconcile/discover.ts
250
+ /**
251
+ * Discovery — one glob, one structural test.
252
+ *
253
+ * A glob per kind is the same specialness the construct model removes, and
254
+ * resources have no kind to be listed under: a declared `ObjectStorage` would
255
+ * never be found by `routes:` or `crons:`. So there is one `constructs` glob,
256
+ * every export of every matching module is inspected, and the per-kind
257
+ * `isConstruct` checks collapse into a single question — does it have an id and
258
+ * can it declare?
259
+ *
260
+ * Structural rather than `instanceof` on purpose. A construct from a different
261
+ * copy of `@geekmidas/constructs` — a linked workspace, two versions in a
262
+ * lockfile — is still a construct, and `instanceof` is exactly the check that
263
+ * says otherwise.
264
+ */
265
+ var discover_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
266
+ ConstructDiscoveryFailed: () => ConstructDiscoveryFailed,
267
+ ConstructsNotSerializable: () => ConstructsNotSerializable,
268
+ DuplicateConstruct: () => DuplicateConstruct,
269
+ LiveConstructsUnavailable: () => LiveConstructsUnavailable,
270
+ consumedBy: () => consumedBy,
271
+ discover: () => discover,
272
+ isDeclarable: () => isDeclarable
273
+ });
274
+ /** `console`, or the deploy run discovering the manifest. */
275
+ const logger = output;
276
+ /**
277
+ * Whether a module export is a construct.
278
+ *
279
+ * Deliberately loose about what else it carries — a construct that also has a
280
+ * `service` is still a construct, and requiring one would exclude the kinds that
281
+ * own no address.
282
+ */
283
+ function isDeclarable(value) {
284
+ if (typeof value !== "object" || value === null) return false;
285
+ const candidate = value;
286
+ return typeof candidate.id === "string" && candidate.id.length > 0 && typeof candidate.declare === "function";
287
+ }
288
+ /** What the discovery worker answers. Checked: the worker ran project code. */
289
+ const DiscoverAnswer = require_schemas.discriminatedUnion("reason", [
290
+ require_schemas.object({
291
+ reason: require_schemas.literal("discovered"),
292
+ manifest: require_schemas.record(require_schemas.string(), require_schemas.object({
293
+ id: require_schemas.string(),
294
+ kind: require_schemas.string()
295
+ }).loose()),
296
+ runnables: require_schemas.record(require_schemas.string(), require_schemas.array(require_schemas.string())),
297
+ background: require_schemas.record(require_schemas.string(), require_schemas.array(require_schemas.string())).optional()
298
+ }),
299
+ require_schemas.object({
300
+ reason: require_schemas.literal("live"),
301
+ paths: require_schemas.array(require_schemas.string())
302
+ }),
303
+ require_schemas.object({
304
+ reason: require_schemas.literal("failed"),
305
+ error: require_schemas.object({
306
+ name: require_schemas.string(),
307
+ message: require_schemas.string(),
308
+ id: require_schemas.string().optional(),
309
+ sources: require_schemas.array(require_schemas.string()).optional()
310
+ }).loose()
311
+ })
312
+ ]);
313
+ /**
314
+ * The manifest, discovered in `sandbox` and handed back as JSON — or
315
+ * `undefined` when it holds something JSON cannot carry and the sandbox is
316
+ * not isolating, for the caller to discover here as before.
317
+ */
318
+ async function discoverInSandbox(sandbox, options) {
319
+ const cwd = options.cwd ?? sandbox.root;
320
+ const patterns = typeof options.patterns === "string" ? [options.patterns] : [...options.patterns];
321
+ const { value, stderr } = await runWorker(sandbox, "construct discovery", {
322
+ name: "discover-worker",
323
+ args: [JSON.stringify({
324
+ patterns,
325
+ cwd
326
+ })],
327
+ cwd,
328
+ timeoutMs: DISCOVER_TIMEOUT_MS,
329
+ schema: DiscoverAnswer
330
+ });
331
+ if (stderr.trim()) logger.warn(stderr.replace(/\n$/, ""));
332
+ switch (value.reason) {
333
+ case "discovered":
334
+ if (options.runnables) for (const [owner, edges] of Object.entries(value.runnables)) options.runnables[owner] = edges;
335
+ if (options.background) for (const [owner, files] of Object.entries(value.background ?? {})) options.background[owner] = files;
336
+ return value.manifest;
337
+ case "failed":
338
+ if (value.error.name === "DuplicateConstruct" && value.error.id) throw new DuplicateConstruct(value.error.id, value.error.sources ?? []);
339
+ throw new ConstructDiscoveryFailed(value.error.name, value.error.message);
340
+ case "live":
341
+ if (sandbox.isolating) throw new ConstructsNotSerializable(value.paths);
342
+ return;
343
+ }
344
+ }
345
+ /**
346
+ * A caller asked for the construct objects (`sources`) or a watcher's
347
+ * re-import under an isolating sandbox, where only data comes back.
348
+ */
349
+ var LiveConstructsUnavailable = class extends Error {
350
+ constructor() {
351
+ super("Discovery was asked for the construct objects themselves under an isolating sandbox, which hands back only data. Run this step without one, or ask only for the manifest.");
352
+ this.name = "LiveConstructsUnavailable";
353
+ }
354
+ };
355
+ /** How long discovering a project's constructs may take in a sandbox. */
356
+ const DISCOVER_TIMEOUT_MS = 6e4;
357
+ /** Importing a construct module, or declaring one, threw in the sandbox. */
358
+ var ConstructDiscoveryFailed = class extends Error {
359
+ errorName;
360
+ detail;
361
+ constructor(errorName, detail) {
362
+ super(`Discovering constructs failed (${errorName}): ${detail}`);
363
+ this.errorName = errorName;
364
+ this.detail = detail;
365
+ this.name = "ConstructDiscoveryFailed";
366
+ }
367
+ };
368
+ /**
369
+ * The constructs' declarations hold something that is not data, and the
370
+ * sandbox they were discovered in hands the deploy nothing but data.
371
+ */
372
+ var ConstructsNotSerializable = class extends Error {
373
+ paths;
374
+ constructor(paths) {
375
+ super(`The construct manifest holds values that are not plain data at: ${paths.join(", ")}. Under an isolating sandbox the deploy only receives what JSON can carry; deploy with a sandbox that is not isolating if the host trusts this project.`);
376
+ this.paths = paths;
377
+ this.name = "ConstructsNotSerializable";
378
+ }
379
+ };
380
+ /**
381
+ * Build the construct manifest for a project.
382
+ *
383
+ * Runs the manifest's own validation before returning, so an app is wrong here
384
+ * — where the error names a file — rather than at deploy.
385
+ *
386
+ * @throws {DuplicateConstruct} when two exports claim one id.
387
+ */
388
+ async function discover(options) {
389
+ const sandbox = options.sandbox ?? require_sandbox.activeSandbox();
390
+ if (sandbox) {
391
+ if (!options.sources && !options.bustCache) {
392
+ const sandboxed = await discoverInSandbox(sandbox, options);
393
+ if (sandboxed) return sandboxed;
394
+ } else if (sandbox.isolating) throw new LiveConstructsUnavailable();
395
+ }
396
+ const { patterns, cwd = process.cwd(), bustCache = false, sources: out } = options;
397
+ if (bustCache) clearZodGlobalRegistry();
398
+ const manifest = {};
399
+ /** Which file declared each id, for the error when two of them do. */
400
+ const sources = {};
401
+ /**
402
+ * Constructs already seen, by identity.
403
+ *
404
+ * A re-export is the *same object* reached through a second file — ESM
405
+ * bindings are live, so `export * from './database.js'` hands back the
406
+ * binding rather than a copy. Without this, a barrel file made every
407
+ * construct in it appear declared twice, and `constructs/index.ts` is the
408
+ * first thing anyone writes in a shared folder.
409
+ *
410
+ * Identity rather than file is also the more honest rule: what may not
411
+ * happen twice is two *different* constructs claiming one id, and that is
412
+ * still an error below.
413
+ */
414
+ const seen = /* @__PURE__ */ new WeakSet();
415
+ const globs = Array.isArray(patterns) ? [...patterns] : [patterns];
416
+ const files = fast_glob.default.stream(globs, {
417
+ cwd,
418
+ absolute: true
419
+ });
420
+ /** Matched files, for the diagnostic below. */
421
+ let matched = 0;
422
+ for await (const found of files) {
423
+ matched++;
424
+ const file = found.toString();
425
+ const module = await (bustCache ? import(`${file}?t=${Date.now()}`) : import(file));
426
+ for (const [exportName, exported] of Object.entries(module)) {
427
+ if (options.background) recordBackground(options.background, exported, file);
428
+ if (!isDeclarable(exported)) {
429
+ if (options.runnables) recordRunnable(options.runnables, exported);
430
+ continue;
431
+ }
432
+ if (seen.has(exported)) continue;
433
+ seen.add(exported);
434
+ if (options.runnables && typeof exported.owner === "string") recordRunnable(options.runnables, exported);
435
+ for (const declaration of exported.declare()) {
436
+ const id = (0, _geekmidas_manifest.canonicalId)(declaration.id);
437
+ const source = (0, node_path.relative)(cwd, file);
438
+ const claimed = sources[id];
439
+ if (claimed !== void 0 && claimed !== source) throw new DuplicateConstruct(id, [claimed, source]);
440
+ manifest[id] = {
441
+ ...declaration,
442
+ id
443
+ };
444
+ sources[id] = source;
445
+ if (out) out[id] = {
446
+ file,
447
+ exportName,
448
+ construct: exported
449
+ };
450
+ }
451
+ }
452
+ }
453
+ (0, _geekmidas_manifest.assertDerivations)(manifest);
454
+ warnIfNothingFound(globs, matched, Object.keys(manifest).length);
455
+ return manifest;
456
+ }
457
+ /**
458
+ * Record where a worker's background work is declared: a cron, a queue
459
+ * consumer or a topic subscriber, under the worker that owns it.
460
+ */
461
+ function recordBackground(background, exported, file) {
462
+ if (!_geekmidas_constructs_crons.Cron.isCron(exported) && !_geekmidas_constructs_queue.Queue.isQueue(exported) && !_geekmidas_constructs_subscribers.Subscriber.isSubscriber(exported)) return;
463
+ const owner = exported.owner;
464
+ if (typeof owner !== "string") return;
465
+ const key = (0, _geekmidas_manifest.canonicalId)(owner);
466
+ const files = background[key] ?? [];
467
+ background[key] = files;
468
+ if (!files.includes(file)) files.push(file);
469
+ }
470
+ /**
471
+ * What a runnable consumes, by id: a queue's consumer drains that queue, a
472
+ * subscriber its topic. Nothing for anything else.
473
+ */
474
+ function consumedBy(runnable) {
475
+ if (_geekmidas_constructs_queue.Queue.isQueue(runnable)) return [runnable.id];
476
+ if (_geekmidas_constructs_subscribers.Subscriber.isSubscriber(runnable) && runnable.topicName) return [(0, _geekmidas_manifest.canonicalId)(runnable.topicName)];
477
+ return [];
478
+ }
479
+ /**
480
+ * Record a runnable's edges under the construct that owns it — the surface an
481
+ * endpoint was built from, or the worker a cron or subscriber was. Anything
482
+ * with no owner, or that is not a runnable at all, is left alone.
483
+ */
484
+ function recordRunnable(runnables, exported) {
485
+ if (typeof exported !== "object" || exported === null) return;
486
+ const runnable = exported;
487
+ const owner = typeof runnable.surface?.id === "string" ? runnable.surface.id : typeof runnable.owner === "string" ? runnable.owner : void 0;
488
+ if (!owner || !Array.isArray(runnable.constructs)) return;
489
+ const key = (0, _geekmidas_manifest.canonicalId)(owner);
490
+ const edges = runnables[key] ?? [];
491
+ runnables[key] = edges;
492
+ for (const id of [...runnable.constructs, ...consumedBy(exported)]) {
493
+ if (typeof id !== "string") continue;
494
+ const target = (0, _geekmidas_manifest.canonicalId)(id);
495
+ if (!edges.includes(target)) edges.push(target);
496
+ }
497
+ }
498
+ /**
499
+ * Say so when a glob was configured and found nothing.
500
+ *
501
+ * The glob is not a filter over declarations already known — it is *how they
502
+ * are found*, by importing what it matches. So a file it misses is a
503
+ * declaration that does not exist, and every symptom of that appears somewhere
504
+ * other than the cause: no container starts, no env key is written, and the
505
+ * application fails on first use against a resource it can see in its own
506
+ * source.
507
+ *
508
+ * Nothing reported it before, because an unmatched file is indistinguishable
509
+ * from a file nobody wrote. These two cases are the ones that are *not*
510
+ * ambiguous — a glob was configured, so something was expected.
511
+ *
512
+ * Silent when no glob is configured at all: that is a project which has not
513
+ * adopted constructs, and has nothing to be missing.
514
+ */
515
+ function warnIfNothingFound(globs, matched, declared) {
516
+ if (globs.length === 0) return;
517
+ if (matched === 0) {
518
+ logger.warn(`\n⚠️ The constructs glob matched no files, so nothing was declared.\n Patterns: ${globs.join(", ")}\n Nothing will be provisioned — no containers, no env keys, no resources.\n A common cause is depth: '*.ts' matches one level, '**/*.ts' matches any.`);
519
+ return;
520
+ }
521
+ if (declared === 0) logger.warn(`\n⚠️ The constructs glob matched ${matched} file(s) but none declared anything.\n Patterns: ${globs.join(", ")}\n Discovery keeps exports with an 'id' that can 'declare()'. A construct that is\n built but never exported is invisible to it.`);
522
+ }
523
+ /** Two constructs claiming one id. */
524
+ var DuplicateConstruct = class extends require_errors.GkmError {
525
+ /** The id claimed twice. */
526
+ id;
527
+ /** The files that claimed it. */
528
+ sources;
529
+ constructor(id, sources) {
530
+ super("Two constructs declare the same id");
531
+ this.name = "DuplicateConstruct";
532
+ this.id = id;
533
+ this.sources = sources;
534
+ }
535
+ };
536
+ //#endregion
537
+ Object.defineProperty(exports, "ConstructDiscoveryFailed", {
538
+ enumerable: true,
539
+ get: function() {
540
+ return ConstructDiscoveryFailed;
541
+ }
542
+ });
543
+ Object.defineProperty(exports, "ConstructGenerator", {
544
+ enumerable: true,
545
+ get: function() {
546
+ return ConstructGenerator;
547
+ }
548
+ });
549
+ Object.defineProperty(exports, "ConstructsNotSerializable", {
550
+ enumerable: true,
551
+ get: function() {
552
+ return ConstructsNotSerializable;
553
+ }
554
+ });
555
+ Object.defineProperty(exports, "SandboxWorkerFailed", {
556
+ enumerable: true,
557
+ get: function() {
558
+ return SandboxWorkerFailed;
559
+ }
560
+ });
561
+ Object.defineProperty(exports, "consumedBy", {
562
+ enumerable: true,
563
+ get: function() {
564
+ return consumedBy;
565
+ }
566
+ });
567
+ Object.defineProperty(exports, "discover", {
568
+ enumerable: true,
569
+ get: function() {
570
+ return discover;
571
+ }
572
+ });
573
+ Object.defineProperty(exports, "discover_exports", {
574
+ enumerable: true,
575
+ get: function() {
576
+ return discover_exports;
577
+ }
578
+ });
579
+ Object.defineProperty(exports, "isDeclarable", {
580
+ enumerable: true,
581
+ get: function() {
582
+ return isDeclarable;
583
+ }
584
+ });
585
+ Object.defineProperty(exports, "nodeWithTsx", {
586
+ enumerable: true,
587
+ get: function() {
588
+ return nodeWithTsx;
589
+ }
590
+ });
591
+ Object.defineProperty(exports, "output", {
592
+ enumerable: true,
593
+ get: function() {
594
+ return output;
595
+ }
596
+ });
597
+ Object.defineProperty(exports, "runWorker", {
598
+ enumerable: true,
599
+ get: function() {
600
+ return runWorker;
601
+ }
602
+ });
603
+ Object.defineProperty(exports, "withOutput", {
604
+ enumerable: true,
605
+ get: function() {
606
+ return withOutput;
607
+ }
608
+ });
609
+ Object.defineProperty(exports, "withOwningTsconfigJsx", {
610
+ enumerable: true,
611
+ get: function() {
612
+ return withOwningTsconfigJsx;
613
+ }
614
+ });
615
+
616
+ //# sourceMappingURL=discover-Bsr7HjqJ.cjs.map