@geekmidas/cli 10.0.0-alpha.146 → 10.0.0-alpha.148
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-BESq24p-.mjs → GoDaddyProvider-CGgS-I6m.mjs} +2 -2
- package/dist/{GoDaddyProvider-BESq24p-.mjs.map → GoDaddyProvider-CGgS-I6m.mjs.map} +1 -1
- package/dist/{GoDaddyProvider-BK5N6-fx.cjs → GoDaddyProvider-D_dZQJIX.cjs} +2 -2
- package/dist/{GoDaddyProvider-BK5N6-fx.cjs.map → GoDaddyProvider-D_dZQJIX.cjs.map} +1 -1
- package/dist/{HostingerProvider-BV30wTNI.mjs → HostingerProvider-CWRE6auw.mjs} +2 -2
- package/dist/{HostingerProvider-BV30wTNI.mjs.map → HostingerProvider-CWRE6auw.mjs.map} +1 -1
- package/dist/{HostingerProvider-BbQod5OB.cjs → HostingerProvider-eGuDBjfN.cjs} +2 -2
- package/dist/{HostingerProvider-BbQod5OB.cjs.map → HostingerProvider-eGuDBjfN.cjs.map} +1 -1
- package/dist/{LegacyStateStore-Ck3HI28A.mjs → LegacyStateStore-CLyFmPIj.mjs} +2 -2
- package/dist/{LegacyStateStore-Ck3HI28A.mjs.map → LegacyStateStore-CLyFmPIj.mjs.map} +1 -1
- package/dist/{LegacyStateStore-OEno6vIb.cjs → LegacyStateStore-DyX9-7R_.cjs} +2 -2
- package/dist/{LegacyStateStore-OEno6vIb.cjs.map → LegacyStateStore-DyX9-7R_.cjs.map} +1 -1
- package/dist/{LocalStateStore-ukDFg6GM.cjs → LocalStateStore-C-v8K8zO.cjs} +2 -2
- package/dist/{LocalStateStore-ukDFg6GM.cjs.map → LocalStateStore-C-v8K8zO.cjs.map} +1 -1
- package/dist/{LocalStateStore-Fa54CpLw.mjs → LocalStateStore-DQVwsyTh.mjs} +2 -2
- package/dist/{LocalStateStore-Fa54CpLw.mjs.map → LocalStateStore-DQVwsyTh.mjs.map} +1 -1
- package/dist/{S3StateStore-Cjuft2Lk.cjs → S3StateStore-GA-DOTmj.cjs} +4 -4
- package/dist/{S3StateStore-Cjuft2Lk.cjs.map → S3StateStore-GA-DOTmj.cjs.map} +1 -1
- package/dist/{S3StateStore-D53985SR.mjs → S3StateStore-gR_6fNF6.mjs} +4 -4
- package/dist/{S3StateStore-D53985SR.mjs.map → S3StateStore-gR_6fNF6.mjs.map} +1 -1
- package/dist/{SSMStateStore-CRjV2h2G.mjs → SSMStateStore-CT68N-Ti.mjs} +2 -2
- package/dist/{SSMStateStore-CRjV2h2G.mjs.map → SSMStateStore-CT68N-Ti.mjs.map} +1 -1
- package/dist/{SSMStateStore-CnJgw3_-.cjs → SSMStateStore-kdb9rf7x.cjs} +2 -2
- package/dist/{SSMStateStore-CnJgw3_-.cjs.map → SSMStateStore-kdb9rf7x.cjs.map} +1 -1
- package/dist/{add-CG_4mNir.cjs → add-C7_WJEv2.cjs} +7 -8
- package/dist/{add-CG_4mNir.cjs.map → add-C7_WJEv2.cjs.map} +1 -1
- package/dist/{add-D0-1UyFj.mjs → add-CvmRPEfW.mjs} +6 -7
- package/dist/{add-D0-1UyFj.mjs.map → add-CvmRPEfW.mjs.map} +1 -1
- package/dist/{apps-DHi6E_yH.cjs → apps-ClZkLcMz.cjs} +771 -17
- package/dist/apps-ClZkLcMz.cjs.map +1 -0
- package/dist/{apps-DWALM-8s.mjs → apps-CmKxFPTj.mjs} +611 -19
- package/dist/apps-CmKxFPTj.mjs.map +1 -0
- package/dist/{bundler-Cb5ynXXS.mjs → bundler-D6IEJvq4.mjs} +6 -6
- package/dist/{bundler-Cb5ynXXS.mjs.map → bundler-D6IEJvq4.mjs.map} +1 -1
- package/dist/{bundler-Co_7zpYC.cjs → bundler-Ronn7-mL.cjs} +6 -6
- package/dist/{bundler-Co_7zpYC.cjs.map → bundler-Ronn7-mL.cjs.map} +1 -1
- package/dist/{cli-D_9WqN6C.mjs → cli-AZVyGSRn.mjs} +4 -4
- package/dist/{cli-D_9WqN6C.mjs.map → cli-AZVyGSRn.mjs.map} +1 -1
- package/dist/{cli-C5M_7Kux.cjs → cli-B1g2OvS0.cjs} +4 -4
- package/dist/{cli-C5M_7Kux.cjs.map → cli-B1g2OvS0.cjs.map} +1 -1
- package/dist/{compose-BeQ01iYk.cjs → compose-B5AsRVqr.cjs} +291 -36
- package/dist/compose-B5AsRVqr.cjs.map +1 -0
- package/dist/{compose-DxmEMeTu.mjs → compose-BRNMF29g.mjs} +286 -31
- package/dist/compose-BRNMF29g.mjs.map +1 -0
- package/dist/{compose-7p0-3ogo.mjs → compose-DNuENvIt.mjs} +15 -9
- package/dist/{compose-7p0-3ogo.mjs.map → compose-DNuENvIt.mjs.map} +1 -1
- package/dist/{compose-C10hkeHU.cjs → compose-DVPWitEu.cjs} +32 -8
- package/dist/{compose-C10hkeHU.cjs.map → compose-DVPWitEu.cjs.map} +1 -1
- 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-Csnd7M8M.cjs → credentials-CrQglKgo.cjs} +6 -70
- package/dist/credentials-CrQglKgo.cjs.map +1 -0
- package/dist/{credentials-B5Oe4fLE.mjs → credentials-FRF4PZYo.mjs} +8 -42
- package/dist/credentials-FRF4PZYo.mjs.map +1 -0
- 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-6DDEG4Ai.mjs → deploy-DI_tg5Mi.mjs} +13 -13
- package/dist/{deploy-6DDEG4Ai.mjs.map → deploy-DI_tg5Mi.mjs.map} +1 -1
- package/dist/{deploy-BwNxJ3ZI.cjs → deploy-DTBod420.cjs} +31 -31
- package/dist/{deploy-BwNxJ3ZI.cjs.map → deploy-DTBod420.cjs.map} +1 -1
- package/dist/{docker-BZnNUJCy.cjs → docker-CnWX5QNR.cjs} +8 -8
- package/dist/{docker-BZnNUJCy.cjs.map → docker-CnWX5QNR.cjs.map} +1 -1
- package/dist/{docker-Ch5aPQ04.mjs → docker-DsJNWnaX.mjs} +5 -5
- package/dist/{docker-Ch5aPQ04.mjs.map → docker-DsJNWnaX.mjs.map} +1 -1
- package/dist/{dokploy-Cn7dQqmE.cjs → dokploy-CxttPnYP.cjs} +2 -2
- package/dist/{dokploy-Cn7dQqmE.cjs.map → dokploy-CxttPnYP.cjs.map} +1 -1
- package/dist/{dokploy-CTWw3WSo.mjs → dokploy-Dd2mXHgX.mjs} +2 -2
- package/dist/{dokploy-CTWw3WSo.mjs.map → dokploy-Dd2mXHgX.mjs.map} +1 -1
- package/dist/{eas-IPjz0PWK.cjs → eas-B-JskJLP.cjs} +3 -3
- package/dist/{eas-IPjz0PWK.cjs.map → eas-B-JskJLP.cjs.map} +1 -1
- package/dist/{eas-D0B8H7hT.mjs → eas-B_yjP_Sl.mjs} +3 -3
- package/dist/{eas-D0B8H7hT.mjs.map → eas-B_yjP_Sl.mjs.map} +1 -1
- package/dist/{encryption-C9auXcSV.mjs → encryption-dUnvnbu8.mjs} +4 -4
- package/dist/{encryption-C9auXcSV.mjs.map → encryption-dUnvnbu8.mjs.map} +1 -1
- package/dist/{encryption-vK64UP4M.cjs → encryption-yW6cWTsN.cjs} +4 -4
- package/dist/{encryption-vK64UP4M.cjs.map → encryption-yW6cWTsN.cjs.map} +1 -1
- package/dist/{engine-C3N2WhbC.mjs → engine-W1gbyy7T.mjs} +17 -12
- package/dist/engine-W1gbyy7T.mjs.map +1 -0
- package/dist/{engine-Icqv5JI6.cjs → engine-oBwumCI2.cjs} +21 -16
- package/dist/engine-oBwumCI2.cjs.map +1 -0
- package/dist/{github-D24wTOe2.mjs → github-D2-FIlNY.mjs} +8 -9
- package/dist/{github-D24wTOe2.mjs.map → github-D2-FIlNY.mjs.map} +1 -1
- package/dist/{github-DUuNInc0.cjs → github-DLucfS9E.cjs} +9 -10
- package/dist/{github-DUuNInc0.cjs.map → github-DLucfS9E.cjs.map} +1 -1
- package/dist/{googlePlay-BGDKlnPx.cjs → googlePlay-C91kIbBZ.cjs} +5 -5
- package/dist/{googlePlay-BGDKlnPx.cjs.map → googlePlay-C91kIbBZ.cjs.map} +1 -1
- package/dist/{googlePlay-Cy-MaYr2.mjs → googlePlay-CapfGnZ8.mjs} +5 -5
- package/dist/{googlePlay-Cy-MaYr2.mjs.map → googlePlay-CapfGnZ8.mjs.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 +99 -81
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +87 -69
- package/dist/index.mjs.map +1 -1
- package/dist/{local-CdpBgn3d.mjs → local-2SR2d_BC.mjs} +2 -2
- package/dist/{local-CdpBgn3d.mjs.map → local-2SR2d_BC.mjs.map} +1 -1
- package/dist/{local-B4xobzh-.cjs → local-l5_-A-zI.cjs} +2 -2
- package/dist/{local-B4xobzh-.cjs.map → local-l5_-A-zI.cjs.map} +1 -1
- package/dist/{migrate--hMBtpx-.cjs → migrate-B05YVukh.cjs} +4 -4
- package/dist/{migrate--hMBtpx-.cjs.map → migrate-B05YVukh.cjs.map} +1 -1
- package/dist/{migrate-DVrXTq58.mjs → migrate-C0ecSkL2.mjs} +4 -4
- package/dist/{migrate-DVrXTq58.mjs.map → migrate-C0ecSkL2.mjs.map} +1 -1
- package/dist/{migrate-DwQ-zaMy.cjs → migrate-DNLNhKNT.cjs} +6 -6
- package/dist/{migrate-DwQ-zaMy.cjs.map → migrate-DNLNhKNT.cjs.map} +1 -1
- package/dist/{migrate-DhZfvCkJ.mjs → migrate-KdqlzELQ.mjs} +6 -6
- package/dist/{migrate-DhZfvCkJ.mjs.map → migrate-KdqlzELQ.mjs.map} +1 -1
- package/dist/{notes-z5OOMqm4.mjs → notes-Cj8jL1kS.mjs} +4 -4
- package/dist/{notes-z5OOMqm4.mjs.map → notes-Cj8jL1kS.mjs.map} +1 -1
- package/dist/{notes-C2b5RzGl.cjs → notes-DTTUGZyi.cjs} +4 -4
- package/dist/{notes-C2b5RzGl.cjs.map → notes-DTTUGZyi.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-DPD0_B8N.mjs → projectBucket-6BKUPlDp.mjs} +2 -2
- package/dist/{projectBucket-DPD0_B8N.mjs.map → projectBucket-6BKUPlDp.mjs.map} +1 -1
- package/dist/{projectBucket-Dk_aZ1cD.cjs → projectBucket-CjJB-nom.cjs} +2 -2
- package/dist/{projectBucket-Dk_aZ1cD.cjs.map → projectBucket-CjJB-nom.cjs.map} +1 -1
- package/dist/{publish-CDvh-9OG.cjs → publish-Cj36G3de.cjs} +2 -2
- package/dist/{publish-CDvh-9OG.cjs.map → publish-Cj36G3de.cjs.map} +1 -1
- package/dist/{publish-Bmc1Wfs3.mjs → publish-DRsFN1td.mjs} +2 -2
- package/dist/{publish-Bmc1Wfs3.mjs.map → publish-DRsFN1td.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-C1NkdIcy.cjs} +4 -4
- package/dist/{resolve-CuxPZ3ga.cjs.map → resolve-C1NkdIcy.cjs.map} +1 -1
- package/dist/{resolve-DHARlMdl.mjs → resolve-DjbMNLt-.mjs} +4 -4
- package/dist/{resolve-DHARlMdl.mjs.map → resolve-DjbMNLt-.mjs.map} +1 -1
- package/dist/{rollback-DxHut8C-.cjs → rollback-531Va3dw.cjs} +7 -7
- package/dist/{rollback-DxHut8C-.cjs.map → rollback-531Va3dw.cjs.map} +1 -1
- package/dist/{rollback-DZq_dIbl.mjs → rollback-D0ZpwlFq.mjs} +7 -7
- package/dist/{rollback-DZq_dIbl.mjs.map → rollback-D0ZpwlFq.mjs.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-BSfFgbms.cjs} +3 -3
- package/dist/{s3-Dhy58V_y.cjs.map → s3-BSfFgbms.cjs.map} +1 -1
- package/dist/{s3-Cd7UK2y8.mjs → s3-Ho00alt7.mjs} +3 -3
- package/dist/{s3-Cd7UK2y8.mjs.map → s3-Ho00alt7.mjs.map} +1 -1
- package/dist/{serverSetup-qe5bdBhO.mjs → serverSetup-BW1RgJXo.mjs} +7 -7
- package/dist/{serverSetup-qe5bdBhO.mjs.map → serverSetup-BW1RgJXo.mjs.map} +1 -1
- package/dist/{serverSetup-DYiKHMVp.cjs → serverSetup-C59lCe80.cjs} +7 -7
- package/dist/{serverSetup-DYiKHMVp.cjs.map → serverSetup-C59lCe80.cjs.map} +1 -1
- package/dist/{sniffer-DFix2ORf.cjs → sniffer-BL7X_kzC.cjs} +7 -7
- package/dist/{sniffer-DFix2ORf.cjs.map → sniffer-BL7X_kzC.cjs.map} +1 -1
- package/dist/{sniffer-BNcLP8MO.mjs → sniffer-DrmSlwg9.mjs} +7 -7
- package/dist/{sniffer-BNcLP8MO.mjs.map → sniffer-DrmSlwg9.mjs.map} +1 -1
- package/dist/{snsSubscriptions-Dr-gJWtR.cjs → snsSubscriptions-B8nZBBEE.cjs} +3 -3
- package/dist/{snsSubscriptions-Dr-gJWtR.cjs.map → snsSubscriptions-B8nZBBEE.cjs.map} +1 -1
- package/dist/{snsSubscriptions-BwX28_Kl.mjs → snsSubscriptions-DF7YGauz.mjs} +3 -3
- package/dist/{snsSubscriptions-BwX28_Kl.mjs.map → snsSubscriptions-DF7YGauz.mjs.map} +1 -1
- package/dist/{sst-Bvtx6uZ9.mjs → sst-C-RSpWC2.mjs} +5 -5
- package/dist/{sst-Bvtx6uZ9.mjs.map → sst-C-RSpWC2.mjs.map} +1 -1
- package/dist/{sst-CoKFPW7f.cjs → sst-Dvko43Y3.cjs} +5 -5
- package/dist/{sst-CoKFPW7f.cjs.map → sst-Dvko43Y3.cjs.map} +1 -1
- package/dist/{stack-BeSbt_7k.mjs → stack-CVzOFHed.mjs} +70 -387
- package/dist/stack-CVzOFHed.mjs.map +1 -0
- package/dist/{stack-DbaKGKnI.cjs → stack-l_eQ63Gl.cjs} +73 -462
- package/dist/stack-l_eQ63Gl.cjs.map +1 -0
- package/dist/{stage-BblkSR2C.mjs → stage-JMlDwobz.mjs} +18 -15
- package/dist/stage-JMlDwobz.mjs.map +1 -0
- package/dist/{stage-DI5mzoAi.cjs → stage-_vzQ82Gz.cjs} +19 -16
- package/dist/stage-_vzQ82Gz.cjs.map +1 -0
- 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-DDqusYW0.mjs → terminal-BnKPi06T.mjs} +2 -2
- package/dist/{terminal-DDqusYW0.mjs.map → terminal-BnKPi06T.mjs.map} +1 -1
- package/dist/{terminal-Bxy_A8iP.cjs → terminal-CdPFlCS_.cjs} +2 -2
- package/dist/{terminal-Bxy_A8iP.cjs.map → terminal-CdPFlCS_.cjs.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/credentials-B5Oe4fLE.mjs.map +0 -1
- package/dist/credentials-Csnd7M8M.cjs.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/stage-BblkSR2C.mjs.map +0 -1
- package/dist/stage-DI5mzoAi.cjs.map +0 -1
- package/dist/workspace-BbbkJDUU.cjs.map +0 -1
- package/dist/workspace-CZGJdcTs.mjs.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
|
|
2
2
|
const require_errors = require("./errors-DMC4Umsb.cjs");
|
|
3
|
-
const require_credentials = require("./credentials-
|
|
4
|
-
const require_workspace = require("./workspace-
|
|
5
|
-
const require_compose = require("./compose-
|
|
3
|
+
const require_credentials = require("./credentials-CrQglKgo.cjs");
|
|
4
|
+
const require_workspace = require("./workspace-1szcahj9.cjs");
|
|
5
|
+
const require_compose = require("./compose-DVPWitEu.cjs");
|
|
6
6
|
const require_SubscriberGenerator = require("./SubscriberGenerator-BNJyPmXJ.cjs");
|
|
7
|
-
const require_config = require("./config-
|
|
7
|
+
const require_config = require("./config-juUyBlb1.cjs");
|
|
8
8
|
const require_types = require("./types-Bl_CwZC9.cjs");
|
|
9
9
|
const require_EndpointGenerator = require("./EndpointGenerator-DyLMYClE.cjs");
|
|
10
10
|
const require_discover = require("./discover-CRywE7yc.cjs");
|
|
@@ -16,6 +16,8 @@ let node_child_process = require("node:child_process");
|
|
|
16
16
|
let node_net = require("node:net");
|
|
17
17
|
let node_crypto = require("node:crypto");
|
|
18
18
|
let _geekmidas_manifest = require("@geekmidas/manifest");
|
|
19
|
+
let node_module = require("node:module");
|
|
20
|
+
let node_url = require("node:url");
|
|
19
21
|
let _geekmidas_constructs_encryption = require("@geekmidas/constructs/encryption");
|
|
20
22
|
let _geekmidas_db_pg_roles = require("@geekmidas/db/pg/roles");
|
|
21
23
|
let _geekmidas_events_sns_url = require("@geekmidas/events/sns/url");
|
|
@@ -30,6 +32,115 @@ let _aws_sdk_client_s3 = require("@aws-sdk/client-s3");
|
|
|
30
32
|
let _aws_sdk_client_sns = require("@aws-sdk/client-sns");
|
|
31
33
|
let _aws_sdk_client_sqs = require("@aws-sdk/client-sqs");
|
|
32
34
|
let pg = require("pg");
|
|
35
|
+
//#region src/providers/dns.ts
|
|
36
|
+
/** Whether the workspace deploys through the compose target. */
|
|
37
|
+
function deploysWithCompose(workspace) {
|
|
38
|
+
return workspace.deploy?.default === "compose" || Object.values(workspace.apps).some((app) => app.resolvedDeployTarget === "compose");
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region src/backups/config.ts
|
|
42
|
+
/**
|
|
43
|
+
* Which stages take backups, and where they are kept.
|
|
44
|
+
*
|
|
45
|
+
* A deployed compose stage whose stack runs Postgres is backed up by
|
|
46
|
+
* default — every day at 02:00 UTC, kept 30 days — unless
|
|
47
|
+
* `deploy.backups.<stage>` says otherwise. The local stage never is.
|
|
48
|
+
*
|
|
49
|
+
* Every backup is kept in the project bucket (`providers/projectBucket.ts`),
|
|
50
|
+
* beside the stage's deploy state, one folder per run and one file per
|
|
51
|
+
* database:
|
|
52
|
+
*
|
|
53
|
+
* ```
|
|
54
|
+
* gkm/<project>/<stage>/backups/2026-10-10/02-00-00Z/database.sql.gz
|
|
55
|
+
* gkm/<project>/<stage>/backups/2026-10-10/02-00-00Z/auth-database.sql.gz
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* The file is named after the database's construct, the way its migrations
|
|
59
|
+
* folder is: `AuthDatabase` is `db/auth-database`, and `auth-database.sql.gz`.
|
|
60
|
+
*/
|
|
61
|
+
/** Whether the stack runs Postgres: some construct is a database. */
|
|
62
|
+
function runsPostgres(manifest) {
|
|
63
|
+
return Object.values(manifest).some((d) => d.kind === "database");
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* What `stage`'s backups are: on — by its entry or the default — off by
|
|
67
|
+
* `false`, or none, for the local stage, a stage compose does not deploy,
|
|
68
|
+
* and a stack with no database.
|
|
69
|
+
*/
|
|
70
|
+
function stageBackups(workspace, manifest, stage) {
|
|
71
|
+
if (stage === workspace.stages?.local) return {
|
|
72
|
+
mode: "none",
|
|
73
|
+
reason: "local"
|
|
74
|
+
};
|
|
75
|
+
if (!deploysWithCompose(workspace)) return {
|
|
76
|
+
mode: "none",
|
|
77
|
+
reason: "not-compose"
|
|
78
|
+
};
|
|
79
|
+
if (!runsPostgres(manifest)) return {
|
|
80
|
+
mode: "none",
|
|
81
|
+
reason: "no-postgres"
|
|
82
|
+
};
|
|
83
|
+
const value = (workspace.deploy?.backups)?.[stage];
|
|
84
|
+
const checked = require_workspace.checkStageBackups(stage, value ?? {});
|
|
85
|
+
if (checked === false) return { mode: "disabled" };
|
|
86
|
+
return {
|
|
87
|
+
mode: "on",
|
|
88
|
+
backups: checked,
|
|
89
|
+
source: value === void 0 ? "default" : "config"
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Where a stage's backups are, in the project bucket — under the same
|
|
94
|
+
* `<prefix>/<project>/<stage>` its deploy state is: `gkm/shop/production/backups`.
|
|
95
|
+
*/
|
|
96
|
+
function backupsPrefix(workspace, stage) {
|
|
97
|
+
const state = workspace.state;
|
|
98
|
+
const prefix = state?.provider === "s3" && state.prefix !== void 0 ? state.prefix.replace(/\/+$/, "") : "gkm";
|
|
99
|
+
return `${prefix ? `${prefix}/` : ""}${workspace.name}/${stage}/backups`;
|
|
100
|
+
}
|
|
101
|
+
/** A run folder's time back, or `undefined` for a key that is not one. */
|
|
102
|
+
function runTime(folder) {
|
|
103
|
+
const match = /^(\d{4}-\d{2}-\d{2})\/(\d{2})-(\d{2})-(\d{2})Z$/.exec(folder);
|
|
104
|
+
if (!match) return void 0;
|
|
105
|
+
const at = /* @__PURE__ */ new Date(`${match[1]}T${match[2]}:${match[3]}:${match[4]}Z`);
|
|
106
|
+
return Number.isNaN(at.getTime()) ? void 0 : at;
|
|
107
|
+
}
|
|
108
|
+
/** A database's file in a run's folder: `auth-database.sql.gz`. */
|
|
109
|
+
function backupFile(database) {
|
|
110
|
+
return `${database.file}.sql.gz`;
|
|
111
|
+
}
|
|
112
|
+
/** Each database the stack runs, by its construct and its name in Postgres. */
|
|
113
|
+
function backupDatabases(resources) {
|
|
114
|
+
return resources.filter((r) => r.kind === "database").map((r) => ({
|
|
115
|
+
id: r.id,
|
|
116
|
+
file: (0, _geekmidas_manifest.kebabCase)(r.id),
|
|
117
|
+
name: r.name
|
|
118
|
+
})).sort((a, b) => a.file.localeCompare(b.file));
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* The expiry of every stage's backups, by each stage's own entry — what the
|
|
122
|
+
* project bucket's lifecycle carries beside its own rule.
|
|
123
|
+
*
|
|
124
|
+
* A put replaces a bucket's whole lifecycle, so this is built from every
|
|
125
|
+
* deployed stage each time, never from the stage being deployed alone: one
|
|
126
|
+
* stage's deploy keeps every other's rule. A stage set to `false` has none,
|
|
127
|
+
* and its backups are kept until someone deletes them.
|
|
128
|
+
*/
|
|
129
|
+
function backupExpiries(workspace, manifest) {
|
|
130
|
+
const expiries = [];
|
|
131
|
+
for (const stage of [...workspace.stages?.deployed ?? []].sort()) {
|
|
132
|
+
const choice = stageBackups(workspace, manifest, stage);
|
|
133
|
+
if (choice.mode !== "on") continue;
|
|
134
|
+
expiries.push({
|
|
135
|
+
id: `gkm-backups-${stage}`,
|
|
136
|
+
prefix: `${backupsPrefix(workspace, stage)}/`,
|
|
137
|
+
days: choice.backups.keepDays,
|
|
138
|
+
abortIncompleteDays: 1
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
return expiries;
|
|
142
|
+
}
|
|
143
|
+
//#endregion
|
|
33
144
|
//#region src/generators/processorRoute.ts
|
|
34
145
|
/**
|
|
35
146
|
* Where `gkm dev` serves a file server's processors, on the dev server of the
|
|
@@ -284,9 +395,7 @@ function toCaddyfile(sites, options) {
|
|
|
284
395
|
https://${host} {
|
|
285
396
|
tls ${options.certificate} ${options.certificate}
|
|
286
397
|
|
|
287
|
-
|
|
288
|
-
# server rate-limits by the client address it carries.
|
|
289
|
-
request_header -${_geekmidas_manifest.CLIENT_IP_HEADER}
|
|
398
|
+
${clientIpRule(options.edgeToken)}
|
|
290
399
|
${processors ? `
|
|
291
400
|
# Its processors' patterns, to the dev server holding them — under the
|
|
292
401
|
# route it mounts them on. Answered there, so the bucket below never is.
|
|
@@ -337,6 +446,29 @@ const GENERATED = `# Generated by gkm from the construct manifest — do not edi
|
|
|
337
446
|
# its root, so nothing has to be installed to use these URLs from code; a
|
|
338
447
|
# browser needs the root trusted once ("gkm trust").
|
|
339
448
|
`;
|
|
449
|
+
/**
|
|
450
|
+
* The lines every site block of an edge opens with, for gkm's own
|
|
451
|
+
* `x-gkm-client-ip` — the client address the auth server rate-limits by.
|
|
452
|
+
*
|
|
453
|
+
* Only a service of this stack may send it. One that calls a sibling at its
|
|
454
|
+
* public address comes through this edge, and proves where it comes from with
|
|
455
|
+
* the stack's token (`x-gkm-edge-token`), derived from the stage's seed and
|
|
456
|
+
* handed to every process of the stack — never to a browser. A request
|
|
457
|
+
* without it has the header removed, so nobody outside can choose the address
|
|
458
|
+
* they are rate-limited by. Without a token, it is removed from every request.
|
|
459
|
+
*/
|
|
460
|
+
function clientIpRule(edgeToken) {
|
|
461
|
+
if (!edgeToken) return `
|
|
462
|
+
# gkm's own header, which only a service of this stack may send: the auth
|
|
463
|
+
# server rate-limits by the client address it carries.
|
|
464
|
+
request_header -${_geekmidas_manifest.CLIENT_IP_HEADER}`;
|
|
465
|
+
return `
|
|
466
|
+
# gkm's own header, which only a service of this stack may send — proven by
|
|
467
|
+
# the stack's token: the auth server rate-limits by the client address it
|
|
468
|
+
# carries. Removed from every other request.
|
|
469
|
+
@gkm_outside not header ${_geekmidas_manifest.EDGE_TOKEN_HEADER} ${edgeToken}
|
|
470
|
+
request_header @gkm_outside -${_geekmidas_manifest.CLIENT_IP_HEADER}`;
|
|
471
|
+
}
|
|
340
472
|
//#endregion
|
|
341
473
|
//#region src/telemetry/edges.ts
|
|
342
474
|
/**
|
|
@@ -823,6 +955,15 @@ function stageEnv(stored, resolved) {
|
|
|
823
955
|
};
|
|
824
956
|
}
|
|
825
957
|
/**
|
|
958
|
+
* The token a stack's own services prove themselves with at its edge
|
|
959
|
+
* (`EDGE_TOKEN_HEADER`): derived from the stage's seed, as a bucket's webhook
|
|
960
|
+
* token is, so every process, the edge and the auth server agree on it with
|
|
961
|
+
* nothing stored.
|
|
962
|
+
*/
|
|
963
|
+
function edgeToken(project, seed) {
|
|
964
|
+
return (0, node_crypto.createHash)("sha256").update(`${seed ? `${seed}:` : ""}${project}:edge-token`).digest("base64url").slice(0, 43);
|
|
965
|
+
}
|
|
966
|
+
/**
|
|
826
967
|
* Every env key a reconciled plan resolves, and its value.
|
|
827
968
|
*
|
|
828
969
|
* Keys come from the declaration rather than being re-derived, so what the build
|
|
@@ -900,6 +1041,7 @@ function envFor(plan, options) {
|
|
|
900
1041
|
env[(0, _geekmidas_manifest.provideKey)(resource.id, "eventsToken")] = require_compose.objectsWebhookToken(options.project ?? "", resource.id, credential.seed);
|
|
901
1042
|
}
|
|
902
1043
|
if (plan.resources.some((r) => r.kind === "inbox" && env[r.envKey])) env[require_SubscriberGenerator.INBOX_RELAY_TOKEN_KEY] = require_SubscriberGenerator.inboxRelayToken(options.project ?? "", credential.seed);
|
|
1044
|
+
if (plan.resources.some((r) => (r.kind === "rest-api" || r.kind === "websocket-api") && env[r.envKey])) env[_geekmidas_manifest.EDGE_TOKEN_KEY] = edgeToken(options.project ?? "", credential.seed);
|
|
903
1045
|
if (plan.resources.some((r) => r.kind === "objects" && env[r.envKey])) Object.assign(env, storageCredentials(options.credentials));
|
|
904
1046
|
return env;
|
|
905
1047
|
}
|
|
@@ -1817,6 +1959,207 @@ async function applyBuckets(client, buckets) {
|
|
|
1817
1959
|
return applied;
|
|
1818
1960
|
}
|
|
1819
1961
|
//#endregion
|
|
1962
|
+
//#region src/backups/service.ts
|
|
1963
|
+
/**
|
|
1964
|
+
* The stack's `backups` service: what a deployed compose stage with Postgres
|
|
1965
|
+
* runs beside its apps, unless `deploy.backups.<stage>` is `false`.
|
|
1966
|
+
*
|
|
1967
|
+
* - **The image** is built from the stack's own Postgres image —
|
|
1968
|
+
* `postgres:<major>-alpine`, already on the server for the stack, and with
|
|
1969
|
+
* the `pg_dump` that matches the server — with Node added and gkm's runner
|
|
1970
|
+
* (`runner.ts`) copied in. Nothing is pulled that the stack does not have,
|
|
1971
|
+
* and nothing is mounted from the host: the build context is two files.
|
|
1972
|
+
* - **Its key** is `BACKUPS_URL`, from the stage's secrets, like any app's:
|
|
1973
|
+
* allowed to put objects under the stage's backups prefix and nothing else.
|
|
1974
|
+
* The server holds no AWS credentials of its own.
|
|
1975
|
+
* - **Its login** is a role of its own, `<project>_backups`, granted
|
|
1976
|
+
* `pg_read_all_data` — it can read every database and write none. Postgres
|
|
1977
|
+
* before 14 has no such role, and there it signs in as the stack's
|
|
1978
|
+
* superuser.
|
|
1979
|
+
* - **Its health** is the last good run: unhealthy once that is more than
|
|
1980
|
+
* twice the schedule's longest gap old, after a startup grace.
|
|
1981
|
+
*/
|
|
1982
|
+
/** The service's name in the stack. */
|
|
1983
|
+
const BACKUPS_SERVICE = "backups";
|
|
1984
|
+
/** The secret its key is written to. */
|
|
1985
|
+
const BACKUPS_URL_KEY = "BACKUPS_URL";
|
|
1986
|
+
/** Where the runner is, in the image. */
|
|
1987
|
+
const RUNNER_PATH = "/gkm/backup.mjs";
|
|
1988
|
+
/** The first Postgres with `pg_read_all_data`. */
|
|
1989
|
+
const READ_ALL_DATA_SINCE = 14;
|
|
1990
|
+
/** A stage that backs up, and no key to back up with. */
|
|
1991
|
+
var BackupsUrlMissing = class extends require_errors.GkmError {
|
|
1992
|
+
stage;
|
|
1993
|
+
constructor(stage) {
|
|
1994
|
+
super(`'${stage}' runs Postgres, so its stack backs it up, and its secrets hold no ${BACKUPS_URL_KEY} to back up with. The deploy writes it — the IAM user and key it creates in the stage's AWS account — so run the deploy with the account's credentials. To take no backups on this stage, set deploy.backups.${stage}: false.`);
|
|
1995
|
+
this.stage = stage;
|
|
1996
|
+
this.name = "BackupsUrlMissing";
|
|
1997
|
+
}
|
|
1998
|
+
};
|
|
1999
|
+
/** The backups role: `<project>_backups`, as the superuser is `<project>_admin`. */
|
|
2000
|
+
function backupsRole(project) {
|
|
2001
|
+
return `${require_compose.postgresRoleSlug(project)}_backups`;
|
|
2002
|
+
}
|
|
2003
|
+
/**
|
|
2004
|
+
* The runner's source, as JavaScript: the built `backups/runner.mjs` beside
|
|
2005
|
+
* the CLI's bundle, or — run from source — `runner.ts`, with its types
|
|
2006
|
+
* stripped by esbuild.
|
|
2007
|
+
*/
|
|
2008
|
+
function runnerSource() {
|
|
2009
|
+
const here = (0, node_path.dirname)((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
|
|
2010
|
+
for (const path of [
|
|
2011
|
+
(0, node_path.join)(here, "backups", "runner.mjs"),
|
|
2012
|
+
(0, node_path.join)(here, "runner.mjs"),
|
|
2013
|
+
(0, node_path.join)(here, "..", "backups", "runner.mjs")
|
|
2014
|
+
]) if ((0, node_fs.existsSync)(path)) return (0, node_fs.readFileSync)(path, "utf-8");
|
|
2015
|
+
const { transformSync } = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href)("esbuild");
|
|
2016
|
+
return transformSync((0, node_fs.readFileSync)((0, node_path.join)(here, "runner.ts"), "utf-8"), {
|
|
2017
|
+
loader: "ts",
|
|
2018
|
+
format: "esm",
|
|
2019
|
+
target: "node22"
|
|
2020
|
+
}).code;
|
|
2021
|
+
}
|
|
2022
|
+
/** The image's Dockerfile: the stack's Postgres, Node, and the runner. */
|
|
2023
|
+
function backupsDockerfile(from) {
|
|
2024
|
+
return `# Generated by gkm — the stage's backups: pg_dump from ${from}, and gkm's uploader.
|
|
2025
|
+
FROM ${from}
|
|
2026
|
+
RUN apk add --no-cache nodejs
|
|
2027
|
+
COPY backup.mjs ${RUNNER_PATH}
|
|
2028
|
+
USER postgres
|
|
2029
|
+
ENTRYPOINT []
|
|
2030
|
+
CMD ["node", "${RUNNER_PATH}", "serve"]
|
|
2031
|
+
`;
|
|
2032
|
+
}
|
|
2033
|
+
/**
|
|
2034
|
+
* The stack's backups service, for a stage whose backups are on.
|
|
2035
|
+
*
|
|
2036
|
+
* @throws {BackupsUrlMissing} when the stage's secrets hold no key
|
|
2037
|
+
*/
|
|
2038
|
+
function stackBackups(input) {
|
|
2039
|
+
const { plan, stage } = input;
|
|
2040
|
+
const version = plan.resources.find((r) => r.version)?.version ?? _geekmidas_manifest.DEFAULT_POSTGRES_VERSION;
|
|
2041
|
+
const from = require_compose.postgresImage(version);
|
|
2042
|
+
const script = runnerSource();
|
|
2043
|
+
const dockerfile = backupsDockerfile(from);
|
|
2044
|
+
const hash = (0, node_crypto.createHash)("sha256").update(dockerfile).update(script).digest("hex").slice(0, 12);
|
|
2045
|
+
const readOnly = version >= READ_ALL_DATA_SINCE;
|
|
2046
|
+
const role = backupsRole(input.workspace.name);
|
|
2047
|
+
const login = readOnly ? {
|
|
2048
|
+
user: role,
|
|
2049
|
+
password: localRolePassword(input.workspace.name, plan, role, input.seed)
|
|
2050
|
+
} : input.superuser;
|
|
2051
|
+
const databases = backupDatabases(plan.resources);
|
|
2052
|
+
const prefix = backupsPrefix(input.workspace, stage);
|
|
2053
|
+
const { kind, ...schedule } = input.backups.schedule;
|
|
2054
|
+
let env = {};
|
|
2055
|
+
if (!input.buildOnly) {
|
|
2056
|
+
const url = input.custom[BACKUPS_URL_KEY];
|
|
2057
|
+
if (!url) throw new BackupsUrlMissing(stage);
|
|
2058
|
+
env = {
|
|
2059
|
+
BACKUPS_URL: url,
|
|
2060
|
+
BACKUPS_PREFIX: prefix,
|
|
2061
|
+
BACKUPS_DATABASES: JSON.stringify(databases.map(({ file, name }) => ({
|
|
2062
|
+
file,
|
|
2063
|
+
name
|
|
2064
|
+
}))),
|
|
2065
|
+
BACKUPS_SCHEDULE: JSON.stringify(kind === "cron" ? {
|
|
2066
|
+
kind,
|
|
2067
|
+
minutes: input.backups.schedule.minutes,
|
|
2068
|
+
hours: input.backups.schedule.hours,
|
|
2069
|
+
days: input.backups.schedule.days,
|
|
2070
|
+
months: input.backups.schedule.months,
|
|
2071
|
+
weekdays: input.backups.schedule.weekdays
|
|
2072
|
+
} : {
|
|
2073
|
+
kind,
|
|
2074
|
+
...schedule
|
|
2075
|
+
}),
|
|
2076
|
+
BACKUPS_MAX_GAP_SECONDS: String(input.backups.maxGapSeconds),
|
|
2077
|
+
PGHOST: "postgres",
|
|
2078
|
+
PGPORT: "5432",
|
|
2079
|
+
PGUSER: login.user,
|
|
2080
|
+
PGPASSWORD: login.password,
|
|
2081
|
+
...input.telemetry?.OTEL_EXPORTER_OTLP_ENDPOINT ? {
|
|
2082
|
+
OTEL_EXPORTER_OTLP_ENDPOINT: input.telemetry.OTEL_EXPORTER_OTLP_ENDPOINT,
|
|
2083
|
+
...input.telemetry.OTEL_EXPORTER_OTLP_HEADERS ? { OTEL_EXPORTER_OTLP_HEADERS: input.telemetry.OTEL_EXPORTER_OTLP_HEADERS } : {},
|
|
2084
|
+
OTEL_SERVICE_NAME: BACKUPS_SERVICE
|
|
2085
|
+
} : {}
|
|
2086
|
+
};
|
|
2087
|
+
}
|
|
2088
|
+
return {
|
|
2089
|
+
backups: input.backups,
|
|
2090
|
+
databases,
|
|
2091
|
+
prefix,
|
|
2092
|
+
from,
|
|
2093
|
+
image: `${input.project}-backups:pg${version}-${hash}`,
|
|
2094
|
+
files: {
|
|
2095
|
+
Dockerfile: dockerfile,
|
|
2096
|
+
"backup.mjs": script
|
|
2097
|
+
},
|
|
2098
|
+
login,
|
|
2099
|
+
readOnly,
|
|
2100
|
+
env
|
|
2101
|
+
};
|
|
2102
|
+
}
|
|
2103
|
+
/** The service in the stack's compose file. */
|
|
2104
|
+
function backupsService(backups, envFiles) {
|
|
2105
|
+
return {
|
|
2106
|
+
image: backups.image,
|
|
2107
|
+
build: {
|
|
2108
|
+
context: `./${BACKUPS_SERVICE}`,
|
|
2109
|
+
dockerfile: "Dockerfile"
|
|
2110
|
+
},
|
|
2111
|
+
pull_policy: "build",
|
|
2112
|
+
restart: "unless-stopped",
|
|
2113
|
+
...envFiles ? { env_file: [{
|
|
2114
|
+
path: `./${BACKUPS_SERVICE}.env`,
|
|
2115
|
+
format: "raw"
|
|
2116
|
+
}] } : {},
|
|
2117
|
+
depends_on: { postgres: { condition: "service_healthy" } },
|
|
2118
|
+
healthcheck: {
|
|
2119
|
+
test: [
|
|
2120
|
+
"CMD",
|
|
2121
|
+
"node",
|
|
2122
|
+
RUNNER_PATH,
|
|
2123
|
+
"health"
|
|
2124
|
+
],
|
|
2125
|
+
interval: "1m",
|
|
2126
|
+
timeout: "10s",
|
|
2127
|
+
retries: 3,
|
|
2128
|
+
start_period: "30s"
|
|
2129
|
+
}
|
|
2130
|
+
};
|
|
2131
|
+
}
|
|
2132
|
+
/**
|
|
2133
|
+
* The backups role, created and kept: able to sign in and read every
|
|
2134
|
+
* database, and nothing else. None when it signs in as the superuser.
|
|
2135
|
+
*/
|
|
2136
|
+
function backupsRoleStatements(backups) {
|
|
2137
|
+
if (!backups.readOnly) return [];
|
|
2138
|
+
const role = quoteIdentifier(backups.login.user);
|
|
2139
|
+
const password = `'${backups.login.password.replace(/'/g, "''")}'`;
|
|
2140
|
+
return [
|
|
2141
|
+
{
|
|
2142
|
+
id: BACKUPS_SERVICE,
|
|
2143
|
+
describe: `role ${backups.login.user}`,
|
|
2144
|
+
exists: {
|
|
2145
|
+
sql: "SELECT 1 FROM pg_roles WHERE rolname = $1",
|
|
2146
|
+
values: [backups.login.user]
|
|
2147
|
+
},
|
|
2148
|
+
create: `CREATE ROLE ${role} LOGIN PASSWORD ${password}`
|
|
2149
|
+
},
|
|
2150
|
+
{
|
|
2151
|
+
id: BACKUPS_SERVICE,
|
|
2152
|
+
describe: `role ${backups.login.user}: its password`,
|
|
2153
|
+
create: `ALTER ROLE ${role} WITH LOGIN PASSWORD ${password}`
|
|
2154
|
+
},
|
|
2155
|
+
{
|
|
2156
|
+
id: BACKUPS_SERVICE,
|
|
2157
|
+
describe: `role ${backups.login.user}: read every database`,
|
|
2158
|
+
create: `GRANT pg_read_all_data TO ${role}`
|
|
2159
|
+
}
|
|
2160
|
+
];
|
|
2161
|
+
}
|
|
2162
|
+
//#endregion
|
|
1820
2163
|
//#region src/build/workers.ts
|
|
1821
2164
|
/** A worker with background work and no backend app to build it from. */
|
|
1822
2165
|
var WorkerHasNoApp = class extends require_errors.GkmError {
|
|
@@ -1975,6 +2318,71 @@ function publicBuildValues(site, manifest, resolve, secrets) {
|
|
|
1975
2318
|
for (const [key, value] of Object.entries(secrets)) if (key.startsWith(prefix) && args[key] === void 0 && value) args[key] = value;
|
|
1976
2319
|
return args;
|
|
1977
2320
|
}
|
|
2321
|
+
/**
|
|
2322
|
+
* Where a site's own hosts point during its image build: this loopback
|
|
2323
|
+
* address, on which nothing in a build container listens — so a request to
|
|
2324
|
+
* one is refused at once instead of waiting on a host that is not up yet.
|
|
2325
|
+
*/
|
|
2326
|
+
const OFFLINE_BUILD_ADDRESS = "127.0.0.1";
|
|
2327
|
+
/**
|
|
2328
|
+
* The hosts a site's image build must not wait on: its own and those of the
|
|
2329
|
+
* constructs its `.dependsOn()` names, as this stage serves them.
|
|
2330
|
+
*
|
|
2331
|
+
* None of them answers while the image is built — the stack the site belongs
|
|
2332
|
+
* to is started after it — and a fetch to a public host that does not answer
|
|
2333
|
+
* yet can stall until the framework's prerender limit (Next's 60s). Mapped to
|
|
2334
|
+
* {@link OFFLINE_BUILD_ADDRESS} in the build's `/etc/hosts`, each is refused
|
|
2335
|
+
* at once, and the page renders on its first request instead.
|
|
2336
|
+
*
|
|
2337
|
+
* The mapping is the build's only: the URLs the bundle inlines are the real
|
|
2338
|
+
* ones, and the running container resolves them as anything else does. A
|
|
2339
|
+
* stage secret named for the bundle is someone else's host (an analytics
|
|
2340
|
+
* service, a store) and is left alone, as are `localhost` and an address.
|
|
2341
|
+
*/
|
|
2342
|
+
function offlineBuildHosts(site, manifest, resolve) {
|
|
2343
|
+
const sources = [(0, _geekmidas_manifest.provideKey)(site.id, "url"), ...Object.values((0, _geekmidas_manifest.publicEnvFor)(site, manifest))];
|
|
2344
|
+
const hosts = /* @__PURE__ */ new Set();
|
|
2345
|
+
for (const source of sources) {
|
|
2346
|
+
const host = hostOf(resolve(source));
|
|
2347
|
+
if (host) hosts.add(host);
|
|
2348
|
+
}
|
|
2349
|
+
return [...hosts].sort();
|
|
2350
|
+
}
|
|
2351
|
+
/** A URL's host, where it is a name `/etc/hosts` can map. */
|
|
2352
|
+
function hostOf(value) {
|
|
2353
|
+
if (!value || !URL.canParse(value)) return void 0;
|
|
2354
|
+
const { protocol, hostname } = new URL(value);
|
|
2355
|
+
if (!/^(https?|wss?):$/.test(protocol)) return void 0;
|
|
2356
|
+
if (hostname === "localhost" || hostname.includes("*")) return void 0;
|
|
2357
|
+
if (/^[\d.]+$/.test(hostname) || hostname.startsWith("[")) return void 0;
|
|
2358
|
+
return hostname;
|
|
2359
|
+
}
|
|
2360
|
+
/**
|
|
2361
|
+
* {@link offlineBuildHosts} for a target that knows each app's public URL by
|
|
2362
|
+
* its app key rather than by construct key — the site's own, and each app it
|
|
2363
|
+
* calls. None, for an app that declares no site.
|
|
2364
|
+
*/
|
|
2365
|
+
function siteOfflineHosts(manifest, appName, ownUrl, urls) {
|
|
2366
|
+
const entries = Object.entries(manifest);
|
|
2367
|
+
const site = entries.find(([id, d]) => d.kind === "site" && require_config.appKey(id) === appName)?.[1];
|
|
2368
|
+
if (site?.kind !== "site") return [];
|
|
2369
|
+
const byKey = /* @__PURE__ */ new Map();
|
|
2370
|
+
for (const [id] of entries) {
|
|
2371
|
+
const name = require_config.appKey(id);
|
|
2372
|
+
const url = name === appName ? ownUrl : urls[name];
|
|
2373
|
+
if (url) byKey.set((0, _geekmidas_manifest.provideKey)(id, "url"), url);
|
|
2374
|
+
}
|
|
2375
|
+
return offlineBuildHosts(site, manifest, (key) => byKey.get(key));
|
|
2376
|
+
}
|
|
2377
|
+
/**
|
|
2378
|
+
* Whether a site runs a server of its own — Next's, TanStack Start's — which
|
|
2379
|
+
* reads an environment at runtime as a backend does: its edges' public URLs
|
|
2380
|
+
* and the stage's secrets. A `static` site is a finished bundle, and reads
|
|
2381
|
+
* nothing once it is built.
|
|
2382
|
+
*/
|
|
2383
|
+
function runsServer(site) {
|
|
2384
|
+
return site.variant !== "static";
|
|
2385
|
+
}
|
|
1978
2386
|
//#endregion
|
|
1979
2387
|
//#region src/exec/imageBuild.ts
|
|
1980
2388
|
/**
|
|
@@ -1993,6 +2401,22 @@ function isImageBuild(env = process.env) {
|
|
|
1993
2401
|
return env[IMAGE_BUILD_ENV] === "1";
|
|
1994
2402
|
}
|
|
1995
2403
|
/**
|
|
2404
|
+
* Set by a site's Dockerfile in its builder stage: this build is offline —
|
|
2405
|
+
* no stage is reachable from it.
|
|
2406
|
+
*
|
|
2407
|
+
* A site's image is built before the stack it belongs to runs, so the APIs
|
|
2408
|
+
* its `.dependsOn()` names do not answer yet: data a page fetches while the
|
|
2409
|
+
* framework prerenders it would be none, cached as the page. A site tests
|
|
2410
|
+
* `process.env.GKM_BUILD_OFFLINE === '1'` to skip that fetch, and renders the
|
|
2411
|
+
* page on its first request instead — which gkm's warm-up after a deploy
|
|
2412
|
+
* makes before any visitor does.
|
|
2413
|
+
*
|
|
2414
|
+
* Separate from {@link IMAGE_BUILD_ENV}, which says what `gkm exec` injects:
|
|
2415
|
+
* this says what the build can reach. Only the builder stage sets it; the
|
|
2416
|
+
* running container never has it.
|
|
2417
|
+
*/
|
|
2418
|
+
const BUILD_OFFLINE_ENV = "GKM_BUILD_OFFLINE";
|
|
2419
|
+
/**
|
|
1996
2420
|
* What `gkm exec` injects inside an image build: the public values its build
|
|
1997
2421
|
* args set — every `NEXT_PUBLIC_*`, `VITE_*` and `EXPO_PUBLIC_*` — and
|
|
1998
2422
|
* nothing read from a secrets store, a file or a container.
|
|
@@ -2338,6 +2762,9 @@ const FIND_GKM_BIN = `let d=process.cwd();const{existsSync:e}=require("fs"),{dir
|
|
|
2338
2762
|
* no bin linked.
|
|
2339
2763
|
* - `GKM_IMAGE_BUILD`, which has `gkm exec` inject the build args above — the
|
|
2340
2764
|
* stage's public URLs — and never load a secret or resolve a local address.
|
|
2765
|
+
* - `GKM_BUILD_OFFLINE`, which tells the site's own code that no stage is
|
|
2766
|
+
* reachable from this build: its APIs are not up yet, so a page that
|
|
2767
|
+
* fetches from them renders on request rather than at build.
|
|
2341
2768
|
* - each backend's typed client, generated from its endpoints at the
|
|
2342
2769
|
* workspace root's `.gkm/client/`, where the site's tsconfig paths point.
|
|
2343
2770
|
*/
|
|
@@ -2365,12 +2792,15 @@ RUN cd ${root} && GKM_BIN="$(node -e '${FIND_GKM_BIN}')" && \\
|
|
|
2365
2792
|
chmod +x /usr/local/bin/gkm
|
|
2366
2793
|
|
|
2367
2794
|
# \`gkm exec\` in this build injects the build args, never a stage's secrets
|
|
2368
|
-
ENV ${IMAGE_BUILD_ENV}=1
|
|
2795
|
+
ENV ${IMAGE_BUILD_ENV}=1
|
|
2796
|
+
# No stage is reachable from this build: the site's APIs are not up yet
|
|
2797
|
+
ENV ${BUILD_OFFLINE_ENV}=1${generate}`;
|
|
2369
2798
|
}
|
|
2370
2799
|
/**
|
|
2371
2800
|
* Build the site with turbo. Loose env mode, so the task sees what the
|
|
2372
|
-
* Dockerfile set — the build args
|
|
2373
|
-
* project's turbo.json declares: the image's environment
|
|
2801
|
+
* Dockerfile set — the build args, `GKM_IMAGE_BUILD` and `GKM_BUILD_OFFLINE`
|
|
2802
|
+
* — whatever the project's turbo.json declares: the image's environment
|
|
2803
|
+
* holds nothing else.
|
|
2374
2804
|
*/
|
|
2375
2805
|
function siteBuild(options) {
|
|
2376
2806
|
const { turbo } = layout(options);
|
|
@@ -2976,6 +3406,64 @@ function toPosix(path) {
|
|
|
2976
3406
|
return path.split(node_path.sep).join("/");
|
|
2977
3407
|
}
|
|
2978
3408
|
//#endregion
|
|
3409
|
+
//#region src/providers/processorOrigin.ts
|
|
3410
|
+
/**
|
|
3411
|
+
* A file server's processors as a CDN origin: the names both sides agree on.
|
|
3412
|
+
*
|
|
3413
|
+
* On a compose stage whose bucket is on S3, the CDN serves the bucket and
|
|
3414
|
+
* sends each processor pattern to the stack's processor unit, at a host of
|
|
3415
|
+
* its own. That host is public — a CDN reaches its origin over the internet —
|
|
3416
|
+
* so the CDN adds a secret header and the edge refuses any request without
|
|
3417
|
+
* it. One definition, read by the CDN that sends the header and by the stack
|
|
3418
|
+
* whose edge checks it, so the two cannot drift.
|
|
3419
|
+
*/
|
|
3420
|
+
/** The header the CDN adds to every request it sends a processor. */
|
|
3421
|
+
const ORIGIN_VERIFY_HEADER = "X-Gkm-Origin-Verify";
|
|
3422
|
+
/** Where a file server's processors answer the CDN: `<fileserver>-processors.<domain>`. */
|
|
3423
|
+
function processorOriginHost(serverId, domain) {
|
|
3424
|
+
return `${require_config.appKey(serverId)}-processors.${domain}`.toLowerCase();
|
|
3425
|
+
}
|
|
3426
|
+
/** The stage secret holding the header's value: `ASSETS_SERVER_ORIGIN_SECRET`. */
|
|
3427
|
+
function originSecretKey(serverId) {
|
|
3428
|
+
return (0, _geekmidas_manifest.provideKey)(serverId, "originSecret");
|
|
3429
|
+
}
|
|
3430
|
+
/**
|
|
3431
|
+
* What the processor unit reads that secret from. Set wherever the CDN fronts
|
|
3432
|
+
* it, so the unit refuses a request without the header itself — on Dokploy,
|
|
3433
|
+
* whose edge cannot match a header, the only check; behind the stack's own
|
|
3434
|
+
* edge, a second one.
|
|
3435
|
+
*/
|
|
3436
|
+
const PROCESSOR_ORIGIN_SECRET_ENV = "GKM_PROCESSOR_ORIGIN_SECRET";
|
|
3437
|
+
/** A new value for that secret: random, generated once, kept in the stage. */
|
|
3438
|
+
function newOriginSecret() {
|
|
3439
|
+
return (0, node_crypto.randomBytes)(32).toString("base64url");
|
|
3440
|
+
}
|
|
3441
|
+
//#endregion
|
|
3442
|
+
//#region src/secrets/stackKeys.ts
|
|
3443
|
+
/**
|
|
3444
|
+
* The stage secrets gkm keeps for the stack itself rather than for the
|
|
3445
|
+
* application: the server's address, the logins of the containers it runs
|
|
3446
|
+
* (Redis, OpenObserve), the key backups write with, the secret a CDN sends a
|
|
3447
|
+
* file server's processors.
|
|
3448
|
+
*
|
|
3449
|
+
* Nothing in an app reads them, so no process is handed one as "the stage's
|
|
3450
|
+
* own" (`processEnvKeys`) — the containers that do read them are given them
|
|
3451
|
+
* by name.
|
|
3452
|
+
*/
|
|
3453
|
+
const STACK_KEYS = /* @__PURE__ */ new Set([
|
|
3454
|
+
BACKUPS_URL_KEY,
|
|
3455
|
+
require_compose.LOGS_EMAIL_KEY,
|
|
3456
|
+
require_compose.LOGS_PASSWORD_KEY,
|
|
3457
|
+
require_compose.REDIS_PASSWORD_KEY,
|
|
3458
|
+
PROCESSOR_ORIGIN_SECRET_ENV
|
|
3459
|
+
]);
|
|
3460
|
+
/** A file server's origin secret: `ASSETS_SERVER_ORIGIN_SECRET`. */
|
|
3461
|
+
const ORIGIN_SECRET = /_ORIGIN_SECRET$/;
|
|
3462
|
+
/** Whether a stage secret is the stack's own, which no app process reads. */
|
|
3463
|
+
function isStackKey(key) {
|
|
3464
|
+
return require_workspace.isReservedStageKey(key) || key.startsWith("GKM_") || STACK_KEYS.has(key) || ORIGIN_SECRET.test(key);
|
|
3465
|
+
}
|
|
3466
|
+
//#endregion
|
|
2979
3467
|
//#region src/trust/authority.ts
|
|
2980
3468
|
/**
|
|
2981
3469
|
* gkm's local certificate authority: one per machine, and every local edge's
|
|
@@ -4250,7 +4738,10 @@ async function reconcile(options) {
|
|
|
4250
4738
|
const sites = sitesFor(plan, project, options.addresses, options.processorAddresses);
|
|
4251
4739
|
const edged = plan.containers.includes("caddy");
|
|
4252
4740
|
const authorityPaths = options.authority ?? localAuthorityPaths();
|
|
4253
|
-
const caddyfile = toCaddyfile(sites, {
|
|
4741
|
+
const caddyfile = toCaddyfile(sites, {
|
|
4742
|
+
certificate: `${CADDY_SITES_IN_CONTAINER}/${stage}.pem`,
|
|
4743
|
+
edgeToken: edgeToken(project, seed)
|
|
4744
|
+
});
|
|
4254
4745
|
const hash = planHash(plan, compose, {
|
|
4255
4746
|
caddyfile,
|
|
4256
4747
|
postgres: postgresStatements(plan, project, seed).map((statement) => statement.create).join(";\n")
|
|
@@ -4542,7 +5033,8 @@ async function reconcileWorkspace(workspace, options) {
|
|
|
4542
5033
|
for (const outcome of result.logins) if (outcome.notice) console.log(outcome.notice);
|
|
4543
5034
|
return {
|
|
4544
5035
|
...result,
|
|
4545
|
-
manifest
|
|
5036
|
+
manifest,
|
|
5037
|
+
background
|
|
4546
5038
|
};
|
|
4547
5039
|
}
|
|
4548
5040
|
/**
|
|
@@ -4678,6 +5170,21 @@ function localAddress(port) {
|
|
|
4678
5170
|
* `gkm test` rewrites the same file, and running the tests must not quietly
|
|
4679
5171
|
* point these apps at the test databases.
|
|
4680
5172
|
*/
|
|
5173
|
+
var apps_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
5174
|
+
APPS_PROFILE: () => APPS_PROFILE,
|
|
5175
|
+
appEnvKeys: () => appEnvKeys,
|
|
5176
|
+
appProcess: () => appProcess,
|
|
5177
|
+
appServices: () => appServices,
|
|
5178
|
+
constructKeys: () => constructKeys,
|
|
5179
|
+
dockerfileOf: () => dockerfileOf,
|
|
5180
|
+
healthcheck: () => healthcheck,
|
|
5181
|
+
networkEnv: () => networkEnv,
|
|
5182
|
+
processEnv: () => processEnv,
|
|
5183
|
+
processEnvKeys: () => processEnvKeys,
|
|
5184
|
+
processorEnvKeys: () => processorEnvKeys,
|
|
5185
|
+
sitePublicArgs: () => sitePublicArgs,
|
|
5186
|
+
workerEnvKeys: () => workerEnvKeys
|
|
5187
|
+
});
|
|
4681
5188
|
/** The profile app services carry, so `gkm dev` starts only the containers. */
|
|
4682
5189
|
const APPS_PROFILE = "apps";
|
|
4683
5190
|
/**
|
|
@@ -4726,9 +5233,10 @@ function sitePublicArgs(manifest, appName, env) {
|
|
|
4726
5233
|
* name on the compose network — `postgres:5432` rather than the port
|
|
4727
5234
|
* published for the host.
|
|
4728
5235
|
*
|
|
4729
|
-
* The addresses of surfaces and sites are the caller's:
|
|
4730
|
-
*
|
|
4731
|
-
*
|
|
5236
|
+
* The addresses of surfaces and sites are the caller's: `gkm compose` hands
|
|
5237
|
+
* every process the public ones, which one app calls another on through the
|
|
5238
|
+
* edge; `gkm docker`'s apps profile, which runs no edge, the compose
|
|
5239
|
+
* network's.
|
|
4732
5240
|
*/
|
|
4733
5241
|
function networkEnv(plan, options, hostOf = (container) => container) {
|
|
4734
5242
|
const placeholders = {};
|
|
@@ -4806,7 +5314,6 @@ function workerEnvKeys(manifest, workerId) {
|
|
|
4806
5314
|
addEdgeKeys(manifest, require_discover.workerEdges(manifest, workerId), keys);
|
|
4807
5315
|
return keys;
|
|
4808
5316
|
}
|
|
4809
|
-
/** What each construct an edge reaches hands the process that reaches it. */
|
|
4810
5317
|
/**
|
|
4811
5318
|
* The keys a file server's processor unit reads: its bucket's, and what each
|
|
4812
5319
|
* of its processors depends on. `undefined` for a file server with none.
|
|
@@ -4818,6 +5325,91 @@ function processorEnvKeys(manifest, fileServerId) {
|
|
|
4818
5325
|
addEdgeKeys(manifest, [server.of, ...server.processors.flatMap((p) => p.dependencies.map((d) => d.target))], keys);
|
|
4819
5326
|
return keys;
|
|
4820
5327
|
}
|
|
5328
|
+
/**
|
|
5329
|
+
* The keys the declared constructs hand to some process — each scoped to the
|
|
5330
|
+
* processes with an edge to it. A stage key outside this set is the stage's
|
|
5331
|
+
* own: one set by hand, which nothing declares a reader of.
|
|
5332
|
+
*/
|
|
5333
|
+
function constructKeys(manifest) {
|
|
5334
|
+
const keys = /* @__PURE__ */ new Set();
|
|
5335
|
+
const add = (more) => {
|
|
5336
|
+
for (const key of more ?? []) keys.add(key);
|
|
5337
|
+
};
|
|
5338
|
+
for (const [id, declaration] of Object.entries(manifest)) {
|
|
5339
|
+
add(declaration.provides);
|
|
5340
|
+
add(declaration.requires);
|
|
5341
|
+
if (declaration.kind === "worker") add(workerEnvKeys(manifest, id));
|
|
5342
|
+
if (declaration.kind === "file-server") add(processorEnvKeys(manifest, id));
|
|
5343
|
+
if (declaration.kind === "rest-api" || declaration.kind === "websocket-api" || declaration.kind === "site" || declaration.kind === "mobile-app") add(appEnvKeys(manifest, require_config.appKey(id)));
|
|
5344
|
+
}
|
|
5345
|
+
return keys;
|
|
5346
|
+
}
|
|
5347
|
+
/**
|
|
5348
|
+
* The keys one process is handed — the one rule `gkm dev`, `gkm exec` and
|
|
5349
|
+
* `gkm compose` all apply, so an app gets the same keys whichever runs it:
|
|
5350
|
+
*
|
|
5351
|
+
* - **What its constructs reach**, by their edges: `appEnvKeys` for its app,
|
|
5352
|
+
* `workerEnvKeys` for each worker it runs, `processorEnvKeys` for each
|
|
5353
|
+
* file server's processors. A key a construct provides reaches only a
|
|
5354
|
+
* process with an edge to it, a stored one included — an auth server's
|
|
5355
|
+
* signing secret stays with the auth server.
|
|
5356
|
+
* - **The stack's edge token** (`EDGE_TOKEN_KEY`), which a call to a
|
|
5357
|
+
* sibling through the edge carries beside the client's address.
|
|
5358
|
+
* - **Every one of the stage's own keys** (`stageKeys` no construct
|
|
5359
|
+
* provides): a value set with `gkm secrets:set` that the code reads with
|
|
5360
|
+
* `get('X')`. Nothing declares which process reads it, so every process is
|
|
5361
|
+
* handed it — but for what gkm keeps for the stack itself (`isStackKey`):
|
|
5362
|
+
* a container's login, the backups key, the server's address.
|
|
5363
|
+
*
|
|
5364
|
+
* `undefined` for an app no declaration describes, which nothing narrows.
|
|
5365
|
+
*/
|
|
5366
|
+
function processEnvKeys(manifest, units, stageKeys) {
|
|
5367
|
+
const keys = /* @__PURE__ */ new Set();
|
|
5368
|
+
if (units.app !== void 0) {
|
|
5369
|
+
const own = appEnvKeys(manifest, units.app);
|
|
5370
|
+
if (!own && !units.workers?.length && !units.processors?.length) return;
|
|
5371
|
+
for (const key of own ?? []) keys.add(key);
|
|
5372
|
+
}
|
|
5373
|
+
for (const id of units.workers ?? []) for (const key of workerEnvKeys(manifest, id) ?? []) keys.add(key);
|
|
5374
|
+
for (const id of units.processors ?? []) for (const key of processorEnvKeys(manifest, id) ?? []) keys.add(key);
|
|
5375
|
+
keys.add(_geekmidas_manifest.EDGE_TOKEN_KEY);
|
|
5376
|
+
const owned = constructKeys(manifest);
|
|
5377
|
+
for (const key of stageKeys) if (!owned.has(key) && !isStackKey(key)) keys.add(key);
|
|
5378
|
+
return keys;
|
|
5379
|
+
}
|
|
5380
|
+
/**
|
|
5381
|
+
* One process's environment, from the stage's stored keys and every value
|
|
5382
|
+
* it resolved (`stageEnv`'s merge): exactly {@link processEnvKeys}.
|
|
5383
|
+
*/
|
|
5384
|
+
function processEnv(manifest, units, stored, resolved) {
|
|
5385
|
+
const env = stageEnv(stored, resolved);
|
|
5386
|
+
const keys = processEnvKeys(manifest, units, Object.keys(stored));
|
|
5387
|
+
if (!keys) return env;
|
|
5388
|
+
return Object.fromEntries(Object.entries(env).filter(([key]) => keys.has(key)));
|
|
5389
|
+
}
|
|
5390
|
+
/**
|
|
5391
|
+
* What an app's own process runs locally: its surface or site, and the
|
|
5392
|
+
* workers and processors whose code it holds — the same choice `gkm build`
|
|
5393
|
+
* makes (`workerUnits`, `processorUnits`).
|
|
5394
|
+
*
|
|
5395
|
+
* A worker no app can build is left out here: `gkm build` says so, and a
|
|
5396
|
+
* dev loop has nothing to run it in.
|
|
5397
|
+
*/
|
|
5398
|
+
function appProcess(workspace, manifest, background, appName) {
|
|
5399
|
+
const hosted = (units) => {
|
|
5400
|
+
try {
|
|
5401
|
+
return units().filter((unit) => unit.app === appName).map((unit) => unit.id);
|
|
5402
|
+
} catch (error) {
|
|
5403
|
+
if (error instanceof WorkerHasNoApp || error instanceof WorkerNameTaken || error instanceof ProcessorsHaveNoApp) return [];
|
|
5404
|
+
throw error;
|
|
5405
|
+
}
|
|
5406
|
+
};
|
|
5407
|
+
return {
|
|
5408
|
+
app: appName,
|
|
5409
|
+
workers: hosted(() => workerUnits(workspace, manifest, background)),
|
|
5410
|
+
processors: hosted(() => processorUnits(workspace, manifest))
|
|
5411
|
+
};
|
|
5412
|
+
}
|
|
4821
5413
|
function addEdgeKeys(manifest, edges, keys, client = false) {
|
|
4822
5414
|
for (const id of edges) {
|
|
4823
5415
|
const bucket = require_discover.eventsEdgeBucket(id);
|
|
@@ -4931,6 +5523,18 @@ function healthcheck(port, path) {
|
|
|
4931
5523
|
};
|
|
4932
5524
|
}
|
|
4933
5525
|
//#endregion
|
|
5526
|
+
Object.defineProperty(exports, "BACKUPS_SERVICE", {
|
|
5527
|
+
enumerable: true,
|
|
5528
|
+
get: function() {
|
|
5529
|
+
return BACKUPS_SERVICE;
|
|
5530
|
+
}
|
|
5531
|
+
});
|
|
5532
|
+
Object.defineProperty(exports, "BACKUPS_URL_KEY", {
|
|
5533
|
+
enumerable: true,
|
|
5534
|
+
get: function() {
|
|
5535
|
+
return BACKUPS_URL_KEY;
|
|
5536
|
+
}
|
|
5537
|
+
});
|
|
4934
5538
|
Object.defineProperty(exports, "COMPOSE_PATH", {
|
|
4935
5539
|
enumerable: true,
|
|
4936
5540
|
get: function() {
|
|
@@ -4955,18 +5559,42 @@ Object.defineProperty(exports, "LOCAL_TLD", {
|
|
|
4955
5559
|
return LOCAL_TLD;
|
|
4956
5560
|
}
|
|
4957
5561
|
});
|
|
5562
|
+
Object.defineProperty(exports, "OFFLINE_BUILD_ADDRESS", {
|
|
5563
|
+
enumerable: true,
|
|
5564
|
+
get: function() {
|
|
5565
|
+
return OFFLINE_BUILD_ADDRESS;
|
|
5566
|
+
}
|
|
5567
|
+
});
|
|
5568
|
+
Object.defineProperty(exports, "ORIGIN_VERIFY_HEADER", {
|
|
5569
|
+
enumerable: true,
|
|
5570
|
+
get: function() {
|
|
5571
|
+
return ORIGIN_VERIFY_HEADER;
|
|
5572
|
+
}
|
|
5573
|
+
});
|
|
4958
5574
|
Object.defineProperty(exports, "PROCESSORS_DEV_PREFIX", {
|
|
4959
5575
|
enumerable: true,
|
|
4960
5576
|
get: function() {
|
|
4961
5577
|
return PROCESSORS_DEV_PREFIX;
|
|
4962
5578
|
}
|
|
4963
5579
|
});
|
|
5580
|
+
Object.defineProperty(exports, "PROCESSOR_ORIGIN_SECRET_ENV", {
|
|
5581
|
+
enumerable: true,
|
|
5582
|
+
get: function() {
|
|
5583
|
+
return PROCESSOR_ORIGIN_SECRET_ENV;
|
|
5584
|
+
}
|
|
5585
|
+
});
|
|
4964
5586
|
Object.defineProperty(exports, "PROCESSOR_PORT", {
|
|
4965
5587
|
enumerable: true,
|
|
4966
5588
|
get: function() {
|
|
4967
5589
|
return PROCESSOR_PORT;
|
|
4968
5590
|
}
|
|
4969
5591
|
});
|
|
5592
|
+
Object.defineProperty(exports, "RUNNER_PATH", {
|
|
5593
|
+
enumerable: true,
|
|
5594
|
+
get: function() {
|
|
5595
|
+
return RUNNER_PATH;
|
|
5596
|
+
}
|
|
5597
|
+
});
|
|
4970
5598
|
Object.defineProperty(exports, "TELEMETRY_CONTAINER", {
|
|
4971
5599
|
enumerable: true,
|
|
4972
5600
|
get: function() {
|
|
@@ -4997,6 +5625,12 @@ Object.defineProperty(exports, "appImageOptions", {
|
|
|
4997
5625
|
return appImageOptions;
|
|
4998
5626
|
}
|
|
4999
5627
|
});
|
|
5628
|
+
Object.defineProperty(exports, "appProcess", {
|
|
5629
|
+
enumerable: true,
|
|
5630
|
+
get: function() {
|
|
5631
|
+
return appProcess;
|
|
5632
|
+
}
|
|
5633
|
+
});
|
|
5000
5634
|
Object.defineProperty(exports, "appTelemetry", {
|
|
5001
5635
|
enumerable: true,
|
|
5002
5636
|
get: function() {
|
|
@@ -5033,12 +5667,54 @@ Object.defineProperty(exports, "applyPostgres", {
|
|
|
5033
5667
|
return applyPostgres;
|
|
5034
5668
|
}
|
|
5035
5669
|
});
|
|
5670
|
+
Object.defineProperty(exports, "apps_exports", {
|
|
5671
|
+
enumerable: true,
|
|
5672
|
+
get: function() {
|
|
5673
|
+
return apps_exports;
|
|
5674
|
+
}
|
|
5675
|
+
});
|
|
5036
5676
|
Object.defineProperty(exports, "backendsOf", {
|
|
5037
5677
|
enumerable: true,
|
|
5038
5678
|
get: function() {
|
|
5039
5679
|
return backendsOf;
|
|
5040
5680
|
}
|
|
5041
5681
|
});
|
|
5682
|
+
Object.defineProperty(exports, "backupDatabases", {
|
|
5683
|
+
enumerable: true,
|
|
5684
|
+
get: function() {
|
|
5685
|
+
return backupDatabases;
|
|
5686
|
+
}
|
|
5687
|
+
});
|
|
5688
|
+
Object.defineProperty(exports, "backupExpiries", {
|
|
5689
|
+
enumerable: true,
|
|
5690
|
+
get: function() {
|
|
5691
|
+
return backupExpiries;
|
|
5692
|
+
}
|
|
5693
|
+
});
|
|
5694
|
+
Object.defineProperty(exports, "backupFile", {
|
|
5695
|
+
enumerable: true,
|
|
5696
|
+
get: function() {
|
|
5697
|
+
return backupFile;
|
|
5698
|
+
}
|
|
5699
|
+
});
|
|
5700
|
+
Object.defineProperty(exports, "backupsPrefix", {
|
|
5701
|
+
enumerable: true,
|
|
5702
|
+
get: function() {
|
|
5703
|
+
return backupsPrefix;
|
|
5704
|
+
}
|
|
5705
|
+
});
|
|
5706
|
+
Object.defineProperty(exports, "backupsRoleStatements", {
|
|
5707
|
+
enumerable: true,
|
|
5708
|
+
get: function() {
|
|
5709
|
+
return backupsRoleStatements;
|
|
5710
|
+
}
|
|
5711
|
+
});
|
|
5712
|
+
Object.defineProperty(exports, "backupsService", {
|
|
5713
|
+
enumerable: true,
|
|
5714
|
+
get: function() {
|
|
5715
|
+
return backupsService;
|
|
5716
|
+
}
|
|
5717
|
+
});
|
|
5042
5718
|
Object.defineProperty(exports, "bucketClient", {
|
|
5043
5719
|
enumerable: true,
|
|
5044
5720
|
get: function() {
|
|
@@ -5057,6 +5733,12 @@ Object.defineProperty(exports, "bucketPolicies", {
|
|
|
5057
5733
|
return bucketPolicies;
|
|
5058
5734
|
}
|
|
5059
5735
|
});
|
|
5736
|
+
Object.defineProperty(exports, "clientIpRule", {
|
|
5737
|
+
enumerable: true,
|
|
5738
|
+
get: function() {
|
|
5739
|
+
return clientIpRule;
|
|
5740
|
+
}
|
|
5741
|
+
});
|
|
5060
5742
|
Object.defineProperty(exports, "composeBuildPaths", {
|
|
5061
5743
|
enumerable: true,
|
|
5062
5744
|
get: function() {
|
|
@@ -5069,6 +5751,12 @@ Object.defineProperty(exports, "constructGlobs", {
|
|
|
5069
5751
|
return constructGlobs;
|
|
5070
5752
|
}
|
|
5071
5753
|
});
|
|
5754
|
+
Object.defineProperty(exports, "deploysWithCompose", {
|
|
5755
|
+
enumerable: true,
|
|
5756
|
+
get: function() {
|
|
5757
|
+
return deploysWithCompose;
|
|
5758
|
+
}
|
|
5759
|
+
});
|
|
5072
5760
|
Object.defineProperty(exports, "derivedContainers", {
|
|
5073
5761
|
enumerable: true,
|
|
5074
5762
|
get: function() {
|
|
@@ -5237,6 +5925,24 @@ Object.defineProperty(exports, "networkEnv", {
|
|
|
5237
5925
|
return networkEnv;
|
|
5238
5926
|
}
|
|
5239
5927
|
});
|
|
5928
|
+
Object.defineProperty(exports, "newOriginSecret", {
|
|
5929
|
+
enumerable: true,
|
|
5930
|
+
get: function() {
|
|
5931
|
+
return newOriginSecret;
|
|
5932
|
+
}
|
|
5933
|
+
});
|
|
5934
|
+
Object.defineProperty(exports, "offlineBuildHosts", {
|
|
5935
|
+
enumerable: true,
|
|
5936
|
+
get: function() {
|
|
5937
|
+
return offlineBuildHosts;
|
|
5938
|
+
}
|
|
5939
|
+
});
|
|
5940
|
+
Object.defineProperty(exports, "originSecretKey", {
|
|
5941
|
+
enumerable: true,
|
|
5942
|
+
get: function() {
|
|
5943
|
+
return originSecretKey;
|
|
5944
|
+
}
|
|
5945
|
+
});
|
|
5240
5946
|
Object.defineProperty(exports, "pgClient", {
|
|
5241
5947
|
enumerable: true,
|
|
5242
5948
|
get: function() {
|
|
@@ -5261,12 +5967,30 @@ Object.defineProperty(exports, "postgresStatements", {
|
|
|
5261
5967
|
return postgresStatements;
|
|
5262
5968
|
}
|
|
5263
5969
|
});
|
|
5970
|
+
Object.defineProperty(exports, "processEnv", {
|
|
5971
|
+
enumerable: true,
|
|
5972
|
+
get: function() {
|
|
5973
|
+
return processEnv;
|
|
5974
|
+
}
|
|
5975
|
+
});
|
|
5976
|
+
Object.defineProperty(exports, "processEnvKeys", {
|
|
5977
|
+
enumerable: true,
|
|
5978
|
+
get: function() {
|
|
5979
|
+
return processEnvKeys;
|
|
5980
|
+
}
|
|
5981
|
+
});
|
|
5264
5982
|
Object.defineProperty(exports, "processorEnvKeys", {
|
|
5265
5983
|
enumerable: true,
|
|
5266
5984
|
get: function() {
|
|
5267
5985
|
return processorEnvKeys;
|
|
5268
5986
|
}
|
|
5269
5987
|
});
|
|
5988
|
+
Object.defineProperty(exports, "processorOriginHost", {
|
|
5989
|
+
enumerable: true,
|
|
5990
|
+
get: function() {
|
|
5991
|
+
return processorOriginHost;
|
|
5992
|
+
}
|
|
5993
|
+
});
|
|
5270
5994
|
Object.defineProperty(exports, "processorUnitName", {
|
|
5271
5995
|
enumerable: true,
|
|
5272
5996
|
get: function() {
|
|
@@ -5315,6 +6039,18 @@ Object.defineProperty(exports, "resourceName", {
|
|
|
5315
6039
|
return resourceName;
|
|
5316
6040
|
}
|
|
5317
6041
|
});
|
|
6042
|
+
Object.defineProperty(exports, "runTime", {
|
|
6043
|
+
enumerable: true,
|
|
6044
|
+
get: function() {
|
|
6045
|
+
return runTime;
|
|
6046
|
+
}
|
|
6047
|
+
});
|
|
6048
|
+
Object.defineProperty(exports, "runsServer", {
|
|
6049
|
+
enumerable: true,
|
|
6050
|
+
get: function() {
|
|
6051
|
+
return runsServer;
|
|
6052
|
+
}
|
|
6053
|
+
});
|
|
5318
6054
|
Object.defineProperty(exports, "scopeTelemetryEnv", {
|
|
5319
6055
|
enumerable: true,
|
|
5320
6056
|
get: function() {
|
|
@@ -5327,6 +6063,24 @@ Object.defineProperty(exports, "siteClientTelemetry", {
|
|
|
5327
6063
|
return siteClientTelemetry;
|
|
5328
6064
|
}
|
|
5329
6065
|
});
|
|
6066
|
+
Object.defineProperty(exports, "siteOfflineHosts", {
|
|
6067
|
+
enumerable: true,
|
|
6068
|
+
get: function() {
|
|
6069
|
+
return siteOfflineHosts;
|
|
6070
|
+
}
|
|
6071
|
+
});
|
|
6072
|
+
Object.defineProperty(exports, "stackBackups", {
|
|
6073
|
+
enumerable: true,
|
|
6074
|
+
get: function() {
|
|
6075
|
+
return stackBackups;
|
|
6076
|
+
}
|
|
6077
|
+
});
|
|
6078
|
+
Object.defineProperty(exports, "stageBackups", {
|
|
6079
|
+
enumerable: true,
|
|
6080
|
+
get: function() {
|
|
6081
|
+
return stageBackups;
|
|
6082
|
+
}
|
|
6083
|
+
});
|
|
5330
6084
|
Object.defineProperty(exports, "stageEnv", {
|
|
5331
6085
|
enumerable: true,
|
|
5332
6086
|
get: function() {
|
|
@@ -5370,4 +6124,4 @@ Object.defineProperty(exports, "workspace_exports", {
|
|
|
5370
6124
|
}
|
|
5371
6125
|
});
|
|
5372
6126
|
|
|
5373
|
-
//# sourceMappingURL=apps-
|
|
6127
|
+
//# sourceMappingURL=apps-ClZkLcMz.cjs.map
|