@geekmidas/cli 10.0.0-alpha.160 → 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 (219) hide show
  1. package/dist/{GoDaddyProvider-DkUMcMYy.cjs → GoDaddyProvider-CBqsvbER.cjs} +2 -2
  2. package/dist/{GoDaddyProvider-DkUMcMYy.cjs.map → GoDaddyProvider-CBqsvbER.cjs.map} +1 -1
  3. package/dist/{GoDaddyProvider-C9dDlH9I.mjs → GoDaddyProvider-CwqdLM1E.mjs} +2 -2
  4. package/dist/{GoDaddyProvider-C9dDlH9I.mjs.map → GoDaddyProvider-CwqdLM1E.mjs.map} +1 -1
  5. package/dist/{HostingerProvider-9faYOQnQ.cjs → HostingerProvider-DtOtsFkM.cjs} +2 -2
  6. package/dist/{HostingerProvider-9faYOQnQ.cjs.map → HostingerProvider-DtOtsFkM.cjs.map} +1 -1
  7. package/dist/{HostingerProvider-BEuKG2gz.mjs → HostingerProvider-gD4uqzMN.mjs} +2 -2
  8. package/dist/{HostingerProvider-BEuKG2gz.mjs.map → HostingerProvider-gD4uqzMN.mjs.map} +1 -1
  9. package/dist/{LegacyStateStore-DPKhjUR6.mjs → LegacyStateStore-6xsGADme.mjs} +3 -3
  10. package/dist/{LegacyStateStore-DPKhjUR6.mjs.map → LegacyStateStore-6xsGADme.mjs.map} +1 -1
  11. package/dist/{LegacyStateStore-C44jUnMH.cjs → LegacyStateStore-C0rm5slD.cjs} +3 -3
  12. package/dist/{LegacyStateStore-C44jUnMH.cjs.map → LegacyStateStore-C0rm5slD.cjs.map} +1 -1
  13. package/dist/{LocalStateStore-BU3fWkcT.mjs → LocalStateStore-G0JHXOVW.mjs} +2 -2
  14. package/dist/{LocalStateStore-BU3fWkcT.mjs.map → LocalStateStore-G0JHXOVW.mjs.map} +1 -1
  15. package/dist/{LocalStateStore-B95WE99i.cjs → LocalStateStore-NBMF3zCb.cjs} +2 -2
  16. package/dist/{LocalStateStore-B95WE99i.cjs.map → LocalStateStore-NBMF3zCb.cjs.map} +1 -1
  17. package/dist/{S3StateStore-zU5kClhd.cjs → S3StateStore-7n6gIYEJ.cjs} +4 -4
  18. package/dist/{S3StateStore-zU5kClhd.cjs.map → S3StateStore-7n6gIYEJ.cjs.map} +1 -1
  19. package/dist/{S3StateStore-Cpbeijr5.mjs → S3StateStore-B7IPTvu0.mjs} +4 -4
  20. package/dist/{S3StateStore-Cpbeijr5.mjs.map → S3StateStore-B7IPTvu0.mjs.map} +1 -1
  21. package/dist/{SSMStateStore-BxkKMBi_.mjs → SSMStateStore-CWEShHLS.mjs} +2 -2
  22. package/dist/{SSMStateStore-BxkKMBi_.mjs.map → SSMStateStore-CWEShHLS.mjs.map} +1 -1
  23. package/dist/{SSMStateStore-D9uviQ3T.cjs → SSMStateStore-O12NeGEg.cjs} +2 -2
  24. package/dist/{SSMStateStore-D9uviQ3T.cjs.map → SSMStateStore-O12NeGEg.cjs.map} +1 -1
  25. package/dist/{add-Dj-gtqTO.mjs → add-C-nlqQgN.mjs} +4 -4
  26. package/dist/{add-Dj-gtqTO.mjs.map → add-C-nlqQgN.mjs.map} +1 -1
  27. package/dist/{add-Bb2IL3Yq.cjs → add-ktNZmJb-.cjs} +4 -4
  28. package/dist/{add-Bb2IL3Yq.cjs.map → add-ktNZmJb-.cjs.map} +1 -1
  29. package/dist/{apps-FRNlECwi.mjs → apps-C7SujLV-.mjs} +3 -3
  30. package/dist/{apps-FRNlECwi.mjs.map → apps-C7SujLV-.mjs.map} +1 -1
  31. package/dist/{apps-0vc4Oz9_.cjs → apps-CtjYJS9e.cjs} +3 -3
  32. package/dist/{apps-0vc4Oz9_.cjs.map → apps-CtjYJS9e.cjs.map} +1 -1
  33. package/dist/{aws-8QQ8n-t6.mjs → aws-C5LAU_Ii.mjs} +10 -2
  34. package/dist/aws-C5LAU_Ii.mjs.map +1 -0
  35. package/dist/{aws-DY9NqQIT.cjs → aws-DKC2m3sT.cjs} +9 -1
  36. package/dist/aws-DKC2m3sT.cjs.map +1 -0
  37. package/dist/{bundler-Bg2eEFEh.cjs → bundler-DGwgZmim.cjs} +6 -6
  38. package/dist/{bundler-Bg2eEFEh.cjs.map → bundler-DGwgZmim.cjs.map} +1 -1
  39. package/dist/{bundler-9EM4ZHcu.mjs → bundler-DnHKVaZz.mjs} +6 -6
  40. package/dist/{bundler-9EM4ZHcu.mjs.map → bundler-DnHKVaZz.mjs.map} +1 -1
  41. package/dist/{cli-CmoSOzNq.mjs → cli-CI9v138l.mjs} +4 -4
  42. package/dist/{cli-CmoSOzNq.mjs.map → cli-CI9v138l.mjs.map} +1 -1
  43. package/dist/{cli-YtLjcAZT.cjs → cli-k2G7rG15.cjs} +4 -4
  44. package/dist/{cli-YtLjcAZT.cjs.map → cli-k2G7rG15.cjs.map} +1 -1
  45. package/dist/{compose-CW1DGfYc.cjs → compose-BD2rwRfn.cjs} +4 -4
  46. package/dist/{compose-CW1DGfYc.cjs.map → compose-BD2rwRfn.cjs.map} +1 -1
  47. package/dist/{compose-3AtZF7ul.mjs → compose-Co-Dt-a4.mjs} +4 -4
  48. package/dist/{compose-3AtZF7ul.mjs.map → compose-Co-Dt-a4.mjs.map} +1 -1
  49. package/dist/{compose-D7gOSspy.cjs → compose-nGgRylPu.cjs} +16 -10
  50. package/dist/compose-nGgRylPu.cjs.map +1 -0
  51. package/dist/{compose-CnXZAYNM.mjs → compose-reJW9x-G.mjs} +16 -10
  52. package/dist/compose-reJW9x-G.mjs.map +1 -0
  53. package/dist/{config-CkuiD9Jv.d.cts → config-C60T2h98.d.cts} +3 -3
  54. package/dist/{config-BNmLn0dw.d.mts.map → config-C60T2h98.d.cts.map} +1 -1
  55. package/dist/{config-BNmLn0dw.d.mts → config-CfI2g_Ho.d.mts} +3 -3
  56. package/dist/{config-CkuiD9Jv.d.cts.map → config-CfI2g_Ho.d.mts.map} +1 -1
  57. package/dist/config.d.cts +3 -3
  58. package/dist/config.d.mts +3 -3
  59. package/dist/{credentials-CjFtNBVH.mjs → credentials-BG1KOq9I.mjs} +11 -7
  60. package/dist/credentials-BG1KOq9I.mjs.map +1 -0
  61. package/dist/{credentials-DwIRfeBL.cjs → credentials-UlL1n_Rd.cjs} +11 -7
  62. package/dist/credentials-UlL1n_Rd.cjs.map +1 -0
  63. package/dist/deploy/public.cjs +11 -11
  64. package/dist/deploy/public.d.cts +4 -4
  65. package/dist/deploy/public.d.mts +4 -4
  66. package/dist/deploy/public.mjs +11 -11
  67. package/dist/{deploy-3bsiWJxj.cjs → deploy-CqIULk0k.cjs} +57 -557
  68. package/dist/deploy-CqIULk0k.cjs.map +1 -0
  69. package/dist/{deploy-BI3fHnyb.mjs → deploy-DRkCNV7f.mjs} +16 -516
  70. package/dist/deploy-DRkCNV7f.mjs.map +1 -0
  71. package/dist/destroy-CMldkiX-.cjs +789 -0
  72. package/dist/destroy-CMldkiX-.cjs.map +1 -0
  73. package/dist/destroy-DXIAL8nF.mjs +788 -0
  74. package/dist/destroy-DXIAL8nF.mjs.map +1 -0
  75. package/dist/{docker-DPdn7tYJ.mjs → docker-DFFzQe2f.mjs} +4 -4
  76. package/dist/{docker-DPdn7tYJ.mjs.map → docker-DFFzQe2f.mjs.map} +1 -1
  77. package/dist/{docker-CwayjAF2.cjs → docker-LwJW3dx_.cjs} +4 -4
  78. package/dist/{docker-CwayjAF2.cjs.map → docker-LwJW3dx_.cjs.map} +1 -1
  79. package/dist/{dokploy-tmnH0Du_.mjs → dokploy-DYm0D6Tp.mjs} +2 -2
  80. package/dist/{dokploy-tmnH0Du_.mjs.map → dokploy-DYm0D6Tp.mjs.map} +1 -1
  81. package/dist/{dokploy-BMBL-_Xu.cjs → dokploy-wTsJqG-N.cjs} +2 -2
  82. package/dist/{dokploy-BMBL-_Xu.cjs.map → dokploy-wTsJqG-N.cjs.map} +1 -1
  83. package/dist/{eas-BVGQAUDc.mjs → eas-BJ_Zlvm8.mjs} +2 -2
  84. package/dist/{eas-BVGQAUDc.mjs.map → eas-BJ_Zlvm8.mjs.map} +1 -1
  85. package/dist/{eas-meN1xady.cjs → eas-C4EkjTGJ.cjs} +2 -2
  86. package/dist/{eas-meN1xady.cjs.map → eas-C4EkjTGJ.cjs.map} +1 -1
  87. package/dist/{encryption-DvFVZdGz.cjs → encryption-BQEqqrGq.cjs} +2 -2
  88. package/dist/{encryption-DvFVZdGz.cjs.map → encryption-BQEqqrGq.cjs.map} +1 -1
  89. package/dist/{encryption-C8AMbomA.mjs → encryption-Cu5YTs9V.mjs} +2 -2
  90. package/dist/{encryption-C8AMbomA.mjs.map → encryption-Cu5YTs9V.mjs.map} +1 -1
  91. package/dist/{engine-BmiIUVWa.cjs → engine-DdRauUQC.cjs} +9 -9
  92. package/dist/{engine-BmiIUVWa.cjs.map → engine-DdRauUQC.cjs.map} +1 -1
  93. package/dist/{engine-BbWj0w3F.mjs → engine-q8aCVbLH.mjs} +9 -9
  94. package/dist/{engine-BbWj0w3F.mjs.map → engine-q8aCVbLH.mjs.map} +1 -1
  95. package/dist/{github-Dc1daUbH.mjs → github-CoXirRes.mjs} +9 -8
  96. package/dist/{github-Dc1daUbH.mjs.map → github-CoXirRes.mjs.map} +1 -1
  97. package/dist/{github-BWqQr8q6.cjs → github-OVZF2k0L.cjs} +13 -12
  98. package/dist/{github-BWqQr8q6.cjs.map → github-OVZF2k0L.cjs.map} +1 -1
  99. package/dist/{googlePlay-CdVCdfU8.cjs → googlePlay-CUeTUT7s.cjs} +4 -4
  100. package/dist/{googlePlay-CdVCdfU8.cjs.map → googlePlay-CUeTUT7s.cjs.map} +1 -1
  101. package/dist/{googlePlay-ByaFUly7.mjs → googlePlay-HXRRVq0l.mjs} +4 -4
  102. package/dist/{googlePlay-ByaFUly7.mjs.map → googlePlay-HXRRVq0l.mjs.map} +1 -1
  103. package/dist/iam-6LH6wptf.cjs +618 -0
  104. package/dist/iam-6LH6wptf.cjs.map +1 -0
  105. package/dist/iam-c0e8m04X.mjs +509 -0
  106. package/dist/iam-c0e8m04X.mjs.map +1 -0
  107. package/dist/{index-Dv1Zj86i.d.mts → index-DDY0cZCo.d.cts} +2 -2
  108. package/dist/{index-B35vTdAW.d.cts.map → index-DDY0cZCo.d.cts.map} +1 -1
  109. package/dist/{index-B35vTdAW.d.cts → index-DWNwkcy7.d.mts} +2 -2
  110. package/dist/{index-Dv1Zj86i.d.mts.map → index-DWNwkcy7.d.mts.map} +1 -1
  111. package/dist/index.cjs +98 -77
  112. package/dist/index.cjs.map +1 -1
  113. package/dist/index.mjs +98 -77
  114. package/dist/index.mjs.map +1 -1
  115. package/dist/{local-CnVFHJjS.mjs → local-CCJ-T37d.mjs} +2 -2
  116. package/dist/{local-CnVFHJjS.mjs.map → local-CCJ-T37d.mjs.map} +1 -1
  117. package/dist/{local-qevrV6dZ.cjs → local-Dx0o6vfp.cjs} +2 -2
  118. package/dist/{local-qevrV6dZ.cjs.map → local-Dx0o6vfp.cjs.map} +1 -1
  119. package/dist/{migrate-DgfKZB41.mjs → migrate-BkwSXhxv.mjs} +4 -4
  120. package/dist/{migrate-DgfKZB41.mjs.map → migrate-BkwSXhxv.mjs.map} +1 -1
  121. package/dist/{migrate-CU8_ZWP1.cjs → migrate-CJoKOCGY.cjs} +4 -4
  122. package/dist/{migrate-CU8_ZWP1.cjs.map → migrate-CJoKOCGY.cjs.map} +1 -1
  123. package/dist/{migrate-CRRps1i6.cjs → migrate-DEsYfgzn.cjs} +4 -4
  124. package/dist/{migrate-CRRps1i6.cjs.map → migrate-DEsYfgzn.cjs.map} +1 -1
  125. package/dist/{migrate-BEuCcCwN.mjs → migrate-Dr0BeWsY.mjs} +4 -4
  126. package/dist/{migrate-BEuCcCwN.mjs.map → migrate-Dr0BeWsY.mjs.map} +1 -1
  127. package/dist/{notes-CIzrdBKE.mjs → notes-BOyzuPqr.mjs} +2 -2
  128. package/dist/{notes-CIzrdBKE.mjs.map → notes-BOyzuPqr.mjs.map} +1 -1
  129. package/dist/{notes-BrBnyZz5.cjs → notes-VFPa51Pd.cjs} +2 -2
  130. package/dist/{notes-BrBnyZz5.cjs.map → notes-VFPa51Pd.cjs.map} +1 -1
  131. package/dist/openapi.d.cts +1 -1
  132. package/dist/openapi.d.mts +1 -1
  133. package/dist/{projectBucket-CDJd3prK.mjs → projectBucket-B26ucBRI.mjs} +2 -2
  134. package/dist/{projectBucket-CDJd3prK.mjs.map → projectBucket-B26ucBRI.mjs.map} +1 -1
  135. package/dist/{projectBucket-CKr_zObJ.cjs → projectBucket-CWpY3Vxv.cjs} +2 -2
  136. package/dist/{projectBucket-CKr_zObJ.cjs.map → projectBucket-CWpY3Vxv.cjs.map} +1 -1
  137. package/dist/{publish-Bq96_QnK.mjs → publish-Bg4iffje.mjs} +2 -2
  138. package/dist/{publish-Bq96_QnK.mjs.map → publish-Bg4iffje.mjs.map} +1 -1
  139. package/dist/{publish-DMKXh1Tb.cjs → publish-IjcRoorJ.cjs} +2 -2
  140. package/dist/{publish-DMKXh1Tb.cjs.map → publish-IjcRoorJ.cjs.map} +1 -1
  141. package/dist/reconcile/public.d.cts +1 -1
  142. package/dist/reconcile/public.d.mts +1 -1
  143. package/dist/{resolve-DF9GrosZ.cjs → resolve-CgVDhWW8.cjs} +4 -4
  144. package/dist/{resolve-DF9GrosZ.cjs.map → resolve-CgVDhWW8.cjs.map} +1 -1
  145. package/dist/{resolve-CSsE7frp.mjs → resolve-rw7mLp5E.mjs} +4 -4
  146. package/dist/{resolve-CSsE7frp.mjs.map → resolve-rw7mLp5E.mjs.map} +1 -1
  147. package/dist/{rollback-CZthwqus.mjs → rollback-Cv02Cnky.mjs} +6 -6
  148. package/dist/{rollback-CZthwqus.mjs.map → rollback-Cv02Cnky.mjs.map} +1 -1
  149. package/dist/{rollback-BBFGGmMa.cjs → rollback-vdkPi_Rm.cjs} +6 -6
  150. package/dist/{rollback-BBFGGmMa.cjs.map → rollback-vdkPi_Rm.cjs.map} +1 -1
  151. package/dist/{runtime-CFvcLEJW.d.cts → runtime-D-rOcRoq.d.cts} +2 -2
  152. package/dist/{runtime-CFvcLEJW.d.cts.map → runtime-D-rOcRoq.d.cts.map} +1 -1
  153. package/dist/{runtime-dwsH6ddo.d.mts → runtime-DG1mNh_5.d.mts} +2 -2
  154. package/dist/{runtime-dwsH6ddo.d.mts.map → runtime-DG1mNh_5.d.mts.map} +1 -1
  155. package/dist/{s3-CI2QYgXH.cjs → s3-DIvAtJwk.cjs} +27 -2
  156. package/dist/s3-DIvAtJwk.cjs.map +1 -0
  157. package/dist/{s3-BBRkezf7.mjs → s3-DmsM_V2R.mjs} +28 -3
  158. package/dist/s3-DmsM_V2R.mjs.map +1 -0
  159. package/dist/{secretsManager-CQORubp9.mjs → secretsManager-CJyxFcBH.mjs} +18 -2
  160. package/dist/secretsManager-CJyxFcBH.mjs.map +1 -0
  161. package/dist/{secretsManager-RAGcEDX1.cjs → secretsManager-D8on44WI.cjs} +17 -1
  162. package/dist/secretsManager-D8on44WI.cjs.map +1 -0
  163. package/dist/{seeds-B3xvUAQf.cjs → seeds-D7q1zKCJ.cjs} +7 -1
  164. package/dist/{seeds-B3xvUAQf.cjs.map → seeds-D7q1zKCJ.cjs.map} +1 -1
  165. package/dist/{seeds-BCC8vAXR.mjs → seeds-y1rzXlAc.mjs} +2 -2
  166. package/dist/{seeds-BCC8vAXR.mjs.map → seeds-y1rzXlAc.mjs.map} +1 -1
  167. package/dist/{serverSetup-C4iAABtI.mjs → serverSetup-CvcN4zJQ.mjs} +6 -6
  168. package/dist/{serverSetup-C4iAABtI.mjs.map → serverSetup-CvcN4zJQ.mjs.map} +1 -1
  169. package/dist/{serverSetup-Dt2DTlwa.cjs → serverSetup-qXIRRhgw.cjs} +6 -6
  170. package/dist/{serverSetup-Dt2DTlwa.cjs.map → serverSetup-qXIRRhgw.cjs.map} +1 -1
  171. package/dist/{sniffer-bTrGuu9z.cjs → sniffer-CGfL25Bc.cjs} +7 -7
  172. package/dist/{sniffer-bTrGuu9z.cjs.map → sniffer-CGfL25Bc.cjs.map} +1 -1
  173. package/dist/{sniffer-C2Ot1IbK.mjs → sniffer-DuKVVAs_.mjs} +7 -7
  174. package/dist/{sniffer-C2Ot1IbK.mjs.map → sniffer-DuKVVAs_.mjs.map} +1 -1
  175. package/dist/{snsSubscriptions-CFKb7fv0.cjs → snsSubscriptions-DPfGjpuB.cjs} +8 -2
  176. package/dist/{snsSubscriptions-CFKb7fv0.cjs.map → snsSubscriptions-DPfGjpuB.cjs.map} +1 -1
  177. package/dist/{snsSubscriptions-QDDDn9Qi.mjs → snsSubscriptions-nnSUW2Eh.mjs} +3 -3
  178. package/dist/{snsSubscriptions-QDDDn9Qi.mjs.map → snsSubscriptions-nnSUW2Eh.mjs.map} +1 -1
  179. package/dist/{sst-DDRWlXdv.mjs → sst-Bw7686br.mjs} +4 -4
  180. package/dist/{sst-DDRWlXdv.mjs.map → sst-Bw7686br.mjs.map} +1 -1
  181. package/dist/{sst-iRdMlGKd.cjs → sst-Md7c1UC_.cjs} +4 -4
  182. package/dist/{sst-iRdMlGKd.cjs.map → sst-Md7c1UC_.cjs.map} +1 -1
  183. package/dist/{stack-CIOY44aC.mjs → stack-D2cLLaO-.mjs} +6 -6
  184. package/dist/{stack-CIOY44aC.mjs.map → stack-D2cLLaO-.mjs.map} +1 -1
  185. package/dist/{stack-B9iDYMrq.cjs → stack-DTcnynGb.cjs} +6 -6
  186. package/dist/{stack-B9iDYMrq.cjs.map → stack-DTcnynGb.cjs.map} +1 -1
  187. package/dist/{stage-DA74aD_V.mjs → stage-Bw3bJ7Au.mjs} +5 -5
  188. package/dist/{stage-DA74aD_V.mjs.map → stage-Bw3bJ7Au.mjs.map} +1 -1
  189. package/dist/{stage-ycFS9mVn.cjs → stage-RLOenlHV.cjs} +5 -5
  190. package/dist/{stage-ycFS9mVn.cjs.map → stage-RLOenlHV.cjs.map} +1 -1
  191. package/dist/target/public.cjs +1 -1
  192. package/dist/target/public.d.cts +2 -2
  193. package/dist/target/public.d.mts +2 -2
  194. package/dist/target/public.mjs +1 -1
  195. package/dist/{terminal-RxfbNUwl.cjs → terminal-C-_cMKTY.cjs} +2 -2
  196. package/dist/{terminal-RxfbNUwl.cjs.map → terminal-C-_cMKTY.cjs.map} +1 -1
  197. package/dist/{terminal-DX22WLvT.mjs → terminal-Dq29bK3u.mjs} +2 -2
  198. package/dist/{terminal-DX22WLvT.mjs.map → terminal-Dq29bK3u.mjs.map} +1 -1
  199. package/dist/{types-Dk--xVOT.d.cts → types-CvucX3yD.d.mts} +7 -2
  200. package/dist/types-CvucX3yD.d.mts.map +1 -0
  201. package/dist/{types-DwQYpd_0.d.mts → types-D1C8pUyh.d.cts} +8 -1
  202. package/dist/types-D1C8pUyh.d.cts.map +1 -0
  203. package/dist/workspace/index.d.cts +2 -2
  204. package/dist/workspace/index.d.mts +2 -2
  205. package/package.json +15 -15
  206. package/dist/aws-8QQ8n-t6.mjs.map +0 -1
  207. package/dist/aws-DY9NqQIT.cjs.map +0 -1
  208. package/dist/compose-CnXZAYNM.mjs.map +0 -1
  209. package/dist/compose-D7gOSspy.cjs.map +0 -1
  210. package/dist/credentials-CjFtNBVH.mjs.map +0 -1
  211. package/dist/credentials-DwIRfeBL.cjs.map +0 -1
  212. package/dist/deploy-3bsiWJxj.cjs.map +0 -1
  213. package/dist/deploy-BI3fHnyb.mjs.map +0 -1
  214. package/dist/s3-BBRkezf7.mjs.map +0 -1
  215. package/dist/s3-CI2QYgXH.cjs.map +0 -1
  216. package/dist/secretsManager-CQORubp9.mjs.map +0 -1
  217. package/dist/secretsManager-RAGcEDX1.cjs.map +0 -1
  218. package/dist/types-Dk--xVOT.d.cts.map +0 -1
  219. package/dist/types-DwQYpd_0.d.mts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iam-c0e8m04X.mjs","names":[],"sources":["../src/providers/s3/naming.ts","../src/providers/s3/policy.ts","../src/providers/iam.ts"],"sourcesContent":["/**\n * What the `s3` provider names a bucket and its IAM user.\n *\n * A bucket name is global across every AWS account, so the good name — the\n * one a person reading the console would guess — is tried first and a random\n * suffix is the fallback for a clash. Whatever name is created is recorded in\n * the stage's state and read back on every later run: a name is never\n * regenerated, because a new name is a new, empty bucket.\n */\n\nimport { randomInt } from 'node:crypto';\nimport { kebabCase } from '@geekmidas/manifest';\nimport { GkmError } from '../../errors';\n\n/** S3's limit on a bucket name. */\nexport const BUCKET_NAME_MAX = 63;\n/** IAM's limit on a user name. */\nexport const IAM_USER_NAME_MAX = 64;\n/** `-` and six characters: what a clash appends. */\nexport const SUFFIX_LENGTH = 7;\n/** How many suffixed names are tried after the good one. */\nexport const SUFFIX_ATTEMPTS = 5;\n\nconst SUFFIX_ALPHABET = 'abcdefghijklmnopqrstuvwxyz0123456789';\n\n/** A name that S3 would refuse — what the name builder never returns. */\nexport class InvalidBucketName extends GkmError {\n\tconstructor(\n\t\treadonly bucket: string,\n\t\treadonly reason: string,\n\t) {\n\t\tsuper(\n\t\t\t`'${bucket}' is not a valid S3 bucket name: ${reason}. Rename the ` +\n\t\t\t\t'construct or set deploy.namespace in gkm.config.ts to something ' +\n\t\t\t\t'that leaves room for it.',\n\t\t);\n\t\tthis.name = 'InvalidBucketName';\n\t}\n}\n\n/** Lowercase `[a-z0-9-]`, runs of anything else one `-`, no edge dashes. */\nfunction part(value: string): string {\n\treturn kebabCase(value)\n\t\t.toLowerCase()\n\t\t.replace(/[^a-z0-9]+/g, '-')\n\t\t.replace(/^-+|-+$/g, '');\n}\n\n/**\n * `parts` joined by `-`, shortened to `max` characters by trimming the longest\n * part one character at a time — so a long construct id gives way before a\n * short stage name does, and every part keeps its start.\n */\nexport function fitParts(parts: readonly string[], max: number): string {\n\tconst kept = parts.map(part).filter(Boolean);\n\tconst length = () =>\n\t\tkept.reduce((sum, p) => sum + p.length, 0) + kept.length - 1;\n\twhile (length() > max) {\n\t\tlet longest = 0;\n\t\tfor (let i = 1; i < kept.length; i++) {\n\t\t\tif (kept[i]!.length > kept[longest]!.length) longest = i;\n\t\t}\n\t\tif (kept[longest]!.length <= 1) break;\n\t\tkept[longest] = kept[longest]!.slice(0, -1).replace(/-+$/, '');\n\t}\n\treturn kept.join('-');\n}\n\n/** Why `name` is not a valid bucket name, or undefined when it is. */\nexport function bucketNameProblem(name: string): string | undefined {\n\tif (name.length < 3 || name.length > BUCKET_NAME_MAX) {\n\t\treturn `it is ${name.length} characters, and S3 takes 3 to ${BUCKET_NAME_MAX}`;\n\t}\n\tif (!/^[a-z0-9-]+$/.test(name)) {\n\t\treturn 'it may hold only lowercase letters, digits and -';\n\t}\n\tif (!/^[a-z0-9].*[a-z0-9]$/.test(name)) {\n\t\treturn 'it must start and end with a letter or a digit';\n\t}\n\tif (name.startsWith('xn--') || name.startsWith('sthree-')) {\n\t\treturn \"it starts with a prefix S3 reserves ('xn--', 'sthree-')\";\n\t}\n\tif (name.endsWith('-s3alias') || name.endsWith('--ol-s3')) {\n\t\treturn \"it ends with a suffix S3 reserves ('-s3alias', '--ol-s3')\";\n\t}\n\treturn undefined;\n}\n\n/** What a bucket is named from. */\nexport interface BucketNameInput {\n\t/** The deploy identity's scope: `<namespace>-<project>`, or the project. */\n\tscope: string;\n\tstage: string;\n\t/** The `ObjectStorage` construct's id. */\n\tid: string;\n}\n\n/**\n * The good name: `<namespace>-<project>-<stage>-<bucket id>`, lowercased, no\n * dots, shortened to leave room for a clash's suffix.\n *\n * @throws {InvalidBucketName} when nothing usable is left\n */\nexport function bucketName(input: BucketNameInput): string {\n\tconst name = fitParts(\n\t\t[input.scope, input.stage, input.id],\n\t\tBUCKET_NAME_MAX - SUFFIX_LENGTH,\n\t);\n\tconst problem = bucketNameProblem(name);\n\tif (problem) throw new InvalidBucketName(name, problem);\n\treturn name;\n}\n\n/** Six random `[a-z0-9]` characters. */\nexport function randomSuffix(random: (max: number) => number = randomInt) {\n\tlet suffix = '';\n\tfor (let i = 0; i < 6; i++) {\n\t\tsuffix += SUFFIX_ALPHABET[random(SUFFIX_ALPHABET.length)];\n\t}\n\treturn suffix;\n}\n\n/** The good name with a clash's suffix. */\nexport function suffixedBucketName(good: string, suffix: string): string {\n\treturn `${good}-${suffix}`;\n}\n\n/**\n * The IAM user a bucket is reached with on a stage:\n * `gkm-<project>-<stage>-<bucket id>`, at most 64 characters.\n */\nexport function iamUserName(input: BucketNameInput): string {\n\treturn fitParts(\n\t\t['gkm', input.scope, input.stage, input.id],\n\t\tIAM_USER_NAME_MAX,\n\t);\n}\n\n/** The path every user gkm creates is under, so it finds its own. */\nexport const IAM_USER_PATH = '/gkm/';\n\n/** The inline policy each user is given. */\nexport const IAM_POLICY_NAME = 'gkm-bucket';\n","/**\n * The documents the `s3` provider writes: the user's inline policy, the\n * bucket's policy, its CORS rule and its public access block.\n *\n * Pure, so each is tested as JSON and compared with what AWS holds on every\n * run — a document that differs is drift, and is put back.\n */\n\n/** One IAM or bucket policy statement. */\nexport interface PolicyStatement {\n\tSid: string;\n\tEffect: 'Allow' | 'Deny';\n\tPrincipal?: '*' | { AWS: string | string[] } | { Service: string };\n\tAction: string | string[];\n\tResource: string | string[];\n\tCondition?: Record<string, Record<string, string | string[]>>;\n}\n\nexport interface PolicyDocument {\n\tVersion: '2012-10-17';\n\tStatement: PolicyStatement[];\n}\n\nconst bucketArn = (bucket: string) => `arn:aws:s3:::${bucket}`;\n\n/**\n * What the app's key may do: objects in this bucket, and listing it — and\n * nothing else in the account.\n *\n * Multipart uploads are in it because a presigned upload of a large file is\n * one, and an abandoned one is cleaned up by the app. Reading old versions is\n * added only when the bucket keeps them.\n */\nexport function userPolicy(\n\tbucket: string,\n\toptions: {\n\t\tversioning?: boolean;\n\t\t/**\n\t\t * The bucket's events topic, when a subscriber watches it: the worker\n\t\t * confirms the subscriptions the deploy made with this key, and does\n\t\t * nothing else to the topic.\n\t\t */\n\t\teventsTopicArn?: string;\n\t} = {},\n): PolicyDocument {\n\treturn {\n\t\tVersion: '2012-10-17',\n\t\tStatement: [\n\t\t\t{\n\t\t\t\tSid: 'GkmObjects',\n\t\t\t\tEffect: 'Allow',\n\t\t\t\tAction: [\n\t\t\t\t\t's3:GetObject',\n\t\t\t\t\t's3:PutObject',\n\t\t\t\t\t's3:DeleteObject',\n\t\t\t\t\t's3:AbortMultipartUpload',\n\t\t\t\t\t's3:ListMultipartUploadParts',\n\t\t\t\t\t...(options.versioning ? ['s3:GetObjectVersion'] : []),\n\t\t\t\t],\n\t\t\t\tResource: `${bucketArn(bucket)}/*`,\n\t\t\t},\n\t\t\t{\n\t\t\t\tSid: 'GkmBucket',\n\t\t\t\tEffect: 'Allow',\n\t\t\t\tAction: [\n\t\t\t\t\t's3:ListBucket',\n\t\t\t\t\t's3:GetBucketLocation',\n\t\t\t\t\t's3:ListBucketMultipartUploads',\n\t\t\t\t],\n\t\t\t\tResource: bucketArn(bucket),\n\t\t\t},\n\t\t\t...(options.eventsTopicArn\n\t\t\t\t? [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSid: 'GkmEvents',\n\t\t\t\t\t\t\tEffect: 'Allow' as const,\n\t\t\t\t\t\t\tAction: 'sns:ConfirmSubscription',\n\t\t\t\t\t\t\tResource: options.eventsTopicArn,\n\t\t\t\t\t\t},\n\t\t\t\t\t]\n\t\t\t\t: []),\n\t\t],\n\t};\n}\n\n/**\n * One open pattern as the resource it is public on. A `**` is S3's `*`; a\n * single `*` is too, which crosses `/` where the construct's own check does\n * not — the construct is the stricter of the two (see `bucketPolicy` in\n * reconcile, which the local MinIO is given the same way).\n */\nexport function openResource(bucket: string, pattern: string): string {\n\tconst path = pattern.replace(/^\\/+/, '').replace(/\\*\\*/g, '*');\n\treturn `${bucketArn(bucket)}/${path}`;\n}\n\n/**\n * The bucket's own policy: every request refused unless it came over TLS,\n * and — only when a file server opens paths on it — `s3:GetObject` on\n * exactly those prefixes: to anyone, or, when a CDN serves them, to\n * CloudFront alone, for exactly the stage's distributions. Behind a CDN the\n * bucket is never public: a key outside the open prefixes is refused to\n * CloudFront too, so the edge answers it 403.\n */\nexport function bucketPolicy(\n\tbucket: string,\n\topen: readonly string[] = [],\n\toptions: {\n\t\tcdn?: { distributionArns: readonly string[] };\n\t\t/**\n\t\t * SES may write received mail under this prefix — the bucket an inbox\n\t\t * owns — and only for this account's receipt rules.\n\t\t */\n\t\tsesWrite?: { prefix: string; account: string };\n\t} = {},\n): PolicyDocument {\n\tconst statements: PolicyStatement[] = [\n\t\t{\n\t\t\tSid: 'GkmDenyInsecureTransport',\n\t\t\tEffect: 'Deny',\n\t\t\tPrincipal: '*',\n\t\t\tAction: 's3:*',\n\t\t\tResource: [bucketArn(bucket), `${bucketArn(bucket)}/*`],\n\t\t\tCondition: { Bool: { 'aws:SecureTransport': 'false' } },\n\t\t},\n\t];\n\tconst resources = [\n\t\t...new Set(open.map((p) => openResource(bucket, p))),\n\t].sort();\n\tif (open.length > 0 && options.cdn) {\n\t\tstatements.push({\n\t\t\tSid: 'GkmCdnRead',\n\t\t\tEffect: 'Allow',\n\t\t\tPrincipal: { Service: 'cloudfront.amazonaws.com' },\n\t\t\tAction: 's3:GetObject',\n\t\t\tResource: resources,\n\t\t\tCondition: {\n\t\t\t\tStringEquals: {\n\t\t\t\t\t'AWS:SourceArn': [...new Set(options.cdn.distributionArns)].sort(),\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t} else if (open.length > 0) {\n\t\tstatements.push({\n\t\t\tSid: 'GkmOpenPaths',\n\t\t\tEffect: 'Allow',\n\t\t\tPrincipal: '*',\n\t\t\tAction: 's3:GetObject',\n\t\t\tResource: resources,\n\t\t});\n\t}\n\tif (options.sesWrite) {\n\t\tstatements.push({\n\t\t\tSid: 'GkmSesWritesMail',\n\t\t\tEffect: 'Allow',\n\t\t\tPrincipal: { Service: 'ses.amazonaws.com' },\n\t\t\tAction: 's3:PutObject',\n\t\t\tResource: `${bucketArn(bucket)}/${options.sesWrite.prefix}*`,\n\t\t\tCondition: {\n\t\t\t\tStringEquals: { 'aws:SourceAccount': options.sesWrite.account },\n\t\t\t},\n\t\t});\n\t}\n\treturn { Version: '2012-10-17', Statement: statements };\n}\n\n/**\n * Block Public Access. All four flags on, unless the bucket has open paths:\n * then a *policy* may make it public (`BlockPublicPolicy`,\n * `RestrictPublicBuckets` off), and ACLs still may not.\n */\nexport function publicAccessBlock(open: boolean): {\n\tBlockPublicAcls: boolean;\n\tIgnorePublicAcls: boolean;\n\tBlockPublicPolicy: boolean;\n\tRestrictPublicBuckets: boolean;\n} {\n\treturn {\n\t\tBlockPublicAcls: true,\n\t\tIgnorePublicAcls: true,\n\t\tBlockPublicPolicy: !open,\n\t\tRestrictPublicBuckets: !open,\n\t};\n}\n\n/** The one CORS rule: browsers on the stage's sites upload and read. */\nexport interface CorsRule {\n\tAllowedMethods: string[];\n\tAllowedOrigins: string[];\n\tAllowedHeaders: string[];\n\tExposeHeaders: string[];\n\tMaxAgeSeconds: number;\n}\n\nexport function corsRule(origins: readonly string[]): CorsRule {\n\treturn {\n\t\tAllowedMethods: ['GET', 'HEAD', 'POST', 'PUT'],\n\t\tAllowedOrigins: [...new Set(origins)].sort(),\n\t\tAllowedHeaders: ['*'],\n\t\tExposeHeaders: ['ETag'],\n\t\tMaxAgeSeconds: 3000,\n\t};\n}\n\n/**\n * A policy document in one canonical form — keys sorted, a lone string a\n * one-element list, lists sorted — so one AWS reformatted reads as the same\n * document rather than as drift.\n */\nexport function canonicalPolicy(value: unknown): string {\n\treturn JSON.stringify(canonical(value));\n}\n\nfunction canonical(value: unknown, key?: string): unknown {\n\tif (Array.isArray(value)) {\n\t\tconst items = value.map((v) => canonical(v));\n\t\treturn key === 'Statement'\n\t\t\t? items\n\t\t\t: items.map((v) => JSON.stringify(v)).sort();\n\t}\n\tif (value && typeof value === 'object') {\n\t\treturn Object.fromEntries(\n\t\t\tObject.keys(value)\n\t\t\t\t.sort()\n\t\t\t\t.map((k) => {\n\t\t\t\t\tconst v = (value as Record<string, unknown>)[k];\n\t\t\t\t\tconst listy =\n\t\t\t\t\t\tk === 'Action' ||\n\t\t\t\t\t\tk === 'Resource' ||\n\t\t\t\t\t\tk === 'AWS' ||\n\t\t\t\t\t\tk === 'AWS:SourceArn'\n\t\t\t\t\t\t\t? Array.isArray(v)\n\t\t\t\t\t\t\t\t? v\n\t\t\t\t\t\t\t\t: [v]\n\t\t\t\t\t\t\t: v;\n\t\t\t\t\treturn [k, canonical(listy, k)];\n\t\t\t\t}),\n\t\t);\n\t}\n\treturn value;\n}\n","/**\n * An IAM user gkm creates for one thing on a stage, its inline policy, and\n * the access key written into the stage's secrets as an `s3://` URL — what\n * the `s3` provider gives each bucket, and the deploy gives a stage's\n * backups.\n *\n * - **The user** is under `/gkm/`, tagged with the deploy identity, the stage\n * and what it is for. One that exists without those tags is someone\n * else's, and is refused rather than taken over.\n * - **Its policy** is read on every run and put back when it drifted.\n * - **Its key**: one, written into the stage's secrets the moment IAM shows\n * its secret. `--rotate-keys` issues a successor and keeps the old one\n * active until the stage has deployed with the new one; the next run after\n * that — or `--retire-old-keys` — deletes it.\n * - **A new key** takes IAM seconds to become usable: the state records when\n * it was issued, and a check made with it waits that out\n * ({@link whileKeyIsNew}).\n */\n\nimport * as s3Url from '@geekmidas/storage/s3-url';\nimport type { ResourceRecord } from '../deploy/StateStore.js';\nimport {\n\tAccessKeyLimit,\n\tBucketKeySetElsewhere,\n\tIamUserNotOwned,\n\tRotationInProgress,\n} from './s3/errors.js';\nimport { IAM_USER_PATH } from './s3/naming.js';\nimport { canonicalPolicy } from './s3/policy.js';\nimport type { EnsureContext, ProviderConfig, StateEntry } from './types.js';\n\ntype IamModule = typeof import('@aws-sdk/client-iam');\n\n/** The tags gkm finds its own buckets and users by. */\nexport const TAG_PROJECT = 'gkm:project';\nexport const TAG_STAGE = 'gkm:stage';\nexport const TAG_CONSTRUCT = 'gkm:construct';\n\n/** What creating a user and its key is done through. */\nexport interface IamClients {\n\tIAM: IamModule;\n\tiam: InstanceType<IamModule['IAMClient']>;\n\t/** The region the key's URL names. */\n\tregion: string;\n\t/** An emulator's endpoint, written into the URL when there is one. */\n\tendpoint?: string;\n}\n\n/** What creating a user and its key reads from a provisioning run. */\nexport type KeyContext = Pick<\n\tEnsureContext<ProviderConfig, unknown>,\n\t| 'identity'\n\t| 'stage'\n\t| 'state'\n\t| 'change'\n\t| 'dryRun'\n\t| 'secrets'\n\t| 'writeSecrets'\n\t| 'rotateKeys'\n\t| 'retireOldKeys'\n\t| 'log'\n>;\n\n/** The keys gkm tags a bucket and a user with. */\nexport function identityTags(\n\tctx: Pick<KeyContext, 'identity' | 'stage'>,\n\tid: string,\n) {\n\treturn [\n\t\t{ Key: TAG_PROJECT, Value: ctx.identity.key },\n\t\t{ Key: TAG_STAGE, Value: ctx.stage },\n\t\t{ Key: TAG_CONSTRUCT, Value: id },\n\t];\n}\n\n/** A read whose \"there is none\" answer is one of `missing`. */\nasync function readOr<T>(\n\tread: () => Promise<T>,\n\tmissing: readonly string[],\n): Promise<T | undefined> {\n\ttry {\n\t\treturn await read();\n\t} catch (error) {\n\t\tconst e = error as { name?: string; Code?: string };\n\t\tif (missing.includes(e?.Code ?? e?.name ?? '')) return undefined;\n\t\tthrow error;\n\t}\n}\n\n/** IAM returns a policy document URL-encoded; an emulator may not. */\nfunction decodePolicy(document: string): string {\n\ttry {\n\t\treturn decodeURIComponent(document);\n\t} catch {\n\t\treturn document;\n\t}\n}\n\nexport interface IamUserInput {\n\t/** What it is for: a bucket construct's id, or `backups`. */\n\tid: string;\n\t/** `gkm-<project>-<stage>-<id>`. */\n\tuser: string;\n\t/** The inline policy's name. */\n\tpolicyName: string;\n\tpolicy: object;\n\t/** The policy's change line: `this bucket only`. */\n\tdescribe: string;\n}\n\n/**\n * The user and its inline policy: found — and refused when it is not this\n * stage's — or created, and the policy put back when it drifted.\n *\n * @throws {IamUserNotOwned}\n */\nexport async function ensureIamUser(\n\tctx: KeyContext,\n\tclients: IamClients,\n\tinput: IamUserInput,\n): Promise<{ user: string; exists: boolean }> {\n\tconst { IAM, iam } = clients;\n\tconst { id, user, policy } = input;\n\tconst entry: StateEntry = { key: `iam-user:${id}`, type: 'iam-user' };\n\tconst found = await readOr(\n\t\t() => iam.send(new IAM.GetUserCommand({ UserName: user })),\n\t\t['NoSuchEntity', 'NoSuchEntityException'],\n\t);\n\n\tif (found?.User) {\n\t\tconst tags = await iam.send(\n\t\t\tnew IAM.ListUserTagsCommand({ UserName: user }),\n\t\t);\n\t\tconst tag = (key: string) => tags.Tags?.find((t) => t.Key === key)?.Value;\n\t\tif (\n\t\t\tfound.User.Path !== IAM_USER_PATH ||\n\t\t\ttag(TAG_PROJECT) !== ctx.identity.key ||\n\t\t\ttag(TAG_STAGE) !== ctx.stage\n\t\t) {\n\t\t\tthrow new IamUserNotOwned(user, ctx.identity.key, ctx.stage);\n\t\t}\n\t\tawait ctx.state.ready(entry, user);\n\t} else {\n\t\tawait ctx.change(\n\t\t\t{\n\t\t\t\tconstruct: id,\n\t\t\t\tresource: `IAM user ${user}`,\n\t\t\t\tchange: `create under ${IAM_USER_PATH}`,\n\t\t\t},\n\t\t\tasync () => {\n\t\t\t\tawait ctx.state.pending(entry);\n\t\t\t\tawait iam.send(\n\t\t\t\t\tnew IAM.CreateUserCommand({\n\t\t\t\t\t\tUserName: user,\n\t\t\t\t\t\tPath: IAM_USER_PATH,\n\t\t\t\t\t\tTags: identityTags(ctx, id),\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t\tawait ctx.state.ready(entry, user);\n\t\t\t},\n\t\t);\n\t}\n\n\tconst exists = Boolean(found?.User) || !ctx.dryRun;\n\tconst current = exists\n\t\t? await readOr(\n\t\t\t\t() =>\n\t\t\t\t\tiam.send(\n\t\t\t\t\t\tnew IAM.GetUserPolicyCommand({\n\t\t\t\t\t\t\tUserName: user,\n\t\t\t\t\t\t\tPolicyName: input.policyName,\n\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t\t['NoSuchEntity', 'NoSuchEntityException'],\n\t\t\t)\n\t\t: undefined;\n\tconst document = current?.PolicyDocument\n\t\t? JSON.parse(decodePolicy(current.PolicyDocument))\n\t\t: undefined;\n\tif (!document || canonicalPolicy(document) !== canonicalPolicy(policy)) {\n\t\tawait ctx.change(\n\t\t\t{\n\t\t\t\tconstruct: id,\n\t\t\t\tresource: `IAM user ${user}`,\n\t\t\t\tchange: `policy ${input.policyName}: ${input.describe}`,\n\t\t\t},\n\t\t\tasync () => {\n\t\t\t\tawait iam.send(\n\t\t\t\t\tnew IAM.PutUserPolicyCommand({\n\t\t\t\t\t\tUserName: user,\n\t\t\t\t\t\tPolicyName: input.policyName,\n\t\t\t\t\t\tPolicyDocument: JSON.stringify(policy),\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t},\n\t\t);\n\t}\n\treturn { user, exists };\n}\n\nexport interface AccessKeyInput {\n\t/** What it is for, as {@link IamUserInput.id}. */\n\tid: string;\n\tuser: string;\n\t/** Whether the user exists yet — false in a dry run that would create it. */\n\texists: boolean;\n\t/** The bucket the URL addresses. */\n\tbucket: string;\n\t/** The secret the URL is written to: `UPLOADS_URL`, `BACKUPS_URL`. */\n\turlKey: string;\n}\n\n/**\n * The user's access key, in the stage's secrets as the bucket's URL.\n *\n * - First run: one key, written into the stage's secrets.\n * - `--rotate-keys`: a second key, written in place of the first; the first\n * stays active until the stage has deployed with the second, and the next\n * run after that deploy — or `--retire-old-keys` — deletes it.\n * - A key the secrets no longer hold (a store emptied by hand): replaced the\n * same way, since its secret cannot be read back.\n *\n * @throws {BucketKeySetElsewhere} when the secret names another bucket\n * @throws {RotationInProgress} on `--rotate-keys` with the last rotation's old key still active\n * @throws {AccessKeyLimit} when the user has two keys gkm did not record\n */\nexport async function ensureAccessKey(\n\tctx: KeyContext,\n\tclients: IamClients,\n\tinput: AccessKeyInput,\n): Promise<void> {\n\tconst { IAM, iam } = clients;\n\tconst { id, bucket, user, urlKey } = input;\n\tconst entryKey = `iam-access-key:${id}`;\n\tconst record = ctx.state.record(entryKey);\n\n\tconst given = ctx.secrets[urlKey];\n\tlet inUrl: string | undefined;\n\tlet parsed: s3Url.S3Address | undefined;\n\tif (given !== undefined) {\n\t\ttry {\n\t\t\tparsed = s3Url.parse(given);\n\t\t} catch {\n\t\t\tparsed = undefined;\n\t\t}\n\t\tif (parsed?.bucket !== bucket) {\n\t\t\tthrow new BucketKeySetElsewhere(\n\t\t\t\turlKey,\n\t\t\t\tbucket,\n\t\t\t\tparsed?.bucket ?? given.replace(/\\/\\/[^@]*@/, '//'),\n\t\t\t\tctx.stage,\n\t\t\t);\n\t\t}\n\t\tinUrl = parsed.accessKeyId;\n\t}\n\n\tconst listed = input.exists\n\t\t? ((\n\t\t\t\tawait iam.send(new IAM.ListAccessKeysCommand({ UserName: user }))\n\t\t\t).AccessKeyMetadata?.map((k) => k.AccessKeyId!) ?? [])\n\t\t: [];\n\n\tlet current = record?.status === 'ready' ? record.id : undefined;\n\tlet previous =\n\t\ttypeof record?.data?.previous === 'string'\n\t\t\t? record.data.previous\n\t\t\t: undefined;\n\tconst rotatedAt =\n\t\ttypeof record?.data?.rotatedAt === 'string'\n\t\t\t? record.data.rotatedAt\n\t\t\t: undefined;\n\tconst entry = (data: Record<string, unknown> = {}): StateEntry => ({\n\t\tkey: entryKey,\n\t\ttype: 'iam-access-key',\n\t\tdata: { user, ...data },\n\t});\n\n\t// The old key of a rotation: deleted once the stage deployed after it.\n\tif (previous && current) {\n\t\tconst deployed =\n\t\t\trotatedAt !== undefined &&\n\t\t\tctx.state.lastDeployedAt !== undefined &&\n\t\t\tctx.state.lastDeployedAt > rotatedAt;\n\t\tif (ctx.retireOldKeys || deployed) {\n\t\t\tconst old = previous;\n\t\t\tconst keep = current;\n\t\t\tawait ctx.change(\n\t\t\t\t{\n\t\t\t\t\tconstruct: id,\n\t\t\t\t\tresource: `IAM user ${user}`,\n\t\t\t\t\tchange: `delete the rotated-out access key ${old}`,\n\t\t\t\t},\n\t\t\t\tasync () => {\n\t\t\t\t\tif (listed.includes(old)) {\n\t\t\t\t\t\tawait iam.send(\n\t\t\t\t\t\t\tnew IAM.DeleteAccessKeyCommand({\n\t\t\t\t\t\t\t\tUserName: user,\n\t\t\t\t\t\t\t\tAccessKeyId: old,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tawait ctx.state.ready(entry(), keep);\n\t\t\t\t},\n\t\t\t);\n\t\t\tprevious = undefined;\n\t\t} else {\n\t\t\tctx.log(\n\t\t\t\t` ${id}: the old access key ${previous} stays active until '${ctx.stage}' is deployed with the new one; the next deploy after that deletes it (or pass --retire-old-keys)`,\n\t\t\t);\n\t\t}\n\t}\n\n\t// No record, and the secrets hold a key of this user's: adopt it.\n\tif (!current && inUrl && listed.includes(inUrl)) {\n\t\tawait ctx.state.ready(entry(), inUrl);\n\t\tcurrent = inUrl;\n\t}\n\n\tconst valid =\n\t\tcurrent !== undefined && listed.includes(current) && inUrl === current;\n\tif (valid && !ctx.rotateKeys) {\n\t\t// The key is good; the address must name where the bucket is.\n\t\tif (parsed && parsed.region !== clients.region) {\n\t\t\tconst address = parsed;\n\t\t\tawait ctx.change(\n\t\t\t\t{\n\t\t\t\t\tconstruct: id,\n\t\t\t\t\tresource: urlKey,\n\t\t\t\t\tchange: `name ${clients.region}, the bucket's region (it said ${address.region ?? 'none'})`,\n\t\t\t\t},\n\t\t\t\t() =>\n\t\t\t\t\tctx.writeSecrets({\n\t\t\t\t\t\t[urlKey]: s3Url.build({ ...address, region: clients.region }),\n\t\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t\treturn;\n\t}\n\tif (ctx.rotateKeys && previous) {\n\t\tthrow new RotationInProgress(id, previous, ctx.stage);\n\t}\n\n\tconst outgoing = current && listed.includes(current) ? current : undefined;\n\tif (listed.length >= 2) throw new AccessKeyLimit(user, listed);\n\n\tconst why = !current\n\t\t? 'create an access key'\n\t\t: ctx.rotateKeys\n\t\t\t? 'rotate: issue a new access key'\n\t\t\t: 'issue a new access key (the secrets no longer hold the recorded one)';\n\tawait ctx.change(\n\t\t{ construct: id, resource: `IAM user ${user}`, change: why },\n\t\tasync () => {\n\t\t\tawait ctx.state.pending(entry(outgoing ? { previous: outgoing } : {}));\n\t\t\tconst created = await iam.send(\n\t\t\t\tnew IAM.CreateAccessKeyCommand({ UserName: user }),\n\t\t\t);\n\t\t\tconst key = created.AccessKey!;\n\t\t\t// Into the stage's secrets before anything else: IAM shows a secret\n\t\t\t// once, and a key whose secret is lost is a key to replace.\n\t\t\tawait ctx.writeSecrets({\n\t\t\t\t[urlKey]: s3Url.build({\n\t\t\t\t\tbucket,\n\t\t\t\t\tregion: clients.region,\n\t\t\t\t\t...(clients.endpoint\n\t\t\t\t\t\t? { endpoint: clients.endpoint, forcePathStyle: true }\n\t\t\t\t\t\t: {}),\n\t\t\t\t\taccessKeyId: key.AccessKeyId!,\n\t\t\t\t\tsecretAccessKey: key.SecretAccessKey!,\n\t\t\t\t}),\n\t\t\t});\n\t\t\t// When it was issued: IAM takes seconds to make a new key usable,\n\t\t\t// and the deploy's check waits for one this young.\n\t\t\tconst issuedAt = new Date().toISOString();\n\t\t\tawait ctx.state.ready(\n\t\t\t\tentry(\n\t\t\t\t\toutgoing\n\t\t\t\t\t\t? { previous: outgoing, rotatedAt: issuedAt, issuedAt }\n\t\t\t\t\t\t: { issuedAt },\n\t\t\t\t),\n\t\t\t\tkey.AccessKeyId!,\n\t\t\t);\n\t\t},\n\t);\n\tif (outgoing) {\n\t\tctx.log(\n\t\t\t` ${urlKey} holds the new key. This deploy moves '${ctx.stage}' onto it; the next deploy after it deletes the old key ${outgoing}`,\n\t\t);\n\t}\n}\n\n/** How long a key issued this recently counts as new to IAM. */\nconst NEW_KEY_WINDOW_MS = 10 * 60 * 1000;\n\n/** The waits between asks while a new key becomes usable: about a minute. */\nlet newKeyWaits: readonly number[] = [2000, 4000, 8000, 15000, 15000, 15000];\n\n/** For tests: the waits for a new key. Returns the old ones. */\nexport function useNewKeyWaits(waits: readonly number[]): readonly number[] {\n\tconst previous = newKeyWaits;\n\tnewKeyWaits = waits;\n\treturn previous;\n}\n\n/**\n * When the key in a URL was issued, if the stage's state says it was just\n * now — the record of `id`'s key naming that very key.\n */\nexport function issuedJustNow(\n\tresources: Readonly<Record<string, ResourceRecord>> | undefined,\n\tid: string,\n\taccessKeyId: string,\n): string | undefined {\n\tconst record = resources?.[`iam-access-key:${id}`];\n\tconst issuedAt = record?.data?.issuedAt;\n\tif (record?.id !== accessKeyId || typeof issuedAt !== 'string') {\n\t\treturn undefined;\n\t}\n\tconst age = Date.now() - Date.parse(issuedAt);\n\treturn age >= 0 && age < NEW_KEY_WINDOW_MS ? issuedAt : undefined;\n}\n\n/**\n * `ask` again, for about a minute, while it is `refused` and the key was\n * issued just now — IAM refuses a key for seconds after making it. Returns\n * the last answer and how long was waited.\n */\nexport async function whileKeyIsNew<T>(\n\tfirst: T,\n\toptions: {\n\t\tissuedAt: string | undefined;\n\t\trefused: (answer: T) => boolean;\n\t\task: () => Promise<T>;\n\t\t/** Said once, before the first wait. */\n\t\tonWait?: () => void;\n\t},\n): Promise<{ answer: T; waited: number }> {\n\tlet answer = first;\n\tlet waited = 0;\n\tif (!options.issuedAt || !options.refused(answer)) return { answer, waited };\n\toptions.onWait?.();\n\tfor (const wait of newKeyWaits) {\n\t\tawait new Promise((resolve) => setTimeout(resolve, wait));\n\t\twaited += wait;\n\t\tanswer = await options.ask();\n\t\tif (!options.refused(answer)) break;\n\t}\n\treturn { answer, waited };\n}\n"],"mappings":";;;;;AAuBA,MAAM,kBAAkB;;AAGxB,IAAa,oBAAb,cAAuC,SAAS;CAErC;CACA;CAFV,YACC,QACA,QACC;EACD,MACC,IAAI,OAAO,mCAAmC,OAAO,sGAGtD;EAPS,KAAA,SAAA;EACA,KAAA,SAAA;EAOT,KAAK,OAAO;CACb;AACD;;AAGA,SAAS,KAAK,OAAuB;CACpC,OAAO,UAAU,KAAK,CAAC,CACrB,YAAY,CAAC,CACb,QAAQ,eAAe,GAAG,CAAC,CAC3B,QAAQ,YAAY,EAAE;AACzB;;;;;;AAOA,SAAgB,SAAS,OAA0B,KAAqB;CACvE,MAAM,OAAO,MAAM,IAAI,IAAI,CAAC,CAAC,OAAO,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C3B,IAAI,CAAC,QAAQ,QAAQ,MAAM,GAAG;CAC/B;CACA,OAAO;EAAE;EAAQ;CAAO;AACzB"}
@@ -1,4 +1,4 @@
1
- import { D as WorkspaceConfig, Gt as GkmError, O as WorkspaceInput, _ as InferredWorkspaceConfig, a as Routes, j as Framework, l as AppsRecord, r as GkmConfig, v as LoadedConfig, x as NormalizedWorkspace } from "./types-DwQYpd_0.mjs";
1
+ import { D as WorkspaceConfig, Gt as GkmError, O as WorkspaceInput, _ as InferredWorkspaceConfig, a as Routes, j as Framework, l as AppsRecord, r as GkmConfig, v as LoadedConfig, x as NormalizedWorkspace } from "./types-D1C8pUyh.cjs";
2
2
  //#region src/workspace/publicEnv.d.ts
3
3
  /**
4
4
  * All public env-var prefixes the toolbox understands.
@@ -187,4 +187,4 @@ declare function getEndpointForStage(dokployConfig: {
187
187
  } | undefined, stage: string): string | undefined;
188
188
  //#endregion
189
189
  export { PUBLIC_ENV_PREFIXES as _, allConstructGlobs as a, constructPatterns as c, getAppGkmConfig as d, getEndpointForStage as f, wrapSingleAppAsWorkspace as g, workspaceConstructGlobs as h, InvalidWorkspaceConfig as i, defineWorkspace as l, processConfig as m, DokployRegistryMoved as n, appConstructGlobs as o, normalizeWorkspace as p, DomainsMoved as r, assertNoMovedDeployKeys as s, DnsMoved as t, getAppBuildOrder as u, getPublicEnvPrefix as v, stripPublicPrefix as y };
190
- //# sourceMappingURL=index-Dv1Zj86i.d.mts.map
190
+ //# sourceMappingURL=index-DDY0cZCo.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-B35vTdAW.d.cts","names":[],"sources":["../src/workspace/publicEnv.ts","../src/workspace/index.ts"],"mappings":";;;;;;;;;cASa;;;;;;;;;;;;;;;iBAoBG,mBAAmB,YAAY;;;;;iBAoB/B,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCiFlB,sBACT,cAAc,kBACd,mCACL,QAAQ,eAAe,OAAO,aAAa,wBAAwB;;;;iBAiCrD,mBACf,QAAQ,iBACR,cACE;;;;;iBAqDa,yBACf,QAAQ,WACR,cACE;;;;;;;;;;;;cAgEU,6BAA6B;WACpB;EAArB,YAAqB;;;;;;;cAcT,qBAAqB;WACZ;EAArB,YAAqB;;;;;;cAaT,iBAAiB;WACR;EAArB,YAAqB;;;iBAcN,wBAAwB;iBAaxB,cACf,QAAQ,YAAY,iBACpB,cACE;;cAiCU,+BAA+B;EAC3C,YAAY;;;;;;;;iBAYG,wBACf,WAAW;;;;;;;;;;;;iBAkBI,kBACf,WAAW,qBACX;;;;;;;iBAsBe,kBAAkB,WAAW;;iBAa7B,kBAAkB,QAAQ;;;;;iBAS1B,gBACf,WAAW,qBACX,kBACE;;;;;iBAgCa,iBAAiB,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoD5B,oBACf;EACK;EAAmB,YAAY;eAEpC"}
1
+ {"version":3,"file":"index-DDY0cZCo.d.cts","names":[],"sources":["../src/workspace/publicEnv.ts","../src/workspace/index.ts"],"mappings":";;;;;;;;;cASa;;;;;;;;;;;;;;;iBAoBG,mBAAmB,YAAY;;;;;iBAoB/B,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCiFlB,sBACT,cAAc,kBACd,mCACL,QAAQ,eAAe,OAAO,aAAa,wBAAwB;;;;iBAiCrD,mBACf,QAAQ,iBACR,cACE;;;;;iBAqDa,yBACf,QAAQ,WACR,cACE;;;;;;;;;;;;cAgEU,6BAA6B;WACpB;EAArB,YAAqB;;;;;;;cAcT,qBAAqB;WACZ;EAArB,YAAqB;;;;;;cAaT,iBAAiB;WACR;EAArB,YAAqB;;;iBAcN,wBAAwB;iBAaxB,cACf,QAAQ,YAAY,iBACpB,cACE;;cAiCU,+BAA+B;EAC3C,YAAY;;;;;;;;iBAYG,wBACf,WAAW;;;;;;;;;;;;iBAkBI,kBACf,WAAW,qBACX;;;;;;;iBAsBe,kBAAkB,WAAW;;iBAa7B,kBAAkB,QAAQ;;;;;iBAS1B,gBACf,WAAW,qBACX,kBACE;;;;;iBAgCa,iBAAiB,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoD5B,oBACf;EACK;EAAmB,YAAY;eAEpC"}
@@ -1,4 +1,4 @@
1
- import { D as WorkspaceConfig, Gt as GkmError, O as WorkspaceInput, _ as InferredWorkspaceConfig, a as Routes, j as Framework, l as AppsRecord, r as GkmConfig, v as LoadedConfig, x as NormalizedWorkspace } from "./types-Dk--xVOT.cjs";
1
+ import { D as WorkspaceConfig, Gt as GkmError, O as WorkspaceInput, _ as InferredWorkspaceConfig, a as Routes, j as Framework, l as AppsRecord, r as GkmConfig, v as LoadedConfig, x as NormalizedWorkspace } from "./types-CvucX3yD.mjs";
2
2
  //#region src/workspace/publicEnv.d.ts
3
3
  /**
4
4
  * All public env-var prefixes the toolbox understands.
@@ -187,4 +187,4 @@ declare function getEndpointForStage(dokployConfig: {
187
187
  } | undefined, stage: string): string | undefined;
188
188
  //#endregion
189
189
  export { PUBLIC_ENV_PREFIXES as _, allConstructGlobs as a, constructPatterns as c, getAppGkmConfig as d, getEndpointForStage as f, wrapSingleAppAsWorkspace as g, workspaceConstructGlobs as h, InvalidWorkspaceConfig as i, defineWorkspace as l, processConfig as m, DokployRegistryMoved as n, appConstructGlobs as o, normalizeWorkspace as p, DomainsMoved as r, assertNoMovedDeployKeys as s, DnsMoved as t, getAppBuildOrder as u, getPublicEnvPrefix as v, stripPublicPrefix as y };
190
- //# sourceMappingURL=index-B35vTdAW.d.cts.map
190
+ //# sourceMappingURL=index-DWNwkcy7.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-Dv1Zj86i.d.mts","names":[],"sources":["../src/workspace/publicEnv.ts","../src/workspace/index.ts"],"mappings":";;;;;;;;;cASa;;;;;;;;;;;;;;;iBAoBG,mBAAmB,YAAY;;;;;iBAoB/B,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCiFlB,sBACT,cAAc,kBACd,mCACL,QAAQ,eAAe,OAAO,aAAa,wBAAwB;;;;iBAiCrD,mBACf,QAAQ,iBACR,cACE;;;;;iBAqDa,yBACf,QAAQ,WACR,cACE;;;;;;;;;;;;cAgEU,6BAA6B;WACpB;EAArB,YAAqB;;;;;;;cAcT,qBAAqB;WACZ;EAArB,YAAqB;;;;;;cAaT,iBAAiB;WACR;EAArB,YAAqB;;;iBAcN,wBAAwB;iBAaxB,cACf,QAAQ,YAAY,iBACpB,cACE;;cAiCU,+BAA+B;EAC3C,YAAY;;;;;;;;iBAYG,wBACf,WAAW;;;;;;;;;;;;iBAkBI,kBACf,WAAW,qBACX;;;;;;;iBAsBe,kBAAkB,WAAW;;iBAa7B,kBAAkB,QAAQ;;;;;iBAS1B,gBACf,WAAW,qBACX,kBACE;;;;;iBAgCa,iBAAiB,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoD5B,oBACf;EACK;EAAmB,YAAY;eAEpC"}
1
+ {"version":3,"file":"index-DWNwkcy7.d.mts","names":[],"sources":["../src/workspace/publicEnv.ts","../src/workspace/index.ts"],"mappings":";;;;;;;;;cASa;;;;;;;;;;;;;;;iBAoBG,mBAAmB,YAAY;;;;;iBAoB/B,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCiFlB,sBACT,cAAc,kBACd,mCACL,QAAQ,eAAe,OAAO,aAAa,wBAAwB;;;;iBAiCrD,mBACf,QAAQ,iBACR,cACE;;;;;iBAqDa,yBACf,QAAQ,WACR,cACE;;;;;;;;;;;;cAgEU,6BAA6B;WACpB;EAArB,YAAqB;;;;;;;cAcT,qBAAqB;WACZ;EAArB,YAAqB;;;;;;cAaT,iBAAiB;WACR;EAArB,YAAqB;;;iBAcN,wBAAwB;iBAaxB,cACf,QAAQ,YAAY,iBACpB,cACE;;cAiCU,+BAA+B;EAC3C,YAAY;;;;;;;;iBAYG,wBACf,WAAW;;;;;;;;;;;;iBAkBI,kBACf,WAAW,qBACX;;;;;;;iBAsBe,kBAAkB,WAAW;;iBAa7B,kBAAkB,QAAQ;;;;;iBAS1B,gBACf,WAAW,qBACX,kBACE;;;;;iBAgCa,iBAAiB,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoD5B,oBACf;EACK;EAAmB,YAAY;eAEpC"}
package/dist/index.cjs CHANGED
@@ -2,31 +2,31 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
4
4
  const require_errors = require("./errors-DMC4Umsb.cjs");
5
- const require_credentials = require("./credentials-DwIRfeBL.cjs");
6
- const require_compose = require("./compose-D7gOSspy.cjs");
5
+ const require_credentials = require("./credentials-UlL1n_Rd.cjs");
6
+ const require_compose = require("./compose-nGgRylPu.cjs");
7
7
  const require_workspace = require("./workspace-1szcahj9.cjs");
8
- const require_apps = require("./apps-0vc4Oz9_.cjs");
8
+ const require_apps = require("./apps-CtjYJS9e.cjs");
9
9
  const require_schemas = require("./schemas-BQ_v0lEX.cjs");
10
- const require_compose$1 = require("./compose-CW1DGfYc.cjs");
10
+ const require_compose$1 = require("./compose-BD2rwRfn.cjs");
11
11
  const require_SubscriberGenerator = require("./SubscriberGenerator-mZpSuSU7.cjs");
12
12
  const require_config = require("./config-B5Hi3mLK.cjs");
13
13
  const require_types = require("./types-Bl_CwZC9.cjs");
14
14
  const require_EndpointGenerator = require("./EndpointGenerator-DxrRqfJ3.cjs");
15
15
  const require_discover = require("./discover-CRywE7yc.cjs");
16
- const require_notes = require("./notes-BrBnyZz5.cjs");
17
- const require_stack = require("./stack-B9iDYMrq.cjs");
18
- const require_docker = require("./docker-CwayjAF2.cjs");
19
- const require_snsSubscriptions = require("./snsSubscriptions-CFKb7fv0.cjs");
16
+ const require_notes = require("./notes-VFPa51Pd.cjs");
17
+ const require_stack = require("./stack-DTcnynGb.cjs");
18
+ const require_docker = require("./docker-LwJW3dx_.cjs");
19
+ const require_snsSubscriptions = require("./snsSubscriptions-DPfGjpuB.cjs");
20
20
  const require_openapi = require("./openapi.cjs");
21
21
  const require_appPorts = require("./appPorts-IW-OZmRi.cjs");
22
22
  const require_drivers = require("./drivers-BhdC9Efj.cjs");
23
23
  const require_emit = require("./emit-DiW0kbue.cjs");
24
- const require_local = require("./local-qevrV6dZ.cjs");
25
- const require_sniffer = require("./sniffer-bTrGuu9z.cjs");
26
- const require_deploy = require("./deploy-3bsiWJxj.cjs");
27
- const require_seeds = require("./seeds-B3xvUAQf.cjs");
24
+ const require_local = require("./local-Dx0o6vfp.cjs");
25
+ const require_sniffer = require("./sniffer-CGfL25Bc.cjs");
26
+ const require_deploy = require("./deploy-CqIULk0k.cjs");
27
+ const require_seeds = require("./seeds-D7q1zKCJ.cjs");
28
28
  const require_credentialSchemas = require("./credentialSchemas-BAklWDna.cjs");
29
- const require_LocalStateStore = require("./LocalStateStore-B95WE99i.cjs");
29
+ const require_LocalStateStore = require("./LocalStateStore-NBMF3zCb.cjs");
30
30
  const require_utils = require("./utils-D2Nk1Nv2.cjs");
31
31
  const require_ready = require("./ready-eVMJIcWn.cjs");
32
32
  let node_path = require("node:path");
@@ -61,7 +61,7 @@ let crypto = require("crypto");
61
61
  crypto = require_rolldown_runtime.__toESM(crypto, 1);
62
62
  let _geekmidas_constructs_topic = require("@geekmidas/constructs/topic");
63
63
  //#region package.json
64
- var version = "10.0.0-alpha.160";
64
+ var version = "10.0.0-alpha.161";
65
65
  //#endregion
66
66
  //#region src/prompt.ts
67
67
  /**
@@ -144,7 +144,7 @@ const logger$8 = console;
144
144
  * Validate Dokploy token by making a test API call
145
145
  */
146
146
  async function validateDokployToken(endpoint, token) {
147
- const { DokployApi } = await Promise.resolve().then(() => require("./sniffer-bTrGuu9z.cjs")).then((n) => n.dokploy_api_exports);
147
+ const { DokployApi } = await Promise.resolve().then(() => require("./sniffer-CGfL25Bc.cjs")).then((n) => n.dokploy_api_exports);
148
148
  return new DokployApi({
149
149
  baseUrl: endpoint,
150
150
  token
@@ -2204,7 +2204,7 @@ async function execCommand(commandArgs, options = {}, stageDeps) {
2204
2204
  const cwd = options.cwd ?? process.cwd();
2205
2205
  if (!commandArgs[0]) throw new NoCommandSpecified();
2206
2206
  if (options.stage && !require_apps.isImageBuild()) {
2207
- const { execOnStage } = await Promise.resolve().then(() => require("./stage-ycFS9mVn.cjs")).then((n) => n.stage_exports);
2207
+ const { execOnStage } = await Promise.resolve().then(() => require("./stage-RLOenlHV.cjs")).then((n) => n.stage_exports);
2208
2208
  const { loadWorkspaceConfig } = await Promise.resolve().then(() => require("./config.cjs"));
2209
2209
  const { workspace } = await loadWorkspaceConfig(cwd);
2210
2210
  if (options.stage !== workspace.stages.local) {
@@ -2779,9 +2779,9 @@ async function workspaceDevCommand(configured, options) {
2779
2779
  for (const { id, port } of fakes) logger$5.log(`🎭 ${id} fake: http://localhost:${port}`);
2780
2780
  logger$5.log(options.migrate || options.seed ? "🗄️ Migrating the databases" : "🗄️ Checking for pending migrations");
2781
2781
  if (options.migrate || options.seed) {
2782
- const { prepareDevDatabases } = await Promise.resolve().then(() => require("./migrate-CRRps1i6.cjs"));
2782
+ const { prepareDevDatabases } = await Promise.resolve().then(() => require("./migrate-DEsYfgzn.cjs"));
2783
2783
  await prepareDevDatabases(workspace, secretsEnv, { seed: !!options.seed });
2784
- } else await Promise.resolve().then(() => require("./migrate-CRRps1i6.cjs")).then(({ reportPendingMigrations }) => reportPendingMigrations(workspace, reconciled.env)).catch((error) => {
2784
+ } else await Promise.resolve().then(() => require("./migrate-DEsYfgzn.cjs")).then(({ reportPendingMigrations }) => reportPendingMigrations(workspace, reconciled.env)).catch((error) => {
2785
2785
  logger$5.log(`⚠️ Could not check for pending migrations: ${error instanceof Error ? error.message : String(error)}`);
2786
2786
  });
2787
2787
  const appUrls = {};
@@ -3985,7 +3985,7 @@ async function buildApp(input) {
3985
3985
  ...telemetry ? { telemetry } : {},
3986
3986
  trustedOriginsKey: (0, _geekmidas_manifest.provideKey)(selfServing.id, "trustedOrigins")
3987
3987
  });
3988
- const { bundleServer } = await Promise.resolve().then(() => require("./bundler-Bg2eEFEh.cjs"));
3988
+ const { bundleServer } = await Promise.resolve().then(() => require("./bundler-DGwgZmim.cjs"));
3989
3989
  await bundleServer({
3990
3990
  entryPoint,
3991
3991
  outputDir: (0, node_path.join)(outputDir, "dist"),
@@ -4255,7 +4255,7 @@ async function buildWorkers(input) {
4255
4255
  });
4256
4256
  logger$4.log(`Generated worker ${worker.id}: ${crons.length} crons, ${queues.length} queues, ${subscribers.length} subscribers`);
4257
4257
  if (!input.bundle) continue;
4258
- const { bundleServer } = await Promise.resolve().then(() => require("./bundler-Bg2eEFEh.cjs"));
4258
+ const { bundleServer } = await Promise.resolve().then(() => require("./bundler-DGwgZmim.cjs"));
4259
4259
  const outfile = require_docker.workerBundleName(worker.id);
4260
4260
  await bundleServer({
4261
4261
  entryPoint,
@@ -4297,7 +4297,7 @@ async function buildProcessors(input) {
4297
4297
  for (const { key, construct } of processors) infos.push(await require_docker.processorInfo(key, construct, handler, context));
4298
4298
  logger$4.log(`Generated processors for ${fileServerId}: ${processors.map(({ key }) => key).join(", ")}`);
4299
4299
  if (!input.bundle) continue;
4300
- const { bundleServer } = await Promise.resolve().then(() => require("./bundler-Bg2eEFEh.cjs"));
4300
+ const { bundleServer } = await Promise.resolve().then(() => require("./bundler-DGwgZmim.cjs"));
4301
4301
  const outfile = require_docker.processorBundleName(fileServerId);
4302
4302
  await bundleServer({
4303
4303
  entryPoint,
@@ -4380,7 +4380,7 @@ async function buildForTarget(target, context, appRoot, workspaceRoot, endpointG
4380
4380
  let masterKey;
4381
4381
  if (context.production?.bundle && !skipBundle) {
4382
4382
  logger$4.log(`\n📦 Bundling production server...`);
4383
- const { bundleServer } = await Promise.resolve().then(() => require("./bundler-Bg2eEFEh.cjs"));
4383
+ const { bundleServer } = await Promise.resolve().then(() => require("./bundler-DGwgZmim.cjs"));
4384
4384
  const allConstructs = [
4385
4385
  ...endpoints.map((e) => e.construct),
4386
4386
  ...functions.map((f) => f.construct),
@@ -4626,12 +4626,47 @@ var ComposeModeConflict = class extends require_errors.GkmError {
4626
4626
  this.name = "ComposeModeConflict";
4627
4627
  }
4628
4628
  };
4629
+ /** `--secrets` asks what only `--destroy` does. */
4630
+ var ComposeSecretsNeedsDestroy = class extends require_errors.GkmError {
4631
+ constructor() {
4632
+ super("--secrets deletes the stage's secrets, which only --destroy does. Pass --destroy with it, or leave it off.");
4633
+ this.name = "ComposeSecretsNeedsDestroy";
4634
+ }
4635
+ };
4636
+ /** `--destroy` beside a switch for a deploy. */
4637
+ var ComposeDestroyConflict = class extends require_errors.GkmError {
4638
+ flag;
4639
+ constructor(flag) {
4640
+ super(`--destroy deletes the stage; ${flag} is for a deploy of it. Pass one of them.`);
4641
+ this.flag = flag;
4642
+ this.name = "ComposeDestroyConflict";
4643
+ }
4644
+ };
4629
4645
  /** Each pushed image as `<ref>@sha256:…`, by app. */
4630
4646
  function pushedDigests(run) {
4631
4647
  return Object.fromEntries(Object.entries(run.images).filter(([, image]) => image.digest).sort(([a], [b]) => a.localeCompare(b)).map(([app, image]) => [app, require_stack.pinnedRef(image.ref, image.digest)]));
4632
4648
  }
4633
4649
  /** `gkm compose`. */
4634
4650
  async function composeCommand(options, deps = {}) {
4651
+ if (options.secrets && !options.destroy) throw new ComposeSecretsNeedsDestroy();
4652
+ if (options.destroy) {
4653
+ const flag = [
4654
+ ["down", "--down"],
4655
+ ["build", "--build"],
4656
+ ["pull", "--pull"],
4657
+ ["push", "--push"],
4658
+ ["tag", "--tag"]
4659
+ ].find(([key]) => options[key] !== void 0 && options[key] !== false)?.[1];
4660
+ if (flag) throw new ComposeDestroyConflict(flag);
4661
+ const { composeDestroyCommand } = await Promise.resolve().then(() => require("./destroy-CMldkiX-.cjs"));
4662
+ await composeDestroyCommand({
4663
+ stage: options.stage,
4664
+ ...options.cwd ? { cwd: options.cwd } : {},
4665
+ ...options.secrets ? { secrets: true } : {},
4666
+ ...options.dryRun ? { dryRun: true } : {}
4667
+ });
4668
+ return;
4669
+ }
4635
4670
  if (options.build && options.pull) throw new ComposeModeConflict();
4636
4671
  if (options.push && !options.build) throw new require_compose.ComposePushNeedsBuild();
4637
4672
  const pulls = !options.build && (options.pull || options.tag !== void 0);
@@ -4641,22 +4676,8 @@ async function composeCommand(options, deps = {}) {
4641
4676
  const { workspace } = loaded;
4642
4677
  const { stage } = options;
4643
4678
  if (options.down) {
4644
- const local = stage === workspace.stages.local;
4645
- const server = local ? void 0 : require_compose.composeServer({
4646
- stage,
4647
- local,
4648
- config: workspace.deploy?.compose?.server,
4649
- custom: (await (await require_credentials.secretsStoreFor(workspace, stage)).read(stage))?.custom
4650
- });
4651
- const override = require_compose.stackOverrideFile(workspace.root, stage);
4652
- const dir = (0, node_path.join)(workspace.root, require_stack.stackDir(stage));
4653
- const ref = {
4654
- project: require_stack.composeProject(require_credentials.deployIdentity(workspace, stage)),
4655
- file: (0, node_path.join)(dir, "docker-compose.yml"),
4656
- ...(0, node_fs.existsSync)(override) ? { overrides: [override] } : {},
4657
- cwd: workspace.root,
4658
- ...server ? { host: require_compose.dockerHost(server) } : {}
4659
- };
4679
+ const { composeStackRef } = await Promise.resolve().then(() => require("./destroy-CMldkiX-.cjs"));
4680
+ const { ref, dir, server } = await composeStackRef(workspace, stage);
4660
4681
  const docker = deps.docker ?? require_compose.dockerCompose;
4661
4682
  if (server) console.log(`→ ${require_compose.sshTarget(server)} (docker over ssh)`);
4662
4683
  const edgeFile = (0, node_path.join)(dir, `${require_stack.EDGE_PROJECT}.yml`);
@@ -6236,25 +6257,25 @@ function loadPackageJson() {
6236
6257
  * Run: pnpm --filter @geekmidas/cli sync-versions
6237
6258
  */
6238
6259
  const GEEKMIDAS_VERSIONS = {
6239
- "@geekmidas/audit": ">=10.0.0-alpha.160 <10.0.0",
6240
- "@geekmidas/auth": ">=10.0.0-alpha.160 <10.0.0",
6241
- "@geekmidas/cache": ">=10.0.0-alpha.160 <10.0.0",
6242
- "@geekmidas/client": ">=10.0.0-alpha.160 <10.0.0",
6243
- "@geekmidas/cloud": ">=10.0.0-alpha.160 <10.0.0",
6244
- "@geekmidas/constructs": ">=10.0.0-alpha.160 <10.0.0",
6245
- "@geekmidas/db": ">=10.0.0-alpha.160 <10.0.0",
6246
- "@geekmidas/emailkit": ">=10.0.0-alpha.160 <10.0.0",
6247
- "@geekmidas/envkit": ">=10.0.0-alpha.160 <10.0.0",
6248
- "@geekmidas/errors": ">=10.0.0-alpha.160 <10.0.0",
6249
- "@geekmidas/events": ">=10.0.0-alpha.160 <10.0.0",
6250
- "@geekmidas/logger": ">=10.0.0-alpha.160 <10.0.0",
6251
- "@geekmidas/manifest": ">=10.0.0-alpha.160 <10.0.0",
6252
- "@geekmidas/rate-limit": ">=10.0.0-alpha.160 <10.0.0",
6253
- "@geekmidas/schema": ">=10.0.0-alpha.160 <10.0.0",
6254
- "@geekmidas/services": ">=10.0.0-alpha.160 <10.0.0",
6255
- "@geekmidas/storage": ">=10.0.0-alpha.160 <10.0.0",
6256
- "@geekmidas/telescope": ">=10.0.0-alpha.160 <10.0.0",
6257
- "@geekmidas/testkit": ">=10.0.0-alpha.160 <10.0.0",
6260
+ "@geekmidas/audit": ">=10.0.0-alpha.161 <10.0.0",
6261
+ "@geekmidas/auth": ">=10.0.0-alpha.161 <10.0.0",
6262
+ "@geekmidas/cache": ">=10.0.0-alpha.161 <10.0.0",
6263
+ "@geekmidas/client": ">=10.0.0-alpha.161 <10.0.0",
6264
+ "@geekmidas/cloud": ">=10.0.0-alpha.161 <10.0.0",
6265
+ "@geekmidas/constructs": ">=10.0.0-alpha.161 <10.0.0",
6266
+ "@geekmidas/db": ">=10.0.0-alpha.161 <10.0.0",
6267
+ "@geekmidas/emailkit": ">=10.0.0-alpha.161 <10.0.0",
6268
+ "@geekmidas/envkit": ">=10.0.0-alpha.161 <10.0.0",
6269
+ "@geekmidas/errors": ">=10.0.0-alpha.161 <10.0.0",
6270
+ "@geekmidas/events": ">=10.0.0-alpha.161 <10.0.0",
6271
+ "@geekmidas/logger": ">=10.0.0-alpha.161 <10.0.0",
6272
+ "@geekmidas/manifest": ">=10.0.0-alpha.161 <10.0.0",
6273
+ "@geekmidas/rate-limit": ">=10.0.0-alpha.161 <10.0.0",
6274
+ "@geekmidas/schema": ">=10.0.0-alpha.161 <10.0.0",
6275
+ "@geekmidas/services": ">=10.0.0-alpha.161 <10.0.0",
6276
+ "@geekmidas/storage": ">=10.0.0-alpha.161 <10.0.0",
6277
+ "@geekmidas/telescope": ">=10.0.0-alpha.161 <10.0.0",
6278
+ "@geekmidas/testkit": ">=10.0.0-alpha.161 <10.0.0",
6258
6279
  "@geekmidas/cli": versionRange(loadPackageJson().version)
6259
6280
  };
6260
6281
  //#endregion
@@ -7447,7 +7468,7 @@ const COMMIT = /^[0-9a-f]{40}$/;
7447
7468
  * The `uses:` value for the stages action, with a comment saying which CLI
7448
7469
  * release the pinned commit is.
7449
7470
  */
7450
- function stagesActionUses(commit = "2198d2c3e2fcb3fff461353d99ef804afbf6906d", version = cliVersion()) {
7471
+ function stagesActionUses(commit = "ef37dbf89540bfc0a7e3abb3fb26483270bb8c74", version = cliVersion()) {
7451
7472
  return commit && COMMIT.test(commit) ? `${STAGES_ACTION}@${commit} # @geekmidas/cli ${version}` : `${STAGES_ACTION}@main # pin to a commit SHA: see the action's README`;
7452
7473
  }
7453
7474
  //#endregion
@@ -16419,7 +16440,7 @@ function testDatabases(reconciled) {
16419
16440
  * starts without the reference data the app needs.
16420
16441
  */
16421
16442
  async function migrateTestStage(workspace, env) {
16422
- const { migrateAndSeed } = await Promise.resolve().then(() => require("./migrate-CRRps1i6.cjs"));
16443
+ const { migrateAndSeed } = await Promise.resolve().then(() => require("./migrate-DEsYfgzn.cjs"));
16423
16444
  const { discover } = await Promise.resolve().then(() => require("./discover-CRywE7yc.cjs")).then((n) => n.discover_exports);
16424
16445
  const sources = {};
16425
16446
  const manifest = await discover({
@@ -16872,7 +16893,7 @@ program.command("eas:sync").description("Set up a mobile app's EAS project for a
16872
16893
  try {
16873
16894
  const globalOptions = program.opts();
16874
16895
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
16875
- const { easSync } = await Promise.resolve().then(() => require("./eas-meN1xady.cjs"));
16896
+ const { easSync } = await Promise.resolve().then(() => require("./eas-C4EkjTGJ.cjs"));
16876
16897
  await easSync(options);
16877
16898
  } catch (error) {
16878
16899
  exitWithError(error);
@@ -16882,7 +16903,7 @@ program.command("publish").description("Ship a mobile app for a deployed stage:
16882
16903
  try {
16883
16904
  const globalOptions = program.opts();
16884
16905
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
16885
- const { publish, PublishModeConflict } = await Promise.resolve().then(() => require("./publish-DMKXh1Tb.cjs"));
16906
+ const { publish, PublishModeConflict } = await Promise.resolve().then(() => require("./publish-IjcRoorJ.cjs"));
16886
16907
  if (options.build && options.update) throw new PublishModeConflict();
16887
16908
  const { build, update, ...rest } = options;
16888
16909
  await publish({
@@ -16898,7 +16919,7 @@ program.command("deploy:google-play").description("Let EAS Submit publish a mobi
16898
16919
  try {
16899
16920
  const globalOptions = program.opts();
16900
16921
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
16901
- const { deployGooglePlay } = await Promise.resolve().then(() => require("./googlePlay-CdVCdfU8.cjs"));
16922
+ const { deployGooglePlay } = await Promise.resolve().then(() => require("./googlePlay-CUeTUT7s.cjs"));
16902
16923
  await deployGooglePlay(options);
16903
16924
  } catch (error) {
16904
16925
  exitWithError(error);
@@ -16920,7 +16941,7 @@ program.command("migrate").description("Apply each database construct's migratio
16920
16941
  try {
16921
16942
  const globalOptions = program.opts();
16922
16943
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
16923
- const { migrateCommand } = await Promise.resolve().then(() => require("./migrate-CRRps1i6.cjs"));
16944
+ const { migrateCommand } = await Promise.resolve().then(() => require("./migrate-DEsYfgzn.cjs"));
16924
16945
  await migrateCommand({
16925
16946
  ...options,
16926
16947
  ...construct ? { construct } : {}
@@ -16933,7 +16954,7 @@ program.command("seed").description("Migrate, then run each database construct's
16933
16954
  try {
16934
16955
  const globalOptions = program.opts();
16935
16956
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
16936
- const { seedCommand } = await Promise.resolve().then(() => require("./migrate-CRRps1i6.cjs"));
16957
+ const { seedCommand } = await Promise.resolve().then(() => require("./migrate-DEsYfgzn.cjs"));
16937
16958
  await seedCommand({
16938
16959
  ...options,
16939
16960
  ...construct ? { construct } : {}
@@ -16946,7 +16967,7 @@ program.command("migration").description("Write a construct's next migration: an
16946
16967
  try {
16947
16968
  const globalOptions = program.opts();
16948
16969
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
16949
- const { migrationCommand } = await Promise.resolve().then(() => require("./migrate-CRRps1i6.cjs"));
16970
+ const { migrationCommand } = await Promise.resolve().then(() => require("./migrate-DEsYfgzn.cjs"));
16950
16971
  await migrationCommand({
16951
16972
  construct,
16952
16973
  ...name ? { name } : {}
@@ -16992,7 +17013,7 @@ program.command("docker").description("Generate Docker deployment files").option
16992
17013
  exitWithError(error);
16993
17014
  }
16994
17015
  });
16995
- program.command("compose").description("Run the workspace's APIs and sites for a stage as one Docker Compose stack behind Caddy").requiredOption("--stage <stage>", "Stage to run — always named, so a stack is never a deployed stage by accident").option("--tag <tag>", "Run the images CI pushed at this tag (sites: <tag>-<stage>); nothing is built").option("--build", "Build images from this checkout, tagged with the commit").option("--pull", "Pull images (at --tag, or latest) rather than build them").option("--push", "With --build: push every image to deploy.registry and start nothing (for CI)").option("--digests-file <path>", "With --push: write each image as <ref>@sha256:… (JSON). With --tag: run the images at those digests").option("--dry-run", "Write the files and print the plan; start nothing").option("--down", "Stop the stage's stack (its volumes are kept)").option("--allow-dev-services", "Deployed stage: run the dev service (MinIO, Mailpit) for every bucket and mail the stage doesn't account for. Not production-grade").option("--skip-dns", "Deployed stage: neither write the public hosts' DNS records nor check they point at GKM_SERVER_IPV4 (a CDN or proxy in front, or records written elsewhere)").option("--rotate-keys", "Deployed stage: each provider issues its runtime keys a successor (the old one is deleted by the next deploy)").option("--retire-old-keys", "Deployed stage: delete a rotated-out key now instead of on the next deploy").action(async (options) => {
17016
+ program.command("compose").description("Run the workspace's APIs and sites for a stage as one Docker Compose stack behind Caddy").requiredOption("--stage <stage>", "Stage to run — always named, so a stack is never a deployed stage by accident").option("--tag <tag>", "Run the images CI pushed at this tag (sites: <tag>-<stage>); nothing is built").option("--build", "Build images from this checkout, tagged with the commit").option("--pull", "Pull images (at --tag, or latest) rather than build them").option("--push", "With --build: push every image to deploy.registry and start nothing (for CI)").option("--digests-file <path>", "With --push: write each image as <ref>@sha256:… (JSON). With --tag: run the images at those digests").option("--dry-run", "Write the files and print the plan; start nothing").option("--down", "Stop the stage's stack (its volumes are kept)").option("--destroy", "Delete everything the stage's deploys made: its stack and volumes, and the AWS resources and DNS records gkm made. Asks you to type the project's name; no flag skips it").option("--secrets", "With --destroy: delete the stage's secrets too (kept otherwise)").option("--allow-dev-services", "Deployed stage: run the dev service (MinIO, Mailpit) for every bucket and mail the stage doesn't account for. Not production-grade").option("--skip-dns", "Deployed stage: neither write the public hosts' DNS records nor check they point at GKM_SERVER_IPV4 (a CDN or proxy in front, or records written elsewhere)").option("--rotate-keys", "Deployed stage: each provider issues its runtime keys a successor (the old one is deleted by the next deploy)").option("--retire-old-keys", "Deployed stage: delete a rotated-out key now instead of on the next deploy").action(async (options) => {
16996
17017
  try {
16997
17018
  const globalOptions = program.opts();
16998
17019
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
@@ -17046,7 +17067,7 @@ program.command("secrets:add").description("Build the keys a stage must be given
17046
17067
  try {
17047
17068
  const globalOptions = program.opts();
17048
17069
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
17049
- const { secretsAddCommand } = await Promise.resolve().then(() => require("./add-Bb2IL3Yq.cjs"));
17070
+ const { secretsAddCommand } = await Promise.resolve().then(() => require("./add-ktNZmJb-.cjs"));
17050
17071
  await secretsAddCommand(options);
17051
17072
  } catch (error) {
17052
17073
  exitWithError(error);
@@ -17056,7 +17077,7 @@ program.command("encryption:rotate").description("Add a new current key to an En
17056
17077
  try {
17057
17078
  const globalOptions = program.opts();
17058
17079
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
17059
- const { encryptionRotateCommand } = await Promise.resolve().then(() => require("./encryption-DvFVZdGz.cjs"));
17080
+ const { encryptionRotateCommand } = await Promise.resolve().then(() => require("./encryption-BQEqqrGq.cjs"));
17060
17081
  await encryptionRotateCommand(construct, options);
17061
17082
  } catch (error) {
17062
17083
  exitWithError(error);
@@ -17066,7 +17087,7 @@ program.command("encryption:retire").description("Remove an old key from an Encr
17066
17087
  try {
17067
17088
  const globalOptions = program.opts();
17068
17089
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
17069
- const { encryptionRetireCommand } = await Promise.resolve().then(() => require("./encryption-DvFVZdGz.cjs"));
17090
+ const { encryptionRetireCommand } = await Promise.resolve().then(() => require("./encryption-BQEqqrGq.cjs"));
17070
17091
  await encryptionRetireCommand(construct, key, options);
17071
17092
  } catch (error) {
17072
17093
  exitWithError(error);
@@ -17105,7 +17126,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
17105
17126
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
17106
17127
  const { loadWorkspaceConfig } = await Promise.resolve().then(() => require("./config.cjs"));
17107
17128
  const { reconcileMissingSecrets } = await Promise.resolve().then(() => require("./reconcile-CuCQBa5-.cjs"));
17108
- const { secretsStoreFor } = await Promise.resolve().then(() => require("./credentials-DwIRfeBL.cjs")).then((n) => n.store_exports);
17129
+ const { secretsStoreFor } = await Promise.resolve().then(() => require("./credentials-UlL1n_Rd.cjs")).then((n) => n.store_exports);
17109
17130
  const { workspace } = await loadWorkspaceConfig();
17110
17131
  const stage = options.stage ?? workspace.stages.local;
17111
17132
  const store = await secretsStoreFor(workspace, stage);
@@ -17114,7 +17135,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
17114
17135
  console.error(`No secrets found for stage "${stage}". Run "gkm secrets:init --stage ${stage}" first.`);
17115
17136
  process.exit(1);
17116
17137
  }
17117
- const { derivedContainers } = await Promise.resolve().then(() => require("./apps-0vc4Oz9_.cjs")).then((n) => n.workspace_exports);
17138
+ const { derivedContainers } = await Promise.resolve().then(() => require("./apps-CtjYJS9e.cjs")).then((n) => n.workspace_exports);
17118
17139
  const result = reconcileMissingSecrets(secrets, workspace, await derivedContainers(workspace, stage));
17119
17140
  if (!result) {
17120
17141
  console.log(`\n✓ Secrets for stage "${stage}" are up-to-date`);
@@ -17131,14 +17152,14 @@ program.command("secrets:migrate").description("Copy a deployed stage's secrets
17131
17152
  try {
17132
17153
  const globalOptions = program.opts();
17133
17154
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
17134
- const { secretsMigrateCommand } = await Promise.resolve().then(() => require("./migrate-CU8_ZWP1.cjs"));
17155
+ const { secretsMigrateCommand } = await Promise.resolve().then(() => require("./migrate-CJoKOCGY.cjs"));
17135
17156
  await secretsMigrateCommand(options);
17136
17157
  } catch (error) {
17137
17158
  exitWithError(error);
17138
17159
  }
17139
17160
  });
17140
17161
  program.command("deploy").description("Deploy a stage through its target").option("--target <name>", "Deploy target: dokploy, compose, sst, or one named in deploy.targets (default: deploy.default)").option("--provider <provider>", "[DEPRECATED] Use --target instead").requiredOption("--stage <stage>", "Deployment stage (e.g., production, staging)").option("--tag <tag>", "Image tag (default: stage-timestamp; compose: the commit). Compose pulls a given tag").option("--skip-push", "Skip pushing image to registry").option("--skip-build", "Skip build step (use existing build)").option("--json", "Write events as JSON lines instead of progress; never prompts").option("--dry-run", "Show what would be created or reused; change, build and push nothing").option("--atomic", "If the release fails, roll back every app it released, not only the failed ones").option("--allow-dev-services", "Server targets: run the dev service (MinIO, Mailpit) for every bucket and mail the stage doesn't account for. Not production-grade").option("--skip-dns", "Compose: neither write the public hosts' DNS records nor check they point at GKM_SERVER_IPV4 (a CDN or proxy in front, or records written elsewhere)").option("--rotate-keys", "Deployed stage: each provider issues its runtime keys a successor (the old one is deleted by the next deploy)").option("--retire-old-keys", "Deployed stage: delete a rotated-out key now instead of on the next deploy").action(async (options) => {
17141
- const { deployCli } = await Promise.resolve().then(() => require("./cli-YtLjcAZT.cjs"));
17162
+ const { deployCli } = await Promise.resolve().then(() => require("./cli-k2G7rG15.cjs"));
17142
17163
  const globalOptions = program.opts();
17143
17164
  const code = await deployCli({
17144
17165
  cwd: (0, node_path.resolve)(globalOptions.cwd ?? process.cwd()),
@@ -17158,8 +17179,8 @@ program.command("deploy").description("Deploy a stage through its target").optio
17158
17179
  });
17159
17180
  program.command("deploy:rollback").description("Put a stage's app back on its previous release (Dokploy): one app with --app, every app with --atomic").requiredOption("--stage <stage>", "A deployed stage").option("--app <app>", "The app to roll back").option("--atomic", "Roll back every app that has an earlier release").action(async (options) => {
17160
17181
  try {
17161
- const { rollbackStage } = await Promise.resolve().then(() => require("./rollback-BBFGGmMa.cjs")).then((n) => n.rollback_exports);
17162
- const { terminalCredentials } = await Promise.resolve().then(() => require("./terminal-RxfbNUwl.cjs"));
17182
+ const { rollbackStage } = await Promise.resolve().then(() => require("./rollback-vdkPi_Rm.cjs")).then((n) => n.rollback_exports);
17183
+ const { terminalCredentials } = await Promise.resolve().then(() => require("./terminal-C-_cMKTY.cjs"));
17163
17184
  const globalOptions = program.opts();
17164
17185
  await rollbackStage({
17165
17186
  cwd: (0, node_path.resolve)(globalOptions.cwd ?? process.cwd()),
@@ -17177,7 +17198,7 @@ program.command("compose:server").description("Set up a stage's server for compo
17177
17198
  try {
17178
17199
  const globalOptions = program.opts();
17179
17200
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
17180
- const { composeServerCommand } = await Promise.resolve().then(() => require("./serverSetup-Dt2DTlwa.cjs"));
17201
+ const { composeServerCommand } = await Promise.resolve().then(() => require("./serverSetup-qXIRRhgw.cjs"));
17181
17202
  await composeServerCommand(options);
17182
17203
  } catch (error) {
17183
17204
  exitWithError(error);
@@ -17202,7 +17223,7 @@ program.command("deploy:github").description("Let GitHub Actions deploy a stage:
17202
17223
  try {
17203
17224
  const globalOptions = program.opts();
17204
17225
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
17205
- const { deployGithubCommand } = await Promise.resolve().then(() => require("./github-BWqQr8q6.cjs"));
17226
+ const { deployGithubCommand } = await Promise.resolve().then(() => require("./github-OVZF2k0L.cjs"));
17206
17227
  await deployGithubCommand(options);
17207
17228
  } catch (error) {
17208
17229
  exitWithError(error);