@geekmidas/cli 10.0.0-alpha.146 → 10.0.0-alpha.147
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/{GoDaddyProvider-BK5N6-fx.cjs → GoDaddyProvider-CpO8dFYC.cjs} +2 -2
- package/dist/{GoDaddyProvider-BK5N6-fx.cjs.map → GoDaddyProvider-CpO8dFYC.cjs.map} +1 -1
- package/dist/{GoDaddyProvider-BESq24p-.mjs → GoDaddyProvider-DXuPFufW.mjs} +2 -2
- package/dist/{GoDaddyProvider-BESq24p-.mjs.map → GoDaddyProvider-DXuPFufW.mjs.map} +1 -1
- package/dist/{HostingerProvider-BbQod5OB.cjs → HostingerProvider-Beu0Ciky.cjs} +2 -2
- package/dist/{HostingerProvider-BbQod5OB.cjs.map → HostingerProvider-Beu0Ciky.cjs.map} +1 -1
- package/dist/{HostingerProvider-BV30wTNI.mjs → HostingerProvider-Dum492dc.mjs} +2 -2
- package/dist/{HostingerProvider-BV30wTNI.mjs.map → HostingerProvider-Dum492dc.mjs.map} +1 -1
- package/dist/{LegacyStateStore-Ck3HI28A.mjs → LegacyStateStore-DZjph7ES.mjs} +2 -2
- package/dist/{LegacyStateStore-Ck3HI28A.mjs.map → LegacyStateStore-DZjph7ES.mjs.map} +1 -1
- package/dist/{LegacyStateStore-OEno6vIb.cjs → LegacyStateStore-V4R0llou.cjs} +2 -2
- package/dist/{LegacyStateStore-OEno6vIb.cjs.map → LegacyStateStore-V4R0llou.cjs.map} +1 -1
- package/dist/{LocalStateStore-Fa54CpLw.mjs → LocalStateStore-Bth8pBp-.mjs} +2 -2
- package/dist/{LocalStateStore-Fa54CpLw.mjs.map → LocalStateStore-Bth8pBp-.mjs.map} +1 -1
- package/dist/{LocalStateStore-ukDFg6GM.cjs → LocalStateStore-DuSotrd3.cjs} +2 -2
- package/dist/{LocalStateStore-ukDFg6GM.cjs.map → LocalStateStore-DuSotrd3.cjs.map} +1 -1
- package/dist/{S3StateStore-D53985SR.mjs → S3StateStore-DGlh3s2p.mjs} +4 -4
- package/dist/{S3StateStore-D53985SR.mjs.map → S3StateStore-DGlh3s2p.mjs.map} +1 -1
- package/dist/{S3StateStore-Cjuft2Lk.cjs → S3StateStore-DTPxQS3z.cjs} +4 -4
- package/dist/{S3StateStore-Cjuft2Lk.cjs.map → S3StateStore-DTPxQS3z.cjs.map} +1 -1
- package/dist/{SSMStateStore-CnJgw3_-.cjs → SSMStateStore-B9R317q0.cjs} +2 -2
- package/dist/{SSMStateStore-CnJgw3_-.cjs.map → SSMStateStore-B9R317q0.cjs.map} +1 -1
- package/dist/{SSMStateStore-CRjV2h2G.mjs → SSMStateStore-DCa85jhG.mjs} +2 -2
- package/dist/{SSMStateStore-CRjV2h2G.mjs.map → SSMStateStore-DCa85jhG.mjs.map} +1 -1
- package/dist/{add-D0-1UyFj.mjs → add-Bl33BvDW.mjs} +7 -7
- package/dist/{add-D0-1UyFj.mjs.map → add-Bl33BvDW.mjs.map} +1 -1
- package/dist/{add-CG_4mNir.cjs → add-Cr-9Ku0W.cjs} +7 -7
- package/dist/{add-CG_4mNir.cjs.map → add-Cr-9Ku0W.cjs.map} +1 -1
- package/dist/{apps-DHi6E_yH.cjs → apps-BIsxWYUo.cjs} +104 -8
- package/dist/apps-BIsxWYUo.cjs.map +1 -0
- package/dist/{apps-DWALM-8s.mjs → apps-DFzUuJ22.mjs} +87 -9
- package/dist/apps-DFzUuJ22.mjs.map +1 -0
- package/dist/{bundler-Cb5ynXXS.mjs → bundler-BagXzefF.mjs} +6 -6
- package/dist/{bundler-Cb5ynXXS.mjs.map → bundler-BagXzefF.mjs.map} +1 -1
- package/dist/{bundler-Co_7zpYC.cjs → bundler-Cael9EDc.cjs} +6 -6
- package/dist/{bundler-Co_7zpYC.cjs.map → bundler-Cael9EDc.cjs.map} +1 -1
- package/dist/{cli-C5M_7Kux.cjs → cli-B1A-cLy-.cjs} +4 -4
- package/dist/{cli-C5M_7Kux.cjs.map → cli-B1A-cLy-.cjs.map} +1 -1
- package/dist/{cli-D_9WqN6C.mjs → cli-BJRPsFq7.mjs} +4 -4
- package/dist/{cli-D_9WqN6C.mjs.map → cli-BJRPsFq7.mjs.map} +1 -1
- package/dist/{compose-7p0-3ogo.mjs → compose-C7izI7Eo.mjs} +5 -5
- package/dist/{compose-7p0-3ogo.mjs.map → compose-C7izI7Eo.mjs.map} +1 -1
- package/dist/{compose-DxmEMeTu.mjs → compose-CZU60dwb.mjs} +286 -31
- package/dist/compose-CZU60dwb.mjs.map +1 -0
- package/dist/{compose-C10hkeHU.cjs → compose-Cius-YHS.cjs} +5 -5
- package/dist/{compose-C10hkeHU.cjs.map → compose-Cius-YHS.cjs.map} +1 -1
- package/dist/{compose-BeQ01iYk.cjs → compose-CnNmDNph.cjs} +285 -30
- package/dist/compose-CnNmDNph.cjs.map +1 -0
- package/dist/{config-B-wza0Xk.mjs → config-BLrAd7Of.mjs} +2 -2
- package/dist/{config-B-wza0Xk.mjs.map → config-BLrAd7Of.mjs.map} +1 -1
- package/dist/{config-BcL1Fojs.d.cts → config-CRk2vdSp.d.mts} +3 -3
- package/dist/{config-BbivVpq0.d.mts.map → config-CRk2vdSp.d.mts.map} +1 -1
- package/dist/{config-CWExbDxA.cjs → config-juUyBlb1.cjs} +2 -2
- package/dist/{config-CWExbDxA.cjs.map → config-juUyBlb1.cjs.map} +1 -1
- package/dist/{config-BbivVpq0.d.mts → config-oBgsbLip.d.cts} +3 -3
- package/dist/{config-BcL1Fojs.d.cts.map → config-oBgsbLip.d.cts.map} +1 -1
- package/dist/config.cjs +2 -2
- package/dist/config.d.cts +3 -3
- package/dist/config.d.mts +3 -3
- package/dist/config.mjs +2 -2
- package/dist/{credentials-B5Oe4fLE.mjs → credentials-CJ_z0Nni.mjs} +7 -7
- package/dist/{credentials-B5Oe4fLE.mjs.map → credentials-CJ_z0Nni.mjs.map} +1 -1
- package/dist/{credentials-Csnd7M8M.cjs → credentials-D11xozSF.cjs} +7 -7
- package/dist/{credentials-Csnd7M8M.cjs.map → credentials-D11xozSF.cjs.map} +1 -1
- package/dist/deploy/public.cjs +12 -12
- package/dist/deploy/public.d.cts +3 -3
- package/dist/deploy/public.d.cts.map +1 -1
- package/dist/deploy/public.d.mts +3 -3
- package/dist/deploy/public.d.mts.map +1 -1
- package/dist/deploy/public.mjs +12 -12
- package/dist/{deploy-BwNxJ3ZI.cjs → deploy-Ch1wCsU1.cjs} +13 -13
- package/dist/{deploy-BwNxJ3ZI.cjs.map → deploy-Ch1wCsU1.cjs.map} +1 -1
- package/dist/{deploy-6DDEG4Ai.mjs → deploy-Dfn21QYG.mjs} +13 -13
- package/dist/{deploy-6DDEG4Ai.mjs.map → deploy-Dfn21QYG.mjs.map} +1 -1
- package/dist/{docker-BZnNUJCy.cjs → docker-BT6G7aJE.cjs} +5 -5
- package/dist/{docker-BZnNUJCy.cjs.map → docker-BT6G7aJE.cjs.map} +1 -1
- package/dist/{docker-Ch5aPQ04.mjs → docker-_W_CauBY.mjs} +5 -5
- package/dist/{docker-Ch5aPQ04.mjs.map → docker-_W_CauBY.mjs.map} +1 -1
- package/dist/{dokploy-CTWw3WSo.mjs → dokploy-CBgGuei3.mjs} +2 -2
- package/dist/{dokploy-CTWw3WSo.mjs.map → dokploy-CBgGuei3.mjs.map} +1 -1
- package/dist/{dokploy-Cn7dQqmE.cjs → dokploy-DaQbR_NH.cjs} +2 -2
- package/dist/{dokploy-Cn7dQqmE.cjs.map → dokploy-DaQbR_NH.cjs.map} +1 -1
- package/dist/{eas-D0B8H7hT.mjs → eas-3L1_yKhk.mjs} +3 -3
- package/dist/{eas-D0B8H7hT.mjs.map → eas-3L1_yKhk.mjs.map} +1 -1
- package/dist/{eas-IPjz0PWK.cjs → eas-YxDTJ3ql.cjs} +3 -3
- package/dist/{eas-IPjz0PWK.cjs.map → eas-YxDTJ3ql.cjs.map} +1 -1
- package/dist/{encryption-C9auXcSV.mjs → encryption-CRyFk5nu.mjs} +4 -4
- package/dist/{encryption-C9auXcSV.mjs.map → encryption-CRyFk5nu.mjs.map} +1 -1
- package/dist/{encryption-vK64UP4M.cjs → encryption-CVIu104e.cjs} +4 -4
- package/dist/{encryption-vK64UP4M.cjs.map → encryption-CVIu104e.cjs.map} +1 -1
- package/dist/{engine-C3N2WhbC.mjs → engine-DZnZy1R5.mjs} +17 -12
- package/dist/engine-DZnZy1R5.mjs.map +1 -0
- package/dist/{engine-Icqv5JI6.cjs → engine-XecwdLdj.cjs} +17 -12
- package/dist/engine-XecwdLdj.cjs.map +1 -0
- package/dist/{github-D24wTOe2.mjs → github-CDJXpBCT.mjs} +9 -9
- package/dist/{github-D24wTOe2.mjs.map → github-CDJXpBCT.mjs.map} +1 -1
- package/dist/{github-DUuNInc0.cjs → github-dnxU_tMp.cjs} +9 -9
- package/dist/{github-DUuNInc0.cjs.map → github-dnxU_tMp.cjs.map} +1 -1
- package/dist/{googlePlay-Cy-MaYr2.mjs → googlePlay-BYeXKpNE.mjs} +5 -5
- package/dist/{googlePlay-Cy-MaYr2.mjs.map → googlePlay-BYeXKpNE.mjs.map} +1 -1
- package/dist/{googlePlay-BGDKlnPx.cjs → googlePlay-CnIU3qIV.cjs} +5 -5
- package/dist/{googlePlay-BGDKlnPx.cjs.map → googlePlay-CnIU3qIV.cjs.map} +1 -1
- package/dist/{index-C1jffZ5_.d.cts → index-B35vTdAW.d.cts} +2 -2
- package/dist/{index-BZZeEWug.d.mts.map → index-B35vTdAW.d.cts.map} +1 -1
- package/dist/{index-BZZeEWug.d.mts → index-Dv1Zj86i.d.mts} +2 -2
- package/dist/{index-C1jffZ5_.d.cts.map → index-Dv1Zj86i.d.mts.map} +1 -1
- package/dist/index.cjs +64 -63
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +64 -63
- package/dist/index.mjs.map +1 -1
- package/dist/{local-CdpBgn3d.mjs → local-BIOpCtLE.mjs} +2 -2
- package/dist/{local-CdpBgn3d.mjs.map → local-BIOpCtLE.mjs.map} +1 -1
- package/dist/{local-B4xobzh-.cjs → local-qdNfjzxQ.cjs} +2 -2
- package/dist/{local-B4xobzh-.cjs.map → local-qdNfjzxQ.cjs.map} +1 -1
- package/dist/{migrate-DhZfvCkJ.mjs → migrate--VNdTWT7.mjs} +6 -6
- package/dist/{migrate-DhZfvCkJ.mjs.map → migrate--VNdTWT7.mjs.map} +1 -1
- package/dist/{migrate-DwQ-zaMy.cjs → migrate-CDEHWq-e.cjs} +6 -6
- package/dist/{migrate-DwQ-zaMy.cjs.map → migrate-CDEHWq-e.cjs.map} +1 -1
- package/dist/{migrate--hMBtpx-.cjs → migrate-CkHtNdre.cjs} +4 -4
- package/dist/{migrate--hMBtpx-.cjs.map → migrate-CkHtNdre.cjs.map} +1 -1
- package/dist/{migrate-DVrXTq58.mjs → migrate-svXhccrs.mjs} +4 -4
- package/dist/{migrate-DVrXTq58.mjs.map → migrate-svXhccrs.mjs.map} +1 -1
- package/dist/{notes-z5OOMqm4.mjs → notes-D9ofENLJ.mjs} +4 -4
- package/dist/{notes-z5OOMqm4.mjs.map → notes-D9ofENLJ.mjs.map} +1 -1
- package/dist/{notes-C2b5RzGl.cjs → notes-DBNPml4N.cjs} +4 -4
- package/dist/{notes-C2b5RzGl.cjs.map → notes-DBNPml4N.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/{projectBucket-Dk_aZ1cD.cjs → projectBucket-BtiC0Cn8.cjs} +2 -2
- package/dist/{projectBucket-Dk_aZ1cD.cjs.map → projectBucket-BtiC0Cn8.cjs.map} +1 -1
- package/dist/{projectBucket-DPD0_B8N.mjs → projectBucket-De0MQeNj.mjs} +2 -2
- package/dist/{projectBucket-DPD0_B8N.mjs.map → projectBucket-De0MQeNj.mjs.map} +1 -1
- package/dist/{publish-CDvh-9OG.cjs → publish-CohTrVKe.cjs} +2 -2
- package/dist/{publish-CDvh-9OG.cjs.map → publish-CohTrVKe.cjs.map} +1 -1
- package/dist/{publish-Bmc1Wfs3.mjs → publish-k38S418e.mjs} +2 -2
- package/dist/{publish-Bmc1Wfs3.mjs.map → publish-k38S418e.mjs.map} +1 -1
- package/dist/reconcile/public.d.cts +1 -1
- package/dist/reconcile/public.d.mts +1 -1
- package/dist/{resolve-CuxPZ3ga.cjs → resolve-Cr3Qj8ch.cjs} +4 -4
- package/dist/{resolve-CuxPZ3ga.cjs.map → resolve-Cr3Qj8ch.cjs.map} +1 -1
- package/dist/{resolve-DHARlMdl.mjs → resolve-YMxlYJtO.mjs} +4 -4
- package/dist/{resolve-DHARlMdl.mjs.map → resolve-YMxlYJtO.mjs.map} +1 -1
- package/dist/{rollback-DZq_dIbl.mjs → rollback-DIoyVrQI.mjs} +7 -7
- package/dist/{rollback-DZq_dIbl.mjs.map → rollback-DIoyVrQI.mjs.map} +1 -1
- package/dist/{rollback-DxHut8C-.cjs → rollback-eyqvtzW_.cjs} +7 -7
- package/dist/{rollback-DxHut8C-.cjs.map → rollback-eyqvtzW_.cjs.map} +1 -1
- package/dist/{runtime-Bvgyxm88.d.cts → runtime-CFvcLEJW.d.cts} +2 -2
- package/dist/{runtime-Bvgyxm88.d.cts.map → runtime-CFvcLEJW.d.cts.map} +1 -1
- package/dist/{runtime-CeAt1IJd.d.mts → runtime-dwsH6ddo.d.mts} +2 -2
- package/dist/{runtime-CeAt1IJd.d.mts.map → runtime-dwsH6ddo.d.mts.map} +1 -1
- package/dist/{s3-Dhy58V_y.cjs → s3-CegRM8Sa.cjs} +3 -3
- package/dist/{s3-Dhy58V_y.cjs.map → s3-CegRM8Sa.cjs.map} +1 -1
- package/dist/{s3-Cd7UK2y8.mjs → s3-Cl3tRemt.mjs} +3 -3
- package/dist/{s3-Cd7UK2y8.mjs.map → s3-Cl3tRemt.mjs.map} +1 -1
- package/dist/{serverSetup-DYiKHMVp.cjs → serverSetup-BwfMgz3W.cjs} +7 -7
- package/dist/{serverSetup-DYiKHMVp.cjs.map → serverSetup-BwfMgz3W.cjs.map} +1 -1
- package/dist/{serverSetup-qe5bdBhO.mjs → serverSetup-fQwkJ_EI.mjs} +7 -7
- package/dist/{serverSetup-qe5bdBhO.mjs.map → serverSetup-fQwkJ_EI.mjs.map} +1 -1
- package/dist/{sniffer-DFix2ORf.cjs → sniffer-BgdVvvzU.cjs} +7 -7
- package/dist/{sniffer-DFix2ORf.cjs.map → sniffer-BgdVvvzU.cjs.map} +1 -1
- package/dist/{sniffer-BNcLP8MO.mjs → sniffer-FF7mfuR8.mjs} +7 -7
- package/dist/{sniffer-BNcLP8MO.mjs.map → sniffer-FF7mfuR8.mjs.map} +1 -1
- package/dist/{snsSubscriptions-BwX28_Kl.mjs → snsSubscriptions-B_WH4o1S.mjs} +3 -3
- package/dist/{snsSubscriptions-BwX28_Kl.mjs.map → snsSubscriptions-B_WH4o1S.mjs.map} +1 -1
- package/dist/{snsSubscriptions-Dr-gJWtR.cjs → snsSubscriptions-DUY-Tu6J.cjs} +3 -3
- package/dist/{snsSubscriptions-Dr-gJWtR.cjs.map → snsSubscriptions-DUY-Tu6J.cjs.map} +1 -1
- package/dist/{sst-CoKFPW7f.cjs → sst-BEXeTgDQ.cjs} +5 -5
- package/dist/{sst-CoKFPW7f.cjs.map → sst-BEXeTgDQ.cjs.map} +1 -1
- package/dist/{sst-Bvtx6uZ9.mjs → sst-BkTtncop.mjs} +5 -5
- package/dist/{sst-Bvtx6uZ9.mjs.map → sst-BkTtncop.mjs.map} +1 -1
- package/dist/{stack-DbaKGKnI.cjs → stack-CcFgY4sJ.cjs} +29 -27
- package/dist/stack-CcFgY4sJ.cjs.map +1 -0
- package/dist/{stack-BeSbt_7k.mjs → stack-CqfBL5LA.mjs} +29 -27
- package/dist/stack-CqfBL5LA.mjs.map +1 -0
- package/dist/{stage-BblkSR2C.mjs → stage-4ZtteXz8.mjs} +7 -7
- package/dist/{stage-BblkSR2C.mjs.map → stage-4ZtteXz8.mjs.map} +1 -1
- package/dist/{stage-DI5mzoAi.cjs → stage-C19XRx7W.cjs} +7 -7
- package/dist/{stage-DI5mzoAi.cjs.map → stage-C19XRx7W.cjs.map} +1 -1
- package/dist/{stages-C-bVwvJZ.cjs → stages-Bs1THSy7.cjs} +3 -3
- package/dist/{stages-C-bVwvJZ.cjs.map → stages-Bs1THSy7.cjs.map} +1 -1
- package/dist/{stages-DBsDvEbo.mjs → stages-_xCG4Ymu.mjs} +3 -3
- package/dist/{stages-DBsDvEbo.mjs.map → stages-_xCG4Ymu.mjs.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-Bxy_A8iP.cjs → terminal-BkyVVOb-.cjs} +2 -2
- package/dist/{terminal-Bxy_A8iP.cjs.map → terminal-BkyVVOb-.cjs.map} +1 -1
- package/dist/{terminal-DDqusYW0.mjs → terminal-KVX_MmCR.mjs} +2 -2
- package/dist/{terminal-DDqusYW0.mjs.map → terminal-KVX_MmCR.mjs.map} +1 -1
- package/dist/{types-Dy1eV7yc.d.cts → types-Dk--xVOT.d.cts} +31 -11
- package/dist/{types-Dy1eV7yc.d.cts.map → types-Dk--xVOT.d.cts.map} +1 -1
- package/dist/{types-C6hDCkV2.d.mts → types-DwQYpd_0.d.mts} +31 -11
- package/dist/{types-C6hDCkV2.d.mts.map → types-DwQYpd_0.d.mts.map} +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-BbbkJDUU.cjs → workspace-1szcahj9.cjs} +19 -27
- package/dist/workspace-1szcahj9.cjs.map +1 -0
- package/dist/{workspace-CZGJdcTs.mjs → workspace-DFGsrjGD.mjs} +19 -27
- package/dist/workspace-DFGsrjGD.mjs.map +1 -0
- package/package.json +15 -15
- package/dist/apps-DHi6E_yH.cjs.map +0 -1
- package/dist/apps-DWALM-8s.mjs.map +0 -1
- package/dist/compose-BeQ01iYk.cjs.map +0 -1
- package/dist/compose-DxmEMeTu.mjs.map +0 -1
- package/dist/engine-C3N2WhbC.mjs.map +0 -1
- package/dist/engine-Icqv5JI6.cjs.map +0 -1
- package/dist/stack-BeSbt_7k.mjs.map +0 -1
- package/dist/stack-DbaKGKnI.cjs.map +0 -1
- package/dist/workspace-BbbkJDUU.cjs.map +0 -1
- package/dist/workspace-CZGJdcTs.mjs.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
2
2
|
import { t as GkmError } from "./errors-D8Gwp5kU.mjs";
|
|
3
|
-
import { B as toEmbeddableSecrets, L as initStageSecrets, a as findRootDomain, dt as run, ft as runOutput, m as createComposeState, o as normalizeDnsConfig, rt as imageRef, v as recordRelease } from "./credentials-
|
|
4
|
-
import { L as resolveStageTelemetry, ct as ComposeTlsFileMissing, gt as SERVER_IPV4_KEY, yt as isReservedStageKey } from "./workspace-
|
|
5
|
-
import { D as pinImages, M as backupsRoleStatements, S as traefikStaticFile, T as assertImagesExist, _ as EDGE_NETWORK, a as composeProject, d as stackDir, g as EDGE_DYNAMIC_DIR, h as EDGE_CERTS_DIR, i as LOOPBACK_SERVICES, k as BACKUPS_SERVICE, l as envFile, m as EDGE_AWS_CREDENTIALS, n as LOGS_PORT_ENV, o as composeStack, p as withCaddyConfigs, r as LOG_ROTATION, t as EDGE_PORT_ENV, u as replicaNames, v as EDGE_PROJECT, w as RegistryRequired, x as edgeComposeFile, y as EDGE_SERVICE } from "./stack-
|
|
3
|
+
import { B as toEmbeddableSecrets, L as initStageSecrets, a as findRootDomain, dt as run, ft as runOutput, m as createComposeState, o as normalizeDnsConfig, rt as imageRef, v as recordRelease } from "./credentials-CJ_z0Nni.mjs";
|
|
4
|
+
import { L as resolveStageTelemetry, ct as ComposeTlsFileMissing, gt as SERVER_IPV4_KEY, yt as isReservedStageKey } from "./workspace-DFGsrjGD.mjs";
|
|
5
|
+
import { D as pinImages, M as backupsRoleStatements, S as traefikStaticFile, T as assertImagesExist, _ as EDGE_NETWORK, a as composeProject, d as stackDir, g as EDGE_DYNAMIC_DIR, h as EDGE_CERTS_DIR, i as LOOPBACK_SERVICES, k as BACKUPS_SERVICE, l as envFile, m as EDGE_AWS_CREDENTIALS, n as LOGS_PORT_ENV, o as composeStack, p as withCaddyConfigs, r as LOG_ROTATION, t as EDGE_PORT_ENV, u as replicaNames, v as EDGE_PROJECT, w as RegistryRequired, x as edgeComposeFile, y as EDGE_SERVICE } from "./stack-CqfBL5LA.mjs";
|
|
6
6
|
import { t as defineTarget } from "./define-6poNqm5O.mjs";
|
|
7
|
-
import { C as runsRedis, J as logsAccess, Q as withLogsPassword, T as withRedisPassword, U as primaryPortKey, b as REDIS_SERVICE, m as loadLocalCredentials, q as LOGS_SERVICE, y as withGeneratedSecrets } from "./compose-
|
|
8
|
-
import { A as findBuildRoot,
|
|
7
|
+
import { C as runsRedis, J as logsAccess, Q as withLogsPassword, T as withRedisPassword, U as primaryPortKey, b as REDIS_SERVICE, m as loadLocalCredentials, q as LOGS_SERVICE, y as withGeneratedSecrets } from "./compose-C7izI7Eo.mjs";
|
|
8
|
+
import { $ as applyPolicies, A as findBuildRoot, Q as applyNotifications, S as readLocalAuthority, T as imageLayout, X as applyBuckets, Z as applyLifecycles, _ as pgClient, a as workerEnvKeys, c as constructGlobs, et as applyPostgres, g as bucketClient, h as ensurePostgresLogin, it as postgresStatements, lt as stageEnv, m as LEGACY_LOCAL_LOGIN, s as backendsOf, st as envFor, t as appEnvKeys, v as ensureLocalAuthority, x as localCertificateNames, y as ensureLocalCertificate, yt as usesTelemetry } from "./apps-DFzUuJ22.mjs";
|
|
9
9
|
import { i as discover } from "./discover-DbDrCQ8h.mjs";
|
|
10
|
-
import { a as ensureDockerignore } from "./docker-
|
|
11
|
-
import { a as subscriptionKey, c as HostNotPointingAtServer, f as requiredServerAddress, g as stageDns, h as stackHosts, i as recordedPushSubscriptions, n as SUBSCRIPTION_TYPE, o as subscriptionResource, p as serverAddressHint, r as confirmPendingSubscriptions, s as topicConnection, t as PushSubscriptionsUnconfirmed, u as isLocalHost, v as systemLookup } from "./snsSubscriptions-
|
|
10
|
+
import { a as ensureDockerignore } from "./docker-_W_CauBY.mjs";
|
|
11
|
+
import { a as subscriptionKey, c as HostNotPointingAtServer, f as requiredServerAddress, g as stageDns, h as stackHosts, i as recordedPushSubscriptions, n as SUBSCRIPTION_TYPE, o as subscriptionResource, p as serverAddressHint, r as confirmPendingSubscriptions, s as topicConnection, t as PushSubscriptionsUnconfirmed, u as isLocalHost, v as systemLookup } from "./snsSubscriptions-B_WH4o1S.mjs";
|
|
12
12
|
import { i as installedFrom } from "./drivers-uxLBq3e3.mjs";
|
|
13
13
|
import { a as dnsResources, c as currentActor, d as DeployJournal, n as reportDatabaseRuns, o as forgetDnsResource, r as reportPlannedSeeds, s as recordDnsChanges, t as DeploySeedsFailed } from "./seeds-BCC8vAXR.mjs";
|
|
14
14
|
import { f as plannedSeeds, o as SeedFailed, p as seedDatabases, u as migrateDatabases } from "./databases-mzSUFBTw.mjs";
|
|
@@ -21,7 +21,8 @@ import { createConnection, createServer } from "node:net";
|
|
|
21
21
|
import { createHash } from "node:crypto";
|
|
22
22
|
import { provideKey } from "@geekmidas/manifest";
|
|
23
23
|
import { stringify } from "yaml";
|
|
24
|
-
import { request } from "node:
|
|
24
|
+
import { request } from "node:http";
|
|
25
|
+
import { request as request$1 } from "node:https";
|
|
25
26
|
//#region src/compose/docker.ts
|
|
26
27
|
/**
|
|
27
28
|
* The Docker operations `gkm compose` needs, behind an interface.
|
|
@@ -790,15 +791,16 @@ function certificatePaths(project) {
|
|
|
790
791
|
/**
|
|
791
792
|
* Register a stack with the edge: its certificate first, where it has one,
|
|
792
793
|
* so the routes that need it never load without it — then its routes, in one
|
|
793
|
-
* rename the edge picks up whole. The certificate
|
|
794
|
-
*
|
|
794
|
+
* rename the edge picks up whole. The certificate — the stage's own, or the
|
|
795
|
+
* one gkm's local CA issued the local stage — is PEM read on this machine and
|
|
796
|
+
* written through the engine. The paths written, inside the edge.
|
|
795
797
|
*/
|
|
796
798
|
async function writeEdgeRoutes(docker, edge, project, routes, certificate) {
|
|
797
799
|
const written = [];
|
|
798
800
|
const [crt, key] = certificatePaths(project);
|
|
799
801
|
if (certificate) {
|
|
800
|
-
await put(docker, edge, crt,
|
|
801
|
-
await put(docker, edge, key,
|
|
802
|
+
await put(docker, edge, crt, certificate.cert);
|
|
803
|
+
await put(docker, edge, key, certificate.key, "600");
|
|
802
804
|
written.push(crt, key);
|
|
803
805
|
} else await remove(docker, edge, [crt, key]);
|
|
804
806
|
await put(docker, edge, routesPath(project), routes);
|
|
@@ -1044,26 +1046,67 @@ var HealthRequestTimedOut = class extends GkmError {
|
|
|
1044
1046
|
this.name = "HealthRequestTimedOut";
|
|
1045
1047
|
}
|
|
1046
1048
|
};
|
|
1047
|
-
/** The
|
|
1048
|
-
const
|
|
1049
|
+
/** The most of a body read — a sitemap may be 50 MB, and none needs to be. */
|
|
1050
|
+
const EDGE_BODY_LIMIT = 10485760;
|
|
1051
|
+
/** A body larger than {@link EDGE_BODY_LIMIT}. */
|
|
1052
|
+
var EdgeResponseTooLarge = class extends GkmError {
|
|
1053
|
+
url;
|
|
1054
|
+
limit;
|
|
1055
|
+
constructor(url, limit) {
|
|
1056
|
+
super(`${url} answered with more than ${limit} bytes, which is more than gkm reads. Split it — a sitemap index can list several sitemaps.`);
|
|
1057
|
+
this.url = url;
|
|
1058
|
+
this.limit = limit;
|
|
1059
|
+
this.name = "EdgeResponseTooLarge";
|
|
1060
|
+
}
|
|
1061
|
+
};
|
|
1062
|
+
/**
|
|
1063
|
+
* The real request: one GET to the edge — over HTTPS, the certificate
|
|
1064
|
+
* verified, for an `https:` URL, and plain HTTP for an `http:` one — with
|
|
1065
|
+
* the URL's host as SNI and `Host` wherever it connects.
|
|
1066
|
+
*/
|
|
1067
|
+
const edgeFetch = ({ url, ca, connectTo, connectPort, authorization, timeoutMs, signal, read }) => {
|
|
1049
1068
|
const target = new URL(url);
|
|
1069
|
+
const secure = target.protocol === "https:";
|
|
1070
|
+
const request$2 = secure ? request$1 : request;
|
|
1050
1071
|
return new Promise((resolve, reject) => {
|
|
1051
|
-
const req = request({
|
|
1072
|
+
const req = request$2({
|
|
1052
1073
|
host: connectTo ?? target.hostname,
|
|
1053
|
-
port: connectPort ?? (target.port || 443),
|
|
1054
|
-
servername: target.hostname,
|
|
1074
|
+
port: connectPort ?? (target.port || (secure ? 443 : 80)),
|
|
1075
|
+
...secure ? { servername: target.hostname } : {},
|
|
1055
1076
|
path: `${target.pathname}${target.search}`,
|
|
1056
1077
|
method: "GET",
|
|
1057
1078
|
headers: {
|
|
1058
1079
|
host: target.host,
|
|
1059
1080
|
...authorization ? { authorization } : {}
|
|
1060
1081
|
},
|
|
1061
|
-
...ca ? { ca } : {},
|
|
1082
|
+
...secure && ca ? { ca } : {},
|
|
1062
1083
|
...signal ? { signal } : {},
|
|
1063
1084
|
timeout: timeoutMs
|
|
1064
1085
|
}, (res) => {
|
|
1065
|
-
res.
|
|
1066
|
-
|
|
1086
|
+
const status = res.statusCode ?? 0;
|
|
1087
|
+
if (!read) {
|
|
1088
|
+
res.resume();
|
|
1089
|
+
res.on("end", () => resolve({
|
|
1090
|
+
status,
|
|
1091
|
+
body: ""
|
|
1092
|
+
}));
|
|
1093
|
+
res.on("error", reject);
|
|
1094
|
+
return;
|
|
1095
|
+
}
|
|
1096
|
+
const chunks = [];
|
|
1097
|
+
let size = 0;
|
|
1098
|
+
res.on("data", (chunk) => {
|
|
1099
|
+
size += chunk.length;
|
|
1100
|
+
if (size > 10485760) {
|
|
1101
|
+
req.destroy(new EdgeResponseTooLarge(url, EDGE_BODY_LIMIT));
|
|
1102
|
+
return;
|
|
1103
|
+
}
|
|
1104
|
+
chunks.push(chunk);
|
|
1105
|
+
});
|
|
1106
|
+
res.on("end", () => resolve({
|
|
1107
|
+
status,
|
|
1108
|
+
body: Buffer.concat(chunks).toString("utf-8")
|
|
1109
|
+
}));
|
|
1067
1110
|
res.on("error", reject);
|
|
1068
1111
|
});
|
|
1069
1112
|
req.on("timeout", () => req.destroy(new HealthRequestTimedOut(url, timeoutMs)));
|
|
@@ -1071,6 +1114,8 @@ const httpsProbe = ({ url, ca, connectTo, connectPort, authorization, timeoutMs,
|
|
|
1071
1114
|
req.end();
|
|
1072
1115
|
});
|
|
1073
1116
|
};
|
|
1117
|
+
/** The real probe: one GET through the edge, answered by its status. */
|
|
1118
|
+
const httpsProbe = (request) => edgeFetch(request).then(({ status }) => status);
|
|
1074
1119
|
/** Whether a status means the app answered as it should. */
|
|
1075
1120
|
function isHealthy(status) {
|
|
1076
1121
|
return status >= 200 && status < 400;
|
|
@@ -1212,6 +1257,138 @@ async function ensureTopicSubscriptions(input) {
|
|
|
1212
1257
|
}
|
|
1213
1258
|
return arns;
|
|
1214
1259
|
}
|
|
1260
|
+
/**
|
|
1261
|
+
* How long one page has to answer: a first render fetches from the site's
|
|
1262
|
+
* APIs, so it is given longer than a health check is.
|
|
1263
|
+
*/
|
|
1264
|
+
const WARMUP_TIMEOUT_MS = 3e4;
|
|
1265
|
+
/**
|
|
1266
|
+
* Asks the site for `/`, then for every page its `/sitemap.xml` lists — a
|
|
1267
|
+
* sitemap index's sitemaps followed one level — up to `maxUrls` pages in
|
|
1268
|
+
* all, `concurrency` at a time. Only pages on the site's own origin are
|
|
1269
|
+
* asked: a sitemap may list another's, which this deploy did not start.
|
|
1270
|
+
*/
|
|
1271
|
+
async function warmSite(options) {
|
|
1272
|
+
const { fetch, edge = {}, maxUrls = 500, concurrency = 4, timeoutMs = WARMUP_TIMEOUT_MS } = options;
|
|
1273
|
+
const origin = new URL(options.url).origin;
|
|
1274
|
+
const result = {
|
|
1275
|
+
warmed: [],
|
|
1276
|
+
warnings: [],
|
|
1277
|
+
leftOut: 0
|
|
1278
|
+
};
|
|
1279
|
+
/** One GET; a failure is a warning, and `undefined`. */
|
|
1280
|
+
const get = async (url, read) => {
|
|
1281
|
+
try {
|
|
1282
|
+
return await fetch({
|
|
1283
|
+
url,
|
|
1284
|
+
...edge,
|
|
1285
|
+
timeoutMs,
|
|
1286
|
+
read
|
|
1287
|
+
});
|
|
1288
|
+
} catch (error) {
|
|
1289
|
+
if (edge.signal?.aborted) throw error;
|
|
1290
|
+
result.warnings.push({
|
|
1291
|
+
url,
|
|
1292
|
+
reason: error instanceof HealthRequestTimedOut ? `no answer within ${error.timeoutMs}ms` : error instanceof Error ? error.message : String(error)
|
|
1293
|
+
});
|
|
1294
|
+
return;
|
|
1295
|
+
}
|
|
1296
|
+
};
|
|
1297
|
+
const warm = async (url) => {
|
|
1298
|
+
const response = await get(url, false);
|
|
1299
|
+
if (!response) return;
|
|
1300
|
+
if (isHealthy(response.status)) result.warmed.push(url);
|
|
1301
|
+
else result.warnings.push({
|
|
1302
|
+
url,
|
|
1303
|
+
reason: `HTTP ${response.status}`
|
|
1304
|
+
});
|
|
1305
|
+
};
|
|
1306
|
+
/** A sitemap's `<loc>`s, or none where it has none — or did not answer. */
|
|
1307
|
+
const sitemap = async (url) => {
|
|
1308
|
+
const response = await get(url, true);
|
|
1309
|
+
if (!response) return void 0;
|
|
1310
|
+
if (response.status >= 400 && response.status < 500) return void 0;
|
|
1311
|
+
if (!isHealthy(response.status)) {
|
|
1312
|
+
result.warnings.push({
|
|
1313
|
+
url,
|
|
1314
|
+
reason: `HTTP ${response.status}`
|
|
1315
|
+
});
|
|
1316
|
+
return;
|
|
1317
|
+
}
|
|
1318
|
+
return readSitemap(response.body);
|
|
1319
|
+
};
|
|
1320
|
+
const root = `${origin}/`;
|
|
1321
|
+
await warm(root);
|
|
1322
|
+
const pages = /* @__PURE__ */ new Set([root]);
|
|
1323
|
+
const sameOrigin = (loc) => {
|
|
1324
|
+
if (!URL.canParse(loc, root)) return void 0;
|
|
1325
|
+
const url = new URL(loc, root);
|
|
1326
|
+
url.hash = "";
|
|
1327
|
+
return url.origin === origin ? url.href : void 0;
|
|
1328
|
+
};
|
|
1329
|
+
const list = (locs) => {
|
|
1330
|
+
for (const loc of locs) {
|
|
1331
|
+
const url = sameOrigin(loc);
|
|
1332
|
+
if (url) pages.add(url);
|
|
1333
|
+
}
|
|
1334
|
+
};
|
|
1335
|
+
const top = await sitemap(`${origin}/sitemap.xml`);
|
|
1336
|
+
if (top?.kind === "index") {
|
|
1337
|
+
const read = await pool([...new Set(top.locs.map(sameOrigin).filter((u) => u !== void 0))], concurrency, sitemap);
|
|
1338
|
+
for (const child of read) if (child?.kind === "urlset") list(child.locs);
|
|
1339
|
+
} else if (top) list(top.locs);
|
|
1340
|
+
const listed = [...pages].slice(1);
|
|
1341
|
+
const room = Math.max(0, maxUrls - 1);
|
|
1342
|
+
result.leftOut = Math.max(0, listed.length - room);
|
|
1343
|
+
await pool(listed.slice(0, room), concurrency, warm);
|
|
1344
|
+
return result;
|
|
1345
|
+
}
|
|
1346
|
+
/**
|
|
1347
|
+
* Reads a sitemap (sitemaps.org): each entry's `<loc>`, entity-decoded or
|
|
1348
|
+
* from CDATA. Only an unprefixed `<loc>` is an entry's — an `<image:loc>` is
|
|
1349
|
+
* an image on a page, not a page.
|
|
1350
|
+
*/
|
|
1351
|
+
function readSitemap(xml) {
|
|
1352
|
+
const kind = /<(?:[\w-]+:)?sitemapindex[\s>]/.test(xml) ? "index" : "urlset";
|
|
1353
|
+
const locs = [];
|
|
1354
|
+
for (const match of xml.matchAll(/<loc>\s*(?:<!\[CDATA\[([\s\S]*?)\]\]>|([\s\S]*?))\s*<\/loc>/g)) {
|
|
1355
|
+
const loc = match[1] ?? decodeEntities(match[2] ?? "");
|
|
1356
|
+
if (loc.trim()) locs.push(loc.trim());
|
|
1357
|
+
}
|
|
1358
|
+
return {
|
|
1359
|
+
kind,
|
|
1360
|
+
locs
|
|
1361
|
+
};
|
|
1362
|
+
}
|
|
1363
|
+
const ENTITIES = {
|
|
1364
|
+
amp: "&",
|
|
1365
|
+
lt: "<",
|
|
1366
|
+
gt: ">",
|
|
1367
|
+
quot: "\"",
|
|
1368
|
+
apos: "'"
|
|
1369
|
+
};
|
|
1370
|
+
function decodeEntities(text) {
|
|
1371
|
+
return text.replace(/&(#x[\da-f]+|#\d+|amp|lt|gt|quot|apos);/gi, (whole, entity) => {
|
|
1372
|
+
if (entity[0] === "#") {
|
|
1373
|
+
const code = entity[1] === "x" || entity[1] === "X" ? Number.parseInt(entity.slice(2), 16) : Number.parseInt(entity.slice(1), 10);
|
|
1374
|
+
return Number.isFinite(code) ? String.fromCodePoint(code) : whole;
|
|
1375
|
+
}
|
|
1376
|
+
return ENTITIES[entity.toLowerCase()] ?? whole;
|
|
1377
|
+
});
|
|
1378
|
+
}
|
|
1379
|
+
/** Each item through `run`, at most `size` at once, results in order. */
|
|
1380
|
+
async function pool(items, size, run) {
|
|
1381
|
+
const results = new Array(items.length);
|
|
1382
|
+
let next = 0;
|
|
1383
|
+
const worker = async () => {
|
|
1384
|
+
while (next < items.length) {
|
|
1385
|
+
const index = next++;
|
|
1386
|
+
results[index] = await run(items[index]);
|
|
1387
|
+
}
|
|
1388
|
+
};
|
|
1389
|
+
await Promise.all(Array.from({ length: Math.min(size, items.length) }, worker));
|
|
1390
|
+
return results;
|
|
1391
|
+
}
|
|
1215
1392
|
//#endregion
|
|
1216
1393
|
//#region src/target/compose/phases.ts
|
|
1217
1394
|
/**
|
|
@@ -1235,7 +1412,8 @@ async function ensureTopicSubscriptions(input) {
|
|
|
1235
1412
|
* was released under and the digest it resolved to are written to the
|
|
1236
1413
|
* stage's state, so "what is this stage running" has an exact answer.
|
|
1237
1414
|
* - What was started answers (`verify`): each app is asked through Caddy,
|
|
1238
|
-
* over HTTPS, with the certificate verified.
|
|
1415
|
+
* over HTTPS, with the certificate verified. Then each server-rendered site
|
|
1416
|
+
* is warmed (`warmup.ts`): a page that fails to warm is said, never failed.
|
|
1239
1417
|
*
|
|
1240
1418
|
* Every image is built inside Docker from a pruned slice of the build root —
|
|
1241
1419
|
* the same Dockerfiles `gkm docker` writes — so nothing is built on this
|
|
@@ -1332,6 +1510,7 @@ const defaultDeps = {
|
|
|
1332
1510
|
migrate: migrateDatabases,
|
|
1333
1511
|
seed: seedDatabases,
|
|
1334
1512
|
probe: httpsProbe,
|
|
1513
|
+
fetch: edgeFetch,
|
|
1335
1514
|
healthAttempts: 90,
|
|
1336
1515
|
healthIntervalMs: 2e3,
|
|
1337
1516
|
env: process.env,
|
|
@@ -1475,7 +1654,12 @@ async function validateCompose(ctx, deps, options = {}) {
|
|
|
1475
1654
|
async function readyCompose(ctx, run, deps) {
|
|
1476
1655
|
const { stack } = run;
|
|
1477
1656
|
if (stack.tls) {
|
|
1478
|
-
|
|
1657
|
+
const { certFile, keyFile, caFile } = stack.tls;
|
|
1658
|
+
for (const file of [
|
|
1659
|
+
certFile,
|
|
1660
|
+
keyFile,
|
|
1661
|
+
...caFile ? [caFile] : []
|
|
1662
|
+
]) if (!existsSync(file)) throw new ComposeTlsFileMissing(ctx.stage, file);
|
|
1479
1663
|
}
|
|
1480
1664
|
if (stack.local) return;
|
|
1481
1665
|
if (run.server && !ctx.dryRun && !run.push) await deps.server.check(run.server);
|
|
@@ -2022,9 +2206,9 @@ async function releaseCompose(ctx, run, deps) {
|
|
|
2022
2206
|
...ref.output ? { output: ref.output } : {}
|
|
2023
2207
|
});
|
|
2024
2208
|
if (stack.proxy === "traefik" && stack.traefik) {
|
|
2025
|
-
const written = await writeEdgeRoutes(deps.docker, edge, stack.project, stack.traefik, stack
|
|
2209
|
+
const written = await writeEdgeRoutes(deps.docker, edge, stack.project, stack.traefik, await edgeCertificate(run.dir, stack));
|
|
2026
2210
|
ctx.logger.info(`🌐 Registered ${stack.routes.length} route(s) with ${EDGE_PROJECT}: ${written.at(-1)}`);
|
|
2027
|
-
} else if (!stack.local) await removeEdgeRoutes(deps.docker, edge, stack.project);
|
|
2211
|
+
} else if (!stack.local || existsSync(edgeFile(run))) await removeEdgeRoutes(deps.docker, edge, stack.project);
|
|
2028
2212
|
ctx.logger.info("\n🚀 Starting the stack…");
|
|
2029
2213
|
const down = await deps.docker.up(ref).then(() => [], (error) => unhealthyAfterUp(ctx, run, deps, error));
|
|
2030
2214
|
const isDown = new Set(down.map(({ app }) => app));
|
|
@@ -2072,6 +2256,7 @@ async function releaseCompose(ctx, run, deps) {
|
|
|
2072
2256
|
ctx.logger.info(` ${unit.name.padEnd(12)} processors of ${unit.id}`);
|
|
2073
2257
|
}
|
|
2074
2258
|
if (stack.authority) ctx.logger.info(`\n🔐 Certificates are from gkm's local CA ("gkm trust" trusts it here): NODE_EXTRA_CA_CERTS=${stack.authority.certFile}`);
|
|
2259
|
+
else if (stack.local && stack.tls) ctx.logger.info(stack.tls.caFile ? `\n🔐 Certificates are the stage's own (deploy.compose.tls), from the CA in ${stack.tls.caFile}: NODE_EXTRA_CA_CERTS=${stack.tls.caFile}` : `\n🔐 Certificates are the stage's own (deploy.compose.tls): ${stack.tls.certFile}. Set its caFile to the root it chains to, so gkm and the stack's containers trust it.`);
|
|
2075
2260
|
if (down.length > 0) throw new ComposeAppsUnhealthy(stack.project, down, stack.proxy, "docker");
|
|
2076
2261
|
}
|
|
2077
2262
|
/**
|
|
@@ -2140,7 +2325,7 @@ async function recordImages(ctx, run) {
|
|
|
2140
2325
|
async function verifyCompose(ctx, run, deps) {
|
|
2141
2326
|
const { stack } = run;
|
|
2142
2327
|
if (run.push) return;
|
|
2143
|
-
const ca =
|
|
2328
|
+
const ca = await verifyAuthority(stack);
|
|
2144
2329
|
ctx.logger.info(`\n🩺 Checking each app through ${stack.proxy === "caddy" ? "Caddy" : "the shared edge"}…`);
|
|
2145
2330
|
const edge = stack.local ? { connectTo: "127.0.0.1" } : run.server ? {
|
|
2146
2331
|
connectTo: run.server.host,
|
|
@@ -2160,9 +2345,57 @@ async function verifyCompose(ctx, run, deps) {
|
|
|
2160
2345
|
if (down.length > 0) throw new ComposeAppsUnhealthy(stack.project, down, stack.proxy);
|
|
2161
2346
|
await pruneStageDns(ctx, run);
|
|
2162
2347
|
await confirmSubscriptions(ctx, run, deps);
|
|
2348
|
+
await warmSites(ctx, run, deps, {
|
|
2349
|
+
ca,
|
|
2350
|
+
edge
|
|
2351
|
+
});
|
|
2163
2352
|
if (stack.logs) reportLogs(ctx, stack.logs, stack.local, run.server);
|
|
2164
2353
|
}
|
|
2165
2354
|
/**
|
|
2355
|
+
* Each server-rendered site (`next`, `tanstack`) asked for its `/` and every
|
|
2356
|
+
* page its sitemap lists, through the edge as `checkApp` asks it — see
|
|
2357
|
+
* `warmup.ts`. Its image was built with no API reachable, so each page
|
|
2358
|
+
* renders on its first request: this is that request, made before any
|
|
2359
|
+
* visitor's.
|
|
2360
|
+
*
|
|
2361
|
+
* Only ever said, never failed on: every app is already healthy, and a page
|
|
2362
|
+
* that did not warm renders on the next request for it.
|
|
2363
|
+
*/
|
|
2364
|
+
async function warmSites(ctx, run, deps, options) {
|
|
2365
|
+
const { stack } = run;
|
|
2366
|
+
const sites = stack.apps.filter((app) => app.kind === "site" && (app.variant === "next" || app.variant === "tanstack"));
|
|
2367
|
+
if (sites.length === 0) return;
|
|
2368
|
+
ctx.logger.info("\n🔥 Warming each server-rendered site…");
|
|
2369
|
+
for (const app of sites) {
|
|
2370
|
+
if (app.id === stack.wildcard?.site) {
|
|
2371
|
+
ctx.logger.info(` – ${app.name.padEnd(12)} serves every subdomain: there is no one host to warm, so it is skipped`);
|
|
2372
|
+
continue;
|
|
2373
|
+
}
|
|
2374
|
+
try {
|
|
2375
|
+
const { warmed, warnings, leftOut } = await warmSite({
|
|
2376
|
+
url: app.url,
|
|
2377
|
+
fetch: deps.fetch ?? edgeFetch,
|
|
2378
|
+
edge: {
|
|
2379
|
+
...options.ca ? { ca: options.ca } : {},
|
|
2380
|
+
...app.auth ? { authorization: basicAuthorization(app.auth) } : {},
|
|
2381
|
+
...options.edge,
|
|
2382
|
+
signal: ctx.signal
|
|
2383
|
+
}
|
|
2384
|
+
});
|
|
2385
|
+
const said = `warmed ${warmed.length} page(s)${warnings.length > 0 ? `, ${warnings.length} warning(s)` : ""}`;
|
|
2386
|
+
if (warnings.length === 0) ctx.logger.info(` ✓ ${app.name.padEnd(12)} ${said}`);
|
|
2387
|
+
else {
|
|
2388
|
+
ctx.logger.warn(` ⚠ ${app.name.padEnd(12)} ${said}:`);
|
|
2389
|
+
for (const { url, reason } of warnings) ctx.logger.warn(` ${url}: ${reason}`);
|
|
2390
|
+
}
|
|
2391
|
+
if (leftOut > 0) ctx.logger.info(` ${leftOut} more page(s) in its sitemap were not asked: at most 500 are warmed per site`);
|
|
2392
|
+
} catch (error) {
|
|
2393
|
+
if (ctx.signal.aborted) throw error;
|
|
2394
|
+
ctx.logger.warn(` ⚠ ${app.name.padEnd(12)} not warmed: ${error instanceof Error ? error.message : String(error)}`);
|
|
2395
|
+
}
|
|
2396
|
+
}
|
|
2397
|
+
}
|
|
2398
|
+
/**
|
|
2166
2399
|
* The SNS subscriptions the stage's providers made before the workers were
|
|
2167
2400
|
* up: each still pending is subscribed again, so SNS resends its
|
|
2168
2401
|
* confirmation to a worker now there to answer it, and waited on. One still
|
|
@@ -2354,6 +2587,28 @@ function applied(ctx, run, change) {
|
|
|
2354
2587
|
via
|
|
2355
2588
|
});
|
|
2356
2589
|
}
|
|
2590
|
+
/**
|
|
2591
|
+
* The root the check after a start trusts, PEM: gkm's on the local stage that
|
|
2592
|
+
* set no certificate of its own, and otherwise the one the stage's own names
|
|
2593
|
+
* (`deploy.compose.tls.<stage>.caFile`). Undefined — Node's own roots, and
|
|
2594
|
+
* `NODE_EXTRA_CA_CERTS` — for a certificate that names none: a public CA's.
|
|
2595
|
+
*/
|
|
2596
|
+
async function verifyAuthority(stack) {
|
|
2597
|
+
if (stack.authority) return (await readLocalAuthority(stack.authority)).cert;
|
|
2598
|
+
if (stack.tls?.caFile) return readFile(stack.tls.caFile, "utf-8");
|
|
2599
|
+
}
|
|
2600
|
+
/**
|
|
2601
|
+
* The certificate the stack's proxy serves, PEM: the stage's own where it set
|
|
2602
|
+
* one, the one gkm's local CA issued the local stage otherwise, and none — a
|
|
2603
|
+
* deployed stage's comes from Let's Encrypt — when neither.
|
|
2604
|
+
*/
|
|
2605
|
+
async function edgeCertificate(dir, stack) {
|
|
2606
|
+
if (stack.tls) return {
|
|
2607
|
+
cert: await readFile(stack.tls.certFile, "utf-8"),
|
|
2608
|
+
key: await readFile(stack.tls.keyFile, "utf-8")
|
|
2609
|
+
};
|
|
2610
|
+
if (stack.authority) return localEdgeCertificate(dir, stack, stack.authority);
|
|
2611
|
+
}
|
|
2357
2612
|
/** Where the local stage's edge certificate is kept, between runs. */
|
|
2358
2613
|
const LOCAL_EDGE_CERTIFICATE = "local-edge.pem";
|
|
2359
2614
|
/**
|
|
@@ -2382,10 +2637,8 @@ async function writeStack(root, dir, stack) {
|
|
|
2382
2637
|
await chmod(path, mode);
|
|
2383
2638
|
files.push(path);
|
|
2384
2639
|
};
|
|
2385
|
-
const
|
|
2386
|
-
|
|
2387
|
-
key: await readFile(stack.tls.keyFile, "utf-8")
|
|
2388
|
-
} : stack.authority ? await localEdgeCertificate(dir, stack, stack.authority) : void 0;
|
|
2640
|
+
const issued = await edgeCertificate(dir, stack);
|
|
2641
|
+
const tls = stack.proxy === "caddy" ? issued : void 0;
|
|
2389
2642
|
const compose = stack.caddyfile !== void 0 ? withCaddyConfigs(stack.compose, {
|
|
2390
2643
|
caddyfile: stack.caddyfile,
|
|
2391
2644
|
...tls ? { tls } : {}
|
|
@@ -2473,7 +2726,9 @@ function printPlan(ctx, run) {
|
|
|
2473
2726
|
* --remove-orphans`, and each app's image, tag and digest in the stage's
|
|
2474
2727
|
* state — an app that never turns healthy fails it only once the rest is
|
|
2475
2728
|
* released and routed
|
|
2476
|
-
* - `verify`: each app asked through Caddy over HTTPS
|
|
2729
|
+
* - `verify`: each app asked through Caddy over HTTPS, then each
|
|
2730
|
+
* server-rendered site warmed — its `/` and its sitemap's pages asked, a
|
|
2731
|
+
* failure only warned of
|
|
2477
2732
|
*
|
|
2478
2733
|
* With `push` (`gkm compose --build --push`), run with `buildOnly`, it builds
|
|
2479
2734
|
* every image and pushes it to `deploy.registry`, and does nothing else: no
|
|
@@ -2523,4 +2778,4 @@ function composeTarget(options = {}) {
|
|
|
2523
2778
|
//#endregion
|
|
2524
2779
|
export { edgePorts as a, edgeRef as c, dockerHost as d, sshAccess as f, projectNetwork as h, ComposePushNeedsBuild as i, removeEdgeRoutes as l, dockerCompose as m, compose_exports as n, stackOverrideFile as o, sshTarget as p, ComposePinNeedsPull as r, deployedStackSecrets as s, composeTarget as t, composeServer as u };
|
|
2525
2780
|
|
|
2526
|
-
//# sourceMappingURL=compose-
|
|
2781
|
+
//# sourceMappingURL=compose-CZU60dwb.mjs.map
|