@geekmidas/cli 10.0.0-alpha.91 → 10.0.0-alpha.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{EndpointGenerator-CVc6Oi1Y.mjs → EndpointGenerator-Bor2tZCm.mjs} +14 -4
- package/dist/EndpointGenerator-Bor2tZCm.mjs.map +1 -0
- package/dist/{EndpointGenerator-CwLjBCFE.cjs → EndpointGenerator-De03t1hd.cjs} +14 -4
- package/dist/EndpointGenerator-De03t1hd.cjs.map +1 -0
- package/dist/{GoDaddyProvider-DqZ1qD_F.cjs → GoDaddyProvider-BZb-V14e.cjs} +11 -10
- package/dist/GoDaddyProvider-BZb-V14e.cjs.map +1 -0
- package/dist/{GoDaddyProvider-DSStJVAv.mjs → GoDaddyProvider-Mi3vptSR.mjs} +11 -10
- package/dist/GoDaddyProvider-Mi3vptSR.mjs.map +1 -0
- package/dist/{HostingerProvider-BI6J7oJr.mjs → HostingerProvider-1mqD6aG8.mjs} +2 -2
- package/dist/{HostingerProvider-BI6J7oJr.mjs.map → HostingerProvider-1mqD6aG8.mjs.map} +1 -1
- package/dist/{HostingerProvider-CyTpG_jy.cjs → HostingerProvider-C6t-PSNe.cjs} +2 -2
- package/dist/{HostingerProvider-CyTpG_jy.cjs.map → HostingerProvider-C6t-PSNe.cjs.map} +1 -1
- package/dist/{LegacyStateStore-DXmNA7hy.cjs → LegacyStateStore-BlYXQQSE.cjs} +44 -10
- package/dist/LegacyStateStore-BlYXQQSE.cjs.map +1 -0
- package/dist/LegacyStateStore-CtwO7fwy.mjs +123 -0
- package/dist/LegacyStateStore-CtwO7fwy.mjs.map +1 -0
- package/dist/{LocalStateStore-CU-O0SBp.mjs → LocalStateStore-D40_SDmJ.mjs} +2 -2
- package/dist/{LocalStateStore-CU-O0SBp.mjs.map → LocalStateStore-D40_SDmJ.mjs.map} +1 -1
- package/dist/{LocalStateStore-BBeTlRTH.cjs → LocalStateStore-oX_zxj9V.cjs} +2 -2
- package/dist/{LocalStateStore-BBeTlRTH.cjs.map → LocalStateStore-oX_zxj9V.cjs.map} +1 -1
- package/dist/{OpenApiTsGenerator-B--HV-sW.cjs → OpenApiTsGenerator-CS_RtWOz.cjs} +2 -2
- package/dist/{OpenApiTsGenerator-B--HV-sW.cjs.map → OpenApiTsGenerator-CS_RtWOz.cjs.map} +1 -1
- package/dist/{OpenApiTsGenerator-CkvsPdgg.mjs → OpenApiTsGenerator-DWAF-7Fu.mjs} +2 -2
- package/dist/{OpenApiTsGenerator-CkvsPdgg.mjs.map → OpenApiTsGenerator-DWAF-7Fu.mjs.map} +1 -1
- package/dist/{S3StateStore-bwxcI_wQ.mjs → S3StateStore-BzS0IeSt.mjs} +2 -2
- package/dist/{S3StateStore-bwxcI_wQ.mjs.map → S3StateStore-BzS0IeSt.mjs.map} +1 -1
- package/dist/{S3StateStore-Br8VMY22.cjs → S3StateStore-DeI7jtvi.cjs} +2 -2
- package/dist/{S3StateStore-Br8VMY22.cjs.map → S3StateStore-DeI7jtvi.cjs.map} +1 -1
- package/dist/{SSMStateStore-DoZE1Wi1.cjs → SSMStateStore-CaCtrzFL.cjs} +2 -2
- package/dist/{SSMStateStore-DoZE1Wi1.cjs.map → SSMStateStore-CaCtrzFL.cjs.map} +1 -1
- package/dist/{SSMStateStore-CsOS0W1y.mjs → SSMStateStore-k_Ew7TWx.mjs} +2 -2
- package/dist/{SSMStateStore-CsOS0W1y.mjs.map → SSMStateStore-k_Ew7TWx.mjs.map} +1 -1
- package/dist/{SubscriberGenerator-BPqQf8fB.mjs → SubscriberGenerator-CyN2VF5X.mjs} +6 -5
- package/dist/SubscriberGenerator-CyN2VF5X.mjs.map +1 -0
- package/dist/{SubscriberGenerator-BVn7cQ-2.cjs → SubscriberGenerator-Dvz7EzqK.cjs} +6 -5
- package/dist/SubscriberGenerator-Dvz7EzqK.cjs.map +1 -0
- package/dist/{add-BSHk5Ngn.mjs → add-CP1podDH.mjs} +7 -7
- package/dist/add-CP1podDH.mjs.map +1 -0
- package/dist/{add-DmmBDV2e.cjs → add-VcyJnsPX.cjs} +8 -8
- package/dist/add-VcyJnsPX.cjs.map +1 -0
- package/dist/{aws-BTawF0F-.cjs → aws-BTReGjpY.cjs} +24 -6
- package/dist/aws-BTReGjpY.cjs.map +1 -0
- package/dist/{aws-B-6uEhgP.mjs → aws-Dz2bYxK1.mjs} +24 -6
- package/dist/aws-Dz2bYxK1.mjs.map +1 -0
- package/dist/awsStore-B5We7bMg.cjs +136 -0
- package/dist/awsStore-B5We7bMg.cjs.map +1 -0
- package/dist/awsStore-BWa1KNY-.mjs +119 -0
- package/dist/awsStore-BWa1KNY-.mjs.map +1 -0
- package/dist/{bundler-D6eBfVkl.mjs → bundler-BWrh-AJH.mjs} +5 -5
- package/dist/{bundler-D6eBfVkl.mjs.map → bundler-BWrh-AJH.mjs.map} +1 -1
- package/dist/{bundler-BQJiB7Ub.cjs → bundler-Dfsr6KXU.cjs} +5 -5
- package/dist/{bundler-BQJiB7Ub.cjs.map → bundler-Dfsr6KXU.cjs.map} +1 -1
- package/dist/{cli-DD-Yk-I5.mjs → cli-B8otnZfX.mjs} +6 -6
- package/dist/{cli-DD-Yk-I5.mjs.map → cli-B8otnZfX.mjs.map} +1 -1
- package/dist/{cli-BE9mqeX8.cjs → cli-DL19w4OE.cjs} +5 -5
- package/dist/{cli-BE9mqeX8.cjs.map → cli-DL19w4OE.cjs.map} +1 -1
- package/dist/compose-BHVKLluX.cjs +1523 -0
- package/dist/compose-BHVKLluX.cjs.map +1 -0
- package/dist/compose-DrEB_4F-.mjs +1476 -0
- package/dist/compose-DrEB_4F-.mjs.map +1 -0
- package/dist/{config-pST7E0CS.d.cts → config-CHX5GOo3.d.mts} +8 -8
- package/dist/{config-CdEcTrjG.d.mts.map → config-CHX5GOo3.d.mts.map} +1 -1
- package/dist/{config-CdEcTrjG.d.mts → config-DCCcrOSo.d.cts} +8 -8
- package/dist/{config-pST7E0CS.d.cts.map → config-DCCcrOSo.d.cts.map} +1 -1
- package/dist/config.cjs +8 -7
- package/dist/config.cjs.map +1 -1
- package/dist/config.d.cts +3 -3
- package/dist/config.d.mts +3 -3
- package/dist/config.mjs +8 -7
- package/dist/config.mjs.map +1 -1
- package/dist/{credentialSchemas-BJqRJNK4.mjs → credentialSchemas-BJFvfkaz.mjs} +5 -4
- package/dist/credentialSchemas-BJFvfkaz.mjs.map +1 -0
- package/dist/{credentialSchemas-DCR4Wd1W.cjs → credentialSchemas-CAPKFkrG.cjs} +5 -4
- package/dist/credentialSchemas-CAPKFkrG.cjs.map +1 -0
- package/dist/{credentials-CnVqoXMb.mjs → credentials-C4KII3PD.mjs} +3 -2
- package/dist/{credentials-CnVqoXMb.mjs.map → credentials-C4KII3PD.mjs.map} +1 -1
- package/dist/{credentials-BKfIugu2.cjs → credentials-QBu7VgaQ.cjs} +3 -2
- package/dist/credentials-QBu7VgaQ.cjs.map +1 -0
- package/dist/{databases-CzszQV0N.mjs → databases-BeGP5eDh.mjs} +11 -10
- package/dist/databases-BeGP5eDh.mjs.map +1 -0
- package/dist/{databases-BY-pEImp.cjs → databases-DGALFDG3.cjs} +11 -10
- package/dist/databases-DGALFDG3.cjs.map +1 -0
- package/dist/{define-DR8xGYfL.mjs → define-6poNqm5O.mjs} +12 -3
- package/dist/define-6poNqm5O.mjs.map +1 -0
- package/dist/{define-DzRz8FgH.cjs → define-crmMcXFS.cjs} +12 -3
- package/dist/define-crmMcXFS.cjs.map +1 -0
- package/dist/deploy/public.cjs +18 -16
- package/dist/deploy/public.cjs.map +1 -1
- package/dist/deploy/public.d.cts +31 -31
- package/dist/deploy/public.d.cts.map +1 -1
- package/dist/deploy/public.d.mts +31 -31
- package/dist/deploy/public.d.mts.map +1 -1
- package/dist/deploy/public.mjs +18 -17
- package/dist/deploy/public.mjs.map +1 -1
- package/dist/{deploy-CuHasEA4.cjs → deploy-C3Mhnmus.cjs} +15 -13
- package/dist/deploy-C3Mhnmus.cjs.map +1 -0
- package/dist/{deploy-QNtx_eWR.mjs → deploy-DYIyIUYd.mjs} +15 -13
- package/dist/deploy-DYIyIUYd.mjs.map +1 -0
- package/dist/{discover-D1It5r_h.cjs → discover-DPgu-ScS.cjs} +4 -3
- package/dist/discover-DPgu-ScS.cjs.map +1 -0
- package/dist/{discover-CU0paUyH.d.cts → discover-DqwlBVyY.d.mts} +2 -2
- package/dist/{discover-CU0paUyH.d.cts.map → discover-DqwlBVyY.d.mts.map} +1 -1
- package/dist/{discover-BPelzeGW.mjs → discover-qjFapetL.mjs} +4 -3
- package/dist/discover-qjFapetL.mjs.map +1 -0
- package/dist/{discover-DFiJxwfv.d.mts → discover-vk2r5giK.d.cts} +2 -2
- package/dist/{discover-DFiJxwfv.d.mts.map → discover-vk2r5giK.d.cts.map} +1 -1
- package/dist/{dokploy-CYcMLh9-.mjs → dokploy-o4I6vb9W.mjs} +3 -3
- package/dist/{dokploy-CYcMLh9-.mjs.map → dokploy-o4I6vb9W.mjs.map} +1 -1
- package/dist/{dokploy-DIowwyIB.cjs → dokploy-rivb1RFt.cjs} +3 -3
- package/dist/{dokploy-DIowwyIB.cjs.map → dokploy-rivb1RFt.cjs.map} +1 -1
- package/dist/{drivers-DTZzxeIl.mjs → drivers-CTaWrA_L.mjs} +2 -2
- package/dist/{drivers-DTZzxeIl.mjs.map → drivers-CTaWrA_L.mjs.map} +1 -1
- package/dist/{drivers-LYSdQDmd.cjs → drivers-DDojgzz0.cjs} +2 -2
- package/dist/{drivers-LYSdQDmd.cjs.map → drivers-DDojgzz0.cjs.map} +1 -1
- package/dist/{encryption-BrEef7Jk.mjs → encryption-B6ilrT7p.mjs} +7 -6
- package/dist/encryption-B6ilrT7p.mjs.map +1 -0
- package/dist/{encryption-CjYdUb2s.cjs → encryption-D7zmwzWz.cjs} +7 -6
- package/dist/encryption-D7zmwzWz.cjs.map +1 -0
- package/dist/{engine-BhJ7ZP9K.cjs → engine-Cfx8fEZU.cjs} +40 -28
- package/dist/engine-Cfx8fEZU.cjs.map +1 -0
- package/dist/{engine-2h4k5ICq.mjs → engine-DjEcovm-.mjs} +40 -28
- package/dist/engine-DjEcovm-.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-BCDF6xVH.mjs → github-CzBbs43W.mjs} +31 -9
- package/dist/github-CzBbs43W.mjs.map +1 -0
- package/dist/{github-B5Bw4HIu.cjs → github-zneTMvnO.cjs} +31 -9
- package/dist/github-zneTMvnO.cjs.map +1 -0
- package/dist/{index-YFNxR5Ns.d.mts → index-BiYU7cUl.d.mts} +6 -6
- package/dist/{index-D-F_hTDz.d.cts.map → index-BiYU7cUl.d.mts.map} +1 -1
- package/dist/{index-D-F_hTDz.d.cts → index-Dm6V9bwh.d.cts} +6 -6
- package/dist/{index-YFNxR5Ns.d.mts.map → index-Dm6V9bwh.d.cts.map} +1 -1
- package/dist/index.cjs +256 -346
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +252 -341
- package/dist/index.mjs.map +1 -1
- package/dist/{local-BjxDfPvy.cjs → local-B61kUh0w.cjs} +3 -3
- package/dist/{local-BjxDfPvy.cjs.map → local-B61kUh0w.cjs.map} +1 -1
- package/dist/{local-IuoIF3CT.mjs → local-Otp74ak0.mjs} +3 -3
- package/dist/{local-IuoIF3CT.mjs.map → local-Otp74ak0.mjs.map} +1 -1
- package/dist/{migrate-DWZz9kah.mjs → migrate-BaC4w0sb.mjs} +8 -7
- package/dist/migrate-BaC4w0sb.mjs.map +1 -0
- package/dist/{migrate-q2YYLJLE.cjs → migrate-C8wTpakT.cjs} +8 -7
- package/dist/migrate-C8wTpakT.cjs.map +1 -0
- package/dist/{migrate-DbtcuOr_.mjs → migrate-CsBZKALY.mjs} +9 -8
- package/dist/migrate-CsBZKALY.mjs.map +1 -0
- package/dist/{migrate-CGaancHY.cjs → migrate-DFjbGnSr.cjs} +8 -7
- package/dist/migrate-DFjbGnSr.cjs.map +1 -0
- package/dist/openapi.cjs +3 -3
- package/dist/openapi.d.cts +1 -10
- package/dist/openapi.d.cts.map +1 -1
- package/dist/openapi.d.mts +1 -10
- package/dist/openapi.d.mts.map +1 -1
- package/dist/openapi.mjs +3 -3
- package/dist/{provider-C9_-45d5.cjs → provider-BqpjG9QM.cjs} +4 -3
- package/dist/provider-BqpjG9QM.cjs.map +1 -0
- package/dist/{provider-q4lsYzYG.mjs → provider-CEOKk8NS.mjs} +4 -3
- package/dist/provider-CEOKk8NS.mjs.map +1 -0
- package/dist/{ready-BpNbORRB.cjs → ready-D3PIjx3S.cjs} +9 -8
- package/dist/ready-D3PIjx3S.cjs.map +1 -0
- package/dist/{ready-b6vm0-W-.mjs → ready-naOSJpeJ.mjs} +9 -8
- package/dist/ready-naOSJpeJ.mjs.map +1 -0
- package/dist/reconcile/public.cjs +1 -1
- package/dist/reconcile/public.d.cts +2 -2
- package/dist/reconcile/public.d.mts +2 -2
- package/dist/reconcile/public.mjs +1 -1
- package/dist/{reconcile-Dh1Jk7WE.mjs → reconcile--I7V4Klj.mjs} +2 -2
- package/dist/{reconcile-Dh1Jk7WE.mjs.map → reconcile--I7V4Klj.mjs.map} +1 -1
- package/dist/{resolve-DNg0icnh.mjs → resolve-Ccjlpnd9.mjs} +12 -11
- package/dist/resolve-Ccjlpnd9.mjs.map +1 -0
- package/dist/{resolve-Cns0v6dN.cjs → resolve-g8htuR80.cjs} +12 -11
- package/dist/resolve-g8htuR80.cjs.map +1 -0
- package/dist/{rollback-UIjS25F1.cjs → rollback--ympG9ss.cjs} +13 -11
- package/dist/rollback--ympG9ss.cjs.map +1 -0
- package/dist/{rollback-CFrNLmxs.mjs → rollback-Drbg0OeR.mjs} +13 -11
- package/dist/rollback-Drbg0OeR.mjs.map +1 -0
- package/dist/{runtime-CN_kmqxo.d.cts → runtime-D_J3ExJn.d.cts} +11 -19
- package/dist/runtime-D_J3ExJn.d.cts.map +1 -0
- package/dist/{runtime-Cjvon3oj.d.mts → runtime-_wEVtshH.d.mts} +11 -19
- package/dist/runtime-_wEVtshH.d.mts.map +1 -0
- package/dist/sandbox/credentials-worker.cjs +3 -3
- package/dist/sandbox/credentials-worker.mjs +3 -3
- package/dist/sandbox/discover-worker.cjs +1 -1
- package/dist/sandbox/discover-worker.mjs +1 -1
- package/dist/sandbox/migrate-worker.cjs +3 -3
- package/dist/sandbox/migrate-worker.mjs +3 -3
- package/dist/{sandbox-CL--ZDui.cjs → sandbox-CHv3OYXg.cjs} +4 -3
- package/dist/sandbox-CHv3OYXg.cjs.map +1 -0
- package/dist/{sandbox-M8UnLhXE.d.cts → sandbox-CPJq1Kia.d.mts} +4 -26
- package/dist/sandbox-CPJq1Kia.d.mts.map +1 -0
- package/dist/{sandbox-Dm247NGx.mjs → sandbox-CbVB7uOD.mjs} +4 -3
- package/dist/sandbox-CbVB7uOD.mjs.map +1 -0
- package/dist/{sandbox-M8UnLhXE.d.mts → sandbox-JwuPAl7I.d.cts} +4 -26
- package/dist/sandbox-JwuPAl7I.d.cts.map +1 -0
- package/dist/secrets-DJteijZo.cjs +47 -0
- package/dist/secrets-DJteijZo.cjs.map +1 -0
- package/dist/secrets-DbPmAS4k.mjs +36 -0
- package/dist/secrets-DbPmAS4k.mjs.map +1 -0
- package/dist/{secretsManager-Chs9VV2r.mjs → secretsManager-C6wm-9uZ.mjs} +24 -3
- package/dist/secretsManager-C6wm-9uZ.mjs.map +1 -0
- package/dist/{secretsManager-DcMlHnRC.cjs → secretsManager-Cwwgs81g.cjs} +24 -3
- package/dist/secretsManager-Cwwgs81g.cjs.map +1 -0
- package/dist/{seeds-odfgSCmu.mjs → seeds-BSL55F6q.mjs} +946 -107
- package/dist/seeds-BSL55F6q.mjs.map +1 -0
- package/dist/{seeds-CkIPFGNO.cjs → seeds-c-ByX9je.cjs} +1065 -130
- package/dist/seeds-c-ByX9je.cjs.map +1 -0
- package/dist/{sniffer-BTtX3NUM.mjs → sniffer-BTtGAtm3.mjs} +14 -8
- package/dist/sniffer-BTtGAtm3.mjs.map +1 -0
- package/dist/{sniffer-IAQEpsQb.cjs → sniffer-Dq5BS98f.cjs} +14 -8
- package/dist/{sniffer-IAQEpsQb.cjs.map → sniffer-Dq5BS98f.cjs.map} +1 -1
- package/dist/{sst-CJzvyrEz.mjs → sst-BaRXp2Dd.mjs} +18 -8
- package/dist/sst-BaRXp2Dd.mjs.map +1 -0
- package/dist/{sst-BgcOsaBi.cjs → sst-CnKY-CSh.cjs} +18 -8
- package/dist/sst-CnKY-CSh.cjs.map +1 -0
- package/dist/stack-1PeLJS2j.cjs +1346 -0
- package/dist/stack-1PeLJS2j.cjs.map +1 -0
- package/dist/stack-Co4uZkAo.mjs +1239 -0
- package/dist/stack-Co4uZkAo.mjs.map +1 -0
- package/dist/{stages-CUn6gvXL.cjs → stages-BI8JvPzI.cjs} +6 -5
- package/dist/stages-BI8JvPzI.cjs.map +1 -0
- package/dist/{stages-CnZRYmkI.mjs → stages-DY-fQKmo.mjs} +6 -5
- package/dist/stages-DY-fQKmo.mjs.map +1 -0
- package/dist/target/public.cjs +3 -3
- package/dist/target/public.d.cts +2 -2
- package/dist/target/public.d.mts +2 -2
- package/dist/target/public.mjs +3 -3
- package/dist/{terminal-DuapRxh6.cjs → terminal-8XngdSTo.cjs} +6 -5
- package/dist/terminal-8XngdSTo.cjs.map +1 -0
- package/dist/{terminal-D8TPK7o9.mjs → terminal-C4XRdwnU.mjs} +7 -6
- package/dist/terminal-C4XRdwnU.mjs.map +1 -0
- package/dist/{types-NqX1Hz4P.d.cts → types-B6lmD3en.d.mts} +94 -47
- package/dist/types-B6lmD3en.d.mts.map +1 -0
- package/dist/{types-ZHuZ89hv.d.mts → types-BibpiHKB.d.cts} +95 -46
- package/dist/types-BibpiHKB.d.cts.map +1 -0
- package/dist/vitest.cjs +1 -1
- package/dist/vitest.mjs +1 -1
- package/dist/workspace/index.cjs +1 -1
- package/dist/workspace/index.d.cts +2 -2
- package/dist/workspace/index.d.mts +2 -2
- package/dist/workspace/index.mjs +1 -1
- package/dist/{workspace-CJ0lKFq-.mjs → workspace-Bzw7Zs82.mjs} +34 -33
- package/dist/workspace-Bzw7Zs82.mjs.map +1 -0
- package/dist/{workspace-CwW3Gkru.cjs → workspace-CHOB2Xg3.cjs} +34 -33
- package/dist/workspace-CHOB2Xg3.cjs.map +1 -0
- package/package.json +15 -15
- package/dist/EndpointGenerator-CVc6Oi1Y.mjs.map +0 -1
- package/dist/EndpointGenerator-CwLjBCFE.cjs.map +0 -1
- package/dist/GoDaddyProvider-DSStJVAv.mjs.map +0 -1
- package/dist/GoDaddyProvider-DqZ1qD_F.cjs.map +0 -1
- package/dist/LegacyStateStore-DXmNA7hy.cjs.map +0 -1
- package/dist/LegacyStateStore-ZkdmiUFZ.mjs +0 -89
- package/dist/LegacyStateStore-ZkdmiUFZ.mjs.map +0 -1
- package/dist/SubscriberGenerator-BPqQf8fB.mjs.map +0 -1
- package/dist/SubscriberGenerator-BVn7cQ-2.cjs.map +0 -1
- package/dist/add-BSHk5Ngn.mjs.map +0 -1
- package/dist/add-DmmBDV2e.cjs.map +0 -1
- package/dist/aws-B-6uEhgP.mjs.map +0 -1
- package/dist/aws-BTawF0F-.cjs.map +0 -1
- package/dist/awsStore-7VmS_cZR.cjs +0 -54
- package/dist/awsStore-7VmS_cZR.cjs.map +0 -1
- package/dist/awsStore-B529csle.mjs +0 -43
- package/dist/awsStore-B529csle.mjs.map +0 -1
- package/dist/compose-Bhmf0n4o.mjs +0 -3140
- package/dist/compose-Bhmf0n4o.mjs.map +0 -1
- package/dist/compose-CvpU6ooi.cjs +0 -3265
- package/dist/compose-CvpU6ooi.cjs.map +0 -1
- package/dist/credentialSchemas-BJqRJNK4.mjs.map +0 -1
- package/dist/credentialSchemas-DCR4Wd1W.cjs.map +0 -1
- package/dist/credentials-BKfIugu2.cjs.map +0 -1
- package/dist/databases-BY-pEImp.cjs.map +0 -1
- package/dist/databases-CzszQV0N.mjs.map +0 -1
- package/dist/define-DR8xGYfL.mjs.map +0 -1
- package/dist/define-DzRz8FgH.cjs.map +0 -1
- package/dist/deploy-CuHasEA4.cjs.map +0 -1
- package/dist/deploy-QNtx_eWR.mjs.map +0 -1
- package/dist/discover-BPelzeGW.mjs.map +0 -1
- package/dist/discover-D1It5r_h.cjs.map +0 -1
- package/dist/encryption-BrEef7Jk.mjs.map +0 -1
- package/dist/encryption-CjYdUb2s.cjs.map +0 -1
- package/dist/engine-2h4k5ICq.mjs.map +0 -1
- package/dist/engine-BhJ7ZP9K.cjs.map +0 -1
- package/dist/github-B5Bw4HIu.cjs.map +0 -1
- package/dist/github-BCDF6xVH.mjs.map +0 -1
- package/dist/migrate-CGaancHY.cjs.map +0 -1
- package/dist/migrate-DWZz9kah.mjs.map +0 -1
- package/dist/migrate-DbtcuOr_.mjs.map +0 -1
- package/dist/migrate-q2YYLJLE.cjs.map +0 -1
- package/dist/provider-C9_-45d5.cjs.map +0 -1
- package/dist/provider-q4lsYzYG.mjs.map +0 -1
- package/dist/ready-BpNbORRB.cjs.map +0 -1
- package/dist/ready-b6vm0-W-.mjs.map +0 -1
- package/dist/resolve-Cns0v6dN.cjs.map +0 -1
- package/dist/resolve-DNg0icnh.mjs.map +0 -1
- package/dist/rollback-CFrNLmxs.mjs.map +0 -1
- package/dist/rollback-UIjS25F1.cjs.map +0 -1
- package/dist/runtime-CN_kmqxo.d.cts.map +0 -1
- package/dist/runtime-Cjvon3oj.d.mts.map +0 -1
- package/dist/sandbox-CL--ZDui.cjs.map +0 -1
- package/dist/sandbox-Dm247NGx.mjs.map +0 -1
- package/dist/sandbox-M8UnLhXE.d.cts.map +0 -1
- package/dist/sandbox-M8UnLhXE.d.mts.map +0 -1
- package/dist/secretsManager-Chs9VV2r.mjs.map +0 -1
- package/dist/secretsManager-DcMlHnRC.cjs.map +0 -1
- package/dist/seeds-CkIPFGNO.cjs.map +0 -1
- package/dist/seeds-odfgSCmu.mjs.map +0 -1
- package/dist/sniffer-BTtX3NUM.mjs.map +0 -1
- package/dist/sst-BgcOsaBi.cjs.map +0 -1
- package/dist/sst-CJzvyrEz.mjs.map +0 -1
- package/dist/stages-CUn6gvXL.cjs.map +0 -1
- package/dist/stages-CnZRYmkI.mjs.map +0 -1
- package/dist/terminal-D8TPK7o9.mjs.map +0 -1
- package/dist/terminal-DuapRxh6.cjs.map +0 -1
- package/dist/types-NqX1Hz4P.d.cts.map +0 -1
- package/dist/types-ZHuZ89hv.d.mts.map +0 -1
- package/dist/workspace-CJ0lKFq-.mjs.map +0 -1
- package/dist/workspace-CwW3Gkru.cjs.map +0 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
|
|
2
|
-
const
|
|
3
|
-
const
|
|
2
|
+
const require_errors = require("./errors-DMC4Umsb.cjs");
|
|
3
|
+
const require_credentials = require("./credentials-QBu7VgaQ.cjs");
|
|
4
|
+
const require_discover = require("./discover-DPgu-ScS.cjs");
|
|
4
5
|
const require_derive = require("./derive-DAbo49sm.cjs");
|
|
5
|
-
const require_workspace = require("./workspace-
|
|
6
|
+
const require_workspace = require("./workspace-CHOB2Xg3.cjs");
|
|
6
7
|
const require_config = require("./config.cjs");
|
|
7
|
-
const require_EndpointGenerator = require("./EndpointGenerator-
|
|
8
|
-
const require_SubscriberGenerator = require("./SubscriberGenerator-
|
|
9
|
-
const require_resolve = require("./resolve-
|
|
8
|
+
const require_EndpointGenerator = require("./EndpointGenerator-De03t1hd.cjs");
|
|
9
|
+
const require_SubscriberGenerator = require("./SubscriberGenerator-Dvz7EzqK.cjs");
|
|
10
|
+
const require_resolve = require("./resolve-g8htuR80.cjs");
|
|
10
11
|
let node_path = require("node:path");
|
|
11
12
|
let node_fs = require("node:fs");
|
|
12
13
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -66,7 +67,7 @@ function rootSite(sites) {
|
|
|
66
67
|
throw new AmbiguousRootSite(sites.map(({ name }) => name), declared.length > 1);
|
|
67
68
|
}
|
|
68
69
|
/** Several sites could hold the base domain, and none of them says it does. */
|
|
69
|
-
var AmbiguousRootSite = class extends
|
|
70
|
+
var AmbiguousRootSite = class extends require_errors.GkmError {
|
|
70
71
|
sites;
|
|
71
72
|
tooMany;
|
|
72
73
|
constructor(sites, tooMany = false) {
|
|
@@ -79,7 +80,7 @@ var AmbiguousRootSite = class extends Error {
|
|
|
79
80
|
//#endregion
|
|
80
81
|
//#region src/target/dokploy/domain.ts
|
|
81
82
|
/** A stage was deployed that `domains` gives no domain. */
|
|
82
|
-
var NoDomainForStage = class extends
|
|
83
|
+
var NoDomainForStage = class extends require_errors.GkmError {
|
|
83
84
|
stage;
|
|
84
85
|
constructor(stage) {
|
|
85
86
|
super(`No domain for stage "${stage}". Add it to gkm.config.ts: domains: { ${stage}: 'example.com' }.`);
|
|
@@ -170,7 +171,7 @@ const LOGS_PASSWORD_KEY = "ZO_ROOT_USER_PASSWORD";
|
|
|
170
171
|
*/
|
|
171
172
|
const LOCAL_LOGS_EMAIL = "admin@gkm.localhost";
|
|
172
173
|
/** A root password OpenObserve would refuse to start with. */
|
|
173
|
-
var LogsPasswordWeak = class extends
|
|
174
|
+
var LogsPasswordWeak = class extends require_errors.GkmError {
|
|
174
175
|
stage;
|
|
175
176
|
constructor(stage) {
|
|
176
177
|
super(`The stage '${stage}' sets ${LOGS_PASSWORD_KEY}, and OpenObserve refuses it: a root password must be 8 to 128 characters with a lowercase letter, an uppercase letter, a digit and a symbol. Set another with gkm secrets:set ${LOGS_PASSWORD_KEY} '…' --stage ${stage}, or unset it to have one generated.`);
|
|
@@ -179,7 +180,7 @@ var LogsPasswordWeak = class extends Error {
|
|
|
179
180
|
}
|
|
180
181
|
};
|
|
181
182
|
/** A deployed stage with logs on and no root password generated yet. */
|
|
182
|
-
var LogsPasswordMissing = class extends
|
|
183
|
+
var LogsPasswordMissing = class extends require_errors.GkmError {
|
|
183
184
|
stage;
|
|
184
185
|
constructor(stage) {
|
|
185
186
|
super(`The stage '${stage}' runs OpenObserve and has no ${LOGS_PASSWORD_KEY} in its secrets. Run gkm compose --stage ${stage} without --dry-run once to generate it, or set one: gkm secrets:set ${LOGS_PASSWORD_KEY} '…' --stage ${stage}`);
|
|
@@ -436,7 +437,7 @@ function validateEnvironmentVariables(requiredVars, secrets) {
|
|
|
436
437
|
* `DeployIdentity` is what a deploy names and claims its resources by instead.
|
|
437
438
|
*/
|
|
438
439
|
/** A namespace that cannot be part of a Dokploy name or an image path. */
|
|
439
|
-
var DeployNamespaceInvalid = class extends
|
|
440
|
+
var DeployNamespaceInvalid = class extends require_errors.GkmError {
|
|
440
441
|
namespace;
|
|
441
442
|
constructor(namespace) {
|
|
442
443
|
super(`deploy.namespace '${namespace}' is not usable as a name: use lowercase letters, digits and single '-' between them (e.g. 'acme' or 'acme-platform') in gkm.config.ts.`);
|
|
@@ -445,7 +446,7 @@ var DeployNamespaceInvalid = class extends Error {
|
|
|
445
446
|
}
|
|
446
447
|
};
|
|
447
448
|
/** A workspace name with nothing a target can name a resource by. */
|
|
448
|
-
var DeployProjectNameInvalid = class extends
|
|
449
|
+
var DeployProjectNameInvalid = class extends require_errors.GkmError {
|
|
449
450
|
workspaceName;
|
|
450
451
|
constructor(workspaceName) {
|
|
451
452
|
super(`The workspace name '${workspaceName}' has no letters or digits to name deployed resources by. Set "name" in gkm.config.ts.`);
|
|
@@ -551,7 +552,7 @@ function applicationName(identity, app) {
|
|
|
551
552
|
/** Key length for AES-256 encryption */
|
|
552
553
|
const KEY_LENGTH = 32;
|
|
553
554
|
/** A keystore project key that is not `<namespace>/<project>`. */
|
|
554
|
-
var KeystoreProjectInvalid = class extends
|
|
555
|
+
var KeystoreProjectInvalid = class extends require_errors.GkmError {
|
|
555
556
|
key;
|
|
556
557
|
constructor(key) {
|
|
557
558
|
super(`'${key}' is not a keystore project: expected '<namespace>/<project>' in lowercase letters, digits and '-', as deployIdentity() produces. Pass the workspace's identity key.`);
|
|
@@ -560,7 +561,7 @@ var KeystoreProjectInvalid = class extends Error {
|
|
|
560
561
|
}
|
|
561
562
|
};
|
|
562
563
|
/** A stage has no key, here or at the place keys used to be kept. */
|
|
563
|
-
var KeyNotFound = class extends
|
|
564
|
+
var KeyNotFound = class extends require_errors.GkmError {
|
|
564
565
|
stage;
|
|
565
566
|
project;
|
|
566
567
|
path;
|
|
@@ -757,7 +758,7 @@ var FileSecretsStore = class {
|
|
|
757
758
|
}
|
|
758
759
|
};
|
|
759
760
|
/** A stage's secrets file exists, and the key that opens it does not. */
|
|
760
|
-
var MissingSecretsKey = class extends
|
|
761
|
+
var MissingSecretsKey = class extends require_errors.GkmError {
|
|
761
762
|
stage;
|
|
762
763
|
project;
|
|
763
764
|
path;
|
|
@@ -832,7 +833,7 @@ async function storeFromConfig(workspace, config, options = {}) {
|
|
|
832
833
|
const profile = options.profile ? { profile: options.profile } : {};
|
|
833
834
|
switch (config.provider) {
|
|
834
835
|
case "ssm": {
|
|
835
|
-
const { AwsSecretsStore } = await Promise.resolve().then(() => require("./aws-
|
|
836
|
+
const { AwsSecretsStore } = await Promise.resolve().then(() => require("./aws-BTReGjpY.cjs")).then((n) => n.aws_exports);
|
|
836
837
|
return new AwsSecretsStore({
|
|
837
838
|
project: workspace.name,
|
|
838
839
|
region: config.region,
|
|
@@ -841,7 +842,7 @@ async function storeFromConfig(workspace, config, options = {}) {
|
|
|
841
842
|
}
|
|
842
843
|
case "secrets-manager": {
|
|
843
844
|
const { kmsKeyId } = config;
|
|
844
|
-
const { SecretsManagerSecretsStore } = await Promise.resolve().then(() => require("./secretsManager-
|
|
845
|
+
const { SecretsManagerSecretsStore } = await Promise.resolve().then(() => require("./secretsManager-Cwwgs81g.cjs")).then((n) => n.secretsManager_exports);
|
|
845
846
|
return new SecretsManagerSecretsStore({
|
|
846
847
|
project: workspace.name,
|
|
847
848
|
region: config.region,
|
|
@@ -1845,7 +1846,7 @@ function planFor(manifest, stage, order, options = {}) {
|
|
|
1845
1846
|
* code either way — declare a database, or select a backend that brings its own
|
|
1846
1847
|
* broker.
|
|
1847
1848
|
*/
|
|
1848
|
-
var CacheNeedsDatabase = class extends
|
|
1849
|
+
var CacheNeedsDatabase = class extends require_errors.GkmError {
|
|
1849
1850
|
ids;
|
|
1850
1851
|
constructor(ids) {
|
|
1851
1852
|
super(`A cache backed by the database needs a declared database, and none was declared, and on this deploy target that is where a cache lives. Declare one. Caches affected: ${ids.join(", ")}.`);
|
|
@@ -1864,7 +1865,7 @@ var CacheNeedsDatabase = class extends Error {
|
|
|
1864
1865
|
* `orders.cache('Sessions')` names the database, which is a fact about the
|
|
1865
1866
|
* application rather than a deployment choice.
|
|
1866
1867
|
*/
|
|
1867
|
-
var CacheIsAmbiguous = class extends
|
|
1868
|
+
var CacheIsAmbiguous = class extends require_errors.GkmError {
|
|
1868
1869
|
ids;
|
|
1869
1870
|
databases;
|
|
1870
1871
|
constructor(ids, databases) {
|
|
@@ -1874,7 +1875,7 @@ var CacheIsAmbiguous = class extends Error {
|
|
|
1874
1875
|
this.name = "CacheIsAmbiguous";
|
|
1875
1876
|
}
|
|
1876
1877
|
};
|
|
1877
|
-
var PgBossNeedsDatabase = class extends
|
|
1878
|
+
var PgBossNeedsDatabase = class extends require_errors.GkmError {
|
|
1878
1879
|
ids;
|
|
1879
1880
|
constructor(ids) {
|
|
1880
1881
|
super(`pg-boss keeps its queues in a declared database, and none was declared. Declare one: on this deploy target, events are carried by pg-boss. Queues and topics affected: ${ids.join(", ")}.`);
|
|
@@ -3130,7 +3131,7 @@ CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile
|
|
|
3130
3131
|
* prune` to one app's slice. Nothing is built on the host.
|
|
3131
3132
|
*/
|
|
3132
3133
|
/** A workspace of packages with no turbo.json, which every image prunes with. */
|
|
3133
|
-
var MonorepoNeedsTurbo = class extends
|
|
3134
|
+
var MonorepoNeedsTurbo = class extends require_errors.GkmError {
|
|
3134
3135
|
buildRoot;
|
|
3135
3136
|
constructor(buildRoot) {
|
|
3136
3137
|
super(`${buildRoot} is a workspace of packages, and its images are built from a turbo-pruned slice of it — but it has no turbo.json.\n\nTo fix this:
|
|
@@ -3669,7 +3670,7 @@ function schemaOf(resource, plan) {
|
|
|
3669
3670
|
* On SNS each topic and queue is its own address, so there is no project-wide
|
|
3670
3671
|
* one to hand out — a cron's schedule store, say, cannot live there.
|
|
3671
3672
|
*/
|
|
3672
|
-
var UnprovisionedEventsBackend = class extends
|
|
3673
|
+
var UnprovisionedEventsBackend = class extends require_errors.GkmError {
|
|
3673
3674
|
backend;
|
|
3674
3675
|
constructor(backend) {
|
|
3675
3676
|
super(`'${backend}' has no single broker address: each topic and queue is addressed by its own ARN. Something asked for one without naming the topic or queue.`);
|
|
@@ -4302,7 +4303,7 @@ const LEGACY_LOCAL_LOGIN = Object.freeze({
|
|
|
4302
4303
|
password: "geekmidas"
|
|
4303
4304
|
});
|
|
4304
4305
|
/** No login this workspace knows opens its Postgres. */
|
|
4305
|
-
var PostgresLoginRefused = class extends
|
|
4306
|
+
var PostgresLoginRefused = class extends require_errors.GkmError {
|
|
4306
4307
|
port;
|
|
4307
4308
|
user;
|
|
4308
4309
|
constructor(port, user) {
|
|
@@ -4313,7 +4314,7 @@ var PostgresLoginRefused = class extends Error {
|
|
|
4313
4314
|
}
|
|
4314
4315
|
};
|
|
4315
4316
|
/** No login this workspace knows opens its MinIO. */
|
|
4316
|
-
var MinioLoginRefused = class extends
|
|
4317
|
+
var MinioLoginRefused = class extends require_errors.GkmError {
|
|
4317
4318
|
port;
|
|
4318
4319
|
user;
|
|
4319
4320
|
constructor(port, user) {
|
|
@@ -4660,7 +4661,7 @@ async function heldElsewhere(kept, keys, observed, probe, ours) {
|
|
|
4660
4661
|
return held;
|
|
4661
4662
|
}
|
|
4662
4663
|
/** The window was exhausted. */
|
|
4663
|
-
var NoPortAvailable = class extends
|
|
4664
|
+
var NoPortAvailable = class extends require_errors.GkmError {
|
|
4664
4665
|
/** Where the search started. */
|
|
4665
4666
|
from;
|
|
4666
4667
|
/** The window searched, so the caller can report what was full. */
|
|
@@ -5406,7 +5407,7 @@ const REDIS_PASSWORD_KEY = "REDIS_PASSWORD";
|
|
|
5406
5407
|
/** Redis's own count of logical databases, before `--databases` raises it. */
|
|
5407
5408
|
const REDIS_DATABASES = 16;
|
|
5408
5409
|
/** A deployed stage that runs the stack's Redis and has no password yet. */
|
|
5409
|
-
var RedisPasswordMissing = class extends
|
|
5410
|
+
var RedisPasswordMissing = class extends require_errors.GkmError {
|
|
5410
5411
|
stage;
|
|
5411
5412
|
constructor(stage) {
|
|
5412
5413
|
super(`The stage '${stage}' runs the stack's Redis and has no ${REDIS_PASSWORD_KEY} in its secrets. Run gkm compose --stage ${stage} without --dry-run once to generate it, or set one: gkm secrets:set ${REDIS_PASSWORD_KEY} '…' --stage ${stage}`);
|
|
@@ -5640,7 +5641,7 @@ function localCredentialsPath(project) {
|
|
|
5640
5641
|
return (0, node_path.join)(project.home ?? require_credentials.gkmHome(), "local", namespace, `${name}.json`);
|
|
5641
5642
|
}
|
|
5642
5643
|
/** The local stage's logins file is there, and its key is not. */
|
|
5643
|
-
var LocalCredentialsKeyMissing = class extends
|
|
5644
|
+
var LocalCredentialsKeyMissing = class extends require_errors.GkmError {
|
|
5644
5645
|
path;
|
|
5645
5646
|
stage;
|
|
5646
5647
|
constructor(path, stage) {
|
|
@@ -5651,7 +5652,7 @@ var LocalCredentialsKeyMissing = class extends Error {
|
|
|
5651
5652
|
}
|
|
5652
5653
|
};
|
|
5653
5654
|
/** Another gkm held the logins file's lock for longer than any write takes. */
|
|
5654
|
-
var LocalCredentialsLocked = class extends
|
|
5655
|
+
var LocalCredentialsLocked = class extends require_errors.GkmError {
|
|
5655
5656
|
lock;
|
|
5656
5657
|
constructor(lock) {
|
|
5657
5658
|
super(`Another gkm has been writing the local logins for over ${LOCK_TIMEOUT_MS / 1e3}s. If none is running, remove ${lock} and run the command again.`);
|
|
@@ -6351,7 +6352,7 @@ export async function stopQueues(): Promise<void> {
|
|
|
6351
6352
|
* reached by building server images for a project that deploys to AWS — where
|
|
6352
6353
|
* a subscriber is a Lambda instead.
|
|
6353
6354
|
*/
|
|
6354
|
-
var WorkerSubscribersNeedPush = class extends
|
|
6355
|
+
var WorkerSubscribersNeedPush = class extends require_errors.GkmError {
|
|
6355
6356
|
worker;
|
|
6356
6357
|
subscribers;
|
|
6357
6358
|
constructor(worker, subscribers) {
|
|
@@ -6582,7 +6583,7 @@ logger.info({ port }, 'Worker started');
|
|
|
6582
6583
|
//#endregion
|
|
6583
6584
|
//#region src/build/workers.ts
|
|
6584
6585
|
/** A worker with background work and no backend app to build it from. */
|
|
6585
|
-
var WorkerHasNoApp = class extends
|
|
6586
|
+
var WorkerHasNoApp = class extends require_errors.GkmError {
|
|
6586
6587
|
worker;
|
|
6587
6588
|
constructor(worker) {
|
|
6588
6589
|
super(`The worker '${worker}' has crons, queues or subscribers, and the workspace has no backend app that builds a server to carry its entry. Declare a RestApi whose app holds the worker's code.`);
|
|
@@ -6591,7 +6592,7 @@ var WorkerHasNoApp = class extends Error {
|
|
|
6591
6592
|
}
|
|
6592
6593
|
};
|
|
6593
6594
|
/** A worker whose service name an app already has. */
|
|
6594
|
-
var WorkerNameTaken = class extends
|
|
6595
|
+
var WorkerNameTaken = class extends require_errors.GkmError {
|
|
6595
6596
|
worker;
|
|
6596
6597
|
service;
|
|
6597
6598
|
constructor(worker, service) {
|
|
@@ -6691,7 +6692,7 @@ const DEV_SERVICES = ["minio", "mailpit"];
|
|
|
6691
6692
|
*/
|
|
6692
6693
|
const STORAGE_KEY_PAIR = ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY"];
|
|
6693
6694
|
/** Dev services asked of a target that runs no containers. */
|
|
6694
|
-
var DevServicesNeedServerTarget = class extends
|
|
6695
|
+
var DevServicesNeedServerTarget = class extends require_errors.GkmError {
|
|
6695
6696
|
target;
|
|
6696
6697
|
constructor(target) {
|
|
6697
6698
|
super(`--allow-dev-services applies to server targets only, and '${target}' deploys to AWS, where a bucket is S3 and mail is the stage's own. Drop --allow-dev-services.`);
|
|
@@ -6704,7 +6705,7 @@ var DevServicesNeedServerTarget = class extends Error {
|
|
|
6704
6705
|
* switch now: every construct the stage does not account for gets its dev
|
|
6705
6706
|
* service.
|
|
6706
6707
|
*/
|
|
6707
|
-
var AllowDevServicesTakesNoValue = class extends
|
|
6708
|
+
var AllowDevServicesTakesNoValue = class extends require_errors.GkmError {
|
|
6708
6709
|
value;
|
|
6709
6710
|
constructor(value) {
|
|
6710
6711
|
super(`--allow-dev-services takes no value (it was given '${value}'). It runs the dev service for every bucket and mail the stage does not account for — no key in its secrets, no provider in deploy.<kind>.<stage> — so there is nothing to list. Pass --allow-dev-services on its own.`);
|
|
@@ -6732,7 +6733,7 @@ function assertDevServicesFlag(argv) {
|
|
|
6732
6733
|
* A deployed stage with mail or object storage that its secrets do not
|
|
6733
6734
|
* configure — every missing key, across every app, at once.
|
|
6734
6735
|
*/
|
|
6735
|
-
var ExternalServicesNotConfigured = class extends
|
|
6736
|
+
var ExternalServicesNotConfigured = class extends require_errors.GkmError {
|
|
6736
6737
|
stage;
|
|
6737
6738
|
missing;
|
|
6738
6739
|
constructor(stage, missing) {
|
|
@@ -6949,6 +6950,126 @@ function reportDevServices(ctx, uses) {
|
|
|
6949
6950
|
}
|
|
6950
6951
|
}
|
|
6951
6952
|
//#endregion
|
|
6953
|
+
//#region src/deploy/actor.ts
|
|
6954
|
+
/**
|
|
6955
|
+
* Who wrote a stage's deploy state: a GitHub Actions run, or a person at a
|
|
6956
|
+
* machine. Recorded on every state write (`updatedBy`), on every resource
|
|
6957
|
+
* record and on every release (`releasedBy`), so "who put this here" has an
|
|
6958
|
+
* answer that does not depend on anyone's memory.
|
|
6959
|
+
*/
|
|
6960
|
+
/** Whether `env` is a CI job — GitHub Actions or any runner that sets `CI`. */
|
|
6961
|
+
function isCi(env = process.env) {
|
|
6962
|
+
return env.GITHUB_ACTIONS === "true" || env.CI === "true";
|
|
6963
|
+
}
|
|
6964
|
+
/** Who this process is writing as. */
|
|
6965
|
+
function currentActor(env = process.env) {
|
|
6966
|
+
if (env.GITHUB_ACTIONS === "true") {
|
|
6967
|
+
const server = env.GITHUB_SERVER_URL ?? "https://github.com";
|
|
6968
|
+
return {
|
|
6969
|
+
kind: "github",
|
|
6970
|
+
actor: env.GITHUB_ACTOR ?? "unknown",
|
|
6971
|
+
run: `${server}/${env.GITHUB_REPOSITORY ?? "unknown"}/actions/runs/${env.GITHUB_RUN_ID ?? "unknown"}`,
|
|
6972
|
+
...env.GITHUB_WORKFLOW ? { workflow: env.GITHUB_WORKFLOW } : {}
|
|
6973
|
+
};
|
|
6974
|
+
}
|
|
6975
|
+
let user = "unknown";
|
|
6976
|
+
try {
|
|
6977
|
+
user = (0, node_os.userInfo)().username;
|
|
6978
|
+
} catch {}
|
|
6979
|
+
return {
|
|
6980
|
+
kind: "local",
|
|
6981
|
+
user,
|
|
6982
|
+
host: (0, node_os.hostname)()
|
|
6983
|
+
};
|
|
6984
|
+
}
|
|
6985
|
+
/** `octocat (deploy, https://github.com/…/runs/1)` or `ada@laptop`. */
|
|
6986
|
+
function describeActor(actor) {
|
|
6987
|
+
if (!actor) return "unknown";
|
|
6988
|
+
if (actor.kind === "local") return `${actor.user}@${actor.host}`;
|
|
6989
|
+
return `${actor.actor} (${actor.workflow ? `${actor.workflow}, ` : ""}${actor.run})`;
|
|
6990
|
+
}
|
|
6991
|
+
//#endregion
|
|
6992
|
+
//#region src/deploy/dnsResources.ts
|
|
6993
|
+
/** The resource type of a DNS record gkm wrote. */
|
|
6994
|
+
const DNS_RECORD_RESOURCE = "dns-record";
|
|
6995
|
+
/** A record's full name: `api.example.com`, or the domain for `@`. */
|
|
6996
|
+
function dnsRecordFqdn(domain, name) {
|
|
6997
|
+
return name === "@" || name === "" ? domain : `${name}.${domain}`;
|
|
6998
|
+
}
|
|
6999
|
+
/** `dns-record:<fqdn>:<type>` */
|
|
7000
|
+
function dnsResourceKey(fqdn, type) {
|
|
7001
|
+
return `${DNS_RECORD_RESOURCE}:${fqdn.toLowerCase()}:${type.toUpperCase()}`;
|
|
7002
|
+
}
|
|
7003
|
+
/** The resource record a written DNS record is kept as. */
|
|
7004
|
+
function dnsRecordResource(record) {
|
|
7005
|
+
const fqdn = dnsRecordFqdn(record.domain, record.name).toLowerCase();
|
|
7006
|
+
const type = record.type.toUpperCase();
|
|
7007
|
+
const data = {
|
|
7008
|
+
domain: record.domain,
|
|
7009
|
+
name: record.name,
|
|
7010
|
+
value: record.value,
|
|
7011
|
+
ttl: record.ttl,
|
|
7012
|
+
...record.provider ? { provider: record.provider } : {}
|
|
7013
|
+
};
|
|
7014
|
+
return {
|
|
7015
|
+
key: dnsResourceKey(fqdn, type),
|
|
7016
|
+
type: DNS_RECORD_RESOURCE,
|
|
7017
|
+
id: `${fqdn} ${type}`,
|
|
7018
|
+
status: "ready",
|
|
7019
|
+
data
|
|
7020
|
+
};
|
|
7021
|
+
}
|
|
7022
|
+
/** Records that gkm wrote `record` — or updates the value it holds. */
|
|
7023
|
+
async function recordDnsResource(journal, record) {
|
|
7024
|
+
const { key, type, id, data } = dnsRecordResource(record);
|
|
7025
|
+
await journal.ready({
|
|
7026
|
+
key,
|
|
7027
|
+
type,
|
|
7028
|
+
...data ? { data } : {}
|
|
7029
|
+
}, id);
|
|
7030
|
+
}
|
|
7031
|
+
/** Forgets a DNS record gkm deleted. */
|
|
7032
|
+
async function forgetDnsResource(journal, record) {
|
|
7033
|
+
await journal.forget(dnsResourceKey(dnsRecordFqdn(record.domain, record.name), record.type));
|
|
7034
|
+
}
|
|
7035
|
+
/**
|
|
7036
|
+
* The changes a DNS step made, kept: what it created, updated or wrote is
|
|
7037
|
+
* recorded, what it deleted is forgotten. A record it found already right is
|
|
7038
|
+
* recorded only if gkm wrote it before; one it left to a person is not.
|
|
7039
|
+
*/
|
|
7040
|
+
async function recordDnsChanges(journal, changes, providerOf) {
|
|
7041
|
+
for (const change of changes) {
|
|
7042
|
+
if (change.action === "delete") {
|
|
7043
|
+
await forgetDnsResource(journal, change);
|
|
7044
|
+
continue;
|
|
7045
|
+
}
|
|
7046
|
+
const written = change.action === "create" || change.action === "update" || change.action === "write";
|
|
7047
|
+
const known = change.action === "unchanged" && journal.record(dnsResourceKey(dnsRecordFqdn(change.domain, change.name), change.type)) !== void 0;
|
|
7048
|
+
if (!written && !known || change.value === void 0) continue;
|
|
7049
|
+
const provider = providerOf(change.domain);
|
|
7050
|
+
await recordDnsResource(journal, {
|
|
7051
|
+
domain: change.domain,
|
|
7052
|
+
name: change.name,
|
|
7053
|
+
type: change.type,
|
|
7054
|
+
value: change.value,
|
|
7055
|
+
ttl: change.ttl ?? 0,
|
|
7056
|
+
...provider ? { provider } : {}
|
|
7057
|
+
});
|
|
7058
|
+
}
|
|
7059
|
+
}
|
|
7060
|
+
/** Every DNS record gkm wrote for the stage, from its resource records. */
|
|
7061
|
+
function dnsResources(resources) {
|
|
7062
|
+
return Object.values(resources).filter((record) => record.type === DNS_RECORD_RESOURCE).map((record) => {
|
|
7063
|
+
const data = record.data ?? {};
|
|
7064
|
+
const [fqdn = "", type = ""] = (record.id ?? "").split(" ");
|
|
7065
|
+
return {
|
|
7066
|
+
...data,
|
|
7067
|
+
type,
|
|
7068
|
+
fqdn
|
|
7069
|
+
};
|
|
7070
|
+
}).sort((a, b) => a.fqdn.localeCompare(b.fqdn) || a.type.localeCompare(b.type));
|
|
7071
|
+
}
|
|
7072
|
+
//#endregion
|
|
6952
7073
|
//#region src/deploy/StateProvider.ts
|
|
6953
7074
|
/**
|
|
6954
7075
|
* Check if value is a StateProvider implementation.
|
|
@@ -6956,29 +7077,7 @@ function reportDevServices(ctx, uses) {
|
|
|
6956
7077
|
function isStateProvider(value) {
|
|
6957
7078
|
return typeof value === "object" && value !== null && typeof value.read === "function" && typeof value.write === "function";
|
|
6958
7079
|
}
|
|
6959
|
-
|
|
6960
|
-
//#region src/deploy/StateStore.ts
|
|
6961
|
-
/**
|
|
6962
|
-
* Deploy state store.
|
|
6963
|
-
*
|
|
6964
|
-
* `StateProvider` reads and writes a whole stage at once, with nothing to stop
|
|
6965
|
-
* two runs of the same stage from overwriting each other and nowhere to record
|
|
6966
|
-
* a resource the moment it exists. A `StateStore` adds the three things a
|
|
6967
|
-
* deploy needs to be safe against crashes and concurrent runs:
|
|
6968
|
-
*
|
|
6969
|
-
* - `lock(stage)`: one run per stage. A second gets `StateLocked`, naming the
|
|
6970
|
-
* holder, instead of racing the first.
|
|
6971
|
-
* - Versioned `read` and conditional `write`: a write names the version it was
|
|
6972
|
-
* based on, and raises `StateVersionConflict` when the stored state moved on
|
|
6973
|
-
* underneath it, so nothing is lost silently even without the lock.
|
|
6974
|
-
* - Per-resource records: `putResource` journals one resource at a time, so a
|
|
6975
|
-
* run that dies half way leaves behind the ids of everything it created.
|
|
6976
|
-
*
|
|
6977
|
-
* Built-in stores: `LocalStateStore`, `SSMStateStore`, `S3StateStore`. A
|
|
6978
|
-
* custom `StateProvider` is wrapped by `LegacyStateStore`, which keeps it
|
|
6979
|
-
* working but cannot lock.
|
|
6980
|
-
*/
|
|
6981
|
-
var StateLocked = class extends Error {
|
|
7080
|
+
var StateLocked = class extends require_errors.GkmError {
|
|
6982
7081
|
stage;
|
|
6983
7082
|
holder;
|
|
6984
7083
|
location;
|
|
@@ -6991,7 +7090,7 @@ var StateLocked = class extends Error {
|
|
|
6991
7090
|
this.name = "StateLocked";
|
|
6992
7091
|
}
|
|
6993
7092
|
};
|
|
6994
|
-
var StateVersionConflict = class extends
|
|
7093
|
+
var StateVersionConflict = class extends require_errors.GkmError {
|
|
6995
7094
|
stage;
|
|
6996
7095
|
expectedVersion;
|
|
6997
7096
|
actualVersion;
|
|
@@ -7003,7 +7102,7 @@ var StateVersionConflict = class extends Error {
|
|
|
7003
7102
|
this.name = "StateVersionConflict";
|
|
7004
7103
|
}
|
|
7005
7104
|
};
|
|
7006
|
-
var StageStateMissing = class extends
|
|
7105
|
+
var StageStateMissing = class extends require_errors.GkmError {
|
|
7007
7106
|
stage;
|
|
7008
7107
|
constructor(stage) {
|
|
7009
7108
|
super(`There is no deploy state for stage '${stage}' to record a resource in. Write the stage's state first (write with expectedVersion: null).`);
|
|
@@ -7011,7 +7110,7 @@ var StageStateMissing = class extends Error {
|
|
|
7011
7110
|
this.name = "StageStateMissing";
|
|
7012
7111
|
}
|
|
7013
7112
|
};
|
|
7014
|
-
var StateUnreadable = class extends
|
|
7113
|
+
var StateUnreadable = class extends require_errors.GkmError {
|
|
7015
7114
|
stage;
|
|
7016
7115
|
location;
|
|
7017
7116
|
constructor(stage, location, cause) {
|
|
@@ -7021,11 +7120,11 @@ var StateUnreadable = class extends Error {
|
|
|
7021
7120
|
this.name = "StateUnreadable";
|
|
7022
7121
|
}
|
|
7023
7122
|
};
|
|
7024
|
-
var StateSchemaTooNew = class extends
|
|
7123
|
+
var StateSchemaTooNew = class extends require_errors.GkmError {
|
|
7025
7124
|
stage;
|
|
7026
7125
|
schemaVersion;
|
|
7027
7126
|
constructor(stage, schemaVersion) {
|
|
7028
|
-
super(`Deploy state for stage '${stage}' has schema version ${String(schemaVersion)}, newer than this @geekmidas/cli understands (
|
|
7127
|
+
super(`Deploy state for stage '${stage}' has schema version ${String(schemaVersion)}, newer than this @geekmidas/cli understands (3). Upgrade @geekmidas/cli to the version that wrote it.`);
|
|
7029
7128
|
this.stage = stage;
|
|
7030
7129
|
this.schemaVersion = schemaVersion;
|
|
7031
7130
|
this.name = "StateSchemaTooNew";
|
|
@@ -7036,7 +7135,7 @@ var StateSchemaTooNew = class extends Error {
|
|
|
7036
7135
|
* in for a store, so a deploy that cannot be protected from a concurrent one
|
|
7037
7136
|
* says so.
|
|
7038
7137
|
*/
|
|
7039
|
-
var StateStoreWithoutLocking = class extends
|
|
7138
|
+
var StateStoreWithoutLocking = class extends require_errors.GkmError {
|
|
7040
7139
|
provider;
|
|
7041
7140
|
constructor(provider) {
|
|
7042
7141
|
super(`The custom state provider '${provider}' has no lock and no versions, so two deploys of the same stage can still overwrite each other. Implement StateStore (lock, versioned read, conditional write) or use the 'local', 'ssm' or 's3' state provider.`);
|
|
@@ -7044,7 +7143,7 @@ var StateStoreWithoutLocking = class extends Error {
|
|
|
7044
7143
|
this.name = "StateStoreWithoutLocking";
|
|
7045
7144
|
}
|
|
7046
7145
|
};
|
|
7047
|
-
var StateStoreNeedsWorkspaceName = class extends
|
|
7146
|
+
var StateStoreNeedsWorkspaceName = class extends require_errors.GkmError {
|
|
7048
7147
|
provider;
|
|
7049
7148
|
constructor(provider) {
|
|
7050
7149
|
super(`The '${provider}' state provider keys state by workspace name. Set "name" in gkm.config.ts.`);
|
|
@@ -7052,7 +7151,7 @@ var StateStoreNeedsWorkspaceName = class extends Error {
|
|
|
7052
7151
|
this.name = "StateStoreNeedsWorkspaceName";
|
|
7053
7152
|
}
|
|
7054
7153
|
};
|
|
7055
|
-
var UnknownStateProvider = class extends
|
|
7154
|
+
var UnknownStateProvider = class extends require_errors.GkmError {
|
|
7056
7155
|
config;
|
|
7057
7156
|
constructor(config) {
|
|
7058
7157
|
super(`Unknown state provider ${JSON.stringify(config)}. Use 'local', 'ssm', 's3', or an object implementing StateStore or StateProvider.`);
|
|
@@ -7060,8 +7159,24 @@ var UnknownStateProvider = class extends Error {
|
|
|
7060
7159
|
this.name = "UnknownStateProvider";
|
|
7061
7160
|
}
|
|
7062
7161
|
};
|
|
7162
|
+
/**
|
|
7163
|
+
* A deploy, setup or rollback of a stage in CI, with the stage's state kept on
|
|
7164
|
+
* the runner — which is discarded when the job ends.
|
|
7165
|
+
*/
|
|
7166
|
+
var LocalStateInCi = class extends require_errors.GkmError {
|
|
7167
|
+
stage;
|
|
7168
|
+
operation;
|
|
7169
|
+
region;
|
|
7170
|
+
constructor(stage, operation, region) {
|
|
7171
|
+
super(`\`gkm ${operation}\` would keep stage '${stage}'s deploy state in .gkm/ on this CI runner, and the runner is discarded when the job ends: the next run would start without it — no releases to roll back to, no record of what was created. Keep the state in AWS — in gkm.config.ts:\n\n state: { provider: 'ssm', region: '${region}' },\n\nthen move the state you already have, from the machine that holds it:\n\n gkm state:push --stage ${stage}\n`);
|
|
7172
|
+
this.stage = stage;
|
|
7173
|
+
this.operation = operation;
|
|
7174
|
+
this.region = region;
|
|
7175
|
+
this.name = "LocalStateInCi";
|
|
7176
|
+
}
|
|
7177
|
+
};
|
|
7063
7178
|
/** A lock or write that could not get at the state backend in time. */
|
|
7064
|
-
var StateStoreBusy = class extends
|
|
7179
|
+
var StateStoreBusy = class extends require_errors.GkmError {
|
|
7065
7180
|
stage;
|
|
7066
7181
|
location;
|
|
7067
7182
|
constructor(stage, location) {
|
|
@@ -7088,6 +7203,10 @@ function decodeDocument(stage, body, location) {
|
|
|
7088
7203
|
schemaVersion: 2,
|
|
7089
7204
|
document: parsed
|
|
7090
7205
|
};
|
|
7206
|
+
if (schemaVersion === 3) return {
|
|
7207
|
+
schemaVersion: 3,
|
|
7208
|
+
document: parsed
|
|
7209
|
+
};
|
|
7091
7210
|
throw new StateSchemaTooNew(stage, schemaVersion);
|
|
7092
7211
|
}
|
|
7093
7212
|
function encodeDocument(document) {
|
|
@@ -7127,6 +7246,79 @@ function migrateV1(stage, state) {
|
|
|
7127
7246
|
updatedAt: now
|
|
7128
7247
|
};
|
|
7129
7248
|
}
|
|
7249
|
+
const isEmpty = (value) => !value || Object.keys(value).length === 0;
|
|
7250
|
+
/**
|
|
7251
|
+
* Whether a v2 state in the Dokploy shape was written by the compose target.
|
|
7252
|
+
*
|
|
7253
|
+
* Before v3 every target wrote the Dokploy shape, and compose filled none of
|
|
7254
|
+
* its Dokploy fields. So the rule is the shape's content, not the target the
|
|
7255
|
+
* workspace names now: a state whose every Dokploy-only field is empty — no
|
|
7256
|
+
* project or environment id, no application or service ids, no credentials,
|
|
7257
|
+
* generated secrets, backups or registry — holds nothing only Dokploy could
|
|
7258
|
+
* use, and reading it as compose loses nothing. One with any of them was
|
|
7259
|
+
* written by Dokploy and is kept exactly as it is.
|
|
7260
|
+
*
|
|
7261
|
+
* The configured target is not used: a document decodes the same wherever it
|
|
7262
|
+
* is read (`state:show`, `state:push`) without a workspace, a stage can be
|
|
7263
|
+
* moved between targets, and `--target` can override a run.
|
|
7264
|
+
*/
|
|
7265
|
+
function writtenByCompose(state) {
|
|
7266
|
+
return !state.projectId && !state.environmentId && isEmpty(state.applications) && !state.services?.postgresId && !state.services?.redisId && isEmpty(state.appCredentials) && isEmpty(state.generatedSecrets) && !state.backups && !state.registryId;
|
|
7267
|
+
}
|
|
7268
|
+
/**
|
|
7269
|
+
* A v2 state and its records as v3 keeps them. A compose-written state
|
|
7270
|
+
* becomes the compose shape: its `dnsRecords` become `dns-record` resources,
|
|
7271
|
+
* and `dnsVerified` and the empty Dokploy fields go — the DNS check is made
|
|
7272
|
+
* on every deploy. A Dokploy state is returned as it is.
|
|
7273
|
+
*/
|
|
7274
|
+
function upgradeV2State(state, resources) {
|
|
7275
|
+
if (!writtenByCompose(state)) return {
|
|
7276
|
+
state,
|
|
7277
|
+
resources
|
|
7278
|
+
};
|
|
7279
|
+
const compose = {
|
|
7280
|
+
provider: "compose",
|
|
7281
|
+
stage: state.stage,
|
|
7282
|
+
lastDeployedAt: state.lastDeployedAt,
|
|
7283
|
+
...state.identity ? { identity: state.identity } : {},
|
|
7284
|
+
...state.releases ? { releases: state.releases } : {}
|
|
7285
|
+
};
|
|
7286
|
+
const upgraded = { ...resources };
|
|
7287
|
+
for (const record of Object.values(state.dnsRecords ?? {})) {
|
|
7288
|
+
const resource = migratedDnsResource(record);
|
|
7289
|
+
upgraded[resource.key] = resource;
|
|
7290
|
+
}
|
|
7291
|
+
return {
|
|
7292
|
+
state: compose,
|
|
7293
|
+
resources: upgraded
|
|
7294
|
+
};
|
|
7295
|
+
}
|
|
7296
|
+
/** A v2 `dnsRecords` entry as the `dns-record` resource v3 keeps. */
|
|
7297
|
+
function migratedDnsResource(record) {
|
|
7298
|
+
return {
|
|
7299
|
+
...dnsRecordResource({
|
|
7300
|
+
domain: record.domain,
|
|
7301
|
+
name: record.name,
|
|
7302
|
+
type: record.type,
|
|
7303
|
+
value: record.value,
|
|
7304
|
+
ttl: record.ttl
|
|
7305
|
+
}),
|
|
7306
|
+
updatedAt: record.createdAt
|
|
7307
|
+
};
|
|
7308
|
+
}
|
|
7309
|
+
/** A v2 document as v3 — not written until the next write. */
|
|
7310
|
+
function migrateV2(document) {
|
|
7311
|
+
const { state, resources } = upgradeV2State(document.state, document.resources);
|
|
7312
|
+
return {
|
|
7313
|
+
schemaVersion: 3,
|
|
7314
|
+
stage: document.stage,
|
|
7315
|
+
serial: document.serial,
|
|
7316
|
+
state,
|
|
7317
|
+
resources,
|
|
7318
|
+
updatedAt: document.updatedAt,
|
|
7319
|
+
history: []
|
|
7320
|
+
};
|
|
7321
|
+
}
|
|
7130
7322
|
function newLockHolder(options) {
|
|
7131
7323
|
let owner = "unknown";
|
|
7132
7324
|
try {
|
|
@@ -7145,14 +7337,33 @@ function contentVersion(body) {
|
|
|
7145
7337
|
return (0, node_crypto.createHash)("sha256").update(body).digest("hex").slice(0, 16);
|
|
7146
7338
|
}
|
|
7147
7339
|
/**
|
|
7340
|
+
* `history` with this write at its head. A run makes many writes — one per
|
|
7341
|
+
* resource it journals — so a run is one entry: a write by the run that
|
|
7342
|
+
* wrote the newest entry (the same lock) replaces it, and any other is
|
|
7343
|
+
* added. Without a lock, each write is its own entry.
|
|
7344
|
+
*/
|
|
7345
|
+
function appendHistory(history, entry, sameRun) {
|
|
7346
|
+
return [entry, ...sameRun ? history.slice(1) : history].slice(0, 20);
|
|
7347
|
+
}
|
|
7348
|
+
/**
|
|
7148
7349
|
* A store over a backend that can read and conditionally write one blob per
|
|
7149
|
-
* stage, and create a lock object only if it does not exist. Migration
|
|
7150
|
-
* resource records are the same for every such backend, so they
|
|
7350
|
+
* stage, and create a lock object only if it does not exist. Migration,
|
|
7351
|
+
* resource records and history are the same for every such backend, so they
|
|
7352
|
+
* live here.
|
|
7151
7353
|
*/
|
|
7152
7354
|
var DocumentStateStore = class {
|
|
7355
|
+
/** The lock this store holds for each stage — what its writes are for. */
|
|
7356
|
+
held = /* @__PURE__ */ new Map();
|
|
7357
|
+
/** Per stage, the lock whose run wrote the newest history entry. */
|
|
7358
|
+
logged = /* @__PURE__ */ new Map();
|
|
7359
|
+
/** Who this store writes as. */
|
|
7360
|
+
actor() {
|
|
7361
|
+
return currentActor();
|
|
7362
|
+
}
|
|
7153
7363
|
async lock(stage, options) {
|
|
7154
7364
|
const holder = newLockHolder(options);
|
|
7155
7365
|
await this.createLock(stage, holder);
|
|
7366
|
+
this.held.set(stage, holder);
|
|
7156
7367
|
let released = false;
|
|
7157
7368
|
return {
|
|
7158
7369
|
stage,
|
|
@@ -7160,6 +7371,7 @@ var DocumentStateStore = class {
|
|
|
7160
7371
|
release: async () => {
|
|
7161
7372
|
if (released) return;
|
|
7162
7373
|
released = true;
|
|
7374
|
+
if (this.held.get(stage)?.id === holder.id) this.held.delete(stage);
|
|
7163
7375
|
await this.removeLock(stage, holder);
|
|
7164
7376
|
}
|
|
7165
7377
|
};
|
|
@@ -7175,19 +7387,21 @@ var DocumentStateStore = class {
|
|
|
7175
7387
|
return {
|
|
7176
7388
|
state: current.document.state,
|
|
7177
7389
|
resources: current.document.resources,
|
|
7390
|
+
history: current.document.history,
|
|
7178
7391
|
version: current.version
|
|
7179
7392
|
};
|
|
7180
7393
|
}
|
|
7181
7394
|
async write(stage, state, options) {
|
|
7182
7395
|
if (options.expectedVersion === null) {
|
|
7183
|
-
const document = {
|
|
7184
|
-
schemaVersion:
|
|
7396
|
+
const document = this.stamp(stage, {
|
|
7397
|
+
schemaVersion: 3,
|
|
7185
7398
|
stage,
|
|
7186
7399
|
serial: 1,
|
|
7187
7400
|
state,
|
|
7188
7401
|
resources: {},
|
|
7189
|
-
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
7190
|
-
|
|
7402
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
7403
|
+
history: []
|
|
7404
|
+
});
|
|
7191
7405
|
return this.writeRaw(stage, encodeDocument(document), null);
|
|
7192
7406
|
}
|
|
7193
7407
|
return this.mutate(stage, options.expectedVersion, (document) => ({
|
|
@@ -7202,7 +7416,8 @@ var DocumentStateStore = class {
|
|
|
7202
7416
|
...document.resources,
|
|
7203
7417
|
[record.key]: {
|
|
7204
7418
|
...record,
|
|
7205
|
-
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
7419
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
7420
|
+
updatedBy: this.actor()
|
|
7206
7421
|
}
|
|
7207
7422
|
}
|
|
7208
7423
|
}));
|
|
@@ -7216,6 +7431,25 @@ var DocumentStateStore = class {
|
|
|
7216
7431
|
};
|
|
7217
7432
|
});
|
|
7218
7433
|
}
|
|
7434
|
+
/** `document` as this write leaves it: who wrote it, in its history. */
|
|
7435
|
+
stamp(stage, document) {
|
|
7436
|
+
const by = this.actor();
|
|
7437
|
+
const holder = this.held.get(stage);
|
|
7438
|
+
const operation = holder?.operation ?? "write";
|
|
7439
|
+
const history = document.history ?? [];
|
|
7440
|
+
const sameRun = holder !== void 0 && this.logged.get(stage) === holder.id && history[0]?.operation === operation;
|
|
7441
|
+
if (holder) this.logged.set(stage, holder.id);
|
|
7442
|
+
return {
|
|
7443
|
+
...document,
|
|
7444
|
+
updatedBy: by,
|
|
7445
|
+
history: appendHistory(history, {
|
|
7446
|
+
serial: document.serial,
|
|
7447
|
+
at: document.updatedAt,
|
|
7448
|
+
by,
|
|
7449
|
+
operation
|
|
7450
|
+
}, sameRun)
|
|
7451
|
+
};
|
|
7452
|
+
}
|
|
7219
7453
|
async mutate(stage, expectedVersion, change) {
|
|
7220
7454
|
const current = await this.readDocument(stage);
|
|
7221
7455
|
if (!current) {
|
|
@@ -7224,25 +7458,31 @@ var DocumentStateStore = class {
|
|
|
7224
7458
|
}
|
|
7225
7459
|
if (expectedVersion !== void 0 && current.version !== expectedVersion) throw new StateVersionConflict(stage, expectedVersion, current.version);
|
|
7226
7460
|
const next = change(current.document);
|
|
7461
|
+
next.schemaVersion = 3;
|
|
7227
7462
|
next.serial = current.document.serial + 1;
|
|
7228
7463
|
next.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
7229
|
-
return this.writeRaw(stage, encodeDocument(next), current.version);
|
|
7464
|
+
return this.writeRaw(stage, encodeDocument(this.stamp(stage, next)), current.version);
|
|
7230
7465
|
}
|
|
7231
7466
|
/**
|
|
7232
|
-
* Reads the stage's document
|
|
7233
|
-
*
|
|
7234
|
-
*
|
|
7467
|
+
* Reads the stage's document as v3. A v1 document is migrated in place on
|
|
7468
|
+
* the way — itself a conditional write: if another run migrated (or wrote)
|
|
7469
|
+
* first, its result is read instead. A v2 document is upgraded in memory
|
|
7470
|
+
* and written as v3 by the next write.
|
|
7235
7471
|
*/
|
|
7236
7472
|
async readDocument(stage, attempt = 0) {
|
|
7237
7473
|
const raw = await this.readRaw(stage);
|
|
7238
7474
|
if (!raw) return null;
|
|
7239
7475
|
const decoded = decodeDocument(stage, raw.body, this.location(stage));
|
|
7240
|
-
if (decoded.schemaVersion ===
|
|
7476
|
+
if (decoded.schemaVersion === 3) return {
|
|
7241
7477
|
document: decoded.document,
|
|
7242
7478
|
version: raw.version
|
|
7243
7479
|
};
|
|
7480
|
+
if (decoded.schemaVersion === 2) return {
|
|
7481
|
+
document: migrateV2(decoded.document),
|
|
7482
|
+
version: raw.version
|
|
7483
|
+
};
|
|
7244
7484
|
await this.writeV1Backup(stage, raw.body);
|
|
7245
|
-
const document = migrateV1(stage, decoded.state);
|
|
7485
|
+
const document = this.stamp(stage, migrateV2(migrateV1(stage, decoded.state)));
|
|
7246
7486
|
try {
|
|
7247
7487
|
return {
|
|
7248
7488
|
document,
|
|
@@ -7254,6 +7494,22 @@ var DocumentStateStore = class {
|
|
|
7254
7494
|
}
|
|
7255
7495
|
}
|
|
7256
7496
|
};
|
|
7497
|
+
/** Whether `config` keeps state on this machine — `local`, or none given. */
|
|
7498
|
+
function isLocalState(config) {
|
|
7499
|
+
return !config || config.provider === "local";
|
|
7500
|
+
}
|
|
7501
|
+
/**
|
|
7502
|
+
* Refuses, with `LocalStateInCi`, a run that would write a deployed stage's
|
|
7503
|
+
* state to a CI runner's disk — the local stage, which runs on the runner
|
|
7504
|
+
* itself, is exempt. Local use is untouched. The region the message
|
|
7505
|
+
* suggests is the secrets store's, when the workspace keeps them in AWS.
|
|
7506
|
+
*/
|
|
7507
|
+
function assertStateOutlivesRun(workspace, stage, operation, env = process.env) {
|
|
7508
|
+
if (stage === workspace.stages?.local) return;
|
|
7509
|
+
if (!isCi(env) || !isLocalState(workspace.state)) return;
|
|
7510
|
+
const store = workspace.secrets?.store;
|
|
7511
|
+
throw new LocalStateInCi(stage, operation, typeof store === "object" && store && typeof store.region === "string" ? store.region : "<region>");
|
|
7512
|
+
}
|
|
7257
7513
|
function isStateStore(value) {
|
|
7258
7514
|
return typeof value === "object" && value !== null && typeof value.lock === "function" && typeof value.read === "function" && typeof value.write === "function" && typeof value.putResource === "function";
|
|
7259
7515
|
}
|
|
@@ -7270,17 +7526,17 @@ function isStateStore(value) {
|
|
|
7270
7526
|
async function createStateStore(options) {
|
|
7271
7527
|
const { config, workspaceRoot, workspaceName } = options;
|
|
7272
7528
|
if (!config || config.provider === "local") {
|
|
7273
|
-
const { LocalStateStore } = await Promise.resolve().then(() => require("./LocalStateStore-
|
|
7529
|
+
const { LocalStateStore } = await Promise.resolve().then(() => require("./LocalStateStore-oX_zxj9V.cjs")).then((n) => n.LocalStateStore_exports);
|
|
7274
7530
|
return new LocalStateStore(workspaceRoot);
|
|
7275
7531
|
}
|
|
7276
7532
|
if (isStateStore(config.provider)) return config.provider;
|
|
7277
7533
|
if (isStateProvider(config.provider)) {
|
|
7278
|
-
const { LegacyStateStore } = await Promise.resolve().then(() => require("./LegacyStateStore-
|
|
7534
|
+
const { LegacyStateStore } = await Promise.resolve().then(() => require("./LegacyStateStore-BlYXQQSE.cjs"));
|
|
7279
7535
|
return new LegacyStateStore(config.provider, { warn: options.warn });
|
|
7280
7536
|
}
|
|
7281
7537
|
if (config.provider === "ssm") {
|
|
7282
7538
|
if (!workspaceName) throw new StateStoreNeedsWorkspaceName("ssm");
|
|
7283
|
-
const { SSMStateStore } = await Promise.resolve().then(() => require("./SSMStateStore-
|
|
7539
|
+
const { SSMStateStore } = await Promise.resolve().then(() => require("./SSMStateStore-CaCtrzFL.cjs"));
|
|
7284
7540
|
const ssm = config;
|
|
7285
7541
|
return SSMStateStore.create({
|
|
7286
7542
|
workspaceName,
|
|
@@ -7290,7 +7546,7 @@ async function createStateStore(options) {
|
|
|
7290
7546
|
}
|
|
7291
7547
|
if (config.provider === "s3") {
|
|
7292
7548
|
if (!workspaceName) throw new StateStoreNeedsWorkspaceName("s3");
|
|
7293
|
-
const { S3StateStore } = await Promise.resolve().then(() => require("./S3StateStore-
|
|
7549
|
+
const { S3StateStore } = await Promise.resolve().then(() => require("./S3StateStore-DeI7jtvi.cjs"));
|
|
7294
7550
|
const s3 = config;
|
|
7295
7551
|
return S3StateStore.create({
|
|
7296
7552
|
workspaceName,
|
|
@@ -7325,7 +7581,7 @@ async function createDnsProvider(options) {
|
|
|
7325
7581
|
if (isDnsProvider(config.provider)) return config.provider;
|
|
7326
7582
|
const provider = config.provider;
|
|
7327
7583
|
if (provider === "hostinger") {
|
|
7328
|
-
const { HostingerProvider } = await Promise.resolve().then(() => require("./HostingerProvider-
|
|
7584
|
+
const { HostingerProvider } = await Promise.resolve().then(() => require("./HostingerProvider-C6t-PSNe.cjs"));
|
|
7329
7585
|
return new HostingerProvider();
|
|
7330
7586
|
}
|
|
7331
7587
|
if (provider === "route53") {
|
|
@@ -7338,7 +7594,7 @@ async function createDnsProvider(options) {
|
|
|
7338
7594
|
});
|
|
7339
7595
|
}
|
|
7340
7596
|
if (provider === "godaddy") {
|
|
7341
|
-
const { GoDaddyProvider } = await Promise.resolve().then(() => require("./GoDaddyProvider-
|
|
7597
|
+
const { GoDaddyProvider } = await Promise.resolve().then(() => require("./GoDaddyProvider-BZb-V14e.cjs"));
|
|
7342
7598
|
return new GoDaddyProvider(options.godaddy ?? {});
|
|
7343
7599
|
}
|
|
7344
7600
|
if (provider === "cloudflare") throw new DnsProviderNotImplemented("cloudflare");
|
|
@@ -7349,7 +7605,7 @@ async function createDnsProvider(options) {
|
|
|
7349
7605
|
* scoped to updates only. What reads them falls back to writing every record,
|
|
7350
7606
|
* which is idempotent, without a diff.
|
|
7351
7607
|
*/
|
|
7352
|
-
var DnsRecordsUnreadable = class extends
|
|
7608
|
+
var DnsRecordsUnreadable = class extends require_errors.GkmError {
|
|
7353
7609
|
provider;
|
|
7354
7610
|
domain;
|
|
7355
7611
|
reason;
|
|
@@ -7371,7 +7627,7 @@ var DnsProviderNotImplemented = class extends Error {
|
|
|
7371
7627
|
}
|
|
7372
7628
|
};
|
|
7373
7629
|
/** A `provider:` that is none of the built-ins, nor a DnsProvider object. */
|
|
7374
|
-
var DnsProviderUnknown = class extends
|
|
7630
|
+
var DnsProviderUnknown = class extends require_errors.GkmError {
|
|
7375
7631
|
config;
|
|
7376
7632
|
constructor(config) {
|
|
7377
7633
|
super(`Unknown DNS provider: ${JSON.stringify(config)}. dns takes 'route53', 'godaddy', 'hostinger', 'manual', or an object implementing DnsProvider.`);
|
|
@@ -7382,10 +7638,16 @@ var DnsProviderUnknown = class extends Error {
|
|
|
7382
7638
|
//#endregion
|
|
7383
7639
|
//#region src/deploy/state.ts
|
|
7384
7640
|
/**
|
|
7385
|
-
*
|
|
7641
|
+
* A stage's deploy state.
|
|
7642
|
+
*
|
|
7643
|
+
* Every target records the same core — when the stage was last deployed, by
|
|
7644
|
+
* which identity, and each app's releases — and a target that keeps ids of
|
|
7645
|
+
* its own adds them in a shape of its own, told apart by `provider`:
|
|
7386
7646
|
*
|
|
7387
|
-
*
|
|
7388
|
-
*
|
|
7647
|
+
* - `dokploy`: the project, applications, services and credentials Dokploy
|
|
7648
|
+
* gave the stage, so a later deploy updates them rather than making more.
|
|
7649
|
+
* - `compose`: nothing beyond the core. A compose stage is one stack on one
|
|
7650
|
+
* server; what it created elsewhere (DNS records) is a resource record.
|
|
7389
7651
|
*/
|
|
7390
7652
|
/**
|
|
7391
7653
|
* Create a new empty state for a stage
|
|
@@ -7401,6 +7663,31 @@ function createEmptyState(stage, projectId, environmentId) {
|
|
|
7401
7663
|
lastDeployedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
7402
7664
|
};
|
|
7403
7665
|
}
|
|
7666
|
+
/** A new compose stage's state. */
|
|
7667
|
+
function createComposeState(stage) {
|
|
7668
|
+
return {
|
|
7669
|
+
provider: "compose",
|
|
7670
|
+
stage,
|
|
7671
|
+
lastDeployedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
7672
|
+
};
|
|
7673
|
+
}
|
|
7674
|
+
/**
|
|
7675
|
+
* `state` as the Dokploy target keeps it. A stage whose state another target
|
|
7676
|
+
* wrote — one moved from compose to Dokploy — keeps its core (releases,
|
|
7677
|
+
* identity) and starts with no Dokploy ids, as a first deploy would.
|
|
7678
|
+
*/
|
|
7679
|
+
function asDokployState(state) {
|
|
7680
|
+
if (state.provider === "dokploy") return state;
|
|
7681
|
+
const { provider: _provider, ...core } = state;
|
|
7682
|
+
return {
|
|
7683
|
+
...core,
|
|
7684
|
+
provider: "dokploy",
|
|
7685
|
+
projectId: "",
|
|
7686
|
+
environmentId: "",
|
|
7687
|
+
applications: {},
|
|
7688
|
+
services: {}
|
|
7689
|
+
};
|
|
7690
|
+
}
|
|
7404
7691
|
/**
|
|
7405
7692
|
* Set application ID in state (mutates state)
|
|
7406
7693
|
*/
|
|
@@ -7420,12 +7707,13 @@ function restorable(history, index, current) {
|
|
|
7420
7707
|
* `current`, and what was current becomes `previous`. Releasing what already
|
|
7421
7708
|
* runs — a redeploy of the same digest — changes nothing.
|
|
7422
7709
|
*/
|
|
7423
|
-
function recordRelease(state, appName, image, releasedAt = /* @__PURE__ */ new Date()) {
|
|
7710
|
+
function recordRelease(state, appName, image, by, releasedAt = /* @__PURE__ */ new Date()) {
|
|
7424
7711
|
const releases = state.releases?.[appName];
|
|
7425
7712
|
if (releases && sameImage(releases.current, image)) return;
|
|
7426
7713
|
const entry = {
|
|
7427
7714
|
...image,
|
|
7428
|
-
releasedAt: releasedAt.toISOString()
|
|
7715
|
+
releasedAt: releasedAt.toISOString(),
|
|
7716
|
+
releasedBy: by
|
|
7429
7717
|
};
|
|
7430
7718
|
const history = [entry, ...releases?.history ?? []].slice(0, 10);
|
|
7431
7719
|
const previous = releases?.current;
|
|
@@ -7873,6 +8161,422 @@ async function verifyDnsRecords(appHostnames, serverIp, state) {
|
|
|
7873
8161
|
return results;
|
|
7874
8162
|
}
|
|
7875
8163
|
//#endregion
|
|
8164
|
+
//#region src/compose/dns.ts
|
|
8165
|
+
/**
|
|
8166
|
+
* A compose stage's DNS: the records its public hosts need, and the check that
|
|
8167
|
+
* they resolve to its server before a certificate is asked for.
|
|
8168
|
+
*
|
|
8169
|
+
* - **The server** (`serverAddress`): the stage's own secrets hold its public
|
|
8170
|
+
* addresses — `GKM_SERVER_IPV4`, and `GKM_SERVER_IPV6` where it has one.
|
|
8171
|
+
* Reserved for gkm: never handed to an app.
|
|
8172
|
+
* - **The plan** (`planStackDns`, pure): every public host the stack serves —
|
|
8173
|
+
* its apex, each app, each file server, the public log UI — pointed at the
|
|
8174
|
+
* server. An A record per host (and an AAAA with an IPv6 address), or, where
|
|
8175
|
+
* the domain's `dns` entry says `records: { mode: 'cname', target }`, one A
|
|
8176
|
+
* record for the target and a CNAME to it for every other host but the
|
|
8177
|
+
* apex, which DNS forbids a CNAME at.
|
|
8178
|
+
* - **Applying it** (`applyStackDns`): through the domain's provider in `dns`,
|
|
8179
|
+
* a record set at a time. A record with the right value is left alone; one
|
|
8180
|
+
* with another value is replaced and the change printed. A `manual` domain
|
|
8181
|
+
* is printed and nothing else. A dry run reads, prints and writes nothing.
|
|
8182
|
+
* - **The check** (`checkStackDns`): each host resolved with the system
|
|
8183
|
+
* resolver. One that is not the server stops the deploy with
|
|
8184
|
+
* {@link HostNotPointingAtServer}, before Caddy or Traefik ask Let's Encrypt
|
|
8185
|
+
* for a certificate it cannot get — and use up the rate limit trying.
|
|
8186
|
+
*/
|
|
8187
|
+
/** The line that says how to set the server's address. */
|
|
8188
|
+
function serverAddressHint(stage) {
|
|
8189
|
+
return `gkm secrets:set ${require_workspace.SERVER_IPV4_KEY} '<ip>' --stage ${stage}`;
|
|
8190
|
+
}
|
|
8191
|
+
/** A server address in the stage's secrets that is not an address. */
|
|
8192
|
+
var ServerAddressInvalid = class extends require_errors.GkmError {
|
|
8193
|
+
stage;
|
|
8194
|
+
key;
|
|
8195
|
+
value;
|
|
8196
|
+
constructor(stage, key, value) {
|
|
8197
|
+
const ipv4 = key === require_workspace.SERVER_IPV4_KEY;
|
|
8198
|
+
super(`${key} in the '${stage}' stage's secrets is ${JSON.stringify(value)}, which is not an ${ipv4 ? "IPv4 address (like 203.0.113.10)" : "IPv6 address (like 2001:db8::10)"}. Set the server's public address: gkm secrets:set ${key} '<ip>' --stage ${stage}.`);
|
|
8199
|
+
this.stage = stage;
|
|
8200
|
+
this.key = key;
|
|
8201
|
+
this.value = value;
|
|
8202
|
+
this.name = "ServerAddressInvalid";
|
|
8203
|
+
}
|
|
8204
|
+
};
|
|
8205
|
+
/**
|
|
8206
|
+
* A compose stage that serves real domains with no server address: its hosts
|
|
8207
|
+
* cannot be pointed or checked, and a certificate would be asked for blind.
|
|
8208
|
+
*/
|
|
8209
|
+
var ServerAddressMissing = class extends require_errors.GkmError {
|
|
8210
|
+
stage;
|
|
8211
|
+
domain;
|
|
8212
|
+
constructor(stage, domain) {
|
|
8213
|
+
super(`The '${stage}' stage serves ${domain} and its secrets hold no ${require_workspace.SERVER_IPV4_KEY} — the public address of the server its stack runs on, which its hosts' DNS records point at and every deploy checks before asking for certificates. Set it: ${serverAddressHint(stage)} (and ${require_workspace.SERVER_IPV6_KEY} for an IPv6 address).`);
|
|
8214
|
+
this.stage = stage;
|
|
8215
|
+
this.domain = domain;
|
|
8216
|
+
this.name = "ServerAddressMissing";
|
|
8217
|
+
}
|
|
8218
|
+
};
|
|
8219
|
+
/**
|
|
8220
|
+
* The server's address from the stage's secrets, checked — `undefined` when
|
|
8221
|
+
* `GKM_SERVER_IPV4` is not set.
|
|
8222
|
+
*
|
|
8223
|
+
* @throws {ServerAddressInvalid} for a value that is not an address
|
|
8224
|
+
*/
|
|
8225
|
+
function serverAddress(stage, custom) {
|
|
8226
|
+
const ipv4 = custom?.[require_workspace.SERVER_IPV4_KEY]?.trim();
|
|
8227
|
+
const ipv6 = custom?.[require_workspace.SERVER_IPV6_KEY]?.trim();
|
|
8228
|
+
if (ipv6 && !(0, node_net.isIPv6)(ipv6)) throw new ServerAddressInvalid(stage, require_workspace.SERVER_IPV6_KEY, ipv6);
|
|
8229
|
+
if (!ipv4) return void 0;
|
|
8230
|
+
if (!(0, node_net.isIPv4)(ipv4)) throw new ServerAddressInvalid(stage, require_workspace.SERVER_IPV4_KEY, ipv4);
|
|
8231
|
+
return {
|
|
8232
|
+
ipv4,
|
|
8233
|
+
...ipv6 ? { ipv6 } : {}
|
|
8234
|
+
};
|
|
8235
|
+
}
|
|
8236
|
+
/**
|
|
8237
|
+
* A name that resolves to this machine by definition — `localhost` and every
|
|
8238
|
+
* `*.localhost` — and is in nobody's DNS.
|
|
8239
|
+
*/
|
|
8240
|
+
function isLocalHost(host) {
|
|
8241
|
+
const name = host.toLowerCase().replace(/\.$/, "");
|
|
8242
|
+
return name === "localhost" || name.endsWith(".localhost");
|
|
8243
|
+
}
|
|
8244
|
+
/**
|
|
8245
|
+
* The server's address, required where the stage serves real domains — not
|
|
8246
|
+
* `*.localhost` ones, which point at this machine already.
|
|
8247
|
+
*
|
|
8248
|
+
* @throws {ServerAddressMissing} when the stage has a domain and no address
|
|
8249
|
+
* @throws {ServerAddressInvalid} for a value that is not an address
|
|
8250
|
+
*/
|
|
8251
|
+
function requiredServerAddress(stage, domain, custom) {
|
|
8252
|
+
const server = serverAddress(stage, custom);
|
|
8253
|
+
if (!server && domain && !isLocalHost(domain)) throw new ServerAddressMissing(stage, domain);
|
|
8254
|
+
return server;
|
|
8255
|
+
}
|
|
8256
|
+
const MANAGED = [
|
|
8257
|
+
"A",
|
|
8258
|
+
"AAAA",
|
|
8259
|
+
"CNAME"
|
|
8260
|
+
];
|
|
8261
|
+
/** Every public host the stack serves, once each, sorted. */
|
|
8262
|
+
function stackHosts(stack) {
|
|
8263
|
+
return [...new Set(stack.routes.map((route) => route.host))].sort();
|
|
8264
|
+
}
|
|
8265
|
+
/** The TTL a domain's records are written with. */
|
|
8266
|
+
function recordTtl(config) {
|
|
8267
|
+
const ttl = "ttl" in config ? config.ttl : void 0;
|
|
8268
|
+
if (ttl) return ttl;
|
|
8269
|
+
return config.provider === "godaddy" ? 600 : 300;
|
|
8270
|
+
}
|
|
8271
|
+
function providerName(config) {
|
|
8272
|
+
return typeof config.provider === "string" ? config.provider : "custom";
|
|
8273
|
+
}
|
|
8274
|
+
/** The records a stage's hosts need — pure. */
|
|
8275
|
+
function planStackDns(input) {
|
|
8276
|
+
const { stage, server } = input;
|
|
8277
|
+
const dns = input.dns ? normalizeDnsConfig(input.dns) : {};
|
|
8278
|
+
const records = /* @__PURE__ */ new Map();
|
|
8279
|
+
const uncovered = [];
|
|
8280
|
+
const add = (host, domain, type, value) => {
|
|
8281
|
+
const name = extractSubdomain(host, domain);
|
|
8282
|
+
records.set(`${domain} ${name} ${type}`, {
|
|
8283
|
+
host,
|
|
8284
|
+
domain,
|
|
8285
|
+
name,
|
|
8286
|
+
type,
|
|
8287
|
+
value,
|
|
8288
|
+
ttl: recordTtl(dns[domain])
|
|
8289
|
+
});
|
|
8290
|
+
};
|
|
8291
|
+
const pointAt = (host, domain) => {
|
|
8292
|
+
add(host, domain, "A", server.ipv4);
|
|
8293
|
+
if (server.ipv6) add(host, domain, "AAAA", server.ipv6);
|
|
8294
|
+
};
|
|
8295
|
+
for (const raw of input.hosts) {
|
|
8296
|
+
const host = raw.toLowerCase();
|
|
8297
|
+
const domain = findRootDomain(host, dns);
|
|
8298
|
+
if (!domain) {
|
|
8299
|
+
uncovered.push(host);
|
|
8300
|
+
continue;
|
|
8301
|
+
}
|
|
8302
|
+
const target = require_workspace.cnameTarget(dns[domain].records, stage);
|
|
8303
|
+
if (target) pointAt(target, domain);
|
|
8304
|
+
if (target && host !== domain && host !== target) add(host, domain, "CNAME", target);
|
|
8305
|
+
else pointAt(host, domain);
|
|
8306
|
+
}
|
|
8307
|
+
const domains = /* @__PURE__ */ new Map();
|
|
8308
|
+
for (const record of [...records.values()].sort((a, b) => a.domain.localeCompare(b.domain) || a.name.localeCompare(b.name) || a.type.localeCompare(b.type))) {
|
|
8309
|
+
const config = dns[record.domain];
|
|
8310
|
+
const plan = domains.get(record.domain) ?? {
|
|
8311
|
+
domain: record.domain,
|
|
8312
|
+
provider: providerName(config),
|
|
8313
|
+
config,
|
|
8314
|
+
records: []
|
|
8315
|
+
};
|
|
8316
|
+
plan.records.push(record);
|
|
8317
|
+
domains.set(record.domain, plan);
|
|
8318
|
+
}
|
|
8319
|
+
return {
|
|
8320
|
+
stage,
|
|
8321
|
+
server,
|
|
8322
|
+
domains: [...domains.values()],
|
|
8323
|
+
uncovered: uncovered.sort()
|
|
8324
|
+
};
|
|
8325
|
+
}
|
|
8326
|
+
/** `api.example.com A 203.0.113.10 (TTL 600)` */
|
|
8327
|
+
function describe(record) {
|
|
8328
|
+
return `${record.host.padEnd(32)} ${record.type.padEnd(5)} ${record.value} (TTL ${record.ttl})`;
|
|
8329
|
+
}
|
|
8330
|
+
function printManual(plan, log, why) {
|
|
8331
|
+
log(` ${plan.domain}: ${why} — create these records at its DNS host:`);
|
|
8332
|
+
for (const record of plan.records) log(` ${describe(record)}`);
|
|
8333
|
+
return plan.records.map((r) => ({
|
|
8334
|
+
domain: r.domain,
|
|
8335
|
+
name: r.name,
|
|
8336
|
+
type: r.type,
|
|
8337
|
+
action: "manual",
|
|
8338
|
+
value: r.value,
|
|
8339
|
+
ttl: r.ttl
|
|
8340
|
+
}));
|
|
8341
|
+
}
|
|
8342
|
+
/** The existing records of every planned name, for the types gkm manages. */
|
|
8343
|
+
async function existingRecords(provider, plan) {
|
|
8344
|
+
const names = [...new Set(plan.records.map((r) => r.name))];
|
|
8345
|
+
const wanted = names.flatMap((name) => MANAGED.map((type) => ({
|
|
8346
|
+
name,
|
|
8347
|
+
type
|
|
8348
|
+
})));
|
|
8349
|
+
if (provider.readRecords) return provider.readRecords(plan.domain, wanted);
|
|
8350
|
+
return (await provider.getRecords(plan.domain)).filter((r) => names.includes(r.name) && MANAGED.includes(r.type));
|
|
8351
|
+
}
|
|
8352
|
+
const same = (a, b) => a.trim().replace(/\.$/, "").toLowerCase() === b.trim().replace(/\.$/, "").toLowerCase();
|
|
8353
|
+
/**
|
|
8354
|
+
* What each domain's records need, compared with what is there: creates,
|
|
8355
|
+
* updates, and the deletes a change of mode needs — a name moving from an A
|
|
8356
|
+
* record to a CNAME, or back, cannot hold both. Nothing else is deleted.
|
|
8357
|
+
*/
|
|
8358
|
+
function diffDomainDns(plan, existing) {
|
|
8359
|
+
const changes = [];
|
|
8360
|
+
const find = (name, type) => existing.find((r) => r.name === name && r.type === type);
|
|
8361
|
+
const planned = /* @__PURE__ */ new Map();
|
|
8362
|
+
for (const record of plan.records) {
|
|
8363
|
+
const types = planned.get(record.name) ?? /* @__PURE__ */ new Set();
|
|
8364
|
+
types.add(record.type);
|
|
8365
|
+
planned.set(record.name, types);
|
|
8366
|
+
}
|
|
8367
|
+
for (const [name, types] of planned) {
|
|
8368
|
+
const conflicting = types.has("CNAME") ? ["A", "AAAA"] : ["CNAME"];
|
|
8369
|
+
for (const type of conflicting) {
|
|
8370
|
+
const found = find(name, type);
|
|
8371
|
+
if (!found || found.values.length === 0) continue;
|
|
8372
|
+
changes.push({
|
|
8373
|
+
domain: plan.domain,
|
|
8374
|
+
name,
|
|
8375
|
+
type,
|
|
8376
|
+
action: "delete",
|
|
8377
|
+
previous: found.values.join(", ")
|
|
8378
|
+
});
|
|
8379
|
+
}
|
|
8380
|
+
}
|
|
8381
|
+
for (const record of plan.records) {
|
|
8382
|
+
const found = find(record.name, record.type);
|
|
8383
|
+
const base = {
|
|
8384
|
+
domain: plan.domain,
|
|
8385
|
+
name: record.name,
|
|
8386
|
+
type: record.type,
|
|
8387
|
+
value: record.value,
|
|
8388
|
+
ttl: record.ttl
|
|
8389
|
+
};
|
|
8390
|
+
if (!found || found.values.length === 0) changes.push({
|
|
8391
|
+
...base,
|
|
8392
|
+
action: "create"
|
|
8393
|
+
});
|
|
8394
|
+
else if (found.values.length === 1 && same(found.values[0], record.value)) changes.push({
|
|
8395
|
+
...base,
|
|
8396
|
+
action: "unchanged"
|
|
8397
|
+
});
|
|
8398
|
+
else changes.push({
|
|
8399
|
+
...base,
|
|
8400
|
+
action: "update",
|
|
8401
|
+
previous: found.values.join(", ")
|
|
8402
|
+
});
|
|
8403
|
+
}
|
|
8404
|
+
return changes;
|
|
8405
|
+
}
|
|
8406
|
+
/** A host's full name from a domain and a relative name. */
|
|
8407
|
+
function fullName(domain, name) {
|
|
8408
|
+
return name === "@" ? domain : `${name}.${domain}`;
|
|
8409
|
+
}
|
|
8410
|
+
function printChange(change, dryRun, log) {
|
|
8411
|
+
const host = fullName(change.domain, change.name).padEnd(32);
|
|
8412
|
+
const type = change.type.padEnd(5);
|
|
8413
|
+
const would = dryRun ? "would " : "";
|
|
8414
|
+
switch (change.action) {
|
|
8415
|
+
case "unchanged":
|
|
8416
|
+
log(` ✓ ${host} ${type} ${change.value} (TTL ${change.ttl}) — up to date`);
|
|
8417
|
+
break;
|
|
8418
|
+
case "create":
|
|
8419
|
+
log(` + ${host} ${type} ${change.value} (TTL ${change.ttl}) — ${would}create`);
|
|
8420
|
+
break;
|
|
8421
|
+
case "update":
|
|
8422
|
+
log(` ~ ${host} ${type} ${change.previous} → ${change.value} (TTL ${change.ttl}) — ${would}update`);
|
|
8423
|
+
break;
|
|
8424
|
+
case "write":
|
|
8425
|
+
log(dryRun ? ` ? ${host} ${type} ${change.value} (TTL ${change.ttl}) — would write; current value unknown (key cannot read DNS)` : ` ! ${host} ${type} ${change.value} (TTL ${change.ttl}) — written (not diffed)`);
|
|
8426
|
+
break;
|
|
8427
|
+
case "delete": log(` - ${host} ${type} ${change.previous} — ${would}delete (a name cannot hold a CNAME and an A record)`);
|
|
8428
|
+
}
|
|
8429
|
+
}
|
|
8430
|
+
/**
|
|
8431
|
+
* Each domain's records, through its provider. Returns every change, the
|
|
8432
|
+
* unchanged included; a dry run makes none of them.
|
|
8433
|
+
*/
|
|
8434
|
+
async function applyStackDns(plan, options = {}) {
|
|
8435
|
+
const dryRun = options.dryRun === true;
|
|
8436
|
+
const log = options.log ?? ((line) => console.log(line));
|
|
8437
|
+
const providerFor = options.providerFor ?? ((config) => createDnsProvider({
|
|
8438
|
+
config,
|
|
8439
|
+
...options.credentials ? { godaddy: options.credentials } : {}
|
|
8440
|
+
}));
|
|
8441
|
+
const changes = [];
|
|
8442
|
+
for (const host of plan.uncovered) log(` ⚠ ${host} is under no domain in dns — point it at ${plan.server.ipv4} yourself`);
|
|
8443
|
+
for (const domain of plan.domains) {
|
|
8444
|
+
if (domain.provider === "manual") {
|
|
8445
|
+
changes.push(...printManual(domain, log, "manual"));
|
|
8446
|
+
continue;
|
|
8447
|
+
}
|
|
8448
|
+
const provider = await providerFor(domain.config);
|
|
8449
|
+
if (!provider) {
|
|
8450
|
+
changes.push(...printManual(domain, log, "manual"));
|
|
8451
|
+
continue;
|
|
8452
|
+
}
|
|
8453
|
+
log(` ${domain.domain} (${provider.name})${dryRun ? " — dry run" : ""}`);
|
|
8454
|
+
let existing;
|
|
8455
|
+
let diff;
|
|
8456
|
+
try {
|
|
8457
|
+
existing = await existingRecords(provider, domain);
|
|
8458
|
+
diff = diffDomainDns(domain, existing);
|
|
8459
|
+
} catch (error) {
|
|
8460
|
+
if (!(error instanceof DnsRecordsUnreadable)) throw error;
|
|
8461
|
+
log(` ℹ The ${provider.name} key cannot read ${domain.domain}'s DNS records, so changes cannot be diffed: every record is written (idempotent).`);
|
|
8462
|
+
existing = [];
|
|
8463
|
+
diff = domain.records.map((r) => ({
|
|
8464
|
+
domain: r.domain,
|
|
8465
|
+
name: r.name,
|
|
8466
|
+
type: r.type,
|
|
8467
|
+
action: "write",
|
|
8468
|
+
value: r.value,
|
|
8469
|
+
ttl: r.ttl
|
|
8470
|
+
}));
|
|
8471
|
+
}
|
|
8472
|
+
for (const change of diff) printChange(change, dryRun, log);
|
|
8473
|
+
if (!plan.server.ipv6) for (const name of new Set(domain.records.map((r) => r.name))) {
|
|
8474
|
+
const aaaa = existing.find((r) => r.name === name && r.type === "AAAA");
|
|
8475
|
+
const planned = domain.records.find((r) => r.name === name && r.type === "A");
|
|
8476
|
+
if (aaaa && planned && aaaa.values.length > 0) log(` ⚠ ${fullName(domain.domain, name)} also has AAAA ${aaaa.values.join(", ")}: set ${require_workspace.SERVER_IPV6_KEY} in the '${plan.stage}' stage's secrets to the server's IPv6 address, or remove that record, or IPv6 clients go elsewhere`);
|
|
8477
|
+
}
|
|
8478
|
+
changes.push(...diff);
|
|
8479
|
+
if (dryRun) continue;
|
|
8480
|
+
const deletes = diff.filter((c) => c.action === "delete");
|
|
8481
|
+
if (deletes.length > 0) await provider.deleteRecords(domain.domain, deletes.map((c) => ({
|
|
8482
|
+
name: c.name,
|
|
8483
|
+
type: c.type
|
|
8484
|
+
})));
|
|
8485
|
+
const writes = diff.filter((c) => c.action === "create" || c.action === "update" || c.action === "write");
|
|
8486
|
+
if (writes.length > 0) await provider.upsertRecords(domain.domain, writes.map((c) => ({
|
|
8487
|
+
name: c.name,
|
|
8488
|
+
type: c.type,
|
|
8489
|
+
value: c.value,
|
|
8490
|
+
ttl: c.ttl
|
|
8491
|
+
})));
|
|
8492
|
+
}
|
|
8493
|
+
return changes;
|
|
8494
|
+
}
|
|
8495
|
+
/** The system resolver: what the server's own clients would be told. */
|
|
8496
|
+
const systemLookup = async (host) => {
|
|
8497
|
+
return (await (0, node_dns_promises.lookup)(host, { all: true })).map((a) => a.address);
|
|
8498
|
+
};
|
|
8499
|
+
/** Hosts that do not resolve to the stage's server. */
|
|
8500
|
+
var HostNotPointingAtServer = class extends require_errors.GkmError {
|
|
8501
|
+
stage;
|
|
8502
|
+
hosts;
|
|
8503
|
+
expected;
|
|
8504
|
+
fix;
|
|
8505
|
+
constructor(stage, hosts, expected, fix) {
|
|
8506
|
+
const want = expected.ipv6 ? `${expected.ipv4} (and ${expected.ipv6})` : expected.ipv4;
|
|
8507
|
+
const lines = hosts.map((h) => ` - ${h.host} → ${h.resolved.length > 0 ? h.resolved.join(", ") : `nothing${h.error ? ` (${h.error})` : ""}`}, expected ${want}`);
|
|
8508
|
+
super(`${hosts.length === 1 ? "A host" : `${hosts.length} hosts`} of '${stage}' do${hosts.length === 1 ? "es" : ""} not resolve to its server, so a certificate for ${hosts.length === 1 ? "it" : "them"} cannot be issued:\n${lines.join("\n")}\n${fix}\nRecords can take a few minutes to propagate. With a CDN or proxy in front of the server, pass --skip-dns-check.`);
|
|
8509
|
+
this.stage = stage;
|
|
8510
|
+
this.hosts = hosts;
|
|
8511
|
+
this.expected = expected;
|
|
8512
|
+
this.fix = fix;
|
|
8513
|
+
this.name = "HostNotPointingAtServer";
|
|
8514
|
+
}
|
|
8515
|
+
};
|
|
8516
|
+
/**
|
|
8517
|
+
* Every host resolved: each must resolve to the server's IPv4 address and to
|
|
8518
|
+
* nothing but the server's addresses.
|
|
8519
|
+
*
|
|
8520
|
+
* @throws {HostNotPointingAtServer} naming every host that does not
|
|
8521
|
+
*/
|
|
8522
|
+
async function checkStackDns(input) {
|
|
8523
|
+
const lookup = input.lookup ?? systemLookup;
|
|
8524
|
+
const { server } = input;
|
|
8525
|
+
const ours = new Set([server.ipv4, server.ipv6].filter(Boolean).map((a) => a.toLowerCase()));
|
|
8526
|
+
const bad = [];
|
|
8527
|
+
const ok = [];
|
|
8528
|
+
for (const host of input.hosts) {
|
|
8529
|
+
let resolved;
|
|
8530
|
+
try {
|
|
8531
|
+
resolved = [...new Set(await lookup(host))];
|
|
8532
|
+
} catch (error) {
|
|
8533
|
+
const code = error && typeof error === "object" && "code" in error ? String(error.code) : error instanceof Error ? error.message : String(error);
|
|
8534
|
+
bad.push({
|
|
8535
|
+
host,
|
|
8536
|
+
resolved: [],
|
|
8537
|
+
error: code
|
|
8538
|
+
});
|
|
8539
|
+
continue;
|
|
8540
|
+
}
|
|
8541
|
+
if (resolved.some((a) => a.toLowerCase() === server.ipv4.toLowerCase()) && resolved.every((a) => ours.has(a.toLowerCase()))) ok.push(host);
|
|
8542
|
+
else bad.push({
|
|
8543
|
+
host,
|
|
8544
|
+
resolved
|
|
8545
|
+
});
|
|
8546
|
+
}
|
|
8547
|
+
if (bad.length > 0) throw new HostNotPointingAtServer(input.stage, bad, {
|
|
8548
|
+
ipv4: server.ipv4,
|
|
8549
|
+
...server.ipv6 ? { ipv6: server.ipv6 } : {}
|
|
8550
|
+
}, dnsFix(input, bad));
|
|
8551
|
+
return ok;
|
|
8552
|
+
}
|
|
8553
|
+
/** How to fix it: `gkm setup`, or the records to create by hand. */
|
|
8554
|
+
function dnsFix(input, bad) {
|
|
8555
|
+
const hosts = bad.map((h) => h.host);
|
|
8556
|
+
let plan;
|
|
8557
|
+
try {
|
|
8558
|
+
plan = planStackDns({
|
|
8559
|
+
stage: input.stage,
|
|
8560
|
+
hosts,
|
|
8561
|
+
server: input.server,
|
|
8562
|
+
dns: input.dns
|
|
8563
|
+
});
|
|
8564
|
+
} catch {
|
|
8565
|
+
plan = {
|
|
8566
|
+
stage: input.stage,
|
|
8567
|
+
server: input.server,
|
|
8568
|
+
domains: [],
|
|
8569
|
+
uncovered: hosts
|
|
8570
|
+
};
|
|
8571
|
+
}
|
|
8572
|
+
const automatic = plan.domains.filter((d) => d.provider !== "manual");
|
|
8573
|
+
const byHand = [...plan.domains.filter((d) => d.provider === "manual").flatMap((d) => d.records.map(describe)), ...plan.uncovered.flatMap((host) => [`${host.padEnd(32)} A ${input.server.ipv4}`, ...input.server.ipv6 ? [`${host.padEnd(32)} AAAA ${input.server.ipv6}`] : []])];
|
|
8574
|
+
const lines = [];
|
|
8575
|
+
if (automatic.length > 0) lines.push(`Fix: gkm setup --stage ${input.stage} writes the records for ${automatic.map((d) => d.domain).join(", ")} (gkm setup --stage ${input.stage} --dry-run shows them first).`);
|
|
8576
|
+
if (byHand.length > 0) lines.push(`${automatic.length > 0 ? "And create" : "Fix: create"} these records at the DNS host:`, ...byHand.map((line) => ` ${line}`));
|
|
8577
|
+
return lines.join("\n");
|
|
8578
|
+
}
|
|
8579
|
+
//#endregion
|
|
7876
8580
|
//#region src/docker/imageRef.ts
|
|
7877
8581
|
/**
|
|
7878
8582
|
* An image reference, checked before it reaches `docker`.
|
|
@@ -7891,7 +8595,7 @@ const REFERENCE = new RegExp(`^(?:${DOMAIN}/)?${PATH_COMPONENT}(?:/${PATH_COMPON
|
|
|
7891
8595
|
/** Docker refuses a repository name longer than this. */
|
|
7892
8596
|
const MAX_NAME_LENGTH = 255;
|
|
7893
8597
|
/** A value that is not an image reference was about to be built or pushed. */
|
|
7894
|
-
var ImageRefInvalid = class extends
|
|
8598
|
+
var ImageRefInvalid = class extends require_errors.GkmError {
|
|
7895
8599
|
ref;
|
|
7896
8600
|
constructor(ref) {
|
|
7897
8601
|
super(`'${ref}' is not a valid image reference. An image is \`[registry/]name[:tag]\`: the name lowercase letters, digits and . _ - separators, the tag up to 128 of letters, digits, _ . and -, not starting with . or -. Check docker.registry in gkm.config.ts and the --tag passed.`);
|
|
@@ -7927,7 +8631,7 @@ var DockerPushFailed = class extends Error {
|
|
|
7927
8631
|
}
|
|
7928
8632
|
};
|
|
7929
8633
|
/** `gkm docker --push` was asked for with nowhere to push to. */
|
|
7930
|
-
var PushNeedsRegistry = class extends
|
|
8634
|
+
var PushNeedsRegistry = class extends require_errors.GkmError {
|
|
7931
8635
|
imageName;
|
|
7932
8636
|
constructor(imageName) {
|
|
7933
8637
|
super(`Registry is required to push Docker image '${imageName}'. Use --registry or configure docker.registry in gkm.config.ts`);
|
|
@@ -8194,7 +8898,7 @@ function constructsOf$1(manifest, kind) {
|
|
|
8194
8898
|
return Object.entries(manifest).filter(([, d]) => d.kind === kind).map(([id]) => id).sort();
|
|
8195
8899
|
}
|
|
8196
8900
|
/** A stage that names `false` for a kind, and declares constructs of it. */
|
|
8197
|
-
var StageProviderDisabled = class extends
|
|
8901
|
+
var StageProviderDisabled = class extends require_errors.GkmError {
|
|
8198
8902
|
kind;
|
|
8199
8903
|
stage;
|
|
8200
8904
|
ids;
|
|
@@ -8265,14 +8969,9 @@ var DeployJournal = class DeployJournal {
|
|
|
8265
8969
|
this.version = version;
|
|
8266
8970
|
this.existed = existed;
|
|
8267
8971
|
}
|
|
8268
|
-
|
|
8269
|
-
* The stage's journal — its stored state, or `initial` written as the
|
|
8270
|
-
* stage's first state, so there is somewhere to record the very first
|
|
8271
|
-
* resource before it is created.
|
|
8272
|
-
*/
|
|
8273
|
-
static async open(store, stage, initial) {
|
|
8972
|
+
static async open(store, stage, initial, adopt = (stored) => stored) {
|
|
8274
8973
|
const stored = await store.read(stage);
|
|
8275
|
-
if (stored) return new DeployJournal(store, stage, stored.state, stored.resources, stored.version, true);
|
|
8974
|
+
if (stored) return new DeployJournal(store, stage, adopt(stored.state), stored.resources, stored.version, true);
|
|
8276
8975
|
const state = initial();
|
|
8277
8976
|
const version = await store.write(stage, state, { expectedVersion: null });
|
|
8278
8977
|
return new DeployJournal(store, stage, state, {}, version, false);
|
|
@@ -8291,10 +8990,13 @@ var DeployJournal = class DeployJournal {
|
|
|
8291
8990
|
status: "pending"
|
|
8292
8991
|
});
|
|
8293
8992
|
}
|
|
8294
|
-
/**
|
|
8993
|
+
/**
|
|
8994
|
+
* Records `entry` as existing with `id`; a no-op if it already is, with
|
|
8995
|
+
* the same data.
|
|
8996
|
+
*/
|
|
8295
8997
|
async ready(entry, id) {
|
|
8296
8998
|
const current = this.resources[entry.key];
|
|
8297
|
-
if (current?.status === "ready" && current.id === id) return;
|
|
8999
|
+
if (current?.status === "ready" && current.id === id && JSON.stringify(current.data) === JSON.stringify(entry.data)) return;
|
|
8298
9000
|
await this.put({
|
|
8299
9001
|
...entry,
|
|
8300
9002
|
status: "ready",
|
|
@@ -8339,6 +9041,17 @@ var DeployJournal = class DeployJournal {
|
|
|
8339
9041
|
...staleId ? { staleId } : {}
|
|
8340
9042
|
};
|
|
8341
9043
|
}
|
|
9044
|
+
/** Removes `key`'s record — a resource that no longer exists. */
|
|
9045
|
+
async forget(key) {
|
|
9046
|
+
if (!(key in this.resources)) return;
|
|
9047
|
+
this.version = await this.store.deleteResource(this.stage, key, { expectedVersion: this.version });
|
|
9048
|
+
const { [key]: _removed, ...resources } = this.resources;
|
|
9049
|
+
this.resources = resources;
|
|
9050
|
+
}
|
|
9051
|
+
/** Every record, as the journal last wrote or read it. */
|
|
9052
|
+
records() {
|
|
9053
|
+
return this.resources;
|
|
9054
|
+
}
|
|
8342
9055
|
/** Writes the stage's state, keeping its resource records. */
|
|
8343
9056
|
async save() {
|
|
8344
9057
|
this.state.lastDeployedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -8356,6 +9069,138 @@ var DeployJournal = class DeployJournal {
|
|
|
8356
9069
|
}
|
|
8357
9070
|
};
|
|
8358
9071
|
//#endregion
|
|
9072
|
+
//#region src/providers/dns.ts
|
|
9073
|
+
/** Whether the workspace deploys through the compose target. */
|
|
9074
|
+
function deploysWithCompose(workspace) {
|
|
9075
|
+
return workspace.deploy?.default === "compose" || Object.values(workspace.apps).some((app) => app.resolvedDeployTarget === "compose");
|
|
9076
|
+
}
|
|
9077
|
+
/**
|
|
9078
|
+
* A compose stage that serves a domain has its server's address in its
|
|
9079
|
+
* secrets — checked before `gkm setup --stage` does anything else.
|
|
9080
|
+
*
|
|
9081
|
+
* @throws {ServerAddressMissing} for a compose stage with a domain and none
|
|
9082
|
+
* @throws {ServerAddressInvalid} for a value that is not an address
|
|
9083
|
+
*/
|
|
9084
|
+
function assertStageServer(workspace, stage, secrets) {
|
|
9085
|
+
if (stage === workspace.stages.local) return void 0;
|
|
9086
|
+
if (!deploysWithCompose(workspace)) return serverAddress(stage, secrets?.custom);
|
|
9087
|
+
return requiredServerAddress(stage, workspace.domains?.[stage], secrets?.custom);
|
|
9088
|
+
}
|
|
9089
|
+
/**
|
|
9090
|
+
* The hosts a compose stage serves: its stack composed as a deploy would —
|
|
9091
|
+
* with the secrets it would generate made up in memory, never written — and
|
|
9092
|
+
* every route's host read off it.
|
|
9093
|
+
*/
|
|
9094
|
+
async function composeStageHosts(options) {
|
|
9095
|
+
const { workspace, stage } = options;
|
|
9096
|
+
const runnables = options.runnables ?? {};
|
|
9097
|
+
const background = options.background ?? {};
|
|
9098
|
+
const manifest = options.manifest ?? await require_discover.discover({
|
|
9099
|
+
patterns: constructGlobs(workspace),
|
|
9100
|
+
cwd: workspace.root,
|
|
9101
|
+
runnables,
|
|
9102
|
+
background
|
|
9103
|
+
});
|
|
9104
|
+
const stored = await (await secretsStoreFor(workspace, stage, {
|
|
9105
|
+
...options.profile ? { profile: options.profile } : {},
|
|
9106
|
+
...options.home ? { home: options.home } : {}
|
|
9107
|
+
})).read(stage);
|
|
9108
|
+
const { deployedStackSecrets } = await Promise.resolve().then(() => require("./secrets-DJteijZo.cjs")).then((n) => n.secrets_exports);
|
|
9109
|
+
const { composeStack } = await Promise.resolve().then(() => require("./stack-1PeLJS2j.cjs")).then((n) => n.stack_exports);
|
|
9110
|
+
const { secrets } = deployedStackSecrets(workspace, stage, stored, manifest);
|
|
9111
|
+
return stackHosts(composeStack({
|
|
9112
|
+
workspace,
|
|
9113
|
+
manifest,
|
|
9114
|
+
runnables,
|
|
9115
|
+
background,
|
|
9116
|
+
stage,
|
|
9117
|
+
identity: deployIdentity(workspace, stage),
|
|
9118
|
+
images: {
|
|
9119
|
+
mode: "pull",
|
|
9120
|
+
tag: "dns",
|
|
9121
|
+
...workspace.deploy?.registry ? { registry: workspace.deploy.registry } : {}
|
|
9122
|
+
},
|
|
9123
|
+
secrets,
|
|
9124
|
+
buildOnly: true,
|
|
9125
|
+
allowDevServices: true
|
|
9126
|
+
}));
|
|
9127
|
+
}
|
|
9128
|
+
/**
|
|
9129
|
+
* `GKM_SERVER_IPV4` from the stage's secrets and `dns`: each public host's
|
|
9130
|
+
* records, created or corrected. A dry run reads and prints, and writes
|
|
9131
|
+
* nothing.
|
|
9132
|
+
*/
|
|
9133
|
+
async function provisionStageDns(options) {
|
|
9134
|
+
const { workspace, stage } = options;
|
|
9135
|
+
const log = options.log ?? ((line) => console.log(line));
|
|
9136
|
+
if (stage === workspace.stages.local || !workspace.dns || !deploysWithCompose(workspace)) return {
|
|
9137
|
+
mode: "none",
|
|
9138
|
+
hosts: [],
|
|
9139
|
+
changes: []
|
|
9140
|
+
};
|
|
9141
|
+
const server = serverAddress(stage, (await (await secretsStoreFor(workspace, stage, {
|
|
9142
|
+
...options.profile ? { profile: options.profile } : {},
|
|
9143
|
+
...options.home ? { home: options.home } : {}
|
|
9144
|
+
})).read(stage))?.custom);
|
|
9145
|
+
if (!server) {
|
|
9146
|
+
log(`\n🌐 DNS for '${stage}': no GKM_SERVER_IPV4 in its secrets, so no records — ${serverAddressHint(stage)}`);
|
|
9147
|
+
return {
|
|
9148
|
+
mode: "none",
|
|
9149
|
+
hosts: [],
|
|
9150
|
+
changes: []
|
|
9151
|
+
};
|
|
9152
|
+
}
|
|
9153
|
+
const hosts = [...options.hosts ?? await composeStageHosts({
|
|
9154
|
+
workspace,
|
|
9155
|
+
stage,
|
|
9156
|
+
...options.profile ? { profile: options.profile } : {},
|
|
9157
|
+
...options.home ? { home: options.home } : {},
|
|
9158
|
+
...options.manifest ? { manifest: options.manifest } : {},
|
|
9159
|
+
...options.runnables ? { runnables: options.runnables } : {},
|
|
9160
|
+
...options.background ? { background: options.background } : {}
|
|
9161
|
+
})];
|
|
9162
|
+
log(`\n🌐 DNS for '${stage}' → ${server.ipv4}${server.ipv6 ? ` / ${server.ipv6}` : ""}${options.dryRun ? " (dry run — nothing is written)" : ""}`);
|
|
9163
|
+
const plan = planStackDns({
|
|
9164
|
+
stage,
|
|
9165
|
+
hosts,
|
|
9166
|
+
server,
|
|
9167
|
+
dns: workspace.dns
|
|
9168
|
+
});
|
|
9169
|
+
try {
|
|
9170
|
+
const changes = await applyStackDns(plan, {
|
|
9171
|
+
...options.dryRun ? { dryRun: true } : {},
|
|
9172
|
+
log,
|
|
9173
|
+
credentials: {
|
|
9174
|
+
env: options.env ?? process.env,
|
|
9175
|
+
...options.home ? { home: options.home } : {},
|
|
9176
|
+
log
|
|
9177
|
+
},
|
|
9178
|
+
...options.providerFor ? { providerFor: options.providerFor } : {}
|
|
9179
|
+
});
|
|
9180
|
+
if (options.journal && !options.dryRun) {
|
|
9181
|
+
const providers = new Map(plan.domains.map((domain) => [domain.domain, domain.provider]));
|
|
9182
|
+
await recordDnsChanges(options.journal, changes, (domain) => providers.get(domain));
|
|
9183
|
+
}
|
|
9184
|
+
return {
|
|
9185
|
+
mode: "records",
|
|
9186
|
+
hosts,
|
|
9187
|
+
changes
|
|
9188
|
+
};
|
|
9189
|
+
} catch (error) {
|
|
9190
|
+
if (error instanceof require_credentials.MissingCredential) {
|
|
9191
|
+
log(` ⚠ ${error.message}`);
|
|
9192
|
+
log(" Until then, create these records yourself:");
|
|
9193
|
+
for (const domain of plan.domains) for (const r of domain.records) log(` ${r.host.padEnd(32)} ${r.type.padEnd(5)} ${r.value} (TTL ${r.ttl})`);
|
|
9194
|
+
return {
|
|
9195
|
+
mode: "records",
|
|
9196
|
+
hosts,
|
|
9197
|
+
changes: []
|
|
9198
|
+
};
|
|
9199
|
+
}
|
|
9200
|
+
throw error;
|
|
9201
|
+
}
|
|
9202
|
+
}
|
|
9203
|
+
//#endregion
|
|
8359
9204
|
//#region src/providers/aws.ts
|
|
8360
9205
|
/**
|
|
8361
9206
|
* The AWS account a provider provisions in — the stage's, found the way the
|
|
@@ -8430,7 +9275,7 @@ async function awsClientConfig(credential, region) {
|
|
|
8430
9275
|
}
|
|
8431
9276
|
const SUFFIX_ALPHABET = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
8432
9277
|
/** A name that S3 would refuse — what the name builder never returns. */
|
|
8433
|
-
var InvalidBucketName = class extends
|
|
9278
|
+
var InvalidBucketName = class extends require_errors.GkmError {
|
|
8434
9279
|
bucket;
|
|
8435
9280
|
reason;
|
|
8436
9281
|
constructor(bucket, reason) {
|
|
@@ -9327,7 +10172,7 @@ async function provisionStage(options) {
|
|
|
9327
10172
|
});
|
|
9328
10173
|
const lock = dryRun ? void 0 : await stateStore.lock(stage, { operation: "provision" });
|
|
9329
10174
|
try {
|
|
9330
|
-
const state = dryRun ? await readOnlyState(stateStore, stage) : journalState(await DeployJournal.open(stateStore, stage, () => createEmptyState(stage, "", "")));
|
|
10175
|
+
const state = dryRun ? await readOnlyState(stateStore, stage) : journalState(await DeployJournal.open(stateStore, stage, () => deploysWithCompose(workspace) ? createComposeState(stage) : createEmptyState(stage, "", "")));
|
|
9331
10176
|
const writeSecrets = async (values) => {
|
|
9332
10177
|
if (dryRun) return;
|
|
9333
10178
|
const stored = await secretsStore.read(stage) ?? initStageSecrets(stage);
|
|
@@ -9432,7 +10277,7 @@ const LOOPBACK = /* @__PURE__ */ new Set([
|
|
|
9432
10277
|
* `localhost` — what an older `gkm secrets:init`, `gkm setup` or `gkm init`
|
|
9433
10278
|
* generated. Set by hand wins over derived, so the app would be handed it.
|
|
9434
10279
|
*/
|
|
9435
|
-
var StaleStageSecrets = class extends
|
|
10280
|
+
var StaleStageSecrets = class extends require_errors.GkmError {
|
|
9436
10281
|
stage;
|
|
9437
10282
|
stale;
|
|
9438
10283
|
constructor(stage, stale) {
|
|
@@ -9638,6 +10483,12 @@ Object.defineProperty(exports, "FileSecretsStore", {
|
|
|
9638
10483
|
return FileSecretsStore;
|
|
9639
10484
|
}
|
|
9640
10485
|
});
|
|
10486
|
+
Object.defineProperty(exports, "HostNotPointingAtServer", {
|
|
10487
|
+
enumerable: true,
|
|
10488
|
+
get: function() {
|
|
10489
|
+
return HostNotPointingAtServer;
|
|
10490
|
+
}
|
|
10491
|
+
});
|
|
9641
10492
|
Object.defineProperty(exports, "LEGACY_LOCAL_LOGIN", {
|
|
9642
10493
|
enumerable: true,
|
|
9643
10494
|
get: function() {
|
|
@@ -9668,6 +10519,12 @@ Object.defineProperty(exports, "LOGS_SERVICE", {
|
|
|
9668
10519
|
return LOGS_SERVICE;
|
|
9669
10520
|
}
|
|
9670
10521
|
});
|
|
10522
|
+
Object.defineProperty(exports, "LocalStateInCi", {
|
|
10523
|
+
enumerable: true,
|
|
10524
|
+
get: function() {
|
|
10525
|
+
return LocalStateInCi;
|
|
10526
|
+
}
|
|
10527
|
+
});
|
|
9671
10528
|
Object.defineProperty(exports, "NoDomainForStage", {
|
|
9672
10529
|
enumerable: true,
|
|
9673
10530
|
get: function() {
|
|
@@ -9776,6 +10633,12 @@ Object.defineProperty(exports, "appTelemetry", {
|
|
|
9776
10633
|
return appTelemetry;
|
|
9777
10634
|
}
|
|
9778
10635
|
});
|
|
10636
|
+
Object.defineProperty(exports, "appendHistory", {
|
|
10637
|
+
enumerable: true,
|
|
10638
|
+
get: function() {
|
|
10639
|
+
return appendHistory;
|
|
10640
|
+
}
|
|
10641
|
+
});
|
|
9779
10642
|
Object.defineProperty(exports, "applicationName", {
|
|
9780
10643
|
enumerable: true,
|
|
9781
10644
|
get: function() {
|
|
@@ -9800,6 +10663,12 @@ Object.defineProperty(exports, "applyPostgres", {
|
|
|
9800
10663
|
return applyPostgres;
|
|
9801
10664
|
}
|
|
9802
10665
|
});
|
|
10666
|
+
Object.defineProperty(exports, "asDokployState", {
|
|
10667
|
+
enumerable: true,
|
|
10668
|
+
get: function() {
|
|
10669
|
+
return asDokployState;
|
|
10670
|
+
}
|
|
10671
|
+
});
|
|
9803
10672
|
Object.defineProperty(exports, "assertDevServicesFlag", {
|
|
9804
10673
|
enumerable: true,
|
|
9805
10674
|
get: function() {
|
|
@@ -9824,6 +10693,18 @@ Object.defineProperty(exports, "assertStageProvidersEnabled", {
|
|
|
9824
10693
|
return assertStageProvidersEnabled;
|
|
9825
10694
|
}
|
|
9826
10695
|
});
|
|
10696
|
+
Object.defineProperty(exports, "assertStageServer", {
|
|
10697
|
+
enumerable: true,
|
|
10698
|
+
get: function() {
|
|
10699
|
+
return assertStageServer;
|
|
10700
|
+
}
|
|
10701
|
+
});
|
|
10702
|
+
Object.defineProperty(exports, "assertStateOutlivesRun", {
|
|
10703
|
+
enumerable: true,
|
|
10704
|
+
get: function() {
|
|
10705
|
+
return assertStateOutlivesRun;
|
|
10706
|
+
}
|
|
10707
|
+
});
|
|
9827
10708
|
Object.defineProperty(exports, "backendsOf", {
|
|
9828
10709
|
enumerable: true,
|
|
9829
10710
|
get: function() {
|
|
@@ -9848,6 +10729,12 @@ Object.defineProperty(exports, "cacheBackendFor", {
|
|
|
9848
10729
|
return cacheBackendFor;
|
|
9849
10730
|
}
|
|
9850
10731
|
});
|
|
10732
|
+
Object.defineProperty(exports, "checkStackDns", {
|
|
10733
|
+
enumerable: true,
|
|
10734
|
+
get: function() {
|
|
10735
|
+
return checkStackDns;
|
|
10736
|
+
}
|
|
10737
|
+
});
|
|
9851
10738
|
Object.defineProperty(exports, "composeBuildPaths", {
|
|
9852
10739
|
enumerable: true,
|
|
9853
10740
|
get: function() {
|
|
@@ -9872,16 +10759,16 @@ Object.defineProperty(exports, "contentVersion", {
|
|
|
9872
10759
|
return contentVersion;
|
|
9873
10760
|
}
|
|
9874
10761
|
});
|
|
9875
|
-
Object.defineProperty(exports, "
|
|
10762
|
+
Object.defineProperty(exports, "createComposeState", {
|
|
9876
10763
|
enumerable: true,
|
|
9877
10764
|
get: function() {
|
|
9878
|
-
return
|
|
10765
|
+
return createComposeState;
|
|
9879
10766
|
}
|
|
9880
10767
|
});
|
|
9881
|
-
Object.defineProperty(exports, "
|
|
10768
|
+
Object.defineProperty(exports, "createCredentialsPreload", {
|
|
9882
10769
|
enumerable: true,
|
|
9883
10770
|
get: function() {
|
|
9884
|
-
return
|
|
10771
|
+
return createCredentialsPreload;
|
|
9885
10772
|
}
|
|
9886
10773
|
});
|
|
9887
10774
|
Object.defineProperty(exports, "createEmptyState", {
|
|
@@ -9902,18 +10789,36 @@ Object.defineProperty(exports, "createStateStore", {
|
|
|
9902
10789
|
return createStateStore;
|
|
9903
10790
|
}
|
|
9904
10791
|
});
|
|
10792
|
+
Object.defineProperty(exports, "currentActor", {
|
|
10793
|
+
enumerable: true,
|
|
10794
|
+
get: function() {
|
|
10795
|
+
return currentActor;
|
|
10796
|
+
}
|
|
10797
|
+
});
|
|
9905
10798
|
Object.defineProperty(exports, "deployIdentity", {
|
|
9906
10799
|
enumerable: true,
|
|
9907
10800
|
get: function() {
|
|
9908
10801
|
return deployIdentity;
|
|
9909
10802
|
}
|
|
9910
10803
|
});
|
|
10804
|
+
Object.defineProperty(exports, "deploysWithCompose", {
|
|
10805
|
+
enumerable: true,
|
|
10806
|
+
get: function() {
|
|
10807
|
+
return deploysWithCompose;
|
|
10808
|
+
}
|
|
10809
|
+
});
|
|
9911
10810
|
Object.defineProperty(exports, "derivedContainers", {
|
|
9912
10811
|
enumerable: true,
|
|
9913
10812
|
get: function() {
|
|
9914
10813
|
return derivedContainers;
|
|
9915
10814
|
}
|
|
9916
10815
|
});
|
|
10816
|
+
Object.defineProperty(exports, "describeActor", {
|
|
10817
|
+
enumerable: true,
|
|
10818
|
+
get: function() {
|
|
10819
|
+
return describeActor;
|
|
10820
|
+
}
|
|
10821
|
+
});
|
|
9917
10822
|
Object.defineProperty(exports, "describeServices", {
|
|
9918
10823
|
enumerable: true,
|
|
9919
10824
|
get: function() {
|
|
@@ -9932,6 +10837,12 @@ Object.defineProperty(exports, "devServicesUsed", {
|
|
|
9932
10837
|
return devServicesUsed;
|
|
9933
10838
|
}
|
|
9934
10839
|
});
|
|
10840
|
+
Object.defineProperty(exports, "dnsResources", {
|
|
10841
|
+
enumerable: true,
|
|
10842
|
+
get: function() {
|
|
10843
|
+
return dnsResources;
|
|
10844
|
+
}
|
|
10845
|
+
});
|
|
9935
10846
|
Object.defineProperty(exports, "dockerCommand", {
|
|
9936
10847
|
enumerable: true,
|
|
9937
10848
|
get: function() {
|
|
@@ -9974,12 +10885,6 @@ Object.defineProperty(exports, "externalServices", {
|
|
|
9974
10885
|
return externalServices;
|
|
9975
10886
|
}
|
|
9976
10887
|
});
|
|
9977
|
-
Object.defineProperty(exports, "extractSubdomain", {
|
|
9978
|
-
enumerable: true,
|
|
9979
|
-
get: function() {
|
|
9980
|
-
return extractSubdomain;
|
|
9981
|
-
}
|
|
9982
|
-
});
|
|
9983
10888
|
Object.defineProperty(exports, "fakeKey", {
|
|
9984
10889
|
enumerable: true,
|
|
9985
10890
|
get: function() {
|
|
@@ -9998,12 +10903,6 @@ Object.defineProperty(exports, "findBuildRoot", {
|
|
|
9998
10903
|
return findBuildRoot;
|
|
9999
10904
|
}
|
|
10000
10905
|
});
|
|
10001
|
-
Object.defineProperty(exports, "findRootDomain", {
|
|
10002
|
-
enumerable: true,
|
|
10003
|
-
get: function() {
|
|
10004
|
-
return findRootDomain;
|
|
10005
|
-
}
|
|
10006
|
-
});
|
|
10007
10906
|
Object.defineProperty(exports, "forgetState", {
|
|
10008
10907
|
enumerable: true,
|
|
10009
10908
|
get: function() {
|
|
@@ -10070,6 +10969,12 @@ Object.defineProperty(exports, "isImageBuild", {
|
|
|
10070
10969
|
return isImageBuild;
|
|
10071
10970
|
}
|
|
10072
10971
|
});
|
|
10972
|
+
Object.defineProperty(exports, "isLocalHost", {
|
|
10973
|
+
enumerable: true,
|
|
10974
|
+
get: function() {
|
|
10975
|
+
return isLocalHost;
|
|
10976
|
+
}
|
|
10977
|
+
});
|
|
10073
10978
|
Object.defineProperty(exports, "isMainFrontendApp", {
|
|
10074
10979
|
enumerable: true,
|
|
10075
10980
|
get: function() {
|
|
@@ -10178,12 +11083,6 @@ Object.defineProperty(exports, "newLockHolder", {
|
|
|
10178
11083
|
return newLockHolder;
|
|
10179
11084
|
}
|
|
10180
11085
|
});
|
|
10181
|
-
Object.defineProperty(exports, "normalizeDnsConfig", {
|
|
10182
|
-
enumerable: true,
|
|
10183
|
-
get: function() {
|
|
10184
|
-
return normalizeDnsConfig;
|
|
10185
|
-
}
|
|
10186
|
-
});
|
|
10187
11086
|
Object.defineProperty(exports, "orchestrateDns", {
|
|
10188
11087
|
enumerable: true,
|
|
10189
11088
|
get: function() {
|
|
@@ -10280,6 +11179,12 @@ Object.defineProperty(exports, "provisionStage", {
|
|
|
10280
11179
|
return provisionStage;
|
|
10281
11180
|
}
|
|
10282
11181
|
});
|
|
11182
|
+
Object.defineProperty(exports, "provisionStageDns", {
|
|
11183
|
+
enumerable: true,
|
|
11184
|
+
get: function() {
|
|
11185
|
+
return provisionStageDns;
|
|
11186
|
+
}
|
|
11187
|
+
});
|
|
10283
11188
|
Object.defineProperty(exports, "quoteIdentifier", {
|
|
10284
11189
|
enumerable: true,
|
|
10285
11190
|
get: function() {
|
|
@@ -10340,6 +11245,12 @@ Object.defineProperty(exports, "reportPlannedSeeds", {
|
|
|
10340
11245
|
return reportPlannedSeeds;
|
|
10341
11246
|
}
|
|
10342
11247
|
});
|
|
11248
|
+
Object.defineProperty(exports, "requiredServerAddress", {
|
|
11249
|
+
enumerable: true,
|
|
11250
|
+
get: function() {
|
|
11251
|
+
return requiredServerAddress;
|
|
11252
|
+
}
|
|
11253
|
+
});
|
|
10343
11254
|
Object.defineProperty(exports, "requiredStageKeys", {
|
|
10344
11255
|
enumerable: true,
|
|
10345
11256
|
get: function() {
|
|
@@ -10376,6 +11287,12 @@ Object.defineProperty(exports, "secretsStoreFor", {
|
|
|
10376
11287
|
return secretsStoreFor;
|
|
10377
11288
|
}
|
|
10378
11289
|
});
|
|
11290
|
+
Object.defineProperty(exports, "serverAddressHint", {
|
|
11291
|
+
enumerable: true,
|
|
11292
|
+
get: function() {
|
|
11293
|
+
return serverAddressHint;
|
|
11294
|
+
}
|
|
11295
|
+
});
|
|
10379
11296
|
Object.defineProperty(exports, "setApplicationId", {
|
|
10380
11297
|
enumerable: true,
|
|
10381
11298
|
get: function() {
|
|
@@ -10400,6 +11317,12 @@ Object.defineProperty(exports, "setPostgresBackupId", {
|
|
|
10400
11317
|
return setPostgresBackupId;
|
|
10401
11318
|
}
|
|
10402
11319
|
});
|
|
11320
|
+
Object.defineProperty(exports, "stackHosts", {
|
|
11321
|
+
enumerable: true,
|
|
11322
|
+
get: function() {
|
|
11323
|
+
return stackHosts;
|
|
11324
|
+
}
|
|
11325
|
+
});
|
|
10403
11326
|
Object.defineProperty(exports, "stackLogs", {
|
|
10404
11327
|
enumerable: true,
|
|
10405
11328
|
get: function() {
|
|
@@ -10454,6 +11377,12 @@ Object.defineProperty(exports, "surfaceClientTraced", {
|
|
|
10454
11377
|
return surfaceClientTraced;
|
|
10455
11378
|
}
|
|
10456
11379
|
});
|
|
11380
|
+
Object.defineProperty(exports, "systemLookup", {
|
|
11381
|
+
enumerable: true,
|
|
11382
|
+
get: function() {
|
|
11383
|
+
return systemLookup;
|
|
11384
|
+
}
|
|
11385
|
+
});
|
|
10457
11386
|
Object.defineProperty(exports, "telemetryOf", {
|
|
10458
11387
|
enumerable: true,
|
|
10459
11388
|
get: function() {
|
|
@@ -10466,6 +11395,12 @@ Object.defineProperty(exports, "toEmbeddableSecrets", {
|
|
|
10466
11395
|
return toEmbeddableSecrets;
|
|
10467
11396
|
}
|
|
10468
11397
|
});
|
|
11398
|
+
Object.defineProperty(exports, "upgradeV2State", {
|
|
11399
|
+
enumerable: true,
|
|
11400
|
+
get: function() {
|
|
11401
|
+
return upgradeV2State;
|
|
11402
|
+
}
|
|
11403
|
+
});
|
|
10469
11404
|
Object.defineProperty(exports, "usesTelemetry", {
|
|
10470
11405
|
enumerable: true,
|
|
10471
11406
|
get: function() {
|
|
@@ -10557,4 +11492,4 @@ Object.defineProperty(exports, "workspace_exports", {
|
|
|
10557
11492
|
}
|
|
10558
11493
|
});
|
|
10559
11494
|
|
|
10560
|
-
//# sourceMappingURL=seeds-
|
|
11495
|
+
//# sourceMappingURL=seeds-c-ByX9je.cjs.map
|