@geekmidas/cli 10.0.0-alpha.167 → 10.0.0-alpha.168

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 (251) hide show
  1. package/dist/{EndpointGenerator-DxrRqfJ3.cjs → EndpointGenerator-C1h_wExz.cjs} +2 -2
  2. package/dist/{EndpointGenerator-DxrRqfJ3.cjs.map → EndpointGenerator-C1h_wExz.cjs.map} +1 -1
  3. package/dist/{EndpointGenerator-B5BKAoLz.mjs → EndpointGenerator-CSKhAD6W.mjs} +2 -2
  4. package/dist/{EndpointGenerator-B5BKAoLz.mjs.map → EndpointGenerator-CSKhAD6W.mjs.map} +1 -1
  5. package/dist/{GoDaddyProvider-Dci0SlN5.mjs → GoDaddyProvider-CJIYlkUN.mjs} +2 -2
  6. package/dist/{GoDaddyProvider-Dci0SlN5.mjs.map → GoDaddyProvider-CJIYlkUN.mjs.map} +1 -1
  7. package/dist/{GoDaddyProvider-o6DJAsBZ.cjs → GoDaddyProvider-CYAlIeML.cjs} +2 -2
  8. package/dist/{GoDaddyProvider-o6DJAsBZ.cjs.map → GoDaddyProvider-CYAlIeML.cjs.map} +1 -1
  9. package/dist/{HostingerProvider-BzHPhONW.cjs → HostingerProvider-Ceqc_nlG.cjs} +2 -2
  10. package/dist/{HostingerProvider-BzHPhONW.cjs.map → HostingerProvider-Ceqc_nlG.cjs.map} +1 -1
  11. package/dist/{HostingerProvider-Dd5x1zvF.mjs → HostingerProvider-Tb0bnTpM.mjs} +2 -2
  12. package/dist/{HostingerProvider-Dd5x1zvF.mjs.map → HostingerProvider-Tb0bnTpM.mjs.map} +1 -1
  13. package/dist/{LegacyStateStore-tqY0hM8z.cjs → LegacyStateStore-Ci-CRqt2.cjs} +2 -2
  14. package/dist/{LegacyStateStore-tqY0hM8z.cjs.map → LegacyStateStore-Ci-CRqt2.cjs.map} +1 -1
  15. package/dist/{LegacyStateStore-CpF6rmZc.mjs → LegacyStateStore-DJWY64Jj.mjs} +2 -2
  16. package/dist/{LegacyStateStore-CpF6rmZc.mjs.map → LegacyStateStore-DJWY64Jj.mjs.map} +1 -1
  17. package/dist/{LocalStateStore-Adp96xPy.mjs → LocalStateStore-BFgjv29N.mjs} +2 -2
  18. package/dist/{LocalStateStore-Adp96xPy.mjs.map → LocalStateStore-BFgjv29N.mjs.map} +1 -1
  19. package/dist/{LocalStateStore-BYMUEGZN.cjs → LocalStateStore-Enw_wV7d.cjs} +2 -2
  20. package/dist/{LocalStateStore-BYMUEGZN.cjs.map → LocalStateStore-Enw_wV7d.cjs.map} +1 -1
  21. package/dist/{OpenApiTsGenerator-Vaf0pI8u.mjs → OpenApiTsGenerator-5xPn-p65.mjs} +2 -2
  22. package/dist/{OpenApiTsGenerator-Vaf0pI8u.mjs.map → OpenApiTsGenerator-5xPn-p65.mjs.map} +1 -1
  23. package/dist/{OpenApiTsGenerator-DOTLKBFf.cjs → OpenApiTsGenerator-CzrLGzC0.cjs} +2 -2
  24. package/dist/{OpenApiTsGenerator-DOTLKBFf.cjs.map → OpenApiTsGenerator-CzrLGzC0.cjs.map} +1 -1
  25. package/dist/{S3StateStore-DjXyhGIP.cjs → S3StateStore-B48M3z7L.cjs} +4 -4
  26. package/dist/{S3StateStore-DjXyhGIP.cjs.map → S3StateStore-B48M3z7L.cjs.map} +1 -1
  27. package/dist/{S3StateStore-13Go3hfM.mjs → S3StateStore-Cwfd-ZnJ.mjs} +4 -4
  28. package/dist/{S3StateStore-13Go3hfM.mjs.map → S3StateStore-Cwfd-ZnJ.mjs.map} +1 -1
  29. package/dist/{SSMStateStore-DspMPho-.cjs → SSMStateStore-CuBe-NK5.cjs} +2 -2
  30. package/dist/{SSMStateStore-DspMPho-.cjs.map → SSMStateStore-CuBe-NK5.cjs.map} +1 -1
  31. package/dist/{SSMStateStore-CQHUyH-c.mjs → SSMStateStore-DYgE98Sm.mjs} +2 -2
  32. package/dist/{SSMStateStore-CQHUyH-c.mjs.map → SSMStateStore-DYgE98Sm.mjs.map} +1 -1
  33. package/dist/{SubscriberGenerator-BybB6uez.mjs → SubscriberGenerator-CfZWX0lT.mjs} +6 -6
  34. package/dist/SubscriberGenerator-CfZWX0lT.mjs.map +1 -0
  35. package/dist/{SubscriberGenerator-mZpSuSU7.cjs → SubscriberGenerator-DMi4siph.cjs} +5 -5
  36. package/dist/SubscriberGenerator-DMi4siph.cjs.map +1 -0
  37. package/dist/{add-DsxJ0Knr.cjs → add-4AT0LlDK.cjs} +10 -10
  38. package/dist/add-4AT0LlDK.cjs.map +1 -0
  39. package/dist/{add-Dt8QKSOw.mjs → add-C85tazt0.mjs} +11 -11
  40. package/dist/add-C85tazt0.mjs.map +1 -0
  41. package/dist/{apps-C6s-trVp.cjs → apps-By6pnfzA.cjs} +40 -40
  42. package/dist/apps-By6pnfzA.cjs.map +1 -0
  43. package/dist/{apps-w2sRQKCr.mjs → apps-CWGmV2nQ.mjs} +41 -41
  44. package/dist/apps-CWGmV2nQ.mjs.map +1 -0
  45. package/dist/{bundler-BCWWne6N.mjs → bundler-B9rkNGpK.mjs} +6 -6
  46. package/dist/{bundler-BCWWne6N.mjs.map → bundler-B9rkNGpK.mjs.map} +1 -1
  47. package/dist/{bundler-AzkSRAuu.cjs → bundler-DPBLrtjT.cjs} +6 -6
  48. package/dist/{bundler-AzkSRAuu.cjs.map → bundler-DPBLrtjT.cjs.map} +1 -1
  49. package/dist/{cli-OGss08bZ.cjs → cli-BnWRqhwx.cjs} +4 -4
  50. package/dist/{cli-OGss08bZ.cjs.map → cli-BnWRqhwx.cjs.map} +1 -1
  51. package/dist/{cli-DSGw0Mw-.mjs → cli-DgL0QED8.mjs} +4 -4
  52. package/dist/{cli-DSGw0Mw-.mjs.map → cli-DgL0QED8.mjs.map} +1 -1
  53. package/dist/{compose-QSBmhr4V.cjs → compose-CLM-sqgE.cjs} +11 -11
  54. package/dist/compose-CLM-sqgE.cjs.map +1 -0
  55. package/dist/{compose-Csegtvq_.mjs → compose-CcK-QoYU.mjs} +12 -12
  56. package/dist/compose-CcK-QoYU.mjs.map +1 -0
  57. package/dist/{compose-RhuFQmZS.mjs → compose-DuRBnjxx.mjs} +9 -9
  58. package/dist/compose-DuRBnjxx.mjs.map +1 -0
  59. package/dist/{compose-BqTuzitb.cjs → compose-DwjaxFFK.cjs} +8 -8
  60. package/dist/compose-DwjaxFFK.cjs.map +1 -0
  61. package/dist/config.cjs +2 -2
  62. package/dist/config.mjs +2 -2
  63. package/dist/{credentialSchemas-mz9QZTYh.mjs → credentialSchemas-BzJiK1nQ.mjs} +4 -4
  64. package/dist/credentialSchemas-BzJiK1nQ.mjs.map +1 -0
  65. package/dist/{credentialSchemas-BAklWDna.cjs → credentialSchemas-OVXofU-r.cjs} +3 -3
  66. package/dist/credentialSchemas-OVXofU-r.cjs.map +1 -0
  67. package/dist/{credentials-CORvhcrO.cjs → credentials-CCCAy3NL.cjs} +7 -7
  68. package/dist/{credentials-CORvhcrO.cjs.map → credentials-CCCAy3NL.cjs.map} +1 -1
  69. package/dist/{credentials-D4DUPPPP.mjs → credentials-CeCOEKP3.mjs} +7 -7
  70. package/dist/{credentials-D4DUPPPP.mjs.map → credentials-CeCOEKP3.mjs.map} +1 -1
  71. package/dist/{databases-CrKh5jw6.cjs → databases-CuTL1e7s.cjs} +3 -3
  72. package/dist/databases-CuTL1e7s.cjs.map +1 -0
  73. package/dist/{databases-C1qqNxTu.mjs → databases-zN-gEox0.mjs} +4 -4
  74. package/dist/databases-zN-gEox0.mjs.map +1 -0
  75. package/dist/deploy/public.cjs +12 -12
  76. package/dist/deploy/public.d.cts.map +1 -1
  77. package/dist/deploy/public.d.mts.map +1 -1
  78. package/dist/deploy/public.mjs +12 -12
  79. package/dist/{deploy-BwJ7uWXd.cjs → deploy-Dy5jyciI.cjs} +36 -36
  80. package/dist/deploy-Dy5jyciI.cjs.map +1 -0
  81. package/dist/{deploy-DDfnQm8l.mjs → deploy-F6GA-u59.mjs} +37 -37
  82. package/dist/deploy-F6GA-u59.mjs.map +1 -0
  83. package/dist/{destroy-nTNRfdy6.cjs → destroy-B7-8EgCJ.cjs} +9 -9
  84. package/dist/{destroy-nTNRfdy6.cjs.map → destroy-B7-8EgCJ.cjs.map} +1 -1
  85. package/dist/{destroy-DKt8S051.mjs → destroy-Gyxrl5yO.mjs} +9 -9
  86. package/dist/{destroy-DKt8S051.mjs.map → destroy-Gyxrl5yO.mjs.map} +1 -1
  87. package/dist/{discover-CRywE7yc.cjs → discover-39VKSE2i.cjs} +5 -5
  88. package/dist/discover-39VKSE2i.cjs.map +1 -0
  89. package/dist/{discover-DbDrCQ8h.mjs → discover-B_PDDaVj.mjs} +6 -6
  90. package/dist/discover-B_PDDaVj.mjs.map +1 -0
  91. package/dist/{docker-Ele34O8z.mjs → docker-COHyyOkv.mjs} +11 -11
  92. package/dist/docker-COHyyOkv.mjs.map +1 -0
  93. package/dist/{docker-Dy1ZJUzV.cjs → docker-CP4bspkW.cjs} +10 -10
  94. package/dist/docker-CP4bspkW.cjs.map +1 -0
  95. package/dist/{dokploy-DN2W1YIH.cjs → dokploy-C7ampvzk.cjs} +2 -2
  96. package/dist/{dokploy-DN2W1YIH.cjs.map → dokploy-C7ampvzk.cjs.map} +1 -1
  97. package/dist/{dokploy-BrfA2m5K.mjs → dokploy-DBmB9vWu.mjs} +2 -2
  98. package/dist/{dokploy-BrfA2m5K.mjs.map → dokploy-DBmB9vWu.mjs.map} +1 -1
  99. package/dist/{eas-BRBdxmwe.cjs → eas-CbnTdz8d.cjs} +3 -3
  100. package/dist/{eas-BRBdxmwe.cjs.map → eas-CbnTdz8d.cjs.map} +1 -1
  101. package/dist/{eas-CO3ogve5.mjs → eas-EXRkhGSM.mjs} +3 -3
  102. package/dist/{eas-CO3ogve5.mjs.map → eas-EXRkhGSM.mjs.map} +1 -1
  103. package/dist/{encryption-BZ1zgtF5.cjs → encryption-CdDDSAu_.cjs} +4 -4
  104. package/dist/encryption-CdDDSAu_.cjs.map +1 -0
  105. package/dist/{encryption-CHmfNBAy.mjs → encryption-lLZV2eMs.mjs} +5 -5
  106. package/dist/encryption-lLZV2eMs.mjs.map +1 -0
  107. package/dist/{engine-DewbDHOq.cjs → engine-Cg92m1Xf.cjs} +37 -37
  108. package/dist/engine-Cg92m1Xf.cjs.map +1 -0
  109. package/dist/{engine-B3Gmu8-O.mjs → engine-ZzUy2czq.mjs} +38 -38
  110. package/dist/engine-ZzUy2czq.mjs.map +1 -0
  111. package/dist/{github-DPNgIxdc.cjs → github-BHqRcUgU.cjs} +8 -8
  112. package/dist/{github-DPNgIxdc.cjs.map → github-BHqRcUgU.cjs.map} +1 -1
  113. package/dist/{github-DU3iEmJN.mjs → github-CPpJmNgV.mjs} +8 -8
  114. package/dist/{github-DU3iEmJN.mjs.map → github-CPpJmNgV.mjs.map} +1 -1
  115. package/dist/{googlePlay-C2jnPqYn.cjs → googlePlay-DRz0ya3q.cjs} +4 -4
  116. package/dist/{googlePlay-C2jnPqYn.cjs.map → googlePlay-DRz0ya3q.cjs.map} +1 -1
  117. package/dist/{googlePlay-KPHn9H2f.mjs → googlePlay-Dg-0ASWN.mjs} +4 -4
  118. package/dist/{googlePlay-KPHn9H2f.mjs.map → googlePlay-Dg-0ASWN.mjs.map} +1 -1
  119. package/dist/{iam-CW61VcT3.mjs → iam-CLIne3Ny.mjs} +2 -2
  120. package/dist/{iam-CW61VcT3.mjs.map → iam-CLIne3Ny.mjs.map} +1 -1
  121. package/dist/{iam-C2sf6AUi.cjs → iam-b4IvC1fm.cjs} +2 -2
  122. package/dist/{iam-C2sf6AUi.cjs.map → iam-b4IvC1fm.cjs.map} +1 -1
  123. package/dist/index.cjs +79 -79
  124. package/dist/index.cjs.map +1 -1
  125. package/dist/index.mjs +80 -80
  126. package/dist/index.mjs.map +1 -1
  127. package/dist/{local-BxjA0EXj.cjs → local-BIrl0ENw.cjs} +3 -3
  128. package/dist/{local-BxjA0EXj.cjs.map → local-BIrl0ENw.cjs.map} +1 -1
  129. package/dist/{local-CwR2DW6i.mjs → local-Cin6exc0.mjs} +3 -3
  130. package/dist/{local-CwR2DW6i.mjs.map → local-Cin6exc0.mjs.map} +1 -1
  131. package/dist/{migrate-B0a3WY4X.cjs → migrate-BtkwylxW.cjs} +7 -7
  132. package/dist/{migrate-B0a3WY4X.cjs.map → migrate-BtkwylxW.cjs.map} +1 -1
  133. package/dist/{migrate-CYtM1UBH.cjs → migrate-CxI07Ey0.cjs} +3 -3
  134. package/dist/{migrate-CYtM1UBH.cjs.map → migrate-CxI07Ey0.cjs.map} +1 -1
  135. package/dist/{migrate-vWy2CUoi.mjs → migrate-DEU8I8sQ.mjs} +7 -7
  136. package/dist/{migrate-vWy2CUoi.mjs.map → migrate-DEU8I8sQ.mjs.map} +1 -1
  137. package/dist/{migrate-DHWy64pc.mjs → migrate-DpLMJLCw.mjs} +3 -3
  138. package/dist/{migrate-DHWy64pc.mjs.map → migrate-DpLMJLCw.mjs.map} +1 -1
  139. package/dist/{notes-9bOfe08J.mjs → notes-or_kXTal.mjs} +11 -11
  140. package/dist/notes-or_kXTal.mjs.map +1 -0
  141. package/dist/{notes-DRdlsCYV.cjs → notes-rTfi6rfN.cjs} +10 -10
  142. package/dist/notes-rTfi6rfN.cjs.map +1 -0
  143. package/dist/openapi.cjs +3 -3
  144. package/dist/openapi.mjs +3 -3
  145. package/dist/{projectBucket-gIQUuhGm.cjs → projectBucket-CRa1b1Td.cjs} +2 -2
  146. package/dist/{projectBucket-gIQUuhGm.cjs.map → projectBucket-CRa1b1Td.cjs.map} +1 -1
  147. package/dist/{projectBucket-Cd7sEDhG.mjs → projectBucket-Coh5K3-g.mjs} +2 -2
  148. package/dist/{projectBucket-Cd7sEDhG.mjs.map → projectBucket-Coh5K3-g.mjs.map} +1 -1
  149. package/dist/{publish-DOxz4mxf.mjs → publish-Bwhywmpz.mjs} +2 -2
  150. package/dist/{publish-DOxz4mxf.mjs.map → publish-Bwhywmpz.mjs.map} +1 -1
  151. package/dist/{publish-BgDFx08y.cjs → publish-D9Yl4AzW.cjs} +2 -2
  152. package/dist/{publish-BgDFx08y.cjs.map → publish-D9Yl4AzW.cjs.map} +1 -1
  153. package/dist/{ready-BjFMu_1J.mjs → ready-COJHr1Yi.mjs} +9 -9
  154. package/dist/ready-COJHr1Yi.mjs.map +1 -0
  155. package/dist/{ready-eVMJIcWn.cjs → ready-DcD0SCnV.cjs} +8 -8
  156. package/dist/ready-DcD0SCnV.cjs.map +1 -0
  157. package/dist/reconcile/public.cjs +1 -1
  158. package/dist/reconcile/public.mjs +1 -1
  159. package/dist/{resolve-CdDyPOE8.mjs → resolve-B9tboVm2.mjs} +4 -4
  160. package/dist/{resolve-CdDyPOE8.mjs.map → resolve-B9tboVm2.mjs.map} +1 -1
  161. package/dist/{resolve-BhQd4IkT.cjs → resolve-BrJUFIUu.cjs} +4 -4
  162. package/dist/{resolve-BhQd4IkT.cjs.map → resolve-BrJUFIUu.cjs.map} +1 -1
  163. package/dist/{rollback-Brc-_HBJ.cjs → rollback-D48bPMpD.cjs} +7 -7
  164. package/dist/{rollback-Brc-_HBJ.cjs.map → rollback-D48bPMpD.cjs.map} +1 -1
  165. package/dist/{rollback-CLBKeSMl.mjs → rollback-M6b0z1tp.mjs} +7 -7
  166. package/dist/{rollback-CLBKeSMl.mjs.map → rollback-M6b0z1tp.mjs.map} +1 -1
  167. package/dist/{s3-CuLmr6Q9.cjs → s3-3iS3jlKU.cjs} +3 -3
  168. package/dist/{s3-CuLmr6Q9.cjs.map → s3-3iS3jlKU.cjs.map} +1 -1
  169. package/dist/{s3-D0BIG_ml.mjs → s3-CNOSRjqH.mjs} +3 -3
  170. package/dist/{s3-D0BIG_ml.mjs.map → s3-CNOSRjqH.mjs.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 +2 -2
  176. package/dist/sandbox/migrate-worker.mjs +2 -2
  177. package/dist/{serverSetup-An1fE9nd.mjs → serverSetup-CzLJ_RV0.mjs} +6 -6
  178. package/dist/{serverSetup-An1fE9nd.mjs.map → serverSetup-CzLJ_RV0.mjs.map} +1 -1
  179. package/dist/{serverSetup-BMpzrB1y.cjs → serverSetup-DnOdoucM.cjs} +6 -6
  180. package/dist/{serverSetup-BMpzrB1y.cjs.map → serverSetup-DnOdoucM.cjs.map} +1 -1
  181. package/dist/{sniffer-9a8wQeeD.cjs → sniffer-C5F7uYQB.cjs} +8 -8
  182. package/dist/{sniffer-9a8wQeeD.cjs.map → sniffer-C5F7uYQB.cjs.map} +1 -1
  183. package/dist/{sniffer-BObBXR5q.mjs → sniffer-yeftYpWK.mjs} +8 -8
  184. package/dist/{sniffer-BObBXR5q.mjs.map → sniffer-yeftYpWK.mjs.map} +1 -1
  185. package/dist/{snsSubscriptions-oUTOkG-s.mjs → snsSubscriptions-CXRa_bwG.mjs} +3 -3
  186. package/dist/{snsSubscriptions-oUTOkG-s.mjs.map → snsSubscriptions-CXRa_bwG.mjs.map} +1 -1
  187. package/dist/{snsSubscriptions-BRmEdsks.cjs → snsSubscriptions-CXwELBil.cjs} +3 -3
  188. package/dist/{snsSubscriptions-BRmEdsks.cjs.map → snsSubscriptions-CXwELBil.cjs.map} +1 -1
  189. package/dist/{sst-DVIeKWCH.mjs → sst-BAQrBaGa.mjs} +6 -6
  190. package/dist/{sst-DVIeKWCH.mjs.map → sst-BAQrBaGa.mjs.map} +1 -1
  191. package/dist/{sst-CJQI9GYW.cjs → sst-B_srWo15.cjs} +6 -6
  192. package/dist/{sst-CJQI9GYW.cjs.map → sst-B_srWo15.cjs.map} +1 -1
  193. package/dist/{stack-2jMvQfLo.cjs → stack-DaJ9D2Uc.cjs} +20 -20
  194. package/dist/stack-DaJ9D2Uc.cjs.map +1 -0
  195. package/dist/{stack-kcxH-2tZ.mjs → stack-t2tN1jYo.mjs} +21 -21
  196. package/dist/stack-t2tN1jYo.mjs.map +1 -0
  197. package/dist/{stage-BQSSMJL4.mjs → stage-B4gqRg7l.mjs} +7 -7
  198. package/dist/{stage-BQSSMJL4.mjs.map → stage-B4gqRg7l.mjs.map} +1 -1
  199. package/dist/{stage-AHgVG7H8.cjs → stage-Clk6oQO_.cjs} +7 -7
  200. package/dist/{stage-AHgVG7H8.cjs.map → stage-Clk6oQO_.cjs.map} +1 -1
  201. package/dist/{stages-BsK1Ro4s.mjs → stages-D1rnfO18.mjs} +2 -2
  202. package/dist/{stages-BsK1Ro4s.mjs.map → stages-D1rnfO18.mjs.map} +1 -1
  203. package/dist/{stages-DpF2K3PZ.cjs → stages-afi9P-Cd.cjs} +2 -2
  204. package/dist/{stages-DpF2K3PZ.cjs.map → stages-afi9P-Cd.cjs.map} +1 -1
  205. package/dist/target/public.cjs +1 -1
  206. package/dist/target/public.mjs +1 -1
  207. package/dist/{terminal-DWROY7JE.mjs → terminal-D4kY5oz7.mjs} +3 -3
  208. package/dist/{terminal-DWROY7JE.mjs.map → terminal-D4kY5oz7.mjs.map} +1 -1
  209. package/dist/{terminal-BNjNr7BN.cjs → terminal-JAudEZRC.cjs} +3 -3
  210. package/dist/{terminal-BNjNr7BN.cjs.map → terminal-JAudEZRC.cjs.map} +1 -1
  211. package/dist/vitest.cjs +1 -1
  212. package/dist/vitest.mjs +1 -1
  213. package/dist/workspace/index.cjs +1 -1
  214. package/dist/workspace/index.mjs +1 -1
  215. package/dist/{workspace-9q4TSHlM.mjs → workspace-Gubg8xLJ.mjs} +3 -3
  216. package/dist/workspace-Gubg8xLJ.mjs.map +1 -0
  217. package/dist/{workspace-Ciw3SnME.cjs → workspace-p7gmCQVS.cjs} +2 -2
  218. package/dist/workspace-p7gmCQVS.cjs.map +1 -0
  219. package/package.json +15 -15
  220. package/dist/SubscriberGenerator-BybB6uez.mjs.map +0 -1
  221. package/dist/SubscriberGenerator-mZpSuSU7.cjs.map +0 -1
  222. package/dist/add-DsxJ0Knr.cjs.map +0 -1
  223. package/dist/add-Dt8QKSOw.mjs.map +0 -1
  224. package/dist/apps-C6s-trVp.cjs.map +0 -1
  225. package/dist/apps-w2sRQKCr.mjs.map +0 -1
  226. package/dist/compose-BqTuzitb.cjs.map +0 -1
  227. package/dist/compose-Csegtvq_.mjs.map +0 -1
  228. package/dist/compose-QSBmhr4V.cjs.map +0 -1
  229. package/dist/compose-RhuFQmZS.mjs.map +0 -1
  230. package/dist/credentialSchemas-BAklWDna.cjs.map +0 -1
  231. package/dist/credentialSchemas-mz9QZTYh.mjs.map +0 -1
  232. package/dist/databases-C1qqNxTu.mjs.map +0 -1
  233. package/dist/databases-CrKh5jw6.cjs.map +0 -1
  234. package/dist/deploy-BwJ7uWXd.cjs.map +0 -1
  235. package/dist/deploy-DDfnQm8l.mjs.map +0 -1
  236. package/dist/discover-CRywE7yc.cjs.map +0 -1
  237. package/dist/discover-DbDrCQ8h.mjs.map +0 -1
  238. package/dist/docker-Dy1ZJUzV.cjs.map +0 -1
  239. package/dist/docker-Ele34O8z.mjs.map +0 -1
  240. package/dist/encryption-BZ1zgtF5.cjs.map +0 -1
  241. package/dist/encryption-CHmfNBAy.mjs.map +0 -1
  242. package/dist/engine-B3Gmu8-O.mjs.map +0 -1
  243. package/dist/engine-DewbDHOq.cjs.map +0 -1
  244. package/dist/notes-9bOfe08J.mjs.map +0 -1
  245. package/dist/notes-DRdlsCYV.cjs.map +0 -1
  246. package/dist/ready-BjFMu_1J.mjs.map +0 -1
  247. package/dist/ready-eVMJIcWn.cjs.map +0 -1
  248. package/dist/stack-2jMvQfLo.cjs.map +0 -1
  249. package/dist/stack-kcxH-2tZ.mjs.map +0 -1
  250. package/dist/workspace-9q4TSHlM.mjs.map +0 -1
  251. package/dist/workspace-Ciw3SnME.cjs.map +0 -1
@@ -545,12 +545,12 @@ function clientConfigOf(options, target) {
545
545
  * no owner — both URLs are the master credential by design.
546
546
  */
547
547
  function ownerUrl(options, target) {
548
- const key = (0, _geekmidas_manifest.provideKey)(target.id, "ownerUrl");
548
+ const key = (0, _geekmidas_manifest.providedKeyFor)(target.id, "database", "ownerUrl");
549
549
  const owner = options.env[key];
550
550
  if (owner) return owner;
551
551
  const database = options.manifest[target.of ?? target.id];
552
552
  if (database?.kind === "database" && database.roles === false) {
553
- const url = options.env[(0, _geekmidas_manifest.provideKey)(target.id, "url")];
553
+ const url = options.env[(0, _geekmidas_manifest.providedKeyFor)(target.id, "database", "url")];
554
554
  if (url) return url;
555
555
  }
556
556
  throw new NoOwnerCredential(target.id, key);
@@ -700,4 +700,4 @@ Object.defineProperty(exports, "seedDatabases", {
700
700
  }
701
701
  });
702
702
 
703
- //# sourceMappingURL=databases-CrKh5jw6.cjs.map
703
+ //# sourceMappingURL=databases-CuTL1e7s.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"databases-CuTL1e7s.cjs","names":["GkmError","readdir","extname","join","pathToFileURL","stat","readFile","GkmError","driversFor","cacheBackendsIn","eventsBackendsIn","join","mkdir","writeFile","pathToFileURL","createHash","GkmError","join","migrationTargets","MIGRATIONS_ROOT","canonicalId","readdir","DATABASE_FOLDERS","providedKeyFor","require","createRequire","pathToFileURL"],"sources":["../src/migrate/provider.ts","../src/migrate/seedDrivers.ts","../src/migrate/databases.ts"],"sourcesContent":["/**\n * One construct's migrations and seeds, read from its folders.\n *\n * Two kinds of file, told apart by extension rather than by configuration: a\n * script exports `up` (and may export `down`) — or `seed(db, { stage })`, in\n * `seeds/` — and a\n * `.sql` file is run whole. The second is what makes a folder independent of\n * the client the app uses — Better Auth's schema is SQL whatever the\n * application queries with.\n */\n\nimport { readdir, readFile, stat } from 'node:fs/promises';\nimport { extname, join } from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport type { SeedContext } from '@geekmidas/constructs';\nimport type { Kysely, sql } from 'kysely';\nimport type { Migration, MigrationProvider } from 'kysely/migration';\nimport { GkmError } from '../errors';\n\nconst SCRIPTS = new Set(['.ts', '.mts', '.js', '.mjs']);\n\n/** Two files in one folder that would be one migration. */\nexport class DuplicateMigration extends GkmError {\n\tconstructor(\n\t\treadonly folder: string,\n\t\treadonly migration: string,\n\t) {\n\t\tsuper(\n\t\t\t`${folder} has two migrations named '${migration}' — a script and a .sql file ` +\n\t\t\t\t`with the same name. A migration is recorded by name, so only one of ` +\n\t\t\t\t`them could ever run; rename or remove the other.`,\n\t\t);\n\t\tthis.name = 'DuplicateMigration';\n\t}\n}\n\n/** A script in a migrations folder that exports no `up`. */\nexport class MigrationHasNoUp extends GkmError {\n\tconstructor(readonly file: string) {\n\t\tsuper(\n\t\t\t`${file} is in a migrations folder but exports no \\`up\\` function. ` +\n\t\t\t\t`Export \\`async function up(db: Kysely<unknown>)\\`, or move the file ` +\n\t\t\t\t`out of the folder if it is not a migration.`,\n\t\t);\n\t\tthis.name = 'MigrationHasNoUp';\n\t}\n}\n\n/** A script in a seeds folder that exports no `seed`. */\nexport class SeedHasNoSeed extends GkmError {\n\tconstructor(readonly file: string) {\n\t\tsuper(\n\t\t\t`${file} is in a seeds folder but exports no \\`seed\\` function. ` +\n\t\t\t\t`Export \\`async function seed(db, { stage })\\`, or move the ` +\n\t\t\t\t`file out of the folder if it is not a seed.`,\n\t\t);\n\t\tthis.name = 'SeedHasNoSeed';\n\t}\n}\n\n/**\n * What a seed is handed beside its database — `@geekmidas/constructs`'\n * `SeedContext`, whose `stage` is the union of the declared stages once\n * `.gkm/stages.d.ts` is generated.\n */\nexport type { SeedContext };\n\n/** One seed: what it is called, and what it does. */\nexport interface Seed {\n\tname: string;\n\trun: (db: Kysely<unknown>, context: SeedContext) => Promise<void>;\n}\n\n/**\n * The migration files in a folder, by name, without reading them.\n *\n * Also what `gkm dev` compares against a construct's history to report what\n * is pending, which is why it is separate from loading them.\n */\nexport async function migrationFiles(\n\tfolder: string,\n): Promise<Map<string, string>> {\n\tconst entries = await readdir(folder, { withFileTypes: true }).catch(\n\t\t(error: NodeJS.ErrnoException) => {\n\t\t\tif (error.code === 'ENOENT') return [];\n\t\t\tthrow error;\n\t\t},\n\t);\n\n\tconst files = new Map<string, string>();\n\tfor (const entry of entries) {\n\t\tif (!entry.isFile() || !isMigration(entry.name)) continue;\n\n\t\tconst name = entry.name.slice(0, -extname(entry.name).length);\n\t\tif (files.has(name)) throw new DuplicateMigration(folder, name);\n\n\t\tfiles.set(name, join(folder, entry.name));\n\t}\n\n\treturn files;\n}\n\n/** A Kysely provider over one construct's folder. */\nexport function folderProvider(\n\tfolder: string,\n\traw: typeof sql,\n): MigrationProvider {\n\treturn {\n\t\tasync getMigrations() {\n\t\t\tconst migrations: Record<string, Migration> = {};\n\n\t\t\tfor (const [name, file] of await migrationFiles(folder)) {\n\t\t\t\tmigrations[name] =\n\t\t\t\t\textname(file) === '.sql'\n\t\t\t\t\t\t? await sqlMigration(file, raw)\n\t\t\t\t\t\t: await scriptMigration(file);\n\t\t\t}\n\n\t\t\treturn migrations;\n\t\t},\n\t};\n}\n\n/**\n * The seeds in a folder, loaded, in name order.\n *\n * Every one runs on every pass — there is no history to consult — so the order\n * is the only thing between two seeds where one reads what another writes.\n * Name them to sort that way.\n */\nexport async function loadSeeds(\n\tfolder: string,\n\traw: typeof sql,\n): Promise<Seed[]> {\n\tconst files = [...(await migrationFiles(folder))].sort(([a], [b]) =>\n\t\ta < b ? -1 : a > b ? 1 : 0,\n\t);\n\n\tconst seeds: Seed[] = [];\n\tfor (const [name, file] of files) {\n\t\tseeds.push({\n\t\t\tname,\n\t\t\trun:\n\t\t\t\textname(file) === '.sql'\n\t\t\t\t\t? (await sqlMigration(file, raw)).up\n\t\t\t\t\t: await scriptSeed(file),\n\t\t});\n\t}\n\n\treturn seeds;\n}\n\n/**\n * A seed script, imported as it is on disk now.\n *\n * Keyed by its modification time: a seed is run again after it is edited, and\n * a process that has imported it once would otherwise run the old one.\n */\nasync function scriptSeed(file: string): Promise<Seed['run']> {\n\tconst url = pathToFileURL(file);\n\turl.searchParams.set('mtime', String((await stat(file)).mtimeMs));\n\tconst module = (await import(url.href)) as { seed?: unknown };\n\tif (typeof module.seed !== 'function') throw new SeedHasNoSeed(file);\n\n\treturn module.seed as Seed['run'];\n}\n\nfunction isMigration(file: string): boolean {\n\tif (file.endsWith('.d.ts')) return false;\n\tif (/\\.(spec|test)\\.[cm]?[jt]s$/.test(file)) return false;\n\n\tconst extension = extname(file);\n\treturn extension === '.sql' || SCRIPTS.has(extension);\n}\n\nasync function scriptMigration(file: string): Promise<Migration> {\n\tconst module = (await import(pathToFileURL(file).href)) as Partial<Migration>;\n\tif (typeof module.up !== 'function') throw new MigrationHasNoUp(file);\n\n\treturn {\n\t\tup: module.up,\n\t\t...(typeof module.down === 'function' ? { down: module.down } : {}),\n\t};\n}\n\n/**\n * A `.sql` file, run whole.\n *\n * One query rather than split on `;`: with no parameters, Postgres takes\n * several statements in one message, and splitting by hand breaks on the first\n * `;` inside a string or a function body. There is no `down` — a generated\n * schema is rolled back by a migration that says how, not by guessing.\n */\nasync function sqlMigration(file: string, raw: typeof sql): Promise<Migration> {\n\tconst statements = await readFile(file, 'utf-8');\n\n\treturn {\n\t\tup: async (db: Kysely<unknown>) => {\n\t\t\tawait raw.raw(statements).execute(db);\n\t\t},\n\t};\n}\n","/**\n * The drivers a seed run registers before any seed runs.\n *\n * The seed runner is an entry point gkm owns, like the generated server and\n * the test harness, so it registers what they register — from the same\n * {@link driversFor}, so the two cannot drift. A seed then reaches a bucket or\n * a cache through the construct's service, exactly as a handler does, and no\n * application code names a provider.\n *\n * The registrations are written to a module under `.gkm/` and imported from\n * there, rather than imported by gkm itself: a registry is a module-level map,\n * so it has to be the copy the app's constructs resolve — which is the one a\n * bare specifier finds from the project root, not the one beside gkm.\n */\n\nimport { createHash } from 'node:crypto';\nimport { mkdir, writeFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport type { ConstructManifest } from '@geekmidas/manifest';\nimport { GkmError } from '../errors';\nimport {\n\tcacheBackendsIn,\n\tdriversFor,\n\teventsBackendsIn,\n} from '../generators/drivers';\nimport type { CacheBackend, EventsBackend } from '../types';\n\n/** Which backends the stage being seeded resolves its declarations to. */\nexport interface SeedBackends {\n\tcache: CacheBackend;\n\tevents: EventsBackend;\n}\n\n/** The drivers a seed run needs could not be loaded from the project. */\nexport class SeedDriversUnresolved extends GkmError {\n\tconstructor(\n\t\treadonly root: string,\n\t\toverride readonly cause: unknown,\n\t) {\n\t\tsuper(\n\t\t\t`Could not load the drivers seeds run with from ${root} — ` +\n\t\t\t\t`${cause instanceof Error ? cause.message : String(cause)}. ` +\n\t\t\t\t`They are the ones the app's own entry registers; install the ` +\n\t\t\t\t`package it names where the project's constructs are declared.`,\n\t\t);\n\t\tthis.name = 'SeedDriversUnresolved';\n\t}\n}\n\n/**\n * Register the drivers a generated entry for this project would: storage when\n * it installs `@geekmidas/storage`, the cache backend its caches resolve to,\n * and the broker its topics and queues do. Nothing when it declares none.\n */\nexport async function registerSeedDrivers(options: {\n\troot: string;\n\tmanifest: ConstructManifest;\n\tbackends: SeedBackends;\n}): Promise<void> {\n\tconst drivers = driversFor({\n\t\tappRoot: options.root,\n\t\tcache: cacheBackendsIn(options.manifest, options.backends.cache),\n\t\tevents: eventsBackendsIn(options.manifest, options.backends.events),\n\t});\n\tif (!drivers.setup) return;\n\n\tconst content = `${drivers.imports}\\n\\n${drivers.setup}\\n`;\n\tconst dir = join(options.root, '.gkm');\n\tconst file = join(dir, 'seed-drivers.mjs');\n\tawait mkdir(dir, { recursive: true });\n\tawait writeFile(file, content);\n\n\t// Keyed by content: registration is idempotent, but a process seeding\n\t// twice after the declarations changed must load the new set.\n\tconst url = pathToFileURL(file);\n\turl.searchParams.set(\n\t\t'v',\n\t\tcreateHash('sha256').update(content).digest('hex').slice(0, 12),\n\t);\n\n\ttry {\n\t\tawait import(url.href);\n\t} catch (error) {\n\t\tthrow new SeedDriversUnresolved(options.root, error);\n\t}\n}\n","/**\n * Bring each construct's schema up to its migrations folder.\n *\n * Which constructs, in what order, from which folder, is `migrationTargets`'\n * answer and nobody else's. What is decided here is only how one target is\n * run: as its owner, in its own schema, with a history of its own.\n */\n\nimport { readdir } from 'node:fs/promises';\nimport { createRequire } from 'node:module';\nimport { join } from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport {\n\ttype ConstructManifest,\n\tcanonicalId,\n\tDATABASE_FOLDERS,\n\tMIGRATIONS_ROOT,\n\ttype MigrationTarget,\n\tmigrationTargets,\n\tprovidedKeyFor,\n} from '@geekmidas/manifest';\nimport type { Kysely, KyselyConfig } from 'kysely';\nimport type { Migrator } from 'kysely/migration';\nimport pg from 'pg';\nimport { GkmError } from '../errors';\nimport type { ConstructSource } from '../reconcile/discover';\nimport { folderProvider, loadSeeds, migrationFiles } from './provider';\nimport { registerSeedDrivers, type SeedBackends } from './seedDrivers';\n\nexport interface DatabasesOptions {\n\t/** The project root — where `db/` lives. */\n\troot: string;\n\tmanifest: ConstructManifest;\n\t/**\n\t * Where each construct was declared. A construct's migrations run with the\n\t * Kysely its own file resolves, which is the one its migrations import.\n\t */\n\tsources?: Readonly<Record<string, ConstructSource>>;\n\t/** The resolved environment: each construct's owner URL is read from it. */\n\tenv: Readonly<Record<string, string | undefined>>;\n\t/** One construct, by name. All of them when absent. */\n\tonly?: string;\n}\n\nexport interface MigrationRun {\n\ttarget: MigrationTarget;\n\t/** The migrations this run applied, in order. */\n\tapplied: string[];\n}\n\nexport interface SeedOptions extends DatabasesOptions {\n\t/** The stage being seeded, handed to every seed. */\n\tstage: string;\n\t/**\n\t * What the stage's caches and topics resolve to — which drivers a seed is\n\t * run with, as the stage's own entry would register them.\n\t */\n\tbackends: SeedBackends;\n}\n\nexport interface SeedRun {\n\ttarget: MigrationTarget;\n\t/** The seeds this run ran, in order — every one, every time. */\n\tseeded: string[];\n}\n\n/** The seeds a run would run for one construct, read without connecting. */\nexport interface PlannedSeeds {\n\ttarget: MigrationTarget;\n\t/** In the order they would run. */\n\tseeds: string[];\n}\n\nexport interface PendingMigrations {\n\ttarget: MigrationTarget;\n\tpending: string[];\n}\n\n/** A folder under `db/` that names no construct. */\nexport class UnknownMigrationFolder extends GkmError {\n\tconstructor(\n\t\treadonly folder: string,\n\t\treadonly known: readonly string[],\n\t) {\n\t\tsuper(\n\t\t\t`${folder} names no database construct, so its migrations would never ` +\n\t\t\t\t`run. ${known.length > 0 ? `The folders that do: ${known.join(', ')}.` : 'This project declares no database.'} ` +\n\t\t\t\t`Rename the folder after the construct it belongs to.`,\n\t\t);\n\t\tthis.name = 'UnknownMigrationFolder';\n\t}\n}\n\n/** A construct was asked for by a name that takes no migrations. */\nexport class NoSuchMigrationTarget extends GkmError {\n\tconstructor(\n\t\treadonly construct: string,\n\t\treadonly known: readonly string[],\n\t) {\n\t\tsuper(\n\t\t\t`'${construct}' is not a database construct. ` +\n\t\t\t\t(known.length > 0\n\t\t\t\t\t? `The ones with migrations: ${known.join(', ')}.`\n\t\t\t\t\t: 'This project declares no database.'),\n\t\t);\n\t\tthis.name = 'NoSuchMigrationTarget';\n\t}\n}\n\n/**\n * A migration left directly in a construct's folder, where nothing reads it.\n *\n * Migrations moved into `migrations/` so seeds could sit beside them. A file\n * still at the old level would otherwise never run, and nothing would say so.\n */\nexport class MigrationsOutsideFolder extends GkmError {\n\tconstructor(\n\t\treadonly folder: string,\n\t\treadonly files: readonly string[],\n\t) {\n\t\tsuper(\n\t\t\t`${folder} has ${files.join(', ')} directly inside it, where nothing ` +\n\t\t\t\t`runs them. Migrations live in ${folder}/migrations/ and seeds in ` +\n\t\t\t\t`${folder}/seeds/ — move ${files.length === 1 ? 'it' : 'them'} there.`,\n\t\t);\n\t\tthis.name = 'MigrationsOutsideFolder';\n\t}\n}\n\n/** A folder inside a construct's folder that is neither `migrations` nor `seeds`. */\nexport class UnknownDatabaseFolder extends GkmError {\n\tconstructor(readonly folder: string) {\n\t\tsuper(\n\t\t\t`${folder} is neither migrations/ nor seeds/, so nothing in it would ` +\n\t\t\t\t`ever run. A construct's folder holds those two; rename or remove it.`,\n\t\t);\n\t\tthis.name = 'UnknownDatabaseFolder';\n\t}\n}\n\n/** A seed failed; its own writes are rolled back, the ones before it stay. */\nexport class SeedFailed extends Error {\n\tconstructor(\n\t\treadonly construct: string,\n\t\treadonly seed: string,\n\t\toverride readonly cause: unknown,\n\t) {\n\t\tsuper(\n\t\t\t`${construct}: seed '${seed}' failed — ` +\n\t\t\t\t`${cause instanceof Error ? cause.message : String(cause)}. ` +\n\t\t\t\t`Its writes were rolled back; fix it and run it again.`,\n\t\t);\n\t\tthis.name = 'SeedFailed';\n\t}\n}\n\n/** A construct with roles has no owner URL to migrate with. */\nexport class NoOwnerCredential extends GkmError {\n\tconstructor(\n\t\treadonly construct: string,\n\t\treadonly key: string,\n\t) {\n\t\tsuper(\n\t\t\t`${construct} has no ${key} to migrate with. Migrations run as the owner ` +\n\t\t\t\t`role — the runtime one cannot create a table — and nothing ` +\n\t\t\t\t`resolved its URL. Is the stage reconciled?`,\n\t\t);\n\t\tthis.name = 'NoOwnerCredential';\n\t}\n}\n\n/** A migration failed; the ones before it in the run stay applied. */\nexport class MigrationFailed extends Error {\n\tconstructor(\n\t\treadonly construct: string,\n\t\treadonly migration: string | undefined,\n\t\toverride readonly cause: unknown,\n\t) {\n\t\tsuper(\n\t\t\t`${construct}: migration ${migration ? `'${migration}' ` : ''}failed — ` +\n\t\t\t\t`${cause instanceof Error ? cause.message : String(cause)}`,\n\t\t);\n\t\tthis.name = 'MigrationFailed';\n\t}\n}\n\n/** The project's Kysely could not be found from where a database is declared. */\nexport class KyselyNotFound extends GkmError {\n\tconstructor(readonly from: string) {\n\t\tsuper(\n\t\t\t`Could not resolve 'kysely' from ${from}. Migrations run with the ` +\n\t\t\t\t`project's own Kysely — install it where the database is declared.`,\n\t\t);\n\t\tthis.name = 'KyselyNotFound';\n\t}\n}\n\n/** Apply every pending migration, construct by construct, parents first. */\nexport async function migrateDatabases(\n\toptions: DatabasesOptions,\n): Promise<MigrationRun[]> {\n\tconst runs: MigrationRun[] = [];\n\n\tfor (const target of await targetsFor(options)) {\n\t\t// No folder, or an empty one, is nothing to do — and no reason to\n\t\t// connect, which a construct nobody has written a migration for yet\n\t\t// should not need.\n\t\tconst files = await migrationFiles(join(options.root, target.migrations));\n\t\tif (files.size === 0) {\n\t\t\truns.push({ target, applied: [] });\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst applied = await withMigrator(options, target, async (migrator) => {\n\t\t\tconst { error, results = [] } = await migrator.migrateToLatest();\n\t\t\tif (error) {\n\t\t\t\tconst failed = results.find((result) => result.status === 'Error');\n\t\t\t\tthrow new MigrationFailed(target.id, failed?.migrationName, error);\n\t\t\t}\n\n\t\t\treturn results\n\t\t\t\t.filter((result) => result.status === 'Success')\n\t\t\t\t.map((result) => result.migrationName);\n\t\t});\n\n\t\truns.push({ target, applied });\n\t}\n\n\treturn runs;\n}\n\n/**\n * Run every construct's seeds, parents first — each one, every time, on every\n * stage, production included. Each is handed the stage, so a seed decides\n * what belongs where.\n *\n * Seeds are reference data kept up to date by being run again, so there is no\n * history: a seed is an upsert, and a changed one is applied by the next run.\n * Each runs in its own transaction, as the construct's owner, so a failure\n * leaves nothing half-written. Assumes the schema is migrated —\n * {@link migrateAndSeed} is what makes that true.\n *\n * A seed is handed the client the app gets — the construct's `clientConfig`,\n * plugins included — on the owner's connection. One written against\n * `Kysely<DB>` with a `CamelCasePlugin` writes `isEditable` here as it does in\n * a handler or a test.\n *\n * And with the drivers the stage's entry registers, and the stage's `env`, so\n * a seed reaching a bucket or a cache through its construct gets the client a\n * handler would.\n */\nexport async function seedDatabases(options: SeedOptions): Promise<SeedRun[]> {\n\tconst runs: SeedRun[] = [];\n\tlet registered = false;\n\n\tfor (const target of await targetsFor(options)) {\n\t\tconst folder = join(options.root, target.seeds);\n\t\tif ((await migrationFiles(folder)).size === 0) {\n\t\t\truns.push({ target, seeded: [] });\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!registered) {\n\t\t\tawait registerSeedDrivers(options);\n\t\t\tregistered = true;\n\t\t}\n\n\t\tconst config = clientConfigOf(options, target);\n\t\tconst seeded = await withOwner(\n\t\t\toptions,\n\t\t\ttarget,\n\t\t\tconfig,\n\t\t\tasync (db, kysely) => {\n\t\t\t\tconst names: string[] = [];\n\t\t\t\tfor (const seed of await loadSeeds(folder, kysely.sql)) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait db\n\t\t\t\t\t\t\t.transaction()\n\t\t\t\t\t\t\t.execute((trx) =>\n\t\t\t\t\t\t\t\tseed.run(trx, { stage: options.stage, env: options.env }),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tthrow new SeedFailed(target.id, seed.name, error);\n\t\t\t\t\t}\n\t\t\t\t\tnames.push(seed.name);\n\t\t\t\t}\n\t\t\t\treturn names;\n\t\t\t},\n\t\t);\n\n\t\truns.push({ target, seeded });\n\t}\n\n\treturn runs;\n}\n\n/**\n * The seeds {@link seedDatabases} would run, construct by construct, parents\n * first, in the order it would run them — read from the folders alone, with\n * no connection. What a dry run lists. Constructs with none are left out.\n */\nexport async function plannedSeeds(\n\toptions: Pick<DatabasesOptions, 'root' | 'manifest' | 'only'>,\n): Promise<PlannedSeeds[]> {\n\tconst planned: PlannedSeeds[] = [];\n\tfor (const target of await targetsFor(options)) {\n\t\tconst files = await migrationFiles(join(options.root, target.seeds));\n\t\tif (files.size === 0) continue;\n\t\tplanned.push({ target, seeds: [...files.keys()].sort() });\n\t}\n\treturn planned;\n}\n\n/**\n * Migrate, then seed: a seed only ever runs against the schema it was written\n * for.\n *\n * With `only`, the constructs it lives in are migrated too — a tenant's seed\n * cannot run before the database that owns its schema exists — and only it is\n * seeded.\n */\nexport async function migrateAndSeed(options: SeedOptions): Promise<{\n\tmigrations: MigrationRun[];\n\tseeds: SeedRun[];\n}> {\n\tconst migrations: MigrationRun[] = [];\n\tfor (const target of await withParents(options)) {\n\t\tmigrations.push(\n\t\t\t...(await migrateDatabases({ ...options, only: target.id })),\n\t\t);\n\t}\n\n\treturn { migrations, seeds: await seedDatabases(options) };\n}\n\n/** The targets `only` names, after the ones it lives in; all without it. */\nasync function withParents(\n\toptions: DatabasesOptions,\n): Promise<MigrationTarget[]> {\n\tconst chosen = await targetsFor(options);\n\tif (!options.only) return chosen;\n\n\tconst all = migrationTargets(options.manifest);\n\tconst ids = new Set<string>();\n\tfor (const target of chosen) {\n\t\tlet current: MigrationTarget | undefined = target;\n\t\twhile (current) {\n\t\t\tids.add(current.id);\n\t\t\tconst parent: string | undefined = current.of;\n\t\t\tcurrent = parent ? all.find((t) => t.id === parent) : undefined;\n\t\t}\n\t}\n\n\treturn all.filter((target) => ids.has(target.id));\n}\n\n/**\n * What each construct's folder has that its history does not — without\n * applying any of it. What `gkm dev` reports.\n */\nexport async function pendingMigrations(\n\toptions: DatabasesOptions,\n): Promise<PendingMigrations[]> {\n\tconst found: PendingMigrations[] = [];\n\n\tfor (const target of await targetsFor(options)) {\n\t\tconst files = await migrationFiles(join(options.root, target.migrations));\n\t\tif (files.size === 0) continue;\n\n\t\tconst pending = await withMigrator(options, target, async (migrator) =>\n\t\t\t(await migrator.getMigrations())\n\t\t\t\t.filter((migration) => migration.executedAt === undefined)\n\t\t\t\t.map((migration) => migration.name),\n\t\t);\n\n\t\tif (pending.length > 0) found.push({ target, pending });\n\t}\n\n\treturn found;\n}\n\n/**\n * The targets this run covers, with every folder under `db/` accounted for.\n *\n * A folder that names no construct is an error rather than something to skip:\n * a typo in its name is otherwise a migration that silently never runs.\n */\nasync function targetsFor(\n\toptions: Pick<DatabasesOptions, 'root' | 'manifest' | 'only'>,\n): Promise<MigrationTarget[]> {\n\tconst targets = migrationTargets(options.manifest);\n\tconst folders = targets.map((target) => target.folder);\n\n\tfor (const folder of await foldersIn(join(options.root, MIGRATIONS_ROOT))) {\n\t\tconst relative = `${MIGRATIONS_ROOT}/${folder}`;\n\t\tif (!folders.includes(relative)) {\n\t\t\tthrow new UnknownMigrationFolder(relative, folders);\n\t\t}\n\t\tawait checkLayout(options.root, relative);\n\t}\n\n\tif (!options.only) return targets;\n\n\tconst id = canonicalId(options.only);\n\tconst chosen = targets.filter((target) => target.id === id);\n\tif (chosen.length === 0) {\n\t\tthrow new NoSuchMigrationTarget(\n\t\t\toptions.only,\n\t\t\ttargets.map((target) => target.id),\n\t\t);\n\t}\n\n\treturn chosen;\n}\n\n/**\n * A construct's folder holds `migrations/` and `seeds/`, and nothing else —\n * anything beside them is a file or folder nothing would ever run.\n */\nasync function checkLayout(root: string, folder: string): Promise<void> {\n\tconst entries = await readdir(join(root, folder), { withFileTypes: true });\n\n\tconst loose = entries\n\t\t.filter((entry) => entry.isFile() && !entry.name.startsWith('.'))\n\t\t.map((entry) => entry.name);\n\tif (loose.length > 0) throw new MigrationsOutsideFolder(folder, loose);\n\n\tfor (const entry of entries) {\n\t\tif (\n\t\t\tentry.isDirectory() &&\n\t\t\t!(DATABASE_FOLDERS as readonly string[]).includes(entry.name)\n\t\t) {\n\t\t\tthrow new UnknownDatabaseFolder(`${folder}/${entry.name}`);\n\t\t}\n\t}\n}\n\nasync function foldersIn(dir: string): Promise<string[]> {\n\tconst entries = await readdir(dir, { withFileTypes: true }).catch(\n\t\t(error: NodeJS.ErrnoException) => {\n\t\t\tif (error.code === 'ENOENT') return [];\n\t\t\tthrow error;\n\t\t},\n\t);\n\n\treturn entries\n\t\t.filter((entry) => entry.isDirectory())\n\t\t.map((entry) => entry.name);\n}\n\n/**\n * A migrator for one target, connected as its owner.\n *\n * No `migrationTableSchema`: the owner role's `search_path` is pinned to the\n * construct's schema, so the history lands there — `app.kysely_migration` for\n * the database, `auth_database.kysely_migration` for its tenant — and two\n * constructs in one Postgres never share one.\n *\n * Unordered migrations are allowed. Files are timestamped, so a branch merged\n * after another's migration ran carries an older one; refusing it would make\n * every such merge a manual repair.\n *\n * The client is bare — none of the construct's plugins. A casing plugin\n * rewrites identifiers in schema-builder DDL too, and a migration must do the\n * same thing forever after it has run, so it cannot depend on configuration\n * that may change.\n */\nasync function withMigrator<T>(\n\toptions: DatabasesOptions,\n\ttarget: MigrationTarget,\n\trun: (migrator: Migrator) => Promise<T>,\n): Promise<T> {\n\treturn withOwner(options, target, {}, (db, { Migrator, sql }) =>\n\t\trun(\n\t\t\tnew Migrator({\n\t\t\t\tdb,\n\t\t\t\tprovider: folderProvider(join(options.root, target.migrations), sql),\n\t\t\t\tallowUnorderedMigrations: true,\n\t\t\t}),\n\t\t),\n\t);\n}\n\n/**\n * One target's database, connected as its owner and closed afterwards — what\n * migrations and seeds both run as, each with the client config it needs.\n */\nasync function withOwner<T>(\n\toptions: DatabasesOptions,\n\ttarget: MigrationTarget,\n\tconfig: Omit<KyselyConfig, 'dialect'>,\n\trun: (\n\t\tdb: Kysely<unknown>,\n\t\tkysely: Awaited<ReturnType<typeof kyselyFrom>>,\n\t) => Promise<T>,\n): Promise<T> {\n\tconst from =\n\t\toptions.sources?.[target.id]?.file ??\n\t\t(target.of ? options.sources?.[target.of]?.file : undefined) ??\n\t\tjoin(options.root, 'package.json');\n\tconst kysely = await kyselyFrom(from);\n\n\tconst db: Kysely<unknown> = new kysely.Kysely<unknown>({\n\t\t...config,\n\t\tdialect: new kysely.PostgresDialect({\n\t\t\tpool: new pg.Pool(poolConfig(ownerUrl(options, target))),\n\t\t}),\n\t});\n\n\ttry {\n\t\treturn await run(db, kysely);\n\t} finally {\n\t\tawait db.destroy();\n\t}\n}\n\n/**\n * What the construct builds its clients with besides a dialect — its plugins\n * and logging — read from the construct discovery already imported.\n *\n * A tenant's is its own: `database.schema('Auth', { plugins })` declares the\n * client for its tables, not the parent's. With no construct to ask (a\n * manifest without sources), the client is bare.\n */\nfunction clientConfigOf(\n\toptions: DatabasesOptions,\n\ttarget: MigrationTarget,\n): Omit<KyselyConfig, 'dialect'> {\n\tconst construct = options.sources?.[target.id]?.construct;\n\tif (typeof construct !== 'object' || construct === null) return {};\n\tif (!('clientConfig' in construct)) return {};\n\treturn (construct.clientConfig as Omit<KyselyConfig, 'dialect'>) ?? {};\n}\n\n/**\n * The owner's URL, with no fallback to the runtime one.\n *\n * The runtime role can create nothing, so falling back would only move the\n * failure to the first `CREATE TABLE` and make it read like a permissions\n * bug. The one exception is a database declared `roles: false`, where there is\n * no owner — both URLs are the master credential by design.\n */\nfunction ownerUrl(options: DatabasesOptions, target: MigrationTarget): string {\n\tconst key = providedKeyFor(target.id, 'database', 'ownerUrl');\n\tconst owner = options.env[key];\n\tif (owner) return owner;\n\n\tconst database = options.manifest[target.of ?? target.id];\n\tif (database?.kind === 'database' && database.roles === false) {\n\t\tconst url = options.env[providedKeyFor(target.id, 'database', 'url')];\n\t\tif (url) return url;\n\t}\n\n\tthrow new NoOwnerCredential(target.id, key);\n}\n\n/**\n * Pool settings for a URL, with `?search_path=` as the startup option Postgres\n * reads. Only a `roles: false` URL carries it — a role pins its own.\n */\nfunction poolConfig(url: string): pg.PoolConfig {\n\tconst parsed = new URL(url);\n\tconst searchPath = parsed.searchParams.get('search_path');\n\tif (!searchPath) return { connectionString: url };\n\n\tparsed.searchParams.delete('search_path');\n\treturn {\n\t\tconnectionString: parsed.toString(),\n\t\toptions: `-c search_path=${searchPath}`,\n\t};\n}\n\n/** Kysely as the project resolves it from `from`. */\nasync function kyselyFrom(from: string) {\n\tconst require = createRequire(from);\n\n\ttry {\n\t\tconst [main, migration] = await Promise.all([\n\t\t\timport(pathToFileURL(require.resolve('kysely')).href),\n\t\t\timport(pathToFileURL(require.resolve('kysely/migration')).href),\n\t\t]);\n\n\t\treturn {\n\t\t\tKysely: main.Kysely as typeof import('kysely').Kysely,\n\t\t\tPostgresDialect:\n\t\t\t\tmain.PostgresDialect as typeof import('kysely').PostgresDialect,\n\t\t\tsql: main.sql as typeof import('kysely').sql,\n\t\t\tMigrator:\n\t\t\t\tmigration.Migrator as typeof import('kysely/migration').Migrator,\n\t\t};\n\t} catch {\n\t\tthrow new KyselyNotFound(from);\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmBA,MAAM,0BAAU,IAAI,IAAI;CAAC;CAAO;CAAQ;CAAO;AAAM,CAAC;;AAG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OAAO;GACN,QAAQ,KAAK;GACb,iBACC,KAAK;GACN,KAAK,KAAK;GACV,UACC,UAAU;EACZ;CACD,QAAQ;EACP,MAAM,IAAI,eAAe,IAAI;CAC9B;AACD"}
@@ -4,7 +4,7 @@ import { createRequire } from "node:module";
4
4
  import { extname, join } from "node:path";
5
5
  import { mkdir, readFile, readdir, stat, writeFile } from "node:fs/promises";
6
6
  import { createHash } from "node:crypto";
7
- import { DATABASE_FOLDERS, MIGRATIONS_ROOT, canonicalId, migrationTargets, provideKey } from "@geekmidas/manifest";
7
+ import { DATABASE_FOLDERS, MIGRATIONS_ROOT, canonicalId, migrationTargets, providedKeyFor } from "@geekmidas/manifest";
8
8
  import { pathToFileURL } from "node:url";
9
9
  import pg from "pg";
10
10
  //#region src/migrate/provider.ts
@@ -543,12 +543,12 @@ function clientConfigOf(options, target) {
543
543
  * no owner — both URLs are the master credential by design.
544
544
  */
545
545
  function ownerUrl(options, target) {
546
- const key = provideKey(target.id, "ownerUrl");
546
+ const key = providedKeyFor(target.id, "database", "ownerUrl");
547
547
  const owner = options.env[key];
548
548
  if (owner) return owner;
549
549
  const database = options.manifest[target.of ?? target.id];
550
550
  if (database?.kind === "database" && database.roles === false) {
551
- const url = options.env[provideKey(target.id, "url")];
551
+ const url = options.env[providedKeyFor(target.id, "database", "url")];
552
552
  if (url) return url;
553
553
  }
554
554
  throw new NoOwnerCredential(target.id, key);
@@ -585,4 +585,4 @@ async function kyselyFrom(from) {
585
585
  //#endregion
586
586
  export { MigrationHasNoUp as _, NoSuchMigrationTarget as a, UnknownMigrationFolder as c, pendingMigrations as d, plannedSeeds as f, DuplicateMigration as g, registerSeedDrivers as h, NoOwnerCredential as i, migrateAndSeed as l, SeedDriversUnresolved as m, MigrationFailed as n, SeedFailed as o, seedDatabases as p, MigrationsOutsideFolder as r, UnknownDatabaseFolder as s, KyselyNotFound as t, migrateDatabases as u, SeedHasNoSeed as v, migrationFiles as y };
587
587
 
588
- //# sourceMappingURL=databases-C1qqNxTu.mjs.map
588
+ //# sourceMappingURL=databases-zN-gEox0.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"databases-zN-gEox0.mjs","names":[],"sources":["../src/migrate/provider.ts","../src/migrate/seedDrivers.ts","../src/migrate/databases.ts"],"sourcesContent":["/**\n * One construct's migrations and seeds, read from its folders.\n *\n * Two kinds of file, told apart by extension rather than by configuration: a\n * script exports `up` (and may export `down`) — or `seed(db, { stage })`, in\n * `seeds/` — and a\n * `.sql` file is run whole. The second is what makes a folder independent of\n * the client the app uses — Better Auth's schema is SQL whatever the\n * application queries with.\n */\n\nimport { readdir, readFile, stat } from 'node:fs/promises';\nimport { extname, join } from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport type { SeedContext } from '@geekmidas/constructs';\nimport type { Kysely, sql } from 'kysely';\nimport type { Migration, MigrationProvider } from 'kysely/migration';\nimport { GkmError } from '../errors';\n\nconst SCRIPTS = new Set(['.ts', '.mts', '.js', '.mjs']);\n\n/** Two files in one folder that would be one migration. */\nexport class DuplicateMigration extends GkmError {\n\tconstructor(\n\t\treadonly folder: string,\n\t\treadonly migration: string,\n\t) {\n\t\tsuper(\n\t\t\t`${folder} has two migrations named '${migration}' — a script and a .sql file ` +\n\t\t\t\t`with the same name. A migration is recorded by name, so only one of ` +\n\t\t\t\t`them could ever run; rename or remove the other.`,\n\t\t);\n\t\tthis.name = 'DuplicateMigration';\n\t}\n}\n\n/** A script in a migrations folder that exports no `up`. */\nexport class MigrationHasNoUp extends GkmError {\n\tconstructor(readonly file: string) {\n\t\tsuper(\n\t\t\t`${file} is in a migrations folder but exports no \\`up\\` function. ` +\n\t\t\t\t`Export \\`async function up(db: Kysely<unknown>)\\`, or move the file ` +\n\t\t\t\t`out of the folder if it is not a migration.`,\n\t\t);\n\t\tthis.name = 'MigrationHasNoUp';\n\t}\n}\n\n/** A script in a seeds folder that exports no `seed`. */\nexport class SeedHasNoSeed extends GkmError {\n\tconstructor(readonly file: string) {\n\t\tsuper(\n\t\t\t`${file} is in a seeds folder but exports no \\`seed\\` function. ` +\n\t\t\t\t`Export \\`async function seed(db, { stage })\\`, or move the ` +\n\t\t\t\t`file out of the folder if it is not a seed.`,\n\t\t);\n\t\tthis.name = 'SeedHasNoSeed';\n\t}\n}\n\n/**\n * What a seed is handed beside its database — `@geekmidas/constructs`'\n * `SeedContext`, whose `stage` is the union of the declared stages once\n * `.gkm/stages.d.ts` is generated.\n */\nexport type { SeedContext };\n\n/** One seed: what it is called, and what it does. */\nexport interface Seed {\n\tname: string;\n\trun: (db: Kysely<unknown>, context: SeedContext) => Promise<void>;\n}\n\n/**\n * The migration files in a folder, by name, without reading them.\n *\n * Also what `gkm dev` compares against a construct's history to report what\n * is pending, which is why it is separate from loading them.\n */\nexport async function migrationFiles(\n\tfolder: string,\n): Promise<Map<string, string>> {\n\tconst entries = await readdir(folder, { withFileTypes: true }).catch(\n\t\t(error: NodeJS.ErrnoException) => {\n\t\t\tif (error.code === 'ENOENT') return [];\n\t\t\tthrow error;\n\t\t},\n\t);\n\n\tconst files = new Map<string, string>();\n\tfor (const entry of entries) {\n\t\tif (!entry.isFile() || !isMigration(entry.name)) continue;\n\n\t\tconst name = entry.name.slice(0, -extname(entry.name).length);\n\t\tif (files.has(name)) throw new DuplicateMigration(folder, name);\n\n\t\tfiles.set(name, join(folder, entry.name));\n\t}\n\n\treturn files;\n}\n\n/** A Kysely provider over one construct's folder. */\nexport function folderProvider(\n\tfolder: string,\n\traw: typeof sql,\n): MigrationProvider {\n\treturn {\n\t\tasync getMigrations() {\n\t\t\tconst migrations: Record<string, Migration> = {};\n\n\t\t\tfor (const [name, file] of await migrationFiles(folder)) {\n\t\t\t\tmigrations[name] =\n\t\t\t\t\textname(file) === '.sql'\n\t\t\t\t\t\t? await sqlMigration(file, raw)\n\t\t\t\t\t\t: await scriptMigration(file);\n\t\t\t}\n\n\t\t\treturn migrations;\n\t\t},\n\t};\n}\n\n/**\n * The seeds in a folder, loaded, in name order.\n *\n * Every one runs on every pass — there is no history to consult — so the order\n * is the only thing between two seeds where one reads what another writes.\n * Name them to sort that way.\n */\nexport async function loadSeeds(\n\tfolder: string,\n\traw: typeof sql,\n): Promise<Seed[]> {\n\tconst files = [...(await migrationFiles(folder))].sort(([a], [b]) =>\n\t\ta < b ? -1 : a > b ? 1 : 0,\n\t);\n\n\tconst seeds: Seed[] = [];\n\tfor (const [name, file] of files) {\n\t\tseeds.push({\n\t\t\tname,\n\t\t\trun:\n\t\t\t\textname(file) === '.sql'\n\t\t\t\t\t? (await sqlMigration(file, raw)).up\n\t\t\t\t\t: await scriptSeed(file),\n\t\t});\n\t}\n\n\treturn seeds;\n}\n\n/**\n * A seed script, imported as it is on disk now.\n *\n * Keyed by its modification time: a seed is run again after it is edited, and\n * a process that has imported it once would otherwise run the old one.\n */\nasync function scriptSeed(file: string): Promise<Seed['run']> {\n\tconst url = pathToFileURL(file);\n\turl.searchParams.set('mtime', String((await stat(file)).mtimeMs));\n\tconst module = (await import(url.href)) as { seed?: unknown };\n\tif (typeof module.seed !== 'function') throw new SeedHasNoSeed(file);\n\n\treturn module.seed as Seed['run'];\n}\n\nfunction isMigration(file: string): boolean {\n\tif (file.endsWith('.d.ts')) return false;\n\tif (/\\.(spec|test)\\.[cm]?[jt]s$/.test(file)) return false;\n\n\tconst extension = extname(file);\n\treturn extension === '.sql' || SCRIPTS.has(extension);\n}\n\nasync function scriptMigration(file: string): Promise<Migration> {\n\tconst module = (await import(pathToFileURL(file).href)) as Partial<Migration>;\n\tif (typeof module.up !== 'function') throw new MigrationHasNoUp(file);\n\n\treturn {\n\t\tup: module.up,\n\t\t...(typeof module.down === 'function' ? { down: module.down } : {}),\n\t};\n}\n\n/**\n * A `.sql` file, run whole.\n *\n * One query rather than split on `;`: with no parameters, Postgres takes\n * several statements in one message, and splitting by hand breaks on the first\n * `;` inside a string or a function body. There is no `down` — a generated\n * schema is rolled back by a migration that says how, not by guessing.\n */\nasync function sqlMigration(file: string, raw: typeof sql): Promise<Migration> {\n\tconst statements = await readFile(file, 'utf-8');\n\n\treturn {\n\t\tup: async (db: Kysely<unknown>) => {\n\t\t\tawait raw.raw(statements).execute(db);\n\t\t},\n\t};\n}\n","/**\n * The drivers a seed run registers before any seed runs.\n *\n * The seed runner is an entry point gkm owns, like the generated server and\n * the test harness, so it registers what they register — from the same\n * {@link driversFor}, so the two cannot drift. A seed then reaches a bucket or\n * a cache through the construct's service, exactly as a handler does, and no\n * application code names a provider.\n *\n * The registrations are written to a module under `.gkm/` and imported from\n * there, rather than imported by gkm itself: a registry is a module-level map,\n * so it has to be the copy the app's constructs resolve — which is the one a\n * bare specifier finds from the project root, not the one beside gkm.\n */\n\nimport { createHash } from 'node:crypto';\nimport { mkdir, writeFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport type { ConstructManifest } from '@geekmidas/manifest';\nimport { GkmError } from '../errors';\nimport {\n\tcacheBackendsIn,\n\tdriversFor,\n\teventsBackendsIn,\n} from '../generators/drivers';\nimport type { CacheBackend, EventsBackend } from '../types';\n\n/** Which backends the stage being seeded resolves its declarations to. */\nexport interface SeedBackends {\n\tcache: CacheBackend;\n\tevents: EventsBackend;\n}\n\n/** The drivers a seed run needs could not be loaded from the project. */\nexport class SeedDriversUnresolved extends GkmError {\n\tconstructor(\n\t\treadonly root: string,\n\t\toverride readonly cause: unknown,\n\t) {\n\t\tsuper(\n\t\t\t`Could not load the drivers seeds run with from ${root} — ` +\n\t\t\t\t`${cause instanceof Error ? cause.message : String(cause)}. ` +\n\t\t\t\t`They are the ones the app's own entry registers; install the ` +\n\t\t\t\t`package it names where the project's constructs are declared.`,\n\t\t);\n\t\tthis.name = 'SeedDriversUnresolved';\n\t}\n}\n\n/**\n * Register the drivers a generated entry for this project would: storage when\n * it installs `@geekmidas/storage`, the cache backend its caches resolve to,\n * and the broker its topics and queues do. Nothing when it declares none.\n */\nexport async function registerSeedDrivers(options: {\n\troot: string;\n\tmanifest: ConstructManifest;\n\tbackends: SeedBackends;\n}): Promise<void> {\n\tconst drivers = driversFor({\n\t\tappRoot: options.root,\n\t\tcache: cacheBackendsIn(options.manifest, options.backends.cache),\n\t\tevents: eventsBackendsIn(options.manifest, options.backends.events),\n\t});\n\tif (!drivers.setup) return;\n\n\tconst content = `${drivers.imports}\\n\\n${drivers.setup}\\n`;\n\tconst dir = join(options.root, '.gkm');\n\tconst file = join(dir, 'seed-drivers.mjs');\n\tawait mkdir(dir, { recursive: true });\n\tawait writeFile(file, content);\n\n\t// Keyed by content: registration is idempotent, but a process seeding\n\t// twice after the declarations changed must load the new set.\n\tconst url = pathToFileURL(file);\n\turl.searchParams.set(\n\t\t'v',\n\t\tcreateHash('sha256').update(content).digest('hex').slice(0, 12),\n\t);\n\n\ttry {\n\t\tawait import(url.href);\n\t} catch (error) {\n\t\tthrow new SeedDriversUnresolved(options.root, error);\n\t}\n}\n","/**\n * Bring each construct's schema up to its migrations folder.\n *\n * Which constructs, in what order, from which folder, is `migrationTargets`'\n * answer and nobody else's. What is decided here is only how one target is\n * run: as its owner, in its own schema, with a history of its own.\n */\n\nimport { readdir } from 'node:fs/promises';\nimport { createRequire } from 'node:module';\nimport { join } from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport {\n\ttype ConstructManifest,\n\tcanonicalId,\n\tDATABASE_FOLDERS,\n\tMIGRATIONS_ROOT,\n\ttype MigrationTarget,\n\tmigrationTargets,\n\tprovidedKeyFor,\n} from '@geekmidas/manifest';\nimport type { Kysely, KyselyConfig } from 'kysely';\nimport type { Migrator } from 'kysely/migration';\nimport pg from 'pg';\nimport { GkmError } from '../errors';\nimport type { ConstructSource } from '../reconcile/discover';\nimport { folderProvider, loadSeeds, migrationFiles } from './provider';\nimport { registerSeedDrivers, type SeedBackends } from './seedDrivers';\n\nexport interface DatabasesOptions {\n\t/** The project root — where `db/` lives. */\n\troot: string;\n\tmanifest: ConstructManifest;\n\t/**\n\t * Where each construct was declared. A construct's migrations run with the\n\t * Kysely its own file resolves, which is the one its migrations import.\n\t */\n\tsources?: Readonly<Record<string, ConstructSource>>;\n\t/** The resolved environment: each construct's owner URL is read from it. */\n\tenv: Readonly<Record<string, string | undefined>>;\n\t/** One construct, by name. All of them when absent. */\n\tonly?: string;\n}\n\nexport interface MigrationRun {\n\ttarget: MigrationTarget;\n\t/** The migrations this run applied, in order. */\n\tapplied: string[];\n}\n\nexport interface SeedOptions extends DatabasesOptions {\n\t/** The stage being seeded, handed to every seed. */\n\tstage: string;\n\t/**\n\t * What the stage's caches and topics resolve to — which drivers a seed is\n\t * run with, as the stage's own entry would register them.\n\t */\n\tbackends: SeedBackends;\n}\n\nexport interface SeedRun {\n\ttarget: MigrationTarget;\n\t/** The seeds this run ran, in order — every one, every time. */\n\tseeded: string[];\n}\n\n/** The seeds a run would run for one construct, read without connecting. */\nexport interface PlannedSeeds {\n\ttarget: MigrationTarget;\n\t/** In the order they would run. */\n\tseeds: string[];\n}\n\nexport interface PendingMigrations {\n\ttarget: MigrationTarget;\n\tpending: string[];\n}\n\n/** A folder under `db/` that names no construct. */\nexport class UnknownMigrationFolder extends GkmError {\n\tconstructor(\n\t\treadonly folder: string,\n\t\treadonly known: readonly string[],\n\t) {\n\t\tsuper(\n\t\t\t`${folder} names no database construct, so its migrations would never ` +\n\t\t\t\t`run. ${known.length > 0 ? `The folders that do: ${known.join(', ')}.` : 'This project declares no database.'} ` +\n\t\t\t\t`Rename the folder after the construct it belongs to.`,\n\t\t);\n\t\tthis.name = 'UnknownMigrationFolder';\n\t}\n}\n\n/** A construct was asked for by a name that takes no migrations. */\nexport class NoSuchMigrationTarget extends GkmError {\n\tconstructor(\n\t\treadonly construct: string,\n\t\treadonly known: readonly string[],\n\t) {\n\t\tsuper(\n\t\t\t`'${construct}' is not a database construct. ` +\n\t\t\t\t(known.length > 0\n\t\t\t\t\t? `The ones with migrations: ${known.join(', ')}.`\n\t\t\t\t\t: 'This project declares no database.'),\n\t\t);\n\t\tthis.name = 'NoSuchMigrationTarget';\n\t}\n}\n\n/**\n * A migration left directly in a construct's folder, where nothing reads it.\n *\n * Migrations moved into `migrations/` so seeds could sit beside them. A file\n * still at the old level would otherwise never run, and nothing would say so.\n */\nexport class MigrationsOutsideFolder extends GkmError {\n\tconstructor(\n\t\treadonly folder: string,\n\t\treadonly files: readonly string[],\n\t) {\n\t\tsuper(\n\t\t\t`${folder} has ${files.join(', ')} directly inside it, where nothing ` +\n\t\t\t\t`runs them. Migrations live in ${folder}/migrations/ and seeds in ` +\n\t\t\t\t`${folder}/seeds/ — move ${files.length === 1 ? 'it' : 'them'} there.`,\n\t\t);\n\t\tthis.name = 'MigrationsOutsideFolder';\n\t}\n}\n\n/** A folder inside a construct's folder that is neither `migrations` nor `seeds`. */\nexport class UnknownDatabaseFolder extends GkmError {\n\tconstructor(readonly folder: string) {\n\t\tsuper(\n\t\t\t`${folder} is neither migrations/ nor seeds/, so nothing in it would ` +\n\t\t\t\t`ever run. A construct's folder holds those two; rename or remove it.`,\n\t\t);\n\t\tthis.name = 'UnknownDatabaseFolder';\n\t}\n}\n\n/** A seed failed; its own writes are rolled back, the ones before it stay. */\nexport class SeedFailed extends Error {\n\tconstructor(\n\t\treadonly construct: string,\n\t\treadonly seed: string,\n\t\toverride readonly cause: unknown,\n\t) {\n\t\tsuper(\n\t\t\t`${construct}: seed '${seed}' failed — ` +\n\t\t\t\t`${cause instanceof Error ? cause.message : String(cause)}. ` +\n\t\t\t\t`Its writes were rolled back; fix it and run it again.`,\n\t\t);\n\t\tthis.name = 'SeedFailed';\n\t}\n}\n\n/** A construct with roles has no owner URL to migrate with. */\nexport class NoOwnerCredential extends GkmError {\n\tconstructor(\n\t\treadonly construct: string,\n\t\treadonly key: string,\n\t) {\n\t\tsuper(\n\t\t\t`${construct} has no ${key} to migrate with. Migrations run as the owner ` +\n\t\t\t\t`role — the runtime one cannot create a table — and nothing ` +\n\t\t\t\t`resolved its URL. Is the stage reconciled?`,\n\t\t);\n\t\tthis.name = 'NoOwnerCredential';\n\t}\n}\n\n/** A migration failed; the ones before it in the run stay applied. */\nexport class MigrationFailed extends Error {\n\tconstructor(\n\t\treadonly construct: string,\n\t\treadonly migration: string | undefined,\n\t\toverride readonly cause: unknown,\n\t) {\n\t\tsuper(\n\t\t\t`${construct}: migration ${migration ? `'${migration}' ` : ''}failed — ` +\n\t\t\t\t`${cause instanceof Error ? cause.message : String(cause)}`,\n\t\t);\n\t\tthis.name = 'MigrationFailed';\n\t}\n}\n\n/** The project's Kysely could not be found from where a database is declared. */\nexport class KyselyNotFound extends GkmError {\n\tconstructor(readonly from: string) {\n\t\tsuper(\n\t\t\t`Could not resolve 'kysely' from ${from}. Migrations run with the ` +\n\t\t\t\t`project's own Kysely — install it where the database is declared.`,\n\t\t);\n\t\tthis.name = 'KyselyNotFound';\n\t}\n}\n\n/** Apply every pending migration, construct by construct, parents first. */\nexport async function migrateDatabases(\n\toptions: DatabasesOptions,\n): Promise<MigrationRun[]> {\n\tconst runs: MigrationRun[] = [];\n\n\tfor (const target of await targetsFor(options)) {\n\t\t// No folder, or an empty one, is nothing to do — and no reason to\n\t\t// connect, which a construct nobody has written a migration for yet\n\t\t// should not need.\n\t\tconst files = await migrationFiles(join(options.root, target.migrations));\n\t\tif (files.size === 0) {\n\t\t\truns.push({ target, applied: [] });\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst applied = await withMigrator(options, target, async (migrator) => {\n\t\t\tconst { error, results = [] } = await migrator.migrateToLatest();\n\t\t\tif (error) {\n\t\t\t\tconst failed = results.find((result) => result.status === 'Error');\n\t\t\t\tthrow new MigrationFailed(target.id, failed?.migrationName, error);\n\t\t\t}\n\n\t\t\treturn results\n\t\t\t\t.filter((result) => result.status === 'Success')\n\t\t\t\t.map((result) => result.migrationName);\n\t\t});\n\n\t\truns.push({ target, applied });\n\t}\n\n\treturn runs;\n}\n\n/**\n * Run every construct's seeds, parents first — each one, every time, on every\n * stage, production included. Each is handed the stage, so a seed decides\n * what belongs where.\n *\n * Seeds are reference data kept up to date by being run again, so there is no\n * history: a seed is an upsert, and a changed one is applied by the next run.\n * Each runs in its own transaction, as the construct's owner, so a failure\n * leaves nothing half-written. Assumes the schema is migrated —\n * {@link migrateAndSeed} is what makes that true.\n *\n * A seed is handed the client the app gets — the construct's `clientConfig`,\n * plugins included — on the owner's connection. One written against\n * `Kysely<DB>` with a `CamelCasePlugin` writes `isEditable` here as it does in\n * a handler or a test.\n *\n * And with the drivers the stage's entry registers, and the stage's `env`, so\n * a seed reaching a bucket or a cache through its construct gets the client a\n * handler would.\n */\nexport async function seedDatabases(options: SeedOptions): Promise<SeedRun[]> {\n\tconst runs: SeedRun[] = [];\n\tlet registered = false;\n\n\tfor (const target of await targetsFor(options)) {\n\t\tconst folder = join(options.root, target.seeds);\n\t\tif ((await migrationFiles(folder)).size === 0) {\n\t\t\truns.push({ target, seeded: [] });\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!registered) {\n\t\t\tawait registerSeedDrivers(options);\n\t\t\tregistered = true;\n\t\t}\n\n\t\tconst config = clientConfigOf(options, target);\n\t\tconst seeded = await withOwner(\n\t\t\toptions,\n\t\t\ttarget,\n\t\t\tconfig,\n\t\t\tasync (db, kysely) => {\n\t\t\t\tconst names: string[] = [];\n\t\t\t\tfor (const seed of await loadSeeds(folder, kysely.sql)) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait db\n\t\t\t\t\t\t\t.transaction()\n\t\t\t\t\t\t\t.execute((trx) =>\n\t\t\t\t\t\t\t\tseed.run(trx, { stage: options.stage, env: options.env }),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tthrow new SeedFailed(target.id, seed.name, error);\n\t\t\t\t\t}\n\t\t\t\t\tnames.push(seed.name);\n\t\t\t\t}\n\t\t\t\treturn names;\n\t\t\t},\n\t\t);\n\n\t\truns.push({ target, seeded });\n\t}\n\n\treturn runs;\n}\n\n/**\n * The seeds {@link seedDatabases} would run, construct by construct, parents\n * first, in the order it would run them — read from the folders alone, with\n * no connection. What a dry run lists. Constructs with none are left out.\n */\nexport async function plannedSeeds(\n\toptions: Pick<DatabasesOptions, 'root' | 'manifest' | 'only'>,\n): Promise<PlannedSeeds[]> {\n\tconst planned: PlannedSeeds[] = [];\n\tfor (const target of await targetsFor(options)) {\n\t\tconst files = await migrationFiles(join(options.root, target.seeds));\n\t\tif (files.size === 0) continue;\n\t\tplanned.push({ target, seeds: [...files.keys()].sort() });\n\t}\n\treturn planned;\n}\n\n/**\n * Migrate, then seed: a seed only ever runs against the schema it was written\n * for.\n *\n * With `only`, the constructs it lives in are migrated too — a tenant's seed\n * cannot run before the database that owns its schema exists — and only it is\n * seeded.\n */\nexport async function migrateAndSeed(options: SeedOptions): Promise<{\n\tmigrations: MigrationRun[];\n\tseeds: SeedRun[];\n}> {\n\tconst migrations: MigrationRun[] = [];\n\tfor (const target of await withParents(options)) {\n\t\tmigrations.push(\n\t\t\t...(await migrateDatabases({ ...options, only: target.id })),\n\t\t);\n\t}\n\n\treturn { migrations, seeds: await seedDatabases(options) };\n}\n\n/** The targets `only` names, after the ones it lives in; all without it. */\nasync function withParents(\n\toptions: DatabasesOptions,\n): Promise<MigrationTarget[]> {\n\tconst chosen = await targetsFor(options);\n\tif (!options.only) return chosen;\n\n\tconst all = migrationTargets(options.manifest);\n\tconst ids = new Set<string>();\n\tfor (const target of chosen) {\n\t\tlet current: MigrationTarget | undefined = target;\n\t\twhile (current) {\n\t\t\tids.add(current.id);\n\t\t\tconst parent: string | undefined = current.of;\n\t\t\tcurrent = parent ? all.find((t) => t.id === parent) : undefined;\n\t\t}\n\t}\n\n\treturn all.filter((target) => ids.has(target.id));\n}\n\n/**\n * What each construct's folder has that its history does not — without\n * applying any of it. What `gkm dev` reports.\n */\nexport async function pendingMigrations(\n\toptions: DatabasesOptions,\n): Promise<PendingMigrations[]> {\n\tconst found: PendingMigrations[] = [];\n\n\tfor (const target of await targetsFor(options)) {\n\t\tconst files = await migrationFiles(join(options.root, target.migrations));\n\t\tif (files.size === 0) continue;\n\n\t\tconst pending = await withMigrator(options, target, async (migrator) =>\n\t\t\t(await migrator.getMigrations())\n\t\t\t\t.filter((migration) => migration.executedAt === undefined)\n\t\t\t\t.map((migration) => migration.name),\n\t\t);\n\n\t\tif (pending.length > 0) found.push({ target, pending });\n\t}\n\n\treturn found;\n}\n\n/**\n * The targets this run covers, with every folder under `db/` accounted for.\n *\n * A folder that names no construct is an error rather than something to skip:\n * a typo in its name is otherwise a migration that silently never runs.\n */\nasync function targetsFor(\n\toptions: Pick<DatabasesOptions, 'root' | 'manifest' | 'only'>,\n): Promise<MigrationTarget[]> {\n\tconst targets = migrationTargets(options.manifest);\n\tconst folders = targets.map((target) => target.folder);\n\n\tfor (const folder of await foldersIn(join(options.root, MIGRATIONS_ROOT))) {\n\t\tconst relative = `${MIGRATIONS_ROOT}/${folder}`;\n\t\tif (!folders.includes(relative)) {\n\t\t\tthrow new UnknownMigrationFolder(relative, folders);\n\t\t}\n\t\tawait checkLayout(options.root, relative);\n\t}\n\n\tif (!options.only) return targets;\n\n\tconst id = canonicalId(options.only);\n\tconst chosen = targets.filter((target) => target.id === id);\n\tif (chosen.length === 0) {\n\t\tthrow new NoSuchMigrationTarget(\n\t\t\toptions.only,\n\t\t\ttargets.map((target) => target.id),\n\t\t);\n\t}\n\n\treturn chosen;\n}\n\n/**\n * A construct's folder holds `migrations/` and `seeds/`, and nothing else —\n * anything beside them is a file or folder nothing would ever run.\n */\nasync function checkLayout(root: string, folder: string): Promise<void> {\n\tconst entries = await readdir(join(root, folder), { withFileTypes: true });\n\n\tconst loose = entries\n\t\t.filter((entry) => entry.isFile() && !entry.name.startsWith('.'))\n\t\t.map((entry) => entry.name);\n\tif (loose.length > 0) throw new MigrationsOutsideFolder(folder, loose);\n\n\tfor (const entry of entries) {\n\t\tif (\n\t\t\tentry.isDirectory() &&\n\t\t\t!(DATABASE_FOLDERS as readonly string[]).includes(entry.name)\n\t\t) {\n\t\t\tthrow new UnknownDatabaseFolder(`${folder}/${entry.name}`);\n\t\t}\n\t}\n}\n\nasync function foldersIn(dir: string): Promise<string[]> {\n\tconst entries = await readdir(dir, { withFileTypes: true }).catch(\n\t\t(error: NodeJS.ErrnoException) => {\n\t\t\tif (error.code === 'ENOENT') return [];\n\t\t\tthrow error;\n\t\t},\n\t);\n\n\treturn entries\n\t\t.filter((entry) => entry.isDirectory())\n\t\t.map((entry) => entry.name);\n}\n\n/**\n * A migrator for one target, connected as its owner.\n *\n * No `migrationTableSchema`: the owner role's `search_path` is pinned to the\n * construct's schema, so the history lands there — `app.kysely_migration` for\n * the database, `auth_database.kysely_migration` for its tenant — and two\n * constructs in one Postgres never share one.\n *\n * Unordered migrations are allowed. Files are timestamped, so a branch merged\n * after another's migration ran carries an older one; refusing it would make\n * every such merge a manual repair.\n *\n * The client is bare — none of the construct's plugins. A casing plugin\n * rewrites identifiers in schema-builder DDL too, and a migration must do the\n * same thing forever after it has run, so it cannot depend on configuration\n * that may change.\n */\nasync function withMigrator<T>(\n\toptions: DatabasesOptions,\n\ttarget: MigrationTarget,\n\trun: (migrator: Migrator) => Promise<T>,\n): Promise<T> {\n\treturn withOwner(options, target, {}, (db, { Migrator, sql }) =>\n\t\trun(\n\t\t\tnew Migrator({\n\t\t\t\tdb,\n\t\t\t\tprovider: folderProvider(join(options.root, target.migrations), sql),\n\t\t\t\tallowUnorderedMigrations: true,\n\t\t\t}),\n\t\t),\n\t);\n}\n\n/**\n * One target's database, connected as its owner and closed afterwards — what\n * migrations and seeds both run as, each with the client config it needs.\n */\nasync function withOwner<T>(\n\toptions: DatabasesOptions,\n\ttarget: MigrationTarget,\n\tconfig: Omit<KyselyConfig, 'dialect'>,\n\trun: (\n\t\tdb: Kysely<unknown>,\n\t\tkysely: Awaited<ReturnType<typeof kyselyFrom>>,\n\t) => Promise<T>,\n): Promise<T> {\n\tconst from =\n\t\toptions.sources?.[target.id]?.file ??\n\t\t(target.of ? options.sources?.[target.of]?.file : undefined) ??\n\t\tjoin(options.root, 'package.json');\n\tconst kysely = await kyselyFrom(from);\n\n\tconst db: Kysely<unknown> = new kysely.Kysely<unknown>({\n\t\t...config,\n\t\tdialect: new kysely.PostgresDialect({\n\t\t\tpool: new pg.Pool(poolConfig(ownerUrl(options, target))),\n\t\t}),\n\t});\n\n\ttry {\n\t\treturn await run(db, kysely);\n\t} finally {\n\t\tawait db.destroy();\n\t}\n}\n\n/**\n * What the construct builds its clients with besides a dialect — its plugins\n * and logging — read from the construct discovery already imported.\n *\n * A tenant's is its own: `database.schema('Auth', { plugins })` declares the\n * client for its tables, not the parent's. With no construct to ask (a\n * manifest without sources), the client is bare.\n */\nfunction clientConfigOf(\n\toptions: DatabasesOptions,\n\ttarget: MigrationTarget,\n): Omit<KyselyConfig, 'dialect'> {\n\tconst construct = options.sources?.[target.id]?.construct;\n\tif (typeof construct !== 'object' || construct === null) return {};\n\tif (!('clientConfig' in construct)) return {};\n\treturn (construct.clientConfig as Omit<KyselyConfig, 'dialect'>) ?? {};\n}\n\n/**\n * The owner's URL, with no fallback to the runtime one.\n *\n * The runtime role can create nothing, so falling back would only move the\n * failure to the first `CREATE TABLE` and make it read like a permissions\n * bug. The one exception is a database declared `roles: false`, where there is\n * no owner — both URLs are the master credential by design.\n */\nfunction ownerUrl(options: DatabasesOptions, target: MigrationTarget): string {\n\tconst key = providedKeyFor(target.id, 'database', 'ownerUrl');\n\tconst owner = options.env[key];\n\tif (owner) return owner;\n\n\tconst database = options.manifest[target.of ?? target.id];\n\tif (database?.kind === 'database' && database.roles === false) {\n\t\tconst url = options.env[providedKeyFor(target.id, 'database', 'url')];\n\t\tif (url) return url;\n\t}\n\n\tthrow new NoOwnerCredential(target.id, key);\n}\n\n/**\n * Pool settings for a URL, with `?search_path=` as the startup option Postgres\n * reads. Only a `roles: false` URL carries it — a role pins its own.\n */\nfunction poolConfig(url: string): pg.PoolConfig {\n\tconst parsed = new URL(url);\n\tconst searchPath = parsed.searchParams.get('search_path');\n\tif (!searchPath) return { connectionString: url };\n\n\tparsed.searchParams.delete('search_path');\n\treturn {\n\t\tconnectionString: parsed.toString(),\n\t\toptions: `-c search_path=${searchPath}`,\n\t};\n}\n\n/** Kysely as the project resolves it from `from`. */\nasync function kyselyFrom(from: string) {\n\tconst require = createRequire(from);\n\n\ttry {\n\t\tconst [main, migration] = await Promise.all([\n\t\t\timport(pathToFileURL(require.resolve('kysely')).href),\n\t\t\timport(pathToFileURL(require.resolve('kysely/migration')).href),\n\t\t]);\n\n\t\treturn {\n\t\t\tKysely: main.Kysely as typeof import('kysely').Kysely,\n\t\t\tPostgresDialect:\n\t\t\t\tmain.PostgresDialect as typeof import('kysely').PostgresDialect,\n\t\t\tsql: main.sql as typeof import('kysely').sql,\n\t\t\tMigrator:\n\t\t\t\tmigration.Migrator as typeof import('kysely/migration').Migrator,\n\t\t};\n\t} catch {\n\t\tthrow new KyselyNotFound(from);\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAmBA,MAAM,0BAAU,IAAI,IAAI;CAAC;CAAO;CAAQ;CAAO;AAAM,CAAC;;AAGtD,IAAa,qBAAb,cAAwC,SAAS;CAEtC;CACA;CAFV,YACC,QACA,WACC;EACD,MACC,GAAG,OAAO,6BAA6B,UAAU,kJAGlD;EAPS,KAAA,SAAA;EACA,KAAA,YAAA;EAOT,KAAK,OAAO;CACb;AACD;;AAGA,IAAa,mBAAb,cAAsC,SAAS;CACzB;CAArB,YAAY,MAAuB;EAClC,MACC,GAAG,KAAK,2KAGT;EALoB,KAAA,OAAA;EAMpB,KAAK,OAAO;CACb;AACD;;AAGA,IAAa,gBAAb,cAAmC,SAAS;CACtB;CAArB,YAAY,MAAuB;EAClC,MACC,GAAG,KAAK,+JAGT;EALoB,KAAA,OAAA;EAMpB,KAAK,OAAO;CACb;AACD;;;;;;;AAqBA,eAAsB,eACrB,QAC+B;CAC/B,MAAM,UAAU,MAAM,QAAQ,QAAQ,EAAE,eAAe,KAAK,CAAC,CAAC,CAAC,OAC7D,UAAiC;EACjC,IAAI,MAAM,SAAS,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AkB,YAAY,OAAO,CAAC;CAC5C,OAAQ,UAAU,gBAAkD,CAAC;AACtE;;;;;;;;;AAUA,SAAS,SAAS,SAA2B,QAAiC;CAC7E,MAAM,MAAM,eAAe,OAAO,IAAI,YAAY,UAAU;CAC5D,MAAM,QAAQ,QAAQ,IAAI;CAC1B,IAAI,OAAO,OAAO;CAElB,MAAM,WAAW,QAAQ,SAAS,OAAO,MAAM,OAAO;CACtD,IAAI,UAAU,SAAS,cAAc,SAAS,UAAU,OAAO;EAC9D,MAAM,MAAM,QAAQ,IAAI,eAAe,OAAO,IAAI,YAAY,KAAK;EACnE,IAAI,KAAK,OAAO;CACjB;CAEA,MAAM,IAAI,kBAAkB,OAAO,IAAI,GAAG;AAC3C;;;;;AAMA,SAAS,WAAW,KAA4B;CAC/C,MAAM,SAAS,IAAI,IAAI,GAAG;CAC1B,MAAM,aAAa,OAAO,aAAa,IAAI,aAAa;CACxD,IAAI,CAAC,YAAY,OAAO,EAAE,kBAAkB,IAAI;CAEhD,OAAO,aAAa,OAAO,aAAa;CACxC,OAAO;EACN,kBAAkB,OAAO,SAAS;EAClC,SAAS,kBAAkB;CAC5B;AACD;;AAGA,eAAe,WAAW,MAAc;CACvC,MAAM,UAAU,cAAc,IAAI;CAElC,IAAI;EACH,MAAM,CAAC,MAAM,aAAa,MAAM,QAAQ,IAAI,CAC3C,OAAO,cAAc,QAAQ,QAAQ,QAAQ,CAAC,CAAC,CAAC,OAChD,OAAO,cAAc,QAAQ,QAAQ,kBAAkB,CAAC,CAAC,CAAC,KAC3D,CAAC;EAED,OAAO;GACN,QAAQ,KAAK;GACb,iBACC,KAAK;GACN,KAAK,KAAK;GACV,UACC,UAAU;EACZ;CACD,QAAQ;EACP,MAAM,IAAI,eAAe,IAAI;CAC9B;AACD"}
@@ -1,21 +1,21 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_errors = require("../errors-DMC4Umsb.cjs");
3
- const require_credentials = require("../credentials-CORvhcrO.cjs");
4
- const require_workspace = require("../workspace-Ciw3SnME.cjs");
5
- const require_apps = require("../apps-C6s-trVp.cjs");
3
+ const require_credentials = require("../credentials-CCCAy3NL.cjs");
4
+ const require_workspace = require("../workspace-p7gmCQVS.cjs");
5
+ const require_apps = require("../apps-By6pnfzA.cjs");
6
6
  const require_define = require("../define-crmMcXFS.cjs");
7
- const require_discover = require("../discover-CRywE7yc.cjs");
7
+ const require_discover = require("../discover-39VKSE2i.cjs");
8
8
  const require_config = require("../config.cjs");
9
- const require_resolve = require("../resolve-BhQd4IkT.cjs");
10
- const require_notes = require("../notes-DRdlsCYV.cjs");
11
- const require_local = require("../local-BxjA0EXj.cjs");
12
- const require_sniffer = require("../sniffer-9a8wQeeD.cjs");
13
- const require_deploy = require("../deploy-BwJ7uWXd.cjs");
9
+ const require_resolve = require("../resolve-BrJUFIUu.cjs");
10
+ const require_notes = require("../notes-rTfi6rfN.cjs");
11
+ const require_local = require("../local-BIrl0ENw.cjs");
12
+ const require_sniffer = require("../sniffer-C5F7uYQB.cjs");
13
+ const require_deploy = require("../deploy-Dy5jyciI.cjs");
14
14
  const require_seeds = require("../seeds-Bc3niNVb.cjs");
15
- const require_engine = require("../engine-DewbDHOq.cjs");
16
- const require_rollback = require("../rollback-Brc-_HBJ.cjs");
15
+ const require_engine = require("../engine-Cg92m1Xf.cjs");
16
+ const require_rollback = require("../rollback-D48bPMpD.cjs");
17
17
  const require_provider = require("../provider-BqpjG9QM.cjs");
18
- const require_sst = require("../sst-CJQI9GYW.cjs");
18
+ const require_sst = require("../sst-B_srWo15.cjs");
19
19
  let node_path = require("node:path");
20
20
  let node_fs = require("node:fs");
21
21
  //#region src/sandbox/install.ts
@@ -1 +1 @@
1
- {"version":3,"file":"public.d.cts","names":[],"sources":["../../src/home.ts","../../src/providers/config.ts","../../src/deploy/devServices.ts","../../src/providers/notes.ts","../../src/providers/s3/errors.ts","../../src/run.ts","../../src/sandbox/env.ts","../../src/docker/templates.ts","../../src/sandbox/install.ts","../../src/sandbox/local.ts","../../src/sandbox/worker.ts","../../src/target/dokploy/dokploy-api.ts","../../src/target/dokploy/engine.ts","../../src/target/dokploy/health.ts","../../src/target/dokploy/migrations.ts","../../src/target/dokploy/rollback.ts","../../src/target/seeds.ts","../../src/target/sst/health.ts","../../src/target/sst/outputs.ts","../../src/target/sst/index.ts","../../src/deploy/deploy.ts","../../src/deploy/orchestrate.ts","../../src/deploy/ownership.ts","../../src/deploy/registry.ts"],"mappings":";;;;;;;;;;;;;;;;;;qBAaa;;wBAGG,QAAQ,MAAK,OAAO;;;;qBCqDvB,6BAA6B;WAE/B,MAAM;WACN;WACA;EAHV,YACU,MAAM,cACN,eACA;;;;;;;;;qBC3BE;KAED,qBAAqB;;qBAcpB,oCAAoC;WAC3B;EAArB,YAAqB;;;;;;;qBAeT,qCAAqC;WAC5B;EAArB,YAAqB;;;UAiCL;EAChB;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,UAAU;;EAEV;;EAEA;;;;;;qBAOY,sCAAsC;WAExC;WACA,kBAAkB;EAF5B,YACU,eACA,kBAAkB;;;;;qBCnHhB,8BAA8B;WAEhC,MAAM;WACN;WACA;EAHV,YACU,MAAM,cACN,eACA;;;;;qBCyHE,qCAAqC;WAEvC;WACA;WACA;WACA;EAJV,YACU,YACA,gBACA,eACA;;;;;qBCjHE,sBAAsB;WAExB;WACA;WACA;WACA,QAAQ,OAAO;EAJzB,YACU,iBACA,yBACA,yBACA,QAAQ,OAAO;;;qBAUb,wBAAwB;WAE1B;WACA;WACA;EAHV,YACU,iBACA,yBACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBC3BE,0CAA0C;;;;;wBAyDvC,eACf,SAAQ,OAAO,YACf,4BACE;;;KCjFS;;;;qBCUC;UAEI;;EAEhB;;EAEA,iBAAiB;;;;;;;EAOjB;;;;;EAKA;;EAEA,MAAM,SAAS;;EAEf;;EAEA,SAAS;EACT,SAAS;;;qBAIG,oCAAoC;WAC3B;EAArB,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mBAEA;;EAAA,cACS;;;;;qBCKP,0BAA0B;WAE5B;;WAEA;IACR;IACA;IACA;IACA;;EAPF,YACU,eAEA;;EAAA;IACR;IACA;IACA;IACA;;;;;;qBCZU,6BAA6B;WAE/B;WACA;EAFV,YACU,cACA;;;;;qBC4BE,0BAA0B;WACjB;EAArB,YAAqB;;;;;;;;UCjBL;EAChB,KAAK;EACL,KAAK;EACL,OAAO;;UAGS;;;;;EAKhB;;;;;;;;;;EAUA,SAAS,YAAY;;;;;EAKrB;;;;;EAKA;;;;;;EAMA,UAAU,eAAe;;EAEzB;;EAEA;;;;;;EAMA;;;;;;EAMA;;;;;;EAMA;;;;;;EAMA,cAAc;;;;;;;;;;EAUd;;;;;;EAMA;;EAEA;;EAEA;;EAEA,SAAS;;;;;;EAMT,SAAS;;;;;EAKT;;;;;EAKA;;;;;;;;;;;;EAYA,UAAU;;;UAIM,kBAAkB,cAAc;;;;;;WAMvC,QAAQ,QAAQ;;;;;;;;;;;;;;;;;;wBAqEV,OAAO,OAAO,cAAc;;;;qBC9H/B,0BAA0B;WAE5B;WACA;EAFV,YACU,yBACA;;;qBAWE,yBAAyB;WAE3B;WACA;EAFV,YACU,eACA;;;qBAUE,4BAA4B;WACnB;EAArB,YAAqB;;;qBAST,uBAAuB;WAEzB;;WAEA;EAHV,YACU,gBAEA;;EAAA,kBACT;;;;;;;;qBCrHW,wBAAwB;WAE1B;WACA;WACA;;WAEA;EALV,YACU,qBACA,mBACA,kBAEA;;EAAA;;;;;qBChBE,8BAA8B;WACrB;EAArB,YAAqB;;;qBAUT,yBAAyB;WAChB;EAArB,YAAqB;;;qBAUT,0BAA0B;WAE5B;WACA;EAFV,YACU,kBACA"}
1
+ {"version":3,"file":"public.d.cts","names":[],"sources":["../../src/home.ts","../../src/providers/config.ts","../../src/deploy/devServices.ts","../../src/providers/notes.ts","../../src/providers/s3/errors.ts","../../src/run.ts","../../src/sandbox/env.ts","../../src/docker/templates.ts","../../src/sandbox/install.ts","../../src/sandbox/local.ts","../../src/sandbox/worker.ts","../../src/target/dokploy/dokploy-api.ts","../../src/target/dokploy/engine.ts","../../src/target/dokploy/health.ts","../../src/target/dokploy/migrations.ts","../../src/target/dokploy/rollback.ts","../../src/target/seeds.ts","../../src/target/sst/health.ts","../../src/target/sst/outputs.ts","../../src/target/sst/index.ts","../../src/deploy/deploy.ts","../../src/deploy/orchestrate.ts","../../src/deploy/ownership.ts","../../src/deploy/registry.ts"],"mappings":";;;;;;;;;;;;;;;;;;qBAaa;;wBAGG,QAAQ,MAAK,OAAO;;;;qBCqDvB,6BAA6B;WAE/B,MAAM;WACN;WACA;EAHV,YACU,MAAM,cACN,eACA;;;;;;;;;qBC5BE;KAED,qBAAqB;;qBAcpB,oCAAoC;WAC3B;EAArB,YAAqB;;;;;;;qBAeT,qCAAqC;WAC5B;EAArB,YAAqB;;;UAiCL;EAChB;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,UAAU;;EAEV;;EAEA;;;;;;qBAOY,sCAAsC;WAExC;WACA,kBAAkB;EAF5B,YACU,eACA,kBAAkB;;;;;qBClHhB,8BAA8B;WAEhC,MAAM;WACN;WACA;EAHV,YACU,MAAM,cACN,eACA;;;;;qBCyHE,qCAAqC;WAEvC;WACA;WACA;WACA;EAJV,YACU,YACA,gBACA,eACA;;;;;qBCjHE,sBAAsB;WAExB;WACA;WACA;WACA,QAAQ,OAAO;EAJzB,YACU,iBACA,yBACA,yBACA,QAAQ,OAAO;;;qBAUb,wBAAwB;WAE1B;WACA;WACA;EAHV,YACU,iBACA,yBACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBC3BE,0CAA0C;;;;;wBAyDvC,eACf,SAAQ,OAAO,YACf,4BACE;;;KCjFS;;;;qBCUC;UAEI;;EAEhB;;EAEA,iBAAiB;;;;;;;EAOjB;;;;;EAKA;;EAEA,MAAM,SAAS;;EAEf;;EAEA,SAAS;EACT,SAAS;;;qBAIG,oCAAoC;WAC3B;EAArB,YAAqB;;;qBAW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cACS;;;;;qBCKP,0BAA0B;WAE5B;;WAEA;IACR;IACA;IACA;IACA;;EAPF,YACU,eAEA;;EAAA;IACR;IACA;IACA;IACA;;;;;;qBCZU,6BAA6B;WAE/B;WACA;EAFV,YACU,cACA;;;;;qBC4BE,0BAA0B;WACjB;EAArB,YAAqB;;;;;;;;UCjBL;EAChB,KAAK;EACL,KAAK;EACL,OAAO;;UAGS;;;;;EAKhB;;;;;;;;;;EAUA,SAAS,YAAY;;;;;EAKrB;;;;;EAKA;;;;;;EAMA,UAAU,eAAe;;EAEzB;;EAEA;;;;;;EAMA;;;;;;EAMA;;;;;;EAMA;;;;;;EAMA,cAAc;;;;;;;;;;EAUd;;;;;;EAMA;;EAEA;;EAEA;;EAEA,SAAS;;;;;;EAMT,SAAS;;;;;EAKT;;;;;EAKA;;;;;;;;;;;;EAYA,UAAU;;;UAIM,kBAAkB,cAAc;;;;;;WAMvC,QAAQ,QAAQ;;;;;;;;;;;;;;;;;;wBAqEV,OAAO,OAAO,cAAc;;;;qBC9H/B,0BAA0B;WAE5B;WACA;EAFV,YACU,yBACA;;;qBAWE,yBAAyB;WAE3B;WACA;EAFV,YACU,eACA;;;qBAUE,4BAA4B;WACnB;EAArB,YAAqB;;;qBAST,uBAAuB;WAEzB;;WAEA;EAHV,YACU,gBAEA;;EAAA,kBACT;;;;;;;;qBCrHW,wBAAwB;WAE1B;WACA;WACA;;WAEA;EALV,YACU,qBACA,mBACA,kBAEA;;EAAA;;;;;qBChBE,8BAA8B;WACrB;EAArB,YAAqB;;;qBAUT,yBAAyB;WAChB;EAArB,YAAqB;;;qBAUT,0BAA0B;WAE5B;WACA;EAFV,YACU,kBACA"}
@@ -1 +1 @@
1
- {"version":3,"file":"public.d.mts","names":[],"sources":["../../src/home.ts","../../src/providers/config.ts","../../src/deploy/devServices.ts","../../src/providers/notes.ts","../../src/providers/s3/errors.ts","../../src/run.ts","../../src/sandbox/env.ts","../../src/docker/templates.ts","../../src/sandbox/install.ts","../../src/sandbox/local.ts","../../src/sandbox/worker.ts","../../src/target/dokploy/dokploy-api.ts","../../src/target/dokploy/engine.ts","../../src/target/dokploy/health.ts","../../src/target/dokploy/migrations.ts","../../src/target/dokploy/rollback.ts","../../src/target/seeds.ts","../../src/target/sst/health.ts","../../src/target/sst/outputs.ts","../../src/target/sst/index.ts","../../src/deploy/deploy.ts","../../src/deploy/orchestrate.ts","../../src/deploy/ownership.ts","../../src/deploy/registry.ts"],"mappings":";;;;;;;;;;;;;;;;;;qBAaa;;wBAGG,QAAQ,MAAK,OAAO;;;;qBCqDvB,6BAA6B;WAE/B,MAAM;WACN;WACA;EAHV,YACU,MAAM,cACN,eACA;;;;;;;;;qBC3BE;KAED,qBAAqB;;qBAcpB,oCAAoC;WAC3B;EAArB,YAAqB;;;;;;;qBAeT,qCAAqC;WAC5B;EAArB,YAAqB;;;UAiCL;EAChB;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,UAAU;;EAEV;;EAEA;;;;;;qBAOY,sCAAsC;WAExC;WACA,kBAAkB;EAF5B,YACU,eACA,kBAAkB;;;;;qBCnHhB,8BAA8B;WAEhC,MAAM;WACN;WACA;EAHV,YACU,MAAM,cACN,eACA;;;;;qBCyHE,qCAAqC;WAEvC;WACA;WACA;WACA;EAJV,YACU,YACA,gBACA,eACA;;;;;qBCjHE,sBAAsB;WAExB;WACA;WACA;WACA,QAAQ,OAAO;EAJzB,YACU,iBACA,yBACA,yBACA,QAAQ,OAAO;;;qBAUb,wBAAwB;WAE1B;WACA;WACA;EAHV,YACU,iBACA,yBACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBC3BE,0CAA0C;;;;;wBAyDvC,eACf,SAAQ,OAAO,YACf,4BACE;;;KCjFS;;;;qBCUC;UAEI;;EAEhB;;EAEA,iBAAiB;;;;;;;EAOjB;;;;;EAKA;;EAEA,MAAM,SAAS;;EAEf;;EAEA,SAAS;EACT,SAAS;;;qBAIG,oCAAoC;WAC3B;EAArB,YAAqB;;;qBAW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cACS;;;;;qBCKP,0BAA0B;WAE5B;;WAEA;IACR;IACA;IACA;IACA;;EAPF,YACU,eAEA;;EAAA;IACR;IACA;IACA;IACA;;;;;;qBCZU,6BAA6B;WAE/B;WACA;EAFV,YACU,cACA;;;;;qBC4BE,0BAA0B;WACjB;EAArB,YAAqB;;;;;;;;UCjBL;EAChB,KAAK;EACL,KAAK;EACL,OAAO;;UAGS;;;;;EAKhB;;;;;;;;;;EAUA,SAAS,YAAY;;;;;EAKrB;;;;;EAKA;;;;;;EAMA,UAAU,eAAe;;EAEzB;;EAEA;;;;;;EAMA;;;;;;EAMA;;;;;;EAMA;;;;;;EAMA,cAAc;;;;;;;;;;EAUd;;;;;;EAMA;;EAEA;;EAEA;;EAEA,SAAS;;;;;;EAMT,SAAS;;;;;EAKT;;;;;EAKA;;;;;;;;;;;;EAYA,UAAU;;;UAIM,kBAAkB,cAAc;;;;;;WAMvC,QAAQ,QAAQ;;;;;;;;;;;;;;;;;;wBAqEV,OAAO,OAAO,cAAc;;;;qBC9H/B,0BAA0B;WAE5B;WACA;EAFV,YACU,yBACA;;;qBAWE,yBAAyB;WAE3B;WACA;EAFV,YACU,eACA;;;qBAUE,4BAA4B;WACnB;EAArB,YAAqB;;;qBAST,uBAAuB;WAEzB;;WAEA;EAHV,YACU,gBAEA;;EAAA,kBACT;;;;;;;;qBCrHW,wBAAwB;WAE1B;WACA;WACA;;WAEA;EALV,YACU,qBACA,mBACA,kBAEA;;EAAA;;;;;qBChBE,8BAA8B;WACrB;EAArB,YAAqB;;;qBAUT,yBAAyB;WAChB;EAArB,YAAqB;;;qBAUT,0BAA0B;WAE5B;WACA;EAFV,YACU,kBACA"}
1
+ {"version":3,"file":"public.d.mts","names":[],"sources":["../../src/home.ts","../../src/providers/config.ts","../../src/deploy/devServices.ts","../../src/providers/notes.ts","../../src/providers/s3/errors.ts","../../src/run.ts","../../src/sandbox/env.ts","../../src/docker/templates.ts","../../src/sandbox/install.ts","../../src/sandbox/local.ts","../../src/sandbox/worker.ts","../../src/target/dokploy/dokploy-api.ts","../../src/target/dokploy/engine.ts","../../src/target/dokploy/health.ts","../../src/target/dokploy/migrations.ts","../../src/target/dokploy/rollback.ts","../../src/target/seeds.ts","../../src/target/sst/health.ts","../../src/target/sst/outputs.ts","../../src/target/sst/index.ts","../../src/deploy/deploy.ts","../../src/deploy/orchestrate.ts","../../src/deploy/ownership.ts","../../src/deploy/registry.ts"],"mappings":";;;;;;;;;;;;;;;;;;qBAaa;;wBAGG,QAAQ,MAAK,OAAO;;;;qBCqDvB,6BAA6B;WAE/B,MAAM;WACN;WACA;EAHV,YACU,MAAM,cACN,eACA;;;;;;;;;qBC5BE;KAED,qBAAqB;;qBAcpB,oCAAoC;WAC3B;EAArB,YAAqB;;;;;;;qBAeT,qCAAqC;WAC5B;EAArB,YAAqB;;;UAiCL;EAChB;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,UAAU;;EAEV;;EAEA;;;;;;qBAOY,sCAAsC;WAExC;WACA,kBAAkB;EAF5B,YACU,eACA,kBAAkB;;;;;qBClHhB,8BAA8B;WAEhC,MAAM;WACN;WACA;EAHV,YACU,MAAM,cACN,eACA;;;;;qBCyHE,qCAAqC;WAEvC;WACA;WACA;WACA;EAJV,YACU,YACA,gBACA,eACA;;;;;qBCjHE,sBAAsB;WAExB;WACA;WACA;WACA,QAAQ,OAAO;EAJzB,YACU,iBACA,yBACA,yBACA,QAAQ,OAAO;;;qBAUb,wBAAwB;WAE1B;WACA;WACA;EAHV,YACU,iBACA,yBACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBC3BE,0CAA0C;;;;;wBAyDvC,eACf,SAAQ,OAAO,YACf,4BACE;;;KCjFS;;;;qBCUC;UAEI;;EAEhB;;EAEA,iBAAiB;;;;;;;EAOjB;;;;;EAKA;;EAEA,MAAM,SAAS;;EAEf;;EAEA,SAAS;EACT,SAAS;;;qBAIG,oCAAoC;WAC3B;EAArB,YAAqB;;;qBAWT,2CAA2C;WAE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P,0BAA0B;WAE5B;;WAEA;IACR;IACA;IACA;IACA;;EAPF,YACU,eAEA;;EAAA;IACR;IACA;IACA;IACA;;;;;;qBCZU,6BAA6B;WAE/B;WACA;EAFV,YACU,cACA;;;;;qBC4BE,0BAA0B;WACjB;EAArB,YAAqB;;;;;;;;UCjBL;EAChB,KAAK;EACL,KAAK;EACL,OAAO;;UAGS;;;;;EAKhB;;;;;;;;;;EAUA,SAAS,YAAY;;;;;EAKrB;;;;;EAKA;;;;;;EAMA,UAAU,eAAe;;EAEzB;;EAEA;;;;;;EAMA;;;;;;EAMA;;;;;;EAMA;;;;;;EAMA,cAAc;;;;;;;;;;EAUd;;;;;;EAMA;;EAEA;;EAEA;;EAEA,SAAS;;;;;;EAMT,SAAS;;;;;EAKT;;;;;EAKA;;;;;;;;;;;;EAYA,UAAU;;;UAIM,kBAAkB,cAAc;;;;;;WAMvC,QAAQ,QAAQ;;;;;;;;;;;;;;;;;;wBAqEV,OAAO,OAAO,cAAc;;;;qBC9H/B,0BAA0B;WAE5B;WACA;EAFV,YACU,yBACA;;;qBAWE,yBAAyB;WAE3B;WACA;EAFV,YACU,eACA;;;qBAUE,4BAA4B;WACnB;EAArB,YAAqB;;;qBAST,uBAAuB;WAEzB;;WAEA;EAHV,YACU,gBAEA;;EAAA,kBACT;;;;;;;;qBCrHW,wBAAwB;WAE1B;WACA;WACA;;WAEA;EALV,YACU,qBACA,mBACA,kBAEA;;EAAA;;;;;qBChBE,8BAA8B;WACrB;EAArB,YAAqB;;;qBAUT,yBAAyB;WAChB;EAArB,YAAqB;;;qBAUT,0BAA0B;WAE5B;WACA;EAFV,YACU,kBACA"}
@@ -1,20 +1,20 @@
1
1
  import { t as GkmError } from "../errors-D8Gwp5kU.mjs";
2
- import { X as deployIdentity, bt as gkmHome, it as CommandTimedOut, n as chainCredentials, r as storedCredentials, rt as CommandFailed, t as MissingCredential, yt as GKM_HOME_ENV } from "../credentials-D4DUPPPP.mjs";
3
- import { V as UnknownStageProvider, xt as ProvisionedBucketUnreachable } from "../workspace-9q4TSHlM.mjs";
4
- import { V as detectPackageManager } from "../apps-w2sRQKCr.mjs";
2
+ import { X as deployIdentity, bt as gkmHome, it as CommandTimedOut, n as chainCredentials, r as storedCredentials, rt as CommandFailed, t as MissingCredential, yt as GKM_HOME_ENV } from "../credentials-CeCOEKP3.mjs";
3
+ import { V as UnknownStageProvider, xt as ProvisionedBucketUnreachable } from "../workspace-Gubg8xLJ.mjs";
4
+ import { V as detectPackageManager } from "../apps-CWGmV2nQ.mjs";
5
5
  import { a as UnknownDeployTarget, i as DeployTargetNotYetSupported } from "../define-6poNqm5O.mjs";
6
- import { d as SECRETS_DIR_ENV, f as SandboxCwdEscape, g as confineCwd, n as ConstructsNotSerializable, p as SecretNameInvalid, s as SandboxWorkerFailed, t as ConstructDiscoveryFailed } from "../discover-DbDrCQ8h.mjs";
6
+ import { d as SECRETS_DIR_ENV, f as SandboxCwdEscape, g as confineCwd, n as ConstructsNotSerializable, p as SecretNameInvalid, s as SandboxWorkerFailed, t as ConstructDiscoveryFailed } from "../discover-B_PDDaVj.mjs";
7
7
  import { ConfigLoadFailed, ConfigObjectNotSerializable } from "../config.mjs";
8
- import { i as TargetRuntimeMismatch, l as TargetPackageNotFound, n as TargetEntryInvalid, r as TargetPackageInvalid, s as TargetRuntimeUndeclared, t as InvalidTargetOptions } from "../resolve-CdDyPOE8.mjs";
9
- import { c as DevServicesNeedServerTarget, l as ExternalServicesNotConfigured, o as AllowDevServicesTakesNoValue, s as DEV_SERVICES, t as StageProviderDisabled } from "../notes-9bOfe08J.mjs";
10
- import { n as SANDBOX_ENV_ALLOWLIST, r as allowlistedEnv, t as LocalSandbox } from "../local-CwR2DW6i.mjs";
11
- import { a as DeploymentTimedOut, f as StateLocked, g as StateVersionConflict, i as DeploymentFailed, u as LocalStateInCi } from "../sniffer-BObBXR5q.mjs";
12
- import { a as UnknownDeployApps, i as TargetBuildsNothing, n as NoDeployableApps, r as RollbackFailed, t as deploy } from "../deploy-DDfnQm8l.mjs";
8
+ import { i as TargetRuntimeMismatch, l as TargetPackageNotFound, n as TargetEntryInvalid, r as TargetPackageInvalid, s as TargetRuntimeUndeclared, t as InvalidTargetOptions } from "../resolve-B9tboVm2.mjs";
9
+ import { c as DevServicesNeedServerTarget, l as ExternalServicesNotConfigured, o as AllowDevServicesTakesNoValue, s as DEV_SERVICES, t as StageProviderDisabled } from "../notes-or_kXTal.mjs";
10
+ import { n as SANDBOX_ENV_ALLOWLIST, r as allowlistedEnv, t as LocalSandbox } from "../local-Cin6exc0.mjs";
11
+ import { a as DeploymentTimedOut, f as StateLocked, g as StateVersionConflict, i as DeploymentFailed, u as LocalStateInCi } from "../sniffer-yeftYpWK.mjs";
12
+ import { a as UnknownDeployApps, i as TargetBuildsNothing, n as NoDeployableApps, r as RollbackFailed, t as deploy } from "../deploy-F6GA-u59.mjs";
13
13
  import { t as DeploySeedsFailed } from "../seeds-Ccn0Ru2T.mjs";
14
- import { _ as RegistryNotConfigured, g as RegistryAmbiguous, h as HealthCheckTimedOut, m as DeployMigrationsFailed, n as FrontendDeployFailed, r as MissingEnvVars, t as BackendDeployFailed, v as RegistryNotFound, y as ProjectNotOwned } from "../engine-B3Gmu8-O.mjs";
15
- import { i as rollbackStage, n as RollbackNeedsApp, r as StageNeverDeployed, t as NothingToRollBack } from "../rollback-CLBKeSMl.mjs";
14
+ import { _ as RegistryNotConfigured, g as RegistryAmbiguous, h as HealthCheckTimedOut, m as DeployMigrationsFailed, n as FrontendDeployFailed, r as MissingEnvVars, t as BackendDeployFailed, v as RegistryNotFound, y as ProjectNotOwned } from "../engine-ZzUy2czq.mjs";
15
+ import { i as rollbackStage, n as RollbackNeedsApp, r as StageNeverDeployed, t as NothingToRollBack } from "../rollback-M6b0z1tp.mjs";
16
16
  import { t as ProviderRemoved } from "../provider-CEOKk8NS.mjs";
17
- import { i as SurfacesUnhealthy, r as SstOutputsUnreadable, t as SstConfigNotFound } from "../sst-DVIeKWCH.mjs";
17
+ import { i as SurfacesUnhealthy, r as SstOutputsUnreadable, t as SstConfigNotFound } from "../sst-BAQrBaGa.mjs";
18
18
  import { join, resolve } from "node:path";
19
19
  import { existsSync } from "node:fs";
20
20
  //#region src/sandbox/install.ts
@@ -1,23 +1,23 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
2
2
  const require_errors = require("./errors-DMC4Umsb.cjs");
3
- const require_credentials = require("./credentials-CORvhcrO.cjs");
4
- const require_workspace = require("./workspace-Ciw3SnME.cjs");
5
- const require_apps = require("./apps-C6s-trVp.cjs");
3
+ const require_credentials = require("./credentials-CCCAy3NL.cjs");
4
+ const require_workspace = require("./workspace-p7gmCQVS.cjs");
5
+ const require_apps = require("./apps-By6pnfzA.cjs");
6
6
  const require_define = require("./define-crmMcXFS.cjs");
7
- const require_compose = require("./compose-BqTuzitb.cjs");
8
- const require_SubscriberGenerator = require("./SubscriberGenerator-mZpSuSU7.cjs");
9
- const require_discover = require("./discover-CRywE7yc.cjs");
7
+ const require_compose = require("./compose-DwjaxFFK.cjs");
8
+ const require_SubscriberGenerator = require("./SubscriberGenerator-DMi4siph.cjs");
9
+ const require_discover = require("./discover-39VKSE2i.cjs");
10
10
  const require_config = require("./config.cjs");
11
- const require_resolve = require("./resolve-BhQd4IkT.cjs");
12
- const require_notes = require("./notes-DRdlsCYV.cjs");
13
- const require_stack = require("./stack-2jMvQfLo.cjs");
14
- const require_snsSubscriptions = require("./snsSubscriptions-BRmEdsks.cjs");
15
- const require_local = require("./local-BxjA0EXj.cjs");
16
- const require_sniffer = require("./sniffer-9a8wQeeD.cjs");
17
- const require_iam = require("./iam-C2sf6AUi.cjs");
18
- const require_projectBucket = require("./projectBucket-gIQUuhGm.cjs");
11
+ const require_resolve = require("./resolve-BrJUFIUu.cjs");
12
+ const require_notes = require("./notes-rTfi6rfN.cjs");
13
+ const require_stack = require("./stack-DaJ9D2Uc.cjs");
14
+ const require_snsSubscriptions = require("./snsSubscriptions-CXwELBil.cjs");
15
+ const require_local = require("./local-BIrl0ENw.cjs");
16
+ const require_sniffer = require("./sniffer-C5F7uYQB.cjs");
17
+ const require_iam = require("./iam-b4IvC1fm.cjs");
18
+ const require_projectBucket = require("./projectBucket-CRa1b1Td.cjs");
19
19
  const require_seeds = require("./seeds-Bc3niNVb.cjs");
20
- const require_credentialSchemas = require("./credentialSchemas-BAklWDna.cjs");
20
+ const require_credentialSchemas = require("./credentialSchemas-OVXofU-r.cjs");
21
21
  let node_path = require("node:path");
22
22
  let node_crypto = require("node:crypto");
23
23
  let _geekmidas_manifest = require("@geekmidas/manifest");
@@ -1410,8 +1410,8 @@ async function ensureBucketEvents(ctx, s3, input) {
1410
1410
  */
1411
1411
  async function ensureEventsKey(ctx, input) {
1412
1412
  const { id, topicArn, region } = input;
1413
- const key = input.key ?? (0, _geekmidas_manifest.provideKey)(id, "eventsConnectionString");
1414
- const url = ctx.secrets[input.urlKey ?? (0, _geekmidas_manifest.provideKey)(id, "connectionString")];
1413
+ const key = input.key ?? (0, _geekmidas_manifest.providedKeyFor)(id, "objects", "eventsConnectionString");
1414
+ const url = ctx.secrets[input.urlKey ?? (0, _geekmidas_manifest.providedKeyFor)(id, "objects", "connectionString")];
1415
1415
  let parsed;
1416
1416
  try {
1417
1417
  parsed = url ? _geekmidas_storage_s3_url.parse(url) : void 0;
@@ -1545,7 +1545,7 @@ async function ensurePushSubscriptions(ctx, input) {
1545
1545
  * address over it.
1546
1546
  */
1547
1547
  function bucketKeys(manifest, bucket) {
1548
- return [(0, _geekmidas_manifest.provideKey)(bucket, "connectionString"), ...Object.entries(manifest).filter(([, d]) => d.kind === "file-server" && d.of === bucket).map(([id]) => (0, _geekmidas_manifest.providedKeyFor)(id, "file-server", "url"))];
1548
+ return [(0, _geekmidas_manifest.providedKeyFor)(bucket, "objects", "connectionString"), ...Object.entries(manifest).filter(([, d]) => d.kind === "file-server" && d.of === bucket).map(([id]) => (0, _geekmidas_manifest.providedKeyFor)(id, "file-server", "url"))];
1549
1549
  }
1550
1550
  function bucketOrigins(input) {
1551
1551
  const { manifest, workspace, stage } = input;
@@ -1785,7 +1785,7 @@ async function ensureBucket(ctx, stageClients, construct, watchers) {
1785
1785
  id,
1786
1786
  secret: require_iam.s3KeySecret(ctx, clients, {
1787
1787
  bucket,
1788
- urlKey: (0, _geekmidas_manifest.provideKey)(id, "connectionString")
1788
+ urlKey: (0, _geekmidas_manifest.providedKeyFor)(id, "objects", "connectionString")
1789
1789
  }),
1790
1790
  ...user
1791
1791
  });
@@ -2094,7 +2094,7 @@ function canonicalCors(rule) {
2094
2094
  async function verifyS3(ctx) {
2095
2095
  const S3 = await import("@aws-sdk/client-s3");
2096
2096
  for (const { id } of bucketConstructs(ctx.manifest)) {
2097
- const urlKey = (0, _geekmidas_manifest.provideKey)(id, "connectionString");
2097
+ const urlKey = (0, _geekmidas_manifest.providedKeyFor)(id, "objects", "connectionString");
2098
2098
  const url = ctx.secrets[urlKey];
2099
2099
  if (url === void 0) continue;
2100
2100
  const address = _geekmidas_storage_s3_url.parse(url);
@@ -2148,8 +2148,8 @@ const s3Provider = {
2148
2148
  runtimeKeys(manifest) {
2149
2149
  const watched = bucketWatchers(manifest);
2150
2150
  return bucketConstructs(manifest).flatMap((b) => [
2151
- (0, _geekmidas_manifest.provideKey)(b.id, "connectionString"),
2152
- ...watched.has(b.id) ? [(0, _geekmidas_manifest.provideKey)(b.id, "eventsConnectionString")] : [],
2151
+ (0, _geekmidas_manifest.providedKeyFor)(b.id, "objects", "connectionString"),
2152
+ ...watched.has(b.id) ? [(0, _geekmidas_manifest.providedKeyFor)(b.id, "objects", "eventsConnectionString")] : [],
2153
2153
  ...b.servers.map((s) => (0, _geekmidas_manifest.providedKeyFor)(s.id, "file-server", "url"))
2154
2154
  ]);
2155
2155
  },
@@ -2356,7 +2356,7 @@ async function ensureIdentity$1(ctx, { SES, ses }, domain) {
2356
2356
  async function ensureInbox(ctx, { SES, ses }, events, input) {
2357
2357
  const { inbox, domain, region, ruleSet } = input;
2358
2358
  const name = require_workspace.inboxBucketId(inbox.id);
2359
- const urlKey = (0, _geekmidas_manifest.provideKey)(inbox.id, "url");
2359
+ const urlKey = (0, _geekmidas_manifest.providedKeyFor)(inbox.id, inbox.kind, "url");
2360
2360
  const topicArn = await ensureTopic(ctx, events, {
2361
2361
  id: inbox.id,
2362
2362
  topicName: require_workspace.inboxTopicName(ctx.identity.scope, ctx.stage, inbox.id),
@@ -2377,7 +2377,7 @@ async function ensureInbox(ctx, { SES, ses }, events, input) {
2377
2377
  id: inbox.id,
2378
2378
  topicArn,
2379
2379
  region,
2380
- key: (0, _geekmidas_manifest.provideKey)(inbox.topic, "publisherConnectionString"),
2380
+ key: (0, _geekmidas_manifest.providedKeyFor)(inbox.topic, "topic", "publisherConnectionString"),
2381
2381
  urlKey
2382
2382
  });
2383
2383
  const rule = {
@@ -2472,7 +2472,7 @@ async function verifySes(ctx) {
2472
2472
  if (inboxes.length === 0) return;
2473
2473
  stageDomain(ctx);
2474
2474
  for (const inbox of inboxes) {
2475
- const missing = [(0, _geekmidas_manifest.provideKey)(inbox.id, "url"), (0, _geekmidas_manifest.provideKey)(inbox.topic, "publisherConnectionString")].filter((key) => ctx.secrets[key] === void 0);
2475
+ const missing = [(0, _geekmidas_manifest.providedKeyFor)(inbox.id, inbox.kind, "url"), (0, _geekmidas_manifest.providedKeyFor)(inbox.topic, "topic", "publisherConnectionString")].filter((key) => ctx.secrets[key] === void 0);
2476
2476
  if (missing.length > 0) throw new require_workspace.InboxNotProvisioned(ctx.stage, inbox.id, missing);
2477
2477
  }
2478
2478
  }
@@ -2483,7 +2483,7 @@ const sesProvider = {
2483
2483
  provisioning: require_workspace.SES_PROVISIONING,
2484
2484
  credentials: require_snsSubscriptions.awsProvisioningCredentials,
2485
2485
  runtimeKeys(manifest) {
2486
- return inboxConstructs(manifest).flatMap((inbox) => [(0, _geekmidas_manifest.provideKey)(inbox.id, "url"), (0, _geekmidas_manifest.provideKey)(inbox.topic, "publisherConnectionString")]);
2486
+ return inboxConstructs(manifest).flatMap((inbox) => [(0, _geekmidas_manifest.providedKeyFor)(inbox.id, inbox.kind, "url"), (0, _geekmidas_manifest.providedKeyFor)(inbox.topic, "topic", "publisherConnectionString")]);
2487
2487
  },
2488
2488
  ensure: ensureSes,
2489
2489
  verify: verifySes
@@ -2606,7 +2606,7 @@ function identityArn(region, account, domain) {
2606
2606
  * not write — one set by hand, or imported — which it then leaves alone.
2607
2607
  */
2608
2608
  function urlSetElsewhere(ctx, email) {
2609
- const given = ctx.secrets[(0, _geekmidas_manifest.provideKey)(email, "url")];
2609
+ const given = ctx.secrets[(0, _geekmidas_manifest.providedKeyFor)(email, "email", "url")];
2610
2610
  if (given === void 0) return false;
2611
2611
  const record = ctx.state.record(`iam-access-key:${email}`);
2612
2612
  if (!record) return true;
@@ -2634,7 +2634,7 @@ function senderOf(ctx, email) {
2634
2634
  address: ctx.config.from,
2635
2635
  ours: true
2636
2636
  };
2637
- const held = ctx.secrets[(0, _geekmidas_manifest.provideKey)(email, "from")];
2637
+ const held = ctx.secrets[(0, _geekmidas_manifest.providedKeyFor)(email, "email", "from")];
2638
2638
  const wrote = ctx.state.record(senderEntry(email).key)?.id;
2639
2639
  const domain = ctx.workspace.domains?.[ctx.stage];
2640
2640
  const fallback = domain ? `noreply@${domain}` : void 0;
@@ -2674,7 +2674,7 @@ async function iamClients(credential, region) {
2674
2674
  async function ensureSesEmail(ctx) {
2675
2675
  const owned = emailConstructs(ctx.manifest).filter((email) => {
2676
2676
  if (!urlSetElsewhere(ctx, email.id)) return true;
2677
- ctx.log(` ${email.id}: ${(0, _geekmidas_manifest.provideKey)(email.id, "url")} is set in the stage's secrets — it sends with that, and nothing is created for it`);
2677
+ ctx.log(` ${email.id}: ${(0, _geekmidas_manifest.providedKeyFor)(email.id, "email", "url")} is set in the stage's secrets — it sends with that, and nothing is created for it`);
2678
2678
  return false;
2679
2679
  });
2680
2680
  if (owned.length === 0) return;
@@ -2699,10 +2699,10 @@ async function ensureSesEmail(ctx) {
2699
2699
  });
2700
2700
  await require_iam.ensureAccessKey(ctx, clients, {
2701
2701
  id: email.id,
2702
- secret: smtpKeySecret((0, _geekmidas_manifest.provideKey)(email.id, "url"), region),
2702
+ secret: smtpKeySecret((0, _geekmidas_manifest.providedKeyFor)(email.id, "email", "url"), region),
2703
2703
  ...user
2704
2704
  });
2705
- const fromKey = (0, _geekmidas_manifest.provideKey)(email.id, "from");
2705
+ const fromKey = (0, _geekmidas_manifest.providedKeyFor)(email.id, "email", "from");
2706
2706
  if (ctx.secrets[fromKey] !== from) await ctx.change({
2707
2707
  construct: email.id,
2708
2708
  resource: fromKey,
@@ -2767,7 +2767,7 @@ async function noteSandbox(ctx, { SES, ses }, region) {
2767
2767
  /** The cheap check every deploy runs: each mail construct's keys are in the stage's secrets. */
2768
2768
  async function verifySesEmail(ctx) {
2769
2769
  for (const email of emailConstructs(ctx.manifest)) {
2770
- const missing = [(0, _geekmidas_manifest.provideKey)(email.id, "url"), (0, _geekmidas_manifest.provideKey)(email.id, "from")].filter((key) => ctx.secrets[key] === void 0);
2770
+ const missing = [(0, _geekmidas_manifest.providedKeyFor)(email.id, "email", "url"), (0, _geekmidas_manifest.providedKeyFor)(email.id, "email", "from")].filter((key) => ctx.secrets[key] === void 0);
2771
2771
  if (missing.length > 0) throw new require_workspace.EmailNotProvisioned(ctx.stage, email.id, missing);
2772
2772
  }
2773
2773
  }
@@ -2778,7 +2778,7 @@ const sesEmailProvider = {
2778
2778
  provisioning: require_workspace.SES_PROVISIONING,
2779
2779
  credentials: require_snsSubscriptions.awsProvisioningCredentials,
2780
2780
  runtimeKeys(manifest) {
2781
- return emailConstructs(manifest).flatMap((email) => [(0, _geekmidas_manifest.provideKey)(email.id, "url"), (0, _geekmidas_manifest.provideKey)(email.id, "from")]);
2781
+ return emailConstructs(manifest).flatMap((email) => [(0, _geekmidas_manifest.providedKeyFor)(email.id, "email", "url"), (0, _geekmidas_manifest.providedKeyFor)(email.id, "email", "from")]);
2782
2782
  },
2783
2783
  ensure: ensureSesEmail,
2784
2784
  verify: verifySesEmail
@@ -3095,11 +3095,11 @@ function moveBucketKeys(manifest, custom) {
3095
3095
  const entries = Object.entries(manifest);
3096
3096
  for (const [id, declaration] of entries) {
3097
3097
  if (declaration.kind !== "objects") continue;
3098
- move((0, _geekmidas_manifest.provideKey)(id, "url"), (0, _geekmidas_manifest.provideKey)(id, "connectionString"), (value) => !/^https?:\/\//i.test(value));
3098
+ move((0, _geekmidas_manifest.environmentCase)(`${id}_url`), (0, _geekmidas_manifest.providedKeyFor)(id, declaration.kind, "connectionString"), (value) => !/^https?:\/\//i.test(value));
3099
3099
  }
3100
3100
  for (const [id, declaration] of entries) {
3101
3101
  if (declaration.kind !== "file-server") continue;
3102
- move((0, _geekmidas_manifest.provideKey)(id, "url"), (0, _geekmidas_manifest.providedKeyFor)(id, "file-server", "url"));
3102
+ move((0, _geekmidas_manifest.environmentCase)(`${id}_url`), (0, _geekmidas_manifest.providedKeyFor)(id, "file-server", "url"));
3103
3103
  }
3104
3104
  return {
3105
3105
  custom: next,
@@ -3899,4 +3899,4 @@ Object.defineProperty(exports, "deploy", {
3899
3899
  }
3900
3900
  });
3901
3901
 
3902
- //# sourceMappingURL=deploy-BwJ7uWXd.cjs.map
3902
+ //# sourceMappingURL=deploy-Dy5jyciI.cjs.map