@geekmidas/cli 10.0.0-alpha.123 → 10.0.0-alpha.124
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{EndpointGenerator-BDa6pPgE.cjs → EndpointGenerator-B2MUa4M2.cjs} +2 -2
- package/dist/{EndpointGenerator-BDa6pPgE.cjs.map → EndpointGenerator-B2MUa4M2.cjs.map} +1 -1
- package/dist/{EndpointGenerator-CP_z_E3e.mjs → EndpointGenerator-Z_BUTocT.mjs} +2 -2
- package/dist/{EndpointGenerator-CP_z_E3e.mjs.map → EndpointGenerator-Z_BUTocT.mjs.map} +1 -1
- package/dist/{GoDaddyProvider-Dubq-pCc.cjs → GoDaddyProvider-0z5RAN1k.cjs} +3 -3
- package/dist/{GoDaddyProvider-Dubq-pCc.cjs.map → GoDaddyProvider-0z5RAN1k.cjs.map} +1 -1
- package/dist/{GoDaddyProvider-BlB5nJky.mjs → GoDaddyProvider-55x4o-4z.mjs} +3 -3
- package/dist/{GoDaddyProvider-BlB5nJky.mjs.map → GoDaddyProvider-55x4o-4z.mjs.map} +1 -1
- package/dist/{HostingerProvider-BNpS9aRJ.mjs → HostingerProvider-Cjh_2Ml6.mjs} +2 -2
- package/dist/{HostingerProvider-BNpS9aRJ.mjs.map → HostingerProvider-Cjh_2Ml6.mjs.map} +1 -1
- package/dist/{HostingerProvider-DR1iws1P.cjs → HostingerProvider-OdQmKXE3.cjs} +2 -2
- package/dist/{HostingerProvider-DR1iws1P.cjs.map → HostingerProvider-OdQmKXE3.cjs.map} +1 -1
- package/dist/{LegacyStateStore-DGALQGZu.mjs → LegacyStateStore-C-vumKSN.mjs} +3 -3
- package/dist/{LegacyStateStore-DGALQGZu.mjs.map → LegacyStateStore-C-vumKSN.mjs.map} +1 -1
- package/dist/{LegacyStateStore-ClvUC8qy.cjs → LegacyStateStore-DRpB-yC5.cjs} +3 -3
- package/dist/{LegacyStateStore-ClvUC8qy.cjs.map → LegacyStateStore-DRpB-yC5.cjs.map} +1 -1
- package/dist/{LocalStateStore-43kSYNpw.cjs → LocalStateStore-C3ummuDT.cjs} +2 -2
- package/dist/{LocalStateStore-43kSYNpw.cjs.map → LocalStateStore-C3ummuDT.cjs.map} +1 -1
- package/dist/{LocalStateStore-CBYUzVR5.mjs → LocalStateStore-CtOjpV1w.mjs} +2 -2
- package/dist/{LocalStateStore-CBYUzVR5.mjs.map → LocalStateStore-CtOjpV1w.mjs.map} +1 -1
- package/dist/{OpenApiTsGenerator-CsrukCE-.mjs → OpenApiTsGenerator-MtnMQL_g.mjs} +2 -2
- package/dist/{OpenApiTsGenerator-CsrukCE-.mjs.map → OpenApiTsGenerator-MtnMQL_g.mjs.map} +1 -1
- package/dist/{OpenApiTsGenerator-FNhY7Ssz.cjs → OpenApiTsGenerator-t3_E98Fi.cjs} +2 -2
- package/dist/{OpenApiTsGenerator-FNhY7Ssz.cjs.map → OpenApiTsGenerator-t3_E98Fi.cjs.map} +1 -1
- package/dist/{S3StateStore-DLHjDYYP.mjs → S3StateStore-BC4Jm3Tw.mjs} +2 -2
- package/dist/{S3StateStore-DLHjDYYP.mjs.map → S3StateStore-BC4Jm3Tw.mjs.map} +1 -1
- package/dist/{S3StateStore-ahE7hSNK.cjs → S3StateStore-BeArp0aF.cjs} +2 -2
- package/dist/{S3StateStore-ahE7hSNK.cjs.map → S3StateStore-BeArp0aF.cjs.map} +1 -1
- package/dist/{SSMStateStore-j5RuMkch.mjs → SSMStateStore-Crl76aYZ.mjs} +2 -2
- package/dist/{SSMStateStore-j5RuMkch.mjs.map → SSMStateStore-Crl76aYZ.mjs.map} +1 -1
- package/dist/{SSMStateStore-qIzIuazA.cjs → SSMStateStore-DcstR6cW.cjs} +2 -2
- package/dist/{SSMStateStore-qIzIuazA.cjs.map → SSMStateStore-DcstR6cW.cjs.map} +1 -1
- package/dist/{SubscriberGenerator-C8CPxrCK.cjs → SubscriberGenerator-C3QTae-R.cjs} +237 -54
- package/dist/SubscriberGenerator-C3QTae-R.cjs.map +1 -0
- package/dist/{SubscriberGenerator-y3pncae_.mjs → SubscriberGenerator-COAVPgM-.mjs} +227 -56
- package/dist/SubscriberGenerator-COAVPgM-.mjs.map +1 -0
- package/dist/{add-C2CvXrYw.cjs → add-BFjb6mMq.cjs} +6 -6
- package/dist/{add-C2CvXrYw.cjs.map → add-BFjb6mMq.cjs.map} +1 -1
- package/dist/{add-Bm-C56lH.mjs → add-CIjmgzkb.mjs} +5 -5
- package/dist/{add-Bm-C56lH.mjs.map → add-CIjmgzkb.mjs.map} +1 -1
- package/dist/{bundler-Dk7tAvAX.cjs → bundler-CiUoIsku.cjs} +5 -5
- package/dist/{bundler-Dk7tAvAX.cjs.map → bundler-CiUoIsku.cjs.map} +1 -1
- package/dist/{bundler-DnkFt4mn.mjs → bundler-D6KFNpQk.mjs} +5 -5
- package/dist/{bundler-DnkFt4mn.mjs.map → bundler-D6KFNpQk.mjs.map} +1 -1
- package/dist/{cli-CVeHFXNE.mjs → cli-DNtSTtMc.mjs} +4 -4
- package/dist/{cli-CVeHFXNE.mjs.map → cli-DNtSTtMc.mjs.map} +1 -1
- package/dist/{cli-Di464j1O.cjs → cli-r4eUr98C.cjs} +4 -4
- package/dist/{cli-Di464j1O.cjs.map → cli-r4eUr98C.cjs.map} +1 -1
- package/dist/{compose-ChVvb3xM.cjs → compose-BfXXWJSp.cjs} +328 -54
- package/dist/compose-BfXXWJSp.cjs.map +1 -0
- package/dist/{compose-cHkF---f.mjs → compose-DJvvmF3X.mjs} +299 -25
- package/dist/compose-DJvvmF3X.mjs.map +1 -0
- package/dist/{config-DrOX29sT.d.mts → config-IgK6YaGp.d.cts} +3 -4
- package/dist/config-IgK6YaGp.d.cts.map +1 -0
- package/dist/{config-B3iz9BtK.d.cts → config-kE-p5hxq.d.mts} +3 -4
- package/dist/config-kE-p5hxq.d.mts.map +1 -0
- package/dist/config.cjs +1 -1
- package/dist/config.d.cts +3 -3
- package/dist/config.d.mts +3 -3
- package/dist/config.mjs +1 -1
- package/dist/{credentialSchemas-B67WJOOm.cjs → credentialSchemas-AhIBuQxQ.cjs} +2 -2
- package/dist/{credentialSchemas-B67WJOOm.cjs.map → credentialSchemas-AhIBuQxQ.cjs.map} +1 -1
- package/dist/{credentialSchemas-DDOLRCLF.mjs → credentialSchemas-DLKbxYBy.mjs} +2 -2
- package/dist/{credentialSchemas-DDOLRCLF.mjs.map → credentialSchemas-DLKbxYBy.mjs.map} +1 -1
- package/dist/{credentials-Zqr3QQYB.cjs → credentials-D7XJypNd.cjs} +173 -3
- package/dist/credentials-D7XJypNd.cjs.map +1 -0
- package/dist/{credentials-B5N5yKk6.mjs → credentials-DpfnUvIR.mjs} +132 -4
- package/dist/credentials-DpfnUvIR.mjs.map +1 -0
- package/dist/deploy/public.cjs +15 -16
- package/dist/deploy/public.cjs.map +1 -1
- package/dist/deploy/public.d.cts +3 -5
- package/dist/deploy/public.d.cts.map +1 -1
- package/dist/deploy/public.d.mts +3 -5
- package/dist/deploy/public.d.mts.map +1 -1
- package/dist/deploy/public.mjs +10 -11
- package/dist/deploy/public.mjs.map +1 -1
- package/dist/{deploy-BffR_uEN.cjs → deploy-BbI1UMh3.cjs} +476 -156
- package/dist/deploy-BbI1UMh3.cjs.map +1 -0
- package/dist/{deploy-DO4djCHb.mjs → deploy-CiRYwFmr.mjs} +454 -116
- package/dist/deploy-CiRYwFmr.mjs.map +1 -0
- package/dist/{discover-C5roJuc9.mjs → discover-BvJOVsYG.mjs} +66 -14
- package/dist/discover-BvJOVsYG.mjs.map +1 -0
- package/dist/{discover-DozUKs8f.cjs → discover-ojkcbxHw.cjs} +88 -12
- package/dist/discover-ojkcbxHw.cjs.map +1 -0
- package/dist/{dokploy-CsdvfH3t.cjs → dokploy-C0aQrCgs.cjs} +2 -2
- package/dist/{dokploy-CsdvfH3t.cjs.map → dokploy-C0aQrCgs.cjs.map} +1 -1
- package/dist/{dokploy-BcZm93Cc.mjs → dokploy-MM7c3IE0.mjs} +2 -2
- package/dist/{dokploy-BcZm93Cc.mjs.map → dokploy-MM7c3IE0.mjs.map} +1 -1
- package/dist/{drivers-DbjiYpW6.cjs → drivers-CQ32PB5w.cjs} +2 -2
- package/dist/{drivers-DbjiYpW6.cjs.map → drivers-CQ32PB5w.cjs.map} +1 -1
- package/dist/{drivers-BjGDYfnC.mjs → drivers-Chb5Akov.mjs} +2 -2
- package/dist/{drivers-BjGDYfnC.mjs.map → drivers-Chb5Akov.mjs.map} +1 -1
- package/dist/{eas-CBShP20v.mjs → eas-1Ee6kql0.mjs} +2 -2
- package/dist/{eas-CBShP20v.mjs.map → eas-1Ee6kql0.mjs.map} +1 -1
- package/dist/{eas-CN_cUXth.cjs → eas-CJoys9yh.cjs} +2 -2
- package/dist/{eas-CN_cUXth.cjs.map → eas-CJoys9yh.cjs.map} +1 -1
- package/dist/{emit-C1e8qD08.mjs → emit-CNpuV_6Q.mjs} +17 -1
- package/dist/emit-CNpuV_6Q.mjs.map +1 -0
- package/dist/{emit-Dmc1nvdS.cjs → emit-qvHxMV9b.cjs} +17 -1
- package/dist/emit-qvHxMV9b.cjs.map +1 -0
- package/dist/{encryption-CITa6dXL.mjs → encryption-B8Bk1Mvu.mjs} +2 -2
- package/dist/{encryption-CITa6dXL.mjs.map → encryption-B8Bk1Mvu.mjs.map} +1 -1
- package/dist/{encryption-CPDM49Hi.cjs → encryption-Bo9VlRnl.cjs} +2 -2
- package/dist/{encryption-CPDM49Hi.cjs.map → encryption-Bo9VlRnl.cjs.map} +1 -1
- package/dist/{engine-CTnHmHjz.mjs → engine-BuinpJfS.mjs} +6 -7
- package/dist/{engine-CTnHmHjz.mjs.map → engine-BuinpJfS.mjs.map} +1 -1
- package/dist/{engine-D-jfMVj-.cjs → engine-esxTxcIx.cjs} +9 -10
- package/dist/{engine-D-jfMVj-.cjs.map → engine-esxTxcIx.cjs.map} +1 -1
- package/dist/{github-D56PSK39.cjs → github-BEA4K3_X.cjs} +79 -46
- package/dist/github-BEA4K3_X.cjs.map +1 -0
- package/dist/{github-9RlA7EjN.mjs → github-BUlKJfOV.mjs} +77 -44
- package/dist/github-BUlKJfOV.mjs.map +1 -0
- package/dist/{googlePlay-COi5LXON.mjs → googlePlay-CK05QiTq.mjs} +4 -4
- package/dist/{googlePlay-COi5LXON.mjs.map → googlePlay-CK05QiTq.mjs.map} +1 -1
- package/dist/{googlePlay-SX_jQeJf.cjs → googlePlay-CiqAS2ma.cjs} +5 -5
- package/dist/{googlePlay-SX_jQeJf.cjs.map → googlePlay-CiqAS2ma.cjs.map} +1 -1
- package/dist/{index-DcyRA5Rf.d.mts → index-4CO0HD27.d.cts} +2 -2
- package/dist/{index-DcyRA5Rf.d.mts.map → index-4CO0HD27.d.cts.map} +1 -1
- package/dist/{index-DjLSMgAL.d.cts → index-DhUf0B0m.d.mts} +2 -2
- package/dist/{index-DjLSMgAL.d.cts.map → index-DhUf0B0m.d.mts.map} +1 -1
- package/dist/index.cjs +79 -80
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +62 -63
- package/dist/index.mjs.map +1 -1
- package/dist/{local-BwC2v2Y8.mjs → local-B7Zv1NoA.mjs} +2 -2
- package/dist/{local-BwC2v2Y8.mjs.map → local-B7Zv1NoA.mjs.map} +1 -1
- package/dist/{local-DNhnkugT.cjs → local-OPC9BCZt.cjs} +3 -3
- package/dist/{local-DNhnkugT.cjs.map → local-OPC9BCZt.cjs.map} +1 -1
- package/dist/{migrate-DJa_Dlsl.mjs → migrate-BzCHT9qs.mjs} +2 -2
- package/dist/{migrate-DJa_Dlsl.mjs.map → migrate-BzCHT9qs.mjs.map} +1 -1
- package/dist/{migrate-BCz1lkh_.cjs → migrate-C-hmbjpG.cjs} +2 -2
- package/dist/{migrate-BCz1lkh_.cjs.map → migrate-C-hmbjpG.cjs.map} +1 -1
- package/dist/{migrate-0J6gsfrQ.mjs → migrate-CnbvrVag.mjs} +3 -3
- package/dist/{migrate-0J6gsfrQ.mjs.map → migrate-CnbvrVag.mjs.map} +1 -1
- package/dist/{migrate-CrtxXeGY.cjs → migrate-DeQJBexh.cjs} +3 -3
- package/dist/{migrate-CrtxXeGY.cjs.map → migrate-DeQJBexh.cjs.map} +1 -1
- package/dist/openapi.cjs +2 -2
- package/dist/openapi.d.cts +1 -1
- package/dist/openapi.d.mts +1 -1
- package/dist/openapi.mjs +2 -2
- package/dist/{publish-CuQlOW5p.mjs → publish-BISBrrqR.mjs} +2 -2
- package/dist/{publish-CuQlOW5p.mjs.map → publish-BISBrrqR.mjs.map} +1 -1
- package/dist/{publish-qSpnvmdX.cjs → publish-DtSIB-hZ.cjs} +2 -2
- package/dist/{publish-qSpnvmdX.cjs.map → publish-DtSIB-hZ.cjs.map} +1 -1
- package/dist/{ready-BOfogqzr.mjs → ready-DqsyadOs.mjs} +6 -6
- package/dist/{ready-BOfogqzr.mjs.map → ready-DqsyadOs.mjs.map} +1 -1
- package/dist/{ready-BFFP838V.cjs → ready-IVGu-q18.cjs} +6 -6
- package/dist/{ready-BFFP838V.cjs.map → ready-IVGu-q18.cjs.map} +1 -1
- package/dist/reconcile/public.cjs +2 -2
- package/dist/reconcile/public.d.cts +1 -2
- package/dist/reconcile/public.d.cts.map +1 -1
- package/dist/reconcile/public.d.mts +1 -2
- package/dist/reconcile/public.d.mts.map +1 -1
- package/dist/reconcile/public.mjs +2 -2
- package/dist/{resolve-j8hUcbGz.mjs → resolve-BT7fkPN5.mjs} +4 -4
- package/dist/{resolve-j8hUcbGz.mjs.map → resolve-BT7fkPN5.mjs.map} +1 -1
- package/dist/{resolve-AsfohXd1.cjs → resolve-C7GKQcE4.cjs} +4 -4
- package/dist/{resolve-AsfohXd1.cjs.map → resolve-C7GKQcE4.cjs.map} +1 -1
- package/dist/{rollback-Bxq_URgL.cjs → rollback-BEiB-Pje.cjs} +6 -6
- package/dist/{rollback-Bxq_URgL.cjs.map → rollback-BEiB-Pje.cjs.map} +1 -1
- package/dist/{rollback-JgbAY43C.mjs → rollback-DbP0KuDw.mjs} +6 -6
- package/dist/{rollback-JgbAY43C.mjs.map → rollback-DbP0KuDw.mjs.map} +1 -1
- package/dist/{runtime-DIZTeGJV.d.cts → runtime-BFJQNqwd.d.mts} +2 -2
- package/dist/{runtime-DIZTeGJV.d.cts.map → runtime-BFJQNqwd.d.mts.map} +1 -1
- package/dist/{runtime-WMLJY-db.d.mts → runtime-BJO-FFef.d.cts} +2 -2
- package/dist/{runtime-WMLJY-db.d.mts.map → runtime-BJO-FFef.d.cts.map} +1 -1
- package/dist/sandbox/credentials-worker.cjs +2 -2
- package/dist/sandbox/credentials-worker.mjs +2 -2
- package/dist/sandbox/discover-worker.cjs +1 -1
- package/dist/sandbox/discover-worker.mjs +1 -1
- package/dist/sandbox/migrate-worker.cjs +1 -1
- package/dist/sandbox/migrate-worker.mjs +1 -1
- package/dist/{seeds-BWC-qjSI.cjs → seeds-DOfxmDRO.cjs} +360 -32
- package/dist/seeds-DOfxmDRO.cjs.map +1 -0
- package/dist/{seeds-Dv78P9LS.mjs → seeds-rG-Evfz9.mjs} +339 -29
- package/dist/seeds-rG-Evfz9.mjs.map +1 -0
- package/dist/{serverSetup-CtV80a5M.cjs → serverSetup-CWWVcU6Y.cjs} +5 -5
- package/dist/{serverSetup-CtV80a5M.cjs.map → serverSetup-CWWVcU6Y.cjs.map} +1 -1
- package/dist/{serverSetup-DB6sKwAy.mjs → serverSetup-xGw1fxuZ.mjs} +5 -5
- package/dist/{serverSetup-DB6sKwAy.mjs.map → serverSetup-xGw1fxuZ.mjs.map} +1 -1
- package/dist/{sniffer-ctpwBBkT.cjs → sniffer-C7O9Pna_.cjs} +8 -8
- package/dist/{sniffer-ctpwBBkT.cjs.map → sniffer-C7O9Pna_.cjs.map} +1 -1
- package/dist/{sniffer-qDFUQmWP.mjs → sniffer-DVPgfyHr.mjs} +8 -8
- package/dist/{sniffer-qDFUQmWP.mjs.map → sniffer-DVPgfyHr.mjs.map} +1 -1
- package/dist/{dns-Bmnuttja.cjs → snsSubscriptions-CSkteK2J.cjs} +338 -2
- package/dist/snsSubscriptions-CSkteK2J.cjs.map +1 -0
- package/dist/{dns-DFvO5a53.mjs → snsSubscriptions-CvBIGGp0.mjs} +279 -3
- package/dist/snsSubscriptions-CvBIGGp0.mjs.map +1 -0
- package/dist/{sst-C1pxbFEd.mjs → sst-CTqZZl1_.mjs} +3 -4
- package/dist/{sst-C1pxbFEd.mjs.map → sst-CTqZZl1_.mjs.map} +1 -1
- package/dist/{sst-B-Uz4cvm.cjs → sst-lEkBwzGc.cjs} +4 -5
- package/dist/{sst-B-Uz4cvm.cjs.map → sst-lEkBwzGc.cjs.map} +1 -1
- package/dist/{stage-C7lf36az.mjs → stage-2EKpzPQ1.mjs} +5 -5
- package/dist/{stage-C7lf36az.mjs.map → stage-2EKpzPQ1.mjs.map} +1 -1
- package/dist/{stage-DzALYUwY.cjs → stage-fRfFtLwj.cjs} +6 -6
- package/dist/{stage-DzALYUwY.cjs.map → stage-fRfFtLwj.cjs.map} +1 -1
- package/dist/target/public.cjs +1 -1
- package/dist/target/public.d.cts +2 -2
- package/dist/target/public.d.mts +2 -2
- package/dist/target/public.mjs +1 -1
- package/dist/{terminal-CW_dWeTe.mjs → terminal-BAVrDhhN.mjs} +3 -3
- package/dist/{terminal-CW_dWeTe.mjs.map → terminal-BAVrDhhN.mjs.map} +1 -1
- package/dist/{terminal-DJlqcW_U.cjs → terminal-D1aeTkgv.cjs} +3 -3
- package/dist/{terminal-DJlqcW_U.cjs.map → terminal-D1aeTkgv.cjs.map} +1 -1
- package/dist/{types-C8gXOLWL.d.mts → types-CFU2uvrz.d.cts} +242 -3
- package/dist/types-CFU2uvrz.d.cts.map +1 -0
- package/dist/{types-Q2SC_ly2.d.cts → types-D3BeGucy.d.mts} +241 -4
- package/dist/types-D3BeGucy.d.mts.map +1 -0
- package/dist/vitest.cjs +1 -1
- package/dist/vitest.mjs +1 -1
- package/dist/workspace/index.d.cts +2 -2
- package/dist/workspace/index.d.mts +2 -2
- package/package.json +15 -15
- package/dist/SubscriberGenerator-C8CPxrCK.cjs.map +0 -1
- package/dist/SubscriberGenerator-y3pncae_.mjs.map +0 -1
- package/dist/compose-ChVvb3xM.cjs.map +0 -1
- package/dist/compose-cHkF---f.mjs.map +0 -1
- package/dist/config-B3iz9BtK.d.cts.map +0 -1
- package/dist/config-DrOX29sT.d.mts.map +0 -1
- package/dist/credentials-B5N5yKk6.mjs.map +0 -1
- package/dist/credentials-Zqr3QQYB.cjs.map +0 -1
- package/dist/deploy-BffR_uEN.cjs.map +0 -1
- package/dist/deploy-DO4djCHb.mjs.map +0 -1
- package/dist/discover-C08meHhu.d.mts +0 -125
- package/dist/discover-C08meHhu.d.mts.map +0 -1
- package/dist/discover-C5roJuc9.mjs.map +0 -1
- package/dist/discover-DipvfWpK.d.cts +0 -125
- package/dist/discover-DipvfWpK.d.cts.map +0 -1
- package/dist/discover-DozUKs8f.cjs.map +0 -1
- package/dist/dns-Bmnuttja.cjs.map +0 -1
- package/dist/dns-DFvO5a53.mjs.map +0 -1
- package/dist/emit-C1e8qD08.mjs.map +0 -1
- package/dist/emit-Dmc1nvdS.cjs.map +0 -1
- package/dist/github-9RlA7EjN.mjs.map +0 -1
- package/dist/github-D56PSK39.cjs.map +0 -1
- package/dist/run-BJLIerMM.mjs +0 -133
- package/dist/run-BJLIerMM.mjs.map +0 -1
- package/dist/run-fVZ-rLnc.cjs +0 -174
- package/dist/run-fVZ-rLnc.cjs.map +0 -1
- package/dist/sandbox-Co1y2CmF.d.mts +0 -104
- package/dist/sandbox-Co1y2CmF.d.mts.map +0 -1
- package/dist/sandbox-DvNqr6od.d.cts +0 -104
- package/dist/sandbox-DvNqr6od.d.cts.map +0 -1
- package/dist/seeds-BWC-qjSI.cjs.map +0 -1
- package/dist/seeds-Dv78P9LS.mjs.map +0 -1
- package/dist/types-C8gXOLWL.d.mts.map +0 -1
- package/dist/types-Q2SC_ly2.d.cts.map +0 -1
|
@@ -1,97 +1,24 @@
|
|
|
1
1
|
import { t as GkmError } from "./errors-D8Gwp5kU.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { r as storedCredentials } from "./credentials-B5N5yKk6.mjs";
|
|
2
|
+
import { r as storedCredentials, x as gkmHome } from "./credentials-DpfnUvIR.mjs";
|
|
4
3
|
import { $ as IamUserNotOwned, G as checkS3Config, J as BucketNameUnavailable, K as AccessKeyLimit, L as resolveStageTelemetry, N as assertDeployedStage, Q as BucketRegionUnknown, U as stageProvider, W as S3_PROVISIONING, X as BucketProbeFailed, Y as BucketOwnedByAnotherProject, Z as BucketRegionMismatch, et as ProvisionedBucketUnreachable, ht as isReservedStageKey, nt as RotationInProgress, q as BucketKeySetElsewhere, rt as S3RegionRequired, tt as RecordedBucketUnreachable, u as getAppBuildOrder } from "./workspace-DUnnVjqC.mjs";
|
|
5
|
-
import {
|
|
4
|
+
import { E as BACKUPS_URL_KEY, I as stageBackups, L as deploysWithCompose, M as backupExpiries, P as backupsPrefix, T as BACKUPS_SERVICE, _ as awsClientConfig, a as subscriptionKey, b as assertSitePasswordTarget, h as stageDnsDomains, l as dnsCredentials, o as subscriptionResource, v as awsEndpoint, y as awsProvisioningCredentials } from "./snsSubscriptions-CvBIGGp0.mjs";
|
|
6
5
|
import { o as builtinTarget } from "./define-6poNqm5O.mjs";
|
|
7
|
-
import { Bt as initStageSecrets, Lt as secretsStoreFor, N as stageProviderNotes, P as PROVIDER_KINDS, X as DevServicesNeedServerTarget, Z as ExternalServicesNotConfigured,
|
|
6
|
+
import { Bn as usesTelemetry, Bt as initStageSecrets, Lt as secretsStoreFor, N as stageProviderNotes, P as PROVIDER_KINDS, X as DevServicesNeedServerTarget, Z as ExternalServicesNotConfigured, ar as isMainFrontendApp, d as DeployJournal, et as devServicesUsed, fn as mergeLifecycle, ft as constructGlobs, ir as NoDomainForStage, it as stageServiceDeclarations, j as assertStageProvidersEnabled, nt as reportDevServices, or as resolveHost, ot as appEnvKeys, tt as externalServices, v as createComposeState, y as createEmptyState } from "./seeds-rG-Evfz9.mjs";
|
|
8
7
|
import { n as derivedApps, t as appKey } from "./derive-B4vDpzgP.mjs";
|
|
8
|
+
import { s as subscriberRoute } from "./SubscriberGenerator-COAVPgM-.mjs";
|
|
9
9
|
import { n as deployIdentity, t as applicationName } from "./identity-CBXr4wNi.mjs";
|
|
10
|
-
import { i as discover, p as withOutput } from "./discover-
|
|
10
|
+
import { i as discover, m as eventsEdge, p as withOutput } from "./discover-BvJOVsYG.mjs";
|
|
11
11
|
import { c as withSandbox } from "./sandbox-CbVB7uOD.mjs";
|
|
12
12
|
import { findWorkspaceRoot, loadWorkspaceConfig } from "./config.mjs";
|
|
13
|
-
import { a as parseTargetOptions, o as resolveTarget } from "./resolve-
|
|
14
|
-
import { t as LocalSandbox } from "./local-
|
|
15
|
-
import { E as eventError, S as createStateStore, v as assertStateOutlivesRun, y as assertStateRoom } from "./sniffer-
|
|
13
|
+
import { a as parseTargetOptions, o as resolveTarget } from "./resolve-BT7fkPN5.mjs";
|
|
14
|
+
import { t as LocalSandbox } from "./local-B7Zv1NoA.mjs";
|
|
15
|
+
import { E as eventError, S as createStateStore, v as assertStateOutlivesRun, y as assertStateRoom } from "./sniffer-DVPgfyHr.mjs";
|
|
16
16
|
import { a as findProjectBucket, i as ensureProjectBucket, o as projectBucketName, r as callerAccountId, s as reconcileProjectBucketLifecycle } from "./projectBucket-C_DN4WzF.mjs";
|
|
17
|
-
import { n as assertStageCredentials } from "./credentialSchemas-
|
|
17
|
+
import { n as assertStageCredentials } from "./credentialSchemas-DLKbxYBy.mjs";
|
|
18
18
|
import { resolve } from "node:path";
|
|
19
19
|
import { randomInt } from "node:crypto";
|
|
20
20
|
import { dependentsOf, kebabCase, provideKey, providedKeyFor } from "@geekmidas/manifest";
|
|
21
21
|
import * as s3Url from "@geekmidas/storage/s3-url";
|
|
22
|
-
//#region src/providers/aws.ts
|
|
23
|
-
/**
|
|
24
|
-
* The AWS account a provider provisions in — the stage's, found the way the
|
|
25
|
-
* SSM and Secrets Manager stores find it.
|
|
26
|
-
*
|
|
27
|
-
* 1. `--profile`, resolved on its own: exported keys left over from another
|
|
28
|
-
* account never win over a profile someone named.
|
|
29
|
-
* 2. `AWS_PROFILE`, else `AWS_ACCESS_KEY_ID`/`AWS_SECRET_ACCESS_KEY` — the
|
|
30
|
-
* deploy's own `aws` credential kind (`storedCredentials`).
|
|
31
|
-
* 3. The SDK's default chain: `~/.aws` default profile, SSO, a role. In CI,
|
|
32
|
-
* whatever `aws-actions/configure-aws-credentials` exported.
|
|
33
|
-
*
|
|
34
|
-
* None of them: the provider has no provisioning credentials, and the stage
|
|
35
|
-
* is treated as `external`.
|
|
36
|
-
*/
|
|
37
|
-
async function awsProvisioningCredentials(lookup) {
|
|
38
|
-
const region = lookup.env.AWS_REGION ?? lookup.env.AWS_DEFAULT_REGION;
|
|
39
|
-
const where = region ? { region } : {};
|
|
40
|
-
if (lookup.profile) return {
|
|
41
|
-
profile: lookup.profile,
|
|
42
|
-
...where
|
|
43
|
-
};
|
|
44
|
-
const stored = await storedCredentials({
|
|
45
|
-
env: lookup.env,
|
|
46
|
-
...lookup.home ? { home: lookup.home } : {}
|
|
47
|
-
}).get({
|
|
48
|
-
kind: "aws",
|
|
49
|
-
stage: lookup.stage
|
|
50
|
-
});
|
|
51
|
-
if (stored) return stored;
|
|
52
|
-
try {
|
|
53
|
-
const { fromNodeProviderChain } = await import("@aws-sdk/credential-providers");
|
|
54
|
-
await fromNodeProviderChain({
|
|
55
|
-
timeout: 1e3,
|
|
56
|
-
maxRetries: 0
|
|
57
|
-
})();
|
|
58
|
-
return {
|
|
59
|
-
chain: true,
|
|
60
|
-
...where
|
|
61
|
-
};
|
|
62
|
-
} catch {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* An S3-compatible endpoint the environment points the SDK at — the AWS
|
|
68
|
-
* emulator in tests. The SDK reads it itself; it is read here too, because
|
|
69
|
-
* an emulator takes path-style requests, and a key written for one has to
|
|
70
|
-
* say where it is.
|
|
71
|
-
*/
|
|
72
|
-
function awsEndpoint(env, service) {
|
|
73
|
-
return env[`AWS_ENDPOINT_URL_${service}`] ?? env.AWS_ENDPOINT_URL;
|
|
74
|
-
}
|
|
75
|
-
/** An SDK client's config for a provisioning credential. */
|
|
76
|
-
async function awsClientConfig(credential, region) {
|
|
77
|
-
if ("profile" in credential) {
|
|
78
|
-
const { fromIni } = await import("@aws-sdk/credential-providers");
|
|
79
|
-
return {
|
|
80
|
-
region,
|
|
81
|
-
credentials: fromIni({ profile: credential.profile })
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
if ("accessKeyId" in credential) return {
|
|
85
|
-
region,
|
|
86
|
-
credentials: {
|
|
87
|
-
accessKeyId: credential.accessKeyId,
|
|
88
|
-
secretAccessKey: credential.secretAccessKey,
|
|
89
|
-
...credential.sessionToken ? { sessionToken: credential.sessionToken } : {}
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
return { region };
|
|
93
|
-
}
|
|
94
|
-
//#endregion
|
|
95
22
|
//#region src/target/secrets.ts
|
|
96
23
|
/**
|
|
97
24
|
* A stage's secrets as a target sees them: read and written through the
|
|
@@ -247,28 +174,37 @@ const bucketArn = (bucket) => `arn:aws:s3:::${bucket}`;
|
|
|
247
174
|
function userPolicy(bucket, options = {}) {
|
|
248
175
|
return {
|
|
249
176
|
Version: "2012-10-17",
|
|
250
|
-
Statement: [
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
177
|
+
Statement: [
|
|
178
|
+
{
|
|
179
|
+
Sid: "GkmObjects",
|
|
180
|
+
Effect: "Allow",
|
|
181
|
+
Action: [
|
|
182
|
+
"s3:GetObject",
|
|
183
|
+
"s3:PutObject",
|
|
184
|
+
"s3:DeleteObject",
|
|
185
|
+
"s3:AbortMultipartUpload",
|
|
186
|
+
"s3:ListMultipartUploadParts",
|
|
187
|
+
...options.versioning ? ["s3:GetObjectVersion"] : []
|
|
188
|
+
],
|
|
189
|
+
Resource: `${bucketArn(bucket)}/*`
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
Sid: "GkmBucket",
|
|
193
|
+
Effect: "Allow",
|
|
194
|
+
Action: [
|
|
195
|
+
"s3:ListBucket",
|
|
196
|
+
"s3:GetBucketLocation",
|
|
197
|
+
"s3:ListBucketMultipartUploads"
|
|
198
|
+
],
|
|
199
|
+
Resource: bucketArn(bucket)
|
|
200
|
+
},
|
|
201
|
+
...options.eventsTopicArn ? [{
|
|
202
|
+
Sid: "GkmEvents",
|
|
203
|
+
Effect: "Allow",
|
|
204
|
+
Action: "sns:ConfirmSubscription",
|
|
205
|
+
Resource: options.eventsTopicArn
|
|
206
|
+
}] : []
|
|
207
|
+
]
|
|
272
208
|
};
|
|
273
209
|
}
|
|
274
210
|
/**
|
|
@@ -395,7 +331,7 @@ function identityTags(ctx, id) {
|
|
|
395
331
|
];
|
|
396
332
|
}
|
|
397
333
|
/** A read whose "there is none" answer is one of `missing`. */
|
|
398
|
-
async function readOr$
|
|
334
|
+
async function readOr$2(read, missing) {
|
|
399
335
|
try {
|
|
400
336
|
return await read();
|
|
401
337
|
} catch (error) {
|
|
@@ -425,7 +361,7 @@ async function ensureIamUser(ctx, clients, input) {
|
|
|
425
361
|
key: `iam-user:${id}`,
|
|
426
362
|
type: "iam-user"
|
|
427
363
|
};
|
|
428
|
-
const found = await readOr$
|
|
364
|
+
const found = await readOr$2(() => iam.send(new IAM.GetUserCommand({ UserName: user })), ["NoSuchEntity", "NoSuchEntityException"]);
|
|
429
365
|
if (found?.User) {
|
|
430
366
|
const tags = await iam.send(new IAM.ListUserTagsCommand({ UserName: user }));
|
|
431
367
|
const tag = (key) => tags.Tags?.find((t) => t.Key === key)?.Value;
|
|
@@ -445,7 +381,7 @@ async function ensureIamUser(ctx, clients, input) {
|
|
|
445
381
|
await ctx.state.ready(entry, user);
|
|
446
382
|
});
|
|
447
383
|
const exists = Boolean(found?.User) || !ctx.dryRun;
|
|
448
|
-
const current = exists ? await readOr$
|
|
384
|
+
const current = exists ? await readOr$2(() => iam.send(new IAM.GetUserPolicyCommand({
|
|
449
385
|
UserName: user,
|
|
450
386
|
PolicyName: input.policyName
|
|
451
387
|
})), ["NoSuchEntity", "NoSuchEntityException"]) : void 0;
|
|
@@ -859,6 +795,376 @@ async function verifyStageBackups(input) {
|
|
|
859
795
|
}
|
|
860
796
|
}
|
|
861
797
|
//#endregion
|
|
798
|
+
//#region src/providers/s3/events.ts
|
|
799
|
+
/** What S3 tells the topic about: every object written, and every removed. */
|
|
800
|
+
const BUCKET_EVENTS = ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"];
|
|
801
|
+
/**
|
|
802
|
+
* Each bucket a subscriber watches, with the subscribers discovery could name.
|
|
803
|
+
*
|
|
804
|
+
* A bucket is watched when a process consumes its events — discovery records
|
|
805
|
+
* the edge, and the subscriber by its export — or when a build put a
|
|
806
|
+
* subscriber in its declaration. Only a named subscriber can be subscribed: a
|
|
807
|
+
* route is named after its export.
|
|
808
|
+
*/
|
|
809
|
+
function bucketWatchers(manifest, runnables, subscribers = {}) {
|
|
810
|
+
const watched = /* @__PURE__ */ new Map();
|
|
811
|
+
for (const [id, declaration] of Object.entries(manifest)) {
|
|
812
|
+
if (declaration.kind !== "objects") continue;
|
|
813
|
+
const key = provideKey(id, "eventsConnectionString");
|
|
814
|
+
const named = Object.entries(subscribers).flatMap(([worker, bound]) => bound.filter((s) => s.connectionKey === key).map((s) => ({
|
|
815
|
+
worker,
|
|
816
|
+
name: s.name
|
|
817
|
+
}))).sort((a, b) => `${a.worker}/${a.name}`.localeCompare(`${b.worker}/${b.name}`));
|
|
818
|
+
const edged = Object.values(runnables).some((edges) => edges.includes(eventsEdge(id)));
|
|
819
|
+
const declared = (declaration.subscribers?.length ?? 0) > 0;
|
|
820
|
+
if (named.length > 0 || edged || declared) watched.set(id, named);
|
|
821
|
+
}
|
|
822
|
+
return watched;
|
|
823
|
+
}
|
|
824
|
+
/** The topic a bucket's changes are published to. */
|
|
825
|
+
function eventsTopicName(bucket) {
|
|
826
|
+
return `${bucket.replaceAll(".", "-")}-events`;
|
|
827
|
+
}
|
|
828
|
+
/** What SNS gives up delivering, kept. */
|
|
829
|
+
function eventsDeadLetterName(bucket) {
|
|
830
|
+
return `${eventsTopicName(bucket)}-dlq`;
|
|
831
|
+
}
|
|
832
|
+
/** Only this bucket, in this account, may publish to its topic. */
|
|
833
|
+
function eventsTopicPolicy(topicArn, bucket, account) {
|
|
834
|
+
return {
|
|
835
|
+
Version: "2012-10-17",
|
|
836
|
+
Statement: [{
|
|
837
|
+
Sid: "GkmBucketPublishes",
|
|
838
|
+
Effect: "Allow",
|
|
839
|
+
Principal: { Service: "s3.amazonaws.com" },
|
|
840
|
+
Action: "sns:Publish",
|
|
841
|
+
Resource: topicArn,
|
|
842
|
+
Condition: {
|
|
843
|
+
ArnLike: { "aws:SourceArn": `arn:aws:s3:::${bucket}` },
|
|
844
|
+
StringEquals: { "aws:SourceAccount": account }
|
|
845
|
+
}
|
|
846
|
+
}]
|
|
847
|
+
};
|
|
848
|
+
}
|
|
849
|
+
/** Only the bucket's topic may send to its dead-letter queue. */
|
|
850
|
+
function eventsDeadLetterPolicy(queueArn, topicArn) {
|
|
851
|
+
return {
|
|
852
|
+
Version: "2012-10-17",
|
|
853
|
+
Statement: [{
|
|
854
|
+
Sid: "GkmTopicDeadLetters",
|
|
855
|
+
Effect: "Allow",
|
|
856
|
+
Principal: { Service: "sns.amazonaws.com" },
|
|
857
|
+
Action: "sqs:SendMessage",
|
|
858
|
+
Resource: queueArn,
|
|
859
|
+
Condition: { ArnEquals: { "aws:SourceArn": topicArn } }
|
|
860
|
+
}]
|
|
861
|
+
};
|
|
862
|
+
}
|
|
863
|
+
/** The id this provider's notification entry goes under. */
|
|
864
|
+
const notificationId = (id) => `gkm-${id}`;
|
|
865
|
+
/**
|
|
866
|
+
* The bucket's notifications with this provider's entry put back, and whether
|
|
867
|
+
* that changed anything. Every other entry — a queue, a function, a topic
|
|
868
|
+
* somebody added by hand — is kept exactly as it was.
|
|
869
|
+
*/
|
|
870
|
+
function mergedNotifications(current, id, topicArn) {
|
|
871
|
+
const own = notificationId(id);
|
|
872
|
+
const wanted = {
|
|
873
|
+
Id: own,
|
|
874
|
+
TopicArn: topicArn,
|
|
875
|
+
Events: [...BUCKET_EVENTS]
|
|
876
|
+
};
|
|
877
|
+
const topics = current.TopicConfigurations ?? [];
|
|
878
|
+
const existing = topics.find((t) => t.Id === own);
|
|
879
|
+
const same = existing !== void 0 && existing.TopicArn === topicArn && JSON.stringify([...existing.Events ?? []].sort()) === JSON.stringify([...BUCKET_EVENTS].sort()) && existing.Filter === void 0;
|
|
880
|
+
const { ResponseMetadata: _, ...rest } = current;
|
|
881
|
+
return {
|
|
882
|
+
config: {
|
|
883
|
+
...rest,
|
|
884
|
+
TopicConfigurations: [...topics.filter((t) => t.Id !== own), wanted]
|
|
885
|
+
},
|
|
886
|
+
changed: !same
|
|
887
|
+
};
|
|
888
|
+
}
|
|
889
|
+
/** S3 refused the entry because another one already covers these events. */
|
|
890
|
+
var BucketNotificationsOverlap = class extends GkmError {
|
|
891
|
+
bucket;
|
|
892
|
+
detail;
|
|
893
|
+
constructor(bucket, detail) {
|
|
894
|
+
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}`);
|
|
895
|
+
this.bucket = bucket;
|
|
896
|
+
this.detail = detail;
|
|
897
|
+
this.name = "BucketNotificationsOverlap";
|
|
898
|
+
}
|
|
899
|
+
};
|
|
900
|
+
const defaultEventsClients = async (credential, region) => {
|
|
901
|
+
const SNS = await import("@aws-sdk/client-sns");
|
|
902
|
+
const SQS = await import("@aws-sdk/client-sqs");
|
|
903
|
+
const { STSClient, GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
|
|
904
|
+
const config = await awsClientConfig(credential, region);
|
|
905
|
+
const endpoint = awsEndpoint(process.env, "SNS");
|
|
906
|
+
const sts = new STSClient({
|
|
907
|
+
...config,
|
|
908
|
+
...awsEndpoint(process.env, "STS") ? { endpoint: awsEndpoint(process.env, "STS") } : {}
|
|
909
|
+
});
|
|
910
|
+
const { Account } = await sts.send(new GetCallerIdentityCommand({}));
|
|
911
|
+
sts.destroy();
|
|
912
|
+
return {
|
|
913
|
+
SNS,
|
|
914
|
+
SQS,
|
|
915
|
+
sns: new SNS.SNSClient({
|
|
916
|
+
...config,
|
|
917
|
+
...endpoint ? { endpoint } : {}
|
|
918
|
+
}),
|
|
919
|
+
sqs: new SQS.SQSClient({
|
|
920
|
+
...config,
|
|
921
|
+
...awsEndpoint(process.env, "SQS") ? { endpoint: awsEndpoint(process.env, "SQS") } : {}
|
|
922
|
+
}),
|
|
923
|
+
account: Account,
|
|
924
|
+
region,
|
|
925
|
+
...endpoint ? { endpoint } : {}
|
|
926
|
+
};
|
|
927
|
+
};
|
|
928
|
+
let makeEventsClients = defaultEventsClients;
|
|
929
|
+
function errorName$1(error) {
|
|
930
|
+
const e = error;
|
|
931
|
+
return e?.name ?? e?.Code ?? e?.code ?? "";
|
|
932
|
+
}
|
|
933
|
+
async function readOr$1(read, missing) {
|
|
934
|
+
try {
|
|
935
|
+
return await read();
|
|
936
|
+
} catch (error) {
|
|
937
|
+
if (missing.includes(errorName$1(error))) return void 0;
|
|
938
|
+
throw error;
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
/**
|
|
942
|
+
* The topic, its policy, the dead-letter queue and the bucket's notification
|
|
943
|
+
* entry for one watched bucket — created where missing, put back where they
|
|
944
|
+
* drifted.
|
|
945
|
+
*/
|
|
946
|
+
async function ensureBucketEvents(ctx, s3, input) {
|
|
947
|
+
const { id, bucket, region } = input;
|
|
948
|
+
const { SNS, SQS, sns, sqs, account } = await makeEventsClients(ctx.credential, region);
|
|
949
|
+
const topicName = eventsTopicName(bucket);
|
|
950
|
+
const topicArn = `arn:aws:sns:${region}:${account}:${topicName}`;
|
|
951
|
+
const topicEntry = {
|
|
952
|
+
key: `sns-topic:${id}`,
|
|
953
|
+
type: "sns-topic"
|
|
954
|
+
};
|
|
955
|
+
const topic = await readOr$1(() => sns.send(new SNS.GetTopicAttributesCommand({ TopicArn: topicArn })), ["NotFound", "NotFoundException"]);
|
|
956
|
+
if (topic) await ctx.state.ready(topicEntry, topicArn);
|
|
957
|
+
else await ctx.change({
|
|
958
|
+
construct: id,
|
|
959
|
+
resource: `SNS topic ${topicName}`,
|
|
960
|
+
change: "create"
|
|
961
|
+
}, async () => {
|
|
962
|
+
await ctx.state.pending(topicEntry);
|
|
963
|
+
await sns.send(new SNS.CreateTopicCommand({
|
|
964
|
+
Name: topicName,
|
|
965
|
+
Tags: identityTags(ctx, id)
|
|
966
|
+
}));
|
|
967
|
+
await ctx.state.ready(topicEntry, topicArn);
|
|
968
|
+
});
|
|
969
|
+
const topicPolicy = eventsTopicPolicy(topicArn, bucket, account);
|
|
970
|
+
const currentTopicPolicy = topic?.Attributes?.Policy;
|
|
971
|
+
if (!currentTopicPolicy || canonicalPolicy(JSON.parse(currentTopicPolicy)) !== canonicalPolicy(topicPolicy)) await ctx.change({
|
|
972
|
+
construct: id,
|
|
973
|
+
resource: `SNS topic ${topicName}`,
|
|
974
|
+
change: `publishable by '${bucket}' only`
|
|
975
|
+
}, async () => {
|
|
976
|
+
await sns.send(new SNS.SetTopicAttributesCommand({
|
|
977
|
+
TopicArn: topicArn,
|
|
978
|
+
AttributeName: "Policy",
|
|
979
|
+
AttributeValue: JSON.stringify(topicPolicy)
|
|
980
|
+
}));
|
|
981
|
+
});
|
|
982
|
+
const queueName = eventsDeadLetterName(bucket);
|
|
983
|
+
const deadLetterArn = `arn:aws:sqs:${region}:${account}:${queueName}`;
|
|
984
|
+
const queueEntry = {
|
|
985
|
+
key: `sqs-queue:${id}-events-dlq`,
|
|
986
|
+
type: "sqs-queue"
|
|
987
|
+
};
|
|
988
|
+
const queue = await readOr$1(() => sqs.send(new SQS.GetQueueUrlCommand({ QueueName: queueName })), ["QueueDoesNotExist", "AWS.SimpleQueueService.NonExistentQueue"]);
|
|
989
|
+
let queueUrl = queue?.QueueUrl;
|
|
990
|
+
if (queueUrl) await ctx.state.ready(queueEntry, deadLetterArn);
|
|
991
|
+
else await ctx.change({
|
|
992
|
+
construct: id,
|
|
993
|
+
resource: `SQS queue ${queueName}`,
|
|
994
|
+
change: "create"
|
|
995
|
+
}, async () => {
|
|
996
|
+
await ctx.state.pending(queueEntry);
|
|
997
|
+
queueUrl = (await sqs.send(new SQS.CreateQueueCommand({
|
|
998
|
+
QueueName: queueName,
|
|
999
|
+
Attributes: { MessageRetentionPeriod: "1209600" },
|
|
1000
|
+
tags: Object.fromEntries(identityTags(ctx, id).map((t) => [t.Key, t.Value]))
|
|
1001
|
+
}))).QueueUrl;
|
|
1002
|
+
await ctx.state.ready(queueEntry, deadLetterArn);
|
|
1003
|
+
});
|
|
1004
|
+
const queuePolicy = eventsDeadLetterPolicy(deadLetterArn, topicArn);
|
|
1005
|
+
const currentQueuePolicy = queue?.QueueUrl ? (await sqs.send(new SQS.GetQueueAttributesCommand({
|
|
1006
|
+
QueueUrl: queue.QueueUrl,
|
|
1007
|
+
AttributeNames: ["Policy"]
|
|
1008
|
+
}))).Attributes?.Policy : void 0;
|
|
1009
|
+
if (!currentQueuePolicy || canonicalPolicy(JSON.parse(currentQueuePolicy)) !== canonicalPolicy(queuePolicy)) await ctx.change({
|
|
1010
|
+
construct: id,
|
|
1011
|
+
resource: `SQS queue ${queueName}`,
|
|
1012
|
+
change: `receives what ${topicName} cannot deliver`
|
|
1013
|
+
}, async () => {
|
|
1014
|
+
await sqs.send(new SQS.SetQueueAttributesCommand({
|
|
1015
|
+
QueueUrl: queueUrl,
|
|
1016
|
+
Attributes: { Policy: JSON.stringify(queuePolicy) }
|
|
1017
|
+
}));
|
|
1018
|
+
});
|
|
1019
|
+
const merged = mergedNotifications(await readOr$1(() => s3.s3.send(new s3.S3.GetBucketNotificationConfigurationCommand({ Bucket: bucket })), ["NoSuchBucket"]) ?? {}, id, topicArn);
|
|
1020
|
+
if (merged.changed) await ctx.change({
|
|
1021
|
+
construct: id,
|
|
1022
|
+
resource: `bucket ${bucket}`,
|
|
1023
|
+
change: `send object creates and deletes to ${topicName}`
|
|
1024
|
+
}, async () => {
|
|
1025
|
+
try {
|
|
1026
|
+
await s3.s3.send(new s3.S3.PutBucketNotificationConfigurationCommand({
|
|
1027
|
+
Bucket: bucket,
|
|
1028
|
+
NotificationConfiguration: merged.config
|
|
1029
|
+
}));
|
|
1030
|
+
} catch (error) {
|
|
1031
|
+
const message = error.message ?? "";
|
|
1032
|
+
if (/overlap/i.test(message)) throw new BucketNotificationsOverlap(bucket, message);
|
|
1033
|
+
throw error;
|
|
1034
|
+
}
|
|
1035
|
+
});
|
|
1036
|
+
sns.destroy();
|
|
1037
|
+
sqs.destroy();
|
|
1038
|
+
return {
|
|
1039
|
+
topicArn,
|
|
1040
|
+
deadLetterArn
|
|
1041
|
+
};
|
|
1042
|
+
}
|
|
1043
|
+
/**
|
|
1044
|
+
* The events key: the topic's address, signed by the bucket's own access key
|
|
1045
|
+
* — read off the bucket's URL, so a rotated key rotates this one with it.
|
|
1046
|
+
*/
|
|
1047
|
+
async function ensureEventsKey(ctx, input) {
|
|
1048
|
+
const { id, topicArn, region } = input;
|
|
1049
|
+
const key = provideKey(id, "eventsConnectionString");
|
|
1050
|
+
const url = ctx.secrets[provideKey(id, "url")];
|
|
1051
|
+
let parsed;
|
|
1052
|
+
try {
|
|
1053
|
+
parsed = url ? s3Url.parse(url) : void 0;
|
|
1054
|
+
} catch {
|
|
1055
|
+
parsed = void 0;
|
|
1056
|
+
}
|
|
1057
|
+
if (!parsed?.accessKeyId || !parsed.secretAccessKey) {
|
|
1058
|
+
await ctx.change({
|
|
1059
|
+
construct: id,
|
|
1060
|
+
resource: key,
|
|
1061
|
+
change: "set to the topic’s address"
|
|
1062
|
+
}, async () => {});
|
|
1063
|
+
return;
|
|
1064
|
+
}
|
|
1065
|
+
const { snsUrl } = await import("@geekmidas/events/sns");
|
|
1066
|
+
const endpoint = awsEndpoint(process.env, "SNS");
|
|
1067
|
+
const address = new URL(snsUrl.build({
|
|
1068
|
+
topicArn,
|
|
1069
|
+
region,
|
|
1070
|
+
...endpoint ? { endpoint } : {}
|
|
1071
|
+
}));
|
|
1072
|
+
address.searchParams.set("accessKeyId", parsed.accessKeyId);
|
|
1073
|
+
address.searchParams.set("secretAccessKey", parsed.secretAccessKey);
|
|
1074
|
+
const value = address.toString();
|
|
1075
|
+
const entry = {
|
|
1076
|
+
key: `events-key:${id}`,
|
|
1077
|
+
type: "url"
|
|
1078
|
+
};
|
|
1079
|
+
if (ctx.secrets[key] === value) {
|
|
1080
|
+
await ctx.state.ready(entry, topicArn);
|
|
1081
|
+
return;
|
|
1082
|
+
}
|
|
1083
|
+
await ctx.change({
|
|
1084
|
+
construct: id,
|
|
1085
|
+
resource: key,
|
|
1086
|
+
change: `set to ${topicArn}`
|
|
1087
|
+
}, async () => {
|
|
1088
|
+
await ctx.writeSecrets({ [key]: value });
|
|
1089
|
+
await ctx.state.ready(entry, topicArn);
|
|
1090
|
+
});
|
|
1091
|
+
}
|
|
1092
|
+
/** Where SNS pushes to a worker: its own host on the stage's domain. */
|
|
1093
|
+
function workerPushHost(worker, domain) {
|
|
1094
|
+
return `${appKey(worker)}.${domain}`;
|
|
1095
|
+
}
|
|
1096
|
+
/**
|
|
1097
|
+
* One HTTP subscription per subscriber to the bucket's topic, at its route on
|
|
1098
|
+
* its worker's host, with the bucket's dead-letter queue — and each ARN
|
|
1099
|
+
* recorded, which is what the worker accepts deliveries under.
|
|
1100
|
+
*
|
|
1101
|
+
* Unfiltered: a bucket's notifications carry no `type` attribute, and the
|
|
1102
|
+
* subscriber's own filter — events, prefix, suffix — is what decides. Only a
|
|
1103
|
+
* compose stage pushes to a worker; any other is told so and left alone.
|
|
1104
|
+
*/
|
|
1105
|
+
async function ensurePushSubscriptions(ctx, input) {
|
|
1106
|
+
const { id, events, region, watchers } = input;
|
|
1107
|
+
if (!deploysWithCompose(ctx.workspace)) {
|
|
1108
|
+
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}'`);
|
|
1109
|
+
return;
|
|
1110
|
+
}
|
|
1111
|
+
if (watchers.length === 0) return;
|
|
1112
|
+
const domain = ctx.workspace.domains?.[ctx.stage];
|
|
1113
|
+
if (!domain) throw new NoDomainForStage(ctx.stage);
|
|
1114
|
+
const { SNSConnection, reconcileHttpSubscriptions } = await import("@geekmidas/events/sns");
|
|
1115
|
+
const { credentials } = await awsClientConfig(ctx.credential, region);
|
|
1116
|
+
const endpoint = awsEndpoint(process.env, "SNS");
|
|
1117
|
+
const byWorker = /* @__PURE__ */ new Map();
|
|
1118
|
+
for (const watcher of watchers) byWorker.set(watcher.worker, [...byWorker.get(watcher.worker) ?? [], watcher]);
|
|
1119
|
+
for (const [worker, own] of byWorker) {
|
|
1120
|
+
const host = workerPushHost(worker, domain);
|
|
1121
|
+
const endpoints = own.map(({ name }) => ({
|
|
1122
|
+
name,
|
|
1123
|
+
endpoint: `https://${host}${subscriberRoute(name)}`,
|
|
1124
|
+
deadLetterQueueArn: events.deadLetterArn
|
|
1125
|
+
}));
|
|
1126
|
+
const unrecorded = own.filter(({ name }) => ctx.state.record(subscriptionKey(worker, name))?.status !== "ready");
|
|
1127
|
+
if (ctx.dryRun) {
|
|
1128
|
+
if (unrecorded.length > 0) await ctx.change({
|
|
1129
|
+
construct: id,
|
|
1130
|
+
resource: `SNS subscriptions on ${host}`,
|
|
1131
|
+
change: `subscribe ${unrecorded.map((w) => w.name).join(", ")}`
|
|
1132
|
+
}, async () => {});
|
|
1133
|
+
continue;
|
|
1134
|
+
}
|
|
1135
|
+
const connection = new SNSConnection({
|
|
1136
|
+
topicArn: events.topicArn,
|
|
1137
|
+
region,
|
|
1138
|
+
...endpoint ? { endpoint } : {},
|
|
1139
|
+
...credentials ? { credentials } : {}
|
|
1140
|
+
});
|
|
1141
|
+
const result = await reconcileHttpSubscriptions(connection, {
|
|
1142
|
+
endpoints,
|
|
1143
|
+
ownedHost: host
|
|
1144
|
+
});
|
|
1145
|
+
await connection.close();
|
|
1146
|
+
for (const spec of endpoints) {
|
|
1147
|
+
const arn = result.subscriptions[spec.name];
|
|
1148
|
+
const pending = result.pending.includes(spec.name);
|
|
1149
|
+
if (ctx.state.record(subscriptionKey(worker, spec.name))?.id !== arn) ctx.log(` ✓ '${spec.name}' subscribed to ${events.topicArn.split(":").pop()} at ${spec.endpoint}`);
|
|
1150
|
+
const { key, type, data } = subscriptionResource({
|
|
1151
|
+
worker,
|
|
1152
|
+
name: spec.name,
|
|
1153
|
+
topicArn: events.topicArn,
|
|
1154
|
+
endpoint: spec.endpoint,
|
|
1155
|
+
deadLetterQueueArn: events.deadLetterArn,
|
|
1156
|
+
pending
|
|
1157
|
+
}, arn);
|
|
1158
|
+
await ctx.state.ready({
|
|
1159
|
+
key,
|
|
1160
|
+
type,
|
|
1161
|
+
...data ? { data } : {}
|
|
1162
|
+
}, arn);
|
|
1163
|
+
}
|
|
1164
|
+
for (const arn of result.removed) ctx.log(` – unsubscribed ${arn}: no subscriber wants it any more`);
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
//#endregion
|
|
862
1168
|
//#region src/providers/s3/origins.ts
|
|
863
1169
|
/**
|
|
864
1170
|
* Which browser origins may call a bucket: the stage's sites that depend on
|
|
@@ -1052,9 +1358,10 @@ let makeClients = defaultClients;
|
|
|
1052
1358
|
async function ensureS3(ctx) {
|
|
1053
1359
|
const region = s3Region(ctx);
|
|
1054
1360
|
const clients = await makeClients(ctx.credential, region);
|
|
1055
|
-
|
|
1361
|
+
const watched = bucketWatchers(ctx.manifest, ctx.runnables, ctx.subscribers);
|
|
1362
|
+
for (const construct of bucketConstructs(ctx.manifest)) await ensureBucket(ctx, clients, construct, watched.get(construct.id));
|
|
1056
1363
|
}
|
|
1057
|
-
async function ensureBucket(ctx, stageClients, construct) {
|
|
1364
|
+
async function ensureBucket(ctx, stageClients, construct, watchers) {
|
|
1058
1365
|
const { id } = construct;
|
|
1059
1366
|
const nameInput = {
|
|
1060
1367
|
scope: ctx.identity.scope,
|
|
@@ -1078,11 +1385,19 @@ async function ensureBucket(ctx, stageClients, construct) {
|
|
|
1078
1385
|
open,
|
|
1079
1386
|
...construct.expire ? { expire: construct.expire } : {}
|
|
1080
1387
|
});
|
|
1388
|
+
const events = watchers ? await ensureBucketEvents(ctx, clients, {
|
|
1389
|
+
id,
|
|
1390
|
+
bucket,
|
|
1391
|
+
region: clients.region
|
|
1392
|
+
}) : void 0;
|
|
1081
1393
|
const user = await ensureIamUser(ctx, clients, {
|
|
1082
1394
|
id,
|
|
1083
1395
|
user: iamUserName(nameInput),
|
|
1084
1396
|
policyName: IAM_POLICY_NAME,
|
|
1085
|
-
policy: userPolicy(bucket, {
|
|
1397
|
+
policy: userPolicy(bucket, {
|
|
1398
|
+
versioning,
|
|
1399
|
+
...events ? { eventsTopicArn: events.topicArn } : {}
|
|
1400
|
+
}),
|
|
1086
1401
|
describe: "this bucket only"
|
|
1087
1402
|
});
|
|
1088
1403
|
await ensureAccessKey(ctx, clients, {
|
|
@@ -1091,6 +1406,19 @@ async function ensureBucket(ctx, stageClients, construct) {
|
|
|
1091
1406
|
urlKey: provideKey(id, "url"),
|
|
1092
1407
|
...user
|
|
1093
1408
|
});
|
|
1409
|
+
if (events && watchers) {
|
|
1410
|
+
await ensureEventsKey(ctx, {
|
|
1411
|
+
id,
|
|
1412
|
+
topicArn: events.topicArn,
|
|
1413
|
+
region: clients.region
|
|
1414
|
+
});
|
|
1415
|
+
await ensurePushSubscriptions(ctx, {
|
|
1416
|
+
id,
|
|
1417
|
+
events,
|
|
1418
|
+
region: clients.region,
|
|
1419
|
+
watchers
|
|
1420
|
+
});
|
|
1421
|
+
}
|
|
1094
1422
|
const publicUrl = bucketPublicUrl(bucket, clients.region, clients.endpoint);
|
|
1095
1423
|
for (const server of construct.servers) {
|
|
1096
1424
|
const key = provideKey(server.id, "url");
|
|
@@ -1393,8 +1721,13 @@ const BUILTIN_PROVIDERS = { objects: { s3: {
|
|
|
1393
1721
|
check: checkS3Config,
|
|
1394
1722
|
provisioning: S3_PROVISIONING,
|
|
1395
1723
|
credentials: awsProvisioningCredentials,
|
|
1396
|
-
runtimeKeys(manifest) {
|
|
1397
|
-
|
|
1724
|
+
runtimeKeys(manifest, runnables = {}) {
|
|
1725
|
+
const watched = bucketWatchers(manifest, runnables);
|
|
1726
|
+
return bucketConstructs(manifest).flatMap((b) => [
|
|
1727
|
+
provideKey(b.id, "url"),
|
|
1728
|
+
...watched.has(b.id) ? [provideKey(b.id, "eventsConnectionString")] : [],
|
|
1729
|
+
...b.servers.map((s) => provideKey(s.id, "url"))
|
|
1730
|
+
]);
|
|
1398
1731
|
},
|
|
1399
1732
|
ensure: ensureS3,
|
|
1400
1733
|
verify: verifyS3
|
|
@@ -1519,7 +1852,7 @@ async function provisionStage(options) {
|
|
|
1519
1852
|
}
|
|
1520
1853
|
const identity = deployIdentity(workspace, stage);
|
|
1521
1854
|
let secrets = (await options.secrets.read())?.custom ?? {};
|
|
1522
|
-
for (const entry of configured) entry.report.planned = entry.provider.runtimeKeys(manifest).filter((key) => secrets[key] === void 0);
|
|
1855
|
+
for (const entry of configured) entry.report.planned = entry.provider.runtimeKeys(manifest, runnables).filter((key) => secrets[key] === void 0);
|
|
1523
1856
|
const state = dryRun ? await readOnlyState(options.state, stage) : journalState(await DeployJournal.open(options.state, stage, () => deploysWithCompose(workspace) ? createComposeState(stage) : createEmptyState(stage, "", "")));
|
|
1524
1857
|
const writeSecrets = async (values) => {
|
|
1525
1858
|
if (dryRun) return;
|
|
@@ -1541,6 +1874,7 @@ async function provisionStage(options) {
|
|
|
1541
1874
|
workspace,
|
|
1542
1875
|
manifest,
|
|
1543
1876
|
runnables,
|
|
1877
|
+
...options.subscribers ? { subscribers: options.subscribers } : {},
|
|
1544
1878
|
stage,
|
|
1545
1879
|
identity,
|
|
1546
1880
|
config: entry.config,
|
|
@@ -1993,6 +2327,7 @@ async function provisionResources(phaseCtx, request, ctx, store, emit) {
|
|
|
1993
2327
|
stage: phaseCtx.stage,
|
|
1994
2328
|
manifest: phaseCtx.manifest,
|
|
1995
2329
|
runnables: phaseCtx.runnables ?? {},
|
|
2330
|
+
...phaseCtx.subscribers ? { subscribers: phaseCtx.subscribers } : {},
|
|
1996
2331
|
secrets: phaseCtx.secrets,
|
|
1997
2332
|
state: store,
|
|
1998
2333
|
dryRun: ctx.dryRun,
|
|
@@ -2087,11 +2422,13 @@ async function prepare(source, request, ctx, emit, redactor) {
|
|
|
2087
2422
|
assertSitePasswordTarget(configured, stage, resolved.target.name);
|
|
2088
2423
|
const runnables = {};
|
|
2089
2424
|
const background = {};
|
|
2425
|
+
const subscribers = {};
|
|
2090
2426
|
const manifest = await discover({
|
|
2091
2427
|
patterns: constructGlobs(configured),
|
|
2092
2428
|
cwd: configured.root,
|
|
2093
2429
|
runnables,
|
|
2094
|
-
background
|
|
2430
|
+
background,
|
|
2431
|
+
subscribers
|
|
2095
2432
|
});
|
|
2096
2433
|
resolveStageTelemetry({
|
|
2097
2434
|
...configured.deploy?.telemetry ? { telemetry: configured.deploy.telemetry } : {},
|
|
@@ -2172,6 +2509,7 @@ async function prepare(source, request, ctx, emit, redactor) {
|
|
|
2172
2509
|
manifest,
|
|
2173
2510
|
runnables,
|
|
2174
2511
|
background,
|
|
2512
|
+
subscribers,
|
|
2175
2513
|
options,
|
|
2176
2514
|
dryRun: ctx.dryRun,
|
|
2177
2515
|
atomic: request.atomic ?? false,
|
|
@@ -2324,6 +2662,6 @@ async function load(input, sandbox) {
|
|
|
2324
2662
|
return workspace;
|
|
2325
2663
|
}
|
|
2326
2664
|
//#endregion
|
|
2327
|
-
export { UnknownDeployApps as a, bucketName as c,
|
|
2665
|
+
export { UnknownDeployApps as a, bucketName as c, TargetBuildsNothing as i, iamUserName as l, NoDeployableApps as n, backupsUserName as o, RollbackFailed as r, IAM_USER_PATH as s, deploy as t };
|
|
2328
2666
|
|
|
2329
|
-
//# sourceMappingURL=deploy-
|
|
2667
|
+
//# sourceMappingURL=deploy-CiRYwFmr.mjs.map
|