@geekmidas/cli 10.0.0-alpha.18 → 10.0.0-alpha.180
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +323 -380
- package/bin/adjacent-tsconfig.mjs +46 -8
- package/bin/gkm.mjs +11 -3
- package/bin/owning-tsconfig-jsx-register.mjs +18 -0
- package/bin/owning-tsconfig-jsx.mjs +108 -0
- package/dist/EndpointGenerator-CBKH87_b.mjs +1043 -0
- package/dist/EndpointGenerator-CBKH87_b.mjs.map +1 -0
- package/dist/EndpointGenerator-iyA3HkOH.cjs +1102 -0
- package/dist/EndpointGenerator-iyA3HkOH.cjs.map +1 -0
- package/dist/LegacyStateStore-B7pQA25B.mjs +124 -0
- package/dist/LegacyStateStore-B7pQA25B.mjs.map +1 -0
- package/dist/LegacyStateStore-l0hBdv-E.cjs +124 -0
- package/dist/LegacyStateStore-l0hBdv-E.cjs.map +1 -0
- package/dist/LocalStateStore-CP0UHL85.mjs +167 -0
- package/dist/LocalStateStore-CP0UHL85.mjs.map +1 -0
- package/dist/LocalStateStore-DEE0Kc_s.cjs +178 -0
- package/dist/LocalStateStore-DEE0Kc_s.cjs.map +1 -0
- package/dist/OpenApiTsGenerator-CoVA3Ykv.mjs +534 -0
- package/dist/OpenApiTsGenerator-CoVA3Ykv.mjs.map +1 -0
- package/dist/OpenApiTsGenerator-vy-fOJgs.cjs +539 -0
- package/dist/OpenApiTsGenerator-vy-fOJgs.cjs.map +1 -0
- package/dist/S3StateStore-DE0BNuXc.cjs +222 -0
- package/dist/S3StateStore-DE0BNuXc.cjs.map +1 -0
- package/dist/S3StateStore-vmxZWMKh.mjs +223 -0
- package/dist/S3StateStore-vmxZWMKh.mjs.map +1 -0
- package/dist/SSMStateStore-DQyXnX2M.mjs +205 -0
- package/dist/SSMStateStore-DQyXnX2M.mjs.map +1 -0
- package/dist/SSMStateStore-p4hBdTg3.cjs +204 -0
- package/dist/SSMStateStore-p4hBdTg3.cjs.map +1 -0
- package/dist/SubscriberGenerator-B3jHf26s.mjs +787 -0
- package/dist/SubscriberGenerator-B3jHf26s.mjs.map +1 -0
- package/dist/SubscriberGenerator-JhwVlWBS.cjs +852 -0
- package/dist/SubscriberGenerator-JhwVlWBS.cjs.map +1 -0
- package/dist/add-DEdpKya-.cjs +713 -0
- package/dist/add-DEdpKya-.cjs.map +1 -0
- package/dist/add-QBvDmVA-.mjs +711 -0
- package/dist/add-QBvDmVA-.mjs.map +1 -0
- package/dist/appPorts-BoXMwolc.mjs +249 -0
- package/dist/appPorts-BoXMwolc.mjs.map +1 -0
- package/dist/appPorts-IW-OZmRi.cjs +296 -0
- package/dist/appPorts-IW-OZmRi.cjs.map +1 -0
- package/dist/apps-D0LULFmU.mjs +4650 -0
- package/dist/apps-D0LULFmU.mjs.map +1 -0
- package/dist/apps-qJ5FPJGQ.cjs +5174 -0
- package/dist/apps-qJ5FPJGQ.cjs.map +1 -0
- package/dist/aws-BXfiWNbi.cjs +108 -0
- package/dist/aws-BXfiWNbi.cjs.map +1 -0
- package/dist/aws-BjvSTTcE.mjs +97 -0
- package/dist/aws-BjvSTTcE.mjs.map +1 -0
- package/dist/awsStore-BYYCmXiq.mjs +121 -0
- package/dist/awsStore-BYYCmXiq.mjs.map +1 -0
- package/dist/awsStore-DKQUElJL.cjs +138 -0
- package/dist/awsStore-DKQUElJL.cjs.map +1 -0
- package/dist/{backup-provisioner-DIVCbfee.mjs → backup-provisioner-C8DnCmxK.mjs} +2 -2
- package/dist/backup-provisioner-C8DnCmxK.mjs.map +1 -0
- package/dist/{backup-provisioner-BmhIO_Yr.cjs → backup-provisioner-oDEsPj02.cjs} +2 -2
- package/dist/backup-provisioner-oDEsPj02.cjs.map +1 -0
- package/dist/backups/runner.cjs +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-mjqGAvu1.cjs → bundler-BuBCXA0t.cjs} +67 -14
- package/dist/bundler-BuBCXA0t.cjs.map +1 -0
- package/dist/{bundler-mwH7WOb1.mjs → bundler-DZKdVVKZ.mjs} +68 -15
- package/dist/bundler-DZKdVVKZ.mjs.map +1 -0
- package/dist/cli-BCGkzaR1.cjs +80 -0
- package/dist/cli-BCGkzaR1.cjs.map +1 -0
- package/dist/cli-CgEbT00Q.mjs +80 -0
- package/dist/cli-CgEbT00Q.mjs.map +1 -0
- package/dist/clientTelemetry-BAwj6MOf.d.cts +10 -0
- package/dist/clientTelemetry-BAwj6MOf.d.cts.map +1 -0
- package/dist/clientTelemetry-CvamPJj_.d.mts +10 -0
- package/dist/clientTelemetry-CvamPJj_.d.mts.map +1 -0
- package/dist/compose-AO8u4mBI.cjs +3502 -0
- package/dist/compose-AO8u4mBI.cjs.map +1 -0
- package/dist/compose-C-yjexqX.cjs +2925 -0
- package/dist/compose-C-yjexqX.cjs.map +1 -0
- package/dist/compose-C23RpAaF.mjs +3389 -0
- package/dist/compose-C23RpAaF.mjs.map +1 -0
- package/dist/compose-DtfoUChm.mjs +2434 -0
- package/dist/compose-DtfoUChm.mjs.map +1 -0
- package/dist/config-BODxZemw.d.mts +291 -0
- package/dist/config-BODxZemw.d.mts.map +1 -0
- package/dist/config-C3U5HulX.d.cts +291 -0
- package/dist/config-C3U5HulX.d.cts.map +1 -0
- package/dist/config.cjs +457 -9
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +4 -117
- package/dist/config.d.mts +4 -117
- package/dist/config.mjs +441 -3
- package/dist/config.mjs.map +1 -0
- package/dist/credentialSchemas-D_85KW2k.mjs +236 -0
- package/dist/credentialSchemas-D_85KW2k.mjs.map +1 -0
- package/dist/credentialSchemas-DjK6xKMk.cjs +271 -0
- package/dist/credentialSchemas-DjK6xKMk.cjs.map +1 -0
- package/dist/databases-CV22HzrI.mjs +588 -0
- package/dist/databases-CV22HzrI.mjs.map +1 -0
- package/dist/databases-DwYYH2mX.cjs +703 -0
- package/dist/databases-DwYYH2mX.cjs.map +1 -0
- package/dist/dbTunnel-Bve0zBqT.cjs +154 -0
- package/dist/dbTunnel-Bve0zBqT.cjs.map +1 -0
- package/dist/dbTunnel-CnubkLBa.mjs +154 -0
- package/dist/dbTunnel-CnubkLBa.mjs.map +1 -0
- package/dist/define-BfrNaY82.mjs +106 -0
- package/dist/define-BfrNaY82.mjs.map +1 -0
- package/dist/define-zKgLY65H.cjs +153 -0
- package/dist/define-zKgLY65H.cjs.map +1 -0
- package/dist/deploy/public.cjs +211 -0
- package/dist/deploy/public.cjs.map +1 -0
- package/dist/deploy/public.d.cts +659 -0
- package/dist/deploy/public.d.cts.map +1 -0
- package/dist/deploy/public.d.mts +659 -0
- package/dist/deploy/public.d.mts.map +1 -0
- package/dist/deploy/public.mjs +144 -0
- package/dist/deploy/public.mjs.map +1 -0
- package/dist/deploy/sniffer-envparser-worker.cjs +54 -0
- package/dist/deploy/sniffer-envparser-worker.cjs.map +1 -0
- package/dist/deploy/sniffer-envparser-worker.d.cts +1 -0
- package/dist/deploy/sniffer-envparser-worker.d.mts +1 -0
- package/dist/deploy/sniffer-envparser-worker.mjs +55 -0
- package/dist/deploy/sniffer-envparser-worker.mjs.map +1 -0
- package/dist/deploy/sniffer-hooks.cjs +1 -1
- package/dist/deploy/sniffer-hooks.mjs +1 -1
- package/dist/deploy/sniffer-loader.cjs +2 -2
- package/dist/deploy/sniffer-loader.mjs +1 -1
- package/dist/deploy/sniffer-routes-worker.cjs +2 -2
- package/dist/deploy/sniffer-routes-worker.mjs +1 -1
- package/dist/deploy-C2MKxzm9.cjs +3894 -0
- package/dist/deploy-C2MKxzm9.cjs.map +1 -0
- package/dist/deploy-Qq41vtpm.mjs +3838 -0
- package/dist/deploy-Qq41vtpm.mjs.map +1 -0
- package/dist/destroy-Bg4IUf_Z.mjs +789 -0
- package/dist/destroy-Bg4IUf_Z.mjs.map +1 -0
- package/dist/destroy-CCpnHI2v.cjs +790 -0
- package/dist/destroy-CCpnHI2v.cjs.map +1 -0
- package/dist/discover-Dfmn6HQ7.mjs +940 -0
- package/dist/discover-Dfmn6HQ7.mjs.map +1 -0
- package/dist/discover-OXczlq08.cjs +1085 -0
- package/dist/discover-OXczlq08.cjs.map +1 -0
- package/dist/dns-BAM8VH1v.mjs +1820 -0
- package/dist/dns-BAM8VH1v.mjs.map +1 -0
- package/dist/dns-D_0z9Tm1.cjs +2257 -0
- package/dist/dns-D_0z9Tm1.cjs.map +1 -0
- package/dist/docker-6EUbKrEl.cjs +1798 -0
- package/dist/docker-6EUbKrEl.cjs.map +1 -0
- package/dist/docker-DQoE3Fr7.mjs +1649 -0
- package/dist/docker-DQoE3Fr7.mjs.map +1 -0
- package/dist/dokploy-BD8NXy8y.cjs +38 -0
- package/dist/dokploy-BD8NXy8y.cjs.map +1 -0
- package/dist/dokploy-CU9iuc35.mjs +38 -0
- package/dist/dokploy-CU9iuc35.mjs.map +1 -0
- package/dist/drivers-BQRb3KsL.mjs +294 -0
- package/dist/drivers-BQRb3KsL.mjs.map +1 -0
- package/dist/drivers-DP7__dJX.cjs +377 -0
- package/dist/drivers-DP7__dJX.cjs.map +1 -0
- package/dist/eas-BhTOdQrE.cjs +337 -0
- package/dist/eas-BhTOdQrE.cjs.map +1 -0
- package/dist/eas-iYyg7Xjy.mjs +334 -0
- package/dist/eas-iYyg7Xjy.mjs.map +1 -0
- package/dist/emit-C4KSXOeS.mjs +153 -0
- package/dist/emit-C4KSXOeS.mjs.map +1 -0
- package/dist/emit-DiW0kbue.cjs +164 -0
- package/dist/emit-DiW0kbue.cjs.map +1 -0
- package/dist/encryption-hgmnMZw0.mjs +89 -0
- package/dist/encryption-hgmnMZw0.mjs.map +1 -0
- package/dist/encryption-yROMpM67.cjs +90 -0
- package/dist/encryption-yROMpM67.cjs.map +1 -0
- package/dist/engine-B4whsrrE.mjs +3217 -0
- package/dist/engine-B4whsrrE.mjs.map +1 -0
- package/dist/engine-D0XYdIiE.cjs +3330 -0
- package/dist/engine-D0XYdIiE.cjs.map +1 -0
- package/dist/errors-C9uIyIDt.mjs +27 -0
- package/dist/errors-C9uIyIDt.mjs.map +1 -0
- package/dist/errors-D1x8duqI.cjs +38 -0
- package/dist/errors-D1x8duqI.cjs.map +1 -0
- package/dist/github-CBkZF4PS.mjs +986 -0
- package/dist/github-CBkZF4PS.mjs.map +1 -0
- package/dist/github-D1-_OnGL.cjs +987 -0
- package/dist/github-D1-_OnGL.cjs.map +1 -0
- package/dist/googlePlay-Bwv8TVi8.mjs +931 -0
- package/dist/googlePlay-Bwv8TVi8.mjs.map +1 -0
- package/dist/googlePlay-s9dGfrrb.cjs +931 -0
- package/dist/googlePlay-s9dGfrrb.cjs.map +1 -0
- package/dist/iam-BzFyFf7T.mjs +442 -0
- package/dist/iam-BzFyFf7T.mjs.map +1 -0
- package/dist/iam-WIoKnLBp.cjs +521 -0
- package/dist/iam-WIoKnLBp.cjs.map +1 -0
- package/dist/{index-RCUizGxL.d.cts → index-BKgOlfK2.d.mts} +38 -14
- package/dist/index-BKgOlfK2.d.mts.map +1 -0
- package/dist/{index-B4H4XF7A.d.mts → index-zPzigXh-.d.cts} +38 -14
- package/dist/index-zPzigXh-.d.cts.map +1 -0
- package/dist/index.cjs +14502 -12767
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +15137 -13400
- package/dist/index.mjs.map +1 -1
- package/dist/local-CFnHQgWC.cjs +241 -0
- package/dist/local-CFnHQgWC.cjs.map +1 -0
- package/dist/local-JOnTFJA5.mjs +224 -0
- package/dist/local-JOnTFJA5.mjs.map +1 -0
- package/dist/migrate-BtnpQocG.mjs +181 -0
- package/dist/migrate-BtnpQocG.mjs.map +1 -0
- package/dist/migrate-CGXrmZyV.cjs +272 -0
- package/dist/migrate-CGXrmZyV.cjs.map +1 -0
- package/dist/migrate-CxWXW-Lw.cjs +181 -0
- package/dist/migrate-CxWXW-Lw.cjs.map +1 -0
- package/dist/migrate-fLIgSpPB.mjs +267 -0
- package/dist/migrate-fLIgSpPB.mjs.map +1 -0
- package/dist/next.cjs +59 -0
- package/dist/next.cjs.map +1 -0
- package/dist/next.d.cts +44 -0
- package/dist/next.d.cts.map +1 -0
- package/dist/next.d.mts +44 -0
- package/dist/next.d.mts.map +1 -0
- package/dist/next.mjs +58 -0
- package/dist/next.mjs.map +1 -0
- package/dist/notes-ChYPaRLu.cjs +510 -0
- package/dist/notes-ChYPaRLu.cjs.map +1 -0
- package/dist/notes-LATU2vLI.mjs +409 -0
- package/dist/notes-LATU2vLI.mjs.map +1 -0
- package/dist/openapi.cjs +213 -7
- package/dist/openapi.cjs.map +1 -0
- package/dist/openapi.d.cts +27 -8
- package/dist/openapi.d.cts.map +1 -1
- package/dist/openapi.d.mts +27 -8
- package/dist/openapi.d.mts.map +1 -1
- package/dist/openapi.mjs +208 -2
- package/dist/openapi.mjs.map +1 -0
- package/dist/projectBucket-BIeh2HTj.cjs +263 -0
- package/dist/projectBucket-BIeh2HTj.cjs.map +1 -0
- package/dist/projectBucket-D_4zb_oh.mjs +222 -0
- package/dist/projectBucket-D_4zb_oh.mjs.map +1 -0
- package/dist/provider-BvjDbsTR.mjs +46 -0
- package/dist/provider-BvjDbsTR.mjs.map +1 -0
- package/dist/provider-DLhgo-mB.cjs +57 -0
- package/dist/provider-DLhgo-mB.cjs.map +1 -0
- package/dist/publish-Dc-1GQp8.cjs +124 -0
- package/dist/publish-Dc-1GQp8.cjs.map +1 -0
- package/dist/publish-DhzRYhVZ.mjs +123 -0
- package/dist/publish-DhzRYhVZ.mjs.map +1 -0
- package/dist/ready-BcV28QoW.mjs +375 -0
- package/dist/ready-BcV28QoW.mjs.map +1 -0
- package/dist/ready-ByQvw4-W.cjs +404 -0
- package/dist/ready-ByQvw4-W.cjs.map +1 -0
- package/dist/reconcile/public.cjs +3 -5
- package/dist/reconcile/public.d.cts +33 -89
- package/dist/reconcile/public.d.cts.map +1 -1
- package/dist/reconcile/public.d.mts +33 -89
- package/dist/reconcile/public.d.mts.map +1 -1
- package/dist/reconcile/public.mjs +3 -3
- package/dist/reconcile--I7V4Klj.mjs +34 -0
- package/dist/reconcile--I7V4Klj.mjs.map +1 -0
- package/dist/reconcile-CuCQBa5-.cjs +34 -0
- package/dist/reconcile-CuCQBa5-.cjs.map +1 -0
- package/dist/resolve-CJvM2bUx.mjs +263 -0
- package/dist/resolve-CJvM2bUx.mjs.map +1 -0
- package/dist/resolve-DyUXmA0z.cjs +316 -0
- package/dist/resolve-DyUXmA0z.cjs.map +1 -0
- package/dist/rollback-BO1asWkd.mjs +136 -0
- package/dist/rollback-BO1asWkd.mjs.map +1 -0
- package/dist/rollback-Op8Tc5N-.cjs +165 -0
- package/dist/rollback-Op8Tc5N-.cjs.map +1 -0
- package/dist/runtime-CaejlcZt.d.mts +82 -0
- package/dist/runtime-CaejlcZt.d.mts.map +1 -0
- package/dist/runtime-D3jD4Dvn.d.cts +82 -0
- package/dist/runtime-D3jD4Dvn.d.cts.map +1 -0
- package/dist/s3-BbtwHSod.mjs +240 -0
- package/dist/s3-BbtwHSod.mjs.map +1 -0
- package/dist/s3-CwacPd8J.cjs +240 -0
- package/dist/s3-CwacPd8J.cjs.map +1 -0
- package/dist/sandbox/config-worker.cjs +43 -0
- package/dist/sandbox/config-worker.cjs.map +1 -0
- package/dist/sandbox/config-worker.d.cts +1 -0
- package/dist/sandbox/config-worker.d.mts +1 -0
- package/dist/sandbox/config-worker.mjs +44 -0
- package/dist/sandbox/config-worker.mjs.map +1 -0
- package/dist/sandbox/credentials-worker.cjs +53 -0
- package/dist/sandbox/credentials-worker.cjs.map +1 -0
- package/dist/sandbox/credentials-worker.d.cts +1 -0
- package/dist/sandbox/credentials-worker.d.mts +1 -0
- package/dist/sandbox/credentials-worker.mjs +54 -0
- package/dist/sandbox/credentials-worker.mjs.map +1 -0
- package/dist/sandbox/discover-worker.cjs +47 -0
- package/dist/sandbox/discover-worker.cjs.map +1 -0
- package/dist/sandbox/discover-worker.d.cts +1 -0
- package/dist/sandbox/discover-worker.d.mts +1 -0
- package/dist/sandbox/discover-worker.mjs +48 -0
- package/dist/sandbox/discover-worker.mjs.map +1 -0
- package/dist/sandbox/migrate-worker.cjs +75 -0
- package/dist/sandbox/migrate-worker.cjs.map +1 -0
- package/dist/sandbox/migrate-worker.d.cts +1 -0
- package/dist/sandbox/migrate-worker.d.mts +1 -0
- package/dist/sandbox/migrate-worker.mjs +76 -0
- package/dist/sandbox/migrate-worker.mjs.map +1 -0
- package/dist/{workspace-CRD9YinV.cjs → schemas-BCwKKA42.mjs} +399 -1179
- package/dist/schemas-BCwKKA42.mjs.map +1 -0
- package/dist/{workspace-Bu3xNCej.mjs → schemas-BQ_v0lEX.cjs} +487 -982
- package/dist/schemas-BQ_v0lEX.cjs.map +1 -0
- package/dist/secretsManager-CjTo6CRq.mjs +113 -0
- package/dist/secretsManager-CjTo6CRq.mjs.map +1 -0
- package/dist/secretsManager-CvmBGjdM.cjs +124 -0
- package/dist/secretsManager-CvmBGjdM.cjs.map +1 -0
- package/dist/seeds-Bc3niNVb.cjs +382 -0
- package/dist/seeds-Bc3niNVb.cjs.map +1 -0
- package/dist/seeds-Ccn0Ru2T.mjs +299 -0
- package/dist/seeds-Ccn0Ru2T.mjs.map +1 -0
- package/dist/serverSetup-BFdzPTIT.cjs +685 -0
- package/dist/serverSetup-BFdzPTIT.cjs.map +1 -0
- package/dist/serverSetup-CSxaZ7ha.mjs +685 -0
- package/dist/serverSetup-CSxaZ7ha.mjs.map +1 -0
- package/dist/sniffer-CwxpsSez.mjs +1824 -0
- package/dist/sniffer-CwxpsSez.mjs.map +1 -0
- package/dist/sniffer-D3gH7aJT.cjs +1997 -0
- package/dist/sniffer-D3gH7aJT.cjs.map +1 -0
- package/dist/snsSubscriptions-B8tGxND5.cjs +1135 -0
- package/dist/snsSubscriptions-B8tGxND5.cjs.map +1 -0
- package/dist/snsSubscriptions-n3sjbrRM.mjs +1010 -0
- package/dist/snsSubscriptions-n3sjbrRM.mjs.map +1 -0
- package/dist/sst-Cjocp7gi.cjs +501 -0
- package/dist/sst-Cjocp7gi.cjs.map +1 -0
- package/dist/sst-DeF0BfDA.mjs +478 -0
- package/dist/sst-DeF0BfDA.mjs.map +1 -0
- package/dist/stack-CyoRqyPt.mjs +1777 -0
- package/dist/stack-CyoRqyPt.mjs.map +1 -0
- package/dist/stack-Dr2FSxGm.cjs +1887 -0
- package/dist/stack-Dr2FSxGm.cjs.map +1 -0
- package/dist/stage-TAx0Gcq8.mjs +303 -0
- package/dist/stage-TAx0Gcq8.mjs.map +1 -0
- package/dist/stage-aTBLKonw.cjs +332 -0
- package/dist/stage-aTBLKonw.cjs.map +1 -0
- package/dist/stages-BeSQQQ4z.cjs +190 -0
- package/dist/stages-BeSQQQ4z.cjs.map +1 -0
- package/dist/stages-DjFKQv08.mjs +190 -0
- package/dist/stages-DjFKQv08.mjs.map +1 -0
- package/dist/target/public.cjs +15 -0
- package/dist/target/public.d.cts +28 -0
- package/dist/target/public.d.cts.map +1 -0
- package/dist/target/public.d.mts +28 -0
- package/dist/target/public.d.mts.map +1 -0
- package/dist/target/public.mjs +4 -0
- package/dist/terminal-Bk4PjXWY.mjs +85 -0
- package/dist/terminal-Bk4PjXWY.mjs.map +1 -0
- package/dist/terminal-DPf137EJ.cjs +85 -0
- package/dist/terminal-DPf137EJ.cjs.map +1 -0
- package/dist/{types-7R81hu0i.d.mts → types-CLxsw-QY.d.cts} +2135 -428
- package/dist/types-CLxsw-QY.d.cts.map +1 -0
- package/dist/{types-N7c2O2m7.d.cts → types-wLlwkSib.d.mts} +2133 -428
- package/dist/types-wLlwkSib.d.mts.map +1 -0
- package/dist/utils-D2Nk1Nv2.cjs +205 -0
- package/dist/utils-D2Nk1Nv2.cjs.map +1 -0
- package/dist/utils-D_fxUqvU.mjs +156 -0
- package/dist/utils-D_fxUqvU.mjs.map +1 -0
- package/dist/vitest.cjs +65 -0
- package/dist/vitest.cjs.map +1 -0
- package/dist/vitest.d.cts +29 -0
- package/dist/vitest.d.cts.map +1 -0
- package/dist/vitest.d.mts +29 -0
- package/dist/vitest.d.mts.map +1 -0
- package/dist/vitest.mjs +65 -0
- package/dist/vitest.mjs.map +1 -0
- package/dist/workerRuntime-BXfhbe13.cjs +108 -0
- package/dist/workerRuntime-BXfhbe13.cjs.map +1 -0
- package/dist/workerRuntime-CsOyBRx2.mjs +79 -0
- package/dist/workerRuntime-CsOyBRx2.mjs.map +1 -0
- package/dist/workspace/index.cjs +6 -2
- package/dist/workspace/index.d.cts +3 -3
- package/dist/workspace/index.d.mts +3 -3
- package/dist/workspace/index.mjs +2 -2
- package/dist/workspace-DJjhfAGf.mjs +3027 -0
- package/dist/workspace-DJjhfAGf.mjs.map +1 -0
- package/dist/workspace-wTLnc1Ef.cjs +3577 -0
- package/dist/workspace-wTLnc1Ef.cjs.map +1 -0
- package/package.json +76 -13
- package/dist/HostingerProvider-BY26bWwB.mjs +0 -243
- package/dist/HostingerProvider-BY26bWwB.mjs.map +0 -1
- package/dist/HostingerProvider-BZFGYYVA.cjs +0 -243
- package/dist/HostingerProvider-BZFGYYVA.cjs.map +0 -1
- package/dist/LocalStateProvider-7HR6SS2t.cjs +0 -48
- package/dist/LocalStateProvider-7HR6SS2t.cjs.map +0 -1
- package/dist/LocalStateProvider-D7QyJoLM.mjs +0 -48
- package/dist/LocalStateProvider-D7QyJoLM.mjs.map +0 -1
- package/dist/Route53Provider-Cvj40A8I.mjs +0 -209
- package/dist/Route53Provider-Cvj40A8I.mjs.map +0 -1
- package/dist/Route53Provider-DVILBsvV.cjs +0 -209
- package/dist/Route53Provider-DVILBsvV.cjs.map +0 -1
- package/dist/SSMStateProvider-B0Hu1MKZ.mjs +0 -75
- package/dist/SSMStateProvider-B0Hu1MKZ.mjs.map +0 -1
- package/dist/SSMStateProvider-VrQ-yeqd.cjs +0 -74
- package/dist/SSMStateProvider-VrQ-yeqd.cjs.map +0 -1
- package/dist/backup-provisioner-BmhIO_Yr.cjs.map +0 -1
- package/dist/backup-provisioner-DIVCbfee.mjs.map +0 -1
- package/dist/bundler-mjqGAvu1.cjs.map +0 -1
- package/dist/bundler-mwH7WOb1.mjs.map +0 -1
- package/dist/config-DSXI480r.cjs +0 -467
- package/dist/config-DSXI480r.cjs.map +0 -1
- package/dist/config-DdKkoUE1.mjs +0 -414
- package/dist/config-DdKkoUE1.mjs.map +0 -1
- package/dist/config.d.cts.map +0 -1
- package/dist/config.d.mts.map +0 -1
- package/dist/credentials-C6Pfn6GY.cjs +0 -2939
- package/dist/credentials-C6Pfn6GY.cjs.map +0 -1
- package/dist/credentials-lbv-j0Be.mjs +0 -2802
- package/dist/credentials-lbv-j0Be.mjs.map +0 -1
- package/dist/discover-BERGFg8v.cjs +0 -288
- package/dist/discover-BERGFg8v.cjs.map +0 -1
- package/dist/discover-CK-n3w6b.mjs +0 -244
- package/dist/discover-CK-n3w6b.mjs.map +0 -1
- package/dist/emit-BdoPFjZf.cjs +0 -253
- package/dist/emit-BdoPFjZf.cjs.map +0 -1
- package/dist/emit-Bzq7JsMP.mjs +0 -224
- package/dist/emit-Bzq7JsMP.mjs.map +0 -1
- package/dist/generator-LfZU7NlU.mjs +0 -247
- package/dist/generator-LfZU7NlU.mjs.map +0 -1
- package/dist/generator-Wdfp0jCS.cjs +0 -282
- package/dist/generator-Wdfp0jCS.cjs.map +0 -1
- package/dist/github-DlIrXPee.mjs +0 -216
- package/dist/github-DlIrXPee.mjs.map +0 -1
- package/dist/github-n7N9yOff.cjs +0 -216
- package/dist/github-n7N9yOff.cjs.map +0 -1
- package/dist/index-B4H4XF7A.d.mts.map +0 -1
- package/dist/index-RCUizGxL.d.cts.map +0 -1
- package/dist/openapi-B8bu_OXN.cjs +0 -2038
- package/dist/openapi-B8bu_OXN.cjs.map +0 -1
- package/dist/openapi-DfjbhrsM.mjs +0 -1991
- package/dist/openapi-DfjbhrsM.mjs.map +0 -1
- package/dist/reconcile-Cq4cO83R.cjs +0 -136
- package/dist/reconcile-Cq4cO83R.cjs.map +0 -1
- package/dist/reconcile-fmoluZmZ.mjs +0 -113
- package/dist/reconcile-fmoluZmZ.mjs.map +0 -1
- package/dist/ssm-BKN1Cg4z.mjs +0 -60
- package/dist/ssm-BKN1Cg4z.mjs.map +0 -1
- package/dist/ssm-FxeSAt35.cjs +0 -60
- package/dist/ssm-FxeSAt35.cjs.map +0 -1
- package/dist/storage-DgypfSD6.cjs +0 -351
- package/dist/storage-DgypfSD6.cjs.map +0 -1
- package/dist/storage-TP0x118M.mjs +0 -304
- package/dist/storage-TP0x118M.mjs.map +0 -1
- package/dist/transfer-2aRVVJ6I.mjs +0 -122
- package/dist/transfer-2aRVVJ6I.mjs.map +0 -1
- package/dist/transfer-C3WZVmj_.cjs +0 -151
- package/dist/transfer-C3WZVmj_.cjs.map +0 -1
- package/dist/types-7R81hu0i.d.mts.map +0 -1
- package/dist/types-N7c2O2m7.d.cts.map +0 -1
- package/dist/workspace-Bu3xNCej.mjs.map +0 -1
- package/dist/workspace-CRD9YinV.cjs.map +0 -1
package/dist/next.d.mts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//#region src/next.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* `@geekmidas/cli/next` — what a Next.js site's `next.config.ts` builds from
|
|
4
|
+
* the workspace instead of from hand-kept lists.
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* import { imageRemotePatterns } from '@geekmidas/cli/next';
|
|
8
|
+
*
|
|
9
|
+
* export default {
|
|
10
|
+
* images: { remotePatterns: [...imageRemotePatterns(), // third parties ] },
|
|
11
|
+
* };
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* Read from the environment `gkm dev`, `gkm exec` and a compose or AWS site
|
|
15
|
+
* build hand the site, so it imports nothing of the workspace and runs
|
|
16
|
+
* wherever `next.config` does.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* One entry of `images.remotePatterns`, as Next takes it. Stated here rather
|
|
20
|
+
* than imported, so this module needs no `next` to load.
|
|
21
|
+
*/
|
|
22
|
+
export interface RemotePattern {
|
|
23
|
+
protocol?: 'http' | 'https';
|
|
24
|
+
hostname: string;
|
|
25
|
+
port?: string;
|
|
26
|
+
pathname?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A `RemotePattern` for every origin the site's pages load files from: each
|
|
30
|
+
* file server it has an edge to, and the host each bucket it reaches signs
|
|
31
|
+
* its links on — for the stage being built, as gkm resolved them.
|
|
32
|
+
*
|
|
33
|
+
* Under `gkm dev` those are the local ones: the file server's `*.localhost`
|
|
34
|
+
* host and MinIO's address, on the ports this machine assigned. An empty list
|
|
35
|
+
* where nothing handed the site its origins (a plain `next build`), rather
|
|
36
|
+
* than a throw: the config still loads, and `next/image` refuses the hosts it
|
|
37
|
+
* was not told about, as it would have.
|
|
38
|
+
*
|
|
39
|
+
* Every path on each host: a file server answers signed paths and open ones,
|
|
40
|
+
* and a signed link may point at any key.
|
|
41
|
+
*/
|
|
42
|
+
export declare function imageRemotePatterns(env?: Readonly<Record<string, string | undefined>>): RemotePattern[];
|
|
43
|
+
//#endregion
|
|
44
|
+
//# sourceMappingURL=next.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"next.d.mts","names":[],"sources":["../src/next.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;iBAuBiB;EAChB;EACA;EACA;EACA;;;;;;;;;;;;;;;;wBAiBe,oBACf,MAAK,SAAS,sCACZ"}
|
package/dist/next.mjs
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { IMAGE_ORIGINS_KEY, PUBLIC_PREFIX } from "@geekmidas/manifest";
|
|
2
|
+
//#region src/next.ts
|
|
3
|
+
/**
|
|
4
|
+
* `@geekmidas/cli/next` — what a Next.js site's `next.config.ts` builds from
|
|
5
|
+
* the workspace instead of from hand-kept lists.
|
|
6
|
+
*
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { imageRemotePatterns } from '@geekmidas/cli/next';
|
|
9
|
+
*
|
|
10
|
+
* export default {
|
|
11
|
+
* images: { remotePatterns: [...imageRemotePatterns(), // third parties ] },
|
|
12
|
+
* };
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* Read from the environment `gkm dev`, `gkm exec` and a compose or AWS site
|
|
16
|
+
* build hand the site, so it imports nothing of the workspace and runs
|
|
17
|
+
* wherever `next.config` does.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* A `RemotePattern` for every origin the site's pages load files from: each
|
|
21
|
+
* file server it has an edge to, and the host each bucket it reaches signs
|
|
22
|
+
* its links on — for the stage being built, as gkm resolved them.
|
|
23
|
+
*
|
|
24
|
+
* Under `gkm dev` those are the local ones: the file server's `*.localhost`
|
|
25
|
+
* host and MinIO's address, on the ports this machine assigned. An empty list
|
|
26
|
+
* where nothing handed the site its origins (a plain `next build`), rather
|
|
27
|
+
* than a throw: the config still loads, and `next/image` refuses the hosts it
|
|
28
|
+
* was not told about, as it would have.
|
|
29
|
+
*
|
|
30
|
+
* Every path on each host: a file server answers signed paths and open ones,
|
|
31
|
+
* and a signed link may point at any key.
|
|
32
|
+
*/
|
|
33
|
+
function imageRemotePatterns(env = process.env) {
|
|
34
|
+
const listed = env[`${PUBLIC_PREFIX.next}${IMAGE_ORIGINS_KEY}`] ?? env[IMAGE_ORIGINS_KEY];
|
|
35
|
+
if (!listed) return [];
|
|
36
|
+
const patterns = [];
|
|
37
|
+
for (const origin of listed.split(",")) {
|
|
38
|
+
let url;
|
|
39
|
+
try {
|
|
40
|
+
url = new URL(origin.trim());
|
|
41
|
+
} catch {
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
const protocol = url.protocol.slice(0, -1);
|
|
45
|
+
if (protocol !== "http" && protocol !== "https") continue;
|
|
46
|
+
patterns.push({
|
|
47
|
+
protocol,
|
|
48
|
+
hostname: url.hostname,
|
|
49
|
+
...url.port ? { port: url.port } : {},
|
|
50
|
+
pathname: "/**"
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return patterns;
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { imageRemotePatterns };
|
|
57
|
+
|
|
58
|
+
//# sourceMappingURL=next.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"next.mjs","names":[],"sources":["../src/next.ts"],"sourcesContent":["/**\n * `@geekmidas/cli/next` — what a Next.js site's `next.config.ts` builds from\n * the workspace instead of from hand-kept lists.\n *\n * ```ts\n * import { imageRemotePatterns } from '@geekmidas/cli/next';\n *\n * export default {\n * images: { remotePatterns: [...imageRemotePatterns(), // third parties ] },\n * };\n * ```\n *\n * Read from the environment `gkm dev`, `gkm exec` and a compose or AWS site\n * build hand the site, so it imports nothing of the workspace and runs\n * wherever `next.config` does.\n */\n\nimport { IMAGE_ORIGINS_KEY, PUBLIC_PREFIX } from '@geekmidas/manifest';\n\n/**\n * One entry of `images.remotePatterns`, as Next takes it. Stated here rather\n * than imported, so this module needs no `next` to load.\n */\nexport interface RemotePattern {\n\tprotocol?: 'http' | 'https';\n\thostname: string;\n\tport?: string;\n\tpathname?: string;\n}\n\n/**\n * A `RemotePattern` for every origin the site's pages load files from: each\n * file server it has an edge to, and the host each bucket it reaches signs\n * its links on — for the stage being built, as gkm resolved them.\n *\n * Under `gkm dev` those are the local ones: the file server's `*.localhost`\n * host and MinIO's address, on the ports this machine assigned. An empty list\n * where nothing handed the site its origins (a plain `next build`), rather\n * than a throw: the config still loads, and `next/image` refuses the hosts it\n * was not told about, as it would have.\n *\n * Every path on each host: a file server answers signed paths and open ones,\n * and a signed link may point at any key.\n */\nexport function imageRemotePatterns(\n\tenv: Readonly<Record<string, string | undefined>> = process.env,\n): RemotePattern[] {\n\tconst listed =\n\t\tenv[`${PUBLIC_PREFIX.next}${IMAGE_ORIGINS_KEY}`] ?? env[IMAGE_ORIGINS_KEY];\n\tif (!listed) return [];\n\n\tconst patterns: RemotePattern[] = [];\n\tfor (const origin of listed.split(',')) {\n\t\tlet url: URL;\n\t\ttry {\n\t\t\turl = new URL(origin.trim());\n\t\t} catch {\n\t\t\tcontinue;\n\t\t}\n\t\tconst protocol = url.protocol.slice(0, -1);\n\t\tif (protocol !== 'http' && protocol !== 'https') continue;\n\t\tpatterns.push({\n\t\t\tprotocol,\n\t\t\thostname: url.hostname,\n\t\t\t...(url.port ? { port: url.port } : {}),\n\t\t\tpathname: '/**',\n\t\t});\n\t}\n\treturn patterns;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,SAAgB,oBACf,MAAoD,QAAQ,KAC1C;CAClB,MAAM,SACL,IAAI,GAAG,cAAc,OAAO,wBAAwB,IAAI;CACzD,IAAI,CAAC,QAAQ,OAAO,CAAC;CAErB,MAAM,WAA4B,CAAC;CACnC,KAAK,MAAM,UAAU,OAAO,MAAM,GAAG,GAAG;EACvC,IAAI;EACJ,IAAI;GACH,MAAM,IAAI,IAAI,OAAO,KAAK,CAAC;EAC5B,QAAQ;GACP;EACD;EACA,MAAM,WAAW,IAAI,SAAS,MAAM,GAAG,EAAE;EACzC,IAAI,aAAa,UAAU,aAAa,SAAS;EACjD,SAAS,KAAK;GACb;GACA,UAAU,IAAI;GACd,GAAI,IAAI,OAAO,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;GACrC,UAAU;EACX,CAAC;CACF;CACA,OAAO;AACR"}
|
|
@@ -0,0 +1,510 @@
|
|
|
1
|
+
const require_errors = require("./errors-D1x8duqI.cjs");
|
|
2
|
+
const require_workspace = require("./workspace-wTLnc1Ef.cjs");
|
|
3
|
+
const require_apps = require("./apps-qJ5FPJGQ.cjs");
|
|
4
|
+
let _geekmidas_manifest = require("@geekmidas/manifest");
|
|
5
|
+
//#region src/deploy/devServices.ts
|
|
6
|
+
/**
|
|
7
|
+
* Mail and object storage on a deployed stage: real ones, or — only when
|
|
8
|
+
* someone asked — the dev services the local stage runs.
|
|
9
|
+
*
|
|
10
|
+
* Locally a declared `Email` is Mailpit and a declared bucket is MinIO, and
|
|
11
|
+
* nobody has to configure either. Deployed, the same two containers would be
|
|
12
|
+
* a stage that silently delivers no mail and keeps its files on one
|
|
13
|
+
* container's disk. So a deployed stage on a server target takes both from
|
|
14
|
+
* its secrets — the mail server's URL and sending address, and each bucket's
|
|
15
|
+
* URL — and a stage missing any of them fails before anything is built,
|
|
16
|
+
* provisioned or written, naming every key at once.
|
|
17
|
+
*
|
|
18
|
+
* A bucket's credentials are not checked: they are optional, and come from
|
|
19
|
+
* either of two places. The bucket's URL may carry a key of its own
|
|
20
|
+
* (`s3://KEY:SECRET@uploads`), which wins; otherwise the S3 client's default
|
|
21
|
+
* chain applies — the stage's shared `AWS_ACCESS_KEY_ID`/
|
|
22
|
+
* `AWS_SECRET_ACCESS_KEY` when it set them, or a role.
|
|
23
|
+
*
|
|
24
|
+
* `--allow-dev-services` is the way out for a stage that is not production —
|
|
25
|
+
* a preview, a demo: every construct the stage does not account for gets the
|
|
26
|
+
* dev service the local stage runs for it — a bucket MinIO, mail Mailpit —
|
|
27
|
+
* and the target derives the keys from it. What the stage does account for
|
|
28
|
+
* still wins: a key set in its secrets, or a provider (`deploy.objects`)
|
|
29
|
+
* that backs the kind. Every run that uses one says so, loudly.
|
|
30
|
+
*
|
|
31
|
+
* Pure: what each target runs is decided here from declarations and the
|
|
32
|
+
* stage's values, and the targets do the running.
|
|
33
|
+
*/
|
|
34
|
+
/**
|
|
35
|
+
* The dev services a deployed stage can run — one per kind that has one on
|
|
36
|
+
* every server target: a bucket's MinIO and mail's Mailpit. A cache or a
|
|
37
|
+
* database is not here because a server stage runs its own anyway.
|
|
38
|
+
*/
|
|
39
|
+
const DEV_SERVICES = ["minio", "mailpit"];
|
|
40
|
+
/**
|
|
41
|
+
* The S3 client's shared key pair. Optional: a bucket whose URL carries its own
|
|
42
|
+
* key (`s3://KEY:SECRET@bucket`) signs with that, and one without signs with
|
|
43
|
+
* this pair when the stage set it, or with whatever else the SDK's default
|
|
44
|
+
* chain finds — a role.
|
|
45
|
+
*/
|
|
46
|
+
const STORAGE_KEY_PAIR = ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY"];
|
|
47
|
+
/** Dev services asked of a target that runs no containers. */
|
|
48
|
+
var DevServicesNeedServerTarget = class extends require_errors.GkmError {
|
|
49
|
+
target;
|
|
50
|
+
constructor(target) {
|
|
51
|
+
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.`);
|
|
52
|
+
this.target = target;
|
|
53
|
+
this.name = "DevServicesNeedServerTarget";
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* `--allow-dev-services` given a value — the list it used to take. It is a
|
|
58
|
+
* switch now: every construct the stage does not account for gets its dev
|
|
59
|
+
* service.
|
|
60
|
+
*/
|
|
61
|
+
var AllowDevServicesTakesNoValue = class extends require_errors.GkmError {
|
|
62
|
+
value;
|
|
63
|
+
constructor(value) {
|
|
64
|
+
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.`);
|
|
65
|
+
this.value = value;
|
|
66
|
+
this.name = "AllowDevServicesTakesNoValue";
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Refuses `--allow-dev-services <value>` and `--allow-dev-services=<value>` on
|
|
71
|
+
* a command line, with the reason, before the parser calls the value an
|
|
72
|
+
* excess argument. `gkm deploy` and `gkm compose` take no positional
|
|
73
|
+
* argument, so whatever follows the flag and is not a flag was meant for it.
|
|
74
|
+
*
|
|
75
|
+
* @throws {AllowDevServicesTakesNoValue}
|
|
76
|
+
*/
|
|
77
|
+
function assertDevServicesFlag(argv) {
|
|
78
|
+
for (let i = 0; i < argv.length; i++) {
|
|
79
|
+
const arg = argv[i];
|
|
80
|
+
if (arg.startsWith("--allow-dev-services=")) throw new AllowDevServicesTakesNoValue(arg.slice(arg.indexOf("=") + 1));
|
|
81
|
+
const next = argv[i + 1];
|
|
82
|
+
if (arg === "--allow-dev-services" && next && !next.startsWith("-")) throw new AllowDevServicesTakesNoValue(next);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* A deployed stage with mail or object storage that its secrets do not
|
|
87
|
+
* configure — every missing key, across every app, at once.
|
|
88
|
+
*/
|
|
89
|
+
var ExternalServicesNotConfigured = class extends require_errors.GkmError {
|
|
90
|
+
stage;
|
|
91
|
+
missing;
|
|
92
|
+
constructor(stage, missing) {
|
|
93
|
+
const standIns = missing.some((m) => m.service !== void 0);
|
|
94
|
+
const lines = missing.map((m) => {
|
|
95
|
+
const by = m.apps?.length ? `, read by ${m.apps.join(", ")}` : "";
|
|
96
|
+
return ` gkm secrets:set ${m.key} '${m.example}' --stage ${stage}\n ${m.what}${by}` + (m.note ? `\n ${m.note}` : "") + (m.hint ? `\n ${m.hint}` : "");
|
|
97
|
+
});
|
|
98
|
+
super(`The stage '${stage}' is deployed, and a deployed stage's mail and object storage are real services: gkm runs no Mailpit or MinIO for it. Set ${missing.length === 1 ? "this key" : `these ${missing.length} keys`} in the stage's secrets:\n\n${lines.join("\n")}\n\n` + (standIns ? "For a stage that is not production — a preview, a demo — the dev services can run instead, with --allow-dev-services. Mailpit delivers no mail, and MinIO keeps every object on one container's disk.\n\n" : "") + `Or run: gkm secrets:add --stage ${stage}`);
|
|
99
|
+
this.stage = stage;
|
|
100
|
+
this.missing = missing;
|
|
101
|
+
this.name = "ExternalServicesNotConfigured";
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
/** The kinds a deployed stage takes from its secrets, or a dev service. */
|
|
105
|
+
const SERVICE_KINDS = {
|
|
106
|
+
email: "email",
|
|
107
|
+
objects: "objects",
|
|
108
|
+
"file-server": "file-server"
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Every mail and storage construct a manifest declares, each with the apps
|
|
112
|
+
* and workers that read it — a process's environment, a site's build args. A
|
|
113
|
+
* file server's reader reads its bucket too.
|
|
114
|
+
*
|
|
115
|
+
* The one list a deploy's readiness check refuses a stage by, every server
|
|
116
|
+
* target decides its dev services from, and `gkm secrets:add` offers — so
|
|
117
|
+
* none of them can disagree.
|
|
118
|
+
*/
|
|
119
|
+
function stageServiceDeclarations(input) {
|
|
120
|
+
const { manifest } = input;
|
|
121
|
+
const owners = /* @__PURE__ */ new Map();
|
|
122
|
+
for (const [id, declaration] of Object.entries(manifest)) {
|
|
123
|
+
if (!SERVICE_KINDS[declaration.kind]) continue;
|
|
124
|
+
owners.set((0, _geekmidas_manifest.providedKeyFor)(id, declaration.kind, declaration.kind === "objects" ? "connectionString" : "url"), id);
|
|
125
|
+
if (declaration.kind === "email") owners.set((0, _geekmidas_manifest.providedKeyFor)(id, declaration.kind, "from"), id);
|
|
126
|
+
if (declaration.kind === "objects") owners.set((0, _geekmidas_manifest.providedKeyFor)(id, declaration.kind, "signedOrigin"), id);
|
|
127
|
+
}
|
|
128
|
+
const readers = /* @__PURE__ */ new Map();
|
|
129
|
+
const read = (process, keys) => {
|
|
130
|
+
for (const key of keys) {
|
|
131
|
+
const id = owners.get(key);
|
|
132
|
+
if (!id) continue;
|
|
133
|
+
const declaration = manifest[id];
|
|
134
|
+
const of = declaration?.kind === "file-server" ? declaration.of : void 0;
|
|
135
|
+
for (const owner of of ? [id, of] : [id]) {
|
|
136
|
+
const set = readers.get(owner) ?? /* @__PURE__ */ new Set();
|
|
137
|
+
set.add(process);
|
|
138
|
+
readers.set(owner, set);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
for (const [id, declaration] of Object.entries(manifest)) {
|
|
143
|
+
const name = require_workspace.appKey(id);
|
|
144
|
+
if (declaration.kind === "rest-api" || declaration.kind === "websocket-api" || declaration.kind === "site" || declaration.kind === "mobile-app") read(name, require_apps.appEnvKeys(manifest, name) ?? []);
|
|
145
|
+
if (declaration.kind === "site") read(name, Object.values((0, _geekmidas_manifest.publicEnvFor)(declaration, manifest)));
|
|
146
|
+
if (declaration.kind === "worker") read(name, require_apps.workerEnvKeys(manifest, id) ?? []);
|
|
147
|
+
}
|
|
148
|
+
return Object.entries(manifest).flatMap(([id, declaration]) => {
|
|
149
|
+
const kind = SERVICE_KINDS[declaration.kind];
|
|
150
|
+
if (!kind) return [];
|
|
151
|
+
const apps = [...readers.get(id) ?? []].sort();
|
|
152
|
+
return [{
|
|
153
|
+
id,
|
|
154
|
+
kind,
|
|
155
|
+
...declaration.kind === "file-server" && declaration.of ? { of: declaration.of } : {},
|
|
156
|
+
...declaration.kind === "email" && declaration.from ? { from: declaration.from } : {},
|
|
157
|
+
...apps.length ? { apps } : {}
|
|
158
|
+
}];
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Every key a stage must be given rather than derive — the one list both a
|
|
163
|
+
* deploy's checks and `gkm secrets:add` read, so what a deploy refuses and
|
|
164
|
+
* what the builder offers cannot drift.
|
|
165
|
+
*
|
|
166
|
+
* - Deployed, mail is its URL and its sending address, a bucket its URL, and
|
|
167
|
+
* a file server its public URL. Locally all of it is Mailpit and MinIO.
|
|
168
|
+
* - On every stage, a third party's credentials: nobody but the third party
|
|
169
|
+
* can issue them.
|
|
170
|
+
*
|
|
171
|
+
* Never a derived value: a database URL, a generated secret, the seed.
|
|
172
|
+
*/
|
|
173
|
+
function requiredStageKeys(input) {
|
|
174
|
+
const domain = input.domain ?? "example.com";
|
|
175
|
+
const keys = [];
|
|
176
|
+
const add = (entry) => {
|
|
177
|
+
if (!keys.some((k) => k.key === entry.key)) keys.push(entry);
|
|
178
|
+
};
|
|
179
|
+
const byId = (list) => [...list ?? []].sort((a, b) => a.id.localeCompare(b.id));
|
|
180
|
+
const apps = (d) => d.apps?.length ? { apps: [...d.apps].sort() } : {};
|
|
181
|
+
if (!input.local) {
|
|
182
|
+
const services = byId(input.services);
|
|
183
|
+
const backing = (note, service) => note?.accounted ? note.hint ? { hint: note.hint } : {} : { service };
|
|
184
|
+
const storage = backing(input.providers?.objects, "minio");
|
|
185
|
+
const mail = backing(input.providers?.email, "mailpit");
|
|
186
|
+
for (const d of services.filter((d) => d.kind === "email")) {
|
|
187
|
+
add({
|
|
188
|
+
key: (0, _geekmidas_manifest.providedKeyFor)(d.id, "email", "url"),
|
|
189
|
+
id: d.id,
|
|
190
|
+
kind: "email",
|
|
191
|
+
what: `where '${d.id}' sends mail — any SMTP server`,
|
|
192
|
+
example: `smtp://user:password@smtp.${domain}:587`,
|
|
193
|
+
...mail,
|
|
194
|
+
...apps(d)
|
|
195
|
+
});
|
|
196
|
+
add({
|
|
197
|
+
key: (0, _geekmidas_manifest.providedKeyFor)(d.id, "email", "from"),
|
|
198
|
+
id: d.id,
|
|
199
|
+
kind: "email",
|
|
200
|
+
what: `the address '${d.id}' sends from, on a domain the mail server has verified`,
|
|
201
|
+
example: (0, _geekmidas_manifest.senderAddress)(d, domain),
|
|
202
|
+
...mail,
|
|
203
|
+
...apps(d)
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
for (const d of services.filter((d) => d.kind === "objects")) add({
|
|
207
|
+
key: (0, _geekmidas_manifest.providedKeyFor)(d.id, "objects", "connectionString"),
|
|
208
|
+
id: d.id,
|
|
209
|
+
kind: "bucket",
|
|
210
|
+
what: `the bucket '${d.id}' — S3, R2, or any S3-compatible store (add &endpoint=… for one that is not S3)`,
|
|
211
|
+
note: `credentials are optional: a key for this bucket alone in the URL (s3://KEY:SECRET@${require_workspace.appKey(d.id)}?…) wins; without one, the shared AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY or a role signs`,
|
|
212
|
+
example: `s3://${require_workspace.appKey(d.id)}?region=eu-west-1`,
|
|
213
|
+
...storage,
|
|
214
|
+
...apps(d)
|
|
215
|
+
});
|
|
216
|
+
for (const d of services.filter((d) => d.kind === "file-server")) add({
|
|
217
|
+
key: (0, _geekmidas_manifest.providedKeyFor)(d.id, "file-server", "url"),
|
|
218
|
+
id: d.id,
|
|
219
|
+
kind: "file-server",
|
|
220
|
+
what: `the public address '${d.id}' serves its bucket on — a CDN or the bucket's own domain`,
|
|
221
|
+
example: `https://${require_workspace.fileServerLabel(d.id)}.${domain}`,
|
|
222
|
+
...storage,
|
|
223
|
+
...d.of ? { of: d.of } : {},
|
|
224
|
+
...apps(d)
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
if (!input.local && input.server) add({
|
|
228
|
+
key: require_workspace.SERVER_IPV4_KEY,
|
|
229
|
+
id: "server",
|
|
230
|
+
kind: "server",
|
|
231
|
+
what: "the public IPv4 address of the server the stage's stack runs on — its hosts' DNS records point at it, and every deploy checks they do",
|
|
232
|
+
note: `${require_workspace.SERVER_IPV6_KEY} adds its IPv6 address (AAAA records); neither is ever handed to an app`,
|
|
233
|
+
example: "203.0.113.10"
|
|
234
|
+
});
|
|
235
|
+
for (const d of byId(input.credentials)) add({
|
|
236
|
+
key: (0, _geekmidas_manifest.providedKeyFor)(d.id, d.kind, "credentials"),
|
|
237
|
+
id: d.id,
|
|
238
|
+
kind: d.kind,
|
|
239
|
+
what: d.kind === "external-api" ? `the credentials '${d.id}' was issued for this stage, as its schema describes them` : `the credential '${d.id}', as its schema describes it`,
|
|
240
|
+
example: "{\"apiKey\":\"…\"}",
|
|
241
|
+
...apps(d)
|
|
242
|
+
});
|
|
243
|
+
return keys;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Whether only the stage's secrets can supply `key` to a construct of `kind`
|
|
247
|
+
* — what nothing on the stage derives.
|
|
248
|
+
*
|
|
249
|
+
* A third party's credentials, always. Deployed, also each generated secret
|
|
250
|
+
* and keyring: the stage generated each one once, and every run reads the
|
|
251
|
+
* same value back.
|
|
252
|
+
*/
|
|
253
|
+
function suppliedOnly(kind, id, key, local) {
|
|
254
|
+
if (kind === "credential") return true;
|
|
255
|
+
if (kind === "external-api") return key === (0, _geekmidas_manifest.providedKeyFor)(id, "external-api", "credentials");
|
|
256
|
+
if (local) return false;
|
|
257
|
+
return kind === "secret" || kind === "encryption";
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Where a deployed stage's mail and storage come from, and what it lacks.
|
|
261
|
+
*
|
|
262
|
+
* - Mail is external once its URL is set, and then needs its sending
|
|
263
|
+
* address too. Unset, it is Mailpit where allowed — the address derived
|
|
264
|
+
* unless set — and missing otherwise.
|
|
265
|
+
* - A bucket is external once its URL is set; its credentials, in the URL or
|
|
266
|
+
* the shared pair, are optional. Unset, it is MinIO where allowed, and
|
|
267
|
+
* missing otherwise.
|
|
268
|
+
* - A file server's URL is derived where its bucket is MinIO, unless set;
|
|
269
|
+
* over an external bucket the stage must set it.
|
|
270
|
+
*
|
|
271
|
+
* The keys themselves are {@link requiredStageKeys}'s.
|
|
272
|
+
*/
|
|
273
|
+
function externalServices(input) {
|
|
274
|
+
const { supplied, allow } = input;
|
|
275
|
+
const has = (key) => supplied[key] !== void 0;
|
|
276
|
+
const required = requiredStageKeys({
|
|
277
|
+
local: false,
|
|
278
|
+
services: input.declarations,
|
|
279
|
+
...input.domain ? { domain: input.domain } : {},
|
|
280
|
+
...input.providers ? { providers: input.providers } : {}
|
|
281
|
+
});
|
|
282
|
+
const standIn = (k) => allow && k.service !== void 0 && !has(k.key);
|
|
283
|
+
const mailpit = required.filter((k) => k.kind === "email" && k.key === (0, _geekmidas_manifest.providedKeyFor)(k.id, "email", "url")).filter(standIn).map((k) => k.id);
|
|
284
|
+
const minio = required.filter((k) => k.kind === "bucket").filter(standIn).map((k) => k.id);
|
|
285
|
+
const covered = (k) => k.kind === "email" && mailpit.includes(k.id) || k.kind === "bucket" && minio.includes(k.id) || k.kind === "file-server" && k.of !== void 0 && minio.includes(k.of);
|
|
286
|
+
return {
|
|
287
|
+
missing: required.filter((k) => !has(k.key) && !covered(k)).map(({ key, id, what, note, example, service, apps, hint }) => ({
|
|
288
|
+
key,
|
|
289
|
+
id,
|
|
290
|
+
what,
|
|
291
|
+
...note ? { note } : {},
|
|
292
|
+
example,
|
|
293
|
+
...service ? { service } : {},
|
|
294
|
+
...apps ? { apps } : {},
|
|
295
|
+
...hint ? { hint } : {}
|
|
296
|
+
})),
|
|
297
|
+
minio,
|
|
298
|
+
mailpit
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
/** The dev services a run uses, one entry per service it runs. */
|
|
302
|
+
function devServicesUsed(services) {
|
|
303
|
+
const used = [];
|
|
304
|
+
if (services.mailpit.length > 0) used.push({
|
|
305
|
+
service: "mailpit",
|
|
306
|
+
ids: services.mailpit
|
|
307
|
+
});
|
|
308
|
+
if (services.minio.length > 0) used.push({
|
|
309
|
+
service: "minio",
|
|
310
|
+
ids: services.minio
|
|
311
|
+
});
|
|
312
|
+
return used;
|
|
313
|
+
}
|
|
314
|
+
/** The line a run prints for each dev service a deployed stage uses. */
|
|
315
|
+
function devServiceWarning(stage, use) {
|
|
316
|
+
return `⚠️ DEV SERVICE ON A DEPLOYED STAGE (${stage}): ${use.service === "mailpit" ? `Mailpit is catching mail for ${use.ids.join(", ")}. It delivers NO mail: nobody receives a sign-in link, a receipt or a reset` : `MinIO is storing ${use.ids.join(", ")}. Every object is on one container's disk, with no replication and no backup`}. It is not production-grade — set the stage's own keys in its secrets for that.`;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Report each dev service a run uses: a loud line, and a `dev-service.used`
|
|
320
|
+
* event a host can act on.
|
|
321
|
+
*/
|
|
322
|
+
function reportDevServices(ctx, uses) {
|
|
323
|
+
for (const use of uses) {
|
|
324
|
+
ctx.logger.warn(`\n${devServiceWarning(ctx.stage, use)}`);
|
|
325
|
+
ctx.emit({
|
|
326
|
+
type: "dev-service.used",
|
|
327
|
+
service: use.service,
|
|
328
|
+
stage: ctx.stage,
|
|
329
|
+
constructs: use.ids
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
//#endregion
|
|
334
|
+
//#region src/providers/types.ts
|
|
335
|
+
/** The manifest kinds a stage can name a provider for. */
|
|
336
|
+
const PROVIDER_KINDS = [
|
|
337
|
+
"objects",
|
|
338
|
+
"inbox",
|
|
339
|
+
"email"
|
|
340
|
+
];
|
|
341
|
+
//#endregion
|
|
342
|
+
//#region src/providers/notes.ts
|
|
343
|
+
/** The constructs of a kind: `objects` is every bucket. */
|
|
344
|
+
function constructsOf(manifest, kind) {
|
|
345
|
+
return Object.entries(manifest).filter(([, d]) => d.kind === kind).map(([id]) => id).sort();
|
|
346
|
+
}
|
|
347
|
+
/** A stage that names `false` for a kind, and declares constructs of it. */
|
|
348
|
+
var StageProviderDisabled = class extends require_errors.GkmError {
|
|
349
|
+
kind;
|
|
350
|
+
stage;
|
|
351
|
+
ids;
|
|
352
|
+
constructor(kind, stage, ids) {
|
|
353
|
+
super(`deploy.${kind}.${stage} is false — the stage has no ${kind} — and ${ids.join(", ")} ${ids.length === 1 ? "is" : "are"} declared. Name what backs ${ids.length === 1 ? "it" : "them"} on '${stage}' (deploy.${kind}.${stage}: 'external', or a provider), or remove the ${ids.length === 1 ? "construct" : "constructs"}.`);
|
|
354
|
+
this.kind = kind;
|
|
355
|
+
this.stage = stage;
|
|
356
|
+
this.ids = ids;
|
|
357
|
+
this.name = "StageProviderDisabled";
|
|
358
|
+
}
|
|
359
|
+
};
|
|
360
|
+
/** The command a stage's providers are run with: every deploy runs them. */
|
|
361
|
+
function provisionCommand(stage) {
|
|
362
|
+
return `gkm deploy --stage ${stage}`;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* The line a stage missing a key a provider would write is given: what
|
|
366
|
+
* creates it, and with which credentials. Undefined when no provider backs
|
|
367
|
+
* the kind on the stage.
|
|
368
|
+
*/
|
|
369
|
+
function provisionHint(workspace, kind, stage) {
|
|
370
|
+
const choice = require_workspace.stageProvider(workspace, kind, stage);
|
|
371
|
+
if (choice.mode !== "provider") return void 0;
|
|
372
|
+
const provisioning = require_workspace.provisioningOf(kind, choice.name);
|
|
373
|
+
if (!provisioning) return void 0;
|
|
374
|
+
return `deploy.${kind}.${stage} is ${choice.name}: the deploy (${provisionCommand(stage)}) creates it and writes this key, with ${provisioning.describe}` + (provisioning.login ? `, or gkm login --provider ${provisioning.login}` : "");
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* What a deploy's checks read off the stage's providers: whether each kind is
|
|
378
|
+
* accounted for — a provider, or `false` — so no dev service stands in for
|
|
379
|
+
* it, and what creates a missing key of it.
|
|
380
|
+
*/
|
|
381
|
+
function stageProviderNotes(workspace, stage) {
|
|
382
|
+
const notes = {};
|
|
383
|
+
for (const kind of ["objects", "email"]) {
|
|
384
|
+
if (require_workspace.stageProvider(workspace, kind, stage).mode === "external") continue;
|
|
385
|
+
const hint = provisionHint(workspace, kind, stage);
|
|
386
|
+
notes[kind] = {
|
|
387
|
+
accounted: true,
|
|
388
|
+
...hint ? { hint } : {}
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
return notes;
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* A kind the stage set to `false`, declared anyway — refused before anything
|
|
395
|
+
* else is checked. Pure: what a stack is composed from.
|
|
396
|
+
*
|
|
397
|
+
* @throws {StageProviderDisabled}
|
|
398
|
+
*/
|
|
399
|
+
function assertStageProvidersEnabled(workspace, manifest, stage) {
|
|
400
|
+
for (const kind of PROVIDER_KINDS) {
|
|
401
|
+
const ids = constructsOf(manifest, kind);
|
|
402
|
+
if (ids.length === 0) continue;
|
|
403
|
+
if (require_workspace.stageProvider(workspace, kind, stage).mode === "none") throw new StageProviderDisabled(kind, stage, ids);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
//#endregion
|
|
407
|
+
Object.defineProperty(exports, "AllowDevServicesTakesNoValue", {
|
|
408
|
+
enumerable: true,
|
|
409
|
+
get: function() {
|
|
410
|
+
return AllowDevServicesTakesNoValue;
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
Object.defineProperty(exports, "DEV_SERVICES", {
|
|
414
|
+
enumerable: true,
|
|
415
|
+
get: function() {
|
|
416
|
+
return DEV_SERVICES;
|
|
417
|
+
}
|
|
418
|
+
});
|
|
419
|
+
Object.defineProperty(exports, "DevServicesNeedServerTarget", {
|
|
420
|
+
enumerable: true,
|
|
421
|
+
get: function() {
|
|
422
|
+
return DevServicesNeedServerTarget;
|
|
423
|
+
}
|
|
424
|
+
});
|
|
425
|
+
Object.defineProperty(exports, "ExternalServicesNotConfigured", {
|
|
426
|
+
enumerable: true,
|
|
427
|
+
get: function() {
|
|
428
|
+
return ExternalServicesNotConfigured;
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
Object.defineProperty(exports, "PROVIDER_KINDS", {
|
|
432
|
+
enumerable: true,
|
|
433
|
+
get: function() {
|
|
434
|
+
return PROVIDER_KINDS;
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
Object.defineProperty(exports, "STORAGE_KEY_PAIR", {
|
|
438
|
+
enumerable: true,
|
|
439
|
+
get: function() {
|
|
440
|
+
return STORAGE_KEY_PAIR;
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
Object.defineProperty(exports, "StageProviderDisabled", {
|
|
444
|
+
enumerable: true,
|
|
445
|
+
get: function() {
|
|
446
|
+
return StageProviderDisabled;
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
Object.defineProperty(exports, "assertDevServicesFlag", {
|
|
450
|
+
enumerable: true,
|
|
451
|
+
get: function() {
|
|
452
|
+
return assertDevServicesFlag;
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
Object.defineProperty(exports, "assertStageProvidersEnabled", {
|
|
456
|
+
enumerable: true,
|
|
457
|
+
get: function() {
|
|
458
|
+
return assertStageProvidersEnabled;
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
Object.defineProperty(exports, "devServicesUsed", {
|
|
462
|
+
enumerable: true,
|
|
463
|
+
get: function() {
|
|
464
|
+
return devServicesUsed;
|
|
465
|
+
}
|
|
466
|
+
});
|
|
467
|
+
Object.defineProperty(exports, "externalServices", {
|
|
468
|
+
enumerable: true,
|
|
469
|
+
get: function() {
|
|
470
|
+
return externalServices;
|
|
471
|
+
}
|
|
472
|
+
});
|
|
473
|
+
Object.defineProperty(exports, "provisionCommand", {
|
|
474
|
+
enumerable: true,
|
|
475
|
+
get: function() {
|
|
476
|
+
return provisionCommand;
|
|
477
|
+
}
|
|
478
|
+
});
|
|
479
|
+
Object.defineProperty(exports, "reportDevServices", {
|
|
480
|
+
enumerable: true,
|
|
481
|
+
get: function() {
|
|
482
|
+
return reportDevServices;
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
Object.defineProperty(exports, "requiredStageKeys", {
|
|
486
|
+
enumerable: true,
|
|
487
|
+
get: function() {
|
|
488
|
+
return requiredStageKeys;
|
|
489
|
+
}
|
|
490
|
+
});
|
|
491
|
+
Object.defineProperty(exports, "stageProviderNotes", {
|
|
492
|
+
enumerable: true,
|
|
493
|
+
get: function() {
|
|
494
|
+
return stageProviderNotes;
|
|
495
|
+
}
|
|
496
|
+
});
|
|
497
|
+
Object.defineProperty(exports, "stageServiceDeclarations", {
|
|
498
|
+
enumerable: true,
|
|
499
|
+
get: function() {
|
|
500
|
+
return stageServiceDeclarations;
|
|
501
|
+
}
|
|
502
|
+
});
|
|
503
|
+
Object.defineProperty(exports, "suppliedOnly", {
|
|
504
|
+
enumerable: true,
|
|
505
|
+
get: function() {
|
|
506
|
+
return suppliedOnly;
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
|
|
510
|
+
//# sourceMappingURL=notes-ChYPaRLu.cjs.map
|