@geekmidas/cli 10.0.0-alpha.13 → 10.0.0-alpha.131
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 +313 -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-B99OGzbO.mjs +1035 -0
- package/dist/EndpointGenerator-B99OGzbO.mjs.map +1 -0
- package/dist/EndpointGenerator-De0lknKD.cjs +1094 -0
- package/dist/EndpointGenerator-De0lknKD.cjs.map +1 -0
- package/dist/GoDaddyProvider-D10Le3VX.mjs +388 -0
- package/dist/GoDaddyProvider-D10Le3VX.mjs.map +1 -0
- package/dist/GoDaddyProvider-DTfa47i3.cjs +388 -0
- package/dist/GoDaddyProvider-DTfa47i3.cjs.map +1 -0
- package/dist/{HostingerProvider-BY26bWwB.mjs → HostingerProvider-Cjh_2Ml6.mjs} +11 -6
- package/dist/HostingerProvider-Cjh_2Ml6.mjs.map +1 -0
- package/dist/{HostingerProvider-BZFGYYVA.cjs → HostingerProvider-OdQmKXE3.cjs} +11 -6
- package/dist/HostingerProvider-OdQmKXE3.cjs.map +1 -0
- package/dist/LegacyStateStore-C5c_zS4h.mjs +124 -0
- package/dist/LegacyStateStore-C5c_zS4h.mjs.map +1 -0
- package/dist/LegacyStateStore-CZSBR6ar.cjs +124 -0
- package/dist/LegacyStateStore-CZSBR6ar.cjs.map +1 -0
- package/dist/LocalStateStore-Ba0Y6q5C.mjs +167 -0
- package/dist/LocalStateStore-Ba0Y6q5C.mjs.map +1 -0
- package/dist/LocalStateStore-CgQtQix2.cjs +178 -0
- package/dist/LocalStateStore-CgQtQix2.cjs.map +1 -0
- package/dist/OpenApiTsGenerator-DMLzN-LU.cjs +541 -0
- package/dist/OpenApiTsGenerator-DMLzN-LU.cjs.map +1 -0
- package/dist/OpenApiTsGenerator-DNUCgkkx.mjs +536 -0
- package/dist/OpenApiTsGenerator-DNUCgkkx.mjs.map +1 -0
- package/dist/{Route53Provider-DVILBsvV.cjs → Route53Provider-Bllus2NR.cjs} +2 -2
- package/dist/Route53Provider-Bllus2NR.cjs.map +1 -0
- package/dist/{Route53Provider-Cvj40A8I.mjs → Route53Provider-QXxjkZO1.mjs} +2 -2
- package/dist/Route53Provider-QXxjkZO1.mjs.map +1 -0
- package/dist/S3StateStore-00mB2AG4.mjs +223 -0
- package/dist/S3StateStore-00mB2AG4.mjs.map +1 -0
- package/dist/S3StateStore-C6amZI39.cjs +222 -0
- package/dist/S3StateStore-C6amZI39.cjs.map +1 -0
- package/dist/SSMStateStore-CkYqOAzW.mjs +205 -0
- package/dist/SSMStateStore-CkYqOAzW.mjs.map +1 -0
- package/dist/SSMStateStore-Cnn5fHCg.cjs +204 -0
- package/dist/SSMStateStore-Cnn5fHCg.cjs.map +1 -0
- package/dist/SubscriberGenerator-0ruEmYXj.mjs +646 -0
- package/dist/SubscriberGenerator-0ruEmYXj.mjs.map +1 -0
- package/dist/SubscriberGenerator-CPjbWEOI.cjs +687 -0
- package/dist/SubscriberGenerator-CPjbWEOI.cjs.map +1 -0
- package/dist/add-CdMInvmN.cjs +719 -0
- package/dist/add-CdMInvmN.cjs.map +1 -0
- package/dist/add-DZSU5Tcc.mjs +717 -0
- package/dist/add-DZSU5Tcc.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-8QQ8n-t6.mjs +89 -0
- package/dist/aws-8QQ8n-t6.mjs.map +1 -0
- package/dist/aws-DY9NqQIT.cjs +100 -0
- package/dist/aws-DY9NqQIT.cjs.map +1 -0
- package/dist/awsStore-Bx5nCFnS.mjs +121 -0
- package/dist/awsStore-Bx5nCFnS.mjs.map +1 -0
- package/dist/awsStore-u3ehhMoY.cjs +138 -0
- package/dist/awsStore-u3ehhMoY.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 +519 -0
- package/dist/backups/runner.cjs.map +1 -0
- package/dist/backups/runner.d.cts +102 -0
- package/dist/backups/runner.d.cts.map +1 -0
- package/dist/backups/runner.d.mts +102 -0
- package/dist/backups/runner.d.mts.map +1 -0
- package/dist/backups/runner.mjs +506 -0
- package/dist/backups/runner.mjs.map +1 -0
- package/dist/{bundler-BodTL4kf.mjs → bundler-BzDMJbx8.mjs} +32 -11
- package/dist/bundler-BzDMJbx8.mjs.map +1 -0
- package/dist/{bundler-BeNDZdHQ.cjs → bundler-GKF4xpYI.cjs} +32 -11
- package/dist/bundler-GKF4xpYI.cjs.map +1 -0
- package/dist/cli-Ct6PQtc7.cjs +71 -0
- package/dist/cli-Ct6PQtc7.cjs.map +1 -0
- package/dist/cli-DXeLFtpA.mjs +71 -0
- package/dist/cli-DXeLFtpA.mjs.map +1 -0
- package/dist/compose-BfLDidYU.cjs +3977 -0
- package/dist/compose-BfLDidYU.cjs.map +1 -0
- package/dist/compose-CnanpQBB.mjs +3834 -0
- package/dist/compose-CnanpQBB.mjs.map +1 -0
- package/dist/config-DPsCfNpR.d.mts +268 -0
- package/dist/config-DPsCfNpR.d.mts.map +1 -0
- package/dist/config-azErNJSd.d.cts +268 -0
- package/dist/config-azErNJSd.d.cts.map +1 -0
- package/dist/config.cjs +420 -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 +406 -3
- package/dist/config.mjs.map +1 -0
- package/dist/credentialSchemas-CM0rxWmS.cjs +272 -0
- package/dist/credentialSchemas-CM0rxWmS.cjs.map +1 -0
- package/dist/credentialSchemas-DPOGqOrU.mjs +237 -0
- package/dist/credentialSchemas-DPOGqOrU.mjs.map +1 -0
- package/dist/credentials-D7XJypNd.cjs +520 -0
- package/dist/credentials-D7XJypNd.cjs.map +1 -0
- package/dist/credentials-DpfnUvIR.mjs +395 -0
- package/dist/credentials-DpfnUvIR.mjs.map +1 -0
- package/dist/databases-Db48ZIXL.mjs +588 -0
- package/dist/databases-Db48ZIXL.mjs.map +1 -0
- package/dist/databases-P824RTnx.cjs +703 -0
- package/dist/databases-P824RTnx.cjs.map +1 -0
- package/dist/define-6poNqm5O.mjs +106 -0
- package/dist/define-6poNqm5O.mjs.map +1 -0
- package/dist/define-crmMcXFS.cjs +153 -0
- package/dist/define-crmMcXFS.cjs.map +1 -0
- package/dist/deploy/public.cjs +211 -0
- package/dist/deploy/public.cjs.map +1 -0
- package/dist/deploy/public.d.cts +652 -0
- package/dist/deploy/public.d.cts.map +1 -0
- package/dist/deploy/public.d.mts +652 -0
- package/dist/deploy/public.d.mts.map +1 -0
- package/dist/deploy/public.mjs +144 -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 +2 -2
- package/dist/deploy-B35L6CMr.mjs +3439 -0
- package/dist/deploy-B35L6CMr.mjs.map +1 -0
- package/dist/deploy-zFe_W4WS.cjs +3494 -0
- package/dist/deploy-zFe_W4WS.cjs.map +1 -0
- package/dist/derive-BtGidITm.cjs +161 -0
- package/dist/derive-BtGidITm.cjs.map +1 -0
- package/dist/derive-Dew0QoGe.mjs +150 -0
- package/dist/derive-Dew0QoGe.mjs.map +1 -0
- package/dist/discover-DEOspD9M.cjs +796 -0
- package/dist/discover-DEOspD9M.cjs.map +1 -0
- package/dist/discover-DOhYSKY_.mjs +693 -0
- package/dist/discover-DOhYSKY_.mjs.map +1 -0
- package/dist/dokploy-BGJxcEh0.cjs +38 -0
- package/dist/dokploy-BGJxcEh0.cjs.map +1 -0
- package/dist/dokploy-sDTohVj5.mjs +38 -0
- package/dist/dokploy-sDTohVj5.mjs.map +1 -0
- package/dist/drivers-C47nm-wB.cjs +311 -0
- package/dist/drivers-C47nm-wB.cjs.map +1 -0
- package/dist/drivers-CDjpjakg.mjs +252 -0
- package/dist/drivers-CDjpjakg.mjs.map +1 -0
- package/dist/eas-Bxb9pymo.mjs +334 -0
- package/dist/eas-Bxb9pymo.mjs.map +1 -0
- package/dist/eas-DogHTOxl.cjs +337 -0
- package/dist/eas-DogHTOxl.cjs.map +1 -0
- package/dist/{emit-BdoPFjZf.cjs → emit-CYloptRS.cjs} +44 -54
- package/dist/emit-CYloptRS.cjs.map +1 -0
- package/dist/{emit-Bzq7JsMP.mjs → emit-CiJGdy_f.mjs} +45 -43
- package/dist/emit-CiJGdy_f.mjs.map +1 -0
- package/dist/encryption-BZk_sxC-.mjs +89 -0
- package/dist/encryption-BZk_sxC-.mjs.map +1 -0
- package/dist/encryption-DRXgL9Lh.cjs +90 -0
- package/dist/encryption-DRXgL9Lh.cjs.map +1 -0
- package/dist/engine-BuPhWFVm.cjs +3328 -0
- package/dist/engine-BuPhWFVm.cjs.map +1 -0
- package/dist/engine-uQmNnvNQ.mjs +3215 -0
- package/dist/engine-uQmNnvNQ.mjs.map +1 -0
- package/dist/errors-D8Gwp5kU.mjs +23 -0
- package/dist/errors-D8Gwp5kU.mjs.map +1 -0
- package/dist/errors-DMC4Umsb.cjs +34 -0
- package/dist/errors-DMC4Umsb.cjs.map +1 -0
- package/dist/github-BCRbDSQa.cjs +901 -0
- package/dist/github-BCRbDSQa.cjs.map +1 -0
- package/dist/github-YknZQnYF.mjs +900 -0
- package/dist/github-YknZQnYF.mjs.map +1 -0
- package/dist/googlePlay-B_2dIDSO.mjs +931 -0
- package/dist/googlePlay-B_2dIDSO.mjs.map +1 -0
- package/dist/googlePlay-Cm2uipeZ.cjs +931 -0
- package/dist/googlePlay-Cm2uipeZ.cjs.map +1 -0
- package/dist/identity-CBXr4wNi.mjs +129 -0
- package/dist/identity-CBXr4wNi.mjs.map +1 -0
- package/dist/identity-CbLfgQNT.cjs +182 -0
- package/dist/identity-CbLfgQNT.cjs.map +1 -0
- package/dist/{index-D-iAVHx-.d.cts → index-D-gNc445.d.cts} +39 -15
- package/dist/index-D-gNc445.d.cts.map +1 -0
- package/dist/{index-Cd-qeOam.d.mts → index-Ur-ZIDYC.d.mts} +39 -15
- package/dist/index-Ur-ZIDYC.d.mts.map +1 -0
- package/dist/index.cjs +13468 -12280
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +13491 -12301
- package/dist/index.mjs.map +1 -1
- package/dist/local-B7Zv1NoA.mjs +224 -0
- package/dist/local-B7Zv1NoA.mjs.map +1 -0
- package/dist/local-OPC9BCZt.cjs +241 -0
- package/dist/local-OPC9BCZt.cjs.map +1 -0
- package/dist/migrate-BB9fibbQ.cjs +272 -0
- package/dist/migrate-BB9fibbQ.cjs.map +1 -0
- package/dist/migrate-BIl4kLb1.cjs +181 -0
- package/dist/migrate-BIl4kLb1.cjs.map +1 -0
- package/dist/migrate-BKAh880g.mjs +267 -0
- package/dist/migrate-BKAh880g.mjs.map +1 -0
- package/dist/migrate-zqsyod5I.mjs +181 -0
- package/dist/migrate-zqsyod5I.mjs.map +1 -0
- package/dist/openapi.cjs +214 -7
- package/dist/openapi.cjs.map +1 -0
- package/dist/openapi.d.cts +32 -8
- package/dist/openapi.d.cts.map +1 -1
- package/dist/openapi.d.mts +32 -8
- package/dist/openapi.d.mts.map +1 -1
- package/dist/openapi.mjs +209 -2
- package/dist/openapi.mjs.map +1 -0
- package/dist/projectBucket-BBbQ1lHF.cjs +263 -0
- package/dist/projectBucket-BBbQ1lHF.cjs.map +1 -0
- package/dist/projectBucket-C_DN4WzF.mjs +222 -0
- package/dist/projectBucket-C_DN4WzF.mjs.map +1 -0
- package/dist/provider-BqpjG9QM.cjs +57 -0
- package/dist/provider-BqpjG9QM.cjs.map +1 -0
- package/dist/provider-CEOKk8NS.mjs +46 -0
- package/dist/provider-CEOKk8NS.mjs.map +1 -0
- package/dist/publish-BUnnuLl_.cjs +124 -0
- package/dist/publish-BUnnuLl_.cjs.map +1 -0
- package/dist/publish-BtmLOhV9.mjs +123 -0
- package/dist/publish-BtmLOhV9.mjs.map +1 -0
- package/dist/ready-BwtLriAF.mjs +375 -0
- package/dist/ready-BwtLriAF.mjs.map +1 -0
- package/dist/ready-Cj4pI0dw.cjs +404 -0
- package/dist/ready-Cj4pI0dw.cjs.map +1 -0
- package/dist/reconcile/public.cjs +2 -4
- package/dist/reconcile/public.d.cts +8 -67
- package/dist/reconcile/public.d.cts.map +1 -1
- package/dist/reconcile/public.d.mts +8 -67
- package/dist/reconcile/public.d.mts.map +1 -1
- package/dist/reconcile/public.mjs +3 -3
- package/dist/{reconcile-DhQ00DpU.mjs → reconcile--I7V4Klj.mjs} +2 -2
- package/dist/{reconcile-DhQ00DpU.mjs.map → reconcile--I7V4Klj.mjs.map} +1 -1
- package/dist/{reconcile-Dd2iyILf.cjs → reconcile-CuCQBa5-.cjs} +3 -3
- package/dist/{reconcile-Dd2iyILf.cjs.map → reconcile-CuCQBa5-.cjs.map} +1 -1
- package/dist/resolve-B1zK9f8_.mjs +263 -0
- package/dist/resolve-B1zK9f8_.mjs.map +1 -0
- package/dist/resolve-BVVSf27Y.cjs +316 -0
- package/dist/resolve-BVVSf27Y.cjs.map +1 -0
- package/dist/rollback-CAPWtOm3.mjs +136 -0
- package/dist/rollback-CAPWtOm3.mjs.map +1 -0
- package/dist/rollback-hV8Kbbg_.cjs +165 -0
- package/dist/rollback-hV8Kbbg_.cjs.map +1 -0
- package/dist/runtime-C0okGPpK.d.cts +82 -0
- package/dist/runtime-C0okGPpK.d.cts.map +1 -0
- package/dist/runtime-DfwIeO8f.d.mts +82 -0
- package/dist/runtime-DfwIeO8f.d.mts.map +1 -0
- package/dist/s3-CkERdmxm.mjs +215 -0
- package/dist/s3-CkERdmxm.mjs.map +1 -0
- package/dist/s3-xJtWm6WN.cjs +215 -0
- package/dist/s3-xJtWm6WN.cjs.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 +54 -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 +55 -0
- package/dist/sandbox/credentials-worker.mjs.map +1 -0
- package/dist/sandbox/discover-worker.cjs +50 -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 +51 -0
- package/dist/sandbox/discover-worker.mjs.map +1 -0
- package/dist/sandbox/migrate-worker.cjs +76 -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 +77 -0
- package/dist/sandbox/migrate-worker.mjs.map +1 -0
- package/dist/sandbox-CHv3OYXg.cjs +165 -0
- package/dist/sandbox-CHv3OYXg.cjs.map +1 -0
- package/dist/sandbox-CbVB7uOD.mjs +118 -0
- package/dist/sandbox-CbVB7uOD.mjs.map +1 -0
- package/dist/{workspace-mFpI_ky_.cjs → schemas-BCwKKA42.mjs} +399 -1162
- package/dist/schemas-BCwKKA42.mjs.map +1 -0
- package/dist/{workspace-CgwmXEtc.mjs → schemas-BQ_v0lEX.cjs} +487 -971
- package/dist/schemas-BQ_v0lEX.cjs.map +1 -0
- package/dist/secretsManager-CQORubp9.mjs +97 -0
- package/dist/secretsManager-CQORubp9.mjs.map +1 -0
- package/dist/secretsManager-RAGcEDX1.cjs +108 -0
- package/dist/secretsManager-RAGcEDX1.cjs.map +1 -0
- package/dist/seeds-CNPdk_2f.mjs +9198 -0
- package/dist/seeds-CNPdk_2f.mjs.map +1 -0
- package/dist/seeds-MR13eS-F.cjs +10303 -0
- package/dist/seeds-MR13eS-F.cjs.map +1 -0
- package/dist/serverSetup-9kFFmA86.cjs +651 -0
- package/dist/serverSetup-9kFFmA86.cjs.map +1 -0
- package/dist/serverSetup-DgAERQ5s.mjs +651 -0
- package/dist/serverSetup-DgAERQ5s.mjs.map +1 -0
- package/dist/sniffer-Biw5SE1V.cjs +1998 -0
- package/dist/sniffer-Biw5SE1V.cjs.map +1 -0
- package/dist/sniffer-KS_EcbAk.mjs +1825 -0
- package/dist/sniffer-KS_EcbAk.mjs.map +1 -0
- package/dist/snsSubscriptions-Bl3CChIH.mjs +1472 -0
- package/dist/snsSubscriptions-Bl3CChIH.mjs.map +1 -0
- package/dist/snsSubscriptions-CQFfrCJf.cjs +1695 -0
- package/dist/snsSubscriptions-CQFfrCJf.cjs.map +1 -0
- package/dist/sst-DmVJRu5l.cjs +463 -0
- package/dist/sst-DmVJRu5l.cjs.map +1 -0
- package/dist/sst-fop6uZ25.mjs +440 -0
- package/dist/sst-fop6uZ25.mjs.map +1 -0
- package/dist/stage-BIKAMxNc.cjs +313 -0
- package/dist/stage-BIKAMxNc.cjs.map +1 -0
- package/dist/stage-tIMFTQtj.mjs +302 -0
- package/dist/stage-tIMFTQtj.mjs.map +1 -0
- package/dist/stages-C9uSkohw.cjs +190 -0
- package/dist/stages-C9uSkohw.cjs.map +1 -0
- package/dist/stages-DhmbURs_.mjs +190 -0
- package/dist/stages-DhmbURs_.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-CebFDhWQ.mjs +85 -0
- package/dist/terminal-CebFDhWQ.mjs.map +1 -0
- package/dist/terminal-DBwedwSS.cjs +85 -0
- package/dist/terminal-DBwedwSS.cjs.map +1 -0
- package/dist/{types-BGo5TaNE.d.mts → types-Cjnqw1ta.d.cts} +2199 -462
- package/dist/types-Cjnqw1ta.d.cts.map +1 -0
- package/dist/{types-C5ZNpUad.d.cts → types-xBx-07__.d.mts} +2197 -462
- package/dist/types-xBx-07__.d.mts.map +1 -0
- package/dist/utils-D2Nk1Nv2.cjs +205 -0
- package/dist/utils-D2Nk1Nv2.cjs.map +1 -0
- package/dist/utils-D_fxUqvU.mjs +156 -0
- package/dist/utils-D_fxUqvU.mjs.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-CjSfjfMK.mjs +2396 -0
- package/dist/workspace-CjSfjfMK.mjs.map +1 -0
- package/dist/workspace-DImrdet4.cjs +2808 -0
- package/dist/workspace-DImrdet4.cjs.map +1 -0
- package/package.json +55 -20
- package/dist/HostingerProvider-BY26bWwB.mjs.map +0 -1
- 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.map +0 -1
- 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-BeNDZdHQ.cjs.map +0 -1
- package/dist/bundler-BodTL4kf.mjs.map +0 -1
- package/dist/config-Q1rvKHvw.cjs +0 -467
- package/dist/config-Q1rvKHvw.cjs.map +0 -1
- package/dist/config-pqGD3hF9.mjs +0 -414
- package/dist/config-pqGD3hF9.mjs.map +0 -1
- package/dist/config.d.cts.map +0 -1
- package/dist/config.d.mts.map +0 -1
- package/dist/credentials-BekkKtY_.mjs +0 -2780
- package/dist/credentials-BekkKtY_.mjs.map +0 -1
- package/dist/credentials-Q6F0uqJq.cjs +0 -2917
- package/dist/credentials-Q6F0uqJq.cjs.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.map +0 -1
- package/dist/emit-Bzq7JsMP.mjs.map +0 -1
- package/dist/fullstack-secrets-BET8gqwK.mjs +0 -81
- package/dist/fullstack-secrets-BET8gqwK.mjs.map +0 -1
- package/dist/fullstack-secrets-DXsWO-5m.cjs +0 -92
- package/dist/fullstack-secrets-DXsWO-5m.cjs.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-BfflNPVe.cjs +0 -203
- package/dist/github-BfflNPVe.cjs.map +0 -1
- package/dist/github-CRwnxKmD.mjs +0 -203
- package/dist/github-CRwnxKmD.mjs.map +0 -1
- package/dist/index-Cd-qeOam.d.mts.map +0 -1
- package/dist/index-D-iAVHx-.d.cts.map +0 -1
- package/dist/keystore-B4PRlbgE.mjs +0 -81
- package/dist/keystore-B4PRlbgE.mjs.map +0 -1
- package/dist/keystore-DgGRj2Yy.cjs +0 -98
- package/dist/keystore-DgGRj2Yy.cjs.map +0 -1
- package/dist/openapi-Dcbme-Us.cjs +0 -2038
- package/dist/openapi-Dcbme-Us.cjs.map +0 -1
- package/dist/openapi-react-query.cjs +0 -158
- package/dist/openapi-react-query.cjs.map +0 -1
- package/dist/openapi-react-query.d.cts +0 -9
- package/dist/openapi-react-query.d.cts.map +0 -1
- package/dist/openapi-react-query.d.mts +0 -9
- package/dist/openapi-react-query.d.mts.map +0 -1
- package/dist/openapi-react-query.mjs +0 -158
- package/dist/openapi-react-query.mjs.map +0 -1
- package/dist/openapi-vy4JzhUv.mjs +0 -1991
- package/dist/openapi-vy4JzhUv.mjs.map +0 -1
- package/dist/storage-C-30BD1e.cjs +0 -272
- package/dist/storage-C-30BD1e.cjs.map +0 -1
- package/dist/storage-P_b3w7uj.mjs +0 -231
- package/dist/storage-P_b3w7uj.mjs.map +0 -1
- package/dist/sync-B3xxXtJT.mjs +0 -88
- package/dist/sync-B3xxXtJT.mjs.map +0 -1
- package/dist/sync-D7uTIIEi.cjs +0 -111
- package/dist/sync-D7uTIIEi.cjs.map +0 -1
- package/dist/types-BGo5TaNE.d.mts.map +0 -1
- package/dist/types-C5ZNpUad.d.cts.map +0 -1
- package/dist/workspace-CgwmXEtc.mjs.map +0 -1
- package/dist/workspace-mFpI_ky_.cjs.map +0 -1
|
@@ -1,12 +1,303 @@
|
|
|
1
|
-
import { ConstructManifest } from "@geekmidas/manifest";
|
|
1
|
+
import { ConstructManifest, Declaration } from "@geekmidas/manifest";
|
|
2
|
+
//#region src/errors.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* The errors gkm raises on purpose.
|
|
5
|
+
*
|
|
6
|
+
* A {@link GkmError} is a failure gkm saw coming and explained: a stage
|
|
7
|
+
* missing a key, a config that names nothing, no AWS credentials. Its
|
|
8
|
+
* message is the whole answer — what went wrong and what to do — so the CLI
|
|
9
|
+
* prints `Name: message` and nothing else. A stack trace under it would point
|
|
10
|
+
* at gkm's own code, which is not where the fix is.
|
|
11
|
+
*
|
|
12
|
+
* Anything else that reaches the CLI — a TypeError, an SDK error nothing
|
|
13
|
+
* wrapped — is a failure nobody explained, and keeps its stack. `--debug` or
|
|
14
|
+
* `GKM_DEBUG=1` shows the stack of both.
|
|
15
|
+
*/
|
|
16
|
+
declare class GkmError extends Error {}
|
|
2
17
|
//#endregion
|
|
3
|
-
//#region src/
|
|
18
|
+
//#region src/sandbox/sandbox.d.ts
|
|
19
|
+
/** Where a command's output goes. */
|
|
20
|
+
type SandboxOutput = 'capture' | 'inherit' | 'stderr' | 'ignore';
|
|
21
|
+
interface SandboxExecOptions {
|
|
22
|
+
/**
|
|
23
|
+
* Where the command runs: the project root or a directory below it, as an
|
|
24
|
+
* absolute path or relative to the root. Anywhere else is refused with
|
|
25
|
+
* {@link SandboxCwdEscape}.
|
|
26
|
+
*/
|
|
27
|
+
cwd: string;
|
|
28
|
+
/**
|
|
29
|
+
* The command's whole environment. Nothing of the host's is added to it:
|
|
30
|
+
* start from {@link Sandbox.env} and add what the step needs.
|
|
31
|
+
*/
|
|
32
|
+
env: Readonly<Record<string, string>>;
|
|
33
|
+
/**
|
|
34
|
+
* How long the command may run before it is killed. Required: a step that
|
|
35
|
+
* waits forever — a sniffed entry that opens a server, a build stuck on a
|
|
36
|
+
* prompt — would otherwise hold the deploy, and its lock, forever.
|
|
37
|
+
*/
|
|
38
|
+
timeoutMs: number;
|
|
39
|
+
/**
|
|
40
|
+
* Files the command can read, by name. Mounted in a directory of their own
|
|
41
|
+
* — named by `GKM_SECRETS_DIR` in the command's environment — and removed
|
|
42
|
+
* when it exits. Never set as variables, which every child inherits, a
|
|
43
|
+
* crash report prints and `/proc/<pid>/environ` shows.
|
|
44
|
+
*/
|
|
45
|
+
secrets?: Readonly<Record<string, string>>;
|
|
46
|
+
/**
|
|
47
|
+
* `capture` (the default) returns stdout and stderr in the result;
|
|
48
|
+
* `inherit` gives the command the host's terminal; `stderr` sends both
|
|
49
|
+
* streams to the host's stderr; `ignore` discards them.
|
|
50
|
+
*/
|
|
51
|
+
output?: SandboxOutput;
|
|
52
|
+
/** Kills the command when aborted; `exec` rejects with the signal's reason. */
|
|
53
|
+
signal?: AbortSignal;
|
|
54
|
+
}
|
|
55
|
+
/** How a command ended. A non-zero exit is a result, not an error. */
|
|
56
|
+
interface SandboxResult {
|
|
57
|
+
exitCode: number | null;
|
|
58
|
+
signal: string | null;
|
|
59
|
+
/** What it wrote to stdout, when its output was captured. */
|
|
60
|
+
stdout: string;
|
|
61
|
+
/** What it wrote to stderr, when its output was captured. */
|
|
62
|
+
stderr: string;
|
|
63
|
+
}
|
|
4
64
|
/**
|
|
5
|
-
*
|
|
65
|
+
* Runs a command against the project, and nothing else of the host's.
|
|
6
66
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
67
|
+
* `exec` resolves with the result however the command exited. It rejects
|
|
68
|
+
* with {@link CommandTimedOut} once the timeout passes — after the command is
|
|
69
|
+
* gone — with {@link SandboxCwdEscape} for a directory outside the project,
|
|
70
|
+
* with the signal's reason when aborted, and with the spawn error when the
|
|
71
|
+
* program cannot be started.
|
|
9
72
|
*/
|
|
73
|
+
interface Sandbox {
|
|
74
|
+
/** The project: the directory every command runs at or below. */
|
|
75
|
+
readonly root: string;
|
|
76
|
+
/**
|
|
77
|
+
* Whether the code it runs is kept from the host: its files, its
|
|
78
|
+
* processes, its memory.
|
|
79
|
+
*
|
|
80
|
+
* An isolating sandbox shares nothing but what crosses `exec`, so a config
|
|
81
|
+
* reaches the deploy as data — a live object in it (a custom state store,
|
|
82
|
+
* an inline target) cannot cross, and is refused with
|
|
83
|
+
* `ConfigObjectNotSerializable`. A non-isolating one, like
|
|
84
|
+
* {@link LocalSandbox}, runs on the host as the host's user; a project
|
|
85
|
+
* whose config holds live objects is then loaded in-process as before,
|
|
86
|
+
* because a project trusted to run there is trusted to do that.
|
|
87
|
+
*/
|
|
88
|
+
readonly isolating: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* The environment a command starts from: what any program needs to run
|
|
91
|
+
* here — `PATH`, `HOME`, the locale — and no credential.
|
|
92
|
+
*/
|
|
93
|
+
readonly env: Readonly<Record<string, string>>;
|
|
94
|
+
exec(command: string, args: readonly string[], options: SandboxExecOptions): Promise<SandboxResult>;
|
|
95
|
+
}
|
|
96
|
+
/** The variable naming the directory a command's secrets are mounted in. */
|
|
97
|
+
declare const SECRETS_DIR_ENV = "GKM_SECRETS_DIR";
|
|
98
|
+
/** A command was asked to run outside the project. */
|
|
99
|
+
declare class SandboxCwdEscape extends GkmError {
|
|
100
|
+
readonly cwd: string;
|
|
101
|
+
readonly root: string;
|
|
102
|
+
constructor(cwd: string, root: string);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* `cwd` as an absolute directory inside `root`, or {@link SandboxCwdEscape}.
|
|
106
|
+
*
|
|
107
|
+
* Symlinks are resolved on both sides first, so a link inside the project
|
|
108
|
+
* that points out of it is an escape, and a project reached through a link
|
|
109
|
+
* (`/tmp` on macOS) is still itself. For a sandbox of a host's own to call
|
|
110
|
+
* before it runs anything.
|
|
111
|
+
*/
|
|
112
|
+
declare function confineCwd(root: string, cwd: string): string;
|
|
113
|
+
/** A secret's file name: one path segment, so it cannot be written elsewhere. */
|
|
114
|
+
declare class SecretNameInvalid extends GkmError {
|
|
115
|
+
readonly secretName: string;
|
|
116
|
+
constructor(secretName: string);
|
|
117
|
+
}
|
|
118
|
+
//#endregion
|
|
119
|
+
//#region src/deploy/identity.d.ts
|
|
120
|
+
interface DeployIdentity {
|
|
121
|
+
/**
|
|
122
|
+
* Whose deploy this is — an organisation, a team, a repository. Two
|
|
123
|
+
* workspaces with the same name are told apart by it. Defaults to the
|
|
124
|
+
* kebab-cased workspace name; set `deploy.namespace` to choose one.
|
|
125
|
+
*/
|
|
126
|
+
readonly namespace: string;
|
|
127
|
+
/** The workspace name as the target spells it: lowercase, `[a-z0-9-]`. */
|
|
128
|
+
readonly project: string;
|
|
129
|
+
readonly stage: string;
|
|
130
|
+
/**
|
|
131
|
+
* `<namespace>/<project>`: what a Dokploy project is claimed by.
|
|
132
|
+
*
|
|
133
|
+
* The stage is not part of it because one Dokploy project holds every stage
|
|
134
|
+
* of a workspace, each as an environment — the key has to be the same from
|
|
135
|
+
* every stage that deploys into it.
|
|
136
|
+
*/
|
|
137
|
+
readonly key: string;
|
|
138
|
+
/**
|
|
139
|
+
* The prefix every name on the target carries: the project alone in the
|
|
140
|
+
* default namespace, `<namespace>-<project>` in any other.
|
|
141
|
+
*
|
|
142
|
+
* The default adds nothing so that a workspace that never set a namespace
|
|
143
|
+
* keeps the names it was already deployed under — a Postgres is found by
|
|
144
|
+
* its name, and a new name would be a new, empty database.
|
|
145
|
+
*/
|
|
146
|
+
readonly scope: string;
|
|
147
|
+
}
|
|
148
|
+
/** What an identity is derived from: a workspace's name and namespace. */
|
|
149
|
+
interface IdentitySource {
|
|
150
|
+
name: string;
|
|
151
|
+
deploy?: {
|
|
152
|
+
namespace?: string;
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
declare function deployIdentity(workspace: IdentitySource, stage: string): DeployIdentity;
|
|
156
|
+
//#endregion
|
|
157
|
+
//#region src/secrets/types.d.ts
|
|
158
|
+
/** Credentials for a specific service */
|
|
159
|
+
interface ServiceCredentials {
|
|
160
|
+
host: string;
|
|
161
|
+
port: number;
|
|
162
|
+
username: string;
|
|
163
|
+
password: string;
|
|
164
|
+
/** Database name (for postgres) */
|
|
165
|
+
database?: string;
|
|
166
|
+
/** Bucket name (for minio) */
|
|
167
|
+
bucket?: string;
|
|
168
|
+
/** Access key ID (for localstack) */
|
|
169
|
+
accessKeyId?: string;
|
|
170
|
+
/** Region (for localstack) */
|
|
171
|
+
region?: string;
|
|
172
|
+
}
|
|
173
|
+
/** Stage secrets configuration */
|
|
174
|
+
interface StageSecrets {
|
|
175
|
+
/** Stage name (e.g., 'production', 'staging') */
|
|
176
|
+
stage: string;
|
|
177
|
+
/** ISO timestamp when secrets were created */
|
|
178
|
+
createdAt: string;
|
|
179
|
+
/** ISO timestamp when secrets were last updated */
|
|
180
|
+
updatedAt: string;
|
|
181
|
+
/** Service-specific credentials */
|
|
182
|
+
services: {
|
|
183
|
+
postgres?: ServiceCredentials;
|
|
184
|
+
redis?: ServiceCredentials;
|
|
185
|
+
minio?: ServiceCredentials;
|
|
186
|
+
mailpit?: ServiceCredentials;
|
|
187
|
+
localstack?: ServiceCredentials;
|
|
188
|
+
};
|
|
189
|
+
/** Generated connection URLs */
|
|
190
|
+
urls: {
|
|
191
|
+
DATABASE_URL?: string;
|
|
192
|
+
REDIS_URL?: string;
|
|
193
|
+
STORAGE_ENDPOINT?: string;
|
|
194
|
+
SMTP_HOST?: string;
|
|
195
|
+
SMTP_PORT?: string;
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* Values injected by key: those set with `gkm secrets:set` — a third
|
|
199
|
+
* party's credentials — and those generated once for the stage, such as an
|
|
200
|
+
* auth server's signing secret.
|
|
201
|
+
*/
|
|
202
|
+
custom: Record<string, string>;
|
|
203
|
+
/**
|
|
204
|
+
* Random, generated once per stage: what every password a deploy derives
|
|
205
|
+
* is salted with. Without it a derived password is a function of the
|
|
206
|
+
* project and stage names, which anyone reading the repo has.
|
|
207
|
+
*/
|
|
208
|
+
seed?: string;
|
|
209
|
+
}
|
|
210
|
+
//#endregion
|
|
211
|
+
//#region src/secrets/store.d.ts
|
|
212
|
+
interface SecretsStore {
|
|
213
|
+
/**
|
|
214
|
+
* Which kind of store this is — `'file'`, `'s3'`, `'ssm'`,
|
|
215
|
+
* `'secrets-manager'`, or a custom one's.
|
|
216
|
+
*/
|
|
217
|
+
readonly name: string;
|
|
218
|
+
/** The stage's secrets, or null when it has none here. */
|
|
219
|
+
read(stage: string): Promise<StageSecrets | null>;
|
|
220
|
+
/** Replace the stage's secrets. */
|
|
221
|
+
write(stage: string, secrets: StageSecrets): Promise<void>;
|
|
222
|
+
}
|
|
223
|
+
/** Secrets in SSM Parameter Store, in the account of the active credentials. */
|
|
224
|
+
interface SsmSecretsStoreConfig {
|
|
225
|
+
provider: 'ssm';
|
|
226
|
+
region: string;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Secrets in AWS Secrets Manager, in the account of the active credentials:
|
|
230
|
+
* one secret per stage, `gkm/<project>/<stage>/secrets`. Up to 64 KB where
|
|
231
|
+
* SSM holds 8 KB, at a monthly price per secret.
|
|
232
|
+
*/
|
|
233
|
+
interface SecretsManagerSecretsStoreConfig {
|
|
234
|
+
provider: 'secrets-manager';
|
|
235
|
+
region: string;
|
|
236
|
+
/**
|
|
237
|
+
* The KMS key (id, ARN or alias) a stage's secret is created with. Unset,
|
|
238
|
+
* it is the account's AWS-managed `aws/secretsmanager` key.
|
|
239
|
+
*/
|
|
240
|
+
kmsKeyId?: string;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Secrets in S3, one object per stage —
|
|
244
|
+
* `<prefix>/<project>/<stage>/secrets.json` — in the project bucket beside the
|
|
245
|
+
* deploy state and backups, or in a bucket that exists. Encrypted with SSE-S3,
|
|
246
|
+
* every past document kept by the bucket's versioning, and no size limit.
|
|
247
|
+
*/
|
|
248
|
+
interface S3SecretsStoreConfig {
|
|
249
|
+
provider: 's3';
|
|
250
|
+
/**
|
|
251
|
+
* A bucket that already exists. Omitted, the project bucket —
|
|
252
|
+
* `gkm-<project>-<account id>`, created by the first write.
|
|
253
|
+
*/
|
|
254
|
+
bucket?: string;
|
|
255
|
+
/** The bucket's region. Omitted, the deploy state's, when it is in S3. */
|
|
256
|
+
region?: string;
|
|
257
|
+
/** Key prefix inside the bucket. Omitted, the S3 state's, else `gkm`. */
|
|
258
|
+
prefix?: string;
|
|
259
|
+
}
|
|
260
|
+
/** Any other backend: an object implementing {@link SecretsStore}. */
|
|
261
|
+
interface CustomSecretsStoreConfig {
|
|
262
|
+
provider: SecretsStore;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* `secrets.store` in gkm.config.ts.
|
|
266
|
+
*
|
|
267
|
+
* `'file'` — the default — keeps each stage's secrets in the encrypted
|
|
268
|
+
* `.gkm/secrets/<stage>.json`, its key in the CLI's home (`GKM_HOME`, else
|
|
269
|
+
* `~/.gkm`). It cannot serve a
|
|
270
|
+
* deploy from CI while `.gkm/` is gitignored; `s3`, `ssm`, `secrets-manager`
|
|
271
|
+
* or a custom store can.
|
|
272
|
+
*/
|
|
273
|
+
type SecretsStoreConfig = 'file' | S3SecretsStoreConfig | SsmSecretsStoreConfig | SecretsManagerSecretsStoreConfig | CustomSecretsStoreConfig;
|
|
274
|
+
//#endregion
|
|
275
|
+
//#region src/deploy/actor.d.ts
|
|
276
|
+
/**
|
|
277
|
+
* Who wrote a stage's deploy state: a GitHub Actions run, or a person at a
|
|
278
|
+
* machine. Recorded on every state write (`updatedBy`), on every resource
|
|
279
|
+
* record and on every release (`releasedBy`), so "who put this here" has an
|
|
280
|
+
* answer that does not depend on anyone's memory.
|
|
281
|
+
*/
|
|
282
|
+
/** A GitHub Actions run: the account that triggered it and the run's page. */
|
|
283
|
+
interface GithubActor {
|
|
284
|
+
kind: 'github';
|
|
285
|
+
/** `GITHUB_ACTOR` — the account that triggered the run. */
|
|
286
|
+
actor: string;
|
|
287
|
+
/** `<server>/<repository>/actions/runs/<run id>` */
|
|
288
|
+
run: string;
|
|
289
|
+
/** `GITHUB_WORKFLOW` — the workflow's name. */
|
|
290
|
+
workflow?: string;
|
|
291
|
+
}
|
|
292
|
+
/** A person at a machine. */
|
|
293
|
+
interface LocalActor {
|
|
294
|
+
kind: 'local';
|
|
295
|
+
user: string;
|
|
296
|
+
host: string;
|
|
297
|
+
}
|
|
298
|
+
type Actor = GithubActor | LocalActor;
|
|
299
|
+
//#endregion
|
|
300
|
+
//#region src/deploy/state.d.ts
|
|
10
301
|
/**
|
|
11
302
|
* Per-app database credentials
|
|
12
303
|
*/
|
|
@@ -61,12 +352,30 @@ interface BackupState {
|
|
|
61
352
|
/** Timestamp when backup was configured */
|
|
62
353
|
createdAt: string;
|
|
63
354
|
}
|
|
355
|
+
/** What every target's state for a stage holds. */
|
|
356
|
+
interface StageStateCore {
|
|
357
|
+
stage: string;
|
|
358
|
+
lastDeployedAt: string;
|
|
359
|
+
/**
|
|
360
|
+
* The deploy identity's key (`<namespace>/<project>`) that last deployed
|
|
361
|
+
* this stage — what the project's ownership marker says.
|
|
362
|
+
*/
|
|
363
|
+
identity?: string;
|
|
364
|
+
/**
|
|
365
|
+
* Each app's releases, keyed by app name: what runs now, what ran before
|
|
366
|
+
* it — which `gkm deploy:rollback` restores — and the history behind both.
|
|
367
|
+
*/
|
|
368
|
+
releases?: Record<string, AppReleases>;
|
|
369
|
+
}
|
|
370
|
+
/** A compose stage's state: the core, and nothing Dokploy-specific. */
|
|
371
|
+
interface ComposeStageState extends StageStateCore {
|
|
372
|
+
provider: 'compose';
|
|
373
|
+
}
|
|
64
374
|
/**
|
|
65
375
|
* State for a single stage deployment
|
|
66
376
|
*/
|
|
67
|
-
interface DokployStageState {
|
|
377
|
+
interface DokployStageState extends StageStateCore {
|
|
68
378
|
provider: 'dokploy';
|
|
69
|
-
stage: string;
|
|
70
379
|
/** Dokploy project ID - created on first deploy */
|
|
71
380
|
projectId: string;
|
|
72
381
|
environmentId: string;
|
|
@@ -85,7 +394,169 @@ interface DokployStageState {
|
|
|
85
394
|
dnsRecords?: Record<string, CreatedDnsRecord>;
|
|
86
395
|
/** Backup destination state */
|
|
87
396
|
backups?: BackupState;
|
|
88
|
-
|
|
397
|
+
/**
|
|
398
|
+
* The Dokploy registry the stage's images are pulled through. Kept per
|
|
399
|
+
* stage rather than once per machine, so a stage keeps the registry it was
|
|
400
|
+
* deployed with whoever deploys it next.
|
|
401
|
+
*/
|
|
402
|
+
registryId?: string;
|
|
403
|
+
}
|
|
404
|
+
/** A stage's state, whichever target wrote it. */
|
|
405
|
+
type StageState = DokployStageState | ComposeStageState;
|
|
406
|
+
/** An image a stage runs: the ref it was pushed as, and what it resolved to. */
|
|
407
|
+
interface DeployedImage {
|
|
408
|
+
ref: string;
|
|
409
|
+
/**
|
|
410
|
+
* The tag it was released under — a site's carries its stage
|
|
411
|
+
* (`v1.4.0-production`). Recorded by targets that pull a release by tag.
|
|
412
|
+
*/
|
|
413
|
+
tag?: string;
|
|
414
|
+
/** The registry's digest, `sha256:…` — absent if it could not be read. */
|
|
415
|
+
digest?: string;
|
|
416
|
+
}
|
|
417
|
+
/** An image that went live, and when. */
|
|
418
|
+
interface ReleasedImage extends DeployedImage {
|
|
419
|
+
/** The image tag the deploy released under. */
|
|
420
|
+
tag?: string;
|
|
421
|
+
releasedAt: string;
|
|
422
|
+
/** Who released it — absent on a release recorded before it was kept. */
|
|
423
|
+
releasedBy?: Actor;
|
|
424
|
+
/** Set when a rollback replaced it: it is never rolled back *to*. */
|
|
425
|
+
rolledBack?: true;
|
|
426
|
+
}
|
|
427
|
+
/** An app's releases: what runs, what ran before it, and what ran before that. */
|
|
428
|
+
interface AppReleases {
|
|
429
|
+
current: ReleasedImage;
|
|
430
|
+
/** What a rollback restores; absent until a second release. */
|
|
431
|
+
previous?: ReleasedImage;
|
|
432
|
+
/** Every release, newest first, at most {@link RELEASE_HISTORY} of them. */
|
|
433
|
+
history: ReleasedImage[];
|
|
434
|
+
}
|
|
435
|
+
//#endregion
|
|
436
|
+
//#region src/deploy/StateStore.d.ts
|
|
437
|
+
/** Opaque: a file hash, an SSM parameter version or an S3 ETag. */
|
|
438
|
+
type StateVersion = string;
|
|
439
|
+
/**
|
|
440
|
+
* `pending` is written before the call that creates the resource, `ready`
|
|
441
|
+
* once the target has returned its id. A run that finds a `pending` record
|
|
442
|
+
* knows a previous run may have created the resource and should look for it
|
|
443
|
+
* before creating another.
|
|
444
|
+
*/
|
|
445
|
+
type ResourceStatus = 'pending' | 'ready';
|
|
446
|
+
interface ResourceRecord {
|
|
447
|
+
/** Unique within the stage, `<type>:<name>` — e.g. `application:api`. */
|
|
448
|
+
key: string;
|
|
449
|
+
/** What kind of resource it is — e.g. `application`, `postgres`. */
|
|
450
|
+
type: string;
|
|
451
|
+
/** The id the target gave it. Absent while `pending`. */
|
|
452
|
+
id?: string;
|
|
453
|
+
status: ResourceStatus;
|
|
454
|
+
/** Whatever the target needs to adopt the resource on a later run. */
|
|
455
|
+
data?: Record<string, unknown>;
|
|
456
|
+
updatedAt: string;
|
|
457
|
+
/** Who wrote the record — absent on one written before it was kept. */
|
|
458
|
+
updatedBy?: Actor;
|
|
459
|
+
}
|
|
460
|
+
/** A resource as a caller hands it to `putResource`; the store stamps it. */
|
|
461
|
+
type ResourceInput = Omit<ResourceRecord, 'updatedAt' | 'updatedBy'>;
|
|
462
|
+
/** One write of a stage's state: which, when, by whom, doing what. */
|
|
463
|
+
interface HistoryEntry {
|
|
464
|
+
serial: number;
|
|
465
|
+
at: string;
|
|
466
|
+
by: Actor;
|
|
467
|
+
/** The lock's operation — `deploy`, `rollback`, `setup`, `state:push` … */
|
|
468
|
+
operation: string;
|
|
469
|
+
}
|
|
470
|
+
interface StoredStageState {
|
|
471
|
+
state: StageState;
|
|
472
|
+
resources: Record<string, ResourceRecord>;
|
|
473
|
+
/** The latest writes, newest first. */
|
|
474
|
+
history: HistoryEntry[];
|
|
475
|
+
/** Pass back as `expectedVersion` to write on top of exactly this read. */
|
|
476
|
+
version: StateVersion;
|
|
477
|
+
}
|
|
478
|
+
interface WriteOptions {
|
|
479
|
+
/**
|
|
480
|
+
* The version this write is based on — `null` to create state that must
|
|
481
|
+
* not exist yet.
|
|
482
|
+
*/
|
|
483
|
+
expectedVersion: StateVersion | null;
|
|
484
|
+
}
|
|
485
|
+
interface ResourceWriteOptions {
|
|
486
|
+
/**
|
|
487
|
+
* Omitted, the record is applied on top of whatever is stored now (still
|
|
488
|
+
* conditionally, so a concurrent write raises rather than being lost).
|
|
489
|
+
*/
|
|
490
|
+
expectedVersion?: StateVersion;
|
|
491
|
+
}
|
|
492
|
+
interface LockHolder {
|
|
493
|
+
/** Unique per acquisition, so a release never removes someone else's lock. */
|
|
494
|
+
id: string;
|
|
495
|
+
owner: string;
|
|
496
|
+
host: string;
|
|
497
|
+
pid: number;
|
|
498
|
+
acquiredAt: string;
|
|
499
|
+
/** What the holder is doing, e.g. `deploy`. */
|
|
500
|
+
operation?: string;
|
|
501
|
+
}
|
|
502
|
+
interface LockOptions {
|
|
503
|
+
operation?: string;
|
|
504
|
+
}
|
|
505
|
+
interface StateLock {
|
|
506
|
+
readonly stage: string;
|
|
507
|
+
readonly holder: LockHolder;
|
|
508
|
+
/** Removes the lock if it is still this one; safe to call twice. */
|
|
509
|
+
release(): Promise<void>;
|
|
510
|
+
}
|
|
511
|
+
interface StateStore {
|
|
512
|
+
/** Takes the stage's lock, or raises `StateLocked` naming its holder. */
|
|
513
|
+
lock(stage: string, options?: LockOptions): Promise<StateLock>;
|
|
514
|
+
/**
|
|
515
|
+
* Removes the stage's lock whoever holds it, for a run that crashed with
|
|
516
|
+
* it held. Returns the holder it removed, or `null` if there was none.
|
|
517
|
+
*/
|
|
518
|
+
forceUnlock(stage: string): Promise<LockHolder | null>;
|
|
519
|
+
read(stage: string): Promise<StoredStageState | null>;
|
|
520
|
+
/** Replaces the stage's state, keeping its resource records. */
|
|
521
|
+
write(stage: string, state: StageState, options: WriteOptions): Promise<StateVersion>;
|
|
522
|
+
putResource(stage: string, record: ResourceInput, options?: ResourceWriteOptions): Promise<StateVersion>;
|
|
523
|
+
deleteResource(stage: string, key: string, options?: ResourceWriteOptions): Promise<StateVersion>;
|
|
524
|
+
/**
|
|
525
|
+
* How big the stage's document is as this store would write it, against
|
|
526
|
+
* the most it can hold — for a store with a limit (SSM). `null` when the
|
|
527
|
+
* stage has no state yet.
|
|
528
|
+
*/
|
|
529
|
+
capacity?(stage: string): Promise<StateCapacity | null>;
|
|
530
|
+
}
|
|
531
|
+
/** A stored document's size against the store's limit, in bytes. */
|
|
532
|
+
interface StateCapacity {
|
|
533
|
+
bytes: number;
|
|
534
|
+
limit: number;
|
|
535
|
+
location: string;
|
|
536
|
+
/** The store's AWS region, for the message that suggests S3. */
|
|
537
|
+
region?: string;
|
|
538
|
+
}
|
|
539
|
+
declare class StateLocked extends GkmError {
|
|
540
|
+
readonly stage: string;
|
|
541
|
+
readonly holder: LockHolder | null;
|
|
542
|
+
readonly location: string;
|
|
543
|
+
constructor(stage: string, holder: LockHolder | null, location: string);
|
|
544
|
+
}
|
|
545
|
+
declare class StateVersionConflict extends GkmError {
|
|
546
|
+
readonly stage: string;
|
|
547
|
+
readonly expectedVersion: StateVersion | null;
|
|
548
|
+
readonly actualVersion: StateVersion | null;
|
|
549
|
+
constructor(stage: string, expectedVersion: StateVersion | null, actualVersion: StateVersion | null);
|
|
550
|
+
}
|
|
551
|
+
/**
|
|
552
|
+
* A deploy, setup or rollback of a stage in CI, with the stage's state kept on
|
|
553
|
+
* the runner — which is discarded when the job ends.
|
|
554
|
+
*/
|
|
555
|
+
declare class LocalStateInCi extends GkmError {
|
|
556
|
+
readonly stage: string;
|
|
557
|
+
readonly operation: string;
|
|
558
|
+
readonly region: string;
|
|
559
|
+
constructor(stage: string, operation: string, region: string);
|
|
89
560
|
}
|
|
90
561
|
//#endregion
|
|
91
562
|
//#region src/deploy/StateProvider.d.ts
|
|
@@ -98,51 +569,937 @@ interface DokployStageState {
|
|
|
98
569
|
*/
|
|
99
570
|
interface StateProvider {
|
|
100
571
|
/**
|
|
101
|
-
* Read deployment state for a stage.
|
|
102
|
-
*
|
|
103
|
-
* @param stage - The deployment stage (e.g., 'development', 'production')
|
|
104
|
-
* @returns The state object or null if not found
|
|
572
|
+
* Read deployment state for a stage.
|
|
573
|
+
*
|
|
574
|
+
* @param stage - The deployment stage (e.g., 'development', 'production')
|
|
575
|
+
* @returns The state object or null if not found
|
|
576
|
+
*/
|
|
577
|
+
read(stage: string): Promise<StageState | null>;
|
|
578
|
+
/**
|
|
579
|
+
* Write deployment state for a stage.
|
|
580
|
+
*
|
|
581
|
+
* @param stage - The deployment stage
|
|
582
|
+
* @param state - The state object to persist
|
|
583
|
+
*/
|
|
584
|
+
write(stage: string, state: StageState): Promise<void>;
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* Valid AWS regions.
|
|
588
|
+
*/
|
|
589
|
+
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';
|
|
590
|
+
/**
|
|
591
|
+
* Local state provider config.
|
|
592
|
+
*/
|
|
593
|
+
interface LocalStateConfig {
|
|
594
|
+
provider: 'local';
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* SSM state provider config (requires region).
|
|
598
|
+
*/
|
|
599
|
+
interface SSMStateConfig {
|
|
600
|
+
provider: 'ssm';
|
|
601
|
+
/** AWS region (required for SSM provider) */
|
|
602
|
+
region: AwsRegion;
|
|
603
|
+
/** AWS profile name (optional - uses default credential chain if not provided) */
|
|
604
|
+
profile?: string;
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* S3 state config: one object per stage, written with conditional puts
|
|
608
|
+
* (`If-Match` / `If-None-Match`), and a lock object beside it.
|
|
609
|
+
*
|
|
610
|
+
* Keys: `<prefix>/<workspace name>/<stage>/state.json` and `lock.json`.
|
|
611
|
+
*/
|
|
612
|
+
interface S3StateConfig {
|
|
613
|
+
provider: 's3';
|
|
614
|
+
/**
|
|
615
|
+
* Bucket the state lives in; it must already exist. Omitted, the project
|
|
616
|
+
* bucket — `gkm-<project>-<account id>`, created by the first deploy.
|
|
617
|
+
*/
|
|
618
|
+
bucket?: string;
|
|
619
|
+
/** AWS region of the bucket */
|
|
620
|
+
region: AwsRegion;
|
|
621
|
+
/** Key prefix inside the bucket (default: `gkm`) */
|
|
622
|
+
prefix?: string;
|
|
623
|
+
/** AWS profile name (optional - uses default credential chain if not provided) */
|
|
624
|
+
profile?: string;
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* Custom state provider config.
|
|
628
|
+
*/
|
|
629
|
+
interface CustomStateConfig {
|
|
630
|
+
/**
|
|
631
|
+
* Custom implementation. A `StateStore` is used as is; a `StateProvider`
|
|
632
|
+
* still works, but cannot lock — deploy warns `StateStoreWithoutLocking`.
|
|
633
|
+
*/
|
|
634
|
+
provider: StateProvider | StateStore;
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* State configuration types.
|
|
638
|
+
*/
|
|
639
|
+
type StateConfig = LocalStateConfig | SSMStateConfig | S3StateConfig | CustomStateConfig;
|
|
640
|
+
//#endregion
|
|
641
|
+
//#region src/deploy/credentials.d.ts
|
|
642
|
+
/**
|
|
643
|
+
* What each kind of credential is asked for with, and what it is.
|
|
644
|
+
*
|
|
645
|
+
* A target that needs a kind the CLI does not know declares it by augmenting
|
|
646
|
+
* this interface, and lists it in its `credentials`:
|
|
647
|
+
*
|
|
648
|
+
* ```ts
|
|
649
|
+
* declare module '@geekmidas/cli/target' {
|
|
650
|
+
* interface CredentialKinds {
|
|
651
|
+
* fly: { request: { org: string }; value: { token: string } };
|
|
652
|
+
* }
|
|
653
|
+
* }
|
|
654
|
+
* ```
|
|
655
|
+
*/
|
|
656
|
+
interface CredentialKinds {
|
|
657
|
+
/** The Dokploy API a stage deploys through. */
|
|
658
|
+
dokploy: {
|
|
659
|
+
/** `deploy.dokploy.endpoint`, when the config names one. */
|
|
660
|
+
request: {
|
|
661
|
+
endpoint?: string;
|
|
662
|
+
};
|
|
663
|
+
value: {
|
|
664
|
+
endpoint: string;
|
|
665
|
+
token: string;
|
|
666
|
+
};
|
|
667
|
+
};
|
|
668
|
+
/**
|
|
669
|
+
* A container registry login, for Dokploy to pull with. Asked for only when
|
|
670
|
+
* Dokploy has no registry for `deploy.registry` and one has to be
|
|
671
|
+
* created.
|
|
672
|
+
*/
|
|
673
|
+
registry: {
|
|
674
|
+
/** `deploy.registry`. */
|
|
675
|
+
request: {
|
|
676
|
+
url: string;
|
|
677
|
+
};
|
|
678
|
+
value: {
|
|
679
|
+
username: string;
|
|
680
|
+
password: string;
|
|
681
|
+
};
|
|
682
|
+
};
|
|
683
|
+
/**
|
|
684
|
+
* The AWS account a stage deploys to, for the SST target's `sst deploy`.
|
|
685
|
+
* Handed to that one command's environment and to nothing else.
|
|
686
|
+
*/
|
|
687
|
+
aws: {
|
|
688
|
+
/** The stage, for a provider that keeps one account per stage. */
|
|
689
|
+
request: {
|
|
690
|
+
stage: string;
|
|
691
|
+
};
|
|
692
|
+
value: AwsCredential;
|
|
693
|
+
};
|
|
694
|
+
/**
|
|
695
|
+
* A GoDaddy Personal Access Token, for a `dns` domain whose provider is
|
|
696
|
+
* `godaddy`. Read on the machine that writes the records — never the
|
|
697
|
+
* server's.
|
|
698
|
+
*/
|
|
699
|
+
godaddy: {
|
|
700
|
+
request: Record<never, never>;
|
|
701
|
+
value: GoDaddyCredential;
|
|
702
|
+
};
|
|
703
|
+
/**
|
|
704
|
+
* A Hostinger API token, for a `dns` domain whose provider is
|
|
705
|
+
* `hostinger`. Like GoDaddy's, read where the records are written.
|
|
706
|
+
*/
|
|
707
|
+
hostinger: {
|
|
708
|
+
request: Record<never, never>;
|
|
709
|
+
value: HostingerCredential;
|
|
710
|
+
};
|
|
711
|
+
}
|
|
712
|
+
/** A Hostinger API token, from hpanel.hostinger.com/profile/api. */
|
|
713
|
+
interface HostingerCredential {
|
|
714
|
+
token: string;
|
|
715
|
+
}
|
|
716
|
+
/** A GoDaddy Personal Access Token, sent as `Authorization: Bearer <token>`. */
|
|
717
|
+
interface GoDaddyCredential {
|
|
718
|
+
token: string;
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* Who to act as on AWS: a named profile, or keys.
|
|
722
|
+
*
|
|
723
|
+
* Never both. Given both, every AWS SDK takes the keys and ignores the
|
|
724
|
+
* profile, so `--profile prod` with staging's keys still exported would deploy
|
|
725
|
+
* production's stack into staging's account — the reason `secretsStoreFor`
|
|
726
|
+
* resolves a named profile on its own, and why this cannot express the mix.
|
|
727
|
+
*/
|
|
728
|
+
type AwsCredential = {
|
|
729
|
+
/** A profile in `~/.aws/config` — keys, SSO, an assumed role. */
|
|
730
|
+
profile: string;
|
|
731
|
+
region?: string;
|
|
732
|
+
} | {
|
|
733
|
+
accessKeyId: string;
|
|
734
|
+
secretAccessKey: string;
|
|
735
|
+
/** Present for temporary keys: an assumed role, GitHub's OIDC. */
|
|
736
|
+
sessionToken?: string;
|
|
737
|
+
region?: string;
|
|
738
|
+
};
|
|
739
|
+
type CredentialKind = keyof CredentialKinds;
|
|
740
|
+
/** What a deploy asks a provider for. */
|
|
741
|
+
type CredentialRequest<K extends CredentialKind = CredentialKind> = { [P in K]: {
|
|
742
|
+
kind: P;
|
|
743
|
+
} & CredentialKinds[P]['request']; }[K];
|
|
744
|
+
/** What a provider answers with. */
|
|
745
|
+
type Credential<K extends CredentialKind> = CredentialKinds[K]['value'];
|
|
746
|
+
interface CredentialProvider {
|
|
747
|
+
/**
|
|
748
|
+
* The credential `request` asks for, or `undefined` when this provider has
|
|
749
|
+
* none — the deploy then raises {@link MissingCredential}.
|
|
750
|
+
*/
|
|
751
|
+
get<K extends CredentialKind>(request: CredentialRequest<K>, options?: {
|
|
752
|
+
signal?: AbortSignal;
|
|
753
|
+
}): Promise<Credential<K> | undefined>;
|
|
754
|
+
}
|
|
755
|
+
/** A deploy needed a credential, and its provider had none. */
|
|
756
|
+
declare class MissingCredential extends GkmError {
|
|
757
|
+
readonly kind: CredentialKind;
|
|
758
|
+
/** What it was for: the Dokploy endpoint or the registry URL. */
|
|
759
|
+
readonly target: string | undefined;
|
|
760
|
+
/** How to supply it. */
|
|
761
|
+
readonly howToProvide: string;
|
|
762
|
+
constructor(kind: CredentialKind,
|
|
763
|
+
/** What it was for: the Dokploy endpoint or the registry URL. */
|
|
764
|
+
target: string | undefined,
|
|
765
|
+
/** How to supply it. */
|
|
766
|
+
howToProvide?: string);
|
|
767
|
+
}
|
|
768
|
+
/** Whatever was asked for, from the first provider that has it. */
|
|
769
|
+
declare function chainCredentials(...providers: CredentialProvider[]): CredentialProvider;
|
|
770
|
+
interface StoredCredentialsOptions {
|
|
771
|
+
/** Where to read the variables from. Defaults to `process.env`. */
|
|
772
|
+
env?: NodeJS.ProcessEnv;
|
|
773
|
+
/**
|
|
774
|
+
* The CLI's home, whose `credentials.json` holds stored logins. Defaults
|
|
775
|
+
* to `GKM_HOME`, else `~/.gkm`.
|
|
776
|
+
*/
|
|
777
|
+
home?: string;
|
|
778
|
+
}
|
|
779
|
+
/**
|
|
780
|
+
* Credentials from the environment, then from what `gkm login` stored. What
|
|
781
|
+
* `deploy()` uses when it is handed no provider.
|
|
782
|
+
*
|
|
783
|
+
* - Dokploy: `DOKPLOY_API_TOKEN` / `DOKPLOY_ENDPOINT`, each falling back to
|
|
784
|
+
* the stored login, and the endpoint finally to `deploy.dokploy.endpoint`.
|
|
785
|
+
* Each half is read on its own: a token is a secret and belongs in the
|
|
786
|
+
* environment, an endpoint is configuration and belongs in the config.
|
|
787
|
+
* - Registry: `DOCKER_REGISTRY_USERNAME` / `DOCKER_REGISTRY_PASSWORD`.
|
|
788
|
+
* - AWS: `AWS_PROFILE` when it is set, and then nothing else; otherwise
|
|
789
|
+
* `AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY` / `AWS_SESSION_TOKEN`. The
|
|
790
|
+
* profile winning is `secretsStoreFor`'s rule: a profile is a choice of
|
|
791
|
+
* account someone made, exported keys may be left over from another.
|
|
792
|
+
* Read here, by name, and handed only to the command that deploys — the
|
|
793
|
+
* sandbox every other step runs in passes no `AWS_*` on.
|
|
794
|
+
*/
|
|
795
|
+
declare function storedCredentials(options?: StoredCredentialsOptions): CredentialProvider;
|
|
796
|
+
//#endregion
|
|
797
|
+
//#region src/deploy/types.d.ts
|
|
798
|
+
/** Result for a single app deployment in workspace mode */
|
|
799
|
+
interface AppDeployResult {
|
|
800
|
+
/** App name */
|
|
801
|
+
appName: string;
|
|
802
|
+
/** App type */
|
|
803
|
+
type: 'backend' | 'web' | 'mobile';
|
|
804
|
+
/** Whether deployment succeeded */
|
|
805
|
+
success: boolean;
|
|
806
|
+
/** Dokploy application ID */
|
|
807
|
+
applicationId?: string;
|
|
808
|
+
/** Docker image reference */
|
|
809
|
+
imageRef?: string;
|
|
810
|
+
/** The registry's digest for the image, `sha256:…`, once pushed */
|
|
811
|
+
digest?: string;
|
|
812
|
+
/** Deployment URL */
|
|
813
|
+
url?: string;
|
|
814
|
+
/** Error message if failed */
|
|
815
|
+
error?: string;
|
|
816
|
+
}
|
|
817
|
+
/** Result from workspace deployment */
|
|
818
|
+
interface WorkspaceDeployResult {
|
|
819
|
+
/** Results for each app */
|
|
820
|
+
apps: AppDeployResult[];
|
|
821
|
+
/** Dokploy project ID */
|
|
822
|
+
projectId: string;
|
|
823
|
+
/** Total number of successful deployments */
|
|
824
|
+
successCount: number;
|
|
825
|
+
/** Total number of failed deployments */
|
|
826
|
+
failedCount: number;
|
|
827
|
+
}
|
|
828
|
+
/**
|
|
829
|
+
* What a deploy did — or, for a dry run, would do. Plain JSON, so it can be
|
|
830
|
+
* written out as is (`gkm deploy --json` ends with it).
|
|
831
|
+
*/
|
|
832
|
+
interface DeployResult extends WorkspaceDeployResult {
|
|
833
|
+
stage: string;
|
|
834
|
+
/** `<namespace>/<project>`. */
|
|
835
|
+
identity: string;
|
|
836
|
+
/** The image tag every app was built with. */
|
|
837
|
+
tag: string;
|
|
838
|
+
/** Whether this was a dry run: nothing was created, built or pushed. */
|
|
839
|
+
dryRun: boolean;
|
|
840
|
+
/** Dokploy's environment for the stage; empty when a dry run would create it. */
|
|
841
|
+
environmentId: string;
|
|
842
|
+
/** Apps left out, and why — a mobile app, another deploy target. */
|
|
843
|
+
skipped: {
|
|
844
|
+
app: string;
|
|
845
|
+
reason: string;
|
|
846
|
+
}[];
|
|
847
|
+
/** Each deployed app's public URL. */
|
|
848
|
+
urls: Record<string, string>;
|
|
849
|
+
/**
|
|
850
|
+
* Every resource the run touched, in order: what it applied, or for a dry
|
|
851
|
+
* run, what it would.
|
|
852
|
+
*/
|
|
853
|
+
changes: ResourceChange[];
|
|
854
|
+
}
|
|
855
|
+
//#endregion
|
|
856
|
+
//#region src/deploy/events.d.ts
|
|
857
|
+
/**
|
|
858
|
+
* The stretch of a deploy an event belongs to.
|
|
859
|
+
*
|
|
860
|
+
* - `validate`: the config, the target, the stage, the apps, the lock, the
|
|
861
|
+
* stage's secrets and what each app reads from its environment
|
|
862
|
+
* - `plan`: a dry run's lookups — what would be created and what reused
|
|
863
|
+
* - `provision`: what the apps run on — for Dokploy the project, environment
|
|
864
|
+
* and registry — and the declared constructs
|
|
865
|
+
* - `build`: each app's artifact, built without changing anything live
|
|
866
|
+
* - `release`: the artifacts put live. Dokploy applies the stage's
|
|
867
|
+
* migrations and runs its seeds, then builds and pushes each image here, beside its
|
|
868
|
+
* application, because a site's build args are resolved per app — and
|
|
869
|
+
* checks each backend before any site is released
|
|
870
|
+
* - `verify`: what was released answers — for Dokploy, each site's DNS
|
|
871
|
+
* records and health
|
|
872
|
+
* - `rollback`: the previous release restored, after `release` or `verify`
|
|
873
|
+
* failed, on a target that can
|
|
874
|
+
*/
|
|
875
|
+
type DeployPhase = 'validate' | 'plan' | 'provision' | 'build' | 'release' | 'verify' | 'rollback';
|
|
876
|
+
/** An error, as an event carries it. */
|
|
877
|
+
interface DeployEventError {
|
|
878
|
+
/** The error's class name — `MissingCredential`, `StateLocked`. */
|
|
879
|
+
name: string;
|
|
880
|
+
message: string;
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* How a resource came to be used:
|
|
884
|
+
* - `recorded`: the id the stage's state holds still resolves
|
|
885
|
+
* - `resumed`: a run that died after creating it is picked up
|
|
886
|
+
* - `found`: it existed and was looked up
|
|
887
|
+
* - `created`: this run created it
|
|
888
|
+
*/
|
|
889
|
+
type ResourceVia = 'recorded' | 'resumed' | 'found' | 'created';
|
|
890
|
+
/** One resource a deploy touches, planned or applied. */
|
|
891
|
+
interface ResourceChange {
|
|
892
|
+
/** `<type>:<name>`, unique within the stage — `application:api`. */
|
|
893
|
+
key: string;
|
|
894
|
+
/** `project`, `environment`, `registry`, `application`, `domain`, `image`, or a construct's kind. */
|
|
895
|
+
resourceType: string;
|
|
896
|
+
/**
|
|
897
|
+
* For a plan: whether the run would create it, reuse what exists, or
|
|
898
|
+
* ensure it (look it up, and create it if missing). For an applied change:
|
|
899
|
+
* what was done.
|
|
900
|
+
*/
|
|
901
|
+
action: 'create' | 'reuse' | 'ensure' | 'build';
|
|
902
|
+
/** The target's id, once there is one. */
|
|
903
|
+
id?: string;
|
|
904
|
+
}
|
|
905
|
+
type DeployEvent = {
|
|
906
|
+
type: 'deploy.started';
|
|
907
|
+
stage: string;
|
|
908
|
+
/** The target the run deploys through, by the name it was given. */
|
|
909
|
+
target: string;
|
|
910
|
+
/** `<namespace>/<project>`. */
|
|
911
|
+
identity: string;
|
|
912
|
+
tag: string;
|
|
913
|
+
/** The apps this run deploys, in order. */
|
|
914
|
+
apps: string[];
|
|
915
|
+
dryRun: boolean;
|
|
916
|
+
} | {
|
|
917
|
+
type: 'phase.started';
|
|
918
|
+
phase: DeployPhase;
|
|
919
|
+
} | {
|
|
920
|
+
type: 'phase.finished';
|
|
921
|
+
phase: DeployPhase;
|
|
922
|
+
} |
|
|
923
|
+
/** A phase threw; `deploy.failed` follows (after a rollback, if any). */
|
|
924
|
+
{
|
|
925
|
+
type: 'phase.failed';
|
|
926
|
+
phase: DeployPhase;
|
|
927
|
+
error: DeployEventError;
|
|
928
|
+
} |
|
|
929
|
+
/**
|
|
930
|
+
* A progress line, exactly as `gkm deploy` prints it — leading newline and
|
|
931
|
+
* indentation included, so a terminal renderer prints `message` as is.
|
|
932
|
+
*/
|
|
933
|
+
{
|
|
934
|
+
type: 'log';
|
|
935
|
+
level: 'info' | 'warn' | 'error';
|
|
936
|
+
message: string;
|
|
937
|
+
} | {
|
|
938
|
+
type: 'app.skipped';
|
|
939
|
+
app: string;
|
|
940
|
+
reason: string;
|
|
941
|
+
} | ({
|
|
942
|
+
type: 'resource.planned';
|
|
943
|
+
} & ResourceChange) | ({
|
|
944
|
+
type: 'resource.applied';
|
|
945
|
+
via: ResourceVia;
|
|
946
|
+
} & ResourceChange & {
|
|
947
|
+
id: string;
|
|
948
|
+
}) | {
|
|
949
|
+
type: 'artifact.built';
|
|
950
|
+
app: string;
|
|
951
|
+
imageRef: string;
|
|
952
|
+
/** The registry's digest, `sha256:…`, once pushed. */
|
|
953
|
+
digest?: string;
|
|
954
|
+
} | {
|
|
955
|
+
type: 'app.deployed';
|
|
956
|
+
app: string;
|
|
957
|
+
applicationId: string;
|
|
958
|
+
imageRef: string;
|
|
959
|
+
url: string;
|
|
960
|
+
} | {
|
|
961
|
+
type: 'app.failed';
|
|
962
|
+
app: string;
|
|
963
|
+
error: DeployEventError;
|
|
964
|
+
} |
|
|
965
|
+
/** One check of whether a released app answers. */
|
|
966
|
+
{
|
|
967
|
+
type: 'health.checked';
|
|
968
|
+
app: string;
|
|
969
|
+
/** What was asked: a URL, or the target's own status check. */
|
|
970
|
+
url: string;
|
|
971
|
+
healthy: boolean;
|
|
972
|
+
/** The HTTP status, when the check was a request. */
|
|
973
|
+
status?: number;
|
|
974
|
+
/** 1 for the first check of the app in this run. */
|
|
975
|
+
attempt: number;
|
|
976
|
+
} |
|
|
977
|
+
/**
|
|
978
|
+
* A deployed stage runs a dev service — `--allow-dev-services` — in place
|
|
979
|
+
* of real mail or object storage: Mailpit delivers no mail, MinIO keeps
|
|
980
|
+
* every object on one container's disk. A warning, every run.
|
|
981
|
+
*/
|
|
982
|
+
{
|
|
983
|
+
type: 'dev-service.used';
|
|
984
|
+
service: 'minio' | 'mailpit';
|
|
985
|
+
stage: string;
|
|
986
|
+
/** The constructs it stands in for. */
|
|
987
|
+
constructs: string[];
|
|
988
|
+
} |
|
|
989
|
+
/**
|
|
990
|
+
* The stack's log UI (`deploy.compose.logs`) is up and answering: where
|
|
991
|
+
* it is and how it is reached — through an SSH tunnel to a loopback
|
|
992
|
+
* port, or publicly on a host that allows only some addresses.
|
|
993
|
+
*/
|
|
994
|
+
{
|
|
995
|
+
type: 'logs.ready';
|
|
996
|
+
service: 'openobserve';
|
|
997
|
+
access: 'tunnel' | 'public';
|
|
998
|
+
/** Where a browser opens it: the tunnel's end, or its public host. */
|
|
999
|
+
url: string;
|
|
1000
|
+
/** The loopback port it is published on, for a tunnel. */
|
|
1001
|
+
port?: number;
|
|
1002
|
+
/** The addresses a public host answers. */
|
|
1003
|
+
allow?: string[];
|
|
1004
|
+
email: string;
|
|
1005
|
+
} |
|
|
1006
|
+
/**
|
|
1007
|
+
* One construct's migrations applied by the deploy, before any app
|
|
1008
|
+
* started. Only for a construct that had one to apply.
|
|
1009
|
+
*/
|
|
1010
|
+
{
|
|
1011
|
+
type: 'migration.applied';
|
|
1012
|
+
/** The construct, by id: `Database`. */
|
|
1013
|
+
construct: string;
|
|
1014
|
+
/** Its folder: `db/database/migrations`. */
|
|
1015
|
+
folder: string;
|
|
1016
|
+
/** The migrations applied, in order. */
|
|
1017
|
+
applied: string[];
|
|
1018
|
+
} |
|
|
1019
|
+
/**
|
|
1020
|
+
* One construct's seeds run by the deploy — after its migrations, before
|
|
1021
|
+
* any app started, every one of them on every deploy. Only for a
|
|
1022
|
+
* construct that has seeds.
|
|
1023
|
+
*/
|
|
1024
|
+
{
|
|
1025
|
+
type: 'seed.ran';
|
|
1026
|
+
/** The construct, by id: `Database`. */
|
|
1027
|
+
construct: string;
|
|
1028
|
+
/** Its folder: `db/database/seeds`. */
|
|
1029
|
+
folder: string;
|
|
1030
|
+
/** The seeds run, in order. */
|
|
1031
|
+
seeded: string[];
|
|
1032
|
+
} | {
|
|
1033
|
+
type: 'deploy.finished';
|
|
1034
|
+
result: DeployResult;
|
|
1035
|
+
} | {
|
|
1036
|
+
type: 'deploy.failed';
|
|
1037
|
+
error: DeployEventError;
|
|
1038
|
+
};
|
|
1039
|
+
/** Every `type` a deploy event can have. */
|
|
1040
|
+
type DeployEventType = DeployEvent['type'];
|
|
1041
|
+
//#endregion
|
|
1042
|
+
//#region src/reconcile/discover.d.ts
|
|
1043
|
+
/** The construct face discovery needs: an id, and the ability to declare. */
|
|
1044
|
+
interface Declarable {
|
|
1045
|
+
id: string;
|
|
1046
|
+
declare(): Declaration[];
|
|
1047
|
+
}
|
|
1048
|
+
/**
|
|
1049
|
+
* Whether a module export is a construct.
|
|
1050
|
+
*
|
|
1051
|
+
* Deliberately loose about what else it carries — a construct that also has a
|
|
1052
|
+
* `service` is still a construct, and requiring one would exclude the kinds that
|
|
1053
|
+
* own no address.
|
|
1054
|
+
*/
|
|
1055
|
+
declare function isDeclarable(value: unknown): value is Declarable;
|
|
1056
|
+
interface DiscoverOptions {
|
|
1057
|
+
/** The glob(s) to search. One pattern, not one per kind. */
|
|
1058
|
+
patterns: string | readonly string[];
|
|
1059
|
+
cwd?: string;
|
|
1060
|
+
/**
|
|
1061
|
+
* Re-import changed modules, for the dev watcher.
|
|
1062
|
+
*
|
|
1063
|
+
* A single glob makes discovery more central, not less: a new construct file
|
|
1064
|
+
* has to be picked up on `add`, not only on `change`.
|
|
1065
|
+
*/
|
|
1066
|
+
bustCache?: boolean;
|
|
1067
|
+
/**
|
|
1068
|
+
* Filled in with where each construct was found, when provided.
|
|
1069
|
+
*
|
|
1070
|
+
* Discovery is the only thing that knows: it globbed the files and imported
|
|
1071
|
+
* them. Everything downstream that needs to *write* an import — the build,
|
|
1072
|
+
* generating a server entry that reads a surface's logger — would otherwise
|
|
1073
|
+
* have to be told the path in config, which is the string this removes.
|
|
1074
|
+
*
|
|
1075
|
+
* An out-parameter rather than a second return value so that every existing
|
|
1076
|
+
* caller, which wants the manifest and nothing else, is unchanged.
|
|
1077
|
+
*/
|
|
1078
|
+
sources?: Record<string, ConstructSource>;
|
|
1079
|
+
/**
|
|
1080
|
+
* Filled in, when provided, with the ids each owner's runnables declared an
|
|
1081
|
+
* edge to — keyed by the surface an endpoint was built from, or the worker
|
|
1082
|
+
* a cron or subscriber was.
|
|
1083
|
+
*
|
|
1084
|
+
* A runnable is not a declaration: a surface's endpoints are found by the
|
|
1085
|
+
* glob, not listed by the surface, so its node says `endpoints: []` until a
|
|
1086
|
+
* build folds the routes in. Anything deciding what an app's process reaches
|
|
1087
|
+
* — which keys its container is given — needs those edges before any build,
|
|
1088
|
+
* and discovery is already importing the files they are in.
|
|
1089
|
+
*/
|
|
1090
|
+
runnables?: Record<string, string[]>;
|
|
1091
|
+
/**
|
|
1092
|
+
* Filled in, when provided, with the files each worker's background work is
|
|
1093
|
+
* declared in — its crons, queue consumers and topic subscribers — keyed by
|
|
1094
|
+
* the worker.
|
|
1095
|
+
*
|
|
1096
|
+
* What says which app's build carries a worker's entry: the one whose
|
|
1097
|
+
* directory holds its work. A worker declares no path of its own.
|
|
1098
|
+
*/
|
|
1099
|
+
background?: Record<string, string[]>;
|
|
1100
|
+
/**
|
|
1101
|
+
* Filled in, when provided, with the files that export something built
|
|
1102
|
+
* from each surface — an endpoint, a WebSocket route — keyed by the
|
|
1103
|
+
* surface. What a surface that serves itself imports its routes from.
|
|
1104
|
+
*/
|
|
1105
|
+
served?: Record<string, string[]>;
|
|
1106
|
+
/**
|
|
1107
|
+
* Filled in, when provided, with each worker's subscribers — by the export
|
|
1108
|
+
* a push route is named after, and the key its deliveries come from: its
|
|
1109
|
+
* topic's, or its bucket's events — keyed by the worker.
|
|
1110
|
+
*
|
|
1111
|
+
* What says which worker SNS pushes to, and on which paths: a build bound
|
|
1112
|
+
* for a server records no subscriber in the manifest, because none has a
|
|
1113
|
+
* handler of its own there.
|
|
1114
|
+
*/
|
|
1115
|
+
subscribers?: Record<string, BoundSubscriber[]>;
|
|
1116
|
+
/**
|
|
1117
|
+
* Import the construct modules in this sandbox rather than in this
|
|
1118
|
+
* process. Defaults to the run's own (`withSandbox`), so a deploy's every
|
|
1119
|
+
* discovery — the engine's included — happens there; with neither, they
|
|
1120
|
+
* are imported here, as before.
|
|
1121
|
+
*/
|
|
1122
|
+
sandbox?: Sandbox;
|
|
1123
|
+
}
|
|
1124
|
+
/** A worker's subscriber — to a topic or to a bucket — as discovery found it. */
|
|
1125
|
+
interface BoundSubscriber {
|
|
1126
|
+
/** Its export — what its push route is named after. */
|
|
1127
|
+
name: string;
|
|
1128
|
+
/**
|
|
1129
|
+
* The env key its deliveries come from: its topic's publisher connection
|
|
1130
|
+
* string, or its bucket's events connection string. An `sns://` value is
|
|
1131
|
+
* what makes SNS push to it.
|
|
1132
|
+
*/
|
|
1133
|
+
connectionKey: string;
|
|
1134
|
+
/**
|
|
1135
|
+
* The event types a topic subscriber names — its SNS subscription's filter
|
|
1136
|
+
* on the `type` attribute the topic's publisher sets. Absent for a
|
|
1137
|
+
* bucket's subscriber: S3 sets no such attribute, and the subscriber's own
|
|
1138
|
+
* filter decides.
|
|
1139
|
+
*/
|
|
1140
|
+
events?: readonly string[];
|
|
1141
|
+
}
|
|
1142
|
+
/** Importing a construct module, or declaring one, threw in the sandbox. */
|
|
1143
|
+
declare class ConstructDiscoveryFailed extends Error {
|
|
1144
|
+
readonly errorName: string;
|
|
1145
|
+
readonly detail: string;
|
|
1146
|
+
constructor(errorName: string, detail: string);
|
|
1147
|
+
}
|
|
1148
|
+
/**
|
|
1149
|
+
* The constructs' declarations hold something that is not data, and the
|
|
1150
|
+
* sandbox they were discovered in hands the deploy nothing but data.
|
|
1151
|
+
*/
|
|
1152
|
+
declare class ConstructsNotSerializable extends Error {
|
|
1153
|
+
readonly paths: readonly string[];
|
|
1154
|
+
constructor(paths: readonly string[]);
|
|
1155
|
+
}
|
|
1156
|
+
/** Where a construct was declared, and under what name. */
|
|
1157
|
+
interface ConstructSource {
|
|
1158
|
+
/** Absolute path to the module that exported it. */
|
|
1159
|
+
file: string;
|
|
1160
|
+
/** The name it was exported as — what an import statement has to say. */
|
|
1161
|
+
exportName: string;
|
|
1162
|
+
/**
|
|
1163
|
+
* The exported construct itself.
|
|
1164
|
+
*
|
|
1165
|
+
* What a declaration cannot say — whether it serves itself — the object can
|
|
1166
|
+
* be asked, and discovery already imported it.
|
|
1167
|
+
*/
|
|
1168
|
+
construct: unknown;
|
|
1169
|
+
}
|
|
1170
|
+
/**
|
|
1171
|
+
* Build the construct manifest for a project.
|
|
1172
|
+
*
|
|
1173
|
+
* Runs the manifest's own validation before returning, so an app is wrong here
|
|
1174
|
+
* — where the error names a file — rather than at deploy.
|
|
1175
|
+
*
|
|
1176
|
+
* @throws {DuplicateConstruct} when two exports claim one id.
|
|
1177
|
+
*/
|
|
1178
|
+
declare function discover(options: DiscoverOptions): Promise<ConstructManifest>;
|
|
1179
|
+
//#endregion
|
|
1180
|
+
//#region src/target/types.d.ts
|
|
1181
|
+
/**
|
|
1182
|
+
* Which family of defaults a target's deploys belong to.
|
|
1183
|
+
*
|
|
1184
|
+
* - `server`: the target runs containers the project controls, so a cache can
|
|
1185
|
+
* live in the database and events go through pg-boss.
|
|
1186
|
+
* - `aws`: the target runs on managed AWS services, so the defaults are
|
|
1187
|
+
* Upstash, S3 and SNS/SQS.
|
|
1188
|
+
*
|
|
1189
|
+
* `gkm dev` and `gkm build` choose backends by it, which is why a target from
|
|
1190
|
+
* a package declares it in its `package.json` too: they read it without
|
|
1191
|
+
* importing the target.
|
|
1192
|
+
*/
|
|
1193
|
+
type DeployRuntime = 'server' | 'aws';
|
|
1194
|
+
/** What a target can do, beyond the phases every target has. */
|
|
1195
|
+
interface DeployTargetCapabilities {
|
|
1196
|
+
/**
|
|
1197
|
+
* Whether `rollback` restores the previous release. When it does, a failed
|
|
1198
|
+
* `release` or `verify` is rolled back before the deploy reports failure.
|
|
1199
|
+
*/
|
|
1200
|
+
rollback: boolean;
|
|
1201
|
+
/**
|
|
1202
|
+
* Who applies database migrations: the target, as part of `release`, or
|
|
1203
|
+
* the app itself when it starts.
|
|
1204
|
+
*/
|
|
1205
|
+
migrations: 'target' | 'app';
|
|
1206
|
+
/**
|
|
1207
|
+
* Whether the target builds container images — and so needs Docker where
|
|
1208
|
+
* the deploy runs, and a registry to push to.
|
|
1209
|
+
*/
|
|
1210
|
+
images: boolean;
|
|
1211
|
+
/**
|
|
1212
|
+
* Whether it can also run the project's local stage — `gkm deploy --stage
|
|
1213
|
+
* <local>`. Only a target that runs on this machine can: a stack started
|
|
1214
|
+
* here is the local stage's, while one on a server is shared, and the local
|
|
1215
|
+
* stage's secrets are a developer's. Absent, a deploy refuses the local
|
|
1216
|
+
* stage with `UndeclaredStage`.
|
|
1217
|
+
*/
|
|
1218
|
+
localStage?: boolean;
|
|
1219
|
+
/**
|
|
1220
|
+
* Whether it runs telemetry's self-hosted provider — OpenObserve beside
|
|
1221
|
+
* the apps — for a stage whose `deploy.telemetry` asks for it, or names
|
|
1222
|
+
* nothing. Absent, a stage that uses a `Telemetry` construct names a
|
|
1223
|
+
* provider of its own (`otlp`) or opts out with `false`.
|
|
1224
|
+
*/
|
|
1225
|
+
selfHostedTelemetry?: boolean;
|
|
1226
|
+
}
|
|
1227
|
+
/** A failed validation of a target's options, issue by issue. */
|
|
1228
|
+
interface TargetOptionsIssue {
|
|
1229
|
+
readonly message: string;
|
|
1230
|
+
readonly path?: ReadonlyArray<PropertyKey | {
|
|
1231
|
+
readonly key: PropertyKey;
|
|
1232
|
+
}>;
|
|
1233
|
+
}
|
|
1234
|
+
type TargetOptionsResult<Output> = {
|
|
1235
|
+
readonly value: Output;
|
|
1236
|
+
readonly issues?: undefined;
|
|
1237
|
+
} | {
|
|
1238
|
+
readonly issues: ReadonlyArray<TargetOptionsIssue>;
|
|
1239
|
+
};
|
|
1240
|
+
/**
|
|
1241
|
+
* The schema a target's options are validated with: any Standard Schema —
|
|
1242
|
+
* a Zod, Valibot or ArkType schema is one.
|
|
1243
|
+
*
|
|
1244
|
+
* The interface is the Standard Schema spec's own, copied as the spec asks,
|
|
1245
|
+
* so a target's types do not depend on a package the CLI does not ship.
|
|
1246
|
+
*/
|
|
1247
|
+
interface TargetOptionsSchema<Output = unknown> {
|
|
1248
|
+
readonly '~standard': {
|
|
1249
|
+
readonly version: 1;
|
|
1250
|
+
readonly vendor: string;
|
|
1251
|
+
readonly validate: (value: unknown) => TargetOptionsResult<Output> | Promise<TargetOptionsResult<Output>>;
|
|
1252
|
+
readonly types?: {
|
|
1253
|
+
readonly input: unknown;
|
|
1254
|
+
readonly output: Output;
|
|
1255
|
+
} | undefined;
|
|
1256
|
+
};
|
|
1257
|
+
}
|
|
1258
|
+
/**
|
|
1259
|
+
* The stage's secrets, as a target reads and writes them.
|
|
1260
|
+
*
|
|
1261
|
+
* Every secret value read through here is masked: a progress line that
|
|
1262
|
+
* would print one prints `***` instead, in the terminal and in the events.
|
|
1263
|
+
*/
|
|
1264
|
+
interface DeploySecrets {
|
|
1265
|
+
/** Which kind of store holds them — `'file'`, `'s3'`, `'ssm'`, `'secrets-manager'`, or
|
|
1266
|
+
* a custom one's. */
|
|
1267
|
+
readonly store: string;
|
|
1268
|
+
/** The stage's secrets, or null when it has none yet. */
|
|
1269
|
+
read(): Promise<StageSecrets | null>;
|
|
1270
|
+
/** Replace the stage's secrets. */
|
|
1271
|
+
write(secrets: StageSecrets): Promise<void>;
|
|
1272
|
+
/** Mask `value` in everything this run prints or emits from now on. */
|
|
1273
|
+
mask(value: string): void;
|
|
1274
|
+
}
|
|
1275
|
+
/** Where a target's progress lines go: `log` events of the run. */
|
|
1276
|
+
interface DeployTargetLogger {
|
|
1277
|
+
info(message: string): void;
|
|
1278
|
+
warn(message: string): void;
|
|
1279
|
+
error(message: string): void;
|
|
1280
|
+
}
|
|
1281
|
+
/**
|
|
1282
|
+
* The events a target reports. The run's own — `deploy.*` and `phase.*` —
|
|
1283
|
+
* are the CLI's, which emits them around each phase it calls.
|
|
1284
|
+
*/
|
|
1285
|
+
type TargetEvent = Exclude<DeployEvent, {
|
|
1286
|
+
type: 'deploy.started' | 'deploy.finished' | 'deploy.failed' | 'phase.started' | 'phase.finished' | 'phase.failed';
|
|
1287
|
+
}>;
|
|
1288
|
+
/** Everything a phase is handed. The same object for every phase of a run. */
|
|
1289
|
+
interface DeployPhaseContext<Options = undefined> {
|
|
1290
|
+
/** The name the target was resolved by — `deploy.default`, `--target`. */
|
|
1291
|
+
readonly target: string;
|
|
1292
|
+
/**
|
|
1293
|
+
* The workspace root. Never `process.cwd()`: a host deploys projects
|
|
1294
|
+
* that are not where it runs.
|
|
1295
|
+
*/
|
|
1296
|
+
readonly cwd: string;
|
|
1297
|
+
readonly stage: string;
|
|
1298
|
+
/** The image tag, or whatever version label the target releases under. */
|
|
1299
|
+
readonly tag: string;
|
|
1300
|
+
/**
|
|
1301
|
+
* Whether `tag` was asked for (`--tag`) rather than made up for this run
|
|
1302
|
+
* — by the target's own `tag()`, else `<stage>-<timestamp>`. A target that
|
|
1303
|
+
* releases what CI already pushed when given one tells the two apart here.
|
|
1304
|
+
*/
|
|
1305
|
+
readonly tagGiven: boolean;
|
|
1306
|
+
/**
|
|
1307
|
+
* The apps this target deploys, in dependency order: those asked for that
|
|
1308
|
+
* deploy here. Apps that deploy elsewhere are already in `skipped`.
|
|
1309
|
+
*/
|
|
1310
|
+
readonly apps: readonly string[];
|
|
1311
|
+
/** The apps the run leaves out, and why. */
|
|
1312
|
+
readonly skipped: readonly {
|
|
1313
|
+
app: string;
|
|
1314
|
+
reason: string;
|
|
1315
|
+
}[];
|
|
1316
|
+
/** Who the deploy is, for naming and claiming what it creates. */
|
|
1317
|
+
readonly identity: DeployIdentity;
|
|
1318
|
+
/** The workspace, with its apps derived from the manifest. */
|
|
1319
|
+
readonly workspace: NormalizedWorkspace;
|
|
1320
|
+
/** What the workspace declares. */
|
|
1321
|
+
readonly manifest: ConstructManifest;
|
|
1322
|
+
/**
|
|
1323
|
+
* Each owner's runnables' edges, from the same discovery — what a process
|
|
1324
|
+
* that runs them reads, beyond what its own declaration lists.
|
|
1325
|
+
*/
|
|
1326
|
+
readonly runnables?: Readonly<Record<string, readonly string[]>>;
|
|
1327
|
+
/**
|
|
1328
|
+
* Where each Worker's crons, queues and subscribers are declared, from the
|
|
1329
|
+
* same discovery: which workers have work to run, and which app each is
|
|
1330
|
+
* built from (`workerUnits`).
|
|
1331
|
+
*/
|
|
1332
|
+
readonly background?: Readonly<Record<string, readonly string[]>>;
|
|
1333
|
+
/**
|
|
1334
|
+
* Each Worker's subscribers, from the same discovery — by export, and the
|
|
1335
|
+
* key its deliveries come from: which of them SNS pushes to.
|
|
1336
|
+
*/
|
|
1337
|
+
readonly subscribers?: Readonly<Record<string, readonly BoundSubscriber[]>>;
|
|
1338
|
+
/** The target's options, as its `options` schema parsed them. */
|
|
1339
|
+
readonly options: Options;
|
|
1340
|
+
/**
|
|
1341
|
+
* Look everything up and report what would happen — as `resource.planned`
|
|
1342
|
+
* events — without changing anything. Only `validate` and `plan` run.
|
|
1343
|
+
*/
|
|
1344
|
+
readonly dryRun: boolean;
|
|
1345
|
+
/**
|
|
1346
|
+
* When `release` or `verify` fails, roll back every app the run released
|
|
1347
|
+
* rather than only those that failed — for apps that must move together,
|
|
1348
|
+
* an API and the site built against it. Only a target that can roll back
|
|
1349
|
+
* reads it.
|
|
1350
|
+
*/
|
|
1351
|
+
readonly atomic: boolean;
|
|
1352
|
+
/**
|
|
1353
|
+
* `--allow-dev-services`: a deployed stage runs the dev service for every
|
|
1354
|
+
* bucket and mail it does not account for — no key in its secrets, no
|
|
1355
|
+
* provider backing the kind. Off by default: a deployed stage's mail and
|
|
1356
|
+
* buckets come from its secrets or its providers, and a server target
|
|
1357
|
+
* refuses one that lacks them. The local stage ignores it — it always
|
|
1358
|
+
* runs both.
|
|
1359
|
+
*/
|
|
1360
|
+
readonly allowDevServices: boolean;
|
|
1361
|
+
/**
|
|
1362
|
+
* `--skip-dns`: a server target neither writes its public hosts' DNS
|
|
1363
|
+
* records nor checks that they point at the stage's server — for a CDN or
|
|
1364
|
+
* proxy in front of it, or records written by another step.
|
|
1365
|
+
*/
|
|
1366
|
+
readonly skipDns?: boolean;
|
|
1367
|
+
/** Where every credential comes from. Nothing prompts. */
|
|
1368
|
+
readonly credentials: CredentialProvider;
|
|
1369
|
+
/**
|
|
1370
|
+
* The stage's deploy state. A real run holds the stage's lock for every
|
|
1371
|
+
* phase; a dry run holds none and must write nothing.
|
|
1372
|
+
*/
|
|
1373
|
+
readonly state: StateStore;
|
|
1374
|
+
readonly secrets: DeploySecrets;
|
|
1375
|
+
readonly logger: DeployTargetLogger;
|
|
1376
|
+
/** Fires when the run is stopped; every phase stops what it is doing. */
|
|
1377
|
+
readonly signal: AbortSignal;
|
|
1378
|
+
/**
|
|
1379
|
+
* Where the output of what a phase spawns goes: the host's terminal, its
|
|
1380
|
+
* stderr (so stdout carries only events), or nowhere.
|
|
1381
|
+
*/
|
|
1382
|
+
readonly childOutput: 'inherit' | 'stderr' | 'ignore';
|
|
1383
|
+
/** Report progress. */
|
|
1384
|
+
emit(event: TargetEvent): void;
|
|
1385
|
+
/** Leave an app out of this run, with the reason a person will read. */
|
|
1386
|
+
skip(app: string, reason: string): void;
|
|
1387
|
+
/**
|
|
1388
|
+
* What a resource is called on the target: scoped by the stage and the
|
|
1389
|
+
* identity exactly as the constructs are — `name('api')` is
|
|
1390
|
+
* `production-shop-api`. Two workspaces, or two stages, never share one.
|
|
1391
|
+
*/
|
|
1392
|
+
name(resource: string): string;
|
|
1393
|
+
}
|
|
1394
|
+
/** Why `rollback` was called: the phase that failed, and its error. */
|
|
1395
|
+
interface DeployFailure {
|
|
1396
|
+
readonly phase: 'release' | 'verify';
|
|
1397
|
+
readonly error: unknown;
|
|
1398
|
+
}
|
|
1399
|
+
/**
|
|
1400
|
+
* A deploy target.
|
|
1401
|
+
*
|
|
1402
|
+
* The CLI calls the phases in order — `validate`, then `plan` for a dry run,
|
|
1403
|
+
* or `provision → build → release → verify` for a real one — emitting
|
|
1404
|
+
* `phase.started`/`phase.finished` around each. Every phase must be safe to
|
|
1405
|
+
* run again: a deploy stopped part way is finished by deploying again, so a
|
|
1406
|
+
* phase finds what an earlier run made (through `state`) before making it.
|
|
1407
|
+
*
|
|
1408
|
+
* `Run` is whatever the target carries from one phase to the next within a
|
|
1409
|
+
* run — `validate` makes it, every later phase is handed it.
|
|
1410
|
+
*
|
|
1411
|
+
* ```ts
|
|
1412
|
+
* import { defineTarget } from '@geekmidas/cli/target';
|
|
1413
|
+
* import { z } from 'zod';
|
|
1414
|
+
*
|
|
1415
|
+
* export default defineTarget({
|
|
1416
|
+
* name: 'fly',
|
|
1417
|
+
* runtime: 'server',
|
|
1418
|
+
* capabilities: { rollback: true, migrations: 'target', images: true },
|
|
1419
|
+
* options: z.object({ org: z.string(), region: z.string().default('ams') }),
|
|
1420
|
+
* async validate(ctx) {
|
|
1421
|
+
* return { org: ctx.options.org, region: ctx.options.region };
|
|
1422
|
+
* },
|
|
1423
|
+
* async plan(ctx, run) { … },
|
|
1424
|
+
* async release(ctx, run) { … },
|
|
1425
|
+
* async rollback(ctx, run, failure) { … },
|
|
1426
|
+
* result(ctx, run) { … },
|
|
1427
|
+
* });
|
|
1428
|
+
* ```
|
|
1429
|
+
*/
|
|
1430
|
+
interface DeployTarget<Options = undefined, Run = unknown> {
|
|
1431
|
+
/** The target's own name, for messages. Config refers to it by its key. */
|
|
1432
|
+
readonly name: string;
|
|
1433
|
+
readonly runtime: DeployRuntime;
|
|
1434
|
+
readonly capabilities: DeployTargetCapabilities;
|
|
1435
|
+
/**
|
|
1436
|
+
* What `deploy.targets` may pass it — `[package, options]` — validated
|
|
1437
|
+
* before any phase runs. Without one, the target takes no options.
|
|
1438
|
+
*/
|
|
1439
|
+
readonly options?: TargetOptionsSchema<Options>;
|
|
1440
|
+
/**
|
|
1441
|
+
* The kinds of credential it asks the run's `CredentialProvider` for, so a
|
|
1442
|
+
* host or `gkm login` can collect them up front.
|
|
105
1443
|
*/
|
|
106
|
-
|
|
1444
|
+
readonly credentials?: readonly CredentialKind[];
|
|
107
1445
|
/**
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
* @param state - The state object to persist
|
|
1446
|
+
* The tag a run releases under when none is asked for. Without one it is
|
|
1447
|
+
* `<stage>-<timestamp>`; a target that builds from the checkout can name
|
|
1448
|
+
* its images after the commit instead.
|
|
112
1449
|
*/
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
1450
|
+
tag?(where: {
|
|
1451
|
+
readonly cwd: string;
|
|
1452
|
+
readonly stage: string;
|
|
1453
|
+
}): Promise<string>;
|
|
1454
|
+
/**
|
|
1455
|
+
* What the run is — the apps, the images, what each runs with — checked
|
|
1456
|
+
* before anything changes. A build-only run calls it too, so it checks
|
|
1457
|
+
* what building needs; what only a deploy needs is `ready`'s.
|
|
1458
|
+
*/
|
|
1459
|
+
validate(ctx: DeployPhaseContext<Options>): Promise<Run>;
|
|
1460
|
+
/**
|
|
1461
|
+
* What only this target checks before a deploy changes anything — compose's
|
|
1462
|
+
* server address and its hosts' DNS. Run after `validate` and the stage's
|
|
1463
|
+
* own readiness check (every key it needs, after its providers wrote
|
|
1464
|
+
* theirs), on a deploy and its dry run. A build-only run never calls it:
|
|
1465
|
+
* an image needs none of it.
|
|
1466
|
+
*/
|
|
1467
|
+
ready?(ctx: DeployPhaseContext<Options>, run: Run): Promise<void>;
|
|
1468
|
+
/** A dry run: emit `resource.planned` for what a real run would do. */
|
|
1469
|
+
plan(ctx: DeployPhaseContext<Options>, run: Run): Promise<void>;
|
|
1470
|
+
/** Create or find what the apps run on, and what they declare. */
|
|
1471
|
+
provision?(ctx: DeployPhaseContext<Options>, run: Run): Promise<void>;
|
|
1472
|
+
/** Build each app's artifact (`artifact.built`), changing nothing live. */
|
|
1473
|
+
build?(ctx: DeployPhaseContext<Options>, run: Run): Promise<void>;
|
|
1474
|
+
/** Put the built artifacts live (`app.deployed`). */
|
|
1475
|
+
release(ctx: DeployPhaseContext<Options>, run: Run): Promise<void>;
|
|
1476
|
+
/** Check what was released answers (`health.checked`). */
|
|
1477
|
+
verify?(ctx: DeployPhaseContext<Options>, run: Run): Promise<void>;
|
|
1478
|
+
/**
|
|
1479
|
+
* Restore the previous release, after `release` or `verify` failed. Called
|
|
1480
|
+
* only when `capabilities.rollback` is true.
|
|
1481
|
+
*/
|
|
1482
|
+
rollback?(ctx: DeployPhaseContext<Options>, run: Run, failure: DeployFailure): Promise<void>;
|
|
1483
|
+
/** What the run did, once its last phase has finished. */
|
|
1484
|
+
result(ctx: DeployPhaseContext<Options>, run: Run): DeployResult | Promise<DeployResult>;
|
|
134
1485
|
}
|
|
135
1486
|
/**
|
|
136
|
-
*
|
|
1487
|
+
* A target of any options and run state — what the CLI holds once a target
|
|
1488
|
+
* is resolved, its types left behind in the config that named it. The phases
|
|
1489
|
+
* are methods, so their parameters are compared bivariantly and every
|
|
1490
|
+
* `DeployTarget<O, R>` is one.
|
|
137
1491
|
*/
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
1492
|
+
type AnyDeployTarget = DeployTarget<unknown, unknown>;
|
|
1493
|
+
/** A target's options type, from the target. */
|
|
1494
|
+
type TargetOptions<T> = T extends DeployTarget<infer O, infer _Run> ? O : never;
|
|
142
1495
|
/**
|
|
143
|
-
*
|
|
1496
|
+
* One `deploy.targets` entry:
|
|
1497
|
+
*
|
|
1498
|
+
* - `'@acme/gkm-target'` — a package, its default export the target
|
|
1499
|
+
* - a target object, from `defineTarget` or a package's factory
|
|
1500
|
+
* - `['@acme/gkm-target', { region: 'ams' }]` — either, with options
|
|
144
1501
|
*/
|
|
145
|
-
type
|
|
1502
|
+
type DeployTargetEntry = string | AnyDeployTarget | readonly [string | AnyDeployTarget, unknown];
|
|
146
1503
|
declare namespace json_schema_d_exports {
|
|
147
1504
|
export { ArraySchema, BaseSchema, BooleanSchema, IntegerSchema, JSONSchema, NullSchema, NumberSchema, ObjectSchema, Schema$1 as Schema, SchemaType, StringSchema, _JSONSchema };
|
|
148
1505
|
}
|
|
@@ -4421,10 +5778,10 @@ declare namespace external_d_exports {
|
|
|
4421
5778
|
* Backend framework schema for non-gkm apps.
|
|
4422
5779
|
*/
|
|
4423
5780
|
declare const BackendFrameworkSchema: ZodEnum<{
|
|
4424
|
-
hono: "hono";
|
|
4425
5781
|
"better-auth": "better-auth";
|
|
4426
5782
|
express: "express";
|
|
4427
5783
|
fastify: "fastify";
|
|
5784
|
+
hono: "hono";
|
|
4428
5785
|
}>;
|
|
4429
5786
|
/**
|
|
4430
5787
|
* Backend framework types for apps that don't use gkm routes.
|
|
@@ -4456,8 +5813,8 @@ type BackendFramework = output$1<typeof BackendFrameworkSchema>;
|
|
|
4456
5813
|
declare const FrontendFrameworkSchema: ZodEnum<{
|
|
4457
5814
|
nextjs: "nextjs";
|
|
4458
5815
|
remix: "remix";
|
|
4459
|
-
vite: "vite";
|
|
4460
5816
|
"tanstack-start": "tanstack-start";
|
|
5817
|
+
vite: "vite";
|
|
4461
5818
|
}>;
|
|
4462
5819
|
/**
|
|
4463
5820
|
* Frontend framework types. Derived from {@link FrontendFrameworkSchema}.
|
|
@@ -4516,15 +5873,15 @@ type MobileFramework = output$1<typeof MobileFrameworkSchema>;
|
|
|
4516
5873
|
* Combined framework schema (backend, frontend, or mobile).
|
|
4517
5874
|
*/
|
|
4518
5875
|
declare const FrameworkSchema: ZodUnion<readonly [ZodEnum<{
|
|
4519
|
-
hono: "hono";
|
|
4520
5876
|
"better-auth": "better-auth";
|
|
4521
5877
|
express: "express";
|
|
4522
5878
|
fastify: "fastify";
|
|
5879
|
+
hono: "hono";
|
|
4523
5880
|
}>, ZodEnum<{
|
|
4524
5881
|
nextjs: "nextjs";
|
|
4525
5882
|
remix: "remix";
|
|
4526
|
-
vite: "vite";
|
|
4527
5883
|
"tanstack-start": "tanstack-start";
|
|
5884
|
+
vite: "vite";
|
|
4528
5885
|
}>, ZodEnum<{
|
|
4529
5886
|
expo: "expo";
|
|
4530
5887
|
}>]>;
|
|
@@ -4534,17 +5891,18 @@ declare const FrameworkSchema: ZodUnion<readonly [ZodEnum<{
|
|
|
4534
5891
|
*/
|
|
4535
5892
|
type Framework = output$1<typeof FrameworkSchema>;
|
|
4536
5893
|
/**
|
|
4537
|
-
*
|
|
5894
|
+
* The built-in targets a config may name, both deployed by `gkm deploy`:
|
|
5895
|
+
* `dokploy`, and `sst`, which runs `sst deploy` on the manifest `gkm build`
|
|
5896
|
+
* writes.
|
|
4538
5897
|
*/
|
|
4539
|
-
declare const SUPPORTED_DEPLOY_TARGETS:
|
|
5898
|
+
declare const SUPPORTED_DEPLOY_TARGETS: string[];
|
|
5899
|
+
/** Built-in names reserved for targets that do not exist yet. */
|
|
5900
|
+
declare const PHASE_2_DEPLOY_TARGETS: string[];
|
|
4540
5901
|
/**
|
|
4541
|
-
*
|
|
5902
|
+
* Whether a config may name `target`: a usable built-in, or one of its own
|
|
5903
|
+
* `deploy.targets`.
|
|
4542
5904
|
*/
|
|
4543
|
-
declare
|
|
4544
|
-
/**
|
|
4545
|
-
* Check if a deploy target is supported.
|
|
4546
|
-
*/
|
|
4547
|
-
declare function isDeployTargetSupported(target: string): boolean;
|
|
5905
|
+
declare function isDeployTargetSupported(target: string, targets?: Record<string, unknown>): boolean;
|
|
4548
5906
|
/**
|
|
4549
5907
|
* Check if a deploy target is planned for Phase 2.
|
|
4550
5908
|
*/
|
|
@@ -4554,107 +5912,73 @@ declare function isPhase2DeployTarget(target: string): boolean;
|
|
|
4554
5912
|
*/
|
|
4555
5913
|
declare function getDeployTargetError(target: string, appName?: string): string;
|
|
4556
5914
|
/**
|
|
4557
|
-
*
|
|
5915
|
+
* Single DNS provider config (for one domain).
|
|
4558
5916
|
*/
|
|
4559
|
-
declare const
|
|
5917
|
+
declare const DnsProviderSchema: ZodUnion<readonly [ZodDiscriminatedUnion<[ZodObject<{
|
|
4560
5918
|
provider: ZodLiteral<"hostinger">;
|
|
5919
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
5920
|
+
mode: ZodLiteral<"cname">;
|
|
5921
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
5922
|
+
}, $strict>]>>;
|
|
4561
5923
|
ttl: ZodOptional<ZodNumber>;
|
|
4562
5924
|
}, $strip>, ZodObject<{
|
|
4563
5925
|
provider: ZodLiteral<"route53">;
|
|
5926
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
5927
|
+
mode: ZodLiteral<"cname">;
|
|
5928
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
5929
|
+
}, $strict>]>>;
|
|
4564
5930
|
region: ZodOptional<ZodEnum<{
|
|
4565
|
-
"us-east-1": "us-east-1";
|
|
4566
|
-
"us-east-2": "us-east-2";
|
|
4567
|
-
"us-west-1": "us-west-1";
|
|
4568
|
-
"us-west-2": "us-west-2";
|
|
4569
5931
|
"af-south-1": "af-south-1";
|
|
4570
5932
|
"ap-east-1": "ap-east-1";
|
|
5933
|
+
"ap-northeast-1": "ap-northeast-1";
|
|
5934
|
+
"ap-northeast-2": "ap-northeast-2";
|
|
5935
|
+
"ap-northeast-3": "ap-northeast-3";
|
|
4571
5936
|
"ap-south-1": "ap-south-1";
|
|
4572
5937
|
"ap-south-2": "ap-south-2";
|
|
4573
5938
|
"ap-southeast-1": "ap-southeast-1";
|
|
4574
5939
|
"ap-southeast-2": "ap-southeast-2";
|
|
4575
5940
|
"ap-southeast-3": "ap-southeast-3";
|
|
4576
5941
|
"ap-southeast-4": "ap-southeast-4";
|
|
4577
|
-
"ap-northeast-1": "ap-northeast-1";
|
|
4578
|
-
"ap-northeast-2": "ap-northeast-2";
|
|
4579
|
-
"ap-northeast-3": "ap-northeast-3";
|
|
4580
5942
|
"ca-central-1": "ca-central-1";
|
|
4581
5943
|
"eu-central-1": "eu-central-1";
|
|
4582
5944
|
"eu-central-2": "eu-central-2";
|
|
5945
|
+
"eu-north-1": "eu-north-1";
|
|
5946
|
+
"eu-south-1": "eu-south-1";
|
|
5947
|
+
"eu-south-2": "eu-south-2";
|
|
4583
5948
|
"eu-west-1": "eu-west-1";
|
|
4584
5949
|
"eu-west-2": "eu-west-2";
|
|
4585
5950
|
"eu-west-3": "eu-west-3";
|
|
4586
|
-
"eu-south-1": "eu-south-1";
|
|
4587
|
-
"eu-south-2": "eu-south-2";
|
|
4588
|
-
"eu-north-1": "eu-north-1";
|
|
4589
|
-
"me-south-1": "me-south-1";
|
|
4590
5951
|
"me-central-1": "me-central-1";
|
|
5952
|
+
"me-south-1": "me-south-1";
|
|
4591
5953
|
"sa-east-1": "sa-east-1";
|
|
4592
|
-
}>>;
|
|
4593
|
-
profile: ZodOptional<ZodString>;
|
|
4594
|
-
hostedZoneId: ZodOptional<ZodString>;
|
|
4595
|
-
ttl: ZodOptional<ZodNumber>;
|
|
4596
|
-
}, $strip>, ZodObject<{
|
|
4597
|
-
provider: ZodLiteral<"cloudflare">;
|
|
4598
|
-
ttl: ZodOptional<ZodNumber>;
|
|
4599
|
-
}, $strip>, ZodObject<{
|
|
4600
|
-
provider: ZodLiteral<"manual">;
|
|
4601
|
-
}, $strip>], "provider">, ZodObject<{
|
|
4602
|
-
provider: ZodCustom<{
|
|
4603
|
-
name: string;
|
|
4604
|
-
getRecords: Function;
|
|
4605
|
-
upsertRecords: Function;
|
|
4606
|
-
}, {
|
|
4607
|
-
name: string;
|
|
4608
|
-
getRecords: Function;
|
|
4609
|
-
upsertRecords: Function;
|
|
4610
|
-
}>;
|
|
4611
|
-
ttl: ZodOptional<ZodNumber>;
|
|
4612
|
-
}, $strip>]>>, ZodUnion<readonly [ZodDiscriminatedUnion<[ZodObject<{
|
|
4613
|
-
provider: ZodLiteral<"hostinger">;
|
|
4614
|
-
ttl: ZodOptional<ZodNumber>;
|
|
4615
|
-
domain: ZodString;
|
|
4616
|
-
}, $strip>, ZodObject<{
|
|
4617
|
-
provider: ZodLiteral<"route53">;
|
|
4618
|
-
region: ZodOptional<ZodEnum<{
|
|
4619
5954
|
"us-east-1": "us-east-1";
|
|
4620
5955
|
"us-east-2": "us-east-2";
|
|
4621
5956
|
"us-west-1": "us-west-1";
|
|
4622
5957
|
"us-west-2": "us-west-2";
|
|
4623
|
-
"af-south-1": "af-south-1";
|
|
4624
|
-
"ap-east-1": "ap-east-1";
|
|
4625
|
-
"ap-south-1": "ap-south-1";
|
|
4626
|
-
"ap-south-2": "ap-south-2";
|
|
4627
|
-
"ap-southeast-1": "ap-southeast-1";
|
|
4628
|
-
"ap-southeast-2": "ap-southeast-2";
|
|
4629
|
-
"ap-southeast-3": "ap-southeast-3";
|
|
4630
|
-
"ap-southeast-4": "ap-southeast-4";
|
|
4631
|
-
"ap-northeast-1": "ap-northeast-1";
|
|
4632
|
-
"ap-northeast-2": "ap-northeast-2";
|
|
4633
|
-
"ap-northeast-3": "ap-northeast-3";
|
|
4634
|
-
"ca-central-1": "ca-central-1";
|
|
4635
|
-
"eu-central-1": "eu-central-1";
|
|
4636
|
-
"eu-central-2": "eu-central-2";
|
|
4637
|
-
"eu-west-1": "eu-west-1";
|
|
4638
|
-
"eu-west-2": "eu-west-2";
|
|
4639
|
-
"eu-west-3": "eu-west-3";
|
|
4640
|
-
"eu-south-1": "eu-south-1";
|
|
4641
|
-
"eu-south-2": "eu-south-2";
|
|
4642
|
-
"eu-north-1": "eu-north-1";
|
|
4643
|
-
"me-south-1": "me-south-1";
|
|
4644
|
-
"me-central-1": "me-central-1";
|
|
4645
|
-
"sa-east-1": "sa-east-1";
|
|
4646
5958
|
}>>;
|
|
4647
5959
|
profile: ZodOptional<ZodString>;
|
|
4648
5960
|
hostedZoneId: ZodOptional<ZodString>;
|
|
4649
5961
|
ttl: ZodOptional<ZodNumber>;
|
|
4650
|
-
|
|
5962
|
+
}, $strip>, ZodObject<{
|
|
5963
|
+
provider: ZodLiteral<"godaddy">;
|
|
5964
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
5965
|
+
mode: ZodLiteral<"cname">;
|
|
5966
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
5967
|
+
}, $strict>]>>;
|
|
5968
|
+
ttl: ZodOptional<ZodNumber>;
|
|
4651
5969
|
}, $strip>, ZodObject<{
|
|
4652
5970
|
provider: ZodLiteral<"cloudflare">;
|
|
5971
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
5972
|
+
mode: ZodLiteral<"cname">;
|
|
5973
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
5974
|
+
}, $strict>]>>;
|
|
4653
5975
|
ttl: ZodOptional<ZodNumber>;
|
|
4654
|
-
domain: ZodString;
|
|
4655
5976
|
}, $strip>, ZodObject<{
|
|
4656
5977
|
provider: ZodLiteral<"manual">;
|
|
4657
|
-
|
|
5978
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
5979
|
+
mode: ZodLiteral<"cname">;
|
|
5980
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
5981
|
+
}, $strict>]>>;
|
|
4658
5982
|
}, $strip>], "provider">, ZodObject<{
|
|
4659
5983
|
provider: ZodCustom<{
|
|
4660
5984
|
name: string;
|
|
@@ -4665,103 +5989,78 @@ declare const DnsConfigWithLegacySchema: ZodUnion<readonly [ZodRecord<ZodString,
|
|
|
4665
5989
|
getRecords: Function;
|
|
4666
5990
|
upsertRecords: Function;
|
|
4667
5991
|
}>;
|
|
5992
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
5993
|
+
mode: ZodLiteral<"cname">;
|
|
5994
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
5995
|
+
}, $strict>]>>;
|
|
4668
5996
|
ttl: ZodOptional<ZodNumber>;
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
type DnsConfig = output$1<typeof DnsConfigWithLegacySchema>;
|
|
5997
|
+
}, $strip>]>;
|
|
5998
|
+
type DnsProvider = output$1<typeof DnsProviderSchema>;
|
|
4672
5999
|
/**
|
|
4673
6000
|
* Backups configuration schema.
|
|
4674
6001
|
*
|
|
4675
6002
|
* Configures automatic backup destinations for database services.
|
|
4676
6003
|
* On first deploy, creates S3 bucket with unique name and IAM credentials.
|
|
4677
6004
|
*/
|
|
4678
|
-
declare const
|
|
6005
|
+
declare const DokployBackupsConfigSchema: ZodObject<{
|
|
4679
6006
|
type: ZodLiteral<"s3">;
|
|
4680
6007
|
profile: ZodOptional<ZodString>;
|
|
4681
6008
|
region: ZodEnum<{
|
|
4682
|
-
"us-east-1": "us-east-1";
|
|
4683
|
-
"us-east-2": "us-east-2";
|
|
4684
|
-
"us-west-1": "us-west-1";
|
|
4685
|
-
"us-west-2": "us-west-2";
|
|
4686
6009
|
"af-south-1": "af-south-1";
|
|
4687
6010
|
"ap-east-1": "ap-east-1";
|
|
6011
|
+
"ap-northeast-1": "ap-northeast-1";
|
|
6012
|
+
"ap-northeast-2": "ap-northeast-2";
|
|
6013
|
+
"ap-northeast-3": "ap-northeast-3";
|
|
4688
6014
|
"ap-south-1": "ap-south-1";
|
|
4689
6015
|
"ap-south-2": "ap-south-2";
|
|
4690
6016
|
"ap-southeast-1": "ap-southeast-1";
|
|
4691
6017
|
"ap-southeast-2": "ap-southeast-2";
|
|
4692
6018
|
"ap-southeast-3": "ap-southeast-3";
|
|
4693
6019
|
"ap-southeast-4": "ap-southeast-4";
|
|
4694
|
-
"ap-northeast-1": "ap-northeast-1";
|
|
4695
|
-
"ap-northeast-2": "ap-northeast-2";
|
|
4696
|
-
"ap-northeast-3": "ap-northeast-3";
|
|
4697
6020
|
"ca-central-1": "ca-central-1";
|
|
4698
6021
|
"eu-central-1": "eu-central-1";
|
|
4699
6022
|
"eu-central-2": "eu-central-2";
|
|
6023
|
+
"eu-north-1": "eu-north-1";
|
|
6024
|
+
"eu-south-1": "eu-south-1";
|
|
6025
|
+
"eu-south-2": "eu-south-2";
|
|
4700
6026
|
"eu-west-1": "eu-west-1";
|
|
4701
6027
|
"eu-west-2": "eu-west-2";
|
|
4702
6028
|
"eu-west-3": "eu-west-3";
|
|
4703
|
-
"eu-south-1": "eu-south-1";
|
|
4704
|
-
"eu-south-2": "eu-south-2";
|
|
4705
|
-
"eu-north-1": "eu-north-1";
|
|
4706
|
-
"me-south-1": "me-south-1";
|
|
4707
6029
|
"me-central-1": "me-central-1";
|
|
6030
|
+
"me-south-1": "me-south-1";
|
|
4708
6031
|
"sa-east-1": "sa-east-1";
|
|
6032
|
+
"us-east-1": "us-east-1";
|
|
6033
|
+
"us-east-2": "us-east-2";
|
|
6034
|
+
"us-west-1": "us-west-1";
|
|
6035
|
+
"us-west-2": "us-west-2";
|
|
4709
6036
|
}>;
|
|
4710
6037
|
schedule: ZodOptional<ZodString>;
|
|
4711
6038
|
retention: ZodOptional<ZodNumber>;
|
|
4712
6039
|
}, $strip>;
|
|
4713
|
-
type
|
|
6040
|
+
type DokployBackupsConfig = output$1<typeof DokployBackupsConfigSchema>;
|
|
4714
6041
|
/**
|
|
4715
6042
|
* Workspace configuration schema.
|
|
4716
6043
|
*/
|
|
4717
6044
|
declare const WorkspaceConfigSchema: ZodObject<{
|
|
4718
6045
|
name: ZodOptional<ZodString>;
|
|
4719
|
-
constructs: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString
|
|
4720
|
-
paths: ZodUnion<readonly [ZodString, ZodArray<ZodString>]>;
|
|
4721
|
-
partition: ZodCustom<(filepath: string) => string, (filepath: string) => string>;
|
|
4722
|
-
}, $strip>]>>;
|
|
6046
|
+
constructs: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
|
|
4723
6047
|
apps: ZodOptional<ZodRecord<ZodString, ZodObject<{
|
|
4724
6048
|
type: ZodDefault<ZodOptional<ZodEnum<{
|
|
4725
6049
|
backend: "backend";
|
|
4726
|
-
web: "web";
|
|
4727
6050
|
mobile: "mobile";
|
|
6051
|
+
web: "web";
|
|
4728
6052
|
}>>>;
|
|
4729
6053
|
path: ZodString;
|
|
4730
6054
|
port: ZodNumber;
|
|
4731
6055
|
dependencies: ZodOptional<ZodArray<ZodString>>;
|
|
4732
|
-
deploy: ZodOptional<
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
}, $strip>]>>;
|
|
4741
|
-
routes: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>, ZodObject<{
|
|
4742
|
-
paths: ZodUnion<readonly [ZodString, ZodArray<ZodString>]>;
|
|
4743
|
-
partition: ZodCustom<(filepath: string) => string, (filepath: string) => string>;
|
|
4744
|
-
}, $strip>]>>;
|
|
4745
|
-
functions: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>, ZodObject<{
|
|
4746
|
-
paths: ZodUnion<readonly [ZodString, ZodArray<ZodString>]>;
|
|
4747
|
-
partition: ZodCustom<(filepath: string) => string, (filepath: string) => string>;
|
|
4748
|
-
}, $strip>]>>;
|
|
4749
|
-
crons: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>, ZodObject<{
|
|
4750
|
-
paths: ZodUnion<readonly [ZodString, ZodArray<ZodString>]>;
|
|
4751
|
-
partition: ZodCustom<(filepath: string) => string, (filepath: string) => string>;
|
|
4752
|
-
}, $strip>]>>;
|
|
4753
|
-
queues: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>, ZodObject<{
|
|
4754
|
-
paths: ZodUnion<readonly [ZodString, ZodArray<ZodString>]>;
|
|
4755
|
-
partition: ZodCustom<(filepath: string) => string, (filepath: string) => string>;
|
|
4756
|
-
}, $strip>]>>;
|
|
4757
|
-
topics: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>, ZodObject<{
|
|
4758
|
-
paths: ZodUnion<readonly [ZodString, ZodArray<ZodString>]>;
|
|
4759
|
-
partition: ZodCustom<(filepath: string) => string, (filepath: string) => string>;
|
|
4760
|
-
}, $strip>]>>;
|
|
4761
|
-
subscribers: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>, ZodObject<{
|
|
4762
|
-
paths: ZodUnion<readonly [ZodString, ZodArray<ZodString>]>;
|
|
4763
|
-
partition: ZodCustom<(filepath: string) => string, (filepath: string) => string>;
|
|
4764
|
-
}, $strip>]>>;
|
|
6056
|
+
deploy: ZodOptional<ZodString>;
|
|
6057
|
+
constructs: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
|
|
6058
|
+
routes: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
|
|
6059
|
+
functions: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
|
|
6060
|
+
crons: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
|
|
6061
|
+
queues: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
|
|
6062
|
+
topics: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
|
|
6063
|
+
subscribers: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
|
|
4765
6064
|
envParser: ZodOptional<ZodString>;
|
|
4766
6065
|
logger: ZodOptional<ZodString>;
|
|
4767
6066
|
hooks: ZodOptional<ZodObject<{
|
|
@@ -4776,11 +6075,6 @@ declare const WorkspaceConfigSchema: ZodObject<{
|
|
|
4776
6075
|
maxEntries: ZodOptional<ZodNumber>;
|
|
4777
6076
|
websocket: ZodOptional<ZodBoolean>;
|
|
4778
6077
|
}, $strip>]>>;
|
|
4779
|
-
studio: ZodOptional<ZodUnion<readonly [ZodString, ZodBoolean, ZodObject<{
|
|
4780
|
-
enabled: ZodOptional<ZodBoolean>;
|
|
4781
|
-
path: ZodOptional<ZodString>;
|
|
4782
|
-
schema: ZodOptional<ZodString>;
|
|
4783
|
-
}, $strip>]>>;
|
|
4784
6078
|
openapi: ZodOptional<ZodUnion<readonly [ZodBoolean, ZodObject<{
|
|
4785
6079
|
enabled: ZodOptional<ZodBoolean>;
|
|
4786
6080
|
title: ZodOptional<ZodString>;
|
|
@@ -4788,21 +6082,21 @@ declare const WorkspaceConfigSchema: ZodObject<{
|
|
|
4788
6082
|
description: ZodOptional<ZodString>;
|
|
4789
6083
|
}, $strip>]>>;
|
|
4790
6084
|
runtime: ZodOptional<ZodEnum<{
|
|
4791
|
-
node: "node";
|
|
4792
6085
|
bun: "bun";
|
|
6086
|
+
node: "node";
|
|
4793
6087
|
}>>;
|
|
4794
6088
|
env: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
|
|
4795
6089
|
entry: ZodOptional<ZodString>;
|
|
4796
6090
|
framework: ZodOptional<ZodUnion<readonly [ZodEnum<{
|
|
4797
|
-
hono: "hono";
|
|
4798
6091
|
"better-auth": "better-auth";
|
|
4799
6092
|
express: "express";
|
|
4800
6093
|
fastify: "fastify";
|
|
6094
|
+
hono: "hono";
|
|
4801
6095
|
}>, ZodEnum<{
|
|
4802
6096
|
nextjs: "nextjs";
|
|
4803
6097
|
remix: "remix";
|
|
4804
|
-
vite: "vite";
|
|
4805
6098
|
"tanstack-start": "tanstack-start";
|
|
6099
|
+
vite: "vite";
|
|
4806
6100
|
}>, ZodEnum<{
|
|
4807
6101
|
expo: "expo";
|
|
4808
6102
|
}>]>>;
|
|
@@ -4820,178 +6114,293 @@ declare const WorkspaceConfigSchema: ZodObject<{
|
|
|
4820
6114
|
}>>;
|
|
4821
6115
|
}, $strip>>;
|
|
4822
6116
|
}, $strip>>;
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
6117
|
+
domains: ZodOptional<ZodRecord<ZodString, ZodString>>;
|
|
6118
|
+
dns: ZodOptional<ZodRecord<ZodString, ZodUnion<readonly [ZodDiscriminatedUnion<[ZodObject<{
|
|
6119
|
+
provider: ZodLiteral<"hostinger">;
|
|
6120
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
6121
|
+
mode: ZodLiteral<"cname">;
|
|
6122
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
6123
|
+
}, $strict>]>>;
|
|
6124
|
+
ttl: ZodOptional<ZodNumber>;
|
|
6125
|
+
}, $strip>, ZodObject<{
|
|
6126
|
+
provider: ZodLiteral<"route53">;
|
|
6127
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
6128
|
+
mode: ZodLiteral<"cname">;
|
|
6129
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
6130
|
+
}, $strict>]>>;
|
|
6131
|
+
region: ZodOptional<ZodEnum<{
|
|
6132
|
+
"af-south-1": "af-south-1";
|
|
6133
|
+
"ap-east-1": "ap-east-1";
|
|
6134
|
+
"ap-northeast-1": "ap-northeast-1";
|
|
6135
|
+
"ap-northeast-2": "ap-northeast-2";
|
|
6136
|
+
"ap-northeast-3": "ap-northeast-3";
|
|
6137
|
+
"ap-south-1": "ap-south-1";
|
|
6138
|
+
"ap-south-2": "ap-south-2";
|
|
6139
|
+
"ap-southeast-1": "ap-southeast-1";
|
|
6140
|
+
"ap-southeast-2": "ap-southeast-2";
|
|
6141
|
+
"ap-southeast-3": "ap-southeast-3";
|
|
6142
|
+
"ap-southeast-4": "ap-southeast-4";
|
|
6143
|
+
"ca-central-1": "ca-central-1";
|
|
6144
|
+
"eu-central-1": "eu-central-1";
|
|
6145
|
+
"eu-central-2": "eu-central-2";
|
|
6146
|
+
"eu-north-1": "eu-north-1";
|
|
6147
|
+
"eu-south-1": "eu-south-1";
|
|
6148
|
+
"eu-south-2": "eu-south-2";
|
|
6149
|
+
"eu-west-1": "eu-west-1";
|
|
6150
|
+
"eu-west-2": "eu-west-2";
|
|
6151
|
+
"eu-west-3": "eu-west-3";
|
|
6152
|
+
"me-central-1": "me-central-1";
|
|
6153
|
+
"me-south-1": "me-south-1";
|
|
6154
|
+
"sa-east-1": "sa-east-1";
|
|
6155
|
+
"us-east-1": "us-east-1";
|
|
6156
|
+
"us-east-2": "us-east-2";
|
|
6157
|
+
"us-west-1": "us-west-1";
|
|
6158
|
+
"us-west-2": "us-west-2";
|
|
4828
6159
|
}>>;
|
|
6160
|
+
profile: ZodOptional<ZodString>;
|
|
6161
|
+
hostedZoneId: ZodOptional<ZodString>;
|
|
6162
|
+
ttl: ZodOptional<ZodNumber>;
|
|
6163
|
+
}, $strip>, ZodObject<{
|
|
6164
|
+
provider: ZodLiteral<"godaddy">;
|
|
6165
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
6166
|
+
mode: ZodLiteral<"cname">;
|
|
6167
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
6168
|
+
}, $strict>]>>;
|
|
6169
|
+
ttl: ZodOptional<ZodNumber>;
|
|
6170
|
+
}, $strip>, ZodObject<{
|
|
6171
|
+
provider: ZodLiteral<"cloudflare">;
|
|
6172
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
6173
|
+
mode: ZodLiteral<"cname">;
|
|
6174
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
6175
|
+
}, $strict>]>>;
|
|
6176
|
+
ttl: ZodOptional<ZodNumber>;
|
|
6177
|
+
}, $strip>, ZodObject<{
|
|
6178
|
+
provider: ZodLiteral<"manual">;
|
|
6179
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
6180
|
+
mode: ZodLiteral<"cname">;
|
|
6181
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
6182
|
+
}, $strict>]>>;
|
|
6183
|
+
}, $strip>], "provider">, ZodObject<{
|
|
6184
|
+
provider: ZodCustom<{
|
|
6185
|
+
name: string;
|
|
6186
|
+
getRecords: Function;
|
|
6187
|
+
upsertRecords: Function;
|
|
6188
|
+
}, {
|
|
6189
|
+
name: string;
|
|
6190
|
+
getRecords: Function;
|
|
6191
|
+
upsertRecords: Function;
|
|
6192
|
+
}>;
|
|
6193
|
+
records: ZodOptional<ZodUnion<readonly [ZodLiteral<"a">, ZodObject<{
|
|
6194
|
+
mode: ZodLiteral<"cname">;
|
|
6195
|
+
target: ZodUnion<readonly [ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
6196
|
+
}, $strict>]>>;
|
|
6197
|
+
ttl: ZodOptional<ZodNumber>;
|
|
6198
|
+
}, $strip>]>>>;
|
|
6199
|
+
deploy: ZodOptional<ZodObject<{
|
|
6200
|
+
default: ZodOptional<ZodString>;
|
|
6201
|
+
targets: ZodOptional<ZodRecord<ZodString, ZodUnion<readonly [ZodString, ZodCustom<unknown, unknown>, ZodTuple<[ZodUnion<readonly [ZodString, ZodCustom<unknown, unknown>]>, ZodUnknown], null>]>>>;
|
|
6202
|
+
namespace: ZodOptional<ZodString>;
|
|
6203
|
+
registry: ZodOptional<ZodString>;
|
|
4829
6204
|
dokploy: ZodOptional<ZodObject<{
|
|
4830
6205
|
endpoint: ZodOptional<ZodURL>;
|
|
4831
6206
|
endpoints: ZodOptional<ZodRecord<ZodString, ZodURL>>;
|
|
4832
|
-
registry: ZodOptional<ZodString>;
|
|
4833
6207
|
registryId: ZodOptional<ZodString>;
|
|
4834
|
-
|
|
6208
|
+
backups: ZodOptional<ZodLazy<ZodObject<{
|
|
6209
|
+
type: ZodLiteral<"s3">;
|
|
6210
|
+
profile: ZodOptional<ZodString>;
|
|
6211
|
+
region: ZodEnum<{
|
|
6212
|
+
"af-south-1": "af-south-1";
|
|
6213
|
+
"ap-east-1": "ap-east-1";
|
|
6214
|
+
"ap-northeast-1": "ap-northeast-1";
|
|
6215
|
+
"ap-northeast-2": "ap-northeast-2";
|
|
6216
|
+
"ap-northeast-3": "ap-northeast-3";
|
|
6217
|
+
"ap-south-1": "ap-south-1";
|
|
6218
|
+
"ap-south-2": "ap-south-2";
|
|
6219
|
+
"ap-southeast-1": "ap-southeast-1";
|
|
6220
|
+
"ap-southeast-2": "ap-southeast-2";
|
|
6221
|
+
"ap-southeast-3": "ap-southeast-3";
|
|
6222
|
+
"ap-southeast-4": "ap-southeast-4";
|
|
6223
|
+
"ca-central-1": "ca-central-1";
|
|
6224
|
+
"eu-central-1": "eu-central-1";
|
|
6225
|
+
"eu-central-2": "eu-central-2";
|
|
6226
|
+
"eu-north-1": "eu-north-1";
|
|
6227
|
+
"eu-south-1": "eu-south-1";
|
|
6228
|
+
"eu-south-2": "eu-south-2";
|
|
6229
|
+
"eu-west-1": "eu-west-1";
|
|
6230
|
+
"eu-west-2": "eu-west-2";
|
|
6231
|
+
"eu-west-3": "eu-west-3";
|
|
6232
|
+
"me-central-1": "me-central-1";
|
|
6233
|
+
"me-south-1": "me-south-1";
|
|
6234
|
+
"sa-east-1": "sa-east-1";
|
|
6235
|
+
"us-east-1": "us-east-1";
|
|
6236
|
+
"us-east-2": "us-east-2";
|
|
6237
|
+
"us-west-1": "us-west-1";
|
|
6238
|
+
"us-west-2": "us-west-2";
|
|
6239
|
+
}>;
|
|
6240
|
+
schedule: ZodOptional<ZodString>;
|
|
6241
|
+
retention: ZodOptional<ZodNumber>;
|
|
6242
|
+
}, $strip>>>;
|
|
6243
|
+
verify: ZodOptional<ZodObject<{
|
|
6244
|
+
deploymentTimeoutMs: ZodOptional<ZodNumber>;
|
|
6245
|
+
healthCheckPath: ZodOptional<ZodString>;
|
|
6246
|
+
healthyAfter: ZodOptional<ZodNumber>;
|
|
6247
|
+
intervalMs: ZodOptional<ZodNumber>;
|
|
6248
|
+
healthTimeoutMs: ZodOptional<ZodNumber>;
|
|
6249
|
+
}, $strip>>;
|
|
4835
6250
|
}, $strip>>;
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
6251
|
+
compose: ZodOptional<ZodObject<{
|
|
6252
|
+
proxy: ZodOptional<ZodUnion<readonly [ZodEnum<{
|
|
6253
|
+
caddy: "caddy";
|
|
6254
|
+
traefik: "traefik";
|
|
6255
|
+
}>, ZodRecord<ZodString, ZodEnum<{
|
|
6256
|
+
caddy: "caddy";
|
|
6257
|
+
traefik: "traefik";
|
|
6258
|
+
}>>]>>;
|
|
6259
|
+
tls: ZodOptional<ZodRecord<ZodString, ZodObject<{
|
|
6260
|
+
certFile: ZodString;
|
|
6261
|
+
keyFile: ZodString;
|
|
6262
|
+
}, $strict>>>;
|
|
6263
|
+
server: ZodOptional<ZodRecord<ZodString, ZodObject<{
|
|
6264
|
+
user: ZodString;
|
|
6265
|
+
host: ZodOptional<ZodString>;
|
|
6266
|
+
port: ZodOptional<ZodNumber>;
|
|
6267
|
+
}, $strict>>>;
|
|
6268
|
+
}, $strict>>;
|
|
6269
|
+
telemetry: ZodOptional<ZodRecord<ZodString, ZodUnion<readonly [ZodLiteral<false>, ZodLiteral<"self-hosted">, ZodObject<{
|
|
6270
|
+
provider: ZodLiteral<"self-hosted">;
|
|
6271
|
+
port: ZodOptional<ZodNumber>;
|
|
6272
|
+
retentionDays: ZodOptional<ZodNumber>;
|
|
6273
|
+
public: ZodOptional<ZodObject<{
|
|
6274
|
+
allow: ZodArray<ZodString>;
|
|
6275
|
+
}, $strip>>;
|
|
6276
|
+
sampleRate: ZodOptional<ZodNumber>;
|
|
6277
|
+
}, $strict>, ZodObject<{
|
|
6278
|
+
provider: ZodLiteral<"otlp">;
|
|
6279
|
+
endpoint: ZodString;
|
|
6280
|
+
headers: ZodOptional<ZodRecord<ZodString, ZodString>>;
|
|
6281
|
+
sampleRate: ZodOptional<ZodNumber>;
|
|
6282
|
+
}, $strict>]>>>;
|
|
6283
|
+
objects: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
6284
|
+
backups: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
6285
|
+
}, $strip>>;
|
|
6286
|
+
stages: ZodObject<{
|
|
6287
|
+
local: ZodString;
|
|
6288
|
+
deployed: ZodArray<ZodString>;
|
|
6289
|
+
protected: ZodOptional<ZodArray<ZodString>>;
|
|
6290
|
+
}, $strip>;
|
|
6291
|
+
secrets: ZodOptional<ZodObject<{
|
|
6292
|
+
enabled: ZodOptional<ZodBoolean>;
|
|
6293
|
+
store: ZodOptional<ZodUnion<readonly [ZodLiteral<"file">, ZodObject<{
|
|
6294
|
+
provider: ZodLiteral<"s3">;
|
|
6295
|
+
bucket: ZodOptional<ZodString>;
|
|
4841
6296
|
region: ZodOptional<ZodEnum<{
|
|
4842
|
-
"us-east-1": "us-east-1";
|
|
4843
|
-
"us-east-2": "us-east-2";
|
|
4844
|
-
"us-west-1": "us-west-1";
|
|
4845
|
-
"us-west-2": "us-west-2";
|
|
4846
6297
|
"af-south-1": "af-south-1";
|
|
4847
6298
|
"ap-east-1": "ap-east-1";
|
|
6299
|
+
"ap-northeast-1": "ap-northeast-1";
|
|
6300
|
+
"ap-northeast-2": "ap-northeast-2";
|
|
6301
|
+
"ap-northeast-3": "ap-northeast-3";
|
|
4848
6302
|
"ap-south-1": "ap-south-1";
|
|
4849
6303
|
"ap-south-2": "ap-south-2";
|
|
4850
6304
|
"ap-southeast-1": "ap-southeast-1";
|
|
4851
6305
|
"ap-southeast-2": "ap-southeast-2";
|
|
4852
6306
|
"ap-southeast-3": "ap-southeast-3";
|
|
4853
6307
|
"ap-southeast-4": "ap-southeast-4";
|
|
4854
|
-
"ap-northeast-1": "ap-northeast-1";
|
|
4855
|
-
"ap-northeast-2": "ap-northeast-2";
|
|
4856
|
-
"ap-northeast-3": "ap-northeast-3";
|
|
4857
6308
|
"ca-central-1": "ca-central-1";
|
|
4858
6309
|
"eu-central-1": "eu-central-1";
|
|
4859
6310
|
"eu-central-2": "eu-central-2";
|
|
6311
|
+
"eu-north-1": "eu-north-1";
|
|
6312
|
+
"eu-south-1": "eu-south-1";
|
|
6313
|
+
"eu-south-2": "eu-south-2";
|
|
4860
6314
|
"eu-west-1": "eu-west-1";
|
|
4861
6315
|
"eu-west-2": "eu-west-2";
|
|
4862
6316
|
"eu-west-3": "eu-west-3";
|
|
4863
|
-
"eu-south-1": "eu-south-1";
|
|
4864
|
-
"eu-south-2": "eu-south-2";
|
|
4865
|
-
"eu-north-1": "eu-north-1";
|
|
4866
|
-
"me-south-1": "me-south-1";
|
|
4867
6317
|
"me-central-1": "me-central-1";
|
|
6318
|
+
"me-south-1": "me-south-1";
|
|
4868
6319
|
"sa-east-1": "sa-east-1";
|
|
4869
|
-
}>>;
|
|
4870
|
-
profile: ZodOptional<ZodString>;
|
|
4871
|
-
hostedZoneId: ZodOptional<ZodString>;
|
|
4872
|
-
ttl: ZodOptional<ZodNumber>;
|
|
4873
|
-
}, $strip>, ZodObject<{
|
|
4874
|
-
provider: ZodLiteral<"cloudflare">;
|
|
4875
|
-
ttl: ZodOptional<ZodNumber>;
|
|
4876
|
-
}, $strip>, ZodObject<{
|
|
4877
|
-
provider: ZodLiteral<"manual">;
|
|
4878
|
-
}, $strip>], "provider">, ZodObject<{
|
|
4879
|
-
provider: ZodCustom<{
|
|
4880
|
-
name: string;
|
|
4881
|
-
getRecords: Function;
|
|
4882
|
-
upsertRecords: Function;
|
|
4883
|
-
}, {
|
|
4884
|
-
name: string;
|
|
4885
|
-
getRecords: Function;
|
|
4886
|
-
upsertRecords: Function;
|
|
4887
|
-
}>;
|
|
4888
|
-
ttl: ZodOptional<ZodNumber>;
|
|
4889
|
-
}, $strip>]>>, ZodUnion<readonly [ZodDiscriminatedUnion<[ZodObject<{
|
|
4890
|
-
provider: ZodLiteral<"hostinger">;
|
|
4891
|
-
ttl: ZodOptional<ZodNumber>;
|
|
4892
|
-
domain: ZodString;
|
|
4893
|
-
}, $strip>, ZodObject<{
|
|
4894
|
-
provider: ZodLiteral<"route53">;
|
|
4895
|
-
region: ZodOptional<ZodEnum<{
|
|
4896
6320
|
"us-east-1": "us-east-1";
|
|
4897
6321
|
"us-east-2": "us-east-2";
|
|
4898
6322
|
"us-west-1": "us-west-1";
|
|
4899
6323
|
"us-west-2": "us-west-2";
|
|
6324
|
+
}>>;
|
|
6325
|
+
prefix: ZodOptional<ZodString>;
|
|
6326
|
+
}, $strict>, ZodObject<{
|
|
6327
|
+
provider: ZodLiteral<"ssm">;
|
|
6328
|
+
region: ZodEnum<{
|
|
4900
6329
|
"af-south-1": "af-south-1";
|
|
4901
6330
|
"ap-east-1": "ap-east-1";
|
|
6331
|
+
"ap-northeast-1": "ap-northeast-1";
|
|
6332
|
+
"ap-northeast-2": "ap-northeast-2";
|
|
6333
|
+
"ap-northeast-3": "ap-northeast-3";
|
|
4902
6334
|
"ap-south-1": "ap-south-1";
|
|
4903
6335
|
"ap-south-2": "ap-south-2";
|
|
4904
6336
|
"ap-southeast-1": "ap-southeast-1";
|
|
4905
6337
|
"ap-southeast-2": "ap-southeast-2";
|
|
4906
6338
|
"ap-southeast-3": "ap-southeast-3";
|
|
4907
6339
|
"ap-southeast-4": "ap-southeast-4";
|
|
4908
|
-
"ap-northeast-1": "ap-northeast-1";
|
|
4909
|
-
"ap-northeast-2": "ap-northeast-2";
|
|
4910
|
-
"ap-northeast-3": "ap-northeast-3";
|
|
4911
6340
|
"ca-central-1": "ca-central-1";
|
|
4912
6341
|
"eu-central-1": "eu-central-1";
|
|
4913
6342
|
"eu-central-2": "eu-central-2";
|
|
6343
|
+
"eu-north-1": "eu-north-1";
|
|
6344
|
+
"eu-south-1": "eu-south-1";
|
|
6345
|
+
"eu-south-2": "eu-south-2";
|
|
4914
6346
|
"eu-west-1": "eu-west-1";
|
|
4915
6347
|
"eu-west-2": "eu-west-2";
|
|
4916
6348
|
"eu-west-3": "eu-west-3";
|
|
4917
|
-
"
|
|
4918
|
-
"
|
|
4919
|
-
"
|
|
4920
|
-
"me-south-1": "me-south-1";
|
|
4921
|
-
"me-central-1": "me-central-1";
|
|
4922
|
-
"sa-east-1": "sa-east-1";
|
|
4923
|
-
}>>;
|
|
4924
|
-
profile: ZodOptional<ZodString>;
|
|
4925
|
-
hostedZoneId: ZodOptional<ZodString>;
|
|
4926
|
-
ttl: ZodOptional<ZodNumber>;
|
|
4927
|
-
domain: ZodString;
|
|
4928
|
-
}, $strip>, ZodObject<{
|
|
4929
|
-
provider: ZodLiteral<"cloudflare">;
|
|
4930
|
-
ttl: ZodOptional<ZodNumber>;
|
|
4931
|
-
domain: ZodString;
|
|
4932
|
-
}, $strip>, ZodObject<{
|
|
4933
|
-
provider: ZodLiteral<"manual">;
|
|
4934
|
-
domain: ZodString;
|
|
4935
|
-
}, $strip>], "provider">, ZodObject<{
|
|
4936
|
-
provider: ZodCustom<{
|
|
4937
|
-
name: string;
|
|
4938
|
-
getRecords: Function;
|
|
4939
|
-
upsertRecords: Function;
|
|
4940
|
-
}, {
|
|
4941
|
-
name: string;
|
|
4942
|
-
getRecords: Function;
|
|
4943
|
-
upsertRecords: Function;
|
|
4944
|
-
}>;
|
|
4945
|
-
ttl: ZodOptional<ZodNumber>;
|
|
4946
|
-
domain: ZodString;
|
|
4947
|
-
}, $strip>]>]>>;
|
|
4948
|
-
backups: ZodOptional<ZodObject<{
|
|
4949
|
-
type: ZodLiteral<"s3">;
|
|
4950
|
-
profile: ZodOptional<ZodString>;
|
|
4951
|
-
region: ZodEnum<{
|
|
6349
|
+
"me-central-1": "me-central-1";
|
|
6350
|
+
"me-south-1": "me-south-1";
|
|
6351
|
+
"sa-east-1": "sa-east-1";
|
|
4952
6352
|
"us-east-1": "us-east-1";
|
|
4953
6353
|
"us-east-2": "us-east-2";
|
|
4954
6354
|
"us-west-1": "us-west-1";
|
|
4955
6355
|
"us-west-2": "us-west-2";
|
|
6356
|
+
}>;
|
|
6357
|
+
}, $strict>, ZodObject<{
|
|
6358
|
+
provider: ZodLiteral<"secrets-manager">;
|
|
6359
|
+
region: ZodEnum<{
|
|
4956
6360
|
"af-south-1": "af-south-1";
|
|
4957
6361
|
"ap-east-1": "ap-east-1";
|
|
6362
|
+
"ap-northeast-1": "ap-northeast-1";
|
|
6363
|
+
"ap-northeast-2": "ap-northeast-2";
|
|
6364
|
+
"ap-northeast-3": "ap-northeast-3";
|
|
4958
6365
|
"ap-south-1": "ap-south-1";
|
|
4959
6366
|
"ap-south-2": "ap-south-2";
|
|
4960
6367
|
"ap-southeast-1": "ap-southeast-1";
|
|
4961
6368
|
"ap-southeast-2": "ap-southeast-2";
|
|
4962
6369
|
"ap-southeast-3": "ap-southeast-3";
|
|
4963
6370
|
"ap-southeast-4": "ap-southeast-4";
|
|
4964
|
-
"ap-northeast-1": "ap-northeast-1";
|
|
4965
|
-
"ap-northeast-2": "ap-northeast-2";
|
|
4966
|
-
"ap-northeast-3": "ap-northeast-3";
|
|
4967
6371
|
"ca-central-1": "ca-central-1";
|
|
4968
6372
|
"eu-central-1": "eu-central-1";
|
|
4969
6373
|
"eu-central-2": "eu-central-2";
|
|
6374
|
+
"eu-north-1": "eu-north-1";
|
|
6375
|
+
"eu-south-1": "eu-south-1";
|
|
6376
|
+
"eu-south-2": "eu-south-2";
|
|
4970
6377
|
"eu-west-1": "eu-west-1";
|
|
4971
6378
|
"eu-west-2": "eu-west-2";
|
|
4972
6379
|
"eu-west-3": "eu-west-3";
|
|
4973
|
-
"eu-south-1": "eu-south-1";
|
|
4974
|
-
"eu-south-2": "eu-south-2";
|
|
4975
|
-
"eu-north-1": "eu-north-1";
|
|
4976
|
-
"me-south-1": "me-south-1";
|
|
4977
6380
|
"me-central-1": "me-central-1";
|
|
6381
|
+
"me-south-1": "me-south-1";
|
|
4978
6382
|
"sa-east-1": "sa-east-1";
|
|
6383
|
+
"us-east-1": "us-east-1";
|
|
6384
|
+
"us-east-2": "us-east-2";
|
|
6385
|
+
"us-west-1": "us-west-1";
|
|
6386
|
+
"us-west-2": "us-west-2";
|
|
4979
6387
|
}>;
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
6388
|
+
kmsKeyId: ZodOptional<ZodString>;
|
|
6389
|
+
}, $strict>, ZodObject<{
|
|
6390
|
+
provider: ZodCustom<{
|
|
6391
|
+
name: string;
|
|
6392
|
+
read: Function;
|
|
6393
|
+
write: Function;
|
|
6394
|
+
}, {
|
|
6395
|
+
name: string;
|
|
6396
|
+
read: Function;
|
|
6397
|
+
write: Function;
|
|
6398
|
+
}>;
|
|
6399
|
+
}, $strip>]>>;
|
|
4991
6400
|
algorithm: ZodOptional<ZodString>;
|
|
4992
6401
|
kdf: ZodOptional<ZodEnum<{
|
|
4993
|
-
scrypt: "scrypt";
|
|
4994
6402
|
pbkdf2: "pbkdf2";
|
|
6403
|
+
scrypt: "scrypt";
|
|
4995
6404
|
}>>;
|
|
4996
6405
|
}, $strip>>;
|
|
4997
6406
|
state: ZodOptional<ZodUnion<readonly [ZodDiscriminatedUnion<[ZodObject<{
|
|
@@ -4999,34 +6408,68 @@ declare const WorkspaceConfigSchema: ZodObject<{
|
|
|
4999
6408
|
}, $strip>, ZodObject<{
|
|
5000
6409
|
provider: ZodLiteral<"ssm">;
|
|
5001
6410
|
region: ZodEnum<{
|
|
6411
|
+
"af-south-1": "af-south-1";
|
|
6412
|
+
"ap-east-1": "ap-east-1";
|
|
6413
|
+
"ap-northeast-1": "ap-northeast-1";
|
|
6414
|
+
"ap-northeast-2": "ap-northeast-2";
|
|
6415
|
+
"ap-northeast-3": "ap-northeast-3";
|
|
6416
|
+
"ap-south-1": "ap-south-1";
|
|
6417
|
+
"ap-south-2": "ap-south-2";
|
|
6418
|
+
"ap-southeast-1": "ap-southeast-1";
|
|
6419
|
+
"ap-southeast-2": "ap-southeast-2";
|
|
6420
|
+
"ap-southeast-3": "ap-southeast-3";
|
|
6421
|
+
"ap-southeast-4": "ap-southeast-4";
|
|
6422
|
+
"ca-central-1": "ca-central-1";
|
|
6423
|
+
"eu-central-1": "eu-central-1";
|
|
6424
|
+
"eu-central-2": "eu-central-2";
|
|
6425
|
+
"eu-north-1": "eu-north-1";
|
|
6426
|
+
"eu-south-1": "eu-south-1";
|
|
6427
|
+
"eu-south-2": "eu-south-2";
|
|
6428
|
+
"eu-west-1": "eu-west-1";
|
|
6429
|
+
"eu-west-2": "eu-west-2";
|
|
6430
|
+
"eu-west-3": "eu-west-3";
|
|
6431
|
+
"me-central-1": "me-central-1";
|
|
6432
|
+
"me-south-1": "me-south-1";
|
|
6433
|
+
"sa-east-1": "sa-east-1";
|
|
5002
6434
|
"us-east-1": "us-east-1";
|
|
5003
6435
|
"us-east-2": "us-east-2";
|
|
5004
6436
|
"us-west-1": "us-west-1";
|
|
5005
6437
|
"us-west-2": "us-west-2";
|
|
6438
|
+
}>;
|
|
6439
|
+
profile: ZodOptional<ZodString>;
|
|
6440
|
+
}, $strip>, ZodObject<{
|
|
6441
|
+
provider: ZodLiteral<"s3">;
|
|
6442
|
+
bucket: ZodOptional<ZodString>;
|
|
6443
|
+
region: ZodEnum<{
|
|
5006
6444
|
"af-south-1": "af-south-1";
|
|
5007
6445
|
"ap-east-1": "ap-east-1";
|
|
6446
|
+
"ap-northeast-1": "ap-northeast-1";
|
|
6447
|
+
"ap-northeast-2": "ap-northeast-2";
|
|
6448
|
+
"ap-northeast-3": "ap-northeast-3";
|
|
5008
6449
|
"ap-south-1": "ap-south-1";
|
|
5009
6450
|
"ap-south-2": "ap-south-2";
|
|
5010
6451
|
"ap-southeast-1": "ap-southeast-1";
|
|
5011
6452
|
"ap-southeast-2": "ap-southeast-2";
|
|
5012
6453
|
"ap-southeast-3": "ap-southeast-3";
|
|
5013
6454
|
"ap-southeast-4": "ap-southeast-4";
|
|
5014
|
-
"ap-northeast-1": "ap-northeast-1";
|
|
5015
|
-
"ap-northeast-2": "ap-northeast-2";
|
|
5016
|
-
"ap-northeast-3": "ap-northeast-3";
|
|
5017
6455
|
"ca-central-1": "ca-central-1";
|
|
5018
6456
|
"eu-central-1": "eu-central-1";
|
|
5019
6457
|
"eu-central-2": "eu-central-2";
|
|
6458
|
+
"eu-north-1": "eu-north-1";
|
|
6459
|
+
"eu-south-1": "eu-south-1";
|
|
6460
|
+
"eu-south-2": "eu-south-2";
|
|
5020
6461
|
"eu-west-1": "eu-west-1";
|
|
5021
6462
|
"eu-west-2": "eu-west-2";
|
|
5022
6463
|
"eu-west-3": "eu-west-3";
|
|
5023
|
-
"eu-south-1": "eu-south-1";
|
|
5024
|
-
"eu-south-2": "eu-south-2";
|
|
5025
|
-
"eu-north-1": "eu-north-1";
|
|
5026
|
-
"me-south-1": "me-south-1";
|
|
5027
6464
|
"me-central-1": "me-central-1";
|
|
6465
|
+
"me-south-1": "me-south-1";
|
|
5028
6466
|
"sa-east-1": "sa-east-1";
|
|
6467
|
+
"us-east-1": "us-east-1";
|
|
6468
|
+
"us-east-2": "us-east-2";
|
|
6469
|
+
"us-west-1": "us-west-1";
|
|
6470
|
+
"us-west-2": "us-west-2";
|
|
5029
6471
|
}>;
|
|
6472
|
+
prefix: ZodOptional<ZodString>;
|
|
5030
6473
|
profile: ZodOptional<ZodString>;
|
|
5031
6474
|
}, $strip>], "provider">, ZodObject<{
|
|
5032
6475
|
provider: ZodCustom<{
|
|
@@ -5037,6 +6480,13 @@ declare const WorkspaceConfigSchema: ZodObject<{
|
|
|
5037
6480
|
write: Function;
|
|
5038
6481
|
}>;
|
|
5039
6482
|
}, $strip>]>>;
|
|
6483
|
+
test: ZodOptional<ZodObject<{
|
|
6484
|
+
factories: ZodOptional<ZodString>;
|
|
6485
|
+
}, $strict>>;
|
|
6486
|
+
dev: ZodOptional<ZodObject<{
|
|
6487
|
+
allowedOrigins: ZodOptional<ZodArray<ZodURL>>;
|
|
6488
|
+
discoveryPort: ZodOptional<ZodNumber>;
|
|
6489
|
+
}, $strict>>;
|
|
5040
6490
|
}, $strict>;
|
|
5041
6491
|
/**
|
|
5042
6492
|
* Validate workspace configuration.
|
|
@@ -5058,42 +6508,59 @@ declare function formatValidationErrors(error: ZodError): string;
|
|
|
5058
6508
|
//#endregion
|
|
5059
6509
|
//#region src/workspace/types.d.ts
|
|
5060
6510
|
/**
|
|
5061
|
-
*
|
|
5062
|
-
*
|
|
5063
|
-
* Specifies where the app will be deployed.
|
|
6511
|
+
* Where a stage — or one app — deploys, by target name: a built-in
|
|
6512
|
+
* (`dokploy`, `sst`) or a key of `deploy.targets`.
|
|
5064
6513
|
*
|
|
5065
6514
|
* @example
|
|
5066
6515
|
* ```ts
|
|
5067
|
-
* // Currently supported
|
|
5068
6516
|
* deploy: 'dokploy'
|
|
5069
|
-
*
|
|
5070
|
-
* // Future support (not yet implemented)
|
|
5071
|
-
* deploy: 'vercel'
|
|
5072
|
-
* deploy: 'cloudflare'
|
|
6517
|
+
* deploy: 'acme' // deploy: { targets: { acme: '@acme/gkm-target' } }
|
|
5073
6518
|
* ```
|
|
5074
6519
|
*/
|
|
5075
|
-
type
|
|
6520
|
+
type DeployTargetName = 'dokploy' | 'compose' | 'sst' | (string & {});
|
|
6521
|
+
/**
|
|
6522
|
+
* A per-stage map, typed from the workspace's deployed stages: a key that is
|
|
6523
|
+
* not one is a type error. Untyped (`string`) stages accept any key, which the
|
|
6524
|
+
* schema then checks at load.
|
|
6525
|
+
*/
|
|
6526
|
+
type StageMap<S extends string, V> = string extends S ? Record<string, V> : Partial<Record<S, V>>;
|
|
6527
|
+
/**
|
|
6528
|
+
* `domains: { <stage>: '<domain>' }` at the root of `defineWorkspace`, typed from
|
|
6529
|
+
* the deployed stages.
|
|
6530
|
+
*/
|
|
6531
|
+
type DomainsInput<S extends string = string> = StageMap<S, string>;
|
|
6532
|
+
/** How one root domain's hosts point at a compose stage's server. */
|
|
6533
|
+
type DnsRecordsModeInput<S extends string = string> = 'a' | {
|
|
6534
|
+
mode: 'cname';
|
|
6535
|
+
target: string | StageMap<S, string>;
|
|
6536
|
+
};
|
|
6537
|
+
/** One root domain's DNS provider, its records mode typed from the stages. */
|
|
6538
|
+
type DnsDomainInput<S extends string = string> = DnsProvider extends (infer P) ? P extends unknown ? Omit<P, 'records'> & {
|
|
6539
|
+
records?: DnsRecordsModeInput<S>;
|
|
6540
|
+
} : never : never;
|
|
6541
|
+
/** `dns: { '<root domain>': { provider, … } }` at the root of `defineWorkspace`. */
|
|
6542
|
+
type DnsInput<S extends string = string> = Record<string, DnsDomainInput<S>>;
|
|
6543
|
+
/** Each root domain's DNS provider — `dns` at the root of the config. */
|
|
6544
|
+
type WorkspaceDnsConfig = Record<string, DnsProvider>;
|
|
5076
6545
|
/**
|
|
5077
|
-
*
|
|
6546
|
+
* Each deployed stage's base domain — `domains` at the root of the config.
|
|
5078
6547
|
*
|
|
5079
|
-
*
|
|
5080
|
-
*
|
|
6548
|
+
* A fact about the deployment rather than the platform, so every target reads
|
|
6549
|
+
* it. The root site answers on the base domain; every other surface on
|
|
6550
|
+
* `{subdomain}.{domain}`, where the subdomain is the construct's own
|
|
6551
|
+
* `subdomain`, or its id kebab-cased.
|
|
5081
6552
|
*
|
|
5082
6553
|
* @example
|
|
5083
6554
|
* ```ts
|
|
5084
|
-
* domains: {
|
|
5085
|
-
* development: 'dev.myapp.com',
|
|
5086
|
-
* staging: 'staging.myapp.com',
|
|
5087
|
-
* production: 'myapp.com',
|
|
5088
|
-
* }
|
|
6555
|
+
* domains: { production: 'myapp.com', staging: 'staging.myapp.com' },
|
|
5089
6556
|
*
|
|
5090
|
-
* //
|
|
5091
|
-
* // -
|
|
5092
|
-
* // -
|
|
5093
|
-
* // -
|
|
6557
|
+
* // production:
|
|
6558
|
+
* // - new StaticSite('Web', { root: true }) → myapp.com
|
|
6559
|
+
* // - new RestApi('Api', { subdomain: 'api' }) → api.myapp.com
|
|
6560
|
+
* // - new RestApi('Webhooks', { … }) → webhooks.myapp.com
|
|
5094
6561
|
* ```
|
|
5095
6562
|
*/
|
|
5096
|
-
type
|
|
6563
|
+
type DomainsConfig = Record<string, string>;
|
|
5097
6564
|
/**
|
|
5098
6565
|
* Per-app domain override configuration.
|
|
5099
6566
|
*
|
|
@@ -5125,9 +6592,9 @@ type AppDomainConfig = string | Record<string, string>;
|
|
|
5125
6592
|
* ```ts
|
|
5126
6593
|
* deploy: {
|
|
5127
6594
|
* default: 'dokploy',
|
|
6595
|
+
* registry: 'ghcr.io/myorg',
|
|
5128
6596
|
* dokploy: {
|
|
5129
6597
|
* endpoint: 'https://dokploy.myserver.com',
|
|
5130
|
-
* registry: 'ghcr.io/myorg',
|
|
5131
6598
|
* },
|
|
5132
6599
|
* }
|
|
5133
6600
|
* ```
|
|
@@ -5136,12 +6603,12 @@ type AppDomainConfig = string | Record<string, string>;
|
|
|
5136
6603
|
* ```ts
|
|
5137
6604
|
* deploy: {
|
|
5138
6605
|
* default: 'dokploy',
|
|
6606
|
+
* registry: 'ghcr.io/myorg',
|
|
5139
6607
|
* dokploy: {
|
|
5140
6608
|
* endpoints: {
|
|
5141
6609
|
* development: 'https://dev-dokploy.myserver.com',
|
|
5142
6610
|
* production: 'https://dokploy.myserver.com',
|
|
5143
6611
|
* },
|
|
5144
|
-
* registry: 'ghcr.io/myorg',
|
|
5145
6612
|
* },
|
|
5146
6613
|
* }
|
|
5147
6614
|
* ```
|
|
@@ -5151,16 +6618,227 @@ interface DokployWorkspaceConfig {
|
|
|
5151
6618
|
endpoint?: string;
|
|
5152
6619
|
/** Per-stage Dokploy API endpoints (overrides endpoint) */
|
|
5153
6620
|
endpoints?: Record<string, string>;
|
|
5154
|
-
/** Container registry for Docker images (e.g., 'ghcr.io/myorg') */
|
|
5155
|
-
registry?: string;
|
|
5156
6621
|
/** Registry ID in Dokploy (auto-configured) */
|
|
5157
6622
|
registryId?: string;
|
|
6623
|
+
/** Dokploy's own backup schedule for the stage's Postgres, to an S3 destination. */
|
|
6624
|
+
backups?: DokployBackupsConfig;
|
|
6625
|
+
/** How a release is waited for and checked before it counts as live. */
|
|
6626
|
+
verify?: DokployVerifyConfig;
|
|
6627
|
+
}
|
|
6628
|
+
/**
|
|
6629
|
+
* How a Dokploy release is waited for and checked.
|
|
6630
|
+
*
|
|
6631
|
+
* A release counts once Dokploy's deployment has finished and the app has
|
|
6632
|
+
* answered its health route `healthyAfter` times in a row. One that does not
|
|
6633
|
+
* is rolled back.
|
|
6634
|
+
*/
|
|
6635
|
+
interface DokployVerifyConfig {
|
|
6636
|
+
/** How long Dokploy may take to finish a deployment. Default 10 minutes. */
|
|
6637
|
+
deploymentTimeoutMs?: number;
|
|
6638
|
+
/**
|
|
6639
|
+
* The path each backend is checked on, under its domain. Default
|
|
6640
|
+
* `/health`, which every production server build serves. A site is
|
|
6641
|
+
* checked at `/`.
|
|
6642
|
+
*/
|
|
6643
|
+
healthCheckPath?: string;
|
|
6644
|
+
/** Consecutive 2xx answers that make an app healthy. Default 3. */
|
|
6645
|
+
healthyAfter?: number;
|
|
6646
|
+
/** Between health checks, and the first wait between polls. Default 2s. */
|
|
6647
|
+
intervalMs?: number;
|
|
6648
|
+
/** How long an app may take to become healthy. Default 5 minutes. */
|
|
6649
|
+
healthTimeoutMs?: number;
|
|
6650
|
+
}
|
|
6651
|
+
/**
|
|
6652
|
+
* The `compose` target's own settings — `deploy.compose`. Read by `gkm
|
|
6653
|
+
* compose` and `gkm deploy --target compose` only; the Dokploy target never
|
|
6654
|
+
* consults it.
|
|
6655
|
+
*
|
|
6656
|
+
* @example
|
|
6657
|
+
* ```ts
|
|
6658
|
+
* deploy: { compose: { proxy: 'traefik' } }
|
|
6659
|
+
* ```
|
|
6660
|
+
*/
|
|
6661
|
+
interface ComposeWorkspaceConfig<S extends string = string> {
|
|
6662
|
+
/**
|
|
6663
|
+
* What serves a deployed stage's stack: `'caddy'` (the default) — the
|
|
6664
|
+
* stack's own Caddy on 80/443 — or `'traefik'`, the server's shared
|
|
6665
|
+
* Traefik edge, which every stack registers its routes with. One value
|
|
6666
|
+
* for every deployed stage, or one per stage. The local stage is always
|
|
6667
|
+
* Caddy.
|
|
6668
|
+
*
|
|
6669
|
+
* ```ts
|
|
6670
|
+
* proxy: 'traefik'
|
|
6671
|
+
* proxy: { staging: 'traefik', production: 'caddy' }
|
|
6672
|
+
* ```
|
|
6673
|
+
*/
|
|
6674
|
+
proxy?: ComposeProxy | StageMap<S, ComposeProxy>;
|
|
6675
|
+
/**
|
|
6676
|
+
* A deployed stage's own certificate, by stage, instead of one from
|
|
6677
|
+
* Let's Encrypt: a PEM certificate (with its chain) and its key, relative
|
|
6678
|
+
* to the workspace root or absolute. Either proxy serves it.
|
|
6679
|
+
*
|
|
6680
|
+
* ```ts
|
|
6681
|
+
* tls: { production: { certFile: 'certs/origin.pem', keyFile: 'certs/origin.key' } }
|
|
6682
|
+
* ```
|
|
6683
|
+
*/
|
|
6684
|
+
tls?: StageMap<S, ComposeTlsConfig>;
|
|
6685
|
+
/**
|
|
6686
|
+
* Each deployed stage's server: the SSH login gkm drives its Docker
|
|
6687
|
+
* engine with (`DOCKER_HOST=ssh://user@host`). gkm runs where the deploy
|
|
6688
|
+
* starts — a CI runner, a laptop — and never on the server, which holds
|
|
6689
|
+
* Docker and this login and no cloud credentials. The host defaults to
|
|
6690
|
+
* the stage's `GKM_SERVER_IPV4` secret. Every deployed stage needs one;
|
|
6691
|
+
* the local stage runs on this machine's Docker.
|
|
6692
|
+
*
|
|
6693
|
+
* ```ts
|
|
6694
|
+
* server: { production: { user: 'deploy' } }
|
|
6695
|
+
* server: { staging: { user: 'deploy', host: 'staging.example.com', port: 2222 } }
|
|
6696
|
+
* ```
|
|
6697
|
+
*/
|
|
6698
|
+
server?: StageMap<S, ComposeServerConfig>;
|
|
6699
|
+
}
|
|
6700
|
+
/** A deployed stage's server — `deploy.compose.server.<stage>`. */
|
|
6701
|
+
interface ComposeServerConfig {
|
|
6702
|
+
/** The SSH user, in the server's `docker` group. */
|
|
6703
|
+
user: string;
|
|
6704
|
+
/** The host to SSH to. Default: the stage's `GKM_SERVER_IPV4` secret. */
|
|
6705
|
+
host?: string;
|
|
6706
|
+
/** The SSH port. Default 22. */
|
|
6707
|
+
port?: number;
|
|
6708
|
+
}
|
|
6709
|
+
/** The proxies a compose stack can be served by — `deploy.compose.proxy`. */
|
|
6710
|
+
type ComposeProxy = 'caddy' | 'traefik';
|
|
6711
|
+
/** A stage's own certificate — `deploy.compose.tls.<stage>`. */
|
|
6712
|
+
interface ComposeTlsConfig {
|
|
6713
|
+
certFile: string;
|
|
6714
|
+
keyFile: string;
|
|
6715
|
+
}
|
|
6716
|
+
/**
|
|
6717
|
+
* Where one stage's telemetry goes, and how much of it — `deploy.telemetry`,
|
|
6718
|
+
* by stage.
|
|
6719
|
+
*
|
|
6720
|
+
* What is emitted is the application's (the `Telemetry` construct); where it
|
|
6721
|
+
* goes is this. A server target runs the self-hosted provider when a stage
|
|
6722
|
+
* names nothing; AWS has none, so a deployed AWS stage that uses telemetry
|
|
6723
|
+
* names a provider. `false` sends nothing. The local stage ignores this: `gkm
|
|
6724
|
+
* dev` and `gkm compose` on it always run OpenObserve, at 100%.
|
|
6725
|
+
*
|
|
6726
|
+
* @example
|
|
6727
|
+
* ```ts
|
|
6728
|
+
* telemetry: {
|
|
6729
|
+
* staging: 'self-hosted',
|
|
6730
|
+
* production: { provider: 'self-hosted', retentionDays: 14, sampleRate: 0.1 },
|
|
6731
|
+
* preview: { provider: 'otlp', endpoint: 'https://otlp.example.com', sampleRate: 0.5 },
|
|
6732
|
+
* scratch: false,
|
|
6733
|
+
* }
|
|
6734
|
+
* ```
|
|
6735
|
+
*/
|
|
6736
|
+
type StageTelemetryConfig = 'self-hosted' | SelfHostedTelemetryConfig | OtlpTelemetryConfig | false;
|
|
6737
|
+
/**
|
|
6738
|
+
* What backs one deployed stage's buckets — `deploy.objects`, by stage.
|
|
6739
|
+
*
|
|
6740
|
+
* - `'external'` (the default) — the stage's secrets hold each bucket's URL,
|
|
6741
|
+
* set by you: S3, R2, any S3-compatible store.
|
|
6742
|
+
* - `{ provider: 's3' }` — every deploy of the stage creates (or repairs)
|
|
6743
|
+
* each bucket, its IAM user and key in the stage's AWS account, and writes
|
|
6744
|
+
* the bucket's URL into the stage's secrets, before its checks.
|
|
6745
|
+
* - `false` — the stage has no object storage; a bucket on it is refused.
|
|
6746
|
+
*
|
|
6747
|
+
* The local stage ignores this: `gkm dev` runs MinIO for every bucket.
|
|
6748
|
+
*
|
|
6749
|
+
* @example
|
|
6750
|
+
* ```ts
|
|
6751
|
+
* objects: {
|
|
6752
|
+
* production: { provider: 's3', region: 'eu-west-1', versioning: true },
|
|
6753
|
+
* staging: 'external',
|
|
6754
|
+
* }
|
|
6755
|
+
* ```
|
|
6756
|
+
*/
|
|
6757
|
+
type StageObjectsConfig = 'external' | S3ObjectsConfig | false;
|
|
6758
|
+
/**
|
|
6759
|
+
* One deployed compose stage's backups — `deploy.backups`, by stage.
|
|
6760
|
+
*
|
|
6761
|
+
* A stage that runs Postgres is backed up whether it names one or not: every
|
|
6762
|
+
* day at 02:00 UTC, each backup kept 30 days, in the project bucket. An
|
|
6763
|
+
* entry changes when (`every`, or a five-field UTC `cron`, at most hourly)
|
|
6764
|
+
* and for how long (`keep`); `false` takes none, and deletes nothing.
|
|
6765
|
+
*
|
|
6766
|
+
* @example
|
|
6767
|
+
* ```ts
|
|
6768
|
+
* backups: {
|
|
6769
|
+
* production: { every: '6h', keep: '30d' },
|
|
6770
|
+
* staging: { cron: '30 3 * * *', keep: '7d' },
|
|
6771
|
+
* preview: false,
|
|
6772
|
+
* }
|
|
6773
|
+
* ```
|
|
6774
|
+
*/
|
|
6775
|
+
type StageBackupsConfig = false | {
|
|
6776
|
+
/** `'6h'`, `'1d'` — counted from 02:00 UTC. At least `'1h'`. */
|
|
6777
|
+
every?: string;
|
|
6778
|
+
/** Five fields, in UTC: `'0 *\/6 * * *'`. */
|
|
6779
|
+
cron?: string;
|
|
6780
|
+
/** How long a backup is kept: `'30d'`. */
|
|
6781
|
+
keep?: string;
|
|
6782
|
+
};
|
|
6783
|
+
/** `objects: { provider: 's3' }` — a bucket per construct in the stage's account. */
|
|
6784
|
+
interface S3ObjectsConfig {
|
|
6785
|
+
provider: 's3';
|
|
6786
|
+
/**
|
|
6787
|
+
* Where the buckets are created. Defaults to the secrets store's region,
|
|
6788
|
+
* then `AWS_REGION`.
|
|
6789
|
+
*/
|
|
6790
|
+
region?: string;
|
|
6791
|
+
/** Keep previous versions of every object. Defaults to the construct's own `versioned`. */
|
|
6792
|
+
versioning?: boolean;
|
|
6793
|
+
/**
|
|
6794
|
+
* Serve each file server through a CDN on `<fileserver>.<domain>`: a
|
|
6795
|
+
* CloudFront distribution reading the bucket, its certificate and its DNS
|
|
6796
|
+
* records, all created by the deploy. On by default, which needs the
|
|
6797
|
+
* stage to have a domain; `false` serves from the bucket's own endpoint.
|
|
6798
|
+
*/
|
|
6799
|
+
cdn?: boolean;
|
|
6800
|
+
}
|
|
6801
|
+
/** Shared by every provider. */
|
|
6802
|
+
interface TelemetryProviderConfig {
|
|
6803
|
+
/**
|
|
6804
|
+
* The fraction of traces kept, decided where a trace starts and followed
|
|
6805
|
+
* by every service it reaches (`parentbased_traceidratio`). Logs are not
|
|
6806
|
+
* sampled. 0 to 1; default 1.
|
|
6807
|
+
*/
|
|
6808
|
+
sampleRate?: number;
|
|
6809
|
+
}
|
|
6810
|
+
/**
|
|
6811
|
+
* The target runs the collector and its UI: OpenObserve, in a compose stack,
|
|
6812
|
+
* reached through an SSH tunnel by default.
|
|
6813
|
+
*/
|
|
6814
|
+
interface SelfHostedTelemetryConfig extends TelemetryProviderConfig {
|
|
6815
|
+
provider: 'self-hosted';
|
|
6816
|
+
/**
|
|
6817
|
+
* The port it is published on, on 127.0.0.1 only — reached from another
|
|
6818
|
+
* machine through an SSH tunnel. Default 5080.
|
|
6819
|
+
*/
|
|
6820
|
+
port?: number;
|
|
6821
|
+
/**
|
|
6822
|
+
* How many days of data it keeps (OpenObserve's
|
|
6823
|
+
* `ZO_COMPACT_DATA_RETENTION_DAYS`). At least 3; default 30.
|
|
6824
|
+
*/
|
|
6825
|
+
retentionDays?: number;
|
|
5158
6826
|
/**
|
|
5159
|
-
*
|
|
5160
|
-
*
|
|
5161
|
-
*
|
|
6827
|
+
* Serve it on `logs.<stage domain>` through the stack's proxy, to these
|
|
6828
|
+
* addresses only (IPs or CIDRs), instead of on a loopback port. Every
|
|
6829
|
+
* other address is answered 403.
|
|
5162
6830
|
*/
|
|
5163
|
-
|
|
6831
|
+
public?: {
|
|
6832
|
+
allow: string[];
|
|
6833
|
+
};
|
|
6834
|
+
}
|
|
6835
|
+
/** Any OTLP/HTTP endpoint — a collector, a vendor's ingest. */
|
|
6836
|
+
interface OtlpTelemetryConfig extends TelemetryProviderConfig {
|
|
6837
|
+
provider: 'otlp';
|
|
6838
|
+
/** The OTLP/HTTP base URL; `/v1/traces` and `/v1/logs` are added to it. */
|
|
6839
|
+
endpoint: string;
|
|
6840
|
+
/** Headers sent with every export — `{ 'x-team': 'shop' }`. */
|
|
6841
|
+
headers?: Record<string, string>;
|
|
5164
6842
|
}
|
|
5165
6843
|
/**
|
|
5166
6844
|
* Deployment configuration for the workspace.
|
|
@@ -5172,37 +6850,74 @@ interface DokployWorkspaceConfig {
|
|
|
5172
6850
|
* default: 'dokploy',
|
|
5173
6851
|
* }
|
|
5174
6852
|
*
|
|
5175
|
-
* // Full configuration with
|
|
6853
|
+
* // Full configuration with backups (domains and dns are at the root)
|
|
5176
6854
|
* deploy: {
|
|
5177
6855
|
* default: 'dokploy',
|
|
6856
|
+
* registry: 'ghcr.io/myorg',
|
|
5178
6857
|
* dokploy: {
|
|
5179
6858
|
* endpoint: 'https://dokploy.myserver.com',
|
|
5180
6859
|
* projectId: 'proj_abc123',
|
|
5181
|
-
*
|
|
5182
|
-
* domains: {
|
|
5183
|
-
* production: 'myapp.com',
|
|
5184
|
-
* },
|
|
5185
|
-
* },
|
|
5186
|
-
* dns: {
|
|
5187
|
-
* provider: 'hostinger',
|
|
5188
|
-
* domain: 'myapp.com',
|
|
5189
|
-
* },
|
|
5190
|
-
* backups: {
|
|
5191
|
-
* type: 's3',
|
|
5192
|
-
* region: 'us-east-1',
|
|
6860
|
+
* backups: { type: 's3', region: 'us-east-1' },
|
|
5193
6861
|
* },
|
|
5194
6862
|
* }
|
|
5195
6863
|
* ```
|
|
5196
6864
|
*/
|
|
5197
|
-
interface DeployConfig {
|
|
6865
|
+
interface DeployConfig<S extends string = string> {
|
|
5198
6866
|
/** Default deploy target for all apps (default: 'dokploy') */
|
|
5199
|
-
default?:
|
|
6867
|
+
default?: DeployTargetName;
|
|
6868
|
+
/**
|
|
6869
|
+
* Targets that do not ship with the CLI, by the name `default` (or an
|
|
6870
|
+
* app's `deploy`) uses: a package whose default export is the target, a
|
|
6871
|
+
* target object, or either with its options.
|
|
6872
|
+
*
|
|
6873
|
+
* ```ts
|
|
6874
|
+
* targets: {
|
|
6875
|
+
* acme: '@acme/gkm-target',
|
|
6876
|
+
* fly: ['@acme/gkm-fly', { org: 'acme' }],
|
|
6877
|
+
* local: defineTarget({ … }),
|
|
6878
|
+
* }
|
|
6879
|
+
* ```
|
|
6880
|
+
*
|
|
6881
|
+
* A package is never guessed from a name: it is installed and listed here.
|
|
6882
|
+
* A built-in's name cannot be taken.
|
|
6883
|
+
*/
|
|
6884
|
+
targets?: Record<string, DeployTargetEntry>;
|
|
6885
|
+
/**
|
|
6886
|
+
* Whose deploy this is, on a target shared with other workspaces — an
|
|
6887
|
+
* organisation or a team, lowercase `[a-z0-9-]`. Two workspaces with the
|
|
6888
|
+
* same name deploying to one Dokploy are kept apart by it: it is in the
|
|
6889
|
+
* project's ownership marker, the image path
|
|
6890
|
+
* (`<registry>/<namespace>/<project>-<app>`) and every resource name.
|
|
6891
|
+
*
|
|
6892
|
+
* Defaults to the kebab-cased workspace name, which adds nothing to the
|
|
6893
|
+
* names a workspace was already deployed under.
|
|
6894
|
+
*/
|
|
6895
|
+
namespace?: string;
|
|
6896
|
+
/**
|
|
6897
|
+
* The container registry the apps' images are pushed to and pulled from,
|
|
6898
|
+
* whatever the target — `ghcr.io/myorg`. An image is
|
|
6899
|
+
* `<registry>/<namespace>/<project>-<app>:<tag>`.
|
|
6900
|
+
*/
|
|
6901
|
+
registry?: string;
|
|
5200
6902
|
/** Dokploy-specific configuration */
|
|
5201
6903
|
dokploy?: DokployWorkspaceConfig;
|
|
5202
|
-
/**
|
|
5203
|
-
|
|
5204
|
-
/**
|
|
5205
|
-
|
|
6904
|
+
/** What the `compose` target runs beside the apps — see {@link ComposeWorkspaceConfig}. */
|
|
6905
|
+
compose?: ComposeWorkspaceConfig<S>;
|
|
6906
|
+
/**
|
|
6907
|
+
* Where each deployed stage's telemetry goes — see
|
|
6908
|
+
* {@link StageTelemetryConfig}.
|
|
6909
|
+
*/
|
|
6910
|
+
telemetry?: StageMap<S, StageTelemetryConfig>;
|
|
6911
|
+
/**
|
|
6912
|
+
* What backs each deployed stage's buckets — the `objects` kind that
|
|
6913
|
+
* `ObjectStorage` and `FileServer` produce. See {@link StageObjectsConfig}.
|
|
6914
|
+
*/
|
|
6915
|
+
objects?: StageMap<S, StageObjectsConfig>;
|
|
6916
|
+
/**
|
|
6917
|
+
* When each deployed compose stage's databases are backed up, and how
|
|
6918
|
+
* long a backup is kept — see {@link StageBackupsConfig}.
|
|
6919
|
+
*/
|
|
6920
|
+
backups?: StageMap<S, StageBackupsConfig>;
|
|
5206
6921
|
}
|
|
5207
6922
|
/**
|
|
5208
6923
|
* Models package configuration for shared schemas.
|
|
@@ -5288,7 +7003,7 @@ interface StagesConfig {
|
|
|
5288
7003
|
*
|
|
5289
7004
|
* Configures how secrets are encrypted for deployment.
|
|
5290
7005
|
* Secrets are stored encrypted in `.gkm/secrets/{stage}.json`
|
|
5291
|
-
* with keys stored separately in `~/.gkm/{project}/{stage}.key`.
|
|
7006
|
+
* with keys stored separately in `~/.gkm/keys/{namespace}/{project}/{stage}.key`.
|
|
5292
7007
|
*
|
|
5293
7008
|
* @example
|
|
5294
7009
|
* ```ts
|
|
@@ -5302,6 +7017,19 @@ interface StagesConfig {
|
|
|
5302
7017
|
interface SecretsConfig {
|
|
5303
7018
|
/** Enable encrypted secrets (default: true) */
|
|
5304
7019
|
enabled?: boolean;
|
|
7020
|
+
/**
|
|
7021
|
+
* Where deployed stages' secrets live, so a deploy can reach them from
|
|
7022
|
+
* anywhere: `'file'` (default — the encrypted `.gkm/secrets/<stage>.json`,
|
|
7023
|
+
* which cannot serve CI while `.gkm/` is gitignored), `{ provider: 's3',
|
|
7024
|
+
* region?, bucket?, prefix? }` (each stage's secrets in one object in the
|
|
7025
|
+
* project bucket beside the deploy state, SSE-S3 and versioned, no size
|
|
7026
|
+
* limit; region and prefix default to an S3 `state`'s), `{ provider: 'ssm',
|
|
7027
|
+
* region }` (each stage's secrets in an SSM parameter in its own AWS
|
|
7028
|
+
* account, up to 8 KB), `{ provider: 'secrets-manager', region, kmsKeyId? }`
|
|
7029
|
+
* (a Secrets Manager secret in its own account, up to 64 KB), or any object
|
|
7030
|
+
* implementing `SecretsStore`. The local stage always uses the file.
|
|
7031
|
+
*/
|
|
7032
|
+
store?: SecretsStoreConfig;
|
|
5305
7033
|
/** Encryption algorithm (default: 'aes-256-gcm') */
|
|
5306
7034
|
algorithm?: string;
|
|
5307
7035
|
/** Key derivation function (default: 'scrypt') */
|
|
@@ -5368,7 +7096,7 @@ interface AppConfigBase {
|
|
|
5368
7096
|
* Overrides `deploy.default` for this specific app.
|
|
5369
7097
|
* @example 'dokploy', 'vercel'
|
|
5370
7098
|
*/
|
|
5371
|
-
deploy?:
|
|
7099
|
+
deploy?: DeployTargetName;
|
|
5372
7100
|
/**
|
|
5373
7101
|
* Constructs glob pattern — one glob, every kind.
|
|
5374
7102
|
*
|
|
@@ -5419,23 +7147,16 @@ interface AppConfigBase {
|
|
|
5419
7147
|
* @example './src/config/logger'
|
|
5420
7148
|
*/
|
|
5421
7149
|
logger?: string;
|
|
5422
|
-
/** Provider configuration (AWS, Docker, etc.) */
|
|
5423
|
-
providers?: ProvidersConfig;
|
|
5424
7150
|
/**
|
|
5425
7151
|
* Server lifecycle hooks.
|
|
5426
7152
|
* @example { beforeSetup: './src/hooks/setup.ts' }
|
|
5427
7153
|
*/
|
|
5428
7154
|
hooks?: HooksConfig;
|
|
5429
7155
|
/**
|
|
5430
|
-
* Telescope
|
|
7156
|
+
* Telescope request recording configuration.
|
|
5431
7157
|
* @example true, './src/config/telescope', { enabled: true, path: '/__telescope' }
|
|
5432
7158
|
*/
|
|
5433
7159
|
telescope?: string | boolean | TelescopeConfig;
|
|
5434
|
-
/**
|
|
5435
|
-
* Studio admin panel configuration.
|
|
5436
|
-
* @example true, './src/config/studio'
|
|
5437
|
-
*/
|
|
5438
|
-
studio?: string | boolean | StudioConfig;
|
|
5439
7160
|
/**
|
|
5440
7161
|
* OpenAPI documentation configuration.
|
|
5441
7162
|
* @example true, { output: './src/openapi.ts' }
|
|
@@ -5609,7 +7330,7 @@ type ConstrainedApps<TApps extends AppsRecord> = { [K in keyof TApps]: Omit<TApp
|
|
|
5609
7330
|
* });
|
|
5610
7331
|
* ```
|
|
5611
7332
|
*/
|
|
5612
|
-
type WorkspaceInput<TApps extends AppsRecord> = {
|
|
7333
|
+
type WorkspaceInput<TApps extends AppsRecord, TDeployed extends string = string> = {
|
|
5613
7334
|
/**
|
|
5614
7335
|
* Where the workspace's own constructs live, relative to its root.
|
|
5615
7336
|
*
|
|
@@ -5629,15 +7350,71 @@ type WorkspaceInput<TApps extends AppsRecord> = {
|
|
|
5629
7350
|
apps?: ConstrainedApps<TApps>;
|
|
5630
7351
|
/** Shared packages configuration */
|
|
5631
7352
|
shared?: SharedConfig;
|
|
7353
|
+
/**
|
|
7354
|
+
* Each deployed stage's base domain — see {@link DomainsConfig}. A key that
|
|
7355
|
+
* is not a deployed stage is a type error.
|
|
7356
|
+
*/
|
|
7357
|
+
domains?: DomainsInput<NoInfer<TDeployed>>;
|
|
7358
|
+
/**
|
|
7359
|
+
* Each root domain's DNS provider, and how its hosts are pointed at a
|
|
7360
|
+
* compose stage's server (`records`).
|
|
7361
|
+
*/
|
|
7362
|
+
dns?: DnsInput<NoInfer<TDeployed>>;
|
|
5632
7363
|
/** Deployment configuration */
|
|
5633
|
-
deploy?: DeployConfig
|
|
5634
|
-
/**
|
|
5635
|
-
|
|
7364
|
+
deploy?: DeployConfig<NoInfer<TDeployed>>;
|
|
7365
|
+
/**
|
|
7366
|
+
* The project's stages: which one is local, which deploy. The deployed
|
|
7367
|
+
* stages type every per-stage map — `domains`, `deploy.objects`,
|
|
7368
|
+
* `deploy.telemetry`, `deploy.compose.proxy`/`tls`.
|
|
7369
|
+
*/
|
|
7370
|
+
stages: StagesInput<TDeployed>;
|
|
5636
7371
|
/** Encrypted secrets configuration */
|
|
5637
7372
|
secrets?: SecretsConfig;
|
|
5638
7373
|
/** State provider configuration (local filesystem by default, or SSM for team collaboration) */
|
|
5639
7374
|
state?: StateConfig;
|
|
7375
|
+
/** How `gkm dev` is reached: the discovery endpoint's port and origins */
|
|
7376
|
+
dev?: DevConfig;
|
|
5640
7377
|
};
|
|
7378
|
+
/** `stages`, as `defineWorkspace` infers it: each deployed stage literally. */
|
|
7379
|
+
interface StagesInput<TDeployed extends string = string> {
|
|
7380
|
+
local: string;
|
|
7381
|
+
deployed: readonly TDeployed[];
|
|
7382
|
+
protected?: readonly NoInfer<TDeployed>[];
|
|
7383
|
+
}
|
|
7384
|
+
/**
|
|
7385
|
+
* How `gkm dev` is reached from outside the apps it runs.
|
|
7386
|
+
*/
|
|
7387
|
+
interface DevConfig {
|
|
7388
|
+
/**
|
|
7389
|
+
* Browser origins allowed to read the discovery endpoint — and this
|
|
7390
|
+
* workspace in it — e.g. `['https://console.example.com']`.
|
|
7391
|
+
*
|
|
7392
|
+
* Empty by default: any page the developer visits can send requests to a
|
|
7393
|
+
* loopback port, so none is answered unless it is listed here. A request
|
|
7394
|
+
* with no `Origin` (curl, a local process) still needs the session token.
|
|
7395
|
+
*/
|
|
7396
|
+
allowedOrigins?: string[];
|
|
7397
|
+
/**
|
|
7398
|
+
* The loopback port the discovery endpoint listens on. Defaults to 4983;
|
|
7399
|
+
* `GKM_DISCOVERY_PORT` overrides it.
|
|
7400
|
+
*/
|
|
7401
|
+
discoveryPort?: number;
|
|
7402
|
+
}
|
|
7403
|
+
/**
|
|
7404
|
+
* How `gkm test` builds what a feature test is handed.
|
|
7405
|
+
*/
|
|
7406
|
+
interface TestConfig {
|
|
7407
|
+
/**
|
|
7408
|
+
* The folder of test factories, relative to the root.
|
|
7409
|
+
*
|
|
7410
|
+
* Defaults to `test/factories`. A factory belongs to a database, not to an
|
|
7411
|
+
* app, so each file is named after one — `database.ts` for `Database`,
|
|
7412
|
+
* `auth-database.ts` for `AuthDatabase` — and exports `createFactory(db)`.
|
|
7413
|
+
* Every app's harness builds them on each test's transactions, and a test is
|
|
7414
|
+
* handed them as `factories`, keyed by service name.
|
|
7415
|
+
*/
|
|
7416
|
+
factories?: string;
|
|
7417
|
+
}
|
|
5641
7418
|
/**
|
|
5642
7419
|
* Extract app names from apps record.
|
|
5643
7420
|
*/
|
|
@@ -5658,10 +7435,14 @@ type InferredWorkspaceConfig<TApps extends AppsRecord> = {
|
|
|
5658
7435
|
dependencies?: InferAppNames<TApps>[];
|
|
5659
7436
|
}; };
|
|
5660
7437
|
shared?: SharedConfig;
|
|
7438
|
+
domains?: DomainsConfig;
|
|
7439
|
+
dns?: WorkspaceDnsConfig;
|
|
5661
7440
|
deploy?: DeployConfig;
|
|
5662
7441
|
stages: StagesConfig;
|
|
5663
7442
|
secrets?: SecretsConfig;
|
|
5664
7443
|
state?: StateConfig;
|
|
7444
|
+
test?: TestConfig;
|
|
7445
|
+
dev?: DevConfig;
|
|
5665
7446
|
};
|
|
5666
7447
|
/**
|
|
5667
7448
|
* Workspace configuration for multi-app monorepos.
|
|
@@ -5708,17 +7489,20 @@ type InferredWorkspaceConfig<TApps extends AppsRecord> = {
|
|
|
5708
7489
|
* },
|
|
5709
7490
|
* },
|
|
5710
7491
|
*
|
|
7492
|
+
* // Each deployed stage's base domain, and who hosts its DNS
|
|
7493
|
+
* domains: {
|
|
7494
|
+
* production: 'myapp.com',
|
|
7495
|
+
* staging: 'staging.myapp.com',
|
|
7496
|
+
* },
|
|
7497
|
+
* dns: { 'myapp.com': { provider: 'godaddy' } },
|
|
7498
|
+
*
|
|
5711
7499
|
* // Deployment configuration
|
|
5712
7500
|
* deploy: {
|
|
5713
7501
|
* default: 'dokploy',
|
|
7502
|
+
* registry: 'ghcr.io/myorg',
|
|
5714
7503
|
* dokploy: {
|
|
5715
7504
|
* endpoint: 'https://dokploy.myserver.com',
|
|
5716
7505
|
* projectId: 'proj_abc123',
|
|
5717
|
-
* registry: 'ghcr.io/myorg',
|
|
5718
|
-
* domains: {
|
|
5719
|
-
* production: 'myapp.com',
|
|
5720
|
-
* staging: 'staging.myapp.com',
|
|
5721
|
-
* },
|
|
5722
7506
|
* },
|
|
5723
7507
|
* },
|
|
5724
7508
|
*
|
|
@@ -5746,6 +7530,10 @@ interface WorkspaceConfig {
|
|
|
5746
7530
|
apps?: Record<string, AppConfig>;
|
|
5747
7531
|
/** Shared packages configuration */
|
|
5748
7532
|
shared?: SharedConfig;
|
|
7533
|
+
/** Each deployed stage's base domain — see {@link DomainsConfig}. */
|
|
7534
|
+
domains?: DomainsConfig;
|
|
7535
|
+
/** Each root domain's DNS provider — see {@link WorkspaceDnsConfig}. */
|
|
7536
|
+
dns?: WorkspaceDnsConfig;
|
|
5749
7537
|
/** Default deployment configuration */
|
|
5750
7538
|
deploy?: DeployConfig;
|
|
5751
7539
|
/** The project's stages: which one is local, which deploy */
|
|
@@ -5754,6 +7542,10 @@ interface WorkspaceConfig {
|
|
|
5754
7542
|
secrets?: SecretsConfig;
|
|
5755
7543
|
/** State provider configuration (local filesystem by default, or SSM for team collaboration) */
|
|
5756
7544
|
state?: StateConfig;
|
|
7545
|
+
/** What `gkm test` hands a feature test: where the factories are. */
|
|
7546
|
+
test?: TestConfig;
|
|
7547
|
+
/** How `gkm dev` is reached: the discovery endpoint's port and origins. */
|
|
7548
|
+
dev?: DevConfig;
|
|
5757
7549
|
}
|
|
5758
7550
|
/**
|
|
5759
7551
|
* Normalized app configuration with resolved defaults.
|
|
@@ -5770,6 +7562,11 @@ interface NormalizedAppConfig extends Omit<AppConfigBase, 'type'> {
|
|
|
5770
7562
|
* and that is `domain`.
|
|
5771
7563
|
*/
|
|
5772
7564
|
root?: boolean;
|
|
7565
|
+
/**
|
|
7566
|
+
* The label this app answers on under a stage's domain, carried from its
|
|
7567
|
+
* declaration — `api` for `api.myapp.com`. Absent, the app's own name.
|
|
7568
|
+
*/
|
|
7569
|
+
subdomain?: string;
|
|
5773
7570
|
/** App type (always defined after normalization) */
|
|
5774
7571
|
type: 'backend' | 'web' | 'mobile';
|
|
5775
7572
|
/** Path to the app */
|
|
@@ -5779,7 +7576,7 @@ interface NormalizedAppConfig extends Omit<AppConfigBase, 'type'> {
|
|
|
5779
7576
|
/** Resolved dependencies array (empty array if none) */
|
|
5780
7577
|
dependencies: string[];
|
|
5781
7578
|
/** Resolved deploy target (app.deploy > deploy.default > 'dokploy') */
|
|
5782
|
-
resolvedDeployTarget:
|
|
7579
|
+
resolvedDeployTarget: DeployTargetName;
|
|
5783
7580
|
/** Entry file path for non-gkm apps */
|
|
5784
7581
|
entry?: string;
|
|
5785
7582
|
/** Framework for the app */
|
|
@@ -5809,6 +7606,10 @@ interface NormalizedWorkspace {
|
|
|
5809
7606
|
constructs?: Routes;
|
|
5810
7607
|
/** Normalized app configurations */
|
|
5811
7608
|
apps: Record<string, NormalizedAppConfig>;
|
|
7609
|
+
/** Each deployed stage's base domain */
|
|
7610
|
+
domains?: DomainsConfig;
|
|
7611
|
+
/** Each root domain's DNS provider */
|
|
7612
|
+
dns?: WorkspaceDnsConfig;
|
|
5812
7613
|
/** Deploy configuration (empty object if not specified) */
|
|
5813
7614
|
deploy: DeployConfig;
|
|
5814
7615
|
/** Shared packages configuration (empty object if not specified) */
|
|
@@ -5819,6 +7620,10 @@ interface NormalizedWorkspace {
|
|
|
5819
7620
|
secrets: SecretsConfig;
|
|
5820
7621
|
/** State provider configuration (undefined = local filesystem) */
|
|
5821
7622
|
state?: StateConfig;
|
|
7623
|
+
/** What `gkm test` hands a feature test (empty object if not specified) */
|
|
7624
|
+
test: TestConfig;
|
|
7625
|
+
/** How `gkm dev` is reached, when configured */
|
|
7626
|
+
dev?: DevConfig;
|
|
5822
7627
|
}
|
|
5823
7628
|
/**
|
|
5824
7629
|
* Result of loading and processing a configuration.
|
|
@@ -5838,6 +7643,11 @@ interface LoadedConfig {
|
|
|
5838
7643
|
* two chances to disagree. Absent when the workspace declares no constructs.
|
|
5839
7644
|
*/
|
|
5840
7645
|
manifest?: ConstructManifest;
|
|
7646
|
+
/**
|
|
7647
|
+
* The files each Worker's crons, queues and subscribers are declared in,
|
|
7648
|
+
* read in the same discovery — what says which app a worker is built from.
|
|
7649
|
+
*/
|
|
7650
|
+
background?: Record<string, string[]>;
|
|
5841
7651
|
}
|
|
5842
7652
|
/**
|
|
5843
7653
|
* Type guard to check if a config is a WorkspaceConfig.
|
|
@@ -5854,43 +7664,7 @@ interface LoadedConfig {
|
|
|
5854
7664
|
declare function isWorkspaceConfig(config: GkmConfig | WorkspaceConfig): config is WorkspaceConfig;
|
|
5855
7665
|
//#endregion
|
|
5856
7666
|
//#region src/types.d.ts
|
|
5857
|
-
|
|
5858
|
-
paths: string | string[];
|
|
5859
|
-
partition: (filepath: string) => string;
|
|
5860
|
-
}
|
|
5861
|
-
type Routes = string | string[] | PartitionedRoutes;
|
|
5862
|
-
interface ProviderConfig {
|
|
5863
|
-
enabled?: boolean;
|
|
5864
|
-
outputDir?: string;
|
|
5865
|
-
}
|
|
5866
|
-
interface AWSApiGatewayConfig extends ProviderConfig {}
|
|
5867
|
-
interface AWSLambdaConfig extends ProviderConfig {}
|
|
5868
|
-
interface ProductionConfig {
|
|
5869
|
-
/** Enable production mode (default: false) */
|
|
5870
|
-
enabled?: boolean;
|
|
5871
|
-
/** Bundle server into single file (default: true) */
|
|
5872
|
-
bundle?: boolean;
|
|
5873
|
-
/** Minify bundled output (default: true) */
|
|
5874
|
-
minify?: boolean;
|
|
5875
|
-
/** Health check endpoint path (default: '/health') */
|
|
5876
|
-
healthCheck?: string;
|
|
5877
|
-
/** Enable graceful shutdown handling (default: true) */
|
|
5878
|
-
gracefulShutdown?: boolean;
|
|
5879
|
-
/** Packages to exclude from bundling (default: []) */
|
|
5880
|
-
external?: string[];
|
|
5881
|
-
/** Include subscribers in production build (default: 'exclude' for serverless) */
|
|
5882
|
-
subscribers?: 'include' | 'exclude';
|
|
5883
|
-
/** Include OpenAPI spec in production (default: false) */
|
|
5884
|
-
openapi?: boolean;
|
|
5885
|
-
/**
|
|
5886
|
-
* Enable build-time optimized handler generation (default: true)
|
|
5887
|
-
* Generates specialized handlers based on endpoint tier:
|
|
5888
|
-
* - minimal: Near-raw-Hono performance for simple endpoints
|
|
5889
|
-
* - standard: Optimized handlers for auth/services
|
|
5890
|
-
* - full: Uses HonoEndpoint.addRoutes for complex endpoints
|
|
5891
|
-
*/
|
|
5892
|
-
optimizedHandlers?: boolean;
|
|
5893
|
-
}
|
|
7667
|
+
type Routes = string | string[];
|
|
5894
7668
|
/**
|
|
5895
7669
|
* Where a declared cache actually lives.
|
|
5896
7670
|
*
|
|
@@ -5907,8 +7681,12 @@ interface ProductionConfig {
|
|
|
5907
7681
|
* - `db` — a table in the database the app already declared. No infrastructure
|
|
5908
7682
|
* at all, and the same relationship pg-boss has to Postgres: it creates its
|
|
5909
7683
|
* own table on first use and needs a declared database to live in.
|
|
7684
|
+
* - `redis` — a Redis the stack runs beside the apps, on its network. It holds
|
|
7685
|
+
* *every* declared cache, one declared from a database included, so the
|
|
7686
|
+
* cache never competes with the database for its connections. Only the
|
|
7687
|
+
* compose target selects it today (`gkm compose`).
|
|
5910
7688
|
*/
|
|
5911
|
-
type CacheBackend = 'upstash' | 'elasticache' | 'db';
|
|
7689
|
+
type CacheBackend = 'upstash' | 'elasticache' | 'db' | 'redis';
|
|
5912
7690
|
/**
|
|
5913
7691
|
* Who delivers a declared app's mail.
|
|
5914
7692
|
*
|
|
@@ -5935,17 +7713,11 @@ interface DockerConfig {
|
|
|
5935
7713
|
registry?: string;
|
|
5936
7714
|
/** Docker image name (default: derived from package.json name) */
|
|
5937
7715
|
imageName?: string;
|
|
5938
|
-
/** Base Docker image (default: 'node:22-alpine') */
|
|
7716
|
+
/** Base Docker image (default: 'node:22.23.4-alpine', a Node security release) */
|
|
5939
7717
|
baseImage?: string;
|
|
5940
7718
|
/** Container port (default: 3000) */
|
|
5941
7719
|
port?: number;
|
|
5942
7720
|
}
|
|
5943
|
-
interface ServerConfig extends ProviderConfig {
|
|
5944
|
-
enableOpenApi?: boolean;
|
|
5945
|
-
port?: number;
|
|
5946
|
-
/** Production build configuration */
|
|
5947
|
-
production?: ProductionConfig;
|
|
5948
|
-
}
|
|
5949
7721
|
type Runtime = 'node' | 'bun';
|
|
5950
7722
|
interface TelescopeConfig {
|
|
5951
7723
|
/** Enable/disable telescope (default: true in development) */
|
|
@@ -5963,14 +7735,6 @@ interface TelescopeConfig {
|
|
|
5963
7735
|
/** Enable WebSocket for real-time updates (default: true, requires @hono/node-ws for Node.js) */
|
|
5964
7736
|
websocket?: boolean;
|
|
5965
7737
|
}
|
|
5966
|
-
interface StudioConfig {
|
|
5967
|
-
/** Enable/disable studio (default: true in development) */
|
|
5968
|
-
enabled?: boolean;
|
|
5969
|
-
/** Path prefix for studio UI (default: /__studio) */
|
|
5970
|
-
path?: string;
|
|
5971
|
-
/** Schema to introspect (default: 'public') */
|
|
5972
|
-
schema?: string;
|
|
5973
|
-
}
|
|
5974
7738
|
interface OpenApiConfig {
|
|
5975
7739
|
/** Enable OpenAPI generation (default: true) */
|
|
5976
7740
|
enabled?: boolean;
|
|
@@ -6008,34 +7772,6 @@ interface HooksConfig {
|
|
|
6008
7772
|
*/
|
|
6009
7773
|
server?: string;
|
|
6010
7774
|
}
|
|
6011
|
-
/** Dokploy deployment configuration */
|
|
6012
|
-
interface DokployProviderConfig {
|
|
6013
|
-
/** Dokploy API endpoint (e.g., 'https://dokploy.example.com') */
|
|
6014
|
-
endpoint: string;
|
|
6015
|
-
/** Project ID in Dokploy */
|
|
6016
|
-
projectId: string;
|
|
6017
|
-
/** Application ID in Dokploy */
|
|
6018
|
-
applicationId: string;
|
|
6019
|
-
/** Container registry (overrides docker.registry if set) */
|
|
6020
|
-
registry?: string;
|
|
6021
|
-
/** Registry ID in Dokploy (recommended for private registries) */
|
|
6022
|
-
registryId?: string;
|
|
6023
|
-
}
|
|
6024
|
-
interface ProvidersConfig {
|
|
6025
|
-
aws?: {
|
|
6026
|
-
apiGateway?: {
|
|
6027
|
-
v1?: boolean | AWSApiGatewayConfig;
|
|
6028
|
-
v2?: boolean | AWSApiGatewayConfig;
|
|
6029
|
-
};
|
|
6030
|
-
lambda?: {
|
|
6031
|
-
functions?: boolean | AWSLambdaConfig;
|
|
6032
|
-
crons?: boolean | AWSLambdaConfig;
|
|
6033
|
-
};
|
|
6034
|
-
};
|
|
6035
|
-
server?: boolean | ServerConfig;
|
|
6036
|
-
/** Dokploy deployment configuration */
|
|
6037
|
-
dokploy?: boolean | DokployProviderConfig;
|
|
6038
|
-
}
|
|
6039
7775
|
interface GkmConfig {
|
|
6040
7776
|
/**
|
|
6041
7777
|
* What this app is called, and therefore how everything it declares is named.
|
|
@@ -6057,6 +7793,12 @@ interface GkmConfig {
|
|
|
6057
7793
|
name?: string;
|
|
6058
7794
|
/** The project's stages: which one is local, which deploy */
|
|
6059
7795
|
stages: StagesConfig;
|
|
7796
|
+
/** Encrypted secrets, and where deployed stages' secrets are stored */
|
|
7797
|
+
secrets?: SecretsConfig;
|
|
7798
|
+
/** What `gkm test` hands a feature test: where the factories are. */
|
|
7799
|
+
test?: TestConfig;
|
|
7800
|
+
/** How `gkm dev` is reached: the discovery endpoint's port and origins. */
|
|
7801
|
+
dev?: DevConfig;
|
|
6060
7802
|
/**
|
|
6061
7803
|
* Constructs glob pattern — one glob, every kind.
|
|
6062
7804
|
*
|
|
@@ -6068,7 +7810,6 @@ interface GkmConfig {
|
|
|
6068
7810
|
* @example './src/**\/*.ts'
|
|
6069
7811
|
*/
|
|
6070
7812
|
constructs: Routes;
|
|
6071
|
-
providers?: ProvidersConfig;
|
|
6072
7813
|
/**
|
|
6073
7814
|
* Server lifecycle hooks for customizing the Hono app.
|
|
6074
7815
|
* Allows adding custom routes, middleware, error handlers, etc.
|
|
@@ -6087,16 +7828,6 @@ interface GkmConfig {
|
|
|
6087
7828
|
* - A TelescopeConfig object for inline configuration
|
|
6088
7829
|
*/
|
|
6089
7830
|
telescope?: string | boolean | TelescopeConfig;
|
|
6090
|
-
/**
|
|
6091
|
-
* Studio configuration for database browsing.
|
|
6092
|
-
* Can be:
|
|
6093
|
-
* - A string path to a module that exports a Studio instance (recommended)
|
|
6094
|
-
* - A boolean to enable/disable with defaults
|
|
6095
|
-
* - A StudioConfig object for inline configuration
|
|
6096
|
-
*
|
|
6097
|
-
* Requires a database connection configured via services.
|
|
6098
|
-
*/
|
|
6099
|
-
studio?: string | boolean | StudioConfig;
|
|
6100
7831
|
/**
|
|
6101
7832
|
* OpenAPI generation configuration.
|
|
6102
7833
|
* Can be:
|
|
@@ -6159,7 +7890,11 @@ interface GkmConfig {
|
|
|
6159
7890
|
* a rename rather than a rewrite.
|
|
6160
7891
|
*/
|
|
6161
7892
|
deploy?: DeployConfig;
|
|
7893
|
+
/** Each deployed stage's base domain — the same field a workspace has. */
|
|
7894
|
+
domains?: DomainsConfig;
|
|
7895
|
+
/** Each root domain's DNS provider — the same field a workspace has. */
|
|
7896
|
+
dns?: WorkspaceDnsConfig;
|
|
6162
7897
|
}
|
|
6163
7898
|
//#endregion
|
|
6164
|
-
export {
|
|
6165
|
-
//# sourceMappingURL=types-
|
|
7899
|
+
export { TargetOptions as $, BackendFramework as A, Actor as At, isPhase2DeployTarget as B, SandboxOutput as Bt, SecretsConfig as C, chainCredentials as Ct, WorkspaceConfig as D, StateStore as Dt, StageTelemetryConfig as E, StateLocked as Et, SUPPORTED_DEPLOY_TARGETS as F, deployIdentity as Ft, DeployPhaseContext as G, validateWorkspaceConfig as H, SecretNameInvalid as Ht, WorkspaceConfigSchema as I, SECRETS_DIR_ENV as It, DeployTarget as J, DeployRuntime as K, formatValidationErrors as L, Sandbox as Lt, FrontendFramework as M, LocalActor as Mt, MobileFramework as N, StageSecrets as Nt, WorkspaceInput as O, StateVersionConflict as Ot, PHASE_2_DEPLOY_TARGETS as P, DeployIdentity as Pt, TargetEvent as Q, getDeployTargetError as R, SandboxCwdEscape as Rt, OtlpTelemetryConfig as S, StoredCredentialsOptions as St, SharedConfig as T, LocalStateInCi as Tt, AnyDeployTarget as U, confineCwd as Ut, safeValidateWorkspaceConfig as V, SandboxResult as Vt, DeployFailure as W, GkmError as Wt, DeployTargetEntry as X, DeployTargetCapabilities as Y, DeployTargetLogger as Z, InferredWorkspaceConfig as _, CredentialKind as _t, Routes as a, discover as at, NormalizedAppConfig as b, CredentialRequest as bt, AppInput as c, DeployEventError as ct, ConstrainedApps as d, ResourceChange as dt, TargetOptionsIssue as et, DeployConfig as f, ResourceVia as ft, InferAppNames as g, Credential as gt, DokployWorkspaceConfig as h, AwsCredential as ht, OpenApiConfig as i, DiscoverOptions as it, Framework as j, GithubActor as jt, isWorkspaceConfig as k, ReleasedImage as kt, AppsRecord as l, DeployEventType as lt, DevConfig as m, DeployResult as mt, EmailBackend as n, ConstructDiscoveryFailed as nt, AppConfig as o, isDeclarable as ot, DeployTargetName as p, AppDeployResult as pt, DeploySecrets as q, GkmConfig as r, ConstructsNotSerializable as rt, AppConfigInput as s, DeployEvent as st, CacheBackend as t, TargetOptionsSchema as tt, ComposeWorkspaceConfig as u, DeployPhase as ut, LoadedConfig as v, CredentialKinds as vt, SelfHostedTelemetryConfig as w, storedCredentials as wt, NormalizedWorkspace as x, MissingCredential as xt, ModelsConfig as y, CredentialProvider as yt, isDeployTargetSupported as z, SandboxExecOptions as zt };
|
|
7900
|
+
//# sourceMappingURL=types-xBx-07__.d.mts.map
|