@geekmidas/cli 10.0.0-alpha.10 → 10.0.0-alpha.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +315 -414
- package/bin/adjacent-tsconfig.mjs +46 -8
- package/bin/gkm.mjs +11 -3
- package/bin/owning-tsconfig-jsx-register.mjs +18 -0
- package/bin/owning-tsconfig-jsx.mjs +108 -0
- package/dist/EndpointGenerator-Br97xgs_.mjs +1031 -0
- package/dist/EndpointGenerator-Br97xgs_.mjs.map +1 -0
- package/dist/EndpointGenerator-By5_tYE9.cjs +1090 -0
- package/dist/EndpointGenerator-By5_tYE9.cjs.map +1 -0
- package/dist/GoDaddyProvider-CVnzcWX5.mjs +388 -0
- package/dist/GoDaddyProvider-CVnzcWX5.mjs.map +1 -0
- package/dist/GoDaddyProvider-DS4Wgu0c.cjs +388 -0
- package/dist/GoDaddyProvider-DS4Wgu0c.cjs.map +1 -0
- package/dist/{HostingerProvider-Cft7lEYr.mjs → HostingerProvider-BNpS9aRJ.mjs} +29 -25
- package/dist/HostingerProvider-BNpS9aRJ.mjs.map +1 -0
- package/dist/{HostingerProvider-h3EbEp-Z.cjs → HostingerProvider-DR1iws1P.cjs} +29 -25
- package/dist/HostingerProvider-DR1iws1P.cjs.map +1 -0
- package/dist/LegacyStateStore-C2Xlqy4v.mjs +124 -0
- package/dist/LegacyStateStore-C2Xlqy4v.mjs.map +1 -0
- package/dist/LegacyStateStore-CoHPQMLO.cjs +124 -0
- package/dist/LegacyStateStore-CoHPQMLO.cjs.map +1 -0
- package/dist/LocalStateStore-BGDzf2f8.cjs +178 -0
- package/dist/LocalStateStore-BGDzf2f8.cjs.map +1 -0
- package/dist/LocalStateStore-By59pUve.mjs +167 -0
- package/dist/LocalStateStore-By59pUve.mjs.map +1 -0
- package/dist/OpenApiTsGenerator-BgSX_Z-e.cjs +541 -0
- package/dist/OpenApiTsGenerator-BgSX_Z-e.cjs.map +1 -0
- package/dist/OpenApiTsGenerator-C8aTX--y.mjs +536 -0
- package/dist/OpenApiTsGenerator-C8aTX--y.mjs.map +1 -0
- package/dist/{Route53Provider-di2fMM5N.cjs → Route53Provider-Bllus2NR.cjs} +21 -22
- package/dist/Route53Provider-Bllus2NR.cjs.map +1 -0
- package/dist/{Route53Provider-RdpUDJQk.mjs → Route53Provider-QXxjkZO1.mjs} +13 -13
- package/dist/Route53Provider-QXxjkZO1.mjs.map +1 -0
- package/dist/S3StateStore-CU485pYn.mjs +223 -0
- package/dist/S3StateStore-CU485pYn.mjs.map +1 -0
- package/dist/S3StateStore-Re4LfDTl.cjs +222 -0
- package/dist/S3StateStore-Re4LfDTl.cjs.map +1 -0
- package/dist/SSMStateStore-BquRBbUG.mjs +205 -0
- package/dist/SSMStateStore-BquRBbUG.mjs.map +1 -0
- package/dist/SSMStateStore-CLX4Dm5d.cjs +204 -0
- package/dist/SSMStateStore-CLX4Dm5d.cjs.map +1 -0
- package/dist/SubscriberGenerator-1-IsjIwF.mjs +449 -0
- package/dist/SubscriberGenerator-1-IsjIwF.mjs.map +1 -0
- package/dist/SubscriberGenerator-BlIOdbi-.cjs +490 -0
- package/dist/SubscriberGenerator-BlIOdbi-.cjs.map +1 -0
- package/dist/add-Blv6Q_YA.mjs +718 -0
- package/dist/add-Blv6Q_YA.mjs.map +1 -0
- package/dist/add-C6RhiCBX.cjs +720 -0
- package/dist/add-C6RhiCBX.cjs.map +1 -0
- package/dist/appPorts-C9z9Pzn9.mjs +223 -0
- package/dist/appPorts-C9z9Pzn9.mjs.map +1 -0
- package/dist/appPorts-Cu79hJF6.cjs +264 -0
- package/dist/appPorts-Cu79hJF6.cjs.map +1 -0
- package/dist/aws-8QQ8n-t6.mjs +89 -0
- package/dist/aws-8QQ8n-t6.mjs.map +1 -0
- package/dist/aws-DY9NqQIT.cjs +100 -0
- package/dist/aws-DY9NqQIT.cjs.map +1 -0
- package/dist/awsStore-Bx5nCFnS.mjs +121 -0
- package/dist/awsStore-Bx5nCFnS.mjs.map +1 -0
- package/dist/awsStore-u3ehhMoY.cjs +138 -0
- package/dist/awsStore-u3ehhMoY.cjs.map +1 -0
- package/dist/{backup-provisioner-Bgj5Vi_L.mjs → backup-provisioner-C8DnCmxK.mjs} +11 -8
- package/dist/backup-provisioner-C8DnCmxK.mjs.map +1 -0
- package/dist/{backup-provisioner-BrsHwYG0.cjs → backup-provisioner-oDEsPj02.cjs} +22 -20
- package/dist/backup-provisioner-oDEsPj02.cjs.map +1 -0
- package/dist/backups/runner.cjs +519 -0
- package/dist/backups/runner.cjs.map +1 -0
- package/dist/backups/runner.d.cts +102 -0
- package/dist/backups/runner.d.cts.map +1 -0
- package/dist/backups/runner.d.mts +102 -0
- package/dist/backups/runner.d.mts.map +1 -0
- package/dist/backups/runner.mjs +506 -0
- package/dist/backups/runner.mjs.map +1 -0
- package/dist/{bundler-Be8Zg4Wd.mjs → bundler-Cquc0e8N.mjs} +36 -32
- package/dist/bundler-Cquc0e8N.mjs.map +1 -0
- package/dist/{bundler-BY1OmV1e.cjs → bundler-DAeBIOlG.cjs} +38 -35
- package/dist/bundler-DAeBIOlG.cjs.map +1 -0
- package/dist/cli-DbeqYBTs.cjs +71 -0
- package/dist/cli-DbeqYBTs.cjs.map +1 -0
- package/dist/cli-tWfeiYmO.mjs +71 -0
- package/dist/cli-tWfeiYmO.mjs.map +1 -0
- package/dist/compose-BftbEv0b.mjs +3154 -0
- package/dist/compose-BftbEv0b.mjs.map +1 -0
- package/dist/compose-C_mfrSVH.cjs +3267 -0
- package/dist/compose-C_mfrSVH.cjs.map +1 -0
- package/dist/config-D48erO2j.d.mts +269 -0
- package/dist/config-D48erO2j.d.mts.map +1 -0
- package/dist/config-DHDtsQrB.d.cts +269 -0
- package/dist/config-DHDtsQrB.d.cts.map +1 -0
- package/dist/config.cjs +421 -11
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +4 -120
- package/dist/config.d.mts +4 -120
- package/dist/config.mjs +405 -4
- package/dist/config.mjs.map +1 -0
- package/dist/credentialSchemas-DDda4Mmm.cjs +272 -0
- package/dist/credentialSchemas-DDda4Mmm.cjs.map +1 -0
- package/dist/credentialSchemas-DvitraL-.mjs +237 -0
- package/dist/credentialSchemas-DvitraL-.mjs.map +1 -0
- package/dist/credentials-B5N5yKk6.mjs +267 -0
- package/dist/credentials-B5N5yKk6.mjs.map +1 -0
- package/dist/credentials-Zqr3QQYB.cjs +350 -0
- package/dist/credentials-Zqr3QQYB.cjs.map +1 -0
- package/dist/databases-BeGP5eDh.mjs +495 -0
- package/dist/databases-BeGP5eDh.mjs.map +1 -0
- package/dist/databases-DGALFDG3.cjs +598 -0
- package/dist/databases-DGALFDG3.cjs.map +1 -0
- package/dist/define-6poNqm5O.mjs +106 -0
- package/dist/define-6poNqm5O.mjs.map +1 -0
- package/dist/define-crmMcXFS.cjs +153 -0
- package/dist/define-crmMcXFS.cjs.map +1 -0
- package/dist/deploy/public.cjs +212 -0
- package/dist/deploy/public.cjs.map +1 -0
- package/dist/deploy/public.d.cts +653 -0
- package/dist/deploy/public.d.cts.map +1 -0
- package/dist/deploy/public.d.mts +653 -0
- package/dist/deploy/public.d.mts.map +1 -0
- package/dist/deploy/public.mjs +145 -0
- package/dist/deploy/public.mjs.map +1 -0
- package/dist/deploy/sniffer-envkit-patch.cjs +18 -10
- package/dist/deploy/sniffer-envkit-patch.cjs.map +1 -1
- package/dist/deploy/sniffer-envkit-patch.d.cts +0 -2
- package/dist/deploy/sniffer-envkit-patch.d.cts.map +1 -1
- package/dist/deploy/sniffer-envkit-patch.d.mts +0 -2
- package/dist/deploy/sniffer-envkit-patch.d.mts.map +1 -1
- package/dist/deploy/sniffer-envkit-patch.mjs +10 -2
- package/dist/deploy/sniffer-envkit-patch.mjs.map +1 -1
- package/dist/deploy/sniffer-envparser-worker.cjs +54 -0
- package/dist/deploy/sniffer-envparser-worker.cjs.map +1 -0
- package/dist/deploy/sniffer-envparser-worker.d.cts +1 -0
- package/dist/deploy/sniffer-envparser-worker.d.mts +1 -0
- package/dist/deploy/sniffer-envparser-worker.mjs +55 -0
- package/dist/deploy/sniffer-envparser-worker.mjs.map +1 -0
- package/dist/deploy/sniffer-hooks.cjs +13 -7
- package/dist/deploy/sniffer-hooks.cjs.map +1 -1
- package/dist/deploy/sniffer-hooks.d.cts +1 -2
- package/dist/deploy/sniffer-hooks.d.cts.map +1 -1
- package/dist/deploy/sniffer-hooks.d.mts +1 -2
- package/dist/deploy/sniffer-hooks.d.mts.map +1 -1
- package/dist/deploy/sniffer-hooks.mjs +10 -3
- package/dist/deploy/sniffer-hooks.mjs.map +1 -1
- package/dist/deploy/sniffer-loader.cjs +16 -7
- package/dist/deploy/sniffer-loader.cjs.map +1 -1
- package/dist/deploy/sniffer-loader.d.cts +1 -1
- package/dist/deploy/sniffer-loader.d.mts +1 -1
- package/dist/deploy/sniffer-loader.mjs +14 -3
- package/dist/deploy/sniffer-loader.mjs.map +1 -1
- package/dist/deploy/sniffer-routes-worker.cjs +11 -11
- package/dist/deploy/sniffer-routes-worker.cjs.map +1 -1
- package/dist/deploy/sniffer-routes-worker.d.cts +1 -1
- package/dist/deploy/sniffer-routes-worker.d.mts +1 -1
- package/dist/deploy/sniffer-routes-worker.mjs +4 -4
- package/dist/deploy/sniffer-routes-worker.mjs.map +1 -1
- package/dist/deploy/sniffer-worker.cjs +15 -6
- package/dist/deploy/sniffer-worker.cjs.map +1 -1
- package/dist/deploy/sniffer-worker.d.cts +1 -3
- package/dist/deploy/sniffer-worker.d.cts.map +1 -1
- package/dist/deploy/sniffer-worker.d.mts +1 -3
- package/dist/deploy/sniffer-worker.d.mts.map +1 -1
- package/dist/deploy/sniffer-worker.mjs +15 -4
- package/dist/deploy/sniffer-worker.mjs.map +1 -1
- package/dist/deploy-BSilGXuR.mjs +2317 -0
- package/dist/deploy-BSilGXuR.mjs.map +1 -0
- package/dist/deploy-CktQpmpU.cjs +2390 -0
- package/dist/deploy-CktQpmpU.cjs.map +1 -0
- package/dist/derive-B4vDpzgP.mjs +150 -0
- package/dist/derive-B4vDpzgP.mjs.map +1 -0
- package/dist/derive-DAbo49sm.cjs +161 -0
- package/dist/derive-DAbo49sm.cjs.map +1 -0
- package/dist/discover-BfhVW_kT.cjs +600 -0
- package/dist/discover-BfhVW_kT.cjs.map +1 -0
- package/dist/discover-CvTtV5ZD.d.cts +108 -0
- package/dist/discover-CvTtV5ZD.d.cts.map +1 -0
- package/dist/discover-W2kab9Lc.d.mts +108 -0
- package/dist/discover-W2kab9Lc.d.mts.map +1 -0
- package/dist/discover-kziEht4W.mjs +527 -0
- package/dist/discover-kziEht4W.mjs.map +1 -0
- package/dist/dns-CQZQL3gj.mjs +926 -0
- package/dist/dns-CQZQL3gj.mjs.map +1 -0
- package/dist/dns-KPxvcCdL.cjs +1057 -0
- package/dist/dns-KPxvcCdL.cjs.map +1 -0
- package/dist/dokploy-B7eMa6Pa.cjs +38 -0
- package/dist/dokploy-B7eMa6Pa.cjs.map +1 -0
- package/dist/dokploy-Dguhz3Uo.mjs +38 -0
- package/dist/dokploy-Dguhz3Uo.mjs.map +1 -0
- package/dist/drivers-BLU1fNs_.cjs +200 -0
- package/dist/drivers-BLU1fNs_.cjs.map +1 -0
- package/dist/drivers-C08LL4E8.mjs +177 -0
- package/dist/drivers-C08LL4E8.mjs.map +1 -0
- package/dist/{emit-CiZS_5Ub.mjs → emit-C1e8qD08.mjs} +13 -26
- package/dist/emit-C1e8qD08.mjs.map +1 -0
- package/dist/{emit-CbcRolsa.cjs → emit-Dmc1nvdS.cjs} +31 -57
- package/dist/emit-Dmc1nvdS.cjs.map +1 -0
- package/dist/encryption-CixpDF6e.mjs +89 -0
- package/dist/encryption-CixpDF6e.mjs.map +1 -0
- package/dist/encryption-DrhCX7G6.cjs +90 -0
- package/dist/encryption-DrhCX7G6.cjs.map +1 -0
- package/dist/engine-32gL2ju3.mjs +3082 -0
- package/dist/engine-32gL2ju3.mjs.map +1 -0
- package/dist/engine-CQgycl7o.cjs +3195 -0
- package/dist/engine-CQgycl7o.cjs.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-DYQ5wvod.mjs +829 -0
- package/dist/github-DYQ5wvod.mjs.map +1 -0
- package/dist/github-DkSCUoWS.cjs +829 -0
- package/dist/github-DkSCUoWS.cjs.map +1 -0
- package/dist/identity-CBXr4wNi.mjs +129 -0
- package/dist/identity-CBXr4wNi.mjs.map +1 -0
- package/dist/identity-CbLfgQNT.cjs +182 -0
- package/dist/identity-CbLfgQNT.cjs.map +1 -0
- package/dist/{index-C6e-ULLx.d.mts → index-8OfpOtSI.d.cts} +39 -24
- package/dist/index-8OfpOtSI.d.cts.map +1 -0
- package/dist/{index-CR5urhWX.d.cts → index-Dpji6Bxq.d.mts} +39 -24
- package/dist/index-Dpji6Bxq.d.mts.map +1 -0
- package/dist/index.cjs +10022 -12718
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +10648 -13356
- package/dist/index.mjs.map +1 -1
- package/dist/local-BwC2v2Y8.mjs +224 -0
- package/dist/local-BwC2v2Y8.mjs.map +1 -0
- package/dist/local-DNhnkugT.cjs +241 -0
- package/dist/local-DNhnkugT.cjs.map +1 -0
- package/dist/migrate-BoJxKbfR.mjs +181 -0
- package/dist/migrate-BoJxKbfR.mjs.map +1 -0
- package/dist/migrate-CJTyeBul.cjs +271 -0
- package/dist/migrate-CJTyeBul.cjs.map +1 -0
- package/dist/migrate-CxmkvMbw.mjs +266 -0
- package/dist/migrate-CxmkvMbw.mjs.map +1 -0
- package/dist/migrate-ISBZNDKU.cjs +181 -0
- package/dist/migrate-ISBZNDKU.cjs.map +1 -0
- package/dist/openapi.cjs +214 -10
- package/dist/openapi.cjs.map +1 -0
- package/dist/openapi.d.cts +38 -17
- package/dist/openapi.d.cts.map +1 -1
- package/dist/openapi.d.mts +38 -17
- package/dist/openapi.d.mts.map +1 -1
- package/dist/openapi.mjs +208 -5
- package/dist/openapi.mjs.map +1 -0
- package/dist/projectBucket-BBbQ1lHF.cjs +263 -0
- package/dist/projectBucket-BBbQ1lHF.cjs.map +1 -0
- package/dist/projectBucket-C_DN4WzF.mjs +222 -0
- package/dist/projectBucket-C_DN4WzF.mjs.map +1 -0
- package/dist/provider-BqpjG9QM.cjs +57 -0
- package/dist/provider-BqpjG9QM.cjs.map +1 -0
- package/dist/provider-CEOKk8NS.mjs +46 -0
- package/dist/provider-CEOKk8NS.mjs.map +1 -0
- package/dist/ready-BtxiI7Qb.cjs +403 -0
- package/dist/ready-BtxiI7Qb.cjs.map +1 -0
- package/dist/ready-CzHNHhI6.mjs +374 -0
- package/dist/ready-CzHNHhI6.mjs.map +1 -0
- package/dist/reconcile/public.cjs +3 -5
- package/dist/reconcile/public.d.cts +11 -87
- package/dist/reconcile/public.d.cts.map +1 -1
- package/dist/reconcile/public.d.mts +11 -87
- package/dist/reconcile/public.d.mts.map +1 -1
- package/dist/reconcile/public.mjs +3 -4
- package/dist/{reconcile-CFs8C_1a.mjs → reconcile--I7V4Klj.mjs} +4 -7
- package/dist/reconcile--I7V4Klj.mjs.map +1 -0
- package/dist/{reconcile-D0pimNiy.cjs → reconcile-CuCQBa5-.cjs} +5 -8
- package/dist/reconcile-CuCQBa5-.cjs.map +1 -0
- package/dist/resolve-Bei6BMbw.mjs +263 -0
- package/dist/resolve-Bei6BMbw.mjs.map +1 -0
- package/dist/resolve-qm7FrBj_.cjs +316 -0
- package/dist/resolve-qm7FrBj_.cjs.map +1 -0
- package/dist/rollback-BJ3H4kQ8.mjs +136 -0
- package/dist/rollback-BJ3H4kQ8.mjs.map +1 -0
- package/dist/rollback-Bt4xRXtq.cjs +165 -0
- package/dist/rollback-Bt4xRXtq.cjs.map +1 -0
- package/dist/rolldown-runtime-BhDjJH2R.mjs +15 -0
- package/dist/{chunk-CUT6urMc.cjs → rolldown-runtime-C0BPl7ul.cjs} +23 -10
- package/dist/run-BJLIerMM.mjs +133 -0
- package/dist/run-BJLIerMM.mjs.map +1 -0
- package/dist/run-fVZ-rLnc.cjs +174 -0
- package/dist/run-fVZ-rLnc.cjs.map +1 -0
- package/dist/runtime-ACdfK59n.d.cts +82 -0
- package/dist/runtime-ACdfK59n.d.cts.map +1 -0
- package/dist/runtime-YyQuekxi.d.mts +82 -0
- package/dist/runtime-YyQuekxi.d.mts.map +1 -0
- package/dist/s3-CrPoA89T.cjs +215 -0
- package/dist/s3-CrPoA89T.cjs.map +1 -0
- package/dist/s3-DQXZdmCM.mjs +215 -0
- package/dist/s3-DQXZdmCM.mjs.map +1 -0
- package/dist/sandbox/config-worker.cjs +43 -0
- package/dist/sandbox/config-worker.cjs.map +1 -0
- package/dist/sandbox/config-worker.d.cts +1 -0
- package/dist/sandbox/config-worker.d.mts +1 -0
- package/dist/sandbox/config-worker.mjs +44 -0
- package/dist/sandbox/config-worker.mjs.map +1 -0
- package/dist/sandbox/credentials-worker.cjs +54 -0
- package/dist/sandbox/credentials-worker.cjs.map +1 -0
- package/dist/sandbox/credentials-worker.d.cts +1 -0
- package/dist/sandbox/credentials-worker.d.mts +1 -0
- package/dist/sandbox/credentials-worker.mjs +55 -0
- package/dist/sandbox/credentials-worker.mjs.map +1 -0
- package/dist/sandbox/discover-worker.cjs +47 -0
- package/dist/sandbox/discover-worker.cjs.map +1 -0
- package/dist/sandbox/discover-worker.d.cts +1 -0
- package/dist/sandbox/discover-worker.d.mts +1 -0
- package/dist/sandbox/discover-worker.mjs +48 -0
- package/dist/sandbox/discover-worker.mjs.map +1 -0
- package/dist/sandbox/migrate-worker.cjs +75 -0
- package/dist/sandbox/migrate-worker.cjs.map +1 -0
- package/dist/sandbox/migrate-worker.d.cts +1 -0
- package/dist/sandbox/migrate-worker.d.mts +1 -0
- package/dist/sandbox/migrate-worker.mjs +76 -0
- package/dist/sandbox/migrate-worker.mjs.map +1 -0
- package/dist/sandbox-C4g1eG31.d.mts +104 -0
- package/dist/sandbox-C4g1eG31.d.mts.map +1 -0
- package/dist/sandbox-CHv3OYXg.cjs +165 -0
- package/dist/sandbox-CHv3OYXg.cjs.map +1 -0
- package/dist/sandbox-CbVB7uOD.mjs +118 -0
- package/dist/sandbox-CbVB7uOD.mjs.map +1 -0
- package/dist/sandbox-CdKgQ3XU.d.cts +104 -0
- package/dist/sandbox-CdKgQ3XU.d.cts.map +1 -0
- package/dist/{workspace-C6VJQVtG.cjs → schemas-BCwKKA42.mjs} +958 -1842
- package/dist/schemas-BCwKKA42.mjs.map +1 -0
- package/dist/{workspace-zoqRbihZ.mjs → schemas-BQ_v0lEX.cjs} +1048 -1658
- package/dist/schemas-BQ_v0lEX.cjs.map +1 -0
- package/dist/secretsManager-CQORubp9.mjs +97 -0
- package/dist/secretsManager-CQORubp9.mjs.map +1 -0
- package/dist/secretsManager-RAGcEDX1.cjs +108 -0
- package/dist/secretsManager-RAGcEDX1.cjs.map +1 -0
- package/dist/seeds-CHIPcMrY.cjs +9115 -0
- package/dist/seeds-CHIPcMrY.cjs.map +1 -0
- package/dist/seeds-E4nUeXTl.mjs +8148 -0
- package/dist/seeds-E4nUeXTl.mjs.map +1 -0
- package/dist/sniffer-bUiSXLMj.mjs +1825 -0
- package/dist/sniffer-bUiSXLMj.mjs.map +1 -0
- package/dist/sniffer-n3TkX6JD.cjs +1998 -0
- package/dist/sniffer-n3TkX6JD.cjs.map +1 -0
- package/dist/sst-B-Uz4cvm.cjs +464 -0
- package/dist/sst-B-Uz4cvm.cjs.map +1 -0
- package/dist/sst-C1pxbFEd.mjs +441 -0
- package/dist/sst-C1pxbFEd.mjs.map +1 -0
- package/dist/stages-DJrOYLZ-.mjs +176 -0
- package/dist/stages-DJrOYLZ-.mjs.map +1 -0
- package/dist/stages-_3RVNG83.cjs +176 -0
- package/dist/stages-_3RVNG83.cjs.map +1 -0
- package/dist/target/public.cjs +15 -0
- package/dist/target/public.d.cts +28 -0
- package/dist/target/public.d.cts.map +1 -0
- package/dist/target/public.d.mts +28 -0
- package/dist/target/public.d.mts.map +1 -0
- package/dist/target/public.mjs +4 -0
- package/dist/terminal-Bs_lNQhL.mjs +85 -0
- package/dist/terminal-Bs_lNQhL.mjs.map +1 -0
- package/dist/terminal-CsQz4oT0.cjs +85 -0
- package/dist/terminal-CsQz4oT0.cjs.map +1 -0
- package/dist/types-B6UXlEkf.d.cts +7650 -0
- package/dist/types-B6UXlEkf.d.cts.map +1 -0
- package/dist/types-HqVPddRK.d.mts +7649 -0
- package/dist/types-HqVPddRK.d.mts.map +1 -0
- package/dist/utils-D2Nk1Nv2.cjs +205 -0
- package/dist/utils-D2Nk1Nv2.cjs.map +1 -0
- package/dist/utils-D_fxUqvU.mjs +156 -0
- package/dist/utils-D_fxUqvU.mjs.map +1 -0
- package/dist/vitest.cjs +65 -0
- package/dist/vitest.cjs.map +1 -0
- package/dist/vitest.d.cts +29 -0
- package/dist/vitest.d.cts.map +1 -0
- package/dist/vitest.d.mts +29 -0
- package/dist/vitest.d.mts.map +1 -0
- package/dist/vitest.mjs +65 -0
- package/dist/vitest.mjs.map +1 -0
- package/dist/workerRuntime-BXfhbe13.cjs +108 -0
- package/dist/workerRuntime-BXfhbe13.cjs.map +1 -0
- package/dist/workerRuntime-CsOyBRx2.mjs +79 -0
- package/dist/workerRuntime-CsOyBRx2.mjs.map +1 -0
- package/dist/workspace/index.cjs +8 -4
- package/dist/workspace/index.d.cts +3 -3
- package/dist/workspace/index.d.mts +3 -3
- package/dist/workspace/index.mjs +2 -3
- package/dist/workspace-BwqQnool.cjs +2806 -0
- package/dist/workspace-BwqQnool.cjs.map +1 -0
- package/dist/workspace-D1QbNd55.mjs +2394 -0
- package/dist/workspace-D1QbNd55.mjs.map +1 -0
- package/package.json +54 -22
- package/dist/CachedStateProvider-BLo7zv7S.cjs +0 -3
- package/dist/CachedStateProvider-BxoAm-B2.mjs +0 -3
- package/dist/CachedStateProvider-CqPdW7CB.cjs +0 -60
- package/dist/CachedStateProvider-CqPdW7CB.cjs.map +0 -1
- package/dist/CachedStateProvider-DTniehMP.mjs +0 -54
- package/dist/CachedStateProvider-DTniehMP.mjs.map +0 -1
- package/dist/HostingerProvider-Cft7lEYr.mjs.map +0 -1
- package/dist/HostingerProvider-h3EbEp-Z.cjs.map +0 -1
- package/dist/LocalStateProvider-Bn6tS-oL.mjs +0 -42
- package/dist/LocalStateProvider-Bn6tS-oL.mjs.map +0 -1
- package/dist/LocalStateProvider-Db9SEjyH.cjs +0 -43
- package/dist/LocalStateProvider-Db9SEjyH.cjs.map +0 -1
- package/dist/Route53Provider-RdpUDJQk.mjs.map +0 -1
- package/dist/Route53Provider-di2fMM5N.cjs.map +0 -1
- package/dist/SSMStateProvider-BRt2py-A.mjs +0 -66
- package/dist/SSMStateProvider-BRt2py-A.mjs.map +0 -1
- package/dist/SSMStateProvider-DyX8s9HI.cjs +0 -66
- package/dist/SSMStateProvider-DyX8s9HI.cjs.map +0 -1
- package/dist/backup-provisioner-Bgj5Vi_L.mjs.map +0 -1
- package/dist/backup-provisioner-BrsHwYG0.cjs.map +0 -1
- package/dist/bundler-BY1OmV1e.cjs.map +0 -1
- package/dist/bundler-Be8Zg4Wd.mjs.map +0 -1
- package/dist/chunk-Duj1WY3L.mjs +0 -7
- package/dist/config-BZ1F0WuA.cjs +0 -462
- package/dist/config-BZ1F0WuA.cjs.map +0 -1
- package/dist/config-DVVph9yz.mjs +0 -402
- package/dist/config-DVVph9yz.mjs.map +0 -1
- package/dist/config.d.cts.map +0 -1
- package/dist/config.d.mts.map +0 -1
- package/dist/credentials-B5zRHdAl.mjs +0 -141
- package/dist/credentials-B5zRHdAl.mjs.map +0 -1
- package/dist/credentials-BapzjyV5.cjs +0 -195
- package/dist/credentials-BapzjyV5.cjs.map +0 -1
- package/dist/credentials-Xamqe_NJ.cjs +0 -2681
- package/dist/credentials-Xamqe_NJ.cjs.map +0 -1
- package/dist/credentials-dP8vRVRv.mjs +0 -2549
- package/dist/credentials-dP8vRVRv.mjs.map +0 -1
- package/dist/discover-CAlFgYec.mjs +0 -229
- package/dist/discover-CAlFgYec.mjs.map +0 -1
- package/dist/discover-DTmFeloL.cjs +0 -271
- package/dist/discover-DTmFeloL.cjs.map +0 -1
- package/dist/dokploy-api-BS2xnJLZ.mjs +0 -3
- package/dist/dokploy-api-BsVH0y_s.cjs +0 -718
- package/dist/dokploy-api-BsVH0y_s.cjs.map +0 -1
- package/dist/dokploy-api-BuxDRo3l.cjs +0 -3
- package/dist/dokploy-api-aTFPz7_4.mjs +0 -706
- package/dist/dokploy-api-aTFPz7_4.mjs.map +0 -1
- package/dist/emit-CbcRolsa.cjs.map +0 -1
- package/dist/emit-CiZS_5Ub.mjs.map +0 -1
- package/dist/encryption-C6jaU0hE.cjs +0 -54
- package/dist/encryption-C6jaU0hE.cjs.map +0 -1
- package/dist/encryption-CHzzeR8a.cjs +0 -4
- package/dist/encryption-CQUncu7v.mjs +0 -3
- package/dist/encryption-D-abyhZx.mjs +0 -42
- package/dist/encryption-D-abyhZx.mjs.map +0 -1
- package/dist/fullstack-secrets-C-GGohke.cjs +0 -111
- package/dist/fullstack-secrets-C-GGohke.cjs.map +0 -1
- package/dist/fullstack-secrets-D1o9-G5l.mjs +0 -87
- package/dist/fullstack-secrets-D1o9-G5l.mjs.map +0 -1
- package/dist/generator-CNzBw7g5.cjs +0 -289
- package/dist/generator-CNzBw7g5.cjs.map +0 -1
- package/dist/generator-VE2JrFlY.mjs +0 -253
- package/dist/generator-VE2JrFlY.mjs.map +0 -1
- package/dist/index-C6e-ULLx.d.mts.map +0 -1
- package/dist/index-CR5urhWX.d.cts.map +0 -1
- package/dist/openapi-SjsgARie.cjs +0 -2075
- package/dist/openapi-SjsgARie.cjs.map +0 -1
- package/dist/openapi-Xx0A7Wg0.mjs +0 -2021
- package/dist/openapi-Xx0A7Wg0.mjs.map +0 -1
- package/dist/openapi-react-query-Byltvm_7.mjs +0 -167
- package/dist/openapi-react-query-Byltvm_7.mjs.map +0 -1
- package/dist/openapi-react-query-CmJ1xDbn.cjs +0 -173
- package/dist/openapi-react-query-CmJ1xDbn.cjs.map +0 -1
- package/dist/openapi-react-query.cjs +0 -4
- package/dist/openapi-react-query.d.cts +0 -11
- package/dist/openapi-react-query.d.cts.map +0 -1
- package/dist/openapi-react-query.d.mts +0 -11
- package/dist/openapi-react-query.d.mts.map +0 -1
- package/dist/openapi-react-query.mjs +0 -4
- package/dist/reconcile-CFs8C_1a.mjs.map +0 -1
- package/dist/reconcile-D0pimNiy.cjs.map +0 -1
- package/dist/setup-BA8ciTPU.mjs +0 -11
- package/dist/setup-BsZvZP6f.cjs +0 -11
- package/dist/setup-C8KOx8_8.mjs +0 -443
- package/dist/setup-C8KOx8_8.mjs.map +0 -1
- package/dist/setup-hC6hI86f.cjs +0 -473
- package/dist/setup-hC6hI86f.cjs.map +0 -1
- package/dist/storage-BJmzYxt8.cjs +0 -363
- package/dist/storage-BJmzYxt8.cjs.map +0 -1
- package/dist/storage-BM9hGpgv.cjs +0 -7
- package/dist/storage-Bi24WfoW.mjs +0 -297
- package/dist/storage-Bi24WfoW.mjs.map +0 -1
- package/dist/storage-CYlGwWTj.mjs +0 -3
- package/dist/sync-CmEuNZsB.mjs +0 -76
- package/dist/sync-CmEuNZsB.mjs.map +0 -1
- package/dist/sync-D306yOWu.cjs +0 -4
- package/dist/sync-SizaChmC.cjs +0 -93
- package/dist/sync-SizaChmC.cjs.map +0 -1
- package/dist/sync-hOqAWHR6.mjs +0 -3
- package/dist/types-6pkp2RRj.d.mts +0 -2220
- package/dist/types-6pkp2RRj.d.mts.map +0 -1
- package/dist/types-Y3fKQSAK.d.cts +0 -2220
- package/dist/types-Y3fKQSAK.d.cts.map +0 -1
- package/dist/workspace-BzrG_2SI.mjs +0 -8
- package/dist/workspace-C6VJQVtG.cjs.map +0 -1
- package/dist/workspace-XXtNhqJl.cjs +0 -9
- package/dist/workspace-zoqRbihZ.mjs.map +0 -1
|
@@ -1,66 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
//#region src/reconcile/discover.d.ts
|
|
5
|
-
|
|
6
|
-
/** The construct face discovery needs: an id, and the ability to declare. */
|
|
7
|
-
interface Declarable {
|
|
8
|
-
id: string;
|
|
9
|
-
declare(): Declaration[];
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Whether a module export is a construct.
|
|
13
|
-
*
|
|
14
|
-
* Deliberately loose about what else it carries — a construct that also has a
|
|
15
|
-
* `service` is still a construct, and requiring one would exclude the kinds that
|
|
16
|
-
* own no address.
|
|
17
|
-
*/
|
|
18
|
-
declare function isDeclarable(value: unknown): value is Declarable;
|
|
19
|
-
interface DiscoverOptions {
|
|
20
|
-
/** The glob(s) to search. One pattern, not one per kind. */
|
|
21
|
-
patterns: string | readonly string[];
|
|
22
|
-
cwd?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Re-import changed modules, for the dev watcher.
|
|
25
|
-
*
|
|
26
|
-
* A single glob makes discovery more central, not less: a new construct file
|
|
27
|
-
* has to be picked up on `add`, not only on `change`.
|
|
28
|
-
*/
|
|
29
|
-
bustCache?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Filled in with where each construct was found, when provided.
|
|
32
|
-
*
|
|
33
|
-
* Discovery is the only thing that knows: it globbed the files and imported
|
|
34
|
-
* them. Everything downstream that needs to *write* an import — the build,
|
|
35
|
-
* generating a server entry that reads a surface's logger — would otherwise
|
|
36
|
-
* have to be told the path in config, which is the string this removes.
|
|
37
|
-
*
|
|
38
|
-
* An out-parameter rather than a second return value so that every existing
|
|
39
|
-
* caller, which wants the manifest and nothing else, is unchanged.
|
|
40
|
-
*/
|
|
41
|
-
sources?: Record<string, ConstructSource>;
|
|
42
|
-
}
|
|
43
|
-
/** Where a construct was declared, and under what name. */
|
|
44
|
-
interface ConstructSource {
|
|
45
|
-
/** Absolute path to the module that exported it. */
|
|
46
|
-
file: string;
|
|
47
|
-
/** The name it was exported as — what an import statement has to say. */
|
|
48
|
-
exportName: string;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Build the construct manifest for a project.
|
|
52
|
-
*
|
|
53
|
-
* Runs the manifest's own validation before returning, so an app is wrong here
|
|
54
|
-
* — where the error names a file — rather than at deploy.
|
|
55
|
-
*
|
|
56
|
-
* @throws {DuplicateConstruct} when two exports claim one id.
|
|
57
|
-
*/
|
|
58
|
-
declare function discover(options: DiscoverOptions): Promise<ConstructManifest>;
|
|
59
|
-
/** Two constructs claiming one id. */
|
|
60
|
-
//#endregion
|
|
1
|
+
import { n as EmailBackend, t as CacheBackend } from "../types-HqVPddRK.mjs";
|
|
2
|
+
import { a as isDeclarable, i as discover, r as DiscoverOptions } from "../discover-W2kab9Lc.mjs";
|
|
3
|
+
import { ConstructManifest, RouteInfo } from "@geekmidas/manifest";
|
|
61
4
|
//#region src/reconcile/emit.d.ts
|
|
62
|
-
/** Where the build writes it, relative to the app root. */
|
|
63
|
-
declare const MANIFEST_PATH = ".gkm/manifest.ts";
|
|
64
5
|
/**
|
|
65
6
|
* Fold the build's generated routes into the surface that serves them.
|
|
66
7
|
*
|
|
@@ -75,11 +16,10 @@ declare const MANIFEST_PATH = ".gkm/manifest.ts";
|
|
|
75
16
|
* already knows where it wrote each handler. Asking the declaration to restate
|
|
76
17
|
* any of that is how the two come to disagree.
|
|
77
18
|
*
|
|
78
|
-
* Attribution is
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* before anything needs it.
|
|
19
|
+
* Attribution is to the surface the build served — the one whose `path` is
|
|
20
|
+
* the app being built. Without one, routes go to the surface that declared none
|
|
21
|
+
* of its own; a surface with static endpoints (an auth server's single
|
|
22
|
+
* wildcard) keeps them.
|
|
83
23
|
*
|
|
84
24
|
* **Only from a provider that generates one handler per route.** The `server`
|
|
85
25
|
* provider generates a single catch-all — `ALL *` pointing at the Hono app that
|
|
@@ -89,37 +29,21 @@ declare const MANIFEST_PATH = ".gkm/manifest.ts";
|
|
|
89
29
|
* document's contents depend on which `--provider` ran last. A manifest must not
|
|
90
30
|
* do that.
|
|
91
31
|
*/
|
|
92
|
-
declare function withRoutes(manifest: ConstructManifest, routes: readonly RouteInfo[], options: {
|
|
32
|
+
export declare function withRoutes(manifest: ConstructManifest, routes: readonly RouteInfo[], options: {
|
|
93
33
|
perRoute: boolean;
|
|
34
|
+
surface?: string;
|
|
94
35
|
}): ConstructManifest;
|
|
95
|
-
/**
|
|
96
|
-
* Fold in the compute the build generated: functions, crons, queue workers and
|
|
97
|
-
* topic subscribers.
|
|
98
|
-
*
|
|
99
|
-
* All four are named by their *export*, the same way an endpoint's handler is —
|
|
100
|
-
* `CronGenerator` uses the export key as the name — so none of them can declare
|
|
101
|
-
* themselves and all of them are the build's to add. That is why a `Function`
|
|
102
|
-
* has no `declare()` and never will.
|
|
103
|
-
*
|
|
104
|
-
* A worker and a subscriber **nest** inside the queue or topic that triggers
|
|
105
|
-
* them, because position carries the trigger. A function and a cron are
|
|
106
|
-
* top-level, because nothing triggers them but a caller or a clock.
|
|
107
|
-
*/
|
|
108
|
-
|
|
109
36
|
/**
|
|
110
37
|
* The manifest as TypeScript source.
|
|
111
38
|
*
|
|
112
39
|
* Pure, so what gets written can be asserted without touching a filesystem.
|
|
113
40
|
*/
|
|
114
|
-
declare function manifestModule(manifest: ConstructManifest, backends?: Backends): string;
|
|
115
|
-
/** Write it where the deploy config expects to import it from. */
|
|
116
|
-
declare function writeManifestModule(manifest: ConstructManifest, appRoot: string, backends?: Backends): Promise<string>;
|
|
41
|
+
export declare function manifestModule(manifest: ConstructManifest, backends?: Backends): string;
|
|
117
42
|
/** The choices that are deployment config rather than declaration. */
|
|
118
43
|
interface Backends {
|
|
119
44
|
cache?: CacheBackend;
|
|
120
45
|
email?: EmailBackend;
|
|
121
46
|
}
|
|
122
|
-
//# sourceMappingURL=emit.d.ts.map
|
|
123
47
|
//#endregion
|
|
124
|
-
export { DiscoverOptions,
|
|
48
|
+
export { type DiscoverOptions, discover, isDeclarable };
|
|
125
49
|
//# sourceMappingURL=public.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.mts","names":[],"sources":["../../src/reconcile/
|
|
1
|
+
{"version":3,"file":"public.d.mts","names":[],"sources":["../../src/reconcile/emit.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA6DgB,WACf,UAAU,mBACV,iBAAiB,aACjB;EAAW;EAAmB;IAC5B;;;;;;wBA4Ja,eACf,UAAU,mBACV,WAAU;;UA8BM;EAChB,QAAQ;EACR,QAAQ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export { MANIFEST_PATH, discover, isDeclarable, manifestModule, withRoutes, writeManifestModule };
|
|
1
|
+
import { a as isDeclarable, r as discover } from "../discover-kziEht4W.mjs";
|
|
2
|
+
import { r as withRoutes, t as manifestModule } from "../emit-C1e8qD08.mjs";
|
|
3
|
+
export { discover, isDeclarable, manifestModule, withRoutes };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { generateFullstackCustomSecrets } from "./fullstack-secrets-D1o9-G5l.mjs";
|
|
3
|
-
|
|
1
|
+
import { t as generateFullstackCustomSecrets } from "./index.mjs";
|
|
4
2
|
//#region src/secrets/reconcile.ts
|
|
5
3
|
/**
|
|
6
4
|
* Reconcile missing custom secrets for a workspace.
|
|
@@ -12,8 +10,7 @@ import { generateFullstackCustomSecrets } from "./fullstack-secrets-D1o9-G5l.mjs
|
|
|
12
10
|
* @returns ReconcileResult if keys were added, null if secrets are up-to-date
|
|
13
11
|
*/
|
|
14
12
|
function reconcileMissingSecrets(secrets, workspace, containers = []) {
|
|
15
|
-
|
|
16
|
-
if (!isMultiApp) return null;
|
|
13
|
+
if (!(Object.keys(workspace.apps).length > 1)) return null;
|
|
17
14
|
const expectedCustom = generateFullstackCustomSecrets(workspace, containers);
|
|
18
15
|
const addedKeys = [];
|
|
19
16
|
const mergedCustom = { ...secrets.custom };
|
|
@@ -31,7 +28,7 @@ function reconcileMissingSecrets(secrets, workspace, containers = []) {
|
|
|
31
28
|
addedKeys
|
|
32
29
|
};
|
|
33
30
|
}
|
|
34
|
-
|
|
35
31
|
//#endregion
|
|
36
32
|
export { reconcileMissingSecrets };
|
|
37
|
-
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=reconcile--I7V4Klj.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconcile--I7V4Klj.mjs","names":[],"sources":["../src/secrets/reconcile.ts"],"sourcesContent":["import { generateFullstackCustomSecrets } from '../setup/fullstack-secrets.js';\nimport type { NormalizedWorkspace } from '../workspace/types.js';\nimport type { StageSecrets } from './types.js';\n\nexport interface ReconcileResult {\n\t/** The updated secrets with missing keys backfilled */\n\tsecrets: StageSecrets;\n\t/** Keys that were added */\n\taddedKeys: string[];\n}\n\n/**\n * Reconcile missing custom secrets for a workspace.\n *\n * Compares current secrets against what generateFullstackCustomSecrets()\n * would produce and backfills any missing keys without overwriting\n * existing values.\n *\n * @returns ReconcileResult if keys were added, null if secrets are up-to-date\n */\nexport function reconcileMissingSecrets(\n\tsecrets: StageSecrets,\n\tworkspace: NormalizedWorkspace,\n\tcontainers: readonly string[] = [],\n): ReconcileResult | null {\n\tconst isMultiApp = Object.keys(workspace.apps).length > 1;\n\tif (!isMultiApp) {\n\t\treturn null;\n\t}\n\n\tconst expectedCustom = generateFullstackCustomSecrets(workspace, containers);\n\tconst addedKeys: string[] = [];\n\tconst mergedCustom = { ...secrets.custom };\n\n\tfor (const [key, value] of Object.entries(expectedCustom)) {\n\t\tif (!(key in mergedCustom)) {\n\t\t\tmergedCustom[key] = value;\n\t\t\taddedKeys.push(key);\n\t\t}\n\t}\n\n\tif (addedKeys.length === 0) {\n\t\treturn null;\n\t}\n\n\treturn {\n\t\tsecrets: {\n\t\t\t...secrets,\n\t\t\tupdatedAt: new Date().toISOString(),\n\t\t\tcustom: mergedCustom,\n\t\t},\n\t\taddedKeys,\n\t};\n}\n"],"mappings":";;;;;;;;;;;AAoBA,SAAgB,wBACf,SACA,WACA,aAAgC,CAAC,GACR;CAEzB,IAAI,EADe,OAAO,KAAK,UAAU,IAAI,CAAC,CAAC,SAAS,IAEvD,OAAO;CAGR,MAAM,iBAAiB,+BAA+B,WAAW,UAAU;CAC3E,MAAM,YAAsB,CAAC;CAC7B,MAAM,eAAe,EAAE,GAAG,QAAQ,OAAO;CAEzC,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,cAAc,GACvD,IAAI,EAAE,OAAO,eAAe;EAC3B,aAAa,OAAO;EACpB,UAAU,KAAK,GAAG;CACnB;CAGD,IAAI,UAAU,WAAW,GACxB,OAAO;CAGR,OAAO;EACN,SAAS;GACR,GAAG;GACH,4BAAW,IAAI,KAAK,EAAA,CAAE,YAAY;GAClC,QAAQ;EACT;EACA;CACD;AACD"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
require(
|
|
2
|
-
const require_fullstack_secrets = require('./fullstack-secrets-C-GGohke.cjs');
|
|
3
|
-
|
|
1
|
+
const require_index = require("./index.cjs");
|
|
4
2
|
//#region src/secrets/reconcile.ts
|
|
5
3
|
/**
|
|
6
4
|
* Reconcile missing custom secrets for a workspace.
|
|
@@ -12,9 +10,8 @@ const require_fullstack_secrets = require('./fullstack-secrets-C-GGohke.cjs');
|
|
|
12
10
|
* @returns ReconcileResult if keys were added, null if secrets are up-to-date
|
|
13
11
|
*/
|
|
14
12
|
function reconcileMissingSecrets(secrets, workspace, containers = []) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const expectedCustom = require_fullstack_secrets.generateFullstackCustomSecrets(workspace, containers);
|
|
13
|
+
if (!(Object.keys(workspace.apps).length > 1)) return null;
|
|
14
|
+
const expectedCustom = require_index.generateFullstackCustomSecrets(workspace, containers);
|
|
18
15
|
const addedKeys = [];
|
|
19
16
|
const mergedCustom = { ...secrets.custom };
|
|
20
17
|
for (const [key, value] of Object.entries(expectedCustom)) if (!(key in mergedCustom)) {
|
|
@@ -31,7 +28,7 @@ function reconcileMissingSecrets(secrets, workspace, containers = []) {
|
|
|
31
28
|
addedKeys
|
|
32
29
|
};
|
|
33
30
|
}
|
|
34
|
-
|
|
35
31
|
//#endregion
|
|
36
32
|
exports.reconcileMissingSecrets = reconcileMissingSecrets;
|
|
37
|
-
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=reconcile-CuCQBa5-.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconcile-CuCQBa5-.cjs","names":["generateFullstackCustomSecrets"],"sources":["../src/secrets/reconcile.ts"],"sourcesContent":["import { generateFullstackCustomSecrets } from '../setup/fullstack-secrets.js';\nimport type { NormalizedWorkspace } from '../workspace/types.js';\nimport type { StageSecrets } from './types.js';\n\nexport interface ReconcileResult {\n\t/** The updated secrets with missing keys backfilled */\n\tsecrets: StageSecrets;\n\t/** Keys that were added */\n\taddedKeys: string[];\n}\n\n/**\n * Reconcile missing custom secrets for a workspace.\n *\n * Compares current secrets against what generateFullstackCustomSecrets()\n * would produce and backfills any missing keys without overwriting\n * existing values.\n *\n * @returns ReconcileResult if keys were added, null if secrets are up-to-date\n */\nexport function reconcileMissingSecrets(\n\tsecrets: StageSecrets,\n\tworkspace: NormalizedWorkspace,\n\tcontainers: readonly string[] = [],\n): ReconcileResult | null {\n\tconst isMultiApp = Object.keys(workspace.apps).length > 1;\n\tif (!isMultiApp) {\n\t\treturn null;\n\t}\n\n\tconst expectedCustom = generateFullstackCustomSecrets(workspace, containers);\n\tconst addedKeys: string[] = [];\n\tconst mergedCustom = { ...secrets.custom };\n\n\tfor (const [key, value] of Object.entries(expectedCustom)) {\n\t\tif (!(key in mergedCustom)) {\n\t\t\tmergedCustom[key] = value;\n\t\t\taddedKeys.push(key);\n\t\t}\n\t}\n\n\tif (addedKeys.length === 0) {\n\t\treturn null;\n\t}\n\n\treturn {\n\t\tsecrets: {\n\t\t\t...secrets,\n\t\t\tupdatedAt: new Date().toISOString(),\n\t\t\tcustom: mergedCustom,\n\t\t},\n\t\taddedKeys,\n\t};\n}\n"],"mappings":";;;;;;;;;;;AAoBA,SAAgB,wBACf,SACA,WACA,aAAgC,CAAC,GACR;CAEzB,IAAI,EADe,OAAO,KAAK,UAAU,IAAI,CAAC,CAAC,SAAS,IAEvD,OAAO;CAGR,MAAM,iBAAiBA,cAAAA,+BAA+B,WAAW,UAAU;CAC3E,MAAM,YAAsB,CAAC;CAC7B,MAAM,eAAe,EAAE,GAAG,QAAQ,OAAO;CAEzC,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,cAAc,GACvD,IAAI,EAAE,OAAO,eAAe;EAC3B,aAAa,OAAO;EACpB,UAAU,KAAK,GAAG;CACnB;CAGD,IAAI,UAAU,WAAW,GACxB,OAAO;CAGR,OAAO;EACN,SAAS;GACR,GAAG;GACH,4BAAW,IAAI,KAAK,EAAA,CAAE,YAAY;GAClC,QAAQ;EACT;EACA;CACD;AACD"}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { t as GkmError } from "./errors-D8Gwp5kU.mjs";
|
|
2
|
+
import { a as UnknownDeployTarget, c as configuredTarget, i as DeployTargetNotYetSupported, n as isDeployTarget, o as builtinTarget, s as configurableBuiltins } from "./define-6poNqm5O.mjs";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
import { existsSync, readFileSync, realpathSync } from "node:fs";
|
|
5
|
+
import { pathToFileURL } from "node:url";
|
|
6
|
+
//#region src/target/package.ts
|
|
7
|
+
/**
|
|
8
|
+
* A target package, found the way the project would find it.
|
|
9
|
+
*
|
|
10
|
+
* From the workspace root, never from the CLI's own location or the process's
|
|
11
|
+
* working directory: the package is the project's dependency, and a CLI run
|
|
12
|
+
* through `pnpm dlx` — or a host deploying a checkout elsewhere — has neither
|
|
13
|
+
* in common with the project.
|
|
14
|
+
*/
|
|
15
|
+
/** A target package the project does not have installed. */
|
|
16
|
+
var TargetPackageNotFound = class extends GkmError {
|
|
17
|
+
target;
|
|
18
|
+
packageName;
|
|
19
|
+
from;
|
|
20
|
+
constructor(target, packageName, from) {
|
|
21
|
+
super(`deploy.targets.${target} names the package "${packageName}", which is not installed in ${from}. Add it to the workspace root: pnpm add -D ${packageName}`);
|
|
22
|
+
this.target = target;
|
|
23
|
+
this.packageName = packageName;
|
|
24
|
+
this.from = from;
|
|
25
|
+
this.name = "TargetPackageNotFound";
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* `name`'s directory and `package.json`, from the nearest `node_modules` at
|
|
30
|
+
* or above `from` — Node's own lookup, without the exports map getting in
|
|
31
|
+
* the way of reading `package.json`.
|
|
32
|
+
*/
|
|
33
|
+
function locatePackage(name, from) {
|
|
34
|
+
let dir = from;
|
|
35
|
+
while (true) {
|
|
36
|
+
const manifestPath = join(dir, "node_modules", name, "package.json");
|
|
37
|
+
if (existsSync(manifestPath)) return {
|
|
38
|
+
dir: realpathSync(dirname(manifestPath)),
|
|
39
|
+
manifest: JSON.parse(readFileSync(manifestPath, "utf-8"))
|
|
40
|
+
};
|
|
41
|
+
const parent = dirname(dir);
|
|
42
|
+
if (parent === dir) return void 0;
|
|
43
|
+
dir = parent;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/** The first file a conditions object leads to, as an `import` would. */
|
|
47
|
+
function pick(node) {
|
|
48
|
+
if (typeof node === "string") return node;
|
|
49
|
+
if (Array.isArray(node)) {
|
|
50
|
+
for (const option of node) {
|
|
51
|
+
const found = pick(option);
|
|
52
|
+
if (found) return found;
|
|
53
|
+
}
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (node && typeof node === "object") {
|
|
57
|
+
const conditions = node;
|
|
58
|
+
for (const condition of [
|
|
59
|
+
"import",
|
|
60
|
+
"node",
|
|
61
|
+
"default",
|
|
62
|
+
"require"
|
|
63
|
+
]) if (condition in conditions) {
|
|
64
|
+
const found = pick(conditions[condition]);
|
|
65
|
+
if (found) return found;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/** The file `import(name)` loads, relative to the package directory. */
|
|
70
|
+
function packageEntry(manifest) {
|
|
71
|
+
const { exports } = manifest;
|
|
72
|
+
let root = exports;
|
|
73
|
+
if (exports && typeof exports === "object" && !Array.isArray(exports)) {
|
|
74
|
+
if (Object.keys(exports).some((key) => key.startsWith("."))) root = exports["."];
|
|
75
|
+
}
|
|
76
|
+
return pick(root) ?? manifest.module ?? manifest.main ?? "index.js";
|
|
77
|
+
}
|
|
78
|
+
/** The module `name` is, imported from where the project would import it. */
|
|
79
|
+
async function importPackage(target, name, from) {
|
|
80
|
+
const located = locatePackage(name, from);
|
|
81
|
+
if (!located) throw new TargetPackageNotFound(target, name, from);
|
|
82
|
+
const entry = join(located.dir, packageEntry(located.manifest));
|
|
83
|
+
return await import(pathToFileURL(entry).href);
|
|
84
|
+
}
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/target/runtime.ts
|
|
87
|
+
/**
|
|
88
|
+
* A target's runtime, without loading the target.
|
|
89
|
+
*
|
|
90
|
+
* `gkm dev` and `gkm build` choose a project's backends by it on every start,
|
|
91
|
+
* synchronously, and must not import a deploy plugin to do so — a plugin may
|
|
92
|
+
* pull in a cloud SDK, and a broken one would stop `gkm dev` for a project
|
|
93
|
+
* that is only being developed. So a built-in's runtime is in the table, an
|
|
94
|
+
* inline target carries its own, and a package declares it in its
|
|
95
|
+
* `package.json`:
|
|
96
|
+
*
|
|
97
|
+
* ```json
|
|
98
|
+
* { "name": "@acme/gkm-target", "gkm": { "runtime": "server" } }
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
const RUNTIMES = ["server", "aws"];
|
|
102
|
+
/** A target package whose `package.json` does not say where it runs. */
|
|
103
|
+
var TargetRuntimeUndeclared = class extends GkmError {
|
|
104
|
+
target;
|
|
105
|
+
packageName;
|
|
106
|
+
found;
|
|
107
|
+
constructor(target, packageName, found) {
|
|
108
|
+
super(`The deploy target "${target}" (${packageName}) does not declare its runtime${found === void 0 ? "" : ` (gkm.runtime is ${JSON.stringify(found)})`}. Its package.json needs "gkm": { "runtime": "server" } or "aws", so gkm dev and gkm build can choose backends without loading it.`);
|
|
109
|
+
this.target = target;
|
|
110
|
+
this.packageName = packageName;
|
|
111
|
+
this.found = found;
|
|
112
|
+
this.name = "TargetRuntimeUndeclared";
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
/** The runtime a target package declares in `package.json#gkm.runtime`. */
|
|
116
|
+
function declaredRuntime(target, packageName, root) {
|
|
117
|
+
const located = root ? locatePackage(packageName, root) : void 0;
|
|
118
|
+
if (!located) throw new TargetPackageNotFound(target, packageName, root ?? "the workspace");
|
|
119
|
+
const runtime = located.manifest.gkm?.runtime;
|
|
120
|
+
if (!RUNTIMES.includes(runtime)) throw new TargetRuntimeUndeclared(target, packageName, runtime);
|
|
121
|
+
return runtime;
|
|
122
|
+
}
|
|
123
|
+
/** The runtime of the target `name`, as the workspace resolves it. */
|
|
124
|
+
function runtimeOf(name, workspace) {
|
|
125
|
+
const builtin = builtinTarget(name);
|
|
126
|
+
if (builtin) return builtin.runtime;
|
|
127
|
+
const entry = configuredTarget(workspace.deploy, name);
|
|
128
|
+
if (entry === void 0) throw new UnknownDeployTarget(name, [...configurableBuiltins(), ...Object.keys(workspace.deploy?.targets ?? {})]);
|
|
129
|
+
const implementation = Array.isArray(entry) ? entry[0] : entry;
|
|
130
|
+
return typeof implementation === "string" ? declaredRuntime(name, implementation, workspace.root) : implementation.runtime;
|
|
131
|
+
}
|
|
132
|
+
//#endregion
|
|
133
|
+
//#region src/target/resolve.ts
|
|
134
|
+
/**
|
|
135
|
+
* From a target's name to the target.
|
|
136
|
+
*
|
|
137
|
+
* In this order, the first that has the name wins:
|
|
138
|
+
*
|
|
139
|
+
* 1. the host's own targets — what a program calling `deploy()` passes
|
|
140
|
+
* 2. the built-ins — `dokploy`, `compose`, `sst`
|
|
141
|
+
* 3. `deploy.targets` in gkm.config.ts — a package, an object, or either
|
|
142
|
+
* with options
|
|
143
|
+
*
|
|
144
|
+
* Built-ins come before the config so that a dependency cannot take over
|
|
145
|
+
* `dokploy` by being listed under its name. A name nothing has is
|
|
146
|
+
* `UnknownDeployTarget`. There is deliberately no fourth step that guesses a
|
|
147
|
+
* package from the name (`acme` → `@acme/gkm-target`): an npm scope nobody
|
|
148
|
+
* has claimed can be claimed by anyone, and a deploy would then run their
|
|
149
|
+
* code with the stage's credentials. A target is installed and named.
|
|
150
|
+
*/
|
|
151
|
+
/** A target package whose default export is not a target. */
|
|
152
|
+
var TargetPackageInvalid = class extends GkmError {
|
|
153
|
+
target;
|
|
154
|
+
packageName;
|
|
155
|
+
constructor(target, packageName) {
|
|
156
|
+
super(`deploy.targets.${target} names "${packageName}", whose default export is not a deploy target. A target package exports one as default: export default defineTarget({ … }) from '@geekmidas/cli/target'.`);
|
|
157
|
+
this.target = target;
|
|
158
|
+
this.packageName = packageName;
|
|
159
|
+
this.name = "TargetPackageInvalid";
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
/** A `deploy.targets` entry that is not a target, a package name or a pair. */
|
|
163
|
+
var TargetEntryInvalid = class extends GkmError {
|
|
164
|
+
target;
|
|
165
|
+
constructor(target) {
|
|
166
|
+
super(`deploy.targets.${target} must be a package name, a target object (defineTarget), or [package or target, options].`);
|
|
167
|
+
this.target = target;
|
|
168
|
+
this.name = "TargetEntryInvalid";
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
/** A target whose `runtime` is not the one its package declares. */
|
|
172
|
+
var TargetRuntimeMismatch = class extends GkmError {
|
|
173
|
+
target;
|
|
174
|
+
packageName;
|
|
175
|
+
declared;
|
|
176
|
+
actual;
|
|
177
|
+
constructor(target, packageName, declared, actual) {
|
|
178
|
+
super(`The deploy target "${target}" runs on "${actual}", but ${packageName}'s package.json declares gkm.runtime "${declared}". gkm dev and gkm build chose backends for "${declared}", so the two must agree — fix the package.`);
|
|
179
|
+
this.target = target;
|
|
180
|
+
this.packageName = packageName;
|
|
181
|
+
this.declared = declared;
|
|
182
|
+
this.actual = actual;
|
|
183
|
+
this.name = "TargetRuntimeMismatch";
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
/** Options a target's schema rejected. */
|
|
187
|
+
var InvalidTargetOptions = class extends GkmError {
|
|
188
|
+
target;
|
|
189
|
+
issues;
|
|
190
|
+
constructor(target, issues) {
|
|
191
|
+
const lines = issues.map((issue) => {
|
|
192
|
+
const path = (issue.path ?? []).map((segment) => typeof segment === "object" ? String(segment.key) : String(segment)).join(".");
|
|
193
|
+
return ` - ${path ? `${path}: ` : ""}${issue.message}`;
|
|
194
|
+
});
|
|
195
|
+
super(`The options for deploy target "${target}" are invalid — fix them in deploy.targets.${target} in gkm.config.ts:\n${lines.join("\n")}`);
|
|
196
|
+
this.target = target;
|
|
197
|
+
this.issues = issues;
|
|
198
|
+
this.name = "InvalidTargetOptions";
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
/** The built-ins `gkm deploy` deploys through, loaded only when used. */
|
|
202
|
+
const BUILTIN_LOADERS = {
|
|
203
|
+
dokploy: async () => (await import("./dokploy-Dguhz3Uo.mjs")).dokployTarget,
|
|
204
|
+
compose: async () => (await import("./compose-BftbEv0b.mjs").then((n) => n.n)).composeTarget(),
|
|
205
|
+
sst: async () => (await import("./sst-C1pxbFEd.mjs").then((n) => n.n)).sstTarget
|
|
206
|
+
};
|
|
207
|
+
/** The target `name` means, in this workspace, for this host. */
|
|
208
|
+
async function resolveTarget(name, { workspace, host, stage }) {
|
|
209
|
+
if (host && Object.hasOwn(host, name)) return {
|
|
210
|
+
name,
|
|
211
|
+
target: host[name],
|
|
212
|
+
source: "host",
|
|
213
|
+
options: void 0
|
|
214
|
+
};
|
|
215
|
+
const builtin = builtinTarget(name);
|
|
216
|
+
if (builtin) {
|
|
217
|
+
const load = BUILTIN_LOADERS[name];
|
|
218
|
+
if (builtin.status !== "available" || !load) throw new DeployTargetNotYetSupported(name, builtin.instead?.(stage));
|
|
219
|
+
return {
|
|
220
|
+
name,
|
|
221
|
+
target: await load(),
|
|
222
|
+
source: "builtin",
|
|
223
|
+
options: void 0
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
const entry = configuredTarget(workspace.deploy, name);
|
|
227
|
+
if (entry === void 0) throw new UnknownDeployTarget(name, [...configurableBuiltins(), ...Object.keys(workspace.deploy?.targets ?? {})]);
|
|
228
|
+
const [implementation, options] = Array.isArray(entry) ? entry : [entry, void 0];
|
|
229
|
+
if (typeof implementation === "string") {
|
|
230
|
+
const declared = declaredRuntime(name, implementation, workspace.root);
|
|
231
|
+
const target = (await importPackage(name, implementation, workspace.root)).default;
|
|
232
|
+
if (!isDeployTarget(target)) throw new TargetPackageInvalid(name, implementation);
|
|
233
|
+
if (target.runtime !== declared) throw new TargetRuntimeMismatch(name, implementation, declared, target.runtime);
|
|
234
|
+
return {
|
|
235
|
+
name,
|
|
236
|
+
target,
|
|
237
|
+
source: "config",
|
|
238
|
+
options
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
if (!isDeployTarget(implementation)) throw new TargetEntryInvalid(name);
|
|
242
|
+
return {
|
|
243
|
+
name,
|
|
244
|
+
target: implementation,
|
|
245
|
+
source: "config",
|
|
246
|
+
options
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
/** The target's options, parsed by its schema. */
|
|
250
|
+
async function parseTargetOptions(resolved) {
|
|
251
|
+
const { name, target, options } = resolved;
|
|
252
|
+
if (!target.options) {
|
|
253
|
+
if (options !== void 0) throw new InvalidTargetOptions(name, [{ message: "this target takes no options" }]);
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
const result = await target.options["~standard"].validate(options);
|
|
257
|
+
if (result.issues) throw new InvalidTargetOptions(name, result.issues);
|
|
258
|
+
return result.value;
|
|
259
|
+
}
|
|
260
|
+
//#endregion
|
|
261
|
+
export { parseTargetOptions as a, runtimeOf as c, TargetRuntimeMismatch as i, TargetPackageNotFound as l, TargetEntryInvalid as n, resolveTarget as o, TargetPackageInvalid as r, TargetRuntimeUndeclared as s, InvalidTargetOptions as t };
|
|
262
|
+
|
|
263
|
+
//# sourceMappingURL=resolve-Bei6BMbw.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-Bei6BMbw.mjs","names":[],"sources":["../src/target/package.ts","../src/target/runtime.ts","../src/target/resolve.ts"],"sourcesContent":["/**\n * A target package, found the way the project would find it.\n *\n * From the workspace root, never from the CLI's own location or the process's\n * working directory: the package is the project's dependency, and a CLI run\n * through `pnpm dlx` — or a host deploying a checkout elsewhere — has neither\n * in common with the project.\n */\n\nimport { existsSync, readFileSync, realpathSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport { GkmError } from '../errors';\n\nexport interface TargetPackageManifest {\n\tname?: string;\n\tmain?: string;\n\tmodule?: string;\n\texports?: unknown;\n\tgkm?: { runtime?: unknown };\n}\n\nexport interface LocatedPackage {\n\t/** The package's directory, symlinks resolved. */\n\tdir: string;\n\tmanifest: TargetPackageManifest;\n}\n\n/** A target package the project does not have installed. */\nexport class TargetPackageNotFound extends GkmError {\n\tconstructor(\n\t\treadonly target: string,\n\t\treadonly packageName: string,\n\t\treadonly from: string,\n\t) {\n\t\tsuper(\n\t\t\t`deploy.targets.${target} names the package \"${packageName}\", which is not installed in ${from}. Add it to the workspace root: pnpm add -D ${packageName}`,\n\t\t);\n\t\tthis.name = 'TargetPackageNotFound';\n\t}\n}\n\n/**\n * `name`'s directory and `package.json`, from the nearest `node_modules` at\n * or above `from` — Node's own lookup, without the exports map getting in\n * the way of reading `package.json`.\n */\nexport function locatePackage(\n\tname: string,\n\tfrom: string,\n): LocatedPackage | undefined {\n\tlet dir = from;\n\twhile (true) {\n\t\tconst manifestPath = join(dir, 'node_modules', name, 'package.json');\n\t\tif (existsSync(manifestPath)) {\n\t\t\treturn {\n\t\t\t\tdir: realpathSync(dirname(manifestPath)),\n\t\t\t\tmanifest: JSON.parse(\n\t\t\t\t\treadFileSync(manifestPath, 'utf-8'),\n\t\t\t\t) as TargetPackageManifest,\n\t\t\t};\n\t\t}\n\t\tconst parent = dirname(dir);\n\t\tif (parent === dir) return undefined;\n\t\tdir = parent;\n\t}\n}\n\n/** The first file a conditions object leads to, as an `import` would. */\nfunction pick(node: unknown): string | undefined {\n\tif (typeof node === 'string') return node;\n\tif (Array.isArray(node)) {\n\t\tfor (const option of node) {\n\t\t\tconst found = pick(option);\n\t\t\tif (found) return found;\n\t\t}\n\t\treturn undefined;\n\t}\n\tif (node && typeof node === 'object') {\n\t\tconst conditions = node as Record<string, unknown>;\n\t\tfor (const condition of ['import', 'node', 'default', 'require']) {\n\t\t\tif (condition in conditions) {\n\t\t\t\tconst found = pick(conditions[condition]);\n\t\t\t\tif (found) return found;\n\t\t\t}\n\t\t}\n\t}\n\treturn undefined;\n}\n\n/** The file `import(name)` loads, relative to the package directory. */\nexport function packageEntry(manifest: TargetPackageManifest): string {\n\tconst { exports } = manifest;\n\tlet root: unknown = exports;\n\tif (exports && typeof exports === 'object' && !Array.isArray(exports)) {\n\t\tconst keys = Object.keys(exports);\n\t\t// A subpath map — `{ \".\": …, \"./x\": … }` — rather than one conditions\n\t\t// object for the root.\n\t\tif (keys.some((key) => key.startsWith('.'))) {\n\t\t\troot = (exports as Record<string, unknown>)['.'];\n\t\t}\n\t}\n\treturn pick(root) ?? manifest.module ?? manifest.main ?? 'index.js';\n}\n\n/** The module `name` is, imported from where the project would import it. */\nexport async function importPackage(\n\ttarget: string,\n\tname: string,\n\tfrom: string,\n): Promise<Record<string, unknown>> {\n\tconst located = locatePackage(name, from);\n\tif (!located) throw new TargetPackageNotFound(target, name, from);\n\n\tconst entry = join(located.dir, packageEntry(located.manifest));\n\treturn (await import(pathToFileURL(entry).href)) as Record<string, unknown>;\n}\n","/**\n * A target's runtime, without loading the target.\n *\n * `gkm dev` and `gkm build` choose a project's backends by it on every start,\n * synchronously, and must not import a deploy plugin to do so — a plugin may\n * pull in a cloud SDK, and a broken one would stop `gkm dev` for a project\n * that is only being developed. So a built-in's runtime is in the table, an\n * inline target carries its own, and a package declares it in its\n * `package.json`:\n *\n * ```json\n * { \"name\": \"@acme/gkm-target\", \"gkm\": { \"runtime\": \"server\" } }\n * ```\n */\n\nimport { GkmError } from '../errors';\nimport {\n\tbuiltinTarget,\n\tconfigurableBuiltins,\n\tconfiguredTarget,\n\tUnknownDeployTarget,\n} from './builtins';\nimport { locatePackage, TargetPackageNotFound } from './package';\nimport type { DeployRuntime, DeployTargetEntry } from './types';\n\nconst RUNTIMES: readonly DeployRuntime[] = ['server', 'aws'];\n\n/** A target package whose `package.json` does not say where it runs. */\nexport class TargetRuntimeUndeclared extends GkmError {\n\tconstructor(\n\t\treadonly target: string,\n\t\treadonly packageName: string,\n\t\t/** What `gkm.runtime` held instead, when it held anything. */\n\t\treadonly found?: unknown,\n\t) {\n\t\tsuper(\n\t\t\t`The deploy target \"${target}\" (${packageName}) does not declare its runtime${found === undefined ? '' : ` (gkm.runtime is ${JSON.stringify(found)})`}. Its package.json needs \"gkm\": { \"runtime\": \"server\" } or \"aws\", so gkm dev and gkm build can choose backends without loading it.`,\n\t\t);\n\t\tthis.name = 'TargetRuntimeUndeclared';\n\t}\n}\n\n/** What a workspace's deploy config is read for here. */\nexport interface TargetSource {\n\t/** Where the target packages are installed from. */\n\troot?: string;\n\tdeploy?:\n\t\t| { default?: string; targets?: Record<string, DeployTargetEntry> }\n\t\t| undefined;\n}\n\n/** The runtime a target package declares in `package.json#gkm.runtime`. */\nexport function declaredRuntime(\n\ttarget: string,\n\tpackageName: string,\n\troot: string | undefined,\n): DeployRuntime {\n\tconst located = root ? locatePackage(packageName, root) : undefined;\n\tif (!located) {\n\t\tthrow new TargetPackageNotFound(\n\t\t\ttarget,\n\t\t\tpackageName,\n\t\t\troot ?? 'the workspace',\n\t\t);\n\t}\n\tconst runtime = located.manifest.gkm?.runtime;\n\tif (!RUNTIMES.includes(runtime as DeployRuntime)) {\n\t\tthrow new TargetRuntimeUndeclared(target, packageName, runtime);\n\t}\n\treturn runtime as DeployRuntime;\n}\n\n/** The runtime of the target `name`, as the workspace resolves it. */\nexport function runtimeOf(\n\tname: string,\n\tworkspace: TargetSource,\n): DeployRuntime {\n\tconst builtin = builtinTarget(name);\n\tif (builtin) return builtin.runtime;\n\n\tconst entry = configuredTarget(workspace.deploy, name);\n\tif (entry === undefined) {\n\t\tthrow new UnknownDeployTarget(name, [\n\t\t\t...configurableBuiltins(),\n\t\t\t...Object.keys(workspace.deploy?.targets ?? {}),\n\t\t]);\n\t}\n\n\tconst implementation = Array.isArray(entry) ? entry[0] : entry;\n\treturn typeof implementation === 'string'\n\t\t? declaredRuntime(name, implementation, workspace.root)\n\t\t: (implementation as { runtime: DeployRuntime }).runtime;\n}\n","/**\n * From a target's name to the target.\n *\n * In this order, the first that has the name wins:\n *\n * 1. the host's own targets — what a program calling `deploy()` passes\n * 2. the built-ins — `dokploy`, `compose`, `sst`\n * 3. `deploy.targets` in gkm.config.ts — a package, an object, or either\n * with options\n *\n * Built-ins come before the config so that a dependency cannot take over\n * `dokploy` by being listed under its name. A name nothing has is\n * `UnknownDeployTarget`. There is deliberately no fourth step that guesses a\n * package from the name (`acme` → `@acme/gkm-target`): an npm scope nobody\n * has claimed can be claimed by anyone, and a deploy would then run their\n * code with the stage's credentials. A target is installed and named.\n */\n\nimport { GkmError } from '../errors';\nimport {\n\tbuiltinTarget,\n\tconfigurableBuiltins,\n\tconfiguredTarget,\n\tDeployTargetNotYetSupported,\n\tUnknownDeployTarget,\n} from './builtins';\nimport { isDeployTarget } from './define';\nimport { importPackage } from './package';\nimport { declaredRuntime } from './runtime';\nimport type {\n\tAnyDeployTarget,\n\tDeployRuntime,\n\tDeployTargetEntry,\n\tTargetOptionsIssue,\n} from './types';\n\n/** Where a target came from. */\nexport type TargetSourceKind = 'host' | 'builtin' | 'config';\n\nexport interface ResolvedTarget {\n\t/** The name it was asked for by. */\n\tname: string;\n\ttarget: AnyDeployTarget;\n\tsource: TargetSourceKind;\n\t/** Its options as written in the config, before its schema parsed them. */\n\toptions: unknown;\n}\n\nexport interface ResolveTargetOptions {\n\t/** The workspace whose `deploy.targets` is consulted. */\n\tworkspace: {\n\t\troot: string;\n\t\tdeploy?: { targets?: Record<string, DeployTargetEntry> } | undefined;\n\t};\n\t/** The host's targets, consulted first. */\n\thost?: Record<string, AnyDeployTarget>;\n\t/** The stage being deployed, for what to do instead of a refused target. */\n\tstage: string;\n}\n\n/** A target package whose default export is not a target. */\nexport class TargetPackageInvalid extends GkmError {\n\tconstructor(\n\t\treadonly target: string,\n\t\treadonly packageName: string,\n\t) {\n\t\tsuper(\n\t\t\t`deploy.targets.${target} names \"${packageName}\", whose default export is not a deploy target. A target package exports one as default: export default defineTarget({ … }) from '@geekmidas/cli/target'.`,\n\t\t);\n\t\tthis.name = 'TargetPackageInvalid';\n\t}\n}\n\n/** A `deploy.targets` entry that is not a target, a package name or a pair. */\nexport class TargetEntryInvalid extends GkmError {\n\tconstructor(readonly target: string) {\n\t\tsuper(\n\t\t\t`deploy.targets.${target} must be a package name, a target object (defineTarget), or [package or target, options].`,\n\t\t);\n\t\tthis.name = 'TargetEntryInvalid';\n\t}\n}\n\n/** A target whose `runtime` is not the one its package declares. */\nexport class TargetRuntimeMismatch extends GkmError {\n\tconstructor(\n\t\treadonly target: string,\n\t\treadonly packageName: string,\n\t\treadonly declared: DeployRuntime,\n\t\treadonly actual: DeployRuntime,\n\t) {\n\t\tsuper(\n\t\t\t`The deploy target \"${target}\" runs on \"${actual}\", but ${packageName}'s package.json declares gkm.runtime \"${declared}\". gkm dev and gkm build chose backends for \"${declared}\", so the two must agree — fix the package.`,\n\t\t);\n\t\tthis.name = 'TargetRuntimeMismatch';\n\t}\n}\n\n/** Options a target's schema rejected. */\nexport class InvalidTargetOptions extends GkmError {\n\tconstructor(\n\t\treadonly target: string,\n\t\treadonly issues: readonly TargetOptionsIssue[],\n\t) {\n\t\tconst lines = issues.map((issue) => {\n\t\t\tconst path = (issue.path ?? [])\n\t\t\t\t.map((segment) =>\n\t\t\t\t\ttypeof segment === 'object' ? String(segment.key) : String(segment),\n\t\t\t\t)\n\t\t\t\t.join('.');\n\t\t\treturn ` - ${path ? `${path}: ` : ''}${issue.message}`;\n\t\t});\n\t\tsuper(\n\t\t\t`The options for deploy target \"${target}\" are invalid — fix them in deploy.targets.${target} in gkm.config.ts:\\n${lines.join('\\n')}`,\n\t\t);\n\t\tthis.name = 'InvalidTargetOptions';\n\t}\n}\n\n/** The built-ins `gkm deploy` deploys through, loaded only when used. */\nconst BUILTIN_LOADERS: Record<string, () => Promise<AnyDeployTarget>> = {\n\tdokploy: async () => (await import('./dokploy')).dokployTarget,\n\tcompose: async () => (await import('./compose/index')).composeTarget(),\n\tsst: async () => (await import('./sst/index')).sstTarget,\n};\n\n/** The target `name` means, in this workspace, for this host. */\nexport async function resolveTarget(\n\tname: string,\n\t{ workspace, host, stage }: ResolveTargetOptions,\n): Promise<ResolvedTarget> {\n\tif (host && Object.hasOwn(host, name)) {\n\t\treturn { name, target: host[name]!, source: 'host', options: undefined };\n\t}\n\n\tconst builtin = builtinTarget(name);\n\tif (builtin) {\n\t\tconst load = BUILTIN_LOADERS[name];\n\t\tif (builtin.status !== 'available' || !load) {\n\t\t\tthrow new DeployTargetNotYetSupported(name, builtin.instead?.(stage));\n\t\t}\n\t\treturn {\n\t\t\tname,\n\t\t\ttarget: await load(),\n\t\t\tsource: 'builtin',\n\t\t\toptions: undefined,\n\t\t};\n\t}\n\n\tconst entry = configuredTarget(workspace.deploy, name);\n\tif (entry === undefined) {\n\t\tthrow new UnknownDeployTarget(name, [\n\t\t\t...configurableBuiltins(),\n\t\t\t...Object.keys(workspace.deploy?.targets ?? {}),\n\t\t]);\n\t}\n\n\tconst [implementation, options] = Array.isArray(entry)\n\t\t? (entry as readonly [unknown, unknown])\n\t\t: [entry, undefined];\n\n\tif (typeof implementation === 'string') {\n\t\t// Before the import: a package that does not say where it runs is\n\t\t// refused without running any of its code.\n\t\tconst declared = declaredRuntime(name, implementation, workspace.root);\n\t\tconst loaded = await importPackage(name, implementation, workspace.root);\n\t\tconst target = loaded.default;\n\t\tif (!isDeployTarget(target)) {\n\t\t\tthrow new TargetPackageInvalid(name, implementation);\n\t\t}\n\t\tif (target.runtime !== declared) {\n\t\t\tthrow new TargetRuntimeMismatch(\n\t\t\t\tname,\n\t\t\t\timplementation,\n\t\t\t\tdeclared,\n\t\t\t\ttarget.runtime,\n\t\t\t);\n\t\t}\n\t\treturn { name, target, source: 'config', options };\n\t}\n\n\tif (!isDeployTarget(implementation)) throw new TargetEntryInvalid(name);\n\treturn { name, target: implementation, source: 'config', options };\n}\n\n/** The target's options, parsed by its schema. */\nexport async function parseTargetOptions(\n\tresolved: ResolvedTarget,\n): Promise<unknown> {\n\tconst { name, target, options } = resolved;\n\tif (!target.options) {\n\t\tif (options !== undefined) {\n\t\t\tthrow new InvalidTargetOptions(name, [\n\t\t\t\t{ message: 'this target takes no options' },\n\t\t\t]);\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tconst result = await target.options['~standard'].validate(options);\n\tif (result.issues) throw new InvalidTargetOptions(name, result.issues);\n\treturn result.value;\n}\n"],"mappings":";;;;;;;;;;;;;;;AA6BA,IAAa,wBAAb,cAA2C,SAAS;CAEzC;CACA;CACA;CAHV,YACC,QACA,aACA,MACC;EACD,MACC,kBAAkB,OAAO,sBAAsB,YAAY,+BAA+B,KAAK,8CAA8C,aAC9I;EANS,KAAA,SAAA;EACA,KAAA,cAAA;EACA,KAAA,OAAA;EAKT,KAAK,OAAO;CACb;AACD;;;;;;AAOA,SAAgB,cACf,MACA,MAC6B;CAC7B,IAAI,MAAM;CACV,OAAO,MAAM;EACZ,MAAM,eAAe,KAAK,KAAK,gBAAgB,M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