@geekmidas/cli 10.0.0-alpha.122 → 10.0.0-alpha.124

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/dist/{EndpointGenerator-BDa6pPgE.cjs → EndpointGenerator-B2MUa4M2.cjs} +2 -2
  2. package/dist/{EndpointGenerator-BDa6pPgE.cjs.map → EndpointGenerator-B2MUa4M2.cjs.map} +1 -1
  3. package/dist/{EndpointGenerator-CP_z_E3e.mjs → EndpointGenerator-Z_BUTocT.mjs} +2 -2
  4. package/dist/{EndpointGenerator-CP_z_E3e.mjs.map → EndpointGenerator-Z_BUTocT.mjs.map} +1 -1
  5. package/dist/{GoDaddyProvider-BJ9j9mR7.cjs → GoDaddyProvider-0z5RAN1k.cjs} +3 -3
  6. package/dist/{GoDaddyProvider-BJ9j9mR7.cjs.map → GoDaddyProvider-0z5RAN1k.cjs.map} +1 -1
  7. package/dist/{GoDaddyProvider-wIKYdm7V.mjs → GoDaddyProvider-55x4o-4z.mjs} +3 -3
  8. package/dist/{GoDaddyProvider-wIKYdm7V.mjs.map → GoDaddyProvider-55x4o-4z.mjs.map} +1 -1
  9. package/dist/{HostingerProvider-BNpS9aRJ.mjs → HostingerProvider-Cjh_2Ml6.mjs} +2 -2
  10. package/dist/{HostingerProvider-BNpS9aRJ.mjs.map → HostingerProvider-Cjh_2Ml6.mjs.map} +1 -1
  11. package/dist/{HostingerProvider-DR1iws1P.cjs → HostingerProvider-OdQmKXE3.cjs} +2 -2
  12. package/dist/{HostingerProvider-DR1iws1P.cjs.map → HostingerProvider-OdQmKXE3.cjs.map} +1 -1
  13. package/dist/{LegacyStateStore-CkXUJP7i.mjs → LegacyStateStore-C-vumKSN.mjs} +3 -3
  14. package/dist/{LegacyStateStore-CkXUJP7i.mjs.map → LegacyStateStore-C-vumKSN.mjs.map} +1 -1
  15. package/dist/{LegacyStateStore-D1S87I_B.cjs → LegacyStateStore-DRpB-yC5.cjs} +3 -3
  16. package/dist/{LegacyStateStore-D1S87I_B.cjs.map → LegacyStateStore-DRpB-yC5.cjs.map} +1 -1
  17. package/dist/{LocalStateStore-DmXfpvu4.cjs → LocalStateStore-C3ummuDT.cjs} +2 -2
  18. package/dist/{LocalStateStore-DmXfpvu4.cjs.map → LocalStateStore-C3ummuDT.cjs.map} +1 -1
  19. package/dist/{LocalStateStore-BWoWeSq0.mjs → LocalStateStore-CtOjpV1w.mjs} +2 -2
  20. package/dist/{LocalStateStore-BWoWeSq0.mjs.map → LocalStateStore-CtOjpV1w.mjs.map} +1 -1
  21. package/dist/{OpenApiTsGenerator-CsrukCE-.mjs → OpenApiTsGenerator-MtnMQL_g.mjs} +2 -2
  22. package/dist/{OpenApiTsGenerator-CsrukCE-.mjs.map → OpenApiTsGenerator-MtnMQL_g.mjs.map} +1 -1
  23. package/dist/{OpenApiTsGenerator-FNhY7Ssz.cjs → OpenApiTsGenerator-t3_E98Fi.cjs} +2 -2
  24. package/dist/{OpenApiTsGenerator-FNhY7Ssz.cjs.map → OpenApiTsGenerator-t3_E98Fi.cjs.map} +1 -1
  25. package/dist/{S3StateStore-D19JSGE9.mjs → S3StateStore-BC4Jm3Tw.mjs} +2 -2
  26. package/dist/{S3StateStore-D19JSGE9.mjs.map → S3StateStore-BC4Jm3Tw.mjs.map} +1 -1
  27. package/dist/{S3StateStore-BEdsjjP4.cjs → S3StateStore-BeArp0aF.cjs} +2 -2
  28. package/dist/{S3StateStore-BEdsjjP4.cjs.map → S3StateStore-BeArp0aF.cjs.map} +1 -1
  29. package/dist/{SSMStateStore-7xKw0Zz9.mjs → SSMStateStore-Crl76aYZ.mjs} +2 -2
  30. package/dist/{SSMStateStore-7xKw0Zz9.mjs.map → SSMStateStore-Crl76aYZ.mjs.map} +1 -1
  31. package/dist/{SSMStateStore--2bcxoiH.cjs → SSMStateStore-DcstR6cW.cjs} +2 -2
  32. package/dist/{SSMStateStore--2bcxoiH.cjs.map → SSMStateStore-DcstR6cW.cjs.map} +1 -1
  33. package/dist/{SubscriberGenerator-C8CPxrCK.cjs → SubscriberGenerator-C3QTae-R.cjs} +237 -54
  34. package/dist/SubscriberGenerator-C3QTae-R.cjs.map +1 -0
  35. package/dist/{SubscriberGenerator-y3pncae_.mjs → SubscriberGenerator-COAVPgM-.mjs} +227 -56
  36. package/dist/SubscriberGenerator-COAVPgM-.mjs.map +1 -0
  37. package/dist/{add-DlFUKdjX.cjs → add-BFjb6mMq.cjs} +7 -7
  38. package/dist/{add-DlFUKdjX.cjs.map → add-BFjb6mMq.cjs.map} +1 -1
  39. package/dist/{add-Bu6FkaTn.mjs → add-CIjmgzkb.mjs} +6 -6
  40. package/dist/{add-Bu6FkaTn.mjs.map → add-CIjmgzkb.mjs.map} +1 -1
  41. package/dist/{bundler-Bg0lPDoi.cjs → bundler-CiUoIsku.cjs} +5 -5
  42. package/dist/{bundler-Bg0lPDoi.cjs.map → bundler-CiUoIsku.cjs.map} +1 -1
  43. package/dist/{bundler-CgE5XTyr.mjs → bundler-D6KFNpQk.mjs} +5 -5
  44. package/dist/{bundler-CgE5XTyr.mjs.map → bundler-D6KFNpQk.mjs.map} +1 -1
  45. package/dist/{cli-z5S3bHyK.mjs → cli-DNtSTtMc.mjs} +4 -4
  46. package/dist/{cli-z5S3bHyK.mjs.map → cli-DNtSTtMc.mjs.map} +1 -1
  47. package/dist/{cli-Cvjlnpon.cjs → cli-r4eUr98C.cjs} +4 -4
  48. package/dist/{cli-Cvjlnpon.cjs.map → cli-r4eUr98C.cjs.map} +1 -1
  49. package/dist/{compose-bKLAtHLj.cjs → compose-BfXXWJSp.cjs} +362 -59
  50. package/dist/compose-BfXXWJSp.cjs.map +1 -0
  51. package/dist/{compose-CgBPA44v.mjs → compose-DJvvmF3X.mjs} +336 -33
  52. package/dist/compose-DJvvmF3X.mjs.map +1 -0
  53. package/dist/{config-D48erO2j.d.mts → config-IgK6YaGp.d.cts} +3 -4
  54. package/dist/config-IgK6YaGp.d.cts.map +1 -0
  55. package/dist/{config-DHDtsQrB.d.cts → config-kE-p5hxq.d.mts} +3 -4
  56. package/dist/config-kE-p5hxq.d.mts.map +1 -0
  57. package/dist/config.cjs +2 -2
  58. package/dist/config.d.cts +3 -3
  59. package/dist/config.d.mts +3 -3
  60. package/dist/config.mjs +2 -2
  61. package/dist/{credentialSchemas-B67WJOOm.cjs → credentialSchemas-AhIBuQxQ.cjs} +2 -2
  62. package/dist/{credentialSchemas-B67WJOOm.cjs.map → credentialSchemas-AhIBuQxQ.cjs.map} +1 -1
  63. package/dist/{credentialSchemas-DDOLRCLF.mjs → credentialSchemas-DLKbxYBy.mjs} +2 -2
  64. package/dist/{credentialSchemas-DDOLRCLF.mjs.map → credentialSchemas-DLKbxYBy.mjs.map} +1 -1
  65. package/dist/{credentials-Zqr3QQYB.cjs → credentials-D7XJypNd.cjs} +173 -3
  66. package/dist/credentials-D7XJypNd.cjs.map +1 -0
  67. package/dist/{credentials-B5N5yKk6.mjs → credentials-DpfnUvIR.mjs} +132 -4
  68. package/dist/credentials-DpfnUvIR.mjs.map +1 -0
  69. package/dist/deploy/public.cjs +16 -17
  70. package/dist/deploy/public.cjs.map +1 -1
  71. package/dist/deploy/public.d.cts +3 -5
  72. package/dist/deploy/public.d.cts.map +1 -1
  73. package/dist/deploy/public.d.mts +3 -5
  74. package/dist/deploy/public.d.mts.map +1 -1
  75. package/dist/deploy/public.mjs +11 -12
  76. package/dist/deploy/public.mjs.map +1 -1
  77. package/dist/{deploy-CI85F6dr.cjs → deploy-BbI1UMh3.cjs} +477 -156
  78. package/dist/deploy-BbI1UMh3.cjs.map +1 -0
  79. package/dist/{deploy-Ddy8UBoE.mjs → deploy-CiRYwFmr.mjs} +456 -117
  80. package/dist/deploy-CiRYwFmr.mjs.map +1 -0
  81. package/dist/{discover-C5roJuc9.mjs → discover-BvJOVsYG.mjs} +66 -14
  82. package/dist/discover-BvJOVsYG.mjs.map +1 -0
  83. package/dist/{discover-DozUKs8f.cjs → discover-ojkcbxHw.cjs} +88 -12
  84. package/dist/discover-ojkcbxHw.cjs.map +1 -0
  85. package/dist/{dokploy-CiozgdKO.cjs → dokploy-C0aQrCgs.cjs} +2 -2
  86. package/dist/{dokploy-CiozgdKO.cjs.map → dokploy-C0aQrCgs.cjs.map} +1 -1
  87. package/dist/{dokploy-Boj1NSHV.mjs → dokploy-MM7c3IE0.mjs} +2 -2
  88. package/dist/{dokploy-Boj1NSHV.mjs.map → dokploy-MM7c3IE0.mjs.map} +1 -1
  89. package/dist/{drivers-DbjiYpW6.cjs → drivers-CQ32PB5w.cjs} +2 -2
  90. package/dist/{drivers-DbjiYpW6.cjs.map → drivers-CQ32PB5w.cjs.map} +1 -1
  91. package/dist/{drivers-BjGDYfnC.mjs → drivers-Chb5Akov.mjs} +2 -2
  92. package/dist/{drivers-BjGDYfnC.mjs.map → drivers-Chb5Akov.mjs.map} +1 -1
  93. package/dist/{eas-DCg41jKK.mjs → eas-1Ee6kql0.mjs} +2 -2
  94. package/dist/{eas-DCg41jKK.mjs.map → eas-1Ee6kql0.mjs.map} +1 -1
  95. package/dist/{eas-BmBjIFf_.cjs → eas-CJoys9yh.cjs} +2 -2
  96. package/dist/{eas-BmBjIFf_.cjs.map → eas-CJoys9yh.cjs.map} +1 -1
  97. package/dist/{emit-C1e8qD08.mjs → emit-CNpuV_6Q.mjs} +17 -1
  98. package/dist/emit-CNpuV_6Q.mjs.map +1 -0
  99. package/dist/{emit-Dmc1nvdS.cjs → emit-qvHxMV9b.cjs} +17 -1
  100. package/dist/emit-qvHxMV9b.cjs.map +1 -0
  101. package/dist/{encryption-QOQbGXgV.mjs → encryption-B8Bk1Mvu.mjs} +3 -3
  102. package/dist/{encryption-QOQbGXgV.mjs.map → encryption-B8Bk1Mvu.mjs.map} +1 -1
  103. package/dist/{encryption-CwLWV2ig.cjs → encryption-Bo9VlRnl.cjs} +3 -3
  104. package/dist/{encryption-CwLWV2ig.cjs.map → encryption-Bo9VlRnl.cjs.map} +1 -1
  105. package/dist/{engine-HVqo3mQu.mjs → engine-BuinpJfS.mjs} +7 -8
  106. package/dist/{engine-HVqo3mQu.mjs.map → engine-BuinpJfS.mjs.map} +1 -1
  107. package/dist/{engine-D7YNY3v7.cjs → engine-esxTxcIx.cjs} +10 -11
  108. package/dist/{engine-D7YNY3v7.cjs.map → engine-esxTxcIx.cjs.map} +1 -1
  109. package/dist/{github-CO8W9SDs.cjs → github-BEA4K3_X.cjs} +80 -47
  110. package/dist/github-BEA4K3_X.cjs.map +1 -0
  111. package/dist/{github-CQt3xc3o.mjs → github-BUlKJfOV.mjs} +78 -45
  112. package/dist/github-BUlKJfOV.mjs.map +1 -0
  113. package/dist/{googlePlay-Cfu17aEp.mjs → googlePlay-CK05QiTq.mjs} +4 -4
  114. package/dist/{googlePlay-Cfu17aEp.mjs.map → googlePlay-CK05QiTq.mjs.map} +1 -1
  115. package/dist/{googlePlay-DSuF6jbF.cjs → googlePlay-CiqAS2ma.cjs} +5 -5
  116. package/dist/{googlePlay-DSuF6jbF.cjs.map → googlePlay-CiqAS2ma.cjs.map} +1 -1
  117. package/dist/{index-8OfpOtSI.d.cts → index-4CO0HD27.d.cts} +2 -2
  118. package/dist/{index-8OfpOtSI.d.cts.map → index-4CO0HD27.d.cts.map} +1 -1
  119. package/dist/{index-Dpji6Bxq.d.mts → index-DhUf0B0m.d.mts} +2 -2
  120. package/dist/{index-Dpji6Bxq.d.mts.map → index-DhUf0B0m.d.mts.map} +1 -1
  121. package/dist/index.cjs +81 -82
  122. package/dist/index.cjs.map +1 -1
  123. package/dist/index.mjs +64 -65
  124. package/dist/index.mjs.map +1 -1
  125. package/dist/{local-BwC2v2Y8.mjs → local-B7Zv1NoA.mjs} +2 -2
  126. package/dist/{local-BwC2v2Y8.mjs.map → local-B7Zv1NoA.mjs.map} +1 -1
  127. package/dist/{local-DNhnkugT.cjs → local-OPC9BCZt.cjs} +3 -3
  128. package/dist/{local-DNhnkugT.cjs.map → local-OPC9BCZt.cjs.map} +1 -1
  129. package/dist/{migrate-CGkir5LM.mjs → migrate-BzCHT9qs.mjs} +3 -3
  130. package/dist/{migrate-CGkir5LM.mjs.map → migrate-BzCHT9qs.mjs.map} +1 -1
  131. package/dist/{migrate-CXsMaHbb.cjs → migrate-C-hmbjpG.cjs} +3 -3
  132. package/dist/{migrate-CXsMaHbb.cjs.map → migrate-C-hmbjpG.cjs.map} +1 -1
  133. package/dist/{migrate-Bkz8BGaZ.mjs → migrate-CnbvrVag.mjs} +4 -4
  134. package/dist/{migrate-Bkz8BGaZ.mjs.map → migrate-CnbvrVag.mjs.map} +1 -1
  135. package/dist/{migrate-dbAI2XF8.cjs → migrate-DeQJBexh.cjs} +4 -4
  136. package/dist/{migrate-dbAI2XF8.cjs.map → migrate-DeQJBexh.cjs.map} +1 -1
  137. package/dist/openapi.cjs +3 -3
  138. package/dist/openapi.d.cts +1 -1
  139. package/dist/openapi.d.mts +1 -1
  140. package/dist/openapi.mjs +3 -3
  141. package/dist/{publish-eUcWvSdP.mjs → publish-BISBrrqR.mjs} +2 -2
  142. package/dist/{publish-eUcWvSdP.mjs.map → publish-BISBrrqR.mjs.map} +1 -1
  143. package/dist/{publish-Bbd-2PI2.cjs → publish-DtSIB-hZ.cjs} +2 -2
  144. package/dist/{publish-Bbd-2PI2.cjs.map → publish-DtSIB-hZ.cjs.map} +1 -1
  145. package/dist/{ready-BOfogqzr.mjs → ready-DqsyadOs.mjs} +6 -6
  146. package/dist/{ready-BOfogqzr.mjs.map → ready-DqsyadOs.mjs.map} +1 -1
  147. package/dist/{ready-BFFP838V.cjs → ready-IVGu-q18.cjs} +6 -6
  148. package/dist/{ready-BFFP838V.cjs.map → ready-IVGu-q18.cjs.map} +1 -1
  149. package/dist/reconcile/public.cjs +2 -2
  150. package/dist/reconcile/public.d.cts +1 -2
  151. package/dist/reconcile/public.d.cts.map +1 -1
  152. package/dist/reconcile/public.d.mts +1 -2
  153. package/dist/reconcile/public.d.mts.map +1 -1
  154. package/dist/reconcile/public.mjs +2 -2
  155. package/dist/{resolve-DSilYpzm.mjs → resolve-BT7fkPN5.mjs} +4 -4
  156. package/dist/{resolve-DSilYpzm.mjs.map → resolve-BT7fkPN5.mjs.map} +1 -1
  157. package/dist/{resolve-CyprRcQo.cjs → resolve-C7GKQcE4.cjs} +4 -4
  158. package/dist/{resolve-CyprRcQo.cjs.map → resolve-C7GKQcE4.cjs.map} +1 -1
  159. package/dist/{rollback-DfwsnwGO.cjs → rollback-BEiB-Pje.cjs} +7 -7
  160. package/dist/{rollback-DfwsnwGO.cjs.map → rollback-BEiB-Pje.cjs.map} +1 -1
  161. package/dist/{rollback-C4ri3h7i.mjs → rollback-DbP0KuDw.mjs} +7 -7
  162. package/dist/{rollback-C4ri3h7i.mjs.map → rollback-DbP0KuDw.mjs.map} +1 -1
  163. package/dist/{runtime-ACdfK59n.d.cts → runtime-BFJQNqwd.d.mts} +2 -2
  164. package/dist/{runtime-ACdfK59n.d.cts.map → runtime-BFJQNqwd.d.mts.map} +1 -1
  165. package/dist/{runtime-YyQuekxi.d.mts → runtime-BJO-FFef.d.cts} +2 -2
  166. package/dist/{runtime-YyQuekxi.d.mts.map → runtime-BJO-FFef.d.cts.map} +1 -1
  167. package/dist/{s3-DQXZdmCM.mjs → s3-B4FTQQkV.mjs} +2 -2
  168. package/dist/{s3-DQXZdmCM.mjs.map → s3-B4FTQQkV.mjs.map} +1 -1
  169. package/dist/{s3-CrPoA89T.cjs → s3-DwKLXwUT.cjs} +2 -2
  170. package/dist/{s3-CrPoA89T.cjs.map → s3-DwKLXwUT.cjs.map} +1 -1
  171. package/dist/sandbox/credentials-worker.cjs +2 -2
  172. package/dist/sandbox/credentials-worker.mjs +2 -2
  173. package/dist/sandbox/discover-worker.cjs +1 -1
  174. package/dist/sandbox/discover-worker.mjs +1 -1
  175. package/dist/sandbox/migrate-worker.cjs +1 -1
  176. package/dist/sandbox/migrate-worker.mjs +1 -1
  177. package/dist/{seeds-CFG-f24B.cjs → seeds-DOfxmDRO.cjs} +362 -34
  178. package/dist/seeds-DOfxmDRO.cjs.map +1 -0
  179. package/dist/{seeds-oY0qDqui.mjs → seeds-rG-Evfz9.mjs} +341 -31
  180. package/dist/seeds-rG-Evfz9.mjs.map +1 -0
  181. package/dist/{serverSetup-CQZt0OT6.cjs → serverSetup-CWWVcU6Y.cjs} +6 -6
  182. package/dist/{serverSetup-CQZt0OT6.cjs.map → serverSetup-CWWVcU6Y.cjs.map} +1 -1
  183. package/dist/{serverSetup-D8nngcNL.mjs → serverSetup-xGw1fxuZ.mjs} +6 -6
  184. package/dist/{serverSetup-D8nngcNL.mjs.map → serverSetup-xGw1fxuZ.mjs.map} +1 -1
  185. package/dist/{sniffer-BAmtXzou.cjs → sniffer-C7O9Pna_.cjs} +9 -9
  186. package/dist/{sniffer-BAmtXzou.cjs.map → sniffer-C7O9Pna_.cjs.map} +1 -1
  187. package/dist/{sniffer-Cgx608Tl.mjs → sniffer-DVPgfyHr.mjs} +9 -9
  188. package/dist/{sniffer-Cgx608Tl.mjs.map → sniffer-DVPgfyHr.mjs.map} +1 -1
  189. package/dist/{dns-CfEZHt7r.cjs → snsSubscriptions-CSkteK2J.cjs} +520 -3
  190. package/dist/snsSubscriptions-CSkteK2J.cjs.map +1 -0
  191. package/dist/{dns-BgxvvcQa.mjs → snsSubscriptions-CvBIGGp0.mjs} +431 -6
  192. package/dist/snsSubscriptions-CvBIGGp0.mjs.map +1 -0
  193. package/dist/{sst-C1pxbFEd.mjs → sst-CTqZZl1_.mjs} +3 -4
  194. package/dist/{sst-C1pxbFEd.mjs.map → sst-CTqZZl1_.mjs.map} +1 -1
  195. package/dist/{sst-B-Uz4cvm.cjs → sst-lEkBwzGc.cjs} +4 -5
  196. package/dist/{sst-B-Uz4cvm.cjs.map → sst-lEkBwzGc.cjs.map} +1 -1
  197. package/dist/{stage-BKDdQm65.mjs → stage-2EKpzPQ1.mjs} +6 -6
  198. package/dist/{stage-BKDdQm65.mjs.map → stage-2EKpzPQ1.mjs.map} +1 -1
  199. package/dist/{stage-CJysBXWB.cjs → stage-fRfFtLwj.cjs} +7 -7
  200. package/dist/{stage-CJysBXWB.cjs.map → stage-fRfFtLwj.cjs.map} +1 -1
  201. package/dist/{stages-D4SnG5yl.cjs → stages-B7mCWI_R.cjs} +2 -2
  202. package/dist/{stages-D4SnG5yl.cjs.map → stages-B7mCWI_R.cjs.map} +1 -1
  203. package/dist/{stages-Cb9rqRbN.mjs → stages-DSltTW2d.mjs} +2 -2
  204. package/dist/{stages-Cb9rqRbN.mjs.map → stages-DSltTW2d.mjs.map} +1 -1
  205. package/dist/target/public.cjs +1 -1
  206. package/dist/target/public.d.cts +2 -2
  207. package/dist/target/public.d.mts +2 -2
  208. package/dist/target/public.mjs +1 -1
  209. package/dist/{terminal-CW_dWeTe.mjs → terminal-BAVrDhhN.mjs} +3 -3
  210. package/dist/{terminal-CW_dWeTe.mjs.map → terminal-BAVrDhhN.mjs.map} +1 -1
  211. package/dist/{terminal-DJlqcW_U.cjs → terminal-D1aeTkgv.cjs} +3 -3
  212. package/dist/{terminal-DJlqcW_U.cjs.map → terminal-D1aeTkgv.cjs.map} +1 -1
  213. package/dist/{types-HqVPddRK.d.mts → types-CFU2uvrz.d.cts} +263 -4
  214. package/dist/types-CFU2uvrz.d.cts.map +1 -0
  215. package/dist/{types-B6UXlEkf.d.cts → types-D3BeGucy.d.mts} +262 -5
  216. package/dist/types-D3BeGucy.d.mts.map +1 -0
  217. package/dist/vitest.cjs +1 -1
  218. package/dist/vitest.mjs +1 -1
  219. package/dist/workspace/index.cjs +1 -1
  220. package/dist/workspace/index.d.cts +2 -2
  221. package/dist/workspace/index.d.mts +2 -2
  222. package/dist/workspace/index.mjs +1 -1
  223. package/dist/{workspace-BwqQnool.cjs → workspace-C82GLPnf.cjs} +8 -2
  224. package/dist/workspace-C82GLPnf.cjs.map +1 -0
  225. package/dist/{workspace-D1QbNd55.mjs → workspace-DUnnVjqC.mjs} +8 -2
  226. package/dist/workspace-DUnnVjqC.mjs.map +1 -0
  227. package/package.json +17 -16
  228. package/dist/SubscriberGenerator-C8CPxrCK.cjs.map +0 -1
  229. package/dist/SubscriberGenerator-y3pncae_.mjs.map +0 -1
  230. package/dist/compose-CgBPA44v.mjs.map +0 -1
  231. package/dist/compose-bKLAtHLj.cjs.map +0 -1
  232. package/dist/config-D48erO2j.d.mts.map +0 -1
  233. package/dist/config-DHDtsQrB.d.cts.map +0 -1
  234. package/dist/credentials-B5N5yKk6.mjs.map +0 -1
  235. package/dist/credentials-Zqr3QQYB.cjs.map +0 -1
  236. package/dist/deploy-CI85F6dr.cjs.map +0 -1
  237. package/dist/deploy-Ddy8UBoE.mjs.map +0 -1
  238. package/dist/discover-C5roJuc9.mjs.map +0 -1
  239. package/dist/discover-CSW_BMWa.d.cts +0 -125
  240. package/dist/discover-CSW_BMWa.d.cts.map +0 -1
  241. package/dist/discover-DozUKs8f.cjs.map +0 -1
  242. package/dist/discover-xtT7fgWg.d.mts +0 -125
  243. package/dist/discover-xtT7fgWg.d.mts.map +0 -1
  244. package/dist/dns-BgxvvcQa.mjs.map +0 -1
  245. package/dist/dns-CfEZHt7r.cjs.map +0 -1
  246. package/dist/emit-C1e8qD08.mjs.map +0 -1
  247. package/dist/emit-Dmc1nvdS.cjs.map +0 -1
  248. package/dist/github-CO8W9SDs.cjs.map +0 -1
  249. package/dist/github-CQt3xc3o.mjs.map +0 -1
  250. package/dist/run-BJLIerMM.mjs +0 -133
  251. package/dist/run-BJLIerMM.mjs.map +0 -1
  252. package/dist/run-fVZ-rLnc.cjs +0 -174
  253. package/dist/run-fVZ-rLnc.cjs.map +0 -1
  254. package/dist/sandbox-C4g1eG31.d.mts +0 -104
  255. package/dist/sandbox-C4g1eG31.d.mts.map +0 -1
  256. package/dist/sandbox-CdKgQ3XU.d.cts +0 -104
  257. package/dist/sandbox-CdKgQ3XU.d.cts.map +0 -1
  258. package/dist/seeds-CFG-f24B.cjs.map +0 -1
  259. package/dist/seeds-oY0qDqui.mjs.map +0 -1
  260. package/dist/types-B6UXlEkf.d.cts.map +0 -1
  261. package/dist/types-HqVPddRK.d.mts.map +0 -1
  262. package/dist/workspace-BwqQnool.cjs.map +0 -1
  263. package/dist/workspace-D1QbNd55.mjs.map +0 -1
@@ -1,99 +1,26 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
2
2
  const require_errors = require("./errors-DMC4Umsb.cjs");
3
- const require_run = require("./run-fVZ-rLnc.cjs");
4
- const require_credentials = require("./credentials-Zqr3QQYB.cjs");
5
- const require_workspace = require("./workspace-BwqQnool.cjs");
6
- const require_dns = require("./dns-CfEZHt7r.cjs");
3
+ const require_credentials = require("./credentials-D7XJypNd.cjs");
4
+ const require_workspace = require("./workspace-C82GLPnf.cjs");
5
+ const require_snsSubscriptions = require("./snsSubscriptions-CSkteK2J.cjs");
7
6
  const require_define = require("./define-crmMcXFS.cjs");
8
- const require_seeds = require("./seeds-CFG-f24B.cjs");
7
+ const require_seeds = require("./seeds-DOfxmDRO.cjs");
9
8
  const require_derive = require("./derive-DAbo49sm.cjs");
9
+ const require_SubscriberGenerator = require("./SubscriberGenerator-C3QTae-R.cjs");
10
10
  const require_identity = require("./identity-CbLfgQNT.cjs");
11
- const require_discover = require("./discover-DozUKs8f.cjs");
11
+ const require_discover = require("./discover-ojkcbxHw.cjs");
12
12
  const require_sandbox = require("./sandbox-CHv3OYXg.cjs");
13
13
  const require_config = require("./config.cjs");
14
- const require_resolve = require("./resolve-CyprRcQo.cjs");
15
- const require_local = require("./local-DNhnkugT.cjs");
16
- const require_sniffer = require("./sniffer-BAmtXzou.cjs");
14
+ const require_resolve = require("./resolve-C7GKQcE4.cjs");
15
+ const require_local = require("./local-OPC9BCZt.cjs");
16
+ const require_sniffer = require("./sniffer-C7O9Pna_.cjs");
17
17
  const require_projectBucket = require("./projectBucket-BBbQ1lHF.cjs");
18
- const require_credentialSchemas = require("./credentialSchemas-B67WJOOm.cjs");
18
+ const require_credentialSchemas = require("./credentialSchemas-AhIBuQxQ.cjs");
19
19
  let node_path = require("node:path");
20
20
  let node_crypto = require("node:crypto");
21
21
  let _geekmidas_manifest = require("@geekmidas/manifest");
22
22
  let _geekmidas_storage_s3_url = require("@geekmidas/storage/s3-url");
23
23
  _geekmidas_storage_s3_url = require_rolldown_runtime.__toESM(_geekmidas_storage_s3_url, 1);
24
- //#region src/providers/aws.ts
25
- /**
26
- * The AWS account a provider provisions in — the stage's, found the way the
27
- * SSM and Secrets Manager stores find it.
28
- *
29
- * 1. `--profile`, resolved on its own: exported keys left over from another
30
- * account never win over a profile someone named.
31
- * 2. `AWS_PROFILE`, else `AWS_ACCESS_KEY_ID`/`AWS_SECRET_ACCESS_KEY` — the
32
- * deploy's own `aws` credential kind (`storedCredentials`).
33
- * 3. The SDK's default chain: `~/.aws` default profile, SSO, a role. In CI,
34
- * whatever `aws-actions/configure-aws-credentials` exported.
35
- *
36
- * None of them: the provider has no provisioning credentials, and the stage
37
- * is treated as `external`.
38
- */
39
- async function awsProvisioningCredentials(lookup) {
40
- const region = lookup.env.AWS_REGION ?? lookup.env.AWS_DEFAULT_REGION;
41
- const where = region ? { region } : {};
42
- if (lookup.profile) return {
43
- profile: lookup.profile,
44
- ...where
45
- };
46
- const stored = await require_credentials.storedCredentials({
47
- env: lookup.env,
48
- ...lookup.home ? { home: lookup.home } : {}
49
- }).get({
50
- kind: "aws",
51
- stage: lookup.stage
52
- });
53
- if (stored) return stored;
54
- try {
55
- const { fromNodeProviderChain } = await import("@aws-sdk/credential-providers");
56
- await fromNodeProviderChain({
57
- timeout: 1e3,
58
- maxRetries: 0
59
- })();
60
- return {
61
- chain: true,
62
- ...where
63
- };
64
- } catch {
65
- return;
66
- }
67
- }
68
- /**
69
- * An S3-compatible endpoint the environment points the SDK at — the AWS
70
- * emulator in tests. The SDK reads it itself; it is read here too, because
71
- * an emulator takes path-style requests, and a key written for one has to
72
- * say where it is.
73
- */
74
- function awsEndpoint(env, service) {
75
- return env[`AWS_ENDPOINT_URL_${service}`] ?? env.AWS_ENDPOINT_URL;
76
- }
77
- /** An SDK client's config for a provisioning credential. */
78
- async function awsClientConfig(credential, region) {
79
- if ("profile" in credential) {
80
- const { fromIni } = await import("@aws-sdk/credential-providers");
81
- return {
82
- region,
83
- credentials: fromIni({ profile: credential.profile })
84
- };
85
- }
86
- if ("accessKeyId" in credential) return {
87
- region,
88
- credentials: {
89
- accessKeyId: credential.accessKeyId,
90
- secretAccessKey: credential.secretAccessKey,
91
- ...credential.sessionToken ? { sessionToken: credential.sessionToken } : {}
92
- }
93
- };
94
- return { region };
95
- }
96
- //#endregion
97
24
  //#region src/target/secrets.ts
98
25
  /**
99
26
  * A stage's secrets as a target sees them: read and written through the
@@ -249,28 +176,37 @@ const bucketArn = (bucket) => `arn:aws:s3:::${bucket}`;
249
176
  function userPolicy(bucket, options = {}) {
250
177
  return {
251
178
  Version: "2012-10-17",
252
- Statement: [{
253
- Sid: "GkmObjects",
254
- Effect: "Allow",
255
- Action: [
256
- "s3:GetObject",
257
- "s3:PutObject",
258
- "s3:DeleteObject",
259
- "s3:AbortMultipartUpload",
260
- "s3:ListMultipartUploadParts",
261
- ...options.versioning ? ["s3:GetObjectVersion"] : []
262
- ],
263
- Resource: `${bucketArn(bucket)}/*`
264
- }, {
265
- Sid: "GkmBucket",
266
- Effect: "Allow",
267
- Action: [
268
- "s3:ListBucket",
269
- "s3:GetBucketLocation",
270
- "s3:ListBucketMultipartUploads"
271
- ],
272
- Resource: bucketArn(bucket)
273
- }]
179
+ Statement: [
180
+ {
181
+ Sid: "GkmObjects",
182
+ Effect: "Allow",
183
+ Action: [
184
+ "s3:GetObject",
185
+ "s3:PutObject",
186
+ "s3:DeleteObject",
187
+ "s3:AbortMultipartUpload",
188
+ "s3:ListMultipartUploadParts",
189
+ ...options.versioning ? ["s3:GetObjectVersion"] : []
190
+ ],
191
+ Resource: `${bucketArn(bucket)}/*`
192
+ },
193
+ {
194
+ Sid: "GkmBucket",
195
+ Effect: "Allow",
196
+ Action: [
197
+ "s3:ListBucket",
198
+ "s3:GetBucketLocation",
199
+ "s3:ListBucketMultipartUploads"
200
+ ],
201
+ Resource: bucketArn(bucket)
202
+ },
203
+ ...options.eventsTopicArn ? [{
204
+ Sid: "GkmEvents",
205
+ Effect: "Allow",
206
+ Action: "sns:ConfirmSubscription",
207
+ Resource: options.eventsTopicArn
208
+ }] : []
209
+ ]
274
210
  };
275
211
  }
276
212
  /**
@@ -397,7 +333,7 @@ function identityTags(ctx, id) {
397
333
  ];
398
334
  }
399
335
  /** A read whose "there is none" answer is one of `missing`. */
400
- async function readOr$1(read, missing) {
336
+ async function readOr$2(read, missing) {
401
337
  try {
402
338
  return await read();
403
339
  } catch (error) {
@@ -427,7 +363,7 @@ async function ensureIamUser(ctx, clients, input) {
427
363
  key: `iam-user:${id}`,
428
364
  type: "iam-user"
429
365
  };
430
- const found = await readOr$1(() => iam.send(new IAM.GetUserCommand({ UserName: user })), ["NoSuchEntity", "NoSuchEntityException"]);
366
+ const found = await readOr$2(() => iam.send(new IAM.GetUserCommand({ UserName: user })), ["NoSuchEntity", "NoSuchEntityException"]);
431
367
  if (found?.User) {
432
368
  const tags = await iam.send(new IAM.ListUserTagsCommand({ UserName: user }));
433
369
  const tag = (key) => tags.Tags?.find((t) => t.Key === key)?.Value;
@@ -447,7 +383,7 @@ async function ensureIamUser(ctx, clients, input) {
447
383
  await ctx.state.ready(entry, user);
448
384
  });
449
385
  const exists = Boolean(found?.User) || !ctx.dryRun;
450
- const current = exists ? await readOr$1(() => iam.send(new IAM.GetUserPolicyCommand({
386
+ const current = exists ? await readOr$2(() => iam.send(new IAM.GetUserPolicyCommand({
451
387
  UserName: user,
452
388
  PolicyName: input.policyName
453
389
  })), ["NoSuchEntity", "NoSuchEntityException"]) : void 0;
@@ -692,7 +628,7 @@ var BackupsKeyRefused = class extends require_errors.GkmError {
692
628
  key;
693
629
  said;
694
630
  constructor(stage, bucket, key, said) {
695
- super(`The ${require_dns.BACKUPS_URL_KEY} key of '${stage}' could not put s3://${bucket}/${key} (${said}), so its backups would fail the same way. Run the deploy with the stage's AWS credentials to put its user and policy back, or --rotate-keys to issue it a new key.`);
631
+ super(`The ${require_snsSubscriptions.BACKUPS_URL_KEY} key of '${stage}' could not put s3://${bucket}/${key} (${said}), so its backups would fail the same way. Run the deploy with the stage's AWS credentials to put its user and policy back, or --rotate-keys to issue it a new key.`);
696
632
  this.stage = stage;
697
633
  this.bucket = bucket;
698
634
  this.key = key;
@@ -721,7 +657,7 @@ function backupsRegion(workspace, stage, credential, env = process.env) {
721
657
  async function ensureStageBackups(input) {
722
658
  const { workspace, manifest, stage, ctx } = input;
723
659
  const env = input.env ?? process.env;
724
- const choice = require_dns.stageBackups(workspace, manifest, stage);
660
+ const choice = require_snsSubscriptions.stageBackups(workspace, manifest, stage);
725
661
  if (choice.mode === "disabled") {
726
662
  ctx.log(`💾 backups: off — deploy.backups.${stage} is false. Nothing is backed up, and nothing already backed up is deleted.`);
727
663
  return choice;
@@ -731,7 +667,7 @@ async function ensureStageBackups(input) {
731
667
  const clash = Object.entries(manifest).find(([id, d]) => d.kind === "objects" && require_derive.appKey(id) === "backups");
732
668
  if (clash) throw new BackupsUserNameTaken(stage, clash[0]);
733
669
  }
734
- const credential = await awsProvisioningCredentials({
670
+ const credential = await require_snsSubscriptions.awsProvisioningCredentials({
735
671
  stage,
736
672
  env,
737
673
  ...input.profile ? { profile: input.profile } : {},
@@ -741,11 +677,11 @@ async function ensureStageBackups(input) {
741
677
  const region = backupsRegion(workspace, stage, credential, env);
742
678
  const clients = await backupsClients(credential, region, env);
743
679
  const bucket = require_projectBucket.projectBucketName(ctx.identity.scope, await require_projectBucket.callerAccountId(clients.sts));
744
- const prefix = require_dns.backupsPrefix(workspace, stage);
745
- const expiries = require_dns.backupExpiries(workspace, manifest);
680
+ const prefix = require_snsSubscriptions.backupsPrefix(workspace, stage);
681
+ const expiries = require_snsSubscriptions.backupExpiries(workspace, manifest);
746
682
  ctx.log(`💾 backups: ${choice.backups.describe}, to s3://${bucket}/${prefix}/${ctx.dryRun ? " (dry run)" : ""}`);
747
683
  if (await require_projectBucket.findProjectBucket(clients.s3, bucket) === "none") await ctx.change({
748
- construct: require_dns.BACKUPS_SERVICE,
684
+ construct: require_snsSubscriptions.BACKUPS_SERVICE,
749
685
  resource: `bucket ${bucket}`,
750
686
  change: `create in ${region}, expiring each stage's backups`
751
687
  }, async () => {
@@ -757,7 +693,7 @@ async function ensureStageBackups(input) {
757
693
  });
758
694
  });
759
695
  else if (await require_projectBucket.reconcileProjectBucketLifecycle(clients.s3, bucket, expiries, { dryRun: true })) await ctx.change({
760
- construct: require_dns.BACKUPS_SERVICE,
696
+ construct: require_snsSubscriptions.BACKUPS_SERVICE,
761
697
  resource: `bucket ${bucket}`,
762
698
  change: `lifecycle: ${expiries.map((e) => `${e.prefix} after ${e.days} days`).join(", ")}`
763
699
  }, async () => {
@@ -773,7 +709,7 @@ async function ensureStageBackups(input) {
773
709
  await ensureAccessKey(ctx, clients, {
774
710
  id: BACKUPS_ID,
775
711
  bucket,
776
- urlKey: require_dns.BACKUPS_URL_KEY,
712
+ urlKey: require_snsSubscriptions.BACKUPS_URL_KEY,
777
713
  ...user
778
714
  });
779
715
  return choice;
@@ -783,8 +719,8 @@ async function backupsClients(credential, region, env) {
783
719
  const S3 = await import("@aws-sdk/client-s3");
784
720
  const IAM = await import("@aws-sdk/client-iam");
785
721
  const { STSClient } = await import("@aws-sdk/client-sts");
786
- const config = await awsClientConfig(credential, region);
787
- const endpoint = awsEndpoint(env, "S3");
722
+ const config = await require_snsSubscriptions.awsClientConfig(credential, region);
723
+ const endpoint = require_snsSubscriptions.awsEndpoint(env, "S3");
788
724
  return {
789
725
  IAM,
790
726
  iam: new IAM.IAMClient(config),
@@ -809,8 +745,8 @@ async function backupsClients(credential, region, env) {
809
745
  */
810
746
  async function verifyStageBackups(input) {
811
747
  const { stage } = input;
812
- if (require_dns.stageBackups(input.workspace, input.manifest, stage).mode !== "on") return false;
813
- const url = input.secrets[require_dns.BACKUPS_URL_KEY];
748
+ if (require_snsSubscriptions.stageBackups(input.workspace, input.manifest, stage).mode !== "on") return false;
749
+ const url = input.secrets[require_snsSubscriptions.BACKUPS_URL_KEY];
814
750
  if (!url) return false;
815
751
  const address = (await import("@geekmidas/storage/s3-url")).parse(url);
816
752
  if (!address.accessKeyId || !address.secretAccessKey) return false;
@@ -824,7 +760,7 @@ async function verifyStageBackups(input) {
824
760
  ...address.endpoint ? { endpoint: address.endpoint } : {},
825
761
  ...address.forcePathStyle ? { forcePathStyle: true } : {}
826
762
  });
827
- const Key = `${require_dns.backupsPrefix(input.workspace, stage)}/${VERIFY_MARKER}`;
763
+ const Key = `${require_snsSubscriptions.backupsPrefix(input.workspace, stage)}/${VERIFY_MARKER}`;
828
764
  const put = async () => {
829
765
  try {
830
766
  await client.send(new S3.PutObjectCommand({
@@ -861,6 +797,376 @@ async function verifyStageBackups(input) {
861
797
  }
862
798
  }
863
799
  //#endregion
800
+ //#region src/providers/s3/events.ts
801
+ /** What S3 tells the topic about: every object written, and every removed. */
802
+ const BUCKET_EVENTS = ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"];
803
+ /**
804
+ * Each bucket a subscriber watches, with the subscribers discovery could name.
805
+ *
806
+ * A bucket is watched when a process consumes its events — discovery records
807
+ * the edge, and the subscriber by its export — or when a build put a
808
+ * subscriber in its declaration. Only a named subscriber can be subscribed: a
809
+ * route is named after its export.
810
+ */
811
+ function bucketWatchers(manifest, runnables, subscribers = {}) {
812
+ const watched = /* @__PURE__ */ new Map();
813
+ for (const [id, declaration] of Object.entries(manifest)) {
814
+ if (declaration.kind !== "objects") continue;
815
+ const key = (0, _geekmidas_manifest.provideKey)(id, "eventsConnectionString");
816
+ const named = Object.entries(subscribers).flatMap(([worker, bound]) => bound.filter((s) => s.connectionKey === key).map((s) => ({
817
+ worker,
818
+ name: s.name
819
+ }))).sort((a, b) => `${a.worker}/${a.name}`.localeCompare(`${b.worker}/${b.name}`));
820
+ const edged = Object.values(runnables).some((edges) => edges.includes(require_discover.eventsEdge(id)));
821
+ const declared = (declaration.subscribers?.length ?? 0) > 0;
822
+ if (named.length > 0 || edged || declared) watched.set(id, named);
823
+ }
824
+ return watched;
825
+ }
826
+ /** The topic a bucket's changes are published to. */
827
+ function eventsTopicName(bucket) {
828
+ return `${bucket.replaceAll(".", "-")}-events`;
829
+ }
830
+ /** What SNS gives up delivering, kept. */
831
+ function eventsDeadLetterName(bucket) {
832
+ return `${eventsTopicName(bucket)}-dlq`;
833
+ }
834
+ /** Only this bucket, in this account, may publish to its topic. */
835
+ function eventsTopicPolicy(topicArn, bucket, account) {
836
+ return {
837
+ Version: "2012-10-17",
838
+ Statement: [{
839
+ Sid: "GkmBucketPublishes",
840
+ Effect: "Allow",
841
+ Principal: { Service: "s3.amazonaws.com" },
842
+ Action: "sns:Publish",
843
+ Resource: topicArn,
844
+ Condition: {
845
+ ArnLike: { "aws:SourceArn": `arn:aws:s3:::${bucket}` },
846
+ StringEquals: { "aws:SourceAccount": account }
847
+ }
848
+ }]
849
+ };
850
+ }
851
+ /** Only the bucket's topic may send to its dead-letter queue. */
852
+ function eventsDeadLetterPolicy(queueArn, topicArn) {
853
+ return {
854
+ Version: "2012-10-17",
855
+ Statement: [{
856
+ Sid: "GkmTopicDeadLetters",
857
+ Effect: "Allow",
858
+ Principal: { Service: "sns.amazonaws.com" },
859
+ Action: "sqs:SendMessage",
860
+ Resource: queueArn,
861
+ Condition: { ArnEquals: { "aws:SourceArn": topicArn } }
862
+ }]
863
+ };
864
+ }
865
+ /** The id this provider's notification entry goes under. */
866
+ const notificationId = (id) => `gkm-${id}`;
867
+ /**
868
+ * The bucket's notifications with this provider's entry put back, and whether
869
+ * that changed anything. Every other entry — a queue, a function, a topic
870
+ * somebody added by hand — is kept exactly as it was.
871
+ */
872
+ function mergedNotifications(current, id, topicArn) {
873
+ const own = notificationId(id);
874
+ const wanted = {
875
+ Id: own,
876
+ TopicArn: topicArn,
877
+ Events: [...BUCKET_EVENTS]
878
+ };
879
+ const topics = current.TopicConfigurations ?? [];
880
+ const existing = topics.find((t) => t.Id === own);
881
+ const same = existing !== void 0 && existing.TopicArn === topicArn && JSON.stringify([...existing.Events ?? []].sort()) === JSON.stringify([...BUCKET_EVENTS].sort()) && existing.Filter === void 0;
882
+ const { ResponseMetadata: _, ...rest } = current;
883
+ return {
884
+ config: {
885
+ ...rest,
886
+ TopicConfigurations: [...topics.filter((t) => t.Id !== own), wanted]
887
+ },
888
+ changed: !same
889
+ };
890
+ }
891
+ /** S3 refused the entry because another one already covers these events. */
892
+ var BucketNotificationsOverlap = class extends require_errors.GkmError {
893
+ bucket;
894
+ detail;
895
+ constructor(bucket, detail) {
896
+ super(`'${bucket}' already sends object creates or deletes somewhere else, and S3 sends each event to one place only, so the deploy cannot add its own entry. Remove the other notification from the bucket, or give it a prefix, and deploy again. S3 said: ${detail}`);
897
+ this.bucket = bucket;
898
+ this.detail = detail;
899
+ this.name = "BucketNotificationsOverlap";
900
+ }
901
+ };
902
+ const defaultEventsClients = async (credential, region) => {
903
+ const SNS = await import("@aws-sdk/client-sns");
904
+ const SQS = await import("@aws-sdk/client-sqs");
905
+ const { STSClient, GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
906
+ const config = await require_snsSubscriptions.awsClientConfig(credential, region);
907
+ const endpoint = require_snsSubscriptions.awsEndpoint(process.env, "SNS");
908
+ const sts = new STSClient({
909
+ ...config,
910
+ ...require_snsSubscriptions.awsEndpoint(process.env, "STS") ? { endpoint: require_snsSubscriptions.awsEndpoint(process.env, "STS") } : {}
911
+ });
912
+ const { Account } = await sts.send(new GetCallerIdentityCommand({}));
913
+ sts.destroy();
914
+ return {
915
+ SNS,
916
+ SQS,
917
+ sns: new SNS.SNSClient({
918
+ ...config,
919
+ ...endpoint ? { endpoint } : {}
920
+ }),
921
+ sqs: new SQS.SQSClient({
922
+ ...config,
923
+ ...require_snsSubscriptions.awsEndpoint(process.env, "SQS") ? { endpoint: require_snsSubscriptions.awsEndpoint(process.env, "SQS") } : {}
924
+ }),
925
+ account: Account,
926
+ region,
927
+ ...endpoint ? { endpoint } : {}
928
+ };
929
+ };
930
+ let makeEventsClients = defaultEventsClients;
931
+ function errorName$1(error) {
932
+ const e = error;
933
+ return e?.name ?? e?.Code ?? e?.code ?? "";
934
+ }
935
+ async function readOr$1(read, missing) {
936
+ try {
937
+ return await read();
938
+ } catch (error) {
939
+ if (missing.includes(errorName$1(error))) return void 0;
940
+ throw error;
941
+ }
942
+ }
943
+ /**
944
+ * The topic, its policy, the dead-letter queue and the bucket's notification
945
+ * entry for one watched bucket — created where missing, put back where they
946
+ * drifted.
947
+ */
948
+ async function ensureBucketEvents(ctx, s3, input) {
949
+ const { id, bucket, region } = input;
950
+ const { SNS, SQS, sns, sqs, account } = await makeEventsClients(ctx.credential, region);
951
+ const topicName = eventsTopicName(bucket);
952
+ const topicArn = `arn:aws:sns:${region}:${account}:${topicName}`;
953
+ const topicEntry = {
954
+ key: `sns-topic:${id}`,
955
+ type: "sns-topic"
956
+ };
957
+ const topic = await readOr$1(() => sns.send(new SNS.GetTopicAttributesCommand({ TopicArn: topicArn })), ["NotFound", "NotFoundException"]);
958
+ if (topic) await ctx.state.ready(topicEntry, topicArn);
959
+ else await ctx.change({
960
+ construct: id,
961
+ resource: `SNS topic ${topicName}`,
962
+ change: "create"
963
+ }, async () => {
964
+ await ctx.state.pending(topicEntry);
965
+ await sns.send(new SNS.CreateTopicCommand({
966
+ Name: topicName,
967
+ Tags: identityTags(ctx, id)
968
+ }));
969
+ await ctx.state.ready(topicEntry, topicArn);
970
+ });
971
+ const topicPolicy = eventsTopicPolicy(topicArn, bucket, account);
972
+ const currentTopicPolicy = topic?.Attributes?.Policy;
973
+ if (!currentTopicPolicy || canonicalPolicy(JSON.parse(currentTopicPolicy)) !== canonicalPolicy(topicPolicy)) await ctx.change({
974
+ construct: id,
975
+ resource: `SNS topic ${topicName}`,
976
+ change: `publishable by '${bucket}' only`
977
+ }, async () => {
978
+ await sns.send(new SNS.SetTopicAttributesCommand({
979
+ TopicArn: topicArn,
980
+ AttributeName: "Policy",
981
+ AttributeValue: JSON.stringify(topicPolicy)
982
+ }));
983
+ });
984
+ const queueName = eventsDeadLetterName(bucket);
985
+ const deadLetterArn = `arn:aws:sqs:${region}:${account}:${queueName}`;
986
+ const queueEntry = {
987
+ key: `sqs-queue:${id}-events-dlq`,
988
+ type: "sqs-queue"
989
+ };
990
+ const queue = await readOr$1(() => sqs.send(new SQS.GetQueueUrlCommand({ QueueName: queueName })), ["QueueDoesNotExist", "AWS.SimpleQueueService.NonExistentQueue"]);
991
+ let queueUrl = queue?.QueueUrl;
992
+ if (queueUrl) await ctx.state.ready(queueEntry, deadLetterArn);
993
+ else await ctx.change({
994
+ construct: id,
995
+ resource: `SQS queue ${queueName}`,
996
+ change: "create"
997
+ }, async () => {
998
+ await ctx.state.pending(queueEntry);
999
+ queueUrl = (await sqs.send(new SQS.CreateQueueCommand({
1000
+ QueueName: queueName,
1001
+ Attributes: { MessageRetentionPeriod: "1209600" },
1002
+ tags: Object.fromEntries(identityTags(ctx, id).map((t) => [t.Key, t.Value]))
1003
+ }))).QueueUrl;
1004
+ await ctx.state.ready(queueEntry, deadLetterArn);
1005
+ });
1006
+ const queuePolicy = eventsDeadLetterPolicy(deadLetterArn, topicArn);
1007
+ const currentQueuePolicy = queue?.QueueUrl ? (await sqs.send(new SQS.GetQueueAttributesCommand({
1008
+ QueueUrl: queue.QueueUrl,
1009
+ AttributeNames: ["Policy"]
1010
+ }))).Attributes?.Policy : void 0;
1011
+ if (!currentQueuePolicy || canonicalPolicy(JSON.parse(currentQueuePolicy)) !== canonicalPolicy(queuePolicy)) await ctx.change({
1012
+ construct: id,
1013
+ resource: `SQS queue ${queueName}`,
1014
+ change: `receives what ${topicName} cannot deliver`
1015
+ }, async () => {
1016
+ await sqs.send(new SQS.SetQueueAttributesCommand({
1017
+ QueueUrl: queueUrl,
1018
+ Attributes: { Policy: JSON.stringify(queuePolicy) }
1019
+ }));
1020
+ });
1021
+ const merged = mergedNotifications(await readOr$1(() => s3.s3.send(new s3.S3.GetBucketNotificationConfigurationCommand({ Bucket: bucket })), ["NoSuchBucket"]) ?? {}, id, topicArn);
1022
+ if (merged.changed) await ctx.change({
1023
+ construct: id,
1024
+ resource: `bucket ${bucket}`,
1025
+ change: `send object creates and deletes to ${topicName}`
1026
+ }, async () => {
1027
+ try {
1028
+ await s3.s3.send(new s3.S3.PutBucketNotificationConfigurationCommand({
1029
+ Bucket: bucket,
1030
+ NotificationConfiguration: merged.config
1031
+ }));
1032
+ } catch (error) {
1033
+ const message = error.message ?? "";
1034
+ if (/overlap/i.test(message)) throw new BucketNotificationsOverlap(bucket, message);
1035
+ throw error;
1036
+ }
1037
+ });
1038
+ sns.destroy();
1039
+ sqs.destroy();
1040
+ return {
1041
+ topicArn,
1042
+ deadLetterArn
1043
+ };
1044
+ }
1045
+ /**
1046
+ * The events key: the topic's address, signed by the bucket's own access key
1047
+ * — read off the bucket's URL, so a rotated key rotates this one with it.
1048
+ */
1049
+ async function ensureEventsKey(ctx, input) {
1050
+ const { id, topicArn, region } = input;
1051
+ const key = (0, _geekmidas_manifest.provideKey)(id, "eventsConnectionString");
1052
+ const url = ctx.secrets[(0, _geekmidas_manifest.provideKey)(id, "url")];
1053
+ let parsed;
1054
+ try {
1055
+ parsed = url ? _geekmidas_storage_s3_url.parse(url) : void 0;
1056
+ } catch {
1057
+ parsed = void 0;
1058
+ }
1059
+ if (!parsed?.accessKeyId || !parsed.secretAccessKey) {
1060
+ await ctx.change({
1061
+ construct: id,
1062
+ resource: key,
1063
+ change: "set to the topic’s address"
1064
+ }, async () => {});
1065
+ return;
1066
+ }
1067
+ const { snsUrl } = await import("@geekmidas/events/sns");
1068
+ const endpoint = require_snsSubscriptions.awsEndpoint(process.env, "SNS");
1069
+ const address = new URL(snsUrl.build({
1070
+ topicArn,
1071
+ region,
1072
+ ...endpoint ? { endpoint } : {}
1073
+ }));
1074
+ address.searchParams.set("accessKeyId", parsed.accessKeyId);
1075
+ address.searchParams.set("secretAccessKey", parsed.secretAccessKey);
1076
+ const value = address.toString();
1077
+ const entry = {
1078
+ key: `events-key:${id}`,
1079
+ type: "url"
1080
+ };
1081
+ if (ctx.secrets[key] === value) {
1082
+ await ctx.state.ready(entry, topicArn);
1083
+ return;
1084
+ }
1085
+ await ctx.change({
1086
+ construct: id,
1087
+ resource: key,
1088
+ change: `set to ${topicArn}`
1089
+ }, async () => {
1090
+ await ctx.writeSecrets({ [key]: value });
1091
+ await ctx.state.ready(entry, topicArn);
1092
+ });
1093
+ }
1094
+ /** Where SNS pushes to a worker: its own host on the stage's domain. */
1095
+ function workerPushHost(worker, domain) {
1096
+ return `${require_derive.appKey(worker)}.${domain}`;
1097
+ }
1098
+ /**
1099
+ * One HTTP subscription per subscriber to the bucket's topic, at its route on
1100
+ * its worker's host, with the bucket's dead-letter queue — and each ARN
1101
+ * recorded, which is what the worker accepts deliveries under.
1102
+ *
1103
+ * Unfiltered: a bucket's notifications carry no `type` attribute, and the
1104
+ * subscriber's own filter — events, prefix, suffix — is what decides. Only a
1105
+ * compose stage pushes to a worker; any other is told so and left alone.
1106
+ */
1107
+ async function ensurePushSubscriptions(ctx, input) {
1108
+ const { id, events, region, watchers } = input;
1109
+ if (!require_snsSubscriptions.deploysWithCompose(ctx.workspace)) {
1110
+ ctx.log(` '${id}' is watched, and only a compose stage pushes a bucket's changes to a worker: its subscribers receive nothing on '${ctx.stage}'`);
1111
+ return;
1112
+ }
1113
+ if (watchers.length === 0) return;
1114
+ const domain = ctx.workspace.domains?.[ctx.stage];
1115
+ if (!domain) throw new require_seeds.NoDomainForStage(ctx.stage);
1116
+ const { SNSConnection, reconcileHttpSubscriptions } = await import("@geekmidas/events/sns");
1117
+ const { credentials } = await require_snsSubscriptions.awsClientConfig(ctx.credential, region);
1118
+ const endpoint = require_snsSubscriptions.awsEndpoint(process.env, "SNS");
1119
+ const byWorker = /* @__PURE__ */ new Map();
1120
+ for (const watcher of watchers) byWorker.set(watcher.worker, [...byWorker.get(watcher.worker) ?? [], watcher]);
1121
+ for (const [worker, own] of byWorker) {
1122
+ const host = workerPushHost(worker, domain);
1123
+ const endpoints = own.map(({ name }) => ({
1124
+ name,
1125
+ endpoint: `https://${host}${require_SubscriberGenerator.subscriberRoute(name)}`,
1126
+ deadLetterQueueArn: events.deadLetterArn
1127
+ }));
1128
+ const unrecorded = own.filter(({ name }) => ctx.state.record(require_snsSubscriptions.subscriptionKey(worker, name))?.status !== "ready");
1129
+ if (ctx.dryRun) {
1130
+ if (unrecorded.length > 0) await ctx.change({
1131
+ construct: id,
1132
+ resource: `SNS subscriptions on ${host}`,
1133
+ change: `subscribe ${unrecorded.map((w) => w.name).join(", ")}`
1134
+ }, async () => {});
1135
+ continue;
1136
+ }
1137
+ const connection = new SNSConnection({
1138
+ topicArn: events.topicArn,
1139
+ region,
1140
+ ...endpoint ? { endpoint } : {},
1141
+ ...credentials ? { credentials } : {}
1142
+ });
1143
+ const result = await reconcileHttpSubscriptions(connection, {
1144
+ endpoints,
1145
+ ownedHost: host
1146
+ });
1147
+ await connection.close();
1148
+ for (const spec of endpoints) {
1149
+ const arn = result.subscriptions[spec.name];
1150
+ const pending = result.pending.includes(spec.name);
1151
+ if (ctx.state.record(require_snsSubscriptions.subscriptionKey(worker, spec.name))?.id !== arn) ctx.log(` ✓ '${spec.name}' subscribed to ${events.topicArn.split(":").pop()} at ${spec.endpoint}`);
1152
+ const { key, type, data } = require_snsSubscriptions.subscriptionResource({
1153
+ worker,
1154
+ name: spec.name,
1155
+ topicArn: events.topicArn,
1156
+ endpoint: spec.endpoint,
1157
+ deadLetterQueueArn: events.deadLetterArn,
1158
+ pending
1159
+ }, arn);
1160
+ await ctx.state.ready({
1161
+ key,
1162
+ type,
1163
+ ...data ? { data } : {}
1164
+ }, arn);
1165
+ }
1166
+ for (const arn of result.removed) ctx.log(` – unsubscribed ${arn}: no subscriber wants it any more`);
1167
+ }
1168
+ }
1169
+ //#endregion
864
1170
  //#region src/providers/s3/origins.ts
865
1171
  /**
866
1172
  * Which browser origins may call a bucket: the stage's sites that depend on
@@ -1032,8 +1338,8 @@ async function readOr(read, missing) {
1032
1338
  const defaultClients = async (credential, region) => {
1033
1339
  const S3 = await import("@aws-sdk/client-s3");
1034
1340
  const IAM = await import("@aws-sdk/client-iam");
1035
- const config = await awsClientConfig(credential, region);
1036
- const endpoint = awsEndpoint(process.env, "S3");
1341
+ const config = await require_snsSubscriptions.awsClientConfig(credential, region);
1342
+ const endpoint = require_snsSubscriptions.awsEndpoint(process.env, "S3");
1037
1343
  return {
1038
1344
  S3,
1039
1345
  IAM,
@@ -1054,9 +1360,10 @@ let makeClients = defaultClients;
1054
1360
  async function ensureS3(ctx) {
1055
1361
  const region = s3Region(ctx);
1056
1362
  const clients = await makeClients(ctx.credential, region);
1057
- for (const construct of bucketConstructs(ctx.manifest)) await ensureBucket(ctx, clients, construct);
1363
+ const watched = bucketWatchers(ctx.manifest, ctx.runnables, ctx.subscribers);
1364
+ for (const construct of bucketConstructs(ctx.manifest)) await ensureBucket(ctx, clients, construct, watched.get(construct.id));
1058
1365
  }
1059
- async function ensureBucket(ctx, stageClients, construct) {
1366
+ async function ensureBucket(ctx, stageClients, construct, watchers) {
1060
1367
  const { id } = construct;
1061
1368
  const nameInput = {
1062
1369
  scope: ctx.identity.scope,
@@ -1080,11 +1387,19 @@ async function ensureBucket(ctx, stageClients, construct) {
1080
1387
  open,
1081
1388
  ...construct.expire ? { expire: construct.expire } : {}
1082
1389
  });
1390
+ const events = watchers ? await ensureBucketEvents(ctx, clients, {
1391
+ id,
1392
+ bucket,
1393
+ region: clients.region
1394
+ }) : void 0;
1083
1395
  const user = await ensureIamUser(ctx, clients, {
1084
1396
  id,
1085
1397
  user: iamUserName(nameInput),
1086
1398
  policyName: IAM_POLICY_NAME,
1087
- policy: userPolicy(bucket, { versioning }),
1399
+ policy: userPolicy(bucket, {
1400
+ versioning,
1401
+ ...events ? { eventsTopicArn: events.topicArn } : {}
1402
+ }),
1088
1403
  describe: "this bucket only"
1089
1404
  });
1090
1405
  await ensureAccessKey(ctx, clients, {
@@ -1093,6 +1408,19 @@ async function ensureBucket(ctx, stageClients, construct) {
1093
1408
  urlKey: (0, _geekmidas_manifest.provideKey)(id, "url"),
1094
1409
  ...user
1095
1410
  });
1411
+ if (events && watchers) {
1412
+ await ensureEventsKey(ctx, {
1413
+ id,
1414
+ topicArn: events.topicArn,
1415
+ region: clients.region
1416
+ });
1417
+ await ensurePushSubscriptions(ctx, {
1418
+ id,
1419
+ events,
1420
+ region: clients.region,
1421
+ watchers
1422
+ });
1423
+ }
1096
1424
  const publicUrl = bucketPublicUrl(bucket, clients.region, clients.endpoint);
1097
1425
  for (const server of construct.servers) {
1098
1426
  const key = (0, _geekmidas_manifest.provideKey)(server.id, "url");
@@ -1394,9 +1722,14 @@ const BUILTIN_PROVIDERS = { objects: { s3: {
1394
1722
  name: "s3",
1395
1723
  check: require_workspace.checkS3Config,
1396
1724
  provisioning: require_workspace.S3_PROVISIONING,
1397
- credentials: awsProvisioningCredentials,
1398
- runtimeKeys(manifest) {
1399
- return bucketConstructs(manifest).flatMap((b) => [(0, _geekmidas_manifest.provideKey)(b.id, "url"), ...b.servers.map((s) => (0, _geekmidas_manifest.provideKey)(s.id, "url"))]);
1725
+ credentials: require_snsSubscriptions.awsProvisioningCredentials,
1726
+ runtimeKeys(manifest, runnables = {}) {
1727
+ const watched = bucketWatchers(manifest, runnables);
1728
+ return bucketConstructs(manifest).flatMap((b) => [
1729
+ (0, _geekmidas_manifest.provideKey)(b.id, "url"),
1730
+ ...watched.has(b.id) ? [(0, _geekmidas_manifest.provideKey)(b.id, "eventsConnectionString")] : [],
1731
+ ...b.servers.map((s) => (0, _geekmidas_manifest.provideKey)(s.id, "url"))
1732
+ ]);
1400
1733
  },
1401
1734
  ensure: ensureS3,
1402
1735
  verify: verifyS3
@@ -1514,15 +1847,15 @@ async function provisionStage(options) {
1514
1847
  report
1515
1848
  });
1516
1849
  }
1517
- const backups = require_dns.stageBackups(workspace, manifest, stage);
1850
+ const backups = require_snsSubscriptions.stageBackups(workspace, manifest, stage);
1518
1851
  if (configured.length === 0 && backups.mode !== "on") {
1519
1852
  if (backups.mode === "disabled") log(`💾 backups: off — deploy.backups.${stage} is false. Nothing is backed up, and nothing already backed up is deleted.`);
1520
1853
  return reports;
1521
1854
  }
1522
1855
  const identity = require_identity.deployIdentity(workspace, stage);
1523
1856
  let secrets = (await options.secrets.read())?.custom ?? {};
1524
- for (const entry of configured) entry.report.planned = entry.provider.runtimeKeys(manifest).filter((key) => secrets[key] === void 0);
1525
- const state = dryRun ? await readOnlyState(options.state, stage) : journalState(await require_seeds.DeployJournal.open(options.state, stage, () => require_dns.deploysWithCompose(workspace) ? require_seeds.createComposeState(stage) : require_seeds.createEmptyState(stage, "", "")));
1857
+ for (const entry of configured) entry.report.planned = entry.provider.runtimeKeys(manifest, runnables).filter((key) => secrets[key] === void 0);
1858
+ const state = dryRun ? await readOnlyState(options.state, stage) : journalState(await require_seeds.DeployJournal.open(options.state, stage, () => require_snsSubscriptions.deploysWithCompose(workspace) ? require_seeds.createComposeState(stage) : require_seeds.createEmptyState(stage, "", "")));
1526
1859
  const writeSecrets = async (values) => {
1527
1860
  if (dryRun) return;
1528
1861
  const stored = await options.secrets.read() ?? require_seeds.initStageSecrets(stage);
@@ -1543,6 +1876,7 @@ async function provisionStage(options) {
1543
1876
  workspace,
1544
1877
  manifest,
1545
1878
  runnables,
1879
+ ...options.subscribers ? { subscribers: options.subscribers } : {},
1546
1880
  stage,
1547
1881
  identity,
1548
1882
  config: entry.config,
@@ -1569,7 +1903,7 @@ async function provisionStage(options) {
1569
1903
  kind: "backups",
1570
1904
  mode: backups.mode === "on" ? "provider" : "none",
1571
1905
  actions: [],
1572
- planned: backups.mode === "on" && secrets["BACKUPS_URL"] === void 0 ? [require_dns.BACKUPS_URL_KEY] : []
1906
+ planned: backups.mode === "on" && secrets["BACKUPS_URL"] === void 0 ? [require_snsSubscriptions.BACKUPS_URL_KEY] : []
1573
1907
  };
1574
1908
  reports.push(report);
1575
1909
  await ensureStageBackups({
@@ -1910,7 +2244,7 @@ async function runDeploy(source, request, ctx) {
1910
2244
  const resources = !ctx.buildOnly && phaseCtx.stage !== phaseCtx.workspace.stages.local;
1911
2245
  const provision = async () => {
1912
2246
  if (!request.skipDns && resolved.target.runtime === "server") try {
1913
- await require_dns.dnsCredentials(phaseCtx.stage, require_dns.stageDnsDomains(phaseCtx.stage, phaseCtx.workspace.domains, phaseCtx.workspace.dns), ctx.credentials);
2247
+ await require_snsSubscriptions.dnsCredentials(phaseCtx.stage, require_snsSubscriptions.stageDnsDomains(phaseCtx.stage, phaseCtx.workspace.domains, phaseCtx.workspace.dns), ctx.credentials);
1914
2248
  } catch (error) {
1915
2249
  emit({
1916
2250
  type: "phase.failed",
@@ -1995,6 +2329,7 @@ async function provisionResources(phaseCtx, request, ctx, store, emit) {
1995
2329
  stage: phaseCtx.stage,
1996
2330
  manifest: phaseCtx.manifest,
1997
2331
  runnables: phaseCtx.runnables ?? {},
2332
+ ...phaseCtx.subscribers ? { subscribers: phaseCtx.subscribers } : {},
1998
2333
  secrets: phaseCtx.secrets,
1999
2334
  state: store,
2000
2335
  dryRun: ctx.dryRun,
@@ -2086,13 +2421,16 @@ async function prepare(source, request, ctx, emit, redactor) {
2086
2421
  const options = await require_resolve.parseTargetOptions(resolved);
2087
2422
  const allowDevServices = request.allowDevServices === true;
2088
2423
  if (allowDevServices && resolved.target.runtime === "aws") throw new require_seeds.DevServicesNeedServerTarget(targetName);
2424
+ require_snsSubscriptions.assertSitePasswordTarget(configured, stage, resolved.target.name);
2089
2425
  const runnables = {};
2090
2426
  const background = {};
2427
+ const subscribers = {};
2091
2428
  const manifest = await require_discover.discover({
2092
2429
  patterns: require_seeds.constructGlobs(configured),
2093
2430
  cwd: configured.root,
2094
2431
  runnables,
2095
- background
2432
+ background,
2433
+ subscribers
2096
2434
  });
2097
2435
  require_workspace.resolveStageTelemetry({
2098
2436
  ...configured.deploy?.telemetry ? { telemetry: configured.deploy.telemetry } : {},
@@ -2173,6 +2511,7 @@ async function prepare(source, request, ctx, emit, redactor) {
2173
2511
  manifest,
2174
2512
  runnables,
2175
2513
  background,
2514
+ subscribers,
2176
2515
  options,
2177
2516
  dryRun: ctx.dryRun,
2178
2517
  atomic: request.atomic ?? false,
@@ -2267,10 +2606,10 @@ function deploy(input) {
2267
2606
  };
2268
2607
  const ctx = {
2269
2608
  emit,
2270
- credentials: input.credentials ?? require_credentials.storedCredentials({ home: input.home ?? require_run.gkmHome() }),
2609
+ credentials: input.credentials ?? require_credentials.storedCredentials({ home: input.home ?? require_credentials.gkmHome() }),
2271
2610
  dryRun: input.dryRun ?? false,
2272
2611
  ...input.buildOnly ? { buildOnly: true } : {},
2273
- home: input.home ?? require_run.gkmHome(),
2612
+ home: input.home ?? require_credentials.gkmHome(),
2274
2613
  redactor,
2275
2614
  ...input.signal ? { signal: input.signal } : {},
2276
2615
  ...input.childOutput ? { childOutput: input.childOutput } : {},
@@ -2355,24 +2694,6 @@ Object.defineProperty(exports, "UnknownDeployApps", {
2355
2694
  return UnknownDeployApps;
2356
2695
  }
2357
2696
  });
2358
- Object.defineProperty(exports, "awsClientConfig", {
2359
- enumerable: true,
2360
- get: function() {
2361
- return awsClientConfig;
2362
- }
2363
- });
2364
- Object.defineProperty(exports, "awsEndpoint", {
2365
- enumerable: true,
2366
- get: function() {
2367
- return awsEndpoint;
2368
- }
2369
- });
2370
- Object.defineProperty(exports, "awsProvisioningCredentials", {
2371
- enumerable: true,
2372
- get: function() {
2373
- return awsProvisioningCredentials;
2374
- }
2375
- });
2376
2697
  Object.defineProperty(exports, "backupsUserName", {
2377
2698
  enumerable: true,
2378
2699
  get: function() {
@@ -2398,4 +2719,4 @@ Object.defineProperty(exports, "iamUserName", {
2398
2719
  }
2399
2720
  });
2400
2721
 
2401
- //# sourceMappingURL=deploy-CI85F6dr.cjs.map
2722
+ //# sourceMappingURL=deploy-BbI1UMh3.cjs.map