@geekmidas/cli 10.0.0-alpha.18 → 10.0.0-alpha.180

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 (448) hide show
  1. package/README.md +323 -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-CBKH87_b.mjs +1043 -0
  7. package/dist/EndpointGenerator-CBKH87_b.mjs.map +1 -0
  8. package/dist/EndpointGenerator-iyA3HkOH.cjs +1102 -0
  9. package/dist/EndpointGenerator-iyA3HkOH.cjs.map +1 -0
  10. package/dist/LegacyStateStore-B7pQA25B.mjs +124 -0
  11. package/dist/LegacyStateStore-B7pQA25B.mjs.map +1 -0
  12. package/dist/LegacyStateStore-l0hBdv-E.cjs +124 -0
  13. package/dist/LegacyStateStore-l0hBdv-E.cjs.map +1 -0
  14. package/dist/LocalStateStore-CP0UHL85.mjs +167 -0
  15. package/dist/LocalStateStore-CP0UHL85.mjs.map +1 -0
  16. package/dist/LocalStateStore-DEE0Kc_s.cjs +178 -0
  17. package/dist/LocalStateStore-DEE0Kc_s.cjs.map +1 -0
  18. package/dist/OpenApiTsGenerator-CoVA3Ykv.mjs +534 -0
  19. package/dist/OpenApiTsGenerator-CoVA3Ykv.mjs.map +1 -0
  20. package/dist/OpenApiTsGenerator-vy-fOJgs.cjs +539 -0
  21. package/dist/OpenApiTsGenerator-vy-fOJgs.cjs.map +1 -0
  22. package/dist/S3StateStore-DE0BNuXc.cjs +222 -0
  23. package/dist/S3StateStore-DE0BNuXc.cjs.map +1 -0
  24. package/dist/S3StateStore-vmxZWMKh.mjs +223 -0
  25. package/dist/S3StateStore-vmxZWMKh.mjs.map +1 -0
  26. package/dist/SSMStateStore-DQyXnX2M.mjs +205 -0
  27. package/dist/SSMStateStore-DQyXnX2M.mjs.map +1 -0
  28. package/dist/SSMStateStore-p4hBdTg3.cjs +204 -0
  29. package/dist/SSMStateStore-p4hBdTg3.cjs.map +1 -0
  30. package/dist/SubscriberGenerator-B3jHf26s.mjs +787 -0
  31. package/dist/SubscriberGenerator-B3jHf26s.mjs.map +1 -0
  32. package/dist/SubscriberGenerator-JhwVlWBS.cjs +852 -0
  33. package/dist/SubscriberGenerator-JhwVlWBS.cjs.map +1 -0
  34. package/dist/add-DEdpKya-.cjs +713 -0
  35. package/dist/add-DEdpKya-.cjs.map +1 -0
  36. package/dist/add-QBvDmVA-.mjs +711 -0
  37. package/dist/add-QBvDmVA-.mjs.map +1 -0
  38. package/dist/appPorts-BoXMwolc.mjs +249 -0
  39. package/dist/appPorts-BoXMwolc.mjs.map +1 -0
  40. package/dist/appPorts-IW-OZmRi.cjs +296 -0
  41. package/dist/appPorts-IW-OZmRi.cjs.map +1 -0
  42. package/dist/apps-D0LULFmU.mjs +4650 -0
  43. package/dist/apps-D0LULFmU.mjs.map +1 -0
  44. package/dist/apps-qJ5FPJGQ.cjs +5174 -0
  45. package/dist/apps-qJ5FPJGQ.cjs.map +1 -0
  46. package/dist/aws-BXfiWNbi.cjs +108 -0
  47. package/dist/aws-BXfiWNbi.cjs.map +1 -0
  48. package/dist/aws-BjvSTTcE.mjs +97 -0
  49. package/dist/aws-BjvSTTcE.mjs.map +1 -0
  50. package/dist/awsStore-BYYCmXiq.mjs +121 -0
  51. package/dist/awsStore-BYYCmXiq.mjs.map +1 -0
  52. package/dist/awsStore-DKQUElJL.cjs +138 -0
  53. package/dist/awsStore-DKQUElJL.cjs.map +1 -0
  54. package/dist/{backup-provisioner-DIVCbfee.mjs → backup-provisioner-C8DnCmxK.mjs} +2 -2
  55. package/dist/backup-provisioner-C8DnCmxK.mjs.map +1 -0
  56. package/dist/{backup-provisioner-BmhIO_Yr.cjs → backup-provisioner-oDEsPj02.cjs} +2 -2
  57. package/dist/backup-provisioner-oDEsPj02.cjs.map +1 -0
  58. package/dist/backups/runner.cjs +519 -0
  59. package/dist/backups/runner.cjs.map +1 -0
  60. package/dist/backups/runner.d.cts +102 -0
  61. package/dist/backups/runner.d.cts.map +1 -0
  62. package/dist/backups/runner.d.mts +102 -0
  63. package/dist/backups/runner.d.mts.map +1 -0
  64. package/dist/backups/runner.mjs +506 -0
  65. package/dist/backups/runner.mjs.map +1 -0
  66. package/dist/{bundler-mjqGAvu1.cjs → bundler-BuBCXA0t.cjs} +67 -14
  67. package/dist/bundler-BuBCXA0t.cjs.map +1 -0
  68. package/dist/{bundler-mwH7WOb1.mjs → bundler-DZKdVVKZ.mjs} +68 -15
  69. package/dist/bundler-DZKdVVKZ.mjs.map +1 -0
  70. package/dist/cli-BCGkzaR1.cjs +80 -0
  71. package/dist/cli-BCGkzaR1.cjs.map +1 -0
  72. package/dist/cli-CgEbT00Q.mjs +80 -0
  73. package/dist/cli-CgEbT00Q.mjs.map +1 -0
  74. package/dist/clientTelemetry-BAwj6MOf.d.cts +10 -0
  75. package/dist/clientTelemetry-BAwj6MOf.d.cts.map +1 -0
  76. package/dist/clientTelemetry-CvamPJj_.d.mts +10 -0
  77. package/dist/clientTelemetry-CvamPJj_.d.mts.map +1 -0
  78. package/dist/compose-AO8u4mBI.cjs +3502 -0
  79. package/dist/compose-AO8u4mBI.cjs.map +1 -0
  80. package/dist/compose-C-yjexqX.cjs +2925 -0
  81. package/dist/compose-C-yjexqX.cjs.map +1 -0
  82. package/dist/compose-C23RpAaF.mjs +3389 -0
  83. package/dist/compose-C23RpAaF.mjs.map +1 -0
  84. package/dist/compose-DtfoUChm.mjs +2434 -0
  85. package/dist/compose-DtfoUChm.mjs.map +1 -0
  86. package/dist/config-BODxZemw.d.mts +291 -0
  87. package/dist/config-BODxZemw.d.mts.map +1 -0
  88. package/dist/config-C3U5HulX.d.cts +291 -0
  89. package/dist/config-C3U5HulX.d.cts.map +1 -0
  90. package/dist/config.cjs +457 -9
  91. package/dist/config.cjs.map +1 -0
  92. package/dist/config.d.cts +4 -117
  93. package/dist/config.d.mts +4 -117
  94. package/dist/config.mjs +441 -3
  95. package/dist/config.mjs.map +1 -0
  96. package/dist/credentialSchemas-D_85KW2k.mjs +236 -0
  97. package/dist/credentialSchemas-D_85KW2k.mjs.map +1 -0
  98. package/dist/credentialSchemas-DjK6xKMk.cjs +271 -0
  99. package/dist/credentialSchemas-DjK6xKMk.cjs.map +1 -0
  100. package/dist/databases-CV22HzrI.mjs +588 -0
  101. package/dist/databases-CV22HzrI.mjs.map +1 -0
  102. package/dist/databases-DwYYH2mX.cjs +703 -0
  103. package/dist/databases-DwYYH2mX.cjs.map +1 -0
  104. package/dist/dbTunnel-Bve0zBqT.cjs +154 -0
  105. package/dist/dbTunnel-Bve0zBqT.cjs.map +1 -0
  106. package/dist/dbTunnel-CnubkLBa.mjs +154 -0
  107. package/dist/dbTunnel-CnubkLBa.mjs.map +1 -0
  108. package/dist/define-BfrNaY82.mjs +106 -0
  109. package/dist/define-BfrNaY82.mjs.map +1 -0
  110. package/dist/define-zKgLY65H.cjs +153 -0
  111. package/dist/define-zKgLY65H.cjs.map +1 -0
  112. package/dist/deploy/public.cjs +211 -0
  113. package/dist/deploy/public.cjs.map +1 -0
  114. package/dist/deploy/public.d.cts +659 -0
  115. package/dist/deploy/public.d.cts.map +1 -0
  116. package/dist/deploy/public.d.mts +659 -0
  117. package/dist/deploy/public.d.mts.map +1 -0
  118. package/dist/deploy/public.mjs +144 -0
  119. package/dist/deploy/public.mjs.map +1 -0
  120. package/dist/deploy/sniffer-envparser-worker.cjs +54 -0
  121. package/dist/deploy/sniffer-envparser-worker.cjs.map +1 -0
  122. package/dist/deploy/sniffer-envparser-worker.d.cts +1 -0
  123. package/dist/deploy/sniffer-envparser-worker.d.mts +1 -0
  124. package/dist/deploy/sniffer-envparser-worker.mjs +55 -0
  125. package/dist/deploy/sniffer-envparser-worker.mjs.map +1 -0
  126. package/dist/deploy/sniffer-hooks.cjs +1 -1
  127. package/dist/deploy/sniffer-hooks.mjs +1 -1
  128. package/dist/deploy/sniffer-loader.cjs +2 -2
  129. package/dist/deploy/sniffer-loader.mjs +1 -1
  130. package/dist/deploy/sniffer-routes-worker.cjs +2 -2
  131. package/dist/deploy/sniffer-routes-worker.mjs +1 -1
  132. package/dist/deploy-C2MKxzm9.cjs +3894 -0
  133. package/dist/deploy-C2MKxzm9.cjs.map +1 -0
  134. package/dist/deploy-Qq41vtpm.mjs +3838 -0
  135. package/dist/deploy-Qq41vtpm.mjs.map +1 -0
  136. package/dist/destroy-Bg4IUf_Z.mjs +789 -0
  137. package/dist/destroy-Bg4IUf_Z.mjs.map +1 -0
  138. package/dist/destroy-CCpnHI2v.cjs +790 -0
  139. package/dist/destroy-CCpnHI2v.cjs.map +1 -0
  140. package/dist/discover-Dfmn6HQ7.mjs +940 -0
  141. package/dist/discover-Dfmn6HQ7.mjs.map +1 -0
  142. package/dist/discover-OXczlq08.cjs +1085 -0
  143. package/dist/discover-OXczlq08.cjs.map +1 -0
  144. package/dist/dns-BAM8VH1v.mjs +1820 -0
  145. package/dist/dns-BAM8VH1v.mjs.map +1 -0
  146. package/dist/dns-D_0z9Tm1.cjs +2257 -0
  147. package/dist/dns-D_0z9Tm1.cjs.map +1 -0
  148. package/dist/docker-6EUbKrEl.cjs +1798 -0
  149. package/dist/docker-6EUbKrEl.cjs.map +1 -0
  150. package/dist/docker-DQoE3Fr7.mjs +1649 -0
  151. package/dist/docker-DQoE3Fr7.mjs.map +1 -0
  152. package/dist/dokploy-BD8NXy8y.cjs +38 -0
  153. package/dist/dokploy-BD8NXy8y.cjs.map +1 -0
  154. package/dist/dokploy-CU9iuc35.mjs +38 -0
  155. package/dist/dokploy-CU9iuc35.mjs.map +1 -0
  156. package/dist/drivers-BQRb3KsL.mjs +294 -0
  157. package/dist/drivers-BQRb3KsL.mjs.map +1 -0
  158. package/dist/drivers-DP7__dJX.cjs +377 -0
  159. package/dist/drivers-DP7__dJX.cjs.map +1 -0
  160. package/dist/eas-BhTOdQrE.cjs +337 -0
  161. package/dist/eas-BhTOdQrE.cjs.map +1 -0
  162. package/dist/eas-iYyg7Xjy.mjs +334 -0
  163. package/dist/eas-iYyg7Xjy.mjs.map +1 -0
  164. package/dist/emit-C4KSXOeS.mjs +153 -0
  165. package/dist/emit-C4KSXOeS.mjs.map +1 -0
  166. package/dist/emit-DiW0kbue.cjs +164 -0
  167. package/dist/emit-DiW0kbue.cjs.map +1 -0
  168. package/dist/encryption-hgmnMZw0.mjs +89 -0
  169. package/dist/encryption-hgmnMZw0.mjs.map +1 -0
  170. package/dist/encryption-yROMpM67.cjs +90 -0
  171. package/dist/encryption-yROMpM67.cjs.map +1 -0
  172. package/dist/engine-B4whsrrE.mjs +3217 -0
  173. package/dist/engine-B4whsrrE.mjs.map +1 -0
  174. package/dist/engine-D0XYdIiE.cjs +3330 -0
  175. package/dist/engine-D0XYdIiE.cjs.map +1 -0
  176. package/dist/errors-C9uIyIDt.mjs +27 -0
  177. package/dist/errors-C9uIyIDt.mjs.map +1 -0
  178. package/dist/errors-D1x8duqI.cjs +38 -0
  179. package/dist/errors-D1x8duqI.cjs.map +1 -0
  180. package/dist/github-CBkZF4PS.mjs +986 -0
  181. package/dist/github-CBkZF4PS.mjs.map +1 -0
  182. package/dist/github-D1-_OnGL.cjs +987 -0
  183. package/dist/github-D1-_OnGL.cjs.map +1 -0
  184. package/dist/googlePlay-Bwv8TVi8.mjs +931 -0
  185. package/dist/googlePlay-Bwv8TVi8.mjs.map +1 -0
  186. package/dist/googlePlay-s9dGfrrb.cjs +931 -0
  187. package/dist/googlePlay-s9dGfrrb.cjs.map +1 -0
  188. package/dist/iam-BzFyFf7T.mjs +442 -0
  189. package/dist/iam-BzFyFf7T.mjs.map +1 -0
  190. package/dist/iam-WIoKnLBp.cjs +521 -0
  191. package/dist/iam-WIoKnLBp.cjs.map +1 -0
  192. package/dist/{index-RCUizGxL.d.cts → index-BKgOlfK2.d.mts} +38 -14
  193. package/dist/index-BKgOlfK2.d.mts.map +1 -0
  194. package/dist/{index-B4H4XF7A.d.mts → index-zPzigXh-.d.cts} +38 -14
  195. package/dist/index-zPzigXh-.d.cts.map +1 -0
  196. package/dist/index.cjs +14502 -12767
  197. package/dist/index.cjs.map +1 -1
  198. package/dist/index.mjs +15137 -13400
  199. package/dist/index.mjs.map +1 -1
  200. package/dist/local-CFnHQgWC.cjs +241 -0
  201. package/dist/local-CFnHQgWC.cjs.map +1 -0
  202. package/dist/local-JOnTFJA5.mjs +224 -0
  203. package/dist/local-JOnTFJA5.mjs.map +1 -0
  204. package/dist/migrate-BtnpQocG.mjs +181 -0
  205. package/dist/migrate-BtnpQocG.mjs.map +1 -0
  206. package/dist/migrate-CGXrmZyV.cjs +272 -0
  207. package/dist/migrate-CGXrmZyV.cjs.map +1 -0
  208. package/dist/migrate-CxWXW-Lw.cjs +181 -0
  209. package/dist/migrate-CxWXW-Lw.cjs.map +1 -0
  210. package/dist/migrate-fLIgSpPB.mjs +267 -0
  211. package/dist/migrate-fLIgSpPB.mjs.map +1 -0
  212. package/dist/next.cjs +59 -0
  213. package/dist/next.cjs.map +1 -0
  214. package/dist/next.d.cts +44 -0
  215. package/dist/next.d.cts.map +1 -0
  216. package/dist/next.d.mts +44 -0
  217. package/dist/next.d.mts.map +1 -0
  218. package/dist/next.mjs +58 -0
  219. package/dist/next.mjs.map +1 -0
  220. package/dist/notes-ChYPaRLu.cjs +510 -0
  221. package/dist/notes-ChYPaRLu.cjs.map +1 -0
  222. package/dist/notes-LATU2vLI.mjs +409 -0
  223. package/dist/notes-LATU2vLI.mjs.map +1 -0
  224. package/dist/openapi.cjs +213 -7
  225. package/dist/openapi.cjs.map +1 -0
  226. package/dist/openapi.d.cts +27 -8
  227. package/dist/openapi.d.cts.map +1 -1
  228. package/dist/openapi.d.mts +27 -8
  229. package/dist/openapi.d.mts.map +1 -1
  230. package/dist/openapi.mjs +208 -2
  231. package/dist/openapi.mjs.map +1 -0
  232. package/dist/projectBucket-BIeh2HTj.cjs +263 -0
  233. package/dist/projectBucket-BIeh2HTj.cjs.map +1 -0
  234. package/dist/projectBucket-D_4zb_oh.mjs +222 -0
  235. package/dist/projectBucket-D_4zb_oh.mjs.map +1 -0
  236. package/dist/provider-BvjDbsTR.mjs +46 -0
  237. package/dist/provider-BvjDbsTR.mjs.map +1 -0
  238. package/dist/provider-DLhgo-mB.cjs +57 -0
  239. package/dist/provider-DLhgo-mB.cjs.map +1 -0
  240. package/dist/publish-Dc-1GQp8.cjs +124 -0
  241. package/dist/publish-Dc-1GQp8.cjs.map +1 -0
  242. package/dist/publish-DhzRYhVZ.mjs +123 -0
  243. package/dist/publish-DhzRYhVZ.mjs.map +1 -0
  244. package/dist/ready-BcV28QoW.mjs +375 -0
  245. package/dist/ready-BcV28QoW.mjs.map +1 -0
  246. package/dist/ready-ByQvw4-W.cjs +404 -0
  247. package/dist/ready-ByQvw4-W.cjs.map +1 -0
  248. package/dist/reconcile/public.cjs +3 -5
  249. package/dist/reconcile/public.d.cts +33 -89
  250. package/dist/reconcile/public.d.cts.map +1 -1
  251. package/dist/reconcile/public.d.mts +33 -89
  252. package/dist/reconcile/public.d.mts.map +1 -1
  253. package/dist/reconcile/public.mjs +3 -3
  254. package/dist/reconcile--I7V4Klj.mjs +34 -0
  255. package/dist/reconcile--I7V4Klj.mjs.map +1 -0
  256. package/dist/reconcile-CuCQBa5-.cjs +34 -0
  257. package/dist/reconcile-CuCQBa5-.cjs.map +1 -0
  258. package/dist/resolve-CJvM2bUx.mjs +263 -0
  259. package/dist/resolve-CJvM2bUx.mjs.map +1 -0
  260. package/dist/resolve-DyUXmA0z.cjs +316 -0
  261. package/dist/resolve-DyUXmA0z.cjs.map +1 -0
  262. package/dist/rollback-BO1asWkd.mjs +136 -0
  263. package/dist/rollback-BO1asWkd.mjs.map +1 -0
  264. package/dist/rollback-Op8Tc5N-.cjs +165 -0
  265. package/dist/rollback-Op8Tc5N-.cjs.map +1 -0
  266. package/dist/runtime-CaejlcZt.d.mts +82 -0
  267. package/dist/runtime-CaejlcZt.d.mts.map +1 -0
  268. package/dist/runtime-D3jD4Dvn.d.cts +82 -0
  269. package/dist/runtime-D3jD4Dvn.d.cts.map +1 -0
  270. package/dist/s3-BbtwHSod.mjs +240 -0
  271. package/dist/s3-BbtwHSod.mjs.map +1 -0
  272. package/dist/s3-CwacPd8J.cjs +240 -0
  273. package/dist/s3-CwacPd8J.cjs.map +1 -0
  274. package/dist/sandbox/config-worker.cjs +43 -0
  275. package/dist/sandbox/config-worker.cjs.map +1 -0
  276. package/dist/sandbox/config-worker.d.cts +1 -0
  277. package/dist/sandbox/config-worker.d.mts +1 -0
  278. package/dist/sandbox/config-worker.mjs +44 -0
  279. package/dist/sandbox/config-worker.mjs.map +1 -0
  280. package/dist/sandbox/credentials-worker.cjs +53 -0
  281. package/dist/sandbox/credentials-worker.cjs.map +1 -0
  282. package/dist/sandbox/credentials-worker.d.cts +1 -0
  283. package/dist/sandbox/credentials-worker.d.mts +1 -0
  284. package/dist/sandbox/credentials-worker.mjs +54 -0
  285. package/dist/sandbox/credentials-worker.mjs.map +1 -0
  286. package/dist/sandbox/discover-worker.cjs +47 -0
  287. package/dist/sandbox/discover-worker.cjs.map +1 -0
  288. package/dist/sandbox/discover-worker.d.cts +1 -0
  289. package/dist/sandbox/discover-worker.d.mts +1 -0
  290. package/dist/sandbox/discover-worker.mjs +48 -0
  291. package/dist/sandbox/discover-worker.mjs.map +1 -0
  292. package/dist/sandbox/migrate-worker.cjs +75 -0
  293. package/dist/sandbox/migrate-worker.cjs.map +1 -0
  294. package/dist/sandbox/migrate-worker.d.cts +1 -0
  295. package/dist/sandbox/migrate-worker.d.mts +1 -0
  296. package/dist/sandbox/migrate-worker.mjs +76 -0
  297. package/dist/sandbox/migrate-worker.mjs.map +1 -0
  298. package/dist/{workspace-CRD9YinV.cjs → schemas-BCwKKA42.mjs} +399 -1179
  299. package/dist/schemas-BCwKKA42.mjs.map +1 -0
  300. package/dist/{workspace-Bu3xNCej.mjs → schemas-BQ_v0lEX.cjs} +487 -982
  301. package/dist/schemas-BQ_v0lEX.cjs.map +1 -0
  302. package/dist/secretsManager-CjTo6CRq.mjs +113 -0
  303. package/dist/secretsManager-CjTo6CRq.mjs.map +1 -0
  304. package/dist/secretsManager-CvmBGjdM.cjs +124 -0
  305. package/dist/secretsManager-CvmBGjdM.cjs.map +1 -0
  306. package/dist/seeds-Bc3niNVb.cjs +382 -0
  307. package/dist/seeds-Bc3niNVb.cjs.map +1 -0
  308. package/dist/seeds-Ccn0Ru2T.mjs +299 -0
  309. package/dist/seeds-Ccn0Ru2T.mjs.map +1 -0
  310. package/dist/serverSetup-BFdzPTIT.cjs +685 -0
  311. package/dist/serverSetup-BFdzPTIT.cjs.map +1 -0
  312. package/dist/serverSetup-CSxaZ7ha.mjs +685 -0
  313. package/dist/serverSetup-CSxaZ7ha.mjs.map +1 -0
  314. package/dist/sniffer-CwxpsSez.mjs +1824 -0
  315. package/dist/sniffer-CwxpsSez.mjs.map +1 -0
  316. package/dist/sniffer-D3gH7aJT.cjs +1997 -0
  317. package/dist/sniffer-D3gH7aJT.cjs.map +1 -0
  318. package/dist/snsSubscriptions-B8tGxND5.cjs +1135 -0
  319. package/dist/snsSubscriptions-B8tGxND5.cjs.map +1 -0
  320. package/dist/snsSubscriptions-n3sjbrRM.mjs +1010 -0
  321. package/dist/snsSubscriptions-n3sjbrRM.mjs.map +1 -0
  322. package/dist/sst-Cjocp7gi.cjs +501 -0
  323. package/dist/sst-Cjocp7gi.cjs.map +1 -0
  324. package/dist/sst-DeF0BfDA.mjs +478 -0
  325. package/dist/sst-DeF0BfDA.mjs.map +1 -0
  326. package/dist/stack-CyoRqyPt.mjs +1777 -0
  327. package/dist/stack-CyoRqyPt.mjs.map +1 -0
  328. package/dist/stack-Dr2FSxGm.cjs +1887 -0
  329. package/dist/stack-Dr2FSxGm.cjs.map +1 -0
  330. package/dist/stage-TAx0Gcq8.mjs +303 -0
  331. package/dist/stage-TAx0Gcq8.mjs.map +1 -0
  332. package/dist/stage-aTBLKonw.cjs +332 -0
  333. package/dist/stage-aTBLKonw.cjs.map +1 -0
  334. package/dist/stages-BeSQQQ4z.cjs +190 -0
  335. package/dist/stages-BeSQQQ4z.cjs.map +1 -0
  336. package/dist/stages-DjFKQv08.mjs +190 -0
  337. package/dist/stages-DjFKQv08.mjs.map +1 -0
  338. package/dist/target/public.cjs +15 -0
  339. package/dist/target/public.d.cts +28 -0
  340. package/dist/target/public.d.cts.map +1 -0
  341. package/dist/target/public.d.mts +28 -0
  342. package/dist/target/public.d.mts.map +1 -0
  343. package/dist/target/public.mjs +4 -0
  344. package/dist/terminal-Bk4PjXWY.mjs +85 -0
  345. package/dist/terminal-Bk4PjXWY.mjs.map +1 -0
  346. package/dist/terminal-DPf137EJ.cjs +85 -0
  347. package/dist/terminal-DPf137EJ.cjs.map +1 -0
  348. package/dist/{types-7R81hu0i.d.mts → types-CLxsw-QY.d.cts} +2135 -428
  349. package/dist/types-CLxsw-QY.d.cts.map +1 -0
  350. package/dist/{types-N7c2O2m7.d.cts → types-wLlwkSib.d.mts} +2133 -428
  351. package/dist/types-wLlwkSib.d.mts.map +1 -0
  352. package/dist/utils-D2Nk1Nv2.cjs +205 -0
  353. package/dist/utils-D2Nk1Nv2.cjs.map +1 -0
  354. package/dist/utils-D_fxUqvU.mjs +156 -0
  355. package/dist/utils-D_fxUqvU.mjs.map +1 -0
  356. package/dist/vitest.cjs +65 -0
  357. package/dist/vitest.cjs.map +1 -0
  358. package/dist/vitest.d.cts +29 -0
  359. package/dist/vitest.d.cts.map +1 -0
  360. package/dist/vitest.d.mts +29 -0
  361. package/dist/vitest.d.mts.map +1 -0
  362. package/dist/vitest.mjs +65 -0
  363. package/dist/vitest.mjs.map +1 -0
  364. package/dist/workerRuntime-BXfhbe13.cjs +108 -0
  365. package/dist/workerRuntime-BXfhbe13.cjs.map +1 -0
  366. package/dist/workerRuntime-CsOyBRx2.mjs +79 -0
  367. package/dist/workerRuntime-CsOyBRx2.mjs.map +1 -0
  368. package/dist/workspace/index.cjs +6 -2
  369. package/dist/workspace/index.d.cts +3 -3
  370. package/dist/workspace/index.d.mts +3 -3
  371. package/dist/workspace/index.mjs +2 -2
  372. package/dist/workspace-DJjhfAGf.mjs +3027 -0
  373. package/dist/workspace-DJjhfAGf.mjs.map +1 -0
  374. package/dist/workspace-wTLnc1Ef.cjs +3577 -0
  375. package/dist/workspace-wTLnc1Ef.cjs.map +1 -0
  376. package/package.json +76 -13
  377. package/dist/HostingerProvider-BY26bWwB.mjs +0 -243
  378. package/dist/HostingerProvider-BY26bWwB.mjs.map +0 -1
  379. package/dist/HostingerProvider-BZFGYYVA.cjs +0 -243
  380. package/dist/HostingerProvider-BZFGYYVA.cjs.map +0 -1
  381. package/dist/LocalStateProvider-7HR6SS2t.cjs +0 -48
  382. package/dist/LocalStateProvider-7HR6SS2t.cjs.map +0 -1
  383. package/dist/LocalStateProvider-D7QyJoLM.mjs +0 -48
  384. package/dist/LocalStateProvider-D7QyJoLM.mjs.map +0 -1
  385. package/dist/Route53Provider-Cvj40A8I.mjs +0 -209
  386. package/dist/Route53Provider-Cvj40A8I.mjs.map +0 -1
  387. package/dist/Route53Provider-DVILBsvV.cjs +0 -209
  388. package/dist/Route53Provider-DVILBsvV.cjs.map +0 -1
  389. package/dist/SSMStateProvider-B0Hu1MKZ.mjs +0 -75
  390. package/dist/SSMStateProvider-B0Hu1MKZ.mjs.map +0 -1
  391. package/dist/SSMStateProvider-VrQ-yeqd.cjs +0 -74
  392. package/dist/SSMStateProvider-VrQ-yeqd.cjs.map +0 -1
  393. package/dist/backup-provisioner-BmhIO_Yr.cjs.map +0 -1
  394. package/dist/backup-provisioner-DIVCbfee.mjs.map +0 -1
  395. package/dist/bundler-mjqGAvu1.cjs.map +0 -1
  396. package/dist/bundler-mwH7WOb1.mjs.map +0 -1
  397. package/dist/config-DSXI480r.cjs +0 -467
  398. package/dist/config-DSXI480r.cjs.map +0 -1
  399. package/dist/config-DdKkoUE1.mjs +0 -414
  400. package/dist/config-DdKkoUE1.mjs.map +0 -1
  401. package/dist/config.d.cts.map +0 -1
  402. package/dist/config.d.mts.map +0 -1
  403. package/dist/credentials-C6Pfn6GY.cjs +0 -2939
  404. package/dist/credentials-C6Pfn6GY.cjs.map +0 -1
  405. package/dist/credentials-lbv-j0Be.mjs +0 -2802
  406. package/dist/credentials-lbv-j0Be.mjs.map +0 -1
  407. package/dist/discover-BERGFg8v.cjs +0 -288
  408. package/dist/discover-BERGFg8v.cjs.map +0 -1
  409. package/dist/discover-CK-n3w6b.mjs +0 -244
  410. package/dist/discover-CK-n3w6b.mjs.map +0 -1
  411. package/dist/emit-BdoPFjZf.cjs +0 -253
  412. package/dist/emit-BdoPFjZf.cjs.map +0 -1
  413. package/dist/emit-Bzq7JsMP.mjs +0 -224
  414. package/dist/emit-Bzq7JsMP.mjs.map +0 -1
  415. package/dist/generator-LfZU7NlU.mjs +0 -247
  416. package/dist/generator-LfZU7NlU.mjs.map +0 -1
  417. package/dist/generator-Wdfp0jCS.cjs +0 -282
  418. package/dist/generator-Wdfp0jCS.cjs.map +0 -1
  419. package/dist/github-DlIrXPee.mjs +0 -216
  420. package/dist/github-DlIrXPee.mjs.map +0 -1
  421. package/dist/github-n7N9yOff.cjs +0 -216
  422. package/dist/github-n7N9yOff.cjs.map +0 -1
  423. package/dist/index-B4H4XF7A.d.mts.map +0 -1
  424. package/dist/index-RCUizGxL.d.cts.map +0 -1
  425. package/dist/openapi-B8bu_OXN.cjs +0 -2038
  426. package/dist/openapi-B8bu_OXN.cjs.map +0 -1
  427. package/dist/openapi-DfjbhrsM.mjs +0 -1991
  428. package/dist/openapi-DfjbhrsM.mjs.map +0 -1
  429. package/dist/reconcile-Cq4cO83R.cjs +0 -136
  430. package/dist/reconcile-Cq4cO83R.cjs.map +0 -1
  431. package/dist/reconcile-fmoluZmZ.mjs +0 -113
  432. package/dist/reconcile-fmoluZmZ.mjs.map +0 -1
  433. package/dist/ssm-BKN1Cg4z.mjs +0 -60
  434. package/dist/ssm-BKN1Cg4z.mjs.map +0 -1
  435. package/dist/ssm-FxeSAt35.cjs +0 -60
  436. package/dist/ssm-FxeSAt35.cjs.map +0 -1
  437. package/dist/storage-DgypfSD6.cjs +0 -351
  438. package/dist/storage-DgypfSD6.cjs.map +0 -1
  439. package/dist/storage-TP0x118M.mjs +0 -304
  440. package/dist/storage-TP0x118M.mjs.map +0 -1
  441. package/dist/transfer-2aRVVJ6I.mjs +0 -122
  442. package/dist/transfer-2aRVVJ6I.mjs.map +0 -1
  443. package/dist/transfer-C3WZVmj_.cjs +0 -151
  444. package/dist/transfer-C3WZVmj_.cjs.map +0 -1
  445. package/dist/types-7R81hu0i.d.mts.map +0 -1
  446. package/dist/types-N7c2O2m7.d.cts.map +0 -1
  447. package/dist/workspace-Bu3xNCej.mjs.map +0 -1
  448. package/dist/workspace-CRD9YinV.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,955 +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
- });
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
5964
  });
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 SecretsStoreSchema = union([
6017
- literal("file"),
6018
- object({
6019
- provider: literal("ssm"),
6020
- region: AwsRegionSchema
6021
- }).strict(),
6022
- object({
6023
- /** Any backend: an object implementing SecretsStore */
6024
- provider: custom((val) => typeof val === "object" && val !== null && typeof val.pull === "function" && typeof val.push === "function", { message: "a secrets store implements pull() and push()" }) })
6025
- ]);
6026
- const SecretsConfigSchema = object({
6027
- enabled: boolean().optional(),
6028
- store: SecretsStoreSchema.optional(),
6029
- algorithm: string().optional(),
6030
- kdf: _enum(["scrypt", "pbkdf2"]).optional()
5977
+ Object.defineProperty(exports, "custom", {
5978
+ enumerable: true,
5979
+ get: function() {
5980
+ return custom;
5981
+ }
6031
5982
  });
6032
- /**
6033
- * Local state provider config.
6034
- */
6035
- const LocalStateConfigSchema = object({ provider: literal("local") });
6036
- /**
6037
- * SSM state provider config (requires region).
6038
- */
6039
- const SSMStateConfigSchema = object({
6040
- provider: literal("ssm"),
6041
- /** AWS region (required for SSM provider) */
6042
- region: AwsRegionSchema,
6043
- /** AWS profile name (optional - uses default credential chain if not provided) */
6044
- profile: string().optional()
5983
+ Object.defineProperty(exports, "discriminatedUnion", {
5984
+ enumerable: true,
5985
+ get: function() {
5986
+ return discriminatedUnion;
5987
+ }
6045
5988
  });
6046
- /**
6047
- * Custom state provider config (user-provided implementation).
6048
- */
6049
- const CustomStateConfigSchema = object({
6050
- /** Custom StateProvider implementation */
6051
- 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" }) });
6052
- /**
6053
- * State configuration schema.
6054
- *
6055
- * Configures how deployment state is stored.
6056
- * - 'local': Store in .gkm/deploy-{stage}.json (default)
6057
- * - 'ssm': Store in AWS SSM Parameter Store (requires region)
6058
- * - Custom: Provide a StateProvider implementation with read/write methods
6059
- */
6060
- const StateConfigSchema = union([discriminatedUnion("provider", [LocalStateConfigSchema, SSMStateConfigSchema]), CustomStateConfigSchema]);
6061
- /**
6062
- * App configuration schema.
6063
- */
6064
- const AppConfigSchema = object({
6065
- type: _enum([
6066
- "backend",
6067
- "web",
6068
- "mobile"
6069
- ]).optional().default("backend"),
6070
- path: string().min(1, "App path is required"),
6071
- port: number().int().positive("Port must be a positive integer"),
6072
- dependencies: array(string()).optional(),
6073
- deploy: DeployTargetSchema.optional(),
6074
- constructs: RoutesSchema.optional(),
6075
- routes: RoutesSchema.optional(),
6076
- functions: RoutesSchema.optional(),
6077
- crons: RoutesSchema.optional(),
6078
- queues: RoutesSchema.optional(),
6079
- topics: RoutesSchema.optional(),
6080
- subscribers: RoutesSchema.optional(),
6081
- envParser: string().optional(),
6082
- logger: string().optional(),
6083
- hooks: HooksConfigSchema.optional(),
6084
- telescope: union([
6085
- string(),
6086
- boolean(),
6087
- TelescopeConfigSchema
6088
- ]).optional(),
6089
- studio: union([
6090
- string(),
6091
- boolean(),
6092
- StudioConfigSchema
6093
- ]).optional(),
6094
- openapi: union([boolean(), OpenApiConfigSchema]).optional(),
6095
- runtime: _enum(["node", "bun"]).optional(),
6096
- env: union([string(), array(string())]).optional(),
6097
- entry: string().optional(),
6098
- framework: FrameworkSchema.optional(),
6099
- config: object({
6100
- client: string().optional(),
6101
- server: string().optional()
6102
- }).optional()
6103
- }).refine((data) => {
6104
- if (data.type === "web") {
6105
- if (!data.framework || !FRONTEND_FRAMEWORKS.includes(data.framework)) return false;
5989
+ Object.defineProperty(exports, "email", {
5990
+ enumerable: true,
5991
+ get: function() {
5992
+ return email;
6106
5993
  }
6107
- return true;
6108
- }, {
6109
- message: `Web apps must have a valid web framework (${FRONTEND_FRAMEWORKS.join(", ")})`,
6110
- path: ["framework"]
6111
- }).refine((data) => {
6112
- if (data.type === "mobile") {
6113
- 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;
6114
5999
  }
6115
- return true;
6116
- }, {
6117
- message: `Mobile apps must have a valid mobile framework (${MOBILE_FRAMEWORKS.join(", ")})`,
6118
- path: ["framework"]
6119
6000
  });
6120
- /**
6121
- * Workspace configuration schema.
6122
- */
6123
- const WorkspaceConfigSchema = object({
6124
- name: string().optional(),
6125
- /**
6126
- * Where the workspace's own constructs live, relative to its root.
6127
- *
6128
- * Infrastructure is a fact about the product, not about the process that
6129
- * happens to import it — so a database two apps share is declared once,
6130
- * at the top, and both find it. An app-level glob still works and is
6131
- * additive, for something only one app uses.
6132
- */
6133
- constructs: RoutesSchema.optional(),
6134
- /**
6135
- * Apps that nothing declares.
6136
- *
6137
- * Optional, and normally absent: a `site` is an app and so is a
6138
- * `rest-api` that named one, so the list is read off the graph. This is
6139
- * the escape hatch for what no construct describes — a mobile app, a
6140
- * process someone runs by hand — and for overriding one field of a
6141
- * derived app without restating it.
6142
- */
6143
- apps: record(string(), AppConfigSchema).optional(),
6144
- shared: SharedConfigSchema.optional(),
6145
- deploy: DeployConfigSchema.optional(),
6146
- stages: StagesConfigSchema,
6147
- secrets: SecretsConfigSchema.optional(),
6148
- state: StateConfigSchema.optional()
6149
- }).strict().refine((data) => {
6150
- const appNames = Object.keys(data.apps ?? {});
6151
- for (const [appName, app] of Object.entries(data.apps ?? {})) for (const dep of app.dependencies ?? []) {
6152
- if (!appNames.includes(dep)) return false;
6153
- if (dep === appName) return false;
6001
+ Object.defineProperty(exports, "literal", {
6002
+ enumerable: true,
6003
+ get: function() {
6004
+ return literal;
6154
6005
  }
6155
- return true;
6156
- }, { message: "App dependencies must reference existing apps and cannot be self-referential" }).refine((data) => {
6157
- const appNames = Object.keys(data.apps ?? {});
6158
- const visited = /* @__PURE__ */ new Set();
6159
- const recStack = /* @__PURE__ */ new Set();
6160
- function hasCycle(app) {
6161
- if (recStack.has(app)) return true;
6162
- if (visited.has(app)) return false;
6163
- visited.add(app);
6164
- recStack.add(app);
6165
- const deps = data.apps?.[app]?.dependencies ?? [];
6166
- for (const dep of deps) if (hasCycle(dep)) return true;
6167
- recStack.delete(app);
6168
- return false;
6006
+ });
6007
+ Object.defineProperty(exports, "looseObject", {
6008
+ enumerable: true,
6009
+ get: function() {
6010
+ return looseObject;
6169
6011
  }
6170
- for (const app of appNames) {
6171
- visited.clear();
6172
- recStack.clear();
6173
- if (hasCycle(app)) return false;
6012
+ });
6013
+ Object.defineProperty(exports, "number", {
6014
+ enumerable: true,
6015
+ get: function() {
6016
+ return number;
6174
6017
  }
6175
- return true;
6176
- }, { message: "Circular dependencies detected between apps" }).superRefine((data, ctx) => {
6177
- const defaultTarget = data.deploy?.default;
6178
- if (defaultTarget && !isDeployTargetSupported(defaultTarget)) {
6179
- ctx.addIssue({
6180
- code: "custom",
6181
- message: getDeployTargetError(defaultTarget),
6182
- path: ["deploy", "default"]
6183
- });
6184
- return;
6018
+ });
6019
+ Object.defineProperty(exports, "object", {
6020
+ enumerable: true,
6021
+ get: function() {
6022
+ return object;
6185
6023
  }
6186
- for (const [appName, app] of Object.entries(data.apps ?? {})) if (app.deploy && !isDeployTargetSupported(app.deploy)) {
6187
- ctx.addIssue({
6188
- code: "custom",
6189
- message: getDeployTargetError(app.deploy, appName),
6190
- path: [
6191
- "apps",
6192
- appName,
6193
- "deploy"
6194
- ]
6195
- });
6196
- return;
6024
+ });
6025
+ Object.defineProperty(exports, "record", {
6026
+ enumerable: true,
6027
+ get: function() {
6028
+ return record;
6197
6029
  }
6198
- if (data.state?.provider === "ssm" && !data.name) ctx.addIssue({
6199
- code: "custom",
6200
- message: "Workspace name is required when using SSM state provider. Add \"name\" to your gkm.config.ts.",
6201
- path: ["name"]
6202
- });
6203
6030
  });
6204
- /**
6205
- * Validate workspace configuration.
6206
- * Throws ZodError with detailed messages on validation failure.
6207
- */
6208
- function validateWorkspaceConfig(config) {
6209
- return WorkspaceConfigSchema.parse(config);
6210
- }
6211
- /**
6212
- * Safe validation that returns result instead of throwing.
6213
- */
6214
- function safeValidateWorkspaceConfig(config) {
6215
- const result = WorkspaceConfigSchema.safeParse(config);
6216
- if (result.success) return {
6217
- success: true,
6218
- data: result.data
6219
- };
6220
- return {
6221
- success: false,
6222
- error: result.error
6223
- };
6224
- }
6225
- /**
6226
- * Format Zod errors into user-friendly messages.
6227
- */
6228
- function formatValidationErrors(error) {
6229
- return `Workspace configuration validation failed:\n${error.issues.map((issue) => {
6230
- const path = issue.path.join(".");
6231
- return path ? ` - ${path}: ${issue.message}` : ` - ${issue.message}`;
6232
- }).join("\n")}`;
6233
- }
6234
- //#endregion
6235
- //#region src/workspace/types.ts
6236
- /**
6237
- * Type guard to check if a config is a WorkspaceConfig.
6238
- *
6239
- * @example
6240
- * ```ts
6241
- * const config = await loadConfig();
6242
- * if (isWorkspaceConfig(config)) {
6243
- * // config.apps is available
6244
- * console.log(Object.keys(config.apps));
6245
- * }
6246
- * ```
6247
- */
6248
- function isWorkspaceConfig(config) {
6249
- if (typeof config !== "object" || config === null) return false;
6250
- if ("apps" in config && typeof config.apps === "object") return true;
6251
- return "constructs" in config && Object.keys(config).every((key) => WORKSPACE_KEYS.has(key));
6252
- }
6253
- /** Every top-level key a workspace config has — see `WorkspaceConfigSchema`. */
6254
- const WORKSPACE_KEYS = /* @__PURE__ */ new Set([
6255
- "name",
6256
- "constructs",
6257
- "apps",
6258
- "shared",
6259
- "deploy",
6260
- "stages",
6261
- "secrets",
6262
- "state"
6263
- ]);
6264
- //#endregion
6265
- //#region src/workspace/index.ts
6266
- /**
6267
- * Validate that all dependencies reference existing apps.
6268
- * Returns the config if valid, throws otherwise.
6269
- */
6270
- function validateDependencies(apps) {
6271
- const appNames = new Set(Object.keys(apps));
6272
- for (const [appName, app] of Object.entries(apps)) for (const dep of app.dependencies ?? []) {
6273
- if (!appNames.has(dep)) throw new Error(`Invalid dependency: App "${appName}" depends on "${dep}" which does not exist. Valid apps are: ${[...appNames].join(", ")}`);
6274
- 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;
6275
6035
  }
6276
- }
6277
- /**
6278
- * Define workspace configuration with full TypeScript support and type inference.
6279
- *
6280
- * Uses `const` type parameter to infer literal app names, providing:
6281
- * - Autocomplete for app names in dependencies
6282
- * - Type errors for invalid dependency references
6283
- * - Full type inference for the returned config
6284
- *
6285
- * @example
6286
- * ```ts
6287
- * // gkm.config.ts
6288
- * import { defineWorkspace } from '@geekmidas/cli';
6289
- *
6290
- * export default defineWorkspace({
6291
- * name: 'my-saas',
6292
- * apps: {
6293
- * api: {
6294
- * type: 'backend',
6295
- * path: 'apps/api',
6296
- * port: 3000,
6297
- * routes: './src/endpoints/**\/*.ts',
6298
- * envParser: './src/config/env',
6299
- * logger: './src/logger',
6300
- * },
6301
- * web: {
6302
- * type: 'web',
6303
- * framework: 'nextjs',
6304
- * path: 'apps/web',
6305
- * port: 3001,
6306
- * dependencies: ['api'], // <- autocomplete shows 'api' | 'web'
6307
- * },
6308
- * },
6309
- * });
6310
- *
6311
- * // config.apps.api <- full type inference
6312
- * // config.apps.foo <- TypeScript error
6313
- * ```
6314
- */
6315
- function defineWorkspace(config) {
6316
- if (config.apps) validateDependencies(config.apps);
6317
- const result = safeValidateWorkspaceConfig(config);
6318
- if (!result.success && result.error) throw new Error(formatValidationErrors(result.error));
6319
- return config;
6320
- }
6321
- /**
6322
- * Get the package name from package.json in the given directory.
6323
- */
6324
- function getPackageName(cwd) {
6325
- try {
6326
- return __require(`${cwd}/package.json`).name?.replace(/^@[^/]+\//, "");
6327
- } catch {
6328
- return;
6036
+ });
6037
+ Object.defineProperty(exports, "toJSONSchema", {
6038
+ enumerable: true,
6039
+ get: function() {
6040
+ return toJSONSchema;
6329
6041
  }
6330
- }
6331
- /**
6332
- * Normalize a workspace configuration with resolved defaults.
6333
- */
6334
- function normalizeWorkspace(config, cwd) {
6335
- const name = config.name ?? getPackageName(cwd) ?? basename(cwd);
6336
- const defaultTarget = config.deploy?.default ?? "dokploy";
6337
- const normalizedApps = {};
6338
- for (const [appName, app] of Object.entries(config.apps ?? {})) normalizedApps[appName] = normalizeAppConfig(app, defaultTarget);
6339
- return {
6340
- name,
6341
- root: cwd,
6342
- ...config.constructs ? { constructs: config.constructs } : {},
6343
- apps: normalizedApps,
6344
- deploy: config.deploy ?? { default: "dokploy" },
6345
- shared: config.shared ?? { packages: ["packages/*"] },
6346
- stages: validateStages(config.stages),
6347
- secrets: config.secrets ?? {},
6348
- state: config.state
6349
- };
6350
- }
6351
- /**
6352
- * Normalize an app configuration with resolved defaults.
6353
- * @param app - App configuration
6354
- * @param defaultTarget - Default deploy target from workspace config
6355
- */
6356
- function normalizeAppConfig(app, defaultTarget) {
6357
- return {
6358
- ...app,
6359
- type: app.type ?? "backend",
6360
- port: app.port,
6361
- path: app.path,
6362
- dependencies: app.dependencies ?? [],
6363
- resolvedDeployTarget: app.deploy ?? defaultTarget
6364
- };
6365
- }
6366
- /**
6367
- * Wrap a single-app GkmConfig as a workspace.
6368
- * This allows existing single-app configs to work seamlessly.
6369
- */
6370
- function wrapSingleAppAsWorkspace(config, cwd) {
6371
- return {
6372
- name: config.name ?? getPackageName(cwd) ?? basename(cwd),
6373
- root: cwd,
6374
- apps: { api: {
6375
- type: "backend",
6376
- path: ".",
6377
- port: (typeof config.providers?.server === "object" ? config.providers.server.port : void 0) ?? 3e3,
6378
- dependencies: [],
6379
- resolvedDeployTarget: config.deploy?.default ?? "dokploy",
6380
- constructs: config.constructs,
6381
- providers: config.providers,
6382
- hooks: config.hooks,
6383
- telescope: config.telescope,
6384
- studio: config.studio,
6385
- openapi: config.openapi,
6386
- runtime: config.runtime,
6387
- env: config.env
6388
- } },
6389
- deploy: {
6390
- default: "dokploy",
6391
- ...config.deploy
6392
- },
6393
- shared: { packages: [] },
6394
- stages: validateStages(config.stages),
6395
- secrets: config.secrets ?? {}
6396
- };
6397
- }
6398
- /**
6399
- * Process a loaded configuration (either single-app or workspace).
6400
- * Returns a normalized workspace in both cases.
6401
- */
6402
- function processConfig(config, cwd) {
6403
- if (isWorkspaceConfig(config)) {
6404
- const result = safeValidateWorkspaceConfig(config);
6405
- if (!result.success && result.error) throw new Error(formatValidationErrors(result.error));
6406
- return {
6407
- type: "workspace",
6408
- raw: config,
6409
- workspace: normalizeWorkspace(config, cwd)
6410
- };
6042
+ });
6043
+ Object.defineProperty(exports, "tuple", {
6044
+ enumerable: true,
6045
+ get: function() {
6046
+ return tuple;
6411
6047
  }
6412
- return {
6413
- type: "single",
6414
- raw: config,
6415
- workspace: wrapSingleAppAsWorkspace(config, cwd)
6416
- };
6417
- }
6418
- /**
6419
- * The workspace's own constructs globs, absolute.
6420
- *
6421
- * Infrastructure two apps share is a fact about the product, and declaring it
6422
- * inside one of them makes moving that app a change to the other's database.
6423
- */
6424
- function workspaceConstructGlobs(workspace) {
6425
- return constructPatterns(workspace.constructs).map((pattern) => isAbsolute(pattern) ? pattern : join(workspace.root, pattern));
6426
- }
6427
- /**
6428
- * Every constructs glob an app can see, absolute.
6429
- *
6430
- * The workspace's own first, then the app's. Absolute because the app builds
6431
- * from its own directory while the workspace's constructs live above it —
6432
- * a relative glob resolved from the app would look for the product's
6433
- * infrastructure inside one of its consumers and find nothing.
6434
- *
6435
- * Additive, not overriding: an app that declares its own constructs still sees
6436
- * the ones the workspace declared for everybody.
6437
- */
6438
- function appConstructGlobs(workspace, appName) {
6439
- const globs = workspaceConstructGlobs(workspace);
6440
- const app = workspace.apps[appName];
6441
- if (app) {
6442
- const root = isAbsolute(app.path) ? app.path : join(workspace.root, app.path);
6443
- 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;
6444
6053
  }
6445
- return globs;
6446
- }
6447
- /**
6448
- * Every constructs glob in the workspace: its own, plus each app's.
6449
- *
6450
- * One list, so what a deploy provisions and what an app's entry point
6451
- * registers drivers for are read off the same globs.
6452
- */
6453
- function allConstructGlobs(workspace) {
6454
- const globs = [...workspaceConstructGlobs(workspace), ...Object.keys(workspace.apps).flatMap((appName) => appConstructGlobs(workspace, appName))];
6455
- return [...new Set(globs)];
6456
- }
6457
- /** A `Routes` in any of its accepted shapes, as a flat list of patterns. */
6458
- function constructPatterns(routes) {
6459
- if (!routes) return [];
6460
- if (typeof routes === "string") return [routes];
6461
- if (Array.isArray(routes)) return routes;
6462
- const paths = routes.paths;
6463
- if (!paths) return [];
6464
- return Array.isArray(paths) ? paths : [paths];
6465
- }
6466
- /**
6467
- * Get the GkmConfig for a specific app in a workspace.
6468
- * Useful for running existing single-app commands on a specific app.
6469
- */
6470
- function getAppGkmConfig(workspace, appName) {
6471
- const app = workspace.apps[appName];
6472
- if (!app || app.type !== "backend") return;
6473
- return {
6474
- ...workspace.deploy ? { deploy: workspace.deploy } : {},
6475
- stages: workspace.stages,
6476
- constructs: appConstructGlobs(workspace, appName),
6477
- providers: app.providers,
6478
- hooks: app.hooks,
6479
- telescope: app.telescope,
6480
- studio: app.studio,
6481
- openapi: app.openapi,
6482
- runtime: app.runtime,
6483
- env: app.env
6484
- };
6485
- }
6486
- /**
6487
- * Get topologically sorted app names based on dependencies.
6488
- * Apps with no dependencies come first, then apps that depend on them.
6489
- */
6490
- function getAppBuildOrder(workspace) {
6491
- const appNames = Object.keys(workspace.apps);
6492
- const visited = /* @__PURE__ */ new Set();
6493
- const result = [];
6494
- function visit(name) {
6495
- if (visited.has(name)) return;
6496
- visited.add(name);
6497
- const app = workspace.apps[name];
6498
- if (app) for (const dep of app.dependencies) visit(dep);
6499
- result.push(name);
6054
+ });
6055
+ Object.defineProperty(exports, "unknown", {
6056
+ enumerable: true,
6057
+ get: function() {
6058
+ return unknown;
6500
6059
  }
6501
- for (const name of appNames) visit(name);
6502
- return result;
6503
- }
6504
- /**
6505
- * Generate environment variables for app dependencies.
6506
- *
6507
- * Each dependency gets the un-prefixed `{DEP}_URL` (for server-side use) and,
6508
- * when the consuming app's framework supports a public-var prefix, also the
6509
- * prefixed form (e.g. `NEXT_PUBLIC_{DEP}_URL` for Next.js, `VITE_{DEP}_URL`
6510
- * for Vite/TanStack Start). The prefixed form is what gets bundled into the
6511
- * client at build time.
6512
- */
6513
- function getDependencyEnvVars(workspace, appName, urlPrefix = "http://localhost") {
6514
- const app = workspace.apps[appName];
6515
- if (!app) return {};
6516
- const env = {};
6517
- const publicPrefix = getPublicEnvPrefix(app.framework);
6518
- for (const depName of app.dependencies) {
6519
- const dep = workspace.apps[depName];
6520
- if (dep) {
6521
- const url = `${urlPrefix}:${dep.port}`;
6522
- const envKey = `${depName.toUpperCase()}_URL`;
6523
- env[envKey] = url;
6524
- if (publicPrefix) env[`${publicPrefix}${envKey}`] = url;
6525
- }
6060
+ });
6061
+ Object.defineProperty(exports, "url", {
6062
+ enumerable: true,
6063
+ get: function() {
6064
+ return url;
6526
6065
  }
6527
- return env;
6528
- }
6529
- /**
6530
- * Resolve the Dokploy endpoint for a specific stage.
6531
- *
6532
- * Uses per-stage endpoint from `endpoints` if available,
6533
- * otherwise falls back to the global `endpoint`.
6534
- *
6535
- * @param dokployConfig - Dokploy workspace configuration
6536
- * @param stage - Deployment stage (e.g., 'development', 'production')
6537
- * @returns The endpoint URL for the stage, or undefined if not configured
6538
- *
6539
- * @example
6540
- * ```ts
6541
- * // With per-stage endpoints
6542
- * const config = {
6543
- * endpoints: {
6544
- * development: 'https://dev.dokploy.example.com:3000',
6545
- * production: 'https://prod.dokploy.example.com:3000',
6546
- * },
6547
- * };
6548
- * getEndpointForStage(config, 'production'); // => 'https://prod.dokploy.example.com:3000'
6549
- *
6550
- * // With single endpoint
6551
- * const config = { endpoint: 'https://dokploy.example.com:3000' };
6552
- * getEndpointForStage(config, 'production'); // => 'https://dokploy.example.com:3000'
6553
- * ```
6554
- */
6555
- function getEndpointForStage(dokployConfig, stage) {
6556
- if (!dokployConfig) return void 0;
6557
- if (dokployConfig.endpoints?.[stage]) return dokployConfig.endpoints[stage];
6558
- return dokployConfig.endpoint;
6559
- }
6560
- //#endregion
6561
- export { stripPublicPrefix as A, InvalidStages as C, stageProblems as D, deployedProblems as E, PUBLIC_ENV_PREFIXES as O, validateWorkspaceConfig as S, assertDeployedStage 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, getPublicEnvPrefix 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, TEST_STAGE as w, safeValidateWorkspaceConfig as x, isDeployTargetSupported as y };
6066
+ });
6562
6067
 
6563
- //# sourceMappingURL=workspace-Bu3xNCej.mjs.map
6068
+ //# sourceMappingURL=schemas-BQ_v0lEX.cjs.map