@geekmidas/cli 10.0.0-alpha.179 → 10.0.0-alpha.180
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-DMq6ameY.mjs → EndpointGenerator-CBKH87_b.mjs} +3 -3
- package/dist/{EndpointGenerator-DMq6ameY.mjs.map → EndpointGenerator-CBKH87_b.mjs.map} +1 -1
- package/dist/{EndpointGenerator-yx7_SoXT.cjs → EndpointGenerator-iyA3HkOH.cjs} +3 -3
- package/dist/{EndpointGenerator-yx7_SoXT.cjs.map → EndpointGenerator-iyA3HkOH.cjs.map} +1 -1
- package/dist/{LegacyStateStore-BzUlIHvz.mjs → LegacyStateStore-B7pQA25B.mjs} +2 -2
- package/dist/{LegacyStateStore-BzUlIHvz.mjs.map → LegacyStateStore-B7pQA25B.mjs.map} +1 -1
- package/dist/{LegacyStateStore-C7FFaVce.cjs → LegacyStateStore-l0hBdv-E.cjs} +2 -2
- package/dist/{LegacyStateStore-C7FFaVce.cjs.map → LegacyStateStore-l0hBdv-E.cjs.map} +1 -1
- package/dist/{LocalStateStore-BvI8RUtS.mjs → LocalStateStore-CP0UHL85.mjs} +2 -2
- package/dist/{LocalStateStore-BvI8RUtS.mjs.map → LocalStateStore-CP0UHL85.mjs.map} +1 -1
- package/dist/{LocalStateStore-BJQvLCrg.cjs → LocalStateStore-DEE0Kc_s.cjs} +2 -2
- package/dist/{LocalStateStore-BJQvLCrg.cjs.map → LocalStateStore-DEE0Kc_s.cjs.map} +1 -1
- package/dist/{OpenApiTsGenerator-C_JqxkWt.mjs → OpenApiTsGenerator-CoVA3Ykv.mjs} +2 -2
- package/dist/{OpenApiTsGenerator-C_JqxkWt.mjs.map → OpenApiTsGenerator-CoVA3Ykv.mjs.map} +1 -1
- package/dist/{OpenApiTsGenerator-gM70-7qw.cjs → OpenApiTsGenerator-vy-fOJgs.cjs} +2 -2
- package/dist/{OpenApiTsGenerator-gM70-7qw.cjs.map → OpenApiTsGenerator-vy-fOJgs.cjs.map} +1 -1
- package/dist/{S3StateStore-C1ZX1w5v.cjs → S3StateStore-DE0BNuXc.cjs} +4 -4
- package/dist/{S3StateStore-C1ZX1w5v.cjs.map → S3StateStore-DE0BNuXc.cjs.map} +1 -1
- package/dist/{S3StateStore-DYQSxiVw.mjs → S3StateStore-vmxZWMKh.mjs} +4 -4
- package/dist/{S3StateStore-DYQSxiVw.mjs.map → S3StateStore-vmxZWMKh.mjs.map} +1 -1
- package/dist/{SSMStateStore-DWQk17j8.mjs → SSMStateStore-DQyXnX2M.mjs} +2 -2
- package/dist/{SSMStateStore-DWQk17j8.mjs.map → SSMStateStore-DQyXnX2M.mjs.map} +1 -1
- package/dist/{SSMStateStore-tXnZSJxP.cjs → SSMStateStore-p4hBdTg3.cjs} +2 -2
- package/dist/{SSMStateStore-tXnZSJxP.cjs.map → SSMStateStore-p4hBdTg3.cjs.map} +1 -1
- package/dist/{SubscriberGenerator-NxcLNeDJ.mjs → SubscriberGenerator-B3jHf26s.mjs} +4 -4
- package/dist/{SubscriberGenerator-NxcLNeDJ.mjs.map → SubscriberGenerator-B3jHf26s.mjs.map} +1 -1
- package/dist/{SubscriberGenerator-DXh1Touk.cjs → SubscriberGenerator-JhwVlWBS.cjs} +4 -4
- package/dist/{SubscriberGenerator-DXh1Touk.cjs.map → SubscriberGenerator-JhwVlWBS.cjs.map} +1 -1
- package/dist/{add-D6GloVNz.cjs → add-DEdpKya-.cjs} +8 -8
- package/dist/{add-D6GloVNz.cjs.map → add-DEdpKya-.cjs.map} +1 -1
- package/dist/{add-nJBUo4fT.mjs → add-QBvDmVA-.mjs} +8 -8
- package/dist/{add-nJBUo4fT.mjs.map → add-QBvDmVA-.mjs.map} +1 -1
- package/dist/{apps-GDmO_v7v.mjs → apps-D0LULFmU.mjs} +15 -361
- package/dist/apps-D0LULFmU.mjs.map +1 -0
- package/dist/{apps-DPw1i9E7.cjs → apps-qJ5FPJGQ.cjs} +12 -389
- package/dist/apps-qJ5FPJGQ.cjs.map +1 -0
- package/dist/{aws-DKC2m3sT.cjs → aws-BXfiWNbi.cjs} +2 -2
- package/dist/{aws-DKC2m3sT.cjs.map → aws-BXfiWNbi.cjs.map} +1 -1
- package/dist/{aws-C5LAU_Ii.mjs → aws-BjvSTTcE.mjs} +2 -2
- package/dist/{aws-C5LAU_Ii.mjs.map → aws-BjvSTTcE.mjs.map} +1 -1
- package/dist/{awsStore-Bx5nCFnS.mjs → awsStore-BYYCmXiq.mjs} +2 -2
- package/dist/{awsStore-Bx5nCFnS.mjs.map → awsStore-BYYCmXiq.mjs.map} +1 -1
- package/dist/{awsStore-u3ehhMoY.cjs → awsStore-DKQUElJL.cjs} +2 -2
- package/dist/{awsStore-u3ehhMoY.cjs.map → awsStore-DKQUElJL.cjs.map} +1 -1
- package/dist/{bundler-DzN34D-8.cjs → bundler-BuBCXA0t.cjs} +6 -6
- package/dist/{bundler-DzN34D-8.cjs.map → bundler-BuBCXA0t.cjs.map} +1 -1
- package/dist/{bundler-BFGjH_mQ.mjs → bundler-DZKdVVKZ.mjs} +6 -6
- package/dist/{bundler-BFGjH_mQ.mjs.map → bundler-DZKdVVKZ.mjs.map} +1 -1
- package/dist/{cli-CVlkduxS.cjs → cli-BCGkzaR1.cjs} +5 -5
- package/dist/{cli-CVlkduxS.cjs.map → cli-BCGkzaR1.cjs.map} +1 -1
- package/dist/{cli-Ik7ar-Ux.mjs → cli-CgEbT00Q.mjs} +5 -5
- package/dist/{cli-Ik7ar-Ux.mjs.map → cli-CgEbT00Q.mjs.map} +1 -1
- package/dist/clientTelemetry-BAwj6MOf.d.cts +10 -0
- package/dist/clientTelemetry-BAwj6MOf.d.cts.map +1 -0
- package/dist/clientTelemetry-CvamPJj_.d.mts +10 -0
- package/dist/clientTelemetry-CvamPJj_.d.mts.map +1 -0
- package/dist/{compose-CE0Vi7zq.cjs → compose-AO8u4mBI.cjs} +51 -49
- package/dist/compose-AO8u4mBI.cjs.map +1 -0
- package/dist/{compose-BKLJMnDI.cjs → compose-C-yjexqX.cjs} +9 -37
- package/dist/compose-C-yjexqX.cjs.map +1 -0
- package/dist/{compose-pFnSi3Zf.mjs → compose-C23RpAaF.mjs} +15 -13
- package/dist/compose-C23RpAaF.mjs.map +1 -0
- package/dist/{compose-DH1ToGh2.mjs → compose-DtfoUChm.mjs} +10 -32
- package/dist/compose-DtfoUChm.mjs.map +1 -0
- package/dist/{config-CsCYzlVO.d.mts → config-BODxZemw.d.mts} +3 -3
- package/dist/{config-CsCYzlVO.d.mts.map → config-BODxZemw.d.mts.map} +1 -1
- package/dist/{config-D-gHQXhi.d.cts → config-C3U5HulX.d.cts} +3 -3
- package/dist/{config-D-gHQXhi.d.cts.map → config-C3U5HulX.d.cts.map} +1 -1
- package/dist/config.cjs +3 -3
- package/dist/config.d.cts +3 -3
- package/dist/config.d.mts +3 -3
- package/dist/config.mjs +3 -3
- package/dist/{credentialSchemas-BzJiK1nQ.mjs → credentialSchemas-D_85KW2k.mjs} +3 -3
- package/dist/{credentialSchemas-BzJiK1nQ.mjs.map → credentialSchemas-D_85KW2k.mjs.map} +1 -1
- package/dist/{credentialSchemas-OVXofU-r.cjs → credentialSchemas-DjK6xKMk.cjs} +3 -3
- package/dist/{credentialSchemas-OVXofU-r.cjs.map → credentialSchemas-DjK6xKMk.cjs.map} +1 -1
- package/dist/{databases-SFnPaOGM.mjs → databases-CV22HzrI.mjs} +2 -2
- package/dist/{databases-SFnPaOGM.mjs.map → databases-CV22HzrI.mjs.map} +1 -1
- package/dist/{databases-BOuB-zg4.cjs → databases-DwYYH2mX.cjs} +2 -2
- package/dist/{databases-BOuB-zg4.cjs.map → databases-DwYYH2mX.cjs.map} +1 -1
- package/dist/{dbTunnel-BnacLKDV.cjs → dbTunnel-Bve0zBqT.cjs} +7 -7
- package/dist/{dbTunnel-BnacLKDV.cjs.map → dbTunnel-Bve0zBqT.cjs.map} +1 -1
- package/dist/{dbTunnel-CqDaxQig.mjs → dbTunnel-CnubkLBa.mjs} +7 -7
- package/dist/{dbTunnel-CqDaxQig.mjs.map → dbTunnel-CnubkLBa.mjs.map} +1 -1
- package/dist/{define-6poNqm5O.mjs → define-BfrNaY82.mjs} +2 -2
- package/dist/{define-6poNqm5O.mjs.map → define-BfrNaY82.mjs.map} +1 -1
- package/dist/{define-crmMcXFS.cjs → define-zKgLY65H.cjs} +2 -2
- package/dist/{define-crmMcXFS.cjs.map → define-zKgLY65H.cjs.map} +1 -1
- package/dist/deploy/public.cjs +15 -15
- package/dist/deploy/public.d.cts +5 -4
- package/dist/deploy/public.d.cts.map +1 -1
- package/dist/deploy/public.d.mts +5 -4
- package/dist/deploy/public.d.mts.map +1 -1
- package/dist/deploy/public.mjs +15 -15
- package/dist/{deploy-l0Vc846k.cjs → deploy-C2MKxzm9.cjs} +20 -19
- package/dist/deploy-C2MKxzm9.cjs.map +1 -0
- package/dist/{deploy-CpAkrZ25.mjs → deploy-Qq41vtpm.mjs} +19 -18
- package/dist/deploy-Qq41vtpm.mjs.map +1 -0
- package/dist/{destroy-eeB_PrmN.mjs → destroy-Bg4IUf_Z.mjs} +11 -10
- package/dist/destroy-Bg4IUf_Z.mjs.map +1 -0
- package/dist/{destroy-DtAqmjGz.cjs → destroy-CCpnHI2v.cjs} +13 -12
- package/dist/destroy-CCpnHI2v.cjs.map +1 -0
- package/dist/{discover-B_PDDaVj.mjs → discover-Dfmn6HQ7.mjs} +2 -2
- package/dist/{discover-B_PDDaVj.mjs.map → discover-Dfmn6HQ7.mjs.map} +1 -1
- package/dist/{discover-39VKSE2i.cjs → discover-OXczlq08.cjs} +2 -2
- package/dist/{discover-39VKSE2i.cjs.map → discover-OXczlq08.cjs.map} +1 -1
- package/dist/{dns-B2vsk2Rc.mjs → dns-BAM8VH1v.mjs} +147 -179
- package/dist/dns-BAM8VH1v.mjs.map +1 -0
- package/dist/{dns-WneRa4VJ.cjs → dns-D_0z9Tm1.cjs} +145 -201
- package/dist/dns-D_0z9Tm1.cjs.map +1 -0
- package/dist/{docker-Dk6p33pD.cjs → docker-6EUbKrEl.cjs} +9 -9
- package/dist/{docker-Dk6p33pD.cjs.map → docker-6EUbKrEl.cjs.map} +1 -1
- package/dist/{docker-DyUpcwqy.mjs → docker-DQoE3Fr7.mjs} +9 -9
- package/dist/{docker-DyUpcwqy.mjs.map → docker-DQoE3Fr7.mjs.map} +1 -1
- package/dist/{dokploy-Byg0zr1O.cjs → dokploy-BD8NXy8y.cjs} +3 -3
- package/dist/{dokploy-Byg0zr1O.cjs.map → dokploy-BD8NXy8y.cjs.map} +1 -1
- package/dist/{dokploy-De5b47YI.mjs → dokploy-CU9iuc35.mjs} +3 -3
- package/dist/{dokploy-De5b47YI.mjs.map → dokploy-CU9iuc35.mjs.map} +1 -1
- package/dist/{eas-DAH6D89J.cjs → eas-BhTOdQrE.cjs} +4 -4
- package/dist/{eas-DAH6D89J.cjs.map → eas-BhTOdQrE.cjs.map} +1 -1
- package/dist/{eas-BnLaz86I.mjs → eas-iYyg7Xjy.mjs} +4 -4
- package/dist/{eas-BnLaz86I.mjs.map → eas-iYyg7Xjy.mjs.map} +1 -1
- package/dist/{encryption-IiDQJs6j.mjs → encryption-hgmnMZw0.mjs} +4 -4
- package/dist/{encryption-IiDQJs6j.mjs.map → encryption-hgmnMZw0.mjs.map} +1 -1
- package/dist/{encryption-D7u_SKqz.cjs → encryption-yROMpM67.cjs} +4 -4
- package/dist/{encryption-D7u_SKqz.cjs.map → encryption-yROMpM67.cjs.map} +1 -1
- package/dist/{engine-BhS-wyH0.mjs → engine-B4whsrrE.mjs} +12 -12
- package/dist/engine-B4whsrrE.mjs.map +1 -0
- package/dist/{engine-CaWo9tZO.cjs → engine-D0XYdIiE.cjs} +12 -12
- package/dist/engine-D0XYdIiE.cjs.map +1 -0
- package/dist/{errors-D8Gwp5kU.mjs → errors-C9uIyIDt.mjs} +7 -3
- package/dist/{errors-D8Gwp5kU.mjs.map → errors-C9uIyIDt.mjs.map} +1 -1
- package/dist/{errors-DMC4Umsb.cjs → errors-D1x8duqI.cjs} +7 -3
- package/dist/errors-D1x8duqI.cjs.map +1 -0
- package/dist/{github-BQCqBMZ9.mjs → github-CBkZF4PS.mjs} +11 -11
- package/dist/{github-BQCqBMZ9.mjs.map → github-CBkZF4PS.mjs.map} +1 -1
- package/dist/{github-Cz_LTqBn.cjs → github-D1-_OnGL.cjs} +11 -11
- package/dist/{github-Cz_LTqBn.cjs.map → github-D1-_OnGL.cjs.map} +1 -1
- package/dist/{googlePlay-DowNo3wp.mjs → googlePlay-Bwv8TVi8.mjs} +5 -5
- package/dist/{googlePlay-DowNo3wp.mjs.map → googlePlay-Bwv8TVi8.mjs.map} +1 -1
- package/dist/{googlePlay-CuqPxtno.cjs → googlePlay-s9dGfrrb.cjs} +5 -5
- package/dist/{googlePlay-CuqPxtno.cjs.map → googlePlay-s9dGfrrb.cjs.map} +1 -1
- package/dist/{iam-Cs2Ph5f2.mjs → iam-BzFyFf7T.mjs} +2 -2
- package/dist/{iam-Cs2Ph5f2.mjs.map → iam-BzFyFf7T.mjs.map} +1 -1
- package/dist/{iam-CGd_oEyz.cjs → iam-WIoKnLBp.cjs} +2 -2
- package/dist/{iam-CGd_oEyz.cjs.map → iam-WIoKnLBp.cjs.map} +1 -1
- package/dist/{index-QxGYzGEN.d.mts → index-BKgOlfK2.d.mts} +2 -2
- package/dist/{index-QxGYzGEN.d.mts.map → index-BKgOlfK2.d.mts.map} +1 -1
- package/dist/{index-tFzoro1V.d.cts → index-zPzigXh-.d.cts} +2 -2
- package/dist/{index-tFzoro1V.d.cts.map → index-zPzigXh-.d.cts.map} +1 -1
- package/dist/index.cjs +75 -73
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +73 -71
- package/dist/index.mjs.map +1 -1
- package/dist/{local-CWNFE8Sg.cjs → local-CFnHQgWC.cjs} +3 -3
- package/dist/{local-CWNFE8Sg.cjs.map → local-CFnHQgWC.cjs.map} +1 -1
- package/dist/{local-BQQHvZ4q.mjs → local-JOnTFJA5.mjs} +3 -3
- package/dist/{local-BQQHvZ4q.mjs.map → local-JOnTFJA5.mjs.map} +1 -1
- package/dist/{migrate-D_7oRThu.mjs → migrate-BtnpQocG.mjs} +6 -6
- package/dist/{migrate-D_7oRThu.mjs.map → migrate-BtnpQocG.mjs.map} +1 -1
- package/dist/{migrate-8QGCWIqm.cjs → migrate-CGXrmZyV.cjs} +8 -8
- package/dist/{migrate-8QGCWIqm.cjs.map → migrate-CGXrmZyV.cjs.map} +1 -1
- package/dist/{migrate-CNrPM5zg.cjs → migrate-CxWXW-Lw.cjs} +6 -6
- package/dist/{migrate-CNrPM5zg.cjs.map → migrate-CxWXW-Lw.cjs.map} +1 -1
- package/dist/{migrate-CqiOiRvz.mjs → migrate-fLIgSpPB.mjs} +8 -8
- package/dist/{migrate-CqiOiRvz.mjs.map → migrate-fLIgSpPB.mjs.map} +1 -1
- package/dist/{notes-dD3gRvZw.cjs → notes-ChYPaRLu.cjs} +4 -4
- package/dist/{notes-dD3gRvZw.cjs.map → notes-ChYPaRLu.cjs.map} +1 -1
- package/dist/{notes-D2KWnUSL.mjs → notes-LATU2vLI.mjs} +4 -4
- package/dist/{notes-D2KWnUSL.mjs.map → notes-LATU2vLI.mjs.map} +1 -1
- package/dist/openapi.cjs +3 -3
- package/dist/openapi.d.cts +3 -8
- package/dist/openapi.d.cts.map +1 -1
- package/dist/openapi.d.mts +3 -8
- package/dist/openapi.d.mts.map +1 -1
- package/dist/openapi.mjs +3 -3
- package/dist/{projectBucket-BcTodL8A.cjs → projectBucket-BIeh2HTj.cjs} +3 -3
- package/dist/{projectBucket-BcTodL8A.cjs.map → projectBucket-BIeh2HTj.cjs.map} +1 -1
- package/dist/{projectBucket-BDytiu7A.mjs → projectBucket-D_4zb_oh.mjs} +3 -3
- package/dist/{projectBucket-BDytiu7A.mjs.map → projectBucket-D_4zb_oh.mjs.map} +1 -1
- package/dist/{provider-CEOKk8NS.mjs → provider-BvjDbsTR.mjs} +3 -3
- package/dist/{provider-CEOKk8NS.mjs.map → provider-BvjDbsTR.mjs.map} +1 -1
- package/dist/{provider-BqpjG9QM.cjs → provider-DLhgo-mB.cjs} +3 -3
- package/dist/{provider-BqpjG9QM.cjs.map → provider-DLhgo-mB.cjs.map} +1 -1
- package/dist/{publish-Da9gxP5Q.cjs → publish-Dc-1GQp8.cjs} +3 -3
- package/dist/{publish-Da9gxP5Q.cjs.map → publish-Dc-1GQp8.cjs.map} +1 -1
- package/dist/{publish-Cr8wv7nO.mjs → publish-DhzRYhVZ.mjs} +3 -3
- package/dist/{publish-Cr8wv7nO.mjs.map → publish-DhzRYhVZ.mjs.map} +1 -1
- package/dist/{ready-D1gctv-5.mjs → ready-BcV28QoW.mjs} +6 -6
- package/dist/{ready-D1gctv-5.mjs.map → ready-BcV28QoW.mjs.map} +1 -1
- package/dist/{ready-Bgj2cf4j.cjs → ready-ByQvw4-W.cjs} +6 -6
- package/dist/{ready-Bgj2cf4j.cjs.map → ready-ByQvw4-W.cjs.map} +1 -1
- package/dist/reconcile/public.cjs +1 -1
- package/dist/reconcile/public.d.cts +1 -1
- package/dist/reconcile/public.d.mts +1 -1
- package/dist/reconcile/public.mjs +1 -1
- package/dist/{resolve-Dyki9ZJX.mjs → resolve-CJvM2bUx.mjs} +6 -6
- package/dist/{resolve-Dyki9ZJX.mjs.map → resolve-CJvM2bUx.mjs.map} +1 -1
- package/dist/{resolve-DRldmRYb.cjs → resolve-DyUXmA0z.cjs} +6 -6
- package/dist/{resolve-DRldmRYb.cjs.map → resolve-DyUXmA0z.cjs.map} +1 -1
- package/dist/{rollback-Do0i6x3b.mjs → rollback-BO1asWkd.mjs} +8 -8
- package/dist/{rollback-Do0i6x3b.mjs.map → rollback-BO1asWkd.mjs.map} +1 -1
- package/dist/{rollback-R_j7f9cY.cjs → rollback-Op8Tc5N-.cjs} +8 -8
- package/dist/{rollback-R_j7f9cY.cjs.map → rollback-Op8Tc5N-.cjs.map} +1 -1
- package/dist/{runtime-BpGIXfYr.d.mts → runtime-CaejlcZt.d.mts} +2 -2
- package/dist/{runtime-BpGIXfYr.d.mts.map → runtime-CaejlcZt.d.mts.map} +1 -1
- package/dist/{runtime-DLV0CNZ4.d.cts → runtime-D3jD4Dvn.d.cts} +2 -2
- package/dist/{runtime-DLV0CNZ4.d.cts.map → runtime-D3jD4Dvn.d.cts.map} +1 -1
- package/dist/{s3-CYEU7r1x.mjs → s3-BbtwHSod.mjs} +5 -5
- package/dist/{s3-CYEU7r1x.mjs.map → s3-BbtwHSod.mjs.map} +1 -1
- package/dist/{s3-D9aPMh9u.cjs → s3-CwacPd8J.cjs} +5 -5
- package/dist/{s3-D9aPMh9u.cjs.map → s3-CwacPd8J.cjs.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 +2 -2
- package/dist/sandbox/migrate-worker.mjs +2 -2
- package/dist/{secretsManager-CJyxFcBH.mjs → secretsManager-CjTo6CRq.mjs} +2 -2
- package/dist/{secretsManager-CJyxFcBH.mjs.map → secretsManager-CjTo6CRq.mjs.map} +1 -1
- package/dist/{secretsManager-D8on44WI.cjs → secretsManager-CvmBGjdM.cjs} +2 -2
- package/dist/{secretsManager-D8on44WI.cjs.map → secretsManager-CvmBGjdM.cjs.map} +1 -1
- package/dist/{serverSetup-BmPwcMQN.cjs → serverSetup-BFdzPTIT.cjs} +7 -7
- package/dist/{serverSetup-BmPwcMQN.cjs.map → serverSetup-BFdzPTIT.cjs.map} +1 -1
- package/dist/{serverSetup-Bw5gc57O.mjs → serverSetup-CSxaZ7ha.mjs} +7 -7
- package/dist/{serverSetup-Bw5gc57O.mjs.map → serverSetup-CSxaZ7ha.mjs.map} +1 -1
- package/dist/{sniffer-XsTiFI3l.mjs → sniffer-CwxpsSez.mjs} +9 -9
- package/dist/{sniffer-XsTiFI3l.mjs.map → sniffer-CwxpsSez.mjs.map} +1 -1
- package/dist/{sniffer-BPLYWu70.cjs → sniffer-D3gH7aJT.cjs} +9 -9
- package/dist/{sniffer-BPLYWu70.cjs.map → sniffer-D3gH7aJT.cjs.map} +1 -1
- package/dist/{snsSubscriptions-CATtZwGv.cjs → snsSubscriptions-B8tGxND5.cjs} +10 -8
- package/dist/snsSubscriptions-B8tGxND5.cjs.map +1 -0
- package/dist/{snsSubscriptions-D9Rm_Eug.mjs → snsSubscriptions-n3sjbrRM.mjs} +7 -5
- package/dist/snsSubscriptions-n3sjbrRM.mjs.map +1 -0
- package/dist/{sst-C56i2cst.cjs → sst-Cjocp7gi.cjs} +8 -8
- package/dist/{sst-C56i2cst.cjs.map → sst-Cjocp7gi.cjs.map} +1 -1
- package/dist/{sst-BCvYZtVF.mjs → sst-DeF0BfDA.mjs} +8 -8
- package/dist/{sst-BCvYZtVF.mjs.map → sst-DeF0BfDA.mjs.map} +1 -1
- package/dist/{stack-TttsEL7X.mjs → stack-CyoRqyPt.mjs} +16 -609
- package/dist/stack-CyoRqyPt.mjs.map +1 -0
- package/dist/{stack-Dal2Oq2D.cjs → stack-Dr2FSxGm.cjs} +28 -687
- package/dist/stack-Dr2FSxGm.cjs.map +1 -0
- package/dist/{stage--ixwLSTc.mjs → stage-TAx0Gcq8.mjs} +8 -8
- package/dist/{stage--ixwLSTc.mjs.map → stage-TAx0Gcq8.mjs.map} +1 -1
- package/dist/{stage-BLsuXUP_.cjs → stage-aTBLKonw.cjs} +8 -8
- package/dist/{stage-BLsuXUP_.cjs.map → stage-aTBLKonw.cjs.map} +1 -1
- package/dist/{stages-8izznWib.cjs → stages-BeSQQQ4z.cjs} +3 -3
- package/dist/{stages-8izznWib.cjs.map → stages-BeSQQQ4z.cjs.map} +1 -1
- package/dist/{stages-QPWgbm9P.mjs → stages-DjFKQv08.mjs} +3 -3
- package/dist/{stages-QPWgbm9P.mjs.map → stages-DjFKQv08.mjs.map} +1 -1
- package/dist/target/public.cjs +3 -3
- package/dist/target/public.d.cts +2 -2
- package/dist/target/public.d.mts +2 -2
- package/dist/target/public.mjs +3 -3
- package/dist/{terminal-gOLDmpW-.mjs → terminal-Bk4PjXWY.mjs} +4 -4
- package/dist/{terminal-gOLDmpW-.mjs.map → terminal-Bk4PjXWY.mjs.map} +1 -1
- package/dist/{terminal-Dy4zzTCA.cjs → terminal-DPf137EJ.cjs} +4 -4
- package/dist/{terminal-Dy4zzTCA.cjs.map → terminal-DPf137EJ.cjs.map} +1 -1
- package/dist/{types-CV4AzwC_.d.cts → types-CLxsw-QY.d.cts} +3 -16
- package/dist/types-CLxsw-QY.d.cts.map +1 -0
- package/dist/{types-Bj1A1wkS.d.mts → types-wLlwkSib.d.mts} +3 -16
- package/dist/types-wLlwkSib.d.mts.map +1 -0
- package/dist/vitest.cjs +1 -1
- package/dist/vitest.mjs +1 -1
- package/dist/workspace/index.cjs +1 -1
- package/dist/workspace/index.d.cts +2 -2
- package/dist/workspace/index.d.mts +2 -2
- package/dist/workspace/index.mjs +1 -1
- package/dist/{workspace-BBa1Ck5j.mjs → workspace-DJjhfAGf.mjs} +3 -3
- package/dist/{workspace-BBa1Ck5j.mjs.map → workspace-DJjhfAGf.mjs.map} +1 -1
- package/dist/{workspace-DirP2-ed.cjs → workspace-wTLnc1Ef.cjs} +3 -3
- package/dist/{workspace-DirP2-ed.cjs.map → workspace-wTLnc1Ef.cjs.map} +1 -1
- package/package.json +16 -15
- package/dist/GoDaddyProvider-B9AMLUHF.cjs +0 -412
- package/dist/GoDaddyProvider-B9AMLUHF.cjs.map +0 -1
- package/dist/GoDaddyProvider-DLVKx7er.mjs +0 -412
- package/dist/GoDaddyProvider-DLVKx7er.mjs.map +0 -1
- package/dist/HostingerProvider-DBPWhL_s.cjs +0 -257
- package/dist/HostingerProvider-DBPWhL_s.cjs.map +0 -1
- package/dist/HostingerProvider-kLQsBCjz.mjs +0 -257
- package/dist/HostingerProvider-kLQsBCjz.mjs.map +0 -1
- package/dist/Route53Provider-Di_SD9CF.mjs +0 -209
- package/dist/Route53Provider-Di_SD9CF.mjs.map +0 -1
- package/dist/Route53Provider-emLuQHVw.cjs +0 -209
- package/dist/Route53Provider-emLuQHVw.cjs.map +0 -1
- package/dist/apps-DPw1i9E7.cjs.map +0 -1
- package/dist/apps-GDmO_v7v.mjs.map +0 -1
- package/dist/compose-BKLJMnDI.cjs.map +0 -1
- package/dist/compose-CE0Vi7zq.cjs.map +0 -1
- package/dist/compose-DH1ToGh2.mjs.map +0 -1
- package/dist/compose-pFnSi3Zf.mjs.map +0 -1
- package/dist/deploy-CpAkrZ25.mjs.map +0 -1
- package/dist/deploy-l0Vc846k.cjs.map +0 -1
- package/dist/destroy-DtAqmjGz.cjs.map +0 -1
- package/dist/destroy-eeB_PrmN.mjs.map +0 -1
- package/dist/dns-B2vsk2Rc.mjs.map +0 -1
- package/dist/dns-WneRa4VJ.cjs.map +0 -1
- package/dist/engine-BhS-wyH0.mjs.map +0 -1
- package/dist/engine-CaWo9tZO.cjs.map +0 -1
- package/dist/errors-DMC4Umsb.cjs.map +0 -1
- package/dist/snsSubscriptions-CATtZwGv.cjs.map +0 -1
- package/dist/snsSubscriptions-D9Rm_Eug.mjs.map +0 -1
- package/dist/stack-Dal2Oq2D.cjs.map +0 -1
- package/dist/stack-TttsEL7X.mjs.map +0 -1
- package/dist/types-Bj1A1wkS.d.mts.map +0 -1
- package/dist/types-CV4AzwC_.d.cts.map +0 -1
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_dns = require("./dns-
|
|
4
|
-
const require_workspace = require("./workspace-
|
|
5
|
-
const require_apps = require("./apps-
|
|
6
|
-
const require_compose = require("./compose-
|
|
7
|
-
const require_SubscriberGenerator = require("./SubscriberGenerator-
|
|
2
|
+
const require_errors = require("./errors-D1x8duqI.cjs");
|
|
3
|
+
const require_dns = require("./dns-D_0z9Tm1.cjs");
|
|
4
|
+
const require_workspace = require("./workspace-wTLnc1Ef.cjs");
|
|
5
|
+
const require_apps = require("./apps-qJ5FPJGQ.cjs");
|
|
6
|
+
const require_compose = require("./compose-C-yjexqX.cjs");
|
|
7
|
+
const require_SubscriberGenerator = require("./SubscriberGenerator-JhwVlWBS.cjs");
|
|
8
8
|
const require_drivers = require("./drivers-DP7__dJX.cjs");
|
|
9
|
-
const require_notes = require("./notes-
|
|
10
|
-
const require_docker = require("./docker-
|
|
9
|
+
const require_notes = require("./notes-ChYPaRLu.cjs");
|
|
10
|
+
const require_docker = require("./docker-6EUbKrEl.cjs");
|
|
11
11
|
let node_path = require("node:path");
|
|
12
12
|
let node_crypto = require("node:crypto");
|
|
13
|
+
let _geekmidas_edge_certificates_local = require("@geekmidas/edge/certificates/local");
|
|
14
|
+
let _geekmidas_edge_proxy_caddy = require("@geekmidas/edge/proxy/caddy");
|
|
15
|
+
let _geekmidas_edge_proxy_traefik = require("@geekmidas/edge/proxy/traefik");
|
|
16
|
+
let _geekmidas_edge_routes = require("@geekmidas/edge/routes");
|
|
13
17
|
let _geekmidas_manifest = require("@geekmidas/manifest");
|
|
14
18
|
let _geekmidas_storage_s3_url = require("@geekmidas/storage/s3-url");
|
|
15
19
|
_geekmidas_storage_s3_url = require_rolldown_runtime.__toESM(_geekmidas_storage_s3_url, 1);
|
|
16
|
-
let yaml = require("yaml");
|
|
17
20
|
let bcryptjs = require("bcryptjs");
|
|
18
21
|
bcryptjs = require_rolldown_runtime.__toESM(bcryptjs, 1);
|
|
19
22
|
//#region src/providers/aws.ts
|
|
@@ -128,183 +131,6 @@ function plannedSignedOrigin(input, env = process.env) {
|
|
|
128
131
|
});
|
|
129
132
|
}
|
|
130
133
|
//#endregion
|
|
131
|
-
//#region src/compose/routes.ts
|
|
132
|
-
/**
|
|
133
|
-
* Every host a route answers on — its own, its aliases and its redirects —
|
|
134
|
-
* in that order: what DNS, certificates and the edge's claims cover.
|
|
135
|
-
*/
|
|
136
|
-
function routeHosts(route) {
|
|
137
|
-
return [
|
|
138
|
-
route.host,
|
|
139
|
-
...route.aliases ?? [],
|
|
140
|
-
...route.redirects?.hosts ?? []
|
|
141
|
-
];
|
|
142
|
-
}
|
|
143
|
-
/** A route with handlers and a check that would have to hold for each of them. */
|
|
144
|
-
var EdgeRouteConflict = class extends Error {
|
|
145
|
-
route;
|
|
146
|
-
constructor(route) {
|
|
147
|
-
super(`The edge route '${route}' sends some paths to other upstreams and also restricts who or what it answers. The two are not combined: give the restricted paths a host of their own.`);
|
|
148
|
-
this.route = route;
|
|
149
|
-
this.name = "EdgeRouteConflict";
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
/** @throws {EdgeRouteConflict} */
|
|
153
|
-
function assertRouteRenderable(route) {
|
|
154
|
-
if (route.handlers?.length && (route.allow || route.paths || route.prefixes || route.requireHeader)) throw new EdgeRouteConflict(route.name);
|
|
155
|
-
}
|
|
156
|
-
/** File descriptors a process holding sockets may open. */
|
|
157
|
-
const NOFILE = {
|
|
158
|
-
soft: 1048576,
|
|
159
|
-
hard: 1048576
|
|
160
|
-
};
|
|
161
|
-
/**
|
|
162
|
-
* What the edge runs with: a descriptor per socket, twice — the client's and
|
|
163
|
-
* the upstream's — and every local port for those upstream connections. One
|
|
164
|
-
* edge address to one upstream has only the ephemeral range to open
|
|
165
|
-
* connections from, ~28k by Linux's default; widened, ~64k per replica.
|
|
166
|
-
*/
|
|
167
|
-
const EDGE_LIMITS = {
|
|
168
|
-
sysctls: { "net.ipv4.ip_local_port_range": "1024 65535" },
|
|
169
|
-
ulimits: { nofile: NOFILE }
|
|
170
|
-
};
|
|
171
|
-
//#endregion
|
|
172
|
-
//#region src/compose/caddyfile.ts
|
|
173
|
-
/**
|
|
174
|
-
* The stack's own edge, rendered for Caddy: one site block per route.
|
|
175
|
-
*
|
|
176
|
-
* Deployed, each host is the stage's real domain and Caddy gets it a
|
|
177
|
-
* certificate from Let's Encrypt on first request — the same automatic HTTPS
|
|
178
|
-
* it does anywhere, with nothing to configure but the name — or serves the
|
|
179
|
-
* stage's own certificate (`deploy.compose.tls`). Locally the hosts are
|
|
180
|
-
* `*.localhost` and the certificate is the one gkm's local authority issued,
|
|
181
|
-
* as the `gkm dev` edge's is, so a local stack is `https://` like a deployed
|
|
182
|
-
* one.
|
|
183
|
-
*
|
|
184
|
-
* Pure: the routes are data (`routes.ts`), and rendering them is one string.
|
|
185
|
-
*/
|
|
186
|
-
/** Where Caddy reads a stage's own certificate, inside its container. */
|
|
187
|
-
const CADDY_TLS_DIR = "/etc/caddy/tls";
|
|
188
|
-
/** An upstream on the stack's own network: its service name. */
|
|
189
|
-
function address({ service, port }) {
|
|
190
|
-
return `${service}:${port}`;
|
|
191
|
-
}
|
|
192
|
-
/** The Caddyfile for a stack's edge. */
|
|
193
|
-
function edgeCaddyfile(routes, options) {
|
|
194
|
-
const { tls } = options;
|
|
195
|
-
const ask = routes.find((route) => route.wildcard?.tls.kind === "on-demand")?.wildcard?.tls;
|
|
196
|
-
const onDemand = ask?.kind === "on-demand" ? `
|
|
197
|
-
on_demand_tls {
|
|
198
|
-
ask ${ask.ask}
|
|
199
|
-
}` : "";
|
|
200
|
-
const settings = `${options.email ? `\n\temail ${options.email}` : ""}${options.redirects === false ? "\n auto_https disable_redirects" : ""}${onDemand}`;
|
|
201
|
-
const global = settings ? `{${settings}\n}` : "";
|
|
202
|
-
const certificate = tls.kind === "files" ? `
|
|
203
|
-
tls ${tls.certFile} ${tls.keyFile}
|
|
204
|
-
` : "";
|
|
205
|
-
const blocks = [...routes.filter((route) => !route.wildcard), ...routes.filter((route) => route.wildcard)].map((route) => siteBlock(route, options.edgeToken, route.wildcard?.tls.kind === "on-demand" ? `
|
|
206
|
-
tls {
|
|
207
|
-
on_demand
|
|
208
|
-
}
|
|
209
|
-
` : certificate));
|
|
210
|
-
return `${HEADER}${global ? `${global}\n\n` : ""}${blocks.join("\n\n")}\n`;
|
|
211
|
-
}
|
|
212
|
-
/** One route's site block. */
|
|
213
|
-
function siteBlock(route, edgeToken, certificate) {
|
|
214
|
-
assertRouteRenderable(route);
|
|
215
|
-
const { host, allow, auth, paths, prefixes, requireHeader, handlers } = route;
|
|
216
|
-
const allowed = [...paths ?? [], ...(prefixes ?? []).map((prefix) => `${prefix}*`)];
|
|
217
|
-
const except = route.wildcard?.except ?? [];
|
|
218
|
-
const checks = `${except.length ? `
|
|
219
|
-
# Labels no tenant may take, although nothing in this stack answers them.
|
|
220
|
-
@protected host ${except.map((label) => `${label}.${route.wildcard?.domain}`).join(" ")}
|
|
221
|
-
respond @protected 404
|
|
222
|
-
` : ""}${allow ? `
|
|
223
|
-
# Only these addresses — the peer Caddy sees, never a header a client
|
|
224
|
-
# could set. Everything else is refused before it reaches the upstream.
|
|
225
|
-
@denied not remote_ip ${allow.join(" ")}
|
|
226
|
-
respond @denied 403
|
|
227
|
-
` : ""}${requireHeader ? `
|
|
228
|
-
# Only what the CDN sends: it adds this header to every request, and this
|
|
229
|
-
# host would be reached around the CDN otherwise.
|
|
230
|
-
@forged not header ${requireHeader.name} "${requireHeader.value}"
|
|
231
|
-
respond @forged 403
|
|
232
|
-
` : ""}${auth ? `
|
|
233
|
-
# The stage's login, asked for before anything reaches the upstream.
|
|
234
|
-
basic_auth {
|
|
235
|
-
${auth.user} ${auth.hash}
|
|
236
|
-
}
|
|
237
|
-
` : ""}${allowed.length ? `
|
|
238
|
-
# Only these paths answer. Everything else on this host is refused before
|
|
239
|
-
# it reaches the upstream.
|
|
240
|
-
@elsewhere not path ${allowed.join(" ")}
|
|
241
|
-
respond @elsewhere 404
|
|
242
|
-
` : ""}`;
|
|
243
|
-
const proxy = proxyBlock(route);
|
|
244
|
-
const body = handlers?.length ? `${handlers.map((handler, index) => `
|
|
245
|
-
# Answered by another service: ${handler.name}.
|
|
246
|
-
@handler${index} path ${handler.prefixes.map((prefix) => `${prefix}*`).join(" ")}
|
|
247
|
-
handle @handler${index} {
|
|
248
|
-
reverse_proxy ${handler.upstreams.map(address).join(" ")}
|
|
249
|
-
}
|
|
250
|
-
`).join("")}
|
|
251
|
-
handle {${proxy.replace(/\n/g, "\n ")}
|
|
252
|
-
}` : proxy;
|
|
253
|
-
const names = [host, ...route.aliases ?? []].map((name) => `https://${name}`).join(", ");
|
|
254
|
-
const redirects = (route.redirects?.hosts ?? []).map((from) => `
|
|
255
|
-
|
|
256
|
-
https://${from} {${certificate}
|
|
257
|
-
redir ${route.redirects?.to}{uri} permanent
|
|
258
|
-
}`).join("");
|
|
259
|
-
return `${names} {${certificate}${require_compose.clientIpRule(edgeToken)}
|
|
260
|
-
${checks}${body}
|
|
261
|
-
}${redirects}`;
|
|
262
|
-
}
|
|
263
|
-
/** Where a route's requests go, when no handler took them. */
|
|
264
|
-
function proxyBlock(route) {
|
|
265
|
-
const { upstreams, prefix, streaming } = route;
|
|
266
|
-
const health = healthCheck(route);
|
|
267
|
-
return prefix ? `
|
|
268
|
-
# A bucket, served at a host of its own: the bucket is a prefix on MinIO,
|
|
269
|
-
# which routes and signs on the Host header — so it is sent the upstream's.
|
|
270
|
-
reverse_proxy ${upstreams.map(address).join(" ")} {
|
|
271
|
-
rewrite ${prefix}{uri}
|
|
272
|
-
header_up Host {upstream_hostport}${health}
|
|
273
|
-
}` : `
|
|
274
|
-
# Host and X-Forwarded-* are passed through as Caddy does by default, so
|
|
275
|
-
# an app builds redirects, cookies and links on the address a caller used.
|
|
276
|
-
reverse_proxy ${upstreams.map(address).join(" ")}${streaming || health ? ` {${streaming ? `
|
|
277
|
-
# Never buffer: a streamed response — server-sent events, a Next.js
|
|
278
|
-
# RSC payload — reaches the client as each chunk is written.
|
|
279
|
-
flush_interval -1` : ""}${health}
|
|
280
|
-
}` : ""}`;
|
|
281
|
-
}
|
|
282
|
-
/**
|
|
283
|
-
* Caddy's own check of each upstream, as the Traefik edge's
|
|
284
|
-
* `loadBalancer.healthCheck`: one that stops answering is taken out of
|
|
285
|
-
* rotation until it does again. Caddy starts once its apps have — not once
|
|
286
|
-
* they are healthy — so this is what keeps a request from an upstream that
|
|
287
|
-
* is not up, and a route to an app with none up answers an error (503)
|
|
288
|
-
* rather than going missing.
|
|
289
|
-
*/
|
|
290
|
-
function healthCheck({ health }) {
|
|
291
|
-
return health ? `
|
|
292
|
-
# Each upstream asked on its own: one that stops answering is out of
|
|
293
|
-
# rotation until it answers again.
|
|
294
|
-
health_uri ${health}
|
|
295
|
-
health_interval 5s
|
|
296
|
-
health_timeout 3s` : "";
|
|
297
|
-
}
|
|
298
|
-
const HEADER = `# Generated by gkm compose from the construct manifest — do not edit.
|
|
299
|
-
#
|
|
300
|
-
# One host per API and site, each in front of its own container, one per
|
|
301
|
-
# file server in front of the stack's MinIO — its processors' paths sent to
|
|
302
|
-
# their own service — one per worker SNS pushes to and per processor unit a
|
|
303
|
-
# CDN reaches, answering only those paths, and — when its logs are served
|
|
304
|
-
# publicly — one for OpenObserve, to the addresses it allows. A site the
|
|
305
|
-
# stage puts behind a password asks for its login first.
|
|
306
|
-
`;
|
|
307
|
-
//#endregion
|
|
308
134
|
//#region src/compose/sitePassword.ts
|
|
309
135
|
/**
|
|
310
136
|
* A site served behind a password on some deployed stages — a `StaticSite`'s
|
|
@@ -435,425 +261,6 @@ function saltFor(password) {
|
|
|
435
261
|
return `$2a$10$${salt}`;
|
|
436
262
|
}
|
|
437
263
|
//#endregion
|
|
438
|
-
//#region src/compose/traefik.ts
|
|
439
|
-
/**
|
|
440
|
-
* The server's shared edge, rendered for Traefik: what the edge itself runs
|
|
441
|
-
* with, and what one stack registers with it.
|
|
442
|
-
*
|
|
443
|
-
* One Traefik per server owns 80 and 443, the ACME state and the redirect to
|
|
444
|
-
* HTTPS. It is configured through its file provider alone: each stack writes
|
|
445
|
-
* one file — its routers, services and middlewares, every name prefixed with
|
|
446
|
-
* its compose project — into a directory the edge watches, and removes it
|
|
447
|
-
* when it stops. There is no Docker socket: the edge never learns what runs
|
|
448
|
-
* on the server except from those files.
|
|
449
|
-
*
|
|
450
|
-
* The edge and the stacks meet on one external Docker network. Only a
|
|
451
|
-
* stack's public services join it, each under an alias prefixed with its
|
|
452
|
-
* project (`<project>-api`), because the network is shared: a bare service
|
|
453
|
-
* name there would be answered by every stack's `api`.
|
|
454
|
-
*
|
|
455
|
-
* Pure but for the edge's name, read from the environment once (see
|
|
456
|
-
* {@link EDGE_PROJECT_ENV}): the documents are data, and the edge's side
|
|
457
|
-
* effects are `edge.ts`'s.
|
|
458
|
-
*/
|
|
459
|
-
/**
|
|
460
|
-
* The image, pinned: the edge is every stack's way in, so a new version is a
|
|
461
|
-
* change to this line, not whatever `latest` is on the day a server starts.
|
|
462
|
-
*/
|
|
463
|
-
const TRAEFIK_IMAGE = "traefik:v3.7.13";
|
|
464
|
-
/** The edge's compose project: `GKM_EDGE_PROJECT`, else `gkm-edge`. */
|
|
465
|
-
function edgeProject(env = process.env) {
|
|
466
|
-
return env["GKM_EDGE_PROJECT"] || "gkm-edge";
|
|
467
|
-
}
|
|
468
|
-
/**
|
|
469
|
-
* The edge's compose project, one per server — read once, when gkm starts,
|
|
470
|
-
* so every step of a run names the same edge.
|
|
471
|
-
*/
|
|
472
|
-
const EDGE_PROJECT = edgeProject();
|
|
473
|
-
/**
|
|
474
|
-
* The external network the edge and every stack's public services share:
|
|
475
|
-
* named after the edge, so a renamed edge has a network of its own.
|
|
476
|
-
*/
|
|
477
|
-
const EDGE_NETWORK = EDGE_PROJECT;
|
|
478
|
-
/** The edge's compose service. */
|
|
479
|
-
const EDGE_SERVICE = "traefik";
|
|
480
|
-
/** Inside the edge's container: what it watches, and where certificates are. */
|
|
481
|
-
const EDGE_DYNAMIC_DIR = "/etc/gkm-edge/dynamic";
|
|
482
|
-
const EDGE_CERTS_DIR = "/etc/gkm-edge/certs";
|
|
483
|
-
/** The certificate resolver every deployed route without its own certificate uses. */
|
|
484
|
-
const ACME_RESOLVER = "letsencrypt";
|
|
485
|
-
/**
|
|
486
|
-
* The resolver a wildcard site's `*.<domain>` certificate comes from: Let's
|
|
487
|
-
* Encrypt issues a wildcard only over the DNS challenge, which the edge
|
|
488
|
-
* answers by writing an `_acme-challenge` TXT record through Route 53.
|
|
489
|
-
*/
|
|
490
|
-
const ACME_DNS_RESOLVER = "letsencrypt-dns";
|
|
491
|
-
/**
|
|
492
|
-
* The key the edge writes those records with, inside its container: written
|
|
493
|
-
* by the deploy of a stage with a wildcard site, and allowed nothing but
|
|
494
|
-
* each such stage's `_acme-challenge` record (see `acmeDns.ts`).
|
|
495
|
-
*/
|
|
496
|
-
const EDGE_AWS_CREDENTIALS = `${EDGE_CERTS_DIR}/aws-credentials`;
|
|
497
|
-
/** The internal entrypoint the edge's health check asks; never published. */
|
|
498
|
-
const PING_PORT = 8082;
|
|
499
|
-
/** A stack's service, as the edge — and the stack itself — reach it. */
|
|
500
|
-
function edgeAlias(project, service) {
|
|
501
|
-
return `${project}-${service}`;
|
|
502
|
-
}
|
|
503
|
-
/** A stack's certificate, as the edge's container reads it. */
|
|
504
|
-
function edgeCertificatePaths(project) {
|
|
505
|
-
return {
|
|
506
|
-
certFile: `${EDGE_CERTS_DIR}/${project}.crt`,
|
|
507
|
-
keyFile: `${EDGE_CERTS_DIR}/${project}.key`
|
|
508
|
-
};
|
|
509
|
-
}
|
|
510
|
-
/**
|
|
511
|
-
* The edge's static configuration: the entrypoints, the redirect, ACME, and
|
|
512
|
-
* the directory it watches. No API and no dashboard — nothing about the edge
|
|
513
|
-
* is reachable but the routes stacks register.
|
|
514
|
-
*/
|
|
515
|
-
function traefikStatic(ports) {
|
|
516
|
-
return {
|
|
517
|
-
global: {
|
|
518
|
-
checkNewVersion: false,
|
|
519
|
-
sendAnonymousUsage: false
|
|
520
|
-
},
|
|
521
|
-
entryPoints: {
|
|
522
|
-
web: {
|
|
523
|
-
address: ":80",
|
|
524
|
-
http: { redirections: { entryPoint: {
|
|
525
|
-
to: ports.https === 443 ? "websecure" : `:${ports.https}`,
|
|
526
|
-
scheme: "https",
|
|
527
|
-
permanent: true
|
|
528
|
-
} } }
|
|
529
|
-
},
|
|
530
|
-
websecure: { address: ":443" },
|
|
531
|
-
ping: { address: `:${PING_PORT}` }
|
|
532
|
-
},
|
|
533
|
-
ping: { entryPoint: "ping" },
|
|
534
|
-
providers: { file: {
|
|
535
|
-
directory: EDGE_DYNAMIC_DIR,
|
|
536
|
-
watch: true
|
|
537
|
-
} },
|
|
538
|
-
certificatesResolvers: {
|
|
539
|
-
[ACME_RESOLVER]: { acme: {
|
|
540
|
-
storage: "/acme/acme.json",
|
|
541
|
-
httpChallenge: { entryPoint: "web" }
|
|
542
|
-
} },
|
|
543
|
-
[ACME_DNS_RESOLVER]: { acme: {
|
|
544
|
-
storage: "/acme/acme-dns.json",
|
|
545
|
-
dnsChallenge: {
|
|
546
|
-
provider: "route53",
|
|
547
|
-
resolvers: ["1.1.1.1:53", "8.8.8.8:53"]
|
|
548
|
-
}
|
|
549
|
-
} }
|
|
550
|
-
},
|
|
551
|
-
log: { level: "INFO" }
|
|
552
|
-
};
|
|
553
|
-
}
|
|
554
|
-
/** The edge's compose document. */
|
|
555
|
-
function edgeCompose(options) {
|
|
556
|
-
const { ports } = options;
|
|
557
|
-
return {
|
|
558
|
-
name: EDGE_PROJECT,
|
|
559
|
-
services: { [EDGE_SERVICE]: {
|
|
560
|
-
image: TRAEFIK_IMAGE,
|
|
561
|
-
restart: "unless-stopped",
|
|
562
|
-
ports: [`${ports.https}:443`, `${ports.http}:80`],
|
|
563
|
-
configs: [{
|
|
564
|
-
source: "traefik",
|
|
565
|
-
target: "/etc/traefik/traefik.yml"
|
|
566
|
-
}],
|
|
567
|
-
volumes: [
|
|
568
|
-
`dynamic:${EDGE_DYNAMIC_DIR}`,
|
|
569
|
-
`certs:${EDGE_CERTS_DIR}`,
|
|
570
|
-
"acme:/acme"
|
|
571
|
-
],
|
|
572
|
-
labels: { "dev.geekmidas.edge.config": (0, node_crypto.createHash)("sha256").update(options.staticConfig).digest("hex").slice(0, 16) },
|
|
573
|
-
environment: {
|
|
574
|
-
AWS_SHARED_CREDENTIALS_FILE: EDGE_AWS_CREDENTIALS,
|
|
575
|
-
AWS_REGION: "us-east-1"
|
|
576
|
-
},
|
|
577
|
-
networks: ["edge"],
|
|
578
|
-
...EDGE_LIMITS,
|
|
579
|
-
healthcheck: {
|
|
580
|
-
test: [
|
|
581
|
-
"CMD",
|
|
582
|
-
"traefik",
|
|
583
|
-
"healthcheck",
|
|
584
|
-
"--ping"
|
|
585
|
-
],
|
|
586
|
-
interval: "10s",
|
|
587
|
-
timeout: "5s",
|
|
588
|
-
retries: 5
|
|
589
|
-
},
|
|
590
|
-
logging: options.logging
|
|
591
|
-
} },
|
|
592
|
-
configs: { traefik: { content: options.staticConfig } },
|
|
593
|
-
volumes: {
|
|
594
|
-
acme: {},
|
|
595
|
-
dynamic: {},
|
|
596
|
-
certs: {}
|
|
597
|
-
},
|
|
598
|
-
networks: { edge: {
|
|
599
|
-
name: EDGE_NETWORK,
|
|
600
|
-
external: true
|
|
601
|
-
} }
|
|
602
|
-
};
|
|
603
|
-
}
|
|
604
|
-
/** A stack's dynamic configuration, as an object. */
|
|
605
|
-
function traefikDynamic(routes, options) {
|
|
606
|
-
const { project, tls, edgeToken } = options;
|
|
607
|
-
const name = (route, suffix) => `${project}-${route.name}${suffix ? `-${suffix}` : ""}`;
|
|
608
|
-
const url = ({ service, port }) => `http://${edgeAlias(project, service)}:${port}`;
|
|
609
|
-
const routers = {};
|
|
610
|
-
const services = {};
|
|
611
|
-
const middlewares = {};
|
|
612
|
-
const strip = `${project}-strip-gkm-headers`;
|
|
613
|
-
if (routes.length > 0) middlewares[strip] = { headers: { customRequestHeaders: { [_geekmidas_manifest.CLIENT_IP_HEADER]: "" } } };
|
|
614
|
-
for (const route of routes) {
|
|
615
|
-
const chain = [strip];
|
|
616
|
-
const limited = /* @__PURE__ */ new Set();
|
|
617
|
-
if (route.allow) {
|
|
618
|
-
middlewares[name(route, "allow")] = { ipAllowList: { sourceRange: [...route.allow] } };
|
|
619
|
-
chain.push(name(route, "allow"));
|
|
620
|
-
}
|
|
621
|
-
if (route.auth) {
|
|
622
|
-
middlewares[name(route, "auth")] = { basicAuth: { users: [`${route.auth.user}:${route.auth.hash}`] } };
|
|
623
|
-
chain.push(name(route, "auth"));
|
|
624
|
-
}
|
|
625
|
-
if (route.limits?.handshakesPerMinute) {
|
|
626
|
-
const perMinute = route.limits.handshakesPerMinute;
|
|
627
|
-
middlewares[name(route, "rate")] = { rateLimit: {
|
|
628
|
-
average: perMinute,
|
|
629
|
-
period: "1m",
|
|
630
|
-
burst: perMinute
|
|
631
|
-
} };
|
|
632
|
-
chain.push(name(route, "rate"));
|
|
633
|
-
limited.add(name(route, "rate"));
|
|
634
|
-
}
|
|
635
|
-
if (route.limits?.connectionsPerIp) {
|
|
636
|
-
middlewares[name(route, "in-flight")] = { inFlightReq: { amount: route.limits.connectionsPerIp } };
|
|
637
|
-
chain.push(name(route, "in-flight"));
|
|
638
|
-
limited.add(name(route, "in-flight"));
|
|
639
|
-
}
|
|
640
|
-
if (route.prefix) {
|
|
641
|
-
middlewares[name(route, "prefix")] = { addPrefix: { prefix: route.prefix } };
|
|
642
|
-
chain.push(name(route, "prefix"));
|
|
643
|
-
}
|
|
644
|
-
assertRouteRenderable(route);
|
|
645
|
-
const allowed = [...(route.paths ?? []).map((path) => `Path(\`${path}\`)`), ...(route.prefixes ?? []).map((prefix) => `PathPrefix(\`${prefix}\`)`)];
|
|
646
|
-
const paths = allowed.length ? ` && (${allowed.join(" || ")})` : "";
|
|
647
|
-
const header = route.requireHeader ? ` && Header(\`${route.requireHeader.name}\`, \`${route.requireHeader.value}\`)` : "";
|
|
648
|
-
const certificate = () => route.wildcard?.tls.kind === "dns" ? {
|
|
649
|
-
certResolver: ACME_DNS_RESOLVER,
|
|
650
|
-
domains: [{ main: `*.${route.wildcard.domain}` }]
|
|
651
|
-
} : tls.kind === "acme" ? { certResolver: ACME_RESOLVER } : {};
|
|
652
|
-
for (const handler of route.handlers ?? []) {
|
|
653
|
-
const handlerName = name(route, handler.name);
|
|
654
|
-
routers[handlerName] = {
|
|
655
|
-
rule: `${hostRule(route)} && (${handler.prefixes.map((prefix) => `PathPrefix(\`${prefix}\`)`).join(" || ")})`,
|
|
656
|
-
priority: 1e4,
|
|
657
|
-
entryPoints: ["websecure"],
|
|
658
|
-
service: handlerName,
|
|
659
|
-
middlewares: [strip],
|
|
660
|
-
tls: certificate()
|
|
661
|
-
};
|
|
662
|
-
services[handlerName] = { loadBalancer: { servers: handler.upstreams.map((upstream) => ({ url: url(upstream) })) } };
|
|
663
|
-
}
|
|
664
|
-
if (route.redirects?.hosts.length) {
|
|
665
|
-
const redirect = name(route, "redirect");
|
|
666
|
-
middlewares[redirect] = { redirectRegex: {
|
|
667
|
-
regex: "^https?://[^/]+(.*)$",
|
|
668
|
-
replacement: `${route.redirects.to}$\{1}`,
|
|
669
|
-
permanent: true
|
|
670
|
-
} };
|
|
671
|
-
route.redirects.hosts.forEach((host, index) => {
|
|
672
|
-
routers[name(route, `redirect-${index + 1}`)] = {
|
|
673
|
-
rule: `Host(\`${host}\`)`,
|
|
674
|
-
entryPoints: ["websecure"],
|
|
675
|
-
service: "noop@internal",
|
|
676
|
-
middlewares: [redirect],
|
|
677
|
-
tls: certificate()
|
|
678
|
-
};
|
|
679
|
-
});
|
|
680
|
-
}
|
|
681
|
-
const rule = `${hostRule(route)}${paths}${header}`;
|
|
682
|
-
routers[name(route)] = {
|
|
683
|
-
rule,
|
|
684
|
-
...route.wildcard ? { priority: 1 } : {},
|
|
685
|
-
entryPoints: ["websecure"],
|
|
686
|
-
service: name(route),
|
|
687
|
-
middlewares: chain,
|
|
688
|
-
tls: certificate()
|
|
689
|
-
};
|
|
690
|
-
if (edgeToken && !route.prefix) {
|
|
691
|
-
const trusted = chain.slice(1).filter((m) => !limited.has(m));
|
|
692
|
-
routers[name(route, "stack")] = {
|
|
693
|
-
rule: `${rule} && Header(\`${_geekmidas_manifest.EDGE_TOKEN_HEADER}\`, \`${edgeToken}\`)`,
|
|
694
|
-
...route.wildcard ? { priority: 2 } : {},
|
|
695
|
-
entryPoints: ["websecure"],
|
|
696
|
-
service: name(route),
|
|
697
|
-
...trusted.length > 0 ? { middlewares: trusted } : {},
|
|
698
|
-
tls: certificate()
|
|
699
|
-
};
|
|
700
|
-
}
|
|
701
|
-
services[name(route)] = { loadBalancer: {
|
|
702
|
-
servers: route.upstreams.map((upstream) => ({ url: url(upstream) })),
|
|
703
|
-
...route.prefix ? { passHostHeader: false } : {},
|
|
704
|
-
...route.streaming ? { responseForwarding: { flushInterval: "-1ms" } } : {},
|
|
705
|
-
...route.health ? { healthCheck: {
|
|
706
|
-
path: route.health,
|
|
707
|
-
interval: "5s",
|
|
708
|
-
timeout: "3s"
|
|
709
|
-
} } : {}
|
|
710
|
-
} };
|
|
711
|
-
}
|
|
712
|
-
return {
|
|
713
|
-
http: {
|
|
714
|
-
routers,
|
|
715
|
-
services,
|
|
716
|
-
...Object.keys(middlewares).length > 0 ? { middlewares } : {}
|
|
717
|
-
},
|
|
718
|
-
...tls.kind === "files" ? { tls: { certificates: [{
|
|
719
|
-
certFile: tls.certFile,
|
|
720
|
-
keyFile: tls.keyFile
|
|
721
|
-
}] } } : {}
|
|
722
|
-
};
|
|
723
|
-
}
|
|
724
|
-
/**
|
|
725
|
-
* The hosts a route answers, as a Traefik rule: its own and its aliases', or
|
|
726
|
-
* — for a wildcard site — exactly one label under its domain, but the ones
|
|
727
|
-
* it never takes. One label, as a wildcard certificate covers: a stage at
|
|
728
|
-
* `staging.example.com` is never reached through `example.com`'s wildcard.
|
|
729
|
-
*
|
|
730
|
-
* Several hosts are parenthesised, `(Host(a) || Host(b))`, so whatever is
|
|
731
|
-
* joined to the rule with `&&` — the path allowlist, a required header, the
|
|
732
|
-
* stack's token — holds on every one of them. One router's hosts are one
|
|
733
|
-
* certificate's names under ACME.
|
|
734
|
-
*/
|
|
735
|
-
function hostRule(route) {
|
|
736
|
-
if (!route.wildcard) {
|
|
737
|
-
const hosts = [route.host, ...route.aliases ?? []].map((host) => `Host(\`${host}\`)`);
|
|
738
|
-
return hosts.length === 1 ? hosts[0] : `(${hosts.join(" || ")})`;
|
|
739
|
-
}
|
|
740
|
-
const { domain, except } = route.wildcard;
|
|
741
|
-
return [`HostRegexp(\`${`^[a-z0-9-]+\\.${domain.replace(/\./g, "\\.")}$`}\`)`, ...except.map((label) => `!Host(\`${label}.${domain}\`)`)].join(" && ");
|
|
742
|
-
}
|
|
743
|
-
/**
|
|
744
|
-
* What a stack's routes claim on the edge, from the route model: one claim
|
|
745
|
-
* per host, each route's aliases and redirects included.
|
|
746
|
-
*/
|
|
747
|
-
function edgeClaims(routes) {
|
|
748
|
-
return routes.flatMap((route) => route.wildcard ? [{
|
|
749
|
-
wildcard: route.wildcard.domain.toLowerCase(),
|
|
750
|
-
except: [...route.wildcard.except]
|
|
751
|
-
}] : routeHosts(route).map((host) => ({ host: host.toLowerCase() })));
|
|
752
|
-
}
|
|
753
|
-
/**
|
|
754
|
-
* The comment line a stack's file carries its claims on: a comment, because
|
|
755
|
-
* Traefik's file provider refuses a whole file over a key it does not know,
|
|
756
|
-
* and gkm reads it back rather than taking the routers' rules apart.
|
|
757
|
-
*/
|
|
758
|
-
const CLAIMS_PREFIX = "# gkm-claims: ";
|
|
759
|
-
/**
|
|
760
|
-
* The hosts a stack's file on the edge claims: from its claims line, or — a
|
|
761
|
-
* file written before gkm wrote one — from its routers' rules, in the shapes
|
|
762
|
-
* `traefikDynamic` renders them.
|
|
763
|
-
*/
|
|
764
|
-
function readEdgeClaims(file) {
|
|
765
|
-
for (const line of file.split("\n")) {
|
|
766
|
-
if (!line.startsWith(CLAIMS_PREFIX)) continue;
|
|
767
|
-
try {
|
|
768
|
-
const claims = JSON.parse(line.slice(14));
|
|
769
|
-
if (Array.isArray(claims)) return claims.filter(isClaim);
|
|
770
|
-
} catch {}
|
|
771
|
-
}
|
|
772
|
-
let document;
|
|
773
|
-
try {
|
|
774
|
-
document = (0, yaml.parse)(file);
|
|
775
|
-
} catch {
|
|
776
|
-
return [];
|
|
777
|
-
}
|
|
778
|
-
const routers = document?.http?.routers;
|
|
779
|
-
if (!routers || typeof routers !== "object") return [];
|
|
780
|
-
const claims = [];
|
|
781
|
-
for (const router of Object.values(routers)) {
|
|
782
|
-
const rule = router?.rule;
|
|
783
|
-
if (typeof rule === "string") claims.push(...ruleClaims(rule));
|
|
784
|
-
}
|
|
785
|
-
return claims;
|
|
786
|
-
}
|
|
787
|
-
function isClaim(value) {
|
|
788
|
-
if (!value || typeof value !== "object") return false;
|
|
789
|
-
const claim = value;
|
|
790
|
-
return typeof claim.host === "string" || typeof claim.wildcard === "string" && Array.isArray(claim.except);
|
|
791
|
-
}
|
|
792
|
-
/**
|
|
793
|
-
* The hosts a rule matches: each `Host(\`a\`)` not negated, and a
|
|
794
|
-
* `HostRegexp` of a wildcard site — one label under a domain — with the
|
|
795
|
-
* `!Host` labels it leaves out.
|
|
796
|
-
*/
|
|
797
|
-
function ruleClaims(rule) {
|
|
798
|
-
const negated = [...rule.matchAll(/!\s*Host\(`([^`]+)`\)/g)].map((match) => match[1].toLowerCase());
|
|
799
|
-
const wildcard = /HostRegexp\(`\^\[a-z0-9-\]\+\\\.(.+)\$`\)/.exec(rule);
|
|
800
|
-
if (wildcard) {
|
|
801
|
-
const domain = wildcard[1].replace(/\\\./g, ".").toLowerCase();
|
|
802
|
-
const suffix = `.${domain}`;
|
|
803
|
-
return [{
|
|
804
|
-
wildcard: domain,
|
|
805
|
-
except: negated.filter((host) => host.endsWith(suffix)).map((host) => host.slice(0, -suffix.length))
|
|
806
|
-
}];
|
|
807
|
-
}
|
|
808
|
-
return [...rule.matchAll(/(?<![!\w])Host\(`([^`]+)`\)/g)].map((match) => ({ host: match[1].toLowerCase() }));
|
|
809
|
-
}
|
|
810
|
-
/**
|
|
811
|
-
* Where two claims meet, as a host to name — or undefined where they never
|
|
812
|
-
* do. A wildcard takes one label under its domain, so it meets a name one
|
|
813
|
-
* label under it that it does not leave out, and another wildcard on the
|
|
814
|
-
* same domain.
|
|
815
|
-
*/
|
|
816
|
-
function claimsOverlap(a, b) {
|
|
817
|
-
if ("host" in a && "host" in b) return a.host === b.host ? a.host : void 0;
|
|
818
|
-
if ("wildcard" in a && "wildcard" in b) return a.wildcard === b.wildcard ? `*.${a.wildcard}` : void 0;
|
|
819
|
-
const [name, wildcard] = "host" in a ? [a, b] : [b, a];
|
|
820
|
-
const suffix = `.${wildcard.wildcard}`;
|
|
821
|
-
if (!name.host.endsWith(suffix)) return void 0;
|
|
822
|
-
const label = name.host.slice(0, -suffix.length);
|
|
823
|
-
if (!/^[a-z0-9-]+$/.test(label) || wildcard.except.includes(label)) return;
|
|
824
|
-
return name.host;
|
|
825
|
-
}
|
|
826
|
-
/** A stack's dynamic configuration file, as written to the edge's directory. */
|
|
827
|
-
function traefikDynamicFile(routes, options) {
|
|
828
|
-
return `# Generated by gkm compose for ${options.project} — do not edit.
|
|
829
|
-
# The shared edge (${EDGE_PROJECT}) reads every file in this directory; this
|
|
830
|
-
# one is removed by gkm compose --down. The hosts it routes, which no other
|
|
831
|
-
# stack on the edge may route:
|
|
832
|
-
${CLAIMS_PREFIX}${JSON.stringify(edgeClaims(routes))}
|
|
833
|
-
${yaml$1(traefikDynamic(routes, options))}`;
|
|
834
|
-
}
|
|
835
|
-
/** The edge's static configuration file. */
|
|
836
|
-
function traefikStaticFile(ports) {
|
|
837
|
-
return `# Generated by gkm compose — the server's shared edge. Do not edit.
|
|
838
|
-
${yaml$1(traefikStatic(ports))}`;
|
|
839
|
-
}
|
|
840
|
-
/** The edge's compose file. */
|
|
841
|
-
function edgeComposeFile(options) {
|
|
842
|
-
return `# Generated by gkm compose — the server's shared edge. Do not edit.
|
|
843
|
-
#
|
|
844
|
-
# Started by the first stack that runs with proxy: 'traefik', and left
|
|
845
|
-
# running by gkm compose --down. Stop it, once nothing uses it, with:
|
|
846
|
-
#
|
|
847
|
-
# docker compose -p ${EDGE_PROJECT} down
|
|
848
|
-
${yaml$1(edgeCompose(options))}`;
|
|
849
|
-
}
|
|
850
|
-
function yaml$1(value) {
|
|
851
|
-
return (0, yaml.stringify)(value, {
|
|
852
|
-
lineWidth: 0,
|
|
853
|
-
aliasDuplicateObjects: false
|
|
854
|
-
});
|
|
855
|
-
}
|
|
856
|
-
//#endregion
|
|
857
264
|
//#region src/compose/stack.ts
|
|
858
265
|
/**
|
|
859
266
|
* The stack a workspace runs as for one stage — pure.
|
|
@@ -983,10 +390,10 @@ function withCaddyConfigs(compose, files) {
|
|
|
983
390
|
target: "/etc/caddy/Caddyfile"
|
|
984
391
|
}, ...files.tls ? [{
|
|
985
392
|
source: "tls-cert",
|
|
986
|
-
target: `${CADDY_TLS_DIR}/cert.pem`
|
|
393
|
+
target: `${_geekmidas_edge_proxy_caddy.CADDY_TLS_DIR}/cert.pem`
|
|
987
394
|
}, {
|
|
988
395
|
source: "tls-key",
|
|
989
|
-
target: `${CADDY_TLS_DIR}/key.pem`,
|
|
396
|
+
target: `${_geekmidas_edge_proxy_caddy.CADDY_TLS_DIR}/key.pem`,
|
|
990
397
|
mode: 256
|
|
991
398
|
}] : []],
|
|
992
399
|
labels: {
|
|
@@ -1392,7 +799,7 @@ function composeStack(input) {
|
|
|
1392
799
|
...logsBase?.host && logsBase.public ? [require_compose.LOGS_SERVICE] : [],
|
|
1393
800
|
...mailInbox ? ["mailpit"] : []
|
|
1394
801
|
] : []);
|
|
1395
|
-
const hostOf = (service) => edgeServices.has(service) ? edgeAlias(project, service) : service;
|
|
802
|
+
const hostOf = (service) => edgeServices.has(service) ? (0, _geekmidas_edge_proxy_traefik.edgeAlias)(project, service) : service;
|
|
1396
803
|
const logs = logsBase && {
|
|
1397
804
|
...logsBase,
|
|
1398
805
|
appEnv: {
|
|
@@ -1608,11 +1015,11 @@ function composeStack(input) {
|
|
|
1608
1015
|
const tls = certificate || local ? {
|
|
1609
1016
|
kind: "files",
|
|
1610
1017
|
...proxy === "caddy" ? {
|
|
1611
|
-
certFile: `${CADDY_TLS_DIR}/cert.pem`,
|
|
1612
|
-
keyFile: `${CADDY_TLS_DIR}/key.pem`
|
|
1613
|
-
} : edgeCertificatePaths(project)
|
|
1018
|
+
certFile: `${_geekmidas_edge_proxy_caddy.CADDY_TLS_DIR}/cert.pem`,
|
|
1019
|
+
keyFile: `${_geekmidas_edge_proxy_caddy.CADDY_TLS_DIR}/key.pem`
|
|
1020
|
+
} : (0, _geekmidas_edge_proxy_traefik.edgeCertificatePaths)(project)
|
|
1614
1021
|
} : { kind: "acme" };
|
|
1615
|
-
const authority = local && !certificate ? input.localAuthority ??
|
|
1022
|
+
const authority = local && !certificate ? input.localAuthority ?? (0, _geekmidas_edge_certificates_local.localAuthorityPaths)(require_dns.gkmHome()) : void 0;
|
|
1616
1023
|
const root = authority?.certFile ?? certificate?.caFile;
|
|
1617
1024
|
const backupsChoice = input.buildOnly ? void 0 : require_apps.stageBackups(workspace, manifest, stage);
|
|
1618
1025
|
const backups = backupsChoice?.mode === "on" && infra.includes("postgres") ? require_apps.stackBackups({
|
|
@@ -1702,7 +1109,7 @@ function composeStack(input) {
|
|
|
1702
1109
|
}] : []
|
|
1703
1110
|
];
|
|
1704
1111
|
if (mailInbox) {
|
|
1705
|
-
const taken = routes.find((route) => routeHosts(route).includes(mailInbox.host));
|
|
1112
|
+
const taken = routes.find((route) => (0, _geekmidas_edge_routes.routeHosts)(route).includes(mailInbox.host));
|
|
1706
1113
|
if (taken) throw new MailInboxHostTaken(mailInbox.host, taken.name);
|
|
1707
1114
|
routes.push({
|
|
1708
1115
|
name: "mailpit",
|
|
@@ -1800,11 +1207,11 @@ function composeStack(input) {
|
|
|
1800
1207
|
host: `*.${wildcard.edge.domain}`,
|
|
1801
1208
|
tls: wildcard.edge.tls.kind
|
|
1802
1209
|
} } : {},
|
|
1803
|
-
...proxy === "caddy" ? { caddyfile: edgeCaddyfile(routes, {
|
|
1210
|
+
...proxy === "caddy" ? { caddyfile: (0, _geekmidas_edge_proxy_caddy.edgeCaddyfile)(routes, {
|
|
1804
1211
|
tls,
|
|
1805
1212
|
edgeToken: outside[_geekmidas_manifest.EDGE_TOKEN_KEY],
|
|
1806
1213
|
...local ? { redirects: false } : {}
|
|
1807
|
-
}) } : { traefik: traefikDynamicFile(routes, {
|
|
1214
|
+
}) } : { traefik: (0, _geekmidas_edge_proxy_traefik.traefikDynamicFile)(routes, {
|
|
1808
1215
|
project,
|
|
1809
1216
|
tls,
|
|
1810
1217
|
edgeToken: outside[_geekmidas_manifest.EDGE_TOKEN_KEY]
|
|
@@ -2038,7 +1445,7 @@ var EdgeHostTaken = class extends require_errors.GkmError {
|
|
|
2038
1445
|
*/
|
|
2039
1446
|
function assertHostsUnique(routes) {
|
|
2040
1447
|
const claimed = /* @__PURE__ */ new Map();
|
|
2041
|
-
for (const route of routes) for (const host of routeHosts(route)) {
|
|
1448
|
+
for (const route of routes) for (const host of (0, _geekmidas_edge_routes.routeHosts)(route)) {
|
|
2042
1449
|
const first = claimed.get(host);
|
|
2043
1450
|
if (first !== void 0 && first !== route.name) throw new EdgeHostTaken(host, first, route.name);
|
|
2044
1451
|
claimed.set(host, route.name);
|
|
@@ -2123,7 +1530,7 @@ const LOCAL_CA_IN_CONTAINER = "/etc/gkm/local-ca.pem";
|
|
|
2123
1530
|
* route's but a wildcard's, which no host entry can name.
|
|
2124
1531
|
*/
|
|
2125
1532
|
function stackPublicHosts(routes) {
|
|
2126
|
-
return [...new Set(routes.flatMap(routeHosts))].filter((host) => !host.startsWith("*.")).sort();
|
|
1533
|
+
return [...new Set(routes.flatMap(_geekmidas_edge_routes.routeHosts))].filter((host) => !host.startsWith("*.")).sort();
|
|
2127
1534
|
}
|
|
2128
1535
|
/**
|
|
2129
1536
|
* What a local stack's container needs to call the stage's own public hosts —
|
|
@@ -2233,7 +1640,7 @@ function stackFile(options) {
|
|
|
2233
1640
|
}] } : {},
|
|
2234
1641
|
...app.kind !== "site" && infra.length ? { depends_on: Object.fromEntries(infra.map((name) => [name, HEALTHY])) } : {},
|
|
2235
1642
|
healthcheck: probe(app.port, app.kind === "site" ? "/" : "/health"),
|
|
2236
|
-
...app.kind === "websocket-api" ? { ulimits: { nofile: NOFILE } } : {}
|
|
1643
|
+
...app.kind === "websocket-api" ? { ulimits: { nofile: _geekmidas_edge_routes.NOFILE } } : {}
|
|
2237
1644
|
};
|
|
2238
1645
|
for (const name of replicaNames(app)) services[name] = { ...definition };
|
|
2239
1646
|
}
|
|
@@ -2278,7 +1685,7 @@ function stackFile(options) {
|
|
|
2278
1685
|
restart: "unless-stopped",
|
|
2279
1686
|
ports: [`${options.https}:443`, `${options.http}:80`],
|
|
2280
1687
|
volumes: ["caddy-data:/data", "caddy-config:/config"],
|
|
2281
|
-
...EDGE_LIMITS,
|
|
1688
|
+
..._geekmidas_edge_routes.EDGE_LIMITS,
|
|
2282
1689
|
depends_on: Object.fromEntries([
|
|
2283
1690
|
...apps.filter((app) => !(app.prerender && app.build)).flatMap(replicaNames),
|
|
2284
1691
|
...options.workers.filter((w) => w.push).map((w) => w.name),
|
|
@@ -2317,7 +1724,7 @@ function stackFile(options) {
|
|
|
2317
1724
|
volumes,
|
|
2318
1725
|
...apps.some((app) => app.prerender && app.build) && authority ? { secrets: { [require_apps.LOCAL_CA_BUILD_SECRET]: { file: authority } } } : {},
|
|
2319
1726
|
...options.edge.size > 0 ? { networks: { edge: {
|
|
2320
|
-
name: EDGE_NETWORK,
|
|
1727
|
+
name: _geekmidas_edge_proxy_traefik.EDGE_NETWORK,
|
|
2321
1728
|
external: true
|
|
2322
1729
|
} } } : {}
|
|
2323
1730
|
};
|
|
@@ -2368,48 +1775,12 @@ function withLogsPort(stack, port) {
|
|
|
2368
1775
|
};
|
|
2369
1776
|
}
|
|
2370
1777
|
//#endregion
|
|
2371
|
-
Object.defineProperty(exports, "EDGE_AWS_CREDENTIALS", {
|
|
2372
|
-
enumerable: true,
|
|
2373
|
-
get: function() {
|
|
2374
|
-
return EDGE_AWS_CREDENTIALS;
|
|
2375
|
-
}
|
|
2376
|
-
});
|
|
2377
|
-
Object.defineProperty(exports, "EDGE_CERTS_DIR", {
|
|
2378
|
-
enumerable: true,
|
|
2379
|
-
get: function() {
|
|
2380
|
-
return EDGE_CERTS_DIR;
|
|
2381
|
-
}
|
|
2382
|
-
});
|
|
2383
|
-
Object.defineProperty(exports, "EDGE_DYNAMIC_DIR", {
|
|
2384
|
-
enumerable: true,
|
|
2385
|
-
get: function() {
|
|
2386
|
-
return EDGE_DYNAMIC_DIR;
|
|
2387
|
-
}
|
|
2388
|
-
});
|
|
2389
|
-
Object.defineProperty(exports, "EDGE_NETWORK", {
|
|
2390
|
-
enumerable: true,
|
|
2391
|
-
get: function() {
|
|
2392
|
-
return EDGE_NETWORK;
|
|
2393
|
-
}
|
|
2394
|
-
});
|
|
2395
1778
|
Object.defineProperty(exports, "EDGE_PORT_ENV", {
|
|
2396
1779
|
enumerable: true,
|
|
2397
1780
|
get: function() {
|
|
2398
1781
|
return EDGE_PORT_ENV;
|
|
2399
1782
|
}
|
|
2400
1783
|
});
|
|
2401
|
-
Object.defineProperty(exports, "EDGE_PROJECT", {
|
|
2402
|
-
enumerable: true,
|
|
2403
|
-
get: function() {
|
|
2404
|
-
return EDGE_PROJECT;
|
|
2405
|
-
}
|
|
2406
|
-
});
|
|
2407
|
-
Object.defineProperty(exports, "EDGE_SERVICE", {
|
|
2408
|
-
enumerable: true,
|
|
2409
|
-
get: function() {
|
|
2410
|
-
return EDGE_SERVICE;
|
|
2411
|
-
}
|
|
2412
|
-
});
|
|
2413
1784
|
Object.defineProperty(exports, "LOGS_PORT_ENV", {
|
|
2414
1785
|
enumerable: true,
|
|
2415
1786
|
get: function() {
|
|
@@ -2452,12 +1823,6 @@ Object.defineProperty(exports, "awsProvisioningCredentials", {
|
|
|
2452
1823
|
return awsProvisioningCredentials;
|
|
2453
1824
|
}
|
|
2454
1825
|
});
|
|
2455
|
-
Object.defineProperty(exports, "claimsOverlap", {
|
|
2456
|
-
enumerable: true,
|
|
2457
|
-
get: function() {
|
|
2458
|
-
return claimsOverlap;
|
|
2459
|
-
}
|
|
2460
|
-
});
|
|
2461
1826
|
Object.defineProperty(exports, "composeProject", {
|
|
2462
1827
|
enumerable: true,
|
|
2463
1828
|
get: function() {
|
|
@@ -2482,36 +1847,18 @@ Object.defineProperty(exports, "derivedCredentials", {
|
|
|
2482
1847
|
return derivedCredentials;
|
|
2483
1848
|
}
|
|
2484
1849
|
});
|
|
2485
|
-
Object.defineProperty(exports, "edgeComposeFile", {
|
|
2486
|
-
enumerable: true,
|
|
2487
|
-
get: function() {
|
|
2488
|
-
return edgeComposeFile;
|
|
2489
|
-
}
|
|
2490
|
-
});
|
|
2491
1850
|
Object.defineProperty(exports, "envFile", {
|
|
2492
1851
|
enumerable: true,
|
|
2493
1852
|
get: function() {
|
|
2494
1853
|
return envFile;
|
|
2495
1854
|
}
|
|
2496
1855
|
});
|
|
2497
|
-
Object.defineProperty(exports, "readEdgeClaims", {
|
|
2498
|
-
enumerable: true,
|
|
2499
|
-
get: function() {
|
|
2500
|
-
return readEdgeClaims;
|
|
2501
|
-
}
|
|
2502
|
-
});
|
|
2503
1856
|
Object.defineProperty(exports, "replicaNames", {
|
|
2504
1857
|
enumerable: true,
|
|
2505
1858
|
get: function() {
|
|
2506
1859
|
return replicaNames;
|
|
2507
1860
|
}
|
|
2508
1861
|
});
|
|
2509
|
-
Object.defineProperty(exports, "routeHosts", {
|
|
2510
|
-
enumerable: true,
|
|
2511
|
-
get: function() {
|
|
2512
|
-
return routeHosts;
|
|
2513
|
-
}
|
|
2514
|
-
});
|
|
2515
1862
|
Object.defineProperty(exports, "stackDir", {
|
|
2516
1863
|
enumerable: true,
|
|
2517
1864
|
get: function() {
|
|
@@ -2524,12 +1871,6 @@ Object.defineProperty(exports, "stackPlan", {
|
|
|
2524
1871
|
return stackPlan;
|
|
2525
1872
|
}
|
|
2526
1873
|
});
|
|
2527
|
-
Object.defineProperty(exports, "traefikStaticFile", {
|
|
2528
|
-
enumerable: true,
|
|
2529
|
-
get: function() {
|
|
2530
|
-
return traefikStaticFile;
|
|
2531
|
-
}
|
|
2532
|
-
});
|
|
2533
1874
|
Object.defineProperty(exports, "withCaddyConfigs", {
|
|
2534
1875
|
enumerable: true,
|
|
2535
1876
|
get: function() {
|
|
@@ -2543,4 +1884,4 @@ Object.defineProperty(exports, "withLogsPort", {
|
|
|
2543
1884
|
}
|
|
2544
1885
|
});
|
|
2545
1886
|
|
|
2546
|
-
//# sourceMappingURL=stack-
|
|
1887
|
+
//# sourceMappingURL=stack-Dr2FSxGm.cjs.map
|