@geekmidas/cli 10.0.0-alpha.16 → 10.0.0-alpha.161

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 (446) 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-B5BKAoLz.mjs +1039 -0
  7. package/dist/EndpointGenerator-B5BKAoLz.mjs.map +1 -0
  8. package/dist/EndpointGenerator-DxrRqfJ3.cjs +1098 -0
  9. package/dist/EndpointGenerator-DxrRqfJ3.cjs.map +1 -0
  10. package/dist/GoDaddyProvider-CBqsvbER.cjs +412 -0
  11. package/dist/GoDaddyProvider-CBqsvbER.cjs.map +1 -0
  12. package/dist/GoDaddyProvider-CwqdLM1E.mjs +412 -0
  13. package/dist/GoDaddyProvider-CwqdLM1E.mjs.map +1 -0
  14. package/dist/{HostingerProvider-BZFGYYVA.cjs → HostingerProvider-DtOtsFkM.cjs} +23 -9
  15. package/dist/HostingerProvider-DtOtsFkM.cjs.map +1 -0
  16. package/dist/{HostingerProvider-BY26bWwB.mjs → HostingerProvider-gD4uqzMN.mjs} +23 -9
  17. package/dist/HostingerProvider-gD4uqzMN.mjs.map +1 -0
  18. package/dist/LegacyStateStore-6xsGADme.mjs +124 -0
  19. package/dist/LegacyStateStore-6xsGADme.mjs.map +1 -0
  20. package/dist/LegacyStateStore-C0rm5slD.cjs +124 -0
  21. package/dist/LegacyStateStore-C0rm5slD.cjs.map +1 -0
  22. package/dist/LocalStateStore-G0JHXOVW.mjs +167 -0
  23. package/dist/LocalStateStore-G0JHXOVW.mjs.map +1 -0
  24. package/dist/LocalStateStore-NBMF3zCb.cjs +178 -0
  25. package/dist/LocalStateStore-NBMF3zCb.cjs.map +1 -0
  26. package/dist/OpenApiTsGenerator-DOTLKBFf.cjs +539 -0
  27. package/dist/OpenApiTsGenerator-DOTLKBFf.cjs.map +1 -0
  28. package/dist/OpenApiTsGenerator-Vaf0pI8u.mjs +534 -0
  29. package/dist/OpenApiTsGenerator-Vaf0pI8u.mjs.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-7n6gIYEJ.cjs +222 -0
  35. package/dist/S3StateStore-7n6gIYEJ.cjs.map +1 -0
  36. package/dist/S3StateStore-B7IPTvu0.mjs +223 -0
  37. package/dist/S3StateStore-B7IPTvu0.mjs.map +1 -0
  38. package/dist/SSMStateStore-CWEShHLS.mjs +205 -0
  39. package/dist/SSMStateStore-CWEShHLS.mjs.map +1 -0
  40. package/dist/SSMStateStore-O12NeGEg.cjs +204 -0
  41. package/dist/SSMStateStore-O12NeGEg.cjs.map +1 -0
  42. package/dist/SubscriberGenerator-BybB6uez.mjs +783 -0
  43. package/dist/SubscriberGenerator-BybB6uez.mjs.map +1 -0
  44. package/dist/SubscriberGenerator-mZpSuSU7.cjs +848 -0
  45. package/dist/SubscriberGenerator-mZpSuSU7.cjs.map +1 -0
  46. package/dist/add-C-nlqQgN.mjs +711 -0
  47. package/dist/add-C-nlqQgN.mjs.map +1 -0
  48. package/dist/add-ktNZmJb-.cjs +713 -0
  49. package/dist/add-ktNZmJb-.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-C7SujLV-.mjs +5621 -0
  55. package/dist/apps-C7SujLV-.mjs.map +1 -0
  56. package/dist/apps-CtjYJS9e.cjs +6247 -0
  57. package/dist/apps-CtjYJS9e.cjs.map +1 -0
  58. package/dist/aws-C5LAU_Ii.mjs +97 -0
  59. package/dist/aws-C5LAU_Ii.mjs.map +1 -0
  60. package/dist/aws-DKC2m3sT.cjs +108 -0
  61. package/dist/aws-DKC2m3sT.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-DGwgZmim.cjs} +59 -14
  79. package/dist/bundler-DGwgZmim.cjs.map +1 -0
  80. package/dist/{bundler-BodTL4kf.mjs → bundler-DnHKVaZz.mjs} +59 -14
  81. package/dist/bundler-DnHKVaZz.mjs.map +1 -0
  82. package/dist/cli-CI9v138l.mjs +80 -0
  83. package/dist/cli-CI9v138l.mjs.map +1 -0
  84. package/dist/cli-k2G7rG15.cjs +80 -0
  85. package/dist/cli-k2G7rG15.cjs.map +1 -0
  86. package/dist/compose-BD2rwRfn.cjs +1919 -0
  87. package/dist/compose-BD2rwRfn.cjs.map +1 -0
  88. package/dist/compose-Co-Dt-a4.mjs +1560 -0
  89. package/dist/compose-Co-Dt-a4.mjs.map +1 -0
  90. package/dist/compose-nGgRylPu.cjs +3163 -0
  91. package/dist/compose-nGgRylPu.cjs.map +1 -0
  92. package/dist/compose-reJW9x-G.mjs +3074 -0
  93. package/dist/compose-reJW9x-G.mjs.map +1 -0
  94. package/dist/config-B5Hi3mLK.cjs +821 -0
  95. package/dist/config-B5Hi3mLK.cjs.map +1 -0
  96. package/dist/config-C60T2h98.d.cts +291 -0
  97. package/dist/config-C60T2h98.d.cts.map +1 -0
  98. package/dist/config-CfI2g_Ho.d.mts +291 -0
  99. package/dist/config-CfI2g_Ho.d.mts.map +1 -0
  100. package/dist/config-DWTUVGRE.mjs +696 -0
  101. package/dist/config-DWTUVGRE.mjs.map +1 -0
  102. package/dist/config.cjs +13 -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-BG1KOq9I.mjs +1838 -0
  111. package/dist/credentials-BG1KOq9I.mjs.map +1 -0
  112. package/dist/credentials-UlL1n_Rd.cjs +2293 -0
  113. package/dist/credentials-UlL1n_Rd.cjs.map +1 -0
  114. package/dist/databases-C1qqNxTu.mjs +588 -0
  115. package/dist/databases-C1qqNxTu.mjs.map +1 -0
  116. package/dist/databases-CrKh5jw6.cjs +703 -0
  117. package/dist/databases-CrKh5jw6.cjs.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 +658 -0
  125. package/dist/deploy/public.d.cts.map +1 -0
  126. package/dist/deploy/public.d.mts +658 -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-CqIULk0k.cjs +3425 -0
  143. package/dist/deploy-CqIULk0k.cjs.map +1 -0
  144. package/dist/deploy-DRkCNV7f.mjs +3369 -0
  145. package/dist/deploy-DRkCNV7f.mjs.map +1 -0
  146. package/dist/destroy-CMldkiX-.cjs +789 -0
  147. package/dist/destroy-CMldkiX-.cjs.map +1 -0
  148. package/dist/destroy-DXIAL8nF.mjs +788 -0
  149. package/dist/destroy-DXIAL8nF.mjs.map +1 -0
  150. package/dist/discover-CRywE7yc.cjs +1085 -0
  151. package/dist/discover-CRywE7yc.cjs.map +1 -0
  152. package/dist/discover-DbDrCQ8h.mjs +940 -0
  153. package/dist/discover-DbDrCQ8h.mjs.map +1 -0
  154. package/dist/docker-DFFzQe2f.mjs +1408 -0
  155. package/dist/docker-DFFzQe2f.mjs.map +1 -0
  156. package/dist/docker-LwJW3dx_.cjs +1515 -0
  157. package/dist/docker-LwJW3dx_.cjs.map +1 -0
  158. package/dist/dokploy-DYm0D6Tp.mjs +38 -0
  159. package/dist/dokploy-DYm0D6Tp.mjs.map +1 -0
  160. package/dist/dokploy-wTsJqG-N.cjs +38 -0
  161. package/dist/dokploy-wTsJqG-N.cjs.map +1 -0
  162. package/dist/drivers-BhdC9Efj.cjs +248 -0
  163. package/dist/drivers-BhdC9Efj.cjs.map +1 -0
  164. package/dist/drivers-wcDnzf7l.mjs +213 -0
  165. package/dist/drivers-wcDnzf7l.mjs.map +1 -0
  166. package/dist/eas-BJ_Zlvm8.mjs +334 -0
  167. package/dist/eas-BJ_Zlvm8.mjs.map +1 -0
  168. package/dist/eas-C4EkjTGJ.cjs +337 -0
  169. package/dist/eas-C4EkjTGJ.cjs.map +1 -0
  170. package/dist/emit-C4KSXOeS.mjs +153 -0
  171. package/dist/emit-C4KSXOeS.mjs.map +1 -0
  172. package/dist/emit-DiW0kbue.cjs +164 -0
  173. package/dist/emit-DiW0kbue.cjs.map +1 -0
  174. package/dist/encryption-BQEqqrGq.cjs +90 -0
  175. package/dist/encryption-BQEqqrGq.cjs.map +1 -0
  176. package/dist/encryption-Cu5YTs9V.mjs +89 -0
  177. package/dist/encryption-Cu5YTs9V.mjs.map +1 -0
  178. package/dist/engine-DdRauUQC.cjs +3330 -0
  179. package/dist/engine-DdRauUQC.cjs.map +1 -0
  180. package/dist/engine-q8aCVbLH.mjs +3217 -0
  181. package/dist/engine-q8aCVbLH.mjs.map +1 -0
  182. package/dist/errors-D8Gwp5kU.mjs +23 -0
  183. package/dist/errors-D8Gwp5kU.mjs.map +1 -0
  184. package/dist/errors-DMC4Umsb.cjs +34 -0
  185. package/dist/errors-DMC4Umsb.cjs.map +1 -0
  186. package/dist/github-CoXirRes.mjs +901 -0
  187. package/dist/github-CoXirRes.mjs.map +1 -0
  188. package/dist/github-OVZF2k0L.cjs +902 -0
  189. package/dist/github-OVZF2k0L.cjs.map +1 -0
  190. package/dist/googlePlay-CUeTUT7s.cjs +931 -0
  191. package/dist/googlePlay-CUeTUT7s.cjs.map +1 -0
  192. package/dist/googlePlay-HXRRVq0l.mjs +931 -0
  193. package/dist/googlePlay-HXRRVq0l.mjs.map +1 -0
  194. package/dist/iam-6LH6wptf.cjs +618 -0
  195. package/dist/iam-6LH6wptf.cjs.map +1 -0
  196. package/dist/iam-c0e8m04X.mjs +509 -0
  197. package/dist/iam-c0e8m04X.mjs.map +1 -0
  198. package/dist/{index-C-VLwB_Y.d.mts → index-DDY0cZCo.d.cts} +38 -14
  199. package/dist/index-DDY0cZCo.d.cts.map +1 -0
  200. package/dist/{index-C-HkOEBt.d.cts → index-DWNwkcy7.d.mts} +38 -14
  201. package/dist/index-DWNwkcy7.d.mts.map +1 -0
  202. package/dist/index.cjs +13752 -12326
  203. package/dist/index.cjs.map +1 -1
  204. package/dist/index.mjs +13791 -12363
  205. package/dist/index.mjs.map +1 -1
  206. package/dist/local-CCJ-T37d.mjs +224 -0
  207. package/dist/local-CCJ-T37d.mjs.map +1 -0
  208. package/dist/local-Dx0o6vfp.cjs +241 -0
  209. package/dist/local-Dx0o6vfp.cjs.map +1 -0
  210. package/dist/migrate-BkwSXhxv.mjs +181 -0
  211. package/dist/migrate-BkwSXhxv.mjs.map +1 -0
  212. package/dist/migrate-CJoKOCGY.cjs +181 -0
  213. package/dist/migrate-CJoKOCGY.cjs.map +1 -0
  214. package/dist/migrate-DEsYfgzn.cjs +272 -0
  215. package/dist/migrate-DEsYfgzn.cjs.map +1 -0
  216. package/dist/migrate-Dr0BeWsY.mjs +267 -0
  217. package/dist/migrate-Dr0BeWsY.mjs.map +1 -0
  218. package/dist/notes-BOyzuPqr.mjs +399 -0
  219. package/dist/notes-BOyzuPqr.mjs.map +1 -0
  220. package/dist/notes-VFPa51Pd.cjs +500 -0
  221. package/dist/notes-VFPa51Pd.cjs.map +1 -0
  222. package/dist/openapi.cjs +213 -7
  223. package/dist/openapi.cjs.map +1 -0
  224. package/dist/openapi.d.cts +32 -8
  225. package/dist/openapi.d.cts.map +1 -1
  226. package/dist/openapi.d.mts +32 -8
  227. package/dist/openapi.d.mts.map +1 -1
  228. package/dist/openapi.mjs +208 -2
  229. package/dist/openapi.mjs.map +1 -0
  230. package/dist/projectBucket-B26ucBRI.mjs +222 -0
  231. package/dist/projectBucket-B26ucBRI.mjs.map +1 -0
  232. package/dist/projectBucket-CWpY3Vxv.cjs +263 -0
  233. package/dist/projectBucket-CWpY3Vxv.cjs.map +1 -0
  234. package/dist/provider-BqpjG9QM.cjs +57 -0
  235. package/dist/provider-BqpjG9QM.cjs.map +1 -0
  236. package/dist/provider-CEOKk8NS.mjs +46 -0
  237. package/dist/provider-CEOKk8NS.mjs.map +1 -0
  238. package/dist/publish-Bg4iffje.mjs +123 -0
  239. package/dist/publish-Bg4iffje.mjs.map +1 -0
  240. package/dist/publish-IjcRoorJ.cjs +124 -0
  241. package/dist/publish-IjcRoorJ.cjs.map +1 -0
  242. package/dist/ready-BjFMu_1J.mjs +375 -0
  243. package/dist/ready-BjFMu_1J.mjs.map +1 -0
  244. package/dist/ready-eVMJIcWn.cjs +404 -0
  245. package/dist/ready-eVMJIcWn.cjs.map +1 -0
  246. package/dist/reconcile/public.cjs +3 -5
  247. package/dist/reconcile/public.d.cts +33 -89
  248. package/dist/reconcile/public.d.cts.map +1 -1
  249. package/dist/reconcile/public.d.mts +33 -89
  250. package/dist/reconcile/public.d.mts.map +1 -1
  251. package/dist/reconcile/public.mjs +3 -3
  252. package/dist/{reconcile-DhQ00DpU.mjs → reconcile--I7V4Klj.mjs} +2 -2
  253. package/dist/{reconcile-DhQ00DpU.mjs.map → reconcile--I7V4Klj.mjs.map} +1 -1
  254. package/dist/{reconcile-Dd2iyILf.cjs → reconcile-CuCQBa5-.cjs} +3 -3
  255. package/dist/{reconcile-Dd2iyILf.cjs.map → reconcile-CuCQBa5-.cjs.map} +1 -1
  256. package/dist/resolve-CgVDhWW8.cjs +316 -0
  257. package/dist/resolve-CgVDhWW8.cjs.map +1 -0
  258. package/dist/resolve-rw7mLp5E.mjs +263 -0
  259. package/dist/resolve-rw7mLp5E.mjs.map +1 -0
  260. package/dist/rollback-Cv02Cnky.mjs +136 -0
  261. package/dist/rollback-Cv02Cnky.mjs.map +1 -0
  262. package/dist/rollback-vdkPi_Rm.cjs +165 -0
  263. package/dist/rollback-vdkPi_Rm.cjs.map +1 -0
  264. package/dist/runtime-D-rOcRoq.d.cts +82 -0
  265. package/dist/runtime-D-rOcRoq.d.cts.map +1 -0
  266. package/dist/runtime-DG1mNh_5.d.mts +82 -0
  267. package/dist/runtime-DG1mNh_5.d.mts.map +1 -0
  268. package/dist/s3-DIvAtJwk.cjs +240 -0
  269. package/dist/s3-DIvAtJwk.cjs.map +1 -0
  270. package/dist/s3-DmsM_V2R.mjs +240 -0
  271. package/dist/s3-DmsM_V2R.mjs.map +1 -0
  272. package/dist/sandbox/config-worker.cjs +43 -0
  273. package/dist/sandbox/config-worker.cjs.map +1 -0
  274. package/dist/sandbox/config-worker.d.cts +1 -0
  275. package/dist/sandbox/config-worker.d.mts +1 -0
  276. package/dist/sandbox/config-worker.mjs +44 -0
  277. package/dist/sandbox/config-worker.mjs.map +1 -0
  278. package/dist/sandbox/credentials-worker.cjs +53 -0
  279. package/dist/sandbox/credentials-worker.cjs.map +1 -0
  280. package/dist/sandbox/credentials-worker.d.cts +1 -0
  281. package/dist/sandbox/credentials-worker.d.mts +1 -0
  282. package/dist/sandbox/credentials-worker.mjs +54 -0
  283. package/dist/sandbox/credentials-worker.mjs.map +1 -0
  284. package/dist/sandbox/discover-worker.cjs +47 -0
  285. package/dist/sandbox/discover-worker.cjs.map +1 -0
  286. package/dist/sandbox/discover-worker.d.cts +1 -0
  287. package/dist/sandbox/discover-worker.d.mts +1 -0
  288. package/dist/sandbox/discover-worker.mjs +48 -0
  289. package/dist/sandbox/discover-worker.mjs.map +1 -0
  290. package/dist/sandbox/migrate-worker.cjs +75 -0
  291. package/dist/sandbox/migrate-worker.cjs.map +1 -0
  292. package/dist/sandbox/migrate-worker.d.cts +1 -0
  293. package/dist/sandbox/migrate-worker.d.mts +1 -0
  294. package/dist/sandbox/migrate-worker.mjs +76 -0
  295. package/dist/sandbox/migrate-worker.mjs.map +1 -0
  296. package/dist/{workspace-mFpI_ky_.cjs → schemas-BCwKKA42.mjs} +399 -1162
  297. package/dist/schemas-BCwKKA42.mjs.map +1 -0
  298. package/dist/{workspace-CgwmXEtc.mjs → schemas-BQ_v0lEX.cjs} +487 -971
  299. package/dist/schemas-BQ_v0lEX.cjs.map +1 -0
  300. package/dist/secretsManager-CJyxFcBH.mjs +113 -0
  301. package/dist/secretsManager-CJyxFcBH.mjs.map +1 -0
  302. package/dist/secretsManager-D8on44WI.cjs +124 -0
  303. package/dist/secretsManager-D8on44WI.cjs.map +1 -0
  304. package/dist/seeds-D7q1zKCJ.cjs +369 -0
  305. package/dist/seeds-D7q1zKCJ.cjs.map +1 -0
  306. package/dist/seeds-y1rzXlAc.mjs +298 -0
  307. package/dist/seeds-y1rzXlAc.mjs.map +1 -0
  308. package/dist/serverSetup-CvcN4zJQ.mjs +685 -0
  309. package/dist/serverSetup-CvcN4zJQ.mjs.map +1 -0
  310. package/dist/serverSetup-qXIRRhgw.cjs +685 -0
  311. package/dist/serverSetup-qXIRRhgw.cjs.map +1 -0
  312. package/dist/sniffer-CGfL25Bc.cjs +1997 -0
  313. package/dist/sniffer-CGfL25Bc.cjs.map +1 -0
  314. package/dist/sniffer-DuKVVAs_.mjs +1824 -0
  315. package/dist/sniffer-DuKVVAs_.mjs.map +1 -0
  316. package/dist/snsSubscriptions-DPfGjpuB.cjs +1179 -0
  317. package/dist/snsSubscriptions-DPfGjpuB.cjs.map +1 -0
  318. package/dist/snsSubscriptions-nnSUW2Eh.mjs +1048 -0
  319. package/dist/snsSubscriptions-nnSUW2Eh.mjs.map +1 -0
  320. package/dist/sst-Bw7686br.mjs +478 -0
  321. package/dist/sst-Bw7686br.mjs.map +1 -0
  322. package/dist/sst-Md7c1UC_.cjs +501 -0
  323. package/dist/sst-Md7c1UC_.cjs.map +1 -0
  324. package/dist/stack-D2cLLaO-.mjs +2256 -0
  325. package/dist/stack-D2cLLaO-.mjs.map +1 -0
  326. package/dist/stack-DTcnynGb.cjs +2431 -0
  327. package/dist/stack-DTcnynGb.cjs.map +1 -0
  328. package/dist/stage-Bw3bJ7Au.mjs +302 -0
  329. package/dist/stage-Bw3bJ7Au.mjs.map +1 -0
  330. package/dist/stage-RLOenlHV.cjs +313 -0
  331. package/dist/stage-RLOenlHV.cjs.map +1 -0
  332. package/dist/stages-B0yOikgt.cjs +190 -0
  333. package/dist/stages-B0yOikgt.cjs.map +1 -0
  334. package/dist/stages-yA9bhStl.mjs +190 -0
  335. package/dist/stages-yA9bhStl.mjs.map +1 -0
  336. package/dist/target/public.cjs +15 -0
  337. package/dist/target/public.d.cts +28 -0
  338. package/dist/target/public.d.cts.map +1 -0
  339. package/dist/target/public.d.mts +28 -0
  340. package/dist/target/public.d.mts.map +1 -0
  341. package/dist/target/public.mjs +4 -0
  342. package/dist/terminal-C-_cMKTY.cjs +85 -0
  343. package/dist/terminal-C-_cMKTY.cjs.map +1 -0
  344. package/dist/terminal-Dq29bK3u.mjs +85 -0
  345. package/dist/terminal-Dq29bK3u.mjs.map +1 -0
  346. package/dist/types-Bl_CwZC9.cjs +90 -0
  347. package/dist/types-Bl_CwZC9.cjs.map +1 -0
  348. package/dist/{types-RhXmHR-e.d.cts → types-CvucX3yD.d.mts} +2163 -364
  349. package/dist/types-CvucX3yD.d.mts.map +1 -0
  350. package/dist/{types-kvBQjpPo.d.mts → types-D1C8pUyh.d.cts} +2165 -364
  351. package/dist/types-D1C8pUyh.d.cts.map +1 -0
  352. package/dist/types-Y1NfWlyG.mjs +61 -0
  353. package/dist/types-Y1NfWlyG.mjs.map +1 -0
  354. package/dist/utils-D2Nk1Nv2.cjs +205 -0
  355. package/dist/utils-D2Nk1Nv2.cjs.map +1 -0
  356. package/dist/utils-D_fxUqvU.mjs +156 -0
  357. package/dist/utils-D_fxUqvU.mjs.map +1 -0
  358. package/dist/vitest.cjs +65 -0
  359. package/dist/vitest.cjs.map +1 -0
  360. package/dist/vitest.d.cts +29 -0
  361. package/dist/vitest.d.cts.map +1 -0
  362. package/dist/vitest.d.mts +29 -0
  363. package/dist/vitest.d.mts.map +1 -0
  364. package/dist/vitest.mjs +65 -0
  365. package/dist/vitest.mjs.map +1 -0
  366. package/dist/workerRuntime-BXfhbe13.cjs +108 -0
  367. package/dist/workerRuntime-BXfhbe13.cjs.map +1 -0
  368. package/dist/workerRuntime-CsOyBRx2.mjs +79 -0
  369. package/dist/workerRuntime-CsOyBRx2.mjs.map +1 -0
  370. package/dist/workspace/index.cjs +6 -2
  371. package/dist/workspace/index.d.cts +3 -3
  372. package/dist/workspace/index.d.mts +3 -3
  373. package/dist/workspace/index.mjs +2 -2
  374. package/dist/workspace-1szcahj9.cjs +2916 -0
  375. package/dist/workspace-1szcahj9.cjs.map +1 -0
  376. package/dist/workspace-DFGsrjGD.mjs +2480 -0
  377. package/dist/workspace-DFGsrjGD.mjs.map +1 -0
  378. package/package.json +65 -13
  379. package/dist/HostingerProvider-BY26bWwB.mjs.map +0 -1
  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.map +0 -1
  386. package/dist/Route53Provider-DVILBsvV.cjs.map +0 -1
  387. package/dist/SSMStateProvider-B0Hu1MKZ.mjs +0 -75
  388. package/dist/SSMStateProvider-B0Hu1MKZ.mjs.map +0 -1
  389. package/dist/SSMStateProvider-VrQ-yeqd.cjs +0 -74
  390. package/dist/SSMStateProvider-VrQ-yeqd.cjs.map +0 -1
  391. package/dist/backup-provisioner-BmhIO_Yr.cjs.map +0 -1
  392. package/dist/backup-provisioner-DIVCbfee.mjs.map +0 -1
  393. package/dist/bundler-BeNDZdHQ.cjs.map +0 -1
  394. package/dist/bundler-BodTL4kf.mjs.map +0 -1
  395. package/dist/config-Q1rvKHvw.cjs +0 -467
  396. package/dist/config-Q1rvKHvw.cjs.map +0 -1
  397. package/dist/config-pqGD3hF9.mjs +0 -414
  398. package/dist/config-pqGD3hF9.mjs.map +0 -1
  399. package/dist/config.d.cts.map +0 -1
  400. package/dist/config.d.mts.map +0 -1
  401. package/dist/credentials-BekkKtY_.mjs +0 -2780
  402. package/dist/credentials-BekkKtY_.mjs.map +0 -1
  403. package/dist/credentials-Q6F0uqJq.cjs +0 -2917
  404. package/dist/credentials-Q6F0uqJq.cjs.map +0 -1
  405. package/dist/discover-BERGFg8v.cjs +0 -288
  406. package/dist/discover-BERGFg8v.cjs.map +0 -1
  407. package/dist/discover-CK-n3w6b.mjs +0 -244
  408. package/dist/discover-CK-n3w6b.mjs.map +0 -1
  409. package/dist/emit-BdoPFjZf.cjs +0 -253
  410. package/dist/emit-BdoPFjZf.cjs.map +0 -1
  411. package/dist/emit-Bzq7JsMP.mjs +0 -224
  412. package/dist/emit-Bzq7JsMP.mjs.map +0 -1
  413. package/dist/fullstack-secrets-BET8gqwK.mjs +0 -81
  414. package/dist/fullstack-secrets-BET8gqwK.mjs.map +0 -1
  415. package/dist/fullstack-secrets-DXsWO-5m.cjs +0 -92
  416. package/dist/fullstack-secrets-DXsWO-5m.cjs.map +0 -1
  417. package/dist/generator-LfZU7NlU.mjs +0 -247
  418. package/dist/generator-LfZU7NlU.mjs.map +0 -1
  419. package/dist/generator-Wdfp0jCS.cjs +0 -282
  420. package/dist/generator-Wdfp0jCS.cjs.map +0 -1
  421. package/dist/github-BfflNPVe.cjs +0 -203
  422. package/dist/github-BfflNPVe.cjs.map +0 -1
  423. package/dist/github-CRwnxKmD.mjs +0 -203
  424. package/dist/github-CRwnxKmD.mjs.map +0 -1
  425. package/dist/index-C-HkOEBt.d.cts.map +0 -1
  426. package/dist/index-C-VLwB_Y.d.mts.map +0 -1
  427. package/dist/keystore-B4PRlbgE.mjs +0 -81
  428. package/dist/keystore-B4PRlbgE.mjs.map +0 -1
  429. package/dist/keystore-DgGRj2Yy.cjs +0 -98
  430. package/dist/keystore-DgGRj2Yy.cjs.map +0 -1
  431. package/dist/openapi-Dcbme-Us.cjs +0 -2038
  432. package/dist/openapi-Dcbme-Us.cjs.map +0 -1
  433. package/dist/openapi-vy4JzhUv.mjs +0 -1991
  434. package/dist/openapi-vy4JzhUv.mjs.map +0 -1
  435. package/dist/storage-C-30BD1e.cjs +0 -272
  436. package/dist/storage-C-30BD1e.cjs.map +0 -1
  437. package/dist/storage-P_b3w7uj.mjs +0 -231
  438. package/dist/storage-P_b3w7uj.mjs.map +0 -1
  439. package/dist/sync-B3xxXtJT.mjs +0 -88
  440. package/dist/sync-B3xxXtJT.mjs.map +0 -1
  441. package/dist/sync-D7uTIIEi.cjs +0 -111
  442. package/dist/sync-D7uTIIEi.cjs.map +0 -1
  443. package/dist/types-RhXmHR-e.d.cts.map +0 -1
  444. package/dist/types-kvBQjpPo.d.mts.map +0 -1
  445. package/dist/workspace-CgwmXEtc.mjs.map +0 -1
  446. package/dist/workspace-mFpI_ky_.cjs.map +0 -1
@@ -1,12 +1,309 @@
1
- import { ConstructManifest } from "@geekmidas/manifest";
1
+ import { ConstructManifest, Declaration } from "@geekmidas/manifest";
2
+ //#region src/errors.d.ts
3
+ /**
4
+ * The errors gkm raises on purpose.
5
+ *
6
+ * A {@link GkmError} is a failure gkm saw coming and explained: a stage
7
+ * missing a key, a config that names nothing, no AWS credentials. Its
8
+ * message is the whole answer — what went wrong and what to do — so the CLI
9
+ * prints `Name: message` and nothing else. A stack trace under it would point
10
+ * at gkm's own code, which is not where the fix is.
11
+ *
12
+ * Anything else that reaches the CLI — a TypeError, an SDK error nothing
13
+ * wrapped — is a failure nobody explained, and keeps its stack. `--debug` or
14
+ * `GKM_DEBUG=1` shows the stack of both.
15
+ */
16
+ declare class GkmError extends Error {}
2
17
  //#endregion
3
- //#region src/deploy/state.d.ts
18
+ //#region src/sandbox/sandbox.d.ts
19
+ /** Where a command's output goes. */
20
+ type SandboxOutput = 'capture' | 'inherit' | 'stderr' | 'ignore';
21
+ interface SandboxExecOptions {
22
+ /**
23
+ * Where the command runs: the project root or a directory below it, as an
24
+ * absolute path or relative to the root. Anywhere else is refused with
25
+ * {@link SandboxCwdEscape}.
26
+ */
27
+ cwd: string;
28
+ /**
29
+ * The command's whole environment. Nothing of the host's is added to it:
30
+ * start from {@link Sandbox.env} and add what the step needs.
31
+ */
32
+ env: Readonly<Record<string, string>>;
33
+ /**
34
+ * How long the command may run before it is killed. Required: a step that
35
+ * waits forever — a sniffed entry that opens a server, a build stuck on a
36
+ * prompt — would otherwise hold the deploy, and its lock, forever.
37
+ */
38
+ timeoutMs: number;
39
+ /**
40
+ * Files the command can read, by name. Mounted in a directory of their own
41
+ * — named by `GKM_SECRETS_DIR` in the command's environment — and removed
42
+ * when it exits. Never set as variables, which every child inherits, a
43
+ * crash report prints and `/proc/<pid>/environ` shows.
44
+ */
45
+ secrets?: Readonly<Record<string, string>>;
46
+ /**
47
+ * `capture` (the default) returns stdout and stderr in the result;
48
+ * `inherit` gives the command the host's terminal; `stderr` sends both
49
+ * streams to the host's stderr; `ignore` discards them.
50
+ */
51
+ output?: SandboxOutput;
52
+ /** Kills the command when aborted; `exec` rejects with the signal's reason. */
53
+ signal?: AbortSignal;
54
+ }
55
+ /** How a command ended. A non-zero exit is a result, not an error. */
56
+ interface SandboxResult {
57
+ exitCode: number | null;
58
+ signal: string | null;
59
+ /** What it wrote to stdout, when its output was captured. */
60
+ stdout: string;
61
+ /** What it wrote to stderr, when its output was captured. */
62
+ stderr: string;
63
+ }
4
64
  /**
5
- * Deploy state management for Dokploy deployments
65
+ * Runs a command against the project, and nothing else of the host's.
6
66
  *
7
- * Stores resource IDs (applications, services) per stage to avoid
8
- * re-creating resources on subsequent deploys.
67
+ * `exec` resolves with the result however the command exited. It rejects
68
+ * with {@link CommandTimedOut} once the timeout passes — after the command is
69
+ * gone — with {@link SandboxCwdEscape} for a directory outside the project,
70
+ * with the signal's reason when aborted, and with the spawn error when the
71
+ * program cannot be started.
9
72
  */
73
+ interface Sandbox {
74
+ /** The project: the directory every command runs at or below. */
75
+ readonly root: string;
76
+ /**
77
+ * Whether the code it runs is kept from the host: its files, its
78
+ * processes, its memory.
79
+ *
80
+ * An isolating sandbox shares nothing but what crosses `exec`, so a config
81
+ * reaches the deploy as data — a live object in it (a custom state store,
82
+ * an inline target) cannot cross, and is refused with
83
+ * `ConfigObjectNotSerializable`. A non-isolating one, like
84
+ * {@link LocalSandbox}, runs on the host as the host's user; a project
85
+ * whose config holds live objects is then loaded in-process as before,
86
+ * because a project trusted to run there is trusted to do that.
87
+ */
88
+ readonly isolating: boolean;
89
+ /**
90
+ * The environment a command starts from: what any program needs to run
91
+ * here — `PATH`, `HOME`, the locale — and no credential.
92
+ */
93
+ readonly env: Readonly<Record<string, string>>;
94
+ exec(command: string, args: readonly string[], options: SandboxExecOptions): Promise<SandboxResult>;
95
+ }
96
+ /** The variable naming the directory a command's secrets are mounted in. */
97
+ declare const SECRETS_DIR_ENV = "GKM_SECRETS_DIR";
98
+ /** A command was asked to run outside the project. */
99
+ declare class SandboxCwdEscape extends GkmError {
100
+ readonly cwd: string;
101
+ readonly root: string;
102
+ constructor(cwd: string, root: string);
103
+ }
104
+ /**
105
+ * `cwd` as an absolute directory inside `root`, or {@link SandboxCwdEscape}.
106
+ *
107
+ * Symlinks are resolved on both sides first, so a link inside the project
108
+ * that points out of it is an escape, and a project reached through a link
109
+ * (`/tmp` on macOS) is still itself. For a sandbox of a host's own to call
110
+ * before it runs anything.
111
+ */
112
+ declare function confineCwd(root: string, cwd: string): string;
113
+ /** A secret's file name: one path segment, so it cannot be written elsewhere. */
114
+ declare class SecretNameInvalid extends GkmError {
115
+ readonly secretName: string;
116
+ constructor(secretName: string);
117
+ }
118
+ //#endregion
119
+ //#region src/deploy/identity.d.ts
120
+ interface DeployIdentity {
121
+ /**
122
+ * Whose deploy this is — an organisation, a team, a repository. Two
123
+ * workspaces with the same name are told apart by it. Defaults to the
124
+ * kebab-cased workspace name; set `deploy.namespace` to choose one.
125
+ */
126
+ readonly namespace: string;
127
+ /** The workspace name as the target spells it: lowercase, `[a-z0-9-]`. */
128
+ readonly project: string;
129
+ readonly stage: string;
130
+ /**
131
+ * `<namespace>/<project>`: what a Dokploy project is claimed by.
132
+ *
133
+ * The stage is not part of it because one Dokploy project holds every stage
134
+ * of a workspace, each as an environment — the key has to be the same from
135
+ * every stage that deploys into it.
136
+ */
137
+ readonly key: string;
138
+ /**
139
+ * The prefix every name on the target carries: the project alone in the
140
+ * default namespace, `<namespace>-<project>` in any other.
141
+ *
142
+ * The default adds nothing so that a workspace that never set a namespace
143
+ * keeps the names it was already deployed under — a Postgres is found by
144
+ * its name, and a new name would be a new, empty database.
145
+ */
146
+ readonly scope: string;
147
+ }
148
+ /** What an identity is derived from: a workspace's name and namespace. */
149
+ interface IdentitySource {
150
+ name: string;
151
+ deploy?: {
152
+ namespace?: string;
153
+ };
154
+ }
155
+ declare function deployIdentity(workspace: IdentitySource, stage: string): DeployIdentity;
156
+ //#endregion
157
+ //#region src/secrets/types.d.ts
158
+ /** Credentials for a specific service */
159
+ interface ServiceCredentials {
160
+ host: string;
161
+ port: number;
162
+ username: string;
163
+ password: string;
164
+ /** Database name (for postgres) */
165
+ database?: string;
166
+ /** Bucket name (for minio) */
167
+ bucket?: string;
168
+ /** Access key ID (for localstack) */
169
+ accessKeyId?: string;
170
+ /** Region (for localstack) */
171
+ region?: string;
172
+ }
173
+ /** Stage secrets configuration */
174
+ interface StageSecrets {
175
+ /** Stage name (e.g., 'production', 'staging') */
176
+ stage: string;
177
+ /** ISO timestamp when secrets were created */
178
+ createdAt: string;
179
+ /** ISO timestamp when secrets were last updated */
180
+ updatedAt: string;
181
+ /** Service-specific credentials */
182
+ services: {
183
+ postgres?: ServiceCredentials;
184
+ redis?: ServiceCredentials;
185
+ minio?: ServiceCredentials;
186
+ mailpit?: ServiceCredentials;
187
+ localstack?: ServiceCredentials;
188
+ };
189
+ /** Generated connection URLs */
190
+ urls: {
191
+ DATABASE_URL?: string;
192
+ REDIS_URL?: string;
193
+ STORAGE_ENDPOINT?: string;
194
+ SMTP_HOST?: string;
195
+ SMTP_PORT?: string;
196
+ };
197
+ /**
198
+ * Values injected by key: those set with `gkm secrets:set` — a third
199
+ * party's credentials — and those generated once for the stage, such as an
200
+ * auth server's signing secret.
201
+ */
202
+ custom: Record<string, string>;
203
+ /**
204
+ * Random, generated once per stage: what every password a deploy derives
205
+ * is salted with. Without it a derived password is a function of the
206
+ * project and stage names, which anyone reading the repo has.
207
+ */
208
+ seed?: string;
209
+ }
210
+ //#endregion
211
+ //#region src/secrets/store.d.ts
212
+ interface SecretsStore {
213
+ /**
214
+ * Which kind of store this is — `'file'`, `'s3'`, `'ssm'`,
215
+ * `'secrets-manager'`, or a custom one's.
216
+ */
217
+ readonly name: string;
218
+ /** The stage's secrets, or null when it has none here. */
219
+ read(stage: string): Promise<StageSecrets | null>;
220
+ /** Replace the stage's secrets. */
221
+ write(stage: string, secrets: StageSecrets): Promise<void>;
222
+ /**
223
+ * Delete the stage's secrets, every kept version of them included — what
224
+ * `gkm compose --destroy --secrets` does. Optional for a custom store; one
225
+ * without it cannot have its stage's secrets destroyed by gkm.
226
+ */
227
+ delete?(stage: string): Promise<void>;
228
+ }
229
+ /** Secrets in SSM Parameter Store, in the account of the active credentials. */
230
+ interface SsmSecretsStoreConfig {
231
+ provider: 'ssm';
232
+ region: string;
233
+ }
234
+ /**
235
+ * Secrets in AWS Secrets Manager, in the account of the active credentials:
236
+ * one secret per stage, `gkm/<project>/<stage>/secrets`. Up to 64 KB where
237
+ * SSM holds 8 KB, at a monthly price per secret.
238
+ */
239
+ interface SecretsManagerSecretsStoreConfig {
240
+ provider: 'secrets-manager';
241
+ region: string;
242
+ /**
243
+ * The KMS key (id, ARN or alias) a stage's secret is created with. Unset,
244
+ * it is the account's AWS-managed `aws/secretsmanager` key.
245
+ */
246
+ kmsKeyId?: string;
247
+ }
248
+ /**
249
+ * Secrets in S3, one object per stage —
250
+ * `<prefix>/<project>/<stage>/secrets.json` — in the project bucket beside the
251
+ * deploy state and backups, or in a bucket that exists. Encrypted with SSE-S3,
252
+ * every past document kept by the bucket's versioning, and no size limit.
253
+ */
254
+ interface S3SecretsStoreConfig {
255
+ provider: 's3';
256
+ /**
257
+ * A bucket that already exists. Omitted, the project bucket —
258
+ * `gkm-<project>-<account id>`, created by the first write.
259
+ */
260
+ bucket?: string;
261
+ /** The bucket's region. Omitted, the deploy state's, when it is in S3. */
262
+ region?: string;
263
+ /** Key prefix inside the bucket. Omitted, the S3 state's, else `gkm`. */
264
+ prefix?: string;
265
+ }
266
+ /** Any other backend: an object implementing {@link SecretsStore}. */
267
+ interface CustomSecretsStoreConfig {
268
+ provider: SecretsStore;
269
+ }
270
+ /**
271
+ * `secrets.store` in gkm.config.ts.
272
+ *
273
+ * `'file'` — the default — keeps each stage's secrets in the encrypted
274
+ * `.gkm/secrets/<stage>.json`, its key in the CLI's home (`GKM_HOME`, else
275
+ * `~/.gkm`). It cannot serve a
276
+ * deploy from CI while `.gkm/` is gitignored; `s3`, `ssm`, `secrets-manager`
277
+ * or a custom store can.
278
+ */
279
+ type SecretsStoreConfig = 'file' | S3SecretsStoreConfig | SsmSecretsStoreConfig | SecretsManagerSecretsStoreConfig | CustomSecretsStoreConfig;
280
+ //#endregion
281
+ //#region src/deploy/actor.d.ts
282
+ /**
283
+ * Who wrote a stage's deploy state: a GitHub Actions run, or a person at a
284
+ * machine. Recorded on every state write (`updatedBy`), on every resource
285
+ * record and on every release (`releasedBy`), so "who put this here" has an
286
+ * answer that does not depend on anyone's memory.
287
+ */
288
+ /** A GitHub Actions run: the account that triggered it and the run's page. */
289
+ interface GithubActor {
290
+ kind: 'github';
291
+ /** `GITHUB_ACTOR` — the account that triggered the run. */
292
+ actor: string;
293
+ /** `<server>/<repository>/actions/runs/<run id>` */
294
+ run: string;
295
+ /** `GITHUB_WORKFLOW` — the workflow's name. */
296
+ workflow?: string;
297
+ }
298
+ /** A person at a machine. */
299
+ interface LocalActor {
300
+ kind: 'local';
301
+ user: string;
302
+ host: string;
303
+ }
304
+ type Actor = GithubActor | LocalActor;
305
+ //#endregion
306
+ //#region src/deploy/state.d.ts
10
307
  /**
11
308
  * Per-app database credentials
12
309
  */
@@ -61,12 +358,30 @@ interface BackupState {
61
358
  /** Timestamp when backup was configured */
62
359
  createdAt: string;
63
360
  }
361
+ /** What every target's state for a stage holds. */
362
+ interface StageStateCore {
363
+ stage: string;
364
+ lastDeployedAt: string;
365
+ /**
366
+ * The deploy identity's key (`<namespace>/<project>`) that last deployed
367
+ * this stage — what the project's ownership marker says.
368
+ */
369
+ identity?: string;
370
+ /**
371
+ * Each app's releases, keyed by app name: what runs now, what ran before
372
+ * it — which `gkm deploy:rollback` restores — and the history behind both.
373
+ */
374
+ releases?: Record<string, AppReleases>;
375
+ }
376
+ /** A compose stage's state: the core, and nothing Dokploy-specific. */
377
+ interface ComposeStageState extends StageStateCore {
378
+ provider: 'compose';
379
+ }
64
380
  /**
65
381
  * State for a single stage deployment
66
382
  */
67
- interface DokployStageState {
383
+ interface DokployStageState extends StageStateCore {
68
384
  provider: 'dokploy';
69
- stage: string;
70
385
  /** Dokploy project ID - created on first deploy */
71
386
  projectId: string;
72
387
  environmentId: string;
@@ -85,7 +400,169 @@ interface DokployStageState {
85
400
  dnsRecords?: Record<string, CreatedDnsRecord>;
86
401
  /** Backup destination state */
87
402
  backups?: BackupState;
88
- lastDeployedAt: string;
403
+ /**
404
+ * The Dokploy registry the stage's images are pulled through. Kept per
405
+ * stage rather than once per machine, so a stage keeps the registry it was
406
+ * deployed with whoever deploys it next.
407
+ */
408
+ registryId?: string;
409
+ }
410
+ /** A stage's state, whichever target wrote it. */
411
+ type StageState = DokployStageState | ComposeStageState;
412
+ /** An image a stage runs: the ref it was pushed as, and what it resolved to. */
413
+ interface DeployedImage {
414
+ ref: string;
415
+ /**
416
+ * The tag it was released under — a site's carries its stage
417
+ * (`v1.4.0-production`). Recorded by targets that pull a release by tag.
418
+ */
419
+ tag?: string;
420
+ /** The registry's digest, `sha256:…` — absent if it could not be read. */
421
+ digest?: string;
422
+ }
423
+ /** An image that went live, and when. */
424
+ interface ReleasedImage extends DeployedImage {
425
+ /** The image tag the deploy released under. */
426
+ tag?: string;
427
+ releasedAt: string;
428
+ /** Who released it — absent on a release recorded before it was kept. */
429
+ releasedBy?: Actor;
430
+ /** Set when a rollback replaced it: it is never rolled back *to*. */
431
+ rolledBack?: true;
432
+ }
433
+ /** An app's releases: what runs, what ran before it, and what ran before that. */
434
+ interface AppReleases {
435
+ current: ReleasedImage;
436
+ /** What a rollback restores; absent until a second release. */
437
+ previous?: ReleasedImage;
438
+ /** Every release, newest first, at most {@link RELEASE_HISTORY} of them. */
439
+ history: ReleasedImage[];
440
+ }
441
+ //#endregion
442
+ //#region src/deploy/StateStore.d.ts
443
+ /** Opaque: a file hash, an SSM parameter version or an S3 ETag. */
444
+ type StateVersion = string;
445
+ /**
446
+ * `pending` is written before the call that creates the resource, `ready`
447
+ * once the target has returned its id. A run that finds a `pending` record
448
+ * knows a previous run may have created the resource and should look for it
449
+ * before creating another.
450
+ */
451
+ type ResourceStatus = 'pending' | 'ready';
452
+ interface ResourceRecord {
453
+ /** Unique within the stage, `<type>:<name>` — e.g. `application:api`. */
454
+ key: string;
455
+ /** What kind of resource it is — e.g. `application`, `postgres`. */
456
+ type: string;
457
+ /** The id the target gave it. Absent while `pending`. */
458
+ id?: string;
459
+ status: ResourceStatus;
460
+ /** Whatever the target needs to adopt the resource on a later run. */
461
+ data?: Record<string, unknown>;
462
+ updatedAt: string;
463
+ /** Who wrote the record — absent on one written before it was kept. */
464
+ updatedBy?: Actor;
465
+ }
466
+ /** A resource as a caller hands it to `putResource`; the store stamps it. */
467
+ type ResourceInput = Omit<ResourceRecord, 'updatedAt' | 'updatedBy'>;
468
+ /** One write of a stage's state: which, when, by whom, doing what. */
469
+ interface HistoryEntry {
470
+ serial: number;
471
+ at: string;
472
+ by: Actor;
473
+ /** The lock's operation — `deploy`, `rollback`, `setup`, `state:push` … */
474
+ operation: string;
475
+ }
476
+ interface StoredStageState {
477
+ state: StageState;
478
+ resources: Record<string, ResourceRecord>;
479
+ /** The latest writes, newest first. */
480
+ history: HistoryEntry[];
481
+ /** Pass back as `expectedVersion` to write on top of exactly this read. */
482
+ version: StateVersion;
483
+ }
484
+ interface WriteOptions {
485
+ /**
486
+ * The version this write is based on — `null` to create state that must
487
+ * not exist yet.
488
+ */
489
+ expectedVersion: StateVersion | null;
490
+ }
491
+ interface ResourceWriteOptions {
492
+ /**
493
+ * Omitted, the record is applied on top of whatever is stored now (still
494
+ * conditionally, so a concurrent write raises rather than being lost).
495
+ */
496
+ expectedVersion?: StateVersion;
497
+ }
498
+ interface LockHolder {
499
+ /** Unique per acquisition, so a release never removes someone else's lock. */
500
+ id: string;
501
+ owner: string;
502
+ host: string;
503
+ pid: number;
504
+ acquiredAt: string;
505
+ /** What the holder is doing, e.g. `deploy`. */
506
+ operation?: string;
507
+ }
508
+ interface LockOptions {
509
+ operation?: string;
510
+ }
511
+ interface StateLock {
512
+ readonly stage: string;
513
+ readonly holder: LockHolder;
514
+ /** Removes the lock if it is still this one; safe to call twice. */
515
+ release(): Promise<void>;
516
+ }
517
+ interface StateStore {
518
+ /** Takes the stage's lock, or raises `StateLocked` naming its holder. */
519
+ lock(stage: string, options?: LockOptions): Promise<StateLock>;
520
+ /**
521
+ * Removes the stage's lock whoever holds it, for a run that crashed with
522
+ * it held. Returns the holder it removed, or `null` if there was none.
523
+ */
524
+ forceUnlock(stage: string): Promise<LockHolder | null>;
525
+ read(stage: string): Promise<StoredStageState | null>;
526
+ /** Replaces the stage's state, keeping its resource records. */
527
+ write(stage: string, state: StageState, options: WriteOptions): Promise<StateVersion>;
528
+ putResource(stage: string, record: ResourceInput, options?: ResourceWriteOptions): Promise<StateVersion>;
529
+ deleteResource(stage: string, key: string, options?: ResourceWriteOptions): Promise<StateVersion>;
530
+ /**
531
+ * How big the stage's document is as this store would write it, against
532
+ * the most it can hold — for a store with a limit (SSM). `null` when the
533
+ * stage has no state yet.
534
+ */
535
+ capacity?(stage: string): Promise<StateCapacity | null>;
536
+ }
537
+ /** A stored document's size against the store's limit, in bytes. */
538
+ interface StateCapacity {
539
+ bytes: number;
540
+ limit: number;
541
+ location: string;
542
+ /** The store's AWS region, for the message that suggests S3. */
543
+ region?: string;
544
+ }
545
+ declare class StateLocked extends GkmError {
546
+ readonly stage: string;
547
+ readonly holder: LockHolder | null;
548
+ readonly location: string;
549
+ constructor(stage: string, holder: LockHolder | null, location: string);
550
+ }
551
+ declare class StateVersionConflict extends GkmError {
552
+ readonly stage: string;
553
+ readonly expectedVersion: StateVersion | null;
554
+ readonly actualVersion: StateVersion | null;
555
+ constructor(stage: string, expectedVersion: StateVersion | null, actualVersion: StateVersion | null);
556
+ }
557
+ /**
558
+ * A deploy, setup or rollback of a stage in CI, with the stage's state kept on
559
+ * the runner — which is discarded when the job ends.
560
+ */
561
+ declare class LocalStateInCi extends GkmError {
562
+ readonly stage: string;
563
+ readonly operation: string;
564
+ readonly region: string;
565
+ constructor(stage: string, operation: string, region: string);
89
566
  }
90
567
  //#endregion
91
568
  //#region src/deploy/StateProvider.d.ts
@@ -103,14 +580,14 @@ interface StateProvider {
103
580
  * @param stage - The deployment stage (e.g., 'development', 'production')
104
581
  * @returns The state object or null if not found
105
582
  */
106
- read(stage: string): Promise<DokployStageState | null>;
583
+ read(stage: string): Promise<StageState | null>;
107
584
  /**
108
585
  * Write deployment state for a stage.
109
586
  *
110
587
  * @param stage - The deployment stage
111
588
  * @param state - The state object to persist
112
589
  */
113
- write(stage: string, state: DokployStageState): Promise<void>;
590
+ write(stage: string, state: StageState): Promise<void>;
114
591
  }
115
592
  /**
116
593
  * Valid AWS regions.
@@ -132,17 +609,903 @@ interface SSMStateConfig {
132
609
  /** AWS profile name (optional - uses default credential chain if not provided) */
133
610
  profile?: string;
134
611
  }
612
+ /**
613
+ * S3 state config: one object per stage, written with conditional puts
614
+ * (`If-Match` / `If-None-Match`), and a lock object beside it.
615
+ *
616
+ * Keys: `<prefix>/<workspace name>/<stage>/state.json` and `lock.json`.
617
+ */
618
+ interface S3StateConfig {
619
+ provider: 's3';
620
+ /**
621
+ * Bucket the state lives in; it must already exist. Omitted, the project
622
+ * bucket — `gkm-<project>-<account id>`, created by the first deploy.
623
+ */
624
+ bucket?: string;
625
+ /** AWS region of the bucket */
626
+ region: AwsRegion;
627
+ /** Key prefix inside the bucket (default: `gkm`) */
628
+ prefix?: string;
629
+ /** AWS profile name (optional - uses default credential chain if not provided) */
630
+ profile?: string;
631
+ }
135
632
  /**
136
633
  * Custom state provider config.
137
634
  */
138
635
  interface CustomStateConfig {
139
- /** Custom StateProvider implementation */
140
- provider: StateProvider;
636
+ /**
637
+ * Custom implementation. A `StateStore` is used as is; a `StateProvider`
638
+ * still works, but cannot lock — deploy warns `StateStoreWithoutLocking`.
639
+ */
640
+ provider: StateProvider | StateStore;
141
641
  }
142
642
  /**
143
643
  * State configuration types.
144
644
  */
145
- type StateConfig = LocalStateConfig | SSMStateConfig | CustomStateConfig;
645
+ type StateConfig = LocalStateConfig | SSMStateConfig | S3StateConfig | CustomStateConfig;
646
+ //#endregion
647
+ //#region src/reconcile/discover.d.ts
648
+ /** The construct face discovery needs: an id, and the ability to declare. */
649
+ interface Declarable {
650
+ id: string;
651
+ declare(): Declaration[];
652
+ }
653
+ /**
654
+ * Whether a module export is a construct.
655
+ *
656
+ * Deliberately loose about what else it carries — a construct that also has a
657
+ * `service` is still a construct, and requiring one would exclude the kinds that
658
+ * own no address.
659
+ */
660
+ declare function isDeclarable(value: unknown): value is Declarable;
661
+ interface DiscoverOptions {
662
+ /** The glob(s) to search. One pattern, not one per kind. */
663
+ patterns: string | readonly string[];
664
+ cwd?: string;
665
+ /**
666
+ * Re-import changed modules, for the dev watcher.
667
+ *
668
+ * A single glob makes discovery more central, not less: a new construct file
669
+ * has to be picked up on `add`, not only on `change`.
670
+ */
671
+ bustCache?: boolean;
672
+ /**
673
+ * Filled in with where each construct was found, when provided.
674
+ *
675
+ * Discovery is the only thing that knows: it globbed the files and imported
676
+ * them. Everything downstream that needs to *write* an import — the build,
677
+ * generating a server entry that reads a surface's logger — would otherwise
678
+ * have to be told the path in config, which is the string this removes.
679
+ *
680
+ * An out-parameter rather than a second return value so that every existing
681
+ * caller, which wants the manifest and nothing else, is unchanged.
682
+ */
683
+ sources?: Record<string, ConstructSource>;
684
+ /**
685
+ * Filled in, when provided, with the files each worker's background work is
686
+ * declared in — its crons, queue consumers and topic subscribers — keyed by
687
+ * the worker.
688
+ *
689
+ * What says which app's build carries a worker's entry: the one whose
690
+ * directory holds its work. A worker declares no path of its own.
691
+ */
692
+ background?: Record<string, string[]>;
693
+ /**
694
+ * Filled in, when provided, with the files that export something built
695
+ * from each surface — an endpoint, a WebSocket route — keyed by the
696
+ * surface. What a surface that serves itself imports its routes from.
697
+ */
698
+ served?: Record<string, string[]>;
699
+ /**
700
+ * Filled in, when provided, with each worker's subscribers — by the export
701
+ * a push route is named after, and the key its deliveries come from: its
702
+ * topic's, or its bucket's events — keyed by the worker.
703
+ *
704
+ * What says which worker SNS pushes to, and on which paths: a build bound
705
+ * for a server records no subscriber in the manifest, because none has a
706
+ * handler of its own there.
707
+ */
708
+ subscribers?: Record<string, BoundSubscriber[]>;
709
+ /**
710
+ * Import the construct modules in this sandbox rather than in this
711
+ * process. Defaults to the run's own (`withSandbox`), so a deploy's every
712
+ * discovery — the engine's included — happens there; with neither, they
713
+ * are imported here, as before.
714
+ */
715
+ sandbox?: Sandbox;
716
+ }
717
+ /** A worker's subscriber — to a topic or to a bucket — as discovery found it. */
718
+ interface BoundSubscriber {
719
+ /** Its export — what its push route is named after. */
720
+ name: string;
721
+ /**
722
+ * The env key its deliveries come from: its topic's publisher connection
723
+ * string, or its bucket's events connection string. An `sns://` value is
724
+ * what makes SNS push to it.
725
+ */
726
+ connectionKey: string;
727
+ /**
728
+ * The event types a topic subscriber names — its SNS subscription's filter
729
+ * on the `type` attribute the topic's publisher sets. Absent for a
730
+ * bucket's subscriber: S3 sets no such attribute, and the subscriber's own
731
+ * filter decides.
732
+ */
733
+ events?: readonly string[];
734
+ }
735
+ /** Importing a construct module, or declaring one, threw in the sandbox. */
736
+ declare class ConstructDiscoveryFailed extends Error {
737
+ readonly errorName: string;
738
+ readonly detail: string;
739
+ constructor(errorName: string, detail: string);
740
+ }
741
+ /**
742
+ * The constructs' declarations hold something that is not data, and the
743
+ * sandbox they were discovered in hands the deploy nothing but data.
744
+ */
745
+ declare class ConstructsNotSerializable extends Error {
746
+ readonly paths: readonly string[];
747
+ constructor(paths: readonly string[]);
748
+ }
749
+ /** Where a construct was declared, and under what name. */
750
+ interface ConstructSource {
751
+ /** Absolute path to the module that exported it. */
752
+ file: string;
753
+ /** The name it was exported as — what an import statement has to say. */
754
+ exportName: string;
755
+ /**
756
+ * The exported construct itself.
757
+ *
758
+ * What a declaration cannot say — whether it serves itself — the object can
759
+ * be asked, and discovery already imported it.
760
+ */
761
+ construct: unknown;
762
+ }
763
+ /**
764
+ * Build the construct manifest for a project.
765
+ *
766
+ * Runs the manifest's own validation before returning, so an app is wrong here
767
+ * — where the error names a file — rather than at deploy.
768
+ *
769
+ * @throws {DuplicateConstruct} when two exports claim one id.
770
+ */
771
+ declare function discover(options: DiscoverOptions): Promise<ConstructManifest>;
772
+ //#endregion
773
+ //#region src/providers/types.d.ts
774
+ /** The manifest kinds a stage can name a provider for. */
775
+ declare const PROVIDER_KINDS: readonly ['objects', 'inbox'];
776
+ type ProviderKind = (typeof PROVIDER_KINDS)[number];
777
+ //#endregion
778
+ //#region src/providers/ses/config.d.ts
779
+ /** `inbox: { provider: 'ses' }` — each inbox received by SES in the stage's account. */
780
+ interface SesInboxConfig {
781
+ provider: 'ses';
782
+ /**
783
+ * Where mail is received, and the inbox's bucket and topic live. Defaults
784
+ * to the secrets store's region, then `AWS_REGION` — and must be one SES
785
+ * receives mail in.
786
+ */
787
+ region?: string;
788
+ }
789
+ //#endregion
790
+ //#region src/deploy/credentials.d.ts
791
+ /**
792
+ * What each kind of credential is asked for with, and what it is.
793
+ *
794
+ * A target that needs a kind the CLI does not know declares it by augmenting
795
+ * this interface, and lists it in its `credentials`:
796
+ *
797
+ * ```ts
798
+ * declare module '@geekmidas/cli/target' {
799
+ * interface CredentialKinds {
800
+ * fly: { request: { org: string }; value: { token: string } };
801
+ * }
802
+ * }
803
+ * ```
804
+ */
805
+ interface CredentialKinds {
806
+ /** The Dokploy API a stage deploys through. */
807
+ dokploy: {
808
+ /** `deploy.dokploy.endpoint`, when the config names one. */
809
+ request: {
810
+ endpoint?: string;
811
+ };
812
+ value: {
813
+ endpoint: string;
814
+ token: string;
815
+ };
816
+ };
817
+ /**
818
+ * A container registry login, for Dokploy to pull with. Asked for only when
819
+ * Dokploy has no registry for `deploy.registry` and one has to be
820
+ * created.
821
+ */
822
+ registry: {
823
+ /** `deploy.registry`. */
824
+ request: {
825
+ url: string;
826
+ };
827
+ value: {
828
+ username: string;
829
+ password: string;
830
+ };
831
+ };
832
+ /**
833
+ * The AWS account a stage deploys to, for the SST target's `sst deploy`.
834
+ * Handed to that one command's environment and to nothing else.
835
+ */
836
+ aws: {
837
+ /** The stage, for a provider that keeps one account per stage. */
838
+ request: {
839
+ stage: string;
840
+ };
841
+ value: AwsCredential;
842
+ };
843
+ /**
844
+ * A GoDaddy Personal Access Token, for a `dns` domain whose provider is
845
+ * `godaddy`. Read on the machine that writes the records — never the
846
+ * server's.
847
+ */
848
+ godaddy: {
849
+ request: Record<never, never>;
850
+ value: GoDaddyCredential;
851
+ };
852
+ /**
853
+ * A Hostinger API token, for a `dns` domain whose provider is
854
+ * `hostinger`. Like GoDaddy's, read where the records are written.
855
+ */
856
+ hostinger: {
857
+ request: Record<never, never>;
858
+ value: HostingerCredential;
859
+ };
860
+ }
861
+ /** A Hostinger API token, from hpanel.hostinger.com/profile/api. */
862
+ interface HostingerCredential {
863
+ token: string;
864
+ }
865
+ /** A GoDaddy Personal Access Token, sent as `Authorization: Bearer <token>`. */
866
+ interface GoDaddyCredential {
867
+ token: string;
868
+ }
869
+ /**
870
+ * Who to act as on AWS: a named profile, or keys.
871
+ *
872
+ * Never both. Given both, every AWS SDK takes the keys and ignores the
873
+ * profile, so `--profile prod` with staging's keys still exported would deploy
874
+ * production's stack into staging's account — the reason `secretsStoreFor`
875
+ * resolves a named profile on its own, and why this cannot express the mix.
876
+ */
877
+ type AwsCredential = {
878
+ /** A profile in `~/.aws/config` — keys, SSO, an assumed role. */
879
+ profile: string;
880
+ region?: string;
881
+ } | {
882
+ accessKeyId: string;
883
+ secretAccessKey: string;
884
+ /** Present for temporary keys: an assumed role, GitHub's OIDC. */
885
+ sessionToken?: string;
886
+ region?: string;
887
+ };
888
+ type CredentialKind = keyof CredentialKinds;
889
+ /** What a deploy asks a provider for. */
890
+ type CredentialRequest<K extends CredentialKind = CredentialKind> = { [P in K]: {
891
+ kind: P;
892
+ } & CredentialKinds[P]['request']; }[K];
893
+ /** What a provider answers with. */
894
+ type Credential<K extends CredentialKind> = CredentialKinds[K]['value'];
895
+ interface CredentialProvider {
896
+ /**
897
+ * The credential `request` asks for, or `undefined` when this provider has
898
+ * none — the deploy then raises {@link MissingCredential}.
899
+ */
900
+ get<K extends CredentialKind>(request: CredentialRequest<K>, options?: {
901
+ signal?: AbortSignal;
902
+ }): Promise<Credential<K> | undefined>;
903
+ }
904
+ /** A deploy needed a credential, and its provider had none. */
905
+ declare class MissingCredential extends GkmError {
906
+ readonly kind: CredentialKind;
907
+ /** What it was for: the Dokploy endpoint or the registry URL. */
908
+ readonly target: string | undefined;
909
+ /** How to supply it. */
910
+ readonly howToProvide: string;
911
+ constructor(kind: CredentialKind,
912
+ /** What it was for: the Dokploy endpoint or the registry URL. */
913
+ target: string | undefined,
914
+ /** How to supply it. */
915
+ howToProvide?: string);
916
+ }
917
+ /** Whatever was asked for, from the first provider that has it. */
918
+ declare function chainCredentials(...providers: CredentialProvider[]): CredentialProvider;
919
+ interface StoredCredentialsOptions {
920
+ /** Where to read the variables from. Defaults to `process.env`. */
921
+ env?: NodeJS.ProcessEnv;
922
+ /**
923
+ * The CLI's home, whose `credentials.json` holds stored logins. Defaults
924
+ * to `GKM_HOME`, else `~/.gkm`.
925
+ */
926
+ home?: string;
927
+ }
928
+ /**
929
+ * Credentials from the environment, then from what `gkm login` stored. What
930
+ * `deploy()` uses when it is handed no provider.
931
+ *
932
+ * - Dokploy: `DOKPLOY_API_TOKEN` / `DOKPLOY_ENDPOINT`, each falling back to
933
+ * the stored login, and the endpoint finally to `deploy.dokploy.endpoint`.
934
+ * Each half is read on its own: a token is a secret and belongs in the
935
+ * environment, an endpoint is configuration and belongs in the config.
936
+ * - Registry: `DOCKER_REGISTRY_USERNAME` / `DOCKER_REGISTRY_PASSWORD`.
937
+ * - AWS: `AWS_PROFILE` when it is set, and then nothing else; otherwise
938
+ * `AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY` / `AWS_SESSION_TOKEN`. The
939
+ * profile winning is `secretsStoreFor`'s rule: a profile is a choice of
940
+ * account someone made, exported keys may be left over from another.
941
+ * Read here, by name, and handed only to the command that deploys — the
942
+ * sandbox every other step runs in passes no `AWS_*` on.
943
+ */
944
+ declare function storedCredentials(options?: StoredCredentialsOptions): CredentialProvider;
945
+ //#endregion
946
+ //#region src/deploy/types.d.ts
947
+ /** Result for a single app deployment in workspace mode */
948
+ interface AppDeployResult {
949
+ /** App name */
950
+ appName: string;
951
+ /** App type */
952
+ type: 'backend' | 'web' | 'mobile';
953
+ /** Whether deployment succeeded */
954
+ success: boolean;
955
+ /** Dokploy application ID */
956
+ applicationId?: string;
957
+ /** Docker image reference */
958
+ imageRef?: string;
959
+ /** The registry's digest for the image, `sha256:…`, once pushed */
960
+ digest?: string;
961
+ /** Deployment URL */
962
+ url?: string;
963
+ /** Error message if failed */
964
+ error?: string;
965
+ }
966
+ /** Result from workspace deployment */
967
+ interface WorkspaceDeployResult {
968
+ /** Results for each app */
969
+ apps: AppDeployResult[];
970
+ /** Dokploy project ID */
971
+ projectId: string;
972
+ /** Total number of successful deployments */
973
+ successCount: number;
974
+ /** Total number of failed deployments */
975
+ failedCount: number;
976
+ }
977
+ /**
978
+ * What a deploy did — or, for a dry run, would do. Plain JSON, so it can be
979
+ * written out as is (`gkm deploy --json` ends with it).
980
+ */
981
+ interface DeployResult extends WorkspaceDeployResult {
982
+ stage: string;
983
+ /** `<namespace>/<project>`. */
984
+ identity: string;
985
+ /** The image tag every app was built with. */
986
+ tag: string;
987
+ /** Whether this was a dry run: nothing was created, built or pushed. */
988
+ dryRun: boolean;
989
+ /** Dokploy's environment for the stage; empty when a dry run would create it. */
990
+ environmentId: string;
991
+ /** Apps left out, and why — a mobile app, another deploy target. */
992
+ skipped: {
993
+ app: string;
994
+ reason: string;
995
+ }[];
996
+ /** Each deployed app's public URL. */
997
+ urls: Record<string, string>;
998
+ /**
999
+ * Every resource the run touched, in order: what it applied, or for a dry
1000
+ * run, what it would.
1001
+ */
1002
+ changes: ResourceChange[];
1003
+ }
1004
+ //#endregion
1005
+ //#region src/deploy/events.d.ts
1006
+ /**
1007
+ * The stretch of a deploy an event belongs to.
1008
+ *
1009
+ * - `validate`: the config, the target, the stage, the apps, the lock, the
1010
+ * stage's secrets and what each app reads from its environment
1011
+ * - `plan`: a dry run's lookups — what would be created and what reused
1012
+ * - `provision`: what the apps run on — for Dokploy the project, environment
1013
+ * and registry — and the declared constructs
1014
+ * - `build`: each app's artifact, built without changing anything live
1015
+ * - `release`: the artifacts put live. Dokploy applies the stage's
1016
+ * migrations and runs its seeds, then builds and pushes each image here, beside its
1017
+ * application, because a site's build args are resolved per app — and
1018
+ * checks each backend before any site is released
1019
+ * - `verify`: what was released answers — for Dokploy, each site's DNS
1020
+ * records and health
1021
+ * - `rollback`: the previous release restored, after `release` or `verify`
1022
+ * failed, on a target that can
1023
+ */
1024
+ type DeployPhase = 'validate' | 'plan' | 'provision' | 'build' | 'release' | 'verify' | 'rollback';
1025
+ /** An error, as an event carries it. */
1026
+ interface DeployEventError {
1027
+ /** The error's class name — `MissingCredential`, `StateLocked`. */
1028
+ name: string;
1029
+ message: string;
1030
+ }
1031
+ /**
1032
+ * How a resource came to be used:
1033
+ * - `recorded`: the id the stage's state holds still resolves
1034
+ * - `resumed`: a run that died after creating it is picked up
1035
+ * - `found`: it existed and was looked up
1036
+ * - `created`: this run created it
1037
+ */
1038
+ type ResourceVia = 'recorded' | 'resumed' | 'found' | 'created';
1039
+ /** One resource a deploy touches, planned or applied. */
1040
+ interface ResourceChange {
1041
+ /** `<type>:<name>`, unique within the stage — `application:api`. */
1042
+ key: string;
1043
+ /** `project`, `environment`, `registry`, `application`, `domain`, `image`, or a construct's kind. */
1044
+ resourceType: string;
1045
+ /**
1046
+ * For a plan: whether the run would create it, reuse what exists, or
1047
+ * ensure it (look it up, and create it if missing). For an applied change:
1048
+ * what was done.
1049
+ */
1050
+ action: 'create' | 'reuse' | 'ensure' | 'build';
1051
+ /** The target's id, once there is one. */
1052
+ id?: string;
1053
+ }
1054
+ type DeployEvent = {
1055
+ type: 'deploy.started';
1056
+ stage: string;
1057
+ /** The target the run deploys through, by the name it was given. */
1058
+ target: string;
1059
+ /** `<namespace>/<project>`. */
1060
+ identity: string;
1061
+ tag: string;
1062
+ /** The apps this run deploys, in order. */
1063
+ apps: string[];
1064
+ dryRun: boolean;
1065
+ } | {
1066
+ type: 'phase.started';
1067
+ phase: DeployPhase;
1068
+ } | {
1069
+ type: 'phase.finished';
1070
+ phase: DeployPhase;
1071
+ } |
1072
+ /** A phase threw; `deploy.failed` follows (after a rollback, if any). */
1073
+ {
1074
+ type: 'phase.failed';
1075
+ phase: DeployPhase;
1076
+ error: DeployEventError;
1077
+ } |
1078
+ /**
1079
+ * A progress line, exactly as `gkm deploy` prints it — leading newline and
1080
+ * indentation included, so a terminal renderer prints `message` as is.
1081
+ */
1082
+ {
1083
+ type: 'log';
1084
+ level: 'info' | 'warn' | 'error';
1085
+ message: string;
1086
+ } | {
1087
+ type: 'app.skipped';
1088
+ app: string;
1089
+ reason: string;
1090
+ } | ({
1091
+ type: 'resource.planned';
1092
+ } & ResourceChange) | ({
1093
+ type: 'resource.applied';
1094
+ via: ResourceVia;
1095
+ } & ResourceChange & {
1096
+ id: string;
1097
+ }) | {
1098
+ type: 'artifact.built';
1099
+ app: string;
1100
+ imageRef: string;
1101
+ /** The registry's digest, `sha256:…`, once pushed. */
1102
+ digest?: string;
1103
+ } | {
1104
+ type: 'app.deployed';
1105
+ app: string;
1106
+ applicationId: string;
1107
+ imageRef: string;
1108
+ url: string;
1109
+ } | {
1110
+ type: 'app.failed';
1111
+ app: string;
1112
+ error: DeployEventError;
1113
+ } |
1114
+ /** One check of whether a released app answers. */
1115
+ {
1116
+ type: 'health.checked';
1117
+ app: string;
1118
+ /** What was asked: a URL, or the target's own status check. */
1119
+ url: string;
1120
+ healthy: boolean;
1121
+ /** The HTTP status, when the check was a request. */
1122
+ status?: number;
1123
+ /** 1 for the first check of the app in this run. */
1124
+ attempt: number;
1125
+ } |
1126
+ /**
1127
+ * A deployed stage runs a dev service — `--allow-dev-services` — in place
1128
+ * of real mail or object storage: Mailpit delivers no mail, MinIO keeps
1129
+ * every object on one container's disk. A warning, every run.
1130
+ */
1131
+ {
1132
+ type: 'dev-service.used';
1133
+ service: 'minio' | 'mailpit';
1134
+ stage: string;
1135
+ /** The constructs it stands in for. */
1136
+ constructs: string[];
1137
+ } |
1138
+ /**
1139
+ * The stack's log UI (`deploy.compose.logs`) is up and answering: where
1140
+ * it is and how it is reached — through an SSH tunnel to a loopback
1141
+ * port, or publicly on a host that allows only some addresses.
1142
+ */
1143
+ {
1144
+ type: 'logs.ready';
1145
+ service: 'openobserve';
1146
+ access: 'tunnel' | 'public';
1147
+ /** Where a browser opens it: the tunnel's end, or its public host. */
1148
+ url: string;
1149
+ /** The loopback port it is published on, for a tunnel. */
1150
+ port?: number;
1151
+ /** The addresses a public host answers. */
1152
+ allow?: string[];
1153
+ email: string;
1154
+ } |
1155
+ /**
1156
+ * One construct's migrations applied by the deploy, before any app
1157
+ * started. Only for a construct that had one to apply.
1158
+ */
1159
+ {
1160
+ type: 'migration.applied';
1161
+ /** The construct, by id: `Database`. */
1162
+ construct: string;
1163
+ /** Its folder: `db/database/migrations`. */
1164
+ folder: string;
1165
+ /** The migrations applied, in order. */
1166
+ applied: string[];
1167
+ } |
1168
+ /**
1169
+ * One construct's seeds run by the deploy — after its migrations, before
1170
+ * any app started, every one of them on every deploy. Only for a
1171
+ * construct that has seeds.
1172
+ */
1173
+ {
1174
+ type: 'seed.ran';
1175
+ /** The construct, by id: `Database`. */
1176
+ construct: string;
1177
+ /** Its folder: `db/database/seeds`. */
1178
+ folder: string;
1179
+ /** The seeds run, in order. */
1180
+ seeded: string[];
1181
+ } | {
1182
+ type: 'deploy.finished';
1183
+ result: DeployResult;
1184
+ } | {
1185
+ type: 'deploy.failed';
1186
+ error: DeployEventError;
1187
+ };
1188
+ /** Every `type` a deploy event can have. */
1189
+ type DeployEventType = DeployEvent['type'];
1190
+ //#endregion
1191
+ //#region src/target/types.d.ts
1192
+ /**
1193
+ * Which family of defaults a target's deploys belong to.
1194
+ *
1195
+ * - `server`: the target runs containers the project controls, so a cache can
1196
+ * live in the database and events go through pg-boss.
1197
+ * - `aws`: the target runs on managed AWS services, so the defaults are
1198
+ * Upstash, S3 and SNS/SQS.
1199
+ *
1200
+ * `gkm dev` and `gkm build` choose backends by it, which is why a target from
1201
+ * a package declares it in its `package.json` too: they read it without
1202
+ * importing the target.
1203
+ */
1204
+ type DeployRuntime = 'server' | 'aws';
1205
+ /** What a target can do, beyond the phases every target has. */
1206
+ interface DeployTargetCapabilities {
1207
+ /**
1208
+ * Whether `rollback` restores the previous release. When it does, a failed
1209
+ * `release` or `verify` is rolled back before the deploy reports failure.
1210
+ */
1211
+ rollback: boolean;
1212
+ /**
1213
+ * Who applies database migrations: the target, as part of `release`, or
1214
+ * the app itself when it starts.
1215
+ */
1216
+ migrations: 'target' | 'app';
1217
+ /**
1218
+ * Whether the target builds container images — and so needs Docker where
1219
+ * the deploy runs, and a registry to push to.
1220
+ */
1221
+ images: boolean;
1222
+ /**
1223
+ * Whether it can also run the project's local stage — `gkm deploy --stage
1224
+ * <local>`. Only a target that runs on this machine can: a stack started
1225
+ * here is the local stage's, while one on a server is shared, and the local
1226
+ * stage's secrets are a developer's. Absent, a deploy refuses the local
1227
+ * stage with `UndeclaredStage`.
1228
+ */
1229
+ localStage?: boolean;
1230
+ /**
1231
+ * Whether it runs telemetry's self-hosted provider — OpenObserve beside
1232
+ * the apps — for a stage whose `deploy.telemetry` asks for it, or names
1233
+ * nothing. Absent, a stage that uses a `Telemetry` construct names a
1234
+ * provider of its own (`otlp`) or opts out with `false`.
1235
+ */
1236
+ selfHostedTelemetry?: boolean;
1237
+ }
1238
+ /** A failed validation of a target's options, issue by issue. */
1239
+ interface TargetOptionsIssue {
1240
+ readonly message: string;
1241
+ readonly path?: ReadonlyArray<PropertyKey | {
1242
+ readonly key: PropertyKey;
1243
+ }>;
1244
+ }
1245
+ type TargetOptionsResult<Output> = {
1246
+ readonly value: Output;
1247
+ readonly issues?: undefined;
1248
+ } | {
1249
+ readonly issues: ReadonlyArray<TargetOptionsIssue>;
1250
+ };
1251
+ /**
1252
+ * The schema a target's options are validated with: any Standard Schema —
1253
+ * a Zod, Valibot or ArkType schema is one.
1254
+ *
1255
+ * The interface is the Standard Schema spec's own, copied as the spec asks,
1256
+ * so a target's types do not depend on a package the CLI does not ship.
1257
+ */
1258
+ interface TargetOptionsSchema<Output = unknown> {
1259
+ readonly '~standard': {
1260
+ readonly version: 1;
1261
+ readonly vendor: string;
1262
+ readonly validate: (value: unknown) => TargetOptionsResult<Output> | Promise<TargetOptionsResult<Output>>;
1263
+ readonly types?: {
1264
+ readonly input: unknown;
1265
+ readonly output: Output;
1266
+ } | undefined;
1267
+ };
1268
+ }
1269
+ /**
1270
+ * The stage's secrets, as a target reads and writes them.
1271
+ *
1272
+ * Every secret value read through here is masked: a progress line that
1273
+ * would print one prints `***` instead, in the terminal and in the events.
1274
+ */
1275
+ interface DeploySecrets {
1276
+ /** Which kind of store holds them — `'file'`, `'s3'`, `'ssm'`, `'secrets-manager'`, or
1277
+ * a custom one's. */
1278
+ readonly store: string;
1279
+ /** The stage's secrets, or null when it has none yet. */
1280
+ read(): Promise<StageSecrets | null>;
1281
+ /** Replace the stage's secrets. */
1282
+ write(secrets: StageSecrets): Promise<void>;
1283
+ /** Mask `value` in everything this run prints or emits from now on. */
1284
+ mask(value: string): void;
1285
+ }
1286
+ /** Where a target's progress lines go: `log` events of the run. */
1287
+ interface DeployTargetLogger {
1288
+ info(message: string): void;
1289
+ warn(message: string): void;
1290
+ error(message: string): void;
1291
+ }
1292
+ /**
1293
+ * The events a target reports. The run's own — `deploy.*` and `phase.*` —
1294
+ * are the CLI's, which emits them around each phase it calls.
1295
+ */
1296
+ type TargetEvent = Exclude<DeployEvent, {
1297
+ type: 'deploy.started' | 'deploy.finished' | 'deploy.failed' | 'phase.started' | 'phase.finished' | 'phase.failed';
1298
+ }>;
1299
+ /** Everything a phase is handed. The same object for every phase of a run. */
1300
+ interface DeployPhaseContext<Options = undefined> {
1301
+ /** The name the target was resolved by — `deploy.default`, `--target`. */
1302
+ readonly target: string;
1303
+ /**
1304
+ * The workspace root. Never `process.cwd()`: a host deploys projects
1305
+ * that are not where it runs.
1306
+ */
1307
+ readonly cwd: string;
1308
+ readonly stage: string;
1309
+ /** The image tag, or whatever version label the target releases under. */
1310
+ readonly tag: string;
1311
+ /**
1312
+ * Whether `tag` was asked for (`--tag`) rather than made up for this run
1313
+ * — by the target's own `tag()`, else `<stage>-<timestamp>`. A target that
1314
+ * releases what CI already pushed when given one tells the two apart here.
1315
+ */
1316
+ readonly tagGiven: boolean;
1317
+ /**
1318
+ * The apps this target deploys, in dependency order: those asked for that
1319
+ * deploy here. Apps that deploy elsewhere are already in `skipped`.
1320
+ */
1321
+ readonly apps: readonly string[];
1322
+ /** The apps the run leaves out, and why. */
1323
+ readonly skipped: readonly {
1324
+ app: string;
1325
+ reason: string;
1326
+ }[];
1327
+ /** Who the deploy is, for naming and claiming what it creates. */
1328
+ readonly identity: DeployIdentity;
1329
+ /** The workspace, with its apps derived from the manifest. */
1330
+ readonly workspace: NormalizedWorkspace;
1331
+ /** What the workspace declares. */
1332
+ readonly manifest: ConstructManifest;
1333
+ /**
1334
+ * Where each Worker's crons, queues and subscribers are declared, from the
1335
+ * same discovery: which workers have work to run, and which app each is
1336
+ * built from (`workerUnits`).
1337
+ */
1338
+ readonly background?: Readonly<Record<string, readonly string[]>>;
1339
+ /**
1340
+ * Each Worker's subscribers, from the same discovery — by export, and the
1341
+ * key its deliveries come from: which of them SNS pushes to.
1342
+ */
1343
+ readonly subscribers?: Readonly<Record<string, readonly BoundSubscriber[]>>;
1344
+ /** The target's options, as its `options` schema parsed them. */
1345
+ readonly options: Options;
1346
+ /**
1347
+ * Look everything up and report what would happen — as `resource.planned`
1348
+ * events — without changing anything. Only `validate` and `plan` run.
1349
+ */
1350
+ readonly dryRun: boolean;
1351
+ /**
1352
+ * When `release` or `verify` fails, roll back every app the run released
1353
+ * rather than only those that failed — for apps that must move together,
1354
+ * an API and the site built against it. Only a target that can roll back
1355
+ * reads it.
1356
+ */
1357
+ readonly atomic: boolean;
1358
+ /**
1359
+ * `--allow-dev-services`: a deployed stage runs the dev service for every
1360
+ * bucket and mail it does not account for — no key in its secrets, no
1361
+ * provider backing the kind. Off by default: a deployed stage's mail and
1362
+ * buckets come from its secrets or its providers, and a server target
1363
+ * refuses one that lacks them. The local stage ignores it — it always
1364
+ * runs both.
1365
+ */
1366
+ readonly allowDevServices: boolean;
1367
+ /**
1368
+ * `--skip-dns`: a server target neither writes its public hosts' DNS
1369
+ * records nor checks that they point at the stage's server — for a CDN or
1370
+ * proxy in front of it, or records written by another step.
1371
+ */
1372
+ readonly skipDns?: boolean;
1373
+ /** Where every credential comes from. Nothing prompts. */
1374
+ readonly credentials: CredentialProvider;
1375
+ /**
1376
+ * The stage's deploy state. A real run holds the stage's lock for every
1377
+ * phase; a dry run holds none and must write nothing.
1378
+ */
1379
+ readonly state: StateStore;
1380
+ readonly secrets: DeploySecrets;
1381
+ readonly logger: DeployTargetLogger;
1382
+ /** Fires when the run is stopped; every phase stops what it is doing. */
1383
+ readonly signal: AbortSignal;
1384
+ /**
1385
+ * Where the output of what a phase spawns goes: the host's terminal, its
1386
+ * stderr (so stdout carries only events), or nowhere.
1387
+ */
1388
+ readonly childOutput: 'inherit' | 'stderr' | 'ignore';
1389
+ /** Report progress. */
1390
+ emit(event: TargetEvent): void;
1391
+ /** Leave an app out of this run, with the reason a person will read. */
1392
+ skip(app: string, reason: string): void;
1393
+ /**
1394
+ * What a resource is called on the target: scoped by the stage and the
1395
+ * identity exactly as the constructs are — `name('api')` is
1396
+ * `production-shop-api`. Two workspaces, or two stages, never share one.
1397
+ */
1398
+ name(resource: string): string;
1399
+ }
1400
+ /** Why `rollback` was called: the phase that failed, and its error. */
1401
+ interface DeployFailure {
1402
+ readonly phase: 'release' | 'verify';
1403
+ readonly error: unknown;
1404
+ }
1405
+ /**
1406
+ * A deploy target.
1407
+ *
1408
+ * The CLI calls the phases in order — `validate`, then `plan` for a dry run,
1409
+ * or `provision → build → release → verify` for a real one — emitting
1410
+ * `phase.started`/`phase.finished` around each. Every phase must be safe to
1411
+ * run again: a deploy stopped part way is finished by deploying again, so a
1412
+ * phase finds what an earlier run made (through `state`) before making it.
1413
+ *
1414
+ * `Run` is whatever the target carries from one phase to the next within a
1415
+ * run — `validate` makes it, every later phase is handed it.
1416
+ *
1417
+ * ```ts
1418
+ * import { defineTarget } from '@geekmidas/cli/target';
1419
+ * import { z } from 'zod';
1420
+ *
1421
+ * export default defineTarget({
1422
+ * name: 'fly',
1423
+ * runtime: 'server',
1424
+ * capabilities: { rollback: true, migrations: 'target', images: true },
1425
+ * options: z.object({ org: z.string(), region: z.string().default('ams') }),
1426
+ * async validate(ctx) {
1427
+ * return { org: ctx.options.org, region: ctx.options.region };
1428
+ * },
1429
+ * async plan(ctx, run) { … },
1430
+ * async release(ctx, run) { … },
1431
+ * async rollback(ctx, run, failure) { … },
1432
+ * result(ctx, run) { … },
1433
+ * });
1434
+ * ```
1435
+ */
1436
+ interface DeployTarget<Options = undefined, Run = unknown> {
1437
+ /** The target's own name, for messages. Config refers to it by its key. */
1438
+ readonly name: string;
1439
+ readonly runtime: DeployRuntime;
1440
+ readonly capabilities: DeployTargetCapabilities;
1441
+ /**
1442
+ * What `deploy.targets` may pass it — `[package, options]` — validated
1443
+ * before any phase runs. Without one, the target takes no options.
1444
+ */
1445
+ readonly options?: TargetOptionsSchema<Options>;
1446
+ /**
1447
+ * The kinds of credential it asks the run's `CredentialProvider` for, so a
1448
+ * host or `gkm login` can collect them up front.
1449
+ */
1450
+ readonly credentials?: readonly CredentialKind[];
1451
+ /**
1452
+ * The tag a run releases under when none is asked for. Without one it is
1453
+ * `<stage>-<timestamp>`; a target that builds from the checkout can name
1454
+ * its images after the commit instead.
1455
+ */
1456
+ tag?(where: {
1457
+ readonly cwd: string;
1458
+ readonly stage: string;
1459
+ }): Promise<string>;
1460
+ /**
1461
+ * What the run is — the apps, the images, what each runs with — checked
1462
+ * before anything changes. A build-only run calls it too, so it checks
1463
+ * what building needs; what only a deploy needs is `ready`'s.
1464
+ */
1465
+ validate(ctx: DeployPhaseContext<Options>): Promise<Run>;
1466
+ /**
1467
+ * What only this target checks before a deploy changes anything — compose's
1468
+ * server address and its hosts' DNS. Run after `validate` and the stage's
1469
+ * own readiness check (every key it needs, after its providers wrote
1470
+ * theirs), on a deploy and its dry run. A build-only run never calls it:
1471
+ * an image needs none of it.
1472
+ */
1473
+ ready?(ctx: DeployPhaseContext<Options>, run: Run): Promise<void>;
1474
+ /** A dry run: emit `resource.planned` for what a real run would do. */
1475
+ plan(ctx: DeployPhaseContext<Options>, run: Run): Promise<void>;
1476
+ /** Create or find what the apps run on, and what they declare. */
1477
+ provision?(ctx: DeployPhaseContext<Options>, run: Run): Promise<void>;
1478
+ /** Build each app's artifact (`artifact.built`), changing nothing live. */
1479
+ build?(ctx: DeployPhaseContext<Options>, run: Run): Promise<void>;
1480
+ /** Put the built artifacts live (`app.deployed`). */
1481
+ release(ctx: DeployPhaseContext<Options>, run: Run): Promise<void>;
1482
+ /** Check what was released answers (`health.checked`). */
1483
+ verify?(ctx: DeployPhaseContext<Options>, run: Run): Promise<void>;
1484
+ /**
1485
+ * Restore the previous release, after `release` or `verify` failed. Called
1486
+ * only when `capabilities.rollback` is true.
1487
+ */
1488
+ rollback?(ctx: DeployPhaseContext<Options>, run: Run, failure: DeployFailure): Promise<void>;
1489
+ /** What the run did, once its last phase has finished. */
1490
+ result(ctx: DeployPhaseContext<Options>, run: Run): DeployResult | Promise<DeployResult>;
1491
+ }
1492
+ /**
1493
+ * A target of any options and run state — what the CLI holds once a target
1494
+ * is resolved, its types left behind in the config that named it. The phases
1495
+ * are methods, so their parameters are compared bivariantly and every
1496
+ * `DeployTarget<O, R>` is one.
1497
+ */
1498
+ type AnyDeployTarget = DeployTarget<unknown, unknown>;
1499
+ /** A target's options type, from the target. */
1500
+ type TargetOptions<T> = T extends DeployTarget<infer O, infer _Run> ? O : never;
1501
+ /**
1502
+ * One `deploy.targets` entry:
1503
+ *
1504
+ * - `'@acme/gkm-target'` — a package, its default export the target
1505
+ * - a target object, from `defineTarget` or a package's factory
1506
+ * - `['@acme/gkm-target', { region: 'ams' }]` — either, with options
1507
+ */
1508
+ type DeployTargetEntry = string | AnyDeployTarget | readonly [string | AnyDeployTarget, unknown];
146
1509
  declare namespace json_schema_d_exports {
147
1510
  export { ArraySchema, BaseSchema, BooleanSchema, IntegerSchema, JSONSchema, NullSchema, NumberSchema, ObjectSchema, Schema$1 as Schema, SchemaType, StringSchema, _JSONSchema };
148
1511
  }
@@ -4534,17 +5897,18 @@ declare const FrameworkSchema: ZodUnion<readonly [ZodEnum<{
4534
5897
  */
4535
5898
  type Framework = output$1<typeof FrameworkSchema>;
4536
5899
  /**
4537
- * Supported deploy targets (Phase 1).
5900
+ * The built-in targets a config may name, both deployed by `gkm deploy`:
5901
+ * `dokploy`, and `sst`, which runs `sst deploy` on the manifest `gkm build`
5902
+ * writes.
4538
5903
  */
4539
- declare const SUPPORTED_DEPLOY_TARGETS: readonly ['dokploy'];
5904
+ declare const SUPPORTED_DEPLOY_TARGETS: string[];
5905
+ /** Built-in names reserved for targets that do not exist yet. */
5906
+ declare const PHASE_2_DEPLOY_TARGETS: string[];
4540
5907
  /**
4541
- * Phase 2 deploy targets (not yet implemented).
5908
+ * Whether a config may name `target`: a usable built-in, or one of its own
5909
+ * `deploy.targets`.
4542
5910
  */
4543
- declare const PHASE_2_DEPLOY_TARGETS: readonly ['vercel', 'cloudflare'];
4544
- /**
4545
- * Check if a deploy target is supported.
4546
- */
4547
- declare function isDeployTargetSupported(target: string): boolean;
5911
+ declare function isDeployTargetSupported(target: string, targets?: Record<string, unknown>): boolean;
4548
5912
  /**
4549
5913
  * Check if a deploy target is planned for Phase 2.
4550
5914
  */
@@ -4554,13 +5918,21 @@ declare function isPhase2DeployTarget(target: string): boolean;
4554
5918
  */
4555
5919
  declare function getDeployTargetError(target: string, appName?: string): string;
4556
5920
  /**
4557
- * Combined DNS config that supports both new multi-domain and legacy single-domain formats.
5921
+ * Single DNS provider config (for one domain).
4558
5922
  */
4559
- declare const DnsConfigWithLegacySchema: ZodUnion<readonly [ZodRecord<ZodString, ZodUnion<readonly [ZodDiscriminatedUnion<[ZodObject<{
5923
+ declare const DnsProviderSchema: ZodUnion<readonly [ZodDiscriminatedUnion<[ZodObject<{
4560
5924
  provider: ZodLiteral<"hostinger">;
5925
+ records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
5926
+ mode: ZodLiteral<"cname">;
5927
+ target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
5928
+ }, $strict>]>>;
4561
5929
  ttl: ZodOptional<ZodNumber>;
4562
5930
  }, $strip>, ZodObject<{
4563
5931
  provider: ZodLiteral<"route53">;
5932
+ records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
5933
+ mode: ZodLiteral<"cname">;
5934
+ target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
5935
+ }, $strict>]>>;
4564
5936
  region: ZodOptional<ZodEnum<{
4565
5937
  "af-south-1": "af-south-1";
4566
5938
  "ap-east-1": "ap-east-1";
@@ -4594,67 +5966,25 @@ declare const DnsConfigWithLegacySchema: ZodUnion<readonly [ZodRecord<ZodString,
4594
5966
  hostedZoneId: ZodOptional<ZodString>;
4595
5967
  ttl: ZodOptional<ZodNumber>;
4596
5968
  }, $strip>, ZodObject<{
4597
- provider: ZodLiteral<"cloudflare">;
5969
+ provider: ZodLiteral<"godaddy">;
5970
+ records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
5971
+ mode: ZodLiteral<"cname">;
5972
+ target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
5973
+ }, $strict>]>>;
4598
5974
  ttl: ZodOptional<ZodNumber>;
4599
- }, $strip>, ZodObject<{
4600
- provider: ZodLiteral<"manual">;
4601
- }, $strip>], "provider">, ZodObject<{
4602
- provider: ZodCustom<{
4603
- name: string;
4604
- getRecords: Function;
4605
- upsertRecords: Function;
4606
- }, {
4607
- name: string;
4608
- getRecords: Function;
4609
- upsertRecords: Function;
4610
- }>;
4611
- ttl: ZodOptional<ZodNumber>;
4612
- }, $strip>]>>, ZodUnion<readonly [ZodDiscriminatedUnion<[ZodObject<{
4613
- provider: ZodLiteral<"hostinger">;
4614
- ttl: ZodOptional<ZodNumber>;
4615
- domain: ZodString;
4616
- }, $strip>, ZodObject<{
4617
- provider: ZodLiteral<"route53">;
4618
- region: ZodOptional<ZodEnum<{
4619
- "af-south-1": "af-south-1";
4620
- "ap-east-1": "ap-east-1";
4621
- "ap-northeast-1": "ap-northeast-1";
4622
- "ap-northeast-2": "ap-northeast-2";
4623
- "ap-northeast-3": "ap-northeast-3";
4624
- "ap-south-1": "ap-south-1";
4625
- "ap-south-2": "ap-south-2";
4626
- "ap-southeast-1": "ap-southeast-1";
4627
- "ap-southeast-2": "ap-southeast-2";
4628
- "ap-southeast-3": "ap-southeast-3";
4629
- "ap-southeast-4": "ap-southeast-4";
4630
- "ca-central-1": "ca-central-1";
4631
- "eu-central-1": "eu-central-1";
4632
- "eu-central-2": "eu-central-2";
4633
- "eu-north-1": "eu-north-1";
4634
- "eu-south-1": "eu-south-1";
4635
- "eu-south-2": "eu-south-2";
4636
- "eu-west-1": "eu-west-1";
4637
- "eu-west-2": "eu-west-2";
4638
- "eu-west-3": "eu-west-3";
4639
- "me-central-1": "me-central-1";
4640
- "me-south-1": "me-south-1";
4641
- "sa-east-1": "sa-east-1";
4642
- "us-east-1": "us-east-1";
4643
- "us-east-2": "us-east-2";
4644
- "us-west-1": "us-west-1";
4645
- "us-west-2": "us-west-2";
4646
- }>>;
4647
- profile: ZodOptional<ZodString>;
4648
- hostedZoneId: ZodOptional<ZodString>;
4649
- ttl: ZodOptional<ZodNumber>;
4650
- domain: ZodString;
4651
5975
  }, $strip>, ZodObject<{
4652
5976
  provider: ZodLiteral<"cloudflare">;
5977
+ records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
5978
+ mode: ZodLiteral<"cname">;
5979
+ target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
5980
+ }, $strict>]>>;
4653
5981
  ttl: ZodOptional<ZodNumber>;
4654
- domain: ZodString;
4655
5982
  }, $strip>, ZodObject<{
4656
5983
  provider: ZodLiteral<"manual">;
4657
- domain: ZodString;
5984
+ records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
5985
+ mode: ZodLiteral<"cname">;
5986
+ target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
5987
+ }, $strict>]>>;
4658
5988
  }, $strip>], "provider">, ZodObject<{
4659
5989
  provider: ZodCustom<{
4660
5990
  name: string;
@@ -4665,17 +5995,20 @@ declare const DnsConfigWithLegacySchema: ZodUnion<readonly [ZodRecord<ZodString,
4665
5995
  getRecords: Function;
4666
5996
  upsertRecords: Function;
4667
5997
  }>;
5998
+ records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
5999
+ mode: ZodLiteral<"cname">;
6000
+ target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
6001
+ }, $strict>]>>;
4668
6002
  ttl: ZodOptional<ZodNumber>;
4669
- domain: ZodString;
4670
- }, $strip>]>]>;
4671
- type DnsConfig = output$1<typeof DnsConfigWithLegacySchema>;
6003
+ }, $strip>]>;
6004
+ type DnsProvider = output$1<typeof DnsProviderSchema>;
4672
6005
  /**
4673
6006
  * Backups configuration schema.
4674
6007
  *
4675
6008
  * Configures automatic backup destinations for database services.
4676
6009
  * On first deploy, creates S3 bucket with unique name and IAM credentials.
4677
6010
  */
4678
- declare const BackupsConfigSchema: ZodObject<{
6011
+ declare const DokployBackupsConfigSchema: ZodObject<{
4679
6012
  type: ZodLiteral<"s3">;
4680
6013
  profile: ZodOptional<ZodString>;
4681
6014
  region: ZodEnum<{
@@ -4710,16 +6043,13 @@ declare const BackupsConfigSchema: ZodObject<{
4710
6043
  schedule: ZodOptional<ZodString>;
4711
6044
  retention: ZodOptional<ZodNumber>;
4712
6045
  }, $strip>;
4713
- type BackupsConfig = output$1<typeof BackupsConfigSchema>;
6046
+ type DokployBackupsConfig = output$1<typeof DokployBackupsConfigSchema>;
4714
6047
  /**
4715
6048
  * Workspace configuration schema.
4716
6049
  */
4717
6050
  declare const WorkspaceConfigSchema: ZodObject<{
4718
6051
  name: ZodOptional<ZodString>;
4719
- constructs: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>, ZodObject<{
4720
- paths: ZodUnion<readonly [ZodString, ZodArray<ZodString>]>;
4721
- partition: ZodCustom<(filepath: string) => string, (filepath: string) => string>;
4722
- }, $strip>]>>;
6052
+ constructs: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
4723
6053
  apps: ZodOptional<ZodRecord<ZodString, ZodObject<{
4724
6054
  type: ZodDefault<ZodOptional<ZodEnum<{
4725
6055
  backend: "backend";
@@ -4729,39 +6059,14 @@ declare const WorkspaceConfigSchema: ZodObject<{
4729
6059
  path: ZodString;
4730
6060
  port: ZodNumber;
4731
6061
  dependencies: ZodOptional<ZodArray<ZodString>>;
4732
- deploy: ZodOptional<ZodEnum<{
4733
- cloudflare: "cloudflare";
4734
- dokploy: "dokploy";
4735
- vercel: "vercel";
4736
- }>>;
4737
- constructs: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>, ZodObject<{
4738
- paths: ZodUnion<readonly [ZodString, ZodArray<ZodString>]>;
4739
- partition: ZodCustom<(filepath: string) => string, (filepath: string) => string>;
4740
- }, $strip>]>>;
4741
- routes: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>, ZodObject<{
4742
- paths: ZodUnion<readonly [ZodString, ZodArray<ZodString>]>;
4743
- partition: ZodCustom<(filepath: string) => string, (filepath: string) => string>;
4744
- }, $strip>]>>;
4745
- functions: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>, ZodObject<{
4746
- paths: ZodUnion<readonly [ZodString, ZodArray<ZodString>]>;
4747
- partition: ZodCustom<(filepath: string) => string, (filepath: string) => string>;
4748
- }, $strip>]>>;
4749
- crons: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>, ZodObject<{
4750
- paths: ZodUnion<readonly [ZodString, ZodArray<ZodString>]>;
4751
- partition: ZodCustom<(filepath: string) => string, (filepath: string) => string>;
4752
- }, $strip>]>>;
4753
- queues: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>, ZodObject<{
4754
- paths: ZodUnion<readonly [ZodString, ZodArray<ZodString>]>;
4755
- partition: ZodCustom<(filepath: string) => string, (filepath: string) => string>;
4756
- }, $strip>]>>;
4757
- topics: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>, ZodObject<{
4758
- paths: ZodUnion<readonly [ZodString, ZodArray<ZodString>]>;
4759
- partition: ZodCustom<(filepath: string) => string, (filepath: string) => string>;
4760
- }, $strip>]>>;
4761
- subscribers: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>, ZodObject<{
4762
- paths: ZodUnion<readonly [ZodString, ZodArray<ZodString>]>;
4763
- partition: ZodCustom<(filepath: string) => string, (filepath: string) => string>;
4764
- }, $strip>]>>;
6062
+ deploy: ZodOptional<ZodString>;
6063
+ constructs: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
6064
+ routes: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
6065
+ functions: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
6066
+ crons: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
6067
+ queues: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
6068
+ topics: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
6069
+ subscribers: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
4765
6070
  envParser: ZodOptional<ZodString>;
4766
6071
  logger: ZodOptional<ZodString>;
4767
6072
  hooks: ZodOptional<ZodObject<{
@@ -4776,11 +6081,6 @@ declare const WorkspaceConfigSchema: ZodObject<{
4776
6081
  maxEntries: ZodOptional<ZodNumber>;
4777
6082
  websocket: ZodOptional<ZodBoolean>;
4778
6083
  }, $strip>]>>;
4779
- studio: ZodOptional<ZodUnion<readonly [ZodString, ZodBoolean, ZodObject<{
4780
- enabled: ZodOptional<ZodBoolean>;
4781
- path: ZodOptional<ZodString>;
4782
- schema: ZodOptional<ZodString>;
4783
- }, $strip>]>>;
4784
6084
  openapi: ZodOptional<ZodUnion<readonly [ZodBoolean, ZodObject<{
4785
6085
  enabled: ZodOptional<ZodBoolean>;
4786
6086
  title: ZodOptional<ZodString>;
@@ -4820,24 +6120,188 @@ declare const WorkspaceConfigSchema: ZodObject<{
4820
6120
  }>>;
4821
6121
  }, $strip>>;
4822
6122
  }, $strip>>;
6123
+ domains: ZodOptional<ZodRecord<ZodString, ZodString>>;
6124
+ protectedSubdomains: ZodOptional<ZodArray<ZodString>>;
6125
+ dns: ZodOptional<ZodRecord<ZodString, ZodUnion<readonly [ZodDiscriminatedUnion<[ZodObject<{
6126
+ provider: ZodLiteral<"hostinger">;
6127
+ records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
6128
+ mode: ZodLiteral<"cname">;
6129
+ target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
6130
+ }, $strict>]>>;
6131
+ ttl: ZodOptional<ZodNumber>;
6132
+ }, $strip>, ZodObject<{
6133
+ provider: ZodLiteral<"route53">;
6134
+ records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
6135
+ mode: ZodLiteral<"cname">;
6136
+ target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
6137
+ }, $strict>]>>;
6138
+ region: ZodOptional<ZodEnum<{
6139
+ "af-south-1": "af-south-1";
6140
+ "ap-east-1": "ap-east-1";
6141
+ "ap-northeast-1": "ap-northeast-1";
6142
+ "ap-northeast-2": "ap-northeast-2";
6143
+ "ap-northeast-3": "ap-northeast-3";
6144
+ "ap-south-1": "ap-south-1";
6145
+ "ap-south-2": "ap-south-2";
6146
+ "ap-southeast-1": "ap-southeast-1";
6147
+ "ap-southeast-2": "ap-southeast-2";
6148
+ "ap-southeast-3": "ap-southeast-3";
6149
+ "ap-southeast-4": "ap-southeast-4";
6150
+ "ca-central-1": "ca-central-1";
6151
+ "eu-central-1": "eu-central-1";
6152
+ "eu-central-2": "eu-central-2";
6153
+ "eu-north-1": "eu-north-1";
6154
+ "eu-south-1": "eu-south-1";
6155
+ "eu-south-2": "eu-south-2";
6156
+ "eu-west-1": "eu-west-1";
6157
+ "eu-west-2": "eu-west-2";
6158
+ "eu-west-3": "eu-west-3";
6159
+ "me-central-1": "me-central-1";
6160
+ "me-south-1": "me-south-1";
6161
+ "sa-east-1": "sa-east-1";
6162
+ "us-east-1": "us-east-1";
6163
+ "us-east-2": "us-east-2";
6164
+ "us-west-1": "us-west-1";
6165
+ "us-west-2": "us-west-2";
6166
+ }>>;
6167
+ profile: ZodOptional<ZodString>;
6168
+ hostedZoneId: ZodOptional<ZodString>;
6169
+ ttl: ZodOptional<ZodNumber>;
6170
+ }, $strip>, ZodObject<{
6171
+ provider: ZodLiteral<"godaddy">;
6172
+ records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
6173
+ mode: ZodLiteral<"cname">;
6174
+ target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
6175
+ }, $strict>]>>;
6176
+ ttl: ZodOptional<ZodNumber>;
6177
+ }, $strip>, ZodObject<{
6178
+ provider: ZodLiteral<"cloudflare">;
6179
+ records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
6180
+ mode: ZodLiteral<"cname">;
6181
+ target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
6182
+ }, $strict>]>>;
6183
+ ttl: ZodOptional<ZodNumber>;
6184
+ }, $strip>, ZodObject<{
6185
+ provider: ZodLiteral<"manual">;
6186
+ records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
6187
+ mode: ZodLiteral<"cname">;
6188
+ target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
6189
+ }, $strict>]>>;
6190
+ }, $strip>], "provider">, ZodObject<{
6191
+ provider: ZodCustom<{
6192
+ name: string;
6193
+ getRecords: Function;
6194
+ upsertRecords: Function;
6195
+ }, {
6196
+ name: string;
6197
+ getRecords: Function;
6198
+ upsertRecords: Function;
6199
+ }>;
6200
+ records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
6201
+ mode: ZodLiteral<"cname">;
6202
+ target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
6203
+ }, $strict>]>>;
6204
+ ttl: ZodOptional<ZodNumber>;
6205
+ }, $strip>]>>>;
4823
6206
  deploy: ZodOptional<ZodObject<{
4824
- default: ZodOptional<ZodEnum<{
4825
- cloudflare: "cloudflare";
4826
- dokploy: "dokploy";
4827
- vercel: "vercel";
4828
- }>>;
6207
+ default: ZodOptional<ZodString>;
6208
+ targets: ZodOptional<ZodRecord<ZodString, ZodUnion<readonly [ZodString, ZodCustom<unknown, unknown>, ZodTuple<[ZodUnion<readonly [ZodString, ZodCustom<unknown, unknown>]>, ZodUnknown], null>]>>>;
6209
+ namespace: ZodOptional<ZodString>;
6210
+ registry: ZodOptional<ZodString>;
4829
6211
  dokploy: ZodOptional<ZodObject<{
4830
6212
  endpoint: ZodOptional<ZodURL>;
4831
6213
  endpoints: ZodOptional<ZodRecord<ZodString, ZodURL>>;
4832
- registry: ZodOptional<ZodString>;
4833
6214
  registryId: ZodOptional<ZodString>;
4834
- domains: ZodOptional<ZodRecord<ZodString, ZodString>>;
6215
+ backups: ZodOptional<ZodLazy<ZodObject<{
6216
+ type: ZodLiteral<"s3">;
6217
+ profile: ZodOptional<ZodString>;
6218
+ region: ZodEnum<{
6219
+ "af-south-1": "af-south-1";
6220
+ "ap-east-1": "ap-east-1";
6221
+ "ap-northeast-1": "ap-northeast-1";
6222
+ "ap-northeast-2": "ap-northeast-2";
6223
+ "ap-northeast-3": "ap-northeast-3";
6224
+ "ap-south-1": "ap-south-1";
6225
+ "ap-south-2": "ap-south-2";
6226
+ "ap-southeast-1": "ap-southeast-1";
6227
+ "ap-southeast-2": "ap-southeast-2";
6228
+ "ap-southeast-3": "ap-southeast-3";
6229
+ "ap-southeast-4": "ap-southeast-4";
6230
+ "ca-central-1": "ca-central-1";
6231
+ "eu-central-1": "eu-central-1";
6232
+ "eu-central-2": "eu-central-2";
6233
+ "eu-north-1": "eu-north-1";
6234
+ "eu-south-1": "eu-south-1";
6235
+ "eu-south-2": "eu-south-2";
6236
+ "eu-west-1": "eu-west-1";
6237
+ "eu-west-2": "eu-west-2";
6238
+ "eu-west-3": "eu-west-3";
6239
+ "me-central-1": "me-central-1";
6240
+ "me-south-1": "me-south-1";
6241
+ "sa-east-1": "sa-east-1";
6242
+ "us-east-1": "us-east-1";
6243
+ "us-east-2": "us-east-2";
6244
+ "us-west-1": "us-west-1";
6245
+ "us-west-2": "us-west-2";
6246
+ }>;
6247
+ schedule: ZodOptional<ZodString>;
6248
+ retention: ZodOptional<ZodNumber>;
6249
+ }, $strip>>>;
6250
+ verify: ZodOptional<ZodObject<{
6251
+ deploymentTimeoutMs: ZodOptional<ZodNumber>;
6252
+ healthCheckPath: ZodOptional<ZodString>;
6253
+ healthyAfter: ZodOptional<ZodNumber>;
6254
+ intervalMs: ZodOptional<ZodNumber>;
6255
+ healthTimeoutMs: ZodOptional<ZodNumber>;
6256
+ }, $strip>>;
4835
6257
  }, $strip>>;
4836
- dns: ZodOptional<ZodUnion<readonly [ZodRecord<ZodString, ZodUnion<readonly [ZodDiscriminatedUnion<[ZodObject<{
4837
- provider: ZodLiteral<"hostinger">;
4838
- ttl: ZodOptional<ZodNumber>;
4839
- }, $strip>, ZodObject<{
4840
- provider: ZodLiteral<"route53">;
6258
+ compose: ZodOptional<ZodObject<{
6259
+ proxy: ZodOptional<ZodUnion<readonly [ZodEnum<{
6260
+ caddy: "caddy";
6261
+ traefik: "traefik";
6262
+ }>, ZodRecord<ZodString, ZodEnum<{
6263
+ caddy: "caddy";
6264
+ traefik: "traefik";
6265
+ }>>]>>;
6266
+ tls: ZodOptional<ZodRecord<ZodString, ZodObject<{
6267
+ certFile: ZodString;
6268
+ keyFile: ZodString;
6269
+ caFile: ZodOptional<ZodString>;
6270
+ }, $strict>>>;
6271
+ server: ZodOptional<ZodRecord<ZodString, ZodObject<{
6272
+ user: ZodString;
6273
+ host: ZodOptional<ZodString>;
6274
+ port: ZodOptional<ZodNumber>;
6275
+ }, $strict>>>;
6276
+ }, $strict>>;
6277
+ telemetry: ZodOptional<ZodRecord<ZodString, ZodUnion<readonly [ZodLiteral<false>, ZodLiteral<"self-hosted">, ZodObject<{
6278
+ provider: ZodLiteral<"self-hosted">;
6279
+ port: ZodOptional<ZodNumber>;
6280
+ retentionDays: ZodOptional<ZodNumber>;
6281
+ public: ZodOptional<ZodObject<{
6282
+ allow: ZodArray<ZodString>;
6283
+ }, $strip>>;
6284
+ sampleRate: ZodOptional<ZodNumber>;
6285
+ }, $strict>, ZodObject<{
6286
+ provider: ZodLiteral<"otlp">;
6287
+ endpoint: ZodString;
6288
+ headers: ZodOptional<ZodRecord<ZodString, ZodString>>;
6289
+ sampleRate: ZodOptional<ZodNumber>;
6290
+ }, $strict>]>>>;
6291
+ objects: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
6292
+ inbox: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
6293
+ backups: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
6294
+ }, $strip>>;
6295
+ stages: ZodObject<{
6296
+ local: ZodString;
6297
+ deployed: ZodArray<ZodString>;
6298
+ protected: ZodOptional<ZodArray<ZodString>>;
6299
+ }, $strip>;
6300
+ secrets: ZodOptional<ZodObject<{
6301
+ enabled: ZodOptional<ZodBoolean>;
6302
+ store: ZodOptional<ZodUnion<readonly [ZodLiteral<"file">, ZodObject<{
6303
+ provider: ZodLiteral<"s3">;
6304
+ bucket: ZodOptional<ZodString>;
4841
6305
  region: ZodOptional<ZodEnum<{
4842
6306
  "af-south-1": "af-south-1";
4843
6307
  "ap-east-1": "ap-east-1";
@@ -4867,32 +6331,10 @@ declare const WorkspaceConfigSchema: ZodObject<{
4867
6331
  "us-west-1": "us-west-1";
4868
6332
  "us-west-2": "us-west-2";
4869
6333
  }>>;
4870
- profile: ZodOptional<ZodString>;
4871
- hostedZoneId: ZodOptional<ZodString>;
4872
- ttl: ZodOptional<ZodNumber>;
4873
- }, $strip>, ZodObject<{
4874
- provider: ZodLiteral<"cloudflare">;
4875
- ttl: ZodOptional<ZodNumber>;
4876
- }, $strip>, ZodObject<{
4877
- provider: ZodLiteral<"manual">;
4878
- }, $strip>], "provider">, ZodObject<{
4879
- provider: ZodCustom<{
4880
- name: string;
4881
- getRecords: Function;
4882
- upsertRecords: Function;
4883
- }, {
4884
- name: string;
4885
- getRecords: Function;
4886
- upsertRecords: Function;
4887
- }>;
4888
- ttl: ZodOptional<ZodNumber>;
4889
- }, $strip>]>>, ZodUnion<readonly [ZodDiscriminatedUnion<[ZodObject<{
4890
- provider: ZodLiteral<"hostinger">;
4891
- ttl: ZodOptional<ZodNumber>;
4892
- domain: ZodString;
4893
- }, $strip>, ZodObject<{
4894
- provider: ZodLiteral<"route53">;
4895
- region: ZodOptional<ZodEnum<{
6334
+ prefix: ZodOptional<ZodString>;
6335
+ }, $strict>, ZodObject<{
6336
+ provider: ZodLiteral<"ssm">;
6337
+ region: ZodEnum<{
4896
6338
  "af-south-1": "af-south-1";
4897
6339
  "ap-east-1": "ap-east-1";
4898
6340
  "ap-northeast-1": "ap-northeast-1";
@@ -4920,34 +6362,9 @@ declare const WorkspaceConfigSchema: ZodObject<{
4920
6362
  "us-east-2": "us-east-2";
4921
6363
  "us-west-1": "us-west-1";
4922
6364
  "us-west-2": "us-west-2";
4923
- }>>;
4924
- profile: ZodOptional<ZodString>;
4925
- hostedZoneId: ZodOptional<ZodString>;
4926
- ttl: ZodOptional<ZodNumber>;
4927
- domain: ZodString;
4928
- }, $strip>, ZodObject<{
4929
- provider: ZodLiteral<"cloudflare">;
4930
- ttl: ZodOptional<ZodNumber>;
4931
- domain: ZodString;
4932
- }, $strip>, ZodObject<{
4933
- provider: ZodLiteral<"manual">;
4934
- domain: ZodString;
4935
- }, $strip>], "provider">, ZodObject<{
4936
- provider: ZodCustom<{
4937
- name: string;
4938
- getRecords: Function;
4939
- upsertRecords: Function;
4940
- }, {
4941
- name: string;
4942
- getRecords: Function;
4943
- upsertRecords: Function;
4944
6365
  }>;
4945
- ttl: ZodOptional<ZodNumber>;
4946
- domain: ZodString;
4947
- }, $strip>]>]>>;
4948
- backups: ZodOptional<ZodObject<{
4949
- type: ZodLiteral<"s3">;
4950
- profile: ZodOptional<ZodString>;
6366
+ }, $strict>, ZodObject<{
6367
+ provider: ZodLiteral<"secrets-manager">;
4951
6368
  region: ZodEnum<{
4952
6369
  "af-south-1": "af-south-1";
4953
6370
  "ap-east-1": "ap-east-1";
@@ -4977,17 +6394,18 @@ declare const WorkspaceConfigSchema: ZodObject<{
4977
6394
  "us-west-1": "us-west-1";
4978
6395
  "us-west-2": "us-west-2";
4979
6396
  }>;
4980
- schedule: ZodOptional<ZodString>;
4981
- retention: ZodOptional<ZodNumber>;
4982
- }, $strip>>;
4983
- }, $strip>>;
4984
- stages: ZodObject<{
4985
- local: ZodString;
4986
- deployed: ZodArray<ZodString>;
4987
- protected: ZodOptional<ZodArray<ZodString>>;
4988
- }, $strip>;
4989
- secrets: ZodOptional<ZodObject<{
4990
- enabled: ZodOptional<ZodBoolean>;
6397
+ kmsKeyId: ZodOptional<ZodString>;
6398
+ }, $strict>, ZodObject<{
6399
+ provider: ZodCustom<{
6400
+ name: string;
6401
+ read: Function;
6402
+ write: Function;
6403
+ }, {
6404
+ name: string;
6405
+ read: Function;
6406
+ write: Function;
6407
+ }>;
6408
+ }, $strip>]>>;
4991
6409
  algorithm: ZodOptional<ZodString>;
4992
6410
  kdf: ZodOptional<ZodEnum<{
4993
6411
  pbkdf2: "pbkdf2";
@@ -5028,6 +6446,40 @@ declare const WorkspaceConfigSchema: ZodObject<{
5028
6446
  "us-west-2": "us-west-2";
5029
6447
  }>;
5030
6448
  profile: ZodOptional<ZodString>;
6449
+ }, $strip>, ZodObject<{
6450
+ provider: ZodLiteral<"s3">;
6451
+ bucket: ZodOptional<ZodString>;
6452
+ region: ZodEnum<{
6453
+ "af-south-1": "af-south-1";
6454
+ "ap-east-1": "ap-east-1";
6455
+ "ap-northeast-1": "ap-northeast-1";
6456
+ "ap-northeast-2": "ap-northeast-2";
6457
+ "ap-northeast-3": "ap-northeast-3";
6458
+ "ap-south-1": "ap-south-1";
6459
+ "ap-south-2": "ap-south-2";
6460
+ "ap-southeast-1": "ap-southeast-1";
6461
+ "ap-southeast-2": "ap-southeast-2";
6462
+ "ap-southeast-3": "ap-southeast-3";
6463
+ "ap-southeast-4": "ap-southeast-4";
6464
+ "ca-central-1": "ca-central-1";
6465
+ "eu-central-1": "eu-central-1";
6466
+ "eu-central-2": "eu-central-2";
6467
+ "eu-north-1": "eu-north-1";
6468
+ "eu-south-1": "eu-south-1";
6469
+ "eu-south-2": "eu-south-2";
6470
+ "eu-west-1": "eu-west-1";
6471
+ "eu-west-2": "eu-west-2";
6472
+ "eu-west-3": "eu-west-3";
6473
+ "me-central-1": "me-central-1";
6474
+ "me-south-1": "me-south-1";
6475
+ "sa-east-1": "sa-east-1";
6476
+ "us-east-1": "us-east-1";
6477
+ "us-east-2": "us-east-2";
6478
+ "us-west-1": "us-west-1";
6479
+ "us-west-2": "us-west-2";
6480
+ }>;
6481
+ prefix: ZodOptional<ZodString>;
6482
+ profile: ZodOptional<ZodString>;
5031
6483
  }, $strip>], "provider">, ZodObject<{
5032
6484
  provider: ZodCustom<{
5033
6485
  read: Function;
@@ -5037,6 +6489,13 @@ declare const WorkspaceConfigSchema: ZodObject<{
5037
6489
  write: Function;
5038
6490
  }>;
5039
6491
  }, $strip>]>>;
6492
+ test: ZodOptional<ZodObject<{
6493
+ factories: ZodOptional<ZodString>;
6494
+ }, $strict>>;
6495
+ dev: ZodOptional<ZodObject<{
6496
+ allowedOrigins: ZodOptional<ZodArray<ZodURL>>;
6497
+ discoveryPort: ZodOptional<ZodNumber>;
6498
+ }, $strict>>;
5040
6499
  }, $strict>;
5041
6500
  /**
5042
6501
  * Validate workspace configuration.
@@ -5058,42 +6517,59 @@ declare function formatValidationErrors(error: ZodError): string;
5058
6517
  //#endregion
5059
6518
  //#region src/workspace/types.d.ts
5060
6519
  /**
5061
- * Deploy target for an app.
5062
- *
5063
- * Specifies where the app will be deployed.
6520
+ * Where a stage — or one app — deploys, by target name: a built-in
6521
+ * (`dokploy`, `sst`) or a key of `deploy.targets`.
5064
6522
  *
5065
6523
  * @example
5066
6524
  * ```ts
5067
- * // Currently supported
5068
6525
  * deploy: 'dokploy'
5069
- *
5070
- * // Future support (not yet implemented)
5071
- * deploy: 'vercel'
5072
- * deploy: 'cloudflare'
6526
+ * deploy: 'acme' // deploy: { targets: { acme: '@acme/gkm-target' } }
5073
6527
  * ```
5074
6528
  */
5075
- type DeployTarget = 'dokploy' | 'vercel' | 'cloudflare';
6529
+ type DeployTargetName = 'dokploy' | 'compose' | 'sst' | (string & {});
6530
+ /**
6531
+ * A per-stage map, typed from the workspace's deployed stages: a key that is
6532
+ * not one is a type error. Untyped (`string`) stages accept any key, which the
6533
+ * schema then checks at load.
6534
+ */
6535
+ type StageMap<S extends string, V> = string extends S ? Record<string, V> : Partial<Record<S, V>>;
5076
6536
  /**
5077
- * Stage-based domain configuration.
6537
+ * `domains: { <stage>: '<domain>' }` at the root of `defineWorkspace`, typed from
6538
+ * the deployed stages.
6539
+ */
6540
+ type DomainsInput<S extends string = string> = StageMap<S, string>;
6541
+ /** How one root domain's hosts point at a compose stage's server. */
6542
+ type DnsRecordsModeInput<S extends string = string> = 'a' | {
6543
+ mode: 'cname';
6544
+ target: string | StageMap<S, string>;
6545
+ };
6546
+ /** One root domain's DNS provider, its records mode typed from the stages. */
6547
+ type DnsDomainInput<S extends string = string> = DnsProvider extends (infer P) ? P extends unknown ? Omit<P, 'records'> & {
6548
+ records?: DnsRecordsModeInput<S>;
6549
+ } : never : never;
6550
+ /** `dns: { '<root domain>': { provider, … } }` at the root of `defineWorkspace`. */
6551
+ type DnsInput<S extends string = string> = Record<string, DnsDomainInput<S>>;
6552
+ /** Each root domain's DNS provider — `dns` at the root of the config. */
6553
+ type WorkspaceDnsConfig = Record<string, DnsProvider>;
6554
+ /**
6555
+ * Each deployed stage's base domain — `domains` at the root of the config.
5078
6556
  *
5079
- * Maps deployment stages to base domains. The main frontend app
5080
- * gets the base domain, other apps get `{appName}.{baseDomain}`.
6557
+ * A fact about the deployment rather than the platform, so every target reads
6558
+ * it. The root site answers on the base domain; every other surface on
6559
+ * `{subdomain}.{domain}`, where the subdomain is the construct's own
6560
+ * `subdomain`, or its id kebab-cased.
5081
6561
  *
5082
6562
  * @example
5083
6563
  * ```ts
5084
- * domains: {
5085
- * development: 'dev.myapp.com',
5086
- * staging: 'staging.myapp.com',
5087
- * production: 'myapp.com',
5088
- * }
6564
+ * domains: { production: 'myapp.com', staging: 'staging.myapp.com' },
5089
6565
  *
5090
- * // Result for production stage:
5091
- * // - web (main frontend): myapp.com
5092
- * // - api: api.myapp.com
5093
- * // - auth: auth.myapp.com
6566
+ * // production:
6567
+ * // - new StaticSite('Web', { root: true }) → myapp.com
6568
+ * // - new RestApi('Api', { subdomain: 'api' }) → api.myapp.com
6569
+ * // - new RestApi('Webhooks', { … }) → webhooks.myapp.com
5094
6570
  * ```
5095
6571
  */
5096
- type DokployDomainsConfig = Record<string, string>;
6572
+ type DomainsConfig = Record<string, string>;
5097
6573
  /**
5098
6574
  * Per-app domain override configuration.
5099
6575
  *
@@ -5125,9 +6601,9 @@ type AppDomainConfig = string | Record<string, string>;
5125
6601
  * ```ts
5126
6602
  * deploy: {
5127
6603
  * default: 'dokploy',
6604
+ * registry: 'ghcr.io/myorg',
5128
6605
  * dokploy: {
5129
6606
  * endpoint: 'https://dokploy.myserver.com',
5130
- * registry: 'ghcr.io/myorg',
5131
6607
  * },
5132
6608
  * }
5133
6609
  * ```
@@ -5136,12 +6612,12 @@ type AppDomainConfig = string | Record<string, string>;
5136
6612
  * ```ts
5137
6613
  * deploy: {
5138
6614
  * default: 'dokploy',
6615
+ * registry: 'ghcr.io/myorg',
5139
6616
  * dokploy: {
5140
6617
  * endpoints: {
5141
6618
  * development: 'https://dev-dokploy.myserver.com',
5142
6619
  * production: 'https://dokploy.myserver.com',
5143
6620
  * },
5144
- * registry: 'ghcr.io/myorg',
5145
6621
  * },
5146
6622
  * }
5147
6623
  * ```
@@ -5151,16 +6627,263 @@ interface DokployWorkspaceConfig {
5151
6627
  endpoint?: string;
5152
6628
  /** Per-stage Dokploy API endpoints (overrides endpoint) */
5153
6629
  endpoints?: Record<string, string>;
5154
- /** Container registry for Docker images (e.g., 'ghcr.io/myorg') */
5155
- registry?: string;
5156
6630
  /** Registry ID in Dokploy (auto-configured) */
5157
6631
  registryId?: string;
6632
+ /** Dokploy's own backup schedule for the stage's Postgres, to an S3 destination. */
6633
+ backups?: DokployBackupsConfig;
6634
+ /** How a release is waited for and checked before it counts as live. */
6635
+ verify?: DokployVerifyConfig;
6636
+ }
6637
+ /**
6638
+ * How a Dokploy release is waited for and checked.
6639
+ *
6640
+ * A release counts once Dokploy's deployment has finished and the app has
6641
+ * answered its health route `healthyAfter` times in a row. One that does not
6642
+ * is rolled back.
6643
+ */
6644
+ interface DokployVerifyConfig {
6645
+ /** How long Dokploy may take to finish a deployment. Default 10 minutes. */
6646
+ deploymentTimeoutMs?: number;
6647
+ /**
6648
+ * The path each backend is checked on, under its domain. Default
6649
+ * `/health`, which every production server build serves. A site is
6650
+ * checked at `/`.
6651
+ */
6652
+ healthCheckPath?: string;
6653
+ /** Consecutive 2xx answers that make an app healthy. Default 3. */
6654
+ healthyAfter?: number;
6655
+ /** Between health checks, and the first wait between polls. Default 2s. */
6656
+ intervalMs?: number;
6657
+ /** How long an app may take to become healthy. Default 5 minutes. */
6658
+ healthTimeoutMs?: number;
6659
+ }
6660
+ /**
6661
+ * The `compose` target's own settings — `deploy.compose`. Read by `gkm
6662
+ * compose` and `gkm deploy --target compose` only; the Dokploy target never
6663
+ * consults it.
6664
+ *
6665
+ * @example
6666
+ * ```ts
6667
+ * deploy: { compose: { proxy: 'traefik' } }
6668
+ * ```
6669
+ */
6670
+ interface ComposeWorkspaceConfig<S extends string = string> {
6671
+ /**
6672
+ * What serves a stage's stack: `'caddy'` (the default) — the stack's own
6673
+ * Caddy on 80/443 — or `'traefik'`, the machine's shared Traefik edge,
6674
+ * which every stack registers its routes with.
6675
+ *
6676
+ * One value applies to every deployed stage; the local stage stays on
6677
+ * Caddy then. A map sets each stage it names, the local stage included,
6678
+ * so the local stack runs behind a Traefik edge on this machine — the
6679
+ * path the deployed stages take — only when the map names it.
6680
+ *
6681
+ * ```ts
6682
+ * proxy: 'traefik' // every deployed stage; local stays on Caddy
6683
+ * proxy: { development: 'traefik', production: 'traefik' }
6684
+ * ```
6685
+ */
6686
+ proxy?: ComposeProxy | StageMap<S, ComposeProxy>;
6687
+ /**
6688
+ * A stage's own certificate, by stage: a PEM certificate (with its chain)
6689
+ * and its key, relative to the workspace root or absolute. Either proxy
6690
+ * serves it, on any stage. Without one, a deployed stage's comes from
6691
+ * Let's Encrypt and the local stage's from gkm's local CA (`gkm trust`).
6692
+ *
6693
+ * ```ts
6694
+ * tls: { production: { certFile: 'certs/origin.pem', keyFile: 'certs/origin.key' } }
6695
+ * tls: {
6696
+ * development: {
6697
+ * certFile: 'certs/dev.pem',
6698
+ * keyFile: 'certs/dev-key.pem',
6699
+ * caFile: 'certs/rootCA.pem',
6700
+ * },
6701
+ * }
6702
+ * ```
6703
+ */
6704
+ tls?: StageMap<S, ComposeTlsConfig>;
6705
+ /**
6706
+ * Each deployed stage's server: the SSH login gkm drives its Docker
6707
+ * engine with (`DOCKER_HOST=ssh://user@host`). gkm runs where the deploy
6708
+ * starts — a CI runner, a laptop — and never on the server, which holds
6709
+ * Docker and this login and no cloud credentials. The host defaults to
6710
+ * the stage's `GKM_SERVER_IPV4` secret. Every deployed stage needs one;
6711
+ * the local stage runs on this machine's Docker.
6712
+ *
6713
+ * ```ts
6714
+ * server: { production: { user: 'deploy' } }
6715
+ * server: { staging: { user: 'deploy', host: 'staging.example.com', port: 2222 } }
6716
+ * ```
6717
+ */
6718
+ server?: StageMap<S, ComposeServerConfig>;
6719
+ }
6720
+ /** A deployed stage's server — `deploy.compose.server.<stage>`. */
6721
+ interface ComposeServerConfig {
6722
+ /** The SSH user, in the server's `docker` group. */
6723
+ user: string;
6724
+ /** The host to SSH to. Default: the stage's `GKM_SERVER_IPV4` secret. */
6725
+ host?: string;
6726
+ /** The SSH port. Default 22. */
6727
+ port?: number;
6728
+ }
6729
+ /** The proxies a compose stack can be served by — `deploy.compose.proxy`. */
6730
+ type ComposeProxy = 'caddy' | 'traefik';
6731
+ /** A stage's own certificate — `deploy.compose.tls.<stage>`. */
6732
+ interface ComposeTlsConfig {
6733
+ certFile: string;
6734
+ keyFile: string;
6735
+ /**
6736
+ * The root the certificate chains to, PEM, when no public CA issued it —
6737
+ * an mkcert root, a company CA. gkm's check after a start trusts it; on
6738
+ * the local stage the stack's containers are handed it too
6739
+ * (`NODE_EXTRA_CA_CERTS`). Without it, the check trusts what Node does by
6740
+ * default: its bundled roots, and `NODE_EXTRA_CA_CERTS` where it is set.
6741
+ */
6742
+ caFile?: string;
6743
+ }
6744
+ /**
6745
+ * Where one stage's telemetry goes, and how much of it — `deploy.telemetry`,
6746
+ * by stage.
6747
+ *
6748
+ * What is emitted is the application's (the `Telemetry` construct); where it
6749
+ * goes is this. A server target runs the self-hosted provider when a stage
6750
+ * names nothing; AWS has none, so a deployed AWS stage that uses telemetry
6751
+ * names a provider. `false` sends nothing. The local stage ignores this: `gkm
6752
+ * dev` and `gkm compose` on it always run OpenObserve, at 100%.
6753
+ *
6754
+ * @example
6755
+ * ```ts
6756
+ * telemetry: {
6757
+ * staging: 'self-hosted',
6758
+ * production: { provider: 'self-hosted', retentionDays: 14, sampleRate: 0.1 },
6759
+ * preview: { provider: 'otlp', endpoint: 'https://otlp.example.com', sampleRate: 0.5 },
6760
+ * scratch: false,
6761
+ * }
6762
+ * ```
6763
+ */
6764
+ type StageTelemetryConfig = 'self-hosted' | SelfHostedTelemetryConfig | OtlpTelemetryConfig | false;
6765
+ /**
6766
+ * What backs one deployed stage's buckets — `deploy.objects`, by stage.
6767
+ *
6768
+ * - `'external'` (the default) — the stage's secrets hold each bucket's URL,
6769
+ * set by you: S3, R2, any S3-compatible store.
6770
+ * - `{ provider: 's3' }` — every deploy of the stage creates (or repairs)
6771
+ * each bucket, its IAM user and key in the stage's AWS account, and writes
6772
+ * the bucket's URL into the stage's secrets, before its checks.
6773
+ * - `false` — the stage has no object storage; a bucket on it is refused.
6774
+ *
6775
+ * The local stage ignores this: `gkm dev` runs MinIO for every bucket.
6776
+ *
6777
+ * @example
6778
+ * ```ts
6779
+ * objects: {
6780
+ * production: { provider: 's3', region: 'eu-west-1', versioning: true },
6781
+ * staging: 'external',
6782
+ * }
6783
+ * ```
6784
+ */
6785
+ type StageObjectsConfig = 'external' | S3ObjectsConfig | false;
6786
+ /**
6787
+ * What receives one deployed stage's inboxes — `deploy.inbox`, by stage:
6788
+ *
6789
+ * - `{ provider: 'ses' }` — the deploy creates each inbox in the stage's AWS
6790
+ * account: its own bucket and topic, the domain's SES identity and MX
6791
+ * records, and a receipt rule in the region's active rule set.
6792
+ * - `'external'` — the default: the stage's secrets hold each inbox's keys.
6793
+ * - `false` — the stage receives no mail; an inbox on it is refused.
6794
+ *
6795
+ * Every local stage receives through Mailpit, whatever this says.
6796
+ *
6797
+ * @example
6798
+ * ```ts
6799
+ * inbox: { production: { provider: 'ses', region: 'eu-west-1' } }
6800
+ * ```
6801
+ */
6802
+ type StageInboxConfig = 'external' | SesInboxConfig | false;
6803
+ /**
6804
+ * One deployed compose stage's backups — `deploy.backups`, by stage.
6805
+ *
6806
+ * A stage that runs Postgres is backed up whether it names one or not: every
6807
+ * day at 02:00 UTC, each backup kept 30 days, in the project bucket. An
6808
+ * entry changes when (`every`, or a five-field UTC `cron`, at most hourly)
6809
+ * and for how long (`keep`); `false` takes none, and deletes nothing.
6810
+ *
6811
+ * @example
6812
+ * ```ts
6813
+ * backups: {
6814
+ * production: { every: '6h', keep: '30d' },
6815
+ * staging: { cron: '30 3 * * *', keep: '7d' },
6816
+ * preview: false,
6817
+ * }
6818
+ * ```
6819
+ */
6820
+ type StageBackupsConfig = false | {
6821
+ /** `'6h'`, `'1d'` — counted from 02:00 UTC. At least `'1h'`. */
6822
+ every?: string;
6823
+ /** Five fields, in UTC: `'0 *\/6 * * *'`. */
6824
+ cron?: string;
6825
+ /** How long a backup is kept: `'30d'`. */
6826
+ keep?: string;
6827
+ };
6828
+ /** `objects: { provider: 's3' }` — a bucket per construct in the stage's account. */
6829
+ interface S3ObjectsConfig {
6830
+ provider: 's3';
6831
+ /**
6832
+ * Where the buckets are created. Defaults to the secrets store's region,
6833
+ * then `AWS_REGION`.
6834
+ */
6835
+ region?: string;
6836
+ /** Keep previous versions of every object. Defaults to the construct's own `versioned`. */
6837
+ versioning?: boolean;
6838
+ /**
6839
+ * Serve each file server through a CDN on `<fileserver>.<domain>`: a
6840
+ * CloudFront distribution reading the bucket, its certificate and its DNS
6841
+ * records, all created by the deploy. On by default, which needs the
6842
+ * stage to have a domain; `false` serves from the bucket's own endpoint.
6843
+ */
6844
+ cdn?: boolean;
6845
+ }
6846
+ /** Shared by every provider. */
6847
+ interface TelemetryProviderConfig {
6848
+ /**
6849
+ * The fraction of traces kept, decided where a trace starts and followed
6850
+ * by every service it reaches (`parentbased_traceidratio`). Logs are not
6851
+ * sampled. 0 to 1; default 1.
6852
+ */
6853
+ sampleRate?: number;
6854
+ }
6855
+ /**
6856
+ * The target runs the collector and its UI: OpenObserve, in a compose stack,
6857
+ * reached through an SSH tunnel by default.
6858
+ */
6859
+ interface SelfHostedTelemetryConfig extends TelemetryProviderConfig {
6860
+ provider: 'self-hosted';
6861
+ /**
6862
+ * The port it is published on, on 127.0.0.1 only — reached from another
6863
+ * machine through an SSH tunnel. Default 5080.
6864
+ */
6865
+ port?: number;
6866
+ /**
6867
+ * How many days of data it keeps (OpenObserve's
6868
+ * `ZO_COMPACT_DATA_RETENTION_DAYS`). At least 3; default 30.
6869
+ */
6870
+ retentionDays?: number;
5158
6871
  /**
5159
- * Stage-based domain configuration.
5160
- * The main frontend app gets the base domain.
5161
- * Other apps get {appName}.{baseDomain} by default.
6872
+ * Serve it on `logs.<stage domain>` through the stack's proxy, to these
6873
+ * addresses only (IPs or CIDRs), instead of on a loopback port. Every
6874
+ * other address is answered 403.
5162
6875
  */
5163
- domains?: DokployDomainsConfig;
6876
+ public?: {
6877
+ allow: string[];
6878
+ };
6879
+ }
6880
+ /** Any OTLP/HTTP endpoint — a collector, a vendor's ingest. */
6881
+ interface OtlpTelemetryConfig extends TelemetryProviderConfig {
6882
+ provider: 'otlp';
6883
+ /** The OTLP/HTTP base URL; `/v1/traces` and `/v1/logs` are added to it. */
6884
+ endpoint: string;
6885
+ /** Headers sent with every export — `{ 'x-team': 'shop' }`. */
6886
+ headers?: Record<string, string>;
5164
6887
  }
5165
6888
  /**
5166
6889
  * Deployment configuration for the workspace.
@@ -5172,37 +6895,79 @@ interface DokployWorkspaceConfig {
5172
6895
  * default: 'dokploy',
5173
6896
  * }
5174
6897
  *
5175
- * // Full configuration with DNS and backups
6898
+ * // Full configuration with backups (domains and dns are at the root)
5176
6899
  * deploy: {
5177
6900
  * default: 'dokploy',
6901
+ * registry: 'ghcr.io/myorg',
5178
6902
  * dokploy: {
5179
6903
  * endpoint: 'https://dokploy.myserver.com',
5180
6904
  * projectId: 'proj_abc123',
5181
- * registry: 'ghcr.io/myorg',
5182
- * domains: {
5183
- * production: 'myapp.com',
5184
- * },
5185
- * },
5186
- * dns: {
5187
- * provider: 'hostinger',
5188
- * domain: 'myapp.com',
5189
- * },
5190
- * backups: {
5191
- * type: 's3',
5192
- * region: 'us-east-1',
6905
+ * backups: { type: 's3', region: 'us-east-1' },
5193
6906
  * },
5194
6907
  * }
5195
6908
  * ```
5196
6909
  */
5197
- interface DeployConfig {
6910
+ interface DeployConfig<S extends string = string> {
5198
6911
  /** Default deploy target for all apps (default: 'dokploy') */
5199
- default?: DeployTarget;
6912
+ default?: DeployTargetName;
6913
+ /**
6914
+ * Targets that do not ship with the CLI, by the name `default` (or an
6915
+ * app's `deploy`) uses: a package whose default export is the target, a
6916
+ * target object, or either with its options.
6917
+ *
6918
+ * ```ts
6919
+ * targets: {
6920
+ * acme: '@acme/gkm-target',
6921
+ * fly: ['@acme/gkm-fly', { org: 'acme' }],
6922
+ * local: defineTarget({ … }),
6923
+ * }
6924
+ * ```
6925
+ *
6926
+ * A package is never guessed from a name: it is installed and listed here.
6927
+ * A built-in's name cannot be taken.
6928
+ */
6929
+ targets?: Record<string, DeployTargetEntry>;
6930
+ /**
6931
+ * Whose deploy this is, on a target shared with other workspaces — an
6932
+ * organisation or a team, lowercase `[a-z0-9-]`. Two workspaces with the
6933
+ * same name deploying to one Dokploy are kept apart by it: it is in the
6934
+ * project's ownership marker, the image path
6935
+ * (`<registry>/<namespace>/<project>-<app>`) and every resource name.
6936
+ *
6937
+ * Defaults to the kebab-cased workspace name, which adds nothing to the
6938
+ * names a workspace was already deployed under.
6939
+ */
6940
+ namespace?: string;
6941
+ /**
6942
+ * The container registry the apps' images are pushed to and pulled from,
6943
+ * whatever the target — `ghcr.io/myorg`. An image is
6944
+ * `<registry>/<namespace>/<project>-<app>:<tag>`.
6945
+ */
6946
+ registry?: string;
5200
6947
  /** Dokploy-specific configuration */
5201
6948
  dokploy?: DokployWorkspaceConfig;
5202
- /** DNS configuration for automatic record creation */
5203
- dns?: DnsConfig;
5204
- /** Backup destination configuration for database services */
5205
- backups?: BackupsConfig;
6949
+ /** What the `compose` target runs beside the apps — see {@link ComposeWorkspaceConfig}. */
6950
+ compose?: ComposeWorkspaceConfig<S>;
6951
+ /**
6952
+ * Where each deployed stage's telemetry goes — see
6953
+ * {@link StageTelemetryConfig}.
6954
+ */
6955
+ telemetry?: StageMap<S, StageTelemetryConfig>;
6956
+ /**
6957
+ * What backs each deployed stage's buckets — the `objects` kind that
6958
+ * `ObjectStorage` and `FileServer` produce. See {@link StageObjectsConfig}.
6959
+ */
6960
+ objects?: StageMap<S, StageObjectsConfig>;
6961
+ /**
6962
+ * What receives each deployed stage's inboxes — the `inbox` kind `Inbox`
6963
+ * produces. See {@link StageInboxConfig}.
6964
+ */
6965
+ inbox?: StageMap<S, StageInboxConfig>;
6966
+ /**
6967
+ * When each deployed compose stage's databases are backed up, and how
6968
+ * long a backup is kept — see {@link StageBackupsConfig}.
6969
+ */
6970
+ backups?: StageMap<S, StageBackupsConfig>;
5206
6971
  }
5207
6972
  /**
5208
6973
  * Models package configuration for shared schemas.
@@ -5288,7 +7053,7 @@ interface StagesConfig {
5288
7053
  *
5289
7054
  * Configures how secrets are encrypted for deployment.
5290
7055
  * Secrets are stored encrypted in `.gkm/secrets/{stage}.json`
5291
- * with keys stored separately in `~/.gkm/{project}/{stage}.key`.
7056
+ * with keys stored separately in `~/.gkm/keys/{namespace}/{project}/{stage}.key`.
5292
7057
  *
5293
7058
  * @example
5294
7059
  * ```ts
@@ -5302,6 +7067,19 @@ interface StagesConfig {
5302
7067
  interface SecretsConfig {
5303
7068
  /** Enable encrypted secrets (default: true) */
5304
7069
  enabled?: boolean;
7070
+ /**
7071
+ * Where deployed stages' secrets live, so a deploy can reach them from
7072
+ * anywhere: `'file'` (default — the encrypted `.gkm/secrets/<stage>.json`,
7073
+ * which cannot serve CI while `.gkm/` is gitignored), `{ provider: 's3',
7074
+ * region?, bucket?, prefix? }` (each stage's secrets in one object in the
7075
+ * project bucket beside the deploy state, SSE-S3 and versioned, no size
7076
+ * limit; region and prefix default to an S3 `state`'s), `{ provider: 'ssm',
7077
+ * region }` (each stage's secrets in an SSM parameter in its own AWS
7078
+ * account, up to 8 KB), `{ provider: 'secrets-manager', region, kmsKeyId? }`
7079
+ * (a Secrets Manager secret in its own account, up to 64 KB), or any object
7080
+ * implementing `SecretsStore`. The local stage always uses the file.
7081
+ */
7082
+ store?: SecretsStoreConfig;
5305
7083
  /** Encryption algorithm (default: 'aes-256-gcm') */
5306
7084
  algorithm?: string;
5307
7085
  /** Key derivation function (default: 'scrypt') */
@@ -5368,7 +7146,7 @@ interface AppConfigBase {
5368
7146
  * Overrides `deploy.default` for this specific app.
5369
7147
  * @example 'dokploy', 'vercel'
5370
7148
  */
5371
- deploy?: DeployTarget;
7149
+ deploy?: DeployTargetName;
5372
7150
  /**
5373
7151
  * Constructs glob pattern — one glob, every kind.
5374
7152
  *
@@ -5419,23 +7197,16 @@ interface AppConfigBase {
5419
7197
  * @example './src/config/logger'
5420
7198
  */
5421
7199
  logger?: string;
5422
- /** Provider configuration (AWS, Docker, etc.) */
5423
- providers?: ProvidersConfig;
5424
7200
  /**
5425
7201
  * Server lifecycle hooks.
5426
7202
  * @example { beforeSetup: './src/hooks/setup.ts' }
5427
7203
  */
5428
7204
  hooks?: HooksConfig;
5429
7205
  /**
5430
- * Telescope debugging dashboard configuration.
7206
+ * Telescope request recording configuration.
5431
7207
  * @example true, './src/config/telescope', { enabled: true, path: '/__telescope' }
5432
7208
  */
5433
7209
  telescope?: string | boolean | TelescopeConfig;
5434
- /**
5435
- * Studio admin panel configuration.
5436
- * @example true, './src/config/studio'
5437
- */
5438
- studio?: string | boolean | StudioConfig;
5439
7210
  /**
5440
7211
  * OpenAPI documentation configuration.
5441
7212
  * @example true, { output: './src/openapi.ts' }
@@ -5609,7 +7380,7 @@ type ConstrainedApps<TApps extends AppsRecord> = { [K in keyof TApps]: Omit<TApp
5609
7380
  * });
5610
7381
  * ```
5611
7382
  */
5612
- type WorkspaceInput<TApps extends AppsRecord> = {
7383
+ type WorkspaceInput<TApps extends AppsRecord, TDeployed extends string = string> = {
5613
7384
  /**
5614
7385
  * Where the workspace's own constructs live, relative to its root.
5615
7386
  *
@@ -5629,15 +7400,80 @@ type WorkspaceInput<TApps extends AppsRecord> = {
5629
7400
  apps?: ConstrainedApps<TApps>;
5630
7401
  /** Shared packages configuration */
5631
7402
  shared?: SharedConfig;
7403
+ /**
7404
+ * Each deployed stage's base domain — see {@link DomainsConfig}. A key that
7405
+ * is not a deployed stage is a type error.
7406
+ */
7407
+ domains?: DomainsInput<NoInfer<TDeployed>>;
7408
+ /**
7409
+ * Subdomains a wildcard site's tenants may never take, beyond every app's
7410
+ * own (which are derived from the constructs and never listed here): the
7411
+ * names no construct declares — `www`, `mail`, `status`, `docs`.
7412
+ *
7413
+ * Listing an app's own subdomain is refused at load: the construct
7414
+ * already protects it.
7415
+ */
7416
+ protectedSubdomains?: readonly string[];
7417
+ /**
7418
+ * Each root domain's DNS provider, and how its hosts are pointed at a
7419
+ * compose stage's server (`records`).
7420
+ */
7421
+ dns?: DnsInput<NoInfer<TDeployed>>;
5632
7422
  /** Deployment configuration */
5633
- deploy?: DeployConfig;
5634
- /** The project's stages: which one is local, which deploy */
5635
- stages: StagesConfig;
7423
+ deploy?: DeployConfig<NoInfer<TDeployed>>;
7424
+ /**
7425
+ * The project's stages: which one is local, which deploy. The deployed
7426
+ * stages type every per-stage map — `domains`, `deploy.objects`,
7427
+ * `deploy.telemetry`, `deploy.compose.proxy`/`tls`.
7428
+ */
7429
+ stages: StagesInput<TDeployed>;
5636
7430
  /** Encrypted secrets configuration */
5637
7431
  secrets?: SecretsConfig;
5638
7432
  /** State provider configuration (local filesystem by default, or SSM for team collaboration) */
5639
7433
  state?: StateConfig;
7434
+ /** How `gkm dev` is reached: the discovery endpoint's port and origins */
7435
+ dev?: DevConfig;
5640
7436
  };
7437
+ /** `stages`, as `defineWorkspace` infers it: each deployed stage literally. */
7438
+ interface StagesInput<TDeployed extends string = string> {
7439
+ local: string;
7440
+ deployed: readonly TDeployed[];
7441
+ protected?: readonly NoInfer<TDeployed>[];
7442
+ }
7443
+ /**
7444
+ * How `gkm dev` is reached from outside the apps it runs.
7445
+ */
7446
+ interface DevConfig {
7447
+ /**
7448
+ * Browser origins allowed to read the discovery endpoint — and this
7449
+ * workspace in it — e.g. `['https://console.example.com']`.
7450
+ *
7451
+ * Empty by default: any page the developer visits can send requests to a
7452
+ * loopback port, so none is answered unless it is listed here. A request
7453
+ * with no `Origin` (curl, a local process) still needs the session token.
7454
+ */
7455
+ allowedOrigins?: string[];
7456
+ /**
7457
+ * The loopback port the discovery endpoint listens on. Defaults to 4983;
7458
+ * `GKM_DISCOVERY_PORT` overrides it.
7459
+ */
7460
+ discoveryPort?: number;
7461
+ }
7462
+ /**
7463
+ * How `gkm test` builds what a feature test is handed.
7464
+ */
7465
+ interface TestConfig {
7466
+ /**
7467
+ * The folder of test factories, relative to the root.
7468
+ *
7469
+ * Defaults to `test/factories`. A factory belongs to a database, not to an
7470
+ * app, so each file is named after one — `database.ts` for `Database`,
7471
+ * `auth-database.ts` for `AuthDatabase` — and exports `createFactory(db)`.
7472
+ * Every app's harness builds them on each test's transactions, and a test is
7473
+ * handed them as `factories`, keyed by service name.
7474
+ */
7475
+ factories?: string;
7476
+ }
5641
7477
  /**
5642
7478
  * Extract app names from apps record.
5643
7479
  */
@@ -5658,10 +7494,15 @@ type InferredWorkspaceConfig<TApps extends AppsRecord> = {
5658
7494
  dependencies?: InferAppNames<TApps>[];
5659
7495
  }; };
5660
7496
  shared?: SharedConfig;
7497
+ domains?: DomainsConfig;
7498
+ protectedSubdomains?: readonly string[];
7499
+ dns?: WorkspaceDnsConfig;
5661
7500
  deploy?: DeployConfig;
5662
7501
  stages: StagesConfig;
5663
7502
  secrets?: SecretsConfig;
5664
7503
  state?: StateConfig;
7504
+ test?: TestConfig;
7505
+ dev?: DevConfig;
5665
7506
  };
5666
7507
  /**
5667
7508
  * Workspace configuration for multi-app monorepos.
@@ -5708,17 +7549,20 @@ type InferredWorkspaceConfig<TApps extends AppsRecord> = {
5708
7549
  * },
5709
7550
  * },
5710
7551
  *
7552
+ * // Each deployed stage's base domain, and who hosts its DNS
7553
+ * domains: {
7554
+ * production: 'myapp.com',
7555
+ * staging: 'staging.myapp.com',
7556
+ * },
7557
+ * dns: { 'myapp.com': { provider: 'godaddy' } },
7558
+ *
5711
7559
  * // Deployment configuration
5712
7560
  * deploy: {
5713
7561
  * default: 'dokploy',
7562
+ * registry: 'ghcr.io/myorg',
5714
7563
  * dokploy: {
5715
7564
  * endpoint: 'https://dokploy.myserver.com',
5716
7565
  * projectId: 'proj_abc123',
5717
- * registry: 'ghcr.io/myorg',
5718
- * domains: {
5719
- * production: 'myapp.com',
5720
- * staging: 'staging.myapp.com',
5721
- * },
5722
7566
  * },
5723
7567
  * },
5724
7568
  *
@@ -5746,6 +7590,12 @@ interface WorkspaceConfig {
5746
7590
  apps?: Record<string, AppConfig>;
5747
7591
  /** Shared packages configuration */
5748
7592
  shared?: SharedConfig;
7593
+ /** Each deployed stage's base domain — see {@link DomainsConfig}. */
7594
+ domains?: DomainsConfig;
7595
+ /** Subdomains no tenant may take — see `WorkspaceInput`. */
7596
+ protectedSubdomains?: readonly string[];
7597
+ /** Each root domain's DNS provider — see {@link WorkspaceDnsConfig}. */
7598
+ dns?: WorkspaceDnsConfig;
5749
7599
  /** Default deployment configuration */
5750
7600
  deploy?: DeployConfig;
5751
7601
  /** The project's stages: which one is local, which deploy */
@@ -5754,6 +7604,10 @@ interface WorkspaceConfig {
5754
7604
  secrets?: SecretsConfig;
5755
7605
  /** State provider configuration (local filesystem by default, or SSM for team collaboration) */
5756
7606
  state?: StateConfig;
7607
+ /** What `gkm test` hands a feature test: where the factories are. */
7608
+ test?: TestConfig;
7609
+ /** How `gkm dev` is reached: the discovery endpoint's port and origins. */
7610
+ dev?: DevConfig;
5757
7611
  }
5758
7612
  /**
5759
7613
  * Normalized app configuration with resolved defaults.
@@ -5770,6 +7624,11 @@ interface NormalizedAppConfig extends Omit<AppConfigBase, 'type'> {
5770
7624
  * and that is `domain`.
5771
7625
  */
5772
7626
  root?: boolean;
7627
+ /**
7628
+ * The label this app answers on under a stage's domain, carried from its
7629
+ * declaration — `api` for `api.myapp.com`. Absent, the app's own name.
7630
+ */
7631
+ subdomain?: string;
5773
7632
  /** App type (always defined after normalization) */
5774
7633
  type: 'backend' | 'web' | 'mobile';
5775
7634
  /** Path to the app */
@@ -5779,7 +7638,7 @@ interface NormalizedAppConfig extends Omit<AppConfigBase, 'type'> {
5779
7638
  /** Resolved dependencies array (empty array if none) */
5780
7639
  dependencies: string[];
5781
7640
  /** Resolved deploy target (app.deploy > deploy.default > 'dokploy') */
5782
- resolvedDeployTarget: DeployTarget;
7641
+ resolvedDeployTarget: DeployTargetName;
5783
7642
  /** Entry file path for non-gkm apps */
5784
7643
  entry?: string;
5785
7644
  /** Framework for the app */
@@ -5809,6 +7668,12 @@ interface NormalizedWorkspace {
5809
7668
  constructs?: Routes;
5810
7669
  /** Normalized app configurations */
5811
7670
  apps: Record<string, NormalizedAppConfig>;
7671
+ /** Each deployed stage's base domain */
7672
+ domains?: DomainsConfig;
7673
+ /** Subdomains no tenant may take, beyond every app's own */
7674
+ protectedSubdomains?: readonly string[];
7675
+ /** Each root domain's DNS provider */
7676
+ dns?: WorkspaceDnsConfig;
5812
7677
  /** Deploy configuration (empty object if not specified) */
5813
7678
  deploy: DeployConfig;
5814
7679
  /** Shared packages configuration (empty object if not specified) */
@@ -5819,6 +7684,10 @@ interface NormalizedWorkspace {
5819
7684
  secrets: SecretsConfig;
5820
7685
  /** State provider configuration (undefined = local filesystem) */
5821
7686
  state?: StateConfig;
7687
+ /** What `gkm test` hands a feature test (empty object if not specified) */
7688
+ test: TestConfig;
7689
+ /** How `gkm dev` is reached, when configured */
7690
+ dev?: DevConfig;
5822
7691
  }
5823
7692
  /**
5824
7693
  * Result of loading and processing a configuration.
@@ -5838,6 +7707,11 @@ interface LoadedConfig {
5838
7707
  * two chances to disagree. Absent when the workspace declares no constructs.
5839
7708
  */
5840
7709
  manifest?: ConstructManifest;
7710
+ /**
7711
+ * The files each Worker's crons, queues and subscribers are declared in,
7712
+ * read in the same discovery — what says which app a worker is built from.
7713
+ */
7714
+ background?: Record<string, string[]>;
5841
7715
  }
5842
7716
  /**
5843
7717
  * Type guard to check if a config is a WorkspaceConfig.
@@ -5854,43 +7728,7 @@ interface LoadedConfig {
5854
7728
  declare function isWorkspaceConfig(config: GkmConfig | WorkspaceConfig): config is WorkspaceConfig;
5855
7729
  //#endregion
5856
7730
  //#region src/types.d.ts
5857
- interface PartitionedRoutes {
5858
- paths: string | string[];
5859
- partition: (filepath: string) => string;
5860
- }
5861
- type Routes = string | string[] | PartitionedRoutes;
5862
- interface ProviderConfig {
5863
- enabled?: boolean;
5864
- outputDir?: string;
5865
- }
5866
- interface AWSApiGatewayConfig extends ProviderConfig {}
5867
- interface AWSLambdaConfig extends ProviderConfig {}
5868
- interface ProductionConfig {
5869
- /** Enable production mode (default: false) */
5870
- enabled?: boolean;
5871
- /** Bundle server into single file (default: true) */
5872
- bundle?: boolean;
5873
- /** Minify bundled output (default: true) */
5874
- minify?: boolean;
5875
- /** Health check endpoint path (default: '/health') */
5876
- healthCheck?: string;
5877
- /** Enable graceful shutdown handling (default: true) */
5878
- gracefulShutdown?: boolean;
5879
- /** Packages to exclude from bundling (default: []) */
5880
- external?: string[];
5881
- /** Include subscribers in production build (default: 'exclude' for serverless) */
5882
- subscribers?: 'include' | 'exclude';
5883
- /** Include OpenAPI spec in production (default: false) */
5884
- openapi?: boolean;
5885
- /**
5886
- * Enable build-time optimized handler generation (default: true)
5887
- * Generates specialized handlers based on endpoint tier:
5888
- * - minimal: Near-raw-Hono performance for simple endpoints
5889
- * - standard: Optimized handlers for auth/services
5890
- * - full: Uses HonoEndpoint.addRoutes for complex endpoints
5891
- */
5892
- optimizedHandlers?: boolean;
5893
- }
7731
+ type Routes = string | string[];
5894
7732
  /**
5895
7733
  * Where a declared cache actually lives.
5896
7734
  *
@@ -5907,8 +7745,12 @@ interface ProductionConfig {
5907
7745
  * - `db` — a table in the database the app already declared. No infrastructure
5908
7746
  * at all, and the same relationship pg-boss has to Postgres: it creates its
5909
7747
  * own table on first use and needs a declared database to live in.
7748
+ * - `redis` — a Redis the stack runs beside the apps, on its network. It holds
7749
+ * *every* declared cache, one declared from a database included, so the
7750
+ * cache never competes with the database for its connections. Only the
7751
+ * compose target selects it today (`gkm compose`).
5910
7752
  */
5911
- type CacheBackend = 'upstash' | 'elasticache' | 'db';
7753
+ type CacheBackend = 'upstash' | 'elasticache' | 'db' | 'redis';
5912
7754
  /**
5913
7755
  * Who delivers a declared app's mail.
5914
7756
  *
@@ -5935,17 +7777,11 @@ interface DockerConfig {
5935
7777
  registry?: string;
5936
7778
  /** Docker image name (default: derived from package.json name) */
5937
7779
  imageName?: string;
5938
- /** Base Docker image (default: 'node:22-alpine') */
7780
+ /** Base Docker image (default: 'node:22.23.4-alpine', a Node security release) */
5939
7781
  baseImage?: string;
5940
7782
  /** Container port (default: 3000) */
5941
7783
  port?: number;
5942
7784
  }
5943
- interface ServerConfig extends ProviderConfig {
5944
- enableOpenApi?: boolean;
5945
- port?: number;
5946
- /** Production build configuration */
5947
- production?: ProductionConfig;
5948
- }
5949
7785
  type Runtime = 'node' | 'bun';
5950
7786
  interface TelescopeConfig {
5951
7787
  /** Enable/disable telescope (default: true in development) */
@@ -5963,14 +7799,6 @@ interface TelescopeConfig {
5963
7799
  /** Enable WebSocket for real-time updates (default: true, requires @hono/node-ws for Node.js) */
5964
7800
  websocket?: boolean;
5965
7801
  }
5966
- interface StudioConfig {
5967
- /** Enable/disable studio (default: true in development) */
5968
- enabled?: boolean;
5969
- /** Path prefix for studio UI (default: /__studio) */
5970
- path?: string;
5971
- /** Schema to introspect (default: 'public') */
5972
- schema?: string;
5973
- }
5974
7802
  interface OpenApiConfig {
5975
7803
  /** Enable OpenAPI generation (default: true) */
5976
7804
  enabled?: boolean;
@@ -6008,34 +7836,6 @@ interface HooksConfig {
6008
7836
  */
6009
7837
  server?: string;
6010
7838
  }
6011
- /** Dokploy deployment configuration */
6012
- interface DokployProviderConfig {
6013
- /** Dokploy API endpoint (e.g., 'https://dokploy.example.com') */
6014
- endpoint: string;
6015
- /** Project ID in Dokploy */
6016
- projectId: string;
6017
- /** Application ID in Dokploy */
6018
- applicationId: string;
6019
- /** Container registry (overrides docker.registry if set) */
6020
- registry?: string;
6021
- /** Registry ID in Dokploy (recommended for private registries) */
6022
- registryId?: string;
6023
- }
6024
- interface ProvidersConfig {
6025
- aws?: {
6026
- apiGateway?: {
6027
- v1?: boolean | AWSApiGatewayConfig;
6028
- v2?: boolean | AWSApiGatewayConfig;
6029
- };
6030
- lambda?: {
6031
- functions?: boolean | AWSLambdaConfig;
6032
- crons?: boolean | AWSLambdaConfig;
6033
- };
6034
- };
6035
- server?: boolean | ServerConfig;
6036
- /** Dokploy deployment configuration */
6037
- dokploy?: boolean | DokployProviderConfig;
6038
- }
6039
7839
  interface GkmConfig {
6040
7840
  /**
6041
7841
  * What this app is called, and therefore how everything it declares is named.
@@ -6057,6 +7857,12 @@ interface GkmConfig {
6057
7857
  name?: string;
6058
7858
  /** The project's stages: which one is local, which deploy */
6059
7859
  stages: StagesConfig;
7860
+ /** Encrypted secrets, and where deployed stages' secrets are stored */
7861
+ secrets?: SecretsConfig;
7862
+ /** What `gkm test` hands a feature test: where the factories are. */
7863
+ test?: TestConfig;
7864
+ /** How `gkm dev` is reached: the discovery endpoint's port and origins. */
7865
+ dev?: DevConfig;
6060
7866
  /**
6061
7867
  * Constructs glob pattern — one glob, every kind.
6062
7868
  *
@@ -6068,7 +7874,6 @@ interface GkmConfig {
6068
7874
  * @example './src/**\/*.ts'
6069
7875
  */
6070
7876
  constructs: Routes;
6071
- providers?: ProvidersConfig;
6072
7877
  /**
6073
7878
  * Server lifecycle hooks for customizing the Hono app.
6074
7879
  * Allows adding custom routes, middleware, error handlers, etc.
@@ -6087,16 +7892,6 @@ interface GkmConfig {
6087
7892
  * - A TelescopeConfig object for inline configuration
6088
7893
  */
6089
7894
  telescope?: string | boolean | TelescopeConfig;
6090
- /**
6091
- * Studio configuration for database browsing.
6092
- * Can be:
6093
- * - A string path to a module that exports a Studio instance (recommended)
6094
- * - A boolean to enable/disable with defaults
6095
- * - A StudioConfig object for inline configuration
6096
- *
6097
- * Requires a database connection configured via services.
6098
- */
6099
- studio?: string | boolean | StudioConfig;
6100
7895
  /**
6101
7896
  * OpenAPI generation configuration.
6102
7897
  * Can be:
@@ -6159,7 +7954,11 @@ interface GkmConfig {
6159
7954
  * a rename rather than a rewrite.
6160
7955
  */
6161
7956
  deploy?: DeployConfig;
7957
+ /** Each deployed stage's base domain — the same field a workspace has. */
7958
+ domains?: DomainsConfig;
7959
+ /** Each root domain's DNS provider — the same field a workspace has. */
7960
+ dns?: WorkspaceDnsConfig;
6162
7961
  }
6163
7962
  //#endregion
6164
- export { SUPPORTED_DEPLOY_TARGETS as A, WorkspaceInput as C, FrontendFramework as D, Framework as E, isPhase2DeployTarget as F, safeValidateWorkspaceConfig as I, validateWorkspaceConfig as L, formatValidationErrors as M, getDeployTargetError as N, MobileFramework as O, isDeployTargetSupported as P, WorkspaceConfig as S, BackendFramework as T, ModelsConfig as _, Routes as a, SecretsConfig as b, AppInput as c, DeployConfig as d, DeployTarget as f, LoadedConfig as g, InferredWorkspaceConfig as h, OpenApiConfig as i, WorkspaceConfigSchema as j, PHASE_2_DEPLOY_TARGETS as k, AppsRecord as l, InferAppNames as m, EmailBackend as n, AppConfig as o, DokployWorkspaceConfig as p, GkmConfig as r, AppConfigInput as s, CacheBackend as t, ConstrainedApps as u, NormalizedAppConfig as v, isWorkspaceConfig as w, SharedConfig as x, NormalizedWorkspace as y };
6165
- //# sourceMappingURL=types-RhXmHR-e.d.cts.map
7963
+ export { TargetOptions as $, BackendFramework as A, ReleasedImage as At, isPhase2DeployTarget as B, SandboxExecOptions as Bt, SecretsConfig as C, DiscoverOptions as Ct, WorkspaceConfig as D, StateLocked as Dt, StageTelemetryConfig as E, LocalStateInCi as Et, SUPPORTED_DEPLOY_TARGETS as F, DeployIdentity as Ft, DeployPhaseContext as G, GkmError as Gt, validateWorkspaceConfig as H, SandboxResult as Ht, WorkspaceConfigSchema as I, deployIdentity as It, DeployTarget as J, DeployRuntime as K, formatValidationErrors as L, SECRETS_DIR_ENV as Lt, FrontendFramework as M, GithubActor as Mt, MobileFramework as N, LocalActor as Nt, WorkspaceInput as O, StateStore as Ot, PHASE_2_DEPLOY_TARGETS as P, StageSecrets as Pt, TargetEvent as Q, getDeployTargetError as R, Sandbox as Rt, OtlpTelemetryConfig as S, ConstructsNotSerializable as St, SharedConfig as T, isDeclarable as Tt, AnyDeployTarget as U, SecretNameInvalid as Ut, safeValidateWorkspaceConfig as V, SandboxOutput as Vt, DeployFailure as W, confineCwd as Wt, DeployTargetEntry as X, DeployTargetCapabilities as Y, DeployTargetLogger as Z, InferredWorkspaceConfig as _, StoredCredentialsOptions as _t, Routes as a, DeployPhase as at, NormalizedAppConfig as b, ProviderKind as bt, AppInput as c, AppDeployResult as ct, ConstrainedApps as d, Credential as dt, TargetOptionsIssue as et, DeployConfig as f, CredentialKind as ft, InferAppNames as g, MissingCredential as gt, DokployWorkspaceConfig as h, CredentialRequest as ht, OpenApiConfig as i, DeployEventType as it, Framework as j, Actor as jt, isWorkspaceConfig as k, StateVersionConflict as kt, AppsRecord as l, DeployResult as lt, DevConfig as m, CredentialProvider as mt, EmailBackend as n, DeployEvent as nt, AppConfig as o, ResourceChange as ot, DeployTargetName as p, CredentialKinds as pt, DeploySecrets as q, GkmConfig as r, DeployEventError as rt, AppConfigInput as s, ResourceVia as st, CacheBackend as t, TargetOptionsSchema as tt, ComposeWorkspaceConfig as u, AwsCredential as ut, LoadedConfig as v, chainCredentials as vt, SelfHostedTelemetryConfig as w, discover as wt, NormalizedWorkspace as x, ConstructDiscoveryFailed as xt, ModelsConfig as y, storedCredentials as yt, isDeployTargetSupported as z, SandboxCwdEscape as zt };
7964
+ //# sourceMappingURL=types-CvucX3yD.d.mts.map