@geekmidas/cli 10.0.0-alpha.189 → 10.0.0-alpha.190

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 (209) hide show
  1. package/dist/{LegacyStateStore-BI0-sXct.mjs → LegacyStateStore-CWiswz6T.mjs} +2 -2
  2. package/dist/{LegacyStateStore-BI0-sXct.mjs.map → LegacyStateStore-CWiswz6T.mjs.map} +1 -1
  3. package/dist/{LegacyStateStore-DSl-Kjhn.cjs → LegacyStateStore-CuSe37fl.cjs} +2 -2
  4. package/dist/{LegacyStateStore-DSl-Kjhn.cjs.map → LegacyStateStore-CuSe37fl.cjs.map} +1 -1
  5. package/dist/{LocalStateStore-DlXihNk5.cjs → LocalStateStore-BciJ_DF0.cjs} +2 -2
  6. package/dist/{LocalStateStore-DlXihNk5.cjs.map → LocalStateStore-BciJ_DF0.cjs.map} +1 -1
  7. package/dist/{LocalStateStore-CKoytnSh.mjs → LocalStateStore-CLHasLJI.mjs} +2 -2
  8. package/dist/{LocalStateStore-CKoytnSh.mjs.map → LocalStateStore-CLHasLJI.mjs.map} +1 -1
  9. package/dist/{S3StateStore-DAQh1WJ_.cjs → S3StateStore-BHLRjoj3.cjs} +4 -4
  10. package/dist/{S3StateStore-DAQh1WJ_.cjs.map → S3StateStore-BHLRjoj3.cjs.map} +1 -1
  11. package/dist/{S3StateStore-BWiLJgjA.mjs → S3StateStore-CTiv2_ON.mjs} +4 -4
  12. package/dist/{S3StateStore-BWiLJgjA.mjs.map → S3StateStore-CTiv2_ON.mjs.map} +1 -1
  13. package/dist/{SSMStateStore-CwpsKiqW.cjs → SSMStateStore-BqT3MXXb.cjs} +2 -2
  14. package/dist/{SSMStateStore-CwpsKiqW.cjs.map → SSMStateStore-BqT3MXXb.cjs.map} +1 -1
  15. package/dist/{SSMStateStore-Dtjc3Tcy.mjs → SSMStateStore-D6qqaem2.mjs} +2 -2
  16. package/dist/{SSMStateStore-Dtjc3Tcy.mjs.map → SSMStateStore-D6qqaem2.mjs.map} +1 -1
  17. package/dist/{add-DgoqWfHX.cjs → add-B2OmIQzs.cjs} +4 -4
  18. package/dist/{add-DgoqWfHX.cjs.map → add-B2OmIQzs.cjs.map} +1 -1
  19. package/dist/{add-CgR8OZmf.mjs → add-CXwL549o.mjs} +4 -4
  20. package/dist/{add-CgR8OZmf.mjs.map → add-CXwL549o.mjs.map} +1 -1
  21. package/dist/{bundler-B0GTqknw.mjs → bundler-CHXyJFsS.mjs} +6 -6
  22. package/dist/{bundler-B0GTqknw.mjs.map → bundler-CHXyJFsS.mjs.map} +1 -1
  23. package/dist/{bundler-ZNjpx5xS.cjs → bundler-CLoVtcBi.cjs} +6 -6
  24. package/dist/{bundler-ZNjpx5xS.cjs.map → bundler-CLoVtcBi.cjs.map} +1 -1
  25. package/dist/{cli-bjBjd1zg.mjs → cli-Bjua3PaZ.mjs} +4 -4
  26. package/dist/{cli-bjBjd1zg.mjs.map → cli-Bjua3PaZ.mjs.map} +1 -1
  27. package/dist/{cli-DqEhTw8n.cjs → cli-DiuUr1Am.cjs} +4 -4
  28. package/dist/{cli-DqEhTw8n.cjs.map → cli-DiuUr1Am.cjs.map} +1 -1
  29. package/dist/{clientTelemetry-C3GsvvLK.d.cts → clientTelemetry-DXuYNH-J.d.cts} +2 -2
  30. package/dist/clientTelemetry-DXuYNH-J.d.cts.map +1 -0
  31. package/dist/{clientTelemetry-Dcp0jgkV.d.mts → clientTelemetry-eC8VQ6nB.d.mts} +2 -2
  32. package/dist/clientTelemetry-eC8VQ6nB.d.mts.map +1 -0
  33. package/dist/{compose-BE2Fi1Bs.mjs → compose-DUOETDhc.mjs} +225 -17
  34. package/dist/compose-DUOETDhc.mjs.map +1 -0
  35. package/dist/{compose-QHm47c8E.cjs → compose-gnNrY3NQ.cjs} +226 -17
  36. package/dist/compose-gnNrY3NQ.cjs.map +1 -0
  37. package/dist/{config-CDulXPTe.d.mts → config-1zirYXeO.d.mts} +3 -3
  38. package/dist/{config-B_pfl-ZN.d.cts.map → config-1zirYXeO.d.mts.map} +1 -1
  39. package/dist/{config-B_pfl-ZN.d.cts → config-rSlB-bXj.d.cts} +3 -3
  40. package/dist/{config-CDulXPTe.d.mts.map → config-rSlB-bXj.d.cts.map} +1 -1
  41. package/dist/config.cjs +1 -1
  42. package/dist/config.d.cts +3 -3
  43. package/dist/config.d.mts +3 -3
  44. package/dist/config.mjs +1 -1
  45. package/dist/{credentials-No8csre7.cjs → credentials-BI52H1ad.cjs} +5 -5
  46. package/dist/{credentials-No8csre7.cjs.map → credentials-BI52H1ad.cjs.map} +1 -1
  47. package/dist/{credentials--QL1R8mL.cjs → credentials-Cp09PIsc.cjs} +4 -4
  48. package/dist/{credentials--QL1R8mL.cjs.map → credentials-Cp09PIsc.cjs.map} +1 -1
  49. package/dist/{credentials-CRgp0huX.mjs → credentials-DbjLhvix.mjs} +4 -4
  50. package/dist/{credentials-CRgp0huX.mjs.map → credentials-DbjLhvix.mjs.map} +1 -1
  51. package/dist/{credentials-0Kmo6GAw.mjs → credentials-VLP_959f.mjs} +5 -5
  52. package/dist/{credentials-0Kmo6GAw.mjs.map → credentials-VLP_959f.mjs.map} +1 -1
  53. package/dist/{dbTunnel-DOiMt-yL.mjs → dbTunnel-CLsqWr7o.mjs} +5 -5
  54. package/dist/{dbTunnel-DOiMt-yL.mjs.map → dbTunnel-CLsqWr7o.mjs.map} +1 -1
  55. package/dist/{dbTunnel-CEHBYvbM.cjs → dbTunnel-DQcdaaLi.cjs} +5 -5
  56. package/dist/{dbTunnel-CEHBYvbM.cjs.map → dbTunnel-DQcdaaLi.cjs.map} +1 -1
  57. package/dist/deploy/public.cjs +10 -10
  58. package/dist/deploy/public.d.cts +5 -5
  59. package/dist/deploy/public.d.mts +5 -5
  60. package/dist/deploy/public.mjs +10 -10
  61. package/dist/{deploy-KdBFBME1.mjs → deploy-DhIy2Ftj.mjs} +17 -12
  62. package/dist/deploy-DhIy2Ftj.mjs.map +1 -0
  63. package/dist/{deploy-Pkvk9jIL.cjs → deploy-DpQ_4Pu1.cjs} +17 -12
  64. package/dist/deploy-DpQ_4Pu1.cjs.map +1 -0
  65. package/dist/{destroy-oqNna46x.cjs → destroy-DmTDT6V7.cjs} +9 -9
  66. package/dist/{destroy-oqNna46x.cjs.map → destroy-DmTDT6V7.cjs.map} +1 -1
  67. package/dist/{destroy-CFc0rdP4.mjs → destroy-wV9yNLQV.mjs} +9 -9
  68. package/dist/{destroy-CFc0rdP4.mjs.map → destroy-wV9yNLQV.mjs.map} +1 -1
  69. package/dist/{dokploy-CxEzce91.cjs → dokploy-B61ww4Yb.cjs} +2 -2
  70. package/dist/{dokploy-CxEzce91.cjs.map → dokploy-B61ww4Yb.cjs.map} +1 -1
  71. package/dist/{dokploy-BkwTpeNU.mjs → dokploy-Jhl3sPd4.mjs} +2 -2
  72. package/dist/{dokploy-BkwTpeNU.mjs.map → dokploy-Jhl3sPd4.mjs.map} +1 -1
  73. package/dist/{eas-vzSPhv0B.mjs → eas-BmvO40xS.mjs} +3 -3
  74. package/dist/{eas-vzSPhv0B.mjs.map → eas-BmvO40xS.mjs.map} +1 -1
  75. package/dist/{eas-DbDHF2WZ.cjs → eas-X09Gz8_E.cjs} +3 -3
  76. package/dist/{eas-DbDHF2WZ.cjs.map → eas-X09Gz8_E.cjs.map} +1 -1
  77. package/dist/{encryption-4xb0WByC.cjs → encryption-BBIUewnL.cjs} +3 -3
  78. package/dist/{encryption-4xb0WByC.cjs.map → encryption-BBIUewnL.cjs.map} +1 -1
  79. package/dist/{encryption-BJirKe8H.mjs → encryption-BOmswIgE.mjs} +3 -3
  80. package/dist/{encryption-BJirKe8H.mjs.map → encryption-BOmswIgE.mjs.map} +1 -1
  81. package/dist/{engine-C-tyF0OQ.cjs → engine-BhjhShKf.cjs} +7 -7
  82. package/dist/{engine-C-tyF0OQ.cjs.map → engine-BhjhShKf.cjs.map} +1 -1
  83. package/dist/{engine-Blw0271a.mjs → engine-DW2H3KNa.mjs} +7 -7
  84. package/dist/{engine-Blw0271a.mjs.map → engine-DW2H3KNa.mjs.map} +1 -1
  85. package/dist/{github-C_h3NRr7.mjs → github-Ptbigbrq.mjs} +7 -7
  86. package/dist/{github-C_h3NRr7.mjs.map → github-Ptbigbrq.mjs.map} +1 -1
  87. package/dist/{github-Aydv6vu5.cjs → github-xUtu4Ur7.cjs} +7 -7
  88. package/dist/{github-Aydv6vu5.cjs.map → github-xUtu4Ur7.cjs.map} +1 -1
  89. package/dist/{googlePlay-DpJTysGZ.cjs → googlePlay-B4xhz5xT.cjs} +4 -4
  90. package/dist/{googlePlay-DpJTysGZ.cjs.map → googlePlay-B4xhz5xT.cjs.map} +1 -1
  91. package/dist/{googlePlay-B7AYn6Pc.mjs → googlePlay-C9rrwN5b.mjs} +4 -4
  92. package/dist/{googlePlay-B7AYn6Pc.mjs.map → googlePlay-C9rrwN5b.mjs.map} +1 -1
  93. package/dist/{iam-DlPqLzjO.cjs → iam-D7mXd6by.cjs} +2 -2
  94. package/dist/{iam-DlPqLzjO.cjs.map → iam-D7mXd6by.cjs.map} +1 -1
  95. package/dist/{iam-CE1QQeEQ.mjs → iam-DNlbVN_l.mjs} +2 -2
  96. package/dist/{iam-CE1QQeEQ.mjs.map → iam-DNlbVN_l.mjs.map} +1 -1
  97. package/dist/{index-CBl51bCQ.d.cts → index-B1gfXH5K.d.mts} +2 -2
  98. package/dist/{index-CBl51bCQ.d.cts.map → index-B1gfXH5K.d.mts.map} +1 -1
  99. package/dist/{index-Dqp1lLjF.d.mts → index-CunkOPOu.d.cts} +2 -2
  100. package/dist/{index-Dqp1lLjF.d.mts.map → index-CunkOPOu.d.cts.map} +1 -1
  101. package/dist/index.cjs +60 -60
  102. package/dist/index.cjs.map +1 -1
  103. package/dist/index.mjs +60 -60
  104. package/dist/index.mjs.map +1 -1
  105. package/dist/{local-ZaXGH2eP.mjs → local-CvC-z86k.mjs} +2 -2
  106. package/dist/{local-ZaXGH2eP.mjs.map → local-CvC-z86k.mjs.map} +1 -1
  107. package/dist/{local-BEM8UVsa.cjs → local-DAJrhvSC.cjs} +2 -2
  108. package/dist/{local-BEM8UVsa.cjs.map → local-DAJrhvSC.cjs.map} +1 -1
  109. package/dist/{migrate-DTMYWQn6.cjs → migrate-0-A4BOcd.cjs} +5 -5
  110. package/dist/{migrate-DTMYWQn6.cjs.map → migrate-0-A4BOcd.cjs.map} +1 -1
  111. package/dist/{migrate-CkeIl9YW.mjs → migrate-C_36JSwV.mjs} +3 -3
  112. package/dist/{migrate-CkeIl9YW.mjs.map → migrate-C_36JSwV.mjs.map} +1 -1
  113. package/dist/{migrate-BuReWK8R.mjs → migrate-DHbXzZIJ.mjs} +5 -5
  114. package/dist/{migrate-BuReWK8R.mjs.map → migrate-DHbXzZIJ.mjs.map} +1 -1
  115. package/dist/{migrate-Cq4s3V1M.cjs → migrate-fGWfv2DV.cjs} +3 -3
  116. package/dist/{migrate-Cq4s3V1M.cjs.map → migrate-fGWfv2DV.cjs.map} +1 -1
  117. package/dist/openapi.cjs +1 -1
  118. package/dist/openapi.d.cts +2 -2
  119. package/dist/openapi.d.mts +2 -2
  120. package/dist/openapi.mjs +1 -1
  121. package/dist/{projectBucket-CBzCpLML.cjs → projectBucket-BAoFOQtA.cjs} +2 -2
  122. package/dist/{projectBucket-CBzCpLML.cjs.map → projectBucket-BAoFOQtA.cjs.map} +1 -1
  123. package/dist/{projectBucket-BaZfu9b6.mjs → projectBucket-Dxub09V1.mjs} +2 -2
  124. package/dist/{projectBucket-BaZfu9b6.mjs.map → projectBucket-Dxub09V1.mjs.map} +1 -1
  125. package/dist/{publish-CLYnKn-k.cjs → publish-BX8_zXaf.cjs} +2 -2
  126. package/dist/{publish-CLYnKn-k.cjs.map → publish-BX8_zXaf.cjs.map} +1 -1
  127. package/dist/{publish-UxavszCu.mjs → publish-DE_yBzlz.mjs} +2 -2
  128. package/dist/{publish-UxavszCu.mjs.map → publish-DE_yBzlz.mjs.map} +1 -1
  129. package/dist/reconcile/public.d.cts +1 -1
  130. package/dist/reconcile/public.d.mts +1 -1
  131. package/dist/{resolve-CeeNr_ex.cjs → resolve-CPB2jkB4.cjs} +4 -4
  132. package/dist/{resolve-CeeNr_ex.cjs.map → resolve-CPB2jkB4.cjs.map} +1 -1
  133. package/dist/{resolve-Bk9a9BVj.mjs → resolve-DCPtP7-X.mjs} +4 -4
  134. package/dist/{resolve-Bk9a9BVj.mjs.map → resolve-DCPtP7-X.mjs.map} +1 -1
  135. package/dist/{rollback-DyMVhn7L.mjs → rollback-sefKrjlE.mjs} +7 -7
  136. package/dist/{rollback-DyMVhn7L.mjs.map → rollback-sefKrjlE.mjs.map} +1 -1
  137. package/dist/{rollback-D6AdPlie.cjs → rollback-ygh2qRWo.cjs} +7 -7
  138. package/dist/{rollback-D6AdPlie.cjs.map → rollback-ygh2qRWo.cjs.map} +1 -1
  139. package/dist/{runtime-DFG1CAWA.d.mts → runtime-BwiWhqkI.d.cts} +2 -2
  140. package/dist/{runtime-DFG1CAWA.d.mts.map → runtime-BwiWhqkI.d.cts.map} +1 -1
  141. package/dist/{runtime-DjhB4Oxn.d.cts → runtime-Dx5F8-IL.d.mts} +2 -2
  142. package/dist/{runtime-DjhB4Oxn.d.cts.map → runtime-Dx5F8-IL.d.mts.map} +1 -1
  143. package/dist/{s3-FbPmbPft.cjs → s3-Bcvbg8io.cjs} +3 -3
  144. package/dist/{s3-FbPmbPft.cjs.map → s3-Bcvbg8io.cjs.map} +1 -1
  145. package/dist/{s3-B9UimcQe.mjs → s3-DK1ofU4f.mjs} +3 -3
  146. package/dist/{s3-B9UimcQe.mjs.map → s3-DK1ofU4f.mjs.map} +1 -1
  147. package/dist/{serverSetup-CeFkPTVz.cjs → serverSetup-ClU2iSeU.cjs} +7 -7
  148. package/dist/{serverSetup-CeFkPTVz.cjs.map → serverSetup-ClU2iSeU.cjs.map} +1 -1
  149. package/dist/{serverSetup-BH7_Zt0N.mjs → serverSetup-D68Otrp0.mjs} +7 -7
  150. package/dist/{serverSetup-BH7_Zt0N.mjs.map → serverSetup-D68Otrp0.mjs.map} +1 -1
  151. package/dist/{sniffer-B83jVMSA.cjs → sniffer-CFOmQQit.cjs} +7 -7
  152. package/dist/{sniffer-B83jVMSA.cjs.map → sniffer-CFOmQQit.cjs.map} +1 -1
  153. package/dist/{sniffer-8TlRbqb0.mjs → sniffer-CRF3eD_B.mjs} +7 -7
  154. package/dist/{sniffer-8TlRbqb0.mjs.map → sniffer-CRF3eD_B.mjs.map} +1 -1
  155. package/dist/{snsSubscriptions-BQcD_3UK.mjs → snsSubscriptions-CwA6Ceg2.mjs} +21 -12
  156. package/dist/snsSubscriptions-CwA6Ceg2.mjs.map +1 -0
  157. package/dist/{snsSubscriptions-B7uEpoJ2.cjs → snsSubscriptions-S_CMCXqI.cjs} +21 -12
  158. package/dist/snsSubscriptions-S_CMCXqI.cjs.map +1 -0
  159. package/dist/{sst-D0t-8yEl.cjs → sst-BgG7dJJu.cjs} +6 -6
  160. package/dist/{sst-D0t-8yEl.cjs.map → sst-BgG7dJJu.cjs.map} +1 -1
  161. package/dist/{sst-w90IUOX_.mjs → sst-CDnHFO3U.mjs} +6 -6
  162. package/dist/{sst-w90IUOX_.mjs.map → sst-CDnHFO3U.mjs.map} +1 -1
  163. package/dist/{stack-B5-pHmtX.mjs → stack-BXmLQf3K.mjs} +163 -27
  164. package/dist/stack-BXmLQf3K.mjs.map +1 -0
  165. package/dist/{stack-CBgOAZDP.cjs → stack-BtnflNSa.cjs} +161 -25
  166. package/dist/stack-BtnflNSa.cjs.map +1 -0
  167. package/dist/{stage-C6ogkiRu.mjs → stage-BbQidxxa.mjs} +5 -5
  168. package/dist/{stage-C6ogkiRu.mjs.map → stage-BbQidxxa.mjs.map} +1 -1
  169. package/dist/{stage-EnQ76HLW.cjs → stage-ssuPXLhP.cjs} +5 -5
  170. package/dist/{stage-EnQ76HLW.cjs.map → stage-ssuPXLhP.cjs.map} +1 -1
  171. package/dist/{stages-C8HQ9ozh.cjs → stages-CQwD2QxS.cjs} +2 -2
  172. package/dist/{stages-C8HQ9ozh.cjs.map → stages-CQwD2QxS.cjs.map} +1 -1
  173. package/dist/{stages-DnN6lwL4.mjs → stages-MA2sXnX4.mjs} +2 -2
  174. package/dist/{stages-DnN6lwL4.mjs.map → stages-MA2sXnX4.mjs.map} +1 -1
  175. package/dist/target/public.cjs +1 -1
  176. package/dist/target/public.d.cts +2 -2
  177. package/dist/target/public.d.mts +2 -2
  178. package/dist/target/public.mjs +1 -1
  179. package/dist/{terminal-Cb58S1Yx.mjs → terminal-BEGE1AEV.mjs} +2 -2
  180. package/dist/{terminal-Cb58S1Yx.mjs.map → terminal-BEGE1AEV.mjs.map} +1 -1
  181. package/dist/{terminal-D9abUcq9.cjs → terminal-BecJpgA3.cjs} +2 -2
  182. package/dist/{terminal-D9abUcq9.cjs.map → terminal-BecJpgA3.cjs.map} +1 -1
  183. package/dist/{types-B-ohhDwy.d.mts → types-BvokH0ya.d.cts} +40 -1
  184. package/dist/types-BvokH0ya.d.cts.map +1 -0
  185. package/dist/{types-BAqI--_q.d.cts → types-DmLnGeii.d.mts} +39 -2
  186. package/dist/types-DmLnGeii.d.mts.map +1 -0
  187. package/dist/workspace/index.cjs +1 -1
  188. package/dist/workspace/index.d.cts +2 -2
  189. package/dist/workspace/index.d.mts +2 -2
  190. package/dist/workspace/index.mjs +1 -1
  191. package/dist/{workspace-K403npiD.cjs → workspace-DEmfa9RO.cjs} +74 -4
  192. package/dist/workspace-DEmfa9RO.cjs.map +1 -0
  193. package/dist/{workspace-BSGUH2DO.mjs → workspace-RgU7TBgg.mjs} +69 -5
  194. package/dist/workspace-RgU7TBgg.mjs.map +1 -0
  195. package/package.json +16 -16
  196. package/dist/clientTelemetry-C3GsvvLK.d.cts.map +0 -1
  197. package/dist/clientTelemetry-Dcp0jgkV.d.mts.map +0 -1
  198. package/dist/compose-BE2Fi1Bs.mjs.map +0 -1
  199. package/dist/compose-QHm47c8E.cjs.map +0 -1
  200. package/dist/deploy-KdBFBME1.mjs.map +0 -1
  201. package/dist/deploy-Pkvk9jIL.cjs.map +0 -1
  202. package/dist/snsSubscriptions-B7uEpoJ2.cjs.map +0 -1
  203. package/dist/snsSubscriptions-BQcD_3UK.mjs.map +0 -1
  204. package/dist/stack-B5-pHmtX.mjs.map +0 -1
  205. package/dist/stack-CBgOAZDP.cjs.map +0 -1
  206. package/dist/types-B-ohhDwy.d.mts.map +0 -1
  207. package/dist/types-BAqI--_q.d.cts.map +0 -1
  208. package/dist/workspace-BSGUH2DO.mjs.map +0 -1
  209. package/dist/workspace-K403npiD.cjs.map +0 -1
@@ -1,13 +1,13 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
2
2
  const require_errors = require("./errors-D1x8duqI.cjs");
3
- const require_credentials = require("./credentials--QL1R8mL.cjs");
4
- const require_stack = require("./stack-CBgOAZDP.cjs");
5
- const require_workspace = require("./workspace-K403npiD.cjs");
3
+ const require_credentials = require("./credentials-Cp09PIsc.cjs");
4
+ const require_stack = require("./stack-BtnflNSa.cjs");
5
+ const require_workspace = require("./workspace-DEmfa9RO.cjs");
6
6
  const require_define = require("./define-zKgLY65H.cjs");
7
- const require_credentials$1 = require("./credentials-No8csre7.cjs");
7
+ const require_credentials$1 = require("./credentials-BI52H1ad.cjs");
8
8
  const require_drivers = require("./drivers-DP7__dJX.cjs");
9
9
  const require_discover = require("./discover-OXczlq08.cjs");
10
- const require_snsSubscriptions = require("./snsSubscriptions-B7uEpoJ2.cjs");
10
+ const require_snsSubscriptions = require("./snsSubscriptions-S_CMCXqI.cjs");
11
11
  const require_seeds = require("./seeds-Bc3niNVb.cjs");
12
12
  const require_databases = require("./databases-DwYYH2mX.cjs");
13
13
  let node_path = require("node:path");
@@ -17,11 +17,14 @@ let node_fs_promises = require("node:fs/promises");
17
17
  let node_os = require("node:os");
18
18
  let node_child_process = require("node:child_process");
19
19
  let node_net = require("node:net");
20
+ let node_crypto = require("node:crypto");
20
21
  let _geekmidas_edge_certificates_local = require("@geekmidas/edge/certificates/local");
21
22
  let _geekmidas_edge_proxy_traefik = require("@geekmidas/edge/proxy/traefik");
22
23
  let _geekmidas_manifest = require("@geekmidas/manifest");
23
24
  let yaml = require("yaml");
24
25
  let node_http = require("node:http");
26
+ let node_forge = require("node-forge");
27
+ node_forge = require_rolldown_runtime.__toESM(node_forge, 1);
25
28
  let node_https = require("node:https");
26
29
  //#region src/compose/server.ts
27
30
  /**
@@ -391,6 +394,151 @@ function pinImages(file, digests, images) {
391
394
  });
392
395
  }
393
396
  //#endregion
397
+ //#region src/compose/originCertificate.ts
398
+ /**
399
+ * The origin certificate a CDN issues for the hosts it answers — what the
400
+ * server shows the CDN when it connects (`deploy.cdn.<stage>.certificate`,
401
+ * `'origin'` by default).
402
+ *
403
+ * A host behind Cloudflare's proxy resolves to Cloudflare, so Let's
404
+ * Encrypt's HTTP challenge no longer reliably reaches the server. Cloudflare
405
+ * issues certificates for its own origins instead: trusted by its proxy and
406
+ * by nothing else, valid up to 15 years, for whatever hosts the request
407
+ * names. So the deploy:
408
+ *
409
+ * - **makes the key here**, on the machine that runs the deploy, and sends
410
+ * Cloudflare's Origin CA only a signing request — the key is never sent;
411
+ * - **asks for exactly the hosts the CDN answers**, never a wildcard it did
412
+ * not declare: the edge is shared, and a certificate is served for every
413
+ * name it covers;
414
+ * - **keeps both in the stage's secrets**, under keys gkm reserves for the
415
+ * server (`GKM_SERVER_*`, never handed to an app), so every later deploy
416
+ * reuses them — and the server holds no Cloudflare token;
417
+ * - **asks again** only when the hosts it is for change, its key no longer
418
+ * matches, or it is within {@link ORIGIN_RENEW_BEFORE_DAYS} of expiring.
419
+ *
420
+ * The token is the deploy's own (`CLOUDFLARE_API_TOKEN`), which then needs
421
+ * `Zone → SSL and Certificates → Edit` beside its DNS permissions.
422
+ */
423
+ /** The stage secret holding the origin certificate, PEM. */
424
+ const ORIGIN_CERT_KEY = "GKM_SERVER_ORIGIN_CERT";
425
+ /** The stage secret holding its private key, PEM. */
426
+ const ORIGIN_KEY_KEY = "GKM_SERVER_ORIGIN_KEY";
427
+ /** What is asked for: the Origin CA's longest, 15 years. */
428
+ const ORIGIN_VALIDITY_DAYS = 5475;
429
+ /** The names a certificate covers, lowercase: its DNS subject alternative names. */
430
+ function certificateHosts(cert) {
431
+ return new Set((cert.subjectAltName ?? "").split(",").map((entry) => entry.trim()).filter((entry) => entry.startsWith("DNS:")).map((entry) => entry.slice(4).toLowerCase()));
432
+ }
433
+ /**
434
+ * What is wrong with a kept certificate for `hosts` at `now`, or `undefined`
435
+ * when it serves them: it covers each by name, its key is its own, and it
436
+ * is not about to expire.
437
+ */
438
+ function originCertificateProblem(kept, hosts, now = /* @__PURE__ */ new Date()) {
439
+ if (!kept?.cert || !kept.key) return "missing";
440
+ let cert;
441
+ try {
442
+ cert = new node_crypto.X509Certificate(kept.cert);
443
+ if (!cert.checkPrivateKey((0, node_crypto.createPrivateKey)(kept.key))) return "key";
444
+ } catch {
445
+ return "unreadable";
446
+ }
447
+ const covered = certificateHosts(cert);
448
+ if (!hosts.every((host) => covered.has(host.toLowerCase()))) return "hosts";
449
+ const renewAt = new Date(cert.validTo).getTime() - 2592e6;
450
+ if (now.getTime() >= renewAt) return "expiring";
451
+ }
452
+ /**
453
+ * A new private key and a signing request for `hosts` — RSA, which every
454
+ * proxy serves. The key stays here; only the request is sent.
455
+ */
456
+ function originSigningRequest(hosts) {
457
+ const { privateKey, publicKey } = (0, node_crypto.generateKeyPairSync)("rsa", { modulusLength: 2048 });
458
+ const key = privateKey.export({
459
+ type: "pkcs8",
460
+ format: "pem"
461
+ }).toString();
462
+ const csr = node_forge.default.pki.createCertificationRequest();
463
+ csr.publicKey = node_forge.default.pki.publicKeyFromPem(publicKey.export({
464
+ type: "spki",
465
+ format: "pem"
466
+ }).toString());
467
+ csr.setSubject([{
468
+ name: "commonName",
469
+ value: hosts[0]
470
+ }]);
471
+ csr.setAttributes([{
472
+ name: "extensionRequest",
473
+ extensions: [{
474
+ name: "subjectAltName",
475
+ altNames: hosts.map((value) => ({
476
+ type: 2,
477
+ value
478
+ }))
479
+ }]
480
+ }]);
481
+ csr.sign(node_forge.default.pki.privateKeyFromPem(key), node_forge.default.md.sha256.create());
482
+ return {
483
+ csr: node_forge.default.pki.certificationRequestToPem(csr),
484
+ key
485
+ };
486
+ }
487
+ const REASONS = {
488
+ missing: "there is none yet",
489
+ unreadable: "the one kept cannot be read",
490
+ key: "the one kept does not match its key",
491
+ hosts: "the hosts it is for changed",
492
+ expiring: `the one kept expires within 30 days`
493
+ };
494
+ /**
495
+ * The stage's origin certificate for `hosts`: the one kept, while it serves
496
+ * them, and otherwise a new one from Cloudflare's Origin CA, kept before it
497
+ * is returned. A dry run issues nothing, and says it would.
498
+ *
499
+ * @throws {MissingCredential} when one must be issued and there is no token
500
+ */
501
+ async function ensureOriginCertificate(input) {
502
+ const log = input.log ?? ((line) => console.log(line));
503
+ const hosts = [...new Set(input.hosts.map((h) => h.toLowerCase()))].sort();
504
+ const kept = {
505
+ cert: input.custom?.[ORIGIN_CERT_KEY],
506
+ key: input.custom?.[ORIGIN_KEY_KEY]
507
+ };
508
+ const problem = originCertificateProblem(kept, hosts, input.now);
509
+ if (!problem) return kept;
510
+ const why = REASONS[problem];
511
+ if (input.dryRun) {
512
+ log(` 🔐 would have Cloudflare issue an origin certificate for ${hosts.join(", ")} — ${why}`);
513
+ return problem === "expiring" || problem === "hosts" ? kept : void 0;
514
+ }
515
+ const credential = await input.credentials.get({ kind: "cloudflare" });
516
+ if (!credential?.token) throw new require_credentials.MissingCredential("cloudflare", `${input.stage}'s origin certificate`);
517
+ log(` 🔐 Cloudflare issues an origin certificate for ${hosts.join(", ")} — ${why}`);
518
+ const issuer = await (input.issuer ?? cloudflareIssuer)(credential.token);
519
+ const { csr, key } = originSigningRequest(hosts);
520
+ const { certificate } = await issuer.createOriginCertificate(input.zone, {
521
+ csr,
522
+ hostnames: hosts,
523
+ days: ORIGIN_VALIDITY_DAYS,
524
+ type: "origin-rsa"
525
+ });
526
+ const issued = {
527
+ cert: certificate,
528
+ key
529
+ };
530
+ await input.keep({
531
+ [ORIGIN_CERT_KEY]: issued.cert,
532
+ [ORIGIN_KEY_KEY]: key
533
+ });
534
+ return issued;
535
+ }
536
+ /** Cloudflare's own Origin CA, through the deploy's token. */
537
+ async function cloudflareIssuer(token) {
538
+ const { CloudflareApi } = await import("@geekmidas/edge/dns/cloudflare");
539
+ return new CloudflareApi({ credential: { token } });
540
+ }
541
+ //#endregion
394
542
  //#region src/compose/secrets.ts
395
543
  function deployedStackSecrets(workspace, stage, stored, manifest) {
396
544
  const withSeed = require_credentials$1.withGeneratedSecrets(stored ?? require_credentials.initStageSecrets(stage), manifest);
@@ -1118,7 +1266,7 @@ async function validateCompose(ctx, deps, options = {}) {
1118
1266
  }
1119
1267
  if (!push && !check && !stack.local) {
1120
1268
  require_snsSubscriptions.requiredServerAddress(stage, workspace.domains?.[stage], secrets?.custom);
1121
- if (stack.proxy === "traefik" && stack.wildcard?.tls === "dns") {
1269
+ if (stack.proxy === "traefik" && dnsChallenged(stack)) {
1122
1270
  const zone = require_stack.acmeDnsZone(workspace, stage);
1123
1271
  if (zone) require_stack.acmeDnsSecrets(zone, stage, secrets?.custom);
1124
1272
  }
@@ -1196,6 +1344,23 @@ async function readyCompose(ctx, run, deps) {
1196
1344
  ...caFile ? [caFile] : []
1197
1345
  ]) if (!(0, node_fs.existsSync)(file)) throw new require_workspace.ComposeTlsFileMissing(ctx.stage, file);
1198
1346
  }
1347
+ if (stack.cdn?.certificate === "origin" && !buildsOnly(run)) {
1348
+ const issued = await ensureOriginCertificate({
1349
+ stage: ctx.stage,
1350
+ zone: stack.cdn.zone,
1351
+ hosts: stack.cdn.hosts,
1352
+ custom: run.secrets?.custom,
1353
+ credentials: ctx.credentials,
1354
+ keep: (values) => keepStageSecrets(ctx, run, values),
1355
+ ...ctx.dryRun ? { dryRun: true } : {},
1356
+ log: (line) => ctx.logger.info(line),
1357
+ ...deps.originIssuer ? { issuer: deps.originIssuer } : {}
1358
+ });
1359
+ if (issued) {
1360
+ ctx.secrets.mask(issued.key);
1361
+ run.originCertificate = issued;
1362
+ }
1363
+ }
1199
1364
  if (stack.local) {
1200
1365
  await edgeHostsFree(ctx, run, deps);
1201
1366
  return;
@@ -1203,7 +1368,7 @@ async function readyCompose(ctx, run, deps) {
1203
1368
  if (run.server && !ctx.dryRun && !run.push) await deps.server.check(run.server);
1204
1369
  await edgeHostsFree(ctx, run, deps);
1205
1370
  await logsPortOnServer(ctx, run, deps);
1206
- const prune = await stageHostsDns(ctx, deps, require_snsSubscriptions.stackHosts(stack).filter((host) => !require_snsSubscriptions.isLocalHost(host)), run.secrets?.custom, stack.wildcard?.host);
1371
+ const prune = await stageHostsDns(ctx, deps, require_snsSubscriptions.stackHosts(stack).filter((host) => !require_snsSubscriptions.isLocalHost(host)), run.secrets?.custom, stack.wildcard?.host, stack.cdn?.hosts);
1207
1372
  if (prune) run.pruneDns = prune;
1208
1373
  }
1209
1374
  /**
@@ -1323,7 +1488,7 @@ function recordedForStack(recorded, providerDns) {
1323
1488
  const asked = new Set(providerDns ?? []);
1324
1489
  return recorded.filter((record) => record.source !== "provider" || providerDns !== void 0 && !asked.has(require_seeds.dnsResourceKey(record.fqdn, record.type)));
1325
1490
  }
1326
- async function stageHostsDns(ctx, deps, hosts, custom, wildcard) {
1491
+ async function stageHostsDns(ctx, deps, hosts, custom, wildcard, proxied) {
1327
1492
  const { workspace, stage } = ctx;
1328
1493
  const server = require_snsSubscriptions.requiredServerAddress(stage, workspace.domains?.[stage], custom);
1329
1494
  if (hosts.length === 0) return;
@@ -1346,6 +1511,7 @@ async function stageHostsDns(ctx, deps, hosts, custom, wildcard) {
1346
1511
  dns: workspace.dns,
1347
1512
  recorded: recordedForStack(require_seeds.dnsResources(stored?.resources ?? {}), ctx.providerDns),
1348
1513
  ...wildcard ? { wildcard } : {},
1514
+ ...proxied?.length ? { proxied } : {},
1349
1515
  credentials: ctx.credentials,
1350
1516
  log,
1351
1517
  lookup: deps.lookup ?? require_snsSubscriptions.systemLookup,
@@ -1441,7 +1607,7 @@ function withPinnedImages(stack, file, digests) {
1441
1607
  */
1442
1608
  async function planCompose(ctx, run) {
1443
1609
  if (run.generated.length > 0) ctx.logger.info(`🔑 "${ctx.stage}" has no ${run.generated.join(", ")} yet; this dry run used values it did not keep.`);
1444
- run.files = await writeStack(ctx.cwd, run.dir, run.stack);
1610
+ run.files = await writeStack(ctx.cwd, run.dir, run.stack, run.originCertificate);
1445
1611
  printPlan(ctx, run);
1446
1612
  if (!run.push && run.stack.infra.includes("postgres")) require_seeds.reportPlannedSeeds((await require_databases.plannedSeeds({
1447
1613
  root: ctx.workspace.root,
@@ -1507,6 +1673,47 @@ async function planCompose(ctx, run) {
1507
1673
  });
1508
1674
  }
1509
1675
  /**
1676
+ * Keys written into the stage's secrets now, on top of what the store holds
1677
+ * — not at the end of the run, so a value the CDN hands over once is kept
1678
+ * the moment it exists — and into the run's copy, so a later write of it
1679
+ * keeps them too.
1680
+ */
1681
+ async function keepStageSecrets(ctx, run, values) {
1682
+ const stored = await ctx.secrets.read() ?? run.secrets;
1683
+ if (!stored) throw new StageSecretsMissingForKeep(ctx.stage);
1684
+ await ctx.secrets.write({
1685
+ ...stored,
1686
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
1687
+ custom: {
1688
+ ...stored.custom,
1689
+ ...values
1690
+ }
1691
+ });
1692
+ if (run.secrets) run.secrets = {
1693
+ ...run.secrets,
1694
+ custom: {
1695
+ ...run.secrets.custom,
1696
+ ...values
1697
+ }
1698
+ };
1699
+ }
1700
+ /** A deployed stage with no secrets to keep a value in. */
1701
+ var StageSecretsMissingForKeep = class extends require_errors.GkmError {
1702
+ stage;
1703
+ constructor(stage) {
1704
+ super(`'${stage}' has no secrets yet to keep its CDN's origin certificate in. Set them up first: gkm secrets:init --stage ${stage}.`);
1705
+ this.stage = stage;
1706
+ this.name = "StageSecretsMissingForKeep";
1707
+ }
1708
+ };
1709
+ /**
1710
+ * Whether the shared edge gets any of the stack's certificates over the DNS
1711
+ * challenge: a wildcard site's, or the hosts a CDN answers.
1712
+ */
1713
+ function dnsChallenged(stack) {
1714
+ return stack.wildcard?.tls === "dns" || stack.cdn?.certificate === "dns";
1715
+ }
1716
+ /**
1510
1717
  * The shared edge's key for the stage's wildcard certificate, through the
1511
1718
  * DNS provider holding the stage's domain — before the stack's routes ask
1512
1719
  * for the certificate. Route 53's is issued through IAM, allowed the DNS
@@ -1586,7 +1793,7 @@ async function provisionCompose(ctx, run, deps) {
1586
1793
  });
1587
1794
  if (run.topicSubscriptions) await subscribeTopics(ctx, run, deps);
1588
1795
  const { stack } = run;
1589
- run.files = await writeStack(ctx.cwd, run.dir, stack);
1796
+ run.files = await writeStack(ctx.cwd, run.dir, stack, run.originCertificate);
1590
1797
  printPlan(ctx, run);
1591
1798
  if (stack.proxy === "traefik") {
1592
1799
  if (ownCaddy) {
@@ -1612,7 +1819,7 @@ async function provisionCompose(ctx, run, deps) {
1612
1819
  id: `${_geekmidas_edge_proxy_traefik.EDGE_PROJECT}/${_geekmidas_edge_proxy_traefik.EDGE_SERVICE}`,
1613
1820
  via: "found"
1614
1821
  });
1615
- if (stack.wildcard?.tls === "dns") await edgeAcmeKey(ctx, run, deps);
1822
+ if (dnsChallenged(stack)) await edgeAcmeKey(ctx, run, deps);
1616
1823
  }
1617
1824
  if (stack.infra.length > 0) {
1618
1825
  ctx.logger.info(`\n🗄️ Starting ${stack.infra.join(", ")}…`);
@@ -1804,7 +2011,7 @@ async function buildCompose(ctx, run, deps) {
1804
2011
  ];
1805
2012
  const apps = images.map((image) => image.app);
1806
2013
  if (buildsOnly(run)) {
1807
- run.files = await writeStack(ctx.cwd, run.dir, stack);
2014
+ run.files = await writeStack(ctx.cwd, run.dir, stack, run.originCertificate);
1808
2015
  printPlan(ctx, run);
1809
2016
  }
1810
2017
  const prerendered = prerenderedHere(run);
@@ -1870,7 +2077,7 @@ async function releaseCompose(ctx, run, deps) {
1870
2077
  ...ref.output ? { output: ref.output } : {}
1871
2078
  });
1872
2079
  if (stack.proxy === "traefik" && stack.traefik) {
1873
- const written = await require_stack.writeEdgeRoutes(deps.docker, edge, stack.project, stack.traefik, await edgeCertificate(run.dir, stack));
2080
+ const written = await require_stack.writeEdgeRoutes(deps.docker, edge, stack.project, stack.traefik, await edgeCertificate(run.dir, stack), run.originCertificate);
1874
2081
  ctx.logger.info(`🌐 Registered ${stack.routes.length} route(s) with ${_geekmidas_edge_proxy_traefik.EDGE_PROJECT}: ${written.at(-1)}`);
1875
2082
  } else if (!stack.local || (0, node_fs.existsSync)(edgeFile(run))) await require_stack.removeEdgeRoutes(deps.docker, edge, stack.project);
1876
2083
  const prerendered = prerenderedHere(run);
@@ -2450,7 +2657,7 @@ async function localEdgeCertificate(dir, stack, authority) {
2450
2657
  };
2451
2658
  }
2452
2659
  /** Write the stack's files: owner-only, since the env files hold secrets. */
2453
- async function writeStack(root, dir, stack) {
2660
+ async function writeStack(root, dir, stack, origin) {
2454
2661
  await (0, node_fs_promises.mkdir)(dir, {
2455
2662
  recursive: true,
2456
2663
  mode: 448
@@ -2465,11 +2672,13 @@ async function writeStack(root, dir, stack) {
2465
2672
  };
2466
2673
  const issued = await edgeCertificate(dir, stack);
2467
2674
  const tls = stack.proxy === "caddy" ? issued : void 0;
2675
+ const originTls = stack.proxy === "caddy" ? origin : void 0;
2468
2676
  const compose = stack.caddyfile !== void 0 ? require_stack.withCaddyConfigs(stack.compose, {
2469
2677
  caddyfile: stack.caddyfile,
2470
- ...tls ? { tls } : {}
2678
+ ...tls ? { tls } : {},
2679
+ ...originTls ? { origin: originTls } : {}
2471
2680
  }) : stack.compose;
2472
- await write((0, node_path.join)(dir, "docker-compose.yml"), composeYaml(stack, compose), tls ? 384 : 420);
2681
+ await write((0, node_path.join)(dir, "docker-compose.yml"), composeYaml(stack, compose), tls || originTls ? 384 : 420);
2473
2682
  if (stack.caddyfile !== void 0) {
2474
2683
  await write((0, node_path.join)(dir, "Caddyfile"), stack.caddyfile);
2475
2684
  await (0, node_fs_promises.rm)((0, node_path.join)(dir, "traefik.yml"), { force: true });
@@ -2727,4 +2936,4 @@ Object.defineProperty(exports, "stackOverrideFile", {
2727
2936
  }
2728
2937
  });
2729
2938
 
2730
- //# sourceMappingURL=compose-QHm47c8E.cjs.map
2939
+ //# sourceMappingURL=compose-gnNrY3NQ.cjs.map