@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,14 +1,14 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
|
|
2
2
|
const require_errors = require("./errors-DMC4Umsb.cjs");
|
|
3
|
-
const
|
|
3
|
+
const require_credentials = require("./credentials-D7XJypNd.cjs");
|
|
4
4
|
const require_workspace = require("./workspace-C82GLPnf.cjs");
|
|
5
5
|
const require_derive = require("./derive-DAbo49sm.cjs");
|
|
6
|
-
const require_SubscriberGenerator = require("./SubscriberGenerator-
|
|
6
|
+
const require_SubscriberGenerator = require("./SubscriberGenerator-C3QTae-R.cjs");
|
|
7
7
|
const require_identity = require("./identity-CbLfgQNT.cjs");
|
|
8
|
-
const require_EndpointGenerator = require("./EndpointGenerator-
|
|
9
|
-
const require_discover = require("./discover-
|
|
8
|
+
const require_EndpointGenerator = require("./EndpointGenerator-B2MUa4M2.cjs");
|
|
9
|
+
const require_discover = require("./discover-ojkcbxHw.cjs");
|
|
10
10
|
const require_config = require("./config.cjs");
|
|
11
|
-
const require_resolve = require("./resolve-
|
|
11
|
+
const require_resolve = require("./resolve-C7GKQcE4.cjs");
|
|
12
12
|
let node_path = require("node:path");
|
|
13
13
|
let node_fs = require("node:fs");
|
|
14
14
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -537,7 +537,7 @@ const EDGE_KINDS = {
|
|
|
537
537
|
* Docker Desktop resolves this name already; on Linux the compose definition
|
|
538
538
|
* maps it to the host gateway.
|
|
539
539
|
*/
|
|
540
|
-
const HOST_GATEWAY = "host.docker.internal";
|
|
540
|
+
const HOST_GATEWAY$1 = "host.docker.internal";
|
|
541
541
|
/**
|
|
542
542
|
* The suffix every local host shares.
|
|
543
543
|
*
|
|
@@ -576,7 +576,7 @@ function sitesFor(plan, project, addresses = {}) {
|
|
|
576
576
|
if (!port) continue;
|
|
577
577
|
sites.push({
|
|
578
578
|
host,
|
|
579
|
-
upstream: `http://${HOST_GATEWAY}:${port}`
|
|
579
|
+
upstream: `http://${HOST_GATEWAY$1}:${port}`
|
|
580
580
|
});
|
|
581
581
|
}
|
|
582
582
|
return sites;
|
|
@@ -722,6 +722,108 @@ function emulatorQueueUrl(name, port) {
|
|
|
722
722
|
return `${emulatorEndpoint(port)}/${EMULATOR_ACCOUNT}/${name}`;
|
|
723
723
|
}
|
|
724
724
|
//#endregion
|
|
725
|
+
//#region src/reconcile/objectEvents.ts
|
|
726
|
+
/**
|
|
727
|
+
* A bucket's object events, where the bucket is a local MinIO.
|
|
728
|
+
*
|
|
729
|
+
* S3 publishes a bucket's events to a topic the deploy creates; MinIO has no
|
|
730
|
+
* topic to publish to, but it can post each event to a webhook. So where MinIO
|
|
731
|
+
* holds a watched bucket, it posts the bucket's events to the process that
|
|
732
|
+
* runs the bucket's subscribers, on a route only it can use, and that process
|
|
733
|
+
* relays each one onto the events broker — under the bucket's name, as
|
|
734
|
+
* `object.created` or `object.deleted` — where every subscriber drains a queue
|
|
735
|
+
* of its own, as a topic's subscribers do.
|
|
736
|
+
*
|
|
737
|
+
* Declared to MinIO in two halves, both derived here so they cannot drift:
|
|
738
|
+
*
|
|
739
|
+
* - **a webhook target per bucket**, as container environment: where to post,
|
|
740
|
+
* the token to present, and a queue on disk, because MinIO starts before the
|
|
741
|
+
* process it posts to and must keep what it could not deliver;
|
|
742
|
+
* - **the bucket's notification**, written through the S3 API once the bucket
|
|
743
|
+
* exists: every created and removed object, to that target. Unfiltered —
|
|
744
|
+
* two subscribers watching overlapping prefixes are two rules S3 refuses on
|
|
745
|
+
* one bucket, and each subscriber filters what it is handed anyway.
|
|
746
|
+
*/
|
|
747
|
+
/**
|
|
748
|
+
* The token MinIO presents when it posts a bucket's events.
|
|
749
|
+
*
|
|
750
|
+
* Derived, never stored: the container and the process it posts to are handed
|
|
751
|
+
* the same value by the same derivation — with the stage's random seed where a
|
|
752
|
+
* deployed stage's stack has one, so the token is a secret there, and from the
|
|
753
|
+
* project alone locally, where everything it would protect is on loopback.
|
|
754
|
+
* Not salted by the stage: one MinIO serves `gkm dev` and `gkm test`, and a
|
|
755
|
+
* target is declared once per container.
|
|
756
|
+
*/
|
|
757
|
+
function objectsWebhookToken(project, bucket, seed) {
|
|
758
|
+
return (0, node_crypto.createHash)("sha256").update(`${seed ? `${seed}:` : ""}${project}:objects-webhook:${bucket}`).digest("base64url").slice(0, 32);
|
|
759
|
+
}
|
|
760
|
+
/**
|
|
761
|
+
* The target's id in MinIO's environment — `MINIO_NOTIFY_WEBHOOK_*_<ID>`.
|
|
762
|
+
*
|
|
763
|
+
* Upper-cased with nothing between words: a canonical id is letters and
|
|
764
|
+
* digits, and an underscore inside the id would read as part of the setting's
|
|
765
|
+
* name.
|
|
766
|
+
*/
|
|
767
|
+
function minioTargetId(bucket) {
|
|
768
|
+
return bucket.toUpperCase();
|
|
769
|
+
}
|
|
770
|
+
/** The target as a notification names it. */
|
|
771
|
+
function minioTargetArn(bucket) {
|
|
772
|
+
return `arn:minio:sqs::${minioTargetId(bucket)}:webhook`;
|
|
773
|
+
}
|
|
774
|
+
/** How a container reaches a process on the host. */
|
|
775
|
+
const HOST_GATEWAY = "host.docker.internal";
|
|
776
|
+
/** Where MinIO keeps what it could not deliver yet, inside its container. */
|
|
777
|
+
const QUEUE_ROOT = "/gkm-object-events";
|
|
778
|
+
/** The id of the notification rule gkm owns on a bucket. */
|
|
779
|
+
const NOTIFICATION_RULE_PREFIX = "gkm-";
|
|
780
|
+
/**
|
|
781
|
+
* MinIO's environment for each watched bucket's webhook target.
|
|
782
|
+
*
|
|
783
|
+
* Sorted, so the same buckets always render the same environment and a
|
|
784
|
+
* reconcile that changed nothing does not recreate the container.
|
|
785
|
+
*/
|
|
786
|
+
function minioWebhookEnv(hooks) {
|
|
787
|
+
const env = {};
|
|
788
|
+
for (const hook of [...hooks].sort((a, b) => a.bucket.localeCompare(b.bucket))) {
|
|
789
|
+
const id = minioTargetId(hook.bucket);
|
|
790
|
+
env[`MINIO_NOTIFY_WEBHOOK_ENABLE_${id}`] = "on";
|
|
791
|
+
env[`MINIO_NOTIFY_WEBHOOK_ENDPOINT_${id}`] = hook.endpoint;
|
|
792
|
+
env[`MINIO_NOTIFY_WEBHOOK_AUTH_TOKEN_${id}`] = hook.token;
|
|
793
|
+
env[`MINIO_NOTIFY_WEBHOOK_QUEUE_DIR_${id}`] = `${QUEUE_ROOT}/${id.toLowerCase()}`;
|
|
794
|
+
}
|
|
795
|
+
return env;
|
|
796
|
+
}
|
|
797
|
+
/** The rule that sends every created and removed object to the bucket's target. */
|
|
798
|
+
function minioNotificationRule(bucket) {
|
|
799
|
+
return {
|
|
800
|
+
Id: `${NOTIFICATION_RULE_PREFIX}${bucket}`,
|
|
801
|
+
QueueArn: minioTargetArn(bucket),
|
|
802
|
+
Events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
803
|
+
};
|
|
804
|
+
}
|
|
805
|
+
/**
|
|
806
|
+
* Each watched bucket, and the workers that run one of its subscribers.
|
|
807
|
+
*
|
|
808
|
+
* A bucket is watched when a subscriber reads its events key. MinIO posts a
|
|
809
|
+
* bucket's events to one place, and the relay fans them out to every
|
|
810
|
+
* subscriber whichever worker received them — so one worker per bucket is
|
|
811
|
+
* enough, and the first, by id, is the one chosen, so the choice is stable.
|
|
812
|
+
*/
|
|
813
|
+
function watchedBuckets(manifest, subscribers) {
|
|
814
|
+
const byKey = /* @__PURE__ */ new Map();
|
|
815
|
+
for (const declaration of Object.values(manifest)) {
|
|
816
|
+
if (declaration.kind !== "objects") continue;
|
|
817
|
+
byKey.set((0, _geekmidas_manifest.provideKey)(declaration.id, "eventsConnectionString"), declaration.id);
|
|
818
|
+
}
|
|
819
|
+
const watched = /* @__PURE__ */ new Map();
|
|
820
|
+
for (const worker of Object.keys(subscribers).sort()) for (const { connectionKey } of subscribers[worker] ?? []) {
|
|
821
|
+
const bucket = byKey.get(connectionKey);
|
|
822
|
+
if (bucket && !watched.has(bucket)) watched.set(bucket, worker);
|
|
823
|
+
}
|
|
824
|
+
return watched;
|
|
825
|
+
}
|
|
826
|
+
//#endregion
|
|
725
827
|
//#region src/telemetry/edges.ts
|
|
726
828
|
/**
|
|
727
829
|
* Which processes use a `Telemetry` node — read off the manifest's edges.
|
|
@@ -1217,6 +1319,14 @@ function envFor(plan, options) {
|
|
|
1217
1319
|
}
|
|
1218
1320
|
Object.assign(env, publicEnv(plan, env, options.addresses));
|
|
1219
1321
|
Object.assign(env, brokerEnv(plan, options.ports, credential));
|
|
1322
|
+
const relay = env.EVENT_PUBLISHER_CONNECTION_STRING;
|
|
1323
|
+
if (relay && options.relayedBuckets?.length) for (const resource of plan.resources) {
|
|
1324
|
+
if (resource.kind !== "objects" || resource.container !== "minio") continue;
|
|
1325
|
+
if (!options.relayedBuckets.includes(resource.id)) continue;
|
|
1326
|
+
if (!env[resource.envKey]) continue;
|
|
1327
|
+
env[(0, _geekmidas_manifest.provideKey)(resource.id, "eventsConnectionString")] = relay;
|
|
1328
|
+
env[(0, _geekmidas_manifest.provideKey)(resource.id, "eventsToken")] = objectsWebhookToken(options.project ?? "", resource.id, credential.seed);
|
|
1329
|
+
}
|
|
1220
1330
|
if (plan.resources.some((r) => r.kind === "objects" && env[r.envKey])) Object.assign(env, storageCredentials(options.credentials));
|
|
1221
1331
|
return env;
|
|
1222
1332
|
}
|
|
@@ -1869,7 +1979,7 @@ function folderName(path) {
|
|
|
1869
1979
|
function getKeystoreDir(project) {
|
|
1870
1980
|
if (!PROJECT_KEY.test(project.key)) throw new KeystoreProjectInvalid(project.key);
|
|
1871
1981
|
const [namespace, name] = project.key.split("/");
|
|
1872
|
-
return (0, node_path.join)(project.home ??
|
|
1982
|
+
return (0, node_path.join)(project.home ?? require_credentials.gkmHome(), "keys", namespace, name);
|
|
1873
1983
|
}
|
|
1874
1984
|
/** Get the path to a stage's encryption key. */
|
|
1875
1985
|
function getKeyPath(stage, project) {
|
|
@@ -1886,7 +1996,7 @@ function legacyKeyPaths(stage, project) {
|
|
|
1886
1996
|
key,
|
|
1887
1997
|
home: project.home
|
|
1888
1998
|
}));
|
|
1889
|
-
const homes = [.../* @__PURE__ */ new Set([project.home ??
|
|
1999
|
+
const homes = [.../* @__PURE__ */ new Set([project.home ?? require_credentials.gkmHome(), (0, node_path.join)((0, node_os.homedir)(), ".gkm")])];
|
|
1890
2000
|
const names = (project.legacy ?? []).filter(isLegacyName);
|
|
1891
2001
|
return [...aliases, ...names.flatMap((name) => homes.map((home) => (0, node_path.join)(home, name, `${stage}.key`)))];
|
|
1892
2002
|
}
|
|
@@ -2140,7 +2250,7 @@ function localCredentialsPath(project) {
|
|
|
2140
2250
|
const keys = getKeystoreDir(project);
|
|
2141
2251
|
const name = keys.split(/[\\/]/).at(-1);
|
|
2142
2252
|
const namespace = keys.split(/[\\/]/).at(-2);
|
|
2143
|
-
return (0, node_path.join)(project.home ??
|
|
2253
|
+
return (0, node_path.join)(project.home ?? require_credentials.gkmHome(), "local", namespace, `${name}.json`);
|
|
2144
2254
|
}
|
|
2145
2255
|
/** The local stage's logins file is there, and its key is not. */
|
|
2146
2256
|
var LocalCredentialsKeyMissing = class extends require_errors.GkmError {
|
|
@@ -2584,6 +2694,56 @@ async function databasesExist(client, names) {
|
|
|
2584
2694
|
}
|
|
2585
2695
|
}
|
|
2586
2696
|
/**
|
|
2697
|
+
* Point each watched bucket's events at its webhook target, and stop sending
|
|
2698
|
+
* an unwatched one's.
|
|
2699
|
+
*
|
|
2700
|
+
* Merged rather than written whole: only the rule gkm owns on a bucket
|
|
2701
|
+
* (`gkm-<Bucket>`) is added or removed, and every other rule — one somebody
|
|
2702
|
+
* added by hand — is kept. Compared before writing, so a converged reconcile
|
|
2703
|
+
* changes nothing.
|
|
2704
|
+
*
|
|
2705
|
+
* @param buckets - each bucket the plan names, by construct id and name
|
|
2706
|
+
* @param watched - the construct ids whose events are relayed
|
|
2707
|
+
*/
|
|
2708
|
+
async function applyNotifications(client, buckets, watched) {
|
|
2709
|
+
const applied = [];
|
|
2710
|
+
for (const { id, name } of buckets) {
|
|
2711
|
+
const current = await client.notification(name);
|
|
2712
|
+
const queues = current.QueueConfigurations ?? [];
|
|
2713
|
+
const others = queues.filter((rule) => !rule.Id?.startsWith(NOTIFICATION_RULE_PREFIX));
|
|
2714
|
+
const wanted = watched.has(id) ? [...others, minioNotificationRule(id)] : others;
|
|
2715
|
+
if (!watched.has(id) && others.length === queues.length) continue;
|
|
2716
|
+
const describe = `object events from ${name}`;
|
|
2717
|
+
const ours = queues.filter((rule) => rule.Id?.startsWith(NOTIFICATION_RULE_PREFIX));
|
|
2718
|
+
if (watched.has(id) ? ours.length === 1 && sameRule(ours[0], minioNotificationRule(id)) : ours.length === 0) {
|
|
2719
|
+
applied.push({
|
|
2720
|
+
id: `${name}:events`,
|
|
2721
|
+
describe,
|
|
2722
|
+
created: false
|
|
2723
|
+
});
|
|
2724
|
+
continue;
|
|
2725
|
+
}
|
|
2726
|
+
await client.setNotification(name, {
|
|
2727
|
+
...current,
|
|
2728
|
+
QueueConfigurations: wanted
|
|
2729
|
+
});
|
|
2730
|
+
applied.push({
|
|
2731
|
+
id: `${name}:events`,
|
|
2732
|
+
describe,
|
|
2733
|
+
created: true
|
|
2734
|
+
});
|
|
2735
|
+
}
|
|
2736
|
+
return applied;
|
|
2737
|
+
}
|
|
2738
|
+
/**
|
|
2739
|
+
* Whether a rule read back says what gkm wrote: the same target, the same
|
|
2740
|
+
* events in any order, and no filter — the store may hand back an empty one.
|
|
2741
|
+
*/
|
|
2742
|
+
function sameRule(current, wanted) {
|
|
2743
|
+
const filter = current.Filter;
|
|
2744
|
+
return current.Id === wanted.Id && current.QueueArn === wanted.QueueArn && JSON.stringify([...current.Events ?? []].sort()) === JSON.stringify([...wanted.Events ?? []].sort()) && (filter?.Key?.FilterRules?.length ?? 0) === 0;
|
|
2745
|
+
}
|
|
2746
|
+
/**
|
|
2587
2747
|
* Apply each bucket's expiry, beside whatever other rules it has, skipping
|
|
2588
2748
|
* those already correct — the same merge the `s3` provider makes deployed.
|
|
2589
2749
|
*/
|
|
@@ -4291,6 +4451,14 @@ function composeFor(plan, options) {
|
|
|
4291
4451
|
const volume = volumeOf(container);
|
|
4292
4452
|
if (volume) volumes[volume] = {};
|
|
4293
4453
|
}
|
|
4454
|
+
const minio = services.minio;
|
|
4455
|
+
if (minio && options.objectWebhooks?.length) {
|
|
4456
|
+
minio.environment = {
|
|
4457
|
+
...minio.environment,
|
|
4458
|
+
...minioWebhookEnv(options.objectWebhooks)
|
|
4459
|
+
};
|
|
4460
|
+
if (options.objectWebhooks.some((hook) => hook.endpoint.includes(`//host.docker.internal:`))) minio.extra_hosts = [`${HOST_GATEWAY}:host-gateway`];
|
|
4461
|
+
}
|
|
4294
4462
|
return {
|
|
4295
4463
|
name: options.project,
|
|
4296
4464
|
services: {
|
|
@@ -4664,6 +4832,16 @@ function bucketClient(port, credentials) {
|
|
|
4664
4832
|
Bucket: bucket,
|
|
4665
4833
|
LifecycleConfiguration: { Rules: rules }
|
|
4666
4834
|
}));
|
|
4835
|
+
},
|
|
4836
|
+
async notification(bucket) {
|
|
4837
|
+
const { $metadata: _, ...notification } = await s3.send(new _aws_sdk_client_s3.GetBucketNotificationConfigurationCommand({ Bucket: bucket }));
|
|
4838
|
+
return notification;
|
|
4839
|
+
},
|
|
4840
|
+
async setNotification(bucket, notification) {
|
|
4841
|
+
await s3.send(new _aws_sdk_client_s3.PutBucketNotificationConfigurationCommand({
|
|
4842
|
+
Bucket: bucket,
|
|
4843
|
+
NotificationConfiguration: notification
|
|
4844
|
+
}));
|
|
4667
4845
|
}
|
|
4668
4846
|
};
|
|
4669
4847
|
}
|
|
@@ -5500,7 +5678,8 @@ async function reconcile(options) {
|
|
|
5500
5678
|
project,
|
|
5501
5679
|
ports,
|
|
5502
5680
|
credentials: options.credentials,
|
|
5503
|
-
...options.apps ? { apps: options.apps(plan.containers) } : {}
|
|
5681
|
+
...options.apps ? { apps: options.apps(plan.containers) } : {},
|
|
5682
|
+
...options.objectWebhooks?.length ? { objectWebhooks: options.objectWebhooks } : {}
|
|
5504
5683
|
});
|
|
5505
5684
|
const caddyfile = toCaddyfile(sitesFor(plan, project, options.addresses));
|
|
5506
5685
|
const hash = planHash(plan, compose, {
|
|
@@ -5518,7 +5697,8 @@ async function reconcile(options) {
|
|
|
5518
5697
|
...options.mailFrom ? { mailFrom: options.mailFrom } : {},
|
|
5519
5698
|
...options.addresses ? { addresses: options.addresses } : {},
|
|
5520
5699
|
...lan ? { lanAddress: lan } : {},
|
|
5521
|
-
...options.metroPorts ? { metroPorts: options.metroPorts } : {}
|
|
5700
|
+
...options.metroPorts ? { metroPorts: options.metroPorts } : {},
|
|
5701
|
+
...options.objectWebhooks?.length ? { relayedBuckets: options.objectWebhooks.map((hook) => hook.bucket) } : {}
|
|
5522
5702
|
});
|
|
5523
5703
|
const env = exports ? resolved : scopeTelemetryEnv(resolved, {
|
|
5524
5704
|
uses: false,
|
|
@@ -5575,7 +5755,7 @@ async function reconcile(options) {
|
|
|
5575
5755
|
};
|
|
5576
5756
|
const credentials = checked.credentials;
|
|
5577
5757
|
if (start && provision) options.progress?.("🗄️ Creating what the constructs declare — databases, roles, buckets, topics");
|
|
5578
|
-
const provisioned = start && provision ? await create(plan, ports, credentials, sql, buckets, carriers, project) : [];
|
|
5758
|
+
const provisioned = start && provision ? await create(plan, ports, credentials, sql, buckets, carriers, project, new Set(stage === (options.localStage ?? stage) ? (options.objectWebhooks ?? []).map((hook) => hook.bucket) : [])) : [];
|
|
5579
5759
|
await saveState(root, {
|
|
5580
5760
|
hash,
|
|
5581
5761
|
stage
|
|
@@ -5595,7 +5775,7 @@ async function reconcile(options) {
|
|
|
5595
5775
|
* Idempotent throughout, so this runs on every non-converged reconcile rather
|
|
5596
5776
|
* than being something to remember.
|
|
5597
5777
|
*/
|
|
5598
|
-
async function create(plan, ports, credentials, sql, buckets, emulatorCarriers, project) {
|
|
5778
|
+
async function create(plan, ports, credentials, sql, buckets, emulatorCarriers, project, watched) {
|
|
5599
5779
|
const applied = [];
|
|
5600
5780
|
const postgresPort = ports[primaryPortKey("postgres")];
|
|
5601
5781
|
const statements = postgresStatements(plan, project, credentials.seed);
|
|
@@ -5609,6 +5789,10 @@ async function create(plan, ports, credentials, sql, buckets, emulatorCarriers,
|
|
|
5609
5789
|
if (names.length > 0) applied.push(...await applyBuckets(client, names));
|
|
5610
5790
|
if (policies.length > 0) applied.push(...await applyPolicies(client, policies));
|
|
5611
5791
|
if (lifecycles.length > 0) applied.push(...await applyLifecycles(client, lifecycles));
|
|
5792
|
+
if (names.length > 0) applied.push(...await applyNotifications(client, plan.resources.filter((r) => r.provisions && r.kind === "objects").map((r) => ({
|
|
5793
|
+
id: r.id,
|
|
5794
|
+
name: r.name
|
|
5795
|
+
})), watched));
|
|
5612
5796
|
}
|
|
5613
5797
|
const emulatorPort = ports[primaryPortKey("localstack")];
|
|
5614
5798
|
const carriers = carrierNames(plan);
|
|
@@ -5674,6 +5858,7 @@ var workspace_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
|
5674
5858
|
constructGlobs: () => constructGlobs,
|
|
5675
5859
|
derivedContainers: () => derivedContainers,
|
|
5676
5860
|
fakesApply: () => fakesApply,
|
|
5861
|
+
localObjectWebhooks: () => localObjectWebhooks,
|
|
5677
5862
|
metroPorts: () => metroPorts,
|
|
5678
5863
|
reconcileWorkspace: () => reconcileWorkspace,
|
|
5679
5864
|
surfaceAddresses: () => surfaceAddresses
|
|
@@ -5737,16 +5922,25 @@ function fakesApply(stage, fake, env = process.env) {
|
|
|
5737
5922
|
*/
|
|
5738
5923
|
async function reconcileWorkspace(workspace, options) {
|
|
5739
5924
|
const runnables = {};
|
|
5925
|
+
const background = {};
|
|
5926
|
+
const subscribers = {};
|
|
5740
5927
|
const discovered = await require_discover.discover({
|
|
5741
5928
|
patterns: constructGlobs(workspace),
|
|
5742
5929
|
cwd: workspace.root,
|
|
5743
|
-
runnables
|
|
5930
|
+
runnables,
|
|
5931
|
+
background,
|
|
5932
|
+
subscribers
|
|
5744
5933
|
});
|
|
5745
5934
|
const manifest = options.manifest ?? discovered;
|
|
5746
5935
|
const faked = fakesApply(options.stage, options.fake);
|
|
5747
5936
|
const fakes = faked ? await require_SubscriberGenerator.readFakes(workspace.root, manifest) : {};
|
|
5748
5937
|
const credentialFakes = faked ? await require_SubscriberGenerator.readCredentialFakes(workspace.root, manifest) : {};
|
|
5749
5938
|
const { credentials } = await loadLocalCredentials(workspace);
|
|
5939
|
+
const objectWebhooks = localObjectWebhooks(workspace, manifest, {
|
|
5940
|
+
background,
|
|
5941
|
+
subscribers,
|
|
5942
|
+
seed: credentials.seed
|
|
5943
|
+
});
|
|
5750
5944
|
const result = await reconcile({
|
|
5751
5945
|
credentials,
|
|
5752
5946
|
root: workspace.root,
|
|
@@ -5760,6 +5954,7 @@ async function reconcileWorkspace(workspace, options) {
|
|
|
5760
5954
|
metroPorts: metroPorts(workspace, manifest),
|
|
5761
5955
|
fakes,
|
|
5762
5956
|
credentialFakes,
|
|
5957
|
+
...objectWebhooks.length > 0 ? { objectWebhooks } : {},
|
|
5763
5958
|
apps: (containers) => appServices(workspace, manifest, containers, credentials, runnables, fakes, credentialFakes),
|
|
5764
5959
|
...options.start === void 0 ? {} : { start: options.start },
|
|
5765
5960
|
...options.progress ? { progress: options.progress } : {}
|
|
@@ -5774,6 +5969,40 @@ async function reconcileWorkspace(workspace, options) {
|
|
|
5774
5969
|
};
|
|
5775
5970
|
}
|
|
5776
5971
|
/**
|
|
5972
|
+
* Where MinIO posts each watched bucket's events under `gkm dev`: the dev
|
|
5973
|
+
* server of the app that builds the worker running the bucket's subscribers,
|
|
5974
|
+
* on the host, on that app's port — the process that relays them onto the
|
|
5975
|
+
* broker.
|
|
5976
|
+
*
|
|
5977
|
+
* None where the broker is SNS: there a bucket's events come from a topic, and
|
|
5978
|
+
* nothing relays them. None for a worker no app can build — `gkm build` says
|
|
5979
|
+
* so; a dev loop has nothing to post to.
|
|
5980
|
+
*/
|
|
5981
|
+
function localObjectWebhooks(workspace, manifest, options) {
|
|
5982
|
+
if (backendsOf(workspace).events === "sns") return [];
|
|
5983
|
+
const watched = watchedBuckets(manifest, options.subscribers);
|
|
5984
|
+
if (watched.size === 0) return [];
|
|
5985
|
+
let units;
|
|
5986
|
+
try {
|
|
5987
|
+
units = workerUnits(workspace, manifest, options.background);
|
|
5988
|
+
} catch (error) {
|
|
5989
|
+
if (error instanceof WorkerHasNoApp) return [];
|
|
5990
|
+
throw error;
|
|
5991
|
+
}
|
|
5992
|
+
const hooks = [];
|
|
5993
|
+
for (const [bucket, worker] of watched) {
|
|
5994
|
+
const app = units.find((unit) => unit.id === worker)?.app;
|
|
5995
|
+
const port = app ? workspace.apps[app]?.port : void 0;
|
|
5996
|
+
if (!port) continue;
|
|
5997
|
+
hooks.push({
|
|
5998
|
+
bucket,
|
|
5999
|
+
endpoint: `http://${HOST_GATEWAY}:${port}${require_SubscriberGenerator.objectsRoute(bucket)}`,
|
|
6000
|
+
token: objectsWebhookToken(workspace.name, bucket, options.seed)
|
|
6001
|
+
});
|
|
6002
|
+
}
|
|
6003
|
+
return hooks;
|
|
6004
|
+
}
|
|
6005
|
+
/**
|
|
5777
6006
|
* Where each mobile app's Metro runs: its app's port, which `gkm exec` hands
|
|
5778
6007
|
* Expo as `RCT_METRO_PORT`. Kept apart from the surfaces' addresses — a phone
|
|
5779
6008
|
* reaches Metro by `exp://`, not through the edge.
|
|
@@ -5968,6 +6197,14 @@ function workerEnvKeys(manifest, workerId, runnables = {}) {
|
|
|
5968
6197
|
/** What each construct an edge reaches hands the process that reaches it. */
|
|
5969
6198
|
function addEdgeKeys(manifest, edges, keys) {
|
|
5970
6199
|
for (const id of edges) {
|
|
6200
|
+
const bucket = require_discover.eventsEdgeBucket(id);
|
|
6201
|
+
if (bucket) {
|
|
6202
|
+
if (manifest[bucket]?.kind === "objects") {
|
|
6203
|
+
keys.add((0, _geekmidas_manifest.provideKey)(bucket, "eventsConnectionString"));
|
|
6204
|
+
keys.add((0, _geekmidas_manifest.provideKey)(bucket, "eventsToken"));
|
|
6205
|
+
}
|
|
6206
|
+
continue;
|
|
6207
|
+
}
|
|
5971
6208
|
const target = manifest[id];
|
|
5972
6209
|
if (!target) continue;
|
|
5973
6210
|
if (target.kind === "rest-api") {
|
|
@@ -7003,17 +7240,59 @@ async function answers(connection: unknown): Promise<boolean> {
|
|
|
7003
7240
|
}
|
|
7004
7241
|
}
|
|
7005
7242
|
|
|
7243
|
+
/** A request to a route this worker mounted, and what it answered. */
|
|
7244
|
+
export interface WorkerRequest {
|
|
7245
|
+
headers: Record<string, string | string[] | undefined>;
|
|
7246
|
+
body: string;
|
|
7247
|
+
}
|
|
7248
|
+
export interface WorkerAnswer {
|
|
7249
|
+
status: number;
|
|
7250
|
+
body: unknown;
|
|
7251
|
+
}
|
|
7252
|
+
|
|
7253
|
+
// The routes something pushes to: an SNS subscriber's, and the one a local
|
|
7254
|
+
// object store posts a bucket's events to. Mounted by the subscribers, served
|
|
7255
|
+
// by the entry's HTTP server beside the health check.
|
|
7256
|
+
const routes = new Map<string, (c: any) => unknown>();
|
|
7257
|
+
const app = {
|
|
7258
|
+
post: (path: string, handler: (c: any) => unknown) => {
|
|
7259
|
+
routes.set(path, handler);
|
|
7260
|
+
},
|
|
7261
|
+
};
|
|
7262
|
+
|
|
7263
|
+
/** Run one mounted route, as the subscribers' handlers expect to be called. */
|
|
7264
|
+
async function route(path: string, request: WorkerRequest): Promise<WorkerAnswer | undefined> {
|
|
7265
|
+
const handler = routes.get(path);
|
|
7266
|
+
if (!handler) return undefined;
|
|
7267
|
+
let answer: WorkerAnswer | undefined;
|
|
7268
|
+
const c = {
|
|
7269
|
+
req: {
|
|
7270
|
+
text: async () => request.body,
|
|
7271
|
+
header: (name: string) => {
|
|
7272
|
+
const value = request.headers[name.toLowerCase()];
|
|
7273
|
+
return Array.isArray(value) ? value[0] : value;
|
|
7274
|
+
},
|
|
7275
|
+
},
|
|
7276
|
+
json: (body: unknown, status = 200) => {
|
|
7277
|
+
answer = { status, body };
|
|
7278
|
+
return answer;
|
|
7279
|
+
},
|
|
7280
|
+
};
|
|
7281
|
+
await handler(c);
|
|
7282
|
+
return answer ?? { status: 204, body: null };
|
|
7283
|
+
}
|
|
7284
|
+
|
|
7006
7285
|
/** Start everything this worker runs. */
|
|
7007
7286
|
export async function startWorker(): Promise<{
|
|
7008
7287
|
health: () => Promise<WorkerHealth>;
|
|
7009
7288
|
stop: () => Promise<void>;
|
|
7289
|
+
route: typeof route;
|
|
7290
|
+
/** Subscribe the pushed routes, once the server answers on \`port\`. */
|
|
7291
|
+
subscribeForPush: (port: number) => Promise<void>;
|
|
7010
7292
|
}> {
|
|
7011
|
-
|
|
7012
|
-
// subscriber, so there is nothing to mount.
|
|
7013
|
-
const noRoutes = { post: () => undefined };
|
|
7014
|
-
|
|
7015
|
-
await setupSubscribers(noRoutes, envParser, logger).catch((error) => {
|
|
7293
|
+
const subscribeForPush = await setupSubscribers(app, envParser, logger).catch((error) => {
|
|
7016
7294
|
logger.error({ err: error }, 'Failed to start subscribers');
|
|
7295
|
+
return async (_port: number) => {};
|
|
7017
7296
|
});
|
|
7018
7297
|
await setupQueues(envParser, logger).catch((error) => {
|
|
7019
7298
|
logger.error({ err: error }, 'Failed to start queue consumers');
|
|
@@ -7025,6 +7304,8 @@ export async function startWorker(): Promise<{
|
|
|
7025
7304
|
const statuses = () => [subscribersStatus(), queuesStatus(), cronsStatus()];
|
|
7026
7305
|
|
|
7027
7306
|
return {
|
|
7307
|
+
route,
|
|
7308
|
+
subscribeForPush,
|
|
7028
7309
|
async health() {
|
|
7029
7310
|
const all = statuses();
|
|
7030
7311
|
const failed = all.flatMap((s) => s.failed);
|
|
@@ -7055,8 +7336,10 @@ function workerEntry(healthCheck) {
|
|
|
7055
7336
|
* Generated by 'gkm build --production'.
|
|
7056
7337
|
*
|
|
7057
7338
|
* Runs this worker's crons, queue consumers and topic subscribers, and serves
|
|
7058
|
-
*
|
|
7059
|
-
* every broker connection answers, 503 otherwise.
|
|
7339
|
+
* its health check: ${healthCheck}, on PORT — 200 when every consumer started
|
|
7340
|
+
* and every broker connection answers, 503 otherwise. Beside it, on the same
|
|
7341
|
+
* port, the POST routes its subscribers mounted: where a local object store
|
|
7342
|
+
* posts a bucket's events.
|
|
7060
7343
|
*
|
|
7061
7344
|
* On SIGTERM it stops pulling messages and scheduling crons, lets the handlers
|
|
7062
7345
|
* in flight finish, closes its broker connections and database pools, and
|
|
@@ -7075,15 +7358,39 @@ let worker: Awaited<ReturnType<typeof startWorker>> | undefined;
|
|
|
7075
7358
|
let stopping = false;
|
|
7076
7359
|
|
|
7077
7360
|
const server = createServer((req, res) => {
|
|
7078
|
-
const path = (req.url ?? '/').split('?')[0];
|
|
7079
|
-
if (path !== ${JSON.stringify(healthCheck)} || (req.method !== 'GET' && req.method !== 'HEAD')) {
|
|
7080
|
-
res.writeHead(404).end();
|
|
7081
|
-
return;
|
|
7082
|
-
}
|
|
7361
|
+
const path = (req.url ?? '/').split('?')[0] ?? '/';
|
|
7083
7362
|
const answer = (status: number, body: unknown) => {
|
|
7084
7363
|
res.writeHead(status, { 'content-type': 'application/json' });
|
|
7085
7364
|
res.end(JSON.stringify(body));
|
|
7086
7365
|
};
|
|
7366
|
+
|
|
7367
|
+
// A route a subscriber mounted: what SNS pushes to, or what a local object
|
|
7368
|
+
// store posts a bucket's events to. Refused while starting or stopping, so
|
|
7369
|
+
// the sender keeps the message and sends it again.
|
|
7370
|
+
if (req.method === 'POST') {
|
|
7371
|
+
let body = '';
|
|
7372
|
+
req.setEncoding('utf8');
|
|
7373
|
+
req.on('data', (chunk) => {
|
|
7374
|
+
body += chunk;
|
|
7375
|
+
});
|
|
7376
|
+
req.on('end', () => {
|
|
7377
|
+
if (stopping) return answer(503, { status: 'stopping' });
|
|
7378
|
+
if (!worker) return answer(503, { status: 'starting' });
|
|
7379
|
+
worker.route(path, { headers: req.headers, body }).then(
|
|
7380
|
+
(routed) => (routed ? answer(routed.status, routed.body) : answer(404, { status: 'not found' })),
|
|
7381
|
+
(error) => {
|
|
7382
|
+
logger.error({ err: error, path }, 'Route failed');
|
|
7383
|
+
answer(500, { status: 'failed' });
|
|
7384
|
+
},
|
|
7385
|
+
);
|
|
7386
|
+
});
|
|
7387
|
+
return;
|
|
7388
|
+
}
|
|
7389
|
+
|
|
7390
|
+
if (path !== ${JSON.stringify(healthCheck)} || (req.method !== 'GET' && req.method !== 'HEAD')) {
|
|
7391
|
+
res.writeHead(404).end();
|
|
7392
|
+
return;
|
|
7393
|
+
}
|
|
7087
7394
|
if (stopping) return answer(503, { status: 'stopping' });
|
|
7088
7395
|
if (!worker) return answer(503, { status: 'starting' });
|
|
7089
7396
|
worker.health().then(
|
|
@@ -7117,6 +7424,9 @@ process.on('SIGINT', shutdown);
|
|
|
7117
7424
|
|
|
7118
7425
|
worker = await startWorker();
|
|
7119
7426
|
logger.info({ port }, 'Worker started');
|
|
7427
|
+
await worker.subscribeForPush(port).catch((error) => {
|
|
7428
|
+
logger.error({ err: error }, 'Failed to subscribe for push');
|
|
7429
|
+
});
|
|
7120
7430
|
`;
|
|
7121
7431
|
}
|
|
7122
7432
|
//#endregion
|
|
@@ -7174,7 +7484,7 @@ async function buildDockerImage(app, buildRoot, options) {
|
|
|
7174
7484
|
const fullImageName = validateImageRef(registry ? `${registry}/${app.imageName}:${tag}` : `${app.imageName}:${tag}`);
|
|
7175
7485
|
logger$1.log(`\n🐳 Building Docker image: ${fullImageName}`);
|
|
7176
7486
|
try {
|
|
7177
|
-
await
|
|
7487
|
+
await require_credentials.run("docker", [
|
|
7178
7488
|
"build",
|
|
7179
7489
|
`--file=${(0, node_path.relative)(buildRoot, app.dockerfile)}`,
|
|
7180
7490
|
`--tag=${fullImageName}`,
|
|
@@ -7201,7 +7511,7 @@ async function pushDockerImage(imageName, options, cwd) {
|
|
|
7201
7511
|
const fullImageName = validateImageRef(`${registry}/${imageName}:${tag}`);
|
|
7202
7512
|
logger$1.log(`\n🚀 Pushing Docker image: ${fullImageName}`);
|
|
7203
7513
|
try {
|
|
7204
|
-
await
|
|
7514
|
+
await require_credentials.run("docker", ["push", fullImageName], { cwd });
|
|
7205
7515
|
logger$1.log(`✅ Docker image pushed: ${fullImageName}`);
|
|
7206
7516
|
} catch (error) {
|
|
7207
7517
|
throw new DockerPushFailed(fullImageName, error);
|
|
@@ -7485,7 +7795,7 @@ async function createDnsProvider(options) {
|
|
|
7485
7795
|
if (isDnsProvider(config.provider)) return config.provider;
|
|
7486
7796
|
const provider = config.provider;
|
|
7487
7797
|
if (provider === "hostinger") {
|
|
7488
|
-
const { HostingerProvider } = await Promise.resolve().then(() => require("./HostingerProvider-
|
|
7798
|
+
const { HostingerProvider } = await Promise.resolve().then(() => require("./HostingerProvider-OdQmKXE3.cjs"));
|
|
7489
7799
|
return new HostingerProvider(options.hostinger);
|
|
7490
7800
|
}
|
|
7491
7801
|
if (provider === "route53") {
|
|
@@ -7498,7 +7808,7 @@ async function createDnsProvider(options) {
|
|
|
7498
7808
|
});
|
|
7499
7809
|
}
|
|
7500
7810
|
if (provider === "godaddy") {
|
|
7501
|
-
const { GoDaddyProvider } = await Promise.resolve().then(() => require("./GoDaddyProvider-
|
|
7811
|
+
const { GoDaddyProvider } = await Promise.resolve().then(() => require("./GoDaddyProvider-0z5RAN1k.cjs"));
|
|
7502
7812
|
return new GoDaddyProvider(options.godaddy ?? {});
|
|
7503
7813
|
}
|
|
7504
7814
|
if (provider === "cloudflare") throw new DnsProviderNotImplemented("cloudflare");
|
|
@@ -8575,6 +8885,12 @@ Object.defineProperty(exports, "applyLifecycles", {
|
|
|
8575
8885
|
return applyLifecycles;
|
|
8576
8886
|
}
|
|
8577
8887
|
});
|
|
8888
|
+
Object.defineProperty(exports, "applyNotifications", {
|
|
8889
|
+
enumerable: true,
|
|
8890
|
+
get: function() {
|
|
8891
|
+
return applyNotifications;
|
|
8892
|
+
}
|
|
8893
|
+
});
|
|
8578
8894
|
Object.defineProperty(exports, "applyPolicies", {
|
|
8579
8895
|
enumerable: true,
|
|
8580
8896
|
get: function() {
|
|
@@ -8959,6 +9275,12 @@ Object.defineProperty(exports, "mergeLifecycle", {
|
|
|
8959
9275
|
return mergeLifecycle;
|
|
8960
9276
|
}
|
|
8961
9277
|
});
|
|
9278
|
+
Object.defineProperty(exports, "minioWebhookEnv", {
|
|
9279
|
+
enumerable: true,
|
|
9280
|
+
get: function() {
|
|
9281
|
+
return minioWebhookEnv;
|
|
9282
|
+
}
|
|
9283
|
+
});
|
|
8962
9284
|
Object.defineProperty(exports, "networkEnv", {
|
|
8963
9285
|
enumerable: true,
|
|
8964
9286
|
get: function() {
|
|
@@ -9283,6 +9605,12 @@ Object.defineProperty(exports, "verifyDnsRecords", {
|
|
|
9283
9605
|
return verifyDnsRecords;
|
|
9284
9606
|
}
|
|
9285
9607
|
});
|
|
9608
|
+
Object.defineProperty(exports, "watchedBuckets", {
|
|
9609
|
+
enumerable: true,
|
|
9610
|
+
get: function() {
|
|
9611
|
+
return watchedBuckets;
|
|
9612
|
+
}
|
|
9613
|
+
});
|
|
9286
9614
|
Object.defineProperty(exports, "withCustomSecret", {
|
|
9287
9615
|
enumerable: true,
|
|
9288
9616
|
get: function() {
|
|
@@ -9350,4 +9678,4 @@ Object.defineProperty(exports, "workspace_exports", {
|
|
|
9350
9678
|
}
|
|
9351
9679
|
});
|
|
9352
9680
|
|
|
9353
|
-
//# sourceMappingURL=seeds-
|
|
9681
|
+
//# sourceMappingURL=seeds-DOfxmDRO.cjs.map
|