@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
  const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
2
2
  const require_errors = require("./errors-DMC4Umsb.cjs");
3
- const require_run = require("./run-fVZ-rLnc.cjs");
3
+ const require_credentials = require("./credentials-D7XJypNd.cjs");
4
4
  const require_workspace = require("./workspace-C82GLPnf.cjs");
5
- const require_dns = require("./dns-Bmnuttja.cjs");
5
+ const require_snsSubscriptions = require("./snsSubscriptions-CSkteK2J.cjs");
6
6
  const require_define = require("./define-crmMcXFS.cjs");
7
- const require_seeds = require("./seeds-BWC-qjSI.cjs");
7
+ const require_seeds = require("./seeds-DOfxmDRO.cjs");
8
8
  const require_derive = require("./derive-DAbo49sm.cjs");
9
- const require_SubscriberGenerator = require("./SubscriberGenerator-C8CPxrCK.cjs");
9
+ const require_SubscriberGenerator = require("./SubscriberGenerator-C3QTae-R.cjs");
10
10
  const require_identity = require("./identity-CbLfgQNT.cjs");
11
- const require_discover = require("./discover-DozUKs8f.cjs");
12
- const require_drivers = require("./drivers-DbjiYpW6.cjs");
11
+ const require_discover = require("./discover-ojkcbxHw.cjs");
12
+ const require_drivers = require("./drivers-CQ32PB5w.cjs");
13
13
  const require_databases = require("./databases-fOaoBInm.cjs");
14
14
  let node_path = require("node:path");
15
15
  let node_fs = require("node:fs");
@@ -235,16 +235,16 @@ const dockerCompose = {
235
235
  };
236
236
  },
237
237
  async build(stack, services) {
238
- await require_run.run("docker", compose(stack, ["build", ...services]), runOptions(stack, {
238
+ await require_credentials.run("docker", compose(stack, ["build", ...services]), runOptions(stack, {
239
239
  ...process.env,
240
240
  DOCKER_BUILDKIT: "1"
241
241
  }));
242
242
  },
243
243
  async pull(stack, services) {
244
- await require_run.run("docker", compose(stack, ["pull", ...services]), runOptions(stack));
244
+ await require_credentials.run("docker", compose(stack, ["pull", ...services]), runOptions(stack));
245
245
  },
246
246
  async up(stack, services) {
247
- await require_run.run("docker", compose(stack, [
247
+ await require_credentials.run("docker", compose(stack, [
248
248
  "up",
249
249
  "-d",
250
250
  "--wait",
@@ -254,11 +254,11 @@ const dockerCompose = {
254
254
  ]), runOptions(stack));
255
255
  },
256
256
  async down(stack) {
257
- await require_run.run("docker", compose(stack, ["down"]), runOptions(stack));
257
+ await require_credentials.run("docker", compose(stack, ["down"]), runOptions(stack));
258
258
  },
259
259
  async port(stack, service, inside) {
260
260
  const env = engineEnv(stack);
261
- const output = await require_run.runOutput("docker", compose(stack, [
261
+ const output = await require_credentials.runOutput("docker", compose(stack, [
262
262
  "port",
263
263
  service,
264
264
  String(inside)
@@ -284,14 +284,14 @@ const dockerCompose = {
284
284
  },
285
285
  async copyOut(stack, service, from, to) {
286
286
  await (0, node_fs_promises.mkdir)((0, node_path.dirname)(to), { recursive: true });
287
- await require_run.run("docker", compose(stack, [
287
+ await require_credentials.run("docker", compose(stack, [
288
288
  "cp",
289
289
  `${service}:${from}`,
290
290
  to
291
291
  ]), runOptions(stack));
292
292
  },
293
293
  async push(stack, ref) {
294
- const output = await require_run.runOutput("docker", ["push", ref], {
294
+ const output = await require_credentials.runOutput("docker", ["push", ref], {
295
295
  cwd: stack.cwd,
296
296
  ...stack.signal ? { signal: stack.signal } : {}
297
297
  });
@@ -1443,9 +1443,20 @@ function composeStack(input) {
1443
1443
  ...credential.containers.minio,
1444
1444
  buckets,
1445
1445
  policies: require_seeds.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: require_seeds.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((0, _geekmidas_manifest.provideKey)(resource.id, "eventsConnectionString"), resource.id);
1458
+ bucketEventKeys.set((0, _geekmidas_manifest.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: [...require_seeds.watchedBuckets(manifest, input.subscribers ?? {}).keys()].filter((bucket) => services.minio.includes(bucket))
1494
1506
  };
1495
1507
  const outside = require_seeds.networkEnv(plan, {
1496
1508
  ...derivation,
@@ -1508,6 +1520,11 @@ function composeStack(input) {
1508
1520
  */
1509
1521
  const valueFor = (app, key, owner) => {
1510
1522
  if (require_workspace.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 ? { [require_SubscriberGenerator.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 = require_seeds.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?.[(0, _geekmidas_manifest.provideKey)(bucket, "eventsConnectionString")];
1642
+ const token = worker?.env?.[(0, _geekmidas_manifest.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}${require_SubscriberGenerator.objectsRoute(bucket)}`,
1647
+ token
1648
+ });
1649
+ }
1650
+ }
1619
1651
  const deployedTls = certificate ? {
1620
1652
  kind: "files",
1621
1653
  ...proxy === "caddy" ? {
@@ -1624,8 +1656,8 @@ function composeStack(input) {
1624
1656
  } : edgeCertificatePaths(project)
1625
1657
  } : { kind: "acme" };
1626
1658
  const tls = local ? { kind: "internal" } : deployedTls;
1627
- const backupsChoice = input.buildOnly ? void 0 : require_dns.stageBackups(workspace, manifest, stage);
1628
- const backups = backupsChoice?.mode === "on" && infra.includes("postgres") ? require_dns.stackBackups({
1659
+ const backupsChoice = input.buildOnly ? void 0 : require_snsSubscriptions.stageBackups(workspace, manifest, stage);
1660
+ const backups = backupsChoice?.mode === "on" && infra.includes("postgres") ? require_snsSubscriptions.stackBackups({
1629
1661
  workspace,
1630
1662
  stage,
1631
1663
  project,
@@ -1659,8 +1691,8 @@ function composeStack(input) {
1659
1691
  });
1660
1692
  if (!local) {
1661
1693
  const sites = apps.filter((app) => app.kind === "site");
1662
- const chosen = require_dns.passwordSites(workspace, stage, sites.map((app) => app.name));
1663
- for (const app of sites) if (chosen.includes(app.name)) app.auth = require_dns.siteAuth(stage, app.name, custom);
1694
+ const chosen = require_snsSubscriptions.passwordSites(workspace, stage, sites.map((app) => app.name));
1695
+ for (const app of sites) if (chosen.includes(app.name)) app.auth = require_snsSubscriptions.siteAuth(stage, app.name, custom);
1664
1696
  }
1665
1697
  const routes = [
1666
1698
  ...apps.map((app) => ({
@@ -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[(0, _geekmidas_manifest.provideKey)(topic, "publisherConnectionString")]?.startsWith("sns:")).map(({ name }) => require_SubscriberGenerator.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 require_seeds.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 }) => require_SubscriberGenerator.subscriberRoute(name)),
1851
+ subscribers: pushed.map(({ name, connectionKey, events }) => ({
1852
+ name,
1853
+ connectionKey,
1854
+ endpoint: `${url}${require_SubscriberGenerator.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 require_errors.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 require_errors.GkmError {
1823
1887
  host;
@@ -1897,13 +1961,14 @@ 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
+ ...require_seeds.minioWebhookEnv(options.storage.webhooks)
1901
1966
  };
1902
1967
  minio.ports = ["127.0.0.1::9000"];
1903
1968
  }
1904
1969
  if (services["redis"] && options.redis) services[require_seeds.REDIS_SERVICE] = require_seeds.redisService(options.redis);
1905
1970
  if (options.logs) services[require_seeds.LOGS_SERVICE] = require_seeds.logsService(options.logs);
1906
- if (options.backups) services[require_dns.BACKUPS_SERVICE] = require_dns.backupsService(options.backups, options.envFiles);
1971
+ if (options.backups) services[require_snsSubscriptions.BACKUPS_SERVICE] = require_snsSubscriptions.backupsService(options.backups, options.envFiles);
1907
1972
  for (const app of apps) services[app.name] = {
1908
1973
  image: app.ref,
1909
1974
  ...app.build ? { build: {
@@ -2185,7 +2250,7 @@ function deployedStackSecrets(workspace, stage, stored, manifest) {
2185
2250
  secrets: withLogs.secrets,
2186
2251
  generated: []
2187
2252
  };
2188
- const withSites = require_dns.withSitePasswords(withRedis.secrets, require_dns.passwordSites(workspace, stage, require_dns.siteNames(manifest)));
2253
+ const withSites = require_snsSubscriptions.withSitePasswords(withRedis.secrets, require_snsSubscriptions.passwordSites(workspace, stage, require_snsSubscriptions.siteNames(manifest)));
2189
2254
  return {
2190
2255
  secrets: withSites.secrets,
2191
2256
  generated: [
@@ -2265,6 +2330,119 @@ var ComposeAppsUnhealthy = class extends require_errors.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) => (0, _geekmidas_manifest.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 }) => require_snsSubscriptions.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 require_snsSubscriptions.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 = require_snsSubscriptions.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(require_snsSubscriptions.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
@@ -2344,7 +2522,7 @@ function stackOverrideFile(root, stage) {
2344
2522
  async function gitRevision(root) {
2345
2523
  let sha;
2346
2524
  try {
2347
- sha = (await require_run.runOutput("git", [
2525
+ sha = (await require_credentials.runOutput("git", [
2348
2526
  "rev-parse",
2349
2527
  "--short",
2350
2528
  "HEAD"
@@ -2353,7 +2531,7 @@ async function gitRevision(root) {
2353
2531
  throw new NoGitRevision(root);
2354
2532
  }
2355
2533
  if (!sha) throw new NoGitRevision(root);
2356
- return (await require_run.runOutput("git", ["status", "--porcelain"], { cwd: root }).catch(() => "")).trim() ? `${sha}-dirty` : sha;
2534
+ return (await require_credentials.runOutput("git", ["status", "--porcelain"], { cwd: root }).catch(() => "")).trim() ? `${sha}-dirty` : sha;
2357
2535
  }
2358
2536
  /** The edge's ports, from the environment — 443 and 80 when unset. */
2359
2537
  function edgePorts(env = process.env) {
@@ -2387,7 +2565,7 @@ const defaultDeps = {
2387
2565
  healthAttempts: 90,
2388
2566
  healthIntervalMs: 2e3,
2389
2567
  env: process.env,
2390
- lookup: require_dns.systemLookup,
2568
+ lookup: require_snsSubscriptions.systemLookup,
2391
2569
  server: sshAccess
2392
2570
  };
2393
2571
  /**
@@ -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" ? require_seeds.imageLayout(workspace) : void 0;
2419
- const composed = composeStack({
2598
+ const input = {
2420
2599
  workspace,
2421
2600
  manifest,
2422
2601
  runnables,
@@ -2435,16 +2614,31 @@ 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 = require_snsSubscriptions.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)) {
2444
2638
  ctx.secrets.mask(stack.logs.password);
2445
2639
  ctx.secrets.mask(stack.logs.appEnv.OTEL_EXPORTER_OTLP_HEADERS);
2446
2640
  }
2447
- if (!push && !stack.local) require_dns.requiredServerAddress(stage, workspace.domains?.[stage], secrets?.custom);
2641
+ if (!push && !stack.local) require_snsSubscriptions.requiredServerAddress(stage, workspace.domains?.[stage], secrets?.custom);
2448
2642
  const server = push ? void 0 : composeServer({
2449
2643
  stage,
2450
2644
  local: stack.local,
@@ -2455,7 +2649,6 @@ async function validateCompose(ctx, deps, options = {}) {
2455
2649
  const override = stackOverrideFile(root, stage);
2456
2650
  const overrides = (0, node_fs.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: {
@@ -2501,7 +2708,7 @@ async function readyCompose(ctx, run, deps) {
2501
2708
  }
2502
2709
  if (stack.local) return;
2503
2710
  if (run.server && !ctx.dryRun && !run.push) await deps.server.check(run.server);
2504
- const prune = await stageHostsDns(ctx, deps, require_dns.stackHosts(stack).filter((host) => !require_dns.isLocalHost(host)), run.secrets?.custom);
2711
+ const prune = await stageHostsDns(ctx, deps, require_snsSubscriptions.stackHosts(stack).filter((host) => !require_snsSubscriptions.isLocalHost(host)), run.secrets?.custom);
2505
2712
  if (prune) run.pruneDns = prune;
2506
2713
  }
2507
2714
  /** A stack whose caches are in Redis, built for an app that has no client. */
@@ -2544,21 +2751,21 @@ function assertRedisClient(workspace, stack, manifest, runnables) {
2544
2751
  */
2545
2752
  async function stageHostsDns(ctx, deps, hosts, custom) {
2546
2753
  const { workspace, stage } = ctx;
2547
- const server = require_dns.requiredServerAddress(stage, workspace.domains?.[stage], custom);
2754
+ const server = require_snsSubscriptions.requiredServerAddress(stage, workspace.domains?.[stage], custom);
2548
2755
  if (hosts.length === 0) return;
2549
2756
  if (ctx.skipDns) {
2550
2757
  ctx.logger.info("🌐 DNS skipped (--skip-dns): no record is written or checked");
2551
2758
  return;
2552
2759
  }
2553
2760
  if (!server) {
2554
- ctx.logger.info(`🌐 DNS skipped: no ${require_workspace.SERVER_IPV4_KEY} in '${stage}''s secrets — ${require_dns.serverAddressHint(stage)}`);
2761
+ ctx.logger.info(`🌐 DNS skipped: no ${require_workspace.SERVER_IPV4_KEY} in '${stage}''s secrets — ${require_snsSubscriptions.serverAddressHint(stage)}`);
2555
2762
  return;
2556
2763
  }
2557
2764
  const log = (line) => ctx.logger.info(line);
2558
2765
  if (workspace.dns) log(`🌐 DNS for '${stage}' → ${server.ipv4}${server.ipv6 ? ` / ${server.ipv6}` : ""}${ctx.dryRun ? " (dry run — nothing is written)" : ""}`);
2559
2766
  try {
2560
2767
  const stored = await ctx.state.read(stage);
2561
- const result = await require_dns.stageDns({
2768
+ const result = await require_snsSubscriptions.stageDns({
2562
2769
  stage,
2563
2770
  hosts,
2564
2771
  server,
@@ -2566,7 +2773,7 @@ async function stageHostsDns(ctx, deps, hosts, custom) {
2566
2773
  recorded: require_seeds.dnsResources(stored?.resources ?? {}),
2567
2774
  credentials: ctx.credentials,
2568
2775
  log,
2569
- lookup: deps.lookup ?? require_dns.systemLookup,
2776
+ lookup: deps.lookup ?? require_snsSubscriptions.systemLookup,
2570
2777
  ...ctx.dryRun ? { dryRun: true } : {},
2571
2778
  ...deps.dnsProviderFor ? { providerFor: deps.dnsProviderFor } : {}
2572
2779
  });
@@ -2583,7 +2790,7 @@ async function stageHostsDns(ctx, deps, hosts, custom) {
2583
2790
  }
2584
2791
  return result.recorded.stale.length > 0 ? result.prune : void 0;
2585
2792
  } catch (error) {
2586
- if (ctx.dryRun && error instanceof require_dns.HostNotPointingAtServer) {
2793
+ if (ctx.dryRun && error instanceof require_snsSubscriptions.HostNotPointingAtServer) {
2587
2794
  ctx.logger.warn(`⚠ ${error.message}`);
2588
2795
  return;
2589
2796
  }
@@ -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 = require_snsSubscriptions.subscriptionKey(push.worker, push.name);
2914
+ const id = run.topicSubscriptions?.recorded?.[key]?.id;
2915
+ planned({
2916
+ key,
2917
+ resourceType: require_snsSubscriptions.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: require_snsSubscriptions.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 require_seeds.applyBuckets(client, storage.buckets),
2781
3030
  ...await require_seeds.applyPolicies(client, storage.policies),
2782
- ...await require_seeds.applyLifecycles(client, storage.lifecycles)
3031
+ ...await require_seeds.applyLifecycles(client, storage.lifecycles),
3032
+ ...await require_seeds.applyNotifications(client, storage.objects, new Set(storage.webhooks.map((hook) => hook.bucket)))
2783
3033
  ];
2784
3034
  } finally {
2785
3035
  await tunnel.close();
@@ -2830,7 +3080,7 @@ async function migrateAndSeed(ctx, run, deps, port) {
2830
3080
  }, ...stack.local ? [require_seeds.LEGACY_LOCAL_LOGIN] : []]
2831
3081
  });
2832
3082
  if (login.notice) ctx.logger.info(login.notice);
2833
- const statements = [...require_seeds.postgresStatements(stack.plan, workspace.name, stack.credential.seed), ...stack.backups ? require_dns.backupsRoleStatements(stack.backups) : []];
3083
+ const statements = [...require_seeds.postgresStatements(stack.plan, workspace.name, stack.credential.seed), ...stack.backups ? require_snsSubscriptions.backupsRoleStatements(stack.backups) : []];
2834
3084
  if (statements.length > 0) {
2835
3085
  ctx.logger.info("🗄️ Creating databases, roles and grants…");
2836
3086
  await require_seeds.applyPostgres(deps.sql(port, login.login), statements);
@@ -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 ?? require_snsSubscriptions.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 require_snsSubscriptions.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,
@@ -3221,14 +3495,14 @@ async function writeStack(root, dir, stack) {
3221
3495
  if (stack.logs && stack.compose.services["openobserve"]?.env_file) await write((0, node_path.join)(dir, `${require_seeds.LOGS_SERVICE}.env`), envFile(stack.logs.env), 384);
3222
3496
  if (stack.redis && stack.compose.services["redis"]?.env_file) await write((0, node_path.join)(dir, `${require_seeds.REDIS_SERVICE}.env`), envFile(stack.redis.env), 384);
3223
3497
  if (stack.backups) {
3224
- for (const [name, content] of Object.entries(stack.backups.files)) await write((0, node_path.join)(dir, require_dns.BACKUPS_SERVICE, name), content);
3225
- if (stack.compose.services["backups"]?.env_file) await write((0, node_path.join)(dir, `${require_dns.BACKUPS_SERVICE}.env`), envFile(stack.backups.env), 384);
3498
+ for (const [name, content] of Object.entries(stack.backups.files)) await write((0, node_path.join)(dir, require_snsSubscriptions.BACKUPS_SERVICE, name), content);
3499
+ if (stack.compose.services["backups"]?.env_file) await write((0, node_path.join)(dir, `${require_snsSubscriptions.BACKUPS_SERVICE}.env`), envFile(stack.backups.env), 384);
3226
3500
  } else {
3227
- await (0, node_fs_promises.rm)((0, node_path.join)(dir, require_dns.BACKUPS_SERVICE), {
3501
+ await (0, node_fs_promises.rm)((0, node_path.join)(dir, require_snsSubscriptions.BACKUPS_SERVICE), {
3228
3502
  recursive: true,
3229
3503
  force: true
3230
3504
  });
3231
- await (0, node_fs_promises.rm)((0, node_path.join)(dir, `${require_dns.BACKUPS_SERVICE}.env`), { force: true });
3505
+ await (0, node_fs_promises.rm)((0, node_path.join)(dir, `${require_snsSubscriptions.BACKUPS_SERVICE}.env`), { force: true });
3232
3506
  }
3233
3507
  for (const entry of await (0, node_fs_promises.readdir)(dir)) if (entry.endsWith(".credentials")) await (0, node_fs_promises.rm)((0, node_path.join)(dir, entry));
3234
3508
  for (const [path, content] of Object.entries(stack.dockerfiles)) await write((0, node_path.join)(root, path), content);
@@ -3256,7 +3530,7 @@ function printPlan(ctx, run) {
3256
3530
  for (const app of stack.apps) ctx.logger.info(` ${app.name.padEnd(12)} ${app.url.padEnd(40)} ${mode} ${app.ref}`);
3257
3531
  for (const worker of stack.workers) ctx.logger.info(` ${worker.name.padEnd(12)} ${`worker ${worker.id} (no route)`.padEnd(40)} ${mode} ${worker.ref}`);
3258
3532
  if (stack.infra.length > 0) ctx.logger.info(` infrastructure: ${stack.infra.join(", ")}`);
3259
- if (stack.backups) ctx.logger.info(` ${require_dns.BACKUPS_SERVICE.padEnd(12)} ${stack.backups.databases.map((d) => d.file).join(", ")} — ${stack.backups.backups.describe}, to ${stack.backups.prefix}/`);
3533
+ if (stack.backups) ctx.logger.info(` ${require_snsSubscriptions.BACKUPS_SERVICE.padEnd(12)} ${stack.backups.databases.map((d) => d.file).join(", ")} — ${stack.backups.backups.describe}, to ${stack.backups.prefix}/`);
3260
3534
  ctx.logger.info(`\n📝 Wrote ${files.length} file(s) under ${stackDir(stack.stage)}/`);
3261
3535
  }
3262
3536
  //#endregion
@@ -3476,4 +3750,4 @@ Object.defineProperty(exports, "stackPlan", {
3476
3750
  }
3477
3751
  });
3478
3752
 
3479
- //# sourceMappingURL=compose-ChVvb3xM.cjs.map
3753
+ //# sourceMappingURL=compose-BfXXWJSp.cjs.map