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

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 (265) hide show
  1. package/dist/{EndpointGenerator-BDa6pPgE.cjs → EndpointGenerator-BGxf9jWE.cjs} +8 -4
  2. package/dist/{EndpointGenerator-BDa6pPgE.cjs.map → EndpointGenerator-BGxf9jWE.cjs.map} +1 -1
  3. package/dist/{EndpointGenerator-CP_z_E3e.mjs → EndpointGenerator-errMeldx.mjs} +8 -4
  4. package/dist/{EndpointGenerator-CP_z_E3e.mjs.map → EndpointGenerator-errMeldx.mjs.map} +1 -1
  5. package/dist/{GoDaddyProvider-BlB5nJky.mjs → GoDaddyProvider-BN1dODm9.mjs} +3 -3
  6. package/dist/{GoDaddyProvider-BlB5nJky.mjs.map → GoDaddyProvider-BN1dODm9.mjs.map} +1 -1
  7. package/dist/{GoDaddyProvider-Dubq-pCc.cjs → GoDaddyProvider-BTdtqhI_.cjs} +3 -3
  8. package/dist/{GoDaddyProvider-Dubq-pCc.cjs.map → GoDaddyProvider-BTdtqhI_.cjs.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-ClvUC8qy.cjs → LegacyStateStore-C2S8TGwx.cjs} +3 -3
  14. package/dist/{LegacyStateStore-ClvUC8qy.cjs.map → LegacyStateStore-C2S8TGwx.cjs.map} +1 -1
  15. package/dist/{LegacyStateStore-DGALQGZu.mjs → LegacyStateStore-DgXmuG87.mjs} +3 -3
  16. package/dist/{LegacyStateStore-DGALQGZu.mjs.map → LegacyStateStore-DgXmuG87.mjs.map} +1 -1
  17. package/dist/{LocalStateStore-43kSYNpw.cjs → LocalStateStore-CaJw9H-3.cjs} +2 -2
  18. package/dist/{LocalStateStore-43kSYNpw.cjs.map → LocalStateStore-CaJw9H-3.cjs.map} +1 -1
  19. package/dist/{LocalStateStore-CBYUzVR5.mjs → LocalStateStore-ojY_BiMK.mjs} +2 -2
  20. package/dist/{LocalStateStore-CBYUzVR5.mjs.map → LocalStateStore-ojY_BiMK.mjs.map} +1 -1
  21. package/dist/{OpenApiTsGenerator-CsrukCE-.mjs → OpenApiTsGenerator-W_HRXH1X.mjs} +2 -2
  22. package/dist/{OpenApiTsGenerator-CsrukCE-.mjs.map → OpenApiTsGenerator-W_HRXH1X.mjs.map} +1 -1
  23. package/dist/{OpenApiTsGenerator-FNhY7Ssz.cjs → OpenApiTsGenerator-cQgtxWQo.cjs} +2 -2
  24. package/dist/{OpenApiTsGenerator-FNhY7Ssz.cjs.map → OpenApiTsGenerator-cQgtxWQo.cjs.map} +1 -1
  25. package/dist/{S3StateStore-DLHjDYYP.mjs → S3StateStore-BSPkxhrx.mjs} +2 -2
  26. package/dist/{S3StateStore-DLHjDYYP.mjs.map → S3StateStore-BSPkxhrx.mjs.map} +1 -1
  27. package/dist/{S3StateStore-ahE7hSNK.cjs → S3StateStore-BqugXIcb.cjs} +2 -2
  28. package/dist/{S3StateStore-ahE7hSNK.cjs.map → S3StateStore-BqugXIcb.cjs.map} +1 -1
  29. package/dist/{SSMStateStore-qIzIuazA.cjs → SSMStateStore-B0OsuT_k.cjs} +2 -2
  30. package/dist/{SSMStateStore-qIzIuazA.cjs.map → SSMStateStore-B0OsuT_k.cjs.map} +1 -1
  31. package/dist/{SSMStateStore-j5RuMkch.mjs → SSMStateStore-DM85OiH0.mjs} +2 -2
  32. package/dist/{SSMStateStore-j5RuMkch.mjs.map → SSMStateStore-DM85OiH0.mjs.map} +1 -1
  33. package/dist/{SubscriberGenerator-C8CPxrCK.cjs → SubscriberGenerator-BDUp7OeY.cjs} +237 -54
  34. package/dist/SubscriberGenerator-BDUp7OeY.cjs.map +1 -0
  35. package/dist/{SubscriberGenerator-y3pncae_.mjs → SubscriberGenerator-ocQ2yj0K.mjs} +227 -56
  36. package/dist/SubscriberGenerator-ocQ2yj0K.mjs.map +1 -0
  37. package/dist/{add-Bm-C56lH.mjs → add-C7ZBXIzM.mjs} +6 -6
  38. package/dist/{add-Bm-C56lH.mjs.map → add-C7ZBXIzM.mjs.map} +1 -1
  39. package/dist/{add-C2CvXrYw.cjs → add-CrxvmSpq.cjs} +7 -7
  40. package/dist/{add-C2CvXrYw.cjs.map → add-CrxvmSpq.cjs.map} +1 -1
  41. package/dist/{bundler-Dk7tAvAX.cjs → bundler-DVUXW95p.cjs} +5 -5
  42. package/dist/{bundler-Dk7tAvAX.cjs.map → bundler-DVUXW95p.cjs.map} +1 -1
  43. package/dist/{bundler-DnkFt4mn.mjs → bundler-DpZ9uBGN.mjs} +5 -5
  44. package/dist/{bundler-DnkFt4mn.mjs.map → bundler-DpZ9uBGN.mjs.map} +1 -1
  45. package/dist/{cli-Di464j1O.cjs → cli-BMRhE6cZ.cjs} +4 -4
  46. package/dist/{cli-Di464j1O.cjs.map → cli-BMRhE6cZ.cjs.map} +1 -1
  47. package/dist/{cli-CVeHFXNE.mjs → cli-BWfYyy1k.mjs} +4 -4
  48. package/dist/{cli-CVeHFXNE.mjs.map → cli-BWfYyy1k.mjs.map} +1 -1
  49. package/dist/{compose-cHkF---f.mjs → compose-BFmdLig3.mjs} +525 -55
  50. package/dist/compose-BFmdLig3.mjs.map +1 -0
  51. package/dist/{compose-ChVvb3xM.cjs → compose-Bqcy0lqo.cjs} +554 -84
  52. package/dist/compose-Bqcy0lqo.cjs.map +1 -0
  53. package/dist/{config-DrOX29sT.d.mts → config-CdytFgSR.d.cts} +3 -4
  54. package/dist/config-CdytFgSR.d.cts.map +1 -0
  55. package/dist/{config-B3iz9BtK.d.cts → config-_y1FGBWR.d.mts} +3 -4
  56. package/dist/config-_y1FGBWR.d.mts.map +1 -0
  57. package/dist/config.cjs +2 -2
  58. package/dist/config.d.cts +3 -3
  59. package/dist/config.d.mts +3 -3
  60. package/dist/config.mjs +2 -2
  61. package/dist/{credentialSchemas-B67WJOOm.cjs → credentialSchemas-DFxvGEwa.cjs} +2 -2
  62. package/dist/{credentialSchemas-B67WJOOm.cjs.map → credentialSchemas-DFxvGEwa.cjs.map} +1 -1
  63. package/dist/{credentialSchemas-DDOLRCLF.mjs → credentialSchemas-DaMpt-Dx.mjs} +2 -2
  64. package/dist/{credentialSchemas-DDOLRCLF.mjs.map → credentialSchemas-DaMpt-Dx.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 +16 -17
  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 +11 -12
  76. package/dist/deploy/public.mjs.map +1 -1
  77. package/dist/{deploy-DO4djCHb.mjs → deploy-D8pUA9Y0.mjs} +1240 -130
  78. package/dist/deploy-D8pUA9Y0.mjs.map +1 -0
  79. package/dist/{deploy-BffR_uEN.cjs → deploy-DVrNjX1X.cjs} +1261 -169
  80. package/dist/deploy-DVrNjX1X.cjs.map +1 -0
  81. package/dist/{discover-C5roJuc9.mjs → discover-CzGM5P3p.mjs} +136 -14
  82. package/dist/discover-CzGM5P3p.mjs.map +1 -0
  83. package/dist/{discover-DozUKs8f.cjs → discover-DL6h-J97.cjs} +158 -12
  84. package/dist/discover-DL6h-J97.cjs.map +1 -0
  85. package/dist/{dokploy-BcZm93Cc.mjs → dokploy-CzDGNB6A.mjs} +2 -2
  86. package/dist/{dokploy-BcZm93Cc.mjs.map → dokploy-CzDGNB6A.mjs.map} +1 -1
  87. package/dist/{dokploy-CsdvfH3t.cjs → dokploy-TtK6Zyl3.cjs} +2 -2
  88. package/dist/{dokploy-CsdvfH3t.cjs.map → dokploy-TtK6Zyl3.cjs.map} +1 -1
  89. package/dist/{drivers-BjGDYfnC.mjs → drivers-C-VqMtld.mjs} +2 -2
  90. package/dist/{drivers-BjGDYfnC.mjs.map → drivers-C-VqMtld.mjs.map} +1 -1
  91. package/dist/{drivers-DbjiYpW6.cjs → drivers-L29WvE95.cjs} +2 -2
  92. package/dist/{drivers-DbjiYpW6.cjs.map → drivers-L29WvE95.cjs.map} +1 -1
  93. package/dist/{eas-CN_cUXth.cjs → eas-D3clzkni.cjs} +2 -2
  94. package/dist/{eas-CN_cUXth.cjs.map → eas-D3clzkni.cjs.map} +1 -1
  95. package/dist/{eas-CBShP20v.mjs → eas-DaobzDks.mjs} +2 -2
  96. package/dist/{eas-CBShP20v.mjs.map → eas-DaobzDks.mjs.map} +1 -1
  97. package/dist/{emit-Dmc1nvdS.cjs → emit-CYloptRS.cjs} +34 -1
  98. package/dist/emit-CYloptRS.cjs.map +1 -0
  99. package/dist/{emit-C1e8qD08.mjs → emit-CiJGdy_f.mjs} +34 -1
  100. package/dist/emit-CiJGdy_f.mjs.map +1 -0
  101. package/dist/{encryption-CPDM49Hi.cjs → encryption-DBkIFiR2.cjs} +3 -3
  102. package/dist/{encryption-CPDM49Hi.cjs.map → encryption-DBkIFiR2.cjs.map} +1 -1
  103. package/dist/{encryption-CITa6dXL.mjs → encryption-DV31gEY8.mjs} +3 -3
  104. package/dist/{encryption-CITa6dXL.mjs.map → encryption-DV31gEY8.mjs.map} +1 -1
  105. package/dist/{engine-CTnHmHjz.mjs → engine-CFOR9h6X.mjs} +140 -16
  106. package/dist/engine-CFOR9h6X.mjs.map +1 -0
  107. package/dist/{engine-D-jfMVj-.cjs → engine-CuZUGbEh.cjs} +143 -19
  108. package/dist/engine-CuZUGbEh.cjs.map +1 -0
  109. package/dist/{github-D56PSK39.cjs → github-CsvtWSBW.cjs} +115 -47
  110. package/dist/github-CsvtWSBW.cjs.map +1 -0
  111. package/dist/{github-9RlA7EjN.mjs → github-Nep8pI4_.mjs} +113 -45
  112. package/dist/github-Nep8pI4_.mjs.map +1 -0
  113. package/dist/{googlePlay-SX_jQeJf.cjs → googlePlay-C-UfBXJU.cjs} +5 -5
  114. package/dist/{googlePlay-SX_jQeJf.cjs.map → googlePlay-C-UfBXJU.cjs.map} +1 -1
  115. package/dist/{googlePlay-COi5LXON.mjs → googlePlay-lF7Atm_N.mjs} +4 -4
  116. package/dist/{googlePlay-COi5LXON.mjs.map → googlePlay-lF7Atm_N.mjs.map} +1 -1
  117. package/dist/{index-DcyRA5Rf.d.mts → index-DrkV7N5w.d.mts} +2 -2
  118. package/dist/{index-DcyRA5Rf.d.mts.map → index-DrkV7N5w.d.mts.map} +1 -1
  119. package/dist/{index-DjLSMgAL.d.cts → index-yaXZ9m-J.d.cts} +2 -2
  120. package/dist/{index-DjLSMgAL.d.cts.map → index-yaXZ9m-J.d.cts.map} +1 -1
  121. package/dist/index.cjs +166 -85
  122. package/dist/index.cjs.map +1 -1
  123. package/dist/index.mjs +149 -68
  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-CrtxXeGY.cjs → migrate-Dp3GhFnf.cjs} +4 -4
  130. package/dist/{migrate-CrtxXeGY.cjs.map → migrate-Dp3GhFnf.cjs.map} +1 -1
  131. package/dist/{migrate-0J6gsfrQ.mjs → migrate-NfbPVhi9.mjs} +4 -4
  132. package/dist/{migrate-0J6gsfrQ.mjs.map → migrate-NfbPVhi9.mjs.map} +1 -1
  133. package/dist/{migrate-DJa_Dlsl.mjs → migrate-_sBX0pve.mjs} +3 -3
  134. package/dist/{migrate-DJa_Dlsl.mjs.map → migrate-_sBX0pve.mjs.map} +1 -1
  135. package/dist/{migrate-BCz1lkh_.cjs → migrate-hlNKNWmg.cjs} +3 -3
  136. package/dist/{migrate-BCz1lkh_.cjs.map → migrate-hlNKNWmg.cjs.map} +1 -1
  137. package/dist/openapi.cjs +3 -3
  138. package/dist/openapi.d.cts +1 -1
  139. package/dist/openapi.d.mts +1 -1
  140. package/dist/openapi.mjs +3 -3
  141. package/dist/{publish-CuQlOW5p.mjs → publish-BuUVaZVy.mjs} +2 -2
  142. package/dist/{publish-CuQlOW5p.mjs.map → publish-BuUVaZVy.mjs.map} +1 -1
  143. package/dist/{publish-qSpnvmdX.cjs → publish-ZOo4xEuZ.cjs} +2 -2
  144. package/dist/{publish-qSpnvmdX.cjs.map → publish-ZOo4xEuZ.cjs.map} +1 -1
  145. package/dist/{ready-BOfogqzr.mjs → ready-Ca883OvY.mjs} +6 -6
  146. package/dist/{ready-BOfogqzr.mjs.map → ready-Ca883OvY.mjs.map} +1 -1
  147. package/dist/{ready-BFFP838V.cjs → ready-qnqp6JAY.cjs} +6 -6
  148. package/dist/{ready-BFFP838V.cjs.map → ready-qnqp6JAY.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-BCU9pYDx.mjs} +4 -4
  156. package/dist/{resolve-j8hUcbGz.mjs.map → resolve-BCU9pYDx.mjs.map} +1 -1
  157. package/dist/{resolve-AsfohXd1.cjs → resolve-C9QqOl5t.cjs} +4 -4
  158. package/dist/{resolve-AsfohXd1.cjs.map → resolve-C9QqOl5t.cjs.map} +1 -1
  159. package/dist/{rollback-Bxq_URgL.cjs → rollback-CTWdDBgB.cjs} +7 -7
  160. package/dist/{rollback-Bxq_URgL.cjs.map → rollback-CTWdDBgB.cjs.map} +1 -1
  161. package/dist/{rollback-JgbAY43C.mjs → rollback-CWyyTQ0B.mjs} +7 -7
  162. package/dist/{rollback-JgbAY43C.mjs.map → rollback-CWyyTQ0B.mjs.map} +1 -1
  163. package/dist/{runtime-DIZTeGJV.d.cts → runtime-DCkfI2E7.d.mts} +2 -2
  164. package/dist/{runtime-DIZTeGJV.d.cts.map → runtime-DCkfI2E7.d.mts.map} +1 -1
  165. package/dist/{runtime-WMLJY-db.d.mts → runtime-Ie4znWIB.d.cts} +2 -2
  166. package/dist/{runtime-WMLJY-db.d.mts.map → runtime-Ie4znWIB.d.cts.map} +1 -1
  167. package/dist/{s3-B4FTQQkV.mjs → s3-BZzSnker.mjs} +2 -2
  168. package/dist/{s3-B4FTQQkV.mjs.map → s3-BZzSnker.mjs.map} +1 -1
  169. package/dist/{s3-DwKLXwUT.cjs → s3-pqgmCTOq.cjs} +2 -2
  170. package/dist/{s3-DwKLXwUT.cjs.map → s3-pqgmCTOq.cjs.map} +1 -1
  171. package/dist/sandbox/credentials-worker.cjs +2 -2
  172. package/dist/sandbox/credentials-worker.mjs +2 -2
  173. package/dist/sandbox/discover-worker.cjs +1 -1
  174. package/dist/sandbox/discover-worker.mjs +1 -1
  175. package/dist/sandbox/migrate-worker.cjs +1 -1
  176. package/dist/sandbox/migrate-worker.mjs +1 -1
  177. package/dist/{seeds-Dv78P9LS.mjs → seeds-CK7w79VC.mjs} +848 -61
  178. package/dist/seeds-CK7w79VC.mjs.map +1 -0
  179. package/dist/{seeds-BWC-qjSI.cjs → seeds-CPEcmoPn.cjs} +953 -64
  180. package/dist/seeds-CPEcmoPn.cjs.map +1 -0
  181. package/dist/{serverSetup-DB6sKwAy.mjs → serverSetup-BAPNuNEX.mjs} +6 -6
  182. package/dist/{serverSetup-DB6sKwAy.mjs.map → serverSetup-BAPNuNEX.mjs.map} +1 -1
  183. package/dist/{serverSetup-CtV80a5M.cjs → serverSetup-C6t6Vtt7.cjs} +6 -6
  184. package/dist/{serverSetup-CtV80a5M.cjs.map → serverSetup-C6t6Vtt7.cjs.map} +1 -1
  185. package/dist/{sniffer-ctpwBBkT.cjs → sniffer-DdX_WN_-.cjs} +9 -9
  186. package/dist/{sniffer-ctpwBBkT.cjs.map → sniffer-DdX_WN_-.cjs.map} +1 -1
  187. package/dist/{sniffer-qDFUQmWP.mjs → sniffer-g9v7cqDN.mjs} +9 -9
  188. package/dist/{sniffer-qDFUQmWP.mjs.map → sniffer-g9v7cqDN.mjs.map} +1 -1
  189. package/dist/{dns-Bmnuttja.cjs → snsSubscriptions-5Cqww8S7.cjs} +351 -3
  190. package/dist/snsSubscriptions-5Cqww8S7.cjs.map +1 -0
  191. package/dist/{dns-DFvO5a53.mjs → snsSubscriptions-BmYeeTH8.mjs} +280 -4
  192. package/dist/snsSubscriptions-BmYeeTH8.mjs.map +1 -0
  193. package/dist/{sst-C1pxbFEd.mjs → sst-CTqZZl1_.mjs} +3 -4
  194. package/dist/{sst-C1pxbFEd.mjs.map → sst-CTqZZl1_.mjs.map} +1 -1
  195. package/dist/{sst-B-Uz4cvm.cjs → sst-lEkBwzGc.cjs} +4 -5
  196. package/dist/{sst-B-Uz4cvm.cjs.map → sst-lEkBwzGc.cjs.map} +1 -1
  197. package/dist/{stage-C7lf36az.mjs → stage-C-I2dVw1.mjs} +6 -6
  198. package/dist/{stage-C7lf36az.mjs.map → stage-C-I2dVw1.mjs.map} +1 -1
  199. package/dist/{stage-DzALYUwY.cjs → stage-CUE5pMmw.cjs} +7 -7
  200. package/dist/{stage-DzALYUwY.cjs.map → stage-CUE5pMmw.cjs.map} +1 -1
  201. package/dist/{stages-B7mCWI_R.cjs → stages-3yUZaZeA.cjs} +2 -2
  202. package/dist/{stages-B7mCWI_R.cjs.map → stages-3yUZaZeA.cjs.map} +1 -1
  203. package/dist/{stages-DSltTW2d.mjs → stages-DTTv0NZW.mjs} +2 -2
  204. package/dist/{stages-DSltTW2d.mjs.map → stages-DTTv0NZW.mjs.map} +1 -1
  205. package/dist/target/public.cjs +1 -1
  206. package/dist/target/public.d.cts +2 -2
  207. package/dist/target/public.d.mts +2 -2
  208. package/dist/target/public.mjs +1 -1
  209. package/dist/{terminal-DJlqcW_U.cjs → terminal-PKhPAajN.cjs} +3 -3
  210. package/dist/{terminal-DJlqcW_U.cjs.map → terminal-PKhPAajN.cjs.map} +1 -1
  211. package/dist/{terminal-CW_dWeTe.mjs → terminal-bqY33lpN.mjs} +3 -3
  212. package/dist/{terminal-CW_dWeTe.mjs.map → terminal-bqY33lpN.mjs.map} +1 -1
  213. package/dist/{types-Q2SC_ly2.d.cts → types-Bmjs4jZV.d.mts} +248 -4
  214. package/dist/types-Bmjs4jZV.d.mts.map +1 -0
  215. package/dist/{types-C8gXOLWL.d.mts → types-D0IsQxES.d.cts} +249 -3
  216. package/dist/types-D0IsQxES.d.cts.map +1 -0
  217. package/dist/vitest.cjs +1 -1
  218. package/dist/vitest.mjs +1 -1
  219. package/dist/workspace/index.cjs +1 -1
  220. package/dist/workspace/index.d.cts +2 -2
  221. package/dist/workspace/index.d.mts +2 -2
  222. package/dist/workspace/index.mjs +1 -1
  223. package/dist/{workspace-DUnnVjqC.mjs → workspace-DBHF9Gba.mjs} +5 -3
  224. package/dist/workspace-DBHF9Gba.mjs.map +1 -0
  225. package/dist/{workspace-C82GLPnf.cjs → workspace-Du4Afb03.cjs} +5 -3
  226. package/dist/workspace-Du4Afb03.cjs.map +1 -0
  227. package/package.json +17 -15
  228. package/dist/SubscriberGenerator-C8CPxrCK.cjs.map +0 -1
  229. package/dist/SubscriberGenerator-y3pncae_.mjs.map +0 -1
  230. package/dist/compose-ChVvb3xM.cjs.map +0 -1
  231. package/dist/compose-cHkF---f.mjs.map +0 -1
  232. package/dist/config-B3iz9BtK.d.cts.map +0 -1
  233. package/dist/config-DrOX29sT.d.mts.map +0 -1
  234. package/dist/credentials-B5N5yKk6.mjs.map +0 -1
  235. package/dist/credentials-Zqr3QQYB.cjs.map +0 -1
  236. package/dist/deploy-BffR_uEN.cjs.map +0 -1
  237. package/dist/deploy-DO4djCHb.mjs.map +0 -1
  238. package/dist/discover-C08meHhu.d.mts +0 -125
  239. package/dist/discover-C08meHhu.d.mts.map +0 -1
  240. package/dist/discover-C5roJuc9.mjs.map +0 -1
  241. package/dist/discover-DipvfWpK.d.cts +0 -125
  242. package/dist/discover-DipvfWpK.d.cts.map +0 -1
  243. package/dist/discover-DozUKs8f.cjs.map +0 -1
  244. package/dist/dns-Bmnuttja.cjs.map +0 -1
  245. package/dist/dns-DFvO5a53.mjs.map +0 -1
  246. package/dist/emit-C1e8qD08.mjs.map +0 -1
  247. package/dist/emit-Dmc1nvdS.cjs.map +0 -1
  248. package/dist/engine-CTnHmHjz.mjs.map +0 -1
  249. package/dist/engine-D-jfMVj-.cjs.map +0 -1
  250. package/dist/github-9RlA7EjN.mjs.map +0 -1
  251. package/dist/github-D56PSK39.cjs.map +0 -1
  252. package/dist/run-BJLIerMM.mjs +0 -133
  253. package/dist/run-BJLIerMM.mjs.map +0 -1
  254. package/dist/run-fVZ-rLnc.cjs +0 -174
  255. package/dist/run-fVZ-rLnc.cjs.map +0 -1
  256. package/dist/sandbox-Co1y2CmF.d.mts +0 -104
  257. package/dist/sandbox-Co1y2CmF.d.mts.map +0 -1
  258. package/dist/sandbox-DvNqr6od.d.cts +0 -104
  259. package/dist/sandbox-DvNqr6od.d.cts.map +0 -1
  260. package/dist/seeds-BWC-qjSI.cjs.map +0 -1
  261. package/dist/seeds-Dv78P9LS.mjs.map +0 -1
  262. package/dist/types-C8gXOLWL.d.mts.map +0 -1
  263. package/dist/types-Q2SC_ly2.d.cts.map +0 -1
  264. package/dist/workspace-C82GLPnf.cjs.map +0 -1
  265. package/dist/workspace-DUnnVjqC.mjs.map +0 -1
@@ -6,15 +6,50 @@ import { t as WORKER_RESULT_MARKER } from "./workerRuntime-CsOyBRx2.mjs";
6
6
  import { createRequire } from "node:module";
7
7
  import { dirname, join, relative } from "node:path";
8
8
  import { existsSync } from "node:fs";
9
- import { assertDerivations, canonicalId } from "@geekmidas/manifest";
9
+ import { assertDerivations, canonicalId, provideKey } from "@geekmidas/manifest";
10
10
  import { fileURLToPath, pathToFileURL } from "node:url";
11
11
  import { AsyncLocalStorage } from "node:async_hooks";
12
12
  import { format } from "node:util";
13
13
  import { Cron } from "@geekmidas/constructs/crons";
14
+ import { Processor } from "@geekmidas/constructs/processors";
14
15
  import { Queue } from "@geekmidas/constructs/queue";
15
16
  import { Subscriber } from "@geekmidas/constructs/subscribers";
16
17
  import fg from "fast-glob";
17
18
  import kebabCase$1 from "lodash.kebabcase";
19
+ //#region src/reconcile/edges.ts
20
+ /**
21
+ * Edges a process records for what its runnables consume, beyond the
22
+ * construct ids `.dependsOn()` names.
23
+ */
24
+ const EVENTS_SUFFIX = "#events";
25
+ /**
26
+ * A bucket's events, as an edge: what a process running one of the bucket's
27
+ * subscribers consumes. Not the bucket's id — binding to a bucket's changes
28
+ * is not reading its objects, so the process is handed the events key alone.
29
+ */
30
+ function eventsEdge(bucketId) {
31
+ return `${bucketId}${EVENTS_SUFFIX}`;
32
+ }
33
+ /** The bucket an events edge names, or nothing for any other edge. */
34
+ function eventsEdgeBucket(edge) {
35
+ return edge.endsWith(EVENTS_SUFFIX) ? edge.slice(0, -7) : void 0;
36
+ }
37
+ /**
38
+ * The env key a subscriber's deliveries come from: its topic's publisher
39
+ * connection string, or its bucket's events connection string.
40
+ */
41
+ function subscriberConnectionKey(construct) {
42
+ if (construct.bucketName) return provideKey(canonicalId(construct.bucketName), "eventsConnectionString");
43
+ if (construct.topicName) return provideKey(canonicalId(construct.topicName), "publisherConnectionString");
44
+ }
45
+ /**
46
+ * The key a bucket's relay token is read from, by the process that runs the
47
+ * bucket's subscribers — beside its events connection string.
48
+ */
49
+ function subscriberTokenKey(construct) {
50
+ return construct.bucketName ? provideKey(canonicalId(construct.bucketName), "eventsToken") : void 0;
51
+ }
52
+ //#endregion
18
53
  //#region src/output.ts
19
54
  /**
20
55
  * Where the CLI's progress lines go.
@@ -265,6 +300,7 @@ var discover_exports = /* @__PURE__ */ __exportAll({
265
300
  ConstructsNotSerializable: () => ConstructsNotSerializable,
266
301
  DuplicateConstruct: () => DuplicateConstruct,
267
302
  LiveConstructsUnavailable: () => LiveConstructsUnavailable,
303
+ ProcessorServerUnknown: () => ProcessorServerUnknown,
268
304
  consumedBy: () => consumedBy,
269
305
  discover: () => discover,
270
306
  isDeclarable: () => isDeclarable
@@ -295,7 +331,8 @@ const DiscoverAnswer = discriminatedUnion("reason", [
295
331
  background: record(string(), array(string())).optional(),
296
332
  subscribers: record(string(), array(object({
297
333
  name: string(),
298
- topic: string()
334
+ connectionKey: string(),
335
+ events: array(string()).optional()
299
336
  }))).optional()
300
337
  }),
301
338
  object({
@@ -422,6 +459,8 @@ async function discover(options) {
422
459
  });
423
460
  /** Matched files, for the diagnostic below. */
424
461
  let matched = 0;
462
+ /** Each processor, once, by the export that first reached it. */
463
+ const processors = /* @__PURE__ */ new Map();
425
464
  for await (const found of files) {
426
465
  matched++;
427
466
  const file = found.toString();
@@ -429,6 +468,14 @@ async function discover(options) {
429
468
  for (const [exportName, exported] of Object.entries(module)) {
430
469
  if (options.background) recordBackground(options.background, exported, file);
431
470
  if (options.subscribers) recordSubscriber(options.subscribers, exported, exportName);
471
+ if (Processor.isProcessor(exported)) {
472
+ const seenAt = processors.get(exported);
473
+ if (!seenAt || definedIn(file, seenAt.file)) processors.set(exported, {
474
+ exportName,
475
+ file,
476
+ processor: exported
477
+ });
478
+ }
432
479
  if (!isDeclarable(exported)) {
433
480
  if (options.runnables) recordRunnable(options.runnables, exported);
434
481
  continue;
@@ -454,6 +501,7 @@ async function discover(options) {
454
501
  }
455
502
  }
456
503
  }
504
+ nestProcessors(manifest, [...processors.values()], cwd);
457
505
  assertDerivations(manifest);
458
506
  warnIfNothingFound(globs, matched, Object.keys(manifest).length);
459
507
  return manifest;
@@ -471,22 +519,84 @@ function recordBackground(background, exported, file) {
471
519
  background[key] = files;
472
520
  if (!files.includes(file)) files.push(file);
473
521
  }
522
+ /** A processor built from a file server the discovery never found. */
523
+ var ProcessorServerUnknown = class extends GkmError {
524
+ processor;
525
+ server;
526
+ constructor(processor, server) {
527
+ super(`The processor '${processor}' answers on '${server}', which no discovered file declares. Export the FileServer from a file the workspace's constructs glob matches.`);
528
+ this.processor = processor;
529
+ this.server = server;
530
+ this.name = "ProcessorServerUnknown";
531
+ }
532
+ };
474
533
  /**
475
- * Record a topic subscriber under the worker that runs it, by its export.
476
- * Once per name: a file reached twice through a re-export finds it again.
534
+ * Whether `file` is the likelier home of an export also reached from
535
+ * `other`: not a barrel (`index.*`) where the other is, and otherwise the
536
+ * first by path — so the answer never depends on the order the glob
537
+ * streamed them in.
538
+ */
539
+ function definedIn(file, other) {
540
+ const barrel = (path) => /(^|[/\\])index\.[cm]?[jt]s$/.test(path);
541
+ if (barrel(file) !== barrel(other)) return barrel(other);
542
+ return file < other;
543
+ }
544
+ /**
545
+ * Nest each processor in the file server it answers on.
546
+ *
547
+ * A processor is positional, as a subscriber is: it answers on its server's
548
+ * domain and nothing else. It is nested here, not only by the build, because
549
+ * every deploy path — the compose stack, the CDN in front of the bucket, the
550
+ * SST stack — reads the discovered manifest. Its handler is its source until a
551
+ * build replaces it with the generated one.
552
+ */
553
+ function nestProcessors(manifest, processors, cwd) {
554
+ for (const { exportName, file, processor } of processors) {
555
+ const server = manifest[processor.surfaceId];
556
+ if (server?.kind !== "file-server") throw new ProcessorServerUnknown(exportName, processor.surfaceId);
557
+ const declaration = {
558
+ id: exportName,
559
+ handler: `${relative(cwd, file)}#${exportName}`,
560
+ path: processor.pattern,
561
+ prefix: processor.prefix,
562
+ ...processor.native.length ? { native: [...processor.native] } : {},
563
+ ...processor.timeout !== void 0 ? { timeout: processor.timeout } : {},
564
+ ...processor.memorySize !== void 0 ? { memorySize: processor.memorySize } : {},
565
+ dependencies: processor.constructs.flatMap((id) => {
566
+ const target = manifest[canonicalId(id)];
567
+ return target ? [{
568
+ target: target.id,
569
+ kind: target.kind
570
+ }] : [];
571
+ })
572
+ };
573
+ manifest[server.id] = {
574
+ ...server,
575
+ processors: [...(server.processors ?? []).filter((p) => p.id !== exportName), declaration].sort((a, b) => a.id.localeCompare(b.id))
576
+ };
577
+ }
578
+ }
579
+ /**
580
+ * Record a subscriber — to a topic or to a bucket — under the worker that
581
+ * runs it, by its export. Once per name: a file reached twice through a
582
+ * re-export finds it again.
477
583
  */
478
584
  function recordSubscriber(subscribers, exported, exportName) {
479
585
  if (!Subscriber.isSubscriber(exported)) return;
480
- const { owner, topicName } = exported;
481
- if (typeof owner !== "string" || typeof topicName !== "string") return;
586
+ const owner = exported.owner;
587
+ const connectionKey = subscriberConnectionKey(exported);
588
+ if (typeof owner !== "string" || !connectionKey) return;
482
589
  const key = canonicalId(owner);
483
590
  const bound = subscribers[key] ?? [];
484
591
  subscribers[key] = bound;
485
- const topic = canonicalId(topicName);
486
- if (!bound.some((s) => s.topic === topic && s.name === exportName)) bound.push({
487
- name: exportName,
488
- topic
489
- });
592
+ if (!bound.some((s) => s.connectionKey === connectionKey && s.name === exportName)) {
593
+ const events = exported.topicName ? exported.subscribedEvents : void 0;
594
+ bound.push({
595
+ name: exportName,
596
+ connectionKey,
597
+ ...events ? { events: [...events] } : {}
598
+ });
599
+ }
490
600
  }
491
601
  /**
492
602
  * What a runnable consumes, by id: a queue's consumer drains that queue, a
@@ -495,9 +605,20 @@ function recordSubscriber(subscribers, exported, exportName) {
495
605
  function consumedBy(runnable) {
496
606
  if (Queue.isQueue(runnable)) return [runnable.id];
497
607
  if (Subscriber.isSubscriber(runnable) && runnable.topicName) return [canonicalId(runnable.topicName)];
608
+ if (Subscriber.isSubscriber(runnable) && runnable.bucketName) return [canonicalId(runnable.bucketName)];
498
609
  return [];
499
610
  }
500
611
  /**
612
+ * The edges a runnable's process records for what it consumes. A bucket's
613
+ * subscriber consumes the bucket's *events*, not the bucket: binding to its
614
+ * changes is not reading its objects, so its process is handed the events
615
+ * key and not the bucket's URL — that still takes `.dependsOn([bucket])`.
616
+ */
617
+ function consumedEdges(runnable) {
618
+ if (Subscriber.isSubscriber(runnable) && runnable.bucketName) return [eventsEdge(canonicalId(runnable.bucketName))];
619
+ return consumedBy(runnable);
620
+ }
621
+ /**
501
622
  * Record a runnable's edges under the construct that owns it — the surface an
502
623
  * endpoint was built from, or the worker a cron or subscriber was. Anything
503
624
  * with no owner, or that is not a runnable at all, is left alone.
@@ -510,11 +631,12 @@ function recordRunnable(runnables, exported) {
510
631
  const key = canonicalId(owner);
511
632
  const edges = runnables[key] ?? [];
512
633
  runnables[key] = edges;
513
- for (const id of [...runnable.constructs, ...consumedBy(exported)]) {
634
+ for (const id of runnable.constructs) {
514
635
  if (typeof id !== "string") continue;
515
636
  const target = canonicalId(id);
516
637
  if (!edges.includes(target)) edges.push(target);
517
638
  }
639
+ for (const edge of consumedEdges(exported)) if (!edges.includes(edge)) edges.push(edge);
518
640
  }
519
641
  /**
520
642
  * Say so when a glob was configured and found nothing.
@@ -555,6 +677,6 @@ var DuplicateConstruct = class extends GkmError {
555
677
  }
556
678
  };
557
679
  //#endregion
558
- export { discover_exports as a, nodeWithTsx as c, ConstructGenerator as d, output as f, discover as i, runWorker as l, ConstructsNotSerializable as n, isDeclarable as o, withOutput as p, consumedBy as r, SandboxWorkerFailed as s, ConstructDiscoveryFailed as t, withOwningTsconfigJsx as u };
680
+ export { subscriberTokenKey as _, discover_exports as a, nodeWithTsx as c, ConstructGenerator as d, output as f, subscriberConnectionKey as g, eventsEdgeBucket as h, discover as i, runWorker as l, eventsEdge as m, ConstructsNotSerializable as n, isDeclarable as o, withOutput as p, consumedBy as r, SandboxWorkerFailed as s, ConstructDiscoveryFailed as t, withOwningTsconfigJsx as u };
559
681
 
560
- //# sourceMappingURL=discover-C5roJuc9.mjs.map
682
+ //# sourceMappingURL=discover-CzGM5P3p.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discover-CzGM5P3p.mjs","names":["kebabCase","z.discriminatedUnion","z.object","z.literal","z.record","z.string","z.array","z\n\t\t\t.record","z\n\t\t\t.object"],"sources":["../src/reconcile/edges.ts","../src/output.ts","../src/generators/Generator.ts","../src/owningTsconfigJsx.ts","../src/sandbox/worker.ts","../src/reconcile/discover.ts"],"sourcesContent":["/**\n * Edges a process records for what its runnables consume, beyond the\n * construct ids `.dependsOn()` names.\n */\n\nimport { canonicalId, provideKey } from '@geekmidas/manifest';\n\nconst EVENTS_SUFFIX = '#events';\n\n/**\n * A bucket's events, as an edge: what a process running one of the bucket's\n * subscribers consumes. Not the bucket's id — binding to a bucket's changes\n * is not reading its objects, so the process is handed the events key alone.\n */\nexport function eventsEdge(bucketId: string): string {\n\treturn `${bucketId}${EVENTS_SUFFIX}`;\n}\n\n/** The bucket an events edge names, or nothing for any other edge. */\nexport function eventsEdgeBucket(edge: string): string | undefined {\n\treturn edge.endsWith(EVENTS_SUFFIX)\n\t\t? edge.slice(0, -EVENTS_SUFFIX.length)\n\t\t: undefined;\n}\n\n/**\n * The env key a subscriber's deliveries come from: its topic's publisher\n * connection string, or its bucket's events connection string.\n */\nexport function subscriberConnectionKey(construct: {\n\ttopicName?: string;\n\tbucketName?: string;\n}): string | undefined {\n\tif (construct.bucketName) {\n\t\treturn provideKey(\n\t\t\tcanonicalId(construct.bucketName),\n\t\t\t'eventsConnectionString',\n\t\t);\n\t}\n\tif (construct.topicName) {\n\t\treturn provideKey(\n\t\t\tcanonicalId(construct.topicName),\n\t\t\t'publisherConnectionString',\n\t\t);\n\t}\n\treturn undefined;\n}\n\n/**\n * The key a bucket's relay token is read from, by the process that runs the\n * bucket's subscribers — beside its events connection string.\n */\nexport function subscriberTokenKey(construct: {\n\tbucketName?: string;\n}): string | undefined {\n\treturn construct.bucketName\n\t\t? provideKey(canonicalId(construct.bucketName), 'eventsToken')\n\t\t: undefined;\n}\n","/**\n * Where the CLI's progress lines go.\n *\n * Commands write their progress through `output` rather than `console`. Run\n * from the terminal that is the same thing. Run inside `deploy()`, each line\n * goes to the run that wrote it instead — as an event its caller can iterate,\n * and to the logger it was handed — so a deploy embedded in another program\n * does not print over that program's own output.\n *\n * Carried by `AsyncLocalStorage` rather than passed down, because the lines\n * come from everywhere a deploy reaches — the Dockerfile generator, the env\n * sniffer, construct discovery — and two deploys running in one process must\n * not hear each other.\n */\n\nimport { AsyncLocalStorage } from 'node:async_hooks';\nimport { format } from 'node:util';\n\n/** How loud a line is. */\nexport type OutputLevel = 'info' | 'warn' | 'error';\n\n/** Receives each line written while it is the current sink. */\nexport type OutputSink = (level: OutputLevel, message: string) => void;\n\nconst current = new AsyncLocalStorage<OutputSink>();\n\n/** Runs `fn` with every line written through `output` sent to `sink`. */\nexport function withOutput<T>(sink: OutputSink, fn: () => T): T {\n\treturn current.run(sink, fn);\n}\n\nfunction write(\n\tlevel: OutputLevel,\n\tfallback: (...args: unknown[]) => void,\n): (...args: unknown[]) => void {\n\treturn (...args) => {\n\t\tconst sink = current.getStore();\n\t\tif (sink) sink(level, format(...args));\n\t\telse fallback(...args);\n\t};\n}\n\n/**\n * `console`, for the methods the CLI logs through — routed to the current\n * run's sink when there is one.\n */\nexport const output = {\n\tlog: write('info', (...args) => console.log(...args)),\n\tinfo: write('info', (...args) => console.info(...args)),\n\twarn: write('warn', (...args) => console.warn(...args)),\n\terror: write('error', (...args) => console.error(...args)),\n};\n","import { relative } from 'node:path';\nimport type { Construct } from '@geekmidas/constructs';\nimport fg from 'fast-glob';\nimport kebabCase from 'lodash.kebabcase';\nimport type { BuildContext } from '../build/types';\nimport type { MainProvider, Routes } from '../types';\n\n/**\n * Zod v4 maintains a process-wide registry of schemas registered via\n * `.meta({ id })`. When we cache-bust user module imports (by appending a\n * `?t=timestamp` query), those modules re-execute and try to register the\n * same ids again, which throws `ID X already exists in the registry`.\n *\n * Clearing the registry in the CLI process is safe: the user's running\n * server lives in a subprocess and has its own isolated registry.\n *\n * Exported for tests.\n */\nexport function clearZodGlobalRegistry(): void {\n\tconst registry = (\n\t\tglobalThis as { __zod_globalRegistry?: { clear?: () => void } }\n\t).__zod_globalRegistry;\n\tif (registry && typeof registry.clear === 'function') {\n\t\tregistry.clear();\n\t}\n}\n\nexport interface GeneratorOptions {\n\t/** Where the build deploys: one Lambda per construct, or one process. */\n\ttarget?: MainProvider;\n\t/**\n\t * What a handler path in the manifest is relative to — the workspace root,\n\t * which is where `sst.config.ts` runs and resolves it from.\n\t */\n\troot?: string;\n\t[key: string]: any;\n}\n\nexport abstract class ConstructGenerator<T extends Construct, R = void> {\n\tabstract isConstruct(value: any): value is T;\n\n\tstatic async build<T extends Construct, R = void>(\n\t\tcontext: BuildContext,\n\t\toutputDir: string,\n\t\tgenerator: ConstructGenerator<T, R>,\n\t\tpatterns?: Routes,\n\t\toptions?: GeneratorOptions,\n\t): Promise<R> {\n\t\tconst constructs = await generator.load(patterns);\n\t\treturn generator.build(context, constructs, outputDir, options);\n\t}\n\n\tabstract build(\n\t\tcontext: BuildContext,\n\t\tconstructs: GeneratedConstruct<T>[],\n\t\toutputDir: string,\n\t\toptions?: GeneratorOptions,\n\t): Promise<R>;\n\n\tasync load(\n\t\tpatterns?: Routes,\n\t\tcwd = process.cwd(),\n\t\tbustCache = false,\n\t): Promise<GeneratedConstruct<T>[]> {\n\t\tconst logger = console;\n\n\t\tconst globPatterns = Array.isArray(patterns)\n\t\t\t? patterns\n\t\t\t: patterns\n\t\t\t\t? [patterns]\n\t\t\t\t: [];\n\n\t\t// Find all files\n\t\tconst files = fg.stream(globPatterns, {\n\t\t\tcwd,\n\t\t\tabsolute: true,\n\t\t});\n\n\t\t// Cache-busted re-imports re-execute user modules, which would try to\n\t\t// re-register Zod schemas with the same `.meta({ id })`. Clear the\n\t\t// global registry once per load to prevent duplicate-id errors.\n\t\tif (bustCache) {\n\t\t\tclearZodGlobalRegistry();\n\t\t}\n\n\t\t// Load constructs\n\t\tconst constructs: GeneratedConstruct<T>[] = [];\n\n\t\tfor await (const f of files) {\n\t\t\ttry {\n\t\t\t\tconst file = f.toString();\n\t\t\t\t// Append cache-busting query param to force re-import of changed modules\n\t\t\t\tconst importPath = bustCache ? `${file}?t=${Date.now()}` : file;\n\t\t\t\tconst module = await import(importPath);\n\n\t\t\t\t// Check all exports for constructs\n\t\t\t\tfor (const [key, construct] of Object.entries(module)) {\n\t\t\t\t\tif (this.isConstruct(construct)) {\n\t\t\t\t\t\tconstructs.push({\n\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\tname: kebabCase(key),\n\t\t\t\t\t\t\tconstruct,\n\t\t\t\t\t\t\tpath: {\n\t\t\t\t\t\t\t\tabsolute: file,\n\t\t\t\t\t\t\t\trelative: relative(process.cwd(), file),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconst err = error as Error;\n\t\t\t\tlogger.error(`Failed to load ${f}: ${err.message}`);\n\t\t\t\tif (err.stack) {\n\t\t\t\t\tlogger.error(err.stack);\n\t\t\t\t}\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\n\t\treturn constructs;\n\t}\n}\n\nexport interface GeneratedConstruct<T extends Construct> {\n\tkey: string;\n\tname: string;\n\tconstruct: T;\n\tpath: {\n\t\tabsolute: string;\n\t\trelative: string;\n\t};\n}\n","import { existsSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { fileURLToPath, pathToFileURL } from 'node:url';\n\nconst REGISTER = 'owning-tsconfig-jsx-register.mjs';\n\n/** The CLI's `bin/` was not found above the module looking for it. */\nexport class OwningTsconfigJsxHookMissing extends Error {\n\tconstructor(readonly from: string) {\n\t\tsuper(\n\t\t\t`Could not find bin/${REGISTER} in any directory above '${from}'. ` +\n\t\t\t\t'It ships with @geekmidas/cli beside bin/gkm.mjs; reinstall the ' +\n\t\t\t\t'package if it is missing.',\n\t\t);\n\t\tthis.name = 'OwningTsconfigJsxHookMissing';\n\t}\n}\n\n/**\n * The CLI's `bin/owning-tsconfig-jsx-register.mjs`, as a file URL. Searched\n * upward because this module runs from `src/` in the repo and from a chunk in\n * `dist/` once built, and `bin/` sits beside both.\n */\nfunction registerUrl(): string {\n\tconst from = dirname(fileURLToPath(import.meta.url));\n\tfor (let dir = from; ; dir = dirname(dir)) {\n\t\tconst candidate = join(dir, 'bin', REGISTER);\n\t\tif (existsSync(candidate)) return pathToFileURL(candidate).href;\n\t\tif (dirname(dir) === dir) throw new OwningTsconfigJsxHookMissing(from);\n\t}\n}\n\n/**\n * `NODE_OPTIONS` for a process that runs app code through tsx, with the hook\n * that compiles each `.tsx` with its own tsconfig's JSX settings (see\n * `bin/owning-tsconfig-jsx.mjs`) put in front of every other `--import`, so it\n * is registered before tsx and reads the source on tsx's behalf.\n *\n * `bin/gkm.mjs` already starts the CLI this way, and its children inherit it;\n * this is for those that set `NODE_OPTIONS` themselves, or whose CLI was\n * started with tsx already imported.\n */\nexport function withOwningTsconfigJsx(nodeOptions = ''): string {\n\tif (nodeOptions.includes(REGISTER)) return nodeOptions;\n\treturn [`--import=${registerUrl()}`, nodeOptions].filter(Boolean).join(' ');\n}\n","/**\n * Running one of the CLI's own worker scripts inside a sandbox, and reading\n * back the one JSON value it answers with.\n *\n * The worker imports the project's TypeScript — `gkm.config.ts`, construct\n * modules, an app's entry — so it starts with the CLI's own tsx and the two\n * hooks `gkm` itself runs with (JSX by the owning tsconfig, path aliases by\n * the adjacent one). The host process needs none of them loaded: a program\n * calling `deploy()` without `--import tsx` still loads a TypeScript config.\n */\n\nimport { existsSync } from 'node:fs';\nimport { createRequire } from 'node:module';\nimport { dirname, join } from 'node:path';\nimport { fileURLToPath, pathToFileURL } from 'node:url';\nimport type { z } from 'zod';\nimport { withOwningTsconfigJsx } from '../owningTsconfigJsx';\nimport { oncePerRun, type Sandbox } from './sandbox';\nimport { WORKER_RESULT_MARKER } from './workerRuntime';\n\nconst here = dirname(fileURLToPath(import.meta.url));\n\n/**\n * A worker's file: `dist/sandbox/<name>.mjs` once built — whether this module\n * was bundled into `dist/` or sits beside it — or the `.ts` source under tsx.\n */\nexport function workerFile(name: string): string {\n\tconst candidates = [\n\t\tjoin(here, 'sandbox', `${name}.mjs`),\n\t\tjoin(here, `${name}.mjs`),\n\t\tjoin(here, '..', 'sandbox', `${name}.mjs`),\n\t\tjoin(here, `${name}.ts`),\n\t];\n\treturn (\n\t\tcandidates.find((path) => existsSync(path)) ?? join(here, `${name}.ts`)\n\t);\n}\n\n/** tsx, from the CLI's own dependencies — never the project's. */\nexport function tsxUrl(): string {\n\treturn pathToFileURL(createRequire(import.meta.url).resolve('tsx')).href;\n}\n\n/**\n * `node`'s arguments for `script`: the CLI's TypeScript loaders, then any\n * further `imports`, then the script and its `args` — an argument array, so\n * nothing about a path is read by a shell.\n */\nexport function nodeWithTsx(\n\tscript: string,\n\targs: readonly string[],\n\timports: readonly string[] = [],\n): string[] {\n\treturn [\n\t\t...withOwningTsconfigJsx(`--import=${tsxUrl()}`).split(' '),\n\t\t...imports.map((path) => `--import=${pathToFileURL(path).href}`),\n\t\tscript,\n\t\t...args,\n\t];\n}\n\n/** A worker ended without the answer it exists to give. */\nexport class SandboxWorkerFailed extends Error {\n\tconstructor(\n\t\treadonly step: string,\n\t\treadonly exitCode: number | null,\n\t\treadonly stderr: string,\n\t) {\n\t\tsuper(\n\t\t\t`The sandboxed ${step} ended (exit code ${exitCode}) without an ` +\n\t\t\t\t`answer.${stderr.trim() ? `\\n${stderr.trim()}` : ''}\\nIts output ` +\n\t\t\t\t'above says why; the sandbox must be able to run `node` with the ' +\n\t\t\t\t\"CLI's own files at the paths they have here.\",\n\t\t);\n\t\tthis.name = 'SandboxWorkerFailed';\n\t}\n}\n\nexport interface WorkerRun<T> {\n\t/** What the worker answered, as the schema reads it. */\n\tvalue: T;\n\t/** What it wrote to stderr: warnings a caller may pass on. */\n\tstderr: string;\n}\n\n/**\n * Run worker `name` in `sandbox`, and parse its answer with `schema`.\n *\n * The answer is the last marked line on stdout. Anything else the project's\n * code printed is ignored, and an answer the schema refuses is a failure\n * rather than data — a worker in an isolating sandbox runs code the host does\n * not trust.\n *\n * Within a run (`withSandbox`), the same worker asked the same question is\n * started once; every ask gets its own copy of the answer, and its stderr, as\n * though it had run again.\n */\nexport async function runWorker<S extends z.ZodType>(\n\tsandbox: Sandbox,\n\tstep: string,\n\toptions: WorkerOptions<S>,\n): Promise<WorkerRun<z.infer<S>>> {\n\t// A step handed secrets acts on something — a database it migrates — and\n\t// is not a question whose answer can be reused; nor do its secrets belong\n\t// in a cache key.\n\tif (options.secrets) return startWorker(sandbox, step, options);\n\n\tconst key = JSON.stringify([\n\t\toptions.name,\n\t\toptions.cwd,\n\t\toptions.args,\n\t\toptions.env ?? {},\n\t]);\n\tconst answer = await oncePerRun(sandbox, key, () =>\n\t\tstartWorker(sandbox, step, options),\n\t);\n\treturn structuredClone(answer);\n}\n\ninterface WorkerOptions<S extends z.ZodType> {\n\tname: string;\n\targs: readonly string[];\n\tcwd: string;\n\ttimeoutMs: number;\n\tenv?: Readonly<Record<string, string>>;\n\t/** Mounted as files, named by `GKM_SECRETS_DIR` — never variables. */\n\tsecrets?: Readonly<Record<string, string>>;\n\tsignal?: AbortSignal;\n\tschema: S;\n}\n\nasync function startWorker<S extends z.ZodType>(\n\tsandbox: Sandbox,\n\tstep: string,\n\toptions: WorkerOptions<S>,\n): Promise<WorkerRun<z.infer<S>>> {\n\tconst result = await sandbox.exec(\n\t\t'node',\n\t\tnodeWithTsx(workerFile(options.name), options.args),\n\t\t{\n\t\t\tcwd: options.cwd,\n\t\t\tenv: { ...sandbox.env, ...options.env },\n\t\t\ttimeoutMs: options.timeoutMs,\n\t\t\toutput: 'capture',\n\t\t\t...(options.secrets ? { secrets: options.secrets } : {}),\n\t\t\t...(options.signal ? { signal: options.signal } : {}),\n\t\t},\n\t);\n\n\tconst line = result.stdout\n\t\t.split('\\n')\n\t\t.reverse()\n\t\t.find((l) => l.startsWith(WORKER_RESULT_MARKER));\n\tif (line) {\n\t\ttry {\n\t\t\tconst parsed = options.schema.safeParse(\n\t\t\t\tJSON.parse(line.slice(WORKER_RESULT_MARKER.length)),\n\t\t\t);\n\t\t\tif (parsed.success) return { value: parsed.data, stderr: result.stderr };\n\t\t} catch {\n\t\t\t// Not JSON: as good as no answer.\n\t\t}\n\t}\n\n\tthrow new SandboxWorkerFailed(step, result.exitCode, result.stderr);\n}\n","/**\n * Discovery — one glob, one structural test.\n *\n * A glob per kind is the same specialness the construct model removes, and\n * resources have no kind to be listed under: a declared `ObjectStorage` would\n * never be found by `routes:` or `crons:`. So there is one `constructs` glob,\n * every export of every matching module is inspected, and the per-kind\n * `isConstruct` checks collapse into a single question — does it have an id and\n * can it declare?\n *\n * Structural rather than `instanceof` on purpose. A construct from a different\n * copy of `@geekmidas/constructs` — a linked workspace, two versions in a\n * lockfile — is still a construct, and `instanceof` is exactly the check that\n * says otherwise.\n */\n\nimport { relative } from 'node:path';\nimport { Cron } from '@geekmidas/constructs/crons';\nimport { Processor } from '@geekmidas/constructs/processors';\nimport { Queue } from '@geekmidas/constructs/queue';\nimport { Subscriber } from '@geekmidas/constructs/subscribers';\nimport {\n\tassertDerivations,\n\ttype ConstructManifest,\n\tcanonicalId,\n\ttype Declaration,\n\ttype ProcessorDeclaration,\n} from '@geekmidas/manifest';\nimport fg from 'fast-glob';\nimport { z } from 'zod';\nimport { GkmError } from '../errors';\nimport { clearZodGlobalRegistry } from '../generators/Generator';\nimport { output } from '../output';\nimport { activeSandbox, type Sandbox } from '../sandbox/sandbox';\nimport { runWorker } from '../sandbox/worker';\nimport { eventsEdge, subscriberConnectionKey } from './edges';\n\n/** `console`, or the deploy run discovering the manifest. */\nconst logger = output;\n\n/** The construct face discovery needs: an id, and the ability to declare. */\ninterface Declarable {\n\tid: string;\n\tdeclare(): Declaration[];\n}\n\n/**\n * Whether a module export is a construct.\n *\n * Deliberately loose about what else it carries — a construct that also has a\n * `service` is still a construct, and requiring one would exclude the kinds that\n * own no address.\n */\nexport function isDeclarable(value: unknown): value is Declarable {\n\tif (typeof value !== 'object' || value === null) return false;\n\n\tconst candidate = value as Partial<Declarable>;\n\n\treturn (\n\t\ttypeof candidate.id === 'string' &&\n\t\tcandidate.id.length > 0 &&\n\t\ttypeof candidate.declare === 'function'\n\t);\n}\n\nexport interface DiscoverOptions {\n\t/** The glob(s) to search. One pattern, not one per kind. */\n\tpatterns: string | readonly string[];\n\tcwd?: string;\n\t/**\n\t * Re-import changed modules, for the dev watcher.\n\t *\n\t * A single glob makes discovery more central, not less: a new construct file\n\t * has to be picked up on `add`, not only on `change`.\n\t */\n\tbustCache?: boolean;\n\t/**\n\t * Filled in with where each construct was found, when provided.\n\t *\n\t * Discovery is the only thing that knows: it globbed the files and imported\n\t * them. Everything downstream that needs to *write* an import — the build,\n\t * generating a server entry that reads a surface's logger — would otherwise\n\t * have to be told the path in config, which is the string this removes.\n\t *\n\t * An out-parameter rather than a second return value so that every existing\n\t * caller, which wants the manifest and nothing else, is unchanged.\n\t */\n\tsources?: Record<string, ConstructSource>;\n\t/**\n\t * Filled in, when provided, with the ids each owner's runnables declared an\n\t * edge to — keyed by the surface an endpoint was built from, or the worker\n\t * a cron or subscriber was.\n\t *\n\t * A runnable is not a declaration: a surface's endpoints are found by the\n\t * glob, not listed by the surface, so its node says `endpoints: []` until a\n\t * build folds the routes in. Anything deciding what an app's process reaches\n\t * — which keys its container is given — needs those edges before any build,\n\t * and discovery is already importing the files they are in.\n\t */\n\trunnables?: Record<string, string[]>;\n\t/**\n\t * Filled in, when provided, with the files each worker's background work is\n\t * declared in — its crons, queue consumers and topic subscribers — keyed by\n\t * the worker.\n\t *\n\t * What says which app's build carries a worker's entry: the one whose\n\t * directory holds its work. A worker declares no path of its own.\n\t */\n\tbackground?: Record<string, string[]>;\n\t/**\n\t * Filled in, when provided, with each worker's subscribers — by the export\n\t * a push route is named after, and the key its deliveries come from: its\n\t * topic's, or its bucket's events — keyed by the worker.\n\t *\n\t * What says which worker SNS pushes to, and on which paths: a build bound\n\t * for a server records no subscriber in the manifest, because none has a\n\t * handler of its own there.\n\t */\n\tsubscribers?: Record<string, BoundSubscriber[]>;\n\t/**\n\t * Import the construct modules in this sandbox rather than in this\n\t * process. Defaults to the run's own (`withSandbox`), so a deploy's every\n\t * discovery — the engine's included — happens there; with neither, they\n\t * are imported here, as before.\n\t */\n\tsandbox?: Sandbox;\n}\n\n/** A worker's subscriber — to a topic or to a bucket — as discovery found it. */\nexport interface BoundSubscriber {\n\t/** Its export — what its push route is named after. */\n\tname: string;\n\t/**\n\t * The env key its deliveries come from: its topic's publisher connection\n\t * string, or its bucket's events connection string. An `sns://` value is\n\t * what makes SNS push to it.\n\t */\n\tconnectionKey: string;\n\t/**\n\t * The event types a topic subscriber names — its SNS subscription's filter\n\t * on the `type` attribute the topic's publisher sets. Absent for a\n\t * bucket's subscriber: S3 sets no such attribute, and the subscriber's own\n\t * filter decides.\n\t */\n\tevents?: readonly string[];\n}\n\n/** What the discovery worker answers. Checked: the worker ran project code. */\nconst DiscoverAnswer = z.discriminatedUnion('reason', [\n\tz.object({\n\t\treason: z.literal('discovered'),\n\t\tmanifest: z.record(\n\t\t\tz.string(),\n\t\t\tz.object({ id: z.string(), kind: z.string() }).loose(),\n\t\t),\n\t\trunnables: z.record(z.string(), z.array(z.string())),\n\t\tbackground: z.record(z.string(), z.array(z.string())).optional(),\n\t\tsubscribers: z\n\t\t\t.record(\n\t\t\t\tz.string(),\n\t\t\t\tz.array(\n\t\t\t\t\tz.object({\n\t\t\t\t\t\tname: z.string(),\n\t\t\t\t\t\tconnectionKey: z.string(),\n\t\t\t\t\t\tevents: z.array(z.string()).optional(),\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t)\n\t\t\t.optional(),\n\t}),\n\tz.object({ reason: z.literal('live'), paths: z.array(z.string()) }),\n\tz.object({\n\t\treason: z.literal('failed'),\n\t\terror: z\n\t\t\t.object({\n\t\t\t\tname: z.string(),\n\t\t\t\tmessage: z.string(),\n\t\t\t\tid: z.string().optional(),\n\t\t\t\tsources: z.array(z.string()).optional(),\n\t\t\t})\n\t\t\t.loose(),\n\t}),\n]);\n\n/**\n * The manifest, discovered in `sandbox` and handed back as JSON — or\n * `undefined` when it holds something JSON cannot carry and the sandbox is\n * not isolating, for the caller to discover here as before.\n */\nasync function discoverInSandbox(\n\tsandbox: Sandbox,\n\toptions: DiscoverOptions,\n): Promise<ConstructManifest | undefined> {\n\tconst cwd = options.cwd ?? sandbox.root;\n\tconst patterns =\n\t\ttypeof options.patterns === 'string'\n\t\t\t? [options.patterns]\n\t\t\t: [...options.patterns];\n\n\tconst { value, stderr } = await runWorker(sandbox, 'construct discovery', {\n\t\tname: 'discover-worker',\n\t\targs: [JSON.stringify({ patterns, cwd })],\n\t\tcwd,\n\t\ttimeoutMs: DISCOVER_TIMEOUT_MS,\n\t\tschema: DiscoverAnswer,\n\t});\n\n\t// Discovery's own warnings — a glob that matched nothing — are the\n\t// run's, as they would be had it discovered in-process: as written, one\n\t// message, less the newline the worker's `console.warn` ended it with.\n\tif (stderr.trim()) logger.warn(stderr.replace(/\\n$/, ''));\n\n\tswitch (value.reason) {\n\t\tcase 'discovered':\n\t\t\tif (options.runnables) {\n\t\t\t\tfor (const [owner, edges] of Object.entries(value.runnables)) {\n\t\t\t\t\toptions.runnables[owner] = edges;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (options.background) {\n\t\t\t\tfor (const [owner, files] of Object.entries(value.background ?? {})) {\n\t\t\t\t\toptions.background[owner] = files;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (options.subscribers) {\n\t\t\t\tfor (const [owner, bound] of Object.entries(value.subscribers ?? {})) {\n\t\t\t\t\toptions.subscribers[owner] = bound;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn value.manifest as unknown as ConstructManifest;\n\t\tcase 'failed':\n\t\t\tif (value.error.name === 'DuplicateConstruct' && value.error.id) {\n\t\t\t\tthrow new DuplicateConstruct(value.error.id, value.error.sources ?? []);\n\t\t\t}\n\t\t\tthrow new ConstructDiscoveryFailed(value.error.name, value.error.message);\n\t\tcase 'live':\n\t\t\tif (sandbox.isolating) throw new ConstructsNotSerializable(value.paths);\n\t\t\treturn undefined;\n\t}\n}\n\n/**\n * A caller asked for the construct objects (`sources`) or a watcher's\n * re-import under an isolating sandbox, where only data comes back.\n */\nexport class LiveConstructsUnavailable extends Error {\n\tconstructor() {\n\t\tsuper(\n\t\t\t'Discovery was asked for the construct objects themselves under an ' +\n\t\t\t\t'isolating sandbox, which hands back only data. Run this step ' +\n\t\t\t\t'without one, or ask only for the manifest.',\n\t\t);\n\t\tthis.name = 'LiveConstructsUnavailable';\n\t}\n}\n\n/** How long discovering a project's constructs may take in a sandbox. */\nconst DISCOVER_TIMEOUT_MS = 60_000;\n\n/** Importing a construct module, or declaring one, threw in the sandbox. */\nexport class ConstructDiscoveryFailed extends Error {\n\tconstructor(\n\t\treadonly errorName: string,\n\t\treadonly detail: string,\n\t) {\n\t\tsuper(`Discovering constructs failed (${errorName}): ${detail}`);\n\t\tthis.name = 'ConstructDiscoveryFailed';\n\t}\n}\n\n/**\n * The constructs' declarations hold something that is not data, and the\n * sandbox they were discovered in hands the deploy nothing but data.\n */\nexport class ConstructsNotSerializable extends Error {\n\tconstructor(readonly paths: readonly string[]) {\n\t\tsuper(\n\t\t\t`The construct manifest holds values that are not plain data at: ` +\n\t\t\t\t`${paths.join(', ')}. Under an isolating sandbox the deploy only ` +\n\t\t\t\t'receives what JSON can carry; deploy with a sandbox that is not ' +\n\t\t\t\t'isolating if the host trusts this project.',\n\t\t);\n\t\tthis.name = 'ConstructsNotSerializable';\n\t}\n}\n\n/** Where a construct was declared, and under what name. */\nexport interface ConstructSource {\n\t/** Absolute path to the module that exported it. */\n\tfile: string;\n\t/** The name it was exported as — what an import statement has to say. */\n\texportName: string;\n\t/**\n\t * The exported construct itself.\n\t *\n\t * What a declaration cannot say — whether it serves itself — the object can\n\t * be asked, and discovery already imported it.\n\t */\n\tconstruct: unknown;\n}\n\n/**\n * Build the construct manifest for a project.\n *\n * Runs the manifest's own validation before returning, so an app is wrong here\n * — where the error names a file — rather than at deploy.\n *\n * @throws {DuplicateConstruct} when two exports claim one id.\n */\nexport async function discover(\n\toptions: DiscoverOptions,\n): Promise<ConstructManifest> {\n\tconst sandbox = options.sandbox ?? activeSandbox();\n\tif (sandbox) {\n\t\tif (!options.sources && !options.bustCache) {\n\t\t\tconst sandboxed = await discoverInSandbox(sandbox, options);\n\t\t\tif (sandboxed) return sandboxed;\n\t\t} else if (sandbox.isolating) {\n\t\t\t// The construct objects themselves, or a re-import for the watcher:\n\t\t\t// neither can cross a sandbox that hands back only data.\n\t\t\tthrow new LiveConstructsUnavailable();\n\t\t}\n\t}\n\n\tconst {\n\t\tpatterns,\n\t\tcwd = process.cwd(),\n\t\tbustCache = false,\n\t\tsources: out,\n\t} = options;\n\n\t// Re-importing user modules re-executes them, and Zod v4 throws on a\n\t// re-registered `.meta({ id })`. Same reason the generators clear it.\n\tif (bustCache) clearZodGlobalRegistry();\n\n\tconst manifest: Record<string, Declaration> = {};\n\t/** Which file declared each id, for the error when two of them do. */\n\tconst sources: Record<string, string> = {};\n\t/**\n\t * Constructs already seen, by identity.\n\t *\n\t * A re-export is the *same object* reached through a second file — ESM\n\t * bindings are live, so `export * from './database.js'` hands back the\n\t * binding rather than a copy. Without this, a barrel file made every\n\t * construct in it appear declared twice, and `constructs/index.ts` is the\n\t * first thing anyone writes in a shared folder.\n\t *\n\t * Identity rather than file is also the more honest rule: what may not\n\t * happen twice is two *different* constructs claiming one id, and that is\n\t * still an error below.\n\t */\n\tconst seen = new WeakSet<object>();\n\n\tconst globs = Array.isArray(patterns) ? [...patterns] : [patterns as string];\n\tconst files = fg.stream(globs, { cwd, absolute: true });\n\n\t/** Matched files, for the diagnostic below. */\n\tlet matched = 0;\n\n\t/** Each processor, once, by the export that first reached it. */\n\tconst processors = new Map<\n\t\tobject,\n\t\t{ exportName: string; file: string; processor: Processor<string> }\n\t>();\n\n\tfor await (const found of files) {\n\t\tmatched++;\n\t\tconst file = found.toString();\n\t\tconst module = await import(bustCache ? `${file}?t=${Date.now()}` : file);\n\n\t\tfor (const [exportName, exported] of Object.entries(module)) {\n\t\t\tif (options.background)\n\t\t\t\trecordBackground(options.background, exported, file);\n\t\t\tif (options.subscribers)\n\t\t\t\trecordSubscriber(options.subscribers, exported, exportName);\n\t\t\tif (Processor.isProcessor(exported)) {\n\t\t\t\tconst seenAt = processors.get(exported);\n\t\t\t\tif (!seenAt || definedIn(file, seenAt.file)) {\n\t\t\t\t\tprocessors.set(exported, { exportName, file, processor: exported });\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!isDeclarable(exported)) {\n\t\t\t\tif (options.runnables) recordRunnable(options.runnables, exported);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// The same construct, reached again through a re-export. Skipped\n\t\t\t// rather than re-declared: it has already claimed its id, from the\n\t\t\t// file that defined it.\n\t\t\tif (seen.has(exported as object)) continue;\n\t\t\tseen.add(exported as object);\n\n\t\t\t// A construct that is also something a process runs — a queue and its\n\t\t\t// consumer, built from a worker — reaches what it depends on through\n\t\t\t// that process, exactly as an endpoint or a cron does.\n\t\t\tif (\n\t\t\t\toptions.runnables &&\n\t\t\t\ttypeof (exported as { owner?: unknown }).owner === 'string'\n\t\t\t) {\n\t\t\t\trecordRunnable(options.runnables, exported);\n\t\t\t}\n\n\t\t\tfor (const declaration of exported.declare()) {\n\t\t\t\t// Canonicalise here too: a construct built by hand rather than through\n\t\t\t\t// a constructor is still subject to the same identity rule.\n\t\t\t\tconst id = canonicalId(declaration.id);\n\t\t\t\tconst source = relative(cwd, file);\n\n\t\t\t\tconst claimed = sources[id];\n\t\t\t\tif (claimed !== undefined && claimed !== source) {\n\t\t\t\t\tthrow new DuplicateConstruct(id, [claimed, source]);\n\t\t\t\t}\n\n\t\t\t\tmanifest[id] = { ...declaration, id };\n\t\t\t\tsources[id] = source;\n\t\t\t\tif (out) out[id] = { file, exportName, construct: exported };\n\t\t\t}\n\t\t}\n\t}\n\n\tnestProcessors(manifest, [...processors.values()], cwd);\n\n\t// Reference integrity before anyone reads it — a schema tenant naming a\n\t// database that was deleted is a manifest error, not a reconcile failure.\n\tassertDerivations(manifest);\n\n\twarnIfNothingFound(globs, matched, Object.keys(manifest).length);\n\n\treturn manifest;\n}\n\n/**\n * Record where a worker's background work is declared: a cron, a queue\n * consumer or a topic subscriber, under the worker that owns it.\n */\nfunction recordBackground(\n\tbackground: Record<string, string[]>,\n\texported: unknown,\n\tfile: string,\n): void {\n\tif (\n\t\t!Cron.isCron(exported) &&\n\t\t!Queue.isQueue(exported) &&\n\t\t!Subscriber.isSubscriber(exported)\n\t) {\n\t\treturn;\n\t}\n\tconst owner = (exported as { owner?: unknown }).owner;\n\tif (typeof owner !== 'string') return;\n\n\tconst key = canonicalId(owner);\n\tconst files = background[key] ?? [];\n\tbackground[key] = files;\n\tif (!files.includes(file)) files.push(file);\n}\n\n/** A processor built from a file server the discovery never found. */\nexport class ProcessorServerUnknown extends GkmError {\n\tconstructor(\n\t\treadonly processor: string,\n\t\treadonly server: string,\n\t) {\n\t\tsuper(\n\t\t\t`The processor '${processor}' answers on '${server}', which no ` +\n\t\t\t\t`discovered file declares. Export the FileServer from a file the ` +\n\t\t\t\t`workspace's constructs glob matches.`,\n\t\t);\n\t\tthis.name = 'ProcessorServerUnknown';\n\t}\n}\n\n/**\n * Whether `file` is the likelier home of an export also reached from\n * `other`: not a barrel (`index.*`) where the other is, and otherwise the\n * first by path — so the answer never depends on the order the glob\n * streamed them in.\n */\nfunction definedIn(file: string, other: string): boolean {\n\tconst barrel = (path: string) => /(^|[/\\\\])index\\.[cm]?[jt]s$/.test(path);\n\tif (barrel(file) !== barrel(other)) return barrel(other);\n\treturn file < other;\n}\n\n/**\n * Nest each processor in the file server it answers on.\n *\n * A processor is positional, as a subscriber is: it answers on its server's\n * domain and nothing else. It is nested here, not only by the build, because\n * every deploy path — the compose stack, the CDN in front of the bucket, the\n * SST stack — reads the discovered manifest. Its handler is its source until a\n * build replaces it with the generated one.\n */\nfunction nestProcessors(\n\tmanifest: Record<string, Declaration>,\n\tprocessors: readonly {\n\t\texportName: string;\n\t\tfile: string;\n\t\tprocessor: Processor<string>;\n\t}[],\n\tcwd: string,\n): void {\n\tfor (const { exportName, file, processor } of processors) {\n\t\tconst server = manifest[processor.surfaceId];\n\t\tif (server?.kind !== 'file-server') {\n\t\t\tthrow new ProcessorServerUnknown(exportName, processor.surfaceId);\n\t\t}\n\t\tconst declaration: ProcessorDeclaration = {\n\t\t\tid: exportName,\n\t\t\thandler: `${relative(cwd, file)}#${exportName}`,\n\t\t\tpath: processor.pattern,\n\t\t\tprefix: processor.prefix,\n\t\t\t...(processor.native.length ? { native: [...processor.native] } : {}),\n\t\t\t...(processor.timeout !== undefined\n\t\t\t\t? { timeout: processor.timeout }\n\t\t\t\t: {}),\n\t\t\t...(processor.memorySize !== undefined\n\t\t\t\t? { memorySize: processor.memorySize }\n\t\t\t\t: {}),\n\t\t\tdependencies: processor.constructs.flatMap((id) => {\n\t\t\t\tconst target = manifest[canonicalId(id)];\n\t\t\t\treturn target ? [{ target: target.id, kind: target.kind }] : [];\n\t\t\t}),\n\t\t};\n\t\tmanifest[server.id] = {\n\t\t\t...server,\n\t\t\tprocessors: [\n\t\t\t\t...(server.processors ?? []).filter((p) => p.id !== exportName),\n\t\t\t\tdeclaration,\n\t\t\t].sort((a, b) => a.id.localeCompare(b.id)),\n\t\t};\n\t}\n}\n\n/**\n * Record a subscriber — to a topic or to a bucket — under the worker that\n * runs it, by its export. Once per name: a file reached twice through a\n * re-export finds it again.\n */\nfunction recordSubscriber(\n\tsubscribers: Record<string, BoundSubscriber[]>,\n\texported: unknown,\n\texportName: string,\n): void {\n\tif (!Subscriber.isSubscriber(exported)) return;\n\tconst owner = (exported as { owner?: unknown }).owner;\n\tconst connectionKey = subscriberConnectionKey(exported);\n\tif (typeof owner !== 'string' || !connectionKey) return;\n\n\tconst key = canonicalId(owner);\n\tconst bound = subscribers[key] ?? [];\n\tsubscribers[key] = bound;\n\tif (\n\t\t!bound.some(\n\t\t\t(s) => s.connectionKey === connectionKey && s.name === exportName,\n\t\t)\n\t) {\n\t\tconst events = exported.topicName ? exported.subscribedEvents : undefined;\n\t\tbound.push({\n\t\t\tname: exportName,\n\t\t\tconnectionKey,\n\t\t\t...(events ? { events: [...events] } : {}),\n\t\t});\n\t}\n}\n\n/**\n * What a runnable consumes, by id: a queue's consumer drains that queue, a\n * subscriber its topic. Nothing for anything else.\n */\nexport function consumedBy(runnable: unknown): string[] {\n\tif (Queue.isQueue(runnable)) return [runnable.id];\n\tif (Subscriber.isSubscriber(runnable) && runnable.topicName) {\n\t\treturn [canonicalId(runnable.topicName)];\n\t}\n\tif (Subscriber.isSubscriber(runnable) && runnable.bucketName) {\n\t\treturn [canonicalId(runnable.bucketName)];\n\t}\n\treturn [];\n}\n\n/**\n * The edges a runnable's process records for what it consumes. A bucket's\n * subscriber consumes the bucket's *events*, not the bucket: binding to its\n * changes is not reading its objects, so its process is handed the events\n * key and not the bucket's URL — that still takes `.dependsOn([bucket])`.\n */\nfunction consumedEdges(runnable: unknown): string[] {\n\tif (Subscriber.isSubscriber(runnable) && runnable.bucketName) {\n\t\treturn [eventsEdge(canonicalId(runnable.bucketName))];\n\t}\n\treturn consumedBy(runnable);\n}\n\n/**\n * Record a runnable's edges under the construct that owns it — the surface an\n * endpoint was built from, or the worker a cron or subscriber was. Anything\n * with no owner, or that is not a runnable at all, is left alone.\n */\nfunction recordRunnable(\n\trunnables: Record<string, string[]>,\n\texported: unknown,\n): void {\n\tif (typeof exported !== 'object' || exported === null) return;\n\n\tconst runnable = exported as {\n\t\tsurface?: { id?: unknown };\n\t\towner?: unknown;\n\t\tconstructs?: unknown;\n\t};\n\tconst owner =\n\t\ttypeof runnable.surface?.id === 'string'\n\t\t\t? runnable.surface.id\n\t\t\t: typeof runnable.owner === 'string'\n\t\t\t\t? runnable.owner\n\t\t\t\t: undefined;\n\tif (!owner || !Array.isArray(runnable.constructs)) return;\n\n\tconst key = canonicalId(owner);\n\tconst edges = runnables[key] ?? [];\n\trunnables[key] = edges;\n\t// What it consumes is an edge of its process too, so a worker is handed\n\t// the carriers its own work is bound to and no other.\n\tfor (const id of runnable.constructs) {\n\t\tif (typeof id !== 'string') continue;\n\t\tconst target = canonicalId(id);\n\t\tif (!edges.includes(target)) edges.push(target);\n\t}\n\tfor (const edge of consumedEdges(exported)) {\n\t\tif (!edges.includes(edge)) edges.push(edge);\n\t}\n}\n\n/**\n * Say so when a glob was configured and found nothing.\n *\n * The glob is not a filter over declarations already known — it is *how they\n * are found*, by importing what it matches. So a file it misses is a\n * declaration that does not exist, and every symptom of that appears somewhere\n * other than the cause: no container starts, no env key is written, and the\n * application fails on first use against a resource it can see in its own\n * source.\n *\n * Nothing reported it before, because an unmatched file is indistinguishable\n * from a file nobody wrote. These two cases are the ones that are *not*\n * ambiguous — a glob was configured, so something was expected.\n *\n * Silent when no glob is configured at all: that is a project which has not\n * adopted constructs, and has nothing to be missing.\n */\nfunction warnIfNothingFound(\n\tglobs: readonly string[],\n\tmatched: number,\n\tdeclared: number,\n): void {\n\tif (globs.length === 0) return;\n\n\tif (matched === 0) {\n\t\tlogger.warn(\n\t\t\t`\\n⚠️ The constructs glob matched no files, so nothing was declared.\\n` +\n\t\t\t\t` Patterns: ${globs.join(', ')}\\n` +\n\t\t\t\t` Nothing will be provisioned — no containers, no env keys, no ` +\n\t\t\t\t`resources.\\n` +\n\t\t\t\t` A common cause is depth: '*.ts' matches one level, '**/*.ts' ` +\n\t\t\t\t`matches any.`,\n\t\t);\n\t\treturn;\n\t}\n\n\tif (declared === 0) {\n\t\tlogger.warn(\n\t\t\t`\\n⚠️ The constructs glob matched ${matched} file(s) but none declared ` +\n\t\t\t\t`anything.\\n` +\n\t\t\t\t` Patterns: ${globs.join(', ')}\\n` +\n\t\t\t\t` Discovery keeps exports with an 'id' that can 'declare()'. A ` +\n\t\t\t\t`construct that is\\n` +\n\t\t\t\t` built but never exported is invisible to it.`,\n\t\t);\n\t}\n}\n\n/** Two constructs claiming one id. */\nexport class DuplicateConstruct extends GkmError {\n\t/** The id claimed twice. */\n\treadonly id: string;\n\t/** The files that claimed it. */\n\treadonly sources: readonly string[];\n\n\tconstructor(id: string, sources: readonly string[]) {\n\t\tsuper('Two constructs declare the same id');\n\t\tthis.name = 'DuplicateConstruct';\n\t\tthis.id = id;\n\t\tthis.sources = sources;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,gBAAgB;;;;;;AAOtB,SAAgB,WAAW,UAA0B;CACpD,OAAO,GAAG,WAAW;AACtB;;AAGA,SAAgB,iBAAiB,MAAkC;CAClE,OAAO,KAAK,SAAS,aAAa,IAC/B,KAAK,MAAM,GAAG,EAAqB,IACnC,KAAA;AACJ;;;;;AAMA,SAAgB,wBAAwB,WAGjB;CACtB,IAAI,UAAU,YACb,OAAO,WACN,YAAY,UAAU,UAAU,GAChC,wBACD;CAED,IAAI,UAAU,WACb,OAAO,WACN,YAAY,UAAU,SAAS,GAC/B,2BACD;AAGF;;;;;AAMA,SAAgB,mBAAmB,WAEZ;CACtB,OAAO,UAAU,aACd,WAAW,YAAY,UAAU,UAAU,GAAG,aAAa,IAC3D,KAAA;AACJ;;;;;;;;;;;;;;;;;AClCA,MAAM,UAAU,IAAI,kBAA8B;;AAGlD,SAAgB,WAAc,MAAkB,IAAgB;CAC/D,OAAO,QAAQ,IAAI,MAAM,EAAE;AAC5B;AAEA,SAAS,MACR,OACA,UAC+B;CAC/B,QAAQ,GAAG,SAAS;EACnB,MAAM,OAAO,QAAQ,SAAS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B;EACnD,MAAM,oCAAoC;EAC1C,KAAK,OAAO;EACZ,KAAK,KAAK;EACV,KAAK,UAAU;CAChB;AACD"}
@@ -11,12 +11,47 @@ let node_url = require("node:url");
11
11
  let node_async_hooks = require("node:async_hooks");
12
12
  let node_util = require("node:util");
13
13
  let _geekmidas_constructs_crons = require("@geekmidas/constructs/crons");
14
+ let _geekmidas_constructs_processors = require("@geekmidas/constructs/processors");
14
15
  let _geekmidas_constructs_queue = require("@geekmidas/constructs/queue");
15
16
  let _geekmidas_constructs_subscribers = require("@geekmidas/constructs/subscribers");
16
17
  let fast_glob = require("fast-glob");
17
18
  fast_glob = require_rolldown_runtime.__toESM(fast_glob, 1);
18
19
  let lodash_kebabcase = require("lodash.kebabcase");
19
20
  lodash_kebabcase = require_rolldown_runtime.__toESM(lodash_kebabcase, 1);
21
+ //#region src/reconcile/edges.ts
22
+ /**
23
+ * Edges a process records for what its runnables consume, beyond the
24
+ * construct ids `.dependsOn()` names.
25
+ */
26
+ const EVENTS_SUFFIX = "#events";
27
+ /**
28
+ * A bucket's events, as an edge: what a process running one of the bucket's
29
+ * subscribers consumes. Not the bucket's id — binding to a bucket's changes
30
+ * is not reading its objects, so the process is handed the events key alone.
31
+ */
32
+ function eventsEdge(bucketId) {
33
+ return `${bucketId}${EVENTS_SUFFIX}`;
34
+ }
35
+ /** The bucket an events edge names, or nothing for any other edge. */
36
+ function eventsEdgeBucket(edge) {
37
+ return edge.endsWith(EVENTS_SUFFIX) ? edge.slice(0, -7) : void 0;
38
+ }
39
+ /**
40
+ * The env key a subscriber's deliveries come from: its topic's publisher
41
+ * connection string, or its bucket's events connection string.
42
+ */
43
+ function subscriberConnectionKey(construct) {
44
+ if (construct.bucketName) return (0, _geekmidas_manifest.provideKey)((0, _geekmidas_manifest.canonicalId)(construct.bucketName), "eventsConnectionString");
45
+ if (construct.topicName) return (0, _geekmidas_manifest.provideKey)((0, _geekmidas_manifest.canonicalId)(construct.topicName), "publisherConnectionString");
46
+ }
47
+ /**
48
+ * The key a bucket's relay token is read from, by the process that runs the
49
+ * bucket's subscribers — beside its events connection string.
50
+ */
51
+ function subscriberTokenKey(construct) {
52
+ return construct.bucketName ? (0, _geekmidas_manifest.provideKey)((0, _geekmidas_manifest.canonicalId)(construct.bucketName), "eventsToken") : void 0;
53
+ }
54
+ //#endregion
20
55
  //#region src/output.ts
21
56
  /**
22
57
  * Where the CLI's progress lines go.
@@ -267,6 +302,7 @@ var discover_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
267
302
  ConstructsNotSerializable: () => ConstructsNotSerializable,
268
303
  DuplicateConstruct: () => DuplicateConstruct,
269
304
  LiveConstructsUnavailable: () => LiveConstructsUnavailable,
305
+ ProcessorServerUnknown: () => ProcessorServerUnknown,
270
306
  consumedBy: () => consumedBy,
271
307
  discover: () => discover,
272
308
  isDeclarable: () => isDeclarable
@@ -297,7 +333,8 @@ const DiscoverAnswer = require_schemas.discriminatedUnion("reason", [
297
333
  background: require_schemas.record(require_schemas.string(), require_schemas.array(require_schemas.string())).optional(),
298
334
  subscribers: require_schemas.record(require_schemas.string(), require_schemas.array(require_schemas.object({
299
335
  name: require_schemas.string(),
300
- topic: require_schemas.string()
336
+ connectionKey: require_schemas.string(),
337
+ events: require_schemas.array(require_schemas.string()).optional()
301
338
  }))).optional()
302
339
  }),
303
340
  require_schemas.object({
@@ -424,6 +461,8 @@ async function discover(options) {
424
461
  });
425
462
  /** Matched files, for the diagnostic below. */
426
463
  let matched = 0;
464
+ /** Each processor, once, by the export that first reached it. */
465
+ const processors = /* @__PURE__ */ new Map();
427
466
  for await (const found of files) {
428
467
  matched++;
429
468
  const file = found.toString();
@@ -431,6 +470,14 @@ async function discover(options) {
431
470
  for (const [exportName, exported] of Object.entries(module)) {
432
471
  if (options.background) recordBackground(options.background, exported, file);
433
472
  if (options.subscribers) recordSubscriber(options.subscribers, exported, exportName);
473
+ if (_geekmidas_constructs_processors.Processor.isProcessor(exported)) {
474
+ const seenAt = processors.get(exported);
475
+ if (!seenAt || definedIn(file, seenAt.file)) processors.set(exported, {
476
+ exportName,
477
+ file,
478
+ processor: exported
479
+ });
480
+ }
434
481
  if (!isDeclarable(exported)) {
435
482
  if (options.runnables) recordRunnable(options.runnables, exported);
436
483
  continue;
@@ -456,6 +503,7 @@ async function discover(options) {
456
503
  }
457
504
  }
458
505
  }
506
+ nestProcessors(manifest, [...processors.values()], cwd);
459
507
  (0, _geekmidas_manifest.assertDerivations)(manifest);
460
508
  warnIfNothingFound(globs, matched, Object.keys(manifest).length);
461
509
  return manifest;
@@ -473,22 +521,84 @@ function recordBackground(background, exported, file) {
473
521
  background[key] = files;
474
522
  if (!files.includes(file)) files.push(file);
475
523
  }
524
+ /** A processor built from a file server the discovery never found. */
525
+ var ProcessorServerUnknown = class extends require_errors.GkmError {
526
+ processor;
527
+ server;
528
+ constructor(processor, server) {
529
+ super(`The processor '${processor}' answers on '${server}', which no discovered file declares. Export the FileServer from a file the workspace's constructs glob matches.`);
530
+ this.processor = processor;
531
+ this.server = server;
532
+ this.name = "ProcessorServerUnknown";
533
+ }
534
+ };
476
535
  /**
477
- * Record a topic subscriber under the worker that runs it, by its export.
478
- * Once per name: a file reached twice through a re-export finds it again.
536
+ * Whether `file` is the likelier home of an export also reached from
537
+ * `other`: not a barrel (`index.*`) where the other is, and otherwise the
538
+ * first by path — so the answer never depends on the order the glob
539
+ * streamed them in.
540
+ */
541
+ function definedIn(file, other) {
542
+ const barrel = (path) => /(^|[/\\])index\.[cm]?[jt]s$/.test(path);
543
+ if (barrel(file) !== barrel(other)) return barrel(other);
544
+ return file < other;
545
+ }
546
+ /**
547
+ * Nest each processor in the file server it answers on.
548
+ *
549
+ * A processor is positional, as a subscriber is: it answers on its server's
550
+ * domain and nothing else. It is nested here, not only by the build, because
551
+ * every deploy path — the compose stack, the CDN in front of the bucket, the
552
+ * SST stack — reads the discovered manifest. Its handler is its source until a
553
+ * build replaces it with the generated one.
554
+ */
555
+ function nestProcessors(manifest, processors, cwd) {
556
+ for (const { exportName, file, processor } of processors) {
557
+ const server = manifest[processor.surfaceId];
558
+ if (server?.kind !== "file-server") throw new ProcessorServerUnknown(exportName, processor.surfaceId);
559
+ const declaration = {
560
+ id: exportName,
561
+ handler: `${(0, node_path.relative)(cwd, file)}#${exportName}`,
562
+ path: processor.pattern,
563
+ prefix: processor.prefix,
564
+ ...processor.native.length ? { native: [...processor.native] } : {},
565
+ ...processor.timeout !== void 0 ? { timeout: processor.timeout } : {},
566
+ ...processor.memorySize !== void 0 ? { memorySize: processor.memorySize } : {},
567
+ dependencies: processor.constructs.flatMap((id) => {
568
+ const target = manifest[(0, _geekmidas_manifest.canonicalId)(id)];
569
+ return target ? [{
570
+ target: target.id,
571
+ kind: target.kind
572
+ }] : [];
573
+ })
574
+ };
575
+ manifest[server.id] = {
576
+ ...server,
577
+ processors: [...(server.processors ?? []).filter((p) => p.id !== exportName), declaration].sort((a, b) => a.id.localeCompare(b.id))
578
+ };
579
+ }
580
+ }
581
+ /**
582
+ * Record a subscriber — to a topic or to a bucket — under the worker that
583
+ * runs it, by its export. Once per name: a file reached twice through a
584
+ * re-export finds it again.
479
585
  */
480
586
  function recordSubscriber(subscribers, exported, exportName) {
481
587
  if (!_geekmidas_constructs_subscribers.Subscriber.isSubscriber(exported)) return;
482
- const { owner, topicName } = exported;
483
- if (typeof owner !== "string" || typeof topicName !== "string") return;
588
+ const owner = exported.owner;
589
+ const connectionKey = subscriberConnectionKey(exported);
590
+ if (typeof owner !== "string" || !connectionKey) return;
484
591
  const key = (0, _geekmidas_manifest.canonicalId)(owner);
485
592
  const bound = subscribers[key] ?? [];
486
593
  subscribers[key] = bound;
487
- const topic = (0, _geekmidas_manifest.canonicalId)(topicName);
488
- if (!bound.some((s) => s.topic === topic && s.name === exportName)) bound.push({
489
- name: exportName,
490
- topic
491
- });
594
+ if (!bound.some((s) => s.connectionKey === connectionKey && s.name === exportName)) {
595
+ const events = exported.topicName ? exported.subscribedEvents : void 0;
596
+ bound.push({
597
+ name: exportName,
598
+ connectionKey,
599
+ ...events ? { events: [...events] } : {}
600
+ });
601
+ }
492
602
  }
493
603
  /**
494
604
  * What a runnable consumes, by id: a queue's consumer drains that queue, a
@@ -497,9 +607,20 @@ function recordSubscriber(subscribers, exported, exportName) {
497
607
  function consumedBy(runnable) {
498
608
  if (_geekmidas_constructs_queue.Queue.isQueue(runnable)) return [runnable.id];
499
609
  if (_geekmidas_constructs_subscribers.Subscriber.isSubscriber(runnable) && runnable.topicName) return [(0, _geekmidas_manifest.canonicalId)(runnable.topicName)];
610
+ if (_geekmidas_constructs_subscribers.Subscriber.isSubscriber(runnable) && runnable.bucketName) return [(0, _geekmidas_manifest.canonicalId)(runnable.bucketName)];
500
611
  return [];
501
612
  }
502
613
  /**
614
+ * The edges a runnable's process records for what it consumes. A bucket's
615
+ * subscriber consumes the bucket's *events*, not the bucket: binding to its
616
+ * changes is not reading its objects, so its process is handed the events
617
+ * key and not the bucket's URL — that still takes `.dependsOn([bucket])`.
618
+ */
619
+ function consumedEdges(runnable) {
620
+ if (_geekmidas_constructs_subscribers.Subscriber.isSubscriber(runnable) && runnable.bucketName) return [eventsEdge((0, _geekmidas_manifest.canonicalId)(runnable.bucketName))];
621
+ return consumedBy(runnable);
622
+ }
623
+ /**
503
624
  * Record a runnable's edges under the construct that owns it — the surface an
504
625
  * endpoint was built from, or the worker a cron or subscriber was. Anything
505
626
  * with no owner, or that is not a runnable at all, is left alone.
@@ -512,11 +633,12 @@ function recordRunnable(runnables, exported) {
512
633
  const key = (0, _geekmidas_manifest.canonicalId)(owner);
513
634
  const edges = runnables[key] ?? [];
514
635
  runnables[key] = edges;
515
- for (const id of [...runnable.constructs, ...consumedBy(exported)]) {
636
+ for (const id of runnable.constructs) {
516
637
  if (typeof id !== "string") continue;
517
638
  const target = (0, _geekmidas_manifest.canonicalId)(id);
518
639
  if (!edges.includes(target)) edges.push(target);
519
640
  }
641
+ for (const edge of consumedEdges(exported)) if (!edges.includes(edge)) edges.push(edge);
520
642
  }
521
643
  /**
522
644
  * Say so when a glob was configured and found nothing.
@@ -599,6 +721,18 @@ Object.defineProperty(exports, "discover_exports", {
599
721
  return discover_exports;
600
722
  }
601
723
  });
724
+ Object.defineProperty(exports, "eventsEdge", {
725
+ enumerable: true,
726
+ get: function() {
727
+ return eventsEdge;
728
+ }
729
+ });
730
+ Object.defineProperty(exports, "eventsEdgeBucket", {
731
+ enumerable: true,
732
+ get: function() {
733
+ return eventsEdgeBucket;
734
+ }
735
+ });
602
736
  Object.defineProperty(exports, "isDeclarable", {
603
737
  enumerable: true,
604
738
  get: function() {
@@ -623,6 +757,18 @@ Object.defineProperty(exports, "runWorker", {
623
757
  return runWorker;
624
758
  }
625
759
  });
760
+ Object.defineProperty(exports, "subscriberConnectionKey", {
761
+ enumerable: true,
762
+ get: function() {
763
+ return subscriberConnectionKey;
764
+ }
765
+ });
766
+ Object.defineProperty(exports, "subscriberTokenKey", {
767
+ enumerable: true,
768
+ get: function() {
769
+ return subscriberTokenKey;
770
+ }
771
+ });
626
772
  Object.defineProperty(exports, "withOutput", {
627
773
  enumerable: true,
628
774
  get: function() {
@@ -636,4 +782,4 @@ Object.defineProperty(exports, "withOwningTsconfigJsx", {
636
782
  }
637
783
  });
638
784
 
639
- //# sourceMappingURL=discover-DozUKs8f.cjs.map
785
+ //# sourceMappingURL=discover-DL6h-J97.cjs.map