@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,14 +1,14 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
2
2
  import { t as GkmError } from "./errors-D8Gwp5kU.mjs";
3
- import { i as run$1, s as gkmHome } from "./run-BJLIerMM.mjs";
3
+ import { s as run$1, x as gkmHome } from "./credentials-DpfnUvIR.mjs";
4
4
  import { B as LOGS_PORT, H as provisioningOf, R as stageSampleRate, U as stageProvider, _ as PUBLIC_ENV_PREFIXES, a as allConstructGlobs, ct as UnknownSecretsStoreProvider, ft as SERVER_IPV4_KEY, ht as isReservedStageKey, j as TEST_STAGE, pt as SERVER_IPV6_KEY, ut as s3SecretsLocation, v as getPublicEnvPrefix, z as telemetryEnv } from "./workspace-DUnnVjqC.mjs";
5
5
  import { t as appKey } from "./derive-B4vDpzgP.mjs";
6
- import { a as readFakes, c as DEFAULT_STORAGE, i as readCredentialFakes, l as holdsEveryCache, o as DEFAULT_CACHE, s as DEFAULT_EVENTS$1, t as SubscriberGenerator } from "./SubscriberGenerator-y3pncae_.mjs";
6
+ import { c as DEFAULT_CACHE, d as holdsEveryCache, i as readFakes, l as DEFAULT_EVENTS$1, o as objectsRoute, r as readCredentialFakes, t as SubscriberGenerator, u as DEFAULT_STORAGE } from "./SubscriberGenerator-COAVPgM-.mjs";
7
7
  import { n as deployIdentity } from "./identity-CBXr4wNi.mjs";
8
- import { a as startTelemetryCode, n as runtimeFor, s as writeTelemetryModule, u as telemetryArgs } from "./EndpointGenerator-CP_z_E3e.mjs";
9
- import { d as ConstructGenerator, f as output, i as discover } from "./discover-C5roJuc9.mjs";
8
+ import { a as startTelemetryCode, n as runtimeFor, s as writeTelemetryModule, u as telemetryArgs } from "./EndpointGenerator-Z_BUTocT.mjs";
9
+ import { d as ConstructGenerator, f as output, h as eventsEdgeBucket, i as discover } from "./discover-BvJOVsYG.mjs";
10
10
  import { ConfigNotFound, NotInAnApp, loadWorkspaceAppInfo, loadWorkspaceConfig } from "./config.mjs";
11
- import { c as runtimeOf } from "./resolve-j8hUcbGz.mjs";
11
+ import { c as runtimeOf } from "./resolve-BT7fkPN5.mjs";
12
12
  import { basename, dirname, isAbsolute, join, parse, relative, resolve, sep } from "node:path";
13
13
  import { constants, existsSync, readFileSync } from "node:fs";
14
14
  import { appendFile, chmod, copyFile, mkdir, readFile, readdir, rm, stat, writeFile } from "node:fs/promises";
@@ -26,7 +26,7 @@ import { config } from "dotenv";
26
26
  import { promisify } from "node:util";
27
27
  import { Cron } from "@geekmidas/constructs/crons";
28
28
  import { Queue } from "@geekmidas/constructs/queue";
29
- import { CreateBucketCommand, DeleteBucketLifecycleCommand, GetBucketLifecycleConfigurationCommand, GetBucketPolicyCommand, HeadBucketCommand, ListBucketsCommand, PutBucketLifecycleConfigurationCommand, PutBucketPolicyCommand, S3Client } from "@aws-sdk/client-s3";
29
+ import { CreateBucketCommand, DeleteBucketLifecycleCommand, GetBucketLifecycleConfigurationCommand, GetBucketNotificationConfigurationCommand, GetBucketPolicyCommand, HeadBucketCommand, ListBucketsCommand, PutBucketLifecycleConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketPolicyCommand, S3Client } from "@aws-sdk/client-s3";
30
30
  import { CreateTopicCommand, GetTopicAttributesCommand, SNSClient } from "@aws-sdk/client-sns";
31
31
  import { CreateQueueCommand, GetQueueUrlCommand, SQSClient } from "@aws-sdk/client-sqs";
32
32
  import { Client } from "pg";
@@ -535,7 +535,7 @@ const EDGE_KINDS = {
535
535
  * Docker Desktop resolves this name already; on Linux the compose definition
536
536
  * maps it to the host gateway.
537
537
  */
538
- const HOST_GATEWAY = "host.docker.internal";
538
+ const HOST_GATEWAY$1 = "host.docker.internal";
539
539
  /**
540
540
  * The suffix every local host shares.
541
541
  *
@@ -574,7 +574,7 @@ function sitesFor(plan, project, addresses = {}) {
574
574
  if (!port) continue;
575
575
  sites.push({
576
576
  host,
577
- upstream: `http://${HOST_GATEWAY}:${port}`
577
+ upstream: `http://${HOST_GATEWAY$1}:${port}`
578
578
  });
579
579
  }
580
580
  return sites;
@@ -720,6 +720,108 @@ function emulatorQueueUrl(name, port) {
720
720
  return `${emulatorEndpoint(port)}/${EMULATOR_ACCOUNT}/${name}`;
721
721
  }
722
722
  //#endregion
723
+ //#region src/reconcile/objectEvents.ts
724
+ /**
725
+ * A bucket's object events, where the bucket is a local MinIO.
726
+ *
727
+ * S3 publishes a bucket's events to a topic the deploy creates; MinIO has no
728
+ * topic to publish to, but it can post each event to a webhook. So where MinIO
729
+ * holds a watched bucket, it posts the bucket's events to the process that
730
+ * runs the bucket's subscribers, on a route only it can use, and that process
731
+ * relays each one onto the events broker — under the bucket's name, as
732
+ * `object.created` or `object.deleted` — where every subscriber drains a queue
733
+ * of its own, as a topic's subscribers do.
734
+ *
735
+ * Declared to MinIO in two halves, both derived here so they cannot drift:
736
+ *
737
+ * - **a webhook target per bucket**, as container environment: where to post,
738
+ * the token to present, and a queue on disk, because MinIO starts before the
739
+ * process it posts to and must keep what it could not deliver;
740
+ * - **the bucket's notification**, written through the S3 API once the bucket
741
+ * exists: every created and removed object, to that target. Unfiltered —
742
+ * two subscribers watching overlapping prefixes are two rules S3 refuses on
743
+ * one bucket, and each subscriber filters what it is handed anyway.
744
+ */
745
+ /**
746
+ * The token MinIO presents when it posts a bucket's events.
747
+ *
748
+ * Derived, never stored: the container and the process it posts to are handed
749
+ * the same value by the same derivation — with the stage's random seed where a
750
+ * deployed stage's stack has one, so the token is a secret there, and from the
751
+ * project alone locally, where everything it would protect is on loopback.
752
+ * Not salted by the stage: one MinIO serves `gkm dev` and `gkm test`, and a
753
+ * target is declared once per container.
754
+ */
755
+ function objectsWebhookToken(project, bucket, seed) {
756
+ return createHash("sha256").update(`${seed ? `${seed}:` : ""}${project}:objects-webhook:${bucket}`).digest("base64url").slice(0, 32);
757
+ }
758
+ /**
759
+ * The target's id in MinIO's environment — `MINIO_NOTIFY_WEBHOOK_*_<ID>`.
760
+ *
761
+ * Upper-cased with nothing between words: a canonical id is letters and
762
+ * digits, and an underscore inside the id would read as part of the setting's
763
+ * name.
764
+ */
765
+ function minioTargetId(bucket) {
766
+ return bucket.toUpperCase();
767
+ }
768
+ /** The target as a notification names it. */
769
+ function minioTargetArn(bucket) {
770
+ return `arn:minio:sqs::${minioTargetId(bucket)}:webhook`;
771
+ }
772
+ /** How a container reaches a process on the host. */
773
+ const HOST_GATEWAY = "host.docker.internal";
774
+ /** Where MinIO keeps what it could not deliver yet, inside its container. */
775
+ const QUEUE_ROOT = "/gkm-object-events";
776
+ /** The id of the notification rule gkm owns on a bucket. */
777
+ const NOTIFICATION_RULE_PREFIX = "gkm-";
778
+ /**
779
+ * MinIO's environment for each watched bucket's webhook target.
780
+ *
781
+ * Sorted, so the same buckets always render the same environment and a
782
+ * reconcile that changed nothing does not recreate the container.
783
+ */
784
+ function minioWebhookEnv(hooks) {
785
+ const env = {};
786
+ for (const hook of [...hooks].sort((a, b) => a.bucket.localeCompare(b.bucket))) {
787
+ const id = minioTargetId(hook.bucket);
788
+ env[`MINIO_NOTIFY_WEBHOOK_ENABLE_${id}`] = "on";
789
+ env[`MINIO_NOTIFY_WEBHOOK_ENDPOINT_${id}`] = hook.endpoint;
790
+ env[`MINIO_NOTIFY_WEBHOOK_AUTH_TOKEN_${id}`] = hook.token;
791
+ env[`MINIO_NOTIFY_WEBHOOK_QUEUE_DIR_${id}`] = `${QUEUE_ROOT}/${id.toLowerCase()}`;
792
+ }
793
+ return env;
794
+ }
795
+ /** The rule that sends every created and removed object to the bucket's target. */
796
+ function minioNotificationRule(bucket) {
797
+ return {
798
+ Id: `${NOTIFICATION_RULE_PREFIX}${bucket}`,
799
+ QueueArn: minioTargetArn(bucket),
800
+ Events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
801
+ };
802
+ }
803
+ /**
804
+ * Each watched bucket, and the workers that run one of its subscribers.
805
+ *
806
+ * A bucket is watched when a subscriber reads its events key. MinIO posts a
807
+ * bucket's events to one place, and the relay fans them out to every
808
+ * subscriber whichever worker received them — so one worker per bucket is
809
+ * enough, and the first, by id, is the one chosen, so the choice is stable.
810
+ */
811
+ function watchedBuckets(manifest, subscribers) {
812
+ const byKey = /* @__PURE__ */ new Map();
813
+ for (const declaration of Object.values(manifest)) {
814
+ if (declaration.kind !== "objects") continue;
815
+ byKey.set(provideKey(declaration.id, "eventsConnectionString"), declaration.id);
816
+ }
817
+ const watched = /* @__PURE__ */ new Map();
818
+ for (const worker of Object.keys(subscribers).sort()) for (const { connectionKey } of subscribers[worker] ?? []) {
819
+ const bucket = byKey.get(connectionKey);
820
+ if (bucket && !watched.has(bucket)) watched.set(bucket, worker);
821
+ }
822
+ return watched;
823
+ }
824
+ //#endregion
723
825
  //#region src/telemetry/edges.ts
724
826
  /**
725
827
  * Which processes use a `Telemetry` node — read off the manifest's edges.
@@ -1215,6 +1317,14 @@ function envFor(plan, options) {
1215
1317
  }
1216
1318
  Object.assign(env, publicEnv(plan, env, options.addresses));
1217
1319
  Object.assign(env, brokerEnv(plan, options.ports, credential));
1320
+ const relay = env.EVENT_PUBLISHER_CONNECTION_STRING;
1321
+ if (relay && options.relayedBuckets?.length) for (const resource of plan.resources) {
1322
+ if (resource.kind !== "objects" || resource.container !== "minio") continue;
1323
+ if (!options.relayedBuckets.includes(resource.id)) continue;
1324
+ if (!env[resource.envKey]) continue;
1325
+ env[provideKey(resource.id, "eventsConnectionString")] = relay;
1326
+ env[provideKey(resource.id, "eventsToken")] = objectsWebhookToken(options.project ?? "", resource.id, credential.seed);
1327
+ }
1218
1328
  if (plan.resources.some((r) => r.kind === "objects" && env[r.envKey])) Object.assign(env, storageCredentials(options.credentials));
1219
1329
  return env;
1220
1330
  }
@@ -2582,6 +2692,56 @@ async function databasesExist(client, names) {
2582
2692
  }
2583
2693
  }
2584
2694
  /**
2695
+ * Point each watched bucket's events at its webhook target, and stop sending
2696
+ * an unwatched one's.
2697
+ *
2698
+ * Merged rather than written whole: only the rule gkm owns on a bucket
2699
+ * (`gkm-<Bucket>`) is added or removed, and every other rule — one somebody
2700
+ * added by hand — is kept. Compared before writing, so a converged reconcile
2701
+ * changes nothing.
2702
+ *
2703
+ * @param buckets - each bucket the plan names, by construct id and name
2704
+ * @param watched - the construct ids whose events are relayed
2705
+ */
2706
+ async function applyNotifications(client, buckets, watched) {
2707
+ const applied = [];
2708
+ for (const { id, name } of buckets) {
2709
+ const current = await client.notification(name);
2710
+ const queues = current.QueueConfigurations ?? [];
2711
+ const others = queues.filter((rule) => !rule.Id?.startsWith(NOTIFICATION_RULE_PREFIX));
2712
+ const wanted = watched.has(id) ? [...others, minioNotificationRule(id)] : others;
2713
+ if (!watched.has(id) && others.length === queues.length) continue;
2714
+ const describe = `object events from ${name}`;
2715
+ const ours = queues.filter((rule) => rule.Id?.startsWith(NOTIFICATION_RULE_PREFIX));
2716
+ if (watched.has(id) ? ours.length === 1 && sameRule(ours[0], minioNotificationRule(id)) : ours.length === 0) {
2717
+ applied.push({
2718
+ id: `${name}:events`,
2719
+ describe,
2720
+ created: false
2721
+ });
2722
+ continue;
2723
+ }
2724
+ await client.setNotification(name, {
2725
+ ...current,
2726
+ QueueConfigurations: wanted
2727
+ });
2728
+ applied.push({
2729
+ id: `${name}:events`,
2730
+ describe,
2731
+ created: true
2732
+ });
2733
+ }
2734
+ return applied;
2735
+ }
2736
+ /**
2737
+ * Whether a rule read back says what gkm wrote: the same target, the same
2738
+ * events in any order, and no filter — the store may hand back an empty one.
2739
+ */
2740
+ function sameRule(current, wanted) {
2741
+ const filter = current.Filter;
2742
+ return current.Id === wanted.Id && current.QueueArn === wanted.QueueArn && JSON.stringify([...current.Events ?? []].sort()) === JSON.stringify([...wanted.Events ?? []].sort()) && (filter?.Key?.FilterRules?.length ?? 0) === 0;
2743
+ }
2744
+ /**
2585
2745
  * Apply each bucket's expiry, beside whatever other rules it has, skipping
2586
2746
  * those already correct — the same merge the `s3` provider makes deployed.
2587
2747
  */
@@ -4289,6 +4449,14 @@ function composeFor(plan, options) {
4289
4449
  const volume = volumeOf(container);
4290
4450
  if (volume) volumes[volume] = {};
4291
4451
  }
4452
+ const minio = services.minio;
4453
+ if (minio && options.objectWebhooks?.length) {
4454
+ minio.environment = {
4455
+ ...minio.environment,
4456
+ ...minioWebhookEnv(options.objectWebhooks)
4457
+ };
4458
+ if (options.objectWebhooks.some((hook) => hook.endpoint.includes(`//host.docker.internal:`))) minio.extra_hosts = [`${HOST_GATEWAY}:host-gateway`];
4459
+ }
4292
4460
  return {
4293
4461
  name: options.project,
4294
4462
  services: {
@@ -4662,6 +4830,16 @@ function bucketClient(port, credentials) {
4662
4830
  Bucket: bucket,
4663
4831
  LifecycleConfiguration: { Rules: rules }
4664
4832
  }));
4833
+ },
4834
+ async notification(bucket) {
4835
+ const { $metadata: _, ...notification } = await s3.send(new GetBucketNotificationConfigurationCommand({ Bucket: bucket }));
4836
+ return notification;
4837
+ },
4838
+ async setNotification(bucket, notification) {
4839
+ await s3.send(new PutBucketNotificationConfigurationCommand({
4840
+ Bucket: bucket,
4841
+ NotificationConfiguration: notification
4842
+ }));
4665
4843
  }
4666
4844
  };
4667
4845
  }
@@ -5498,7 +5676,8 @@ async function reconcile(options) {
5498
5676
  project,
5499
5677
  ports,
5500
5678
  credentials: options.credentials,
5501
- ...options.apps ? { apps: options.apps(plan.containers) } : {}
5679
+ ...options.apps ? { apps: options.apps(plan.containers) } : {},
5680
+ ...options.objectWebhooks?.length ? { objectWebhooks: options.objectWebhooks } : {}
5502
5681
  });
5503
5682
  const caddyfile = toCaddyfile(sitesFor(plan, project, options.addresses));
5504
5683
  const hash = planHash(plan, compose, {
@@ -5516,7 +5695,8 @@ async function reconcile(options) {
5516
5695
  ...options.mailFrom ? { mailFrom: options.mailFrom } : {},
5517
5696
  ...options.addresses ? { addresses: options.addresses } : {},
5518
5697
  ...lan ? { lanAddress: lan } : {},
5519
- ...options.metroPorts ? { metroPorts: options.metroPorts } : {}
5698
+ ...options.metroPorts ? { metroPorts: options.metroPorts } : {},
5699
+ ...options.objectWebhooks?.length ? { relayedBuckets: options.objectWebhooks.map((hook) => hook.bucket) } : {}
5520
5700
  });
5521
5701
  const env = exports ? resolved : scopeTelemetryEnv(resolved, {
5522
5702
  uses: false,
@@ -5573,7 +5753,7 @@ async function reconcile(options) {
5573
5753
  };
5574
5754
  const credentials = checked.credentials;
5575
5755
  if (start && provision) options.progress?.("🗄️ Creating what the constructs declare — databases, roles, buckets, topics");
5576
- const provisioned = start && provision ? await create(plan, ports, credentials, sql, buckets, carriers, project) : [];
5756
+ const provisioned = start && provision ? await create(plan, ports, credentials, sql, buckets, carriers, project, new Set(stage === (options.localStage ?? stage) ? (options.objectWebhooks ?? []).map((hook) => hook.bucket) : [])) : [];
5577
5757
  await saveState(root, {
5578
5758
  hash,
5579
5759
  stage
@@ -5593,7 +5773,7 @@ async function reconcile(options) {
5593
5773
  * Idempotent throughout, so this runs on every non-converged reconcile rather
5594
5774
  * than being something to remember.
5595
5775
  */
5596
- async function create(plan, ports, credentials, sql, buckets, emulatorCarriers, project) {
5776
+ async function create(plan, ports, credentials, sql, buckets, emulatorCarriers, project, watched) {
5597
5777
  const applied = [];
5598
5778
  const postgresPort = ports[primaryPortKey("postgres")];
5599
5779
  const statements = postgresStatements(plan, project, credentials.seed);
@@ -5607,6 +5787,10 @@ async function create(plan, ports, credentials, sql, buckets, emulatorCarriers,
5607
5787
  if (names.length > 0) applied.push(...await applyBuckets(client, names));
5608
5788
  if (policies.length > 0) applied.push(...await applyPolicies(client, policies));
5609
5789
  if (lifecycles.length > 0) applied.push(...await applyLifecycles(client, lifecycles));
5790
+ if (names.length > 0) applied.push(...await applyNotifications(client, plan.resources.filter((r) => r.provisions && r.kind === "objects").map((r) => ({
5791
+ id: r.id,
5792
+ name: r.name
5793
+ })), watched));
5610
5794
  }
5611
5795
  const emulatorPort = ports[primaryPortKey("localstack")];
5612
5796
  const carriers = carrierNames(plan);
@@ -5672,6 +5856,7 @@ var workspace_exports = /* @__PURE__ */ __exportAll({
5672
5856
  constructGlobs: () => constructGlobs,
5673
5857
  derivedContainers: () => derivedContainers,
5674
5858
  fakesApply: () => fakesApply,
5859
+ localObjectWebhooks: () => localObjectWebhooks,
5675
5860
  metroPorts: () => metroPorts,
5676
5861
  reconcileWorkspace: () => reconcileWorkspace,
5677
5862
  surfaceAddresses: () => surfaceAddresses
@@ -5735,16 +5920,25 @@ function fakesApply(stage, fake, env = process.env) {
5735
5920
  */
5736
5921
  async function reconcileWorkspace(workspace, options) {
5737
5922
  const runnables = {};
5923
+ const background = {};
5924
+ const subscribers = {};
5738
5925
  const discovered = await discover({
5739
5926
  patterns: constructGlobs(workspace),
5740
5927
  cwd: workspace.root,
5741
- runnables
5928
+ runnables,
5929
+ background,
5930
+ subscribers
5742
5931
  });
5743
5932
  const manifest = options.manifest ?? discovered;
5744
5933
  const faked = fakesApply(options.stage, options.fake);
5745
5934
  const fakes = faked ? await readFakes(workspace.root, manifest) : {};
5746
5935
  const credentialFakes = faked ? await readCredentialFakes(workspace.root, manifest) : {};
5747
5936
  const { credentials } = await loadLocalCredentials(workspace);
5937
+ const objectWebhooks = localObjectWebhooks(workspace, manifest, {
5938
+ background,
5939
+ subscribers,
5940
+ seed: credentials.seed
5941
+ });
5748
5942
  const result = await reconcile({
5749
5943
  credentials,
5750
5944
  root: workspace.root,
@@ -5758,6 +5952,7 @@ async function reconcileWorkspace(workspace, options) {
5758
5952
  metroPorts: metroPorts(workspace, manifest),
5759
5953
  fakes,
5760
5954
  credentialFakes,
5955
+ ...objectWebhooks.length > 0 ? { objectWebhooks } : {},
5761
5956
  apps: (containers) => appServices(workspace, manifest, containers, credentials, runnables, fakes, credentialFakes),
5762
5957
  ...options.start === void 0 ? {} : { start: options.start },
5763
5958
  ...options.progress ? { progress: options.progress } : {}
@@ -5772,6 +5967,40 @@ async function reconcileWorkspace(workspace, options) {
5772
5967
  };
5773
5968
  }
5774
5969
  /**
5970
+ * Where MinIO posts each watched bucket's events under `gkm dev`: the dev
5971
+ * server of the app that builds the worker running the bucket's subscribers,
5972
+ * on the host, on that app's port — the process that relays them onto the
5973
+ * broker.
5974
+ *
5975
+ * None where the broker is SNS: there a bucket's events come from a topic, and
5976
+ * nothing relays them. None for a worker no app can build — `gkm build` says
5977
+ * so; a dev loop has nothing to post to.
5978
+ */
5979
+ function localObjectWebhooks(workspace, manifest, options) {
5980
+ if (backendsOf(workspace).events === "sns") return [];
5981
+ const watched = watchedBuckets(manifest, options.subscribers);
5982
+ if (watched.size === 0) return [];
5983
+ let units;
5984
+ try {
5985
+ units = workerUnits(workspace, manifest, options.background);
5986
+ } catch (error) {
5987
+ if (error instanceof WorkerHasNoApp) return [];
5988
+ throw error;
5989
+ }
5990
+ const hooks = [];
5991
+ for (const [bucket, worker] of watched) {
5992
+ const app = units.find((unit) => unit.id === worker)?.app;
5993
+ const port = app ? workspace.apps[app]?.port : void 0;
5994
+ if (!port) continue;
5995
+ hooks.push({
5996
+ bucket,
5997
+ endpoint: `http://${HOST_GATEWAY}:${port}${objectsRoute(bucket)}`,
5998
+ token: objectsWebhookToken(workspace.name, bucket, options.seed)
5999
+ });
6000
+ }
6001
+ return hooks;
6002
+ }
6003
+ /**
5775
6004
  * Where each mobile app's Metro runs: its app's port, which `gkm exec` hands
5776
6005
  * Expo as `RCT_METRO_PORT`. Kept apart from the surfaces' addresses — a phone
5777
6006
  * reaches Metro by `exp://`, not through the edge.
@@ -5966,6 +6195,14 @@ function workerEnvKeys(manifest, workerId, runnables = {}) {
5966
6195
  /** What each construct an edge reaches hands the process that reaches it. */
5967
6196
  function addEdgeKeys(manifest, edges, keys) {
5968
6197
  for (const id of edges) {
6198
+ const bucket = eventsEdgeBucket(id);
6199
+ if (bucket) {
6200
+ if (manifest[bucket]?.kind === "objects") {
6201
+ keys.add(provideKey(bucket, "eventsConnectionString"));
6202
+ keys.add(provideKey(bucket, "eventsToken"));
6203
+ }
6204
+ continue;
6205
+ }
5969
6206
  const target = manifest[id];
5970
6207
  if (!target) continue;
5971
6208
  if (target.kind === "rest-api") {
@@ -7001,17 +7238,59 @@ async function answers(connection: unknown): Promise<boolean> {
7001
7238
  }
7002
7239
  }
7003
7240
 
7241
+ /** A request to a route this worker mounted, and what it answered. */
7242
+ export interface WorkerRequest {
7243
+ headers: Record<string, string | string[] | undefined>;
7244
+ body: string;
7245
+ }
7246
+ export interface WorkerAnswer {
7247
+ status: number;
7248
+ body: unknown;
7249
+ }
7250
+
7251
+ // The routes something pushes to: an SNS subscriber's, and the one a local
7252
+ // object store posts a bucket's events to. Mounted by the subscribers, served
7253
+ // by the entry's HTTP server beside the health check.
7254
+ const routes = new Map<string, (c: any) => unknown>();
7255
+ const app = {
7256
+ post: (path: string, handler: (c: any) => unknown) => {
7257
+ routes.set(path, handler);
7258
+ },
7259
+ };
7260
+
7261
+ /** Run one mounted route, as the subscribers' handlers expect to be called. */
7262
+ async function route(path: string, request: WorkerRequest): Promise<WorkerAnswer | undefined> {
7263
+ const handler = routes.get(path);
7264
+ if (!handler) return undefined;
7265
+ let answer: WorkerAnswer | undefined;
7266
+ const c = {
7267
+ req: {
7268
+ text: async () => request.body,
7269
+ header: (name: string) => {
7270
+ const value = request.headers[name.toLowerCase()];
7271
+ return Array.isArray(value) ? value[0] : value;
7272
+ },
7273
+ },
7274
+ json: (body: unknown, status = 200) => {
7275
+ answer = { status, body };
7276
+ return answer;
7277
+ },
7278
+ };
7279
+ await handler(c);
7280
+ return answer ?? { status: 204, body: null };
7281
+ }
7282
+
7004
7283
  /** Start everything this worker runs. */
7005
7284
  export async function startWorker(): Promise<{
7006
7285
  health: () => Promise<WorkerHealth>;
7007
7286
  stop: () => Promise<void>;
7287
+ route: typeof route;
7288
+ /** Subscribe the pushed routes, once the server answers on \`port\`. */
7289
+ subscribeForPush: (port: number) => Promise<void>;
7008
7290
  }> {
7009
- // An app object with no routes: on a server target nothing is pushed to a
7010
- // subscriber, so there is nothing to mount.
7011
- const noRoutes = { post: () => undefined };
7012
-
7013
- await setupSubscribers(noRoutes, envParser, logger).catch((error) => {
7291
+ const subscribeForPush = await setupSubscribers(app, envParser, logger).catch((error) => {
7014
7292
  logger.error({ err: error }, 'Failed to start subscribers');
7293
+ return async (_port: number) => {};
7015
7294
  });
7016
7295
  await setupQueues(envParser, logger).catch((error) => {
7017
7296
  logger.error({ err: error }, 'Failed to start queue consumers');
@@ -7023,6 +7302,8 @@ export async function startWorker(): Promise<{
7023
7302
  const statuses = () => [subscribersStatus(), queuesStatus(), cronsStatus()];
7024
7303
 
7025
7304
  return {
7305
+ route,
7306
+ subscribeForPush,
7026
7307
  async health() {
7027
7308
  const all = statuses();
7028
7309
  const failed = all.flatMap((s) => s.failed);
@@ -7053,8 +7334,10 @@ function workerEntry(healthCheck) {
7053
7334
  * Generated by 'gkm build --production'.
7054
7335
  *
7055
7336
  * Runs this worker's crons, queue consumers and topic subscribers, and serves
7056
- * one route: ${healthCheck}, on PORT — 200 when every consumer started and
7057
- * every broker connection answers, 503 otherwise.
7337
+ * its health check: ${healthCheck}, on PORT — 200 when every consumer started
7338
+ * and every broker connection answers, 503 otherwise. Beside it, on the same
7339
+ * port, the POST routes its subscribers mounted: where a local object store
7340
+ * posts a bucket's events.
7058
7341
  *
7059
7342
  * On SIGTERM it stops pulling messages and scheduling crons, lets the handlers
7060
7343
  * in flight finish, closes its broker connections and database pools, and
@@ -7073,15 +7356,39 @@ let worker: Awaited<ReturnType<typeof startWorker>> | undefined;
7073
7356
  let stopping = false;
7074
7357
 
7075
7358
  const server = createServer((req, res) => {
7076
- const path = (req.url ?? '/').split('?')[0];
7077
- if (path !== ${JSON.stringify(healthCheck)} || (req.method !== 'GET' && req.method !== 'HEAD')) {
7078
- res.writeHead(404).end();
7079
- return;
7080
- }
7359
+ const path = (req.url ?? '/').split('?')[0] ?? '/';
7081
7360
  const answer = (status: number, body: unknown) => {
7082
7361
  res.writeHead(status, { 'content-type': 'application/json' });
7083
7362
  res.end(JSON.stringify(body));
7084
7363
  };
7364
+
7365
+ // A route a subscriber mounted: what SNS pushes to, or what a local object
7366
+ // store posts a bucket's events to. Refused while starting or stopping, so
7367
+ // the sender keeps the message and sends it again.
7368
+ if (req.method === 'POST') {
7369
+ let body = '';
7370
+ req.setEncoding('utf8');
7371
+ req.on('data', (chunk) => {
7372
+ body += chunk;
7373
+ });
7374
+ req.on('end', () => {
7375
+ if (stopping) return answer(503, { status: 'stopping' });
7376
+ if (!worker) return answer(503, { status: 'starting' });
7377
+ worker.route(path, { headers: req.headers, body }).then(
7378
+ (routed) => (routed ? answer(routed.status, routed.body) : answer(404, { status: 'not found' })),
7379
+ (error) => {
7380
+ logger.error({ err: error, path }, 'Route failed');
7381
+ answer(500, { status: 'failed' });
7382
+ },
7383
+ );
7384
+ });
7385
+ return;
7386
+ }
7387
+
7388
+ if (path !== ${JSON.stringify(healthCheck)} || (req.method !== 'GET' && req.method !== 'HEAD')) {
7389
+ res.writeHead(404).end();
7390
+ return;
7391
+ }
7085
7392
  if (stopping) return answer(503, { status: 'stopping' });
7086
7393
  if (!worker) return answer(503, { status: 'starting' });
7087
7394
  worker.health().then(
@@ -7115,6 +7422,9 @@ process.on('SIGINT', shutdown);
7115
7422
 
7116
7423
  worker = await startWorker();
7117
7424
  logger.info({ port }, 'Worker started');
7425
+ await worker.subscribeForPush(port).catch((error) => {
7426
+ logger.error({ err: error }, 'Failed to subscribe for push');
7427
+ });
7118
7428
  `;
7119
7429
  }
7120
7430
  //#endregion
@@ -7483,7 +7793,7 @@ async function createDnsProvider(options) {
7483
7793
  if (isDnsProvider(config.provider)) return config.provider;
7484
7794
  const provider = config.provider;
7485
7795
  if (provider === "hostinger") {
7486
- const { HostingerProvider } = await import("./HostingerProvider-BNpS9aRJ.mjs");
7796
+ const { HostingerProvider } = await import("./HostingerProvider-Cjh_2Ml6.mjs");
7487
7797
  return new HostingerProvider(options.hostinger);
7488
7798
  }
7489
7799
  if (provider === "route53") {
@@ -7496,7 +7806,7 @@ async function createDnsProvider(options) {
7496
7806
  });
7497
7807
  }
7498
7808
  if (provider === "godaddy") {
7499
- const { GoDaddyProvider } = await import("./GoDaddyProvider-BlB5nJky.mjs");
7809
+ const { GoDaddyProvider } = await import("./GoDaddyProvider-55x4o-4z.mjs");
7500
7810
  return new GoDaddyProvider(options.godaddy ?? {});
7501
7811
  }
7502
7812
  if (provider === "cloudflare") throw new DnsProviderNotImplemented("cloudflare");
@@ -8345,6 +8655,6 @@ function reportPlannedSeeds(planned, log) {
8345
8655
  for (const { folder, seeds } of planned) log(`🌱 ${folder}: would run ${seeds.length} (${seeds.join(", ")})`);
8346
8656
  }
8347
8657
  //#endregion
8348
- export { assertDevServicesFlag as $, stackLogs as $n, publicBuildValues as $t, StageProviderDisabled as A, localRolePassword as An, findAvailablePort as At, workerDockerfile as B, EMULATOR_ACCESS_KEY_ID as Bn, initStageSecrets as Bt, recordRollback as C, REDIS_SERVICE as Cn, composeFor as Ct, setPostgresBackupId as D, stackRedis as Dn, storageBackendFor as Dt, setGeneratedSecret as E, runsRedis as En, providerOf as Et, DockerBuildFailed as F, isTelemetryKey as Fn, prepareEntryCredentials as Ft, QueueGenerator as G, portKeys as Gn, composeBuildPaths as Gt, WorkerGenerator as H, DEFAULT_IMAGES as Hn, storage_exports as Ht, DockerPushFailed as I, scopeTelemetryEnv as In, isRemoteStore as It, AllowDevServicesTakesNoValue as J, primaryPortKey as Jn, WORKER_PORT as Jt, CronGenerator as K, portsOf as Kn, imageLayout as Kt, appDockerfile as L, surfaceClientTraced as Ln, secretsStoreFor as Lt, provisionCommand as M, planFor as Mn, loadEnvFiles as Mt, stageProviderNotes as N, resourceName as Nn, loadPortState as Nt, DnsRecordsUnreadable as O, withRedisPassword as On, createCredentialsPreload as Ot, PROVIDER_KINDS as P, appTelemetry as Pn, loadSecretsForApp as Pt, STORAGE_KEY_PAIR as Q, logsService as Qn, isImageBuild as Qt, dockerCommand as R, telemetryOf as Rn, storeFromConfig as Rt, recordRelease as S, withGeneratedSecrets as Sn, CLUSTER_DATABASE as St, setBackupState as T, redisService as Tn, eventsBackendFor as Tt, workerBundleName as U, describeServices as Un, toEmbeddableSecrets as Ut, workerDockerfileOf as V, hostFor as Vn, maskPassword as Vt, workerEntryDir as W, fakeKey as Wn, withCustomSecret as Wt, DevServicesNeedServerTarget as X, LOGS_SERVICE as Xn, findBuildRoot as Xt, DEV_SERVICES as Y, LOCAL_LOGS_EMAIL as Yn, detectPackageManager as Yt, ExternalServicesNotConfigured as Z, logsAccess as Zn, imageBuildCredentials as Zt, asDokployState as _, FileSecretsStore as _n, forgetState as _t, dnsResources as a, applyPostgres as an, suppliedOnly as at, getBackupState as b, projectKey as bn, bucketClient as bt, currentActor as c, postgresDatabaseNames as cn, networkEnv as ct, DeployJournal as d, mergeLifecycle as dn, backendsOf as dt, isUnder as en, withLogsPassword as er, devServicesUsed as et, extractSubdomain as f, LOCAL_RABBITMQ_USER as fn, constructGlobs as ft, verifyDnsRecords as g, readLocalCredentials as gn, LOCAL_CA_PATH as gt, orchestrateDns as h, postgresSuperuser as hn, workspace_exports as ht, dnsRecordResource as i, applyPolicies as in, stageServiceDeclarations as it, assertStageProvidersEnabled as j, TELEMETRY_CONTAINER as jn, isPortAvailable as jt, createDnsProvider as k, envFor as kn, createEntryWrapper as kt, describeActor as l, postgresStatements as ln, workerEnvKeys as lt, normalizeDnsConfig as m, postgresRoleSlug as mn, reconcileWorkspace as mt, reportDatabaseRuns as n, applyBuckets as nn, isMainFrontendApp as nr, reportDevServices as nt, forgetDnsResource as o, bucketLifecycles as on, appEnvKeys as ot, findRootDomain as p, loadLocalCredentials as pn, derivedContainers as pt, validateImageRef as q, postgresImage as qn, TURBO_VERSION as qt, reportPlannedSeeds as r, applyLifecycles as rn, resolveHost as rr, requiredStageKeys as rt, recordDnsChanges as s, bucketPolicies as sn, dockerfileOf as st, DeploySeedsFailed as t, workerUnits as tn, NoDomainForStage as tr, externalServices as tt, isCi as u, quoteIdentifier as un, FAKE_ENV as ut, createComposeState as v, getKeyPath as vn, LEGACY_LOCAL_LOGIN as vt, setApplicationId as w, STACK_CACHE as wn, cacheBackendFor as wt, getGeneratedSecret as x, readKey as xn, pgClient as xt, createEmptyState as y, keystoreProject as yn, ensurePostgresLogin as yt, ensureDockerignore as z, usesTelemetry as zn, store_exports as zt };
8658
+ export { assertDevServicesFlag as $, LOGS_SERVICE as $n, publicBuildValues as $t, StageProviderDisabled as A, envFor as An, findAvailablePort as At, workerDockerfile as B, usesTelemetry as Bn, initStageSecrets as Bt, recordRollback as C, withGeneratedSecrets as Cn, composeFor as Ct, setPostgresBackupId as D, runsRedis as Dn, storageBackendFor as Dt, setGeneratedSecret as E, redisService as En, providerOf as Et, DockerBuildFailed as F, appTelemetry as Fn, prepareEntryCredentials as Ft, QueueGenerator as G, DEFAULT_IMAGES as Gn, composeBuildPaths as Gt, WorkerGenerator as H, watchedBuckets as Hn, storage_exports as Ht, DockerPushFailed as I, isTelemetryKey as In, isRemoteStore as It, AllowDevServicesTakesNoValue as J, portKeys as Jn, WORKER_PORT as Jt, CronGenerator as K, describeServices as Kn, imageLayout as Kt, appDockerfile as L, scopeTelemetryEnv as Ln, secretsStoreFor as Lt, provisionCommand as M, TELEMETRY_CONTAINER as Mn, loadEnvFiles as Mt, stageProviderNotes as N, planFor as Nn, loadPortState as Nt, DnsRecordsUnreadable as O, stackRedis as On, createCredentialsPreload as Ot, PROVIDER_KINDS as P, resourceName as Pn, loadSecretsForApp as Pt, STORAGE_KEY_PAIR as Q, LOCAL_LOGS_EMAIL as Qn, isImageBuild as Qt, dockerCommand as R, surfaceClientTraced as Rn, storeFromConfig as Rt, recordRelease as S, readKey as Sn, CLUSTER_DATABASE as St, setBackupState as T, STACK_CACHE as Tn, eventsBackendFor as Tt, workerBundleName as U, EMULATOR_ACCESS_KEY_ID as Un, toEmbeddableSecrets as Ut, workerDockerfileOf as V, minioWebhookEnv as Vn, maskPassword as Vt, workerEntryDir as W, hostFor as Wn, withCustomSecret as Wt, DevServicesNeedServerTarget as X, postgresImage as Xn, findBuildRoot as Xt, DEV_SERVICES as Y, portsOf as Yn, detectPackageManager as Yt, ExternalServicesNotConfigured as Z, primaryPortKey as Zn, imageBuildCredentials as Zt, asDokployState as _, readLocalCredentials as _n, forgetState as _t, dnsResources as a, applyPolicies as an, isMainFrontendApp as ar, suppliedOnly as at, getBackupState as b, keystoreProject as bn, bucketClient as bt, currentActor as c, bucketPolicies as cn, networkEnv as ct, DeployJournal as d, quoteIdentifier as dn, backendsOf as dt, isUnder as en, logsAccess as er, devServicesUsed as et, extractSubdomain as f, mergeLifecycle as fn, constructGlobs as ft, verifyDnsRecords as g, postgresSuperuser as gn, LOCAL_CA_PATH as gt, orchestrateDns as h, postgresRoleSlug as hn, workspace_exports as ht, dnsRecordResource as i, applyNotifications as in, NoDomainForStage as ir, stageServiceDeclarations as it, assertStageProvidersEnabled as j, localRolePassword as jn, isPortAvailable as jt, createDnsProvider as k, withRedisPassword as kn, createEntryWrapper as kt, describeActor as l, postgresDatabaseNames as ln, workerEnvKeys as lt, normalizeDnsConfig as m, loadLocalCredentials as mn, reconcileWorkspace as mt, reportDatabaseRuns as n, applyBuckets as nn, stackLogs as nr, reportDevServices as nt, forgetDnsResource as o, applyPostgres as on, resolveHost as or, appEnvKeys as ot, findRootDomain as p, LOCAL_RABBITMQ_USER as pn, derivedContainers as pt, validateImageRef as q, fakeKey as qn, TURBO_VERSION as qt, reportPlannedSeeds as r, applyLifecycles as rn, withLogsPassword as rr, requiredStageKeys as rt, recordDnsChanges as s, bucketLifecycles as sn, dockerfileOf as st, DeploySeedsFailed as t, workerUnits as tn, logsService as tr, externalServices as tt, isCi as u, postgresStatements as un, FAKE_ENV as ut, createComposeState as v, FileSecretsStore as vn, LEGACY_LOCAL_LOGIN as vt, setApplicationId as w, REDIS_SERVICE as wn, cacheBackendFor as wt, getGeneratedSecret as x, projectKey as xn, pgClient as xt, createEmptyState as y, getKeyPath as yn, ensurePostgresLogin as yt, ensureDockerignore as z, telemetryOf as zn, store_exports as zt };
8349
8659
 
8350
- //# sourceMappingURL=seeds-Dv78P9LS.mjs.map
8660
+ //# sourceMappingURL=seeds-rG-Evfz9.mjs.map