@geekmidas/cli 10.0.0-alpha.123 → 10.0.0-alpha.124

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 (247) hide show
  1. package/dist/{EndpointGenerator-BDa6pPgE.cjs → EndpointGenerator-B2MUa4M2.cjs} +2 -2
  2. package/dist/{EndpointGenerator-BDa6pPgE.cjs.map → EndpointGenerator-B2MUa4M2.cjs.map} +1 -1
  3. package/dist/{EndpointGenerator-CP_z_E3e.mjs → EndpointGenerator-Z_BUTocT.mjs} +2 -2
  4. package/dist/{EndpointGenerator-CP_z_E3e.mjs.map → EndpointGenerator-Z_BUTocT.mjs.map} +1 -1
  5. package/dist/{GoDaddyProvider-Dubq-pCc.cjs → GoDaddyProvider-0z5RAN1k.cjs} +3 -3
  6. package/dist/{GoDaddyProvider-Dubq-pCc.cjs.map → GoDaddyProvider-0z5RAN1k.cjs.map} +1 -1
  7. package/dist/{GoDaddyProvider-BlB5nJky.mjs → GoDaddyProvider-55x4o-4z.mjs} +3 -3
  8. package/dist/{GoDaddyProvider-BlB5nJky.mjs.map → GoDaddyProvider-55x4o-4z.mjs.map} +1 -1
  9. package/dist/{HostingerProvider-BNpS9aRJ.mjs → HostingerProvider-Cjh_2Ml6.mjs} +2 -2
  10. package/dist/{HostingerProvider-BNpS9aRJ.mjs.map → HostingerProvider-Cjh_2Ml6.mjs.map} +1 -1
  11. package/dist/{HostingerProvider-DR1iws1P.cjs → HostingerProvider-OdQmKXE3.cjs} +2 -2
  12. package/dist/{HostingerProvider-DR1iws1P.cjs.map → HostingerProvider-OdQmKXE3.cjs.map} +1 -1
  13. package/dist/{LegacyStateStore-DGALQGZu.mjs → LegacyStateStore-C-vumKSN.mjs} +3 -3
  14. package/dist/{LegacyStateStore-DGALQGZu.mjs.map → LegacyStateStore-C-vumKSN.mjs.map} +1 -1
  15. package/dist/{LegacyStateStore-ClvUC8qy.cjs → LegacyStateStore-DRpB-yC5.cjs} +3 -3
  16. package/dist/{LegacyStateStore-ClvUC8qy.cjs.map → LegacyStateStore-DRpB-yC5.cjs.map} +1 -1
  17. package/dist/{LocalStateStore-43kSYNpw.cjs → LocalStateStore-C3ummuDT.cjs} +2 -2
  18. package/dist/{LocalStateStore-43kSYNpw.cjs.map → LocalStateStore-C3ummuDT.cjs.map} +1 -1
  19. package/dist/{LocalStateStore-CBYUzVR5.mjs → LocalStateStore-CtOjpV1w.mjs} +2 -2
  20. package/dist/{LocalStateStore-CBYUzVR5.mjs.map → LocalStateStore-CtOjpV1w.mjs.map} +1 -1
  21. package/dist/{OpenApiTsGenerator-CsrukCE-.mjs → OpenApiTsGenerator-MtnMQL_g.mjs} +2 -2
  22. package/dist/{OpenApiTsGenerator-CsrukCE-.mjs.map → OpenApiTsGenerator-MtnMQL_g.mjs.map} +1 -1
  23. package/dist/{OpenApiTsGenerator-FNhY7Ssz.cjs → OpenApiTsGenerator-t3_E98Fi.cjs} +2 -2
  24. package/dist/{OpenApiTsGenerator-FNhY7Ssz.cjs.map → OpenApiTsGenerator-t3_E98Fi.cjs.map} +1 -1
  25. package/dist/{S3StateStore-DLHjDYYP.mjs → S3StateStore-BC4Jm3Tw.mjs} +2 -2
  26. package/dist/{S3StateStore-DLHjDYYP.mjs.map → S3StateStore-BC4Jm3Tw.mjs.map} +1 -1
  27. package/dist/{S3StateStore-ahE7hSNK.cjs → S3StateStore-BeArp0aF.cjs} +2 -2
  28. package/dist/{S3StateStore-ahE7hSNK.cjs.map → S3StateStore-BeArp0aF.cjs.map} +1 -1
  29. package/dist/{SSMStateStore-j5RuMkch.mjs → SSMStateStore-Crl76aYZ.mjs} +2 -2
  30. package/dist/{SSMStateStore-j5RuMkch.mjs.map → SSMStateStore-Crl76aYZ.mjs.map} +1 -1
  31. package/dist/{SSMStateStore-qIzIuazA.cjs → SSMStateStore-DcstR6cW.cjs} +2 -2
  32. package/dist/{SSMStateStore-qIzIuazA.cjs.map → SSMStateStore-DcstR6cW.cjs.map} +1 -1
  33. package/dist/{SubscriberGenerator-C8CPxrCK.cjs → SubscriberGenerator-C3QTae-R.cjs} +237 -54
  34. package/dist/SubscriberGenerator-C3QTae-R.cjs.map +1 -0
  35. package/dist/{SubscriberGenerator-y3pncae_.mjs → SubscriberGenerator-COAVPgM-.mjs} +227 -56
  36. package/dist/SubscriberGenerator-COAVPgM-.mjs.map +1 -0
  37. package/dist/{add-C2CvXrYw.cjs → add-BFjb6mMq.cjs} +6 -6
  38. package/dist/{add-C2CvXrYw.cjs.map → add-BFjb6mMq.cjs.map} +1 -1
  39. package/dist/{add-Bm-C56lH.mjs → add-CIjmgzkb.mjs} +5 -5
  40. package/dist/{add-Bm-C56lH.mjs.map → add-CIjmgzkb.mjs.map} +1 -1
  41. package/dist/{bundler-Dk7tAvAX.cjs → bundler-CiUoIsku.cjs} +5 -5
  42. package/dist/{bundler-Dk7tAvAX.cjs.map → bundler-CiUoIsku.cjs.map} +1 -1
  43. package/dist/{bundler-DnkFt4mn.mjs → bundler-D6KFNpQk.mjs} +5 -5
  44. package/dist/{bundler-DnkFt4mn.mjs.map → bundler-D6KFNpQk.mjs.map} +1 -1
  45. package/dist/{cli-CVeHFXNE.mjs → cli-DNtSTtMc.mjs} +4 -4
  46. package/dist/{cli-CVeHFXNE.mjs.map → cli-DNtSTtMc.mjs.map} +1 -1
  47. package/dist/{cli-Di464j1O.cjs → cli-r4eUr98C.cjs} +4 -4
  48. package/dist/{cli-Di464j1O.cjs.map → cli-r4eUr98C.cjs.map} +1 -1
  49. package/dist/{compose-ChVvb3xM.cjs → compose-BfXXWJSp.cjs} +328 -54
  50. package/dist/compose-BfXXWJSp.cjs.map +1 -0
  51. package/dist/{compose-cHkF---f.mjs → compose-DJvvmF3X.mjs} +299 -25
  52. package/dist/compose-DJvvmF3X.mjs.map +1 -0
  53. package/dist/{config-DrOX29sT.d.mts → config-IgK6YaGp.d.cts} +3 -4
  54. package/dist/config-IgK6YaGp.d.cts.map +1 -0
  55. package/dist/{config-B3iz9BtK.d.cts → config-kE-p5hxq.d.mts} +3 -4
  56. package/dist/config-kE-p5hxq.d.mts.map +1 -0
  57. package/dist/config.cjs +1 -1
  58. package/dist/config.d.cts +3 -3
  59. package/dist/config.d.mts +3 -3
  60. package/dist/config.mjs +1 -1
  61. package/dist/{credentialSchemas-B67WJOOm.cjs → credentialSchemas-AhIBuQxQ.cjs} +2 -2
  62. package/dist/{credentialSchemas-B67WJOOm.cjs.map → credentialSchemas-AhIBuQxQ.cjs.map} +1 -1
  63. package/dist/{credentialSchemas-DDOLRCLF.mjs → credentialSchemas-DLKbxYBy.mjs} +2 -2
  64. package/dist/{credentialSchemas-DDOLRCLF.mjs.map → credentialSchemas-DLKbxYBy.mjs.map} +1 -1
  65. package/dist/{credentials-Zqr3QQYB.cjs → credentials-D7XJypNd.cjs} +173 -3
  66. package/dist/credentials-D7XJypNd.cjs.map +1 -0
  67. package/dist/{credentials-B5N5yKk6.mjs → credentials-DpfnUvIR.mjs} +132 -4
  68. package/dist/credentials-DpfnUvIR.mjs.map +1 -0
  69. package/dist/deploy/public.cjs +15 -16
  70. package/dist/deploy/public.cjs.map +1 -1
  71. package/dist/deploy/public.d.cts +3 -5
  72. package/dist/deploy/public.d.cts.map +1 -1
  73. package/dist/deploy/public.d.mts +3 -5
  74. package/dist/deploy/public.d.mts.map +1 -1
  75. package/dist/deploy/public.mjs +10 -11
  76. package/dist/deploy/public.mjs.map +1 -1
  77. package/dist/{deploy-BffR_uEN.cjs → deploy-BbI1UMh3.cjs} +476 -156
  78. package/dist/deploy-BbI1UMh3.cjs.map +1 -0
  79. package/dist/{deploy-DO4djCHb.mjs → deploy-CiRYwFmr.mjs} +454 -116
  80. package/dist/deploy-CiRYwFmr.mjs.map +1 -0
  81. package/dist/{discover-C5roJuc9.mjs → discover-BvJOVsYG.mjs} +66 -14
  82. package/dist/discover-BvJOVsYG.mjs.map +1 -0
  83. package/dist/{discover-DozUKs8f.cjs → discover-ojkcbxHw.cjs} +88 -12
  84. package/dist/discover-ojkcbxHw.cjs.map +1 -0
  85. package/dist/{dokploy-CsdvfH3t.cjs → dokploy-C0aQrCgs.cjs} +2 -2
  86. package/dist/{dokploy-CsdvfH3t.cjs.map → dokploy-C0aQrCgs.cjs.map} +1 -1
  87. package/dist/{dokploy-BcZm93Cc.mjs → dokploy-MM7c3IE0.mjs} +2 -2
  88. package/dist/{dokploy-BcZm93Cc.mjs.map → dokploy-MM7c3IE0.mjs.map} +1 -1
  89. package/dist/{drivers-DbjiYpW6.cjs → drivers-CQ32PB5w.cjs} +2 -2
  90. package/dist/{drivers-DbjiYpW6.cjs.map → drivers-CQ32PB5w.cjs.map} +1 -1
  91. package/dist/{drivers-BjGDYfnC.mjs → drivers-Chb5Akov.mjs} +2 -2
  92. package/dist/{drivers-BjGDYfnC.mjs.map → drivers-Chb5Akov.mjs.map} +1 -1
  93. package/dist/{eas-CBShP20v.mjs → eas-1Ee6kql0.mjs} +2 -2
  94. package/dist/{eas-CBShP20v.mjs.map → eas-1Ee6kql0.mjs.map} +1 -1
  95. package/dist/{eas-CN_cUXth.cjs → eas-CJoys9yh.cjs} +2 -2
  96. package/dist/{eas-CN_cUXth.cjs.map → eas-CJoys9yh.cjs.map} +1 -1
  97. package/dist/{emit-C1e8qD08.mjs → emit-CNpuV_6Q.mjs} +17 -1
  98. package/dist/emit-CNpuV_6Q.mjs.map +1 -0
  99. package/dist/{emit-Dmc1nvdS.cjs → emit-qvHxMV9b.cjs} +17 -1
  100. package/dist/emit-qvHxMV9b.cjs.map +1 -0
  101. package/dist/{encryption-CITa6dXL.mjs → encryption-B8Bk1Mvu.mjs} +2 -2
  102. package/dist/{encryption-CITa6dXL.mjs.map → encryption-B8Bk1Mvu.mjs.map} +1 -1
  103. package/dist/{encryption-CPDM49Hi.cjs → encryption-Bo9VlRnl.cjs} +2 -2
  104. package/dist/{encryption-CPDM49Hi.cjs.map → encryption-Bo9VlRnl.cjs.map} +1 -1
  105. package/dist/{engine-CTnHmHjz.mjs → engine-BuinpJfS.mjs} +6 -7
  106. package/dist/{engine-CTnHmHjz.mjs.map → engine-BuinpJfS.mjs.map} +1 -1
  107. package/dist/{engine-D-jfMVj-.cjs → engine-esxTxcIx.cjs} +9 -10
  108. package/dist/{engine-D-jfMVj-.cjs.map → engine-esxTxcIx.cjs.map} +1 -1
  109. package/dist/{github-D56PSK39.cjs → github-BEA4K3_X.cjs} +79 -46
  110. package/dist/github-BEA4K3_X.cjs.map +1 -0
  111. package/dist/{github-9RlA7EjN.mjs → github-BUlKJfOV.mjs} +77 -44
  112. package/dist/github-BUlKJfOV.mjs.map +1 -0
  113. package/dist/{googlePlay-COi5LXON.mjs → googlePlay-CK05QiTq.mjs} +4 -4
  114. package/dist/{googlePlay-COi5LXON.mjs.map → googlePlay-CK05QiTq.mjs.map} +1 -1
  115. package/dist/{googlePlay-SX_jQeJf.cjs → googlePlay-CiqAS2ma.cjs} +5 -5
  116. package/dist/{googlePlay-SX_jQeJf.cjs.map → googlePlay-CiqAS2ma.cjs.map} +1 -1
  117. package/dist/{index-DcyRA5Rf.d.mts → index-4CO0HD27.d.cts} +2 -2
  118. package/dist/{index-DcyRA5Rf.d.mts.map → index-4CO0HD27.d.cts.map} +1 -1
  119. package/dist/{index-DjLSMgAL.d.cts → index-DhUf0B0m.d.mts} +2 -2
  120. package/dist/{index-DjLSMgAL.d.cts.map → index-DhUf0B0m.d.mts.map} +1 -1
  121. package/dist/index.cjs +79 -80
  122. package/dist/index.cjs.map +1 -1
  123. package/dist/index.mjs +62 -63
  124. package/dist/index.mjs.map +1 -1
  125. package/dist/{local-BwC2v2Y8.mjs → local-B7Zv1NoA.mjs} +2 -2
  126. package/dist/{local-BwC2v2Y8.mjs.map → local-B7Zv1NoA.mjs.map} +1 -1
  127. package/dist/{local-DNhnkugT.cjs → local-OPC9BCZt.cjs} +3 -3
  128. package/dist/{local-DNhnkugT.cjs.map → local-OPC9BCZt.cjs.map} +1 -1
  129. package/dist/{migrate-DJa_Dlsl.mjs → migrate-BzCHT9qs.mjs} +2 -2
  130. package/dist/{migrate-DJa_Dlsl.mjs.map → migrate-BzCHT9qs.mjs.map} +1 -1
  131. package/dist/{migrate-BCz1lkh_.cjs → migrate-C-hmbjpG.cjs} +2 -2
  132. package/dist/{migrate-BCz1lkh_.cjs.map → migrate-C-hmbjpG.cjs.map} +1 -1
  133. package/dist/{migrate-0J6gsfrQ.mjs → migrate-CnbvrVag.mjs} +3 -3
  134. package/dist/{migrate-0J6gsfrQ.mjs.map → migrate-CnbvrVag.mjs.map} +1 -1
  135. package/dist/{migrate-CrtxXeGY.cjs → migrate-DeQJBexh.cjs} +3 -3
  136. package/dist/{migrate-CrtxXeGY.cjs.map → migrate-DeQJBexh.cjs.map} +1 -1
  137. package/dist/openapi.cjs +2 -2
  138. package/dist/openapi.d.cts +1 -1
  139. package/dist/openapi.d.mts +1 -1
  140. package/dist/openapi.mjs +2 -2
  141. package/dist/{publish-CuQlOW5p.mjs → publish-BISBrrqR.mjs} +2 -2
  142. package/dist/{publish-CuQlOW5p.mjs.map → publish-BISBrrqR.mjs.map} +1 -1
  143. package/dist/{publish-qSpnvmdX.cjs → publish-DtSIB-hZ.cjs} +2 -2
  144. package/dist/{publish-qSpnvmdX.cjs.map → publish-DtSIB-hZ.cjs.map} +1 -1
  145. package/dist/{ready-BOfogqzr.mjs → ready-DqsyadOs.mjs} +6 -6
  146. package/dist/{ready-BOfogqzr.mjs.map → ready-DqsyadOs.mjs.map} +1 -1
  147. package/dist/{ready-BFFP838V.cjs → ready-IVGu-q18.cjs} +6 -6
  148. package/dist/{ready-BFFP838V.cjs.map → ready-IVGu-q18.cjs.map} +1 -1
  149. package/dist/reconcile/public.cjs +2 -2
  150. package/dist/reconcile/public.d.cts +1 -2
  151. package/dist/reconcile/public.d.cts.map +1 -1
  152. package/dist/reconcile/public.d.mts +1 -2
  153. package/dist/reconcile/public.d.mts.map +1 -1
  154. package/dist/reconcile/public.mjs +2 -2
  155. package/dist/{resolve-j8hUcbGz.mjs → resolve-BT7fkPN5.mjs} +4 -4
  156. package/dist/{resolve-j8hUcbGz.mjs.map → resolve-BT7fkPN5.mjs.map} +1 -1
  157. package/dist/{resolve-AsfohXd1.cjs → resolve-C7GKQcE4.cjs} +4 -4
  158. package/dist/{resolve-AsfohXd1.cjs.map → resolve-C7GKQcE4.cjs.map} +1 -1
  159. package/dist/{rollback-Bxq_URgL.cjs → rollback-BEiB-Pje.cjs} +6 -6
  160. package/dist/{rollback-Bxq_URgL.cjs.map → rollback-BEiB-Pje.cjs.map} +1 -1
  161. package/dist/{rollback-JgbAY43C.mjs → rollback-DbP0KuDw.mjs} +6 -6
  162. package/dist/{rollback-JgbAY43C.mjs.map → rollback-DbP0KuDw.mjs.map} +1 -1
  163. package/dist/{runtime-DIZTeGJV.d.cts → runtime-BFJQNqwd.d.mts} +2 -2
  164. package/dist/{runtime-DIZTeGJV.d.cts.map → runtime-BFJQNqwd.d.mts.map} +1 -1
  165. package/dist/{runtime-WMLJY-db.d.mts → runtime-BJO-FFef.d.cts} +2 -2
  166. package/dist/{runtime-WMLJY-db.d.mts.map → runtime-BJO-FFef.d.cts.map} +1 -1
  167. package/dist/sandbox/credentials-worker.cjs +2 -2
  168. package/dist/sandbox/credentials-worker.mjs +2 -2
  169. package/dist/sandbox/discover-worker.cjs +1 -1
  170. package/dist/sandbox/discover-worker.mjs +1 -1
  171. package/dist/sandbox/migrate-worker.cjs +1 -1
  172. package/dist/sandbox/migrate-worker.mjs +1 -1
  173. package/dist/{seeds-BWC-qjSI.cjs → seeds-DOfxmDRO.cjs} +360 -32
  174. package/dist/seeds-DOfxmDRO.cjs.map +1 -0
  175. package/dist/{seeds-Dv78P9LS.mjs → seeds-rG-Evfz9.mjs} +339 -29
  176. package/dist/seeds-rG-Evfz9.mjs.map +1 -0
  177. package/dist/{serverSetup-CtV80a5M.cjs → serverSetup-CWWVcU6Y.cjs} +5 -5
  178. package/dist/{serverSetup-CtV80a5M.cjs.map → serverSetup-CWWVcU6Y.cjs.map} +1 -1
  179. package/dist/{serverSetup-DB6sKwAy.mjs → serverSetup-xGw1fxuZ.mjs} +5 -5
  180. package/dist/{serverSetup-DB6sKwAy.mjs.map → serverSetup-xGw1fxuZ.mjs.map} +1 -1
  181. package/dist/{sniffer-ctpwBBkT.cjs → sniffer-C7O9Pna_.cjs} +8 -8
  182. package/dist/{sniffer-ctpwBBkT.cjs.map → sniffer-C7O9Pna_.cjs.map} +1 -1
  183. package/dist/{sniffer-qDFUQmWP.mjs → sniffer-DVPgfyHr.mjs} +8 -8
  184. package/dist/{sniffer-qDFUQmWP.mjs.map → sniffer-DVPgfyHr.mjs.map} +1 -1
  185. package/dist/{dns-Bmnuttja.cjs → snsSubscriptions-CSkteK2J.cjs} +338 -2
  186. package/dist/snsSubscriptions-CSkteK2J.cjs.map +1 -0
  187. package/dist/{dns-DFvO5a53.mjs → snsSubscriptions-CvBIGGp0.mjs} +279 -3
  188. package/dist/snsSubscriptions-CvBIGGp0.mjs.map +1 -0
  189. package/dist/{sst-C1pxbFEd.mjs → sst-CTqZZl1_.mjs} +3 -4
  190. package/dist/{sst-C1pxbFEd.mjs.map → sst-CTqZZl1_.mjs.map} +1 -1
  191. package/dist/{sst-B-Uz4cvm.cjs → sst-lEkBwzGc.cjs} +4 -5
  192. package/dist/{sst-B-Uz4cvm.cjs.map → sst-lEkBwzGc.cjs.map} +1 -1
  193. package/dist/{stage-C7lf36az.mjs → stage-2EKpzPQ1.mjs} +5 -5
  194. package/dist/{stage-C7lf36az.mjs.map → stage-2EKpzPQ1.mjs.map} +1 -1
  195. package/dist/{stage-DzALYUwY.cjs → stage-fRfFtLwj.cjs} +6 -6
  196. package/dist/{stage-DzALYUwY.cjs.map → stage-fRfFtLwj.cjs.map} +1 -1
  197. package/dist/target/public.cjs +1 -1
  198. package/dist/target/public.d.cts +2 -2
  199. package/dist/target/public.d.mts +2 -2
  200. package/dist/target/public.mjs +1 -1
  201. package/dist/{terminal-CW_dWeTe.mjs → terminal-BAVrDhhN.mjs} +3 -3
  202. package/dist/{terminal-CW_dWeTe.mjs.map → terminal-BAVrDhhN.mjs.map} +1 -1
  203. package/dist/{terminal-DJlqcW_U.cjs → terminal-D1aeTkgv.cjs} +3 -3
  204. package/dist/{terminal-DJlqcW_U.cjs.map → terminal-D1aeTkgv.cjs.map} +1 -1
  205. package/dist/{types-C8gXOLWL.d.mts → types-CFU2uvrz.d.cts} +242 -3
  206. package/dist/types-CFU2uvrz.d.cts.map +1 -0
  207. package/dist/{types-Q2SC_ly2.d.cts → types-D3BeGucy.d.mts} +241 -4
  208. package/dist/types-D3BeGucy.d.mts.map +1 -0
  209. package/dist/vitest.cjs +1 -1
  210. package/dist/vitest.mjs +1 -1
  211. package/dist/workspace/index.d.cts +2 -2
  212. package/dist/workspace/index.d.mts +2 -2
  213. package/package.json +15 -15
  214. package/dist/SubscriberGenerator-C8CPxrCK.cjs.map +0 -1
  215. package/dist/SubscriberGenerator-y3pncae_.mjs.map +0 -1
  216. package/dist/compose-ChVvb3xM.cjs.map +0 -1
  217. package/dist/compose-cHkF---f.mjs.map +0 -1
  218. package/dist/config-B3iz9BtK.d.cts.map +0 -1
  219. package/dist/config-DrOX29sT.d.mts.map +0 -1
  220. package/dist/credentials-B5N5yKk6.mjs.map +0 -1
  221. package/dist/credentials-Zqr3QQYB.cjs.map +0 -1
  222. package/dist/deploy-BffR_uEN.cjs.map +0 -1
  223. package/dist/deploy-DO4djCHb.mjs.map +0 -1
  224. package/dist/discover-C08meHhu.d.mts +0 -125
  225. package/dist/discover-C08meHhu.d.mts.map +0 -1
  226. package/dist/discover-C5roJuc9.mjs.map +0 -1
  227. package/dist/discover-DipvfWpK.d.cts +0 -125
  228. package/dist/discover-DipvfWpK.d.cts.map +0 -1
  229. package/dist/discover-DozUKs8f.cjs.map +0 -1
  230. package/dist/dns-Bmnuttja.cjs.map +0 -1
  231. package/dist/dns-DFvO5a53.mjs.map +0 -1
  232. package/dist/emit-C1e8qD08.mjs.map +0 -1
  233. package/dist/emit-Dmc1nvdS.cjs.map +0 -1
  234. package/dist/github-9RlA7EjN.mjs.map +0 -1
  235. package/dist/github-D56PSK39.cjs.map +0 -1
  236. package/dist/run-BJLIerMM.mjs +0 -133
  237. package/dist/run-BJLIerMM.mjs.map +0 -1
  238. package/dist/run-fVZ-rLnc.cjs +0 -174
  239. package/dist/run-fVZ-rLnc.cjs.map +0 -1
  240. package/dist/sandbox-Co1y2CmF.d.mts +0 -104
  241. package/dist/sandbox-Co1y2CmF.d.mts.map +0 -1
  242. package/dist/sandbox-DvNqr6od.d.cts +0 -104
  243. package/dist/sandbox-DvNqr6od.d.cts.map +0 -1
  244. package/dist/seeds-BWC-qjSI.cjs.map +0 -1
  245. package/dist/seeds-Dv78P9LS.mjs.map +0 -1
  246. package/dist/types-C8gXOLWL.d.mts.map +0 -1
  247. package/dist/types-Q2SC_ly2.d.cts.map +0 -1
@@ -1,15 +1,15 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
2
2
  import { t as GkmError } from "./errors-D8Gwp5kU.mjs";
3
- import { a as runOutput, i as run } from "./run-BJLIerMM.mjs";
3
+ import { c as runOutput, s as run } from "./credentials-DpfnUvIR.mjs";
4
4
  import { B as LOGS_PORT, I as otlpTelemetryEnv, L as resolveStageTelemetry, at as certificateFor, ft as SERVER_IPV4_KEY, ht as isReservedStageKey, it as ComposeTlsFileMissing, ot as proxyFor, z as telemetryEnv } from "./workspace-DUnnVjqC.mjs";
5
- import { E as stageBackups, a as serverAddressHint, b as stackBackups, d as passwordSites, f as siteAuth, h as BACKUPS_SERVICE, i as requiredServerAddress, l as systemLookup, m as withSitePasswords, o as stackHosts, p as siteNames, r as isLocalHost, s as stageDns, t as HostNotPointingAtServer, v as backupsRoleStatements, y as backupsService } from "./dns-DFvO5a53.mjs";
5
+ import { A as stackBackups, C as siteNames, I as stageBackups, O as backupsRoleStatements, S as siteAuth, T as BACKUPS_SERVICE, a as subscriptionKey, c as HostNotPointingAtServer, d as requiredServerAddress, f as serverAddressHint, g as systemLookup, i as recordedPushSubscriptions, k as backupsService, m as stageDns, n as SUBSCRIPTION_TYPE, o as subscriptionResource, p as stackHosts, r as confirmPendingSubscriptions, s as topicConnection, t as PushSubscriptionsUnconfirmed, u as isLocalHost, w as withSitePasswords, x as passwordSites } from "./snsSubscriptions-CvBIGGp0.mjs";
6
6
  import { t as defineTarget } from "./define-6poNqm5O.mjs";
7
- import { $n as stackLogs, $t as publicBuildValues, An as localRolePassword, B as workerDockerfile, Bn as EMULATOR_ACCESS_KEY_ID, Bt as initStageSecrets, Cn as REDIS_SERVICE, Ct as composeFor, Dn as stackRedis, En as runsRedis, Fn as isTelemetryKey, Gn as portKeys, Gt as composeBuildPaths, Hn as DEFAULT_IMAGES, In as scopeTelemetryEnv, Jn as primaryPortKey, Jt as WORKER_PORT, Kt as imageLayout, L as appDockerfile, Mn as planFor, N as stageProviderNotes, On as withRedisPassword, Qn as logsService, Rn as telemetryOf, S as recordRelease, Sn as withGeneratedSecrets, Tn as redisService, Vn as hostFor, Xn as LOGS_SERVICE, Xt as findBuildRoot, Zn as logsAccess, a as dnsResources, an as applyPostgres, at as suppliedOnly, bt as bucketClient, c as currentActor, ct as networkEnv, d as DeployJournal, er as withLogsPassword, et as devServicesUsed, fn as LOCAL_RABBITMQ_USER, ft as constructGlobs, hn as postgresSuperuser, in as applyPolicies, it as stageServiceDeclarations, kn as envFor, ln as postgresStatements, lt as workerEnvKeys, n as reportDatabaseRuns, nn as applyBuckets, nr as isMainFrontendApp, o as forgetDnsResource, on as bucketLifecycles, ot as appEnvKeys, pn as loadLocalCredentials, q as validateImageRef, qt as TURBO_VERSION, r as reportPlannedSeeds, rn as applyLifecycles, rr as resolveHost, s as recordDnsChanges, sn as bucketPolicies, t as DeploySeedsFailed, tn as workerUnits, tr as NoDomainForStage, tt as externalServices, v as createComposeState, vt as LEGACY_LOCAL_LOGIN, wn as STACK_CACHE, xt as pgClient, yt as ensurePostgresLogin, z as ensureDockerignore, zn as usesTelemetry } from "./seeds-Dv78P9LS.mjs";
7
+ import { $n as LOGS_SERVICE, $t as publicBuildValues, An as envFor, B as workerDockerfile, Bn as usesTelemetry, Bt as initStageSecrets, Cn as withGeneratedSecrets, Ct as composeFor, Dn as runsRedis, En as redisService, Gn as DEFAULT_IMAGES, Gt as composeBuildPaths, Hn as watchedBuckets, In as isTelemetryKey, Jn as portKeys, Jt as WORKER_PORT, Kt as imageLayout, L as appDockerfile, Ln as scopeTelemetryEnv, N as stageProviderNotes, Nn as planFor, On as stackRedis, S as recordRelease, Tn as STACK_CACHE, Un as EMULATOR_ACCESS_KEY_ID, Vn as minioWebhookEnv, Wn as hostFor, Xt as findBuildRoot, Zn as primaryPortKey, a as dnsResources, an as applyPolicies, ar as isMainFrontendApp, at as suppliedOnly, bt as bucketClient, c as currentActor, cn as bucketPolicies, ct as networkEnv, d as DeployJournal, er as logsAccess, et as devServicesUsed, ft as constructGlobs, gn as postgresSuperuser, in as applyNotifications, ir as NoDomainForStage, it as stageServiceDeclarations, jn as localRolePassword, kn as withRedisPassword, lt as workerEnvKeys, mn as loadLocalCredentials, n as reportDatabaseRuns, nn as applyBuckets, nr as stackLogs, o as forgetDnsResource, on as applyPostgres, or as resolveHost, ot as appEnvKeys, pn as LOCAL_RABBITMQ_USER, q as validateImageRef, qt as TURBO_VERSION, r as reportPlannedSeeds, rn as applyLifecycles, rr as withLogsPassword, s as recordDnsChanges, sn as bucketLifecycles, t as DeploySeedsFailed, tn as workerUnits, tr as logsService, tt as externalServices, un as postgresStatements, v as createComposeState, vt as LEGACY_LOCAL_LOGIN, wn as REDIS_SERVICE, xt as pgClient, yt as ensurePostgresLogin, z as ensureDockerignore, zn as telemetryOf } from "./seeds-rG-Evfz9.mjs";
8
8
  import { t as appKey } from "./derive-B4vDpzgP.mjs";
9
- import { n as subscriberRoute, s as DEFAULT_EVENTS } from "./SubscriberGenerator-y3pncae_.mjs";
9
+ import { a as SNS_SUBSCRIPTIONS_KEY, l as DEFAULT_EVENTS, o as objectsRoute, s as subscriberRoute } from "./SubscriberGenerator-COAVPgM-.mjs";
10
10
  import { a as imageRef } from "./identity-CBXr4wNi.mjs";
11
- import { i as discover } from "./discover-C5roJuc9.mjs";
12
- import { i as installedFrom } from "./drivers-BjGDYfnC.mjs";
11
+ import { i as discover } from "./discover-BvJOVsYG.mjs";
12
+ import { i as installedFrom } from "./drivers-Chb5Akov.mjs";
13
13
  import { f as plannedSeeds, o as SeedFailed, p as seedDatabases, u as migrateDatabases } from "./databases-BPOgTn1u.mjs";
14
14
  import { dirname, join } from "node:path";
15
15
  import { existsSync } from "node:fs";
@@ -1443,9 +1443,20 @@ function composeStack(input) {
1443
1443
  ...credential.containers.minio,
1444
1444
  buckets,
1445
1445
  policies: bucketPolicies(plan).filter((p) => buckets.includes(p.bucket)),
1446
+ objects: services.minio.map((id) => ({
1447
+ id,
1448
+ name: byId.get(id)?.name
1449
+ })).filter((b) => Boolean(b.name)).sort((a, b) => a.name.localeCompare(b.name)),
1450
+ webhooks: [],
1446
1451
  lifecycles: bucketLifecycles(plan).filter((l) => buckets.includes(l.bucket))
1447
1452
  };
1448
1453
  })() : void 0;
1454
+ const bucketEventKeys = /* @__PURE__ */ new Map();
1455
+ for (const resource of plan.resources) {
1456
+ if (resource.kind !== "objects") continue;
1457
+ bucketEventKeys.set(provideKey(resource.id, "eventsConnectionString"), resource.id);
1458
+ bucketEventKeys.set(provideKey(resource.id, "eventsToken"), resource.id);
1459
+ }
1449
1460
  const fileServers = /* @__PURE__ */ new Map();
1450
1461
  if (storage) for (const resource of plan.resources) {
1451
1462
  if (resource.kind !== "file-server" || !resource.of) continue;
@@ -1490,7 +1501,8 @@ function composeStack(input) {
1490
1501
  project: workspace.name,
1491
1502
  credentials: credential.containers,
1492
1503
  seed: credential.seed,
1493
- ...!local && domain ? { mailFrom: `noreply@${domain}` } : {}
1504
+ ...!local && domain ? { mailFrom: `noreply@${domain}` } : {},
1505
+ relayedBuckets: [...watchedBuckets(manifest, input.subscribers ?? {}).keys()].filter((bucket) => services.minio.includes(bucket))
1494
1506
  };
1495
1507
  const outside = networkEnv(plan, {
1496
1508
  ...derivation,
@@ -1508,6 +1520,11 @@ function composeStack(input) {
1508
1520
  */
1509
1521
  const valueFor = (app, key, owner) => {
1510
1522
  if (isReservedStageKey(key)) return void 0;
1523
+ const watching = bucketEventKeys.get(key);
1524
+ if (watching) {
1525
+ if (custom[key] !== void 0) return custom[key];
1526
+ return services.minio.includes(watching) ? outside[key] : void 0;
1527
+ }
1511
1528
  if (!local && owner?.kind === "email" && key.endsWith("_INBOX_URL")) return;
1512
1529
  if (owner && SERVICE_KINDS[owner.kind]) {
1513
1530
  if (custom[key] !== void 0) return custom[key];
@@ -1609,13 +1626,28 @@ function composeStack(input) {
1609
1626
  serviceName: worker.name,
1610
1627
  ...telemetryValues ? { telemetry: telemetryValues } : {}
1611
1628
  }),
1612
- ...push ? { [SUBSCRIBER_PUSH_URL_KEY]: push.url } : {},
1629
+ ...push && !input.recordingSubscriptions ? { [SNS_SUBSCRIPTIONS_KEY]: recordedSubscriptions(worker, push, input.pushSubscriptions?.[worker.id]) } : {},
1613
1630
  NODE_ENV: "production",
1614
1631
  PORT: String(worker.port),
1615
1632
  STAGE: stage
1616
1633
  };
1617
1634
  for (const [key, value] of Object.entries(worker.env)) if (/[\r\n]/.test(value)) throw new EnvValueMultiline(worker.name, key);
1618
1635
  }
1636
+ if (storage && !input.buildOnly) {
1637
+ const watched = watchedBuckets(manifest, input.subscribers ?? {});
1638
+ for (const [bucket, workerId] of watched) {
1639
+ if (!services.minio.includes(bucket)) continue;
1640
+ const worker = workers.find((w) => w.id === workerId);
1641
+ const relay = worker?.env?.[provideKey(bucket, "eventsConnectionString")];
1642
+ const token = worker?.env?.[provideKey(bucket, "eventsToken")];
1643
+ if (!worker || !relay || relay.startsWith("sns:") || !token) continue;
1644
+ storage.webhooks.push({
1645
+ bucket,
1646
+ endpoint: `http://${hostOf(worker.name)}:${worker.port}${objectsRoute(bucket)}`,
1647
+ token
1648
+ });
1649
+ }
1650
+ }
1619
1651
  const deployedTls = certificate ? {
1620
1652
  kind: "files",
1621
1653
  ...proxy === "caddy" ? {
@@ -1795,29 +1827,61 @@ function stackApps(workspace, manifest, plan, options) {
1795
1827
  }
1796
1828
  return apps.sort((a, b) => a.name.localeCompare(b.name));
1797
1829
  }
1798
- /** What the worker reads the public base of its push routes from. */
1799
- const SUBSCRIBER_PUSH_URL_KEY = "GKM_SUBSCRIBER_PUSH_URL";
1800
1830
  /**
1801
1831
  * Where SNS pushes to a worker on a deployed stage, or nothing when it pushes
1802
1832
  * to none of its subscribers.
1803
1833
  *
1804
- * A subscriber is pushed to when its topic's connection string, as this stage
1805
- * resolved it for the worker, is an SNS one — the same test the worker's own
1834
+ * A subscriber is pushed to when the connection string its deliveries come
1835
+ * from — its topic's, or its bucket's events — as this stage resolved it for
1836
+ * the worker, is an SNS one — the same test the worker's own
1806
1837
  * startup makes, so the edge exposes a route exactly when the worker mounts
1807
1838
  * it. Each such route, and nothing else the worker serves, answers on
1808
1839
  * `<worker>.<domain>`.
1809
1840
  */
1810
1841
  function workerPush(worker, subscribers, env, options) {
1811
- const paths = subscribers.filter(({ topic }) => env[provideKey(topic, "publisherConnectionString")]?.startsWith("sns:")).map(({ name }) => subscriberRoute(name)).sort();
1812
- if (paths.length === 0) return void 0;
1842
+ const pushed = subscribers.filter(({ connectionKey }) => env[connectionKey]?.startsWith("sns:")).filter((subscriber, index, all) => all.findIndex((s) => s.name === subscriber.name) === index).sort((a, b) => a.name.localeCompare(b.name));
1843
+ if (pushed.length === 0) return void 0;
1813
1844
  if (!options.domain) throw new NoDomainForStage(options.stage);
1814
1845
  const host = `${worker.name}.${options.domain}`;
1846
+ const url = `https://${host}`;
1815
1847
  return {
1816
1848
  host,
1817
- url: `https://${host}`,
1818
- paths: [...new Set(paths)]
1849
+ url,
1850
+ paths: pushed.map(({ name }) => subscriberRoute(name)),
1851
+ subscribers: pushed.map(({ name, connectionKey, events }) => ({
1852
+ name,
1853
+ connectionKey,
1854
+ endpoint: `${url}${subscriberRoute(name)}`,
1855
+ ...events ? { events } : {}
1856
+ }))
1819
1857
  };
1820
1858
  }
1859
+ /** A pushed subscriber the deploy recorded no SNS subscription for. */
1860
+ var PushSubscriptionMissing = class extends GkmError {
1861
+ worker;
1862
+ subscriber;
1863
+ constructor(worker, subscriber) {
1864
+ super(`SNS pushes to '${subscriber}' on the worker '${worker}', and the deploy recorded no subscription for it, so the worker would mount no route and SNS would deliver nowhere. Deploy the stage, which subscribes each pushed subscriber and records its ARN.`);
1865
+ this.worker = worker;
1866
+ this.subscriber = subscriber;
1867
+ this.name = "PushSubscriptionMissing";
1868
+ }
1869
+ };
1870
+ /**
1871
+ * The worker's `GKM_SNS_SUBSCRIPTIONS`: each pushed subscriber's recorded
1872
+ * subscription ARN, and nothing for a subscriber it does not run.
1873
+ *
1874
+ * @throws {PushSubscriptionMissing} when one has none
1875
+ */
1876
+ function recordedSubscriptions(worker, push, recorded = {}) {
1877
+ const arns = {};
1878
+ for (const { name } of push.subscribers) {
1879
+ const arn = recorded[name];
1880
+ if (!arn) throw new PushSubscriptionMissing(worker.name, name);
1881
+ arns[name] = arn;
1882
+ }
1883
+ return JSON.stringify(arns);
1884
+ }
1821
1885
  /** Two constructs the edge would answer on one host. */
1822
1886
  var EdgeHostTaken = class extends GkmError {
1823
1887
  host;
@@ -1897,7 +1961,8 @@ function stackFile(options) {
1897
1961
  minio.environment = {
1898
1962
  ...minio.environment,
1899
1963
  MINIO_ROOT_USER: options.storage.user,
1900
- MINIO_ROOT_PASSWORD: options.storage.password
1964
+ MINIO_ROOT_PASSWORD: options.storage.password,
1965
+ ...minioWebhookEnv(options.storage.webhooks)
1901
1966
  };
1902
1967
  minio.ports = ["127.0.0.1::9000"];
1903
1968
  }
@@ -2265,6 +2330,119 @@ var ComposeAppsUnhealthy = class extends GkmError {
2265
2330
  }
2266
2331
  };
2267
2332
  //#endregion
2333
+ //#region src/target/compose/topicSubscriptions.ts
2334
+ /**
2335
+ * Every topic subscriber the stack pushes to: a subscriber whose connection
2336
+ * key is a topic's publisher string — a bucket's events key is not — and
2337
+ * whose value on this stage is an SNS one.
2338
+ */
2339
+ function topicPushes(stack, manifest) {
2340
+ const topicKeys = new Set(Object.values(manifest).filter((declaration) => declaration.kind === "topic").map((topic) => provideKey(topic.id, "publisherConnectionString")));
2341
+ const pushes = [];
2342
+ for (const worker of stack.workers) for (const subscriber of worker.push?.subscribers ?? []) {
2343
+ if (!topicKeys.has(subscriber.connectionKey)) continue;
2344
+ const connectionString = worker.env?.[subscriber.connectionKey];
2345
+ if (!connectionString?.startsWith("sns:")) continue;
2346
+ pushes.push({
2347
+ worker: worker.id,
2348
+ name: subscriber.name,
2349
+ endpoint: subscriber.endpoint,
2350
+ connectionKey: subscriber.connectionKey,
2351
+ connectionString,
2352
+ ...subscriber.events ? { events: subscriber.events } : {}
2353
+ });
2354
+ }
2355
+ return pushes;
2356
+ }
2357
+ /** The subscriptions recorded for hand-set topics: those with a key. */
2358
+ function recordedTopicSubscriptions(resources) {
2359
+ return Object.values(resources ?? {}).filter((record) => record.type === "sns-subscription" && typeof record.data?.connectionKey === "string");
2360
+ }
2361
+ /**
2362
+ * Converge each hand-set topic's subscriptions on the subscribers pushed to:
2363
+ * subscribe, bring filters up to date, unsubscribe a route on the worker's
2364
+ * host no subscriber wants any more — and record each ARN, forgetting what
2365
+ * was removed.
2366
+ *
2367
+ * @returns each worker's subscriptions, by export — what it is handed
2368
+ */
2369
+ async function ensureTopicSubscriptions(input) {
2370
+ const { snsUrl, reconcileHttpSubscriptions } = await import("@geekmidas/events/sns");
2371
+ const groups = /* @__PURE__ */ new Map();
2372
+ const group = (topicArn, host, connectionKey) => {
2373
+ const id = `${topicArn}|${host}`;
2374
+ const found = groups.get(id);
2375
+ if (found) return found;
2376
+ const created = {
2377
+ topicArn,
2378
+ host,
2379
+ connectionKey,
2380
+ pushes: [],
2381
+ recorded: []
2382
+ };
2383
+ groups.set(id, created);
2384
+ return created;
2385
+ };
2386
+ for (const push of input.pushes) {
2387
+ const { topicArn } = snsUrl.parse(push.connectionString);
2388
+ const into = group(topicArn, new URL(push.endpoint).host, push.connectionKey);
2389
+ into.connectionString = push.connectionString;
2390
+ into.pushes.push(push);
2391
+ }
2392
+ for (const record of recordedTopicSubscriptions(input.recorded)) group(String(record.data?.topicArn), new URL(String(record.data?.endpoint)).host, String(record.data?.connectionKey)).recorded.push(record);
2393
+ const wanted = new Set(input.pushes.map(({ worker, name }) => subscriptionKey(worker, name)));
2394
+ const arns = {};
2395
+ for (const { topicArn, host, connectionKey, ...members } of groups.values()) {
2396
+ const stale = members.recorded.filter((r) => !wanted.has(r.key));
2397
+ const named = members.connectionString ?? input.secrets[connectionKey];
2398
+ if (!named?.startsWith("sns:")) {
2399
+ for (const record of stale) {
2400
+ input.log(` – forgot ${record.data?.endpoint}: '${connectionKey}' no longer names an SNS topic to unsubscribe it from`);
2401
+ await input.forget(record.key);
2402
+ }
2403
+ continue;
2404
+ }
2405
+ const address = new URL(named);
2406
+ address.searchParams.set("topicArn", topicArn);
2407
+ const connection = await topicConnection({
2408
+ connectionKey,
2409
+ connectionString: address.toString(),
2410
+ stage: input.stage,
2411
+ env: input.env
2412
+ });
2413
+ const result = await reconcileHttpSubscriptions(connection, {
2414
+ endpoints: members.pushes.map((push) => ({
2415
+ name: push.name,
2416
+ endpoint: push.endpoint,
2417
+ ...push.events ? { events: push.events } : {}
2418
+ })),
2419
+ ownedHost: host
2420
+ });
2421
+ await connection.close();
2422
+ for (const push of members.pushes) {
2423
+ const arn = result.subscriptions[push.name];
2424
+ const key = subscriptionKey(push.worker, push.name);
2425
+ if (input.recorded?.[key]?.id !== arn) input.log(` ✓ '${push.name}' subscribed to ${topicArn.split(":").pop()} at ${push.endpoint}`);
2426
+ await input.record(subscriptionResource({
2427
+ worker: push.worker,
2428
+ name: push.name,
2429
+ topicArn,
2430
+ endpoint: push.endpoint,
2431
+ connectionKey: push.connectionKey,
2432
+ pending: result.pending.includes(push.name),
2433
+ ...push.events ? { events: push.events } : {}
2434
+ }, arn));
2435
+ arns[push.worker] = {
2436
+ ...arns[push.worker],
2437
+ [push.name]: arn
2438
+ };
2439
+ }
2440
+ for (const arn of result.removed) input.log(` – unsubscribed ${arn}: no subscriber wants it any more`);
2441
+ for (const record of stale) await input.forget(record.key);
2442
+ }
2443
+ return arns;
2444
+ }
2445
+ //#endregion
2268
2446
  //#region src/target/compose/phases.ts
2269
2447
  /**
2270
2448
  * The compose target's phases: a stage as one Docker Compose stack behind
@@ -2415,8 +2593,9 @@ async function validateCompose(ctx, deps, options = {}) {
2415
2593
  subscribers
2416
2594
  });
2417
2595
  const { secrets, generated } = await stageSecrets(ctx, manifest);
2596
+ const recorded = push ? void 0 : await ctx.state.read(stage);
2418
2597
  const layout = mode === "build" ? imageLayout(workspace) : void 0;
2419
- const composed = composeStack({
2598
+ const input = {
2420
2599
  workspace,
2421
2600
  manifest,
2422
2601
  runnables,
@@ -2435,9 +2614,24 @@ async function validateCompose(ctx, deps, options = {}) {
2435
2614
  ports: edgePorts(deps.env),
2436
2615
  ...layout ? { layout } : {},
2437
2616
  ...push ? { buildOnly: true } : {}
2617
+ };
2618
+ const recordedArns = recordedPushSubscriptions(recorded?.resources);
2619
+ const planned = push ? void 0 : composeStack({
2620
+ ...input,
2621
+ recordingSubscriptions: true
2622
+ });
2623
+ const pushes = planned ? topicPushes(planned, manifest) : [];
2624
+ const topics = planned && (pushes.length > 0 || recordedTopicSubscriptions(recorded?.resources).length > 0) ? {
2625
+ pushes,
2626
+ recorded: recorded?.resources
2627
+ } : void 0;
2628
+ const composed = topics && planned ? planned : composeStack({
2629
+ ...input,
2630
+ pushSubscriptions: recordedArns
2438
2631
  });
2439
2632
  if (mode === "build") assertRedisClient(workspace, composed, manifest, runnables);
2440
- const stack = options.pin ? withPinnedImages(composed, options.pin.file, options.pin.digests) : composed;
2633
+ const pinned = (unpinned) => options.pin ? withPinnedImages(unpinned, options.pin.file, options.pin.digests) : unpinned;
2634
+ const stack = pinned(composed);
2441
2635
  if (mode === "pull" && !ctx.dryRun) await assertImagesExist(deps.docker, tag, [...stack.apps, ...stack.workers]);
2442
2636
  if (stack.redis && !stack.local) ctx.secrets.mask(stack.redis.password);
2443
2637
  if (stack.logs && (!stack.local || stack.logs.passwordFromSecrets)) {
@@ -2455,7 +2649,6 @@ async function validateCompose(ctx, deps, options = {}) {
2455
2649
  const override = stackOverrideFile(root, stage);
2456
2650
  const overrides = existsSync(override) ? [override] : [];
2457
2651
  if (overrides.length > 0) ctx.logger.info(`🧩 Merging docker-compose.${stage}.yml over the generated stack`);
2458
- const recorded = push ? void 0 : await ctx.state.read(stage);
2459
2652
  const previous = Object.fromEntries(Object.entries(recorded?.state.releases ?? {}).map(([name, releases]) => {
2460
2653
  const { ref, tag, digest } = releases.current;
2461
2654
  return [name, {
@@ -2468,6 +2661,20 @@ async function validateCompose(ctx, deps, options = {}) {
2468
2661
  mode,
2469
2662
  push,
2470
2663
  stack,
2664
+ ...topics ? { topicSubscriptions: {
2665
+ ...topics,
2666
+ restack: (arns) => {
2667
+ const merged = { ...recordedArns };
2668
+ for (const [worker, own] of Object.entries(arns)) merged[worker] = {
2669
+ ...merged[worker],
2670
+ ...own
2671
+ };
2672
+ return pinned(composeStack({
2673
+ ...input,
2674
+ pushSubscriptions: merged
2675
+ }));
2676
+ }
2677
+ } } : {},
2471
2678
  ...server ? { server } : {},
2472
2679
  dir,
2473
2680
  ref: {
@@ -2702,6 +2909,16 @@ async function planCompose(ctx, run) {
2702
2909
  action: run.previous[worker.name] ? "reuse" : "create"
2703
2910
  });
2704
2911
  }
2912
+ for (const push of run.topicSubscriptions?.pushes ?? []) {
2913
+ const key = subscriptionKey(push.worker, push.name);
2914
+ const id = run.topicSubscriptions?.recorded?.[key]?.id;
2915
+ planned({
2916
+ key,
2917
+ resourceType: SUBSCRIPTION_TYPE,
2918
+ action: id ? "reuse" : "create",
2919
+ ...id ? { id } : {}
2920
+ });
2921
+ }
2705
2922
  if (!run.push) planned({
2706
2923
  key: run.stack.proxy === "caddy" ? "service:caddy" : `service:${EDGE_PROJECT}/${EDGE_SERVICE}`,
2707
2924
  resourceType: "service",
@@ -2714,7 +2931,7 @@ async function planCompose(ctx, run) {
2714
2931
  * migrations applied.
2715
2932
  */
2716
2933
  async function provisionCompose(ctx, run, deps) {
2717
- const { stack, ref } = run;
2934
+ const { ref } = run;
2718
2935
  if (run.push) return;
2719
2936
  if (run.generated.length > 0 && run.secrets) {
2720
2937
  await ctx.secrets.write(run.secrets);
@@ -2722,11 +2939,13 @@ async function provisionCompose(ctx, run, deps) {
2722
2939
  }
2723
2940
  const ports = edgePorts(deps.env);
2724
2941
  await assertEdgePorts(deps.docker, {
2725
- project: stack.project,
2726
- proxy: stack.proxy,
2942
+ project: run.stack.project,
2943
+ proxy: run.stack.proxy,
2727
2944
  ports,
2728
2945
  engine: ref
2729
2946
  });
2947
+ if (run.topicSubscriptions) await subscribeTopics(ctx, run, deps);
2948
+ const { stack } = run;
2730
2949
  run.files = await writeStack(ctx.cwd, run.dir, stack);
2731
2950
  printPlan(ctx, run);
2732
2951
  if (stack.proxy === "traefik") {
@@ -2765,6 +2984,36 @@ async function provisionCompose(ctx, run, deps) {
2765
2984
  if (stack.storage && stack.infra.includes("minio")) await prepareBuckets(ctx, run, deps);
2766
2985
  }
2767
2986
  /**
2987
+ * Subscribe each topic subscriber SNS pushes to — for a topic the stage set
2988
+ * to SNS by hand — record the ARNs, and compose the stack again with them,
2989
+ * before a file is written.
2990
+ */
2991
+ async function subscribeTopics(ctx, run, deps) {
2992
+ const { pushes, recorded, restack } = run.topicSubscriptions;
2993
+ if (pushes.length > 0) ctx.logger.info("\n📮 SNS subscriptions for the stage's own topics");
2994
+ run.stack = restack(await ensureTopicSubscriptions({
2995
+ pushes,
2996
+ recorded,
2997
+ secrets: run.secrets?.custom ?? {},
2998
+ stage: ctx.stage,
2999
+ env: deps.env,
3000
+ record: async (resource) => {
3001
+ await ctx.state.putResource(ctx.stage, resource);
3002
+ applied(ctx, run, {
3003
+ key: resource.key,
3004
+ resourceType: SUBSCRIPTION_TYPE,
3005
+ action: "ensure",
3006
+ id: resource.id,
3007
+ via: recorded?.[resource.key]?.id === resource.id ? "recorded" : "created"
3008
+ });
3009
+ },
3010
+ forget: async (key) => {
3011
+ await ctx.state.deleteResource(ctx.stage, key);
3012
+ },
3013
+ log: (line) => ctx.logger.info(line)
3014
+ }));
3015
+ }
3016
+ /**
2768
3017
  * Create each bucket the stack's MinIO serves, and the open paths of each
2769
3018
  * one a file server fronts — from this machine, on MinIO's loopback port,
2770
3019
  * the way `gkm dev` creates them.
@@ -2779,7 +3028,8 @@ async function prepareBuckets(ctx, run, deps) {
2779
3028
  done = [
2780
3029
  ...await applyBuckets(client, storage.buckets),
2781
3030
  ...await applyPolicies(client, storage.policies),
2782
- ...await applyLifecycles(client, storage.lifecycles)
3031
+ ...await applyLifecycles(client, storage.lifecycles),
3032
+ ...await applyNotifications(client, storage.objects, new Set(storage.webhooks.map((hook) => hook.bucket)))
2783
3033
  ];
2784
3034
  } finally {
2785
3035
  await tunnel.close();
@@ -3011,9 +3261,33 @@ async function verifyCompose(ctx, run, deps) {
3011
3261
  }));
3012
3262
  if (down.length > 0) throw new ComposeAppsUnhealthy(stack.project, down, stack.proxy);
3013
3263
  await pruneStageDns(ctx, run);
3264
+ await confirmSubscriptions(ctx, run, deps);
3014
3265
  if (stack.logs) reportLogs(ctx, stack.logs, stack.local, run.server);
3015
3266
  }
3016
3267
  /**
3268
+ * The SNS subscriptions the stage's providers made before the workers were
3269
+ * up: each still pending is subscribed again, so SNS resends its
3270
+ * confirmation to a worker now there to answer it, and waited on. One still
3271
+ * pending after that is said, not failed on — every app is healthy, and
3272
+ * rolling them back would not confirm it.
3273
+ */
3274
+ async function confirmSubscriptions(ctx, run, deps) {
3275
+ const stored = await ctx.state.read(ctx.stage);
3276
+ const left = await (deps.confirmSubscriptions ?? confirmPendingSubscriptions)({
3277
+ workspace: ctx.workspace,
3278
+ stage: ctx.stage,
3279
+ secrets: run.secrets?.custom ?? {},
3280
+ resources: stored?.resources,
3281
+ env: deps.env,
3282
+ log: (line) => ctx.logger.info(line),
3283
+ record: async (record) => {
3284
+ const { updatedAt: _, updatedBy: __, ...input } = record;
3285
+ await ctx.state.putResource(ctx.stage, input);
3286
+ }
3287
+ });
3288
+ if (left.length > 0) ctx.logger.warn(`⚠ ${new PushSubscriptionsUnconfirmed(left).message}`);
3289
+ }
3290
+ /**
3017
3291
  * A container's own health check, as Docker reports it: a worker's, which
3018
3292
  * has no route through the edge, and OpenObserve's — by default it has no
3019
3293
  * host there, and served publicly it answers only the addresses it allows,
@@ -3333,4 +3607,4 @@ function composeTarget(options = {}) {
3333
3607
  //#endregion
3334
3608
  export { dockerCompose as C, sshTarget as S, parseDigests as _, edgePorts as a, dockerHost as b, edgeRef as c, composeStack as d, derivedCredentials as f, edgeAlias as g, EDGE_PROJECT as h, ComposePushNeedsBuild as i, removeEdgeRoutes as l, stackPlan as m, compose_exports as n, stackOverrideFile as o, stackDir as p, ComposePinNeedsPull as r, deployedStackSecrets as s, composeTarget as t, composeProject as u, pinnedRef as v, projectNetwork as w, sshAccess as x, composeServer as y };
3335
3609
 
3336
- //# sourceMappingURL=compose-cHkF---f.mjs.map
3610
+ //# sourceMappingURL=compose-DJvvmF3X.mjs.map