@geekmidas/cli 10.0.0-alpha.17 → 10.0.0-alpha.171
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-C1h_wExz.cjs +1098 -0
- package/dist/EndpointGenerator-C1h_wExz.cjs.map +1 -0
- package/dist/EndpointGenerator-CSKhAD6W.mjs +1039 -0
- package/dist/EndpointGenerator-CSKhAD6W.mjs.map +1 -0
- package/dist/GoDaddyProvider-Cs32wo6I.cjs +412 -0
- package/dist/GoDaddyProvider-Cs32wo6I.cjs.map +1 -0
- package/dist/GoDaddyProvider-D7CTqN0f.mjs +412 -0
- package/dist/GoDaddyProvider-D7CTqN0f.mjs.map +1 -0
- package/dist/{HostingerProvider-BY26bWwB.mjs → HostingerProvider-B_3Qs9mT.mjs} +23 -9
- package/dist/HostingerProvider-B_3Qs9mT.mjs.map +1 -0
- package/dist/{HostingerProvider-BZFGYYVA.cjs → HostingerProvider-D0515Stf.cjs} +23 -9
- package/dist/HostingerProvider-D0515Stf.cjs.map +1 -0
- package/dist/LegacyStateStore-Bv_2L86H.cjs +124 -0
- package/dist/LegacyStateStore-Bv_2L86H.cjs.map +1 -0
- package/dist/LegacyStateStore-CUjKKENQ.mjs +124 -0
- package/dist/LegacyStateStore-CUjKKENQ.mjs.map +1 -0
- package/dist/LocalStateStore-DXuj1BDq.mjs +167 -0
- package/dist/LocalStateStore-DXuj1BDq.mjs.map +1 -0
- package/dist/LocalStateStore-PQ2qJ5VF.cjs +178 -0
- package/dist/LocalStateStore-PQ2qJ5VF.cjs.map +1 -0
- package/dist/OpenApiTsGenerator-5xPn-p65.mjs +534 -0
- package/dist/OpenApiTsGenerator-5xPn-p65.mjs.map +1 -0
- package/dist/OpenApiTsGenerator-CzrLGzC0.cjs +539 -0
- package/dist/OpenApiTsGenerator-CzrLGzC0.cjs.map +1 -0
- package/dist/{Route53Provider-Cvj40A8I.mjs → Route53Provider-Di_SD9CF.mjs} +3 -3
- package/dist/Route53Provider-Di_SD9CF.mjs.map +1 -0
- package/dist/{Route53Provider-DVILBsvV.cjs → Route53Provider-emLuQHVw.cjs} +3 -3
- package/dist/Route53Provider-emLuQHVw.cjs.map +1 -0
- package/dist/S3StateStore-BGnOwqUp.mjs +223 -0
- package/dist/S3StateStore-BGnOwqUp.mjs.map +1 -0
- package/dist/S3StateStore-cmS6iUZn.cjs +222 -0
- package/dist/S3StateStore-cmS6iUZn.cjs.map +1 -0
- package/dist/SSMStateStore-BqXzPBbu.mjs +205 -0
- package/dist/SSMStateStore-BqXzPBbu.mjs.map +1 -0
- package/dist/SSMStateStore-BtNGbg8Z.cjs +204 -0
- package/dist/SSMStateStore-BtNGbg8Z.cjs.map +1 -0
- package/dist/SubscriberGenerator-CfZWX0lT.mjs +783 -0
- package/dist/SubscriberGenerator-CfZWX0lT.mjs.map +1 -0
- package/dist/SubscriberGenerator-DMi4siph.cjs +848 -0
- package/dist/SubscriberGenerator-DMi4siph.cjs.map +1 -0
- package/dist/add-DW2KLCY0.mjs +711 -0
- package/dist/add-DW2KLCY0.mjs.map +1 -0
- package/dist/add-Dp5xRn-u.cjs +713 -0
- package/dist/add-Dp5xRn-u.cjs.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-DYGKg5SP.cjs +5535 -0
- package/dist/apps-DYGKg5SP.cjs.map +1 -0
- package/dist/apps-DrXwv-0A.mjs +4986 -0
- package/dist/apps-DrXwv-0A.mjs.map +1 -0
- package/dist/aws-C5LAU_Ii.mjs +97 -0
- package/dist/aws-C5LAU_Ii.mjs.map +1 -0
- package/dist/aws-DKC2m3sT.cjs +108 -0
- package/dist/aws-DKC2m3sT.cjs.map +1 -0
- package/dist/awsStore-Bx5nCFnS.mjs +121 -0
- package/dist/awsStore-Bx5nCFnS.mjs.map +1 -0
- package/dist/awsStore-u3ehhMoY.cjs +138 -0
- package/dist/awsStore-u3ehhMoY.cjs.map +1 -0
- package/dist/{backup-provisioner-DIVCbfee.mjs → backup-provisioner-C8DnCmxK.mjs} +2 -2
- package/dist/backup-provisioner-C8DnCmxK.mjs.map +1 -0
- package/dist/{backup-provisioner-BmhIO_Yr.cjs → backup-provisioner-oDEsPj02.cjs} +2 -2
- package/dist/backup-provisioner-oDEsPj02.cjs.map +1 -0
- package/dist/backups/runner.cjs +519 -0
- package/dist/backups/runner.cjs.map +1 -0
- package/dist/backups/runner.d.cts +102 -0
- package/dist/backups/runner.d.cts.map +1 -0
- package/dist/backups/runner.d.mts +102 -0
- package/dist/backups/runner.d.mts.map +1 -0
- package/dist/backups/runner.mjs +506 -0
- package/dist/backups/runner.mjs.map +1 -0
- package/dist/{bundler-mjqGAvu1.cjs → bundler-BIfEe05e.cjs} +59 -14
- package/dist/bundler-BIfEe05e.cjs.map +1 -0
- package/dist/{bundler-mwH7WOb1.mjs → bundler-Swt8wHG9.mjs} +59 -14
- package/dist/bundler-Swt8wHG9.mjs.map +1 -0
- package/dist/cli-C9wdKQy_.mjs +80 -0
- package/dist/cli-C9wdKQy_.mjs.map +1 -0
- package/dist/cli-ohJToj0E.cjs +80 -0
- package/dist/cli-ohJToj0E.cjs.map +1 -0
- package/dist/compose-BLOnkeaJ.mjs +2432 -0
- package/dist/compose-BLOnkeaJ.mjs.map +1 -0
- package/dist/compose-Br3SQ2bW.cjs +3293 -0
- package/dist/compose-Br3SQ2bW.cjs.map +1 -0
- package/dist/compose-SNYBstbO.cjs +2929 -0
- package/dist/compose-SNYBstbO.cjs.map +1 -0
- package/dist/compose-iUOeazjW.mjs +3192 -0
- package/dist/compose-iUOeazjW.mjs.map +1 -0
- package/dist/config-CsCYzlVO.d.mts +291 -0
- package/dist/config-CsCYzlVO.d.mts.map +1 -0
- package/dist/config-D-gHQXhi.d.cts +291 -0
- package/dist/config-D-gHQXhi.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-BzJiK1nQ.mjs +236 -0
- package/dist/credentialSchemas-BzJiK1nQ.mjs.map +1 -0
- package/dist/credentialSchemas-OVXofU-r.cjs +271 -0
- package/dist/credentialSchemas-OVXofU-r.cjs.map +1 -0
- package/dist/credentials-BdZhygvW.cjs +2293 -0
- package/dist/credentials-BdZhygvW.cjs.map +1 -0
- package/dist/credentials-C2VfI-uf.mjs +1838 -0
- package/dist/credentials-C2VfI-uf.mjs.map +1 -0
- package/dist/databases-CuTL1e7s.cjs +703 -0
- package/dist/databases-CuTL1e7s.cjs.map +1 -0
- package/dist/databases-zN-gEox0.mjs +588 -0
- package/dist/databases-zN-gEox0.mjs.map +1 -0
- package/dist/define-6poNqm5O.mjs +106 -0
- package/dist/define-6poNqm5O.mjs.map +1 -0
- package/dist/define-crmMcXFS.cjs +153 -0
- package/dist/define-crmMcXFS.cjs.map +1 -0
- package/dist/deploy/public.cjs +211 -0
- package/dist/deploy/public.cjs.map +1 -0
- package/dist/deploy/public.d.cts +658 -0
- package/dist/deploy/public.d.cts.map +1 -0
- package/dist/deploy/public.d.mts +658 -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-CYyf-Q8N.cjs +3902 -0
- package/dist/deploy-CYyf-Q8N.cjs.map +1 -0
- package/dist/deploy-DqH8QReb.mjs +3846 -0
- package/dist/deploy-DqH8QReb.mjs.map +1 -0
- package/dist/destroy-B9myEYFT.mjs +788 -0
- package/dist/destroy-B9myEYFT.mjs.map +1 -0
- package/dist/destroy-Bp5iHtLf.cjs +789 -0
- package/dist/destroy-Bp5iHtLf.cjs.map +1 -0
- package/dist/discover-39VKSE2i.cjs +1085 -0
- package/dist/discover-39VKSE2i.cjs.map +1 -0
- package/dist/discover-B_PDDaVj.mjs +940 -0
- package/dist/discover-B_PDDaVj.mjs.map +1 -0
- package/dist/docker-BezTRGxN.cjs +1520 -0
- package/dist/docker-BezTRGxN.cjs.map +1 -0
- package/dist/docker-De_-Ll-A.mjs +1413 -0
- package/dist/docker-De_-Ll-A.mjs.map +1 -0
- package/dist/dokploy-CWCIqro_.cjs +38 -0
- package/dist/dokploy-CWCIqro_.cjs.map +1 -0
- package/dist/dokploy-EsBgWO8W.mjs +38 -0
- package/dist/dokploy-EsBgWO8W.mjs.map +1 -0
- package/dist/drivers-BhdC9Efj.cjs +248 -0
- package/dist/drivers-BhdC9Efj.cjs.map +1 -0
- package/dist/drivers-wcDnzf7l.mjs +213 -0
- package/dist/drivers-wcDnzf7l.mjs.map +1 -0
- package/dist/eas-8t6PJRni.cjs +337 -0
- package/dist/eas-8t6PJRni.cjs.map +1 -0
- package/dist/eas-BalvsiH5.mjs +334 -0
- package/dist/eas-BalvsiH5.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-B4mWxt4G.mjs +89 -0
- package/dist/encryption-B4mWxt4G.mjs.map +1 -0
- package/dist/encryption-CKBmU66R.cjs +90 -0
- package/dist/encryption-CKBmU66R.cjs.map +1 -0
- package/dist/engine-BTG46RG-.cjs +3329 -0
- package/dist/engine-BTG46RG-.cjs.map +1 -0
- package/dist/engine-y8iWIXuv.mjs +3216 -0
- package/dist/engine-y8iWIXuv.mjs.map +1 -0
- package/dist/errors-D8Gwp5kU.mjs +23 -0
- package/dist/errors-D8Gwp5kU.mjs.map +1 -0
- package/dist/errors-DMC4Umsb.cjs +34 -0
- package/dist/errors-DMC4Umsb.cjs.map +1 -0
- package/dist/github-CeXlzWWA.cjs +978 -0
- package/dist/github-CeXlzWWA.cjs.map +1 -0
- package/dist/github-DvGoKoQO.mjs +977 -0
- package/dist/github-DvGoKoQO.mjs.map +1 -0
- package/dist/googlePlay-CfzG7jOJ.cjs +931 -0
- package/dist/googlePlay-CfzG7jOJ.cjs.map +1 -0
- package/dist/googlePlay-DWv6CUgM.mjs +931 -0
- package/dist/googlePlay-DWv6CUgM.mjs.map +1 -0
- package/dist/iam-BE0qX5Lb.mjs +442 -0
- package/dist/iam-BE0qX5Lb.mjs.map +1 -0
- package/dist/iam-FA95ku7l.cjs +521 -0
- package/dist/iam-FA95ku7l.cjs.map +1 -0
- package/dist/{index-RCUizGxL.d.cts → index-QxGYzGEN.d.mts} +38 -14
- package/dist/index-QxGYzGEN.d.mts.map +1 -0
- package/dist/{index-B4H4XF7A.d.mts → index-tFzoro1V.d.cts} +38 -14
- package/dist/index-tFzoro1V.d.cts.map +1 -0
- package/dist/index.cjs +15142 -13470
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +14959 -13285
- package/dist/index.mjs.map +1 -1
- package/dist/local-CvRvfktv.mjs +224 -0
- package/dist/local-CvRvfktv.mjs.map +1 -0
- package/dist/local-DH9at_0c.cjs +241 -0
- package/dist/local-DH9at_0c.cjs.map +1 -0
- package/dist/migrate-B1lHo2K2.cjs +272 -0
- package/dist/migrate-B1lHo2K2.cjs.map +1 -0
- package/dist/migrate-D1iCmQgc.mjs +267 -0
- package/dist/migrate-D1iCmQgc.mjs.map +1 -0
- package/dist/migrate-DzOWCnRR.cjs +181 -0
- package/dist/migrate-DzOWCnRR.cjs.map +1 -0
- package/dist/migrate-NmW2Su8s.mjs +181 -0
- package/dist/migrate-NmW2Su8s.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-BdIY7IoB.mjs +409 -0
- package/dist/notes-BdIY7IoB.mjs.map +1 -0
- package/dist/notes-ikElBCC8.cjs +510 -0
- package/dist/notes-ikElBCC8.cjs.map +1 -0
- package/dist/openapi.cjs +213 -7
- package/dist/openapi.cjs.map +1 -0
- package/dist/openapi.d.cts +32 -8
- package/dist/openapi.d.cts.map +1 -1
- package/dist/openapi.d.mts +32 -8
- package/dist/openapi.d.mts.map +1 -1
- package/dist/openapi.mjs +208 -2
- package/dist/openapi.mjs.map +1 -0
- package/dist/projectBucket-C-FOIic4.mjs +222 -0
- package/dist/projectBucket-C-FOIic4.mjs.map +1 -0
- package/dist/projectBucket-uidxz03Q.cjs +263 -0
- package/dist/projectBucket-uidxz03Q.cjs.map +1 -0
- package/dist/provider-BqpjG9QM.cjs +57 -0
- package/dist/provider-BqpjG9QM.cjs.map +1 -0
- package/dist/provider-CEOKk8NS.mjs +46 -0
- package/dist/provider-CEOKk8NS.mjs.map +1 -0
- package/dist/publish-Ujng6o63.mjs +123 -0
- package/dist/publish-Ujng6o63.mjs.map +1 -0
- package/dist/publish-oO_8elIf.cjs +124 -0
- package/dist/publish-oO_8elIf.cjs.map +1 -0
- package/dist/ready-COJHr1Yi.mjs +375 -0
- package/dist/ready-COJHr1Yi.mjs.map +1 -0
- package/dist/ready-DcD0SCnV.cjs +404 -0
- package/dist/ready-DcD0SCnV.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-CTb1gsTO.cjs +316 -0
- package/dist/resolve-CTb1gsTO.cjs.map +1 -0
- package/dist/resolve-Lk7fd8Kb.mjs +263 -0
- package/dist/resolve-Lk7fd8Kb.mjs.map +1 -0
- package/dist/rollback-B2DhSX-I.mjs +136 -0
- package/dist/rollback-B2DhSX-I.mjs.map +1 -0
- package/dist/rollback-PK4pSOLd.cjs +165 -0
- package/dist/rollback-PK4pSOLd.cjs.map +1 -0
- package/dist/runtime-BpGIXfYr.d.mts +82 -0
- package/dist/runtime-BpGIXfYr.d.mts.map +1 -0
- package/dist/runtime-DLV0CNZ4.d.cts +82 -0
- package/dist/runtime-DLV0CNZ4.d.cts.map +1 -0
- package/dist/s3-BY5ry__M.mjs +240 -0
- package/dist/s3-BY5ry__M.mjs.map +1 -0
- package/dist/s3-FG9qIgEB.cjs +240 -0
- package/dist/s3-FG9qIgEB.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-B8NLb54N.cjs → schemas-BCwKKA42.mjs} +399 -1173
- package/dist/schemas-BCwKKA42.mjs.map +1 -0
- package/dist/{workspace-DI-M3BnN.mjs → schemas-BQ_v0lEX.cjs} +487 -982
- package/dist/schemas-BQ_v0lEX.cjs.map +1 -0
- package/dist/secretsManager-CJyxFcBH.mjs +113 -0
- package/dist/secretsManager-CJyxFcBH.mjs.map +1 -0
- package/dist/secretsManager-D8on44WI.cjs +124 -0
- package/dist/secretsManager-D8on44WI.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-BL1sHzRr.mjs +685 -0
- package/dist/serverSetup-BL1sHzRr.mjs.map +1 -0
- package/dist/serverSetup-C7fDKGiN.cjs +685 -0
- package/dist/serverSetup-C7fDKGiN.cjs.map +1 -0
- package/dist/sniffer-BvhDRsgI.mjs +1824 -0
- package/dist/sniffer-BvhDRsgI.mjs.map +1 -0
- package/dist/sniffer-DJp9a2Pg.cjs +1997 -0
- package/dist/sniffer-DJp9a2Pg.cjs.map +1 -0
- package/dist/snsSubscriptions-7y2XBXde.mjs +1053 -0
- package/dist/snsSubscriptions-7y2XBXde.mjs.map +1 -0
- package/dist/snsSubscriptions-8t1XFvoc.cjs +1184 -0
- package/dist/snsSubscriptions-8t1XFvoc.cjs.map +1 -0
- package/dist/sst-8HZe83-M.cjs +501 -0
- package/dist/sst-8HZe83-M.cjs.map +1 -0
- package/dist/sst-CzFd-1om.mjs +478 -0
- package/dist/sst-CzFd-1om.mjs.map +1 -0
- package/dist/stack-3tvhk7SU.cjs +2568 -0
- package/dist/stack-3tvhk7SU.cjs.map +1 -0
- package/dist/stack-j2e8ddGl.mjs +2381 -0
- package/dist/stack-j2e8ddGl.mjs.map +1 -0
- package/dist/stage-DCSJii_y.cjs +313 -0
- package/dist/stage-DCSJii_y.cjs.map +1 -0
- package/dist/stage-DMv-IfSD.mjs +302 -0
- package/dist/stage-DMv-IfSD.mjs.map +1 -0
- package/dist/stages-CCAAe1tP.mjs +190 -0
- package/dist/stages-CCAAe1tP.mjs.map +1 -0
- package/dist/stages-D49CUpBY.cjs +190 -0
- package/dist/stages-D49CUpBY.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-DIEj2Nap.cjs +85 -0
- package/dist/terminal-DIEj2Nap.cjs.map +1 -0
- package/dist/terminal-VLmWgL_N.mjs +85 -0
- package/dist/terminal-VLmWgL_N.mjs.map +1 -0
- package/dist/{types-N7c2O2m7.d.cts → types-Bj1A1wkS.d.mts} +2146 -428
- package/dist/types-Bj1A1wkS.d.mts.map +1 -0
- package/dist/types-Bl_CwZC9.cjs +90 -0
- package/dist/types-Bl_CwZC9.cjs.map +1 -0
- package/dist/{types-7R81hu0i.d.mts → types-CV4AzwC_.d.cts} +2148 -428
- package/dist/types-CV4AzwC_.d.cts.map +1 -0
- package/dist/types-Y1NfWlyG.mjs +61 -0
- package/dist/types-Y1NfWlyG.mjs.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-B0PI9k9p.mjs +3013 -0
- package/dist/workspace-B0PI9k9p.mjs.map +1 -0
- package/dist/workspace-LR9DFjU8.cjs +3563 -0
- package/dist/workspace-LR9DFjU8.cjs.map +1 -0
- package/package.json +75 -13
- package/dist/HostingerProvider-BY26bWwB.mjs.map +0 -1
- package/dist/HostingerProvider-BZFGYYVA.cjs.map +0 -1
- package/dist/LocalStateProvider-7HR6SS2t.cjs +0 -48
- package/dist/LocalStateProvider-7HR6SS2t.cjs.map +0 -1
- package/dist/LocalStateProvider-D7QyJoLM.mjs +0 -48
- package/dist/LocalStateProvider-D7QyJoLM.mjs.map +0 -1
- package/dist/Route53Provider-Cvj40A8I.mjs.map +0 -1
- package/dist/Route53Provider-DVILBsvV.cjs.map +0 -1
- package/dist/SSMStateProvider-B0Hu1MKZ.mjs +0 -75
- package/dist/SSMStateProvider-B0Hu1MKZ.mjs.map +0 -1
- package/dist/SSMStateProvider-VrQ-yeqd.cjs +0 -74
- package/dist/SSMStateProvider-VrQ-yeqd.cjs.map +0 -1
- package/dist/backup-provisioner-BmhIO_Yr.cjs.map +0 -1
- package/dist/backup-provisioner-DIVCbfee.mjs.map +0 -1
- package/dist/bundler-mjqGAvu1.cjs.map +0 -1
- package/dist/bundler-mwH7WOb1.mjs.map +0 -1
- package/dist/config-CdTMeMU_.cjs +0 -467
- package/dist/config-CdTMeMU_.cjs.map +0 -1
- package/dist/config-DPnPkWyH.mjs +0 -414
- package/dist/config-DPnPkWyH.mjs.map +0 -1
- package/dist/config.d.cts.map +0 -1
- package/dist/config.d.mts.map +0 -1
- package/dist/credentials-fJP5-fa1.mjs +0 -2780
- package/dist/credentials-fJP5-fa1.mjs.map +0 -1
- package/dist/credentials-tvyReUAd.cjs +0 -2917
- package/dist/credentials-tvyReUAd.cjs.map +0 -1
- package/dist/discover-BERGFg8v.cjs +0 -288
- package/dist/discover-BERGFg8v.cjs.map +0 -1
- package/dist/discover-CK-n3w6b.mjs +0 -244
- package/dist/discover-CK-n3w6b.mjs.map +0 -1
- package/dist/emit-BdoPFjZf.cjs +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-CAfKyYPN.mjs +0 -216
- package/dist/github-CAfKyYPN.mjs.map +0 -1
- package/dist/github-DVE8Gg_F.cjs +0 -216
- package/dist/github-DVE8Gg_F.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-BeckoaP9.cjs +0 -2038
- package/dist/openapi-BeckoaP9.cjs.map +0 -1
- package/dist/openapi-DolhBm6r.mjs +0 -1991
- package/dist/openapi-DolhBm6r.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-4A4S2hcw.mjs +0 -122
- package/dist/transfer-4A4S2hcw.mjs.map +0 -1
- package/dist/transfer-DdmtKLzi.cjs +0 -151
- package/dist/transfer-DdmtKLzi.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-B8NLb54N.cjs.map +0 -1
- package/dist/workspace-DI-M3BnN.mjs.map +0 -1
|
@@ -1,51 +1,3 @@
|
|
|
1
|
-
import { n as __require } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
2
|
-
import { basename, isAbsolute, join } from "node:path";
|
|
3
|
-
//#region src/workspace/publicEnv.ts
|
|
4
|
-
/**
|
|
5
|
-
* All public env-var prefixes the toolbox understands.
|
|
6
|
-
*
|
|
7
|
-
* Used when resolving incoming var names back to a dependency
|
|
8
|
-
* (e.g. `VITE_AUTH_URL` → `auth`). A var matching any of these
|
|
9
|
-
* is considered safe to inline into a client bundle.
|
|
10
|
-
*/
|
|
11
|
-
const PUBLIC_ENV_PREFIXES = [
|
|
12
|
-
"NEXT_PUBLIC_",
|
|
13
|
-
"VITE_",
|
|
14
|
-
"EXPO_PUBLIC_"
|
|
15
|
-
];
|
|
16
|
-
/**
|
|
17
|
-
* Resolve the public env-var prefix that a frontend framework's bundler
|
|
18
|
-
* inlines into client code at build time:
|
|
19
|
-
*
|
|
20
|
-
* - `nextjs` → `NEXT_PUBLIC_`
|
|
21
|
-
* - `vite` → `VITE_`
|
|
22
|
-
* - `tanstack-start` → `VITE_` (uses Vite under the hood)
|
|
23
|
-
* - `expo` → `EXPO_PUBLIC_`
|
|
24
|
-
* - `remix` → `''` (Remix exposes via loaders, no prefix convention)
|
|
25
|
-
*
|
|
26
|
-
* For backend frameworks or unspecified, falls back to `NEXT_PUBLIC_` to
|
|
27
|
-
* preserve the historical default. Backend apps never read these vars
|
|
28
|
-
* from a bundle, so the prefix only affects scaffolding/symmetry.
|
|
29
|
-
*/
|
|
30
|
-
function getPublicEnvPrefix(framework) {
|
|
31
|
-
switch (framework) {
|
|
32
|
-
case "vite":
|
|
33
|
-
case "tanstack-start": return "VITE_";
|
|
34
|
-
case "expo": return "EXPO_PUBLIC_";
|
|
35
|
-
case "remix": return "";
|
|
36
|
-
case "nextjs": return "NEXT_PUBLIC_";
|
|
37
|
-
default: return "NEXT_PUBLIC_";
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Strip a known public prefix from a var name.
|
|
42
|
-
* Returns the un-prefixed name, or `null` if no prefix matched.
|
|
43
|
-
*/
|
|
44
|
-
function stripPublicPrefix(name) {
|
|
45
|
-
for (const prefix of PUBLIC_ENV_PREFIXES) if (prefix && name.startsWith(prefix)) return name.slice(prefix.length);
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
//#endregion
|
|
49
1
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js
|
|
50
2
|
function getEnumValues(entries) {
|
|
51
3
|
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
|
|
@@ -90,6 +42,24 @@ function floatSafeRemainder(val, step) {
|
|
|
90
42
|
if (Math.abs(ratio - roundedRatio) < tolerance) return 0;
|
|
91
43
|
return ratio - roundedRatio;
|
|
92
44
|
}
|
|
45
|
+
const EVALUATING = /* @__PURE__*/ Symbol("evaluating");
|
|
46
|
+
function defineLazy(object, key, getter) {
|
|
47
|
+
let value = void 0;
|
|
48
|
+
Object.defineProperty(object, key, {
|
|
49
|
+
get() {
|
|
50
|
+
if (value === EVALUATING) return;
|
|
51
|
+
if (value === void 0) {
|
|
52
|
+
value = EVALUATING;
|
|
53
|
+
value = getter();
|
|
54
|
+
}
|
|
55
|
+
return value;
|
|
56
|
+
},
|
|
57
|
+
set(v) {
|
|
58
|
+
Object.defineProperty(object, key, { value: v });
|
|
59
|
+
},
|
|
60
|
+
configurable: true
|
|
61
|
+
});
|
|
62
|
+
}
|
|
93
63
|
function assignProp(target, prop, value) {
|
|
94
64
|
Object.defineProperty(target, prop, {
|
|
95
65
|
value,
|
|
@@ -1021,7 +991,7 @@ const uuid = (version) => {
|
|
|
1021
991
|
return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
|
|
1022
992
|
};
|
|
1023
993
|
/** Practical email validation */
|
|
1024
|
-
const email = /^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
|
|
994
|
+
const email$1 = /^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
|
|
1025
995
|
const _emoji$1 = `^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;
|
|
1026
996
|
function emoji() {
|
|
1027
997
|
return new RegExp(_emoji$1, "u");
|
|
@@ -1560,7 +1530,7 @@ const $ZodUUID = /*@__PURE__*/ $constructor("$ZodUUID", (inst, def) => {
|
|
|
1560
1530
|
$ZodStringFormat.init(inst, def);
|
|
1561
1531
|
});
|
|
1562
1532
|
const $ZodEmail = /*@__PURE__*/ $constructor("$ZodEmail", (inst, def) => {
|
|
1563
|
-
def.pattern ?? (def.pattern = email);
|
|
1533
|
+
def.pattern ?? (def.pattern = email$1);
|
|
1564
1534
|
$ZodStringFormat.init(inst, def);
|
|
1565
1535
|
});
|
|
1566
1536
|
function canParseURL(input) {
|
|
@@ -2442,6 +2412,114 @@ function handleIntersectionResults(result, left, right) {
|
|
|
2442
2412
|
result.value = merged.data;
|
|
2443
2413
|
return result;
|
|
2444
2414
|
}
|
|
2415
|
+
const $ZodTuple = /*@__PURE__*/ $constructor("$ZodTuple", (inst, def) => {
|
|
2416
|
+
$ZodType.init(inst, def);
|
|
2417
|
+
const items = def.items;
|
|
2418
|
+
const memo = globalConfig.memoizer;
|
|
2419
|
+
memo?.attach(inst);
|
|
2420
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2421
|
+
const input = payload.value;
|
|
2422
|
+
if (!Array.isArray(input)) {
|
|
2423
|
+
payload.issues.push({
|
|
2424
|
+
input,
|
|
2425
|
+
inst,
|
|
2426
|
+
expected: "tuple",
|
|
2427
|
+
code: "invalid_type"
|
|
2428
|
+
});
|
|
2429
|
+
return payload;
|
|
2430
|
+
}
|
|
2431
|
+
payload.value = memo ? memo.alloc(inst, payload, [], ctx) : [];
|
|
2432
|
+
const proms = [];
|
|
2433
|
+
const optinStart = getTupleOptStart(items, "optin");
|
|
2434
|
+
const optoutStart = getTupleOptStart(items, "optout");
|
|
2435
|
+
if (!def.rest) {
|
|
2436
|
+
if (input.length < optinStart) {
|
|
2437
|
+
payload.issues.push({
|
|
2438
|
+
code: "too_small",
|
|
2439
|
+
minimum: optinStart,
|
|
2440
|
+
inclusive: true,
|
|
2441
|
+
input,
|
|
2442
|
+
inst,
|
|
2443
|
+
origin: "array"
|
|
2444
|
+
});
|
|
2445
|
+
return payload;
|
|
2446
|
+
}
|
|
2447
|
+
if (input.length > items.length) payload.issues.push({
|
|
2448
|
+
code: "too_big",
|
|
2449
|
+
maximum: items.length,
|
|
2450
|
+
inclusive: true,
|
|
2451
|
+
input,
|
|
2452
|
+
inst,
|
|
2453
|
+
origin: "array"
|
|
2454
|
+
});
|
|
2455
|
+
}
|
|
2456
|
+
const itemResults = new Array(items.length);
|
|
2457
|
+
const abortEarly = def.rest ? ctx?.abortEarly : void 0;
|
|
2458
|
+
let itemAborted = false;
|
|
2459
|
+
for (let i = 0; i < items.length; i++) {
|
|
2460
|
+
const r = items[i]._zod.run({
|
|
2461
|
+
value: input[i],
|
|
2462
|
+
issues: []
|
|
2463
|
+
}, ctx);
|
|
2464
|
+
if (r instanceof Promise) proms.push(r.then((rr) => {
|
|
2465
|
+
itemResults[i] = rr;
|
|
2466
|
+
}));
|
|
2467
|
+
else {
|
|
2468
|
+
itemResults[i] = r;
|
|
2469
|
+
if (abortEarly && !itemAborted && r.issues.length) itemAborted = aborted(r);
|
|
2470
|
+
}
|
|
2471
|
+
}
|
|
2472
|
+
if (def.rest && !itemAborted) {
|
|
2473
|
+
let i = items.length - 1;
|
|
2474
|
+
const rest = input.slice(items.length);
|
|
2475
|
+
let seen = payload.issues.length;
|
|
2476
|
+
for (const el of rest) {
|
|
2477
|
+
if (abortEarly && payload.issues.length !== seen) {
|
|
2478
|
+
if (aborted(payload, seen)) break;
|
|
2479
|
+
seen = payload.issues.length;
|
|
2480
|
+
}
|
|
2481
|
+
i++;
|
|
2482
|
+
const result = def.rest._zod.run({
|
|
2483
|
+
value: el,
|
|
2484
|
+
issues: []
|
|
2485
|
+
}, ctx);
|
|
2486
|
+
if (result instanceof Promise) proms.push(result.then((r) => handleTupleResult(r, payload, i)));
|
|
2487
|
+
else handleTupleResult(result, payload, i);
|
|
2488
|
+
}
|
|
2489
|
+
}
|
|
2490
|
+
if (proms.length) return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
|
|
2491
|
+
return handleTupleResults(itemResults, payload, items, input, optoutStart);
|
|
2492
|
+
};
|
|
2493
|
+
});
|
|
2494
|
+
function getTupleOptStart(items, key) {
|
|
2495
|
+
for (let i = items.length - 1; i >= 0; i--) if (!(key === "optin" ? items[i]._zod.optin !== void 0 : items[i]._zod.optout === "optional")) return i + 1;
|
|
2496
|
+
return 0;
|
|
2497
|
+
}
|
|
2498
|
+
function handleTupleResult(result, final, index) {
|
|
2499
|
+
if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
|
|
2500
|
+
final.value[index] = result.value;
|
|
2501
|
+
}
|
|
2502
|
+
function handleTupleResults(itemResults, final, items, input, optoutStart) {
|
|
2503
|
+
for (let i = 0; i < items.length; i++) {
|
|
2504
|
+
const r = itemResults[i];
|
|
2505
|
+
const isPresent = i < input.length;
|
|
2506
|
+
if (!isPresent && i >= optoutStart && items[i]._zod.optin === "optional") {
|
|
2507
|
+
final.value.length = i;
|
|
2508
|
+
break;
|
|
2509
|
+
}
|
|
2510
|
+
if (r.issues.length) {
|
|
2511
|
+
if (!isPresent && i >= optoutStart) {
|
|
2512
|
+
final.value.length = i;
|
|
2513
|
+
break;
|
|
2514
|
+
}
|
|
2515
|
+
final.issues.push(...prefixIssues(i, r.issues));
|
|
2516
|
+
}
|
|
2517
|
+
final.value[i] = r.value;
|
|
2518
|
+
}
|
|
2519
|
+
for (let i = final.value.length - 1; i >= input.length; i--) if (items[i]._zod.optout === "optional" && final.value[i] === void 0) final.value.length = i;
|
|
2520
|
+
else break;
|
|
2521
|
+
return final;
|
|
2522
|
+
}
|
|
2445
2523
|
const $ZodRecord = /*@__PURE__*/ $constructor("$ZodRecord", (inst, def) => {
|
|
2446
2524
|
$ZodType.init(inst, def);
|
|
2447
2525
|
const memo = globalConfig.memoizer;
|
|
@@ -2810,6 +2888,21 @@ function handleReadonlyResult(payload) {
|
|
|
2810
2888
|
if (!payload.memo) payload.value = Object.freeze(payload.value);
|
|
2811
2889
|
return payload;
|
|
2812
2890
|
}
|
|
2891
|
+
const $ZodLazy = /*@__PURE__*/ $constructor("$ZodLazy", (inst, def) => {
|
|
2892
|
+
$ZodType.init(inst, def);
|
|
2893
|
+
defineLazy(inst._zod, "innerType", () => {
|
|
2894
|
+
const d = def;
|
|
2895
|
+
if (!d._cachedInner) d._cachedInner = def.getter();
|
|
2896
|
+
return d._cachedInner;
|
|
2897
|
+
});
|
|
2898
|
+
defineLazyInternal(inst, "pattern", (zod) => zod.innerType?._zod?.pattern);
|
|
2899
|
+
defineLazyInternal(inst, "propValues", (zod) => zod.innerType?._zod?.propValues);
|
|
2900
|
+
defineLazyInternal(inst, "optin", (zod) => zod.innerType?._zod?.optin ?? void 0);
|
|
2901
|
+
defineLazyInternal(inst, "optout", (zod) => zod.innerType?._zod?.optout ?? void 0);
|
|
2902
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2903
|
+
return inst._zod.innerType._zod.run(payload, ctx);
|
|
2904
|
+
};
|
|
2905
|
+
});
|
|
2813
2906
|
const $ZodCustom = /*@__PURE__*/ $constructor("$ZodCustom", (inst, def) => {
|
|
2814
2907
|
$ZodCheck.init(inst, def);
|
|
2815
2908
|
$ZodType.init(inst, def);
|
|
@@ -4343,9 +4436,33 @@ const numberProcessor = (schema, ctx, _json, params) => {
|
|
|
4343
4436
|
const booleanProcessor = (_schema, _ctx, json, _params) => {
|
|
4344
4437
|
json.type = "boolean";
|
|
4345
4438
|
};
|
|
4439
|
+
const bigintProcessor = (schema, ctx, json, params) => {
|
|
4440
|
+
handleUnrepresentable(schema, ctx, json, params, "BigInt cannot be represented in JSON Schema");
|
|
4441
|
+
};
|
|
4442
|
+
const symbolProcessor = (schema, ctx, json, params) => {
|
|
4443
|
+
handleUnrepresentable(schema, ctx, json, params, "Symbols cannot be represented in JSON Schema");
|
|
4444
|
+
};
|
|
4445
|
+
const nullProcessor = (_schema, ctx, json, _params) => {
|
|
4446
|
+
if (ctx.target === "openapi-3.0") {
|
|
4447
|
+
json.type = "string";
|
|
4448
|
+
json.nullable = true;
|
|
4449
|
+
json.enum = [null];
|
|
4450
|
+
} else json.type = "null";
|
|
4451
|
+
};
|
|
4452
|
+
const undefinedProcessor = (schema, ctx, json, params) => {
|
|
4453
|
+
handleUnrepresentable(schema, ctx, json, params, "Undefined cannot be represented in JSON Schema");
|
|
4454
|
+
};
|
|
4455
|
+
const voidProcessor = (schema, ctx, json, params) => {
|
|
4456
|
+
handleUnrepresentable(schema, ctx, json, params, "Void cannot be represented in JSON Schema");
|
|
4457
|
+
};
|
|
4346
4458
|
const neverProcessor = (_schema, _ctx, json, _params) => {
|
|
4347
4459
|
json.not = {};
|
|
4348
4460
|
};
|
|
4461
|
+
const anyProcessor = (_schema, _ctx, _json, _params) => {};
|
|
4462
|
+
const unknownProcessor = (_schema, _ctx, _json, _params) => {};
|
|
4463
|
+
const dateProcessor = (schema, ctx, json, params) => {
|
|
4464
|
+
handleUnrepresentable(schema, ctx, json, params, "Date cannot be represented in JSON Schema");
|
|
4465
|
+
};
|
|
4349
4466
|
const enumProcessor = (schema, _ctx, json, _params) => {
|
|
4350
4467
|
const def = schema._zod.def;
|
|
4351
4468
|
const values = getEnumValues(def.entries);
|
|
@@ -4383,12 +4500,47 @@ const literalProcessor = (schema, ctx, json, params) => {
|
|
|
4383
4500
|
json.enum = vals;
|
|
4384
4501
|
}
|
|
4385
4502
|
};
|
|
4503
|
+
const nanProcessor = (schema, ctx, json, params) => {
|
|
4504
|
+
handleUnrepresentable(schema, ctx, json, params, "NaN cannot be represented in JSON Schema");
|
|
4505
|
+
};
|
|
4506
|
+
const templateLiteralProcessor = (schema, _ctx, json, _params) => {
|
|
4507
|
+
const _json = json;
|
|
4508
|
+
const pattern = schema._zod.pattern;
|
|
4509
|
+
if (!pattern) throw new Error("Pattern not found in template literal");
|
|
4510
|
+
_json.type = "string";
|
|
4511
|
+
_json.pattern = pattern.source;
|
|
4512
|
+
};
|
|
4513
|
+
const fileProcessor = (schema, _ctx, json, _params) => {
|
|
4514
|
+
const _json = json;
|
|
4515
|
+
_json.type = "string";
|
|
4516
|
+
_json.format = "binary";
|
|
4517
|
+
_json.contentEncoding = "binary";
|
|
4518
|
+
const { minimum, maximum, mime } = aggregateChecks(schema);
|
|
4519
|
+
if (minimum !== void 0) _json.minLength = minimum;
|
|
4520
|
+
if (maximum !== void 0) _json.maxLength = maximum;
|
|
4521
|
+
if (!mime) return;
|
|
4522
|
+
if (mime.length === 0) _json.not = {};
|
|
4523
|
+
else if (mime.length === 1) _json.contentMediaType = mime[0];
|
|
4524
|
+
else _json.anyOf = mime.map((m) => ({ contentMediaType: m }));
|
|
4525
|
+
};
|
|
4526
|
+
const successProcessor = (_schema, _ctx, json, _params) => {
|
|
4527
|
+
json.type = "boolean";
|
|
4528
|
+
};
|
|
4386
4529
|
const customProcessor = (schema, ctx, json, params) => {
|
|
4387
4530
|
handleUnrepresentable(schema, ctx, json, params, "Custom types cannot be represented in JSON Schema");
|
|
4388
4531
|
};
|
|
4532
|
+
const functionProcessor = (schema, ctx, json, params) => {
|
|
4533
|
+
handleUnrepresentable(schema, ctx, json, params, "Function types cannot be represented in JSON Schema");
|
|
4534
|
+
};
|
|
4389
4535
|
const transformProcessor = (schema, ctx, json, params) => {
|
|
4390
4536
|
handleUnrepresentable(schema, ctx, json, params, "Transforms cannot be represented in JSON Schema");
|
|
4391
4537
|
};
|
|
4538
|
+
const mapProcessor = (schema, ctx, json, params) => {
|
|
4539
|
+
handleUnrepresentable(schema, ctx, json, params, "Map cannot be represented in JSON Schema");
|
|
4540
|
+
};
|
|
4541
|
+
const setProcessor = (schema, ctx, json, params) => {
|
|
4542
|
+
handleUnrepresentable(schema, ctx, json, params, "Set cannot be represented in JSON Schema");
|
|
4543
|
+
};
|
|
4392
4544
|
const arrayProcessor = (schema, ctx, _json, params) => {
|
|
4393
4545
|
const json = _json;
|
|
4394
4546
|
const def = schema._zod.def;
|
|
@@ -4473,6 +4625,58 @@ const intersectionProcessor = (schema, ctx, json, params) => {
|
|
|
4473
4625
|
json.allOf = allOf;
|
|
4474
4626
|
ctx.intersections.push(allOf);
|
|
4475
4627
|
};
|
|
4628
|
+
const tupleProcessor = (schema, ctx, _json, params) => {
|
|
4629
|
+
const json = _json;
|
|
4630
|
+
const def = schema._zod.def;
|
|
4631
|
+
json.type = "array";
|
|
4632
|
+
const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
|
|
4633
|
+
const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
|
|
4634
|
+
const prefixItems = def.items.map((x, i) => processSchema(x, ctx, {
|
|
4635
|
+
...params,
|
|
4636
|
+
path: [
|
|
4637
|
+
...params.path,
|
|
4638
|
+
prefixPath,
|
|
4639
|
+
i
|
|
4640
|
+
]
|
|
4641
|
+
}));
|
|
4642
|
+
const rest = def.rest ? processSchema(def.rest, ctx, {
|
|
4643
|
+
...params,
|
|
4644
|
+
path: [
|
|
4645
|
+
...params.path,
|
|
4646
|
+
restPath,
|
|
4647
|
+
...ctx.target === "openapi-3.0" ? [def.items.length] : []
|
|
4648
|
+
]
|
|
4649
|
+
}) : null;
|
|
4650
|
+
let minItems = def.items.length;
|
|
4651
|
+
while (minItems > 0) {
|
|
4652
|
+
const item = def.items[minItems - 1];
|
|
4653
|
+
if (!(ctx.io === "input" ? inputOptin(item) !== void 0 : item._zod.optout === "optional")) break;
|
|
4654
|
+
minItems--;
|
|
4655
|
+
}
|
|
4656
|
+
const maxItems = def.items.length;
|
|
4657
|
+
const isClosed = !def.rest;
|
|
4658
|
+
if (ctx.target === "draft-2020-12") {
|
|
4659
|
+
json.prefixItems = prefixItems;
|
|
4660
|
+
if (isClosed) json.items = false;
|
|
4661
|
+
else if (rest) json.items = rest;
|
|
4662
|
+
if (minItems > 0) json.minItems = minItems;
|
|
4663
|
+
if (isClosed) json.maxItems = maxItems;
|
|
4664
|
+
} else if (ctx.target === "openapi-3.0") {
|
|
4665
|
+
json.items = { anyOf: prefixItems };
|
|
4666
|
+
if (rest) json.items.anyOf.push(rest);
|
|
4667
|
+
if (minItems > 0) json.minItems = minItems;
|
|
4668
|
+
if (isClosed) json.maxItems = maxItems;
|
|
4669
|
+
} else {
|
|
4670
|
+
json.items = prefixItems;
|
|
4671
|
+
if (isClosed) json.additionalItems = false;
|
|
4672
|
+
else if (rest) json.additionalItems = rest;
|
|
4673
|
+
if (minItems > 0) json.minItems = minItems;
|
|
4674
|
+
if (isClosed) json.maxItems = maxItems;
|
|
4675
|
+
}
|
|
4676
|
+
const { minimum, maximum } = aggregateChecks(schema);
|
|
4677
|
+
if (typeof minimum === "number") json.minItems = minimum;
|
|
4678
|
+
if (typeof maximum === "number") json.maxItems = maximum;
|
|
4679
|
+
};
|
|
4476
4680
|
/** JSON object keys are always strings, so a numeric record key schema is re-expressed over the
|
|
4477
4681
|
* numeric-string form the record parser matches. Deferred to `finalize`, after the flatten: a key
|
|
4478
4682
|
* behind a wrapper only carries its own `type` before then, and a union key only has its branches.
|
|
@@ -4650,12 +4854,99 @@ const readonlyProcessor = (schema, ctx, json, params) => {
|
|
|
4650
4854
|
seen.ref = def.innerType;
|
|
4651
4855
|
json.readOnly = true;
|
|
4652
4856
|
};
|
|
4857
|
+
const promiseProcessor = (schema, ctx, _json, params) => {
|
|
4858
|
+
const def = schema._zod.def;
|
|
4859
|
+
processSchema(def.innerType, ctx, params);
|
|
4860
|
+
const seen = ctx.seen.get(schema);
|
|
4861
|
+
seen.ref = def.innerType;
|
|
4862
|
+
};
|
|
4653
4863
|
const optionalProcessor = (schema, ctx, _json, params) => {
|
|
4654
4864
|
const def = schema._zod.def;
|
|
4655
4865
|
processSchema(def.innerType, ctx, params);
|
|
4656
4866
|
const seen = ctx.seen.get(schema);
|
|
4657
4867
|
seen.ref = def.innerType;
|
|
4658
4868
|
};
|
|
4869
|
+
const lazyProcessor = (schema, ctx, _json, params) => {
|
|
4870
|
+
const innerType = schema._zod.innerType;
|
|
4871
|
+
processSchema(innerType, ctx, params);
|
|
4872
|
+
const seen = ctx.seen.get(schema);
|
|
4873
|
+
seen.ref = innerType;
|
|
4874
|
+
};
|
|
4875
|
+
const allProcessors = {
|
|
4876
|
+
string: stringProcessor,
|
|
4877
|
+
number: numberProcessor,
|
|
4878
|
+
boolean: booleanProcessor,
|
|
4879
|
+
bigint: bigintProcessor,
|
|
4880
|
+
symbol: symbolProcessor,
|
|
4881
|
+
null: nullProcessor,
|
|
4882
|
+
undefined: undefinedProcessor,
|
|
4883
|
+
void: voidProcessor,
|
|
4884
|
+
never: neverProcessor,
|
|
4885
|
+
any: anyProcessor,
|
|
4886
|
+
unknown: unknownProcessor,
|
|
4887
|
+
date: dateProcessor,
|
|
4888
|
+
enum: enumProcessor,
|
|
4889
|
+
literal: literalProcessor,
|
|
4890
|
+
nan: nanProcessor,
|
|
4891
|
+
template_literal: templateLiteralProcessor,
|
|
4892
|
+
file: fileProcessor,
|
|
4893
|
+
success: successProcessor,
|
|
4894
|
+
custom: customProcessor,
|
|
4895
|
+
function: functionProcessor,
|
|
4896
|
+
transform: transformProcessor,
|
|
4897
|
+
map: mapProcessor,
|
|
4898
|
+
set: setProcessor,
|
|
4899
|
+
array: arrayProcessor,
|
|
4900
|
+
object: objectProcessor,
|
|
4901
|
+
union: unionProcessor,
|
|
4902
|
+
intersection: intersectionProcessor,
|
|
4903
|
+
tuple: tupleProcessor,
|
|
4904
|
+
record: recordProcessor,
|
|
4905
|
+
nullable: nullableProcessor,
|
|
4906
|
+
nonoptional: nonoptionalProcessor,
|
|
4907
|
+
default: defaultProcessor,
|
|
4908
|
+
prefault: prefaultProcessor,
|
|
4909
|
+
catch: catchProcessor,
|
|
4910
|
+
pipe: pipeProcessor,
|
|
4911
|
+
readonly: readonlyProcessor,
|
|
4912
|
+
promise: promiseProcessor,
|
|
4913
|
+
optional: optionalProcessor,
|
|
4914
|
+
lazy: lazyProcessor
|
|
4915
|
+
};
|
|
4916
|
+
function toJSONSchema(input, params) {
|
|
4917
|
+
if ("_idmap" in input) {
|
|
4918
|
+
const registry = input;
|
|
4919
|
+
const ctx = initializeContext({
|
|
4920
|
+
...params,
|
|
4921
|
+
processors: allProcessors
|
|
4922
|
+
});
|
|
4923
|
+
const defs = {};
|
|
4924
|
+
for (const entry of registry._idmap.entries()) {
|
|
4925
|
+
const [_, schema] = entry;
|
|
4926
|
+
processSchema(schema, ctx);
|
|
4927
|
+
}
|
|
4928
|
+
const schemas = {};
|
|
4929
|
+
ctx.external = {
|
|
4930
|
+
registry,
|
|
4931
|
+
uri: params?.uri,
|
|
4932
|
+
defs
|
|
4933
|
+
};
|
|
4934
|
+
for (const entry of registry._idmap.entries()) {
|
|
4935
|
+
const [key, schema] = entry;
|
|
4936
|
+
extractDefs(ctx, schema);
|
|
4937
|
+
assignProp(schemas, key, finalize(ctx, schema));
|
|
4938
|
+
}
|
|
4939
|
+
if (Object.keys(defs).length > 0) schemas.__shared = { [ctx.target === "draft-2020-12" ? "$defs" : "definitions"]: defs };
|
|
4940
|
+
return { schemas };
|
|
4941
|
+
}
|
|
4942
|
+
const ctx = initializeContext({
|
|
4943
|
+
...params,
|
|
4944
|
+
processors: allProcessors
|
|
4945
|
+
});
|
|
4946
|
+
processSchema(input, ctx);
|
|
4947
|
+
extractDefs(ctx, input);
|
|
4948
|
+
return finalize(ctx, input);
|
|
4949
|
+
}
|
|
4659
4950
|
//#endregion
|
|
4660
4951
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/errors.js
|
|
4661
4952
|
const _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
|
|
@@ -4708,7 +4999,7 @@ const initializer = (inst, issues) => {
|
|
|
4708
4999
|
const ZodRealError = /*@__PURE__*/ $constructor("ZodError", initializer, void 0, { Parent: Error });
|
|
4709
5000
|
//#endregion
|
|
4710
5001
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/parse.js
|
|
4711
|
-
const parse
|
|
5002
|
+
const parse = /* @__PURE__ */ _parse(ZodRealError);
|
|
4712
5003
|
const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
4713
5004
|
const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
4714
5005
|
const safeParseAsync = /* @__PURE__ */ _safeParseAsync(ZodRealError);
|
|
@@ -4840,7 +5131,7 @@ const ZodType = /*@__PURE__*/ $constructor("ZodType", (inst, def) => {
|
|
|
4840
5131
|
own(this, "~standard", value);
|
|
4841
5132
|
},
|
|
4842
5133
|
parse: function _parse(data, params) {
|
|
4843
|
-
return parse
|
|
5134
|
+
return parse(this, data, params, { callee: _parse });
|
|
4844
5135
|
},
|
|
4845
5136
|
parseAsync: async function _parseAsync(data, params) {
|
|
4846
5137
|
return await parseAsync(this, data, params, { callee: _parseAsync });
|
|
@@ -5063,6 +5354,9 @@ const ZodEmail = /*@__PURE__*/ $constructor("ZodEmail", (inst, def) => {
|
|
|
5063
5354
|
$ZodEmail.init(inst, def);
|
|
5064
5355
|
ZodStringFormat.init(inst, def);
|
|
5065
5356
|
});
|
|
5357
|
+
function email(params) {
|
|
5358
|
+
return /* @__PURE__ */ _email(ZodEmail, params);
|
|
5359
|
+
}
|
|
5066
5360
|
const ZodGUID = /*@__PURE__*/ $constructor("ZodGUID", (inst, def) => {
|
|
5067
5361
|
$ZodGUID.init(inst, def);
|
|
5068
5362
|
ZodStringFormat.init(inst, def);
|
|
@@ -5327,6 +5621,14 @@ function object(shape, params) {
|
|
|
5327
5621
|
};
|
|
5328
5622
|
return new ZodObject(def);
|
|
5329
5623
|
}
|
|
5624
|
+
function looseObject(shape, params) {
|
|
5625
|
+
return new ZodObject({
|
|
5626
|
+
type: "object",
|
|
5627
|
+
shape,
|
|
5628
|
+
catchall: unknown(),
|
|
5629
|
+
...normalizeParams(params)
|
|
5630
|
+
});
|
|
5631
|
+
}
|
|
5330
5632
|
const ZodUnion = /*@__PURE__*/ $constructor("ZodUnion", (inst, def) => {
|
|
5331
5633
|
$ZodUnion.init(inst, def);
|
|
5332
5634
|
ZodType.init(inst, def);
|
|
@@ -5364,6 +5666,39 @@ function intersection(left, right) {
|
|
|
5364
5666
|
right
|
|
5365
5667
|
});
|
|
5366
5668
|
}
|
|
5669
|
+
const ZodTuple = /*@__PURE__*/ $constructor("ZodTuple", (inst, def) => {
|
|
5670
|
+
_ensureDefaultMemoizer();
|
|
5671
|
+
$ZodTuple.init(inst, def);
|
|
5672
|
+
ZodType.init(inst, def);
|
|
5673
|
+
inst._zod.processJSONSchema = (ctx, json, params) => tupleProcessor(inst, ctx, json, params);
|
|
5674
|
+
}, {
|
|
5675
|
+
rest(rest) {
|
|
5676
|
+
return this.clone({
|
|
5677
|
+
...this._zod.def,
|
|
5678
|
+
rest
|
|
5679
|
+
});
|
|
5680
|
+
},
|
|
5681
|
+
partial() {
|
|
5682
|
+
const def = this._zod.def;
|
|
5683
|
+
if (def.checks?.length) throw new Error(".partial() cannot be used on tuple schemas containing refinements");
|
|
5684
|
+
return this.clone({
|
|
5685
|
+
...def,
|
|
5686
|
+
items: def.items.map((item) => new ZodOptional({
|
|
5687
|
+
type: "optional",
|
|
5688
|
+
innerType: item
|
|
5689
|
+
}))
|
|
5690
|
+
});
|
|
5691
|
+
}
|
|
5692
|
+
});
|
|
5693
|
+
function tuple(items, _paramsOrRest, _params) {
|
|
5694
|
+
const hasRest = _paramsOrRest instanceof $ZodType;
|
|
5695
|
+
return new ZodTuple({
|
|
5696
|
+
type: "tuple",
|
|
5697
|
+
items,
|
|
5698
|
+
rest: hasRest ? _paramsOrRest : null,
|
|
5699
|
+
...normalizeParams(hasRest ? _params : _paramsOrRest)
|
|
5700
|
+
});
|
|
5701
|
+
}
|
|
5367
5702
|
const ZodRecord = /*@__PURE__*/ $constructor("ZodRecord", (inst, def) => {
|
|
5368
5703
|
_ensureDefaultMemoizer();
|
|
5369
5704
|
$ZodRecord.init(inst, def);
|
|
@@ -5594,6 +5929,18 @@ function readonly(innerType) {
|
|
|
5594
5929
|
innerType
|
|
5595
5930
|
});
|
|
5596
5931
|
}
|
|
5932
|
+
const ZodLazy = /*@__PURE__*/ $constructor("ZodLazy", (inst, def) => {
|
|
5933
|
+
$ZodLazy.init(inst, def);
|
|
5934
|
+
ZodType.init(inst, def);
|
|
5935
|
+
inst._zod.processJSONSchema = (ctx, json, params) => lazyProcessor(inst, ctx, json, params);
|
|
5936
|
+
inst.unwrap = () => inst._zod.def.getter();
|
|
5937
|
+
});
|
|
5938
|
+
function lazy(getter) {
|
|
5939
|
+
return new ZodLazy({
|
|
5940
|
+
type: "lazy",
|
|
5941
|
+
getter
|
|
5942
|
+
});
|
|
5943
|
+
}
|
|
5597
5944
|
const ZodCustom = /*@__PURE__*/ $constructor("ZodCustom", (inst, def) => {
|
|
5598
5945
|
$ZodCustom.init(inst, def);
|
|
5599
5946
|
ZodType.init(inst, def);
|
|
@@ -5609,955 +5956,113 @@ function superRefine(fn, params) {
|
|
|
5609
5956
|
return /* @__PURE__ */ _superRefine(fn, params);
|
|
5610
5957
|
}
|
|
5611
5958
|
//#endregion
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
*/
|
|
5617
|
-
const TEST_STAGE = "test";
|
|
5618
|
-
/** A stage becomes part of every physical name, so it has to fit in one. */
|
|
5619
|
-
const STAGE_NAME = /^[a-z][a-z0-9-]*$/;
|
|
5620
|
-
/** Everything wrong with one stage name, or nothing. */
|
|
5621
|
-
function nameProblems(name) {
|
|
5622
|
-
const problems = [];
|
|
5623
|
-
if (!STAGE_NAME.test(name)) problems.push(`stage "${name}" must be lowercase letters, digits and hyphens, starting with a letter`);
|
|
5624
|
-
if (name === "test") problems.push(`stage "${TEST_STAGE}" is reserved for gkm test`);
|
|
5625
|
-
return problems;
|
|
5626
|
-
}
|
|
5627
|
-
/** Everything wrong with a list of deployed stages on its own. */
|
|
5628
|
-
function deployedProblems(deployed) {
|
|
5629
|
-
const problems = deployed.flatMap(nameProblems);
|
|
5630
|
-
const seen = /* @__PURE__ */ new Set();
|
|
5631
|
-
for (const name of deployed) {
|
|
5632
|
-
if (seen.has(name)) problems.push(`stage "${name}" is listed twice`);
|
|
5633
|
-
seen.add(name);
|
|
5634
|
-
}
|
|
5635
|
-
return problems;
|
|
5636
|
-
}
|
|
5637
|
-
/** Everything wrong with a stages block, or nothing. */
|
|
5638
|
-
function stageProblems(stages) {
|
|
5639
|
-
if (!stages) return ["`stages` is required, e.g. stages: { local: 'dev', deployed: ['prod'] }"];
|
|
5640
|
-
const { local, deployed, protected: kept = [] } = stages;
|
|
5641
|
-
const problems = [...nameProblems(local), ...deployedProblems(deployed)];
|
|
5642
|
-
if (deployed.includes(local)) problems.push(`"${local}" is both the local stage and a deployed one; they would share secrets`);
|
|
5643
|
-
for (const name of kept) if (!deployed.includes(name)) problems.push(`protected stage "${name}" is not a deployed stage`);
|
|
5644
|
-
return problems;
|
|
5645
|
-
}
|
|
5646
|
-
/** The stages block, or an error naming everything wrong with it. */
|
|
5647
|
-
function validateStages(stages) {
|
|
5648
|
-
const problems = stageProblems(stages);
|
|
5649
|
-
if (problems.length) throw new InvalidStages(problems);
|
|
5650
|
-
return stages;
|
|
5651
|
-
}
|
|
5652
|
-
/** Refuses a stage the project does not deploy to. */
|
|
5653
|
-
function assertDeployedStage(stages, stage) {
|
|
5654
|
-
if (!stages.deployed.includes(stage)) throw new UndeclaredStage(stage, stages.deployed);
|
|
5655
|
-
}
|
|
5656
|
-
/** A stages block — in gkm.config.ts or from `gkm init`'s flags — that breaks a rule. */
|
|
5657
|
-
var InvalidStages = class extends Error {
|
|
5658
|
-
problems;
|
|
5659
|
-
constructor(problems) {
|
|
5660
|
-
super(`Invalid stages:\n ${problems.join("\n ")}`);
|
|
5661
|
-
this.problems = problems;
|
|
5662
|
-
this.name = "InvalidStages";
|
|
5663
|
-
}
|
|
5664
|
-
};
|
|
5665
|
-
/**
|
|
5666
|
-
* A stage the project does not deploy to. Refused before anything is
|
|
5667
|
-
* provisioned, so a typo does not become a second environment.
|
|
5668
|
-
*/
|
|
5669
|
-
var UndeclaredStage = class extends Error {
|
|
5670
|
-
stage;
|
|
5671
|
-
deployed;
|
|
5672
|
-
constructor(stage, deployed) {
|
|
5673
|
-
super(`"${stage}" is not a deployed stage. gkm.config.ts deploys to: ${deployed.join(", ") || "nothing yet"}.`);
|
|
5674
|
-
this.stage = stage;
|
|
5675
|
-
this.deployed = deployed;
|
|
5676
|
-
this.name = "UndeclaredStage";
|
|
5959
|
+
Object.defineProperty(exports, "_enum", {
|
|
5960
|
+
enumerable: true,
|
|
5961
|
+
get: function() {
|
|
5962
|
+
return _enum;
|
|
5677
5963
|
}
|
|
5678
|
-
};
|
|
5679
|
-
//#endregion
|
|
5680
|
-
//#region src/workspace/schema.ts
|
|
5681
|
-
/**
|
|
5682
|
-
* Routes can be a string glob, array of globs, or a partitioned config
|
|
5683
|
-
* with glob paths and a partition function.
|
|
5684
|
-
*/
|
|
5685
|
-
const RoutesSchema = union([
|
|
5686
|
-
string(),
|
|
5687
|
-
array(string()),
|
|
5688
|
-
object({
|
|
5689
|
-
paths: union([string(), array(string())]),
|
|
5690
|
-
partition: custom((val) => typeof val === "function")
|
|
5691
|
-
})
|
|
5692
|
-
]);
|
|
5693
|
-
/**
|
|
5694
|
-
* Telescope configuration schema.
|
|
5695
|
-
*/
|
|
5696
|
-
const TelescopeConfigSchema = object({
|
|
5697
|
-
enabled: boolean().optional(),
|
|
5698
|
-
port: number().optional(),
|
|
5699
|
-
path: string().optional(),
|
|
5700
|
-
ignore: array(string()).optional(),
|
|
5701
|
-
recordBody: boolean().optional(),
|
|
5702
|
-
maxEntries: number().optional(),
|
|
5703
|
-
websocket: boolean().optional()
|
|
5704
|
-
});
|
|
5705
|
-
/**
|
|
5706
|
-
* Studio configuration schema.
|
|
5707
|
-
*/
|
|
5708
|
-
const StudioConfigSchema = object({
|
|
5709
|
-
enabled: boolean().optional(),
|
|
5710
|
-
path: string().optional(),
|
|
5711
|
-
schema: string().optional()
|
|
5712
|
-
});
|
|
5713
|
-
/**
|
|
5714
|
-
* OpenAPI configuration schema.
|
|
5715
|
-
*/
|
|
5716
|
-
const OpenApiConfigSchema = object({
|
|
5717
|
-
enabled: boolean().optional(),
|
|
5718
|
-
title: string().optional(),
|
|
5719
|
-
version: string().optional(),
|
|
5720
|
-
description: string().optional()
|
|
5721
|
-
});
|
|
5722
|
-
/**
|
|
5723
|
-
* Hooks configuration schema.
|
|
5724
|
-
*/
|
|
5725
|
-
const HooksConfigSchema = object({ server: string().optional() });
|
|
5726
|
-
/**
|
|
5727
|
-
* Combined framework schema (backend, frontend, or mobile).
|
|
5728
|
-
*/
|
|
5729
|
-
const FrameworkSchema = union([
|
|
5730
|
-
_enum([
|
|
5731
|
-
"hono",
|
|
5732
|
-
"better-auth",
|
|
5733
|
-
"express",
|
|
5734
|
-
"fastify"
|
|
5735
|
-
]),
|
|
5736
|
-
_enum([
|
|
5737
|
-
"nextjs",
|
|
5738
|
-
"remix",
|
|
5739
|
-
"vite",
|
|
5740
|
-
"tanstack-start"
|
|
5741
|
-
]),
|
|
5742
|
-
_enum(["expo"])
|
|
5743
|
-
]);
|
|
5744
|
-
/** Frontend framework values, kept in sync with FrontendFrameworkSchema. */
|
|
5745
|
-
const FRONTEND_FRAMEWORKS = [
|
|
5746
|
-
"nextjs",
|
|
5747
|
-
"remix",
|
|
5748
|
-
"vite",
|
|
5749
|
-
"tanstack-start"
|
|
5750
|
-
];
|
|
5751
|
-
/** Mobile framework values, kept in sync with MobileFrameworkSchema. */
|
|
5752
|
-
const MOBILE_FRAMEWORKS = ["expo"];
|
|
5753
|
-
/**
|
|
5754
|
-
* Deploy target schema.
|
|
5755
|
-
* Currently only 'dokploy' is supported.
|
|
5756
|
-
* 'vercel' and 'cloudflare' are planned for Phase 2.
|
|
5757
|
-
*/
|
|
5758
|
-
const DeployTargetSchema = _enum([
|
|
5759
|
-
"dokploy",
|
|
5760
|
-
"vercel",
|
|
5761
|
-
"cloudflare"
|
|
5762
|
-
]);
|
|
5763
|
-
/**
|
|
5764
|
-
* Supported deploy targets (Phase 1).
|
|
5765
|
-
*/
|
|
5766
|
-
const SUPPORTED_DEPLOY_TARGETS = ["dokploy"];
|
|
5767
|
-
/**
|
|
5768
|
-
* Phase 2 deploy targets (not yet implemented).
|
|
5769
|
-
*/
|
|
5770
|
-
const PHASE_2_DEPLOY_TARGETS = ["vercel", "cloudflare"];
|
|
5771
|
-
/**
|
|
5772
|
-
* Check if a deploy target is supported.
|
|
5773
|
-
*/
|
|
5774
|
-
function isDeployTargetSupported(target) {
|
|
5775
|
-
return SUPPORTED_DEPLOY_TARGETS.includes(target);
|
|
5776
|
-
}
|
|
5777
|
-
/**
|
|
5778
|
-
* Check if a deploy target is planned for Phase 2.
|
|
5779
|
-
*/
|
|
5780
|
-
function isPhase2DeployTarget(target) {
|
|
5781
|
-
return PHASE_2_DEPLOY_TARGETS.includes(target);
|
|
5782
|
-
}
|
|
5783
|
-
/**
|
|
5784
|
-
* Get error message for unsupported deploy targets.
|
|
5785
|
-
*/
|
|
5786
|
-
function getDeployTargetError(target, appName) {
|
|
5787
|
-
if (isPhase2DeployTarget(target)) return `Deploy target "${target}"${appName ? ` for app "${appName}"` : ""} is coming in Phase 2. Currently only "dokploy" is supported.`;
|
|
5788
|
-
return `Unknown deploy target: ${target}. Supported: dokploy. Coming in Phase 2: vercel, cloudflare.`;
|
|
5789
|
-
}
|
|
5790
|
-
/**
|
|
5791
|
-
* Dokploy workspace configuration schema.
|
|
5792
|
-
* Supports either a single endpoint or per-stage endpoints.
|
|
5793
|
-
*/
|
|
5794
|
-
const DokployWorkspaceConfigSchema = object({
|
|
5795
|
-
/** Single endpoint for all stages */
|
|
5796
|
-
endpoint: url("Dokploy endpoint must be a valid URL").optional(),
|
|
5797
|
-
/** Per-stage endpoints (stage name -> endpoint URL) */
|
|
5798
|
-
endpoints: record(string(), url("Endpoint must be a valid URL")).optional(),
|
|
5799
|
-
registry: string().optional(),
|
|
5800
|
-
registryId: string().optional(),
|
|
5801
|
-
/** Per-stage domain configuration (stage name -> base domain) */
|
|
5802
|
-
domains: record(string(), string()).optional()
|
|
5803
|
-
}).refine((data) => data.endpoint || data.endpoints, { message: "Either endpoint or endpoints must be provided" });
|
|
5804
|
-
/**
|
|
5805
|
-
* Valid AWS regions.
|
|
5806
|
-
*/
|
|
5807
|
-
const AwsRegionSchema = _enum([
|
|
5808
|
-
"us-east-1",
|
|
5809
|
-
"us-east-2",
|
|
5810
|
-
"us-west-1",
|
|
5811
|
-
"us-west-2",
|
|
5812
|
-
"af-south-1",
|
|
5813
|
-
"ap-east-1",
|
|
5814
|
-
"ap-south-1",
|
|
5815
|
-
"ap-south-2",
|
|
5816
|
-
"ap-southeast-1",
|
|
5817
|
-
"ap-southeast-2",
|
|
5818
|
-
"ap-southeast-3",
|
|
5819
|
-
"ap-southeast-4",
|
|
5820
|
-
"ap-northeast-1",
|
|
5821
|
-
"ap-northeast-2",
|
|
5822
|
-
"ap-northeast-3",
|
|
5823
|
-
"ca-central-1",
|
|
5824
|
-
"eu-central-1",
|
|
5825
|
-
"eu-central-2",
|
|
5826
|
-
"eu-west-1",
|
|
5827
|
-
"eu-west-2",
|
|
5828
|
-
"eu-west-3",
|
|
5829
|
-
"eu-south-1",
|
|
5830
|
-
"eu-south-2",
|
|
5831
|
-
"eu-north-1",
|
|
5832
|
-
"me-south-1",
|
|
5833
|
-
"me-central-1",
|
|
5834
|
-
"sa-east-1"
|
|
5835
|
-
]);
|
|
5836
|
-
/**
|
|
5837
|
-
* DNS record types supported across providers.
|
|
5838
|
-
*/
|
|
5839
|
-
const DnsRecordTypeSchema = _enum([
|
|
5840
|
-
"A",
|
|
5841
|
-
"AAAA",
|
|
5842
|
-
"CNAME",
|
|
5843
|
-
"MX",
|
|
5844
|
-
"TXT",
|
|
5845
|
-
"NS",
|
|
5846
|
-
"SRV",
|
|
5847
|
-
"CAA"
|
|
5848
|
-
]);
|
|
5849
|
-
object({
|
|
5850
|
-
/** Subdomain name (e.g., 'api' for api.example.com, '@' for root) */
|
|
5851
|
-
name: string(),
|
|
5852
|
-
/** Record type */
|
|
5853
|
-
type: DnsRecordTypeSchema,
|
|
5854
|
-
/** TTL in seconds */
|
|
5855
|
-
ttl: number().int().positive(),
|
|
5856
|
-
/** Record values */
|
|
5857
|
-
values: array(string())
|
|
5858
|
-
});
|
|
5859
|
-
object({
|
|
5860
|
-
/** The record that was upserted */
|
|
5861
|
-
record: object({
|
|
5862
|
-
/** Subdomain name (e.g., 'api' for api.example.com, '@' for root) */
|
|
5863
|
-
name: string(),
|
|
5864
|
-
/** Record type */
|
|
5865
|
-
type: DnsRecordTypeSchema,
|
|
5866
|
-
/** TTL in seconds */
|
|
5867
|
-
ttl: number().int().positive(),
|
|
5868
|
-
/** Record value (IP address, hostname, etc.) */
|
|
5869
|
-
value: string()
|
|
5870
|
-
}),
|
|
5871
|
-
/** Whether the record was created (true) or updated (false) */
|
|
5872
|
-
created: boolean(),
|
|
5873
|
-
/** Whether the record already existed with the same value */
|
|
5874
|
-
unchanged: boolean()
|
|
5875
|
-
});
|
|
5876
|
-
/**
|
|
5877
|
-
* Hostinger DNS provider config (without domain - domain is the record key).
|
|
5878
|
-
*/
|
|
5879
|
-
const HostingerDnsProviderSchema = object({
|
|
5880
|
-
provider: literal("hostinger"),
|
|
5881
|
-
/** TTL in seconds (default: 300) */
|
|
5882
|
-
ttl: number().int().positive().optional()
|
|
5883
|
-
});
|
|
5884
|
-
/**
|
|
5885
|
-
* Route53 DNS provider config (without domain - domain is the record key).
|
|
5886
|
-
*/
|
|
5887
|
-
const Route53DnsProviderSchema = object({
|
|
5888
|
-
provider: literal("route53"),
|
|
5889
|
-
/** AWS region (optional - uses AWS_REGION env var if not provided) */
|
|
5890
|
-
region: AwsRegionSchema.optional(),
|
|
5891
|
-
/** AWS profile name (optional - uses default credential chain if not provided) */
|
|
5892
|
-
profile: string().optional(),
|
|
5893
|
-
/** Hosted zone ID (optional - auto-detected from domain if not provided) */
|
|
5894
|
-
hostedZoneId: string().optional(),
|
|
5895
|
-
/** TTL in seconds (default: 300) */
|
|
5896
|
-
ttl: number().int().positive().optional()
|
|
5897
|
-
});
|
|
5898
|
-
/**
|
|
5899
|
-
* Cloudflare DNS provider config (placeholder for future).
|
|
5900
|
-
*/
|
|
5901
|
-
const CloudflareDnsProviderSchema = object({
|
|
5902
|
-
provider: literal("cloudflare"),
|
|
5903
|
-
/** TTL in seconds (default: 300) */
|
|
5904
|
-
ttl: number().int().positive().optional()
|
|
5905
|
-
});
|
|
5906
|
-
/**
|
|
5907
|
-
* Manual DNS configuration (user handles DNS themselves).
|
|
5908
|
-
*/
|
|
5909
|
-
const ManualDnsProviderSchema = object({ provider: literal("manual") });
|
|
5910
|
-
/**
|
|
5911
|
-
* Custom DNS provider config (user-provided implementation).
|
|
5912
|
-
*/
|
|
5913
|
-
const CustomDnsProviderSchema = object({
|
|
5914
|
-
/** Custom DnsProvider implementation */
|
|
5915
|
-
provider: custom((val) => typeof val === "object" && val !== null && typeof val.name === "string" && typeof val.getRecords === "function" && typeof val.upsertRecords === "function", { message: "Custom DNS provider must implement name, getRecords(), and upsertRecords() methods" }),
|
|
5916
|
-
/** TTL in seconds (default: 300) */
|
|
5917
|
-
ttl: number().int().positive().optional()
|
|
5918
|
-
});
|
|
5919
|
-
/**
|
|
5920
|
-
* Single DNS provider config (for one domain).
|
|
5921
|
-
*/
|
|
5922
|
-
const DnsProviderSchema = union([discriminatedUnion("provider", [
|
|
5923
|
-
HostingerDnsProviderSchema,
|
|
5924
|
-
Route53DnsProviderSchema,
|
|
5925
|
-
CloudflareDnsProviderSchema,
|
|
5926
|
-
ManualDnsProviderSchema
|
|
5927
|
-
]), CustomDnsProviderSchema]);
|
|
5928
|
-
/**
|
|
5929
|
-
* DNS configuration schema.
|
|
5930
|
-
*
|
|
5931
|
-
* Maps root domains to their DNS provider configuration.
|
|
5932
|
-
* Example:
|
|
5933
|
-
* ```
|
|
5934
|
-
* dns: {
|
|
5935
|
-
* 'geekmidas.dev': { provider: 'hostinger' },
|
|
5936
|
-
* 'geekmidas.com': { provider: 'route53' },
|
|
5937
|
-
* }
|
|
5938
|
-
* ```
|
|
5939
|
-
*
|
|
5940
|
-
* Supported providers:
|
|
5941
|
-
* - 'hostinger': Use Hostinger DNS API
|
|
5942
|
-
* - 'route53': Use AWS Route53
|
|
5943
|
-
* - 'cloudflare': Use Cloudflare DNS API (future)
|
|
5944
|
-
* - 'manual': Don't create records, just print required records
|
|
5945
|
-
* - Custom: Provide a DnsProvider implementation
|
|
5946
|
-
*/
|
|
5947
|
-
const DnsConfigSchema = record(string(), DnsProviderSchema);
|
|
5948
|
-
const HostingerDnsConfigSchema = HostingerDnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
|
|
5949
|
-
const Route53DnsConfigSchema = Route53DnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
|
|
5950
|
-
const CloudflareDnsConfigSchema = CloudflareDnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
|
|
5951
|
-
const ManualDnsConfigSchema = ManualDnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
|
|
5952
|
-
const CustomDnsConfigSchema = CustomDnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
|
|
5953
|
-
/**
|
|
5954
|
-
* Combined DNS config that supports both new multi-domain and legacy single-domain formats.
|
|
5955
|
-
*/
|
|
5956
|
-
const DnsConfigWithLegacySchema = union([DnsConfigSchema, union([discriminatedUnion("provider", [
|
|
5957
|
-
HostingerDnsConfigSchema,
|
|
5958
|
-
Route53DnsConfigSchema,
|
|
5959
|
-
CloudflareDnsConfigSchema,
|
|
5960
|
-
ManualDnsConfigSchema
|
|
5961
|
-
]), CustomDnsConfigSchema])]);
|
|
5962
|
-
/**
|
|
5963
|
-
* Backups configuration schema.
|
|
5964
|
-
*
|
|
5965
|
-
* Configures automatic backup destinations for database services.
|
|
5966
|
-
* On first deploy, creates S3 bucket with unique name and IAM credentials.
|
|
5967
|
-
*/
|
|
5968
|
-
const BackupsConfigSchema = object({
|
|
5969
|
-
/** Backup storage type (currently only 's3' supported) */
|
|
5970
|
-
type: literal("s3"),
|
|
5971
|
-
/** AWS profile name for creating bucket/IAM resources */
|
|
5972
|
-
profile: string().optional(),
|
|
5973
|
-
/** AWS region for the backup bucket */
|
|
5974
|
-
region: AwsRegionSchema,
|
|
5975
|
-
/** Cron schedule for backups (default: '0 2 * * *' = 2 AM daily) */
|
|
5976
|
-
schedule: string().optional(),
|
|
5977
|
-
/** Number of backups to retain (default: 30) */
|
|
5978
|
-
retention: number().optional()
|
|
5979
|
-
});
|
|
5980
|
-
/**
|
|
5981
|
-
* Deploy configuration schema.
|
|
5982
|
-
*/
|
|
5983
|
-
const DeployConfigSchema = object({
|
|
5984
|
-
default: DeployTargetSchema.optional(),
|
|
5985
|
-
dokploy: DokployWorkspaceConfigSchema.optional(),
|
|
5986
|
-
dns: DnsConfigWithLegacySchema.optional(),
|
|
5987
|
-
backups: BackupsConfigSchema.optional()
|
|
5988
5964
|
});
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
schema: _enum(["zod"]).optional()
|
|
5995
|
-
});
|
|
5996
|
-
/**
|
|
5997
|
-
* Shared configuration schema.
|
|
5998
|
-
*/
|
|
5999
|
-
const SharedConfigSchema = object({
|
|
6000
|
-
packages: array(string()).optional(),
|
|
6001
|
-
models: ModelsConfigSchema.optional()
|
|
5965
|
+
Object.defineProperty(exports, "array", {
|
|
5966
|
+
enumerable: true,
|
|
5967
|
+
get: function() {
|
|
5968
|
+
return array;
|
|
5969
|
+
}
|
|
6002
5970
|
});
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
deployed: array(string()),
|
|
6009
|
-
protected: array(string()).optional()
|
|
6010
|
-
}).superRefine((stages, ctx) => {
|
|
6011
|
-
for (const message of stageProblems(stages)) ctx.addIssue({
|
|
6012
|
-
code: "custom",
|
|
6013
|
-
message
|
|
6014
|
-
});
|
|
5971
|
+
Object.defineProperty(exports, "boolean", {
|
|
5972
|
+
enumerable: true,
|
|
5973
|
+
get: function() {
|
|
5974
|
+
return boolean;
|
|
5975
|
+
}
|
|
6015
5976
|
});
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
}).strict(),
|
|
6022
|
-
object({
|
|
6023
|
-
/** Any backend: an object implementing SecretsStore */
|
|
6024
|
-
provider: custom((val) => typeof val === "object" && val !== null && typeof val.pull === "function" && typeof val.push === "function", { message: "a secrets store implements pull() and push()" }) })
|
|
6025
|
-
]);
|
|
6026
|
-
const SecretsConfigSchema = object({
|
|
6027
|
-
enabled: boolean().optional(),
|
|
6028
|
-
store: SecretsStoreSchema.optional(),
|
|
6029
|
-
algorithm: string().optional(),
|
|
6030
|
-
kdf: _enum(["scrypt", "pbkdf2"]).optional()
|
|
5977
|
+
Object.defineProperty(exports, "custom", {
|
|
5978
|
+
enumerable: true,
|
|
5979
|
+
get: function() {
|
|
5980
|
+
return custom;
|
|
5981
|
+
}
|
|
6031
5982
|
});
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
* SSM state provider config (requires region).
|
|
6038
|
-
*/
|
|
6039
|
-
const SSMStateConfigSchema = object({
|
|
6040
|
-
provider: literal("ssm"),
|
|
6041
|
-
/** AWS region (required for SSM provider) */
|
|
6042
|
-
region: AwsRegionSchema,
|
|
6043
|
-
/** AWS profile name (optional - uses default credential chain if not provided) */
|
|
6044
|
-
profile: string().optional()
|
|
5983
|
+
Object.defineProperty(exports, "discriminatedUnion", {
|
|
5984
|
+
enumerable: true,
|
|
5985
|
+
get: function() {
|
|
5986
|
+
return discriminatedUnion;
|
|
5987
|
+
}
|
|
6045
5988
|
});
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
/** Custom StateProvider implementation */
|
|
6051
|
-
provider: custom((val) => typeof val === "object" && val !== null && typeof val.read === "function" && typeof val.write === "function", { message: "Custom provider must implement read() and write() methods" }) });
|
|
6052
|
-
/**
|
|
6053
|
-
* State configuration schema.
|
|
6054
|
-
*
|
|
6055
|
-
* Configures how deployment state is stored.
|
|
6056
|
-
* - 'local': Store in .gkm/deploy-{stage}.json (default)
|
|
6057
|
-
* - 'ssm': Store in AWS SSM Parameter Store (requires region)
|
|
6058
|
-
* - Custom: Provide a StateProvider implementation with read/write methods
|
|
6059
|
-
*/
|
|
6060
|
-
const StateConfigSchema = union([discriminatedUnion("provider", [LocalStateConfigSchema, SSMStateConfigSchema]), CustomStateConfigSchema]);
|
|
6061
|
-
/**
|
|
6062
|
-
* App configuration schema.
|
|
6063
|
-
*/
|
|
6064
|
-
const AppConfigSchema = object({
|
|
6065
|
-
type: _enum([
|
|
6066
|
-
"backend",
|
|
6067
|
-
"web",
|
|
6068
|
-
"mobile"
|
|
6069
|
-
]).optional().default("backend"),
|
|
6070
|
-
path: string().min(1, "App path is required"),
|
|
6071
|
-
port: number().int().positive("Port must be a positive integer"),
|
|
6072
|
-
dependencies: array(string()).optional(),
|
|
6073
|
-
deploy: DeployTargetSchema.optional(),
|
|
6074
|
-
constructs: RoutesSchema.optional(),
|
|
6075
|
-
routes: RoutesSchema.optional(),
|
|
6076
|
-
functions: RoutesSchema.optional(),
|
|
6077
|
-
crons: RoutesSchema.optional(),
|
|
6078
|
-
queues: RoutesSchema.optional(),
|
|
6079
|
-
topics: RoutesSchema.optional(),
|
|
6080
|
-
subscribers: RoutesSchema.optional(),
|
|
6081
|
-
envParser: string().optional(),
|
|
6082
|
-
logger: string().optional(),
|
|
6083
|
-
hooks: HooksConfigSchema.optional(),
|
|
6084
|
-
telescope: union([
|
|
6085
|
-
string(),
|
|
6086
|
-
boolean(),
|
|
6087
|
-
TelescopeConfigSchema
|
|
6088
|
-
]).optional(),
|
|
6089
|
-
studio: union([
|
|
6090
|
-
string(),
|
|
6091
|
-
boolean(),
|
|
6092
|
-
StudioConfigSchema
|
|
6093
|
-
]).optional(),
|
|
6094
|
-
openapi: union([boolean(), OpenApiConfigSchema]).optional(),
|
|
6095
|
-
runtime: _enum(["node", "bun"]).optional(),
|
|
6096
|
-
env: union([string(), array(string())]).optional(),
|
|
6097
|
-
entry: string().optional(),
|
|
6098
|
-
framework: FrameworkSchema.optional(),
|
|
6099
|
-
config: object({
|
|
6100
|
-
client: string().optional(),
|
|
6101
|
-
server: string().optional()
|
|
6102
|
-
}).optional()
|
|
6103
|
-
}).refine((data) => {
|
|
6104
|
-
if (data.type === "web") {
|
|
6105
|
-
if (!data.framework || !FRONTEND_FRAMEWORKS.includes(data.framework)) return false;
|
|
5989
|
+
Object.defineProperty(exports, "email", {
|
|
5990
|
+
enumerable: true,
|
|
5991
|
+
get: function() {
|
|
5992
|
+
return email;
|
|
6106
5993
|
}
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
if (data.type === "mobile") {
|
|
6113
|
-
if (!data.framework || !MOBILE_FRAMEWORKS.includes(data.framework)) return false;
|
|
5994
|
+
});
|
|
5995
|
+
Object.defineProperty(exports, "lazy", {
|
|
5996
|
+
enumerable: true,
|
|
5997
|
+
get: function() {
|
|
5998
|
+
return lazy;
|
|
6114
5999
|
}
|
|
6115
|
-
return true;
|
|
6116
|
-
}, {
|
|
6117
|
-
message: `Mobile apps must have a valid mobile framework (${MOBILE_FRAMEWORKS.join(", ")})`,
|
|
6118
|
-
path: ["framework"]
|
|
6119
6000
|
});
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
name: string().optional(),
|
|
6125
|
-
/**
|
|
6126
|
-
* Where the workspace's own constructs live, relative to its root.
|
|
6127
|
-
*
|
|
6128
|
-
* Infrastructure is a fact about the product, not about the process that
|
|
6129
|
-
* happens to import it — so a database two apps share is declared once,
|
|
6130
|
-
* at the top, and both find it. An app-level glob still works and is
|
|
6131
|
-
* additive, for something only one app uses.
|
|
6132
|
-
*/
|
|
6133
|
-
constructs: RoutesSchema.optional(),
|
|
6134
|
-
/**
|
|
6135
|
-
* Apps that nothing declares.
|
|
6136
|
-
*
|
|
6137
|
-
* Optional, and normally absent: a `site` is an app and so is a
|
|
6138
|
-
* `rest-api` that named one, so the list is read off the graph. This is
|
|
6139
|
-
* the escape hatch for what no construct describes — a mobile app, a
|
|
6140
|
-
* process someone runs by hand — and for overriding one field of a
|
|
6141
|
-
* derived app without restating it.
|
|
6142
|
-
*/
|
|
6143
|
-
apps: record(string(), AppConfigSchema).optional(),
|
|
6144
|
-
shared: SharedConfigSchema.optional(),
|
|
6145
|
-
deploy: DeployConfigSchema.optional(),
|
|
6146
|
-
stages: StagesConfigSchema,
|
|
6147
|
-
secrets: SecretsConfigSchema.optional(),
|
|
6148
|
-
state: StateConfigSchema.optional()
|
|
6149
|
-
}).strict().refine((data) => {
|
|
6150
|
-
const appNames = Object.keys(data.apps ?? {});
|
|
6151
|
-
for (const [appName, app] of Object.entries(data.apps ?? {})) for (const dep of app.dependencies ?? []) {
|
|
6152
|
-
if (!appNames.includes(dep)) return false;
|
|
6153
|
-
if (dep === appName) return false;
|
|
6001
|
+
Object.defineProperty(exports, "literal", {
|
|
6002
|
+
enumerable: true,
|
|
6003
|
+
get: function() {
|
|
6004
|
+
return literal;
|
|
6154
6005
|
}
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
function hasCycle(app) {
|
|
6161
|
-
if (recStack.has(app)) return true;
|
|
6162
|
-
if (visited.has(app)) return false;
|
|
6163
|
-
visited.add(app);
|
|
6164
|
-
recStack.add(app);
|
|
6165
|
-
const deps = data.apps?.[app]?.dependencies ?? [];
|
|
6166
|
-
for (const dep of deps) if (hasCycle(dep)) return true;
|
|
6167
|
-
recStack.delete(app);
|
|
6168
|
-
return false;
|
|
6006
|
+
});
|
|
6007
|
+
Object.defineProperty(exports, "looseObject", {
|
|
6008
|
+
enumerable: true,
|
|
6009
|
+
get: function() {
|
|
6010
|
+
return looseObject;
|
|
6169
6011
|
}
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6012
|
+
});
|
|
6013
|
+
Object.defineProperty(exports, "number", {
|
|
6014
|
+
enumerable: true,
|
|
6015
|
+
get: function() {
|
|
6016
|
+
return number;
|
|
6174
6017
|
}
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
code: "custom",
|
|
6181
|
-
message: getDeployTargetError(defaultTarget),
|
|
6182
|
-
path: ["deploy", "default"]
|
|
6183
|
-
});
|
|
6184
|
-
return;
|
|
6018
|
+
});
|
|
6019
|
+
Object.defineProperty(exports, "object", {
|
|
6020
|
+
enumerable: true,
|
|
6021
|
+
get: function() {
|
|
6022
|
+
return object;
|
|
6185
6023
|
}
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
"apps",
|
|
6192
|
-
appName,
|
|
6193
|
-
"deploy"
|
|
6194
|
-
]
|
|
6195
|
-
});
|
|
6196
|
-
return;
|
|
6024
|
+
});
|
|
6025
|
+
Object.defineProperty(exports, "record", {
|
|
6026
|
+
enumerable: true,
|
|
6027
|
+
get: function() {
|
|
6028
|
+
return record;
|
|
6197
6029
|
}
|
|
6198
|
-
if (data.state?.provider === "ssm" && !data.name) ctx.addIssue({
|
|
6199
|
-
code: "custom",
|
|
6200
|
-
message: "Workspace name is required when using SSM state provider. Add \"name\" to your gkm.config.ts.",
|
|
6201
|
-
path: ["name"]
|
|
6202
|
-
});
|
|
6203
6030
|
});
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
function validateWorkspaceConfig(config) {
|
|
6209
|
-
return WorkspaceConfigSchema.parse(config);
|
|
6210
|
-
}
|
|
6211
|
-
/**
|
|
6212
|
-
* Safe validation that returns result instead of throwing.
|
|
6213
|
-
*/
|
|
6214
|
-
function safeValidateWorkspaceConfig(config) {
|
|
6215
|
-
const result = WorkspaceConfigSchema.safeParse(config);
|
|
6216
|
-
if (result.success) return {
|
|
6217
|
-
success: true,
|
|
6218
|
-
data: result.data
|
|
6219
|
-
};
|
|
6220
|
-
return {
|
|
6221
|
-
success: false,
|
|
6222
|
-
error: result.error
|
|
6223
|
-
};
|
|
6224
|
-
}
|
|
6225
|
-
/**
|
|
6226
|
-
* Format Zod errors into user-friendly messages.
|
|
6227
|
-
*/
|
|
6228
|
-
function formatValidationErrors(error) {
|
|
6229
|
-
return `Workspace configuration validation failed:\n${error.issues.map((issue) => {
|
|
6230
|
-
const path = issue.path.join(".");
|
|
6231
|
-
return path ? ` - ${path}: ${issue.message}` : ` - ${issue.message}`;
|
|
6232
|
-
}).join("\n")}`;
|
|
6233
|
-
}
|
|
6234
|
-
//#endregion
|
|
6235
|
-
//#region src/workspace/types.ts
|
|
6236
|
-
/**
|
|
6237
|
-
* Type guard to check if a config is a WorkspaceConfig.
|
|
6238
|
-
*
|
|
6239
|
-
* @example
|
|
6240
|
-
* ```ts
|
|
6241
|
-
* const config = await loadConfig();
|
|
6242
|
-
* if (isWorkspaceConfig(config)) {
|
|
6243
|
-
* // config.apps is available
|
|
6244
|
-
* console.log(Object.keys(config.apps));
|
|
6245
|
-
* }
|
|
6246
|
-
* ```
|
|
6247
|
-
*/
|
|
6248
|
-
function isWorkspaceConfig(config) {
|
|
6249
|
-
if (typeof config !== "object" || config === null) return false;
|
|
6250
|
-
if ("apps" in config && typeof config.apps === "object") return true;
|
|
6251
|
-
return "constructs" in config && Object.keys(config).every((key) => WORKSPACE_KEYS.has(key));
|
|
6252
|
-
}
|
|
6253
|
-
/** Every top-level key a workspace config has — see `WorkspaceConfigSchema`. */
|
|
6254
|
-
const WORKSPACE_KEYS = /* @__PURE__ */ new Set([
|
|
6255
|
-
"name",
|
|
6256
|
-
"constructs",
|
|
6257
|
-
"apps",
|
|
6258
|
-
"shared",
|
|
6259
|
-
"deploy",
|
|
6260
|
-
"stages",
|
|
6261
|
-
"secrets",
|
|
6262
|
-
"state"
|
|
6263
|
-
]);
|
|
6264
|
-
//#endregion
|
|
6265
|
-
//#region src/workspace/index.ts
|
|
6266
|
-
/**
|
|
6267
|
-
* Validate that all dependencies reference existing apps.
|
|
6268
|
-
* Returns the config if valid, throws otherwise.
|
|
6269
|
-
*/
|
|
6270
|
-
function validateDependencies(apps) {
|
|
6271
|
-
const appNames = new Set(Object.keys(apps));
|
|
6272
|
-
for (const [appName, app] of Object.entries(apps)) for (const dep of app.dependencies ?? []) {
|
|
6273
|
-
if (!appNames.has(dep)) throw new Error(`Invalid dependency: App "${appName}" depends on "${dep}" which does not exist. Valid apps are: ${[...appNames].join(", ")}`);
|
|
6274
|
-
if (dep === appName) throw new Error(`Invalid dependency: App "${appName}" cannot depend on itself.`);
|
|
6031
|
+
Object.defineProperty(exports, "string", {
|
|
6032
|
+
enumerable: true,
|
|
6033
|
+
get: function() {
|
|
6034
|
+
return string;
|
|
6275
6035
|
}
|
|
6276
|
-
}
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
* - Autocomplete for app names in dependencies
|
|
6282
|
-
* - Type errors for invalid dependency references
|
|
6283
|
-
* - Full type inference for the returned config
|
|
6284
|
-
*
|
|
6285
|
-
* @example
|
|
6286
|
-
* ```ts
|
|
6287
|
-
* // gkm.config.ts
|
|
6288
|
-
* import { defineWorkspace } from '@geekmidas/cli';
|
|
6289
|
-
*
|
|
6290
|
-
* export default defineWorkspace({
|
|
6291
|
-
* name: 'my-saas',
|
|
6292
|
-
* apps: {
|
|
6293
|
-
* api: {
|
|
6294
|
-
* type: 'backend',
|
|
6295
|
-
* path: 'apps/api',
|
|
6296
|
-
* port: 3000,
|
|
6297
|
-
* routes: './src/endpoints/**\/*.ts',
|
|
6298
|
-
* envParser: './src/config/env',
|
|
6299
|
-
* logger: './src/logger',
|
|
6300
|
-
* },
|
|
6301
|
-
* web: {
|
|
6302
|
-
* type: 'web',
|
|
6303
|
-
* framework: 'nextjs',
|
|
6304
|
-
* path: 'apps/web',
|
|
6305
|
-
* port: 3001,
|
|
6306
|
-
* dependencies: ['api'], // <- autocomplete shows 'api' | 'web'
|
|
6307
|
-
* },
|
|
6308
|
-
* },
|
|
6309
|
-
* });
|
|
6310
|
-
*
|
|
6311
|
-
* // config.apps.api <- full type inference
|
|
6312
|
-
* // config.apps.foo <- TypeScript error
|
|
6313
|
-
* ```
|
|
6314
|
-
*/
|
|
6315
|
-
function defineWorkspace(config) {
|
|
6316
|
-
if (config.apps) validateDependencies(config.apps);
|
|
6317
|
-
const result = safeValidateWorkspaceConfig(config);
|
|
6318
|
-
if (!result.success && result.error) throw new Error(formatValidationErrors(result.error));
|
|
6319
|
-
return config;
|
|
6320
|
-
}
|
|
6321
|
-
/**
|
|
6322
|
-
* Get the package name from package.json in the given directory.
|
|
6323
|
-
*/
|
|
6324
|
-
function getPackageName(cwd) {
|
|
6325
|
-
try {
|
|
6326
|
-
return __require(`${cwd}/package.json`).name?.replace(/^@[^/]+\//, "");
|
|
6327
|
-
} catch {
|
|
6328
|
-
return;
|
|
6036
|
+
});
|
|
6037
|
+
Object.defineProperty(exports, "toJSONSchema", {
|
|
6038
|
+
enumerable: true,
|
|
6039
|
+
get: function() {
|
|
6040
|
+
return toJSONSchema;
|
|
6329
6041
|
}
|
|
6330
|
-
}
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
const name = config.name ?? getPackageName(cwd) ?? basename(cwd);
|
|
6336
|
-
const defaultTarget = config.deploy?.default ?? "dokploy";
|
|
6337
|
-
const normalizedApps = {};
|
|
6338
|
-
for (const [appName, app] of Object.entries(config.apps ?? {})) normalizedApps[appName] = normalizeAppConfig(app, defaultTarget);
|
|
6339
|
-
return {
|
|
6340
|
-
name,
|
|
6341
|
-
root: cwd,
|
|
6342
|
-
...config.constructs ? { constructs: config.constructs } : {},
|
|
6343
|
-
apps: normalizedApps,
|
|
6344
|
-
deploy: config.deploy ?? { default: "dokploy" },
|
|
6345
|
-
shared: config.shared ?? { packages: ["packages/*"] },
|
|
6346
|
-
stages: validateStages(config.stages),
|
|
6347
|
-
secrets: config.secrets ?? {},
|
|
6348
|
-
state: config.state
|
|
6349
|
-
};
|
|
6350
|
-
}
|
|
6351
|
-
/**
|
|
6352
|
-
* Normalize an app configuration with resolved defaults.
|
|
6353
|
-
* @param app - App configuration
|
|
6354
|
-
* @param defaultTarget - Default deploy target from workspace config
|
|
6355
|
-
*/
|
|
6356
|
-
function normalizeAppConfig(app, defaultTarget) {
|
|
6357
|
-
return {
|
|
6358
|
-
...app,
|
|
6359
|
-
type: app.type ?? "backend",
|
|
6360
|
-
port: app.port,
|
|
6361
|
-
path: app.path,
|
|
6362
|
-
dependencies: app.dependencies ?? [],
|
|
6363
|
-
resolvedDeployTarget: app.deploy ?? defaultTarget
|
|
6364
|
-
};
|
|
6365
|
-
}
|
|
6366
|
-
/**
|
|
6367
|
-
* Wrap a single-app GkmConfig as a workspace.
|
|
6368
|
-
* This allows existing single-app configs to work seamlessly.
|
|
6369
|
-
*/
|
|
6370
|
-
function wrapSingleAppAsWorkspace(config, cwd) {
|
|
6371
|
-
return {
|
|
6372
|
-
name: config.name ?? getPackageName(cwd) ?? basename(cwd),
|
|
6373
|
-
root: cwd,
|
|
6374
|
-
apps: { api: {
|
|
6375
|
-
type: "backend",
|
|
6376
|
-
path: ".",
|
|
6377
|
-
port: (typeof config.providers?.server === "object" ? config.providers.server.port : void 0) ?? 3e3,
|
|
6378
|
-
dependencies: [],
|
|
6379
|
-
resolvedDeployTarget: config.deploy?.default ?? "dokploy",
|
|
6380
|
-
constructs: config.constructs,
|
|
6381
|
-
providers: config.providers,
|
|
6382
|
-
hooks: config.hooks,
|
|
6383
|
-
telescope: config.telescope,
|
|
6384
|
-
studio: config.studio,
|
|
6385
|
-
openapi: config.openapi,
|
|
6386
|
-
runtime: config.runtime,
|
|
6387
|
-
env: config.env
|
|
6388
|
-
} },
|
|
6389
|
-
deploy: {
|
|
6390
|
-
default: "dokploy",
|
|
6391
|
-
...config.deploy
|
|
6392
|
-
},
|
|
6393
|
-
shared: { packages: [] },
|
|
6394
|
-
stages: validateStages(config.stages),
|
|
6395
|
-
secrets: config.secrets ?? {}
|
|
6396
|
-
};
|
|
6397
|
-
}
|
|
6398
|
-
/**
|
|
6399
|
-
* Process a loaded configuration (either single-app or workspace).
|
|
6400
|
-
* Returns a normalized workspace in both cases.
|
|
6401
|
-
*/
|
|
6402
|
-
function processConfig(config, cwd) {
|
|
6403
|
-
if (isWorkspaceConfig(config)) {
|
|
6404
|
-
const result = safeValidateWorkspaceConfig(config);
|
|
6405
|
-
if (!result.success && result.error) throw new Error(formatValidationErrors(result.error));
|
|
6406
|
-
return {
|
|
6407
|
-
type: "workspace",
|
|
6408
|
-
raw: config,
|
|
6409
|
-
workspace: normalizeWorkspace(config, cwd)
|
|
6410
|
-
};
|
|
6042
|
+
});
|
|
6043
|
+
Object.defineProperty(exports, "tuple", {
|
|
6044
|
+
enumerable: true,
|
|
6045
|
+
get: function() {
|
|
6046
|
+
return tuple;
|
|
6411
6047
|
}
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
}
|
|
6418
|
-
/**
|
|
6419
|
-
* The workspace's own constructs globs, absolute.
|
|
6420
|
-
*
|
|
6421
|
-
* Infrastructure two apps share is a fact about the product, and declaring it
|
|
6422
|
-
* inside one of them makes moving that app a change to the other's database.
|
|
6423
|
-
*/
|
|
6424
|
-
function workspaceConstructGlobs(workspace) {
|
|
6425
|
-
return constructPatterns(workspace.constructs).map((pattern) => isAbsolute(pattern) ? pattern : join(workspace.root, pattern));
|
|
6426
|
-
}
|
|
6427
|
-
/**
|
|
6428
|
-
* Every constructs glob an app can see, absolute.
|
|
6429
|
-
*
|
|
6430
|
-
* The workspace's own first, then the app's. Absolute because the app builds
|
|
6431
|
-
* from its own directory while the workspace's constructs live above it —
|
|
6432
|
-
* a relative glob resolved from the app would look for the product's
|
|
6433
|
-
* infrastructure inside one of its consumers and find nothing.
|
|
6434
|
-
*
|
|
6435
|
-
* Additive, not overriding: an app that declares its own constructs still sees
|
|
6436
|
-
* the ones the workspace declared for everybody.
|
|
6437
|
-
*/
|
|
6438
|
-
function appConstructGlobs(workspace, appName) {
|
|
6439
|
-
const globs = workspaceConstructGlobs(workspace);
|
|
6440
|
-
const app = workspace.apps[appName];
|
|
6441
|
-
if (app) {
|
|
6442
|
-
const root = isAbsolute(app.path) ? app.path : join(workspace.root, app.path);
|
|
6443
|
-
for (const pattern of constructPatterns(app.constructs)) globs.push(isAbsolute(pattern) ? pattern : join(root, pattern));
|
|
6048
|
+
});
|
|
6049
|
+
Object.defineProperty(exports, "union", {
|
|
6050
|
+
enumerable: true,
|
|
6051
|
+
get: function() {
|
|
6052
|
+
return union;
|
|
6444
6053
|
}
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
|
|
6449
|
-
|
|
6450
|
-
* One list, so what a deploy provisions and what an app's entry point
|
|
6451
|
-
* registers drivers for are read off the same globs.
|
|
6452
|
-
*/
|
|
6453
|
-
function allConstructGlobs(workspace) {
|
|
6454
|
-
const globs = [...workspaceConstructGlobs(workspace), ...Object.keys(workspace.apps).flatMap((appName) => appConstructGlobs(workspace, appName))];
|
|
6455
|
-
return [...new Set(globs)];
|
|
6456
|
-
}
|
|
6457
|
-
/** A `Routes` in any of its accepted shapes, as a flat list of patterns. */
|
|
6458
|
-
function constructPatterns(routes) {
|
|
6459
|
-
if (!routes) return [];
|
|
6460
|
-
if (typeof routes === "string") return [routes];
|
|
6461
|
-
if (Array.isArray(routes)) return routes;
|
|
6462
|
-
const paths = routes.paths;
|
|
6463
|
-
if (!paths) return [];
|
|
6464
|
-
return Array.isArray(paths) ? paths : [paths];
|
|
6465
|
-
}
|
|
6466
|
-
/**
|
|
6467
|
-
* Get the GkmConfig for a specific app in a workspace.
|
|
6468
|
-
* Useful for running existing single-app commands on a specific app.
|
|
6469
|
-
*/
|
|
6470
|
-
function getAppGkmConfig(workspace, appName) {
|
|
6471
|
-
const app = workspace.apps[appName];
|
|
6472
|
-
if (!app || app.type !== "backend") return;
|
|
6473
|
-
return {
|
|
6474
|
-
...workspace.deploy ? { deploy: workspace.deploy } : {},
|
|
6475
|
-
stages: workspace.stages,
|
|
6476
|
-
constructs: appConstructGlobs(workspace, appName),
|
|
6477
|
-
providers: app.providers,
|
|
6478
|
-
hooks: app.hooks,
|
|
6479
|
-
telescope: app.telescope,
|
|
6480
|
-
studio: app.studio,
|
|
6481
|
-
openapi: app.openapi,
|
|
6482
|
-
runtime: app.runtime,
|
|
6483
|
-
env: app.env
|
|
6484
|
-
};
|
|
6485
|
-
}
|
|
6486
|
-
/**
|
|
6487
|
-
* Get topologically sorted app names based on dependencies.
|
|
6488
|
-
* Apps with no dependencies come first, then apps that depend on them.
|
|
6489
|
-
*/
|
|
6490
|
-
function getAppBuildOrder(workspace) {
|
|
6491
|
-
const appNames = Object.keys(workspace.apps);
|
|
6492
|
-
const visited = /* @__PURE__ */ new Set();
|
|
6493
|
-
const result = [];
|
|
6494
|
-
function visit(name) {
|
|
6495
|
-
if (visited.has(name)) return;
|
|
6496
|
-
visited.add(name);
|
|
6497
|
-
const app = workspace.apps[name];
|
|
6498
|
-
if (app) for (const dep of app.dependencies) visit(dep);
|
|
6499
|
-
result.push(name);
|
|
6054
|
+
});
|
|
6055
|
+
Object.defineProperty(exports, "unknown", {
|
|
6056
|
+
enumerable: true,
|
|
6057
|
+
get: function() {
|
|
6058
|
+
return unknown;
|
|
6500
6059
|
}
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
|
|
6505
|
-
|
|
6506
|
-
*
|
|
6507
|
-
* Each dependency gets the un-prefixed `{DEP}_URL` (for server-side use) and,
|
|
6508
|
-
* when the consuming app's framework supports a public-var prefix, also the
|
|
6509
|
-
* prefixed form (e.g. `NEXT_PUBLIC_{DEP}_URL` for Next.js, `VITE_{DEP}_URL`
|
|
6510
|
-
* for Vite/TanStack Start). The prefixed form is what gets bundled into the
|
|
6511
|
-
* client at build time.
|
|
6512
|
-
*/
|
|
6513
|
-
function getDependencyEnvVars(workspace, appName, urlPrefix = "http://localhost") {
|
|
6514
|
-
const app = workspace.apps[appName];
|
|
6515
|
-
if (!app) return {};
|
|
6516
|
-
const env = {};
|
|
6517
|
-
const publicPrefix = getPublicEnvPrefix(app.framework);
|
|
6518
|
-
for (const depName of app.dependencies) {
|
|
6519
|
-
const dep = workspace.apps[depName];
|
|
6520
|
-
if (dep) {
|
|
6521
|
-
const url = `${urlPrefix}:${dep.port}`;
|
|
6522
|
-
const envKey = `${depName.toUpperCase()}_URL`;
|
|
6523
|
-
env[envKey] = url;
|
|
6524
|
-
if (publicPrefix) env[`${publicPrefix}${envKey}`] = url;
|
|
6525
|
-
}
|
|
6060
|
+
});
|
|
6061
|
+
Object.defineProperty(exports, "url", {
|
|
6062
|
+
enumerable: true,
|
|
6063
|
+
get: function() {
|
|
6064
|
+
return url;
|
|
6526
6065
|
}
|
|
6527
|
-
|
|
6528
|
-
}
|
|
6529
|
-
/**
|
|
6530
|
-
* Resolve the Dokploy endpoint for a specific stage.
|
|
6531
|
-
*
|
|
6532
|
-
* Uses per-stage endpoint from `endpoints` if available,
|
|
6533
|
-
* otherwise falls back to the global `endpoint`.
|
|
6534
|
-
*
|
|
6535
|
-
* @param dokployConfig - Dokploy workspace configuration
|
|
6536
|
-
* @param stage - Deployment stage (e.g., 'development', 'production')
|
|
6537
|
-
* @returns The endpoint URL for the stage, or undefined if not configured
|
|
6538
|
-
*
|
|
6539
|
-
* @example
|
|
6540
|
-
* ```ts
|
|
6541
|
-
* // With per-stage endpoints
|
|
6542
|
-
* const config = {
|
|
6543
|
-
* endpoints: {
|
|
6544
|
-
* development: 'https://dev.dokploy.example.com:3000',
|
|
6545
|
-
* production: 'https://prod.dokploy.example.com:3000',
|
|
6546
|
-
* },
|
|
6547
|
-
* };
|
|
6548
|
-
* getEndpointForStage(config, 'production'); // => 'https://prod.dokploy.example.com:3000'
|
|
6549
|
-
*
|
|
6550
|
-
* // With single endpoint
|
|
6551
|
-
* const config = { endpoint: 'https://dokploy.example.com:3000' };
|
|
6552
|
-
* getEndpointForStage(config, 'production'); // => 'https://dokploy.example.com:3000'
|
|
6553
|
-
* ```
|
|
6554
|
-
*/
|
|
6555
|
-
function getEndpointForStage(dokployConfig, stage) {
|
|
6556
|
-
if (!dokployConfig) return void 0;
|
|
6557
|
-
if (dokployConfig.endpoints?.[stage]) return dokployConfig.endpoints[stage];
|
|
6558
|
-
return dokployConfig.endpoint;
|
|
6559
|
-
}
|
|
6560
|
-
//#endregion
|
|
6561
|
-
export { InvalidStages as C, PUBLIC_ENV_PREFIXES as D, stageProblems as E, getPublicEnvPrefix as O, validateWorkspaceConfig as S, deployedProblems as T, formatValidationErrors as _, getAppBuildOrder as a, isPhase2DeployTarget as b, getEndpointForStage as c, workspaceConstructGlobs as d, wrapSingleAppAsWorkspace as f, WorkspaceConfigSchema as g, SUPPORTED_DEPLOY_TARGETS as h, defineWorkspace as i, stripPublicPrefix as k, normalizeWorkspace as l, PHASE_2_DEPLOY_TARGETS as m, appConstructGlobs as n, getAppGkmConfig as o, isWorkspaceConfig as p, constructPatterns as r, getDependencyEnvVars as s, allConstructGlobs as t, processConfig as u, getDeployTargetError as v, assertDeployedStage as w, safeValidateWorkspaceConfig as x, isDeployTargetSupported as y };
|
|
6066
|
+
});
|
|
6562
6067
|
|
|
6563
|
-
//# sourceMappingURL=
|
|
6068
|
+
//# sourceMappingURL=schemas-BQ_v0lEX.cjs.map
|