@geekmidas/cli 10.0.0-alpha.15 → 10.0.0-alpha.151

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 (438) hide show
  1. package/README.md +313 -380
  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-CusLH-9S.mjs +1037 -0
  7. package/dist/EndpointGenerator-CusLH-9S.mjs.map +1 -0
  8. package/dist/EndpointGenerator-DyLMYClE.cjs +1096 -0
  9. package/dist/EndpointGenerator-DyLMYClE.cjs.map +1 -0
  10. package/dist/GoDaddyProvider-BZYq0-nV.cjs +412 -0
  11. package/dist/GoDaddyProvider-BZYq0-nV.cjs.map +1 -0
  12. package/dist/GoDaddyProvider-D-8GW8cP.mjs +412 -0
  13. package/dist/GoDaddyProvider-D-8GW8cP.mjs.map +1 -0
  14. package/dist/{HostingerProvider-BZFGYYVA.cjs → HostingerProvider-BxRR2ibx.cjs} +23 -9
  15. package/dist/HostingerProvider-BxRR2ibx.cjs.map +1 -0
  16. package/dist/{HostingerProvider-BY26bWwB.mjs → HostingerProvider-C-C4aiKF.mjs} +23 -9
  17. package/dist/HostingerProvider-C-C4aiKF.mjs.map +1 -0
  18. package/dist/LegacyStateStore-BFkNiBxC.mjs +124 -0
  19. package/dist/LegacyStateStore-BFkNiBxC.mjs.map +1 -0
  20. package/dist/LegacyStateStore-DYaamZqR.cjs +124 -0
  21. package/dist/LegacyStateStore-DYaamZqR.cjs.map +1 -0
  22. package/dist/LocalStateStore-7pP4naiB.mjs +167 -0
  23. package/dist/LocalStateStore-7pP4naiB.mjs.map +1 -0
  24. package/dist/LocalStateStore-C0JSjyCg.cjs +178 -0
  25. package/dist/LocalStateStore-C0JSjyCg.cjs.map +1 -0
  26. package/dist/OpenApiTsGenerator-BTMuu1WS.mjs +534 -0
  27. package/dist/OpenApiTsGenerator-BTMuu1WS.mjs.map +1 -0
  28. package/dist/OpenApiTsGenerator-CI-tceXV.cjs +539 -0
  29. package/dist/OpenApiTsGenerator-CI-tceXV.cjs.map +1 -0
  30. package/dist/{Route53Provider-Cvj40A8I.mjs → Route53Provider-Di_SD9CF.mjs} +3 -3
  31. package/dist/Route53Provider-Di_SD9CF.mjs.map +1 -0
  32. package/dist/{Route53Provider-DVILBsvV.cjs → Route53Provider-emLuQHVw.cjs} +3 -3
  33. package/dist/Route53Provider-emLuQHVw.cjs.map +1 -0
  34. package/dist/S3StateStore-BnmbFco-.cjs +222 -0
  35. package/dist/S3StateStore-BnmbFco-.cjs.map +1 -0
  36. package/dist/S3StateStore-Dzyuiy3V.mjs +223 -0
  37. package/dist/S3StateStore-Dzyuiy3V.mjs.map +1 -0
  38. package/dist/SSMStateStore-BLbjoEFc.cjs +204 -0
  39. package/dist/SSMStateStore-BLbjoEFc.cjs.map +1 -0
  40. package/dist/SSMStateStore-BcNH7efc.mjs +205 -0
  41. package/dist/SSMStateStore-BcNH7efc.mjs.map +1 -0
  42. package/dist/SubscriberGenerator-BNJyPmXJ.cjs +848 -0
  43. package/dist/SubscriberGenerator-BNJyPmXJ.cjs.map +1 -0
  44. package/dist/SubscriberGenerator-CzPrixYu.mjs +783 -0
  45. package/dist/SubscriberGenerator-CzPrixYu.mjs.map +1 -0
  46. package/dist/add-SHsas9Yu.mjs +711 -0
  47. package/dist/add-SHsas9Yu.mjs.map +1 -0
  48. package/dist/add-moAE6nV4.cjs +713 -0
  49. package/dist/add-moAE6nV4.cjs.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/apps-BOgA6AcI.mjs +5534 -0
  55. package/dist/apps-BOgA6AcI.mjs.map +1 -0
  56. package/dist/apps-DkxHjd59.cjs +6148 -0
  57. package/dist/apps-DkxHjd59.cjs.map +1 -0
  58. package/dist/aws-8QQ8n-t6.mjs +89 -0
  59. package/dist/aws-8QQ8n-t6.mjs.map +1 -0
  60. package/dist/aws-DY9NqQIT.cjs +100 -0
  61. package/dist/aws-DY9NqQIT.cjs.map +1 -0
  62. package/dist/awsStore-Bx5nCFnS.mjs +121 -0
  63. package/dist/awsStore-Bx5nCFnS.mjs.map +1 -0
  64. package/dist/awsStore-u3ehhMoY.cjs +138 -0
  65. package/dist/awsStore-u3ehhMoY.cjs.map +1 -0
  66. package/dist/{backup-provisioner-DIVCbfee.mjs → backup-provisioner-C8DnCmxK.mjs} +2 -2
  67. package/dist/backup-provisioner-C8DnCmxK.mjs.map +1 -0
  68. package/dist/{backup-provisioner-BmhIO_Yr.cjs → backup-provisioner-oDEsPj02.cjs} +2 -2
  69. package/dist/backup-provisioner-oDEsPj02.cjs.map +1 -0
  70. package/dist/backups/runner.cjs +519 -0
  71. package/dist/backups/runner.cjs.map +1 -0
  72. package/dist/backups/runner.d.cts +102 -0
  73. package/dist/backups/runner.d.cts.map +1 -0
  74. package/dist/backups/runner.d.mts +102 -0
  75. package/dist/backups/runner.d.mts.map +1 -0
  76. package/dist/backups/runner.mjs +506 -0
  77. package/dist/backups/runner.mjs.map +1 -0
  78. package/dist/{bundler-BeNDZdHQ.cjs → bundler-D0spRLb-.cjs} +59 -14
  79. package/dist/bundler-D0spRLb-.cjs.map +1 -0
  80. package/dist/{bundler-BodTL4kf.mjs → bundler-Dy-Dfchf.mjs} +59 -14
  81. package/dist/bundler-Dy-Dfchf.mjs.map +1 -0
  82. package/dist/cli-BmCyUTZf.cjs +71 -0
  83. package/dist/cli-BmCyUTZf.cjs.map +1 -0
  84. package/dist/cli-BpT_gg4n.mjs +71 -0
  85. package/dist/cli-BpT_gg4n.mjs.map +1 -0
  86. package/dist/compose-0HkjQywT.cjs +3046 -0
  87. package/dist/compose-0HkjQywT.cjs.map +1 -0
  88. package/dist/compose-B3OOowfE.mjs +1560 -0
  89. package/dist/compose-B3OOowfE.mjs.map +1 -0
  90. package/dist/compose-BIXEPrGA.mjs +2957 -0
  91. package/dist/compose-BIXEPrGA.mjs.map +1 -0
  92. package/dist/compose-BP8OeV7P.cjs +1919 -0
  93. package/dist/compose-BP8OeV7P.cjs.map +1 -0
  94. package/dist/config-BLrAd7Of.mjs +659 -0
  95. package/dist/config-BLrAd7Of.mjs.map +1 -0
  96. package/dist/config-CRk2vdSp.d.mts +268 -0
  97. package/dist/config-CRk2vdSp.d.mts.map +1 -0
  98. package/dist/config-juUyBlb1.cjs +772 -0
  99. package/dist/config-juUyBlb1.cjs.map +1 -0
  100. package/dist/config-oBgsbLip.d.cts +268 -0
  101. package/dist/config-oBgsbLip.d.cts.map +1 -0
  102. package/dist/config.cjs +11 -3
  103. package/dist/config.d.cts +4 -117
  104. package/dist/config.d.mts +4 -117
  105. package/dist/config.mjs +3 -3
  106. package/dist/credentialSchemas-BAklWDna.cjs +271 -0
  107. package/dist/credentialSchemas-BAklWDna.cjs.map +1 -0
  108. package/dist/credentialSchemas-mz9QZTYh.mjs +236 -0
  109. package/dist/credentialSchemas-mz9QZTYh.mjs.map +1 -0
  110. package/dist/credentials-B6ZwGsy-.cjs +2272 -0
  111. package/dist/credentials-B6ZwGsy-.cjs.map +1 -0
  112. package/dist/credentials-DRfP9aG7.mjs +1817 -0
  113. package/dist/credentials-DRfP9aG7.mjs.map +1 -0
  114. package/dist/databases-DawSdqBI.cjs +703 -0
  115. package/dist/databases-DawSdqBI.cjs.map +1 -0
  116. package/dist/databases-mzSUFBTw.mjs +588 -0
  117. package/dist/databases-mzSUFBTw.mjs.map +1 -0
  118. package/dist/define-6poNqm5O.mjs +106 -0
  119. package/dist/define-6poNqm5O.mjs.map +1 -0
  120. package/dist/define-crmMcXFS.cjs +153 -0
  121. package/dist/define-crmMcXFS.cjs.map +1 -0
  122. package/dist/deploy/public.cjs +211 -0
  123. package/dist/deploy/public.cjs.map +1 -0
  124. package/dist/deploy/public.d.cts +647 -0
  125. package/dist/deploy/public.d.cts.map +1 -0
  126. package/dist/deploy/public.d.mts +647 -0
  127. package/dist/deploy/public.d.mts.map +1 -0
  128. package/dist/deploy/public.mjs +144 -0
  129. package/dist/deploy/public.mjs.map +1 -0
  130. package/dist/deploy/sniffer-envparser-worker.cjs +54 -0
  131. package/dist/deploy/sniffer-envparser-worker.cjs.map +1 -0
  132. package/dist/deploy/sniffer-envparser-worker.d.cts +1 -0
  133. package/dist/deploy/sniffer-envparser-worker.d.mts +1 -0
  134. package/dist/deploy/sniffer-envparser-worker.mjs +55 -0
  135. package/dist/deploy/sniffer-envparser-worker.mjs.map +1 -0
  136. package/dist/deploy/sniffer-hooks.cjs +1 -1
  137. package/dist/deploy/sniffer-hooks.mjs +1 -1
  138. package/dist/deploy/sniffer-loader.cjs +2 -2
  139. package/dist/deploy/sniffer-loader.mjs +1 -1
  140. package/dist/deploy/sniffer-routes-worker.cjs +2 -2
  141. package/dist/deploy/sniffer-routes-worker.mjs +1 -1
  142. package/dist/deploy-BgOujGGL.mjs +3836 -0
  143. package/dist/deploy-BgOujGGL.mjs.map +1 -0
  144. package/dist/deploy-ciuNiVqo.cjs +3892 -0
  145. package/dist/deploy-ciuNiVqo.cjs.map +1 -0
  146. package/dist/discover-CRywE7yc.cjs +1085 -0
  147. package/dist/discover-CRywE7yc.cjs.map +1 -0
  148. package/dist/discover-DbDrCQ8h.mjs +940 -0
  149. package/dist/discover-DbDrCQ8h.mjs.map +1 -0
  150. package/dist/docker-74kvq2jQ.cjs +1514 -0
  151. package/dist/docker-74kvq2jQ.cjs.map +1 -0
  152. package/dist/docker-CXYz3W2U.mjs +1407 -0
  153. package/dist/docker-CXYz3W2U.mjs.map +1 -0
  154. package/dist/dokploy-CrxDMut1.cjs +38 -0
  155. package/dist/dokploy-CrxDMut1.cjs.map +1 -0
  156. package/dist/dokploy-tNy6ZU64.mjs +38 -0
  157. package/dist/dokploy-tNy6ZU64.mjs.map +1 -0
  158. package/dist/drivers-aM87NQJi.cjs +224 -0
  159. package/dist/drivers-aM87NQJi.cjs.map +1 -0
  160. package/dist/drivers-uxLBq3e3.mjs +195 -0
  161. package/dist/drivers-uxLBq3e3.mjs.map +1 -0
  162. package/dist/eas-B3yv_XVz.mjs +334 -0
  163. package/dist/eas-B3yv_XVz.mjs.map +1 -0
  164. package/dist/eas-CiORdzk0.cjs +337 -0
  165. package/dist/eas-CiORdzk0.cjs.map +1 -0
  166. package/dist/emit-Bj6XSivk.mjs +136 -0
  167. package/dist/emit-Bj6XSivk.mjs.map +1 -0
  168. package/dist/emit-CDC__ubE.cjs +147 -0
  169. package/dist/emit-CDC__ubE.cjs.map +1 -0
  170. package/dist/encryption-Birkm2_E.mjs +89 -0
  171. package/dist/encryption-Birkm2_E.mjs.map +1 -0
  172. package/dist/encryption-drgYmkGP.cjs +90 -0
  173. package/dist/encryption-drgYmkGP.cjs.map +1 -0
  174. package/dist/engine-CW78Wt8x.mjs +3217 -0
  175. package/dist/engine-CW78Wt8x.mjs.map +1 -0
  176. package/dist/engine-CfLaQ0bJ.cjs +3330 -0
  177. package/dist/engine-CfLaQ0bJ.cjs.map +1 -0
  178. package/dist/errors-D8Gwp5kU.mjs +23 -0
  179. package/dist/errors-D8Gwp5kU.mjs.map +1 -0
  180. package/dist/errors-DMC4Umsb.cjs +34 -0
  181. package/dist/errors-DMC4Umsb.cjs.map +1 -0
  182. package/dist/github-BfLlBWB5.cjs +901 -0
  183. package/dist/github-BfLlBWB5.cjs.map +1 -0
  184. package/dist/github-DphkHybE.mjs +900 -0
  185. package/dist/github-DphkHybE.mjs.map +1 -0
  186. package/dist/googlePlay-BWDhYvH_.cjs +931 -0
  187. package/dist/googlePlay-BWDhYvH_.cjs.map +1 -0
  188. package/dist/googlePlay-CjzqTF8t.mjs +931 -0
  189. package/dist/googlePlay-CjzqTF8t.mjs.map +1 -0
  190. package/dist/{index-D-iAVHx-.d.cts → index-B35vTdAW.d.cts} +39 -15
  191. package/dist/index-B35vTdAW.d.cts.map +1 -0
  192. package/dist/{index-Cd-qeOam.d.mts → index-Dv1Zj86i.d.mts} +39 -15
  193. package/dist/index-Dv1Zj86i.d.mts.map +1 -0
  194. package/dist/index.cjs +13594 -12347
  195. package/dist/index.cjs.map +1 -1
  196. package/dist/index.mjs +13541 -12292
  197. package/dist/index.mjs.map +1 -1
  198. package/dist/local-Bt9jPziD.cjs +241 -0
  199. package/dist/local-Bt9jPziD.cjs.map +1 -0
  200. package/dist/local-DBtepRK5.mjs +224 -0
  201. package/dist/local-DBtepRK5.mjs.map +1 -0
  202. package/dist/migrate-2YESt4v9.mjs +267 -0
  203. package/dist/migrate-2YESt4v9.mjs.map +1 -0
  204. package/dist/migrate-B-_cASJt.cjs +272 -0
  205. package/dist/migrate-B-_cASJt.cjs.map +1 -0
  206. package/dist/migrate-BUhe0BuA.cjs +181 -0
  207. package/dist/migrate-BUhe0BuA.cjs.map +1 -0
  208. package/dist/migrate-Dp_Y2XGi.mjs +181 -0
  209. package/dist/migrate-Dp_Y2XGi.mjs.map +1 -0
  210. package/dist/notes-DHN4qThL.mjs +399 -0
  211. package/dist/notes-DHN4qThL.mjs.map +1 -0
  212. package/dist/notes-DUq6Bx1I.cjs +500 -0
  213. package/dist/notes-DUq6Bx1I.cjs.map +1 -0
  214. package/dist/openapi.cjs +213 -7
  215. package/dist/openapi.cjs.map +1 -0
  216. package/dist/openapi.d.cts +32 -8
  217. package/dist/openapi.d.cts.map +1 -1
  218. package/dist/openapi.d.mts +32 -8
  219. package/dist/openapi.d.mts.map +1 -1
  220. package/dist/openapi.mjs +208 -2
  221. package/dist/openapi.mjs.map +1 -0
  222. package/dist/projectBucket-CxsutB3D.cjs +263 -0
  223. package/dist/projectBucket-CxsutB3D.cjs.map +1 -0
  224. package/dist/projectBucket-DzLZlleB.mjs +222 -0
  225. package/dist/projectBucket-DzLZlleB.mjs.map +1 -0
  226. package/dist/provider-BqpjG9QM.cjs +57 -0
  227. package/dist/provider-BqpjG9QM.cjs.map +1 -0
  228. package/dist/provider-CEOKk8NS.mjs +46 -0
  229. package/dist/provider-CEOKk8NS.mjs.map +1 -0
  230. package/dist/publish-BVal0GFd.mjs +123 -0
  231. package/dist/publish-BVal0GFd.mjs.map +1 -0
  232. package/dist/publish-DmTJhVe8.cjs +124 -0
  233. package/dist/publish-DmTJhVe8.cjs.map +1 -0
  234. package/dist/ready-BNh3zsSn.cjs +404 -0
  235. package/dist/ready-BNh3zsSn.cjs.map +1 -0
  236. package/dist/ready-g25dcGzK.mjs +375 -0
  237. package/dist/ready-g25dcGzK.mjs.map +1 -0
  238. package/dist/reconcile/public.cjs +3 -5
  239. package/dist/reconcile/public.d.cts +31 -89
  240. package/dist/reconcile/public.d.cts.map +1 -1
  241. package/dist/reconcile/public.d.mts +31 -89
  242. package/dist/reconcile/public.d.mts.map +1 -1
  243. package/dist/reconcile/public.mjs +3 -3
  244. package/dist/{reconcile-DhQ00DpU.mjs → reconcile--I7V4Klj.mjs} +2 -2
  245. package/dist/{reconcile-DhQ00DpU.mjs.map → reconcile--I7V4Klj.mjs.map} +1 -1
  246. package/dist/{reconcile-Dd2iyILf.cjs → reconcile-CuCQBa5-.cjs} +3 -3
  247. package/dist/{reconcile-Dd2iyILf.cjs.map → reconcile-CuCQBa5-.cjs.map} +1 -1
  248. package/dist/resolve-BwTJI8K7.cjs +316 -0
  249. package/dist/resolve-BwTJI8K7.cjs.map +1 -0
  250. package/dist/resolve-UBq26cZc.mjs +263 -0
  251. package/dist/resolve-UBq26cZc.mjs.map +1 -0
  252. package/dist/rollback-BFKex9TO.cjs +165 -0
  253. package/dist/rollback-BFKex9TO.cjs.map +1 -0
  254. package/dist/rollback-DiOcLTRc.mjs +136 -0
  255. package/dist/rollback-DiOcLTRc.mjs.map +1 -0
  256. package/dist/runtime-CFvcLEJW.d.cts +82 -0
  257. package/dist/runtime-CFvcLEJW.d.cts.map +1 -0
  258. package/dist/runtime-dwsH6ddo.d.mts +82 -0
  259. package/dist/runtime-dwsH6ddo.d.mts.map +1 -0
  260. package/dist/s3-BgG_xW-D.cjs +215 -0
  261. package/dist/s3-BgG_xW-D.cjs.map +1 -0
  262. package/dist/s3-CkrerKdA.mjs +215 -0
  263. package/dist/s3-CkrerKdA.mjs.map +1 -0
  264. package/dist/sandbox/config-worker.cjs +43 -0
  265. package/dist/sandbox/config-worker.cjs.map +1 -0
  266. package/dist/sandbox/config-worker.d.cts +1 -0
  267. package/dist/sandbox/config-worker.d.mts +1 -0
  268. package/dist/sandbox/config-worker.mjs +44 -0
  269. package/dist/sandbox/config-worker.mjs.map +1 -0
  270. package/dist/sandbox/credentials-worker.cjs +53 -0
  271. package/dist/sandbox/credentials-worker.cjs.map +1 -0
  272. package/dist/sandbox/credentials-worker.d.cts +1 -0
  273. package/dist/sandbox/credentials-worker.d.mts +1 -0
  274. package/dist/sandbox/credentials-worker.mjs +54 -0
  275. package/dist/sandbox/credentials-worker.mjs.map +1 -0
  276. package/dist/sandbox/discover-worker.cjs +47 -0
  277. package/dist/sandbox/discover-worker.cjs.map +1 -0
  278. package/dist/sandbox/discover-worker.d.cts +1 -0
  279. package/dist/sandbox/discover-worker.d.mts +1 -0
  280. package/dist/sandbox/discover-worker.mjs +48 -0
  281. package/dist/sandbox/discover-worker.mjs.map +1 -0
  282. package/dist/sandbox/migrate-worker.cjs +75 -0
  283. package/dist/sandbox/migrate-worker.cjs.map +1 -0
  284. package/dist/sandbox/migrate-worker.d.cts +1 -0
  285. package/dist/sandbox/migrate-worker.d.mts +1 -0
  286. package/dist/sandbox/migrate-worker.mjs +76 -0
  287. package/dist/sandbox/migrate-worker.mjs.map +1 -0
  288. package/dist/{workspace-mFpI_ky_.cjs → schemas-BCwKKA42.mjs} +399 -1162
  289. package/dist/schemas-BCwKKA42.mjs.map +1 -0
  290. package/dist/{workspace-CgwmXEtc.mjs → schemas-BQ_v0lEX.cjs} +487 -971
  291. package/dist/schemas-BQ_v0lEX.cjs.map +1 -0
  292. package/dist/secretsManager-CQORubp9.mjs +97 -0
  293. package/dist/secretsManager-CQORubp9.mjs.map +1 -0
  294. package/dist/secretsManager-RAGcEDX1.cjs +108 -0
  295. package/dist/secretsManager-RAGcEDX1.cjs.map +1 -0
  296. package/dist/seeds-B3xvUAQf.cjs +363 -0
  297. package/dist/seeds-B3xvUAQf.cjs.map +1 -0
  298. package/dist/seeds-BCC8vAXR.mjs +298 -0
  299. package/dist/seeds-BCC8vAXR.mjs.map +1 -0
  300. package/dist/serverSetup-CUBu8_Mk.cjs +652 -0
  301. package/dist/serverSetup-CUBu8_Mk.cjs.map +1 -0
  302. package/dist/serverSetup-eh9MUdSN.mjs +652 -0
  303. package/dist/serverSetup-eh9MUdSN.mjs.map +1 -0
  304. package/dist/sniffer-CNTnUmhc.mjs +1824 -0
  305. package/dist/sniffer-CNTnUmhc.mjs.map +1 -0
  306. package/dist/sniffer-CaoQH_kk.cjs +1997 -0
  307. package/dist/sniffer-CaoQH_kk.cjs.map +1 -0
  308. package/dist/snsSubscriptions-DiqwM9Ms.cjs +1173 -0
  309. package/dist/snsSubscriptions-DiqwM9Ms.cjs.map +1 -0
  310. package/dist/snsSubscriptions-zOIIswN0.mjs +1048 -0
  311. package/dist/snsSubscriptions-zOIIswN0.mjs.map +1 -0
  312. package/dist/sst-D6Dvhr6H.mjs +462 -0
  313. package/dist/sst-D6Dvhr6H.mjs.map +1 -0
  314. package/dist/sst-DECRMgjv.cjs +485 -0
  315. package/dist/sst-DECRMgjv.cjs.map +1 -0
  316. package/dist/stack-BZG5HoVN.mjs +2206 -0
  317. package/dist/stack-BZG5HoVN.mjs.map +1 -0
  318. package/dist/stack-CLk9WojF.cjs +2381 -0
  319. package/dist/stack-CLk9WojF.cjs.map +1 -0
  320. package/dist/stage-Cl0DPJ7w.cjs +313 -0
  321. package/dist/stage-Cl0DPJ7w.cjs.map +1 -0
  322. package/dist/stage-DiLPb89O.mjs +302 -0
  323. package/dist/stage-DiLPb89O.mjs.map +1 -0
  324. package/dist/stages-Bs1THSy7.cjs +190 -0
  325. package/dist/stages-Bs1THSy7.cjs.map +1 -0
  326. package/dist/stages-_xCG4Ymu.mjs +190 -0
  327. package/dist/stages-_xCG4Ymu.mjs.map +1 -0
  328. package/dist/target/public.cjs +15 -0
  329. package/dist/target/public.d.cts +28 -0
  330. package/dist/target/public.d.cts.map +1 -0
  331. package/dist/target/public.d.mts +28 -0
  332. package/dist/target/public.d.mts.map +1 -0
  333. package/dist/target/public.mjs +4 -0
  334. package/dist/terminal-XQE106CG.cjs +85 -0
  335. package/dist/terminal-XQE106CG.cjs.map +1 -0
  336. package/dist/terminal-jGj9TtMQ.mjs +85 -0
  337. package/dist/terminal-jGj9TtMQ.mjs.map +1 -0
  338. package/dist/types-Bl_CwZC9.cjs +90 -0
  339. package/dist/types-Bl_CwZC9.cjs.map +1 -0
  340. package/dist/{types-BGo5TaNE.d.mts → types-Dk--xVOT.d.cts} +2234 -439
  341. package/dist/types-Dk--xVOT.d.cts.map +1 -0
  342. package/dist/{types-C5ZNpUad.d.cts → types-DwQYpd_0.d.mts} +2232 -439
  343. package/dist/types-DwQYpd_0.d.mts.map +1 -0
  344. package/dist/types-Y1NfWlyG.mjs +61 -0
  345. package/dist/types-Y1NfWlyG.mjs.map +1 -0
  346. package/dist/utils-D2Nk1Nv2.cjs +205 -0
  347. package/dist/utils-D2Nk1Nv2.cjs.map +1 -0
  348. package/dist/utils-D_fxUqvU.mjs +156 -0
  349. package/dist/utils-D_fxUqvU.mjs.map +1 -0
  350. package/dist/vitest.cjs +65 -0
  351. package/dist/vitest.cjs.map +1 -0
  352. package/dist/vitest.d.cts +29 -0
  353. package/dist/vitest.d.cts.map +1 -0
  354. package/dist/vitest.d.mts +29 -0
  355. package/dist/vitest.d.mts.map +1 -0
  356. package/dist/vitest.mjs +65 -0
  357. package/dist/vitest.mjs.map +1 -0
  358. package/dist/workerRuntime-BXfhbe13.cjs +108 -0
  359. package/dist/workerRuntime-BXfhbe13.cjs.map +1 -0
  360. package/dist/workerRuntime-CsOyBRx2.mjs +79 -0
  361. package/dist/workerRuntime-CsOyBRx2.mjs.map +1 -0
  362. package/dist/workspace/index.cjs +6 -2
  363. package/dist/workspace/index.d.cts +3 -3
  364. package/dist/workspace/index.d.mts +3 -3
  365. package/dist/workspace/index.mjs +2 -2
  366. package/dist/workspace-1szcahj9.cjs +2916 -0
  367. package/dist/workspace-1szcahj9.cjs.map +1 -0
  368. package/dist/workspace-DFGsrjGD.mjs +2480 -0
  369. package/dist/workspace-DFGsrjGD.mjs.map +1 -0
  370. package/package.json +66 -14
  371. package/dist/HostingerProvider-BY26bWwB.mjs.map +0 -1
  372. package/dist/HostingerProvider-BZFGYYVA.cjs.map +0 -1
  373. package/dist/LocalStateProvider-7HR6SS2t.cjs +0 -48
  374. package/dist/LocalStateProvider-7HR6SS2t.cjs.map +0 -1
  375. package/dist/LocalStateProvider-D7QyJoLM.mjs +0 -48
  376. package/dist/LocalStateProvider-D7QyJoLM.mjs.map +0 -1
  377. package/dist/Route53Provider-Cvj40A8I.mjs.map +0 -1
  378. package/dist/Route53Provider-DVILBsvV.cjs.map +0 -1
  379. package/dist/SSMStateProvider-B0Hu1MKZ.mjs +0 -75
  380. package/dist/SSMStateProvider-B0Hu1MKZ.mjs.map +0 -1
  381. package/dist/SSMStateProvider-VrQ-yeqd.cjs +0 -74
  382. package/dist/SSMStateProvider-VrQ-yeqd.cjs.map +0 -1
  383. package/dist/backup-provisioner-BmhIO_Yr.cjs.map +0 -1
  384. package/dist/backup-provisioner-DIVCbfee.mjs.map +0 -1
  385. package/dist/bundler-BeNDZdHQ.cjs.map +0 -1
  386. package/dist/bundler-BodTL4kf.mjs.map +0 -1
  387. package/dist/config-Q1rvKHvw.cjs +0 -467
  388. package/dist/config-Q1rvKHvw.cjs.map +0 -1
  389. package/dist/config-pqGD3hF9.mjs +0 -414
  390. package/dist/config-pqGD3hF9.mjs.map +0 -1
  391. package/dist/config.d.cts.map +0 -1
  392. package/dist/config.d.mts.map +0 -1
  393. package/dist/credentials-BekkKtY_.mjs +0 -2780
  394. package/dist/credentials-BekkKtY_.mjs.map +0 -1
  395. package/dist/credentials-Q6F0uqJq.cjs +0 -2917
  396. package/dist/credentials-Q6F0uqJq.cjs.map +0 -1
  397. package/dist/discover-BERGFg8v.cjs +0 -288
  398. package/dist/discover-BERGFg8v.cjs.map +0 -1
  399. package/dist/discover-CK-n3w6b.mjs +0 -244
  400. package/dist/discover-CK-n3w6b.mjs.map +0 -1
  401. package/dist/emit-BdoPFjZf.cjs +0 -253
  402. package/dist/emit-BdoPFjZf.cjs.map +0 -1
  403. package/dist/emit-Bzq7JsMP.mjs +0 -224
  404. package/dist/emit-Bzq7JsMP.mjs.map +0 -1
  405. package/dist/fullstack-secrets-BET8gqwK.mjs +0 -81
  406. package/dist/fullstack-secrets-BET8gqwK.mjs.map +0 -1
  407. package/dist/fullstack-secrets-DXsWO-5m.cjs +0 -92
  408. package/dist/fullstack-secrets-DXsWO-5m.cjs.map +0 -1
  409. package/dist/generator-LfZU7NlU.mjs +0 -247
  410. package/dist/generator-LfZU7NlU.mjs.map +0 -1
  411. package/dist/generator-Wdfp0jCS.cjs +0 -282
  412. package/dist/generator-Wdfp0jCS.cjs.map +0 -1
  413. package/dist/github-BfflNPVe.cjs +0 -203
  414. package/dist/github-BfflNPVe.cjs.map +0 -1
  415. package/dist/github-CRwnxKmD.mjs +0 -203
  416. package/dist/github-CRwnxKmD.mjs.map +0 -1
  417. package/dist/index-Cd-qeOam.d.mts.map +0 -1
  418. package/dist/index-D-iAVHx-.d.cts.map +0 -1
  419. package/dist/keystore-B4PRlbgE.mjs +0 -81
  420. package/dist/keystore-B4PRlbgE.mjs.map +0 -1
  421. package/dist/keystore-DgGRj2Yy.cjs +0 -98
  422. package/dist/keystore-DgGRj2Yy.cjs.map +0 -1
  423. package/dist/openapi-Dcbme-Us.cjs +0 -2038
  424. package/dist/openapi-Dcbme-Us.cjs.map +0 -1
  425. package/dist/openapi-vy4JzhUv.mjs +0 -1991
  426. package/dist/openapi-vy4JzhUv.mjs.map +0 -1
  427. package/dist/storage-C-30BD1e.cjs +0 -272
  428. package/dist/storage-C-30BD1e.cjs.map +0 -1
  429. package/dist/storage-P_b3w7uj.mjs +0 -231
  430. package/dist/storage-P_b3w7uj.mjs.map +0 -1
  431. package/dist/sync-B3xxXtJT.mjs +0 -88
  432. package/dist/sync-B3xxXtJT.mjs.map +0 -1
  433. package/dist/sync-D7uTIIEi.cjs +0 -111
  434. package/dist/sync-D7uTIIEi.cjs.map +0 -1
  435. package/dist/types-BGo5TaNE.d.mts.map +0 -1
  436. package/dist/types-C5ZNpUad.d.cts.map +0 -1
  437. package/dist/workspace-CgwmXEtc.mjs.map +0 -1
  438. package/dist/workspace-mFpI_ky_.cjs.map +0 -1
@@ -1,51 +1,3 @@
1
- import { n as __require } from "./rolldown-runtime-BhDjJH2R.mjs";
2
- import { basename, isAbsolute, join } from "node:path";
3
- //#region src/workspace/publicEnv.ts
4
- /**
5
- * All public env-var prefixes the toolbox understands.
6
- *
7
- * Used when resolving incoming var names back to a dependency
8
- * (e.g. `VITE_AUTH_URL` → `auth`). A var matching any of these
9
- * is considered safe to inline into a client bundle.
10
- */
11
- const PUBLIC_ENV_PREFIXES = [
12
- "NEXT_PUBLIC_",
13
- "VITE_",
14
- "EXPO_PUBLIC_"
15
- ];
16
- /**
17
- * Resolve the public env-var prefix that a frontend framework's bundler
18
- * inlines into client code at build time:
19
- *
20
- * - `nextjs` → `NEXT_PUBLIC_`
21
- * - `vite` → `VITE_`
22
- * - `tanstack-start` → `VITE_` (uses Vite under the hood)
23
- * - `expo` → `EXPO_PUBLIC_`
24
- * - `remix` → `''` (Remix exposes via loaders, no prefix convention)
25
- *
26
- * For backend frameworks or unspecified, falls back to `NEXT_PUBLIC_` to
27
- * preserve the historical default. Backend apps never read these vars
28
- * from a bundle, so the prefix only affects scaffolding/symmetry.
29
- */
30
- function getPublicEnvPrefix(framework) {
31
- switch (framework) {
32
- case "vite":
33
- case "tanstack-start": return "VITE_";
34
- case "expo": return "EXPO_PUBLIC_";
35
- case "remix": return "";
36
- case "nextjs": return "NEXT_PUBLIC_";
37
- default: return "NEXT_PUBLIC_";
38
- }
39
- }
40
- /**
41
- * Strip a known public prefix from a var name.
42
- * Returns the un-prefixed name, or `null` if no prefix matched.
43
- */
44
- function stripPublicPrefix(name) {
45
- for (const prefix of PUBLIC_ENV_PREFIXES) if (prefix && name.startsWith(prefix)) return name.slice(prefix.length);
46
- return null;
47
- }
48
- //#endregion
49
1
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js
50
2
  function getEnumValues(entries) {
51
3
  const numericValues = Object.values(entries).filter((v) => typeof v === "number");
@@ -90,6 +42,24 @@ function floatSafeRemainder(val, step) {
90
42
  if (Math.abs(ratio - roundedRatio) < tolerance) return 0;
91
43
  return ratio - roundedRatio;
92
44
  }
45
+ const EVALUATING = /* @__PURE__*/ Symbol("evaluating");
46
+ function defineLazy(object, key, getter) {
47
+ let value = void 0;
48
+ Object.defineProperty(object, key, {
49
+ get() {
50
+ if (value === EVALUATING) return;
51
+ if (value === void 0) {
52
+ value = EVALUATING;
53
+ value = getter();
54
+ }
55
+ return value;
56
+ },
57
+ set(v) {
58
+ Object.defineProperty(object, key, { value: v });
59
+ },
60
+ configurable: true
61
+ });
62
+ }
93
63
  function assignProp(target, prop, value) {
94
64
  Object.defineProperty(target, prop, {
95
65
  value,
@@ -1021,7 +991,7 @@ const uuid = (version) => {
1021
991
  return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
1022
992
  };
1023
993
  /** Practical email validation */
1024
- const email = /^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
994
+ const email$1 = /^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
1025
995
  const _emoji$1 = `^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;
1026
996
  function emoji() {
1027
997
  return new RegExp(_emoji$1, "u");
@@ -1560,7 +1530,7 @@ const $ZodUUID = /*@__PURE__*/ $constructor("$ZodUUID", (inst, def) => {
1560
1530
  $ZodStringFormat.init(inst, def);
1561
1531
  });
1562
1532
  const $ZodEmail = /*@__PURE__*/ $constructor("$ZodEmail", (inst, def) => {
1563
- def.pattern ?? (def.pattern = email);
1533
+ def.pattern ?? (def.pattern = email$1);
1564
1534
  $ZodStringFormat.init(inst, def);
1565
1535
  });
1566
1536
  function canParseURL(input) {
@@ -2442,6 +2412,114 @@ function handleIntersectionResults(result, left, right) {
2442
2412
  result.value = merged.data;
2443
2413
  return result;
2444
2414
  }
2415
+ const $ZodTuple = /*@__PURE__*/ $constructor("$ZodTuple", (inst, def) => {
2416
+ $ZodType.init(inst, def);
2417
+ const items = def.items;
2418
+ const memo = globalConfig.memoizer;
2419
+ memo?.attach(inst);
2420
+ inst._zod.parse = (payload, ctx) => {
2421
+ const input = payload.value;
2422
+ if (!Array.isArray(input)) {
2423
+ payload.issues.push({
2424
+ input,
2425
+ inst,
2426
+ expected: "tuple",
2427
+ code: "invalid_type"
2428
+ });
2429
+ return payload;
2430
+ }
2431
+ payload.value = memo ? memo.alloc(inst, payload, [], ctx) : [];
2432
+ const proms = [];
2433
+ const optinStart = getTupleOptStart(items, "optin");
2434
+ const optoutStart = getTupleOptStart(items, "optout");
2435
+ if (!def.rest) {
2436
+ if (input.length < optinStart) {
2437
+ payload.issues.push({
2438
+ code: "too_small",
2439
+ minimum: optinStart,
2440
+ inclusive: true,
2441
+ input,
2442
+ inst,
2443
+ origin: "array"
2444
+ });
2445
+ return payload;
2446
+ }
2447
+ if (input.length > items.length) payload.issues.push({
2448
+ code: "too_big",
2449
+ maximum: items.length,
2450
+ inclusive: true,
2451
+ input,
2452
+ inst,
2453
+ origin: "array"
2454
+ });
2455
+ }
2456
+ const itemResults = new Array(items.length);
2457
+ const abortEarly = def.rest ? ctx?.abortEarly : void 0;
2458
+ let itemAborted = false;
2459
+ for (let i = 0; i < items.length; i++) {
2460
+ const r = items[i]._zod.run({
2461
+ value: input[i],
2462
+ issues: []
2463
+ }, ctx);
2464
+ if (r instanceof Promise) proms.push(r.then((rr) => {
2465
+ itemResults[i] = rr;
2466
+ }));
2467
+ else {
2468
+ itemResults[i] = r;
2469
+ if (abortEarly && !itemAborted && r.issues.length) itemAborted = aborted(r);
2470
+ }
2471
+ }
2472
+ if (def.rest && !itemAborted) {
2473
+ let i = items.length - 1;
2474
+ const rest = input.slice(items.length);
2475
+ let seen = payload.issues.length;
2476
+ for (const el of rest) {
2477
+ if (abortEarly && payload.issues.length !== seen) {
2478
+ if (aborted(payload, seen)) break;
2479
+ seen = payload.issues.length;
2480
+ }
2481
+ i++;
2482
+ const result = def.rest._zod.run({
2483
+ value: el,
2484
+ issues: []
2485
+ }, ctx);
2486
+ if (result instanceof Promise) proms.push(result.then((r) => handleTupleResult(r, payload, i)));
2487
+ else handleTupleResult(result, payload, i);
2488
+ }
2489
+ }
2490
+ if (proms.length) return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
2491
+ return handleTupleResults(itemResults, payload, items, input, optoutStart);
2492
+ };
2493
+ });
2494
+ function getTupleOptStart(items, key) {
2495
+ for (let i = items.length - 1; i >= 0; i--) if (!(key === "optin" ? items[i]._zod.optin !== void 0 : items[i]._zod.optout === "optional")) return i + 1;
2496
+ return 0;
2497
+ }
2498
+ function handleTupleResult(result, final, index) {
2499
+ if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
2500
+ final.value[index] = result.value;
2501
+ }
2502
+ function handleTupleResults(itemResults, final, items, input, optoutStart) {
2503
+ for (let i = 0; i < items.length; i++) {
2504
+ const r = itemResults[i];
2505
+ const isPresent = i < input.length;
2506
+ if (!isPresent && i >= optoutStart && items[i]._zod.optin === "optional") {
2507
+ final.value.length = i;
2508
+ break;
2509
+ }
2510
+ if (r.issues.length) {
2511
+ if (!isPresent && i >= optoutStart) {
2512
+ final.value.length = i;
2513
+ break;
2514
+ }
2515
+ final.issues.push(...prefixIssues(i, r.issues));
2516
+ }
2517
+ final.value[i] = r.value;
2518
+ }
2519
+ for (let i = final.value.length - 1; i >= input.length; i--) if (items[i]._zod.optout === "optional" && final.value[i] === void 0) final.value.length = i;
2520
+ else break;
2521
+ return final;
2522
+ }
2445
2523
  const $ZodRecord = /*@__PURE__*/ $constructor("$ZodRecord", (inst, def) => {
2446
2524
  $ZodType.init(inst, def);
2447
2525
  const memo = globalConfig.memoizer;
@@ -2810,6 +2888,21 @@ function handleReadonlyResult(payload) {
2810
2888
  if (!payload.memo) payload.value = Object.freeze(payload.value);
2811
2889
  return payload;
2812
2890
  }
2891
+ const $ZodLazy = /*@__PURE__*/ $constructor("$ZodLazy", (inst, def) => {
2892
+ $ZodType.init(inst, def);
2893
+ defineLazy(inst._zod, "innerType", () => {
2894
+ const d = def;
2895
+ if (!d._cachedInner) d._cachedInner = def.getter();
2896
+ return d._cachedInner;
2897
+ });
2898
+ defineLazyInternal(inst, "pattern", (zod) => zod.innerType?._zod?.pattern);
2899
+ defineLazyInternal(inst, "propValues", (zod) => zod.innerType?._zod?.propValues);
2900
+ defineLazyInternal(inst, "optin", (zod) => zod.innerType?._zod?.optin ?? void 0);
2901
+ defineLazyInternal(inst, "optout", (zod) => zod.innerType?._zod?.optout ?? void 0);
2902
+ inst._zod.parse = (payload, ctx) => {
2903
+ return inst._zod.innerType._zod.run(payload, ctx);
2904
+ };
2905
+ });
2813
2906
  const $ZodCustom = /*@__PURE__*/ $constructor("$ZodCustom", (inst, def) => {
2814
2907
  $ZodCheck.init(inst, def);
2815
2908
  $ZodType.init(inst, def);
@@ -4343,9 +4436,33 @@ const numberProcessor = (schema, ctx, _json, params) => {
4343
4436
  const booleanProcessor = (_schema, _ctx, json, _params) => {
4344
4437
  json.type = "boolean";
4345
4438
  };
4439
+ const bigintProcessor = (schema, ctx, json, params) => {
4440
+ handleUnrepresentable(schema, ctx, json, params, "BigInt cannot be represented in JSON Schema");
4441
+ };
4442
+ const symbolProcessor = (schema, ctx, json, params) => {
4443
+ handleUnrepresentable(schema, ctx, json, params, "Symbols cannot be represented in JSON Schema");
4444
+ };
4445
+ const nullProcessor = (_schema, ctx, json, _params) => {
4446
+ if (ctx.target === "openapi-3.0") {
4447
+ json.type = "string";
4448
+ json.nullable = true;
4449
+ json.enum = [null];
4450
+ } else json.type = "null";
4451
+ };
4452
+ const undefinedProcessor = (schema, ctx, json, params) => {
4453
+ handleUnrepresentable(schema, ctx, json, params, "Undefined cannot be represented in JSON Schema");
4454
+ };
4455
+ const voidProcessor = (schema, ctx, json, params) => {
4456
+ handleUnrepresentable(schema, ctx, json, params, "Void cannot be represented in JSON Schema");
4457
+ };
4346
4458
  const neverProcessor = (_schema, _ctx, json, _params) => {
4347
4459
  json.not = {};
4348
4460
  };
4461
+ const anyProcessor = (_schema, _ctx, _json, _params) => {};
4462
+ const unknownProcessor = (_schema, _ctx, _json, _params) => {};
4463
+ const dateProcessor = (schema, ctx, json, params) => {
4464
+ handleUnrepresentable(schema, ctx, json, params, "Date cannot be represented in JSON Schema");
4465
+ };
4349
4466
  const enumProcessor = (schema, _ctx, json, _params) => {
4350
4467
  const def = schema._zod.def;
4351
4468
  const values = getEnumValues(def.entries);
@@ -4383,12 +4500,47 @@ const literalProcessor = (schema, ctx, json, params) => {
4383
4500
  json.enum = vals;
4384
4501
  }
4385
4502
  };
4503
+ const nanProcessor = (schema, ctx, json, params) => {
4504
+ handleUnrepresentable(schema, ctx, json, params, "NaN cannot be represented in JSON Schema");
4505
+ };
4506
+ const templateLiteralProcessor = (schema, _ctx, json, _params) => {
4507
+ const _json = json;
4508
+ const pattern = schema._zod.pattern;
4509
+ if (!pattern) throw new Error("Pattern not found in template literal");
4510
+ _json.type = "string";
4511
+ _json.pattern = pattern.source;
4512
+ };
4513
+ const fileProcessor = (schema, _ctx, json, _params) => {
4514
+ const _json = json;
4515
+ _json.type = "string";
4516
+ _json.format = "binary";
4517
+ _json.contentEncoding = "binary";
4518
+ const { minimum, maximum, mime } = aggregateChecks(schema);
4519
+ if (minimum !== void 0) _json.minLength = minimum;
4520
+ if (maximum !== void 0) _json.maxLength = maximum;
4521
+ if (!mime) return;
4522
+ if (mime.length === 0) _json.not = {};
4523
+ else if (mime.length === 1) _json.contentMediaType = mime[0];
4524
+ else _json.anyOf = mime.map((m) => ({ contentMediaType: m }));
4525
+ };
4526
+ const successProcessor = (_schema, _ctx, json, _params) => {
4527
+ json.type = "boolean";
4528
+ };
4386
4529
  const customProcessor = (schema, ctx, json, params) => {
4387
4530
  handleUnrepresentable(schema, ctx, json, params, "Custom types cannot be represented in JSON Schema");
4388
4531
  };
4532
+ const functionProcessor = (schema, ctx, json, params) => {
4533
+ handleUnrepresentable(schema, ctx, json, params, "Function types cannot be represented in JSON Schema");
4534
+ };
4389
4535
  const transformProcessor = (schema, ctx, json, params) => {
4390
4536
  handleUnrepresentable(schema, ctx, json, params, "Transforms cannot be represented in JSON Schema");
4391
4537
  };
4538
+ const mapProcessor = (schema, ctx, json, params) => {
4539
+ handleUnrepresentable(schema, ctx, json, params, "Map cannot be represented in JSON Schema");
4540
+ };
4541
+ const setProcessor = (schema, ctx, json, params) => {
4542
+ handleUnrepresentable(schema, ctx, json, params, "Set cannot be represented in JSON Schema");
4543
+ };
4392
4544
  const arrayProcessor = (schema, ctx, _json, params) => {
4393
4545
  const json = _json;
4394
4546
  const def = schema._zod.def;
@@ -4473,6 +4625,58 @@ const intersectionProcessor = (schema, ctx, json, params) => {
4473
4625
  json.allOf = allOf;
4474
4626
  ctx.intersections.push(allOf);
4475
4627
  };
4628
+ const tupleProcessor = (schema, ctx, _json, params) => {
4629
+ const json = _json;
4630
+ const def = schema._zod.def;
4631
+ json.type = "array";
4632
+ const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
4633
+ const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
4634
+ const prefixItems = def.items.map((x, i) => processSchema(x, ctx, {
4635
+ ...params,
4636
+ path: [
4637
+ ...params.path,
4638
+ prefixPath,
4639
+ i
4640
+ ]
4641
+ }));
4642
+ const rest = def.rest ? processSchema(def.rest, ctx, {
4643
+ ...params,
4644
+ path: [
4645
+ ...params.path,
4646
+ restPath,
4647
+ ...ctx.target === "openapi-3.0" ? [def.items.length] : []
4648
+ ]
4649
+ }) : null;
4650
+ let minItems = def.items.length;
4651
+ while (minItems > 0) {
4652
+ const item = def.items[minItems - 1];
4653
+ if (!(ctx.io === "input" ? inputOptin(item) !== void 0 : item._zod.optout === "optional")) break;
4654
+ minItems--;
4655
+ }
4656
+ const maxItems = def.items.length;
4657
+ const isClosed = !def.rest;
4658
+ if (ctx.target === "draft-2020-12") {
4659
+ json.prefixItems = prefixItems;
4660
+ if (isClosed) json.items = false;
4661
+ else if (rest) json.items = rest;
4662
+ if (minItems > 0) json.minItems = minItems;
4663
+ if (isClosed) json.maxItems = maxItems;
4664
+ } else if (ctx.target === "openapi-3.0") {
4665
+ json.items = { anyOf: prefixItems };
4666
+ if (rest) json.items.anyOf.push(rest);
4667
+ if (minItems > 0) json.minItems = minItems;
4668
+ if (isClosed) json.maxItems = maxItems;
4669
+ } else {
4670
+ json.items = prefixItems;
4671
+ if (isClosed) json.additionalItems = false;
4672
+ else if (rest) json.additionalItems = rest;
4673
+ if (minItems > 0) json.minItems = minItems;
4674
+ if (isClosed) json.maxItems = maxItems;
4675
+ }
4676
+ const { minimum, maximum } = aggregateChecks(schema);
4677
+ if (typeof minimum === "number") json.minItems = minimum;
4678
+ if (typeof maximum === "number") json.maxItems = maximum;
4679
+ };
4476
4680
  /** JSON object keys are always strings, so a numeric record key schema is re-expressed over the
4477
4681
  * numeric-string form the record parser matches. Deferred to `finalize`, after the flatten: a key
4478
4682
  * behind a wrapper only carries its own `type` before then, and a union key only has its branches.
@@ -4650,12 +4854,99 @@ const readonlyProcessor = (schema, ctx, json, params) => {
4650
4854
  seen.ref = def.innerType;
4651
4855
  json.readOnly = true;
4652
4856
  };
4857
+ const promiseProcessor = (schema, ctx, _json, params) => {
4858
+ const def = schema._zod.def;
4859
+ processSchema(def.innerType, ctx, params);
4860
+ const seen = ctx.seen.get(schema);
4861
+ seen.ref = def.innerType;
4862
+ };
4653
4863
  const optionalProcessor = (schema, ctx, _json, params) => {
4654
4864
  const def = schema._zod.def;
4655
4865
  processSchema(def.innerType, ctx, params);
4656
4866
  const seen = ctx.seen.get(schema);
4657
4867
  seen.ref = def.innerType;
4658
4868
  };
4869
+ const lazyProcessor = (schema, ctx, _json, params) => {
4870
+ const innerType = schema._zod.innerType;
4871
+ processSchema(innerType, ctx, params);
4872
+ const seen = ctx.seen.get(schema);
4873
+ seen.ref = innerType;
4874
+ };
4875
+ const allProcessors = {
4876
+ string: stringProcessor,
4877
+ number: numberProcessor,
4878
+ boolean: booleanProcessor,
4879
+ bigint: bigintProcessor,
4880
+ symbol: symbolProcessor,
4881
+ null: nullProcessor,
4882
+ undefined: undefinedProcessor,
4883
+ void: voidProcessor,
4884
+ never: neverProcessor,
4885
+ any: anyProcessor,
4886
+ unknown: unknownProcessor,
4887
+ date: dateProcessor,
4888
+ enum: enumProcessor,
4889
+ literal: literalProcessor,
4890
+ nan: nanProcessor,
4891
+ template_literal: templateLiteralProcessor,
4892
+ file: fileProcessor,
4893
+ success: successProcessor,
4894
+ custom: customProcessor,
4895
+ function: functionProcessor,
4896
+ transform: transformProcessor,
4897
+ map: mapProcessor,
4898
+ set: setProcessor,
4899
+ array: arrayProcessor,
4900
+ object: objectProcessor,
4901
+ union: unionProcessor,
4902
+ intersection: intersectionProcessor,
4903
+ tuple: tupleProcessor,
4904
+ record: recordProcessor,
4905
+ nullable: nullableProcessor,
4906
+ nonoptional: nonoptionalProcessor,
4907
+ default: defaultProcessor,
4908
+ prefault: prefaultProcessor,
4909
+ catch: catchProcessor,
4910
+ pipe: pipeProcessor,
4911
+ readonly: readonlyProcessor,
4912
+ promise: promiseProcessor,
4913
+ optional: optionalProcessor,
4914
+ lazy: lazyProcessor
4915
+ };
4916
+ function toJSONSchema(input, params) {
4917
+ if ("_idmap" in input) {
4918
+ const registry = input;
4919
+ const ctx = initializeContext({
4920
+ ...params,
4921
+ processors: allProcessors
4922
+ });
4923
+ const defs = {};
4924
+ for (const entry of registry._idmap.entries()) {
4925
+ const [_, schema] = entry;
4926
+ processSchema(schema, ctx);
4927
+ }
4928
+ const schemas = {};
4929
+ ctx.external = {
4930
+ registry,
4931
+ uri: params?.uri,
4932
+ defs
4933
+ };
4934
+ for (const entry of registry._idmap.entries()) {
4935
+ const [key, schema] = entry;
4936
+ extractDefs(ctx, schema);
4937
+ assignProp(schemas, key, finalize(ctx, schema));
4938
+ }
4939
+ if (Object.keys(defs).length > 0) schemas.__shared = { [ctx.target === "draft-2020-12" ? "$defs" : "definitions"]: defs };
4940
+ return { schemas };
4941
+ }
4942
+ const ctx = initializeContext({
4943
+ ...params,
4944
+ processors: allProcessors
4945
+ });
4946
+ processSchema(input, ctx);
4947
+ extractDefs(ctx, input);
4948
+ return finalize(ctx, input);
4949
+ }
4659
4950
  //#endregion
4660
4951
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/errors.js
4661
4952
  const _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
@@ -4708,7 +4999,7 @@ const initializer = (inst, issues) => {
4708
4999
  const ZodRealError = /*@__PURE__*/ $constructor("ZodError", initializer, void 0, { Parent: Error });
4709
5000
  //#endregion
4710
5001
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/parse.js
4711
- const parse$1 = /* @__PURE__ */ _parse(ZodRealError);
5002
+ const parse = /* @__PURE__ */ _parse(ZodRealError);
4712
5003
  const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
4713
5004
  const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
4714
5005
  const safeParseAsync = /* @__PURE__ */ _safeParseAsync(ZodRealError);
@@ -4840,7 +5131,7 @@ const ZodType = /*@__PURE__*/ $constructor("ZodType", (inst, def) => {
4840
5131
  own(this, "~standard", value);
4841
5132
  },
4842
5133
  parse: function _parse(data, params) {
4843
- return parse$1(this, data, params, { callee: _parse });
5134
+ return parse(this, data, params, { callee: _parse });
4844
5135
  },
4845
5136
  parseAsync: async function _parseAsync(data, params) {
4846
5137
  return await parseAsync(this, data, params, { callee: _parseAsync });
@@ -5063,6 +5354,9 @@ const ZodEmail = /*@__PURE__*/ $constructor("ZodEmail", (inst, def) => {
5063
5354
  $ZodEmail.init(inst, def);
5064
5355
  ZodStringFormat.init(inst, def);
5065
5356
  });
5357
+ function email(params) {
5358
+ return /* @__PURE__ */ _email(ZodEmail, params);
5359
+ }
5066
5360
  const ZodGUID = /*@__PURE__*/ $constructor("ZodGUID", (inst, def) => {
5067
5361
  $ZodGUID.init(inst, def);
5068
5362
  ZodStringFormat.init(inst, def);
@@ -5327,6 +5621,14 @@ function object(shape, params) {
5327
5621
  };
5328
5622
  return new ZodObject(def);
5329
5623
  }
5624
+ function looseObject(shape, params) {
5625
+ return new ZodObject({
5626
+ type: "object",
5627
+ shape,
5628
+ catchall: unknown(),
5629
+ ...normalizeParams(params)
5630
+ });
5631
+ }
5330
5632
  const ZodUnion = /*@__PURE__*/ $constructor("ZodUnion", (inst, def) => {
5331
5633
  $ZodUnion.init(inst, def);
5332
5634
  ZodType.init(inst, def);
@@ -5364,6 +5666,39 @@ function intersection(left, right) {
5364
5666
  right
5365
5667
  });
5366
5668
  }
5669
+ const ZodTuple = /*@__PURE__*/ $constructor("ZodTuple", (inst, def) => {
5670
+ _ensureDefaultMemoizer();
5671
+ $ZodTuple.init(inst, def);
5672
+ ZodType.init(inst, def);
5673
+ inst._zod.processJSONSchema = (ctx, json, params) => tupleProcessor(inst, ctx, json, params);
5674
+ }, {
5675
+ rest(rest) {
5676
+ return this.clone({
5677
+ ...this._zod.def,
5678
+ rest
5679
+ });
5680
+ },
5681
+ partial() {
5682
+ const def = this._zod.def;
5683
+ if (def.checks?.length) throw new Error(".partial() cannot be used on tuple schemas containing refinements");
5684
+ return this.clone({
5685
+ ...def,
5686
+ items: def.items.map((item) => new ZodOptional({
5687
+ type: "optional",
5688
+ innerType: item
5689
+ }))
5690
+ });
5691
+ }
5692
+ });
5693
+ function tuple(items, _paramsOrRest, _params) {
5694
+ const hasRest = _paramsOrRest instanceof $ZodType;
5695
+ return new ZodTuple({
5696
+ type: "tuple",
5697
+ items,
5698
+ rest: hasRest ? _paramsOrRest : null,
5699
+ ...normalizeParams(hasRest ? _params : _paramsOrRest)
5700
+ });
5701
+ }
5367
5702
  const ZodRecord = /*@__PURE__*/ $constructor("ZodRecord", (inst, def) => {
5368
5703
  _ensureDefaultMemoizer();
5369
5704
  $ZodRecord.init(inst, def);
@@ -5594,6 +5929,18 @@ function readonly(innerType) {
5594
5929
  innerType
5595
5930
  });
5596
5931
  }
5932
+ const ZodLazy = /*@__PURE__*/ $constructor("ZodLazy", (inst, def) => {
5933
+ $ZodLazy.init(inst, def);
5934
+ ZodType.init(inst, def);
5935
+ inst._zod.processJSONSchema = (ctx, json, params) => lazyProcessor(inst, ctx, json, params);
5936
+ inst.unwrap = () => inst._zod.def.getter();
5937
+ });
5938
+ function lazy(getter) {
5939
+ return new ZodLazy({
5940
+ type: "lazy",
5941
+ getter
5942
+ });
5943
+ }
5597
5944
  const ZodCustom = /*@__PURE__*/ $constructor("ZodCustom", (inst, def) => {
5598
5945
  $ZodCustom.init(inst, def);
5599
5946
  ZodType.init(inst, def);
@@ -5609,944 +5956,113 @@ function superRefine(fn, params) {
5609
5956
  return /* @__PURE__ */ _superRefine(fn, params);
5610
5957
  }
5611
5958
  //#endregion
5612
- //#region src/workspace/stages.ts
5613
- /**
5614
- * What `gkm test` runs as. The CLI's own, so no project stage may take it:
5615
- * its containers are torn down and rebuilt between runs.
5616
- */
5617
- const TEST_STAGE = "test";
5618
- /** A stage becomes part of every physical name, so it has to fit in one. */
5619
- const STAGE_NAME = /^[a-z][a-z0-9-]*$/;
5620
- /** Everything wrong with one stage name, or nothing. */
5621
- function nameProblems(name) {
5622
- const problems = [];
5623
- if (!STAGE_NAME.test(name)) problems.push(`stage "${name}" must be lowercase letters, digits and hyphens, starting with a letter`);
5624
- if (name === "test") problems.push(`stage "${TEST_STAGE}" is reserved for gkm test`);
5625
- return problems;
5626
- }
5627
- /** Everything wrong with a list of deployed stages on its own. */
5628
- function deployedProblems(deployed) {
5629
- const problems = deployed.flatMap(nameProblems);
5630
- const seen = /* @__PURE__ */ new Set();
5631
- for (const name of deployed) {
5632
- if (seen.has(name)) problems.push(`stage "${name}" is listed twice`);
5633
- seen.add(name);
5634
- }
5635
- return problems;
5636
- }
5637
- /** Everything wrong with a stages block, or nothing. */
5638
- function stageProblems(stages) {
5639
- if (!stages) return ["`stages` is required, e.g. stages: { local: 'dev', deployed: ['prod'] }"];
5640
- const { local, deployed, protected: kept = [] } = stages;
5641
- const problems = [...nameProblems(local), ...deployedProblems(deployed)];
5642
- if (deployed.includes(local)) problems.push(`"${local}" is both the local stage and a deployed one; they would share secrets`);
5643
- for (const name of kept) if (!deployed.includes(name)) problems.push(`protected stage "${name}" is not a deployed stage`);
5644
- return problems;
5645
- }
5646
- /** The stages block, or an error naming everything wrong with it. */
5647
- function validateStages(stages) {
5648
- const problems = stageProblems(stages);
5649
- if (problems.length) throw new InvalidStages(problems);
5650
- return stages;
5651
- }
5652
- /** Refuses a stage the project does not deploy to. */
5653
- function assertDeployedStage(stages, stage) {
5654
- if (!stages.deployed.includes(stage)) throw new UndeclaredStage(stage, stages.deployed);
5655
- }
5656
- /** A stages block — in gkm.config.ts or from `gkm init`'s flags — that breaks a rule. */
5657
- var InvalidStages = class extends Error {
5658
- problems;
5659
- constructor(problems) {
5660
- super(`Invalid stages:\n ${problems.join("\n ")}`);
5661
- this.problems = problems;
5662
- this.name = "InvalidStages";
5663
- }
5664
- };
5665
- /**
5666
- * A stage the project does not deploy to. Refused before anything is
5667
- * provisioned, so a typo does not become a second environment.
5668
- */
5669
- var UndeclaredStage = class extends Error {
5670
- stage;
5671
- deployed;
5672
- constructor(stage, deployed) {
5673
- super(`"${stage}" is not a deployed stage. gkm.config.ts deploys to: ${deployed.join(", ") || "nothing yet"}.`);
5674
- this.stage = stage;
5675
- this.deployed = deployed;
5676
- this.name = "UndeclaredStage";
5959
+ Object.defineProperty(exports, "_enum", {
5960
+ enumerable: true,
5961
+ get: function() {
5962
+ return _enum;
5677
5963
  }
5678
- };
5679
- //#endregion
5680
- //#region src/workspace/schema.ts
5681
- /**
5682
- * Routes can be a string glob, array of globs, or a partitioned config
5683
- * with glob paths and a partition function.
5684
- */
5685
- const RoutesSchema = union([
5686
- string(),
5687
- array(string()),
5688
- object({
5689
- paths: union([string(), array(string())]),
5690
- partition: custom((val) => typeof val === "function")
5691
- })
5692
- ]);
5693
- /**
5694
- * Telescope configuration schema.
5695
- */
5696
- const TelescopeConfigSchema = object({
5697
- enabled: boolean().optional(),
5698
- port: number().optional(),
5699
- path: string().optional(),
5700
- ignore: array(string()).optional(),
5701
- recordBody: boolean().optional(),
5702
- maxEntries: number().optional(),
5703
- websocket: boolean().optional()
5704
- });
5705
- /**
5706
- * Studio configuration schema.
5707
- */
5708
- const StudioConfigSchema = object({
5709
- enabled: boolean().optional(),
5710
- path: string().optional(),
5711
- schema: string().optional()
5712
5964
  });
5713
- /**
5714
- * OpenAPI configuration schema.
5715
- */
5716
- const OpenApiConfigSchema = object({
5717
- enabled: boolean().optional(),
5718
- title: string().optional(),
5719
- version: string().optional(),
5720
- description: string().optional()
5721
- });
5722
- /**
5723
- * Hooks configuration schema.
5724
- */
5725
- const HooksConfigSchema = object({ server: string().optional() });
5726
- /**
5727
- * Combined framework schema (backend, frontend, or mobile).
5728
- */
5729
- const FrameworkSchema = union([
5730
- _enum([
5731
- "hono",
5732
- "better-auth",
5733
- "express",
5734
- "fastify"
5735
- ]),
5736
- _enum([
5737
- "nextjs",
5738
- "remix",
5739
- "vite",
5740
- "tanstack-start"
5741
- ]),
5742
- _enum(["expo"])
5743
- ]);
5744
- /** Frontend framework values, kept in sync with FrontendFrameworkSchema. */
5745
- const FRONTEND_FRAMEWORKS = [
5746
- "nextjs",
5747
- "remix",
5748
- "vite",
5749
- "tanstack-start"
5750
- ];
5751
- /** Mobile framework values, kept in sync with MobileFrameworkSchema. */
5752
- const MOBILE_FRAMEWORKS = ["expo"];
5753
- /**
5754
- * Deploy target schema.
5755
- * Currently only 'dokploy' is supported.
5756
- * 'vercel' and 'cloudflare' are planned for Phase 2.
5757
- */
5758
- const DeployTargetSchema = _enum([
5759
- "dokploy",
5760
- "vercel",
5761
- "cloudflare"
5762
- ]);
5763
- /**
5764
- * Supported deploy targets (Phase 1).
5765
- */
5766
- const SUPPORTED_DEPLOY_TARGETS = ["dokploy"];
5767
- /**
5768
- * Phase 2 deploy targets (not yet implemented).
5769
- */
5770
- const PHASE_2_DEPLOY_TARGETS = ["vercel", "cloudflare"];
5771
- /**
5772
- * Check if a deploy target is supported.
5773
- */
5774
- function isDeployTargetSupported(target) {
5775
- return SUPPORTED_DEPLOY_TARGETS.includes(target);
5776
- }
5777
- /**
5778
- * Check if a deploy target is planned for Phase 2.
5779
- */
5780
- function isPhase2DeployTarget(target) {
5781
- return PHASE_2_DEPLOY_TARGETS.includes(target);
5782
- }
5783
- /**
5784
- * Get error message for unsupported deploy targets.
5785
- */
5786
- function getDeployTargetError(target, appName) {
5787
- if (isPhase2DeployTarget(target)) return `Deploy target "${target}"${appName ? ` for app "${appName}"` : ""} is coming in Phase 2. Currently only "dokploy" is supported.`;
5788
- return `Unknown deploy target: ${target}. Supported: dokploy. Coming in Phase 2: vercel, cloudflare.`;
5789
- }
5790
- /**
5791
- * Dokploy workspace configuration schema.
5792
- * Supports either a single endpoint or per-stage endpoints.
5793
- */
5794
- const DokployWorkspaceConfigSchema = object({
5795
- /** Single endpoint for all stages */
5796
- endpoint: url("Dokploy endpoint must be a valid URL").optional(),
5797
- /** Per-stage endpoints (stage name -> endpoint URL) */
5798
- endpoints: record(string(), url("Endpoint must be a valid URL")).optional(),
5799
- registry: string().optional(),
5800
- registryId: string().optional(),
5801
- /** Per-stage domain configuration (stage name -> base domain) */
5802
- domains: record(string(), string()).optional()
5803
- }).refine((data) => data.endpoint || data.endpoints, { message: "Either endpoint or endpoints must be provided" });
5804
- /**
5805
- * Valid AWS regions.
5806
- */
5807
- const AwsRegionSchema = _enum([
5808
- "us-east-1",
5809
- "us-east-2",
5810
- "us-west-1",
5811
- "us-west-2",
5812
- "af-south-1",
5813
- "ap-east-1",
5814
- "ap-south-1",
5815
- "ap-south-2",
5816
- "ap-southeast-1",
5817
- "ap-southeast-2",
5818
- "ap-southeast-3",
5819
- "ap-southeast-4",
5820
- "ap-northeast-1",
5821
- "ap-northeast-2",
5822
- "ap-northeast-3",
5823
- "ca-central-1",
5824
- "eu-central-1",
5825
- "eu-central-2",
5826
- "eu-west-1",
5827
- "eu-west-2",
5828
- "eu-west-3",
5829
- "eu-south-1",
5830
- "eu-south-2",
5831
- "eu-north-1",
5832
- "me-south-1",
5833
- "me-central-1",
5834
- "sa-east-1"
5835
- ]);
5836
- /**
5837
- * DNS record types supported across providers.
5838
- */
5839
- const DnsRecordTypeSchema = _enum([
5840
- "A",
5841
- "AAAA",
5842
- "CNAME",
5843
- "MX",
5844
- "TXT",
5845
- "NS",
5846
- "SRV",
5847
- "CAA"
5848
- ]);
5849
- object({
5850
- /** Subdomain name (e.g., 'api' for api.example.com, '@' for root) */
5851
- name: string(),
5852
- /** Record type */
5853
- type: DnsRecordTypeSchema,
5854
- /** TTL in seconds */
5855
- ttl: number().int().positive(),
5856
- /** Record values */
5857
- values: array(string())
5858
- });
5859
- object({
5860
- /** The record that was upserted */
5861
- record: object({
5862
- /** Subdomain name (e.g., 'api' for api.example.com, '@' for root) */
5863
- name: string(),
5864
- /** Record type */
5865
- type: DnsRecordTypeSchema,
5866
- /** TTL in seconds */
5867
- ttl: number().int().positive(),
5868
- /** Record value (IP address, hostname, etc.) */
5869
- value: string()
5870
- }),
5871
- /** Whether the record was created (true) or updated (false) */
5872
- created: boolean(),
5873
- /** Whether the record already existed with the same value */
5874
- unchanged: boolean()
5875
- });
5876
- /**
5877
- * Hostinger DNS provider config (without domain - domain is the record key).
5878
- */
5879
- const HostingerDnsProviderSchema = object({
5880
- provider: literal("hostinger"),
5881
- /** TTL in seconds (default: 300) */
5882
- ttl: number().int().positive().optional()
5883
- });
5884
- /**
5885
- * Route53 DNS provider config (without domain - domain is the record key).
5886
- */
5887
- const Route53DnsProviderSchema = object({
5888
- provider: literal("route53"),
5889
- /** AWS region (optional - uses AWS_REGION env var if not provided) */
5890
- region: AwsRegionSchema.optional(),
5891
- /** AWS profile name (optional - uses default credential chain if not provided) */
5892
- profile: string().optional(),
5893
- /** Hosted zone ID (optional - auto-detected from domain if not provided) */
5894
- hostedZoneId: string().optional(),
5895
- /** TTL in seconds (default: 300) */
5896
- ttl: number().int().positive().optional()
5897
- });
5898
- /**
5899
- * Cloudflare DNS provider config (placeholder for future).
5900
- */
5901
- const CloudflareDnsProviderSchema = object({
5902
- provider: literal("cloudflare"),
5903
- /** TTL in seconds (default: 300) */
5904
- ttl: number().int().positive().optional()
5905
- });
5906
- /**
5907
- * Manual DNS configuration (user handles DNS themselves).
5908
- */
5909
- const ManualDnsProviderSchema = object({ provider: literal("manual") });
5910
- /**
5911
- * Custom DNS provider config (user-provided implementation).
5912
- */
5913
- const CustomDnsProviderSchema = object({
5914
- /** Custom DnsProvider implementation */
5915
- provider: custom((val) => typeof val === "object" && val !== null && typeof val.name === "string" && typeof val.getRecords === "function" && typeof val.upsertRecords === "function", { message: "Custom DNS provider must implement name, getRecords(), and upsertRecords() methods" }),
5916
- /** TTL in seconds (default: 300) */
5917
- ttl: number().int().positive().optional()
5918
- });
5919
- /**
5920
- * Single DNS provider config (for one domain).
5921
- */
5922
- const DnsProviderSchema = union([discriminatedUnion("provider", [
5923
- HostingerDnsProviderSchema,
5924
- Route53DnsProviderSchema,
5925
- CloudflareDnsProviderSchema,
5926
- ManualDnsProviderSchema
5927
- ]), CustomDnsProviderSchema]);
5928
- /**
5929
- * DNS configuration schema.
5930
- *
5931
- * Maps root domains to their DNS provider configuration.
5932
- * Example:
5933
- * ```
5934
- * dns: {
5935
- * 'geekmidas.dev': { provider: 'hostinger' },
5936
- * 'geekmidas.com': { provider: 'route53' },
5937
- * }
5938
- * ```
5939
- *
5940
- * Supported providers:
5941
- * - 'hostinger': Use Hostinger DNS API
5942
- * - 'route53': Use AWS Route53
5943
- * - 'cloudflare': Use Cloudflare DNS API (future)
5944
- * - 'manual': Don't create records, just print required records
5945
- * - Custom: Provide a DnsProvider implementation
5946
- */
5947
- const DnsConfigSchema = record(string(), DnsProviderSchema);
5948
- const HostingerDnsConfigSchema = HostingerDnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
5949
- const Route53DnsConfigSchema = Route53DnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
5950
- const CloudflareDnsConfigSchema = CloudflareDnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
5951
- const ManualDnsConfigSchema = ManualDnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
5952
- const CustomDnsConfigSchema = CustomDnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
5953
- /**
5954
- * Combined DNS config that supports both new multi-domain and legacy single-domain formats.
5955
- */
5956
- const DnsConfigWithLegacySchema = union([DnsConfigSchema, union([discriminatedUnion("provider", [
5957
- HostingerDnsConfigSchema,
5958
- Route53DnsConfigSchema,
5959
- CloudflareDnsConfigSchema,
5960
- ManualDnsConfigSchema
5961
- ]), CustomDnsConfigSchema])]);
5962
- /**
5963
- * Backups configuration schema.
5964
- *
5965
- * Configures automatic backup destinations for database services.
5966
- * On first deploy, creates S3 bucket with unique name and IAM credentials.
5967
- */
5968
- const BackupsConfigSchema = object({
5969
- /** Backup storage type (currently only 's3' supported) */
5970
- type: literal("s3"),
5971
- /** AWS profile name for creating bucket/IAM resources */
5972
- profile: string().optional(),
5973
- /** AWS region for the backup bucket */
5974
- region: AwsRegionSchema,
5975
- /** Cron schedule for backups (default: '0 2 * * *' = 2 AM daily) */
5976
- schedule: string().optional(),
5977
- /** Number of backups to retain (default: 30) */
5978
- retention: number().optional()
5979
- });
5980
- /**
5981
- * Deploy configuration schema.
5982
- */
5983
- const DeployConfigSchema = object({
5984
- default: DeployTargetSchema.optional(),
5985
- dokploy: DokployWorkspaceConfigSchema.optional(),
5986
- dns: DnsConfigWithLegacySchema.optional(),
5987
- backups: BackupsConfigSchema.optional()
5988
- });
5989
- /**
5990
- * Models configuration schema.
5991
- */
5992
- const ModelsConfigSchema = object({
5993
- path: string().optional(),
5994
- schema: _enum(["zod"]).optional()
5995
- });
5996
- /**
5997
- * Shared configuration schema.
5998
- */
5999
- const SharedConfigSchema = object({
6000
- packages: array(string()).optional(),
6001
- models: ModelsConfigSchema.optional()
5965
+ Object.defineProperty(exports, "array", {
5966
+ enumerable: true,
5967
+ get: function() {
5968
+ return array;
5969
+ }
6002
5970
  });
6003
- /**
6004
- * Secrets configuration schema.
6005
- */
6006
- const StagesConfigSchema = object({
6007
- local: string(),
6008
- deployed: array(string()),
6009
- protected: array(string()).optional()
6010
- }).superRefine((stages, ctx) => {
6011
- for (const message of stageProblems(stages)) ctx.addIssue({
6012
- code: "custom",
6013
- message
6014
- });
5971
+ Object.defineProperty(exports, "boolean", {
5972
+ enumerable: true,
5973
+ get: function() {
5974
+ return boolean;
5975
+ }
6015
5976
  });
6016
- const SecretsConfigSchema = object({
6017
- enabled: boolean().optional(),
6018
- algorithm: string().optional(),
6019
- kdf: _enum(["scrypt", "pbkdf2"]).optional()
5977
+ Object.defineProperty(exports, "custom", {
5978
+ enumerable: true,
5979
+ get: function() {
5980
+ return custom;
5981
+ }
6020
5982
  });
6021
- /**
6022
- * Local state provider config.
6023
- */
6024
- const LocalStateConfigSchema = object({ provider: literal("local") });
6025
- /**
6026
- * SSM state provider config (requires region).
6027
- */
6028
- const SSMStateConfigSchema = object({
6029
- provider: literal("ssm"),
6030
- /** AWS region (required for SSM provider) */
6031
- region: AwsRegionSchema,
6032
- /** AWS profile name (optional - uses default credential chain if not provided) */
6033
- profile: string().optional()
5983
+ Object.defineProperty(exports, "discriminatedUnion", {
5984
+ enumerable: true,
5985
+ get: function() {
5986
+ return discriminatedUnion;
5987
+ }
6034
5988
  });
6035
- /**
6036
- * Custom state provider config (user-provided implementation).
6037
- */
6038
- const CustomStateConfigSchema = object({
6039
- /** Custom StateProvider implementation */
6040
- provider: custom((val) => typeof val === "object" && val !== null && typeof val.read === "function" && typeof val.write === "function", { message: "Custom provider must implement read() and write() methods" }) });
6041
- /**
6042
- * State configuration schema.
6043
- *
6044
- * Configures how deployment state is stored.
6045
- * - 'local': Store in .gkm/deploy-{stage}.json (default)
6046
- * - 'ssm': Store in AWS SSM Parameter Store (requires region)
6047
- * - Custom: Provide a StateProvider implementation with read/write methods
6048
- */
6049
- const StateConfigSchema = union([discriminatedUnion("provider", [LocalStateConfigSchema, SSMStateConfigSchema]), CustomStateConfigSchema]);
6050
- /**
6051
- * App configuration schema.
6052
- */
6053
- const AppConfigSchema = object({
6054
- type: _enum([
6055
- "backend",
6056
- "web",
6057
- "mobile"
6058
- ]).optional().default("backend"),
6059
- path: string().min(1, "App path is required"),
6060
- port: number().int().positive("Port must be a positive integer"),
6061
- dependencies: array(string()).optional(),
6062
- deploy: DeployTargetSchema.optional(),
6063
- constructs: RoutesSchema.optional(),
6064
- routes: RoutesSchema.optional(),
6065
- functions: RoutesSchema.optional(),
6066
- crons: RoutesSchema.optional(),
6067
- queues: RoutesSchema.optional(),
6068
- topics: RoutesSchema.optional(),
6069
- subscribers: RoutesSchema.optional(),
6070
- envParser: string().optional(),
6071
- logger: string().optional(),
6072
- hooks: HooksConfigSchema.optional(),
6073
- telescope: union([
6074
- string(),
6075
- boolean(),
6076
- TelescopeConfigSchema
6077
- ]).optional(),
6078
- studio: union([
6079
- string(),
6080
- boolean(),
6081
- StudioConfigSchema
6082
- ]).optional(),
6083
- openapi: union([boolean(), OpenApiConfigSchema]).optional(),
6084
- runtime: _enum(["node", "bun"]).optional(),
6085
- env: union([string(), array(string())]).optional(),
6086
- entry: string().optional(),
6087
- framework: FrameworkSchema.optional(),
6088
- config: object({
6089
- client: string().optional(),
6090
- server: string().optional()
6091
- }).optional()
6092
- }).refine((data) => {
6093
- if (data.type === "web") {
6094
- if (!data.framework || !FRONTEND_FRAMEWORKS.includes(data.framework)) return false;
5989
+ Object.defineProperty(exports, "email", {
5990
+ enumerable: true,
5991
+ get: function() {
5992
+ return email;
6095
5993
  }
6096
- return true;
6097
- }, {
6098
- message: `Web apps must have a valid web framework (${FRONTEND_FRAMEWORKS.join(", ")})`,
6099
- path: ["framework"]
6100
- }).refine((data) => {
6101
- if (data.type === "mobile") {
6102
- if (!data.framework || !MOBILE_FRAMEWORKS.includes(data.framework)) return false;
5994
+ });
5995
+ Object.defineProperty(exports, "lazy", {
5996
+ enumerable: true,
5997
+ get: function() {
5998
+ return lazy;
6103
5999
  }
6104
- return true;
6105
- }, {
6106
- message: `Mobile apps must have a valid mobile framework (${MOBILE_FRAMEWORKS.join(", ")})`,
6107
- path: ["framework"]
6108
6000
  });
6109
- /**
6110
- * Workspace configuration schema.
6111
- */
6112
- const WorkspaceConfigSchema = object({
6113
- name: string().optional(),
6114
- /**
6115
- * Where the workspace's own constructs live, relative to its root.
6116
- *
6117
- * Infrastructure is a fact about the product, not about the process that
6118
- * happens to import it — so a database two apps share is declared once,
6119
- * at the top, and both find it. An app-level glob still works and is
6120
- * additive, for something only one app uses.
6121
- */
6122
- constructs: RoutesSchema.optional(),
6123
- /**
6124
- * Apps that nothing declares.
6125
- *
6126
- * Optional, and normally absent: a `site` is an app and so is a
6127
- * `rest-api` that named one, so the list is read off the graph. This is
6128
- * the escape hatch for what no construct describes — a mobile app, a
6129
- * process someone runs by hand — and for overriding one field of a
6130
- * derived app without restating it.
6131
- */
6132
- apps: record(string(), AppConfigSchema).optional(),
6133
- shared: SharedConfigSchema.optional(),
6134
- deploy: DeployConfigSchema.optional(),
6135
- stages: StagesConfigSchema,
6136
- secrets: SecretsConfigSchema.optional(),
6137
- state: StateConfigSchema.optional()
6138
- }).strict().refine((data) => {
6139
- const appNames = Object.keys(data.apps ?? {});
6140
- for (const [appName, app] of Object.entries(data.apps ?? {})) for (const dep of app.dependencies ?? []) {
6141
- if (!appNames.includes(dep)) return false;
6142
- if (dep === appName) return false;
6001
+ Object.defineProperty(exports, "literal", {
6002
+ enumerable: true,
6003
+ get: function() {
6004
+ return literal;
6143
6005
  }
6144
- return true;
6145
- }, { message: "App dependencies must reference existing apps and cannot be self-referential" }).refine((data) => {
6146
- const appNames = Object.keys(data.apps ?? {});
6147
- const visited = /* @__PURE__ */ new Set();
6148
- const recStack = /* @__PURE__ */ new Set();
6149
- function hasCycle(app) {
6150
- if (recStack.has(app)) return true;
6151
- if (visited.has(app)) return false;
6152
- visited.add(app);
6153
- recStack.add(app);
6154
- const deps = data.apps?.[app]?.dependencies ?? [];
6155
- for (const dep of deps) if (hasCycle(dep)) return true;
6156
- recStack.delete(app);
6157
- return false;
6006
+ });
6007
+ Object.defineProperty(exports, "looseObject", {
6008
+ enumerable: true,
6009
+ get: function() {
6010
+ return looseObject;
6158
6011
  }
6159
- for (const app of appNames) {
6160
- visited.clear();
6161
- recStack.clear();
6162
- if (hasCycle(app)) return false;
6012
+ });
6013
+ Object.defineProperty(exports, "number", {
6014
+ enumerable: true,
6015
+ get: function() {
6016
+ return number;
6163
6017
  }
6164
- return true;
6165
- }, { message: "Circular dependencies detected between apps" }).superRefine((data, ctx) => {
6166
- const defaultTarget = data.deploy?.default;
6167
- if (defaultTarget && !isDeployTargetSupported(defaultTarget)) {
6168
- ctx.addIssue({
6169
- code: "custom",
6170
- message: getDeployTargetError(defaultTarget),
6171
- path: ["deploy", "default"]
6172
- });
6173
- return;
6018
+ });
6019
+ Object.defineProperty(exports, "object", {
6020
+ enumerable: true,
6021
+ get: function() {
6022
+ return object;
6174
6023
  }
6175
- for (const [appName, app] of Object.entries(data.apps ?? {})) if (app.deploy && !isDeployTargetSupported(app.deploy)) {
6176
- ctx.addIssue({
6177
- code: "custom",
6178
- message: getDeployTargetError(app.deploy, appName),
6179
- path: [
6180
- "apps",
6181
- appName,
6182
- "deploy"
6183
- ]
6184
- });
6185
- return;
6024
+ });
6025
+ Object.defineProperty(exports, "record", {
6026
+ enumerable: true,
6027
+ get: function() {
6028
+ return record;
6186
6029
  }
6187
- if (data.state?.provider === "ssm" && !data.name) ctx.addIssue({
6188
- code: "custom",
6189
- message: "Workspace name is required when using SSM state provider. Add \"name\" to your gkm.config.ts.",
6190
- path: ["name"]
6191
- });
6192
6030
  });
6193
- /**
6194
- * Validate workspace configuration.
6195
- * Throws ZodError with detailed messages on validation failure.
6196
- */
6197
- function validateWorkspaceConfig(config) {
6198
- return WorkspaceConfigSchema.parse(config);
6199
- }
6200
- /**
6201
- * Safe validation that returns result instead of throwing.
6202
- */
6203
- function safeValidateWorkspaceConfig(config) {
6204
- const result = WorkspaceConfigSchema.safeParse(config);
6205
- if (result.success) return {
6206
- success: true,
6207
- data: result.data
6208
- };
6209
- return {
6210
- success: false,
6211
- error: result.error
6212
- };
6213
- }
6214
- /**
6215
- * Format Zod errors into user-friendly messages.
6216
- */
6217
- function formatValidationErrors(error) {
6218
- return `Workspace configuration validation failed:\n${error.issues.map((issue) => {
6219
- const path = issue.path.join(".");
6220
- return path ? ` - ${path}: ${issue.message}` : ` - ${issue.message}`;
6221
- }).join("\n")}`;
6222
- }
6223
- //#endregion
6224
- //#region src/workspace/types.ts
6225
- /**
6226
- * Type guard to check if a config is a WorkspaceConfig.
6227
- *
6228
- * @example
6229
- * ```ts
6230
- * const config = await loadConfig();
6231
- * if (isWorkspaceConfig(config)) {
6232
- * // config.apps is available
6233
- * console.log(Object.keys(config.apps));
6234
- * }
6235
- * ```
6236
- */
6237
- function isWorkspaceConfig(config) {
6238
- if (typeof config !== "object" || config === null) return false;
6239
- if ("apps" in config && typeof config.apps === "object") return true;
6240
- return "constructs" in config && Object.keys(config).every((key) => WORKSPACE_KEYS.has(key));
6241
- }
6242
- /** Every top-level key a workspace config has — see `WorkspaceConfigSchema`. */
6243
- const WORKSPACE_KEYS = /* @__PURE__ */ new Set([
6244
- "name",
6245
- "constructs",
6246
- "apps",
6247
- "shared",
6248
- "deploy",
6249
- "stages",
6250
- "secrets",
6251
- "state"
6252
- ]);
6253
- //#endregion
6254
- //#region src/workspace/index.ts
6255
- /**
6256
- * Validate that all dependencies reference existing apps.
6257
- * Returns the config if valid, throws otherwise.
6258
- */
6259
- function validateDependencies(apps) {
6260
- const appNames = new Set(Object.keys(apps));
6261
- for (const [appName, app] of Object.entries(apps)) for (const dep of app.dependencies ?? []) {
6262
- if (!appNames.has(dep)) throw new Error(`Invalid dependency: App "${appName}" depends on "${dep}" which does not exist. Valid apps are: ${[...appNames].join(", ")}`);
6263
- if (dep === appName) throw new Error(`Invalid dependency: App "${appName}" cannot depend on itself.`);
6031
+ Object.defineProperty(exports, "string", {
6032
+ enumerable: true,
6033
+ get: function() {
6034
+ return string;
6264
6035
  }
6265
- }
6266
- /**
6267
- * Define workspace configuration with full TypeScript support and type inference.
6268
- *
6269
- * Uses `const` type parameter to infer literal app names, providing:
6270
- * - Autocomplete for app names in dependencies
6271
- * - Type errors for invalid dependency references
6272
- * - Full type inference for the returned config
6273
- *
6274
- * @example
6275
- * ```ts
6276
- * // gkm.config.ts
6277
- * import { defineWorkspace } from '@geekmidas/cli';
6278
- *
6279
- * export default defineWorkspace({
6280
- * name: 'my-saas',
6281
- * apps: {
6282
- * api: {
6283
- * type: 'backend',
6284
- * path: 'apps/api',
6285
- * port: 3000,
6286
- * routes: './src/endpoints/**\/*.ts',
6287
- * envParser: './src/config/env',
6288
- * logger: './src/logger',
6289
- * },
6290
- * web: {
6291
- * type: 'web',
6292
- * framework: 'nextjs',
6293
- * path: 'apps/web',
6294
- * port: 3001,
6295
- * dependencies: ['api'], // <- autocomplete shows 'api' | 'web'
6296
- * },
6297
- * },
6298
- * });
6299
- *
6300
- * // config.apps.api <- full type inference
6301
- * // config.apps.foo <- TypeScript error
6302
- * ```
6303
- */
6304
- function defineWorkspace(config) {
6305
- if (config.apps) validateDependencies(config.apps);
6306
- const result = safeValidateWorkspaceConfig(config);
6307
- if (!result.success && result.error) throw new Error(formatValidationErrors(result.error));
6308
- return config;
6309
- }
6310
- /**
6311
- * Get the package name from package.json in the given directory.
6312
- */
6313
- function getPackageName(cwd) {
6314
- try {
6315
- return __require(`${cwd}/package.json`).name?.replace(/^@[^/]+\//, "");
6316
- } catch {
6317
- return;
6036
+ });
6037
+ Object.defineProperty(exports, "toJSONSchema", {
6038
+ enumerable: true,
6039
+ get: function() {
6040
+ return toJSONSchema;
6318
6041
  }
6319
- }
6320
- /**
6321
- * Normalize a workspace configuration with resolved defaults.
6322
- */
6323
- function normalizeWorkspace(config, cwd) {
6324
- const name = config.name ?? getPackageName(cwd) ?? basename(cwd);
6325
- const defaultTarget = config.deploy?.default ?? "dokploy";
6326
- const normalizedApps = {};
6327
- for (const [appName, app] of Object.entries(config.apps ?? {})) normalizedApps[appName] = normalizeAppConfig(app, defaultTarget);
6328
- return {
6329
- name,
6330
- root: cwd,
6331
- ...config.constructs ? { constructs: config.constructs } : {},
6332
- apps: normalizedApps,
6333
- deploy: config.deploy ?? { default: "dokploy" },
6334
- shared: config.shared ?? { packages: ["packages/*"] },
6335
- stages: validateStages(config.stages),
6336
- secrets: config.secrets ?? {},
6337
- state: config.state
6338
- };
6339
- }
6340
- /**
6341
- * Normalize an app configuration with resolved defaults.
6342
- * @param app - App configuration
6343
- * @param defaultTarget - Default deploy target from workspace config
6344
- */
6345
- function normalizeAppConfig(app, defaultTarget) {
6346
- return {
6347
- ...app,
6348
- type: app.type ?? "backend",
6349
- port: app.port,
6350
- path: app.path,
6351
- dependencies: app.dependencies ?? [],
6352
- resolvedDeployTarget: app.deploy ?? defaultTarget
6353
- };
6354
- }
6355
- /**
6356
- * Wrap a single-app GkmConfig as a workspace.
6357
- * This allows existing single-app configs to work seamlessly.
6358
- */
6359
- function wrapSingleAppAsWorkspace(config, cwd) {
6360
- return {
6361
- name: config.name ?? getPackageName(cwd) ?? basename(cwd),
6362
- root: cwd,
6363
- apps: { api: {
6364
- type: "backend",
6365
- path: ".",
6366
- port: (typeof config.providers?.server === "object" ? config.providers.server.port : void 0) ?? 3e3,
6367
- dependencies: [],
6368
- resolvedDeployTarget: config.deploy?.default ?? "dokploy",
6369
- constructs: config.constructs,
6370
- providers: config.providers,
6371
- hooks: config.hooks,
6372
- telescope: config.telescope,
6373
- studio: config.studio,
6374
- openapi: config.openapi,
6375
- runtime: config.runtime,
6376
- env: config.env
6377
- } },
6378
- deploy: {
6379
- default: "dokploy",
6380
- ...config.deploy
6381
- },
6382
- shared: { packages: [] },
6383
- stages: validateStages(config.stages),
6384
- secrets: {}
6385
- };
6386
- }
6387
- /**
6388
- * Process a loaded configuration (either single-app or workspace).
6389
- * Returns a normalized workspace in both cases.
6390
- */
6391
- function processConfig(config, cwd) {
6392
- if (isWorkspaceConfig(config)) {
6393
- const result = safeValidateWorkspaceConfig(config);
6394
- if (!result.success && result.error) throw new Error(formatValidationErrors(result.error));
6395
- return {
6396
- type: "workspace",
6397
- raw: config,
6398
- workspace: normalizeWorkspace(config, cwd)
6399
- };
6042
+ });
6043
+ Object.defineProperty(exports, "tuple", {
6044
+ enumerable: true,
6045
+ get: function() {
6046
+ return tuple;
6400
6047
  }
6401
- return {
6402
- type: "single",
6403
- raw: config,
6404
- workspace: wrapSingleAppAsWorkspace(config, cwd)
6405
- };
6406
- }
6407
- /**
6408
- * The workspace's own constructs globs, absolute.
6409
- *
6410
- * Infrastructure two apps share is a fact about the product, and declaring it
6411
- * inside one of them makes moving that app a change to the other's database.
6412
- */
6413
- function workspaceConstructGlobs(workspace) {
6414
- return constructPatterns(workspace.constructs).map((pattern) => isAbsolute(pattern) ? pattern : join(workspace.root, pattern));
6415
- }
6416
- /**
6417
- * Every constructs glob an app can see, absolute.
6418
- *
6419
- * The workspace's own first, then the app's. Absolute because the app builds
6420
- * from its own directory while the workspace's constructs live above it —
6421
- * a relative glob resolved from the app would look for the product's
6422
- * infrastructure inside one of its consumers and find nothing.
6423
- *
6424
- * Additive, not overriding: an app that declares its own constructs still sees
6425
- * the ones the workspace declared for everybody.
6426
- */
6427
- function appConstructGlobs(workspace, appName) {
6428
- const globs = workspaceConstructGlobs(workspace);
6429
- const app = workspace.apps[appName];
6430
- if (app) {
6431
- const root = isAbsolute(app.path) ? app.path : join(workspace.root, app.path);
6432
- for (const pattern of constructPatterns(app.constructs)) globs.push(isAbsolute(pattern) ? pattern : join(root, pattern));
6048
+ });
6049
+ Object.defineProperty(exports, "union", {
6050
+ enumerable: true,
6051
+ get: function() {
6052
+ return union;
6433
6053
  }
6434
- return globs;
6435
- }
6436
- /**
6437
- * Every constructs glob in the workspace: its own, plus each app's.
6438
- *
6439
- * One list, so what a deploy provisions and what an app's entry point
6440
- * registers drivers for are read off the same globs.
6441
- */
6442
- function allConstructGlobs(workspace) {
6443
- const globs = [...workspaceConstructGlobs(workspace), ...Object.keys(workspace.apps).flatMap((appName) => appConstructGlobs(workspace, appName))];
6444
- return [...new Set(globs)];
6445
- }
6446
- /** A `Routes` in any of its accepted shapes, as a flat list of patterns. */
6447
- function constructPatterns(routes) {
6448
- if (!routes) return [];
6449
- if (typeof routes === "string") return [routes];
6450
- if (Array.isArray(routes)) return routes;
6451
- const paths = routes.paths;
6452
- if (!paths) return [];
6453
- return Array.isArray(paths) ? paths : [paths];
6454
- }
6455
- /**
6456
- * Get the GkmConfig for a specific app in a workspace.
6457
- * Useful for running existing single-app commands on a specific app.
6458
- */
6459
- function getAppGkmConfig(workspace, appName) {
6460
- const app = workspace.apps[appName];
6461
- if (!app || app.type !== "backend") return;
6462
- return {
6463
- ...workspace.deploy ? { deploy: workspace.deploy } : {},
6464
- stages: workspace.stages,
6465
- constructs: appConstructGlobs(workspace, appName),
6466
- providers: app.providers,
6467
- hooks: app.hooks,
6468
- telescope: app.telescope,
6469
- studio: app.studio,
6470
- openapi: app.openapi,
6471
- runtime: app.runtime,
6472
- env: app.env
6473
- };
6474
- }
6475
- /**
6476
- * Get topologically sorted app names based on dependencies.
6477
- * Apps with no dependencies come first, then apps that depend on them.
6478
- */
6479
- function getAppBuildOrder(workspace) {
6480
- const appNames = Object.keys(workspace.apps);
6481
- const visited = /* @__PURE__ */ new Set();
6482
- const result = [];
6483
- function visit(name) {
6484
- if (visited.has(name)) return;
6485
- visited.add(name);
6486
- const app = workspace.apps[name];
6487
- if (app) for (const dep of app.dependencies) visit(dep);
6488
- result.push(name);
6054
+ });
6055
+ Object.defineProperty(exports, "unknown", {
6056
+ enumerable: true,
6057
+ get: function() {
6058
+ return unknown;
6489
6059
  }
6490
- for (const name of appNames) visit(name);
6491
- return result;
6492
- }
6493
- /**
6494
- * Generate environment variables for app dependencies.
6495
- *
6496
- * Each dependency gets the un-prefixed `{DEP}_URL` (for server-side use) and,
6497
- * when the consuming app's framework supports a public-var prefix, also the
6498
- * prefixed form (e.g. `NEXT_PUBLIC_{DEP}_URL` for Next.js, `VITE_{DEP}_URL`
6499
- * for Vite/TanStack Start). The prefixed form is what gets bundled into the
6500
- * client at build time.
6501
- */
6502
- function getDependencyEnvVars(workspace, appName, urlPrefix = "http://localhost") {
6503
- const app = workspace.apps[appName];
6504
- if (!app) return {};
6505
- const env = {};
6506
- const publicPrefix = getPublicEnvPrefix(app.framework);
6507
- for (const depName of app.dependencies) {
6508
- const dep = workspace.apps[depName];
6509
- if (dep) {
6510
- const url = `${urlPrefix}:${dep.port}`;
6511
- const envKey = `${depName.toUpperCase()}_URL`;
6512
- env[envKey] = url;
6513
- if (publicPrefix) env[`${publicPrefix}${envKey}`] = url;
6514
- }
6060
+ });
6061
+ Object.defineProperty(exports, "url", {
6062
+ enumerable: true,
6063
+ get: function() {
6064
+ return url;
6515
6065
  }
6516
- return env;
6517
- }
6518
- /**
6519
- * Resolve the Dokploy endpoint for a specific stage.
6520
- *
6521
- * Uses per-stage endpoint from `endpoints` if available,
6522
- * otherwise falls back to the global `endpoint`.
6523
- *
6524
- * @param dokployConfig - Dokploy workspace configuration
6525
- * @param stage - Deployment stage (e.g., 'development', 'production')
6526
- * @returns The endpoint URL for the stage, or undefined if not configured
6527
- *
6528
- * @example
6529
- * ```ts
6530
- * // With per-stage endpoints
6531
- * const config = {
6532
- * endpoints: {
6533
- * development: 'https://dev.dokploy.example.com:3000',
6534
- * production: 'https://prod.dokploy.example.com:3000',
6535
- * },
6536
- * };
6537
- * getEndpointForStage(config, 'production'); // => 'https://prod.dokploy.example.com:3000'
6538
- *
6539
- * // With single endpoint
6540
- * const config = { endpoint: 'https://dokploy.example.com:3000' };
6541
- * getEndpointForStage(config, 'production'); // => 'https://dokploy.example.com:3000'
6542
- * ```
6543
- */
6544
- function getEndpointForStage(dokployConfig, stage) {
6545
- if (!dokployConfig) return void 0;
6546
- if (dokployConfig.endpoints?.[stage]) return dokployConfig.endpoints[stage];
6547
- return dokployConfig.endpoint;
6548
- }
6549
- //#endregion
6550
- export { InvalidStages as C, PUBLIC_ENV_PREFIXES as D, stageProblems as E, getPublicEnvPrefix as O, validateWorkspaceConfig as S, deployedProblems as T, formatValidationErrors as _, getAppBuildOrder as a, isPhase2DeployTarget as b, getEndpointForStage as c, workspaceConstructGlobs as d, wrapSingleAppAsWorkspace as f, WorkspaceConfigSchema as g, SUPPORTED_DEPLOY_TARGETS as h, defineWorkspace as i, stripPublicPrefix as k, normalizeWorkspace as l, PHASE_2_DEPLOY_TARGETS as m, appConstructGlobs as n, getAppGkmConfig as o, isWorkspaceConfig as p, constructPatterns as r, getDependencyEnvVars as s, allConstructGlobs as t, processConfig as u, getDeployTargetError as v, assertDeployedStage as w, safeValidateWorkspaceConfig as x, isDeployTargetSupported as y };
6066
+ });
6551
6067
 
6552
- //# sourceMappingURL=workspace-CgwmXEtc.mjs.map
6068
+ //# sourceMappingURL=schemas-BQ_v0lEX.cjs.map