@geekmidas/cli 10.0.0-alpha.19 → 10.0.0-alpha.190
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/README.md +323 -380
- package/bin/adjacent-tsconfig.mjs +46 -8
- package/bin/gkm.mjs +11 -3
- package/bin/owning-tsconfig-jsx-register.mjs +18 -0
- package/bin/owning-tsconfig-jsx.mjs +108 -0
- package/dist/EndpointGenerator-CBKH87_b.mjs +1043 -0
- package/dist/EndpointGenerator-CBKH87_b.mjs.map +1 -0
- package/dist/EndpointGenerator-iyA3HkOH.cjs +1102 -0
- package/dist/EndpointGenerator-iyA3HkOH.cjs.map +1 -0
- package/dist/LegacyStateStore-CWiswz6T.mjs +124 -0
- package/dist/LegacyStateStore-CWiswz6T.mjs.map +1 -0
- package/dist/LegacyStateStore-CuSe37fl.cjs +124 -0
- package/dist/LegacyStateStore-CuSe37fl.cjs.map +1 -0
- package/dist/LocalStateStore-BciJ_DF0.cjs +178 -0
- package/dist/LocalStateStore-BciJ_DF0.cjs.map +1 -0
- package/dist/LocalStateStore-CLHasLJI.mjs +167 -0
- package/dist/LocalStateStore-CLHasLJI.mjs.map +1 -0
- package/dist/OpenApiTsGenerator-CoVA3Ykv.mjs +534 -0
- package/dist/OpenApiTsGenerator-CoVA3Ykv.mjs.map +1 -0
- package/dist/OpenApiTsGenerator-vy-fOJgs.cjs +539 -0
- package/dist/OpenApiTsGenerator-vy-fOJgs.cjs.map +1 -0
- package/dist/S3StateStore-BHLRjoj3.cjs +222 -0
- package/dist/S3StateStore-BHLRjoj3.cjs.map +1 -0
- package/dist/S3StateStore-CTiv2_ON.mjs +223 -0
- package/dist/S3StateStore-CTiv2_ON.mjs.map +1 -0
- package/dist/SSMStateStore-BqT3MXXb.cjs +204 -0
- package/dist/SSMStateStore-BqT3MXXb.cjs.map +1 -0
- package/dist/SSMStateStore-D6qqaem2.mjs +205 -0
- package/dist/SSMStateStore-D6qqaem2.mjs.map +1 -0
- package/dist/SubscriberGenerator-Cfoz8uTY.mjs +787 -0
- package/dist/SubscriberGenerator-Cfoz8uTY.mjs.map +1 -0
- package/dist/SubscriberGenerator-CxzECrfj.cjs +852 -0
- package/dist/SubscriberGenerator-CxzECrfj.cjs.map +1 -0
- package/dist/add-B2OmIQzs.cjs +712 -0
- package/dist/add-B2OmIQzs.cjs.map +1 -0
- package/dist/add-CXwL549o.mjs +710 -0
- package/dist/add-CXwL549o.mjs.map +1 -0
- package/dist/appPorts-BoXMwolc.mjs +249 -0
- package/dist/appPorts-BoXMwolc.mjs.map +1 -0
- package/dist/appPorts-IW-OZmRi.cjs +296 -0
- package/dist/appPorts-IW-OZmRi.cjs.map +1 -0
- package/dist/aws-BXfiWNbi.cjs +108 -0
- package/dist/aws-BXfiWNbi.cjs.map +1 -0
- package/dist/aws-BjvSTTcE.mjs +97 -0
- package/dist/aws-BjvSTTcE.mjs.map +1 -0
- package/dist/awsStore-BYYCmXiq.mjs +121 -0
- package/dist/awsStore-BYYCmXiq.mjs.map +1 -0
- package/dist/awsStore-DKQUElJL.cjs +138 -0
- package/dist/awsStore-DKQUElJL.cjs.map +1 -0
- package/dist/{backup-provisioner-DIVCbfee.mjs → backup-provisioner-C8DnCmxK.mjs} +2 -2
- package/dist/backup-provisioner-C8DnCmxK.mjs.map +1 -0
- package/dist/{backup-provisioner-BmhIO_Yr.cjs → backup-provisioner-oDEsPj02.cjs} +2 -2
- package/dist/backup-provisioner-oDEsPj02.cjs.map +1 -0
- package/dist/backups/runner.cjs +1007 -0
- package/dist/backups/runner.cjs.map +1 -0
- package/dist/backups/runner.d.cts +187 -0
- package/dist/backups/runner.d.cts.map +1 -0
- package/dist/backups/runner.d.mts +187 -0
- package/dist/backups/runner.d.mts.map +1 -0
- package/dist/backups/runner.mjs +984 -0
- package/dist/backups/runner.mjs.map +1 -0
- package/dist/{bundler-mwH7WOb1.mjs → bundler-CHXyJFsS.mjs} +68 -15
- package/dist/bundler-CHXyJFsS.mjs.map +1 -0
- package/dist/{bundler-mjqGAvu1.cjs → bundler-CLoVtcBi.cjs} +67 -14
- package/dist/bundler-CLoVtcBi.cjs.map +1 -0
- package/dist/cli-Bjua3PaZ.mjs +80 -0
- package/dist/cli-Bjua3PaZ.mjs.map +1 -0
- package/dist/cli-DiuUr1Am.cjs +80 -0
- package/dist/cli-DiuUr1Am.cjs.map +1 -0
- package/dist/clientTelemetry-DXuYNH-J.d.cts +10 -0
- package/dist/clientTelemetry-DXuYNH-J.d.cts.map +1 -0
- package/dist/clientTelemetry-eC8VQ6nB.d.mts +10 -0
- package/dist/clientTelemetry-eC8VQ6nB.d.mts.map +1 -0
- package/dist/compose-DUOETDhc.mjs +2855 -0
- package/dist/compose-DUOETDhc.mjs.map +1 -0
- package/dist/compose-gnNrY3NQ.cjs +2939 -0
- package/dist/compose-gnNrY3NQ.cjs.map +1 -0
- package/dist/config-1zirYXeO.d.mts +300 -0
- package/dist/config-1zirYXeO.d.mts.map +1 -0
- package/dist/config-rSlB-bXj.d.cts +300 -0
- package/dist/config-rSlB-bXj.d.cts.map +1 -0
- package/dist/config.cjs +462 -9
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +4 -117
- package/dist/config.d.mts +4 -117
- package/dist/config.mjs +446 -3
- package/dist/config.mjs.map +1 -0
- package/dist/credentialSchemas-D_85KW2k.mjs +236 -0
- package/dist/credentialSchemas-D_85KW2k.mjs.map +1 -0
- package/dist/credentialSchemas-DjK6xKMk.cjs +271 -0
- package/dist/credentialSchemas-DjK6xKMk.cjs.map +1 -0
- package/dist/credentials-BI52H1ad.cjs +2911 -0
- package/dist/credentials-BI52H1ad.cjs.map +1 -0
- package/dist/credentials-Cp09PIsc.cjs +1451 -0
- package/dist/credentials-Cp09PIsc.cjs.map +1 -0
- package/dist/credentials-DbjLhvix.mjs +1140 -0
- package/dist/credentials-DbjLhvix.mjs.map +1 -0
- package/dist/credentials-VLP_959f.mjs +2390 -0
- package/dist/credentials-VLP_959f.mjs.map +1 -0
- package/dist/databases-CV22HzrI.mjs +588 -0
- package/dist/databases-CV22HzrI.mjs.map +1 -0
- package/dist/databases-DwYYH2mX.cjs +703 -0
- package/dist/databases-DwYYH2mX.cjs.map +1 -0
- package/dist/dbTunnel-CLsqWr7o.mjs +153 -0
- package/dist/dbTunnel-CLsqWr7o.mjs.map +1 -0
- package/dist/dbTunnel-DQcdaaLi.cjs +153 -0
- package/dist/dbTunnel-DQcdaaLi.cjs.map +1 -0
- package/dist/define-BfrNaY82.mjs +106 -0
- package/dist/define-BfrNaY82.mjs.map +1 -0
- package/dist/define-zKgLY65H.cjs +153 -0
- package/dist/define-zKgLY65H.cjs.map +1 -0
- package/dist/deploy/public.cjs +210 -0
- package/dist/deploy/public.cjs.map +1 -0
- package/dist/deploy/public.d.cts +659 -0
- package/dist/deploy/public.d.cts.map +1 -0
- package/dist/deploy/public.d.mts +659 -0
- package/dist/deploy/public.d.mts.map +1 -0
- package/dist/deploy/public.mjs +143 -0
- package/dist/deploy/public.mjs.map +1 -0
- package/dist/deploy/sniffer-envparser-worker.cjs +54 -0
- package/dist/deploy/sniffer-envparser-worker.cjs.map +1 -0
- package/dist/deploy/sniffer-envparser-worker.d.cts +1 -0
- package/dist/deploy/sniffer-envparser-worker.d.mts +1 -0
- package/dist/deploy/sniffer-envparser-worker.mjs +55 -0
- package/dist/deploy/sniffer-envparser-worker.mjs.map +1 -0
- package/dist/deploy/sniffer-hooks.cjs +1 -1
- package/dist/deploy/sniffer-hooks.mjs +1 -1
- package/dist/deploy/sniffer-loader.cjs +2 -2
- package/dist/deploy/sniffer-loader.mjs +1 -1
- package/dist/deploy/sniffer-routes-worker.cjs +2 -2
- package/dist/deploy/sniffer-routes-worker.mjs +1 -1
- package/dist/deploy-DhIy2Ftj.mjs +3854 -0
- package/dist/deploy-DhIy2Ftj.mjs.map +1 -0
- package/dist/deploy-DpQ_4Pu1.cjs +3910 -0
- package/dist/deploy-DpQ_4Pu1.cjs.map +1 -0
- package/dist/destroy-DmTDT6V7.cjs +791 -0
- package/dist/destroy-DmTDT6V7.cjs.map +1 -0
- package/dist/destroy-wV9yNLQV.mjs +790 -0
- package/dist/destroy-wV9yNLQV.mjs.map +1 -0
- package/dist/discover-Dfmn6HQ7.mjs +940 -0
- package/dist/discover-Dfmn6HQ7.mjs.map +1 -0
- package/dist/discover-OXczlq08.cjs +1085 -0
- package/dist/discover-OXczlq08.cjs.map +1 -0
- package/dist/dokploy-B61ww4Yb.cjs +38 -0
- package/dist/dokploy-B61ww4Yb.cjs.map +1 -0
- package/dist/dokploy-Jhl3sPd4.mjs +38 -0
- package/dist/dokploy-Jhl3sPd4.mjs.map +1 -0
- package/dist/drivers-BQRb3KsL.mjs +294 -0
- package/dist/drivers-BQRb3KsL.mjs.map +1 -0
- package/dist/drivers-DP7__dJX.cjs +377 -0
- package/dist/drivers-DP7__dJX.cjs.map +1 -0
- package/dist/eas-BmvO40xS.mjs +334 -0
- package/dist/eas-BmvO40xS.mjs.map +1 -0
- package/dist/eas-X09Gz8_E.cjs +337 -0
- package/dist/eas-X09Gz8_E.cjs.map +1 -0
- package/dist/emit-C4KSXOeS.mjs +153 -0
- package/dist/emit-C4KSXOeS.mjs.map +1 -0
- package/dist/emit-DiW0kbue.cjs +164 -0
- package/dist/emit-DiW0kbue.cjs.map +1 -0
- package/dist/encryption-BBIUewnL.cjs +90 -0
- package/dist/encryption-BBIUewnL.cjs.map +1 -0
- package/dist/encryption-BOmswIgE.mjs +89 -0
- package/dist/encryption-BOmswIgE.mjs.map +1 -0
- package/dist/engine-BhjhShKf.cjs +3333 -0
- package/dist/engine-BhjhShKf.cjs.map +1 -0
- package/dist/engine-DW2H3KNa.mjs +3220 -0
- package/dist/engine-DW2H3KNa.mjs.map +1 -0
- package/dist/errors-C9uIyIDt.mjs +27 -0
- package/dist/errors-C9uIyIDt.mjs.map +1 -0
- package/dist/errors-D1x8duqI.cjs +38 -0
- package/dist/errors-D1x8duqI.cjs.map +1 -0
- package/dist/github-Ptbigbrq.mjs +986 -0
- package/dist/github-Ptbigbrq.mjs.map +1 -0
- package/dist/github-xUtu4Ur7.cjs +987 -0
- package/dist/github-xUtu4Ur7.cjs.map +1 -0
- package/dist/googlePlay-B4xhz5xT.cjs +931 -0
- package/dist/googlePlay-B4xhz5xT.cjs.map +1 -0
- package/dist/googlePlay-C9rrwN5b.mjs +931 -0
- package/dist/googlePlay-C9rrwN5b.mjs.map +1 -0
- package/dist/iam-D7mXd6by.cjs +521 -0
- package/dist/iam-D7mXd6by.cjs.map +1 -0
- package/dist/iam-DNlbVN_l.mjs +442 -0
- package/dist/iam-DNlbVN_l.mjs.map +1 -0
- package/dist/{index-RCUizGxL.d.cts → index-B1gfXH5K.d.mts} +38 -14
- package/dist/index-B1gfXH5K.d.mts.map +1 -0
- package/dist/{index-B4H4XF7A.d.mts → index-CunkOPOu.d.cts} +38 -14
- package/dist/index-CunkOPOu.d.cts.map +1 -0
- package/dist/index.cjs +15566 -13457
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +15249 -13138
- package/dist/index.mjs.map +1 -1
- package/dist/local-CvC-z86k.mjs +224 -0
- package/dist/local-CvC-z86k.mjs.map +1 -0
- package/dist/local-DAJrhvSC.cjs +241 -0
- package/dist/local-DAJrhvSC.cjs.map +1 -0
- package/dist/migrate-0-A4BOcd.cjs +272 -0
- package/dist/migrate-0-A4BOcd.cjs.map +1 -0
- package/dist/migrate-C_36JSwV.mjs +181 -0
- package/dist/migrate-C_36JSwV.mjs.map +1 -0
- package/dist/migrate-DHbXzZIJ.mjs +267 -0
- package/dist/migrate-DHbXzZIJ.mjs.map +1 -0
- package/dist/migrate-fGWfv2DV.cjs +181 -0
- package/dist/migrate-fGWfv2DV.cjs.map +1 -0
- package/dist/next.cjs +59 -0
- package/dist/next.cjs.map +1 -0
- package/dist/next.d.cts +44 -0
- package/dist/next.d.cts.map +1 -0
- package/dist/next.d.mts +44 -0
- package/dist/next.d.mts.map +1 -0
- package/dist/next.mjs +58 -0
- package/dist/next.mjs.map +1 -0
- package/dist/openapi.cjs +213 -7
- package/dist/openapi.cjs.map +1 -0
- package/dist/openapi.d.cts +27 -8
- package/dist/openapi.d.cts.map +1 -1
- package/dist/openapi.d.mts +27 -8
- package/dist/openapi.d.mts.map +1 -1
- package/dist/openapi.mjs +208 -2
- package/dist/openapi.mjs.map +1 -0
- package/dist/projectBucket-BAoFOQtA.cjs +263 -0
- package/dist/projectBucket-BAoFOQtA.cjs.map +1 -0
- package/dist/projectBucket-Dxub09V1.mjs +222 -0
- package/dist/projectBucket-Dxub09V1.mjs.map +1 -0
- package/dist/provider-BvjDbsTR.mjs +46 -0
- package/dist/provider-BvjDbsTR.mjs.map +1 -0
- package/dist/provider-DLhgo-mB.cjs +57 -0
- package/dist/provider-DLhgo-mB.cjs.map +1 -0
- package/dist/publish-BX8_zXaf.cjs +124 -0
- package/dist/publish-BX8_zXaf.cjs.map +1 -0
- package/dist/publish-DE_yBzlz.mjs +123 -0
- package/dist/publish-DE_yBzlz.mjs.map +1 -0
- package/dist/ready-DCvnFZnJ.cjs +404 -0
- package/dist/ready-DCvnFZnJ.cjs.map +1 -0
- package/dist/ready-sSPuiZ7N.mjs +375 -0
- package/dist/ready-sSPuiZ7N.mjs.map +1 -0
- package/dist/reconcile/public.cjs +3 -5
- package/dist/reconcile/public.d.cts +33 -89
- package/dist/reconcile/public.d.cts.map +1 -1
- package/dist/reconcile/public.d.mts +33 -89
- package/dist/reconcile/public.d.mts.map +1 -1
- package/dist/reconcile/public.mjs +3 -3
- package/dist/reconcile--I7V4Klj.mjs +34 -0
- package/dist/reconcile--I7V4Klj.mjs.map +1 -0
- package/dist/reconcile-CuCQBa5-.cjs +34 -0
- package/dist/reconcile-CuCQBa5-.cjs.map +1 -0
- package/dist/resolve-CPB2jkB4.cjs +316 -0
- package/dist/resolve-CPB2jkB4.cjs.map +1 -0
- package/dist/resolve-DCPtP7-X.mjs +263 -0
- package/dist/resolve-DCPtP7-X.mjs.map +1 -0
- package/dist/rollback-sefKrjlE.mjs +137 -0
- package/dist/rollback-sefKrjlE.mjs.map +1 -0
- package/dist/rollback-ygh2qRWo.cjs +166 -0
- package/dist/rollback-ygh2qRWo.cjs.map +1 -0
- package/dist/runtime-BwiWhqkI.d.cts +82 -0
- package/dist/runtime-BwiWhqkI.d.cts.map +1 -0
- package/dist/runtime-Dx5F8-IL.d.mts +82 -0
- package/dist/runtime-Dx5F8-IL.d.mts.map +1 -0
- package/dist/s3-Bcvbg8io.cjs +240 -0
- package/dist/s3-Bcvbg8io.cjs.map +1 -0
- package/dist/s3-DK1ofU4f.mjs +240 -0
- package/dist/s3-DK1ofU4f.mjs.map +1 -0
- package/dist/sandbox/config-worker.cjs +43 -0
- package/dist/sandbox/config-worker.cjs.map +1 -0
- package/dist/sandbox/config-worker.d.cts +1 -0
- package/dist/sandbox/config-worker.d.mts +1 -0
- package/dist/sandbox/config-worker.mjs +44 -0
- package/dist/sandbox/config-worker.mjs.map +1 -0
- package/dist/sandbox/credentials-worker.cjs +53 -0
- package/dist/sandbox/credentials-worker.cjs.map +1 -0
- package/dist/sandbox/credentials-worker.d.cts +1 -0
- package/dist/sandbox/credentials-worker.d.mts +1 -0
- package/dist/sandbox/credentials-worker.mjs +54 -0
- package/dist/sandbox/credentials-worker.mjs.map +1 -0
- package/dist/sandbox/discover-worker.cjs +47 -0
- package/dist/sandbox/discover-worker.cjs.map +1 -0
- package/dist/sandbox/discover-worker.d.cts +1 -0
- package/dist/sandbox/discover-worker.d.mts +1 -0
- package/dist/sandbox/discover-worker.mjs +48 -0
- package/dist/sandbox/discover-worker.mjs.map +1 -0
- package/dist/sandbox/migrate-worker.cjs +75 -0
- package/dist/sandbox/migrate-worker.cjs.map +1 -0
- package/dist/sandbox/migrate-worker.d.cts +1 -0
- package/dist/sandbox/migrate-worker.d.mts +1 -0
- package/dist/sandbox/migrate-worker.mjs +76 -0
- package/dist/sandbox/migrate-worker.mjs.map +1 -0
- package/dist/{workspace-CRD9YinV.cjs → schemas-BCwKKA42.mjs} +399 -1179
- package/dist/schemas-BCwKKA42.mjs.map +1 -0
- package/dist/{workspace-Bu3xNCej.mjs → schemas-BQ_v0lEX.cjs} +487 -982
- package/dist/schemas-BQ_v0lEX.cjs.map +1 -0
- package/dist/secretsManager-CjTo6CRq.mjs +113 -0
- package/dist/secretsManager-CjTo6CRq.mjs.map +1 -0
- package/dist/secretsManager-CvmBGjdM.cjs +124 -0
- package/dist/secretsManager-CvmBGjdM.cjs.map +1 -0
- package/dist/seeds-Bc3niNVb.cjs +382 -0
- package/dist/seeds-Bc3niNVb.cjs.map +1 -0
- package/dist/seeds-Ccn0Ru2T.mjs +299 -0
- package/dist/seeds-Ccn0Ru2T.mjs.map +1 -0
- package/dist/serverSetup-ClU2iSeU.cjs +686 -0
- package/dist/serverSetup-ClU2iSeU.cjs.map +1 -0
- package/dist/serverSetup-D68Otrp0.mjs +686 -0
- package/dist/serverSetup-D68Otrp0.mjs.map +1 -0
- package/dist/sniffer-CFOmQQit.cjs +1997 -0
- package/dist/sniffer-CFOmQQit.cjs.map +1 -0
- package/dist/sniffer-CRF3eD_B.mjs +1824 -0
- package/dist/sniffer-CRF3eD_B.mjs.map +1 -0
- package/dist/snsSubscriptions-CwA6Ceg2.mjs +1024 -0
- package/dist/snsSubscriptions-CwA6Ceg2.mjs.map +1 -0
- package/dist/snsSubscriptions-S_CMCXqI.cjs +1149 -0
- package/dist/snsSubscriptions-S_CMCXqI.cjs.map +1 -0
- package/dist/sst-BgG7dJJu.cjs +514 -0
- package/dist/sst-BgG7dJJu.cjs.map +1 -0
- package/dist/sst-CDnHFO3U.mjs +491 -0
- package/dist/sst-CDnHFO3U.mjs.map +1 -0
- package/dist/stack-BXmLQf3K.mjs +10920 -0
- package/dist/stack-BXmLQf3K.mjs.map +1 -0
- package/dist/stack-BtnflNSa.cjs +11901 -0
- package/dist/stack-BtnflNSa.cjs.map +1 -0
- package/dist/stage-BbQidxxa.mjs +302 -0
- package/dist/stage-BbQidxxa.mjs.map +1 -0
- package/dist/stage-ssuPXLhP.cjs +331 -0
- package/dist/stage-ssuPXLhP.cjs.map +1 -0
- package/dist/stages-CQwD2QxS.cjs +190 -0
- package/dist/stages-CQwD2QxS.cjs.map +1 -0
- package/dist/stages-MA2sXnX4.mjs +190 -0
- package/dist/stages-MA2sXnX4.mjs.map +1 -0
- package/dist/target/public.cjs +15 -0
- package/dist/target/public.d.cts +28 -0
- package/dist/target/public.d.cts.map +1 -0
- package/dist/target/public.d.mts +28 -0
- package/dist/target/public.d.mts.map +1 -0
- package/dist/target/public.mjs +4 -0
- package/dist/terminal-BEGE1AEV.mjs +85 -0
- package/dist/terminal-BEGE1AEV.mjs.map +1 -0
- package/dist/terminal-BecJpgA3.cjs +85 -0
- package/dist/terminal-BecJpgA3.cjs.map +1 -0
- package/dist/{types-7R81hu0i.d.mts → types-BvokH0ya.d.cts} +2235 -459
- package/dist/types-BvokH0ya.d.cts.map +1 -0
- package/dist/{types-N7c2O2m7.d.cts → types-DmLnGeii.d.mts} +2233 -459
- package/dist/types-DmLnGeii.d.mts.map +1 -0
- package/dist/utils-CdKxD8Lt.mjs +156 -0
- package/dist/utils-CdKxD8Lt.mjs.map +1 -0
- package/dist/utils-DBqXbB8P.cjs +205 -0
- package/dist/utils-DBqXbB8P.cjs.map +1 -0
- package/dist/vitest.cjs +65 -0
- package/dist/vitest.cjs.map +1 -0
- package/dist/vitest.d.cts +29 -0
- package/dist/vitest.d.cts.map +1 -0
- package/dist/vitest.d.mts +29 -0
- package/dist/vitest.d.mts.map +1 -0
- package/dist/vitest.mjs +65 -0
- package/dist/vitest.mjs.map +1 -0
- package/dist/workerRuntime-BXfhbe13.cjs +108 -0
- package/dist/workerRuntime-BXfhbe13.cjs.map +1 -0
- package/dist/workerRuntime-CsOyBRx2.mjs +79 -0
- package/dist/workerRuntime-CsOyBRx2.mjs.map +1 -0
- package/dist/workspace/index.cjs +6 -2
- package/dist/workspace/index.d.cts +3 -3
- package/dist/workspace/index.d.mts +3 -3
- package/dist/workspace/index.mjs +2 -2
- package/dist/workspace-DEmfa9RO.cjs +3689 -0
- package/dist/workspace-DEmfa9RO.cjs.map +1 -0
- package/dist/workspace-RgU7TBgg.mjs +3133 -0
- package/dist/workspace-RgU7TBgg.mjs.map +1 -0
- package/package.json +76 -13
- package/dist/HostingerProvider-BY26bWwB.mjs +0 -243
- package/dist/HostingerProvider-BY26bWwB.mjs.map +0 -1
- package/dist/HostingerProvider-BZFGYYVA.cjs +0 -243
- package/dist/HostingerProvider-BZFGYYVA.cjs.map +0 -1
- package/dist/LocalStateProvider-7HR6SS2t.cjs +0 -48
- package/dist/LocalStateProvider-7HR6SS2t.cjs.map +0 -1
- package/dist/LocalStateProvider-D7QyJoLM.mjs +0 -48
- package/dist/LocalStateProvider-D7QyJoLM.mjs.map +0 -1
- package/dist/Route53Provider-Cvj40A8I.mjs +0 -209
- package/dist/Route53Provider-Cvj40A8I.mjs.map +0 -1
- package/dist/Route53Provider-DVILBsvV.cjs +0 -209
- package/dist/Route53Provider-DVILBsvV.cjs.map +0 -1
- package/dist/SSMStateProvider-B0Hu1MKZ.mjs +0 -75
- package/dist/SSMStateProvider-B0Hu1MKZ.mjs.map +0 -1
- package/dist/SSMStateProvider-VrQ-yeqd.cjs +0 -74
- package/dist/SSMStateProvider-VrQ-yeqd.cjs.map +0 -1
- package/dist/backup-provisioner-BmhIO_Yr.cjs.map +0 -1
- package/dist/backup-provisioner-DIVCbfee.mjs.map +0 -1
- package/dist/bundler-mjqGAvu1.cjs.map +0 -1
- package/dist/bundler-mwH7WOb1.mjs.map +0 -1
- package/dist/config-DSXI480r.cjs +0 -467
- package/dist/config-DSXI480r.cjs.map +0 -1
- package/dist/config-DdKkoUE1.mjs +0 -414
- package/dist/config-DdKkoUE1.mjs.map +0 -1
- package/dist/config.d.cts.map +0 -1
- package/dist/config.d.mts.map +0 -1
- package/dist/credentials-C6Pfn6GY.cjs +0 -2939
- package/dist/credentials-C6Pfn6GY.cjs.map +0 -1
- package/dist/credentials-lbv-j0Be.mjs +0 -2802
- package/dist/credentials-lbv-j0Be.mjs.map +0 -1
- package/dist/discover-BERGFg8v.cjs +0 -288
- package/dist/discover-BERGFg8v.cjs.map +0 -1
- package/dist/discover-CK-n3w6b.mjs +0 -244
- package/dist/discover-CK-n3w6b.mjs.map +0 -1
- package/dist/emit-BdoPFjZf.cjs +0 -253
- package/dist/emit-BdoPFjZf.cjs.map +0 -1
- package/dist/emit-Bzq7JsMP.mjs +0 -224
- package/dist/emit-Bzq7JsMP.mjs.map +0 -1
- package/dist/generator-LfZU7NlU.mjs +0 -247
- package/dist/generator-LfZU7NlU.mjs.map +0 -1
- package/dist/generator-Wdfp0jCS.cjs +0 -282
- package/dist/generator-Wdfp0jCS.cjs.map +0 -1
- package/dist/github-BvfpvBcW.cjs +0 -216
- package/dist/github-BvfpvBcW.cjs.map +0 -1
- package/dist/github-DW3CP-4D.mjs +0 -216
- package/dist/github-DW3CP-4D.mjs.map +0 -1
- package/dist/index-B4H4XF7A.d.mts.map +0 -1
- package/dist/index-RCUizGxL.d.cts.map +0 -1
- package/dist/openapi-B8bu_OXN.cjs +0 -2038
- package/dist/openapi-B8bu_OXN.cjs.map +0 -1
- package/dist/openapi-DfjbhrsM.mjs +0 -1991
- package/dist/openapi-DfjbhrsM.mjs.map +0 -1
- package/dist/reconcile-gb1lz1Dk.mjs +0 -113
- package/dist/reconcile-gb1lz1Dk.mjs.map +0 -1
- package/dist/reconcile-hx_vBvux.cjs +0 -136
- package/dist/reconcile-hx_vBvux.cjs.map +0 -1
- package/dist/ssm-BKN1Cg4z.mjs +0 -60
- package/dist/ssm-BKN1Cg4z.mjs.map +0 -1
- package/dist/ssm-FxeSAt35.cjs +0 -60
- package/dist/ssm-FxeSAt35.cjs.map +0 -1
- package/dist/storage-DgypfSD6.cjs +0 -351
- package/dist/storage-DgypfSD6.cjs.map +0 -1
- package/dist/storage-TP0x118M.mjs +0 -304
- package/dist/storage-TP0x118M.mjs.map +0 -1
- package/dist/transfer-DjFZRgub.mjs +0 -122
- package/dist/transfer-DjFZRgub.mjs.map +0 -1
- package/dist/transfer-SeiSeKEF.cjs +0 -151
- package/dist/transfer-SeiSeKEF.cjs.map +0 -1
- package/dist/types-7R81hu0i.d.mts.map +0 -1
- package/dist/types-N7c2O2m7.d.cts.map +0 -1
- package/dist/workspace-Bu3xNCej.mjs.map +0 -1
- package/dist/workspace-CRD9YinV.cjs.map +0 -1
|
@@ -1,4 +1,149 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "@geekmidas/edge";
|
|
2
|
+
import { ComposeProxy } from "@geekmidas/edge/routes";
|
|
3
|
+
import { ConstructManifest, Declaration } from "@geekmidas/manifest";
|
|
4
|
+
//#endregion
|
|
5
|
+
//#region src/errors.d.ts
|
|
6
|
+
declare class GkmError extends Error {}
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/sandbox/sandbox.d.ts
|
|
9
|
+
/** Where a command's output goes. */
|
|
10
|
+
type SandboxOutput = 'capture' | 'inherit' | 'stderr' | 'ignore';
|
|
11
|
+
interface SandboxExecOptions {
|
|
12
|
+
/**
|
|
13
|
+
* Where the command runs: the project root or a directory below it, as an
|
|
14
|
+
* absolute path or relative to the root. Anywhere else is refused with
|
|
15
|
+
* {@link SandboxCwdEscape}.
|
|
16
|
+
*/
|
|
17
|
+
cwd: string;
|
|
18
|
+
/**
|
|
19
|
+
* The command's whole environment. Nothing of the host's is added to it:
|
|
20
|
+
* start from {@link Sandbox.env} and add what the step needs.
|
|
21
|
+
*/
|
|
22
|
+
env: Readonly<Record<string, string>>;
|
|
23
|
+
/**
|
|
24
|
+
* How long the command may run before it is killed. Required: a step that
|
|
25
|
+
* waits forever — a sniffed entry that opens a server, a build stuck on a
|
|
26
|
+
* prompt — would otherwise hold the deploy, and its lock, forever.
|
|
27
|
+
*/
|
|
28
|
+
timeoutMs: number;
|
|
29
|
+
/**
|
|
30
|
+
* Files the command can read, by name. Mounted in a directory of their own
|
|
31
|
+
* — named by `GKM_SECRETS_DIR` in the command's environment — and removed
|
|
32
|
+
* when it exits. Never set as variables, which every child inherits, a
|
|
33
|
+
* crash report prints and `/proc/<pid>/environ` shows.
|
|
34
|
+
*/
|
|
35
|
+
secrets?: Readonly<Record<string, string>>;
|
|
36
|
+
/**
|
|
37
|
+
* `capture` (the default) returns stdout and stderr in the result;
|
|
38
|
+
* `inherit` gives the command the host's terminal; `stderr` sends both
|
|
39
|
+
* streams to the host's stderr; `ignore` discards them.
|
|
40
|
+
*/
|
|
41
|
+
output?: SandboxOutput;
|
|
42
|
+
/** Kills the command when aborted; `exec` rejects with the signal's reason. */
|
|
43
|
+
signal?: AbortSignal;
|
|
44
|
+
}
|
|
45
|
+
/** How a command ended. A non-zero exit is a result, not an error. */
|
|
46
|
+
interface SandboxResult {
|
|
47
|
+
exitCode: number | null;
|
|
48
|
+
signal: string | null;
|
|
49
|
+
/** What it wrote to stdout, when its output was captured. */
|
|
50
|
+
stdout: string;
|
|
51
|
+
/** What it wrote to stderr, when its output was captured. */
|
|
52
|
+
stderr: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Runs a command against the project, and nothing else of the host's.
|
|
56
|
+
*
|
|
57
|
+
* `exec` resolves with the result however the command exited. It rejects
|
|
58
|
+
* with {@link CommandTimedOut} once the timeout passes — after the command is
|
|
59
|
+
* gone — with {@link SandboxCwdEscape} for a directory outside the project,
|
|
60
|
+
* with the signal's reason when aborted, and with the spawn error when the
|
|
61
|
+
* program cannot be started.
|
|
62
|
+
*/
|
|
63
|
+
interface Sandbox {
|
|
64
|
+
/** The project: the directory every command runs at or below. */
|
|
65
|
+
readonly root: string;
|
|
66
|
+
/**
|
|
67
|
+
* Whether the code it runs is kept from the host: its files, its
|
|
68
|
+
* processes, its memory.
|
|
69
|
+
*
|
|
70
|
+
* An isolating sandbox shares nothing but what crosses `exec`, so a config
|
|
71
|
+
* reaches the deploy as data — a live object in it (a custom state store,
|
|
72
|
+
* an inline target) cannot cross, and is refused with
|
|
73
|
+
* `ConfigObjectNotSerializable`. A non-isolating one, like
|
|
74
|
+
* {@link LocalSandbox}, runs on the host as the host's user; a project
|
|
75
|
+
* whose config holds live objects is then loaded in-process as before,
|
|
76
|
+
* because a project trusted to run there is trusted to do that.
|
|
77
|
+
*/
|
|
78
|
+
readonly isolating: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* The environment a command starts from: what any program needs to run
|
|
81
|
+
* here — `PATH`, `HOME`, the locale — and no credential.
|
|
82
|
+
*/
|
|
83
|
+
readonly env: Readonly<Record<string, string>>;
|
|
84
|
+
exec(command: string, args: readonly string[], options: SandboxExecOptions): Promise<SandboxResult>;
|
|
85
|
+
}
|
|
86
|
+
/** The variable naming the directory a command's secrets are mounted in. */
|
|
87
|
+
declare const SECRETS_DIR_ENV = "GKM_SECRETS_DIR";
|
|
88
|
+
/** A command was asked to run outside the project. */
|
|
89
|
+
declare class SandboxCwdEscape extends GkmError {
|
|
90
|
+
readonly cwd: string;
|
|
91
|
+
readonly root: string;
|
|
92
|
+
constructor(cwd: string, root: string);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* `cwd` as an absolute directory inside `root`, or {@link SandboxCwdEscape}.
|
|
96
|
+
*
|
|
97
|
+
* Symlinks are resolved on both sides first, so a link inside the project
|
|
98
|
+
* that points out of it is an escape, and a project reached through a link
|
|
99
|
+
* (`/tmp` on macOS) is still itself. For a sandbox of a host's own to call
|
|
100
|
+
* before it runs anything.
|
|
101
|
+
*/
|
|
102
|
+
declare function confineCwd(root: string, cwd: string): string;
|
|
103
|
+
/** A secret's file name: one path segment, so it cannot be written elsewhere. */
|
|
104
|
+
declare class SecretNameInvalid extends GkmError {
|
|
105
|
+
readonly secretName: string;
|
|
106
|
+
constructor(secretName: string);
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region src/deploy/identity.d.ts
|
|
110
|
+
interface DeployIdentity {
|
|
111
|
+
/**
|
|
112
|
+
* Whose deploy this is — an organisation, a team, a repository. Two
|
|
113
|
+
* workspaces with the same name are told apart by it. Defaults to the
|
|
114
|
+
* kebab-cased workspace name; set `deploy.namespace` to choose one.
|
|
115
|
+
*/
|
|
116
|
+
readonly namespace: string;
|
|
117
|
+
/** The workspace name as the target spells it: lowercase, `[a-z0-9-]`. */
|
|
118
|
+
readonly project: string;
|
|
119
|
+
readonly stage: string;
|
|
120
|
+
/**
|
|
121
|
+
* `<namespace>/<project>`: what a Dokploy project is claimed by.
|
|
122
|
+
*
|
|
123
|
+
* The stage is not part of it because one Dokploy project holds every stage
|
|
124
|
+
* of a workspace, each as an environment — the key has to be the same from
|
|
125
|
+
* every stage that deploys into it.
|
|
126
|
+
*/
|
|
127
|
+
readonly key: string;
|
|
128
|
+
/**
|
|
129
|
+
* The prefix every name on the target carries: the project alone in the
|
|
130
|
+
* default namespace, `<namespace>-<project>` in any other.
|
|
131
|
+
*
|
|
132
|
+
* The default adds nothing so that a workspace that never set a namespace
|
|
133
|
+
* keeps the names it was already deployed under — a Postgres is found by
|
|
134
|
+
* its name, and a new name would be a new, empty database.
|
|
135
|
+
*/
|
|
136
|
+
readonly scope: string;
|
|
137
|
+
}
|
|
138
|
+
/** What an identity is derived from: a workspace's name and namespace. */
|
|
139
|
+
interface IdentitySource {
|
|
140
|
+
name: string;
|
|
141
|
+
deploy?: {
|
|
142
|
+
namespace?: string;
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
declare function deployIdentity(workspace: IdentitySource, stage: string): DeployIdentity;
|
|
146
|
+
//#endregion
|
|
2
147
|
//#region src/secrets/types.d.ts
|
|
3
148
|
/** Credentials for a specific service */
|
|
4
149
|
interface ServiceCredentials {
|
|
@@ -8,8 +153,6 @@ interface ServiceCredentials {
|
|
|
8
153
|
password: string;
|
|
9
154
|
/** Database name (for postgres) */
|
|
10
155
|
database?: string;
|
|
11
|
-
/** Virtual host (for rabbitmq) */
|
|
12
|
-
vhost?: string;
|
|
13
156
|
/** Bucket name (for minio) */
|
|
14
157
|
bucket?: string;
|
|
15
158
|
/** Access key ID (for localstack) */
|
|
@@ -25,45 +168,91 @@ interface StageSecrets {
|
|
|
25
168
|
createdAt: string;
|
|
26
169
|
/** ISO timestamp when secrets were last updated */
|
|
27
170
|
updatedAt: string;
|
|
28
|
-
/** Event backend type (if events are enabled) */
|
|
29
|
-
eventsBackend?: EventsBackend;
|
|
30
171
|
/** Service-specific credentials */
|
|
31
172
|
services: {
|
|
32
173
|
postgres?: ServiceCredentials;
|
|
33
174
|
redis?: ServiceCredentials;
|
|
34
|
-
rabbitmq?: ServiceCredentials;
|
|
35
175
|
minio?: ServiceCredentials;
|
|
36
176
|
mailpit?: ServiceCredentials;
|
|
37
177
|
localstack?: ServiceCredentials;
|
|
38
|
-
pgboss?: ServiceCredentials;
|
|
39
178
|
};
|
|
40
179
|
/** Generated connection URLs */
|
|
41
180
|
urls: {
|
|
42
181
|
DATABASE_URL?: string;
|
|
43
182
|
REDIS_URL?: string;
|
|
44
|
-
RABBITMQ_URL?: string;
|
|
45
183
|
STORAGE_ENDPOINT?: string;
|
|
46
184
|
SMTP_HOST?: string;
|
|
47
185
|
SMTP_PORT?: string;
|
|
48
|
-
EVENT_PUBLISHER_CONNECTION_STRING?: string;
|
|
49
|
-
EVENT_SUBSCRIBER_CONNECTION_STRING?: string;
|
|
50
186
|
};
|
|
51
|
-
/**
|
|
187
|
+
/**
|
|
188
|
+
* Values injected by key: those set with `gkm secrets:set` — a third
|
|
189
|
+
* party's credentials — and those generated once for the stage, such as an
|
|
190
|
+
* auth server's signing secret.
|
|
191
|
+
*/
|
|
52
192
|
custom: Record<string, string>;
|
|
193
|
+
/**
|
|
194
|
+
* Random, generated once per stage: what every password a deploy derives
|
|
195
|
+
* is salted with. Without it a derived password is a function of the
|
|
196
|
+
* project and stage names, which anyone reading the repo has.
|
|
197
|
+
*/
|
|
198
|
+
seed?: string;
|
|
53
199
|
}
|
|
54
200
|
//#endregion
|
|
55
201
|
//#region src/secrets/store.d.ts
|
|
56
202
|
interface SecretsStore {
|
|
57
|
-
/**
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
203
|
+
/**
|
|
204
|
+
* Which kind of store this is — `'file'`, `'s3'`, `'ssm'`,
|
|
205
|
+
* `'secrets-manager'`, or a custom one's.
|
|
206
|
+
*/
|
|
207
|
+
readonly name: string;
|
|
208
|
+
/** The stage's secrets, or null when it has none here. */
|
|
209
|
+
read(stage: string): Promise<StageSecrets | null>;
|
|
210
|
+
/** Replace the stage's secrets. */
|
|
211
|
+
write(stage: string, secrets: StageSecrets): Promise<void>;
|
|
212
|
+
/**
|
|
213
|
+
* Delete the stage's secrets, every kept version of them included — what
|
|
214
|
+
* `gkm compose --destroy --secrets` does. Optional for a custom store; one
|
|
215
|
+
* without it cannot have its stage's secrets destroyed by gkm.
|
|
216
|
+
*/
|
|
217
|
+
delete?(stage: string): Promise<void>;
|
|
61
218
|
}
|
|
62
219
|
/** Secrets in SSM Parameter Store, in the account of the active credentials. */
|
|
63
220
|
interface SsmSecretsStoreConfig {
|
|
64
221
|
provider: 'ssm';
|
|
65
222
|
region: string;
|
|
66
223
|
}
|
|
224
|
+
/**
|
|
225
|
+
* Secrets in AWS Secrets Manager, in the account of the active credentials:
|
|
226
|
+
* one secret per stage, `gkm/<project>/<stage>/secrets`. Up to 64 KB where
|
|
227
|
+
* SSM holds 8 KB, at a monthly price per secret.
|
|
228
|
+
*/
|
|
229
|
+
interface SecretsManagerSecretsStoreConfig {
|
|
230
|
+
provider: 'secrets-manager';
|
|
231
|
+
region: string;
|
|
232
|
+
/**
|
|
233
|
+
* The KMS key (id, ARN or alias) a stage's secret is created with. Unset,
|
|
234
|
+
* it is the account's AWS-managed `aws/secretsmanager` key.
|
|
235
|
+
*/
|
|
236
|
+
kmsKeyId?: string;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Secrets in S3, one object per stage —
|
|
240
|
+
* `<prefix>/<project>/<stage>/secrets.json` — in the project bucket beside the
|
|
241
|
+
* deploy state and backups, or in a bucket that exists. Encrypted with SSE-S3,
|
|
242
|
+
* every past document kept by the bucket's versioning, and no size limit.
|
|
243
|
+
*/
|
|
244
|
+
interface S3SecretsStoreConfig {
|
|
245
|
+
provider: 's3';
|
|
246
|
+
/**
|
|
247
|
+
* A bucket that already exists. Omitted, the project bucket —
|
|
248
|
+
* `gkm-<project>-<account id>`, created by the first write.
|
|
249
|
+
*/
|
|
250
|
+
bucket?: string;
|
|
251
|
+
/** The bucket's region. Omitted, the deploy state's, when it is in S3. */
|
|
252
|
+
region?: string;
|
|
253
|
+
/** Key prefix inside the bucket. Omitted, the S3 state's, else `gkm`. */
|
|
254
|
+
prefix?: string;
|
|
255
|
+
}
|
|
67
256
|
/** Any other backend: an object implementing {@link SecretsStore}. */
|
|
68
257
|
interface CustomSecretsStoreConfig {
|
|
69
258
|
provider: SecretsStore;
|
|
@@ -72,18 +261,64 @@ interface CustomSecretsStoreConfig {
|
|
|
72
261
|
* `secrets.store` in gkm.config.ts.
|
|
73
262
|
*
|
|
74
263
|
* `'file'` — the default — keeps each stage's secrets in the encrypted
|
|
75
|
-
* `.gkm/secrets/<stage>.json
|
|
76
|
-
*
|
|
264
|
+
* `.gkm/secrets/<stage>.json`, its key in the CLI's home (`GKM_HOME`, else
|
|
265
|
+
* `~/.gkm`). It cannot serve a
|
|
266
|
+
* deploy from CI while `.gkm/` is gitignored; `s3`, `ssm`, `secrets-manager`
|
|
267
|
+
* or a custom store can.
|
|
77
268
|
*/
|
|
78
|
-
type SecretsStoreConfig = 'file' | SsmSecretsStoreConfig | CustomSecretsStoreConfig;
|
|
269
|
+
type SecretsStoreConfig = 'file' | S3SecretsStoreConfig | SsmSecretsStoreConfig | SecretsManagerSecretsStoreConfig | CustomSecretsStoreConfig;
|
|
79
270
|
//#endregion
|
|
80
|
-
//#region src/
|
|
271
|
+
//#region src/compose/cdnConfig.d.ts
|
|
272
|
+
/** The CDNs `deploy.cdn` can name. */
|
|
273
|
+
declare const CDN_PROVIDERS: readonly ['cloudflare'];
|
|
274
|
+
type CdnProvider = (typeof CDN_PROVIDERS)[number];
|
|
81
275
|
/**
|
|
82
|
-
*
|
|
276
|
+
* Where the server's certificate for the hosts the CDN answers comes from —
|
|
277
|
+
* what the CDN checks when it connects to the server:
|
|
83
278
|
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
279
|
+
* - `'origin'` (the default): one the CDN issues for its origin — Cloudflare's
|
|
280
|
+
* Origin CA, through the deploy's token — valid 15 years and trusted by
|
|
281
|
+
* the CDN alone. Kept in the stage's secrets; the server holds no token.
|
|
282
|
+
* - `'dns'`: Let's Encrypt, over the DNS challenge, which the shared Traefik
|
|
283
|
+
* edge answers through the CDN's DNS with `CF_DNS_API_TOKEN`.
|
|
284
|
+
*/
|
|
285
|
+
declare const CDN_CERTIFICATES: readonly ['origin', 'dns'];
|
|
286
|
+
type CdnCertificate = (typeof CDN_CERTIFICATES)[number];
|
|
287
|
+
/**
|
|
288
|
+
* One deployed stage's CDN — `deploy.cdn.<stage>`. `false`, or a stage the
|
|
289
|
+
* map leaves out, serves every host straight from the server.
|
|
290
|
+
*/
|
|
291
|
+
type StageCdnConfig = {
|
|
292
|
+
provider: CdnProvider;
|
|
293
|
+
certificate?: CdnCertificate;
|
|
294
|
+
} | false;
|
|
295
|
+
//#endregion
|
|
296
|
+
//#region src/deploy/actor.d.ts
|
|
297
|
+
/**
|
|
298
|
+
* Who wrote a stage's deploy state: a GitHub Actions run, or a person at a
|
|
299
|
+
* machine. Recorded on every state write (`updatedBy`), on every resource
|
|
300
|
+
* record and on every release (`releasedBy`), so "who put this here" has an
|
|
301
|
+
* answer that does not depend on anyone's memory.
|
|
86
302
|
*/
|
|
303
|
+
/** A GitHub Actions run: the account that triggered it and the run's page. */
|
|
304
|
+
interface GithubActor {
|
|
305
|
+
kind: 'github';
|
|
306
|
+
/** `GITHUB_ACTOR` — the account that triggered the run. */
|
|
307
|
+
actor: string;
|
|
308
|
+
/** `<server>/<repository>/actions/runs/<run id>` */
|
|
309
|
+
run: string;
|
|
310
|
+
/** `GITHUB_WORKFLOW` — the workflow's name. */
|
|
311
|
+
workflow?: string;
|
|
312
|
+
}
|
|
313
|
+
/** A person at a machine. */
|
|
314
|
+
interface LocalActor {
|
|
315
|
+
kind: 'local';
|
|
316
|
+
user: string;
|
|
317
|
+
host: string;
|
|
318
|
+
}
|
|
319
|
+
type Actor = GithubActor | LocalActor;
|
|
320
|
+
//#endregion
|
|
321
|
+
//#region src/deploy/state.d.ts
|
|
87
322
|
/**
|
|
88
323
|
* Per-app database credentials
|
|
89
324
|
*/
|
|
@@ -138,12 +373,30 @@ interface BackupState {
|
|
|
138
373
|
/** Timestamp when backup was configured */
|
|
139
374
|
createdAt: string;
|
|
140
375
|
}
|
|
376
|
+
/** What every target's state for a stage holds. */
|
|
377
|
+
interface StageStateCore {
|
|
378
|
+
stage: string;
|
|
379
|
+
lastDeployedAt: string;
|
|
380
|
+
/**
|
|
381
|
+
* The deploy identity's key (`<namespace>/<project>`) that last deployed
|
|
382
|
+
* this stage — what the project's ownership marker says.
|
|
383
|
+
*/
|
|
384
|
+
identity?: string;
|
|
385
|
+
/**
|
|
386
|
+
* Each app's releases, keyed by app name: what runs now, what ran before
|
|
387
|
+
* it — which `gkm deploy:rollback` restores — and the history behind both.
|
|
388
|
+
*/
|
|
389
|
+
releases?: Record<string, AppReleases>;
|
|
390
|
+
}
|
|
391
|
+
/** A compose stage's state: the core, and nothing Dokploy-specific. */
|
|
392
|
+
interface ComposeStageState extends StageStateCore {
|
|
393
|
+
provider: 'compose';
|
|
394
|
+
}
|
|
141
395
|
/**
|
|
142
396
|
* State for a single stage deployment
|
|
143
397
|
*/
|
|
144
|
-
interface DokployStageState {
|
|
398
|
+
interface DokployStageState extends StageStateCore {
|
|
145
399
|
provider: 'dokploy';
|
|
146
|
-
stage: string;
|
|
147
400
|
/** Dokploy project ID - created on first deploy */
|
|
148
401
|
projectId: string;
|
|
149
402
|
environmentId: string;
|
|
@@ -162,64 +415,1150 @@ interface DokployStageState {
|
|
|
162
415
|
dnsRecords?: Record<string, CreatedDnsRecord>;
|
|
163
416
|
/** Backup destination state */
|
|
164
417
|
backups?: BackupState;
|
|
165
|
-
|
|
418
|
+
/**
|
|
419
|
+
* The Dokploy registry the stage's images are pulled through. Kept per
|
|
420
|
+
* stage rather than once per machine, so a stage keeps the registry it was
|
|
421
|
+
* deployed with whoever deploys it next.
|
|
422
|
+
*/
|
|
423
|
+
registryId?: string;
|
|
166
424
|
}
|
|
425
|
+
/** A stage's state, whichever target wrote it. */
|
|
426
|
+
type StageState = DokployStageState | ComposeStageState;
|
|
427
|
+
/** An image a stage runs: the ref it was pushed as, and what it resolved to. */
|
|
428
|
+
interface DeployedImage {
|
|
429
|
+
ref: string;
|
|
430
|
+
/**
|
|
431
|
+
* The tag it was released under — a site's carries its stage
|
|
432
|
+
* (`v1.4.0-production`). Recorded by targets that pull a release by tag.
|
|
433
|
+
*/
|
|
434
|
+
tag?: string;
|
|
435
|
+
/** The registry's digest, `sha256:…` — absent if it could not be read. */
|
|
436
|
+
digest?: string;
|
|
437
|
+
}
|
|
438
|
+
/** An image that went live, and when. */
|
|
439
|
+
interface ReleasedImage extends DeployedImage {
|
|
440
|
+
/** The image tag the deploy released under. */
|
|
441
|
+
tag?: string;
|
|
442
|
+
releasedAt: string;
|
|
443
|
+
/** Who released it — absent on a release recorded before it was kept. */
|
|
444
|
+
releasedBy?: Actor;
|
|
445
|
+
/** Set when a rollback replaced it: it is never rolled back *to*. */
|
|
446
|
+
rolledBack?: true;
|
|
447
|
+
}
|
|
448
|
+
/** An app's releases: what runs, what ran before it, and what ran before that. */
|
|
449
|
+
interface AppReleases {
|
|
450
|
+
current: ReleasedImage;
|
|
451
|
+
/** What a rollback restores; absent until a second release. */
|
|
452
|
+
previous?: ReleasedImage;
|
|
453
|
+
/** Every release, newest first, at most {@link RELEASE_HISTORY} of them. */
|
|
454
|
+
history: ReleasedImage[];
|
|
455
|
+
}
|
|
456
|
+
//#endregion
|
|
457
|
+
//#region src/deploy/StateStore.d.ts
|
|
458
|
+
/** Opaque: a file hash, an SSM parameter version or an S3 ETag. */
|
|
459
|
+
type StateVersion = string;
|
|
460
|
+
/**
|
|
461
|
+
* `pending` is written before the call that creates the resource, `ready`
|
|
462
|
+
* once the target has returned its id. A run that finds a `pending` record
|
|
463
|
+
* knows a previous run may have created the resource and should look for it
|
|
464
|
+
* before creating another.
|
|
465
|
+
*/
|
|
466
|
+
type ResourceStatus = 'pending' | 'ready';
|
|
467
|
+
interface ResourceRecord {
|
|
468
|
+
/** Unique within the stage, `<type>:<name>` — e.g. `application:api`. */
|
|
469
|
+
key: string;
|
|
470
|
+
/** What kind of resource it is — e.g. `application`, `postgres`. */
|
|
471
|
+
type: string;
|
|
472
|
+
/** The id the target gave it. Absent while `pending`. */
|
|
473
|
+
id?: string;
|
|
474
|
+
status: ResourceStatus;
|
|
475
|
+
/** Whatever the target needs to adopt the resource on a later run. */
|
|
476
|
+
data?: Record<string, unknown>;
|
|
477
|
+
updatedAt: string;
|
|
478
|
+
/** Who wrote the record — absent on one written before it was kept. */
|
|
479
|
+
updatedBy?: Actor;
|
|
480
|
+
}
|
|
481
|
+
/** A resource as a caller hands it to `putResource`; the store stamps it. */
|
|
482
|
+
type ResourceInput = Omit<ResourceRecord, 'updatedAt' | 'updatedBy'>;
|
|
483
|
+
/** One write of a stage's state: which, when, by whom, doing what. */
|
|
484
|
+
interface HistoryEntry {
|
|
485
|
+
serial: number;
|
|
486
|
+
at: string;
|
|
487
|
+
by: Actor;
|
|
488
|
+
/** The lock's operation — `deploy`, `rollback`, `setup`, `state:push` … */
|
|
489
|
+
operation: string;
|
|
490
|
+
}
|
|
491
|
+
interface StoredStageState {
|
|
492
|
+
state: StageState;
|
|
493
|
+
resources: Record<string, ResourceRecord>;
|
|
494
|
+
/** The latest writes, newest first. */
|
|
495
|
+
history: HistoryEntry[];
|
|
496
|
+
/** Pass back as `expectedVersion` to write on top of exactly this read. */
|
|
497
|
+
version: StateVersion;
|
|
498
|
+
}
|
|
499
|
+
interface WriteOptions {
|
|
500
|
+
/**
|
|
501
|
+
* The version this write is based on — `null` to create state that must
|
|
502
|
+
* not exist yet.
|
|
503
|
+
*/
|
|
504
|
+
expectedVersion: StateVersion | null;
|
|
505
|
+
}
|
|
506
|
+
interface ResourceWriteOptions {
|
|
507
|
+
/**
|
|
508
|
+
* Omitted, the record is applied on top of whatever is stored now (still
|
|
509
|
+
* conditionally, so a concurrent write raises rather than being lost).
|
|
510
|
+
*/
|
|
511
|
+
expectedVersion?: StateVersion;
|
|
512
|
+
}
|
|
513
|
+
interface LockHolder {
|
|
514
|
+
/** Unique per acquisition, so a release never removes someone else's lock. */
|
|
515
|
+
id: string;
|
|
516
|
+
owner: string;
|
|
517
|
+
host: string;
|
|
518
|
+
pid: number;
|
|
519
|
+
acquiredAt: string;
|
|
520
|
+
/** What the holder is doing, e.g. `deploy`. */
|
|
521
|
+
operation?: string;
|
|
522
|
+
}
|
|
523
|
+
interface LockOptions {
|
|
524
|
+
operation?: string;
|
|
525
|
+
}
|
|
526
|
+
interface StateLock {
|
|
527
|
+
readonly stage: string;
|
|
528
|
+
readonly holder: LockHolder;
|
|
529
|
+
/** Removes the lock if it is still this one; safe to call twice. */
|
|
530
|
+
release(): Promise<void>;
|
|
531
|
+
}
|
|
532
|
+
interface StateStore {
|
|
533
|
+
/** Takes the stage's lock, or raises `StateLocked` naming its holder. */
|
|
534
|
+
lock(stage: string, options?: LockOptions): Promise<StateLock>;
|
|
535
|
+
/**
|
|
536
|
+
* Removes the stage's lock whoever holds it, for a run that crashed with
|
|
537
|
+
* it held. Returns the holder it removed, or `null` if there was none.
|
|
538
|
+
*/
|
|
539
|
+
forceUnlock(stage: string): Promise<LockHolder | null>;
|
|
540
|
+
read(stage: string): Promise<StoredStageState | null>;
|
|
541
|
+
/** Replaces the stage's state, keeping its resource records. */
|
|
542
|
+
write(stage: string, state: StageState, options: WriteOptions): Promise<StateVersion>;
|
|
543
|
+
putResource(stage: string, record: ResourceInput, options?: ResourceWriteOptions): Promise<StateVersion>;
|
|
544
|
+
deleteResource(stage: string, key: string, options?: ResourceWriteOptions): Promise<StateVersion>;
|
|
545
|
+
/**
|
|
546
|
+
* How big the stage's document is as this store would write it, against
|
|
547
|
+
* the most it can hold — for a store with a limit (SSM). `null` when the
|
|
548
|
+
* stage has no state yet.
|
|
549
|
+
*/
|
|
550
|
+
capacity?(stage: string): Promise<StateCapacity | null>;
|
|
551
|
+
}
|
|
552
|
+
/** A stored document's size against the store's limit, in bytes. */
|
|
553
|
+
interface StateCapacity {
|
|
554
|
+
bytes: number;
|
|
555
|
+
limit: number;
|
|
556
|
+
location: string;
|
|
557
|
+
/** The store's AWS region, for the message that suggests S3. */
|
|
558
|
+
region?: string;
|
|
559
|
+
}
|
|
560
|
+
declare class StateLocked extends GkmError {
|
|
561
|
+
readonly stage: string;
|
|
562
|
+
readonly holder: LockHolder | null;
|
|
563
|
+
readonly location: string;
|
|
564
|
+
constructor(stage: string, holder: LockHolder | null, location: string);
|
|
565
|
+
}
|
|
566
|
+
declare class StateVersionConflict extends GkmError {
|
|
567
|
+
readonly stage: string;
|
|
568
|
+
readonly expectedVersion: StateVersion | null;
|
|
569
|
+
readonly actualVersion: StateVersion | null;
|
|
570
|
+
constructor(stage: string, expectedVersion: StateVersion | null, actualVersion: StateVersion | null);
|
|
571
|
+
}
|
|
572
|
+
/**
|
|
573
|
+
* A deploy, setup or rollback of a stage in CI, with the stage's state kept on
|
|
574
|
+
* the runner — which is discarded when the job ends.
|
|
575
|
+
*/
|
|
576
|
+
declare class LocalStateInCi extends GkmError {
|
|
577
|
+
readonly stage: string;
|
|
578
|
+
readonly operation: string;
|
|
579
|
+
readonly region: string;
|
|
580
|
+
constructor(stage: string, operation: string, region: string);
|
|
581
|
+
}
|
|
582
|
+
//#endregion
|
|
583
|
+
//#region src/deploy/StateProvider.d.ts
|
|
584
|
+
/**
|
|
585
|
+
* Interface for deployment state storage providers.
|
|
586
|
+
*
|
|
587
|
+
* Implementations must handle:
|
|
588
|
+
* - Reading state for a stage (returns null if not found)
|
|
589
|
+
* - Writing state for a stage (creates or updates)
|
|
590
|
+
*/
|
|
591
|
+
interface StateProvider {
|
|
592
|
+
/**
|
|
593
|
+
* Read deployment state for a stage.
|
|
594
|
+
*
|
|
595
|
+
* @param stage - The deployment stage (e.g., 'development', 'production')
|
|
596
|
+
* @returns The state object or null if not found
|
|
597
|
+
*/
|
|
598
|
+
read(stage: string): Promise<StageState | null>;
|
|
599
|
+
/**
|
|
600
|
+
* Write deployment state for a stage.
|
|
601
|
+
*
|
|
602
|
+
* @param stage - The deployment stage
|
|
603
|
+
* @param state - The state object to persist
|
|
604
|
+
*/
|
|
605
|
+
write(stage: string, state: StageState): Promise<void>;
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* Valid AWS regions.
|
|
609
|
+
*/
|
|
610
|
+
type AwsRegion = 'us-east-1' | 'us-east-2' | 'us-west-1' | 'us-west-2' | 'af-south-1' | 'ap-east-1' | 'ap-south-1' | 'ap-south-2' | 'ap-southeast-1' | 'ap-southeast-2' | 'ap-southeast-3' | 'ap-southeast-4' | 'ap-northeast-1' | 'ap-northeast-2' | 'ap-northeast-3' | 'ca-central-1' | 'eu-central-1' | 'eu-central-2' | 'eu-west-1' | 'eu-west-2' | 'eu-west-3' | 'eu-south-1' | 'eu-south-2' | 'eu-north-1' | 'me-south-1' | 'me-central-1' | 'sa-east-1';
|
|
611
|
+
/**
|
|
612
|
+
* Local state provider config.
|
|
613
|
+
*/
|
|
614
|
+
interface LocalStateConfig {
|
|
615
|
+
provider: 'local';
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* SSM state provider config (requires region).
|
|
619
|
+
*/
|
|
620
|
+
interface SSMStateConfig {
|
|
621
|
+
provider: 'ssm';
|
|
622
|
+
/** AWS region (required for SSM provider) */
|
|
623
|
+
region: AwsRegion;
|
|
624
|
+
/** AWS profile name (optional - uses default credential chain if not provided) */
|
|
625
|
+
profile?: string;
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* S3 state config: one object per stage, written with conditional puts
|
|
629
|
+
* (`If-Match` / `If-None-Match`), and a lock object beside it.
|
|
630
|
+
*
|
|
631
|
+
* Keys: `<prefix>/<workspace name>/<stage>/state.json` and `lock.json`.
|
|
632
|
+
*/
|
|
633
|
+
interface S3StateConfig {
|
|
634
|
+
provider: 's3';
|
|
635
|
+
/**
|
|
636
|
+
* Bucket the state lives in; it must already exist. Omitted, the project
|
|
637
|
+
* bucket — `gkm-<project>-<account id>`, created by the first deploy.
|
|
638
|
+
*/
|
|
639
|
+
bucket?: string;
|
|
640
|
+
/** AWS region of the bucket */
|
|
641
|
+
region: AwsRegion;
|
|
642
|
+
/** Key prefix inside the bucket (default: `gkm`) */
|
|
643
|
+
prefix?: string;
|
|
644
|
+
/** AWS profile name (optional - uses default credential chain if not provided) */
|
|
645
|
+
profile?: string;
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* Custom state provider config.
|
|
649
|
+
*/
|
|
650
|
+
interface CustomStateConfig {
|
|
651
|
+
/**
|
|
652
|
+
* Custom implementation. A `StateStore` is used as is; a `StateProvider`
|
|
653
|
+
* still works, but cannot lock — deploy warns `StateStoreWithoutLocking`.
|
|
654
|
+
*/
|
|
655
|
+
provider: StateProvider | StateStore;
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* State configuration types.
|
|
659
|
+
*/
|
|
660
|
+
type StateConfig = LocalStateConfig | SSMStateConfig | S3StateConfig | CustomStateConfig;
|
|
661
|
+
//#endregion
|
|
662
|
+
//#region src/reconcile/discover.d.ts
|
|
663
|
+
/** The construct face discovery needs: an id, and the ability to declare. */
|
|
664
|
+
interface Declarable {
|
|
665
|
+
id: string;
|
|
666
|
+
declare(): Declaration[];
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* Whether a module export is a construct.
|
|
670
|
+
*
|
|
671
|
+
* Deliberately loose about what else it carries — a construct that also has a
|
|
672
|
+
* `service` is still a construct, and requiring one would exclude the kinds that
|
|
673
|
+
* own no address.
|
|
674
|
+
*/
|
|
675
|
+
declare function isDeclarable(value: unknown): value is Declarable;
|
|
676
|
+
interface DiscoverOptions {
|
|
677
|
+
/** The glob(s) to search. One pattern, not one per kind. */
|
|
678
|
+
patterns: string | readonly string[];
|
|
679
|
+
cwd?: string;
|
|
680
|
+
/**
|
|
681
|
+
* Re-import changed modules, for the dev watcher.
|
|
682
|
+
*
|
|
683
|
+
* A single glob makes discovery more central, not less: a new construct file
|
|
684
|
+
* has to be picked up on `add`, not only on `change`.
|
|
685
|
+
*/
|
|
686
|
+
bustCache?: boolean;
|
|
687
|
+
/**
|
|
688
|
+
* Filled in with where each construct was found, when provided.
|
|
689
|
+
*
|
|
690
|
+
* Discovery is the only thing that knows: it globbed the files and imported
|
|
691
|
+
* them. Everything downstream that needs to *write* an import — the build,
|
|
692
|
+
* generating a server entry that reads a surface's logger — would otherwise
|
|
693
|
+
* have to be told the path in config, which is the string this removes.
|
|
694
|
+
*
|
|
695
|
+
* An out-parameter rather than a second return value so that every existing
|
|
696
|
+
* caller, which wants the manifest and nothing else, is unchanged.
|
|
697
|
+
*/
|
|
698
|
+
sources?: Record<string, ConstructSource>;
|
|
699
|
+
/**
|
|
700
|
+
* Filled in, when provided, with the files each worker's background work is
|
|
701
|
+
* declared in — its crons, queue consumers and topic subscribers — keyed by
|
|
702
|
+
* the worker.
|
|
703
|
+
*
|
|
704
|
+
* What says which app's build carries a worker's entry: the one whose
|
|
705
|
+
* directory holds its work. A worker declares no path of its own.
|
|
706
|
+
*/
|
|
707
|
+
background?: Record<string, string[]>;
|
|
708
|
+
/**
|
|
709
|
+
* Filled in, when provided, with the files that export something built
|
|
710
|
+
* from each surface — an endpoint, a WebSocket route — keyed by the
|
|
711
|
+
* surface. What a surface that serves itself imports its routes from.
|
|
712
|
+
*/
|
|
713
|
+
served?: Record<string, string[]>;
|
|
714
|
+
/**
|
|
715
|
+
* Filled in, when provided, with each worker's subscribers — by the export
|
|
716
|
+
* a push route is named after, and the key its deliveries come from: its
|
|
717
|
+
* topic's, or its bucket's events — keyed by the worker.
|
|
718
|
+
*
|
|
719
|
+
* What says which worker SNS pushes to, and on which paths: a build bound
|
|
720
|
+
* for a server records no subscriber in the manifest, because none has a
|
|
721
|
+
* handler of its own there.
|
|
722
|
+
*/
|
|
723
|
+
subscribers?: Record<string, BoundSubscriber[]>;
|
|
724
|
+
/**
|
|
725
|
+
* Import the construct modules in this sandbox rather than in this
|
|
726
|
+
* process. Defaults to the run's own (`withSandbox`), so a deploy's every
|
|
727
|
+
* discovery — the engine's included — happens there; with neither, they
|
|
728
|
+
* are imported here, as before.
|
|
729
|
+
*/
|
|
730
|
+
sandbox?: Sandbox;
|
|
731
|
+
}
|
|
732
|
+
/** A worker's subscriber — to a topic or to a bucket — as discovery found it. */
|
|
733
|
+
interface BoundSubscriber {
|
|
734
|
+
/** Its export — what its push route is named after. */
|
|
735
|
+
name: string;
|
|
736
|
+
/**
|
|
737
|
+
* The env key its deliveries come from: its topic's publisher connection
|
|
738
|
+
* string, or its bucket's events connection string. An `sns://` value is
|
|
739
|
+
* what makes SNS push to it.
|
|
740
|
+
*/
|
|
741
|
+
connectionKey: string;
|
|
742
|
+
/**
|
|
743
|
+
* The event types a topic subscriber names — its SNS subscription's filter
|
|
744
|
+
* on the `type` attribute the topic's publisher sets. Absent for a
|
|
745
|
+
* bucket's subscriber: S3 sets no such attribute, and the subscriber's own
|
|
746
|
+
* filter decides.
|
|
747
|
+
*/
|
|
748
|
+
events?: readonly string[];
|
|
749
|
+
}
|
|
750
|
+
/** Importing a construct module, or declaring one, threw in the sandbox. */
|
|
751
|
+
declare class ConstructDiscoveryFailed extends Error {
|
|
752
|
+
readonly errorName: string;
|
|
753
|
+
readonly detail: string;
|
|
754
|
+
constructor(errorName: string, detail: string);
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* The constructs' declarations hold something that is not data, and the
|
|
758
|
+
* sandbox they were discovered in hands the deploy nothing but data.
|
|
759
|
+
*/
|
|
760
|
+
declare class ConstructsNotSerializable extends Error {
|
|
761
|
+
readonly paths: readonly string[];
|
|
762
|
+
constructor(paths: readonly string[]);
|
|
763
|
+
}
|
|
764
|
+
/** Where a construct was declared, and under what name. */
|
|
765
|
+
interface ConstructSource {
|
|
766
|
+
/** Absolute path to the module that exported it. */
|
|
767
|
+
file: string;
|
|
768
|
+
/** The name it was exported as — what an import statement has to say. */
|
|
769
|
+
exportName: string;
|
|
770
|
+
/**
|
|
771
|
+
* The exported construct itself.
|
|
772
|
+
*
|
|
773
|
+
* What a declaration cannot say — whether it serves itself — the object can
|
|
774
|
+
* be asked, and discovery already imported it.
|
|
775
|
+
*/
|
|
776
|
+
construct: unknown;
|
|
777
|
+
}
|
|
778
|
+
/**
|
|
779
|
+
* Build the construct manifest for a project.
|
|
780
|
+
*
|
|
781
|
+
* Runs the manifest's own validation before returning, so an app is wrong here
|
|
782
|
+
* — where the error names a file — rather than at deploy.
|
|
783
|
+
*
|
|
784
|
+
* @throws {DuplicateConstruct} when two exports claim one id.
|
|
785
|
+
*/
|
|
786
|
+
declare function discover(options: DiscoverOptions): Promise<ConstructManifest>;
|
|
787
|
+
//#endregion
|
|
788
|
+
//#region src/providers/types.d.ts
|
|
789
|
+
/** The manifest kinds a stage can name a provider for. */
|
|
790
|
+
declare const PROVIDER_KINDS: readonly ['objects', 'inbox', 'email'];
|
|
791
|
+
type ProviderKind = (typeof PROVIDER_KINDS)[number];
|
|
792
|
+
//#endregion
|
|
793
|
+
//#region src/providers/ses/config.d.ts
|
|
794
|
+
/** `inbox: { provider: 'ses' }` — each inbox received by SES in the stage's account. */
|
|
795
|
+
interface SesInboxConfig {
|
|
796
|
+
provider: 'ses';
|
|
797
|
+
/**
|
|
798
|
+
* Where mail is received, and the inbox's bucket and topic live. Defaults
|
|
799
|
+
* to the secrets store's region, then `AWS_REGION` — and must be one SES
|
|
800
|
+
* receives mail in.
|
|
801
|
+
*/
|
|
802
|
+
region?: string;
|
|
803
|
+
}
|
|
804
|
+
/**
|
|
805
|
+
* `email: { provider: 'ses' }` — each mail construct sends through SES's SMTP
|
|
806
|
+
* interface in the stage's account.
|
|
807
|
+
*/
|
|
808
|
+
interface SesEmailConfig {
|
|
809
|
+
provider: 'ses';
|
|
810
|
+
/**
|
|
811
|
+
* Where mail is sent from: the identity, and the SMTP endpoint the URL
|
|
812
|
+
* names. Defaults to the secrets store's region, then `AWS_REGION`.
|
|
813
|
+
*/
|
|
814
|
+
region?: string;
|
|
815
|
+
/**
|
|
816
|
+
* The address mail is sent from — what `<ID>_FROM` holds. Its domain is
|
|
817
|
+
* the SES identity the deploy verifies. Defaults to `noreply@` the
|
|
818
|
+
* stage's domain.
|
|
819
|
+
*/
|
|
820
|
+
from?: string;
|
|
821
|
+
}
|
|
822
|
+
//#endregion
|
|
823
|
+
//#region src/deploy/credentials.d.ts
|
|
824
|
+
/**
|
|
825
|
+
* What each kind of credential is asked for with, and what it is.
|
|
826
|
+
*
|
|
827
|
+
* A target that needs a kind the CLI does not know declares it by augmenting
|
|
828
|
+
* this interface, and lists it in its `credentials`:
|
|
829
|
+
*
|
|
830
|
+
* ```ts
|
|
831
|
+
* declare module '@geekmidas/cli/target' {
|
|
832
|
+
* interface CredentialKinds {
|
|
833
|
+
* fly: { request: { org: string }; value: { token: string } };
|
|
834
|
+
* }
|
|
835
|
+
* }
|
|
836
|
+
* ```
|
|
837
|
+
*/
|
|
838
|
+
interface CredentialKinds {
|
|
839
|
+
/** The Dokploy API a stage deploys through. */
|
|
840
|
+
dokploy: {
|
|
841
|
+
/** `deploy.dokploy.endpoint`, when the config names one. */
|
|
842
|
+
request: {
|
|
843
|
+
endpoint?: string;
|
|
844
|
+
};
|
|
845
|
+
value: {
|
|
846
|
+
endpoint: string;
|
|
847
|
+
token: string;
|
|
848
|
+
};
|
|
849
|
+
};
|
|
850
|
+
/**
|
|
851
|
+
* A container registry login, for Dokploy to pull with. Asked for only when
|
|
852
|
+
* Dokploy has no registry for `deploy.registry` and one has to be
|
|
853
|
+
* created.
|
|
854
|
+
*/
|
|
855
|
+
registry: {
|
|
856
|
+
/** `deploy.registry`. */
|
|
857
|
+
request: {
|
|
858
|
+
url: string;
|
|
859
|
+
};
|
|
860
|
+
value: {
|
|
861
|
+
username: string;
|
|
862
|
+
password: string;
|
|
863
|
+
};
|
|
864
|
+
};
|
|
865
|
+
/**
|
|
866
|
+
* The AWS account a stage deploys to, for the SST target's `sst deploy`.
|
|
867
|
+
* Handed to that one command's environment and to nothing else.
|
|
868
|
+
*/
|
|
869
|
+
aws: {
|
|
870
|
+
/** The stage, for a provider that keeps one account per stage. */
|
|
871
|
+
request: {
|
|
872
|
+
stage: string;
|
|
873
|
+
};
|
|
874
|
+
value: AwsCredential;
|
|
875
|
+
};
|
|
876
|
+
/**
|
|
877
|
+
* A GoDaddy Personal Access Token, for a `dns` domain whose provider is
|
|
878
|
+
* `godaddy`. Read on the machine that writes the records — never the
|
|
879
|
+
* server's.
|
|
880
|
+
*/
|
|
881
|
+
godaddy: {
|
|
882
|
+
request: Record<never, never>;
|
|
883
|
+
value: GoDaddyCredential;
|
|
884
|
+
};
|
|
885
|
+
/**
|
|
886
|
+
* A Hostinger API token, for a `dns` domain whose provider is
|
|
887
|
+
* `hostinger`. Like GoDaddy's, read where the records are written.
|
|
888
|
+
*/
|
|
889
|
+
hostinger: {
|
|
890
|
+
request: Record<never, never>;
|
|
891
|
+
value: HostingerCredential;
|
|
892
|
+
};
|
|
893
|
+
/**
|
|
894
|
+
* A Cloudflare API token, for a `dns` domain whose provider is
|
|
895
|
+
* `cloudflare`. Read where the records are written.
|
|
896
|
+
*/
|
|
897
|
+
cloudflare: {
|
|
898
|
+
request: Record<never, never>;
|
|
899
|
+
value: CloudflareCredential;
|
|
900
|
+
};
|
|
901
|
+
}
|
|
902
|
+
/** A Cloudflare API token with Zone:Read and DNS:Edit on the zone. */
|
|
903
|
+
interface CloudflareCredential {
|
|
904
|
+
token: string;
|
|
905
|
+
}
|
|
906
|
+
/** A Hostinger API token, from hpanel.hostinger.com/profile/api. */
|
|
907
|
+
interface HostingerCredential {
|
|
908
|
+
token: string;
|
|
909
|
+
}
|
|
910
|
+
/** A GoDaddy Personal Access Token, sent as `Authorization: Bearer <token>`. */
|
|
911
|
+
interface GoDaddyCredential {
|
|
912
|
+
token: string;
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* Who to act as on AWS: a named profile, or keys.
|
|
916
|
+
*
|
|
917
|
+
* Never both. Given both, every AWS SDK takes the keys and ignores the
|
|
918
|
+
* profile, so `--profile prod` with staging's keys still exported would deploy
|
|
919
|
+
* production's stack into staging's account — the reason `secretsStoreFor`
|
|
920
|
+
* resolves a named profile on its own, and why this cannot express the mix.
|
|
921
|
+
*/
|
|
922
|
+
type AwsCredential = {
|
|
923
|
+
/** A profile in `~/.aws/config` — keys, SSO, an assumed role. */
|
|
924
|
+
profile: string;
|
|
925
|
+
region?: string;
|
|
926
|
+
} | {
|
|
927
|
+
accessKeyId: string;
|
|
928
|
+
secretAccessKey: string;
|
|
929
|
+
/** Present for temporary keys: an assumed role, GitHub's OIDC. */
|
|
930
|
+
sessionToken?: string;
|
|
931
|
+
region?: string;
|
|
932
|
+
};
|
|
933
|
+
type CredentialKind = keyof CredentialKinds;
|
|
934
|
+
/** What a deploy asks a provider for. */
|
|
935
|
+
type CredentialRequest<K extends CredentialKind = CredentialKind> = { [P in K]: {
|
|
936
|
+
kind: P;
|
|
937
|
+
} & CredentialKinds[P]['request']; }[K];
|
|
938
|
+
/** What a provider answers with. */
|
|
939
|
+
type Credential<K extends CredentialKind> = CredentialKinds[K]['value'];
|
|
940
|
+
interface CredentialProvider {
|
|
941
|
+
/**
|
|
942
|
+
* The credential `request` asks for, or `undefined` when this provider has
|
|
943
|
+
* none — the deploy then raises {@link MissingCredential}.
|
|
944
|
+
*/
|
|
945
|
+
get<K extends CredentialKind>(request: CredentialRequest<K>, options?: {
|
|
946
|
+
signal?: AbortSignal;
|
|
947
|
+
}): Promise<Credential<K> | undefined>;
|
|
948
|
+
}
|
|
949
|
+
/** A deploy needed a credential, and its provider had none. */
|
|
950
|
+
declare class MissingCredential extends GkmError {
|
|
951
|
+
readonly kind: CredentialKind;
|
|
952
|
+
/** What it was for: the Dokploy endpoint or the registry URL. */
|
|
953
|
+
readonly target: string | undefined;
|
|
954
|
+
/** How to supply it. */
|
|
955
|
+
readonly howToProvide: string;
|
|
956
|
+
constructor(kind: CredentialKind,
|
|
957
|
+
/** What it was for: the Dokploy endpoint or the registry URL. */
|
|
958
|
+
target: string | undefined,
|
|
959
|
+
/** How to supply it. */
|
|
960
|
+
howToProvide?: string);
|
|
961
|
+
}
|
|
962
|
+
/** Whatever was asked for, from the first provider that has it. */
|
|
963
|
+
declare function chainCredentials(...providers: CredentialProvider[]): CredentialProvider;
|
|
964
|
+
interface StoredCredentialsOptions {
|
|
965
|
+
/** Where to read the variables from. Defaults to `process.env`. */
|
|
966
|
+
env?: NodeJS.ProcessEnv;
|
|
967
|
+
/**
|
|
968
|
+
* The CLI's home, whose `credentials.json` holds stored logins. Defaults
|
|
969
|
+
* to `GKM_HOME`, else `~/.gkm`.
|
|
970
|
+
*/
|
|
971
|
+
home?: string;
|
|
972
|
+
}
|
|
973
|
+
/**
|
|
974
|
+
* Credentials from the environment, then from what `gkm login` stored. What
|
|
975
|
+
* `deploy()` uses when it is handed no provider.
|
|
976
|
+
*
|
|
977
|
+
* - Dokploy: `DOKPLOY_API_TOKEN` / `DOKPLOY_ENDPOINT`, each falling back to
|
|
978
|
+
* the stored login, and the endpoint finally to `deploy.dokploy.endpoint`.
|
|
979
|
+
* Each half is read on its own: a token is a secret and belongs in the
|
|
980
|
+
* environment, an endpoint is configuration and belongs in the config.
|
|
981
|
+
* - Registry: `DOCKER_REGISTRY_USERNAME` / `DOCKER_REGISTRY_PASSWORD`.
|
|
982
|
+
* - AWS: `AWS_PROFILE` when it is set, and then nothing else; otherwise
|
|
983
|
+
* `AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY` / `AWS_SESSION_TOKEN`. The
|
|
984
|
+
* profile winning is `secretsStoreFor`'s rule: a profile is a choice of
|
|
985
|
+
* account someone made, exported keys may be left over from another.
|
|
986
|
+
* Read here, by name, and handed only to the command that deploys — the
|
|
987
|
+
* sandbox every other step runs in passes no `AWS_*` on.
|
|
988
|
+
*/
|
|
989
|
+
declare function storedCredentials(options?: StoredCredentialsOptions): CredentialProvider;
|
|
990
|
+
//#endregion
|
|
991
|
+
//#region src/deploy/types.d.ts
|
|
992
|
+
/** Result for a single app deployment in workspace mode */
|
|
993
|
+
interface AppDeployResult {
|
|
994
|
+
/** App name */
|
|
995
|
+
appName: string;
|
|
996
|
+
/** App type */
|
|
997
|
+
type: 'backend' | 'web' | 'mobile';
|
|
998
|
+
/** Whether deployment succeeded */
|
|
999
|
+
success: boolean;
|
|
1000
|
+
/** Dokploy application ID */
|
|
1001
|
+
applicationId?: string;
|
|
1002
|
+
/** Docker image reference */
|
|
1003
|
+
imageRef?: string;
|
|
1004
|
+
/** The registry's digest for the image, `sha256:…`, once pushed */
|
|
1005
|
+
digest?: string;
|
|
1006
|
+
/** Deployment URL */
|
|
1007
|
+
url?: string;
|
|
1008
|
+
/** Error message if failed */
|
|
1009
|
+
error?: string;
|
|
1010
|
+
}
|
|
1011
|
+
/** Result from workspace deployment */
|
|
1012
|
+
interface WorkspaceDeployResult {
|
|
1013
|
+
/** Results for each app */
|
|
1014
|
+
apps: AppDeployResult[];
|
|
1015
|
+
/** Dokploy project ID */
|
|
1016
|
+
projectId: string;
|
|
1017
|
+
/** Total number of successful deployments */
|
|
1018
|
+
successCount: number;
|
|
1019
|
+
/** Total number of failed deployments */
|
|
1020
|
+
failedCount: number;
|
|
1021
|
+
}
|
|
1022
|
+
/**
|
|
1023
|
+
* What a deploy did — or, for a dry run, would do. Plain JSON, so it can be
|
|
1024
|
+
* written out as is (`gkm deploy --json` ends with it).
|
|
1025
|
+
*/
|
|
1026
|
+
interface DeployResult extends WorkspaceDeployResult {
|
|
1027
|
+
stage: string;
|
|
1028
|
+
/** `<namespace>/<project>`. */
|
|
1029
|
+
identity: string;
|
|
1030
|
+
/** The image tag every app was built with. */
|
|
1031
|
+
tag: string;
|
|
1032
|
+
/** Whether this was a dry run: nothing was created, built or pushed. */
|
|
1033
|
+
dryRun: boolean;
|
|
1034
|
+
/** Dokploy's environment for the stage; empty when a dry run would create it. */
|
|
1035
|
+
environmentId: string;
|
|
1036
|
+
/** Apps left out, and why — a mobile app, another deploy target. */
|
|
1037
|
+
skipped: {
|
|
1038
|
+
app: string;
|
|
1039
|
+
reason: string;
|
|
1040
|
+
}[];
|
|
1041
|
+
/** Each deployed app's public URL. */
|
|
1042
|
+
urls: Record<string, string>;
|
|
1043
|
+
/**
|
|
1044
|
+
* Every resource the run touched, in order: what it applied, or for a dry
|
|
1045
|
+
* run, what it would.
|
|
1046
|
+
*/
|
|
1047
|
+
changes: ResourceChange[];
|
|
1048
|
+
}
|
|
1049
|
+
//#endregion
|
|
1050
|
+
//#region src/deploy/events.d.ts
|
|
1051
|
+
/**
|
|
1052
|
+
* The stretch of a deploy an event belongs to.
|
|
1053
|
+
*
|
|
1054
|
+
* - `validate`: the config, the target, the stage, the apps, the lock, the
|
|
1055
|
+
* stage's secrets and what each app reads from its environment
|
|
1056
|
+
* - `plan`: a dry run's lookups — what would be created and what reused
|
|
1057
|
+
* - `provision`: what the apps run on — for Dokploy the project, environment
|
|
1058
|
+
* and registry — and the declared constructs
|
|
1059
|
+
* - `build`: each app's artifact, built without changing anything live
|
|
1060
|
+
* - `release`: the artifacts put live. Dokploy applies the stage's
|
|
1061
|
+
* migrations and runs its seeds, then builds and pushes each image here, beside its
|
|
1062
|
+
* application, because a site's build args are resolved per app — and
|
|
1063
|
+
* checks each backend before any site is released
|
|
1064
|
+
* - `verify`: what was released answers — for Dokploy, each site's DNS
|
|
1065
|
+
* records and health
|
|
1066
|
+
* - `rollback`: the previous release restored, after `release` or `verify`
|
|
1067
|
+
* failed, on a target that can
|
|
1068
|
+
*/
|
|
1069
|
+
type DeployPhase = 'validate' | 'plan' | 'provision' | 'build' | 'release' | 'verify' | 'rollback';
|
|
1070
|
+
/** An error, as an event carries it. */
|
|
1071
|
+
interface DeployEventError {
|
|
1072
|
+
/** The error's class name — `MissingCredential`, `StateLocked`. */
|
|
1073
|
+
name: string;
|
|
1074
|
+
message: string;
|
|
1075
|
+
}
|
|
1076
|
+
/**
|
|
1077
|
+
* How a resource came to be used:
|
|
1078
|
+
* - `recorded`: the id the stage's state holds still resolves
|
|
1079
|
+
* - `resumed`: a run that died after creating it is picked up
|
|
1080
|
+
* - `found`: it existed and was looked up
|
|
1081
|
+
* - `created`: this run created it
|
|
1082
|
+
*/
|
|
1083
|
+
type ResourceVia = 'recorded' | 'resumed' | 'found' | 'created';
|
|
1084
|
+
/** One resource a deploy touches, planned or applied. */
|
|
1085
|
+
interface ResourceChange {
|
|
1086
|
+
/** `<type>:<name>`, unique within the stage — `application:api`. */
|
|
1087
|
+
key: string;
|
|
1088
|
+
/** `project`, `environment`, `registry`, `application`, `domain`, `image`, or a construct's kind. */
|
|
1089
|
+
resourceType: string;
|
|
1090
|
+
/**
|
|
1091
|
+
* For a plan: whether the run would create it, reuse what exists, or
|
|
1092
|
+
* ensure it (look it up, and create it if missing). For an applied change:
|
|
1093
|
+
* what was done.
|
|
1094
|
+
*/
|
|
1095
|
+
action: 'create' | 'reuse' | 'ensure' | 'build';
|
|
1096
|
+
/** The target's id, once there is one. */
|
|
1097
|
+
id?: string;
|
|
1098
|
+
}
|
|
1099
|
+
type DeployEvent = {
|
|
1100
|
+
type: 'deploy.started';
|
|
1101
|
+
stage: string;
|
|
1102
|
+
/** The target the run deploys through, by the name it was given. */
|
|
1103
|
+
target: string;
|
|
1104
|
+
/** `<namespace>/<project>`. */
|
|
1105
|
+
identity: string;
|
|
1106
|
+
tag: string;
|
|
1107
|
+
/** The apps this run deploys, in order. */
|
|
1108
|
+
apps: string[];
|
|
1109
|
+
dryRun: boolean;
|
|
1110
|
+
} | {
|
|
1111
|
+
type: 'phase.started';
|
|
1112
|
+
phase: DeployPhase;
|
|
1113
|
+
} | {
|
|
1114
|
+
type: 'phase.finished';
|
|
1115
|
+
phase: DeployPhase;
|
|
1116
|
+
} |
|
|
1117
|
+
/** A phase threw; `deploy.failed` follows (after a rollback, if any). */
|
|
1118
|
+
{
|
|
1119
|
+
type: 'phase.failed';
|
|
1120
|
+
phase: DeployPhase;
|
|
1121
|
+
error: DeployEventError;
|
|
1122
|
+
} |
|
|
1123
|
+
/**
|
|
1124
|
+
* A progress line, exactly as `gkm deploy` prints it — leading newline and
|
|
1125
|
+
* indentation included, so a terminal renderer prints `message` as is.
|
|
1126
|
+
*/
|
|
1127
|
+
{
|
|
1128
|
+
type: 'log';
|
|
1129
|
+
level: 'info' | 'warn' | 'error';
|
|
1130
|
+
message: string;
|
|
1131
|
+
} | {
|
|
1132
|
+
type: 'app.skipped';
|
|
1133
|
+
app: string;
|
|
1134
|
+
reason: string;
|
|
1135
|
+
} | ({
|
|
1136
|
+
type: 'resource.planned';
|
|
1137
|
+
} & ResourceChange) | ({
|
|
1138
|
+
type: 'resource.applied';
|
|
1139
|
+
via: ResourceVia;
|
|
1140
|
+
} & ResourceChange & {
|
|
1141
|
+
id: string;
|
|
1142
|
+
}) | {
|
|
1143
|
+
type: 'artifact.built';
|
|
1144
|
+
app: string;
|
|
1145
|
+
imageRef: string;
|
|
1146
|
+
/** The registry's digest, `sha256:…`, once pushed. */
|
|
1147
|
+
digest?: string;
|
|
1148
|
+
} | {
|
|
1149
|
+
type: 'app.deployed';
|
|
1150
|
+
app: string;
|
|
1151
|
+
applicationId: string;
|
|
1152
|
+
imageRef: string;
|
|
1153
|
+
url: string;
|
|
1154
|
+
} | {
|
|
1155
|
+
type: 'app.failed';
|
|
1156
|
+
app: string;
|
|
1157
|
+
error: DeployEventError;
|
|
1158
|
+
} |
|
|
1159
|
+
/** One check of whether a released app answers. */
|
|
1160
|
+
{
|
|
1161
|
+
type: 'health.checked';
|
|
1162
|
+
app: string;
|
|
1163
|
+
/** What was asked: a URL, or the target's own status check. */
|
|
1164
|
+
url: string;
|
|
1165
|
+
healthy: boolean;
|
|
1166
|
+
/** The HTTP status, when the check was a request. */
|
|
1167
|
+
status?: number;
|
|
1168
|
+
/** 1 for the first check of the app in this run. */
|
|
1169
|
+
attempt: number;
|
|
1170
|
+
} |
|
|
1171
|
+
/**
|
|
1172
|
+
* A deployed stage runs a dev service — `--allow-dev-services` — in place
|
|
1173
|
+
* of real mail or object storage: Mailpit delivers no mail, MinIO keeps
|
|
1174
|
+
* every object on one container's disk. A warning, every run.
|
|
1175
|
+
*/
|
|
1176
|
+
{
|
|
1177
|
+
type: 'dev-service.used';
|
|
1178
|
+
service: 'minio' | 'mailpit';
|
|
1179
|
+
stage: string;
|
|
1180
|
+
/** The constructs it stands in for. */
|
|
1181
|
+
constructs: string[];
|
|
1182
|
+
} |
|
|
1183
|
+
/**
|
|
1184
|
+
* The stack's log UI (`deploy.compose.logs`) is up and answering: where
|
|
1185
|
+
* it is and how it is reached — through an SSH tunnel to a loopback
|
|
1186
|
+
* port, or publicly on a host that allows only some addresses.
|
|
1187
|
+
*/
|
|
1188
|
+
{
|
|
1189
|
+
type: 'logs.ready';
|
|
1190
|
+
service: 'openobserve';
|
|
1191
|
+
access: 'tunnel' | 'public';
|
|
1192
|
+
/** Where a browser opens it: the tunnel's end, or its public host. */
|
|
1193
|
+
url: string;
|
|
1194
|
+
/** The loopback port it is published on, for a tunnel. */
|
|
1195
|
+
port?: number;
|
|
1196
|
+
/** The addresses a public host answers. */
|
|
1197
|
+
allow?: string[];
|
|
1198
|
+
email: string;
|
|
1199
|
+
} |
|
|
1200
|
+
/**
|
|
1201
|
+
* One construct's migrations applied by the deploy, before any app
|
|
1202
|
+
* started. Only for a construct that had one to apply.
|
|
1203
|
+
*/
|
|
1204
|
+
{
|
|
1205
|
+
type: 'migration.applied';
|
|
1206
|
+
/** The construct, by id: `Database`. */
|
|
1207
|
+
construct: string;
|
|
1208
|
+
/** Its folder: `db/database/migrations`. */
|
|
1209
|
+
folder: string;
|
|
1210
|
+
/** The migrations applied, in order. */
|
|
1211
|
+
applied: string[];
|
|
1212
|
+
} |
|
|
1213
|
+
/**
|
|
1214
|
+
* One construct's seeds run by the deploy — after its migrations, before
|
|
1215
|
+
* any app started, every one of them on every deploy. Only for a
|
|
1216
|
+
* construct that has seeds.
|
|
1217
|
+
*/
|
|
1218
|
+
{
|
|
1219
|
+
type: 'seed.ran';
|
|
1220
|
+
/** The construct, by id: `Database`. */
|
|
1221
|
+
construct: string;
|
|
1222
|
+
/** Its folder: `db/database/seeds`. */
|
|
1223
|
+
folder: string;
|
|
1224
|
+
/** The seeds run, in order. */
|
|
1225
|
+
seeded: string[];
|
|
1226
|
+
} | {
|
|
1227
|
+
type: 'deploy.finished';
|
|
1228
|
+
result: DeployResult;
|
|
1229
|
+
} | {
|
|
1230
|
+
type: 'deploy.failed';
|
|
1231
|
+
error: DeployEventError;
|
|
1232
|
+
};
|
|
1233
|
+
/** Every `type` a deploy event can have. */
|
|
1234
|
+
type DeployEventType = DeployEvent['type'];
|
|
167
1235
|
//#endregion
|
|
168
|
-
//#region src/
|
|
1236
|
+
//#region src/target/types.d.ts
|
|
169
1237
|
/**
|
|
170
|
-
*
|
|
1238
|
+
* Which family of defaults a target's deploys belong to.
|
|
171
1239
|
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
* -
|
|
1240
|
+
* - `server`: the target runs containers the project controls, so a cache can
|
|
1241
|
+
* live in the database and events go through pg-boss.
|
|
1242
|
+
* - `aws`: the target runs on managed AWS services, so the defaults are
|
|
1243
|
+
* Upstash, S3 and SNS/SQS.
|
|
1244
|
+
*
|
|
1245
|
+
* `gkm dev` and `gkm build` choose backends by it, which is why a target from
|
|
1246
|
+
* a package declares it in its `package.json` too: they read it without
|
|
1247
|
+
* importing the target.
|
|
175
1248
|
*/
|
|
176
|
-
|
|
1249
|
+
type DeployRuntime = 'server' | 'aws';
|
|
1250
|
+
/** What a target can do, beyond the phases every target has. */
|
|
1251
|
+
interface DeployTargetCapabilities {
|
|
177
1252
|
/**
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
* @param stage - The deployment stage (e.g., 'development', 'production')
|
|
181
|
-
* @returns The state object or null if not found
|
|
1253
|
+
* Whether `rollback` restores the previous release. When it does, a failed
|
|
1254
|
+
* `release` or `verify` is rolled back before the deploy reports failure.
|
|
182
1255
|
*/
|
|
183
|
-
|
|
1256
|
+
rollback: boolean;
|
|
184
1257
|
/**
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
|
|
188
|
-
|
|
1258
|
+
* Who applies database migrations: the target, as part of `release`, or
|
|
1259
|
+
* the app itself when it starts.
|
|
1260
|
+
*/
|
|
1261
|
+
migrations: 'target' | 'app';
|
|
1262
|
+
/**
|
|
1263
|
+
* Whether the target builds container images — and so needs Docker where
|
|
1264
|
+
* the deploy runs, and a registry to push to.
|
|
1265
|
+
*/
|
|
1266
|
+
images: boolean;
|
|
1267
|
+
/**
|
|
1268
|
+
* Whether it can also run the project's local stage — `gkm deploy --stage
|
|
1269
|
+
* <local>`. Only a target that runs on this machine can: a stack started
|
|
1270
|
+
* here is the local stage's, while one on a server is shared, and the local
|
|
1271
|
+
* stage's secrets are a developer's. Absent, a deploy refuses the local
|
|
1272
|
+
* stage with `UndeclaredStage`.
|
|
1273
|
+
*/
|
|
1274
|
+
localStage?: boolean;
|
|
1275
|
+
/**
|
|
1276
|
+
* Whether it runs telemetry's self-hosted provider — OpenObserve beside
|
|
1277
|
+
* the apps — for a stage whose `deploy.telemetry` asks for it, or names
|
|
1278
|
+
* nothing. Absent, a stage that uses a `Telemetry` construct names a
|
|
1279
|
+
* provider of its own (`otlp`) or opts out with `false`.
|
|
189
1280
|
*/
|
|
190
|
-
|
|
1281
|
+
selfHostedTelemetry?: boolean;
|
|
1282
|
+
}
|
|
1283
|
+
/** A failed validation of a target's options, issue by issue. */
|
|
1284
|
+
interface TargetOptionsIssue {
|
|
1285
|
+
readonly message: string;
|
|
1286
|
+
readonly path?: ReadonlyArray<PropertyKey | {
|
|
1287
|
+
readonly key: PropertyKey;
|
|
1288
|
+
}>;
|
|
191
1289
|
}
|
|
1290
|
+
type TargetOptionsResult<Output> = {
|
|
1291
|
+
readonly value: Output;
|
|
1292
|
+
readonly issues?: undefined;
|
|
1293
|
+
} | {
|
|
1294
|
+
readonly issues: ReadonlyArray<TargetOptionsIssue>;
|
|
1295
|
+
};
|
|
192
1296
|
/**
|
|
193
|
-
*
|
|
1297
|
+
* The schema a target's options are validated with: any Standard Schema —
|
|
1298
|
+
* a Zod, Valibot or ArkType schema is one.
|
|
1299
|
+
*
|
|
1300
|
+
* The interface is the Standard Schema spec's own, copied as the spec asks,
|
|
1301
|
+
* so a target's types do not depend on a package the CLI does not ship.
|
|
194
1302
|
*/
|
|
195
|
-
|
|
1303
|
+
interface TargetOptionsSchema<Output = unknown> {
|
|
1304
|
+
readonly '~standard': {
|
|
1305
|
+
readonly version: 1;
|
|
1306
|
+
readonly vendor: string;
|
|
1307
|
+
readonly validate: (value: unknown) => TargetOptionsResult<Output> | Promise<TargetOptionsResult<Output>>;
|
|
1308
|
+
readonly types?: {
|
|
1309
|
+
readonly input: unknown;
|
|
1310
|
+
readonly output: Output;
|
|
1311
|
+
} | undefined;
|
|
1312
|
+
};
|
|
1313
|
+
}
|
|
196
1314
|
/**
|
|
197
|
-
*
|
|
1315
|
+
* The stage's secrets, as a target reads and writes them.
|
|
1316
|
+
*
|
|
1317
|
+
* Every secret value read through here is masked: a progress line that
|
|
1318
|
+
* would print one prints `***` instead, in the terminal and in the events.
|
|
198
1319
|
*/
|
|
199
|
-
interface
|
|
200
|
-
|
|
1320
|
+
interface DeploySecrets {
|
|
1321
|
+
/** Which kind of store holds them — `'file'`, `'s3'`, `'ssm'`, `'secrets-manager'`, or
|
|
1322
|
+
* a custom one's. */
|
|
1323
|
+
readonly store: string;
|
|
1324
|
+
/** The stage's secrets, or null when it has none yet. */
|
|
1325
|
+
read(): Promise<StageSecrets | null>;
|
|
1326
|
+
/** Replace the stage's secrets. */
|
|
1327
|
+
write(secrets: StageSecrets): Promise<void>;
|
|
1328
|
+
/** Mask `value` in everything this run prints or emits from now on. */
|
|
1329
|
+
mask(value: string): void;
|
|
1330
|
+
}
|
|
1331
|
+
/** Where a target's progress lines go: `log` events of the run. */
|
|
1332
|
+
interface DeployTargetLogger {
|
|
1333
|
+
info(message: string): void;
|
|
1334
|
+
warn(message: string): void;
|
|
1335
|
+
error(message: string): void;
|
|
201
1336
|
}
|
|
202
1337
|
/**
|
|
203
|
-
*
|
|
1338
|
+
* The events a target reports. The run's own — `deploy.*` and `phase.*` —
|
|
1339
|
+
* are the CLI's, which emits them around each phase it calls.
|
|
204
1340
|
*/
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
1341
|
+
type TargetEvent = Exclude<DeployEvent, {
|
|
1342
|
+
type: 'deploy.started' | 'deploy.finished' | 'deploy.failed' | 'phase.started' | 'phase.finished' | 'phase.failed';
|
|
1343
|
+
}>;
|
|
1344
|
+
/** Everything a phase is handed. The same object for every phase of a run. */
|
|
1345
|
+
interface DeployPhaseContext<Options = undefined> {
|
|
1346
|
+
/** The name the target was resolved by — `deploy.default`, `--target`. */
|
|
1347
|
+
readonly target: string;
|
|
1348
|
+
/**
|
|
1349
|
+
* The workspace root. Never `process.cwd()`: a host deploys projects
|
|
1350
|
+
* that are not where it runs.
|
|
1351
|
+
*/
|
|
1352
|
+
readonly cwd: string;
|
|
1353
|
+
readonly stage: string;
|
|
1354
|
+
/** The image tag, or whatever version label the target releases under. */
|
|
1355
|
+
readonly tag: string;
|
|
1356
|
+
/**
|
|
1357
|
+
* Whether `tag` was asked for (`--tag`) rather than made up for this run
|
|
1358
|
+
* — by the target's own `tag()`, else `<stage>-<timestamp>`. A target that
|
|
1359
|
+
* releases what CI already pushed when given one tells the two apart here.
|
|
1360
|
+
*/
|
|
1361
|
+
readonly tagGiven: boolean;
|
|
1362
|
+
/**
|
|
1363
|
+
* The apps this target deploys, in dependency order: those asked for that
|
|
1364
|
+
* deploy here. Apps that deploy elsewhere are already in `skipped`.
|
|
1365
|
+
*/
|
|
1366
|
+
readonly apps: readonly string[];
|
|
1367
|
+
/** The apps the run leaves out, and why. */
|
|
1368
|
+
readonly skipped: readonly {
|
|
1369
|
+
app: string;
|
|
1370
|
+
reason: string;
|
|
1371
|
+
}[];
|
|
1372
|
+
/** Who the deploy is, for naming and claiming what it creates. */
|
|
1373
|
+
readonly identity: DeployIdentity;
|
|
1374
|
+
/** The workspace, with its apps derived from the manifest. */
|
|
1375
|
+
readonly workspace: NormalizedWorkspace;
|
|
1376
|
+
/** What the workspace declares. */
|
|
1377
|
+
readonly manifest: ConstructManifest;
|
|
1378
|
+
/**
|
|
1379
|
+
* Where each Worker's crons, queues and subscribers are declared, from the
|
|
1380
|
+
* same discovery: which workers have work to run, and which app each is
|
|
1381
|
+
* built from (`workerUnits`).
|
|
1382
|
+
*/
|
|
1383
|
+
readonly background?: Readonly<Record<string, readonly string[]>>;
|
|
1384
|
+
/**
|
|
1385
|
+
* Each Worker's subscribers, from the same discovery — by export, and the
|
|
1386
|
+
* key its deliveries come from: which of them SNS pushes to.
|
|
1387
|
+
*/
|
|
1388
|
+
readonly subscribers?: Readonly<Record<string, readonly BoundSubscriber[]>>;
|
|
1389
|
+
/**
|
|
1390
|
+
* The DNS records the stage's providers asked for on this run, as
|
|
1391
|
+
* `dns-record` keys — set once they have run. A record a provider asked
|
|
1392
|
+
* for on an earlier deploy and not on this one is stale, and pruned with
|
|
1393
|
+
* the stack's. Unset when the providers did not run: then none of theirs
|
|
1394
|
+
* is pruned.
|
|
1395
|
+
*/
|
|
1396
|
+
providerDns?: readonly string[];
|
|
1397
|
+
/** The target's options, as its `options` schema parsed them. */
|
|
1398
|
+
readonly options: Options;
|
|
1399
|
+
/**
|
|
1400
|
+
* Look everything up and report what would happen — as `resource.planned`
|
|
1401
|
+
* events — without changing anything. Only `validate` and `plan` run.
|
|
1402
|
+
*/
|
|
1403
|
+
readonly dryRun: boolean;
|
|
1404
|
+
/**
|
|
1405
|
+
* When `release` or `verify` fails, roll back every app the run released
|
|
1406
|
+
* rather than only those that failed — for apps that must move together,
|
|
1407
|
+
* an API and the site built against it. Only a target that can roll back
|
|
1408
|
+
* reads it.
|
|
1409
|
+
*/
|
|
1410
|
+
readonly atomic: boolean;
|
|
1411
|
+
/**
|
|
1412
|
+
* `--allow-dev-services`: a deployed stage runs the dev service for every
|
|
1413
|
+
* bucket and mail it does not account for — no key in its secrets, no
|
|
1414
|
+
* provider backing the kind. Off by default: a deployed stage's mail and
|
|
1415
|
+
* buckets come from its secrets or its providers, and a server target
|
|
1416
|
+
* refuses one that lacks them. The local stage ignores it — it always
|
|
1417
|
+
* runs both.
|
|
1418
|
+
*/
|
|
1419
|
+
readonly allowDevServices: boolean;
|
|
1420
|
+
/**
|
|
1421
|
+
* `--skip-dns`: a server target neither writes its public hosts' DNS
|
|
1422
|
+
* records nor checks that they point at the stage's server — for a CDN or
|
|
1423
|
+
* proxy in front of it, or records written by another step.
|
|
1424
|
+
*/
|
|
1425
|
+
readonly skipDns?: boolean;
|
|
1426
|
+
/** Where every credential comes from. Nothing prompts. */
|
|
1427
|
+
readonly credentials: CredentialProvider;
|
|
1428
|
+
/**
|
|
1429
|
+
* The stage's deploy state. A real run holds the stage's lock for every
|
|
1430
|
+
* phase; a dry run holds none and must write nothing.
|
|
1431
|
+
*/
|
|
1432
|
+
readonly state: StateStore;
|
|
1433
|
+
readonly secrets: DeploySecrets;
|
|
1434
|
+
readonly logger: DeployTargetLogger;
|
|
1435
|
+
/** Fires when the run is stopped; every phase stops what it is doing. */
|
|
1436
|
+
readonly signal: AbortSignal;
|
|
1437
|
+
/**
|
|
1438
|
+
* Where the output of what a phase spawns goes: the host's terminal, its
|
|
1439
|
+
* stderr (so stdout carries only events), or nowhere.
|
|
1440
|
+
*/
|
|
1441
|
+
readonly childOutput: 'inherit' | 'stderr' | 'ignore';
|
|
1442
|
+
/** Report progress. */
|
|
1443
|
+
emit(event: TargetEvent): void;
|
|
1444
|
+
/** Leave an app out of this run, with the reason a person will read. */
|
|
1445
|
+
skip(app: string, reason: string): void;
|
|
1446
|
+
/**
|
|
1447
|
+
* What a resource is called on the target: scoped by the stage and the
|
|
1448
|
+
* identity exactly as the constructs are — `name('api')` is
|
|
1449
|
+
* `production-shop-api`. Two workspaces, or two stages, never share one.
|
|
1450
|
+
*/
|
|
1451
|
+
name(resource: string): string;
|
|
1452
|
+
}
|
|
1453
|
+
/** Why `rollback` was called: the phase that failed, and its error. */
|
|
1454
|
+
interface DeployFailure {
|
|
1455
|
+
readonly phase: 'release' | 'verify';
|
|
1456
|
+
readonly error: unknown;
|
|
211
1457
|
}
|
|
212
1458
|
/**
|
|
213
|
-
*
|
|
1459
|
+
* A deploy target.
|
|
1460
|
+
*
|
|
1461
|
+
* The CLI calls the phases in order — `validate`, then `plan` for a dry run,
|
|
1462
|
+
* or `provision → build → release → verify` for a real one — emitting
|
|
1463
|
+
* `phase.started`/`phase.finished` around each. Every phase must be safe to
|
|
1464
|
+
* run again: a deploy stopped part way is finished by deploying again, so a
|
|
1465
|
+
* phase finds what an earlier run made (through `state`) before making it.
|
|
1466
|
+
*
|
|
1467
|
+
* `Run` is whatever the target carries from one phase to the next within a
|
|
1468
|
+
* run — `validate` makes it, every later phase is handed it.
|
|
1469
|
+
*
|
|
1470
|
+
* ```ts
|
|
1471
|
+
* import { defineTarget } from '@geekmidas/cli/target';
|
|
1472
|
+
* import { z } from 'zod';
|
|
1473
|
+
*
|
|
1474
|
+
* export default defineTarget({
|
|
1475
|
+
* name: 'fly',
|
|
1476
|
+
* runtime: 'server',
|
|
1477
|
+
* capabilities: { rollback: true, migrations: 'target', images: true },
|
|
1478
|
+
* options: z.object({ org: z.string(), region: z.string().default('ams') }),
|
|
1479
|
+
* async validate(ctx) {
|
|
1480
|
+
* return { org: ctx.options.org, region: ctx.options.region };
|
|
1481
|
+
* },
|
|
1482
|
+
* async plan(ctx, run) { … },
|
|
1483
|
+
* async release(ctx, run) { … },
|
|
1484
|
+
* async rollback(ctx, run, failure) { … },
|
|
1485
|
+
* result(ctx, run) { … },
|
|
1486
|
+
* });
|
|
1487
|
+
* ```
|
|
214
1488
|
*/
|
|
215
|
-
interface
|
|
216
|
-
/**
|
|
217
|
-
|
|
1489
|
+
interface DeployTarget<Options = undefined, Run = unknown> {
|
|
1490
|
+
/** The target's own name, for messages. Config refers to it by its key. */
|
|
1491
|
+
readonly name: string;
|
|
1492
|
+
readonly runtime: DeployRuntime;
|
|
1493
|
+
readonly capabilities: DeployTargetCapabilities;
|
|
1494
|
+
/**
|
|
1495
|
+
* What `deploy.targets` may pass it — `[package, options]` — validated
|
|
1496
|
+
* before any phase runs. Without one, the target takes no options.
|
|
1497
|
+
*/
|
|
1498
|
+
readonly options?: TargetOptionsSchema<Options>;
|
|
1499
|
+
/**
|
|
1500
|
+
* The kinds of credential it asks the run's `CredentialProvider` for, so a
|
|
1501
|
+
* host or `gkm login` can collect them up front.
|
|
1502
|
+
*/
|
|
1503
|
+
readonly credentials?: readonly CredentialKind[];
|
|
1504
|
+
/**
|
|
1505
|
+
* The tag a run releases under when none is asked for. Without one it is
|
|
1506
|
+
* `<stage>-<timestamp>`; a target that builds from the checkout can name
|
|
1507
|
+
* its images after the commit instead.
|
|
1508
|
+
*/
|
|
1509
|
+
tag?(where: {
|
|
1510
|
+
readonly cwd: string;
|
|
1511
|
+
readonly stage: string;
|
|
1512
|
+
}): Promise<string>;
|
|
1513
|
+
/**
|
|
1514
|
+
* What the run is — the apps, the images, what each runs with — checked
|
|
1515
|
+
* before anything changes. A build-only run calls it too, so it checks
|
|
1516
|
+
* what building needs; what only a deploy needs is `ready`'s.
|
|
1517
|
+
*/
|
|
1518
|
+
validate(ctx: DeployPhaseContext<Options>): Promise<Run>;
|
|
1519
|
+
/**
|
|
1520
|
+
* What only this target checks before a deploy changes anything — compose's
|
|
1521
|
+
* server address and its hosts' DNS. Run after `validate` and the stage's
|
|
1522
|
+
* own readiness check (every key it needs, after its providers wrote
|
|
1523
|
+
* theirs), on a deploy and its dry run. A build-only run never calls it:
|
|
1524
|
+
* an image needs none of it.
|
|
1525
|
+
*/
|
|
1526
|
+
ready?(ctx: DeployPhaseContext<Options>, run: Run): Promise<void>;
|
|
1527
|
+
/** A dry run: emit `resource.planned` for what a real run would do. */
|
|
1528
|
+
plan(ctx: DeployPhaseContext<Options>, run: Run): Promise<void>;
|
|
1529
|
+
/** Create or find what the apps run on, and what they declare. */
|
|
1530
|
+
provision?(ctx: DeployPhaseContext<Options>, run: Run): Promise<void>;
|
|
1531
|
+
/** Build each app's artifact (`artifact.built`), changing nothing live. */
|
|
1532
|
+
build?(ctx: DeployPhaseContext<Options>, run: Run): Promise<void>;
|
|
1533
|
+
/** Put the built artifacts live (`app.deployed`). */
|
|
1534
|
+
release(ctx: DeployPhaseContext<Options>, run: Run): Promise<void>;
|
|
1535
|
+
/** Check what was released answers (`health.checked`). */
|
|
1536
|
+
verify?(ctx: DeployPhaseContext<Options>, run: Run): Promise<void>;
|
|
1537
|
+
/**
|
|
1538
|
+
* Restore the previous release, after `release` or `verify` failed. Called
|
|
1539
|
+
* only when `capabilities.rollback` is true.
|
|
1540
|
+
*/
|
|
1541
|
+
rollback?(ctx: DeployPhaseContext<Options>, run: Run, failure: DeployFailure): Promise<void>;
|
|
1542
|
+
/** What the run did, once its last phase has finished. */
|
|
1543
|
+
result(ctx: DeployPhaseContext<Options>, run: Run): DeployResult | Promise<DeployResult>;
|
|
218
1544
|
}
|
|
219
1545
|
/**
|
|
220
|
-
*
|
|
1546
|
+
* A target of any options and run state — what the CLI holds once a target
|
|
1547
|
+
* is resolved, its types left behind in the config that named it. The phases
|
|
1548
|
+
* are methods, so their parameters are compared bivariantly and every
|
|
1549
|
+
* `DeployTarget<O, R>` is one.
|
|
1550
|
+
*/
|
|
1551
|
+
type AnyDeployTarget = DeployTarget<unknown, unknown>;
|
|
1552
|
+
/** A target's options type, from the target. */
|
|
1553
|
+
type TargetOptions<T> = T extends DeployTarget<infer O, infer _Run> ? O : never;
|
|
1554
|
+
/**
|
|
1555
|
+
* One `deploy.targets` entry:
|
|
1556
|
+
*
|
|
1557
|
+
* - `'@acme/gkm-target'` — a package, its default export the target
|
|
1558
|
+
* - a target object, from `defineTarget` or a package's factory
|
|
1559
|
+
* - `['@acme/gkm-target', { region: 'ams' }]` — either, with options
|
|
221
1560
|
*/
|
|
222
|
-
type
|
|
1561
|
+
type DeployTargetEntry = string | AnyDeployTarget | readonly [string | AnyDeployTarget, unknown];
|
|
223
1562
|
declare namespace json_schema_d_exports {
|
|
224
1563
|
export { ArraySchema, BaseSchema, BooleanSchema, IntegerSchema, JSONSchema, NullSchema, NumberSchema, ObjectSchema, Schema$1 as Schema, SchemaType, StringSchema, _JSONSchema };
|
|
225
1564
|
}
|
|
@@ -4611,17 +5950,18 @@ declare const FrameworkSchema: ZodUnion<readonly [ZodEnum<{
|
|
|
4611
5950
|
*/
|
|
4612
5951
|
type Framework = output$1<typeof FrameworkSchema>;
|
|
4613
5952
|
/**
|
|
4614
|
-
*
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
/**
|
|
4618
|
-
* Phase 2 deploy targets (not yet implemented).
|
|
5953
|
+
* The built-in targets a config may name, both deployed by `gkm deploy`:
|
|
5954
|
+
* `dokploy`, and `sst`, which runs `sst deploy` on the manifest `gkm build`
|
|
5955
|
+
* writes.
|
|
4619
5956
|
*/
|
|
4620
|
-
declare const
|
|
5957
|
+
declare const SUPPORTED_DEPLOY_TARGETS: string[];
|
|
5958
|
+
/** Built-in names reserved for targets that do not exist yet. */
|
|
5959
|
+
declare const PHASE_2_DEPLOY_TARGETS: string[];
|
|
4621
5960
|
/**
|
|
4622
|
-
*
|
|
5961
|
+
* Whether a config may name `target`: a usable built-in, or one of its own
|
|
5962
|
+
* `deploy.targets`.
|
|
4623
5963
|
*/
|
|
4624
|
-
declare function isDeployTargetSupported(target: string): boolean;
|
|
5964
|
+
declare function isDeployTargetSupported(target: string, targets?: Record<string, unknown>): boolean;
|
|
4625
5965
|
/**
|
|
4626
5966
|
* Check if a deploy target is planned for Phase 2.
|
|
4627
5967
|
*/
|
|
@@ -4631,13 +5971,21 @@ declare function isPhase2DeployTarget(target: string): boolean;
|
|
|
4631
5971
|
*/
|
|
4632
5972
|
declare function getDeployTargetError(target: string, appName?: string): string;
|
|
4633
5973
|
/**
|
|
4634
|
-
*
|
|
5974
|
+
* Single DNS provider config (for one domain).
|
|
4635
5975
|
*/
|
|
4636
|
-
declare const
|
|
5976
|
+
declare const DnsProviderSchema: ZodUnion<readonly [ZodDiscriminatedUnion<[ZodObject<{
|
|
4637
5977
|
provider: ZodLiteral<"hostinger">;
|
|
5978
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
5979
|
+
mode: ZodLiteral<"cname">;
|
|
5980
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
5981
|
+
}, $strict>]>>;
|
|
4638
5982
|
ttl: ZodOptional<ZodNumber>;
|
|
4639
5983
|
}, $strip>, ZodObject<{
|
|
4640
5984
|
provider: ZodLiteral<"route53">;
|
|
5985
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
5986
|
+
mode: ZodLiteral<"cname">;
|
|
5987
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
5988
|
+
}, $strict>]>>;
|
|
4641
5989
|
region: ZodOptional<ZodEnum<{
|
|
4642
5990
|
"af-south-1": "af-south-1";
|
|
4643
5991
|
"ap-east-1": "ap-east-1";
|
|
@@ -4671,67 +6019,25 @@ declare const DnsConfigWithLegacySchema: ZodUnion<readonly [ZodRecord<ZodString,
|
|
|
4671
6019
|
hostedZoneId: ZodOptional<ZodString>;
|
|
4672
6020
|
ttl: ZodOptional<ZodNumber>;
|
|
4673
6021
|
}, $strip>, ZodObject<{
|
|
4674
|
-
provider: ZodLiteral<"
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
}, $
|
|
4679
|
-
provider: ZodCustom<{
|
|
4680
|
-
name: string;
|
|
4681
|
-
getRecords: Function;
|
|
4682
|
-
upsertRecords: Function;
|
|
4683
|
-
}, {
|
|
4684
|
-
name: string;
|
|
4685
|
-
getRecords: Function;
|
|
4686
|
-
upsertRecords: Function;
|
|
4687
|
-
}>;
|
|
4688
|
-
ttl: ZodOptional<ZodNumber>;
|
|
4689
|
-
}, $strip>]>>, ZodUnion<readonly [ZodDiscriminatedUnion<[ZodObject<{
|
|
4690
|
-
provider: ZodLiteral<"hostinger">;
|
|
4691
|
-
ttl: ZodOptional<ZodNumber>;
|
|
4692
|
-
domain: ZodString;
|
|
4693
|
-
}, $strip>, ZodObject<{
|
|
4694
|
-
provider: ZodLiteral<"route53">;
|
|
4695
|
-
region: ZodOptional<ZodEnum<{
|
|
4696
|
-
"af-south-1": "af-south-1";
|
|
4697
|
-
"ap-east-1": "ap-east-1";
|
|
4698
|
-
"ap-northeast-1": "ap-northeast-1";
|
|
4699
|
-
"ap-northeast-2": "ap-northeast-2";
|
|
4700
|
-
"ap-northeast-3": "ap-northeast-3";
|
|
4701
|
-
"ap-south-1": "ap-south-1";
|
|
4702
|
-
"ap-south-2": "ap-south-2";
|
|
4703
|
-
"ap-southeast-1": "ap-southeast-1";
|
|
4704
|
-
"ap-southeast-2": "ap-southeast-2";
|
|
4705
|
-
"ap-southeast-3": "ap-southeast-3";
|
|
4706
|
-
"ap-southeast-4": "ap-southeast-4";
|
|
4707
|
-
"ca-central-1": "ca-central-1";
|
|
4708
|
-
"eu-central-1": "eu-central-1";
|
|
4709
|
-
"eu-central-2": "eu-central-2";
|
|
4710
|
-
"eu-north-1": "eu-north-1";
|
|
4711
|
-
"eu-south-1": "eu-south-1";
|
|
4712
|
-
"eu-south-2": "eu-south-2";
|
|
4713
|
-
"eu-west-1": "eu-west-1";
|
|
4714
|
-
"eu-west-2": "eu-west-2";
|
|
4715
|
-
"eu-west-3": "eu-west-3";
|
|
4716
|
-
"me-central-1": "me-central-1";
|
|
4717
|
-
"me-south-1": "me-south-1";
|
|
4718
|
-
"sa-east-1": "sa-east-1";
|
|
4719
|
-
"us-east-1": "us-east-1";
|
|
4720
|
-
"us-east-2": "us-east-2";
|
|
4721
|
-
"us-west-1": "us-west-1";
|
|
4722
|
-
"us-west-2": "us-west-2";
|
|
4723
|
-
}>>;
|
|
4724
|
-
profile: ZodOptional<ZodString>;
|
|
4725
|
-
hostedZoneId: ZodOptional<ZodString>;
|
|
6022
|
+
provider: ZodLiteral<"godaddy">;
|
|
6023
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
6024
|
+
mode: ZodLiteral<"cname">;
|
|
6025
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
6026
|
+
}, $strict>]>>;
|
|
4726
6027
|
ttl: ZodOptional<ZodNumber>;
|
|
4727
|
-
domain: ZodString;
|
|
4728
6028
|
}, $strip>, ZodObject<{
|
|
4729
6029
|
provider: ZodLiteral<"cloudflare">;
|
|
6030
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
6031
|
+
mode: ZodLiteral<"cname">;
|
|
6032
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
6033
|
+
}, $strict>]>>;
|
|
4730
6034
|
ttl: ZodOptional<ZodNumber>;
|
|
4731
|
-
domain: ZodString;
|
|
4732
6035
|
}, $strip>, ZodObject<{
|
|
4733
6036
|
provider: ZodLiteral<"manual">;
|
|
4734
|
-
|
|
6037
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
6038
|
+
mode: ZodLiteral<"cname">;
|
|
6039
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
6040
|
+
}, $strict>]>>;
|
|
4735
6041
|
}, $strip>], "provider">, ZodObject<{
|
|
4736
6042
|
provider: ZodCustom<{
|
|
4737
6043
|
name: string;
|
|
@@ -4742,17 +6048,20 @@ declare const DnsConfigWithLegacySchema: ZodUnion<readonly [ZodRecord<ZodString,
|
|
|
4742
6048
|
getRecords: Function;
|
|
4743
6049
|
upsertRecords: Function;
|
|
4744
6050
|
}>;
|
|
6051
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
6052
|
+
mode: ZodLiteral<"cname">;
|
|
6053
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
6054
|
+
}, $strict>]>>;
|
|
4745
6055
|
ttl: ZodOptional<ZodNumber>;
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
type DnsConfig = output$1<typeof DnsConfigWithLegacySchema>;
|
|
6056
|
+
}, $strip>]>;
|
|
6057
|
+
type DnsProvider = output$1<typeof DnsProviderSchema>;
|
|
4749
6058
|
/**
|
|
4750
6059
|
* Backups configuration schema.
|
|
4751
6060
|
*
|
|
4752
6061
|
* Configures automatic backup destinations for database services.
|
|
4753
6062
|
* On first deploy, creates S3 bucket with unique name and IAM credentials.
|
|
4754
6063
|
*/
|
|
4755
|
-
declare const
|
|
6064
|
+
declare const DokployBackupsConfigSchema: ZodObject<{
|
|
4756
6065
|
type: ZodLiteral<"s3">;
|
|
4757
6066
|
profile: ZodOptional<ZodString>;
|
|
4758
6067
|
region: ZodEnum<{
|
|
@@ -4787,16 +6096,13 @@ declare const BackupsConfigSchema: ZodObject<{
|
|
|
4787
6096
|
schedule: ZodOptional<ZodString>;
|
|
4788
6097
|
retention: ZodOptional<ZodNumber>;
|
|
4789
6098
|
}, $strip>;
|
|
4790
|
-
type
|
|
6099
|
+
type DokployBackupsConfig = output$1<typeof DokployBackupsConfigSchema>;
|
|
4791
6100
|
/**
|
|
4792
6101
|
* Workspace configuration schema.
|
|
4793
6102
|
*/
|
|
4794
6103
|
declare const WorkspaceConfigSchema: ZodObject<{
|
|
4795
6104
|
name: ZodOptional<ZodString>;
|
|
4796
|
-
constructs: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString
|
|
4797
|
-
paths: ZodUnion<readonly [ZodString, ZodArray<ZodString>]>;
|
|
4798
|
-
partition: ZodCustom<(filepath: string) => string, (filepath: string) => string>;
|
|
4799
|
-
}, $strip>]>>;
|
|
6105
|
+
constructs: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
|
|
4800
6106
|
apps: ZodOptional<ZodRecord<ZodString, ZodObject<{
|
|
4801
6107
|
type: ZodDefault<ZodOptional<ZodEnum<{
|
|
4802
6108
|
backend: "backend";
|
|
@@ -4806,39 +6112,14 @@ declare const WorkspaceConfigSchema: ZodObject<{
|
|
|
4806
6112
|
path: ZodString;
|
|
4807
6113
|
port: ZodNumber;
|
|
4808
6114
|
dependencies: ZodOptional<ZodArray<ZodString>>;
|
|
4809
|
-
deploy: ZodOptional<
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
}, $strip>]>>;
|
|
4818
|
-
routes: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>, ZodObject<{
|
|
4819
|
-
paths: ZodUnion<readonly [ZodString, ZodArray<ZodString>]>;
|
|
4820
|
-
partition: ZodCustom<(filepath: string) => string, (filepath: string) => string>;
|
|
4821
|
-
}, $strip>]>>;
|
|
4822
|
-
functions: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>, ZodObject<{
|
|
4823
|
-
paths: ZodUnion<readonly [ZodString, ZodArray<ZodString>]>;
|
|
4824
|
-
partition: ZodCustom<(filepath: string) => string, (filepath: string) => string>;
|
|
4825
|
-
}, $strip>]>>;
|
|
4826
|
-
crons: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>, ZodObject<{
|
|
4827
|
-
paths: ZodUnion<readonly [ZodString, ZodArray<ZodString>]>;
|
|
4828
|
-
partition: ZodCustom<(filepath: string) => string, (filepath: string) => string>;
|
|
4829
|
-
}, $strip>]>>;
|
|
4830
|
-
queues: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>, ZodObject<{
|
|
4831
|
-
paths: ZodUnion<readonly [ZodString, ZodArray<ZodString>]>;
|
|
4832
|
-
partition: ZodCustom<(filepath: string) => string, (filepath: string) => string>;
|
|
4833
|
-
}, $strip>]>>;
|
|
4834
|
-
topics: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>, ZodObject<{
|
|
4835
|
-
paths: ZodUnion<readonly [ZodString, ZodArray<ZodString>]>;
|
|
4836
|
-
partition: ZodCustom<(filepath: string) => string, (filepath: string) => string>;
|
|
4837
|
-
}, $strip>]>>;
|
|
4838
|
-
subscribers: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>, ZodObject<{
|
|
4839
|
-
paths: ZodUnion<readonly [ZodString, ZodArray<ZodString>]>;
|
|
4840
|
-
partition: ZodCustom<(filepath: string) => string, (filepath: string) => string>;
|
|
4841
|
-
}, $strip>]>>;
|
|
6115
|
+
deploy: ZodOptional<ZodString>;
|
|
6116
|
+
constructs: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
|
|
6117
|
+
routes: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
|
|
6118
|
+
functions: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
|
|
6119
|
+
crons: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
|
|
6120
|
+
queues: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
|
|
6121
|
+
topics: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
|
|
6122
|
+
subscribers: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
|
|
4842
6123
|
envParser: ZodOptional<ZodString>;
|
|
4843
6124
|
logger: ZodOptional<ZodString>;
|
|
4844
6125
|
hooks: ZodOptional<ZodObject<{
|
|
@@ -4853,11 +6134,6 @@ declare const WorkspaceConfigSchema: ZodObject<{
|
|
|
4853
6134
|
maxEntries: ZodOptional<ZodNumber>;
|
|
4854
6135
|
websocket: ZodOptional<ZodBoolean>;
|
|
4855
6136
|
}, $strip>]>>;
|
|
4856
|
-
studio: ZodOptional<ZodUnion<readonly [ZodString, ZodBoolean, ZodObject<{
|
|
4857
|
-
enabled: ZodOptional<ZodBoolean>;
|
|
4858
|
-
path: ZodOptional<ZodString>;
|
|
4859
|
-
schema: ZodOptional<ZodString>;
|
|
4860
|
-
}, $strip>]>>;
|
|
4861
6137
|
openapi: ZodOptional<ZodUnion<readonly [ZodBoolean, ZodObject<{
|
|
4862
6138
|
enabled: ZodOptional<ZodBoolean>;
|
|
4863
6139
|
title: ZodOptional<ZodString>;
|
|
@@ -4897,78 +6173,190 @@ declare const WorkspaceConfigSchema: ZodObject<{
|
|
|
4897
6173
|
}>>;
|
|
4898
6174
|
}, $strip>>;
|
|
4899
6175
|
}, $strip>>;
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
6176
|
+
domains: ZodOptional<ZodRecord<ZodString, ZodString>>;
|
|
6177
|
+
protectedSubdomains: ZodOptional<ZodArray<ZodString>>;
|
|
6178
|
+
dns: ZodOptional<ZodRecord<ZodString, ZodUnion<readonly [ZodDiscriminatedUnion<[ZodObject<{
|
|
6179
|
+
provider: ZodLiteral<"hostinger">;
|
|
6180
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
6181
|
+
mode: ZodLiteral<"cname">;
|
|
6182
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
6183
|
+
}, $strict>]>>;
|
|
6184
|
+
ttl: ZodOptional<ZodNumber>;
|
|
6185
|
+
}, $strip>, ZodObject<{
|
|
6186
|
+
provider: ZodLiteral<"route53">;
|
|
6187
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
6188
|
+
mode: ZodLiteral<"cname">;
|
|
6189
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
6190
|
+
}, $strict>]>>;
|
|
6191
|
+
region: ZodOptional<ZodEnum<{
|
|
6192
|
+
"af-south-1": "af-south-1";
|
|
6193
|
+
"ap-east-1": "ap-east-1";
|
|
6194
|
+
"ap-northeast-1": "ap-northeast-1";
|
|
6195
|
+
"ap-northeast-2": "ap-northeast-2";
|
|
6196
|
+
"ap-northeast-3": "ap-northeast-3";
|
|
6197
|
+
"ap-south-1": "ap-south-1";
|
|
6198
|
+
"ap-south-2": "ap-south-2";
|
|
6199
|
+
"ap-southeast-1": "ap-southeast-1";
|
|
6200
|
+
"ap-southeast-2": "ap-southeast-2";
|
|
6201
|
+
"ap-southeast-3": "ap-southeast-3";
|
|
6202
|
+
"ap-southeast-4": "ap-southeast-4";
|
|
6203
|
+
"ca-central-1": "ca-central-1";
|
|
6204
|
+
"eu-central-1": "eu-central-1";
|
|
6205
|
+
"eu-central-2": "eu-central-2";
|
|
6206
|
+
"eu-north-1": "eu-north-1";
|
|
6207
|
+
"eu-south-1": "eu-south-1";
|
|
6208
|
+
"eu-south-2": "eu-south-2";
|
|
6209
|
+
"eu-west-1": "eu-west-1";
|
|
6210
|
+
"eu-west-2": "eu-west-2";
|
|
6211
|
+
"eu-west-3": "eu-west-3";
|
|
6212
|
+
"me-central-1": "me-central-1";
|
|
6213
|
+
"me-south-1": "me-south-1";
|
|
6214
|
+
"sa-east-1": "sa-east-1";
|
|
6215
|
+
"us-east-1": "us-east-1";
|
|
6216
|
+
"us-east-2": "us-east-2";
|
|
6217
|
+
"us-west-1": "us-west-1";
|
|
6218
|
+
"us-west-2": "us-west-2";
|
|
4905
6219
|
}>>;
|
|
6220
|
+
profile: ZodOptional<ZodString>;
|
|
6221
|
+
hostedZoneId: ZodOptional<ZodString>;
|
|
6222
|
+
ttl: ZodOptional<ZodNumber>;
|
|
6223
|
+
}, $strip>, ZodObject<{
|
|
6224
|
+
provider: ZodLiteral<"godaddy">;
|
|
6225
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
6226
|
+
mode: ZodLiteral<"cname">;
|
|
6227
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
6228
|
+
}, $strict>]>>;
|
|
6229
|
+
ttl: ZodOptional<ZodNumber>;
|
|
6230
|
+
}, $strip>, ZodObject<{
|
|
6231
|
+
provider: ZodLiteral<"cloudflare">;
|
|
6232
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
6233
|
+
mode: ZodLiteral<"cname">;
|
|
6234
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
6235
|
+
}, $strict>]>>;
|
|
6236
|
+
ttl: ZodOptional<ZodNumber>;
|
|
6237
|
+
}, $strip>, ZodObject<{
|
|
6238
|
+
provider: ZodLiteral<"manual">;
|
|
6239
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
6240
|
+
mode: ZodLiteral<"cname">;
|
|
6241
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
6242
|
+
}, $strict>]>>;
|
|
6243
|
+
}, $strip>], "provider">, ZodObject<{
|
|
6244
|
+
provider: ZodCustom<{
|
|
6245
|
+
name: string;
|
|
6246
|
+
getRecords: Function;
|
|
6247
|
+
upsertRecords: Function;
|
|
6248
|
+
}, {
|
|
6249
|
+
name: string;
|
|
6250
|
+
getRecords: Function;
|
|
6251
|
+
upsertRecords: Function;
|
|
6252
|
+
}>;
|
|
6253
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
6254
|
+
mode: ZodLiteral<"cname">;
|
|
6255
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
6256
|
+
}, $strict>]>>;
|
|
6257
|
+
ttl: ZodOptional<ZodNumber>;
|
|
6258
|
+
}, $strip>]>>>;
|
|
6259
|
+
deploy: ZodOptional<ZodObject<{
|
|
6260
|
+
default: ZodOptional<ZodString>;
|
|
6261
|
+
targets: ZodOptional<ZodRecord<ZodString, ZodUnion<readonly [ZodString, ZodCustom<unknown, unknown>, ZodTuple<[ZodUnion<readonly [ZodString, ZodCustom<unknown, unknown>]>, ZodUnknown], null>]>>>;
|
|
6262
|
+
namespace: ZodOptional<ZodString>;
|
|
6263
|
+
registry: ZodOptional<ZodString>;
|
|
4906
6264
|
dokploy: ZodOptional<ZodObject<{
|
|
4907
6265
|
endpoint: ZodOptional<ZodURL>;
|
|
4908
6266
|
endpoints: ZodOptional<ZodRecord<ZodString, ZodURL>>;
|
|
4909
|
-
registry: ZodOptional<ZodString>;
|
|
4910
6267
|
registryId: ZodOptional<ZodString>;
|
|
4911
|
-
|
|
6268
|
+
backups: ZodOptional<ZodLazy<ZodObject<{
|
|
6269
|
+
type: ZodLiteral<"s3">;
|
|
6270
|
+
profile: ZodOptional<ZodString>;
|
|
6271
|
+
region: ZodEnum<{
|
|
6272
|
+
"af-south-1": "af-south-1";
|
|
6273
|
+
"ap-east-1": "ap-east-1";
|
|
6274
|
+
"ap-northeast-1": "ap-northeast-1";
|
|
6275
|
+
"ap-northeast-2": "ap-northeast-2";
|
|
6276
|
+
"ap-northeast-3": "ap-northeast-3";
|
|
6277
|
+
"ap-south-1": "ap-south-1";
|
|
6278
|
+
"ap-south-2": "ap-south-2";
|
|
6279
|
+
"ap-southeast-1": "ap-southeast-1";
|
|
6280
|
+
"ap-southeast-2": "ap-southeast-2";
|
|
6281
|
+
"ap-southeast-3": "ap-southeast-3";
|
|
6282
|
+
"ap-southeast-4": "ap-southeast-4";
|
|
6283
|
+
"ca-central-1": "ca-central-1";
|
|
6284
|
+
"eu-central-1": "eu-central-1";
|
|
6285
|
+
"eu-central-2": "eu-central-2";
|
|
6286
|
+
"eu-north-1": "eu-north-1";
|
|
6287
|
+
"eu-south-1": "eu-south-1";
|
|
6288
|
+
"eu-south-2": "eu-south-2";
|
|
6289
|
+
"eu-west-1": "eu-west-1";
|
|
6290
|
+
"eu-west-2": "eu-west-2";
|
|
6291
|
+
"eu-west-3": "eu-west-3";
|
|
6292
|
+
"me-central-1": "me-central-1";
|
|
6293
|
+
"me-south-1": "me-south-1";
|
|
6294
|
+
"sa-east-1": "sa-east-1";
|
|
6295
|
+
"us-east-1": "us-east-1";
|
|
6296
|
+
"us-east-2": "us-east-2";
|
|
6297
|
+
"us-west-1": "us-west-1";
|
|
6298
|
+
"us-west-2": "us-west-2";
|
|
6299
|
+
}>;
|
|
6300
|
+
schedule: ZodOptional<ZodString>;
|
|
6301
|
+
retention: ZodOptional<ZodNumber>;
|
|
6302
|
+
}, $strip>>>;
|
|
6303
|
+
verify: ZodOptional<ZodObject<{
|
|
6304
|
+
deploymentTimeoutMs: ZodOptional<ZodNumber>;
|
|
6305
|
+
healthCheckPath: ZodOptional<ZodString>;
|
|
6306
|
+
healthyAfter: ZodOptional<ZodNumber>;
|
|
6307
|
+
intervalMs: ZodOptional<ZodNumber>;
|
|
6308
|
+
healthTimeoutMs: ZodOptional<ZodNumber>;
|
|
6309
|
+
}, $strip>>;
|
|
4912
6310
|
}, $strip>>;
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
getRecords: Function;
|
|
4963
|
-
upsertRecords: Function;
|
|
4964
|
-
}>;
|
|
4965
|
-
ttl: ZodOptional<ZodNumber>;
|
|
4966
|
-
}, $strip>]>>, ZodUnion<readonly [ZodDiscriminatedUnion<[ZodObject<{
|
|
4967
|
-
provider: ZodLiteral<"hostinger">;
|
|
4968
|
-
ttl: ZodOptional<ZodNumber>;
|
|
4969
|
-
domain: ZodString;
|
|
4970
|
-
}, $strip>, ZodObject<{
|
|
4971
|
-
provider: ZodLiteral<"route53">;
|
|
6311
|
+
compose: ZodOptional<ZodObject<{
|
|
6312
|
+
proxy: ZodOptional<ZodUnion<readonly [ZodEnum<{
|
|
6313
|
+
caddy: "caddy";
|
|
6314
|
+
traefik: "traefik";
|
|
6315
|
+
}>, ZodRecord<ZodString, ZodEnum<{
|
|
6316
|
+
caddy: "caddy";
|
|
6317
|
+
traefik: "traefik";
|
|
6318
|
+
}>>]>>;
|
|
6319
|
+
tls: ZodOptional<ZodRecord<ZodString, ZodObject<{
|
|
6320
|
+
certFile: ZodString;
|
|
6321
|
+
keyFile: ZodString;
|
|
6322
|
+
caFile: ZodOptional<ZodString>;
|
|
6323
|
+
}, $strict>>>;
|
|
6324
|
+
server: ZodOptional<ZodRecord<ZodString, ZodObject<{
|
|
6325
|
+
user: ZodString;
|
|
6326
|
+
host: ZodOptional<ZodString>;
|
|
6327
|
+
port: ZodOptional<ZodNumber>;
|
|
6328
|
+
}, $strict>>>;
|
|
6329
|
+
}, $strict>>;
|
|
6330
|
+
telemetry: ZodOptional<ZodRecord<ZodString, ZodUnion<readonly [ZodLiteral<false>, ZodLiteral<"self-hosted">, ZodObject<{
|
|
6331
|
+
provider: ZodLiteral<"self-hosted">;
|
|
6332
|
+
port: ZodOptional<ZodNumber>;
|
|
6333
|
+
retentionDays: ZodOptional<ZodNumber>;
|
|
6334
|
+
public: ZodOptional<ZodObject<{
|
|
6335
|
+
allow: ZodArray<ZodString>;
|
|
6336
|
+
}, $strip>>;
|
|
6337
|
+
sampleRate: ZodOptional<ZodNumber>;
|
|
6338
|
+
}, $strict>, ZodObject<{
|
|
6339
|
+
provider: ZodLiteral<"otlp">;
|
|
6340
|
+
endpoint: ZodString;
|
|
6341
|
+
headers: ZodOptional<ZodRecord<ZodString, ZodString>>;
|
|
6342
|
+
sampleRate: ZodOptional<ZodNumber>;
|
|
6343
|
+
}, $strict>]>>>;
|
|
6344
|
+
objects: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
6345
|
+
inbox: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
6346
|
+
email: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
6347
|
+
backups: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
6348
|
+
cdn: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
6349
|
+
}, $strip>>;
|
|
6350
|
+
stages: ZodObject<{
|
|
6351
|
+
local: ZodString;
|
|
6352
|
+
deployed: ZodArray<ZodString>;
|
|
6353
|
+
protected: ZodOptional<ZodArray<ZodString>>;
|
|
6354
|
+
}, $strip>;
|
|
6355
|
+
secrets: ZodOptional<ZodObject<{
|
|
6356
|
+
enabled: ZodOptional<ZodBoolean>;
|
|
6357
|
+
store: ZodOptional<ZodUnion<readonly [ZodLiteral<"file">, ZodObject<{
|
|
6358
|
+
provider: ZodLiteral<"s3">;
|
|
6359
|
+
bucket: ZodOptional<ZodString>;
|
|
4972
6360
|
region: ZodOptional<ZodEnum<{
|
|
4973
6361
|
"af-south-1": "af-south-1";
|
|
4974
6362
|
"ap-east-1": "ap-east-1";
|
|
@@ -4995,36 +6383,12 @@ declare const WorkspaceConfigSchema: ZodObject<{
|
|
|
4995
6383
|
"sa-east-1": "sa-east-1";
|
|
4996
6384
|
"us-east-1": "us-east-1";
|
|
4997
6385
|
"us-east-2": "us-east-2";
|
|
4998
|
-
"us-west-1": "us-west-1";
|
|
4999
|
-
"us-west-2": "us-west-2";
|
|
5000
|
-
}>>;
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
domain: ZodString;
|
|
5005
|
-
}, $strip>, ZodObject<{
|
|
5006
|
-
provider: ZodLiteral<"cloudflare">;
|
|
5007
|
-
ttl: ZodOptional<ZodNumber>;
|
|
5008
|
-
domain: ZodString;
|
|
5009
|
-
}, $strip>, ZodObject<{
|
|
5010
|
-
provider: ZodLiteral<"manual">;
|
|
5011
|
-
domain: ZodString;
|
|
5012
|
-
}, $strip>], "provider">, ZodObject<{
|
|
5013
|
-
provider: ZodCustom<{
|
|
5014
|
-
name: string;
|
|
5015
|
-
getRecords: Function;
|
|
5016
|
-
upsertRecords: Function;
|
|
5017
|
-
}, {
|
|
5018
|
-
name: string;
|
|
5019
|
-
getRecords: Function;
|
|
5020
|
-
upsertRecords: Function;
|
|
5021
|
-
}>;
|
|
5022
|
-
ttl: ZodOptional<ZodNumber>;
|
|
5023
|
-
domain: ZodString;
|
|
5024
|
-
}, $strip>]>]>>;
|
|
5025
|
-
backups: ZodOptional<ZodObject<{
|
|
5026
|
-
type: ZodLiteral<"s3">;
|
|
5027
|
-
profile: ZodOptional<ZodString>;
|
|
6386
|
+
"us-west-1": "us-west-1";
|
|
6387
|
+
"us-west-2": "us-west-2";
|
|
6388
|
+
}>>;
|
|
6389
|
+
prefix: ZodOptional<ZodString>;
|
|
6390
|
+
}, $strict>, ZodObject<{
|
|
6391
|
+
provider: ZodLiteral<"ssm">;
|
|
5028
6392
|
region: ZodEnum<{
|
|
5029
6393
|
"af-south-1": "af-south-1";
|
|
5030
6394
|
"ap-east-1": "ap-east-1";
|
|
@@ -5054,19 +6418,8 @@ declare const WorkspaceConfigSchema: ZodObject<{
|
|
|
5054
6418
|
"us-west-1": "us-west-1";
|
|
5055
6419
|
"us-west-2": "us-west-2";
|
|
5056
6420
|
}>;
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
}, $strip>>;
|
|
5060
|
-
}, $strip>>;
|
|
5061
|
-
stages: ZodObject<{
|
|
5062
|
-
local: ZodString;
|
|
5063
|
-
deployed: ZodArray<ZodString>;
|
|
5064
|
-
protected: ZodOptional<ZodArray<ZodString>>;
|
|
5065
|
-
}, $strip>;
|
|
5066
|
-
secrets: ZodOptional<ZodObject<{
|
|
5067
|
-
enabled: ZodOptional<ZodBoolean>;
|
|
5068
|
-
store: ZodOptional<ZodUnion<readonly [ZodLiteral<"file">, ZodObject<{
|
|
5069
|
-
provider: ZodLiteral<"ssm">;
|
|
6421
|
+
}, $strict>, ZodObject<{
|
|
6422
|
+
provider: ZodLiteral<"secrets-manager">;
|
|
5070
6423
|
region: ZodEnum<{
|
|
5071
6424
|
"af-south-1": "af-south-1";
|
|
5072
6425
|
"ap-east-1": "ap-east-1";
|
|
@@ -5096,13 +6449,16 @@ declare const WorkspaceConfigSchema: ZodObject<{
|
|
|
5096
6449
|
"us-west-1": "us-west-1";
|
|
5097
6450
|
"us-west-2": "us-west-2";
|
|
5098
6451
|
}>;
|
|
6452
|
+
kmsKeyId: ZodOptional<ZodString>;
|
|
5099
6453
|
}, $strict>, ZodObject<{
|
|
5100
6454
|
provider: ZodCustom<{
|
|
5101
|
-
|
|
5102
|
-
|
|
6455
|
+
name: string;
|
|
6456
|
+
read: Function;
|
|
6457
|
+
write: Function;
|
|
5103
6458
|
}, {
|
|
5104
|
-
|
|
5105
|
-
|
|
6459
|
+
name: string;
|
|
6460
|
+
read: Function;
|
|
6461
|
+
write: Function;
|
|
5106
6462
|
}>;
|
|
5107
6463
|
}, $strip>]>>;
|
|
5108
6464
|
algorithm: ZodOptional<ZodString>;
|
|
@@ -5145,6 +6501,40 @@ declare const WorkspaceConfigSchema: ZodObject<{
|
|
|
5145
6501
|
"us-west-2": "us-west-2";
|
|
5146
6502
|
}>;
|
|
5147
6503
|
profile: ZodOptional<ZodString>;
|
|
6504
|
+
}, $strip>, ZodObject<{
|
|
6505
|
+
provider: ZodLiteral<"s3">;
|
|
6506
|
+
bucket: ZodOptional<ZodString>;
|
|
6507
|
+
region: ZodEnum<{
|
|
6508
|
+
"af-south-1": "af-south-1";
|
|
6509
|
+
"ap-east-1": "ap-east-1";
|
|
6510
|
+
"ap-northeast-1": "ap-northeast-1";
|
|
6511
|
+
"ap-northeast-2": "ap-northeast-2";
|
|
6512
|
+
"ap-northeast-3": "ap-northeast-3";
|
|
6513
|
+
"ap-south-1": "ap-south-1";
|
|
6514
|
+
"ap-south-2": "ap-south-2";
|
|
6515
|
+
"ap-southeast-1": "ap-southeast-1";
|
|
6516
|
+
"ap-southeast-2": "ap-southeast-2";
|
|
6517
|
+
"ap-southeast-3": "ap-southeast-3";
|
|
6518
|
+
"ap-southeast-4": "ap-southeast-4";
|
|
6519
|
+
"ca-central-1": "ca-central-1";
|
|
6520
|
+
"eu-central-1": "eu-central-1";
|
|
6521
|
+
"eu-central-2": "eu-central-2";
|
|
6522
|
+
"eu-north-1": "eu-north-1";
|
|
6523
|
+
"eu-south-1": "eu-south-1";
|
|
6524
|
+
"eu-south-2": "eu-south-2";
|
|
6525
|
+
"eu-west-1": "eu-west-1";
|
|
6526
|
+
"eu-west-2": "eu-west-2";
|
|
6527
|
+
"eu-west-3": "eu-west-3";
|
|
6528
|
+
"me-central-1": "me-central-1";
|
|
6529
|
+
"me-south-1": "me-south-1";
|
|
6530
|
+
"sa-east-1": "sa-east-1";
|
|
6531
|
+
"us-east-1": "us-east-1";
|
|
6532
|
+
"us-east-2": "us-east-2";
|
|
6533
|
+
"us-west-1": "us-west-1";
|
|
6534
|
+
"us-west-2": "us-west-2";
|
|
6535
|
+
}>;
|
|
6536
|
+
prefix: ZodOptional<ZodString>;
|
|
6537
|
+
profile: ZodOptional<ZodString>;
|
|
5148
6538
|
}, $strip>], "provider">, ZodObject<{
|
|
5149
6539
|
provider: ZodCustom<{
|
|
5150
6540
|
read: Function;
|
|
@@ -5154,6 +6544,13 @@ declare const WorkspaceConfigSchema: ZodObject<{
|
|
|
5154
6544
|
write: Function;
|
|
5155
6545
|
}>;
|
|
5156
6546
|
}, $strip>]>>;
|
|
6547
|
+
test: ZodOptional<ZodObject<{
|
|
6548
|
+
factories: ZodOptional<ZodString>;
|
|
6549
|
+
}, $strict>>;
|
|
6550
|
+
dev: ZodOptional<ZodObject<{
|
|
6551
|
+
allowedOrigins: ZodOptional<ZodArray<ZodURL>>;
|
|
6552
|
+
discoveryPort: ZodOptional<ZodNumber>;
|
|
6553
|
+
}, $strict>>;
|
|
5157
6554
|
}, $strict>;
|
|
5158
6555
|
/**
|
|
5159
6556
|
* Validate workspace configuration.
|
|
@@ -5175,42 +6572,59 @@ declare function formatValidationErrors(error: ZodError): string;
|
|
|
5175
6572
|
//#endregion
|
|
5176
6573
|
//#region src/workspace/types.d.ts
|
|
5177
6574
|
/**
|
|
5178
|
-
*
|
|
5179
|
-
*
|
|
5180
|
-
* Specifies where the app will be deployed.
|
|
6575
|
+
* Where a stage — or one app — deploys, by target name: a built-in
|
|
6576
|
+
* (`dokploy`, `sst`) or a key of `deploy.targets`.
|
|
5181
6577
|
*
|
|
5182
6578
|
* @example
|
|
5183
6579
|
* ```ts
|
|
5184
|
-
* // Currently supported
|
|
5185
6580
|
* deploy: 'dokploy'
|
|
5186
|
-
*
|
|
5187
|
-
* // Future support (not yet implemented)
|
|
5188
|
-
* deploy: 'vercel'
|
|
5189
|
-
* deploy: 'cloudflare'
|
|
6581
|
+
* deploy: 'acme' // deploy: { targets: { acme: '@acme/gkm-target' } }
|
|
5190
6582
|
* ```
|
|
5191
6583
|
*/
|
|
5192
|
-
type
|
|
6584
|
+
type DeployTargetName = 'dokploy' | 'compose' | 'sst' | (string & {});
|
|
6585
|
+
/**
|
|
6586
|
+
* A per-stage map, typed from the workspace's deployed stages: a key that is
|
|
6587
|
+
* not one is a type error. Untyped (`string`) stages accept any key, which the
|
|
6588
|
+
* schema then checks at load.
|
|
6589
|
+
*/
|
|
6590
|
+
type StageMap<S extends string, V> = string extends S ? Record<string, V> : Partial<Record<S, V>>;
|
|
6591
|
+
/**
|
|
6592
|
+
* `domains: { <stage>: '<domain>' }` at the root of `defineWorkspace`, typed from
|
|
6593
|
+
* the deployed stages.
|
|
6594
|
+
*/
|
|
6595
|
+
type DomainsInput<S extends string = string> = StageMap<S, string>;
|
|
6596
|
+
/** How one root domain's hosts point at a compose stage's server. */
|
|
6597
|
+
type DnsRecordsModeInput<S extends string = string> = 'a' | {
|
|
6598
|
+
mode: 'cname';
|
|
6599
|
+
target: string | StageMap<S, string>;
|
|
6600
|
+
};
|
|
6601
|
+
/** One root domain's DNS provider, its records mode typed from the stages. */
|
|
6602
|
+
type DnsDomainInput<S extends string = string> = DnsProvider extends (infer P) ? P extends unknown ? Omit<P, 'records'> & {
|
|
6603
|
+
records?: DnsRecordsModeInput<S>;
|
|
6604
|
+
} : never : never;
|
|
6605
|
+
/** `dns: { '<root domain>': { provider, … } }` at the root of `defineWorkspace`. */
|
|
6606
|
+
type DnsInput<S extends string = string> = Record<string, DnsDomainInput<S>>;
|
|
6607
|
+
/** Each root domain's DNS provider — `dns` at the root of the config. */
|
|
6608
|
+
type WorkspaceDnsConfig = Record<string, DnsProvider>;
|
|
5193
6609
|
/**
|
|
5194
|
-
*
|
|
6610
|
+
* Each deployed stage's base domain — `domains` at the root of the config.
|
|
5195
6611
|
*
|
|
5196
|
-
*
|
|
5197
|
-
*
|
|
6612
|
+
* A fact about the deployment rather than the platform, so every target reads
|
|
6613
|
+
* it. The root site answers on the base domain; every other surface on
|
|
6614
|
+
* `{subdomain}.{domain}`, where the subdomain is the construct's own
|
|
6615
|
+
* `subdomain`, or its id kebab-cased.
|
|
5198
6616
|
*
|
|
5199
6617
|
* @example
|
|
5200
6618
|
* ```ts
|
|
5201
|
-
* domains: {
|
|
5202
|
-
* development: 'dev.myapp.com',
|
|
5203
|
-
* staging: 'staging.myapp.com',
|
|
5204
|
-
* production: 'myapp.com',
|
|
5205
|
-
* }
|
|
6619
|
+
* domains: { production: 'myapp.com', staging: 'staging.myapp.com' },
|
|
5206
6620
|
*
|
|
5207
|
-
* //
|
|
5208
|
-
* // -
|
|
5209
|
-
* // -
|
|
5210
|
-
* // -
|
|
6621
|
+
* // production:
|
|
6622
|
+
* // - new StaticSite('Web', { root: true }) → myapp.com
|
|
6623
|
+
* // - new RestApi('Api', { subdomain: 'api' }) → api.myapp.com
|
|
6624
|
+
* // - new RestApi('Webhooks', { … }) → webhooks.myapp.com
|
|
5211
6625
|
* ```
|
|
5212
6626
|
*/
|
|
5213
|
-
type
|
|
6627
|
+
type DomainsConfig = Record<string, string>;
|
|
5214
6628
|
/**
|
|
5215
6629
|
* Per-app domain override configuration.
|
|
5216
6630
|
*
|
|
@@ -5242,9 +6656,9 @@ type AppDomainConfig = string | Record<string, string>;
|
|
|
5242
6656
|
* ```ts
|
|
5243
6657
|
* deploy: {
|
|
5244
6658
|
* default: 'dokploy',
|
|
6659
|
+
* registry: 'ghcr.io/myorg',
|
|
5245
6660
|
* dokploy: {
|
|
5246
6661
|
* endpoint: 'https://dokploy.myserver.com',
|
|
5247
|
-
* registry: 'ghcr.io/myorg',
|
|
5248
6662
|
* },
|
|
5249
6663
|
* }
|
|
5250
6664
|
* ```
|
|
@@ -5253,12 +6667,12 @@ type AppDomainConfig = string | Record<string, string>;
|
|
|
5253
6667
|
* ```ts
|
|
5254
6668
|
* deploy: {
|
|
5255
6669
|
* default: 'dokploy',
|
|
6670
|
+
* registry: 'ghcr.io/myorg',
|
|
5256
6671
|
* dokploy: {
|
|
5257
6672
|
* endpoints: {
|
|
5258
6673
|
* development: 'https://dev-dokploy.myserver.com',
|
|
5259
6674
|
* production: 'https://dokploy.myserver.com',
|
|
5260
6675
|
* },
|
|
5261
|
-
* registry: 'ghcr.io/myorg',
|
|
5262
6676
|
* },
|
|
5263
6677
|
* }
|
|
5264
6678
|
* ```
|
|
@@ -5268,16 +6682,305 @@ interface DokployWorkspaceConfig {
|
|
|
5268
6682
|
endpoint?: string;
|
|
5269
6683
|
/** Per-stage Dokploy API endpoints (overrides endpoint) */
|
|
5270
6684
|
endpoints?: Record<string, string>;
|
|
5271
|
-
/** Container registry for Docker images (e.g., 'ghcr.io/myorg') */
|
|
5272
|
-
registry?: string;
|
|
5273
6685
|
/** Registry ID in Dokploy (auto-configured) */
|
|
5274
6686
|
registryId?: string;
|
|
6687
|
+
/** Dokploy's own backup schedule for the stage's Postgres, to an S3 destination. */
|
|
6688
|
+
backups?: DokployBackupsConfig;
|
|
6689
|
+
/** How a release is waited for and checked before it counts as live. */
|
|
6690
|
+
verify?: DokployVerifyConfig;
|
|
6691
|
+
}
|
|
6692
|
+
/**
|
|
6693
|
+
* How a Dokploy release is waited for and checked.
|
|
6694
|
+
*
|
|
6695
|
+
* A release counts once Dokploy's deployment has finished and the app has
|
|
6696
|
+
* answered its health route `healthyAfter` times in a row. One that does not
|
|
6697
|
+
* is rolled back.
|
|
6698
|
+
*/
|
|
6699
|
+
interface DokployVerifyConfig {
|
|
6700
|
+
/** How long Dokploy may take to finish a deployment. Default 10 minutes. */
|
|
6701
|
+
deploymentTimeoutMs?: number;
|
|
6702
|
+
/**
|
|
6703
|
+
* The path each backend is checked on, under its domain. Default
|
|
6704
|
+
* `/health`, which every production server build serves. A site is
|
|
6705
|
+
* checked at `/`.
|
|
6706
|
+
*/
|
|
6707
|
+
healthCheckPath?: string;
|
|
6708
|
+
/** Consecutive 2xx answers that make an app healthy. Default 3. */
|
|
6709
|
+
healthyAfter?: number;
|
|
6710
|
+
/** Between health checks, and the first wait between polls. Default 2s. */
|
|
6711
|
+
intervalMs?: number;
|
|
6712
|
+
/** How long an app may take to become healthy. Default 5 minutes. */
|
|
6713
|
+
healthTimeoutMs?: number;
|
|
6714
|
+
}
|
|
6715
|
+
/**
|
|
6716
|
+
* The `compose` target's own settings — `deploy.compose`. Read by `gkm
|
|
6717
|
+
* compose` and `gkm deploy --target compose` only; the Dokploy target never
|
|
6718
|
+
* consults it.
|
|
6719
|
+
*
|
|
6720
|
+
* @example
|
|
6721
|
+
* ```ts
|
|
6722
|
+
* deploy: { compose: { proxy: 'traefik' } }
|
|
6723
|
+
* ```
|
|
6724
|
+
*/
|
|
6725
|
+
interface ComposeWorkspaceConfig<S extends string = string> {
|
|
6726
|
+
/**
|
|
6727
|
+
* What serves a stage's stack: `'caddy'` (the default) — the stack's own
|
|
6728
|
+
* Caddy on 80/443 — or `'traefik'`, the machine's shared Traefik edge,
|
|
6729
|
+
* which every stack registers its routes with.
|
|
6730
|
+
*
|
|
6731
|
+
* One value applies to every stage, the local one included: on
|
|
6732
|
+
* `'traefik'` the local stack runs behind a Traefik edge on this machine,
|
|
6733
|
+
* the path the deployed stages take on their servers. `gkm dev` and
|
|
6734
|
+
* `gkm test` follow the local stage's: behind Traefik they register their
|
|
6735
|
+
* routes with that same edge and run no Caddy. A map sets each stage it
|
|
6736
|
+
* names, and a stage it leaves out is on Caddy — the way to run one stage
|
|
6737
|
+
* on something else.
|
|
6738
|
+
*
|
|
6739
|
+
* ```ts
|
|
6740
|
+
* proxy: 'traefik' // every stage, the local one included
|
|
6741
|
+
* proxy: { development: 'caddy', staging: 'traefik', production: 'traefik' }
|
|
6742
|
+
* ```
|
|
6743
|
+
*/
|
|
6744
|
+
proxy?: ComposeProxy | StageMap<S, ComposeProxy>;
|
|
6745
|
+
/**
|
|
6746
|
+
* A stage's own certificate, by stage: a PEM certificate (with its chain)
|
|
6747
|
+
* and its key, relative to the workspace root or absolute. Either proxy
|
|
6748
|
+
* serves it, on any stage. Without one, a deployed stage's comes from
|
|
6749
|
+
* Let's Encrypt and the local stage's from gkm's local CA (`gkm trust`).
|
|
6750
|
+
*
|
|
6751
|
+
* ```ts
|
|
6752
|
+
* tls: { production: { certFile: 'certs/origin.pem', keyFile: 'certs/origin.key' } }
|
|
6753
|
+
* tls: {
|
|
6754
|
+
* development: {
|
|
6755
|
+
* certFile: 'certs/dev.pem',
|
|
6756
|
+
* keyFile: 'certs/dev-key.pem',
|
|
6757
|
+
* caFile: 'certs/rootCA.pem',
|
|
6758
|
+
* },
|
|
6759
|
+
* }
|
|
6760
|
+
* ```
|
|
6761
|
+
*/
|
|
6762
|
+
tls?: StageMap<S, ComposeTlsConfig>;
|
|
6763
|
+
/**
|
|
6764
|
+
* Each deployed stage's server: the SSH login gkm drives its Docker
|
|
6765
|
+
* engine with (`DOCKER_HOST=ssh://user@host`). gkm runs where the deploy
|
|
6766
|
+
* starts — a CI runner, a laptop — and never on the server, which holds
|
|
6767
|
+
* Docker and this login and no cloud credentials. The host defaults to
|
|
6768
|
+
* the stage's `GKM_SERVER_IPV4` secret. Every deployed stage needs one;
|
|
6769
|
+
* the local stage runs on this machine's Docker.
|
|
6770
|
+
*
|
|
6771
|
+
* ```ts
|
|
6772
|
+
* server: { production: { user: 'deploy' } }
|
|
6773
|
+
* server: { staging: { user: 'deploy', host: 'staging.example.com', port: 2222 } }
|
|
6774
|
+
* ```
|
|
6775
|
+
*/
|
|
6776
|
+
server?: StageMap<S, ComposeServerConfig>;
|
|
6777
|
+
}
|
|
6778
|
+
/** A deployed stage's server — `deploy.compose.server.<stage>`. */
|
|
6779
|
+
interface ComposeServerConfig {
|
|
6780
|
+
/** The SSH user, in the server's `docker` group. */
|
|
6781
|
+
user: string;
|
|
6782
|
+
/** The host to SSH to. Default: the stage's `GKM_SERVER_IPV4` secret. */
|
|
6783
|
+
host?: string;
|
|
6784
|
+
/** The SSH port. Default 22. */
|
|
6785
|
+
port?: number;
|
|
6786
|
+
}
|
|
6787
|
+
/** A stage's own certificate — `deploy.compose.tls.<stage>`. */
|
|
6788
|
+
interface ComposeTlsConfig {
|
|
6789
|
+
certFile: string;
|
|
6790
|
+
keyFile: string;
|
|
6791
|
+
/**
|
|
6792
|
+
* The root the certificate chains to, PEM, when no public CA issued it —
|
|
6793
|
+
* an mkcert root, a company CA. gkm's check after a start trusts it; on
|
|
6794
|
+
* the local stage the stack's containers are handed it too
|
|
6795
|
+
* (`NODE_EXTRA_CA_CERTS`). Without it, the check trusts what Node does by
|
|
6796
|
+
* default: its bundled roots, and `NODE_EXTRA_CA_CERTS` where it is set.
|
|
6797
|
+
*/
|
|
6798
|
+
caFile?: string;
|
|
6799
|
+
}
|
|
6800
|
+
/**
|
|
6801
|
+
* Where one stage's telemetry goes, and how much of it — `deploy.telemetry`,
|
|
6802
|
+
* by stage.
|
|
6803
|
+
*
|
|
6804
|
+
* What is emitted is the application's (the `Telemetry` construct); where it
|
|
6805
|
+
* goes is this. A server target runs the self-hosted provider when a stage
|
|
6806
|
+
* names nothing; AWS has none, so a deployed AWS stage that uses telemetry
|
|
6807
|
+
* names a provider. `false` sends nothing. The local stage ignores this: `gkm
|
|
6808
|
+
* dev` and `gkm compose` on it always run OpenObserve, at 100%.
|
|
6809
|
+
*
|
|
6810
|
+
* @example
|
|
6811
|
+
* ```ts
|
|
6812
|
+
* telemetry: {
|
|
6813
|
+
* staging: 'self-hosted',
|
|
6814
|
+
* production: { provider: 'self-hosted', retentionDays: 14, sampleRate: 0.1 },
|
|
6815
|
+
* preview: { provider: 'otlp', endpoint: 'https://otlp.example.com', sampleRate: 0.5 },
|
|
6816
|
+
* scratch: false,
|
|
6817
|
+
* }
|
|
6818
|
+
* ```
|
|
6819
|
+
*/
|
|
6820
|
+
type StageTelemetryConfig = 'self-hosted' | SelfHostedTelemetryConfig | OtlpTelemetryConfig | false;
|
|
6821
|
+
/**
|
|
6822
|
+
* What backs one deployed stage's buckets — `deploy.objects`, by stage.
|
|
6823
|
+
*
|
|
6824
|
+
* - `'external'` (the default) — the stage's secrets hold each bucket's URL,
|
|
6825
|
+
* set by you: S3, R2, any S3-compatible store.
|
|
6826
|
+
* - `{ provider: 's3' }` — every deploy of the stage creates (or repairs)
|
|
6827
|
+
* each bucket, its IAM user and key in the stage's AWS account, and writes
|
|
6828
|
+
* the bucket's URL into the stage's secrets, before its checks.
|
|
6829
|
+
* - `false` — the stage has no object storage; a bucket on it is refused.
|
|
6830
|
+
*
|
|
6831
|
+
* The local stage ignores this: `gkm dev` runs MinIO for every bucket.
|
|
6832
|
+
*
|
|
6833
|
+
* @example
|
|
6834
|
+
* ```ts
|
|
6835
|
+
* objects: {
|
|
6836
|
+
* production: { provider: 's3', region: 'eu-west-1', versioning: true },
|
|
6837
|
+
* staging: 'external',
|
|
6838
|
+
* }
|
|
6839
|
+
* ```
|
|
6840
|
+
*/
|
|
6841
|
+
type StageObjectsConfig = 'external' | S3ObjectsConfig | false;
|
|
6842
|
+
/**
|
|
6843
|
+
* What receives one deployed stage's inboxes — `deploy.inbox`, by stage:
|
|
6844
|
+
*
|
|
6845
|
+
* - `{ provider: 'ses' }` — the deploy creates each inbox in the stage's AWS
|
|
6846
|
+
* account: its own bucket and topic, the domain's SES identity and MX
|
|
6847
|
+
* records, and a receipt rule in the region's active rule set.
|
|
6848
|
+
* - `'external'` — the default: the stage's secrets hold each inbox's keys.
|
|
6849
|
+
* - `false` — the stage receives no mail; an inbox on it is refused.
|
|
6850
|
+
*
|
|
6851
|
+
* Every local stage receives through Mailpit, whatever this says.
|
|
6852
|
+
*
|
|
6853
|
+
* @example
|
|
6854
|
+
* ```ts
|
|
6855
|
+
* inbox: { production: { provider: 'ses', region: 'eu-west-1' } }
|
|
6856
|
+
* ```
|
|
6857
|
+
*/
|
|
6858
|
+
type StageInboxConfig = 'external' | SesInboxConfig | false;
|
|
6859
|
+
/**
|
|
6860
|
+
* What sends one deployed stage's mail — `deploy.email`, by stage:
|
|
6861
|
+
*
|
|
6862
|
+
* - `{ provider: 'ses' }` — the deploy creates what each `Email` construct
|
|
6863
|
+
* sends with in the stage's AWS account: the sender's domain as an SES
|
|
6864
|
+
* identity (its DKIM records through `dns`), an IAM user allowed only to
|
|
6865
|
+
* send as it, and its key — written as `<ID>_URL`, an `smtp://` URL with
|
|
6866
|
+
* the SMTP password derived from the key — and `<ID>_FROM`. A `<ID>_URL`
|
|
6867
|
+
* the stage's secrets already hold wins, and nothing is created for it.
|
|
6868
|
+
* - `'external'` — the default: the stage's secrets hold each construct's
|
|
6869
|
+
* `<ID>_URL` and `<ID>_FROM`, set by you.
|
|
6870
|
+
* - `false` — the stage sends no mail; an `Email` on it is refused.
|
|
6871
|
+
*
|
|
6872
|
+
* Every local stage sends to Mailpit, whatever this says.
|
|
6873
|
+
*
|
|
6874
|
+
* @example
|
|
6875
|
+
* ```ts
|
|
6876
|
+
* email: {
|
|
6877
|
+
* production: { provider: 'ses', region: 'eu-west-1' },
|
|
6878
|
+
* staging: 'external',
|
|
6879
|
+
* }
|
|
6880
|
+
* ```
|
|
6881
|
+
*/
|
|
6882
|
+
type StageEmailConfig = 'external' | SesEmailConfig | false;
|
|
6883
|
+
/**
|
|
6884
|
+
* One deployed compose stage's backups — `deploy.backups`, by stage.
|
|
6885
|
+
*
|
|
6886
|
+
* A stage that runs Postgres is backed up whether it names one or not: every
|
|
6887
|
+
* day at 02:00 UTC, each backup kept 30 days, in the project bucket. An
|
|
6888
|
+
* entry changes when (`every`, or a five-field UTC `cron`, at most hourly)
|
|
6889
|
+
* and for how long (`keep`); `false` takes none, and deletes nothing.
|
|
6890
|
+
*
|
|
6891
|
+
* @example
|
|
6892
|
+
* ```ts
|
|
6893
|
+
* backups: {
|
|
6894
|
+
* production: { every: '6h', keep: '30d' },
|
|
6895
|
+
* staging: { cron: '30 3 * * *', keep: '7d' },
|
|
6896
|
+
* preview: false,
|
|
6897
|
+
* }
|
|
6898
|
+
* ```
|
|
6899
|
+
*/
|
|
6900
|
+
type StageBackupsConfig = false | {
|
|
6901
|
+
/** `'6h'`, `'1d'` — counted from 02:00 UTC. At least `'1h'`. */
|
|
6902
|
+
every?: string;
|
|
6903
|
+
/** Five fields, in UTC: `'0 *\/6 * * *'`. */
|
|
6904
|
+
cron?: string;
|
|
6905
|
+
/** How long a backup is kept: `'30d'`. */
|
|
6906
|
+
keep?: string;
|
|
6907
|
+
/**
|
|
6908
|
+
* Point-in-time recovery: the stack's Postgres ships its WAL
|
|
6909
|
+
* continuously and the backups service takes a base backup on
|
|
6910
|
+
* `base`'s schedule, so `gkm backup:restore --to <time>` brings the
|
|
6911
|
+
* whole cluster back to any second in the last `keep`. `true` is
|
|
6912
|
+
* `{ keep: '14d', base: '1d' }`. The dumps above keep their own
|
|
6913
|
+
* schedule beside it.
|
|
6914
|
+
*/
|
|
6915
|
+
pitr?: true | StagePitrConfig;
|
|
6916
|
+
};
|
|
6917
|
+
/** `deploy.backups.<stage>.pitr` — see {@link StageBackupsConfig}. */
|
|
6918
|
+
interface StagePitrConfig {
|
|
6919
|
+
/** How far back a restore can reach: `'14d'`. */
|
|
6920
|
+
keep?: string;
|
|
6921
|
+
/** How often a base backup is taken, counted from 02:00 UTC: `'1d'`. At least `'1h'`. */
|
|
6922
|
+
base?: string;
|
|
6923
|
+
}
|
|
6924
|
+
/** `objects: { provider: 's3' }` — a bucket per construct in the stage's account. */
|
|
6925
|
+
interface S3ObjectsConfig {
|
|
6926
|
+
provider: 's3';
|
|
6927
|
+
/**
|
|
6928
|
+
* Where the buckets are created. Defaults to the secrets store's region,
|
|
6929
|
+
* then `AWS_REGION`.
|
|
6930
|
+
*/
|
|
6931
|
+
region?: string;
|
|
6932
|
+
/** Keep previous versions of every object. Defaults to the construct's own `versioned`. */
|
|
6933
|
+
versioning?: boolean;
|
|
5275
6934
|
/**
|
|
5276
|
-
*
|
|
5277
|
-
*
|
|
5278
|
-
*
|
|
6935
|
+
* Serve each file server through a CDN on `<fileserver>.<domain>`: a
|
|
6936
|
+
* CloudFront distribution reading the bucket, its certificate and its DNS
|
|
6937
|
+
* records, all created by the deploy. On by default, which needs the
|
|
6938
|
+
* stage to have a domain; `false` serves from the bucket's own endpoint.
|
|
5279
6939
|
*/
|
|
5280
|
-
|
|
6940
|
+
cdn?: boolean;
|
|
6941
|
+
}
|
|
6942
|
+
/** Shared by every provider. */
|
|
6943
|
+
interface TelemetryProviderConfig {
|
|
6944
|
+
/**
|
|
6945
|
+
* The fraction of traces kept, decided where a trace starts and followed
|
|
6946
|
+
* by every service it reaches (`parentbased_traceidratio`). Logs are not
|
|
6947
|
+
* sampled. 0 to 1; default 1.
|
|
6948
|
+
*/
|
|
6949
|
+
sampleRate?: number;
|
|
6950
|
+
}
|
|
6951
|
+
/**
|
|
6952
|
+
* The target runs the collector and its UI: OpenObserve, in a compose stack,
|
|
6953
|
+
* reached through an SSH tunnel by default.
|
|
6954
|
+
*/
|
|
6955
|
+
interface SelfHostedTelemetryConfig extends TelemetryProviderConfig {
|
|
6956
|
+
provider: 'self-hosted';
|
|
6957
|
+
/**
|
|
6958
|
+
* The port it is published on, on 127.0.0.1 only — reached from another
|
|
6959
|
+
* machine through an SSH tunnel. Default 5080.
|
|
6960
|
+
*/
|
|
6961
|
+
port?: number;
|
|
6962
|
+
/**
|
|
6963
|
+
* How many days of data it keeps (OpenObserve's
|
|
6964
|
+
* `ZO_COMPACT_DATA_RETENTION_DAYS`). At least 3; default 30.
|
|
6965
|
+
*/
|
|
6966
|
+
retentionDays?: number;
|
|
6967
|
+
/**
|
|
6968
|
+
* Serve it on the `Telemetry` construct's label under the stage's domain —
|
|
6969
|
+
* `telemetry.<stage domain>` by default — through the stack's proxy, to these
|
|
6970
|
+
* addresses only (IPs or CIDRs), instead of on a loopback port. Every
|
|
6971
|
+
* other address is answered 403.
|
|
6972
|
+
*/
|
|
6973
|
+
public?: {
|
|
6974
|
+
allow: string[];
|
|
6975
|
+
};
|
|
6976
|
+
}
|
|
6977
|
+
/** Any OTLP/HTTP endpoint — a collector, a vendor's ingest. */
|
|
6978
|
+
interface OtlpTelemetryConfig extends TelemetryProviderConfig {
|
|
6979
|
+
provider: 'otlp';
|
|
6980
|
+
/** The OTLP/HTTP base URL; `/v1/traces` and `/v1/logs` are added to it. */
|
|
6981
|
+
endpoint: string;
|
|
6982
|
+
/** Headers sent with every export — `{ 'x-team': 'shop' }`. */
|
|
6983
|
+
headers?: Record<string, string>;
|
|
5281
6984
|
}
|
|
5282
6985
|
/**
|
|
5283
6986
|
* Deployment configuration for the workspace.
|
|
@@ -5289,37 +6992,96 @@ interface DokployWorkspaceConfig {
|
|
|
5289
6992
|
* default: 'dokploy',
|
|
5290
6993
|
* }
|
|
5291
6994
|
*
|
|
5292
|
-
* // Full configuration with
|
|
6995
|
+
* // Full configuration with backups (domains and dns are at the root)
|
|
5293
6996
|
* deploy: {
|
|
5294
6997
|
* default: 'dokploy',
|
|
6998
|
+
* registry: 'ghcr.io/myorg',
|
|
5295
6999
|
* dokploy: {
|
|
5296
7000
|
* endpoint: 'https://dokploy.myserver.com',
|
|
5297
7001
|
* projectId: 'proj_abc123',
|
|
5298
|
-
*
|
|
5299
|
-
* domains: {
|
|
5300
|
-
* production: 'myapp.com',
|
|
5301
|
-
* },
|
|
5302
|
-
* },
|
|
5303
|
-
* dns: {
|
|
5304
|
-
* provider: 'hostinger',
|
|
5305
|
-
* domain: 'myapp.com',
|
|
5306
|
-
* },
|
|
5307
|
-
* backups: {
|
|
5308
|
-
* type: 's3',
|
|
5309
|
-
* region: 'us-east-1',
|
|
7002
|
+
* backups: { type: 's3', region: 'us-east-1' },
|
|
5310
7003
|
* },
|
|
5311
7004
|
* }
|
|
5312
7005
|
* ```
|
|
5313
7006
|
*/
|
|
5314
|
-
interface DeployConfig {
|
|
7007
|
+
interface DeployConfig<S extends string = string> {
|
|
5315
7008
|
/** Default deploy target for all apps (default: 'dokploy') */
|
|
5316
|
-
default?:
|
|
7009
|
+
default?: DeployTargetName;
|
|
7010
|
+
/**
|
|
7011
|
+
* Targets that do not ship with the CLI, by the name `default` (or an
|
|
7012
|
+
* app's `deploy`) uses: a package whose default export is the target, a
|
|
7013
|
+
* target object, or either with its options.
|
|
7014
|
+
*
|
|
7015
|
+
* ```ts
|
|
7016
|
+
* targets: {
|
|
7017
|
+
* acme: '@acme/gkm-target',
|
|
7018
|
+
* fly: ['@acme/gkm-fly', { org: 'acme' }],
|
|
7019
|
+
* local: defineTarget({ … }),
|
|
7020
|
+
* }
|
|
7021
|
+
* ```
|
|
7022
|
+
*
|
|
7023
|
+
* A package is never guessed from a name: it is installed and listed here.
|
|
7024
|
+
* A built-in's name cannot be taken.
|
|
7025
|
+
*/
|
|
7026
|
+
targets?: Record<string, DeployTargetEntry>;
|
|
7027
|
+
/**
|
|
7028
|
+
* Whose deploy this is, on a target shared with other workspaces — an
|
|
7029
|
+
* organisation or a team, lowercase `[a-z0-9-]`. Two workspaces with the
|
|
7030
|
+
* same name deploying to one Dokploy are kept apart by it: it is in the
|
|
7031
|
+
* project's ownership marker, the image path
|
|
7032
|
+
* (`<registry>/<namespace>/<project>-<app>`) and every resource name.
|
|
7033
|
+
*
|
|
7034
|
+
* Defaults to the kebab-cased workspace name, which adds nothing to the
|
|
7035
|
+
* names a workspace was already deployed under.
|
|
7036
|
+
*/
|
|
7037
|
+
namespace?: string;
|
|
7038
|
+
/**
|
|
7039
|
+
* The container registry the apps' images are pushed to and pulled from,
|
|
7040
|
+
* whatever the target — `ghcr.io/myorg`. An image is
|
|
7041
|
+
* `<registry>/<namespace>/<project>-<app>:<tag>`.
|
|
7042
|
+
*/
|
|
7043
|
+
registry?: string;
|
|
5317
7044
|
/** Dokploy-specific configuration */
|
|
5318
7045
|
dokploy?: DokployWorkspaceConfig;
|
|
5319
|
-
/**
|
|
5320
|
-
|
|
5321
|
-
/**
|
|
5322
|
-
|
|
7046
|
+
/** What the `compose` target runs beside the apps — see {@link ComposeWorkspaceConfig}. */
|
|
7047
|
+
compose?: ComposeWorkspaceConfig<S>;
|
|
7048
|
+
/**
|
|
7049
|
+
* Where each deployed stage's telemetry goes — see
|
|
7050
|
+
* {@link StageTelemetryConfig}.
|
|
7051
|
+
*/
|
|
7052
|
+
telemetry?: StageMap<S, StageTelemetryConfig>;
|
|
7053
|
+
/**
|
|
7054
|
+
* What backs each deployed stage's buckets — the `objects` kind that
|
|
7055
|
+
* `ObjectStorage` and `FileServer` produce. See {@link StageObjectsConfig}.
|
|
7056
|
+
*/
|
|
7057
|
+
objects?: StageMap<S, StageObjectsConfig>;
|
|
7058
|
+
/**
|
|
7059
|
+
* What receives each deployed stage's inboxes — the `inbox` kind `Inbox`
|
|
7060
|
+
* produces. See {@link StageInboxConfig}.
|
|
7061
|
+
*/
|
|
7062
|
+
inbox?: StageMap<S, StageInboxConfig>;
|
|
7063
|
+
/**
|
|
7064
|
+
* What sends each deployed stage's mail — the `email` kind `Email`
|
|
7065
|
+
* produces. See {@link StageEmailConfig}.
|
|
7066
|
+
*/
|
|
7067
|
+
email?: StageMap<S, StageEmailConfig>;
|
|
7068
|
+
/**
|
|
7069
|
+
* When each deployed compose stage's databases are backed up, and how
|
|
7070
|
+
* long a backup is kept — see {@link StageBackupsConfig}.
|
|
7071
|
+
*/
|
|
7072
|
+
backups?: StageMap<S, StageBackupsConfig>;
|
|
7073
|
+
/**
|
|
7074
|
+
* A CDN in front of each deployed compose stage's sites, by stage:
|
|
7075
|
+
* `{ provider: 'cloudflare' }` proxies every host a site answers on
|
|
7076
|
+
* through Cloudflare, whose DNS the stage's domain must be on. Every
|
|
7077
|
+
* other host is served straight from the server, as is a stage the map
|
|
7078
|
+
* leaves out.
|
|
7079
|
+
*
|
|
7080
|
+
* ```ts
|
|
7081
|
+
* cdn: { prod: { provider: 'cloudflare' } }
|
|
7082
|
+
* ```
|
|
7083
|
+
*/
|
|
7084
|
+
cdn?: StageMap<S, StageCdnConfig>;
|
|
5323
7085
|
}
|
|
5324
7086
|
/**
|
|
5325
7087
|
* Models package configuration for shared schemas.
|
|
@@ -5405,7 +7167,7 @@ interface StagesConfig {
|
|
|
5405
7167
|
*
|
|
5406
7168
|
* Configures how secrets are encrypted for deployment.
|
|
5407
7169
|
* Secrets are stored encrypted in `.gkm/secrets/{stage}.json`
|
|
5408
|
-
* with keys stored separately in `~/.gkm/{project}/{stage}.key`.
|
|
7170
|
+
* with keys stored separately in `~/.gkm/keys/{namespace}/{project}/{stage}.key`.
|
|
5409
7171
|
*
|
|
5410
7172
|
* @example
|
|
5411
7173
|
* ```ts
|
|
@@ -5422,8 +7184,13 @@ interface SecretsConfig {
|
|
|
5422
7184
|
/**
|
|
5423
7185
|
* Where deployed stages' secrets live, so a deploy can reach them from
|
|
5424
7186
|
* anywhere: `'file'` (default — the encrypted `.gkm/secrets/<stage>.json`,
|
|
5425
|
-
* which cannot serve CI while `.gkm/` is gitignored), `{ provider: '
|
|
5426
|
-
* region }` (each stage's secrets in
|
|
7187
|
+
* which cannot serve CI while `.gkm/` is gitignored), `{ provider: 's3',
|
|
7188
|
+
* region?, bucket?, prefix? }` (each stage's secrets in one object in the
|
|
7189
|
+
* project bucket beside the deploy state, SSE-S3 and versioned, no size
|
|
7190
|
+
* limit; region and prefix default to an S3 `state`'s), `{ provider: 'ssm',
|
|
7191
|
+
* region }` (each stage's secrets in an SSM parameter in its own AWS
|
|
7192
|
+
* account, up to 8 KB), `{ provider: 'secrets-manager', region, kmsKeyId? }`
|
|
7193
|
+
* (a Secrets Manager secret in its own account, up to 64 KB), or any object
|
|
5427
7194
|
* implementing `SecretsStore`. The local stage always uses the file.
|
|
5428
7195
|
*/
|
|
5429
7196
|
store?: SecretsStoreConfig;
|
|
@@ -5493,7 +7260,7 @@ interface AppConfigBase {
|
|
|
5493
7260
|
* Overrides `deploy.default` for this specific app.
|
|
5494
7261
|
* @example 'dokploy', 'vercel'
|
|
5495
7262
|
*/
|
|
5496
|
-
deploy?:
|
|
7263
|
+
deploy?: DeployTargetName;
|
|
5497
7264
|
/**
|
|
5498
7265
|
* Constructs glob pattern — one glob, every kind.
|
|
5499
7266
|
*
|
|
@@ -5544,23 +7311,16 @@ interface AppConfigBase {
|
|
|
5544
7311
|
* @example './src/config/logger'
|
|
5545
7312
|
*/
|
|
5546
7313
|
logger?: string;
|
|
5547
|
-
/** Provider configuration (AWS, Docker, etc.) */
|
|
5548
|
-
providers?: ProvidersConfig;
|
|
5549
7314
|
/**
|
|
5550
7315
|
* Server lifecycle hooks.
|
|
5551
7316
|
* @example { beforeSetup: './src/hooks/setup.ts' }
|
|
5552
7317
|
*/
|
|
5553
7318
|
hooks?: HooksConfig;
|
|
5554
7319
|
/**
|
|
5555
|
-
* Telescope
|
|
7320
|
+
* Telescope request recording configuration.
|
|
5556
7321
|
* @example true, './src/config/telescope', { enabled: true, path: '/__telescope' }
|
|
5557
7322
|
*/
|
|
5558
7323
|
telescope?: string | boolean | TelescopeConfig;
|
|
5559
|
-
/**
|
|
5560
|
-
* Studio admin panel configuration.
|
|
5561
|
-
* @example true, './src/config/studio'
|
|
5562
|
-
*/
|
|
5563
|
-
studio?: string | boolean | StudioConfig;
|
|
5564
7324
|
/**
|
|
5565
7325
|
* OpenAPI documentation configuration.
|
|
5566
7326
|
* @example true, { output: './src/openapi.ts' }
|
|
@@ -5734,7 +7494,7 @@ type ConstrainedApps<TApps extends AppsRecord> = { [K in keyof TApps]: Omit<TApp
|
|
|
5734
7494
|
* });
|
|
5735
7495
|
* ```
|
|
5736
7496
|
*/
|
|
5737
|
-
type WorkspaceInput<TApps extends AppsRecord> = {
|
|
7497
|
+
type WorkspaceInput<TApps extends AppsRecord, TDeployed extends string = string> = {
|
|
5738
7498
|
/**
|
|
5739
7499
|
* Where the workspace's own constructs live, relative to its root.
|
|
5740
7500
|
*
|
|
@@ -5754,15 +7514,80 @@ type WorkspaceInput<TApps extends AppsRecord> = {
|
|
|
5754
7514
|
apps?: ConstrainedApps<TApps>;
|
|
5755
7515
|
/** Shared packages configuration */
|
|
5756
7516
|
shared?: SharedConfig;
|
|
7517
|
+
/**
|
|
7518
|
+
* Each deployed stage's base domain — see {@link DomainsConfig}. A key that
|
|
7519
|
+
* is not a deployed stage is a type error.
|
|
7520
|
+
*/
|
|
7521
|
+
domains?: DomainsInput<NoInfer<TDeployed>>;
|
|
7522
|
+
/**
|
|
7523
|
+
* Subdomains a wildcard site's tenants may never take, beyond every app's
|
|
7524
|
+
* own (which are derived from the constructs and never listed here): the
|
|
7525
|
+
* names no construct declares — `www`, `mail`, `status`, `docs`.
|
|
7526
|
+
*
|
|
7527
|
+
* Listing an app's own subdomain is refused at load: the construct
|
|
7528
|
+
* already protects it.
|
|
7529
|
+
*/
|
|
7530
|
+
protectedSubdomains?: readonly string[];
|
|
7531
|
+
/**
|
|
7532
|
+
* Each root domain's DNS provider, and how its hosts are pointed at a
|
|
7533
|
+
* compose stage's server (`records`).
|
|
7534
|
+
*/
|
|
7535
|
+
dns?: DnsInput<NoInfer<TDeployed>>;
|
|
5757
7536
|
/** Deployment configuration */
|
|
5758
|
-
deploy?: DeployConfig
|
|
5759
|
-
/**
|
|
5760
|
-
|
|
7537
|
+
deploy?: DeployConfig<NoInfer<TDeployed>>;
|
|
7538
|
+
/**
|
|
7539
|
+
* The project's stages: which one is local, which deploy. The deployed
|
|
7540
|
+
* stages type every per-stage map — `domains`, `deploy.objects`,
|
|
7541
|
+
* `deploy.telemetry`, `deploy.compose.proxy`/`tls`.
|
|
7542
|
+
*/
|
|
7543
|
+
stages: StagesInput<TDeployed>;
|
|
5761
7544
|
/** Encrypted secrets configuration */
|
|
5762
7545
|
secrets?: SecretsConfig;
|
|
5763
7546
|
/** State provider configuration (local filesystem by default, or SSM for team collaboration) */
|
|
5764
7547
|
state?: StateConfig;
|
|
7548
|
+
/** How `gkm dev` is reached: the discovery endpoint's port and origins */
|
|
7549
|
+
dev?: DevConfig;
|
|
5765
7550
|
};
|
|
7551
|
+
/** `stages`, as `defineWorkspace` infers it: each deployed stage literally. */
|
|
7552
|
+
interface StagesInput<TDeployed extends string = string> {
|
|
7553
|
+
local: string;
|
|
7554
|
+
deployed: readonly TDeployed[];
|
|
7555
|
+
protected?: readonly NoInfer<TDeployed>[];
|
|
7556
|
+
}
|
|
7557
|
+
/**
|
|
7558
|
+
* How `gkm dev` is reached from outside the apps it runs.
|
|
7559
|
+
*/
|
|
7560
|
+
interface DevConfig {
|
|
7561
|
+
/**
|
|
7562
|
+
* Browser origins allowed to read the discovery endpoint — and this
|
|
7563
|
+
* workspace in it — e.g. `['https://console.example.com']`.
|
|
7564
|
+
*
|
|
7565
|
+
* Empty by default: any page the developer visits can send requests to a
|
|
7566
|
+
* loopback port, so none is answered unless it is listed here. A request
|
|
7567
|
+
* with no `Origin` (curl, a local process) still needs the session token.
|
|
7568
|
+
*/
|
|
7569
|
+
allowedOrigins?: string[];
|
|
7570
|
+
/**
|
|
7571
|
+
* The loopback port the discovery endpoint listens on. Defaults to 4983;
|
|
7572
|
+
* `GKM_DISCOVERY_PORT` overrides it.
|
|
7573
|
+
*/
|
|
7574
|
+
discoveryPort?: number;
|
|
7575
|
+
}
|
|
7576
|
+
/**
|
|
7577
|
+
* How `gkm test` builds what a feature test is handed.
|
|
7578
|
+
*/
|
|
7579
|
+
interface TestConfig {
|
|
7580
|
+
/**
|
|
7581
|
+
* The folder of test factories, relative to the root.
|
|
7582
|
+
*
|
|
7583
|
+
* Defaults to `test/factories`. A factory belongs to a database, not to an
|
|
7584
|
+
* app, so each file is named after one — `database.ts` for `Database`,
|
|
7585
|
+
* `auth-database.ts` for `AuthDatabase` — and exports `createFactory(db)`.
|
|
7586
|
+
* Every app's harness builds them on each test's transactions, and a test is
|
|
7587
|
+
* handed them as `factories`, keyed by service name.
|
|
7588
|
+
*/
|
|
7589
|
+
factories?: string;
|
|
7590
|
+
}
|
|
5766
7591
|
/**
|
|
5767
7592
|
* Extract app names from apps record.
|
|
5768
7593
|
*/
|
|
@@ -5783,10 +7608,15 @@ type InferredWorkspaceConfig<TApps extends AppsRecord> = {
|
|
|
5783
7608
|
dependencies?: InferAppNames<TApps>[];
|
|
5784
7609
|
}; };
|
|
5785
7610
|
shared?: SharedConfig;
|
|
7611
|
+
domains?: DomainsConfig;
|
|
7612
|
+
protectedSubdomains?: readonly string[];
|
|
7613
|
+
dns?: WorkspaceDnsConfig;
|
|
5786
7614
|
deploy?: DeployConfig;
|
|
5787
7615
|
stages: StagesConfig;
|
|
5788
7616
|
secrets?: SecretsConfig;
|
|
5789
7617
|
state?: StateConfig;
|
|
7618
|
+
test?: TestConfig;
|
|
7619
|
+
dev?: DevConfig;
|
|
5790
7620
|
};
|
|
5791
7621
|
/**
|
|
5792
7622
|
* Workspace configuration for multi-app monorepos.
|
|
@@ -5833,17 +7663,20 @@ type InferredWorkspaceConfig<TApps extends AppsRecord> = {
|
|
|
5833
7663
|
* },
|
|
5834
7664
|
* },
|
|
5835
7665
|
*
|
|
7666
|
+
* // Each deployed stage's base domain, and who hosts its DNS
|
|
7667
|
+
* domains: {
|
|
7668
|
+
* production: 'myapp.com',
|
|
7669
|
+
* staging: 'staging.myapp.com',
|
|
7670
|
+
* },
|
|
7671
|
+
* dns: { 'myapp.com': { provider: 'godaddy' } },
|
|
7672
|
+
*
|
|
5836
7673
|
* // Deployment configuration
|
|
5837
7674
|
* deploy: {
|
|
5838
7675
|
* default: 'dokploy',
|
|
7676
|
+
* registry: 'ghcr.io/myorg',
|
|
5839
7677
|
* dokploy: {
|
|
5840
7678
|
* endpoint: 'https://dokploy.myserver.com',
|
|
5841
7679
|
* projectId: 'proj_abc123',
|
|
5842
|
-
* registry: 'ghcr.io/myorg',
|
|
5843
|
-
* domains: {
|
|
5844
|
-
* production: 'myapp.com',
|
|
5845
|
-
* staging: 'staging.myapp.com',
|
|
5846
|
-
* },
|
|
5847
7680
|
* },
|
|
5848
7681
|
* },
|
|
5849
7682
|
*
|
|
@@ -5871,6 +7704,12 @@ interface WorkspaceConfig {
|
|
|
5871
7704
|
apps?: Record<string, AppConfig>;
|
|
5872
7705
|
/** Shared packages configuration */
|
|
5873
7706
|
shared?: SharedConfig;
|
|
7707
|
+
/** Each deployed stage's base domain — see {@link DomainsConfig}. */
|
|
7708
|
+
domains?: DomainsConfig;
|
|
7709
|
+
/** Subdomains no tenant may take — see `WorkspaceInput`. */
|
|
7710
|
+
protectedSubdomains?: readonly string[];
|
|
7711
|
+
/** Each root domain's DNS provider — see {@link WorkspaceDnsConfig}. */
|
|
7712
|
+
dns?: WorkspaceDnsConfig;
|
|
5874
7713
|
/** Default deployment configuration */
|
|
5875
7714
|
deploy?: DeployConfig;
|
|
5876
7715
|
/** The project's stages: which one is local, which deploy */
|
|
@@ -5879,6 +7718,10 @@ interface WorkspaceConfig {
|
|
|
5879
7718
|
secrets?: SecretsConfig;
|
|
5880
7719
|
/** State provider configuration (local filesystem by default, or SSM for team collaboration) */
|
|
5881
7720
|
state?: StateConfig;
|
|
7721
|
+
/** What `gkm test` hands a feature test: where the factories are. */
|
|
7722
|
+
test?: TestConfig;
|
|
7723
|
+
/** How `gkm dev` is reached: the discovery endpoint's port and origins. */
|
|
7724
|
+
dev?: DevConfig;
|
|
5882
7725
|
}
|
|
5883
7726
|
/**
|
|
5884
7727
|
* Normalized app configuration with resolved defaults.
|
|
@@ -5895,6 +7738,11 @@ interface NormalizedAppConfig extends Omit<AppConfigBase, 'type'> {
|
|
|
5895
7738
|
* and that is `domain`.
|
|
5896
7739
|
*/
|
|
5897
7740
|
root?: boolean;
|
|
7741
|
+
/**
|
|
7742
|
+
* The label this app answers on under a stage's domain, carried from its
|
|
7743
|
+
* declaration — `api` for `api.myapp.com`. Absent, the app's own name.
|
|
7744
|
+
*/
|
|
7745
|
+
subdomain?: string;
|
|
5898
7746
|
/** App type (always defined after normalization) */
|
|
5899
7747
|
type: 'backend' | 'web' | 'mobile';
|
|
5900
7748
|
/** Path to the app */
|
|
@@ -5904,7 +7752,7 @@ interface NormalizedAppConfig extends Omit<AppConfigBase, 'type'> {
|
|
|
5904
7752
|
/** Resolved dependencies array (empty array if none) */
|
|
5905
7753
|
dependencies: string[];
|
|
5906
7754
|
/** Resolved deploy target (app.deploy > deploy.default > 'dokploy') */
|
|
5907
|
-
resolvedDeployTarget:
|
|
7755
|
+
resolvedDeployTarget: DeployTargetName;
|
|
5908
7756
|
/** Entry file path for non-gkm apps */
|
|
5909
7757
|
entry?: string;
|
|
5910
7758
|
/** Framework for the app */
|
|
@@ -5934,6 +7782,12 @@ interface NormalizedWorkspace {
|
|
|
5934
7782
|
constructs?: Routes;
|
|
5935
7783
|
/** Normalized app configurations */
|
|
5936
7784
|
apps: Record<string, NormalizedAppConfig>;
|
|
7785
|
+
/** Each deployed stage's base domain */
|
|
7786
|
+
domains?: DomainsConfig;
|
|
7787
|
+
/** Subdomains no tenant may take, beyond every app's own */
|
|
7788
|
+
protectedSubdomains?: readonly string[];
|
|
7789
|
+
/** Each root domain's DNS provider */
|
|
7790
|
+
dns?: WorkspaceDnsConfig;
|
|
5937
7791
|
/** Deploy configuration (empty object if not specified) */
|
|
5938
7792
|
deploy: DeployConfig;
|
|
5939
7793
|
/** Shared packages configuration (empty object if not specified) */
|
|
@@ -5944,6 +7798,10 @@ interface NormalizedWorkspace {
|
|
|
5944
7798
|
secrets: SecretsConfig;
|
|
5945
7799
|
/** State provider configuration (undefined = local filesystem) */
|
|
5946
7800
|
state?: StateConfig;
|
|
7801
|
+
/** What `gkm test` hands a feature test (empty object if not specified) */
|
|
7802
|
+
test: TestConfig;
|
|
7803
|
+
/** How `gkm dev` is reached, when configured */
|
|
7804
|
+
dev?: DevConfig;
|
|
5947
7805
|
}
|
|
5948
7806
|
/**
|
|
5949
7807
|
* Result of loading and processing a configuration.
|
|
@@ -5963,6 +7821,11 @@ interface LoadedConfig {
|
|
|
5963
7821
|
* two chances to disagree. Absent when the workspace declares no constructs.
|
|
5964
7822
|
*/
|
|
5965
7823
|
manifest?: ConstructManifest;
|
|
7824
|
+
/**
|
|
7825
|
+
* The files each Worker's crons, queues and subscribers are declared in,
|
|
7826
|
+
* read in the same discovery — what says which app a worker is built from.
|
|
7827
|
+
*/
|
|
7828
|
+
background?: Record<string, string[]>;
|
|
5966
7829
|
}
|
|
5967
7830
|
/**
|
|
5968
7831
|
* Type guard to check if a config is a WorkspaceConfig.
|
|
@@ -5979,53 +7842,7 @@ interface LoadedConfig {
|
|
|
5979
7842
|
declare function isWorkspaceConfig(config: GkmConfig | WorkspaceConfig): config is WorkspaceConfig;
|
|
5980
7843
|
//#endregion
|
|
5981
7844
|
//#region src/types.d.ts
|
|
5982
|
-
|
|
5983
|
-
paths: string | string[];
|
|
5984
|
-
partition: (filepath: string) => string;
|
|
5985
|
-
}
|
|
5986
|
-
type Routes = string | string[] | PartitionedRoutes;
|
|
5987
|
-
interface ProviderConfig {
|
|
5988
|
-
enabled?: boolean;
|
|
5989
|
-
outputDir?: string;
|
|
5990
|
-
}
|
|
5991
|
-
interface AWSApiGatewayConfig extends ProviderConfig {}
|
|
5992
|
-
interface AWSLambdaConfig extends ProviderConfig {}
|
|
5993
|
-
interface ProductionConfig {
|
|
5994
|
-
/** Enable production mode (default: false) */
|
|
5995
|
-
enabled?: boolean;
|
|
5996
|
-
/** Bundle server into single file (default: true) */
|
|
5997
|
-
bundle?: boolean;
|
|
5998
|
-
/** Minify bundled output (default: true) */
|
|
5999
|
-
minify?: boolean;
|
|
6000
|
-
/** Health check endpoint path (default: '/health') */
|
|
6001
|
-
healthCheck?: string;
|
|
6002
|
-
/** Enable graceful shutdown handling (default: true) */
|
|
6003
|
-
gracefulShutdown?: boolean;
|
|
6004
|
-
/** Packages to exclude from bundling (default: []) */
|
|
6005
|
-
external?: string[];
|
|
6006
|
-
/** Include subscribers in production build (default: 'exclude' for serverless) */
|
|
6007
|
-
subscribers?: 'include' | 'exclude';
|
|
6008
|
-
/** Include OpenAPI spec in production (default: false) */
|
|
6009
|
-
openapi?: boolean;
|
|
6010
|
-
/**
|
|
6011
|
-
* Enable build-time optimized handler generation (default: true)
|
|
6012
|
-
* Generates specialized handlers based on endpoint tier:
|
|
6013
|
-
* - minimal: Near-raw-Hono performance for simple endpoints
|
|
6014
|
-
* - standard: Optimized handlers for auth/services
|
|
6015
|
-
* - full: Uses HonoEndpoint.addRoutes for complex endpoints
|
|
6016
|
-
*/
|
|
6017
|
-
optimizedHandlers?: boolean;
|
|
6018
|
-
}
|
|
6019
|
-
/**
|
|
6020
|
-
* Supported event backend types.
|
|
6021
|
-
*
|
|
6022
|
-
* - `pgboss`: Reuses PostgreSQL with a dedicated user/schema. Auto-enables db service.
|
|
6023
|
-
* - `sns`: Adds LocalStack container with SNS+SQS services.
|
|
6024
|
-
* - `rabbitmq`: Adds RabbitMQ container.
|
|
6025
|
-
*
|
|
6026
|
-
* All backends generate EVENT_PUBLISHER_CONNECTION_STRING and EVENT_SUBSCRIBER_CONNECTION_STRING.
|
|
6027
|
-
*/
|
|
6028
|
-
type EventsBackend = 'pgboss' | 'sns' | 'rabbitmq';
|
|
7845
|
+
type Routes = string | string[];
|
|
6029
7846
|
/**
|
|
6030
7847
|
* Where a declared cache actually lives.
|
|
6031
7848
|
*
|
|
@@ -6042,8 +7859,12 @@ type EventsBackend = 'pgboss' | 'sns' | 'rabbitmq';
|
|
|
6042
7859
|
* - `db` — a table in the database the app already declared. No infrastructure
|
|
6043
7860
|
* at all, and the same relationship pg-boss has to Postgres: it creates its
|
|
6044
7861
|
* own table on first use and needs a declared database to live in.
|
|
7862
|
+
* - `redis` — a Redis the stack runs beside the apps, on its network. It holds
|
|
7863
|
+
* *every* declared cache, one declared from a database included, so the
|
|
7864
|
+
* cache never competes with the database for its connections. Only the
|
|
7865
|
+
* compose target selects it today (`gkm compose`).
|
|
6045
7866
|
*/
|
|
6046
|
-
type CacheBackend = 'upstash' | 'elasticache' | 'db';
|
|
7867
|
+
type CacheBackend = 'upstash' | 'elasticache' | 'db' | 'redis';
|
|
6047
7868
|
/**
|
|
6048
7869
|
* Who delivers a declared app's mail.
|
|
6049
7870
|
*
|
|
@@ -6070,17 +7891,11 @@ interface DockerConfig {
|
|
|
6070
7891
|
registry?: string;
|
|
6071
7892
|
/** Docker image name (default: derived from package.json name) */
|
|
6072
7893
|
imageName?: string;
|
|
6073
|
-
/** Base Docker image (default: 'node:22-alpine') */
|
|
7894
|
+
/** Base Docker image (default: 'node:22.23.4-alpine', a Node security release) */
|
|
6074
7895
|
baseImage?: string;
|
|
6075
7896
|
/** Container port (default: 3000) */
|
|
6076
7897
|
port?: number;
|
|
6077
7898
|
}
|
|
6078
|
-
interface ServerConfig extends ProviderConfig {
|
|
6079
|
-
enableOpenApi?: boolean;
|
|
6080
|
-
port?: number;
|
|
6081
|
-
/** Production build configuration */
|
|
6082
|
-
production?: ProductionConfig;
|
|
6083
|
-
}
|
|
6084
7899
|
type Runtime = 'node' | 'bun';
|
|
6085
7900
|
interface TelescopeConfig {
|
|
6086
7901
|
/** Enable/disable telescope (default: true in development) */
|
|
@@ -6098,14 +7913,6 @@ interface TelescopeConfig {
|
|
|
6098
7913
|
/** Enable WebSocket for real-time updates (default: true, requires @hono/node-ws for Node.js) */
|
|
6099
7914
|
websocket?: boolean;
|
|
6100
7915
|
}
|
|
6101
|
-
interface StudioConfig {
|
|
6102
|
-
/** Enable/disable studio (default: true in development) */
|
|
6103
|
-
enabled?: boolean;
|
|
6104
|
-
/** Path prefix for studio UI (default: /__studio) */
|
|
6105
|
-
path?: string;
|
|
6106
|
-
/** Schema to introspect (default: 'public') */
|
|
6107
|
-
schema?: string;
|
|
6108
|
-
}
|
|
6109
7916
|
interface OpenApiConfig {
|
|
6110
7917
|
/** Enable OpenAPI generation (default: true) */
|
|
6111
7918
|
enabled?: boolean;
|
|
@@ -6143,34 +7950,6 @@ interface HooksConfig {
|
|
|
6143
7950
|
*/
|
|
6144
7951
|
server?: string;
|
|
6145
7952
|
}
|
|
6146
|
-
/** Dokploy deployment configuration */
|
|
6147
|
-
interface DokployProviderConfig {
|
|
6148
|
-
/** Dokploy API endpoint (e.g., 'https://dokploy.example.com') */
|
|
6149
|
-
endpoint: string;
|
|
6150
|
-
/** Project ID in Dokploy */
|
|
6151
|
-
projectId: string;
|
|
6152
|
-
/** Application ID in Dokploy */
|
|
6153
|
-
applicationId: string;
|
|
6154
|
-
/** Container registry (overrides docker.registry if set) */
|
|
6155
|
-
registry?: string;
|
|
6156
|
-
/** Registry ID in Dokploy (recommended for private registries) */
|
|
6157
|
-
registryId?: string;
|
|
6158
|
-
}
|
|
6159
|
-
interface ProvidersConfig {
|
|
6160
|
-
aws?: {
|
|
6161
|
-
apiGateway?: {
|
|
6162
|
-
v1?: boolean | AWSApiGatewayConfig;
|
|
6163
|
-
v2?: boolean | AWSApiGatewayConfig;
|
|
6164
|
-
};
|
|
6165
|
-
lambda?: {
|
|
6166
|
-
functions?: boolean | AWSLambdaConfig;
|
|
6167
|
-
crons?: boolean | AWSLambdaConfig;
|
|
6168
|
-
};
|
|
6169
|
-
};
|
|
6170
|
-
server?: boolean | ServerConfig;
|
|
6171
|
-
/** Dokploy deployment configuration */
|
|
6172
|
-
dokploy?: boolean | DokployProviderConfig;
|
|
6173
|
-
}
|
|
6174
7953
|
interface GkmConfig {
|
|
6175
7954
|
/**
|
|
6176
7955
|
* What this app is called, and therefore how everything it declares is named.
|
|
@@ -6194,6 +7973,10 @@ interface GkmConfig {
|
|
|
6194
7973
|
stages: StagesConfig;
|
|
6195
7974
|
/** Encrypted secrets, and where deployed stages' secrets are stored */
|
|
6196
7975
|
secrets?: SecretsConfig;
|
|
7976
|
+
/** What `gkm test` hands a feature test: where the factories are. */
|
|
7977
|
+
test?: TestConfig;
|
|
7978
|
+
/** How `gkm dev` is reached: the discovery endpoint's port and origins. */
|
|
7979
|
+
dev?: DevConfig;
|
|
6197
7980
|
/**
|
|
6198
7981
|
* Constructs glob pattern — one glob, every kind.
|
|
6199
7982
|
*
|
|
@@ -6205,7 +7988,6 @@ interface GkmConfig {
|
|
|
6205
7988
|
* @example './src/**\/*.ts'
|
|
6206
7989
|
*/
|
|
6207
7990
|
constructs: Routes;
|
|
6208
|
-
providers?: ProvidersConfig;
|
|
6209
7991
|
/**
|
|
6210
7992
|
* Server lifecycle hooks for customizing the Hono app.
|
|
6211
7993
|
* Allows adding custom routes, middleware, error handlers, etc.
|
|
@@ -6224,16 +8006,6 @@ interface GkmConfig {
|
|
|
6224
8006
|
* - A TelescopeConfig object for inline configuration
|
|
6225
8007
|
*/
|
|
6226
8008
|
telescope?: string | boolean | TelescopeConfig;
|
|
6227
|
-
/**
|
|
6228
|
-
* Studio configuration for database browsing.
|
|
6229
|
-
* Can be:
|
|
6230
|
-
* - A string path to a module that exports a Studio instance (recommended)
|
|
6231
|
-
* - A boolean to enable/disable with defaults
|
|
6232
|
-
* - A StudioConfig object for inline configuration
|
|
6233
|
-
*
|
|
6234
|
-
* Requires a database connection configured via services.
|
|
6235
|
-
*/
|
|
6236
|
-
studio?: string | boolean | StudioConfig;
|
|
6237
8009
|
/**
|
|
6238
8010
|
* OpenAPI generation configuration.
|
|
6239
8011
|
* Can be:
|
|
@@ -6296,7 +8068,11 @@ interface GkmConfig {
|
|
|
6296
8068
|
* a rename rather than a rewrite.
|
|
6297
8069
|
*/
|
|
6298
8070
|
deploy?: DeployConfig;
|
|
8071
|
+
/** Each deployed stage's base domain — the same field a workspace has. */
|
|
8072
|
+
domains?: DomainsConfig;
|
|
8073
|
+
/** Each root domain's DNS provider — the same field a workspace has. */
|
|
8074
|
+
dns?: WorkspaceDnsConfig;
|
|
6299
8075
|
}
|
|
6300
8076
|
//#endregion
|
|
6301
|
-
export {
|
|
6302
|
-
//# sourceMappingURL=types-
|
|
8077
|
+
export { TargetOptions as $, BackendFramework as A, ReleasedImage as At, isPhase2DeployTarget as B, SandboxExecOptions as Bt, SecretsConfig as C, DiscoverOptions as Ct, WorkspaceConfig as D, StateLocked as Dt, StageTelemetryConfig as E, LocalStateInCi as Et, SUPPORTED_DEPLOY_TARGETS as F, DeployIdentity as Ft, DeployPhaseContext as G, GkmError as Gt, validateWorkspaceConfig as H, SandboxResult as Ht, WorkspaceConfigSchema as I, deployIdentity as It, DeployTarget as J, DeployRuntime as K, formatValidationErrors as L, SECRETS_DIR_ENV as Lt, FrontendFramework as M, GithubActor as Mt, MobileFramework as N, LocalActor as Nt, WorkspaceInput as O, StateStore as Ot, PHASE_2_DEPLOY_TARGETS as P, StageSecrets as Pt, TargetEvent as Q, getDeployTargetError as R, Sandbox as Rt, OtlpTelemetryConfig as S, ConstructsNotSerializable as St, SharedConfig as T, isDeclarable as Tt, AnyDeployTarget as U, SecretNameInvalid as Ut, safeValidateWorkspaceConfig as V, SandboxOutput as Vt, DeployFailure as W, confineCwd as Wt, DeployTargetEntry as X, DeployTargetCapabilities as Y, DeployTargetLogger as Z, InferredWorkspaceConfig as _, StoredCredentialsOptions as _t, Routes as a, DeployPhase as at, NormalizedAppConfig as b, ProviderKind as bt, AppInput as c, AppDeployResult as ct, ConstrainedApps as d, Credential as dt, TargetOptionsIssue as et, DeployConfig as f, CredentialKind as ft, InferAppNames as g, MissingCredential as gt, DokployWorkspaceConfig as h, CredentialRequest as ht, OpenApiConfig as i, DeployEventType as it, Framework as j, Actor as jt, isWorkspaceConfig as k, StateVersionConflict as kt, AppsRecord as l, DeployResult as lt, DevConfig as m, CredentialProvider as mt, EmailBackend as n, DeployEvent as nt, AppConfig as o, ResourceChange as ot, DeployTargetName as p, CredentialKinds as pt, DeploySecrets as q, GkmConfig as r, DeployEventError as rt, AppConfigInput as s, ResourceVia as st, CacheBackend as t, TargetOptionsSchema as tt, ComposeWorkspaceConfig as u, AwsCredential as ut, LoadedConfig as v, chainCredentials as vt, SelfHostedTelemetryConfig as w, discover as wt, NormalizedWorkspace as x, ConstructDiscoveryFailed as xt, ModelsConfig as y, storedCredentials as yt, isDeployTargetSupported as z, SandboxCwdEscape as zt };
|
|
8078
|
+
//# sourceMappingURL=types-BvokH0ya.d.cts.map
|