@geekmidas/cli 10.0.0-alpha.166 → 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 (259) 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-mnY-cdD2.mjs → GoDaddyProvider-CJIYlkUN.mjs} +2 -2
  6. package/dist/{GoDaddyProvider-mnY-cdD2.mjs.map → GoDaddyProvider-CJIYlkUN.mjs.map} +1 -1
  7. package/dist/{GoDaddyProvider-DClFHezd.cjs → GoDaddyProvider-CYAlIeML.cjs} +2 -2
  8. package/dist/{GoDaddyProvider-DClFHezd.cjs.map → GoDaddyProvider-CYAlIeML.cjs.map} +1 -1
  9. package/dist/{HostingerProvider-BMyz2LnZ.cjs → HostingerProvider-Ceqc_nlG.cjs} +2 -2
  10. package/dist/{HostingerProvider-BMyz2LnZ.cjs.map → HostingerProvider-Ceqc_nlG.cjs.map} +1 -1
  11. package/dist/{HostingerProvider-39eSGyBa.mjs → HostingerProvider-Tb0bnTpM.mjs} +2 -2
  12. package/dist/{HostingerProvider-39eSGyBa.mjs.map → HostingerProvider-Tb0bnTpM.mjs.map} +1 -1
  13. package/dist/{LegacyStateStore-BJY7ntQk.cjs → LegacyStateStore-Ci-CRqt2.cjs} +2 -2
  14. package/dist/{LegacyStateStore-BJY7ntQk.cjs.map → LegacyStateStore-Ci-CRqt2.cjs.map} +1 -1
  15. package/dist/{LegacyStateStore-B2TBaSMq.mjs → LegacyStateStore-DJWY64Jj.mjs} +2 -2
  16. package/dist/{LegacyStateStore-B2TBaSMq.mjs.map → LegacyStateStore-DJWY64Jj.mjs.map} +1 -1
  17. package/dist/{LocalStateStore-8LFd-aMA.mjs → LocalStateStore-BFgjv29N.mjs} +2 -2
  18. package/dist/{LocalStateStore-8LFd-aMA.mjs.map → LocalStateStore-BFgjv29N.mjs.map} +1 -1
  19. package/dist/{LocalStateStore-BvoEjPi5.cjs → LocalStateStore-Enw_wV7d.cjs} +2 -2
  20. package/dist/{LocalStateStore-BvoEjPi5.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-eeA5NXRa.cjs → S3StateStore-B48M3z7L.cjs} +4 -4
  26. package/dist/{S3StateStore-eeA5NXRa.cjs.map → S3StateStore-B48M3z7L.cjs.map} +1 -1
  27. package/dist/{S3StateStore-DMzsqfSa.mjs → S3StateStore-Cwfd-ZnJ.mjs} +4 -4
  28. package/dist/{S3StateStore-DMzsqfSa.mjs.map → S3StateStore-Cwfd-ZnJ.mjs.map} +1 -1
  29. package/dist/{SSMStateStore-BUv-du0T.cjs → SSMStateStore-CuBe-NK5.cjs} +2 -2
  30. package/dist/{SSMStateStore-BUv-du0T.cjs.map → SSMStateStore-CuBe-NK5.cjs.map} +1 -1
  31. package/dist/{SSMStateStore-CE2DTAtT.mjs → SSMStateStore-DYgE98Sm.mjs} +2 -2
  32. package/dist/{SSMStateStore-CE2DTAtT.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-Dp0KQNkQ.cjs → add-4AT0LlDK.cjs} +11 -11
  38. package/dist/add-4AT0LlDK.cjs.map +1 -0
  39. package/dist/{add-BgCYGJpE.mjs → add-C85tazt0.mjs} +12 -12
  40. package/dist/add-C85tazt0.mjs.map +1 -0
  41. package/dist/{apps-DkMR-qvD.cjs → apps-By6pnfzA.cjs} +99 -45
  42. package/dist/apps-By6pnfzA.cjs.map +1 -0
  43. package/dist/{apps-CJTOIaz3.mjs → apps-CWGmV2nQ.mjs} +99 -46
  44. package/dist/apps-CWGmV2nQ.mjs.map +1 -0
  45. package/dist/{bundler-Dt1ffXl6.mjs → bundler-B9rkNGpK.mjs} +6 -6
  46. package/dist/{bundler-Dt1ffXl6.mjs.map → bundler-B9rkNGpK.mjs.map} +1 -1
  47. package/dist/{bundler-CA7KimJ0.cjs → bundler-DPBLrtjT.cjs} +6 -6
  48. package/dist/{bundler-CA7KimJ0.cjs.map → bundler-DPBLrtjT.cjs.map} +1 -1
  49. package/dist/{cli-CY1Cp8yN.cjs → cli-BnWRqhwx.cjs} +4 -4
  50. package/dist/{cli-CY1Cp8yN.cjs.map → cli-BnWRqhwx.cjs.map} +1 -1
  51. package/dist/{cli-C-fdEb8N.mjs → cli-DgL0QED8.mjs} +4 -4
  52. package/dist/{cli-C-fdEb8N.mjs.map → cli-DgL0QED8.mjs.map} +1 -1
  53. package/dist/{compose-SmuCWWUh.cjs → compose-CLM-sqgE.cjs} +76 -11
  54. package/dist/compose-CLM-sqgE.cjs.map +1 -0
  55. package/dist/{compose-tX6YTa1U.mjs → compose-CcK-QoYU.mjs} +66 -13
  56. package/dist/compose-CcK-QoYU.mjs.map +1 -0
  57. package/dist/{compose-CZGeE6QJ.mjs → compose-DuRBnjxx.mjs} +9 -9
  58. package/dist/compose-DuRBnjxx.mjs.map +1 -0
  59. package/dist/{compose-BIm9yNH7.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-CS3Dr-pv.cjs → credentials-CCCAy3NL.cjs} +7 -7
  68. package/dist/{credentials-CS3Dr-pv.cjs.map → credentials-CCCAy3NL.cjs.map} +1 -1
  69. package/dist/{credentials-V3WgiKmZ.mjs → credentials-CeCOEKP3.mjs} +7 -7
  70. package/dist/{credentials-V3WgiKmZ.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--ia-CGMv.cjs → deploy-Dy5jyciI.cjs} +123 -38
  80. package/dist/deploy-Dy5jyciI.cjs.map +1 -0
  81. package/dist/{deploy-BWFFSN5p.mjs → deploy-F6GA-u59.mjs} +124 -39
  82. package/dist/deploy-F6GA-u59.mjs.map +1 -0
  83. package/dist/{destroy-CrxF8Dlk.cjs → destroy-B7-8EgCJ.cjs} +9 -9
  84. package/dist/{destroy-CrxF8Dlk.cjs.map → destroy-B7-8EgCJ.cjs.map} +1 -1
  85. package/dist/{destroy-ZNiKL3--.mjs → destroy-Gyxrl5yO.mjs} +9 -9
  86. package/dist/{destroy-ZNiKL3--.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-DhmU416x.mjs → docker-COHyyOkv.mjs} +16 -12
  92. package/dist/docker-COHyyOkv.mjs.map +1 -0
  93. package/dist/{docker-BtUjo-J_.cjs → docker-CP4bspkW.cjs} +15 -11
  94. package/dist/docker-CP4bspkW.cjs.map +1 -0
  95. package/dist/{dokploy-ComPiFLl.cjs → dokploy-C7ampvzk.cjs} +2 -2
  96. package/dist/{dokploy-ComPiFLl.cjs.map → dokploy-C7ampvzk.cjs.map} +1 -1
  97. package/dist/{dokploy-BszAUbbA.mjs → dokploy-DBmB9vWu.mjs} +2 -2
  98. package/dist/{dokploy-BszAUbbA.mjs.map → dokploy-DBmB9vWu.mjs.map} +1 -1
  99. package/dist/{eas-zxVAWY6c.cjs → eas-CbnTdz8d.cjs} +3 -3
  100. package/dist/{eas-zxVAWY6c.cjs.map → eas-CbnTdz8d.cjs.map} +1 -1
  101. package/dist/{eas-DQudP2g2.mjs → eas-EXRkhGSM.mjs} +3 -3
  102. package/dist/{eas-DQudP2g2.mjs.map → eas-EXRkhGSM.mjs.map} +1 -1
  103. package/dist/{encryption-CU5O0Y61.cjs → encryption-CdDDSAu_.cjs} +4 -4
  104. package/dist/encryption-CdDDSAu_.cjs.map +1 -0
  105. package/dist/{encryption-BCaweYBJ.mjs → encryption-lLZV2eMs.mjs} +5 -5
  106. package/dist/encryption-lLZV2eMs.mjs.map +1 -0
  107. package/dist/{engine-xrlcbr1g.cjs → engine-Cg92m1Xf.cjs} +38 -38
  108. package/dist/engine-Cg92m1Xf.cjs.map +1 -0
  109. package/dist/{engine-BzeCK6e8.mjs → engine-ZzUy2czq.mjs} +39 -39
  110. package/dist/engine-ZzUy2czq.mjs.map +1 -0
  111. package/dist/{github-Jcrqfzg0.cjs → github-BHqRcUgU.cjs} +8 -8
  112. package/dist/{github-Jcrqfzg0.cjs.map → github-BHqRcUgU.cjs.map} +1 -1
  113. package/dist/{github-CHClpJZS.mjs → github-CPpJmNgV.mjs} +8 -8
  114. package/dist/{github-CHClpJZS.mjs.map → github-CPpJmNgV.mjs.map} +1 -1
  115. package/dist/{googlePlay-e_tIBr4n.cjs → googlePlay-DRz0ya3q.cjs} +4 -4
  116. package/dist/{googlePlay-e_tIBr4n.cjs.map → googlePlay-DRz0ya3q.cjs.map} +1 -1
  117. package/dist/{googlePlay-Dk_pnif9.mjs → googlePlay-Dg-0ASWN.mjs} +4 -4
  118. package/dist/{googlePlay-Dk_pnif9.mjs.map → googlePlay-Dg-0ASWN.mjs.map} +1 -1
  119. package/dist/{iam-BKfO7u14.mjs → iam-CLIne3Ny.mjs} +2 -2
  120. package/dist/{iam-BKfO7u14.mjs.map → iam-CLIne3Ny.mjs.map} +1 -1
  121. package/dist/{iam-B6WLUf_x.cjs → iam-b4IvC1fm.cjs} +2 -2
  122. package/dist/{iam-B6WLUf_x.cjs.map → iam-b4IvC1fm.cjs.map} +1 -1
  123. package/dist/index.cjs +367 -128
  124. package/dist/index.cjs.map +1 -1
  125. package/dist/index.mjs +368 -129
  126. package/dist/index.mjs.map +1 -1
  127. package/dist/{local-Dc2h2Ex3.cjs → local-BIrl0ENw.cjs} +3 -3
  128. package/dist/{local-Dc2h2Ex3.cjs.map → local-BIrl0ENw.cjs.map} +1 -1
  129. package/dist/{local-DUi3f-WB.mjs → local-Cin6exc0.mjs} +3 -3
  130. package/dist/{local-DUi3f-WB.mjs.map → local-Cin6exc0.mjs.map} +1 -1
  131. package/dist/{migrate-BU4eyd7z.cjs → migrate-BtkwylxW.cjs} +7 -7
  132. package/dist/{migrate-BU4eyd7z.cjs.map → migrate-BtkwylxW.cjs.map} +1 -1
  133. package/dist/{migrate-CIjcBr96.cjs → migrate-CxI07Ey0.cjs} +3 -3
  134. package/dist/{migrate-CIjcBr96.cjs.map → migrate-CxI07Ey0.cjs.map} +1 -1
  135. package/dist/{migrate-BxFCXc7M.mjs → migrate-DEU8I8sQ.mjs} +7 -7
  136. package/dist/{migrate-BxFCXc7M.mjs.map → migrate-DEU8I8sQ.mjs.map} +1 -1
  137. package/dist/{migrate-CbpeVxEW.mjs → migrate-DpLMJLCw.mjs} +3 -3
  138. package/dist/{migrate-CbpeVxEW.mjs.map → migrate-DpLMJLCw.mjs.map} +1 -1
  139. package/dist/next.cjs +59 -0
  140. package/dist/next.cjs.map +1 -0
  141. package/dist/next.d.cts +44 -0
  142. package/dist/next.d.cts.map +1 -0
  143. package/dist/next.d.mts +44 -0
  144. package/dist/next.d.mts.map +1 -0
  145. package/dist/next.mjs +58 -0
  146. package/dist/next.mjs.map +1 -0
  147. package/dist/{notes-TDHMzdVt.mjs → notes-or_kXTal.mjs} +13 -13
  148. package/dist/notes-or_kXTal.mjs.map +1 -0
  149. package/dist/{notes-DJyFkK13.cjs → notes-rTfi6rfN.cjs} +12 -12
  150. package/dist/notes-rTfi6rfN.cjs.map +1 -0
  151. package/dist/openapi.cjs +3 -3
  152. package/dist/openapi.mjs +3 -3
  153. package/dist/{projectBucket-CoskwJC5.cjs → projectBucket-CRa1b1Td.cjs} +2 -2
  154. package/dist/{projectBucket-CoskwJC5.cjs.map → projectBucket-CRa1b1Td.cjs.map} +1 -1
  155. package/dist/{projectBucket-BPzx0b0t.mjs → projectBucket-Coh5K3-g.mjs} +2 -2
  156. package/dist/{projectBucket-BPzx0b0t.mjs.map → projectBucket-Coh5K3-g.mjs.map} +1 -1
  157. package/dist/{publish-LZ1eb-MI.mjs → publish-Bwhywmpz.mjs} +2 -2
  158. package/dist/{publish-LZ1eb-MI.mjs.map → publish-Bwhywmpz.mjs.map} +1 -1
  159. package/dist/{publish-DB3-zkpm.cjs → publish-D9Yl4AzW.cjs} +2 -2
  160. package/dist/{publish-DB3-zkpm.cjs.map → publish-D9Yl4AzW.cjs.map} +1 -1
  161. package/dist/{ready-BjFMu_1J.mjs → ready-COJHr1Yi.mjs} +9 -9
  162. package/dist/ready-COJHr1Yi.mjs.map +1 -0
  163. package/dist/{ready-eVMJIcWn.cjs → ready-DcD0SCnV.cjs} +8 -8
  164. package/dist/ready-DcD0SCnV.cjs.map +1 -0
  165. package/dist/reconcile/public.cjs +1 -1
  166. package/dist/reconcile/public.mjs +1 -1
  167. package/dist/{resolve-jez3Y1S0.mjs → resolve-B9tboVm2.mjs} +4 -4
  168. package/dist/{resolve-jez3Y1S0.mjs.map → resolve-B9tboVm2.mjs.map} +1 -1
  169. package/dist/{resolve-B5_tOTJG.cjs → resolve-BrJUFIUu.cjs} +4 -4
  170. package/dist/{resolve-B5_tOTJG.cjs.map → resolve-BrJUFIUu.cjs.map} +1 -1
  171. package/dist/{rollback-BNo1bCLO.cjs → rollback-D48bPMpD.cjs} +7 -7
  172. package/dist/{rollback-BNo1bCLO.cjs.map → rollback-D48bPMpD.cjs.map} +1 -1
  173. package/dist/{rollback-BtOfxwo-.mjs → rollback-M6b0z1tp.mjs} +7 -7
  174. package/dist/{rollback-BtOfxwo-.mjs.map → rollback-M6b0z1tp.mjs.map} +1 -1
  175. package/dist/{s3-BlPwyu1L.cjs → s3-3iS3jlKU.cjs} +3 -3
  176. package/dist/{s3-BlPwyu1L.cjs.map → s3-3iS3jlKU.cjs.map} +1 -1
  177. package/dist/{s3-Bf_75vVl.mjs → s3-CNOSRjqH.mjs} +3 -3
  178. package/dist/{s3-Bf_75vVl.mjs.map → s3-CNOSRjqH.mjs.map} +1 -1
  179. package/dist/sandbox/credentials-worker.cjs +2 -2
  180. package/dist/sandbox/credentials-worker.mjs +2 -2
  181. package/dist/sandbox/discover-worker.cjs +1 -1
  182. package/dist/sandbox/discover-worker.mjs +1 -1
  183. package/dist/sandbox/migrate-worker.cjs +2 -2
  184. package/dist/sandbox/migrate-worker.mjs +2 -2
  185. package/dist/{serverSetup-D0Zor2i4.mjs → serverSetup-CzLJ_RV0.mjs} +6 -6
  186. package/dist/{serverSetup-D0Zor2i4.mjs.map → serverSetup-CzLJ_RV0.mjs.map} +1 -1
  187. package/dist/{serverSetup-D30vVD6t.cjs → serverSetup-DnOdoucM.cjs} +6 -6
  188. package/dist/{serverSetup-D30vVD6t.cjs.map → serverSetup-DnOdoucM.cjs.map} +1 -1
  189. package/dist/{sniffer-Bw00z3I8.cjs → sniffer-C5F7uYQB.cjs} +8 -8
  190. package/dist/{sniffer-Bw00z3I8.cjs.map → sniffer-C5F7uYQB.cjs.map} +1 -1
  191. package/dist/{sniffer-DdPDiNmc.mjs → sniffer-yeftYpWK.mjs} +8 -8
  192. package/dist/{sniffer-DdPDiNmc.mjs.map → sniffer-yeftYpWK.mjs.map} +1 -1
  193. package/dist/{snsSubscriptions-DBxVTR6Y.mjs → snsSubscriptions-CXRa_bwG.mjs} +3 -3
  194. package/dist/{snsSubscriptions-DBxVTR6Y.mjs.map → snsSubscriptions-CXRa_bwG.mjs.map} +1 -1
  195. package/dist/{snsSubscriptions-g7apv_fy.cjs → snsSubscriptions-CXwELBil.cjs} +3 -3
  196. package/dist/{snsSubscriptions-g7apv_fy.cjs.map → snsSubscriptions-CXwELBil.cjs.map} +1 -1
  197. package/dist/{sst-DJ22YDEq.mjs → sst-BAQrBaGa.mjs} +6 -6
  198. package/dist/{sst-DJ22YDEq.mjs.map → sst-BAQrBaGa.mjs.map} +1 -1
  199. package/dist/{sst-CEs0bMxj.cjs → sst-B_srWo15.cjs} +6 -6
  200. package/dist/{sst-CEs0bMxj.cjs.map → sst-B_srWo15.cjs.map} +1 -1
  201. package/dist/{stack-BmG-lKgD.cjs → stack-DaJ9D2Uc.cjs} +20 -20
  202. package/dist/stack-DaJ9D2Uc.cjs.map +1 -0
  203. package/dist/{stack-Ds9jjpE1.mjs → stack-t2tN1jYo.mjs} +21 -21
  204. package/dist/stack-t2tN1jYo.mjs.map +1 -0
  205. package/dist/{stage-D9dfV1Ey.mjs → stage-B4gqRg7l.mjs} +7 -7
  206. package/dist/{stage-D9dfV1Ey.mjs.map → stage-B4gqRg7l.mjs.map} +1 -1
  207. package/dist/{stage-kGc9L3yB.cjs → stage-Clk6oQO_.cjs} +7 -7
  208. package/dist/{stage-kGc9L3yB.cjs.map → stage-Clk6oQO_.cjs.map} +1 -1
  209. package/dist/{stages-BL22BLJS.mjs → stages-D1rnfO18.mjs} +2 -2
  210. package/dist/{stages-BL22BLJS.mjs.map → stages-D1rnfO18.mjs.map} +1 -1
  211. package/dist/{stages-CN53nNOK.cjs → stages-afi9P-Cd.cjs} +2 -2
  212. package/dist/{stages-CN53nNOK.cjs.map → stages-afi9P-Cd.cjs.map} +1 -1
  213. package/dist/target/public.cjs +1 -1
  214. package/dist/target/public.mjs +1 -1
  215. package/dist/{terminal-C0A7S7fB.mjs → terminal-D4kY5oz7.mjs} +3 -3
  216. package/dist/{terminal-C0A7S7fB.mjs.map → terminal-D4kY5oz7.mjs.map} +1 -1
  217. package/dist/{terminal-DVlIWcUb.cjs → terminal-JAudEZRC.cjs} +3 -3
  218. package/dist/{terminal-DVlIWcUb.cjs.map → terminal-JAudEZRC.cjs.map} +1 -1
  219. package/dist/vitest.cjs +1 -1
  220. package/dist/vitest.mjs +1 -1
  221. package/dist/workspace/index.cjs +1 -1
  222. package/dist/workspace/index.mjs +1 -1
  223. package/dist/{workspace-D4hzz6Xb.mjs → workspace-Gubg8xLJ.mjs} +8 -9
  224. package/dist/workspace-Gubg8xLJ.mjs.map +1 -0
  225. package/dist/{workspace-DPSdiv-b.cjs → workspace-p7gmCQVS.cjs} +7 -8
  226. package/dist/workspace-p7gmCQVS.cjs.map +1 -0
  227. package/package.json +25 -15
  228. package/dist/SubscriberGenerator-BybB6uez.mjs.map +0 -1
  229. package/dist/SubscriberGenerator-mZpSuSU7.cjs.map +0 -1
  230. package/dist/add-BgCYGJpE.mjs.map +0 -1
  231. package/dist/add-Dp0KQNkQ.cjs.map +0 -1
  232. package/dist/apps-CJTOIaz3.mjs.map +0 -1
  233. package/dist/apps-DkMR-qvD.cjs.map +0 -1
  234. package/dist/compose-BIm9yNH7.cjs.map +0 -1
  235. package/dist/compose-CZGeE6QJ.mjs.map +0 -1
  236. package/dist/compose-SmuCWWUh.cjs.map +0 -1
  237. package/dist/compose-tX6YTa1U.mjs.map +0 -1
  238. package/dist/credentialSchemas-BAklWDna.cjs.map +0 -1
  239. package/dist/credentialSchemas-mz9QZTYh.mjs.map +0 -1
  240. package/dist/databases-C1qqNxTu.mjs.map +0 -1
  241. package/dist/databases-CrKh5jw6.cjs.map +0 -1
  242. package/dist/deploy--ia-CGMv.cjs.map +0 -1
  243. package/dist/deploy-BWFFSN5p.mjs.map +0 -1
  244. package/dist/discover-CRywE7yc.cjs.map +0 -1
  245. package/dist/discover-DbDrCQ8h.mjs.map +0 -1
  246. package/dist/docker-BtUjo-J_.cjs.map +0 -1
  247. package/dist/docker-DhmU416x.mjs.map +0 -1
  248. package/dist/encryption-BCaweYBJ.mjs.map +0 -1
  249. package/dist/encryption-CU5O0Y61.cjs.map +0 -1
  250. package/dist/engine-BzeCK6e8.mjs.map +0 -1
  251. package/dist/engine-xrlcbr1g.cjs.map +0 -1
  252. package/dist/notes-DJyFkK13.cjs.map +0 -1
  253. package/dist/notes-TDHMzdVt.mjs.map +0 -1
  254. package/dist/ready-BjFMu_1J.mjs.map +0 -1
  255. package/dist/ready-eVMJIcWn.cjs.map +0 -1
  256. package/dist/stack-BmG-lKgD.cjs.map +0 -1
  257. package/dist/stack-Ds9jjpE1.mjs.map +0 -1
  258. package/dist/workspace-D4hzz6Xb.mjs.map +0 -1
  259. package/dist/workspace-DPSdiv-b.cjs.map +0 -1
@@ -1,11 +1,11 @@
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-CS3Dr-pv.cjs");
4
- const require_workspace = require("./workspace-DPSdiv-b.cjs");
3
+ const require_credentials = require("./credentials-CCCAy3NL.cjs");
4
+ const require_workspace = require("./workspace-p7gmCQVS.cjs");
5
5
  const require_define = require("./define-crmMcXFS.cjs");
6
- const require_discover = require("./discover-CRywE7yc.cjs");
7
- const require_stack = require("./stack-BmG-lKgD.cjs");
8
- const require_local = require("./local-Dc2h2Ex3.cjs");
6
+ const require_discover = require("./discover-39VKSE2i.cjs");
7
+ const require_stack = require("./stack-DaJ9D2Uc.cjs");
8
+ const require_local = require("./local-BIrl0ENw.cjs");
9
9
  const require_utils = require("./utils-D2Nk1Nv2.cjs");
10
10
  let node_path = require("node:path");
11
11
  let node_fs = require("node:fs");
@@ -498,4 +498,4 @@ Object.defineProperty(exports, "sst_exports", {
498
498
  }
499
499
  });
500
500
 
501
- //# sourceMappingURL=sst-CEs0bMxj.cjs.map
501
+ //# sourceMappingURL=sst-B_srWo15.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"sst-CEs0bMxj.cjs","names":["GkmError","join","GkmError","rm","existsSync","readFile","kebabCase","GkmError","appKey","CommandFailed","deployedInboxEnv","defineTarget","existsSync","join","MissingCredential","activeSandbox","LocalSandbox","detectPackageManager"],"sources":["../src/target/sst/health.ts","../src/target/sst/outputs.ts","../src/target/sst/index.ts"],"sourcesContent":["/**\n * Whether a released surface answers.\n *\n * The paths are the ones the local stack's healthchecks use\n * (`reconcile/apps.ts`): an API's `/health`, a site's `/`. A surface is\n * asked a few times, because a fresh deploy can take a moment to answer — a\n * Lambda's first start, a distribution still settling — and healthy means a\n * 2xx, after redirects.\n */\n\nimport { GkmError } from '../../errors';\nimport type { TargetEvent } from '../types';\n\nexport interface HealthCheckOptions {\n\t/** How many times a surface is asked before it counts as down. */\n\tattempts: number;\n\t/** The wait between two attempts. */\n\tdelayMs: number;\n\t/** How long one request may take. */\n\ttimeoutMs: number;\n\tsignal: AbortSignal;\n\temit: (event: TargetEvent) => void;\n}\n\n/** Surfaces that never answered healthy. */\nexport class SurfacesUnhealthy extends GkmError {\n\tconstructor(\n\t\treadonly stage: string,\n\t\t/** Each surface that failed, with the last thing it answered. */\n\t\treadonly surfaces: readonly {\n\t\t\tapp: string;\n\t\t\turl: string;\n\t\t\tstatus?: number;\n\t\t\terror?: string;\n\t\t}[],\n\t) {\n\t\tconst lines = surfaces.map(\n\t\t\t({ app, url, status, error }) =>\n\t\t\t\t` - ${app}: ${url} → ${status ?? error ?? 'no answer'}`,\n\t\t);\n\t\tsuper(\n\t\t\t`The \"${stage}\" stage was deployed, but ${surfaces.length === 1 ? 'a surface does' : 'surfaces do'} not answer healthy:\\n${lines.join('\\n')}\\nCheck its logs in CloudWatch, fix it, and deploy again.`,\n\t\t);\n\t\tthis.name = 'SurfacesUnhealthy';\n\t}\n}\n\n/** `path` under `base`, keeping any path `base` already has. */\nexport function healthUrl(base: string, path: string): string {\n\tconst root = base.endsWith('/') ? base : `${base}/`;\n\treturn new URL(path.replace(/^\\//, ''), root).toString();\n}\n\n/**\n * Ask `url` until it answers 2xx or the attempts run out, emitting\n * `health.checked` for each. Resolves with the last answer.\n */\nexport async function checkHealth(\n\tapp: string,\n\turl: string,\n\toptions: HealthCheckOptions,\n): Promise<{ healthy: boolean; status?: number; error?: string }> {\n\tlet last: { healthy: boolean; status?: number; error?: string } = {\n\t\thealthy: false,\n\t};\n\tfor (let attempt = 1; attempt <= options.attempts; attempt++) {\n\t\toptions.signal.throwIfAborted();\n\t\ttry {\n\t\t\tconst response = await fetch(url, {\n\t\t\t\tredirect: 'follow',\n\t\t\t\tsignal: AbortSignal.any([\n\t\t\t\t\toptions.signal,\n\t\t\t\t\tAbortSignal.timeout(options.timeoutMs),\n\t\t\t\t]),\n\t\t\t});\n\t\t\t// Drained, so the connection is not held open by an unread body.\n\t\t\tawait response.arrayBuffer().catch(() => undefined);\n\t\t\tlast = { healthy: response.ok, status: response.status };\n\t\t} catch (error) {\n\t\t\t// The run being stopped is not the surface being down.\n\t\t\toptions.signal.throwIfAborted();\n\t\t\tlast = {\n\t\t\t\thealthy: false,\n\t\t\t\terror: error instanceof Error ? error.message : String(error),\n\t\t\t};\n\t\t}\n\t\toptions.emit({\n\t\t\ttype: 'health.checked',\n\t\t\tapp,\n\t\t\turl,\n\t\t\thealthy: last.healthy,\n\t\t\t...(last.status !== undefined ? { status: last.status } : {}),\n\t\t\tattempt,\n\t\t});\n\t\tif (last.healthy) return last;\n\t\tif (attempt < options.attempts) await wait(options.delayMs, options.signal);\n\t}\n\treturn last;\n}\n\nfunction wait(ms: number, signal: AbortSignal): Promise<void> {\n\tif (ms <= 0) return Promise.resolve();\n\treturn new Promise((resolve, reject) => {\n\t\tconst timer = setTimeout(() => {\n\t\t\tsignal.removeEventListener('abort', stop);\n\t\t\tresolve();\n\t\t}, ms);\n\t\tconst stop = () => {\n\t\t\tclearTimeout(timer);\n\t\t\treject(signal.reason);\n\t\t};\n\t\tsignal.addEventListener('abort', stop, { once: true });\n\t});\n}\n","/**\n * The surface URLs an `sst deploy` reports.\n *\n * SST writes whatever `run()` in `sst.config.ts` returns to\n * `.sst/outputs.json` after every successful deploy — `{\"Api\": \"https://…\"}`.\n * What `run()` returns is the project's to write, so this reads it leniently:\n * nested objects are walked, anything that is not an http(s) URL is ignored,\n * and an output names a surface by its id in any casing, with or without a\n * `Url` suffix (`Api`, `api`, `ApiUrl`, `API_URL`, `Api.url`).\n */\n\nimport { existsSync } from 'node:fs';\nimport { readFile, rm } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { kebabCase } from '@geekmidas/manifest';\nimport { GkmError } from '../../errors';\n\n/** Where SST leaves the last successful deploy's outputs, under the project. */\nexport const SST_OUTPUTS_FILE = join('.sst', 'outputs.json');\n\n/** `.sst/outputs.json` is there, and is not JSON. */\nexport class SstOutputsUnreadable extends GkmError {\n\tconstructor(\n\t\treadonly path: string,\n\t\treadonly reason: string,\n\t) {\n\t\tsuper(\n\t\t\t`Could not read SST's outputs at ${path}: ${reason}. It is rewritten by every successful \\`sst deploy\\`; delete it and deploy again.`,\n\t\t);\n\t\tthis.name = 'SstOutputsUnreadable';\n\t}\n}\n\n/**\n * Remove what an earlier deploy wrote, so the outputs read after this one\n * are this one's — not another stage's, deployed from the same checkout.\n */\nexport async function clearOutputs(cwd: string): Promise<void> {\n\tawait rm(join(cwd, SST_OUTPUTS_FILE), { force: true });\n}\n\n/** The deploy's outputs, or `{}` when it wrote none. */\nexport async function readOutputs(cwd: string): Promise<unknown> {\n\tconst path = join(cwd, SST_OUTPUTS_FILE);\n\tif (!existsSync(path)) return {};\n\ttry {\n\t\treturn JSON.parse(await readFile(path, 'utf8'));\n\t} catch (error) {\n\t\tthrow new SstOutputsUnreadable(\n\t\t\tpath,\n\t\t\terror instanceof Error ? error.message : String(error),\n\t\t);\n\t}\n}\n\n/** Every http(s) URL in `outputs`, by its key path: `['Api', 'url']`. */\nfunction urlsIn(\n\tvalue: unknown,\n\tpath: string[] = [],\n\tfound: { path: string[]; url: string }[] = [],\n): { path: string[]; url: string }[] {\n\tif (typeof value === 'string') {\n\t\tif (isHttpUrl(value)) found.push({ path, url: value });\n\t} else if (value && typeof value === 'object' && !Array.isArray(value)) {\n\t\tfor (const [key, child] of Object.entries(value)) {\n\t\t\turlsIn(child, [...path, key], found);\n\t\t}\n\t}\n\treturn found;\n}\n\nfunction isHttpUrl(value: string): boolean {\n\ttry {\n\t\tconst { protocol } = new URL(value);\n\t\treturn protocol === 'http:' || protocol === 'https:';\n\t} catch {\n\t\treturn false;\n\t}\n}\n\n/**\n * The app an output's key path names, kebab-cased as app keys are: its last\n * segment, without a `url` suffix — or its parent's, when the last segment\n * is only `url`. Exact names are tried first, so an app called `api-url`\n * still finds `ApiUrl`.\n */\nfunction namesOf(path: string[]): string[] {\n\tconst names: string[] = [];\n\tfor (const segment of [...path].reverse()) {\n\t\tconst name = kebabCase(segment);\n\t\tnames.push(name);\n\t\tconst bare = name.replace(/-?url$/, '');\n\t\tif (bare) {\n\t\t\tnames.push(bare);\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn names;\n}\n\n/**\n * Each app's URL from the outputs, for the apps given. An app no output\n * names is left out.\n */\nexport function surfaceUrls(\n\toutputs: unknown,\n\tapps: readonly string[],\n): Record<string, string> {\n\tconst found = urlsIn(outputs);\n\tconst urls: Record<string, string> = {};\n\tfor (const app of apps) {\n\t\t// An exact name beats a stripped one, wherever each is in the file.\n\t\tconst exact = found.find(({ path }) => namesOf(path)[0] === app);\n\t\tconst loose = found.find(({ path }) => namesOf(path).includes(app));\n\t\tconst match = exact ?? loose;\n\t\tif (match) urls[app] = match.url;\n\t}\n\treturn urls;\n}\n","/**\n * The built-in `sst` target: `gkm build` writes the manifest, `sst deploy`\n * provisions it, and the surfaces SST reports are health-checked.\n *\n * `@geekmidas/cloud` is unchanged by it: `sst.config.ts` still reads\n * `.gkm/manifest/aws.ts` and `fromManifest` still makes every resource. What\n * the target adds is the run around the two commands — the lock, the events,\n * verification, and credentials kept where they belong.\n *\n * Both commands run in the sandbox: the build executes the project's code,\n * and so does `sst deploy`, which evaluates `sst.config.ts`. Only the second\n * needs AWS, so the AWS credential goes into that one command's environment\n * and nowhere else — not the build's, not the process the deploy runs in.\n * What `sst deploy` needs beyond them, the sandbox already passes: `PATH`\n * for node and the package manager, and `HOME`, under which SST keeps its\n * toolchain (`~/.config/sst`: bun, pulumi and its plugins) and the AWS SDK\n * finds `~/.aws` for a profile. Its state — the Pulumi backend and the\n * passphrase — is in the stage's own account, reached with that credential.\n */\n\nimport { existsSync } from 'node:fs';\nimport { join } from 'node:path';\nimport type { ConstructManifest } from '@geekmidas/manifest';\nimport { deployedInboxEnv } from '../../compose/stack';\nimport {\n\ttype AwsCredential,\n\tMissingCredential,\n} from '../../deploy/credentials';\nimport type { DeployResult } from '../../deploy/types';\nimport { GkmError } from '../../errors';\nimport { detectPackageManager, type PackageManager } from '../../init/utils';\nimport { CommandFailed } from '../../run';\nimport { LocalSandbox } from '../../sandbox/local';\nimport { activeSandbox, type Sandbox } from '../../sandbox/sandbox';\nimport { appKey } from '../../workspace/derive';\nimport { defineTarget } from '../define';\nimport type { DeployPhaseContext, DeployTarget } from '../types';\nimport { checkHealth, healthUrl, SurfacesUnhealthy } from './health';\nimport { clearOutputs, readOutputs, surfaceUrls } from './outputs';\n\nexport { SurfacesUnhealthy } from './health';\nexport { SST_OUTPUTS_FILE, SstOutputsUnreadable } from './outputs';\n\n/** A cold build of every handler and site. */\nconst BUILD_TIMEOUT_MS = 30 * 60_000;\n/**\n * A first deploy creates CloudFront distributions and, with a database, a\n * VPC and an RDS instance — each of which alone can take a quarter of an hour.\n */\nconst DEPLOY_TIMEOUT_MS = 90 * 60_000;\n\n/** The workspace has no `sst.config.ts` for `sst deploy` to run. */\nexport class SstConfigNotFound extends GkmError {\n\tconstructor(readonly cwd: string) {\n\t\tsuper(\n\t\t\t`No sst.config.ts in ${cwd}. The sst target runs \\`sst deploy\\` at the workspace root: scaffold one with \\`gkm init --deploy sst\\` and copy its sst.config.ts, or deploy through another target with --target.`,\n\t\t);\n\t\tthis.name = 'SstConfigNotFound';\n\t}\n}\n\n/** What the phases hand on. */\nexport interface SstRun {\n\tsandbox: Sandbox;\n\tpm: PackageManager;\n\taws: AwsCredential;\n\t/** The apps SST deploys this run: `ctx.apps` without the skipped. */\n\tapps: string[];\n\t/** Each app's URL, from the deploy's outputs. */\n\turls: Record<string, string>;\n}\n\nexport interface SstTargetOptions {\n\t/** How often, and how patiently, `verify` asks each surface. */\n\thealth?: { attempts?: number; delayMs?: number; timeoutMs?: number };\n}\n\n/**\n * The project's own copy of `bin`, through its package manager — never one\n * `npx` would download, which would be code nobody installed.\n */\nexport function projectCommand(\n\tpm: PackageManager,\n\tbin: string,\n\targs: readonly string[],\n): [command: string, args: string[]] {\n\tswitch (pm) {\n\t\tcase 'pnpm':\n\t\t\treturn ['pnpm', ['exec', bin, ...args]];\n\t\tcase 'yarn':\n\t\t\treturn ['yarn', [bin, ...args]];\n\t\tcase 'bun':\n\t\t\treturn ['bunx', [bin, ...args]];\n\t\tcase 'npm':\n\t\t\treturn ['npx', ['--no-install', bin, ...args]];\n\t}\n}\n\n/**\n * The variables `credential` is to the AWS SDK and to SST.\n *\n * A profile is passed alone: given keys too, every SDK would take the keys.\n */\nexport function awsEnv(credential: AwsCredential): Record<string, string> {\n\tconst region: Record<string, string> = credential.region\n\t\t? { AWS_REGION: credential.region, AWS_DEFAULT_REGION: credential.region }\n\t\t: {};\n\tif ('profile' in credential) {\n\t\treturn { AWS_PROFILE: credential.profile, ...region };\n\t}\n\treturn {\n\t\tAWS_ACCESS_KEY_ID: credential.accessKeyId,\n\t\tAWS_SECRET_ACCESS_KEY: credential.secretAccessKey,\n\t\t...(credential.sessionToken\n\t\t\t? { AWS_SESSION_TOKEN: credential.sessionToken }\n\t\t\t: {}),\n\t\t...region,\n\t};\n}\n\n/**\n * `env` without any `AWS_*`, so a host sandbox that passes some cannot put\n * a second account beside the one the credential names.\n */\nfunction withoutAws(\n\tenv: Readonly<Record<string, string>>,\n): Record<string, string> {\n\treturn Object.fromEntries(\n\t\tObject.entries(env).filter(([name]) => !name.startsWith('AWS_')),\n\t);\n}\n\n/** Each app's kind in the manifest, by app key: `rest-api` or `site`. */\nfunction kindsOf(manifest: ConstructManifest): Map<string, string> {\n\treturn new Map(\n\t\tObject.entries(manifest).map(([id, declaration]) => [\n\t\t\tappKey(id),\n\t\t\tdeclaration.kind,\n\t\t]),\n\t);\n}\n\nasync function exec(\n\tctx: DeployPhaseContext<unknown>,\n\trun: SstRun,\n\t[command, args]: [string, string[]],\n\toptions: { env: Record<string, string>; timeoutMs: number },\n): Promise<void> {\n\tconst result = await run.sandbox.exec(command, args, {\n\t\tcwd: ctx.cwd,\n\t\tenv: options.env,\n\t\ttimeoutMs: options.timeoutMs,\n\t\toutput: ctx.childOutput,\n\t\tsignal: ctx.signal,\n\t});\n\tif (result.exitCode !== 0) {\n\t\tthrow new CommandFailed(\n\t\t\tcommand,\n\t\t\targs,\n\t\t\tresult.exitCode,\n\t\t\tresult.signal as NodeJS.Signals | null,\n\t\t);\n\t}\n}\n\n/**\n * What SST reads for each inbox, by key: the stage's domain, and what the\n * inbox's provider made — its bucket's URL and its topic's string — from the\n * stage's secrets, read by the same rule as on compose. SST provisions none\n * of it; `fromManifest` references the topic and links the inbox's values.\n */\nexport async function inboxEnv(\n\tctx: DeployPhaseContext<unknown>,\n): Promise<Record<string, string>> {\n\tif (!Object.values(ctx.manifest).some((d) => d.kind === 'inbox')) return {};\n\tconst stored = await ctx.secrets.read();\n\tconst domain = ctx.workspace.domains?.[ctx.stage];\n\tconst env = deployedInboxEnv(ctx.manifest, {\n\t\treader: 'sst deploy',\n\t\tstage: ctx.stage,\n\t\tdomain,\n\t\tsecrets: stored?.custom ?? {},\n\t});\n\t// The URLs carry the provider's access key; the domain is public.\n\tfor (const value of Object.values(env)) {\n\t\tif (value !== domain) ctx.secrets.mask(value);\n\t}\n\treturn env;\n}\n\n/** The `sst` target, with its health checks tuned — for tests and hosts. */\nexport function createSstTarget(\n\toptions: SstTargetOptions = {},\n): DeployTarget<undefined, SstRun> {\n\tconst health = {\n\t\tattempts: options.health?.attempts ?? 6,\n\t\tdelayMs: options.health?.delayMs ?? 5_000,\n\t\ttimeoutMs: options.health?.timeoutMs ?? 10_000,\n\t};\n\n\treturn defineTarget<undefined, SstRun>({\n\t\tname: 'sst',\n\t\truntime: 'aws',\n\t\t// SST keeps no previous release to return to; migrations run in the\n\t\t// stack, as `fromManifest` provisions the database; and nothing here\n\t\t// builds an image.\n\t\tcapabilities: { rollback: false, migrations: 'target', images: false },\n\t\tcredentials: ['aws'],\n\n\t\tasync validate(ctx) {\n\t\t\tif (!existsSync(join(ctx.cwd, 'sst.config.ts'))) {\n\t\t\t\tthrow new SstConfigNotFound(ctx.cwd);\n\t\t\t}\n\n\t\t\tconst aws = await ctx.credentials.get(\n\t\t\t\t{ kind: 'aws', stage: ctx.stage },\n\t\t\t\t{ signal: ctx.signal },\n\t\t\t);\n\t\t\tif (!aws) throw new MissingCredential('aws', ctx.stage);\n\t\t\tif (!('profile' in aws)) {\n\t\t\t\tctx.secrets.mask(aws.secretAccessKey);\n\t\t\t\tif (aws.sessionToken) ctx.secrets.mask(aws.sessionToken);\n\t\t\t}\n\n\t\t\t// A mobile app ships through its own store's toolchain.\n\t\t\tfor (const app of ctx.apps) {\n\t\t\t\tif (ctx.workspace.apps[app]?.type === 'mobile') {\n\t\t\t\t\tctx.skip(app, 'mobile apps deploy through their own toolchain');\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst skipped = new Set(ctx.skipped.map(({ app }) => app));\n\t\t\tconst apps = ctx.apps.filter((app) => !skipped.has(app));\n\n\t\t\tctx.logger.info(\n\t\t\t\t`\\n🚀 Deploying \"${ctx.workspace.name}\" to the \"${ctx.stage}\" stage with SST`,\n\t\t\t);\n\t\t\tctx.logger.info(\n\t\t\t\t` AWS: ${'profile' in aws ? `profile \"${aws.profile}\"` : 'access keys'}`,\n\t\t\t);\n\t\t\t// `sst deploy` takes the whole stack: there is no deploying one app.\n\t\t\tconst deployable = Object.values(ctx.workspace.apps).filter(\n\t\t\t\t(app) => app.type !== 'mobile',\n\t\t\t).length;\n\t\t\tif (apps.length < deployable) {\n\t\t\t\tctx.logger.warn(\n\t\t\t\t\t` sst deploy deploys every construct of the stage, not only ${apps.join(', ')}.`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tsandbox: activeSandbox() ?? new LocalSandbox({ root: ctx.cwd }),\n\t\t\t\tpm: detectPackageManager(ctx.cwd),\n\t\t\t\taws,\n\t\t\t\tapps,\n\t\t\t\turls: {},\n\t\t\t};\n\t\t},\n\n\t\tasync plan(ctx, run) {\n\t\t\tconst kinds = kindsOf(ctx.manifest);\n\t\t\tfor (const app of run.apps) {\n\t\t\t\tctx.emit({\n\t\t\t\t\ttype: 'resource.planned',\n\t\t\t\t\tkey: `application:${app}`,\n\t\t\t\t\tresourceType: kinds.get(app) ?? 'application',\n\t\t\t\t\taction: 'ensure',\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst [build, buildArgs] = buildCommand(ctx, run);\n\t\t\tconst [deploy, deployArgs] = deployCommand(ctx, run);\n\t\t\tctx.logger.info(` Would run: ${[build, ...buildArgs].join(' ')}`);\n\t\t\tctx.logger.info(` Would run: ${[deploy, ...deployArgs].join(' ')}`);\n\t\t},\n\n\t\tasync build(ctx, run) {\n\t\t\tctx.logger.info('\\n📦 Building the manifest SST deploys');\n\t\t\t// No credential: the build runs the project's code and needs none.\n\t\t\tawait exec(ctx, run, buildCommand(ctx, run), {\n\t\t\t\tenv: { ...run.sandbox.env },\n\t\t\t\ttimeoutMs: BUILD_TIMEOUT_MS,\n\t\t\t});\n\t\t},\n\n\t\tasync release(ctx, run) {\n\t\t\tctx.logger.info(`\\n☁️ sst deploy --stage ${ctx.stage}`);\n\t\t\tawait clearOutputs(ctx.cwd);\n\t\t\tawait exec(ctx, run, deployCommand(ctx, run), {\n\t\t\t\tenv: {\n\t\t\t\t\t...withoutAws(run.sandbox.env),\n\t\t\t\t\t...(await inboxEnv(ctx)),\n\t\t\t\t\t...awsEnv(run.aws),\n\t\t\t\t},\n\t\t\t\ttimeoutMs: DEPLOY_TIMEOUT_MS,\n\t\t\t});\n\n\t\t\trun.urls = surfaceUrls(await readOutputs(ctx.cwd), run.apps);\n\t\t\tfor (const app of run.apps) {\n\t\t\t\tctx.emit({\n\t\t\t\t\ttype: 'app.deployed',\n\t\t\t\t\tapp,\n\t\t\t\t\tapplicationId: ctx.name(app),\n\t\t\t\t\t// SST builds no image a registry holds.\n\t\t\t\t\timageRef: '',\n\t\t\t\t\turl: run.urls[app] ?? '',\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\n\t\tasync verify(ctx, run) {\n\t\t\tconst unhealthy: SurfacesUnhealthy['surfaces'][number][] = [];\n\t\t\tconst kinds = kindsOf(ctx.manifest);\n\n\t\t\tfor (const app of run.apps) {\n\t\t\t\tconst path = healthPath(kinds.get(app), ctx.workspace.apps[app]?.type);\n\t\t\t\tif (!path) {\n\t\t\t\t\tctx.logger.info(\n\t\t\t\t\t\t` ${app}: API Gateway holds its sockets and has no HTTP path to ask, so it was not checked.`,\n\t\t\t\t\t);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst base = run.urls[app];\n\t\t\t\tif (!base) {\n\t\t\t\t\tctx.logger.warn(\n\t\t\t\t\t\t` ⚠ No URL for ${app} in SST's outputs, so it was not checked. Return it from run() in sst.config.ts — { ${app}: <its url> } — to have it checked.`,\n\t\t\t\t\t);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst url = healthUrl(base, path);\n\t\t\t\tconst answer = await checkHealth(app, url, {\n\t\t\t\t\t...health,\n\t\t\t\t\tsignal: ctx.signal,\n\t\t\t\t\temit: ctx.emit,\n\t\t\t\t});\n\t\t\t\tif (answer.healthy) {\n\t\t\t\t\tctx.logger.info(` ✓ ${app}: ${url}`);\n\t\t\t\t} else {\n\t\t\t\t\tunhealthy.push({\n\t\t\t\t\t\tapp,\n\t\t\t\t\t\turl,\n\t\t\t\t\t\t...(answer.status !== undefined ? { status: answer.status } : {}),\n\t\t\t\t\t\t...(answer.error ? { error: answer.error } : {}),\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (unhealthy.length > 0) {\n\t\t\t\tthrow new SurfacesUnhealthy(ctx.stage, unhealthy);\n\t\t\t}\n\t\t},\n\n\t\tresult(ctx, run): DeployResult {\n\t\t\treturn {\n\t\t\t\tapps: run.apps.map((appName) => ({\n\t\t\t\t\tappName,\n\t\t\t\t\ttype: ctx.workspace.apps[appName]?.type ?? 'backend',\n\t\t\t\t\tsuccess: true,\n\t\t\t\t\t...(run.urls[appName] ? { url: run.urls[appName] } : {}),\n\t\t\t\t})),\n\t\t\t\tprojectId: '',\n\t\t\t\tenvironmentId: '',\n\t\t\t\tsuccessCount: ctx.dryRun ? 0 : run.apps.length,\n\t\t\t\tfailedCount: 0,\n\t\t\t\tstage: ctx.stage,\n\t\t\t\tidentity: ctx.identity.key,\n\t\t\t\ttag: ctx.tag,\n\t\t\t\tdryRun: ctx.dryRun,\n\t\t\t\tskipped: [...ctx.skipped],\n\t\t\t\turls: { ...run.urls },\n\t\t\t\tchanges: [],\n\t\t\t};\n\t\t},\n\t});\n}\n\nfunction buildCommand(\n\tctx: DeployPhaseContext<unknown>,\n\trun: SstRun,\n): [string, string[]] {\n\treturn projectCommand(run.pm, 'gkm', [\n\t\t'build',\n\t\t'--provider',\n\t\t'aws',\n\t\t'--stage',\n\t\tctx.stage,\n\t]);\n}\n\nfunction deployCommand(\n\tctx: DeployPhaseContext<unknown>,\n\trun: SstRun,\n): [string, string[]] {\n\treturn projectCommand(run.pm, 'sst', ['deploy', '--stage', ctx.stage]);\n}\n\n/**\n * The path a released app is asked on: a backend's `/health`, a site's `/`.\n * A WebSocket surface has none on AWS — API Gateway answers its handshake,\n * and its routes are Lambdas behind it — so it is not asked.\n */\nexport function healthPath(\n\tkind: string | undefined,\n\tappType: string | undefined,\n): string | undefined {\n\tif (kind === 'websocket-api') return undefined;\n\t// A surface — a `rest-api` — is the backend app it derives.\n\treturn appType === 'backend' ? '/health' : '/';\n}\n\nexport const sstTarget = createSstTarget();\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAa,oBAAb,cAAuCA,eAAAA,SAAS;CAErC;CAEA;CAHV,YACC,OAEA,UAMC;EACD,MAAM,QAAQ,SAAS,KACrB,EAAE,KAAK,KAAK,QAAQ,YACpB,OAAO,IAAI,IAAI,IAAI,KAAK,UAAU,SAAS,aAC7C;EACA,MACC,QAAQ,MAAM,4BAA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YAAY,gBAAgB"}
1
+ {"version":3,"file":"sst-B_srWo15.cjs","names":["GkmError","join","GkmError","rm","existsSync","readFile","kebabCase","GkmError","appKey","CommandFailed","deployedInboxEnv","defineTarget","existsSync","join","MissingCredential","activeSandbox","LocalSandbox","detectPackageManager"],"sources":["../src/target/sst/health.ts","../src/target/sst/outputs.ts","../src/target/sst/index.ts"],"sourcesContent":["/**\n * Whether a released surface answers.\n *\n * The paths are the ones the local stack's healthchecks use\n * (`reconcile/apps.ts`): an API's `/health`, a site's `/`. A surface is\n * asked a few times, because a fresh deploy can take a moment to answer — a\n * Lambda's first start, a distribution still settling — and healthy means a\n * 2xx, after redirects.\n */\n\nimport { GkmError } from '../../errors';\nimport type { TargetEvent } from '../types';\n\nexport interface HealthCheckOptions {\n\t/** How many times a surface is asked before it counts as down. */\n\tattempts: number;\n\t/** The wait between two attempts. */\n\tdelayMs: number;\n\t/** How long one request may take. */\n\ttimeoutMs: number;\n\tsignal: AbortSignal;\n\temit: (event: TargetEvent) => void;\n}\n\n/** Surfaces that never answered healthy. */\nexport class SurfacesUnhealthy extends GkmError {\n\tconstructor(\n\t\treadonly stage: string,\n\t\t/** Each surface that failed, with the last thing it answered. */\n\t\treadonly surfaces: readonly {\n\t\t\tapp: string;\n\t\t\turl: string;\n\t\t\tstatus?: number;\n\t\t\terror?: string;\n\t\t}[],\n\t) {\n\t\tconst lines = surfaces.map(\n\t\t\t({ app, url, status, error }) =>\n\t\t\t\t` - ${app}: ${url} → ${status ?? error ?? 'no answer'}`,\n\t\t);\n\t\tsuper(\n\t\t\t`The \"${stage}\" stage was deployed, but ${surfaces.length === 1 ? 'a surface does' : 'surfaces do'} not answer healthy:\\n${lines.join('\\n')}\\nCheck its logs in CloudWatch, fix it, and deploy again.`,\n\t\t);\n\t\tthis.name = 'SurfacesUnhealthy';\n\t}\n}\n\n/** `path` under `base`, keeping any path `base` already has. */\nexport function healthUrl(base: string, path: string): string {\n\tconst root = base.endsWith('/') ? base : `${base}/`;\n\treturn new URL(path.replace(/^\\//, ''), root).toString();\n}\n\n/**\n * Ask `url` until it answers 2xx or the attempts run out, emitting\n * `health.checked` for each. Resolves with the last answer.\n */\nexport async function checkHealth(\n\tapp: string,\n\turl: string,\n\toptions: HealthCheckOptions,\n): Promise<{ healthy: boolean; status?: number; error?: string }> {\n\tlet last: { healthy: boolean; status?: number; error?: string } = {\n\t\thealthy: false,\n\t};\n\tfor (let attempt = 1; attempt <= options.attempts; attempt++) {\n\t\toptions.signal.throwIfAborted();\n\t\ttry {\n\t\t\tconst response = await fetch(url, {\n\t\t\t\tredirect: 'follow',\n\t\t\t\tsignal: AbortSignal.any([\n\t\t\t\t\toptions.signal,\n\t\t\t\t\tAbortSignal.timeout(options.timeoutMs),\n\t\t\t\t]),\n\t\t\t});\n\t\t\t// Drained, so the connection is not held open by an unread body.\n\t\t\tawait response.arrayBuffer().catch(() => undefined);\n\t\t\tlast = { healthy: response.ok, status: response.status };\n\t\t} catch (error) {\n\t\t\t// The run being stopped is not the surface being down.\n\t\t\toptions.signal.throwIfAborted();\n\t\t\tlast = {\n\t\t\t\thealthy: false,\n\t\t\t\terror: error instanceof Error ? error.message : String(error),\n\t\t\t};\n\t\t}\n\t\toptions.emit({\n\t\t\ttype: 'health.checked',\n\t\t\tapp,\n\t\t\turl,\n\t\t\thealthy: last.healthy,\n\t\t\t...(last.status !== undefined ? { status: last.status } : {}),\n\t\t\tattempt,\n\t\t});\n\t\tif (last.healthy) return last;\n\t\tif (attempt < options.attempts) await wait(options.delayMs, options.signal);\n\t}\n\treturn last;\n}\n\nfunction wait(ms: number, signal: AbortSignal): Promise<void> {\n\tif (ms <= 0) return Promise.resolve();\n\treturn new Promise((resolve, reject) => {\n\t\tconst timer = setTimeout(() => {\n\t\t\tsignal.removeEventListener('abort', stop);\n\t\t\tresolve();\n\t\t}, ms);\n\t\tconst stop = () => {\n\t\t\tclearTimeout(timer);\n\t\t\treject(signal.reason);\n\t\t};\n\t\tsignal.addEventListener('abort', stop, { once: true });\n\t});\n}\n","/**\n * The surface URLs an `sst deploy` reports.\n *\n * SST writes whatever `run()` in `sst.config.ts` returns to\n * `.sst/outputs.json` after every successful deploy — `{\"Api\": \"https://…\"}`.\n * What `run()` returns is the project's to write, so this reads it leniently:\n * nested objects are walked, anything that is not an http(s) URL is ignored,\n * and an output names a surface by its id in any casing, with or without a\n * `Url` suffix (`Api`, `api`, `ApiUrl`, `API_URL`, `Api.url`).\n */\n\nimport { existsSync } from 'node:fs';\nimport { readFile, rm } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { kebabCase } from '@geekmidas/manifest';\nimport { GkmError } from '../../errors';\n\n/** Where SST leaves the last successful deploy's outputs, under the project. */\nexport const SST_OUTPUTS_FILE = join('.sst', 'outputs.json');\n\n/** `.sst/outputs.json` is there, and is not JSON. */\nexport class SstOutputsUnreadable extends GkmError {\n\tconstructor(\n\t\treadonly path: string,\n\t\treadonly reason: string,\n\t) {\n\t\tsuper(\n\t\t\t`Could not read SST's outputs at ${path}: ${reason}. It is rewritten by every successful \\`sst deploy\\`; delete it and deploy again.`,\n\t\t);\n\t\tthis.name = 'SstOutputsUnreadable';\n\t}\n}\n\n/**\n * Remove what an earlier deploy wrote, so the outputs read after this one\n * are this one's — not another stage's, deployed from the same checkout.\n */\nexport async function clearOutputs(cwd: string): Promise<void> {\n\tawait rm(join(cwd, SST_OUTPUTS_FILE), { force: true });\n}\n\n/** The deploy's outputs, or `{}` when it wrote none. */\nexport async function readOutputs(cwd: string): Promise<unknown> {\n\tconst path = join(cwd, SST_OUTPUTS_FILE);\n\tif (!existsSync(path)) return {};\n\ttry {\n\t\treturn JSON.parse(await readFile(path, 'utf8'));\n\t} catch (error) {\n\t\tthrow new SstOutputsUnreadable(\n\t\t\tpath,\n\t\t\terror instanceof Error ? error.message : String(error),\n\t\t);\n\t}\n}\n\n/** Every http(s) URL in `outputs`, by its key path: `['Api', 'url']`. */\nfunction urlsIn(\n\tvalue: unknown,\n\tpath: string[] = [],\n\tfound: { path: string[]; url: string }[] = [],\n): { path: string[]; url: string }[] {\n\tif (typeof value === 'string') {\n\t\tif (isHttpUrl(value)) found.push({ path, url: value });\n\t} else if (value && typeof value === 'object' && !Array.isArray(value)) {\n\t\tfor (const [key, child] of Object.entries(value)) {\n\t\t\turlsIn(child, [...path, key], found);\n\t\t}\n\t}\n\treturn found;\n}\n\nfunction isHttpUrl(value: string): boolean {\n\ttry {\n\t\tconst { protocol } = new URL(value);\n\t\treturn protocol === 'http:' || protocol === 'https:';\n\t} catch {\n\t\treturn false;\n\t}\n}\n\n/**\n * The app an output's key path names, kebab-cased as app keys are: its last\n * segment, without a `url` suffix — or its parent's, when the last segment\n * is only `url`. Exact names are tried first, so an app called `api-url`\n * still finds `ApiUrl`.\n */\nfunction namesOf(path: string[]): string[] {\n\tconst names: string[] = [];\n\tfor (const segment of [...path].reverse()) {\n\t\tconst name = kebabCase(segment);\n\t\tnames.push(name);\n\t\tconst bare = name.replace(/-?url$/, '');\n\t\tif (bare) {\n\t\t\tnames.push(bare);\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn names;\n}\n\n/**\n * Each app's URL from the outputs, for the apps given. An app no output\n * names is left out.\n */\nexport function surfaceUrls(\n\toutputs: unknown,\n\tapps: readonly string[],\n): Record<string, string> {\n\tconst found = urlsIn(outputs);\n\tconst urls: Record<string, string> = {};\n\tfor (const app of apps) {\n\t\t// An exact name beats a stripped one, wherever each is in the file.\n\t\tconst exact = found.find(({ path }) => namesOf(path)[0] === app);\n\t\tconst loose = found.find(({ path }) => namesOf(path).includes(app));\n\t\tconst match = exact ?? loose;\n\t\tif (match) urls[app] = match.url;\n\t}\n\treturn urls;\n}\n","/**\n * The built-in `sst` target: `gkm build` writes the manifest, `sst deploy`\n * provisions it, and the surfaces SST reports are health-checked.\n *\n * `@geekmidas/cloud` is unchanged by it: `sst.config.ts` still reads\n * `.gkm/manifest/aws.ts` and `fromManifest` still makes every resource. What\n * the target adds is the run around the two commands — the lock, the events,\n * verification, and credentials kept where they belong.\n *\n * Both commands run in the sandbox: the build executes the project's code,\n * and so does `sst deploy`, which evaluates `sst.config.ts`. Only the second\n * needs AWS, so the AWS credential goes into that one command's environment\n * and nowhere else — not the build's, not the process the deploy runs in.\n * What `sst deploy` needs beyond them, the sandbox already passes: `PATH`\n * for node and the package manager, and `HOME`, under which SST keeps its\n * toolchain (`~/.config/sst`: bun, pulumi and its plugins) and the AWS SDK\n * finds `~/.aws` for a profile. Its state — the Pulumi backend and the\n * passphrase — is in the stage's own account, reached with that credential.\n */\n\nimport { existsSync } from 'node:fs';\nimport { join } from 'node:path';\nimport type { ConstructManifest } from '@geekmidas/manifest';\nimport { deployedInboxEnv } from '../../compose/stack';\nimport {\n\ttype AwsCredential,\n\tMissingCredential,\n} from '../../deploy/credentials';\nimport type { DeployResult } from '../../deploy/types';\nimport { GkmError } from '../../errors';\nimport { detectPackageManager, type PackageManager } from '../../init/utils';\nimport { CommandFailed } from '../../run';\nimport { LocalSandbox } from '../../sandbox/local';\nimport { activeSandbox, type Sandbox } from '../../sandbox/sandbox';\nimport { appKey } from '../../workspace/derive';\nimport { defineTarget } from '../define';\nimport type { DeployPhaseContext, DeployTarget } from '../types';\nimport { checkHealth, healthUrl, SurfacesUnhealthy } from './health';\nimport { clearOutputs, readOutputs, surfaceUrls } from './outputs';\n\nexport { SurfacesUnhealthy } from './health';\nexport { SST_OUTPUTS_FILE, SstOutputsUnreadable } from './outputs';\n\n/** A cold build of every handler and site. */\nconst BUILD_TIMEOUT_MS = 30 * 60_000;\n/**\n * A first deploy creates CloudFront distributions and, with a database, a\n * VPC and an RDS instance — each of which alone can take a quarter of an hour.\n */\nconst DEPLOY_TIMEOUT_MS = 90 * 60_000;\n\n/** The workspace has no `sst.config.ts` for `sst deploy` to run. */\nexport class SstConfigNotFound extends GkmError {\n\tconstructor(readonly cwd: string) {\n\t\tsuper(\n\t\t\t`No sst.config.ts in ${cwd}. The sst target runs \\`sst deploy\\` at the workspace root: scaffold one with \\`gkm init --deploy sst\\` and copy its sst.config.ts, or deploy through another target with --target.`,\n\t\t);\n\t\tthis.name = 'SstConfigNotFound';\n\t}\n}\n\n/** What the phases hand on. */\nexport interface SstRun {\n\tsandbox: Sandbox;\n\tpm: PackageManager;\n\taws: AwsCredential;\n\t/** The apps SST deploys this run: `ctx.apps` without the skipped. */\n\tapps: string[];\n\t/** Each app's URL, from the deploy's outputs. */\n\turls: Record<string, string>;\n}\n\nexport interface SstTargetOptions {\n\t/** How often, and how patiently, `verify` asks each surface. */\n\thealth?: { attempts?: number; delayMs?: number; timeoutMs?: number };\n}\n\n/**\n * The project's own copy of `bin`, through its package manager — never one\n * `npx` would download, which would be code nobody installed.\n */\nexport function projectCommand(\n\tpm: PackageManager,\n\tbin: string,\n\targs: readonly string[],\n): [command: string, args: string[]] {\n\tswitch (pm) {\n\t\tcase 'pnpm':\n\t\t\treturn ['pnpm', ['exec', bin, ...args]];\n\t\tcase 'yarn':\n\t\t\treturn ['yarn', [bin, ...args]];\n\t\tcase 'bun':\n\t\t\treturn ['bunx', [bin, ...args]];\n\t\tcase 'npm':\n\t\t\treturn ['npx', ['--no-install', bin, ...args]];\n\t}\n}\n\n/**\n * The variables `credential` is to the AWS SDK and to SST.\n *\n * A profile is passed alone: given keys too, every SDK would take the keys.\n */\nexport function awsEnv(credential: AwsCredential): Record<string, string> {\n\tconst region: Record<string, string> = credential.region\n\t\t? { AWS_REGION: credential.region, AWS_DEFAULT_REGION: credential.region }\n\t\t: {};\n\tif ('profile' in credential) {\n\t\treturn { AWS_PROFILE: credential.profile, ...region };\n\t}\n\treturn {\n\t\tAWS_ACCESS_KEY_ID: credential.accessKeyId,\n\t\tAWS_SECRET_ACCESS_KEY: credential.secretAccessKey,\n\t\t...(credential.sessionToken\n\t\t\t? { AWS_SESSION_TOKEN: credential.sessionToken }\n\t\t\t: {}),\n\t\t...region,\n\t};\n}\n\n/**\n * `env` without any `AWS_*`, so a host sandbox that passes some cannot put\n * a second account beside the one the credential names.\n */\nfunction withoutAws(\n\tenv: Readonly<Record<string, string>>,\n): Record<string, string> {\n\treturn Object.fromEntries(\n\t\tObject.entries(env).filter(([name]) => !name.startsWith('AWS_')),\n\t);\n}\n\n/** Each app's kind in the manifest, by app key: `rest-api` or `site`. */\nfunction kindsOf(manifest: ConstructManifest): Map<string, string> {\n\treturn new Map(\n\t\tObject.entries(manifest).map(([id, declaration]) => [\n\t\t\tappKey(id),\n\t\t\tdeclaration.kind,\n\t\t]),\n\t);\n}\n\nasync function exec(\n\tctx: DeployPhaseContext<unknown>,\n\trun: SstRun,\n\t[command, args]: [string, string[]],\n\toptions: { env: Record<string, string>; timeoutMs: number },\n): Promise<void> {\n\tconst result = await run.sandbox.exec(command, args, {\n\t\tcwd: ctx.cwd,\n\t\tenv: options.env,\n\t\ttimeoutMs: options.timeoutMs,\n\t\toutput: ctx.childOutput,\n\t\tsignal: ctx.signal,\n\t});\n\tif (result.exitCode !== 0) {\n\t\tthrow new CommandFailed(\n\t\t\tcommand,\n\t\t\targs,\n\t\t\tresult.exitCode,\n\t\t\tresult.signal as NodeJS.Signals | null,\n\t\t);\n\t}\n}\n\n/**\n * What SST reads for each inbox, by key: the stage's domain, and what the\n * inbox's provider made — its bucket's URL and its topic's string — from the\n * stage's secrets, read by the same rule as on compose. SST provisions none\n * of it; `fromManifest` references the topic and links the inbox's values.\n */\nexport async function inboxEnv(\n\tctx: DeployPhaseContext<unknown>,\n): Promise<Record<string, string>> {\n\tif (!Object.values(ctx.manifest).some((d) => d.kind === 'inbox')) return {};\n\tconst stored = await ctx.secrets.read();\n\tconst domain = ctx.workspace.domains?.[ctx.stage];\n\tconst env = deployedInboxEnv(ctx.manifest, {\n\t\treader: 'sst deploy',\n\t\tstage: ctx.stage,\n\t\tdomain,\n\t\tsecrets: stored?.custom ?? {},\n\t});\n\t// The URLs carry the provider's access key; the domain is public.\n\tfor (const value of Object.values(env)) {\n\t\tif (value !== domain) ctx.secrets.mask(value);\n\t}\n\treturn env;\n}\n\n/** The `sst` target, with its health checks tuned — for tests and hosts. */\nexport function createSstTarget(\n\toptions: SstTargetOptions = {},\n): DeployTarget<undefined, SstRun> {\n\tconst health = {\n\t\tattempts: options.health?.attempts ?? 6,\n\t\tdelayMs: options.health?.delayMs ?? 5_000,\n\t\ttimeoutMs: options.health?.timeoutMs ?? 10_000,\n\t};\n\n\treturn defineTarget<undefined, SstRun>({\n\t\tname: 'sst',\n\t\truntime: 'aws',\n\t\t// SST keeps no previous release to return to; migrations run in the\n\t\t// stack, as `fromManifest` provisions the database; and nothing here\n\t\t// builds an image.\n\t\tcapabilities: { rollback: false, migrations: 'target', images: false },\n\t\tcredentials: ['aws'],\n\n\t\tasync validate(ctx) {\n\t\t\tif (!existsSync(join(ctx.cwd, 'sst.config.ts'))) {\n\t\t\t\tthrow new SstConfigNotFound(ctx.cwd);\n\t\t\t}\n\n\t\t\tconst aws = await ctx.credentials.get(\n\t\t\t\t{ kind: 'aws', stage: ctx.stage },\n\t\t\t\t{ signal: ctx.signal },\n\t\t\t);\n\t\t\tif (!aws) throw new MissingCredential('aws', ctx.stage);\n\t\t\tif (!('profile' in aws)) {\n\t\t\t\tctx.secrets.mask(aws.secretAccessKey);\n\t\t\t\tif (aws.sessionToken) ctx.secrets.mask(aws.sessionToken);\n\t\t\t}\n\n\t\t\t// A mobile app ships through its own store's toolchain.\n\t\t\tfor (const app of ctx.apps) {\n\t\t\t\tif (ctx.workspace.apps[app]?.type === 'mobile') {\n\t\t\t\t\tctx.skip(app, 'mobile apps deploy through their own toolchain');\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst skipped = new Set(ctx.skipped.map(({ app }) => app));\n\t\t\tconst apps = ctx.apps.filter((app) => !skipped.has(app));\n\n\t\t\tctx.logger.info(\n\t\t\t\t`\\n🚀 Deploying \"${ctx.workspace.name}\" to the \"${ctx.stage}\" stage with SST`,\n\t\t\t);\n\t\t\tctx.logger.info(\n\t\t\t\t` AWS: ${'profile' in aws ? `profile \"${aws.profile}\"` : 'access keys'}`,\n\t\t\t);\n\t\t\t// `sst deploy` takes the whole stack: there is no deploying one app.\n\t\t\tconst deployable = Object.values(ctx.workspace.apps).filter(\n\t\t\t\t(app) => app.type !== 'mobile',\n\t\t\t).length;\n\t\t\tif (apps.length < deployable) {\n\t\t\t\tctx.logger.warn(\n\t\t\t\t\t` sst deploy deploys every construct of the stage, not only ${apps.join(', ')}.`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tsandbox: activeSandbox() ?? new LocalSandbox({ root: ctx.cwd }),\n\t\t\t\tpm: detectPackageManager(ctx.cwd),\n\t\t\t\taws,\n\t\t\t\tapps,\n\t\t\t\turls: {},\n\t\t\t};\n\t\t},\n\n\t\tasync plan(ctx, run) {\n\t\t\tconst kinds = kindsOf(ctx.manifest);\n\t\t\tfor (const app of run.apps) {\n\t\t\t\tctx.emit({\n\t\t\t\t\ttype: 'resource.planned',\n\t\t\t\t\tkey: `application:${app}`,\n\t\t\t\t\tresourceType: kinds.get(app) ?? 'application',\n\t\t\t\t\taction: 'ensure',\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst [build, buildArgs] = buildCommand(ctx, run);\n\t\t\tconst [deploy, deployArgs] = deployCommand(ctx, run);\n\t\t\tctx.logger.info(` Would run: ${[build, ...buildArgs].join(' ')}`);\n\t\t\tctx.logger.info(` Would run: ${[deploy, ...deployArgs].join(' ')}`);\n\t\t},\n\n\t\tasync build(ctx, run) {\n\t\t\tctx.logger.info('\\n📦 Building the manifest SST deploys');\n\t\t\t// No credential: the build runs the project's code and needs none.\n\t\t\tawait exec(ctx, run, buildCommand(ctx, run), {\n\t\t\t\tenv: { ...run.sandbox.env },\n\t\t\t\ttimeoutMs: BUILD_TIMEOUT_MS,\n\t\t\t});\n\t\t},\n\n\t\tasync release(ctx, run) {\n\t\t\tctx.logger.info(`\\n☁️ sst deploy --stage ${ctx.stage}`);\n\t\t\tawait clearOutputs(ctx.cwd);\n\t\t\tawait exec(ctx, run, deployCommand(ctx, run), {\n\t\t\t\tenv: {\n\t\t\t\t\t...withoutAws(run.sandbox.env),\n\t\t\t\t\t...(await inboxEnv(ctx)),\n\t\t\t\t\t...awsEnv(run.aws),\n\t\t\t\t},\n\t\t\t\ttimeoutMs: DEPLOY_TIMEOUT_MS,\n\t\t\t});\n\n\t\t\trun.urls = surfaceUrls(await readOutputs(ctx.cwd), run.apps);\n\t\t\tfor (const app of run.apps) {\n\t\t\t\tctx.emit({\n\t\t\t\t\ttype: 'app.deployed',\n\t\t\t\t\tapp,\n\t\t\t\t\tapplicationId: ctx.name(app),\n\t\t\t\t\t// SST builds no image a registry holds.\n\t\t\t\t\timageRef: '',\n\t\t\t\t\turl: run.urls[app] ?? '',\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\n\t\tasync verify(ctx, run) {\n\t\t\tconst unhealthy: SurfacesUnhealthy['surfaces'][number][] = [];\n\t\t\tconst kinds = kindsOf(ctx.manifest);\n\n\t\t\tfor (const app of run.apps) {\n\t\t\t\tconst path = healthPath(kinds.get(app), ctx.workspace.apps[app]?.type);\n\t\t\t\tif (!path) {\n\t\t\t\t\tctx.logger.info(\n\t\t\t\t\t\t` ${app}: API Gateway holds its sockets and has no HTTP path to ask, so it was not checked.`,\n\t\t\t\t\t);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst base = run.urls[app];\n\t\t\t\tif (!base) {\n\t\t\t\t\tctx.logger.warn(\n\t\t\t\t\t\t` ⚠ No URL for ${app} in SST's outputs, so it was not checked. Return it from run() in sst.config.ts — { ${app}: <its url> } — to have it checked.`,\n\t\t\t\t\t);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst url = healthUrl(base, path);\n\t\t\t\tconst answer = await checkHealth(app, url, {\n\t\t\t\t\t...health,\n\t\t\t\t\tsignal: ctx.signal,\n\t\t\t\t\temit: ctx.emit,\n\t\t\t\t});\n\t\t\t\tif (answer.healthy) {\n\t\t\t\t\tctx.logger.info(` ✓ ${app}: ${url}`);\n\t\t\t\t} else {\n\t\t\t\t\tunhealthy.push({\n\t\t\t\t\t\tapp,\n\t\t\t\t\t\turl,\n\t\t\t\t\t\t...(answer.status !== undefined ? { status: answer.status } : {}),\n\t\t\t\t\t\t...(answer.error ? { error: answer.error } : {}),\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (unhealthy.length > 0) {\n\t\t\t\tthrow new SurfacesUnhealthy(ctx.stage, unhealthy);\n\t\t\t}\n\t\t},\n\n\t\tresult(ctx, run): DeployResult {\n\t\t\treturn {\n\t\t\t\tapps: run.apps.map((appName) => ({\n\t\t\t\t\tappName,\n\t\t\t\t\ttype: ctx.workspace.apps[appName]?.type ?? 'backend',\n\t\t\t\t\tsuccess: true,\n\t\t\t\t\t...(run.urls[appName] ? { url: run.urls[appName] } : {}),\n\t\t\t\t})),\n\t\t\t\tprojectId: '',\n\t\t\t\tenvironmentId: '',\n\t\t\t\tsuccessCount: ctx.dryRun ? 0 : run.apps.length,\n\t\t\t\tfailedCount: 0,\n\t\t\t\tstage: ctx.stage,\n\t\t\t\tidentity: ctx.identity.key,\n\t\t\t\ttag: ctx.tag,\n\t\t\t\tdryRun: ctx.dryRun,\n\t\t\t\tskipped: [...ctx.skipped],\n\t\t\t\turls: { ...run.urls },\n\t\t\t\tchanges: [],\n\t\t\t};\n\t\t},\n\t});\n}\n\nfunction buildCommand(\n\tctx: DeployPhaseContext<unknown>,\n\trun: SstRun,\n): [string, string[]] {\n\treturn projectCommand(run.pm, 'gkm', [\n\t\t'build',\n\t\t'--provider',\n\t\t'aws',\n\t\t'--stage',\n\t\tctx.stage,\n\t]);\n}\n\nfunction deployCommand(\n\tctx: DeployPhaseContext<unknown>,\n\trun: SstRun,\n): [string, string[]] {\n\treturn projectCommand(run.pm, 'sst', ['deploy', '--stage', ctx.stage]);\n}\n\n/**\n * The path a released app is asked on: a backend's `/health`, a site's `/`.\n * A WebSocket surface has none on AWS — API Gateway answers its handshake,\n * and its routes are Lambdas behind it — so it is not asked.\n */\nexport function healthPath(\n\tkind: string | undefined,\n\tappType: string | undefined,\n): string | undefined {\n\tif (kind === 'websocket-api') return undefined;\n\t// A surface — a `rest-api` — is the backend app it derives.\n\treturn appType === 'backend' ? '/health' : '/';\n}\n\nexport const sstTarget = createSstTarget();\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAa,oBAAb,cAAuCA,eAAAA,SAAS;CAErC;CAEA;CAHV,YACC,OAEA,UAMC;EACD,MAAM,QAAQ,SAAS,KACrB,EAAE,KAAK,KAAK,QAAQ,YACpB,OAAO,IAAI,IAAI,IAAI,KAAK,UAAU,SAAS,aAC7C;EACA,MACC,QAAQ,MAAM,4BAA4B,SAAS,WAAW,IAAI,mBAAmB,cAAc,wBAAwB,MAAM,KAAK,IAAI,EAAE,0DAC7I;EAfS,KAAA,QAAA;EAEA,KAAA,WAAA;EAcT,KAAK,OAAO;CACb;AACD;;AAGA,SAAgB,UAAU,MAAc,MAAsB;CAC7D,MAAM,OAAO,KAAK,SAAS,GAAG,IAAI,OAAO,GAAG,KAAK;CACjD,OAAO,IAAI,IAAI,KAAK,QAAQ,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC,SAAS;AACxD;;;;;AAMA,eAAsB,YACrB,KACA,KACA,SACiE;CACjE,IAAI,OAA8D,EACjE,SAAS,MACV;CACA,KAAK,IAAI,UAAU,GAAG,WAAW,QAAQ,UAAU,WAAW;EAC7D,QAAQ,OAAO,eAAe;EAC9B,IAAI;GACH,MAAM,WAAW,MAAM,MAAM,KAAK;IACjC,UAAU;IACV,QAAQ,YAAY,IAAI,CACvB,QAAQ,QACR,YAAY,QAAQ,QAAQ,SAAS,CACtC,CAAC;GACF,CAAC;GAED,MAAM,SAAS,YAAY,CAAC,CAAC,YAAY,KAAA,CAAS;GAClD,OAAO;IAAE,SAAS,SAAS;IAAI,QAAQ,SAAS;GAAO;EACxD,SAAS,OAAO;GAEf,QAAQ,OAAO,eAAe;GAC9B,OAA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AC,GAAG,IAAI,OAAO;IACxB,MAAM,EAAE,GAAG,IAAI,KAAK;IACpB,SAAS,CAAC;GACX;EACD;CACD,CAAC;AACF;AAEA,SAAS,aACR,KACA,KACqB;CACrB,OAAO,eAAe,IAAI,IAAI,OAAO;EACpC;EACA;EACA;EACA;EACA,IAAI;CACL,CAAC;AACF;AAEA,SAAS,cACR,KACA,KACqB;CACrB,OAAO,eAAe,IAAI,IAAI,OAAO;EAAC;EAAU;EAAW,IAAI;CAAK,CAAC;AACtE;;;;;;AAOA,SAAgB,WACf,MACA,SACqB;CACrB,IAAI,SAAS,iBAAiB,OAAO,KAAA;CAErC,OAAO,YAAY,YAAY,YAAY;AAC5C;AAEA,MAAa,YAAY,gBAAgB"}
@@ -1,13 +1,13 @@
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-CS3Dr-pv.cjs");
4
- const require_workspace = require("./workspace-DPSdiv-b.cjs");
5
- const require_apps = require("./apps-DkMR-qvD.cjs");
6
- const require_compose = require("./compose-BIm9yNH7.cjs");
7
- const require_SubscriberGenerator = require("./SubscriberGenerator-mZpSuSU7.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
+ const require_compose = require("./compose-DwjaxFFK.cjs");
7
+ const require_SubscriberGenerator = require("./SubscriberGenerator-DMi4siph.cjs");
8
8
  const require_types = require("./types-Bl_CwZC9.cjs");
9
- const require_notes = require("./notes-DJyFkK13.cjs");
10
- const require_docker = require("./docker-BtUjo-J_.cjs");
9
+ const require_notes = require("./notes-rTfi6rfN.cjs");
10
+ const require_docker = require("./docker-CP4bspkW.cjs");
11
11
  let node_path = require("node:path");
12
12
  let node_crypto = require("node:crypto");
13
13
  let _geekmidas_manifest = require("@geekmidas/manifest");
@@ -1080,7 +1080,7 @@ var StageSecretMissing = class extends require_errors.GkmError {
1080
1080
  * @throws {StageSecretMissing} when the provider has not written the key.
1081
1081
  */
1082
1082
  function deployedInboxValue(inbox, key, sources) {
1083
- if (key === (0, _geekmidas_manifest.provideKey)(inbox, "domain")) {
1083
+ if (key === (0, _geekmidas_manifest.providedKeyFor)(inbox, "inbox", "domain")) {
1084
1084
  if (!sources.domain) throw new require_compose.NoDomainForStage(sources.stage);
1085
1085
  return sources.domain;
1086
1086
  }
@@ -1097,7 +1097,7 @@ function deployedInboxEnv(manifest, sources) {
1097
1097
  const env = {};
1098
1098
  for (const declaration of Object.values(manifest)) {
1099
1099
  if (declaration.kind !== "inbox") continue;
1100
- const keys = [...declaration.provides ?? [], (0, _geekmidas_manifest.provideKey)(declaration.topic, "publisherConnectionString")];
1100
+ const keys = [...declaration.provides ?? [], (0, _geekmidas_manifest.providedKeyFor)(declaration.topic, "topic", "publisherConnectionString")];
1101
1101
  for (const key of keys) env[key] = deployedInboxValue(declaration.id, key, sources);
1102
1102
  }
1103
1103
  return env;
@@ -1228,12 +1228,12 @@ function composeStack(input) {
1228
1228
  for (const resource of plan.resources) {
1229
1229
  owners.set(resource.envKey, resource);
1230
1230
  if (resource.kind === "email") {
1231
- owners.set((0, _geekmidas_manifest.provideKey)(resource.id, "from"), resource);
1232
- owners.set((0, _geekmidas_manifest.provideKey)(resource.id, "inboxUrl"), resource);
1231
+ owners.set((0, _geekmidas_manifest.providedKeyFor)(resource.id, resource.kind, "from"), resource);
1232
+ owners.set((0, _geekmidas_manifest.providedKeyFor)(resource.id, resource.kind, "inboxUrl"), resource);
1233
1233
  }
1234
- if (resource.kind === "external-api") owners.set((0, _geekmidas_manifest.provideKey)(resource.id, "credentials"), resource);
1235
- if (resource.kind === "inbox") owners.set((0, _geekmidas_manifest.provideKey)(resource.id, "domain"), resource);
1236
- if (resource.kind === "websocket-api") owners.set((0, _geekmidas_manifest.provideKey)(resource.id, "publisherConnectionString"), resource);
1234
+ if (resource.kind === "external-api") owners.set((0, _geekmidas_manifest.providedKeyFor)(resource.id, resource.kind, "credentials"), resource);
1235
+ if (resource.kind === "inbox") owners.set((0, _geekmidas_manifest.providedKeyFor)(resource.id, resource.kind, "domain"), resource);
1236
+ if (resource.kind === "websocket-api") owners.set((0, _geekmidas_manifest.providedKeyFor)(resource.id, resource.kind, "publisherConnectionString"), resource);
1237
1237
  }
1238
1238
  const domain = workspace.domains?.[stage];
1239
1239
  const telemetry = require_workspace.resolveStageTelemetry({
@@ -1306,8 +1306,8 @@ function composeStack(input) {
1306
1306
  const bucketEventKeys = /* @__PURE__ */ new Map();
1307
1307
  for (const resource of plan.resources) {
1308
1308
  if (resource.kind !== "objects") continue;
1309
- bucketEventKeys.set((0, _geekmidas_manifest.provideKey)(resource.id, "eventsConnectionString"), resource.id);
1310
- bucketEventKeys.set((0, _geekmidas_manifest.provideKey)(resource.id, "eventsToken"), resource.id);
1309
+ bucketEventKeys.set((0, _geekmidas_manifest.providedKeyFor)(resource.id, resource.kind, "eventsConnectionString"), resource.id);
1310
+ bucketEventKeys.set((0, _geekmidas_manifest.providedKeyFor)(resource.id, resource.kind, "eventsToken"), resource.id);
1311
1311
  }
1312
1312
  const fileServers = /* @__PURE__ */ new Map();
1313
1313
  if (storage) for (const resource of plan.resources) {
@@ -1395,7 +1395,7 @@ function composeStack(input) {
1395
1395
  }
1396
1396
  if (custom[key] !== void 0) return custom[key];
1397
1397
  if (owner?.kind === "cache") return redis?.urls[key];
1398
- if (owner?.kind === "websocket-api" && key === (0, _geekmidas_manifest.provideKey)(owner.id, "publisherConnectionString")) return redis?.urls[key];
1398
+ if (owner?.kind === "websocket-api" && key === (0, _geekmidas_manifest.providedKeyFor)(owner.id, owner.kind, "publisherConnectionString")) return redis?.urls[key];
1399
1399
  return outside[key];
1400
1400
  };
1401
1401
  const telemetryValues = logs ? require_workspace.telemetryEnv({
@@ -1532,8 +1532,8 @@ function composeStack(input) {
1532
1532
  for (const [bucket, workerId] of watched) {
1533
1533
  if (!services.minio.includes(bucket)) continue;
1534
1534
  const worker = workers.find((w) => w.id === workerId);
1535
- const relay = worker?.env?.[(0, _geekmidas_manifest.provideKey)(bucket, "eventsConnectionString")];
1536
- const token = worker?.env?.[(0, _geekmidas_manifest.provideKey)(bucket, "eventsToken")];
1535
+ const relay = worker?.env?.[(0, _geekmidas_manifest.providedKeyFor)(bucket, "objects", "eventsConnectionString")];
1536
+ const token = worker?.env?.[(0, _geekmidas_manifest.providedKeyFor)(bucket, "objects", "eventsToken")];
1537
1537
  if (!worker || !relay || relay.startsWith("sns:") || !token) continue;
1538
1538
  storage.webhooks.push({
1539
1539
  bucket,
@@ -2427,4 +2427,4 @@ Object.defineProperty(exports, "withCaddyConfigs", {
2427
2427
  }
2428
2428
  });
2429
2429
 
2430
- //# sourceMappingURL=stack-BmG-lKgD.cjs.map
2430
+ //# sourceMappingURL=stack-DaJ9D2Uc.cjs.map