@geekmidas/cli 10.0.0-alpha.12 → 10.0.0-alpha.121
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 +310 -377
- 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-BDa6pPgE.cjs +1090 -0
- package/dist/EndpointGenerator-BDa6pPgE.cjs.map +1 -0
- package/dist/EndpointGenerator-CP_z_E3e.mjs +1031 -0
- package/dist/EndpointGenerator-CP_z_E3e.mjs.map +1 -0
- package/dist/GoDaddyProvider-3C8U_tVu.cjs +388 -0
- package/dist/GoDaddyProvider-3C8U_tVu.cjs.map +1 -0
- package/dist/GoDaddyProvider-D0MQoOM4.mjs +388 -0
- package/dist/GoDaddyProvider-D0MQoOM4.mjs.map +1 -0
- package/dist/{HostingerProvider-BcyFRbqV.mjs → HostingerProvider-BNpS9aRJ.mjs} +29 -25
- package/dist/HostingerProvider-BNpS9aRJ.mjs.map +1 -0
- package/dist/{HostingerProvider-BOvsgATO.cjs → HostingerProvider-DR1iws1P.cjs} +29 -25
- package/dist/HostingerProvider-DR1iws1P.cjs.map +1 -0
- package/dist/LegacyStateStore-CRi7TosX.mjs +124 -0
- package/dist/LegacyStateStore-CRi7TosX.mjs.map +1 -0
- package/dist/LegacyStateStore-DHsoQGOo.cjs +124 -0
- package/dist/LegacyStateStore-DHsoQGOo.cjs.map +1 -0
- package/dist/LocalStateStore-BQXTkeoS.cjs +178 -0
- package/dist/LocalStateStore-BQXTkeoS.cjs.map +1 -0
- package/dist/LocalStateStore-Dkth0jXX.mjs +167 -0
- package/dist/LocalStateStore-Dkth0jXX.mjs.map +1 -0
- package/dist/OpenApiTsGenerator-CsrukCE-.mjs +536 -0
- package/dist/OpenApiTsGenerator-CsrukCE-.mjs.map +1 -0
- package/dist/OpenApiTsGenerator-FNhY7Ssz.cjs +541 -0
- package/dist/OpenApiTsGenerator-FNhY7Ssz.cjs.map +1 -0
- package/dist/{Route53Provider-CH9XH7bz.cjs → Route53Provider-Bllus2NR.cjs} +21 -22
- package/dist/Route53Provider-Bllus2NR.cjs.map +1 -0
- package/dist/{Route53Provider-C0xmer8U.mjs → Route53Provider-QXxjkZO1.mjs} +13 -13
- package/dist/Route53Provider-QXxjkZO1.mjs.map +1 -0
- package/dist/S3StateStore-DGKZgyKz.cjs +222 -0
- package/dist/S3StateStore-DGKZgyKz.cjs.map +1 -0
- package/dist/S3StateStore-pZZnLLBd.mjs +223 -0
- package/dist/S3StateStore-pZZnLLBd.mjs.map +1 -0
- package/dist/SSMStateStore-CZRMERDA.mjs +205 -0
- package/dist/SSMStateStore-CZRMERDA.mjs.map +1 -0
- package/dist/SSMStateStore-DzkyjQ5D.cjs +204 -0
- package/dist/SSMStateStore-DzkyjQ5D.cjs.map +1 -0
- package/dist/SubscriberGenerator-C8CPxrCK.cjs +592 -0
- package/dist/SubscriberGenerator-C8CPxrCK.cjs.map +1 -0
- package/dist/SubscriberGenerator-y3pncae_.mjs +533 -0
- package/dist/SubscriberGenerator-y3pncae_.mjs.map +1 -0
- package/dist/add-C0kXOsWS.mjs +717 -0
- package/dist/add-C0kXOsWS.mjs.map +1 -0
- package/dist/add-Df8cmz0H.cjs +719 -0
- package/dist/add-Df8cmz0H.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/aws-8QQ8n-t6.mjs +89 -0
- package/dist/aws-8QQ8n-t6.mjs.map +1 -0
- package/dist/aws-DY9NqQIT.cjs +100 -0
- package/dist/aws-DY9NqQIT.cjs.map +1 -0
- package/dist/awsStore-Bx5nCFnS.mjs +121 -0
- package/dist/awsStore-Bx5nCFnS.mjs.map +1 -0
- package/dist/awsStore-u3ehhMoY.cjs +138 -0
- package/dist/awsStore-u3ehhMoY.cjs.map +1 -0
- package/dist/{backup-provisioner-DXXg6FIL.mjs → backup-provisioner-C8DnCmxK.mjs} +11 -8
- package/dist/backup-provisioner-C8DnCmxK.mjs.map +1 -0
- package/dist/{backup-provisioner-cE2PuCTb.cjs → backup-provisioner-oDEsPj02.cjs} +22 -20
- package/dist/backup-provisioner-oDEsPj02.cjs.map +1 -0
- package/dist/backups/runner.cjs +519 -0
- package/dist/backups/runner.cjs.map +1 -0
- package/dist/backups/runner.d.cts +102 -0
- package/dist/backups/runner.d.cts.map +1 -0
- package/dist/backups/runner.d.mts +102 -0
- package/dist/backups/runner.d.mts.map +1 -0
- package/dist/backups/runner.mjs +506 -0
- package/dist/backups/runner.mjs.map +1 -0
- package/dist/{bundler-Bux2iF-v.mjs → bundler-B-I4Du99.mjs} +35 -16
- package/dist/bundler-B-I4Du99.mjs.map +1 -0
- package/dist/{bundler-BMekgx7a.cjs → bundler-Dx_grUmc.cjs} +37 -19
- package/dist/bundler-Dx_grUmc.cjs.map +1 -0
- package/dist/cli-Cd9exatJ.cjs +71 -0
- package/dist/cli-Cd9exatJ.cjs.map +1 -0
- package/dist/cli-DL7GxGAe.mjs +71 -0
- package/dist/cli-DL7GxGAe.mjs.map +1 -0
- package/dist/compose-C43c03WZ.mjs +3284 -0
- package/dist/compose-C43c03WZ.mjs.map +1 -0
- package/dist/compose-Mdgea4Yt.cjs +3427 -0
- package/dist/compose-Mdgea4Yt.cjs.map +1 -0
- package/dist/config-D48erO2j.d.mts +269 -0
- package/dist/config-D48erO2j.d.mts.map +1 -0
- package/dist/config-DHDtsQrB.d.cts +269 -0
- package/dist/config-DHDtsQrB.d.cts.map +1 -0
- package/dist/config.cjs +421 -11
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +4 -120
- package/dist/config.d.mts +4 -120
- package/dist/config.mjs +405 -4
- package/dist/config.mjs.map +1 -0
- package/dist/credentialSchemas-B67WJOOm.cjs +272 -0
- package/dist/credentialSchemas-B67WJOOm.cjs.map +1 -0
- package/dist/credentialSchemas-DDOLRCLF.mjs +237 -0
- package/dist/credentialSchemas-DDOLRCLF.mjs.map +1 -0
- package/dist/credentials-B5N5yKk6.mjs +267 -0
- package/dist/credentials-B5N5yKk6.mjs.map +1 -0
- package/dist/credentials-Zqr3QQYB.cjs +350 -0
- package/dist/credentials-Zqr3QQYB.cjs.map +1 -0
- package/dist/databases-BPOgTn1u.mjs +522 -0
- package/dist/databases-BPOgTn1u.mjs.map +1 -0
- package/dist/databases-fOaoBInm.cjs +625 -0
- package/dist/databases-fOaoBInm.cjs.map +1 -0
- package/dist/define-6poNqm5O.mjs +106 -0
- package/dist/define-6poNqm5O.mjs.map +1 -0
- package/dist/define-crmMcXFS.cjs +153 -0
- package/dist/define-crmMcXFS.cjs.map +1 -0
- package/dist/deploy/public.cjs +212 -0
- package/dist/deploy/public.cjs.map +1 -0
- package/dist/deploy/public.d.cts +654 -0
- package/dist/deploy/public.d.cts.map +1 -0
- package/dist/deploy/public.d.mts +654 -0
- package/dist/deploy/public.d.mts.map +1 -0
- package/dist/deploy/public.mjs +145 -0
- package/dist/deploy/public.mjs.map +1 -0
- package/dist/deploy/sniffer-envkit-patch.cjs +18 -10
- package/dist/deploy/sniffer-envkit-patch.cjs.map +1 -1
- package/dist/deploy/sniffer-envkit-patch.d.cts +0 -2
- package/dist/deploy/sniffer-envkit-patch.d.cts.map +1 -1
- package/dist/deploy/sniffer-envkit-patch.d.mts +0 -2
- package/dist/deploy/sniffer-envkit-patch.d.mts.map +1 -1
- package/dist/deploy/sniffer-envkit-patch.mjs +10 -2
- package/dist/deploy/sniffer-envkit-patch.mjs.map +1 -1
- package/dist/deploy/sniffer-envparser-worker.cjs +54 -0
- package/dist/deploy/sniffer-envparser-worker.cjs.map +1 -0
- package/dist/deploy/sniffer-envparser-worker.d.cts +1 -0
- package/dist/deploy/sniffer-envparser-worker.d.mts +1 -0
- package/dist/deploy/sniffer-envparser-worker.mjs +55 -0
- package/dist/deploy/sniffer-envparser-worker.mjs.map +1 -0
- package/dist/deploy/sniffer-hooks.cjs +13 -7
- package/dist/deploy/sniffer-hooks.cjs.map +1 -1
- package/dist/deploy/sniffer-hooks.d.cts +1 -2
- package/dist/deploy/sniffer-hooks.d.cts.map +1 -1
- package/dist/deploy/sniffer-hooks.d.mts +1 -2
- package/dist/deploy/sniffer-hooks.d.mts.map +1 -1
- package/dist/deploy/sniffer-hooks.mjs +10 -3
- package/dist/deploy/sniffer-hooks.mjs.map +1 -1
- package/dist/deploy/sniffer-loader.cjs +16 -7
- package/dist/deploy/sniffer-loader.cjs.map +1 -1
- package/dist/deploy/sniffer-loader.d.cts +1 -1
- package/dist/deploy/sniffer-loader.d.mts +1 -1
- package/dist/deploy/sniffer-loader.mjs +14 -3
- package/dist/deploy/sniffer-loader.mjs.map +1 -1
- package/dist/deploy/sniffer-routes-worker.cjs +11 -11
- package/dist/deploy/sniffer-routes-worker.cjs.map +1 -1
- package/dist/deploy/sniffer-routes-worker.d.cts +1 -1
- package/dist/deploy/sniffer-routes-worker.d.mts +1 -1
- package/dist/deploy/sniffer-routes-worker.mjs +4 -4
- package/dist/deploy/sniffer-routes-worker.mjs.map +1 -1
- package/dist/deploy/sniffer-worker.cjs +15 -6
- package/dist/deploy/sniffer-worker.cjs.map +1 -1
- package/dist/deploy/sniffer-worker.d.cts +1 -3
- package/dist/deploy/sniffer-worker.d.cts.map +1 -1
- package/dist/deploy/sniffer-worker.d.mts +1 -3
- package/dist/deploy/sniffer-worker.d.mts.map +1 -1
- package/dist/deploy/sniffer-worker.mjs +15 -4
- package/dist/deploy/sniffer-worker.mjs.map +1 -1
- package/dist/deploy-BMM2hx-K.cjs +2401 -0
- package/dist/deploy-BMM2hx-K.cjs.map +1 -0
- package/dist/deploy-D5YhwDng.mjs +2328 -0
- package/dist/deploy-D5YhwDng.mjs.map +1 -0
- package/dist/derive-B4vDpzgP.mjs +150 -0
- package/dist/derive-B4vDpzgP.mjs.map +1 -0
- package/dist/derive-DAbo49sm.cjs +161 -0
- package/dist/derive-DAbo49sm.cjs.map +1 -0
- package/dist/discover-C5roJuc9.mjs +560 -0
- package/dist/discover-C5roJuc9.mjs.map +1 -0
- package/dist/discover-CSW_BMWa.d.cts +125 -0
- package/dist/discover-CSW_BMWa.d.cts.map +1 -0
- package/dist/discover-DozUKs8f.cjs +639 -0
- package/dist/discover-DozUKs8f.cjs.map +1 -0
- package/dist/discover-xtT7fgWg.d.mts +125 -0
- package/dist/discover-xtT7fgWg.d.mts.map +1 -0
- package/dist/dns-BIYf20p7.cjs +1057 -0
- package/dist/dns-BIYf20p7.cjs.map +1 -0
- package/dist/dns-agf2VCdV.mjs +926 -0
- package/dist/dns-agf2VCdV.mjs.map +1 -0
- package/dist/dokploy-2p4PK6ej.mjs +38 -0
- package/dist/dokploy-2p4PK6ej.mjs.map +1 -0
- package/dist/dokploy-BANMTroy.cjs +38 -0
- package/dist/dokploy-BANMTroy.cjs.map +1 -0
- package/dist/drivers-BjGDYfnC.mjs +195 -0
- package/dist/drivers-BjGDYfnC.mjs.map +1 -0
- package/dist/drivers-DbjiYpW6.cjs +224 -0
- package/dist/drivers-DbjiYpW6.cjs.map +1 -0
- package/dist/eas-CNi16SoO.cjs +337 -0
- package/dist/eas-CNi16SoO.cjs.map +1 -0
- package/dist/eas-iT2JDHCh.mjs +334 -0
- package/dist/eas-iT2JDHCh.mjs.map +1 -0
- package/dist/{emit-CIlvnDvV.mjs → emit-C1e8qD08.mjs} +13 -26
- package/dist/emit-C1e8qD08.mjs.map +1 -0
- package/dist/{emit-CUD1BWls.cjs → emit-Dmc1nvdS.cjs} +31 -57
- package/dist/emit-Dmc1nvdS.cjs.map +1 -0
- package/dist/encryption-DkXVbyZc.mjs +89 -0
- package/dist/encryption-DkXVbyZc.mjs.map +1 -0
- package/dist/encryption-d2lLtkYx.cjs +90 -0
- package/dist/encryption-d2lLtkYx.cjs.map +1 -0
- package/dist/engine-CatKW6E-.mjs +3089 -0
- package/dist/engine-CatKW6E-.mjs.map +1 -0
- package/dist/engine-DlEHexED.cjs +3202 -0
- package/dist/engine-DlEHexED.cjs.map +1 -0
- package/dist/errors-D8Gwp5kU.mjs +23 -0
- package/dist/errors-D8Gwp5kU.mjs.map +1 -0
- package/dist/errors-DMC4Umsb.cjs +34 -0
- package/dist/errors-DMC4Umsb.cjs.map +1 -0
- package/dist/github-BAeaC1Pl.cjs +833 -0
- package/dist/github-BAeaC1Pl.cjs.map +1 -0
- package/dist/github-DErsqKGN.mjs +832 -0
- package/dist/github-DErsqKGN.mjs.map +1 -0
- package/dist/googlePlay-BVcfFWRO.cjs +931 -0
- package/dist/googlePlay-BVcfFWRO.cjs.map +1 -0
- package/dist/googlePlay-BXJ5ZjMK.mjs +931 -0
- package/dist/googlePlay-BXJ5ZjMK.mjs.map +1 -0
- package/dist/identity-CBXr4wNi.mjs +129 -0
- package/dist/identity-CBXr4wNi.mjs.map +1 -0
- package/dist/identity-CbLfgQNT.cjs +182 -0
- package/dist/identity-CbLfgQNT.cjs.map +1 -0
- package/dist/{index-BzJ7QJ9c.d.mts → index-8OfpOtSI.d.cts} +39 -20
- package/dist/index-8OfpOtSI.d.cts.map +1 -0
- package/dist/{index-CfMjtdVC.d.cts → index-Dpji6Bxq.d.mts} +39 -20
- package/dist/index-Dpji6Bxq.d.mts.map +1 -0
- package/dist/index.cjs +14291 -11898
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +13938 -11560
- package/dist/index.mjs.map +1 -1
- package/dist/local-BwC2v2Y8.mjs +224 -0
- package/dist/local-BwC2v2Y8.mjs.map +1 -0
- package/dist/local-DNhnkugT.cjs +241 -0
- package/dist/local-DNhnkugT.cjs.map +1 -0
- package/dist/migrate-Bb1MmGHl.mjs +181 -0
- package/dist/migrate-Bb1MmGHl.mjs.map +1 -0
- package/dist/migrate-D79GI0XM.cjs +271 -0
- package/dist/migrate-D79GI0XM.cjs.map +1 -0
- package/dist/migrate-L4a273dY.cjs +181 -0
- package/dist/migrate-L4a273dY.cjs.map +1 -0
- package/dist/migrate-s4QizIoM.mjs +266 -0
- package/dist/migrate-s4QizIoM.mjs.map +1 -0
- package/dist/openapi.cjs +214 -10
- package/dist/openapi.cjs.map +1 -0
- package/dist/openapi.d.cts +38 -17
- package/dist/openapi.d.cts.map +1 -1
- package/dist/openapi.d.mts +38 -17
- package/dist/openapi.d.mts.map +1 -1
- package/dist/openapi.mjs +208 -5
- package/dist/openapi.mjs.map +1 -0
- package/dist/projectBucket-BBbQ1lHF.cjs +263 -0
- package/dist/projectBucket-BBbQ1lHF.cjs.map +1 -0
- package/dist/projectBucket-C_DN4WzF.mjs +222 -0
- package/dist/projectBucket-C_DN4WzF.mjs.map +1 -0
- package/dist/provider-BqpjG9QM.cjs +57 -0
- package/dist/provider-BqpjG9QM.cjs.map +1 -0
- package/dist/provider-CEOKk8NS.mjs +46 -0
- package/dist/provider-CEOKk8NS.mjs.map +1 -0
- package/dist/publish-CcTlmJT6.mjs +123 -0
- package/dist/publish-CcTlmJT6.mjs.map +1 -0
- package/dist/publish-ydscCYsW.cjs +124 -0
- package/dist/publish-ydscCYsW.cjs.map +1 -0
- package/dist/ready-BFFP838V.cjs +404 -0
- package/dist/ready-BFFP838V.cjs.map +1 -0
- package/dist/ready-BOfogqzr.mjs +375 -0
- package/dist/ready-BOfogqzr.mjs.map +1 -0
- package/dist/reconcile/public.cjs +3 -5
- package/dist/reconcile/public.d.cts +11 -87
- package/dist/reconcile/public.d.cts.map +1 -1
- package/dist/reconcile/public.d.mts +11 -87
- package/dist/reconcile/public.d.mts.map +1 -1
- package/dist/reconcile/public.mjs +3 -4
- package/dist/{reconcile-BI0tWkwz.mjs → reconcile--I7V4Klj.mjs} +4 -7
- package/dist/reconcile--I7V4Klj.mjs.map +1 -0
- package/dist/{reconcile-Bhw5fmKu.cjs → reconcile-CuCQBa5-.cjs} +5 -8
- package/dist/reconcile-CuCQBa5-.cjs.map +1 -0
- package/dist/resolve-BLp2trep.mjs +263 -0
- package/dist/resolve-BLp2trep.mjs.map +1 -0
- package/dist/resolve-BgL-brF9.cjs +316 -0
- package/dist/resolve-BgL-brF9.cjs.map +1 -0
- package/dist/rollback-2cyLXEH1.cjs +165 -0
- package/dist/rollback-2cyLXEH1.cjs.map +1 -0
- package/dist/rollback-DwqZ8zzj.mjs +136 -0
- package/dist/rollback-DwqZ8zzj.mjs.map +1 -0
- package/dist/rolldown-runtime-BhDjJH2R.mjs +15 -0
- package/dist/{chunk-CUT6urMc.cjs → rolldown-runtime-C0BPl7ul.cjs} +23 -10
- package/dist/run-BJLIerMM.mjs +133 -0
- package/dist/run-BJLIerMM.mjs.map +1 -0
- package/dist/run-fVZ-rLnc.cjs +174 -0
- package/dist/run-fVZ-rLnc.cjs.map +1 -0
- package/dist/runtime-ACdfK59n.d.cts +82 -0
- package/dist/runtime-ACdfK59n.d.cts.map +1 -0
- package/dist/runtime-YyQuekxi.d.mts +82 -0
- package/dist/runtime-YyQuekxi.d.mts.map +1 -0
- package/dist/s3-CrPoA89T.cjs +215 -0
- package/dist/s3-CrPoA89T.cjs.map +1 -0
- package/dist/s3-DQXZdmCM.mjs +215 -0
- package/dist/s3-DQXZdmCM.mjs.map +1 -0
- package/dist/sandbox/config-worker.cjs +43 -0
- package/dist/sandbox/config-worker.cjs.map +1 -0
- package/dist/sandbox/config-worker.d.cts +1 -0
- package/dist/sandbox/config-worker.d.mts +1 -0
- package/dist/sandbox/config-worker.mjs +44 -0
- package/dist/sandbox/config-worker.mjs.map +1 -0
- package/dist/sandbox/credentials-worker.cjs +54 -0
- package/dist/sandbox/credentials-worker.cjs.map +1 -0
- package/dist/sandbox/credentials-worker.d.cts +1 -0
- package/dist/sandbox/credentials-worker.d.mts +1 -0
- package/dist/sandbox/credentials-worker.mjs +55 -0
- package/dist/sandbox/credentials-worker.mjs.map +1 -0
- package/dist/sandbox/discover-worker.cjs +50 -0
- package/dist/sandbox/discover-worker.cjs.map +1 -0
- package/dist/sandbox/discover-worker.d.cts +1 -0
- package/dist/sandbox/discover-worker.d.mts +1 -0
- package/dist/sandbox/discover-worker.mjs +51 -0
- package/dist/sandbox/discover-worker.mjs.map +1 -0
- package/dist/sandbox/migrate-worker.cjs +75 -0
- package/dist/sandbox/migrate-worker.cjs.map +1 -0
- package/dist/sandbox/migrate-worker.d.cts +1 -0
- package/dist/sandbox/migrate-worker.d.mts +1 -0
- package/dist/sandbox/migrate-worker.mjs +76 -0
- package/dist/sandbox/migrate-worker.mjs.map +1 -0
- package/dist/sandbox-C4g1eG31.d.mts +104 -0
- package/dist/sandbox-C4g1eG31.d.mts.map +1 -0
- package/dist/sandbox-CHv3OYXg.cjs +165 -0
- package/dist/sandbox-CHv3OYXg.cjs.map +1 -0
- package/dist/sandbox-CbVB7uOD.mjs +118 -0
- package/dist/sandbox-CbVB7uOD.mjs.map +1 -0
- package/dist/sandbox-CdKgQ3XU.d.cts +104 -0
- package/dist/sandbox-CdKgQ3XU.d.cts.map +1 -0
- package/dist/{workspace-DPV7FtAv.cjs → schemas-BCwKKA42.mjs} +958 -1816
- package/dist/schemas-BCwKKA42.mjs.map +1 -0
- package/dist/{workspace-CtnZnWsa.mjs → schemas-BQ_v0lEX.cjs} +1048 -1626
- package/dist/schemas-BQ_v0lEX.cjs.map +1 -0
- package/dist/secretsManager-CQORubp9.mjs +97 -0
- package/dist/secretsManager-CQORubp9.mjs.map +1 -0
- package/dist/secretsManager-RAGcEDX1.cjs +108 -0
- package/dist/secretsManager-RAGcEDX1.cjs.map +1 -0
- package/dist/seeds-C2w4UqVP.cjs +9347 -0
- package/dist/seeds-C2w4UqVP.cjs.map +1 -0
- package/dist/seeds-Cwtv-U9-.mjs +8350 -0
- package/dist/seeds-Cwtv-U9-.mjs.map +1 -0
- package/dist/serverSetup-BdFOD93s.cjs +631 -0
- package/dist/serverSetup-BdFOD93s.cjs.map +1 -0
- package/dist/serverSetup-utKsoyGH.mjs +631 -0
- package/dist/serverSetup-utKsoyGH.mjs.map +1 -0
- package/dist/sniffer-8C4q6Szd.mjs +1825 -0
- package/dist/sniffer-8C4q6Szd.mjs.map +1 -0
- package/dist/sniffer-CF7wNxMo.cjs +1998 -0
- package/dist/sniffer-CF7wNxMo.cjs.map +1 -0
- package/dist/sst-B-Uz4cvm.cjs +464 -0
- package/dist/sst-B-Uz4cvm.cjs.map +1 -0
- package/dist/sst-C1pxbFEd.mjs +441 -0
- package/dist/sst-C1pxbFEd.mjs.map +1 -0
- package/dist/stage-BvM_u2z4.mjs +302 -0
- package/dist/stage-BvM_u2z4.mjs.map +1 -0
- package/dist/stage-DEQJGW3r.cjs +313 -0
- package/dist/stage-DEQJGW3r.cjs.map +1 -0
- package/dist/stages-Cb9rqRbN.mjs +190 -0
- package/dist/stages-Cb9rqRbN.mjs.map +1 -0
- package/dist/stages-D4SnG5yl.cjs +190 -0
- package/dist/stages-D4SnG5yl.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-CW_dWeTe.mjs +85 -0
- package/dist/terminal-CW_dWeTe.mjs.map +1 -0
- package/dist/terminal-DJlqcW_U.cjs +85 -0
- package/dist/terminal-DJlqcW_U.cjs.map +1 -0
- package/dist/types-B6UXlEkf.d.cts +7650 -0
- package/dist/types-B6UXlEkf.d.cts.map +1 -0
- package/dist/types-HqVPddRK.d.mts +7649 -0
- package/dist/types-HqVPddRK.d.mts.map +1 -0
- package/dist/utils-D2Nk1Nv2.cjs +205 -0
- package/dist/utils-D2Nk1Nv2.cjs.map +1 -0
- package/dist/utils-D_fxUqvU.mjs +156 -0
- package/dist/utils-D_fxUqvU.mjs.map +1 -0
- package/dist/vitest.cjs +65 -0
- package/dist/vitest.cjs.map +1 -0
- package/dist/vitest.d.cts +29 -0
- package/dist/vitest.d.cts.map +1 -0
- package/dist/vitest.d.mts +29 -0
- package/dist/vitest.d.mts.map +1 -0
- package/dist/vitest.mjs +65 -0
- package/dist/vitest.mjs.map +1 -0
- package/dist/workerRuntime-BXfhbe13.cjs +108 -0
- package/dist/workerRuntime-BXfhbe13.cjs.map +1 -0
- package/dist/workerRuntime-CsOyBRx2.mjs +79 -0
- package/dist/workerRuntime-CsOyBRx2.mjs.map +1 -0
- package/dist/workspace/index.cjs +8 -4
- package/dist/workspace/index.d.cts +3 -3
- package/dist/workspace/index.d.mts +3 -3
- package/dist/workspace/index.mjs +2 -3
- package/dist/workspace-BwqQnool.cjs +2806 -0
- package/dist/workspace-BwqQnool.cjs.map +1 -0
- package/dist/workspace-D1QbNd55.mjs +2394 -0
- package/dist/workspace-D1QbNd55.mjs.map +1 -0
- package/package.json +54 -22
- package/dist/CachedStateProvider-BEBl2wQT.cjs +0 -60
- package/dist/CachedStateProvider-BEBl2wQT.cjs.map +0 -1
- package/dist/CachedStateProvider-C-8wtlto.mjs +0 -3
- package/dist/CachedStateProvider-Co4n5Wvs.mjs +0 -54
- package/dist/CachedStateProvider-Co4n5Wvs.mjs.map +0 -1
- package/dist/CachedStateProvider-DqhGpzsm.cjs +0 -3
- package/dist/HostingerProvider-BOvsgATO.cjs.map +0 -1
- package/dist/HostingerProvider-BcyFRbqV.mjs.map +0 -1
- package/dist/LocalStateProvider-Bq-0C0sg.mjs +0 -42
- package/dist/LocalStateProvider-Bq-0C0sg.mjs.map +0 -1
- package/dist/LocalStateProvider-yjXZXZDM.cjs +0 -43
- package/dist/LocalStateProvider-yjXZXZDM.cjs.map +0 -1
- package/dist/Route53Provider-C0xmer8U.mjs.map +0 -1
- package/dist/Route53Provider-CH9XH7bz.cjs.map +0 -1
- package/dist/SSMStateProvider-CXtNgPfy.cjs +0 -66
- package/dist/SSMStateProvider-CXtNgPfy.cjs.map +0 -1
- package/dist/SSMStateProvider-DOZifZfE.mjs +0 -66
- package/dist/SSMStateProvider-DOZifZfE.mjs.map +0 -1
- package/dist/backup-provisioner-DXXg6FIL.mjs.map +0 -1
- package/dist/backup-provisioner-cE2PuCTb.cjs.map +0 -1
- package/dist/bundler-BMekgx7a.cjs.map +0 -1
- package/dist/bundler-Bux2iF-v.mjs.map +0 -1
- package/dist/chunk-Duj1WY3L.mjs +0 -7
- package/dist/config-DTsVjKZD.mjs +0 -402
- package/dist/config-DTsVjKZD.mjs.map +0 -1
- package/dist/config-RYR9j6EF.cjs +0 -462
- package/dist/config-RYR9j6EF.cjs.map +0 -1
- package/dist/config.d.cts.map +0 -1
- package/dist/config.d.mts.map +0 -1
- package/dist/credentials-B5zRHdAl.mjs +0 -141
- package/dist/credentials-B5zRHdAl.mjs.map +0 -1
- package/dist/credentials-BapzjyV5.cjs +0 -195
- package/dist/credentials-BapzjyV5.cjs.map +0 -1
- package/dist/credentials-DQRvPz2S.cjs +0 -2769
- package/dist/credentials-DQRvPz2S.cjs.map +0 -1
- package/dist/credentials-jMJC63qs.mjs +0 -2625
- package/dist/credentials-jMJC63qs.mjs.map +0 -1
- package/dist/discover-BYHQwQqu.mjs +0 -242
- package/dist/discover-BYHQwQqu.mjs.map +0 -1
- package/dist/discover-DmW9Bscc.cjs +0 -290
- package/dist/discover-DmW9Bscc.cjs.map +0 -1
- package/dist/dokploy-api-5cK2InBm.cjs +0 -3
- package/dist/dokploy-api-D2Ny4Jrc.mjs +0 -3
- package/dist/dokploy-api-pdaBryoY.mjs +0 -706
- package/dist/dokploy-api-pdaBryoY.mjs.map +0 -1
- package/dist/dokploy-api-zqKe9lHH.cjs +0 -718
- package/dist/dokploy-api-zqKe9lHH.cjs.map +0 -1
- package/dist/emit-CIlvnDvV.mjs.map +0 -1
- package/dist/emit-CUD1BWls.cjs.map +0 -1
- package/dist/encryption-D2pL3tHH.cjs +0 -54
- package/dist/encryption-D2pL3tHH.cjs.map +0 -1
- package/dist/encryption-YDsXXi6w.mjs +0 -3
- package/dist/encryption-_4zwjOAR.mjs +0 -42
- package/dist/encryption-_4zwjOAR.mjs.map +0 -1
- package/dist/encryption-sQ2Oxx0d.cjs +0 -4
- package/dist/fullstack-secrets-B6KBHf-g.mjs +0 -87
- package/dist/fullstack-secrets-B6KBHf-g.mjs.map +0 -1
- package/dist/fullstack-secrets-DL8v0y4D.cjs +0 -99
- package/dist/fullstack-secrets-DL8v0y4D.cjs.map +0 -1
- package/dist/generator-CNzBw7g5.cjs +0 -289
- package/dist/generator-CNzBw7g5.cjs.map +0 -1
- package/dist/generator-VE2JrFlY.mjs +0 -253
- package/dist/generator-VE2JrFlY.mjs.map +0 -1
- package/dist/github-BThvbf2W.cjs +0 -197
- package/dist/github-BThvbf2W.cjs.map +0 -1
- package/dist/github-DpMZurEK.mjs +0 -196
- package/dist/github-DpMZurEK.mjs.map +0 -1
- package/dist/index-BzJ7QJ9c.d.mts.map +0 -1
- package/dist/index-CfMjtdVC.d.cts.map +0 -1
- package/dist/keystore-C9rint2E.cjs +0 -101
- package/dist/keystore-C9rint2E.cjs.map +0 -1
- package/dist/keystore-TxeYM7an.mjs +0 -83
- package/dist/keystore-TxeYM7an.mjs.map +0 -1
- package/dist/openapi-Bs3-5q_r.mjs +0 -2021
- package/dist/openapi-Bs3-5q_r.mjs.map +0 -1
- package/dist/openapi-DWLTsYLL.cjs +0 -2075
- package/dist/openapi-DWLTsYLL.cjs.map +0 -1
- package/dist/openapi-react-query-Byltvm_7.mjs +0 -167
- package/dist/openapi-react-query-Byltvm_7.mjs.map +0 -1
- package/dist/openapi-react-query-CmJ1xDbn.cjs +0 -173
- package/dist/openapi-react-query-CmJ1xDbn.cjs.map +0 -1
- package/dist/openapi-react-query.cjs +0 -4
- package/dist/openapi-react-query.d.cts +0 -11
- package/dist/openapi-react-query.d.cts.map +0 -1
- package/dist/openapi-react-query.d.mts +0 -11
- package/dist/openapi-react-query.d.mts.map +0 -1
- package/dist/openapi-react-query.mjs +0 -4
- package/dist/reconcile-BI0tWkwz.mjs.map +0 -1
- package/dist/reconcile-Bhw5fmKu.cjs.map +0 -1
- package/dist/setup-BmLoNrDX.mjs +0 -12
- package/dist/setup-BrR1_xGy.cjs +0 -12
- package/dist/setup-BsNR2LBG.cjs +0 -467
- package/dist/setup-BsNR2LBG.cjs.map +0 -1
- package/dist/setup-D5-JMknk.mjs +0 -437
- package/dist/setup-D5-JMknk.mjs.map +0 -1
- package/dist/storage-B020InPW.mjs +0 -222
- package/dist/storage-B020InPW.mjs.map +0 -1
- package/dist/storage-CSNplaJn.cjs +0 -282
- package/dist/storage-CSNplaJn.cjs.map +0 -1
- package/dist/storage-DGBzMLZa.mjs +0 -4
- package/dist/storage-DlVol_oj.cjs +0 -8
- package/dist/sync-0ILCb-1S.cjs +0 -93
- package/dist/sync-0ILCb-1S.cjs.map +0 -1
- package/dist/sync-CzHXiR9c.mjs +0 -76
- package/dist/sync-CzHXiR9c.mjs.map +0 -1
- package/dist/sync-DYENfOt4.cjs +0 -4
- package/dist/sync-HAau6h_R.mjs +0 -3
- package/dist/types-DVIx8I1N.d.mts +0 -1950
- package/dist/types-DVIx8I1N.d.mts.map +0 -1
- package/dist/types-PMP_qXRY.d.cts +0 -1950
- package/dist/types-PMP_qXRY.d.cts.map +0 -1
- package/dist/workspace-Cji6lE8E.cjs +0 -10
- package/dist/workspace-CkJAtRIX.mjs +0 -9
- package/dist/workspace-CtnZnWsa.mjs.map +0 -1
- package/dist/workspace-DPV7FtAv.cjs.map +0 -1
|
@@ -1,61 +1,10 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const node_path = require_chunk.__toESM(require("node:path"));
|
|
3
|
-
|
|
4
|
-
//#region src/workspace/publicEnv.ts
|
|
5
|
-
/**
|
|
6
|
-
* All public env-var prefixes the toolbox understands.
|
|
7
|
-
*
|
|
8
|
-
* Used when resolving incoming var names back to a dependency
|
|
9
|
-
* (e.g. `VITE_AUTH_URL` → `auth`). A var matching any of these
|
|
10
|
-
* is considered safe to inline into a client bundle.
|
|
11
|
-
*/
|
|
12
|
-
const PUBLIC_ENV_PREFIXES = [
|
|
13
|
-
"NEXT_PUBLIC_",
|
|
14
|
-
"VITE_",
|
|
15
|
-
"EXPO_PUBLIC_"
|
|
16
|
-
];
|
|
17
|
-
/**
|
|
18
|
-
* Resolve the public env-var prefix that a frontend framework's bundler
|
|
19
|
-
* inlines into client code at build time:
|
|
20
|
-
*
|
|
21
|
-
* - `nextjs` → `NEXT_PUBLIC_`
|
|
22
|
-
* - `vite` → `VITE_`
|
|
23
|
-
* - `tanstack-start` → `VITE_` (uses Vite under the hood)
|
|
24
|
-
* - `expo` → `EXPO_PUBLIC_`
|
|
25
|
-
* - `remix` → `''` (Remix exposes via loaders, no prefix convention)
|
|
26
|
-
*
|
|
27
|
-
* For backend frameworks or unspecified, falls back to `NEXT_PUBLIC_` to
|
|
28
|
-
* preserve the historical default. Backend apps never read these vars
|
|
29
|
-
* from a bundle, so the prefix only affects scaffolding/symmetry.
|
|
30
|
-
*/
|
|
31
|
-
function getPublicEnvPrefix(framework) {
|
|
32
|
-
switch (framework) {
|
|
33
|
-
case "vite":
|
|
34
|
-
case "tanstack-start": return "VITE_";
|
|
35
|
-
case "expo": return "EXPO_PUBLIC_";
|
|
36
|
-
case "remix": return "";
|
|
37
|
-
case "nextjs": return "NEXT_PUBLIC_";
|
|
38
|
-
default: return "NEXT_PUBLIC_";
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Strip a known public prefix from a var name.
|
|
43
|
-
* Returns the un-prefixed name, or `null` if no prefix matched.
|
|
44
|
-
*/
|
|
45
|
-
function stripPublicPrefix(name) {
|
|
46
|
-
for (const prefix of PUBLIC_ENV_PREFIXES) if (prefix && name.startsWith(prefix)) return name.slice(prefix.length);
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
//#endregion
|
|
51
1
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js
|
|
52
2
|
function getEnumValues(entries) {
|
|
53
3
|
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
|
|
54
|
-
|
|
55
|
-
return values;
|
|
4
|
+
return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
|
|
56
5
|
}
|
|
57
|
-
function joinValues(array
|
|
58
|
-
return array
|
|
6
|
+
function joinValues(array, separator = "|") {
|
|
7
|
+
return array.map((val) => stringifyPrimitive(val)).join(separator);
|
|
59
8
|
}
|
|
60
9
|
function jsonStringifyReplacer(_, value) {
|
|
61
10
|
if (typeof value === "bigint") return value.toString();
|
|
@@ -93,6 +42,24 @@ function floatSafeRemainder(val, step) {
|
|
|
93
42
|
if (Math.abs(ratio - roundedRatio) < tolerance) return 0;
|
|
94
43
|
return ratio - roundedRatio;
|
|
95
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
|
+
}
|
|
96
63
|
function assignProp(target, prop, value) {
|
|
97
64
|
Object.defineProperty(target, prop, {
|
|
98
65
|
value,
|
|
@@ -171,12 +138,11 @@ const captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace
|
|
|
171
138
|
function isObject(data) {
|
|
172
139
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
173
140
|
}
|
|
174
|
-
const allowsEval = /* @__PURE__
|
|
141
|
+
const allowsEval = /* @__PURE__*/ cached(() => {
|
|
175
142
|
if (globalConfig.jitless) return false;
|
|
176
143
|
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) return false;
|
|
177
144
|
try {
|
|
178
|
-
|
|
179
|
-
new F("");
|
|
145
|
+
new Function("");
|
|
180
146
|
return true;
|
|
181
147
|
} catch (_) {
|
|
182
148
|
return false;
|
|
@@ -199,7 +165,7 @@ function shallowClone(o) {
|
|
|
199
165
|
if (o instanceof Set) return new Set(o);
|
|
200
166
|
return o;
|
|
201
167
|
}
|
|
202
|
-
const propertyKeyTypes = /* @__PURE__
|
|
168
|
+
const propertyKeyTypes = /* @__PURE__*/ new Set([
|
|
203
169
|
"string",
|
|
204
170
|
"number",
|
|
205
171
|
"symbol"
|
|
@@ -237,7 +203,7 @@ function optionalKeys(shape) {
|
|
|
237
203
|
return shape[k]._zod.optin !== void 0 && shape[k]._zod.optout === "optional";
|
|
238
204
|
});
|
|
239
205
|
}
|
|
240
|
-
const NUMBER_FORMAT_RANGES =
|
|
206
|
+
const NUMBER_FORMAT_RANGES = /*@__PURE__*/ (() => ({
|
|
241
207
|
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
242
208
|
int32: [-2147483648, 2147483647],
|
|
243
209
|
uint32: [0, 4294967295],
|
|
@@ -245,14 +211,13 @@ const NUMBER_FORMAT_RANGES = /* @__PURE__ */ (() => ({
|
|
|
245
211
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
246
212
|
}))();
|
|
247
213
|
const BIGINT_FORMAT_RANGES = {
|
|
248
|
-
int64: [/* @__PURE__
|
|
249
|
-
uint64: [/* @__PURE__
|
|
214
|
+
int64: [/* @__PURE__*/ BigInt("-9223372036854775808"), /* @__PURE__*/ BigInt("9223372036854775807")],
|
|
215
|
+
uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt("18446744073709551615")]
|
|
250
216
|
};
|
|
251
217
|
function pick(schema, mask) {
|
|
252
218
|
const currDef = schema._zod.def;
|
|
253
219
|
const checks = currDef.checks;
|
|
254
|
-
|
|
255
|
-
if (hasChecks) throw new Error(".pick() cannot be used on object schemas containing refinements");
|
|
220
|
+
if (checks && checks.length > 0) throw new Error(".pick() cannot be used on object schemas containing refinements");
|
|
256
221
|
const newShape = {};
|
|
257
222
|
mirrorShape(newShape, schema, maskedKeys(schema, mask));
|
|
258
223
|
return clone(schema, mergeDefs(currDef, {
|
|
@@ -272,8 +237,7 @@ function maskedKeys(schema, mask) {
|
|
|
272
237
|
function omit(schema, mask) {
|
|
273
238
|
const currDef = schema._zod.def;
|
|
274
239
|
const checks = currDef.checks;
|
|
275
|
-
|
|
276
|
-
if (hasChecks) throw new Error(".omit() cannot be used on object schemas containing refinements");
|
|
240
|
+
if (checks && checks.length > 0) throw new Error(".omit() cannot be used on object schemas containing refinements");
|
|
277
241
|
const omitted = new Set(maskedKeys(schema, mask));
|
|
278
242
|
const newShape = {};
|
|
279
243
|
mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)).filter((key) => !omitted.has(key)));
|
|
@@ -285,8 +249,7 @@ function omit(schema, mask) {
|
|
|
285
249
|
function extend(schema, shape) {
|
|
286
250
|
if (!isPlainObject(shape)) throw new Error("Invalid input to extend: expected a plain object");
|
|
287
251
|
const checks = schema._zod.def.checks;
|
|
288
|
-
|
|
289
|
-
if (hasChecks) {
|
|
252
|
+
if (checks && checks.length > 0) {
|
|
290
253
|
const existingShape = sourceShape(schema);
|
|
291
254
|
for (const key of Reflect.ownKeys(shape)) if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
|
|
292
255
|
}
|
|
@@ -308,20 +271,17 @@ function merge(a, b) {
|
|
|
308
271
|
const newShape = {};
|
|
309
272
|
mirrorShape(newShape, a, Reflect.ownKeys(sourceShape(a)));
|
|
310
273
|
mirrorShape(newShape, b, Reflect.ownKeys(sourceShape(b)));
|
|
311
|
-
|
|
274
|
+
return clone(a, mergeDefs(a._zod.def, {
|
|
312
275
|
shape: newShape,
|
|
313
276
|
get catchall() {
|
|
314
277
|
return b._zod.def.catchall;
|
|
315
278
|
},
|
|
316
279
|
checks: b._zod.def.checks ?? []
|
|
317
|
-
});
|
|
318
|
-
return clone(a, def);
|
|
280
|
+
}));
|
|
319
281
|
}
|
|
320
282
|
function partial(Class, schema, mask, name = "partial") {
|
|
321
|
-
const
|
|
322
|
-
|
|
323
|
-
const hasChecks = checks && checks.length > 0;
|
|
324
|
-
if (hasChecks) throw new Error(`.${name}() cannot be used on object schemas containing refinements`);
|
|
283
|
+
const checks = schema._zod.def.checks;
|
|
284
|
+
if (checks && checks.length > 0) throw new Error(`.${name}() cannot be used on object schemas containing refinements`);
|
|
325
285
|
const selected = mask ? new Set(maskedKeys(schema, mask)) : void 0;
|
|
326
286
|
const newShape = {};
|
|
327
287
|
mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), Class && ((value, key) => selected && !selected.has(key) ? value : new Class({
|
|
@@ -354,8 +314,8 @@ function explicitlyAborted(x, startIndex = 0) {
|
|
|
354
314
|
}
|
|
355
315
|
function prefixIssues(path, issues) {
|
|
356
316
|
return issues.map((iss) => {
|
|
357
|
-
var _a
|
|
358
|
-
(_a
|
|
317
|
+
var _a;
|
|
318
|
+
(_a = iss).path ?? (_a.path = []);
|
|
359
319
|
iss.path.unshift(path);
|
|
360
320
|
return iss;
|
|
361
321
|
});
|
|
@@ -364,16 +324,18 @@ function unwrapMessage(message) {
|
|
|
364
324
|
return typeof message === "string" ? message : message?.message;
|
|
365
325
|
}
|
|
366
326
|
function attachSchema(issues, start, inst) {
|
|
367
|
-
var _a
|
|
368
|
-
for (let i = start; i < issues.length; i++) (_a
|
|
327
|
+
var _a;
|
|
328
|
+
for (let i = start; i < issues.length; i++) (_a = issues[i]).schema ?? (_a.schema = inst);
|
|
369
329
|
}
|
|
370
|
-
function finalizeIssue(iss, ctx, config
|
|
371
|
-
var _a
|
|
330
|
+
function finalizeIssue(iss, ctx, config) {
|
|
331
|
+
var _a;
|
|
372
332
|
const traits = iss.inst?._zod?.traits;
|
|
373
|
-
if (traits?.has("$ZodType"))
|
|
374
|
-
|
|
333
|
+
if (traits?.has("$ZodType")) {
|
|
334
|
+
if (traits.has("$ZodCheck")) (_a = iss).schema ?? (_a.schema = iss.inst);
|
|
335
|
+
else iss.schema = iss.inst;
|
|
336
|
+
}
|
|
375
337
|
const schemaError = iss.schema !== iss.inst ? iss.schema?._zod.def?.error : void 0;
|
|
376
|
-
const message = iss.message ? iss.message : unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(schemaError?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config
|
|
338
|
+
const message = iss.message ? iss.message : unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(schemaError?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config.customError?.(iss)) ?? unwrapMessage(config.localeError?.(iss)) ?? "Invalid input";
|
|
377
339
|
const full = {};
|
|
378
340
|
for (const k of Object.keys(iss)) {
|
|
379
341
|
if (k === "inst" || k === "schema" || k === "continue" || k === "input" || k === "__proto__") continue;
|
|
@@ -491,7 +453,6 @@ const breaker = {
|
|
|
491
453
|
configurable: true,
|
|
492
454
|
get() {
|
|
493
455
|
broke = true;
|
|
494
|
-
return void 0;
|
|
495
456
|
}
|
|
496
457
|
};
|
|
497
458
|
/**
|
|
@@ -577,7 +538,6 @@ function constantCatch(value) {
|
|
|
577
538
|
fn[CONSTANT_CATCH] = true;
|
|
578
539
|
return fn;
|
|
579
540
|
}
|
|
580
|
-
|
|
581
541
|
//#endregion
|
|
582
542
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/core.js
|
|
583
543
|
var _a$1;
|
|
@@ -606,7 +566,7 @@ function newError(Definition) {
|
|
|
606
566
|
}
|
|
607
567
|
return new Definition();
|
|
608
568
|
}
|
|
609
|
-
function $constructor(name, initializer
|
|
569
|
+
function $constructor(name, initializer, proto, params) {
|
|
610
570
|
const zodProto = {};
|
|
611
571
|
function Internals(def) {
|
|
612
572
|
this.def = def;
|
|
@@ -626,22 +586,22 @@ function $constructor(name, initializer$2, proto, params) {
|
|
|
626
586
|
}
|
|
627
587
|
} else if (inst._zod.traits.has(name)) return;
|
|
628
588
|
inst._zod.traits.add(name);
|
|
629
|
-
initializer
|
|
589
|
+
initializer(inst, def);
|
|
630
590
|
if (initialized) {
|
|
631
|
-
const own
|
|
591
|
+
const own = Object.getPrototypeOf(inst);
|
|
632
592
|
const ctorProto = inst._zod.constr.prototype;
|
|
633
|
-
let up = own
|
|
593
|
+
let up = own;
|
|
634
594
|
while (up && up !== ctorProto) up = Object.getPrototypeOf(up);
|
|
635
|
-
const target = up ?? own
|
|
595
|
+
const target = up ?? own;
|
|
636
596
|
if (!initialized.has(target)) {
|
|
637
597
|
initialized.add(target);
|
|
638
598
|
members(target, protoMembers);
|
|
639
599
|
}
|
|
640
600
|
}
|
|
641
|
-
const proto
|
|
642
|
-
for (const k in proto
|
|
643
|
-
if (!Object.prototype.hasOwnProperty.call(proto
|
|
644
|
-
if (!(k in inst)) inst[k] = proto
|
|
601
|
+
const proto = _.prototype;
|
|
602
|
+
for (const k in proto) {
|
|
603
|
+
if (!Object.prototype.hasOwnProperty.call(proto, k)) continue;
|
|
604
|
+
if (!(k in inst)) inst[k] = proto[k].bind(inst);
|
|
645
605
|
}
|
|
646
606
|
}
|
|
647
607
|
const Parent = params?.Parent ?? Object;
|
|
@@ -684,7 +644,6 @@ function config(newConfig) {
|
|
|
684
644
|
if (newConfig) Object.assign(globalConfig, newConfig);
|
|
685
645
|
return globalConfig;
|
|
686
646
|
}
|
|
687
|
-
|
|
688
647
|
//#endregion
|
|
689
648
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/errors.js
|
|
690
649
|
function _getMessage() {
|
|
@@ -738,39 +697,41 @@ const initializer$1 = (inst, def) => {
|
|
|
738
697
|
}
|
|
739
698
|
};
|
|
740
699
|
const $ZodError = $constructor("$ZodError", initializer$1);
|
|
741
|
-
|
|
700
|
+
$constructor("$ZodError", initializer$1, void 0, { Parent: Error });
|
|
742
701
|
/** Get-or-create `obj[key]` as an own data property. A path segment naming an inherited member
|
|
743
702
|
* ("toString", "constructor") would otherwise read through to the prototype, and assigning
|
|
744
703
|
* "__proto__" would hit the setter instead of creating a key. */
|
|
745
704
|
function node(obj, key, make) {
|
|
746
|
-
if (!Object.prototype.hasOwnProperty.call(obj, key))
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
705
|
+
if (!Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
706
|
+
if (key === "__proto__") Object.defineProperty(obj, key, {
|
|
707
|
+
value: make(),
|
|
708
|
+
writable: true,
|
|
709
|
+
enumerable: true,
|
|
710
|
+
configurable: true
|
|
711
|
+
});
|
|
712
|
+
else obj[key] = make();
|
|
713
|
+
}
|
|
753
714
|
return obj[key];
|
|
754
715
|
}
|
|
755
|
-
function flattenError(error
|
|
716
|
+
function flattenError(error, mapper = (issue) => issue.message) {
|
|
756
717
|
const fieldErrors = {};
|
|
757
718
|
const formErrors = [];
|
|
758
|
-
for (const sub of error
|
|
719
|
+
for (const sub of error.issues) if (sub.path.length > 0) node(fieldErrors, sub.path[0], () => []).push(mapper(sub));
|
|
759
720
|
else formErrors.push(mapper(sub));
|
|
760
721
|
return {
|
|
761
722
|
formErrors,
|
|
762
723
|
fieldErrors
|
|
763
724
|
};
|
|
764
725
|
}
|
|
765
|
-
function formatError(error
|
|
726
|
+
function formatError(error, mapper = (issue) => issue.message) {
|
|
766
727
|
const fieldErrors = { _errors: [] };
|
|
767
|
-
const processError = (error
|
|
768
|
-
for (const issue
|
|
769
|
-
else if (issue
|
|
770
|
-
else if (issue
|
|
728
|
+
const processError = (error, path = []) => {
|
|
729
|
+
for (const issue of error.issues) if (issue.code === "invalid_union" && issue.errors.length) issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));
|
|
730
|
+
else if (issue.code === "invalid_key") processError({ issues: issue.issues }, [...path, ...issue.path]);
|
|
731
|
+
else if (issue.code === "invalid_element") processError({ issues: issue.issues }, [...path, ...issue.path]);
|
|
771
732
|
else {
|
|
772
|
-
const fullpath = [...path, ...issue
|
|
773
|
-
if (fullpath.length === 0) fieldErrors._errors.push(mapper(issue
|
|
733
|
+
const fullpath = [...path, ...issue.path];
|
|
734
|
+
if (fullpath.length === 0) fieldErrors._errors.push(mapper(issue));
|
|
774
735
|
else {
|
|
775
736
|
let curr = fieldErrors;
|
|
776
737
|
let i = 0;
|
|
@@ -778,7 +739,7 @@ function formatError(error$1, mapper = (issue$1) => issue$1.message) {
|
|
|
778
739
|
const el = fullpath[i];
|
|
779
740
|
const terminal = i === fullpath.length - 1;
|
|
780
741
|
if (el === "_errors") {
|
|
781
|
-
if (terminal) curr._errors.push(mapper(issue
|
|
742
|
+
if (terminal) curr._errors.push(mapper(issue));
|
|
782
743
|
i++;
|
|
783
744
|
continue;
|
|
784
745
|
}
|
|
@@ -788,18 +749,17 @@ function formatError(error$1, mapper = (issue$1) => issue$1.message) {
|
|
|
788
749
|
writable: true,
|
|
789
750
|
configurable: true
|
|
790
751
|
});
|
|
791
|
-
const node
|
|
792
|
-
if (terminal) node
|
|
793
|
-
curr = node
|
|
752
|
+
const node = curr[el];
|
|
753
|
+
if (terminal) node._errors.push(mapper(issue));
|
|
754
|
+
curr = node;
|
|
794
755
|
i++;
|
|
795
756
|
}
|
|
796
757
|
}
|
|
797
758
|
}
|
|
798
759
|
};
|
|
799
|
-
processError(error
|
|
760
|
+
processError(error);
|
|
800
761
|
return fieldErrors;
|
|
801
762
|
}
|
|
802
|
-
|
|
803
763
|
//#endregion
|
|
804
764
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/parse.js
|
|
805
765
|
function finalizeParams(callee, params) {
|
|
@@ -820,7 +780,7 @@ const _parse = (_Err) => {
|
|
|
820
780
|
}, ctx);
|
|
821
781
|
if (result instanceof Promise) throw new $ZodAsyncError();
|
|
822
782
|
if (result.issues.length) {
|
|
823
|
-
const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
783
|
+
const e = new ((_params?.Err) ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
824
784
|
captureStackTrace(e, _params?.callee ?? fn);
|
|
825
785
|
throw e;
|
|
826
786
|
}
|
|
@@ -828,7 +788,6 @@ const _parse = (_Err) => {
|
|
|
828
788
|
};
|
|
829
789
|
return fn;
|
|
830
790
|
};
|
|
831
|
-
const parse$1 = /* @__PURE__ */ _parse($ZodRealError);
|
|
832
791
|
const _parseAsync = (_Err) => {
|
|
833
792
|
const fn = async (schema, value, _ctx, params) => {
|
|
834
793
|
const ctx = _ctx ? {
|
|
@@ -841,7 +800,7 @@ const _parseAsync = (_Err) => {
|
|
|
841
800
|
}, ctx);
|
|
842
801
|
if (result instanceof Promise) result = await result;
|
|
843
802
|
if (result.issues.length) {
|
|
844
|
-
const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
803
|
+
const e = new ((params?.Err) ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
845
804
|
captureStackTrace(e, params?.callee ?? fn);
|
|
846
805
|
throw e;
|
|
847
806
|
}
|
|
@@ -849,7 +808,6 @@ const _parseAsync = (_Err) => {
|
|
|
849
808
|
};
|
|
850
809
|
return fn;
|
|
851
810
|
};
|
|
852
|
-
const parseAsync$1 = /* @__PURE__ */ _parseAsync($ZodRealError);
|
|
853
811
|
const _safeParse = (_Err) => (schema, value, _ctx) => {
|
|
854
812
|
const ctx = _ctx ? {
|
|
855
813
|
..._ctx,
|
|
@@ -865,21 +823,20 @@ const _safeParse = (_Err) => (schema, value, _ctx) => {
|
|
|
865
823
|
data: result.value
|
|
866
824
|
};
|
|
867
825
|
};
|
|
868
|
-
const safeParse$1 = /* @__PURE__ */ _safeParse($ZodRealError);
|
|
869
826
|
function failure(Err, issues, ctx) {
|
|
870
|
-
let error
|
|
827
|
+
let error;
|
|
871
828
|
return {
|
|
872
829
|
success: false,
|
|
873
830
|
get error() {
|
|
874
|
-
if (!error
|
|
875
|
-
error
|
|
831
|
+
if (!error) {
|
|
832
|
+
error = new Err(issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
876
833
|
issues = void 0;
|
|
877
834
|
ctx = void 0;
|
|
878
835
|
}
|
|
879
|
-
return error
|
|
836
|
+
return error;
|
|
880
837
|
},
|
|
881
838
|
set error(e) {
|
|
882
|
-
error
|
|
839
|
+
error = e;
|
|
883
840
|
issues = void 0;
|
|
884
841
|
ctx = void 0;
|
|
885
842
|
}
|
|
@@ -900,17 +857,16 @@ const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
900
857
|
data: result.value
|
|
901
858
|
};
|
|
902
859
|
};
|
|
903
|
-
const safeParseAsync$1 = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
904
860
|
const COMPILE_INVALID = /* @__PURE__ */ Symbol.for("zod.compile.invalid");
|
|
905
861
|
const COMPILE_FALLBACK = /* @__PURE__ */ Symbol.for("zod.compile.fallback");
|
|
906
|
-
const validate = (schema, value, _ctx) => {
|
|
862
|
+
const validate = ((schema, value, _ctx) => {
|
|
907
863
|
const validator = schema._zod.bag.validator;
|
|
908
864
|
if (validator !== void 0) {
|
|
909
865
|
if (validator(value) !== COMPILE_INVALID) return true;
|
|
910
866
|
if (validator.definite === true && _ctx === void 0) return false;
|
|
911
867
|
}
|
|
912
868
|
return validateFallback(schema, value, _ctx);
|
|
913
|
-
};
|
|
869
|
+
});
|
|
914
870
|
function validateFallback(schema, value, _ctx) {
|
|
915
871
|
const ctx = _ctx ? {
|
|
916
872
|
..._ctx,
|
|
@@ -935,7 +891,7 @@ function validateFallback(schema, value, _ctx) {
|
|
|
935
891
|
if (result instanceof Promise) throw new $ZodAsyncError();
|
|
936
892
|
return result.issues.length === 0;
|
|
937
893
|
}
|
|
938
|
-
const validateAsync = async (schema, value, _ctx) => {
|
|
894
|
+
const validateAsync$1 = async (schema, value, _ctx) => {
|
|
939
895
|
const ctx = _ctx ? {
|
|
940
896
|
..._ctx,
|
|
941
897
|
async: true,
|
|
@@ -952,45 +908,41 @@ const validateAsync = async (schema, value, _ctx) => {
|
|
|
952
908
|
return result.issues.length === 0;
|
|
953
909
|
};
|
|
954
910
|
const _encode = (_Err) => {
|
|
955
|
-
const parse
|
|
911
|
+
const parse = _parse(_Err);
|
|
956
912
|
const fn = (schema, value, _ctx, _params) => {
|
|
957
913
|
const ctx = _ctx ? {
|
|
958
914
|
..._ctx,
|
|
959
915
|
direction: "backward"
|
|
960
916
|
} : { direction: "backward" };
|
|
961
|
-
return parse
|
|
917
|
+
return parse(schema, value, ctx, finalizeParams(fn, _params));
|
|
962
918
|
};
|
|
963
919
|
return fn;
|
|
964
920
|
};
|
|
965
|
-
const encode$1 = /* @__PURE__ */ _encode($ZodRealError);
|
|
966
921
|
const _decode = (_Err) => {
|
|
967
|
-
const parse
|
|
922
|
+
const parse = _parse(_Err);
|
|
968
923
|
const fn = (schema, value, _ctx, _params) => {
|
|
969
|
-
return parse
|
|
924
|
+
return parse(schema, value, _ctx, finalizeParams(fn, _params));
|
|
970
925
|
};
|
|
971
926
|
return fn;
|
|
972
927
|
};
|
|
973
|
-
const decode$1 = /* @__PURE__ */ _decode($ZodRealError);
|
|
974
928
|
const _encodeAsync = (_Err) => {
|
|
975
|
-
const parseAsync
|
|
929
|
+
const parseAsync = _parseAsync(_Err);
|
|
976
930
|
const fn = async (schema, value, _ctx, _params) => {
|
|
977
931
|
const ctx = _ctx ? {
|
|
978
932
|
..._ctx,
|
|
979
933
|
direction: "backward"
|
|
980
934
|
} : { direction: "backward" };
|
|
981
|
-
return await parseAsync
|
|
935
|
+
return await parseAsync(schema, value, ctx, finalizeParams(fn, _params));
|
|
982
936
|
};
|
|
983
937
|
return fn;
|
|
984
938
|
};
|
|
985
|
-
const encodeAsync$1 = /* @__PURE__ */ _encodeAsync($ZodRealError);
|
|
986
939
|
const _decodeAsync = (_Err) => {
|
|
987
|
-
const parseAsync
|
|
940
|
+
const parseAsync = _parseAsync(_Err);
|
|
988
941
|
const fn = async (schema, value, _ctx, _params) => {
|
|
989
|
-
return await parseAsync
|
|
942
|
+
return await parseAsync(schema, value, _ctx, finalizeParams(fn, _params));
|
|
990
943
|
};
|
|
991
944
|
return fn;
|
|
992
945
|
};
|
|
993
|
-
const decodeAsync$1 = /* @__PURE__ */ _decodeAsync($ZodRealError);
|
|
994
946
|
const _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
995
947
|
const ctx = _ctx ? {
|
|
996
948
|
..._ctx,
|
|
@@ -998,11 +950,9 @@ const _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
|
998
950
|
} : { direction: "backward" };
|
|
999
951
|
return _safeParse(_Err)(schema, value, ctx);
|
|
1000
952
|
};
|
|
1001
|
-
const safeEncode$1 = /* @__PURE__ */ _safeEncode($ZodRealError);
|
|
1002
953
|
const _safeDecode = (_Err) => (schema, value, _ctx) => {
|
|
1003
954
|
return _safeParse(_Err)(schema, value, _ctx);
|
|
1004
955
|
};
|
|
1005
|
-
const safeDecode$1 = /* @__PURE__ */ _safeDecode($ZodRealError);
|
|
1006
956
|
const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1007
957
|
const ctx = _ctx ? {
|
|
1008
958
|
..._ctx,
|
|
@@ -1010,12 +960,9 @@ const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
1010
960
|
} : { direction: "backward" };
|
|
1011
961
|
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
1012
962
|
};
|
|
1013
|
-
const safeEncodeAsync$1 = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
|
|
1014
963
|
const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1015
964
|
return _safeParseAsync(_Err)(schema, value, _ctx);
|
|
1016
965
|
};
|
|
1017
|
-
const safeDecodeAsync$1 = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
|
|
1018
|
-
|
|
1019
966
|
//#endregion
|
|
1020
967
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/regexes.js
|
|
1021
968
|
/**
|
|
@@ -1039,12 +986,12 @@ const guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9
|
|
|
1039
986
|
/** Returns a regex for validating an RFC 9562/4122 UUID.
|
|
1040
987
|
*
|
|
1041
988
|
* @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */
|
|
1042
|
-
const uuid = (version
|
|
1043
|
-
if (!version
|
|
1044
|
-
return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version
|
|
989
|
+
const uuid = (version) => {
|
|
990
|
+
if (!version) return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;
|
|
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})$`);
|
|
1045
992
|
};
|
|
1046
993
|
/** Practical email validation */
|
|
1047
|
-
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,}$/;
|
|
1048
995
|
const _emoji$1 = `^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;
|
|
1049
996
|
function emoji() {
|
|
1050
997
|
return new RegExp(_emoji$1, "u");
|
|
@@ -1064,11 +1011,10 @@ const dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468
|
|
|
1064
1011
|
function anchor(source) {
|
|
1065
1012
|
return new RegExp(`^${source}$`);
|
|
1066
1013
|
}
|
|
1067
|
-
const date =
|
|
1014
|
+
const date = /*@__PURE__*/ anchor(dateSource);
|
|
1068
1015
|
function timeSource(args) {
|
|
1069
1016
|
const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
|
|
1070
|
-
|
|
1071
|
-
return regex;
|
|
1017
|
+
return typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : args.seconds ? `${hhmm}:[0-5]\\d(?:\\.\\d+)?` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
1072
1018
|
}
|
|
1073
1019
|
function time(args) {
|
|
1074
1020
|
return new RegExp(`^${timeSource(args)}$`);
|
|
@@ -1089,14 +1035,13 @@ const number$1 = /^-?\d+(?:\.\d+)?$/;
|
|
|
1089
1035
|
const boolean$1 = /^(?:true|false)$/i;
|
|
1090
1036
|
const lowercase = /^[^A-Z]*$/;
|
|
1091
1037
|
const uppercase = /^[^a-z]*$/;
|
|
1092
|
-
|
|
1093
1038
|
//#endregion
|
|
1094
1039
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/checks.js
|
|
1095
|
-
const $ZodCheck =
|
|
1096
|
-
var _a
|
|
1040
|
+
const $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => {
|
|
1041
|
+
var _a;
|
|
1097
1042
|
inst._zod ?? (inst._zod = {});
|
|
1098
1043
|
inst._zod.def = def;
|
|
1099
|
-
(_a
|
|
1044
|
+
(_a = inst._zod).onattach ?? (_a.onattach = []);
|
|
1100
1045
|
});
|
|
1101
1046
|
/** Default `when` for length-based checks: run only on non-nullish values with a `length`. */
|
|
1102
1047
|
const _whenHasLength = (payload) => {
|
|
@@ -1108,7 +1053,7 @@ const numericOriginMap = {
|
|
|
1108
1053
|
bigint: "bigint",
|
|
1109
1054
|
object: "date"
|
|
1110
1055
|
};
|
|
1111
|
-
const $ZodCheckLessThan =
|
|
1056
|
+
const $ZodCheckLessThan = /*@__PURE__*/ $constructor("$ZodCheckLessThan", (inst, def) => {
|
|
1112
1057
|
$ZodCheck.init(inst, def);
|
|
1113
1058
|
const origin = numericOriginMap[typeof def.value];
|
|
1114
1059
|
inst._zod.check = (payload) => {
|
|
@@ -1124,7 +1069,7 @@ const $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (ins
|
|
|
1124
1069
|
});
|
|
1125
1070
|
};
|
|
1126
1071
|
});
|
|
1127
|
-
const $ZodCheckGreaterThan =
|
|
1072
|
+
const $ZodCheckGreaterThan = /*@__PURE__*/ $constructor("$ZodCheckGreaterThan", (inst, def) => {
|
|
1128
1073
|
$ZodCheck.init(inst, def);
|
|
1129
1074
|
const origin = numericOriginMap[typeof def.value];
|
|
1130
1075
|
inst._zod.check = (payload) => {
|
|
@@ -1140,12 +1085,11 @@ const $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan"
|
|
|
1140
1085
|
});
|
|
1141
1086
|
};
|
|
1142
1087
|
});
|
|
1143
|
-
const $ZodCheckMultipleOf =
|
|
1088
|
+
const $ZodCheckMultipleOf = /*@__PURE__*/ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
1144
1089
|
$ZodCheck.init(inst, def);
|
|
1145
1090
|
inst._zod.check = (payload) => {
|
|
1146
1091
|
if (typeof payload.value !== typeof def.value) throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
1147
|
-
|
|
1148
|
-
if (isMultiple) return;
|
|
1092
|
+
if (typeof payload.value === "bigint" ? def.value !== BigInt(0) && payload.value % def.value === BigInt(0) : floatSafeRemainder(payload.value, def.value) === 0) return;
|
|
1149
1093
|
payload.issues.push({
|
|
1150
1094
|
origin: typeof payload.value,
|
|
1151
1095
|
code: "not_multiple_of",
|
|
@@ -1156,7 +1100,7 @@ const $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf",
|
|
|
1156
1100
|
});
|
|
1157
1101
|
};
|
|
1158
1102
|
});
|
|
1159
|
-
const $ZodCheckNumberFormat =
|
|
1103
|
+
const $ZodCheckNumberFormat = /*@__PURE__*/ $constructor("$ZodCheckNumberFormat", (inst, def) => {
|
|
1160
1104
|
$ZodCheck.init(inst, def);
|
|
1161
1105
|
def.format = def.format || "float64";
|
|
1162
1106
|
const isInt = def.format?.includes("int");
|
|
@@ -1220,15 +1164,14 @@ const $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberForma
|
|
|
1220
1164
|
});
|
|
1221
1165
|
};
|
|
1222
1166
|
});
|
|
1223
|
-
const $ZodCheckMaxLength =
|
|
1224
|
-
var _a
|
|
1167
|
+
const $ZodCheckMaxLength = /*@__PURE__*/ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
1168
|
+
var _a;
|
|
1225
1169
|
$ZodCheck.init(inst, def);
|
|
1226
|
-
(_a
|
|
1170
|
+
(_a = inst._zod.def).when ?? (_a.when = _whenHasLength);
|
|
1227
1171
|
inst._zod.check = (payload) => {
|
|
1228
1172
|
const input = payload.value;
|
|
1229
1173
|
const units = input.length;
|
|
1230
|
-
|
|
1231
|
-
if (length <= def.maximum) return;
|
|
1174
|
+
if ((typeof input === "string" && units > def.maximum ? codePointLength(input) : units) <= def.maximum) return;
|
|
1232
1175
|
const origin = getLengthableOrigin(input);
|
|
1233
1176
|
payload.issues.push({
|
|
1234
1177
|
origin,
|
|
@@ -1241,15 +1184,14 @@ const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (i
|
|
|
1241
1184
|
});
|
|
1242
1185
|
};
|
|
1243
1186
|
});
|
|
1244
|
-
const $ZodCheckMinLength =
|
|
1245
|
-
var _a
|
|
1187
|
+
const $ZodCheckMinLength = /*@__PURE__*/ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
1188
|
+
var _a;
|
|
1246
1189
|
$ZodCheck.init(inst, def);
|
|
1247
|
-
(_a
|
|
1190
|
+
(_a = inst._zod.def).when ?? (_a.when = _whenHasLength);
|
|
1248
1191
|
inst._zod.check = (payload) => {
|
|
1249
1192
|
const input = payload.value;
|
|
1250
1193
|
const units = input.length;
|
|
1251
|
-
|
|
1252
|
-
if (length >= def.minimum) return;
|
|
1194
|
+
if ((typeof input === "string" && units >= def.minimum && units < def.minimum * 2 ? codePointLength(input) : units) >= def.minimum) return;
|
|
1253
1195
|
const origin = getLengthableOrigin(input);
|
|
1254
1196
|
payload.issues.push({
|
|
1255
1197
|
origin,
|
|
@@ -1262,10 +1204,10 @@ const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (i
|
|
|
1262
1204
|
});
|
|
1263
1205
|
};
|
|
1264
1206
|
});
|
|
1265
|
-
const $ZodCheckLengthEquals =
|
|
1266
|
-
var _a
|
|
1207
|
+
const $ZodCheckLengthEquals = /*@__PURE__*/ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
1208
|
+
var _a;
|
|
1267
1209
|
$ZodCheck.init(inst, def);
|
|
1268
|
-
(_a
|
|
1210
|
+
(_a = inst._zod.def).when ?? (_a.when = _whenHasLength);
|
|
1269
1211
|
inst._zod.check = (payload) => {
|
|
1270
1212
|
const input = payload.value;
|
|
1271
1213
|
const units = input.length;
|
|
@@ -1290,10 +1232,10 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
|
|
|
1290
1232
|
});
|
|
1291
1233
|
};
|
|
1292
1234
|
});
|
|
1293
|
-
const $ZodCheckStringFormat =
|
|
1294
|
-
var _a
|
|
1235
|
+
const $ZodCheckStringFormat = /*@__PURE__*/ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
1236
|
+
var _a, _b;
|
|
1295
1237
|
$ZodCheck.init(inst, def);
|
|
1296
|
-
if (def.pattern) (_a
|
|
1238
|
+
if (def.pattern) (_a = inst._zod).check ?? (_a.check = (payload) => {
|
|
1297
1239
|
def.pattern.lastIndex = 0;
|
|
1298
1240
|
if (def.pattern.test(payload.value)) return;
|
|
1299
1241
|
payload.issues.push({
|
|
@@ -1308,7 +1250,7 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
|
|
|
1308
1250
|
});
|
|
1309
1251
|
else (_b = inst._zod).check ?? (_b.check = () => {});
|
|
1310
1252
|
});
|
|
1311
|
-
const $ZodCheckRegex =
|
|
1253
|
+
const $ZodCheckRegex = /*@__PURE__*/ $constructor("$ZodCheckRegex", (inst, def) => {
|
|
1312
1254
|
$ZodCheckStringFormat.init(inst, def);
|
|
1313
1255
|
inst._zod.check = (payload) => {
|
|
1314
1256
|
def.pattern.lastIndex = 0;
|
|
@@ -1324,19 +1266,18 @@ const $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def
|
|
|
1324
1266
|
});
|
|
1325
1267
|
};
|
|
1326
1268
|
});
|
|
1327
|
-
const $ZodCheckLowerCase =
|
|
1269
|
+
const $ZodCheckLowerCase = /*@__PURE__*/ $constructor("$ZodCheckLowerCase", (inst, def) => {
|
|
1328
1270
|
def.pattern ?? (def.pattern = lowercase);
|
|
1329
1271
|
$ZodCheckStringFormat.init(inst, def);
|
|
1330
1272
|
});
|
|
1331
|
-
const $ZodCheckUpperCase =
|
|
1273
|
+
const $ZodCheckUpperCase = /*@__PURE__*/ $constructor("$ZodCheckUpperCase", (inst, def) => {
|
|
1332
1274
|
def.pattern ?? (def.pattern = uppercase);
|
|
1333
1275
|
$ZodCheckStringFormat.init(inst, def);
|
|
1334
1276
|
});
|
|
1335
|
-
const $ZodCheckIncludes =
|
|
1277
|
+
const $ZodCheckIncludes = /*@__PURE__*/ $constructor("$ZodCheckIncludes", (inst, def) => {
|
|
1336
1278
|
$ZodCheck.init(inst, def);
|
|
1337
1279
|
const escapedRegex = escapeRegex(def.includes);
|
|
1338
|
-
|
|
1339
|
-
def.pattern = pattern;
|
|
1280
|
+
def.pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position},}${escapedRegex}` : escapedRegex);
|
|
1340
1281
|
inst._zod.check = (payload) => {
|
|
1341
1282
|
if (payload.value.includes(def.includes, def.position)) return;
|
|
1342
1283
|
payload.issues.push({
|
|
@@ -1350,7 +1291,7 @@ const $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (ins
|
|
|
1350
1291
|
});
|
|
1351
1292
|
};
|
|
1352
1293
|
});
|
|
1353
|
-
const $ZodCheckStartsWith =
|
|
1294
|
+
const $ZodCheckStartsWith = /*@__PURE__*/ $constructor("$ZodCheckStartsWith", (inst, def) => {
|
|
1354
1295
|
$ZodCheck.init(inst, def);
|
|
1355
1296
|
const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`);
|
|
1356
1297
|
def.pattern ?? (def.pattern = pattern);
|
|
@@ -1367,7 +1308,7 @@ const $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith",
|
|
|
1367
1308
|
});
|
|
1368
1309
|
};
|
|
1369
1310
|
});
|
|
1370
|
-
const $ZodCheckEndsWith =
|
|
1311
|
+
const $ZodCheckEndsWith = /*@__PURE__*/ $constructor("$ZodCheckEndsWith", (inst, def) => {
|
|
1371
1312
|
$ZodCheck.init(inst, def);
|
|
1372
1313
|
const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`);
|
|
1373
1314
|
def.pattern ?? (def.pattern = pattern);
|
|
@@ -1384,13 +1325,12 @@ const $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (ins
|
|
|
1384
1325
|
});
|
|
1385
1326
|
};
|
|
1386
1327
|
});
|
|
1387
|
-
const $ZodCheckOverwrite =
|
|
1328
|
+
const $ZodCheckOverwrite = /*@__PURE__*/ $constructor("$ZodCheckOverwrite", (inst, def) => {
|
|
1388
1329
|
$ZodCheck.init(inst, def);
|
|
1389
1330
|
inst._zod.check = (payload) => {
|
|
1390
1331
|
payload.value = def.tx(payload.value);
|
|
1391
1332
|
};
|
|
1392
1333
|
});
|
|
1393
|
-
|
|
1394
1334
|
//#endregion
|
|
1395
1335
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/doc.js
|
|
1396
1336
|
var Doc = class {
|
|
@@ -1414,8 +1354,7 @@ var Doc = class {
|
|
|
1414
1354
|
arg(this, { execution: "async" });
|
|
1415
1355
|
return;
|
|
1416
1356
|
}
|
|
1417
|
-
const
|
|
1418
|
-
const lines = content.split("\n").filter((x) => x);
|
|
1357
|
+
const lines = arg.split("\n").filter((x) => x);
|
|
1419
1358
|
const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));
|
|
1420
1359
|
const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x);
|
|
1421
1360
|
for (const line of dedented) this.content.push(line);
|
|
@@ -1423,11 +1362,9 @@ var Doc = class {
|
|
|
1423
1362
|
compile() {
|
|
1424
1363
|
const F = Function;
|
|
1425
1364
|
const content = this?.content ?? [``];
|
|
1426
|
-
|
|
1427
|
-
return factory(...Object.values(this.closed));
|
|
1365
|
+
return new F(...Object.keys(this.closed), `return function (${this.args.join(", ")}) {\n${content.join("\n")}\n};`)(...Object.values(this.closed));
|
|
1428
1366
|
}
|
|
1429
1367
|
};
|
|
1430
|
-
|
|
1431
1368
|
//#endregion
|
|
1432
1369
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/versions.js
|
|
1433
1370
|
const version = {
|
|
@@ -1435,11 +1372,10 @@ const version = {
|
|
|
1435
1372
|
minor: 6,
|
|
1436
1373
|
patch: 5
|
|
1437
1374
|
};
|
|
1438
|
-
|
|
1439
1375
|
//#endregion
|
|
1440
1376
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/schemas.js
|
|
1441
|
-
const $ZodType =
|
|
1442
|
-
var _a
|
|
1377
|
+
const $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
|
|
1378
|
+
var _a;
|
|
1443
1379
|
inst ?? (inst = {});
|
|
1444
1380
|
inst._zod.def = def;
|
|
1445
1381
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -1448,34 +1384,31 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
1448
1384
|
const checks = inst._zod.traits.has("$ZodCheck") ? [inst, ...defChecks ?? []] : defChecks?.length ? [...defChecks] : [];
|
|
1449
1385
|
for (const ch of checks) for (const fn of ch._zod.onattach) fn(inst);
|
|
1450
1386
|
if (checks.length === 0) {
|
|
1451
|
-
(_a
|
|
1387
|
+
(_a = inst._zod).deferred ?? (_a.deferred = []);
|
|
1452
1388
|
inst._zod.deferred?.push(() => {
|
|
1453
1389
|
inst._zod.run = inst._zod.parse;
|
|
1454
1390
|
});
|
|
1455
1391
|
} else {
|
|
1456
|
-
const runChecks = (payload, checks
|
|
1392
|
+
const runChecks = (payload, checks, ctx) => {
|
|
1457
1393
|
if (payload.memo) return payload;
|
|
1458
1394
|
let isAborted = aborted(payload);
|
|
1459
1395
|
let asyncResult;
|
|
1460
|
-
for (const ch of checks
|
|
1396
|
+
for (const ch of checks) {
|
|
1461
1397
|
if (ch._zod.def.when) {
|
|
1462
1398
|
if (explicitlyAborted(payload)) continue;
|
|
1463
|
-
|
|
1464
|
-
if (!shouldRun) continue;
|
|
1399
|
+
if (!ch._zod.def.when(payload)) continue;
|
|
1465
1400
|
} else if (isAborted) continue;
|
|
1466
1401
|
const currLen = payload.issues.length;
|
|
1467
1402
|
const _ = ch._zod.check(payload);
|
|
1468
1403
|
if (_ instanceof Promise && ctx?.async === false) throw new $ZodAsyncError();
|
|
1469
1404
|
if (asyncResult || _ instanceof Promise) asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
|
|
1470
1405
|
await _;
|
|
1471
|
-
|
|
1472
|
-
if (nextLen === currLen) return;
|
|
1406
|
+
if (payload.issues.length === currLen) return;
|
|
1473
1407
|
attachSchema(payload.issues, currLen, inst);
|
|
1474
1408
|
if (!isAborted) isAborted = aborted(payload, currLen);
|
|
1475
1409
|
});
|
|
1476
1410
|
else {
|
|
1477
|
-
|
|
1478
|
-
if (nextLen === currLen) continue;
|
|
1411
|
+
if (payload.issues.length === currLen) continue;
|
|
1479
1412
|
attachSchema(payload.issues, currLen, inst);
|
|
1480
1413
|
if (!isAborted) isAborted = aborted(payload, currLen);
|
|
1481
1414
|
}
|
|
@@ -1493,7 +1426,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
1493
1426
|
const checkResult = runChecks(payload, checks, ctx);
|
|
1494
1427
|
if (checkResult instanceof Promise) {
|
|
1495
1428
|
if (ctx.async === false) throw new $ZodAsyncError();
|
|
1496
|
-
return checkResult.then((checkResult
|
|
1429
|
+
return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));
|
|
1497
1430
|
}
|
|
1498
1431
|
return inst._zod.parse(checkResult, ctx);
|
|
1499
1432
|
};
|
|
@@ -1507,15 +1440,15 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
1507
1440
|
...ctx,
|
|
1508
1441
|
skipChecks: true
|
|
1509
1442
|
});
|
|
1510
|
-
if (canary instanceof Promise) return canary.then((canary
|
|
1511
|
-
return handleCanaryResult(canary
|
|
1443
|
+
if (canary instanceof Promise) return canary.then((canary) => {
|
|
1444
|
+
return handleCanaryResult(canary, payload, ctx);
|
|
1512
1445
|
});
|
|
1513
1446
|
return handleCanaryResult(canary, payload, ctx);
|
|
1514
1447
|
}
|
|
1515
1448
|
const result = inst._zod.parse(payload, ctx);
|
|
1516
1449
|
if (result instanceof Promise) {
|
|
1517
1450
|
if (ctx.async === false) throw new $ZodAsyncError();
|
|
1518
|
-
return result.then((result
|
|
1451
|
+
return result.then((result) => runChecks(result, checks, ctx));
|
|
1519
1452
|
}
|
|
1520
1453
|
return runChecks(result, checks, ctx);
|
|
1521
1454
|
};
|
|
@@ -1530,7 +1463,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
1530
1463
|
});
|
|
1531
1464
|
/** The Standard Schema surface for `inst`. Shared so wrappers can extend it without forcing it. */
|
|
1532
1465
|
const toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => finalizeIssue(iss, ctx, config())) } : { value: r.value };
|
|
1533
|
-
async function validateAsync
|
|
1466
|
+
async function validateAsync(inst, value) {
|
|
1534
1467
|
const ctx = { async: true };
|
|
1535
1468
|
return toStandardResult(await inst._zod.run({
|
|
1536
1469
|
value,
|
|
@@ -1548,19 +1481,19 @@ function standardProps(inst) {
|
|
|
1548
1481
|
}, ctx);
|
|
1549
1482
|
if (!(r instanceof Promise)) return toStandardResult(r, ctx);
|
|
1550
1483
|
} catch (_) {}
|
|
1551
|
-
return validateAsync
|
|
1484
|
+
return validateAsync(inst, value);
|
|
1552
1485
|
},
|
|
1553
1486
|
vendor: "zod",
|
|
1554
1487
|
version: 1
|
|
1555
1488
|
};
|
|
1556
1489
|
}
|
|
1557
|
-
const $ZodString =
|
|
1490
|
+
const $ZodString = /*@__PURE__*/ $constructor("$ZodString", (inst, def) => {
|
|
1558
1491
|
$ZodType.init(inst, def);
|
|
1559
1492
|
inst._zod.pattern = def.pattern ?? anyString;
|
|
1560
1493
|
inst._zod.parse = (payload, _) => {
|
|
1561
1494
|
if (def.coerce) try {
|
|
1562
1495
|
payload.value = String(payload.value);
|
|
1563
|
-
} catch (_
|
|
1496
|
+
} catch (_) {}
|
|
1564
1497
|
if (typeof payload.value === "string") return payload;
|
|
1565
1498
|
payload.issues.push({
|
|
1566
1499
|
expected: "string",
|
|
@@ -1571,17 +1504,17 @@ const $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
|
|
|
1571
1504
|
return payload;
|
|
1572
1505
|
};
|
|
1573
1506
|
});
|
|
1574
|
-
const $ZodStringFormat =
|
|
1507
|
+
const $ZodStringFormat = /*@__PURE__*/ $constructor("$ZodStringFormat", (inst, def) => {
|
|
1575
1508
|
$ZodCheckStringFormat.init(inst, def);
|
|
1576
1509
|
$ZodString.init(inst, def);
|
|
1577
1510
|
});
|
|
1578
|
-
const $ZodGUID =
|
|
1511
|
+
const $ZodGUID = /*@__PURE__*/ $constructor("$ZodGUID", (inst, def) => {
|
|
1579
1512
|
def.pattern ?? (def.pattern = guid);
|
|
1580
1513
|
$ZodStringFormat.init(inst, def);
|
|
1581
1514
|
});
|
|
1582
|
-
const $ZodUUID =
|
|
1515
|
+
const $ZodUUID = /*@__PURE__*/ $constructor("$ZodUUID", (inst, def) => {
|
|
1583
1516
|
if (def.version) {
|
|
1584
|
-
const
|
|
1517
|
+
const v = {
|
|
1585
1518
|
v1: 1,
|
|
1586
1519
|
v2: 2,
|
|
1587
1520
|
v3: 3,
|
|
@@ -1590,21 +1523,16 @@ const $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => {
|
|
|
1590
1523
|
v6: 6,
|
|
1591
1524
|
v7: 7,
|
|
1592
1525
|
v8: 8
|
|
1593
|
-
};
|
|
1594
|
-
const v = versionMap[def.version];
|
|
1526
|
+
}[def.version];
|
|
1595
1527
|
if (v === void 0) throw new Error(`Invalid UUID version: "${def.version}"`);
|
|
1596
1528
|
def.pattern ?? (def.pattern = uuid(v));
|
|
1597
1529
|
} else def.pattern ?? (def.pattern = uuid());
|
|
1598
1530
|
$ZodStringFormat.init(inst, def);
|
|
1599
1531
|
});
|
|
1600
|
-
const $ZodEmail =
|
|
1601
|
-
def.pattern ?? (def.pattern = email);
|
|
1532
|
+
const $ZodEmail = /*@__PURE__*/ $constructor("$ZodEmail", (inst, def) => {
|
|
1533
|
+
def.pattern ?? (def.pattern = email$1);
|
|
1602
1534
|
$ZodStringFormat.init(inst, def);
|
|
1603
1535
|
});
|
|
1604
|
-
/** The `://` guard rejected the input before the URL constructor saw it. */
|
|
1605
|
-
const URL_BAD_FORMAT = 1;
|
|
1606
|
-
/** The URL parser rejected the input. */
|
|
1607
|
-
const URL_UNPARSEABLE = 2;
|
|
1608
1536
|
function canParseURL(input) {
|
|
1609
1537
|
try {
|
|
1610
1538
|
if (typeof URL !== "undefined" && typeof URL.canParse === "function") return URL.canParse(input);
|
|
@@ -1615,20 +1543,20 @@ function canParseURL(input) {
|
|
|
1615
1543
|
}
|
|
1616
1544
|
}
|
|
1617
1545
|
function validateURL(trimmed, def) {
|
|
1618
|
-
if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) return canParseURL(trimmed) ||
|
|
1546
|
+
if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) return canParseURL(trimmed) || 2;
|
|
1619
1547
|
return parseURLObject(trimmed, def);
|
|
1620
1548
|
}
|
|
1621
1549
|
/** Parses a URL while preserving the non-normalizing HTTP guard. */
|
|
1622
1550
|
function parseURLObject(trimmed, def) {
|
|
1623
|
-
if (!def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(trimmed)) return
|
|
1551
|
+
if (!def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(trimmed)) return 1;
|
|
1624
1552
|
try {
|
|
1625
1553
|
if (typeof URL !== "undefined") {
|
|
1626
1554
|
const URLStatic = URL;
|
|
1627
|
-
if (typeof URLStatic.parse === "function") return URLStatic.parse(trimmed) ??
|
|
1555
|
+
if (typeof URLStatic.parse === "function") return URLStatic.parse(trimmed) ?? 2;
|
|
1628
1556
|
}
|
|
1629
1557
|
return new URL(trimmed);
|
|
1630
1558
|
} catch {
|
|
1631
|
-
return
|
|
1559
|
+
return 2;
|
|
1632
1560
|
}
|
|
1633
1561
|
}
|
|
1634
1562
|
const asciiTabOrNewline = /[\t\n\r]/g;
|
|
@@ -1636,21 +1564,21 @@ const asciiTabOrNewline = /[\t\n\r]/g;
|
|
|
1636
1564
|
function stripTabAndNewline(value) {
|
|
1637
1565
|
return value.replace(asciiTabOrNewline, "");
|
|
1638
1566
|
}
|
|
1639
|
-
function urlHostnameOk(url
|
|
1567
|
+
function urlHostnameOk(url, hostname) {
|
|
1640
1568
|
hostname.lastIndex = 0;
|
|
1641
|
-
return hostname.test(url
|
|
1569
|
+
return hostname.test(url.hostname);
|
|
1642
1570
|
}
|
|
1643
|
-
function urlProtocolOk(url
|
|
1571
|
+
function urlProtocolOk(url, protocol) {
|
|
1644
1572
|
protocol.lastIndex = 0;
|
|
1645
|
-
return protocol.test(url
|
|
1573
|
+
return protocol.test(url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol);
|
|
1646
1574
|
}
|
|
1647
|
-
const $ZodURL =
|
|
1575
|
+
const $ZodURL = /*@__PURE__*/ $constructor("$ZodURL", (inst, def) => {
|
|
1648
1576
|
$ZodStringFormat.init(inst, def);
|
|
1649
1577
|
inst._zod.check = (payload) => {
|
|
1650
1578
|
try {
|
|
1651
1579
|
const trimmed = payload.value.trim();
|
|
1652
|
-
const url
|
|
1653
|
-
if (url
|
|
1580
|
+
const url = validateURL(trimmed, def);
|
|
1581
|
+
if (url === 1) {
|
|
1654
1582
|
payload.issues.push({
|
|
1655
1583
|
code: "invalid_format",
|
|
1656
1584
|
format: "url",
|
|
@@ -1661,7 +1589,7 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
1661
1589
|
});
|
|
1662
1590
|
return;
|
|
1663
1591
|
}
|
|
1664
|
-
if (url
|
|
1592
|
+
if (url === 2) {
|
|
1665
1593
|
payload.issues.push({
|
|
1666
1594
|
code: "invalid_format",
|
|
1667
1595
|
format: "url",
|
|
@@ -1671,11 +1599,11 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
1671
1599
|
});
|
|
1672
1600
|
return;
|
|
1673
1601
|
}
|
|
1674
|
-
if (url
|
|
1602
|
+
if (url === true) {
|
|
1675
1603
|
payload.value = stripTabAndNewline(trimmed);
|
|
1676
1604
|
return;
|
|
1677
1605
|
}
|
|
1678
|
-
if (def.hostname && !urlHostnameOk(url
|
|
1606
|
+
if (def.hostname && !urlHostnameOk(url, def.hostname)) payload.issues.push({
|
|
1679
1607
|
code: "invalid_format",
|
|
1680
1608
|
format: "url",
|
|
1681
1609
|
note: "Invalid hostname",
|
|
@@ -1684,7 +1612,7 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
1684
1612
|
inst,
|
|
1685
1613
|
continue: !def.abort
|
|
1686
1614
|
});
|
|
1687
|
-
if (def.protocol && !urlProtocolOk(url
|
|
1615
|
+
if (def.protocol && !urlProtocolOk(url, def.protocol)) payload.issues.push({
|
|
1688
1616
|
code: "invalid_format",
|
|
1689
1617
|
format: "url",
|
|
1690
1618
|
note: "Invalid protocol",
|
|
@@ -1693,7 +1621,7 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
1693
1621
|
inst,
|
|
1694
1622
|
continue: !def.abort
|
|
1695
1623
|
});
|
|
1696
|
-
payload.value = def.normalize ? url
|
|
1624
|
+
payload.value = def.normalize ? url.href : stripTabAndNewline(trimmed);
|
|
1697
1625
|
return;
|
|
1698
1626
|
} catch (_) {
|
|
1699
1627
|
payload.issues.push({
|
|
@@ -1706,11 +1634,11 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
1706
1634
|
}
|
|
1707
1635
|
};
|
|
1708
1636
|
});
|
|
1709
|
-
const $ZodEmoji =
|
|
1637
|
+
const $ZodEmoji = /*@__PURE__*/ $constructor("$ZodEmoji", (inst, def) => {
|
|
1710
1638
|
def.pattern ?? (def.pattern = emoji());
|
|
1711
1639
|
$ZodStringFormat.init(inst, def);
|
|
1712
1640
|
});
|
|
1713
|
-
const $ZodNanoID =
|
|
1641
|
+
const $ZodNanoID = /*@__PURE__*/ $constructor("$ZodNanoID", (inst, def) => {
|
|
1714
1642
|
if (def.length !== void 0 && (!Number.isInteger(def.length) || def.length < 1)) throw new Error(`Invalid nanoid length: ${def.length}`);
|
|
1715
1643
|
def.pattern ?? (def.pattern = def.length === void 0 ? nanoid : nanoidOfLength(def.length));
|
|
1716
1644
|
$ZodStringFormat.init(inst, def);
|
|
@@ -1720,43 +1648,43 @@ const $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => {
|
|
|
1720
1648
|
* (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
|
|
1721
1649
|
* See https://github.com/paralleldrive/cuid.
|
|
1722
1650
|
*/
|
|
1723
|
-
const $ZodCUID =
|
|
1651
|
+
const $ZodCUID = /*@__PURE__*/ $constructor("$ZodCUID", (inst, def) => {
|
|
1724
1652
|
def.pattern ?? (def.pattern = cuid);
|
|
1725
1653
|
$ZodStringFormat.init(inst, def);
|
|
1726
1654
|
});
|
|
1727
|
-
const $ZodCUID2 =
|
|
1655
|
+
const $ZodCUID2 = /*@__PURE__*/ $constructor("$ZodCUID2", (inst, def) => {
|
|
1728
1656
|
def.pattern ?? (def.pattern = cuid2);
|
|
1729
1657
|
$ZodStringFormat.init(inst, def);
|
|
1730
1658
|
});
|
|
1731
|
-
const $ZodULID =
|
|
1659
|
+
const $ZodULID = /*@__PURE__*/ $constructor("$ZodULID", (inst, def) => {
|
|
1732
1660
|
def.pattern ?? (def.pattern = ulid);
|
|
1733
1661
|
$ZodStringFormat.init(inst, def);
|
|
1734
1662
|
});
|
|
1735
|
-
const $ZodXID =
|
|
1663
|
+
const $ZodXID = /*@__PURE__*/ $constructor("$ZodXID", (inst, def) => {
|
|
1736
1664
|
def.pattern ?? (def.pattern = xid);
|
|
1737
1665
|
$ZodStringFormat.init(inst, def);
|
|
1738
1666
|
});
|
|
1739
|
-
const $ZodKSUID =
|
|
1667
|
+
const $ZodKSUID = /*@__PURE__*/ $constructor("$ZodKSUID", (inst, def) => {
|
|
1740
1668
|
def.pattern ?? (def.pattern = ksuid);
|
|
1741
1669
|
$ZodStringFormat.init(inst, def);
|
|
1742
1670
|
});
|
|
1743
|
-
const $ZodISODateTime =
|
|
1671
|
+
const $ZodISODateTime = /*@__PURE__*/ $constructor("$ZodISODateTime", (inst, def) => {
|
|
1744
1672
|
def.pattern ?? (def.pattern = datetime(def));
|
|
1745
1673
|
$ZodStringFormat.init(inst, def);
|
|
1746
1674
|
});
|
|
1747
|
-
const $ZodISODate =
|
|
1675
|
+
const $ZodISODate = /*@__PURE__*/ $constructor("$ZodISODate", (inst, def) => {
|
|
1748
1676
|
def.pattern ?? (def.pattern = date);
|
|
1749
1677
|
$ZodStringFormat.init(inst, def);
|
|
1750
1678
|
});
|
|
1751
|
-
const $ZodISOTime =
|
|
1679
|
+
const $ZodISOTime = /*@__PURE__*/ $constructor("$ZodISOTime", (inst, def) => {
|
|
1752
1680
|
def.pattern ?? (def.pattern = time(def));
|
|
1753
1681
|
$ZodStringFormat.init(inst, def);
|
|
1754
1682
|
});
|
|
1755
|
-
const $ZodISODuration =
|
|
1683
|
+
const $ZodISODuration = /*@__PURE__*/ $constructor("$ZodISODuration", (inst, def) => {
|
|
1756
1684
|
def.pattern ?? (def.pattern = duration);
|
|
1757
1685
|
$ZodStringFormat.init(inst, def);
|
|
1758
1686
|
});
|
|
1759
|
-
const $ZodIPv4 =
|
|
1687
|
+
const $ZodIPv4 = /*@__PURE__*/ $constructor("$ZodIPv4", (inst, def) => {
|
|
1760
1688
|
def.pattern ?? (def.pattern = ipv4);
|
|
1761
1689
|
$ZodStringFormat.init(inst, def);
|
|
1762
1690
|
});
|
|
@@ -1766,7 +1694,7 @@ function isValidIPv6(value) {
|
|
|
1766
1694
|
if (!ipv6Alphabet.test(value)) return false;
|
|
1767
1695
|
return canParseURL(`http://[${value}]`);
|
|
1768
1696
|
}
|
|
1769
|
-
const $ZodIPv6 =
|
|
1697
|
+
const $ZodIPv6 = /*@__PURE__*/ $constructor("$ZodIPv6", (inst, def) => {
|
|
1770
1698
|
def.pattern ?? (def.pattern = ipv6);
|
|
1771
1699
|
$ZodStringFormat.init(inst, def);
|
|
1772
1700
|
inst._zod.check = (payload) => {
|
|
@@ -1779,7 +1707,7 @@ const $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
|
|
|
1779
1707
|
});
|
|
1780
1708
|
};
|
|
1781
1709
|
});
|
|
1782
|
-
const $ZodCIDRv4 =
|
|
1710
|
+
const $ZodCIDRv4 = /*@__PURE__*/ $constructor("$ZodCIDRv4", (inst, def) => {
|
|
1783
1711
|
def.pattern ?? (def.pattern = cidrv4);
|
|
1784
1712
|
$ZodStringFormat.init(inst, def);
|
|
1785
1713
|
});
|
|
@@ -1793,7 +1721,7 @@ function isValidCIDRv6(value) {
|
|
|
1793
1721
|
if (prefixNum < 0 || prefixNum > 128) return false;
|
|
1794
1722
|
return isValidIPv6(address);
|
|
1795
1723
|
}
|
|
1796
|
-
const $ZodCIDRv6 =
|
|
1724
|
+
const $ZodCIDRv6 = /*@__PURE__*/ $constructor("$ZodCIDRv6", (inst, def) => {
|
|
1797
1725
|
def.pattern ?? (def.pattern = cidrv6);
|
|
1798
1726
|
$ZodStringFormat.init(inst, def);
|
|
1799
1727
|
inst._zod.check = (payload) => {
|
|
@@ -1818,7 +1746,7 @@ function isValidBase64(data) {
|
|
|
1818
1746
|
}
|
|
1819
1747
|
}
|
|
1820
1748
|
const base64Charset = /^[0-9a-zA-Z+/]*={0,2}$/;
|
|
1821
|
-
const $ZodBase64 =
|
|
1749
|
+
const $ZodBase64 = /*@__PURE__*/ $constructor("$ZodBase64", (inst, def) => {
|
|
1822
1750
|
def.pattern ?? (def.pattern = base64Charset);
|
|
1823
1751
|
$ZodStringFormat.init(inst, def);
|
|
1824
1752
|
inst._zod.check = (payload) => {
|
|
@@ -1835,11 +1763,10 @@ const $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
|
|
|
1835
1763
|
const base64urlCharset = /^[A-Za-z0-9_-]*$/;
|
|
1836
1764
|
function isValidBase64URL(data) {
|
|
1837
1765
|
if (!base64urlCharset.test(data)) return false;
|
|
1838
|
-
const base64
|
|
1839
|
-
|
|
1840
|
-
return isValidBase64(padded);
|
|
1766
|
+
const base64 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
|
|
1767
|
+
return isValidBase64(base64.padEnd(Math.ceil(base64.length / 4) * 4, "="));
|
|
1841
1768
|
}
|
|
1842
|
-
const $ZodBase64URL =
|
|
1769
|
+
const $ZodBase64URL = /*@__PURE__*/ $constructor("$ZodBase64URL", (inst, def) => {
|
|
1843
1770
|
def.pattern ?? (def.pattern = base64urlCharset);
|
|
1844
1771
|
$ZodStringFormat.init(inst, def);
|
|
1845
1772
|
inst._zod.check = (payload) => {
|
|
@@ -1853,7 +1780,7 @@ const $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def)
|
|
|
1853
1780
|
});
|
|
1854
1781
|
};
|
|
1855
1782
|
});
|
|
1856
|
-
const $ZodE164 =
|
|
1783
|
+
const $ZodE164 = /*@__PURE__*/ $constructor("$ZodE164", (inst, def) => {
|
|
1857
1784
|
def.pattern ?? (def.pattern = e164);
|
|
1858
1785
|
$ZodStringFormat.init(inst, def);
|
|
1859
1786
|
});
|
|
@@ -1872,7 +1799,7 @@ function isValidJWT(token, algorithm = null) {
|
|
|
1872
1799
|
return false;
|
|
1873
1800
|
}
|
|
1874
1801
|
}
|
|
1875
|
-
const $ZodJWT =
|
|
1802
|
+
const $ZodJWT = /*@__PURE__*/ $constructor("$ZodJWT", (inst, def) => {
|
|
1876
1803
|
$ZodStringFormat.init(inst, def);
|
|
1877
1804
|
inst._zod.check = (payload) => {
|
|
1878
1805
|
if (isValidJWT(payload.value, def.alg)) return;
|
|
@@ -1885,7 +1812,7 @@ const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
|
|
|
1885
1812
|
});
|
|
1886
1813
|
};
|
|
1887
1814
|
});
|
|
1888
|
-
const $ZodNumber =
|
|
1815
|
+
const $ZodNumber = /*@__PURE__*/ $constructor("$ZodNumber", (inst, def) => {
|
|
1889
1816
|
$ZodType.init(inst, def);
|
|
1890
1817
|
inst._zod.pattern = number$1;
|
|
1891
1818
|
inst._zod.parse = (payload, _ctx) => {
|
|
@@ -1905,11 +1832,11 @@ const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
|
|
|
1905
1832
|
return payload;
|
|
1906
1833
|
};
|
|
1907
1834
|
});
|
|
1908
|
-
const $ZodNumberFormat =
|
|
1835
|
+
const $ZodNumberFormat = /*@__PURE__*/ $constructor("$ZodNumberFormat", (inst, def) => {
|
|
1909
1836
|
$ZodCheckNumberFormat.init(inst, def);
|
|
1910
1837
|
$ZodNumber.init(inst, def);
|
|
1911
1838
|
});
|
|
1912
|
-
const $ZodBoolean =
|
|
1839
|
+
const $ZodBoolean = /*@__PURE__*/ $constructor("$ZodBoolean", (inst, def) => {
|
|
1913
1840
|
$ZodType.init(inst, def);
|
|
1914
1841
|
inst._zod.pattern = boolean$1;
|
|
1915
1842
|
inst._zod.parse = (payload, _ctx) => {
|
|
@@ -1927,11 +1854,11 @@ const $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
|
|
|
1927
1854
|
return payload;
|
|
1928
1855
|
};
|
|
1929
1856
|
});
|
|
1930
|
-
const $ZodUnknown =
|
|
1857
|
+
const $ZodUnknown = /*@__PURE__*/ $constructor("$ZodUnknown", (inst, def) => {
|
|
1931
1858
|
$ZodType.init(inst, def);
|
|
1932
1859
|
inst._zod.parse = (payload) => payload;
|
|
1933
1860
|
});
|
|
1934
|
-
const $ZodNever =
|
|
1861
|
+
const $ZodNever = /*@__PURE__*/ $constructor("$ZodNever", (inst, def) => {
|
|
1935
1862
|
$ZodType.init(inst, def);
|
|
1936
1863
|
inst._zod.parse = (payload, _ctx) => {
|
|
1937
1864
|
payload.issues.push({
|
|
@@ -1947,10 +1874,10 @@ function handleArrayResult(result, final, index) {
|
|
|
1947
1874
|
if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
|
|
1948
1875
|
final.value[index] = result.value;
|
|
1949
1876
|
}
|
|
1950
|
-
const $ZodArray =
|
|
1877
|
+
const $ZodArray = /*@__PURE__*/ $constructor("$ZodArray", (inst, def) => {
|
|
1951
1878
|
$ZodType.init(inst, def);
|
|
1952
|
-
const memo
|
|
1953
|
-
memo
|
|
1879
|
+
const memo = globalConfig.memoizer;
|
|
1880
|
+
memo?.attach(inst);
|
|
1954
1881
|
inst._zod.parse = (payload, ctx) => {
|
|
1955
1882
|
const input = payload.value;
|
|
1956
1883
|
if (!Array.isArray(input)) {
|
|
@@ -1962,7 +1889,7 @@ const $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
1962
1889
|
});
|
|
1963
1890
|
return payload;
|
|
1964
1891
|
}
|
|
1965
|
-
payload.value = memo
|
|
1892
|
+
payload.value = memo ? memo.alloc(inst, payload, Array(input.length), ctx) : Array(input.length);
|
|
1966
1893
|
const proms = [];
|
|
1967
1894
|
const abortEarly = ctx?.abortEarly;
|
|
1968
1895
|
for (let i = 0; i < input.length; i++) {
|
|
@@ -1971,7 +1898,7 @@ const $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
1971
1898
|
value: item,
|
|
1972
1899
|
issues: []
|
|
1973
1900
|
}, ctx);
|
|
1974
|
-
if (result instanceof Promise) proms.push(result.then((result
|
|
1901
|
+
if (result instanceof Promise) proms.push(result.then((result) => handleArrayResult(result, payload, i)));
|
|
1975
1902
|
else {
|
|
1976
1903
|
handleArrayResult(result, payload, i);
|
|
1977
1904
|
if (abortEarly && result.issues.length !== 0 && aborted(result)) break;
|
|
@@ -2045,7 +1972,7 @@ function handleCatchall(proms, input, payload, ctx, def, inst, abortEarly) {
|
|
|
2045
1972
|
value: input[key],
|
|
2046
1973
|
issues: []
|
|
2047
1974
|
}, ctx);
|
|
2048
|
-
if (r instanceof Promise) proms.push(r.then((r
|
|
1975
|
+
if (r instanceof Promise) proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout)));
|
|
2049
1976
|
else handlePropertyResult(r, payload, key, input, optin, optout);
|
|
2050
1977
|
}
|
|
2051
1978
|
if (unrecognized.length) payload.issues.push({
|
|
@@ -2060,7 +1987,7 @@ function handleCatchall(proms, input, payload, ctx, def, inst, abortEarly) {
|
|
|
2060
1987
|
return payload;
|
|
2061
1988
|
});
|
|
2062
1989
|
}
|
|
2063
|
-
const $ZodObject =
|
|
1990
|
+
const $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => {
|
|
2064
1991
|
$ZodType.init(inst, def);
|
|
2065
1992
|
const desc = Object.getOwnPropertyDescriptor(def, "shape");
|
|
2066
1993
|
const sh = desc?.get ? desc.get.raw : def.shape ?? {};
|
|
@@ -2088,15 +2015,15 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
2088
2015
|
}
|
|
2089
2016
|
return propValues;
|
|
2090
2017
|
});
|
|
2091
|
-
const isObject$
|
|
2018
|
+
const isObject$2 = isObject;
|
|
2092
2019
|
const catchall = def.catchall;
|
|
2093
2020
|
let value;
|
|
2094
|
-
const memo
|
|
2095
|
-
memo
|
|
2021
|
+
const memo = globalConfig.memoizer;
|
|
2022
|
+
memo?.attach(inst);
|
|
2096
2023
|
inst._zod.parse = (payload, ctx) => {
|
|
2097
2024
|
value ?? (value = _normalized.value);
|
|
2098
2025
|
const input = payload.value;
|
|
2099
|
-
if (!isObject$
|
|
2026
|
+
if (!isObject$2(input)) {
|
|
2100
2027
|
payload.issues.push({
|
|
2101
2028
|
expected: "object",
|
|
2102
2029
|
code: "invalid_type",
|
|
@@ -2105,7 +2032,7 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
2105
2032
|
});
|
|
2106
2033
|
return payload;
|
|
2107
2034
|
}
|
|
2108
|
-
payload.value = memo
|
|
2035
|
+
payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
|
|
2109
2036
|
const proms = [];
|
|
2110
2037
|
const shape = value.shape;
|
|
2111
2038
|
const abortEarly = ctx?.abortEarly;
|
|
@@ -2123,25 +2050,25 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
2123
2050
|
value: input[key],
|
|
2124
2051
|
issues: []
|
|
2125
2052
|
}, ctx);
|
|
2126
|
-
if (r instanceof Promise) proms.push(r.then((r
|
|
2053
|
+
if (r instanceof Promise) proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout)));
|
|
2127
2054
|
else handlePropertyResult(r, payload, key, input, optin, optout);
|
|
2128
2055
|
}
|
|
2129
2056
|
if (!catchall) return proms.length ? Promise.all(proms).then(() => payload) : payload;
|
|
2130
2057
|
return handleCatchall(proms, input, payload, ctx, _normalized.value, inst, abortEarly === true);
|
|
2131
2058
|
};
|
|
2132
2059
|
});
|
|
2133
|
-
const $ZodObjectJIT =
|
|
2060
|
+
const $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) => {
|
|
2134
2061
|
$ZodObject.init(inst, def);
|
|
2135
2062
|
const superParse = inst._zod.parse;
|
|
2136
2063
|
const _normalized = cached(() => normalizeDef(def));
|
|
2137
|
-
const memo
|
|
2064
|
+
const memo = globalConfig.memoizer;
|
|
2138
2065
|
const generateFastpass = (shape) => {
|
|
2139
2066
|
const normalized = _normalized.value;
|
|
2140
2067
|
const syms = normalized.symbolKeys;
|
|
2141
2068
|
const doc = new Doc(["payload", "ctx"], {
|
|
2142
2069
|
shape,
|
|
2143
2070
|
inst,
|
|
2144
|
-
memo
|
|
2071
|
+
memo,
|
|
2145
2072
|
syms
|
|
2146
2073
|
});
|
|
2147
2074
|
const parseStr = (k) => `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
|
|
@@ -2161,7 +2088,7 @@ const $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def)
|
|
|
2161
2088
|
const ids = Object.create(null);
|
|
2162
2089
|
let counter = 0;
|
|
2163
2090
|
for (const key of normalized.allKeys) ids[key] = `key_${counter++}`;
|
|
2164
|
-
doc.write(memo
|
|
2091
|
+
doc.write(memo ? `const newResult = memo.alloc(inst, payload, {}, ctx);` : `const newResult = {};`);
|
|
2165
2092
|
for (const key of normalized.allKeys) {
|
|
2166
2093
|
if (key === "__proto__") continue;
|
|
2167
2094
|
const id = ids[key];
|
|
@@ -2228,8 +2155,7 @@ const $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def)
|
|
|
2228
2155
|
let fastpass;
|
|
2229
2156
|
const isObject$1 = isObject;
|
|
2230
2157
|
const jit = !globalConfig.jitless;
|
|
2231
|
-
const
|
|
2232
|
-
const fastEnabled = jit && allowsEval$1.value;
|
|
2158
|
+
const fastEnabled = jit && allowsEval.value;
|
|
2233
2159
|
const catchall = def.catchall;
|
|
2234
2160
|
let value;
|
|
2235
2161
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -2271,20 +2197,18 @@ function handleUnionResults(results, final, inst, ctx) {
|
|
|
2271
2197
|
});
|
|
2272
2198
|
return final;
|
|
2273
2199
|
}
|
|
2274
|
-
const $ZodUnion =
|
|
2200
|
+
const $ZodUnion = /*@__PURE__*/ $constructor("$ZodUnion", (inst, def) => {
|
|
2275
2201
|
$ZodType.init(inst, def);
|
|
2276
2202
|
defineLazyInternal(inst, "optin", (zod) => zod.def.options.some((o) => o._zod.optin === "defaulted") ? "defaulted" : zod.def.options.some((o) => o._zod.optin !== void 0) ? "optional" : void 0);
|
|
2277
2203
|
defineLazyInternal(inst, "optout", (zod) => zod.def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0);
|
|
2278
2204
|
defineLazyInternal(inst, "values", (zod) => {
|
|
2279
2205
|
if (zod.def.options.every((o) => o._zod.values)) return new Set(zod.def.options.flatMap((option) => Array.from(option._zod.values)));
|
|
2280
|
-
return void 0;
|
|
2281
2206
|
});
|
|
2282
2207
|
defineLazyInternal(inst, "pattern", (zod) => {
|
|
2283
2208
|
if (zod.def.options.every((o) => o._zod.pattern)) {
|
|
2284
2209
|
const patterns = zod.def.options.map((o) => o._zod.pattern);
|
|
2285
2210
|
return new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`);
|
|
2286
2211
|
}
|
|
2287
|
-
return void 0;
|
|
2288
2212
|
});
|
|
2289
2213
|
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
2290
2214
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -2305,8 +2229,8 @@ const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
|
2305
2229
|
}
|
|
2306
2230
|
}
|
|
2307
2231
|
if (!async) return handleUnionResults(results, payload, inst, ctx);
|
|
2308
|
-
return Promise.all(results).then((results
|
|
2309
|
-
return handleUnionResults(results
|
|
2232
|
+
return Promise.all(results).then((results) => {
|
|
2233
|
+
return handleUnionResults(results, payload, inst, ctx);
|
|
2310
2234
|
});
|
|
2311
2235
|
};
|
|
2312
2236
|
});
|
|
@@ -2322,7 +2246,7 @@ function discriminatorMap(def) {
|
|
|
2322
2246
|
}
|
|
2323
2247
|
return map;
|
|
2324
2248
|
}
|
|
2325
|
-
const $ZodDiscriminatedUnion =
|
|
2249
|
+
const $ZodDiscriminatedUnion = /*@__PURE__*/ $constructor("$ZodDiscriminatedUnion", (inst, def) => {
|
|
2326
2250
|
def.inclusive = false;
|
|
2327
2251
|
$ZodUnion.init(inst, def);
|
|
2328
2252
|
const _super = inst._zod.parse;
|
|
@@ -2366,7 +2290,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
|
|
|
2366
2290
|
errors: [],
|
|
2367
2291
|
note: "No matching discriminator",
|
|
2368
2292
|
discriminator: def.discriminator,
|
|
2369
|
-
options: Array.from(disc.value.keys()).filter((value
|
|
2293
|
+
options: Array.from(disc.value.keys()).filter((value) => disc.value.get(value) !== null),
|
|
2370
2294
|
input,
|
|
2371
2295
|
path: [def.discriminator],
|
|
2372
2296
|
inst
|
|
@@ -2374,7 +2298,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
|
|
|
2374
2298
|
return payload;
|
|
2375
2299
|
};
|
|
2376
2300
|
});
|
|
2377
|
-
const $ZodIntersection =
|
|
2301
|
+
const $ZodIntersection = /*@__PURE__*/ $constructor("$ZodIntersection", (inst, def) => {
|
|
2378
2302
|
$ZodType.init(inst, def);
|
|
2379
2303
|
inst._zod.parse = (payload, ctx) => {
|
|
2380
2304
|
const input = payload.value;
|
|
@@ -2386,9 +2310,8 @@ const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst,
|
|
|
2386
2310
|
value: input,
|
|
2387
2311
|
issues: []
|
|
2388
2312
|
}, ctx);
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
return handleIntersectionResults(payload, left$1, right$1);
|
|
2313
|
+
if (left instanceof Promise || right instanceof Promise) return Promise.all([left, right]).then(([left, right]) => {
|
|
2314
|
+
return handleIntersectionResults(payload, left, right);
|
|
2392
2315
|
});
|
|
2393
2316
|
return handleIntersectionResults(payload, left, right);
|
|
2394
2317
|
};
|
|
@@ -2489,10 +2412,118 @@ function handleIntersectionResults(result, left, right) {
|
|
|
2489
2412
|
result.value = merged.data;
|
|
2490
2413
|
return result;
|
|
2491
2414
|
}
|
|
2492
|
-
const $
|
|
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
|
+
}
|
|
2523
|
+
const $ZodRecord = /*@__PURE__*/ $constructor("$ZodRecord", (inst, def) => {
|
|
2493
2524
|
$ZodType.init(inst, def);
|
|
2494
|
-
const memo
|
|
2495
|
-
memo
|
|
2525
|
+
const memo = globalConfig.memoizer;
|
|
2526
|
+
memo?.attach(inst);
|
|
2496
2527
|
inst._zod.parse = (payload, ctx) => {
|
|
2497
2528
|
const input = payload.value;
|
|
2498
2529
|
if (!isPlainObject(input)) {
|
|
@@ -2507,7 +2538,7 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
2507
2538
|
const proms = [];
|
|
2508
2539
|
const values = def.keyType._zod.values;
|
|
2509
2540
|
if (values && !def.partial) {
|
|
2510
|
-
payload.value = memo
|
|
2541
|
+
payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
|
|
2511
2542
|
const recordKeys = /* @__PURE__ */ new Set();
|
|
2512
2543
|
for (const key of values) if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
2513
2544
|
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
@@ -2534,9 +2565,9 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
2534
2565
|
value: input[key],
|
|
2535
2566
|
issues: []
|
|
2536
2567
|
}, ctx);
|
|
2537
|
-
if (result instanceof Promise) proms.push(result.then((result
|
|
2538
|
-
if (result
|
|
2539
|
-
payload.value[outKey] = result
|
|
2568
|
+
if (result instanceof Promise) proms.push(result.then((result) => {
|
|
2569
|
+
if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
|
|
2570
|
+
payload.value[outKey] = result.value;
|
|
2540
2571
|
}));
|
|
2541
2572
|
else {
|
|
2542
2573
|
if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
|
|
@@ -2544,12 +2575,14 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
2544
2575
|
}
|
|
2545
2576
|
}
|
|
2546
2577
|
let unrecognized;
|
|
2547
|
-
for (const key in input) if (!recordKeys.has(key))
|
|
2548
|
-
if (
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2578
|
+
for (const key in input) if (!recordKeys.has(key)) {
|
|
2579
|
+
if (def.mode === "loose") {
|
|
2580
|
+
if (key === "__proto__") continue;
|
|
2581
|
+
payload.value[key] = input[key];
|
|
2582
|
+
} else {
|
|
2583
|
+
unrecognized = unrecognized ?? [];
|
|
2584
|
+
unrecognized.push(key);
|
|
2585
|
+
}
|
|
2553
2586
|
}
|
|
2554
2587
|
if (unrecognized && unrecognized.length > 0) payload.issues.push({
|
|
2555
2588
|
code: "unrecognized_keys",
|
|
@@ -2559,7 +2592,7 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
2559
2592
|
continue: true
|
|
2560
2593
|
});
|
|
2561
2594
|
} else {
|
|
2562
|
-
payload.value = memo
|
|
2595
|
+
payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
|
|
2563
2596
|
let unrecognized;
|
|
2564
2597
|
for (const key of Reflect.ownKeys(input)) {
|
|
2565
2598
|
if (key === "__proto__") continue;
|
|
@@ -2569,8 +2602,7 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
2569
2602
|
issues: []
|
|
2570
2603
|
}, ctx);
|
|
2571
2604
|
if (keyResult instanceof Promise) throw new Error("Async schemas not supported in object keys currently");
|
|
2572
|
-
|
|
2573
|
-
if (checkNumericKey) {
|
|
2605
|
+
if (typeof key === "string" && number$1.test(key) && keyResult.issues.length) {
|
|
2574
2606
|
const retryResult = def.keyType._zod.run({
|
|
2575
2607
|
value: Number(key),
|
|
2576
2608
|
issues: []
|
|
@@ -2599,9 +2631,9 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
2599
2631
|
value: input[key],
|
|
2600
2632
|
issues: []
|
|
2601
2633
|
}, ctx);
|
|
2602
|
-
if (result instanceof Promise) proms.push(result.then((result
|
|
2603
|
-
if (result
|
|
2604
|
-
payload.value[outKey] = result
|
|
2634
|
+
if (result instanceof Promise) proms.push(result.then((result) => {
|
|
2635
|
+
if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
|
|
2636
|
+
payload.value[outKey] = result.value;
|
|
2605
2637
|
}));
|
|
2606
2638
|
else {
|
|
2607
2639
|
if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
|
|
@@ -2620,7 +2652,7 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
2620
2652
|
return payload;
|
|
2621
2653
|
};
|
|
2622
2654
|
});
|
|
2623
|
-
const $ZodEnum =
|
|
2655
|
+
const $ZodEnum = /*@__PURE__*/ $constructor("$ZodEnum", (inst, def) => {
|
|
2624
2656
|
$ZodType.init(inst, def);
|
|
2625
2657
|
const values = getEnumValues(def.entries);
|
|
2626
2658
|
const valuesSet = new Set(values);
|
|
@@ -2641,7 +2673,7 @@ const $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
|
|
|
2641
2673
|
return payload;
|
|
2642
2674
|
};
|
|
2643
2675
|
});
|
|
2644
|
-
const $ZodLiteral =
|
|
2676
|
+
const $ZodLiteral = /*@__PURE__*/ $constructor("$ZodLiteral", (inst, def) => {
|
|
2645
2677
|
$ZodType.init(inst, def);
|
|
2646
2678
|
const values = new Set(def.values);
|
|
2647
2679
|
inst._zod.values = values;
|
|
@@ -2661,20 +2693,17 @@ const $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
|
|
|
2661
2693
|
return payload;
|
|
2662
2694
|
};
|
|
2663
2695
|
});
|
|
2664
|
-
const $ZodTransform =
|
|
2696
|
+
const $ZodTransform = /*@__PURE__*/ $constructor("$ZodTransform", (inst, def) => {
|
|
2665
2697
|
$ZodType.init(inst, def);
|
|
2666
2698
|
inst._zod.optin = "optional";
|
|
2667
|
-
globalConfig.memoizer
|
|
2699
|
+
globalConfig.memoizer?.guard(inst);
|
|
2668
2700
|
inst._zod.parse = (payload, ctx) => {
|
|
2669
2701
|
if (ctx.direction === "backward") throw new $ZodEncodeError(inst.constructor.name);
|
|
2670
2702
|
const _out = def.transform(payload.value, payload);
|
|
2671
|
-
if (ctx.async) {
|
|
2672
|
-
|
|
2673
|
-
return
|
|
2674
|
-
|
|
2675
|
-
return payload;
|
|
2676
|
-
});
|
|
2677
|
-
}
|
|
2703
|
+
if (ctx.async) return (_out instanceof Promise ? _out : Promise.resolve(_out)).then((output) => {
|
|
2704
|
+
payload.value = output;
|
|
2705
|
+
return payload;
|
|
2706
|
+
});
|
|
2678
2707
|
if (_out instanceof Promise) throw new $ZodAsyncError();
|
|
2679
2708
|
payload.value = _out;
|
|
2680
2709
|
return payload;
|
|
@@ -2684,13 +2713,13 @@ function handleOptionalResult(payload, result) {
|
|
|
2684
2713
|
payload.value = result.issues.length ? void 0 : result.value;
|
|
2685
2714
|
return payload;
|
|
2686
2715
|
}
|
|
2687
|
-
const $ZodOptional =
|
|
2716
|
+
const $ZodOptional = /*@__PURE__*/ $constructor("$ZodOptional", (inst, def) => {
|
|
2688
2717
|
$ZodType.init(inst, def);
|
|
2689
2718
|
defineLazyInternal(inst, "optin", (zod) => zod.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional");
|
|
2690
2719
|
inst._zod.optout = "optional";
|
|
2691
2720
|
defineLazyInternal(inst, "values", (zod) => {
|
|
2692
2721
|
const values = zod.def.innerType._zod.values;
|
|
2693
|
-
return values ? new Set([...values, void 0]) : void 0;
|
|
2722
|
+
return values ? /* @__PURE__ */ new Set([...values, void 0]) : void 0;
|
|
2694
2723
|
});
|
|
2695
2724
|
defineLazyInternal(inst, "pattern", (zod) => {
|
|
2696
2725
|
const pattern = zod.def.innerType._zod.pattern;
|
|
@@ -2703,13 +2732,13 @@ const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) =>
|
|
|
2703
2732
|
value: payload.value,
|
|
2704
2733
|
issues: []
|
|
2705
2734
|
}, ctx);
|
|
2706
|
-
if (result instanceof Promise) return result.then((result
|
|
2735
|
+
if (result instanceof Promise) return result.then((result) => handleOptionalResult(payload, result));
|
|
2707
2736
|
return handleOptionalResult(payload, result);
|
|
2708
2737
|
}
|
|
2709
2738
|
return def.innerType._zod.run(payload, ctx);
|
|
2710
2739
|
};
|
|
2711
2740
|
});
|
|
2712
|
-
const $ZodExactOptional =
|
|
2741
|
+
const $ZodExactOptional = /*@__PURE__*/ $constructor("$ZodExactOptional", (inst, def) => {
|
|
2713
2742
|
$ZodOptional.init(inst, def);
|
|
2714
2743
|
defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
|
|
2715
2744
|
defineLazyInternal(inst, "pattern", (zod) => zod.def.innerType._zod.pattern);
|
|
@@ -2717,7 +2746,7 @@ const $ZodExactOptional = /* @__PURE__ */ $constructor("$ZodExactOptional", (ins
|
|
|
2717
2746
|
return def.innerType._zod.run(payload, ctx);
|
|
2718
2747
|
};
|
|
2719
2748
|
});
|
|
2720
|
-
const $ZodNullable =
|
|
2749
|
+
const $ZodNullable = /*@__PURE__*/ $constructor("$ZodNullable", (inst, def) => {
|
|
2721
2750
|
$ZodType.init(inst, def);
|
|
2722
2751
|
defineLazyInternal(inst, "optin", (zod) => zod.def.innerType._zod.optin);
|
|
2723
2752
|
defineLazyInternal(inst, "optout", (zod) => zod.def.innerType._zod.optout);
|
|
@@ -2726,14 +2755,14 @@ const $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) =>
|
|
|
2726
2755
|
return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0;
|
|
2727
2756
|
});
|
|
2728
2757
|
defineLazyInternal(inst, "values", (zod) => {
|
|
2729
|
-
return zod.def.innerType._zod.values ? new Set([...zod.def.innerType._zod.values, null]) : void 0;
|
|
2758
|
+
return zod.def.innerType._zod.values ? /* @__PURE__ */ new Set([...zod.def.innerType._zod.values, null]) : void 0;
|
|
2730
2759
|
});
|
|
2731
2760
|
inst._zod.parse = (payload, ctx) => {
|
|
2732
2761
|
if (payload.value === null) return payload;
|
|
2733
2762
|
return def.innerType._zod.run(payload, ctx);
|
|
2734
2763
|
};
|
|
2735
2764
|
});
|
|
2736
|
-
const $ZodDefault =
|
|
2765
|
+
const $ZodDefault = /*@__PURE__*/ $constructor("$ZodDefault", (inst, def) => {
|
|
2737
2766
|
$ZodType.init(inst, def);
|
|
2738
2767
|
inst._zod.optin = "defaulted";
|
|
2739
2768
|
defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
|
|
@@ -2747,7 +2776,7 @@ const $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => {
|
|
|
2747
2776
|
return payload;
|
|
2748
2777
|
}
|
|
2749
2778
|
const result = def.innerType._zod.run(payload, ctx);
|
|
2750
|
-
if (result instanceof Promise) return result.then((result
|
|
2779
|
+
if (result instanceof Promise) return result.then((result) => handleDefaultResult(result, def));
|
|
2751
2780
|
return handleDefaultResult(result, def);
|
|
2752
2781
|
};
|
|
2753
2782
|
});
|
|
@@ -2755,7 +2784,7 @@ function handleDefaultResult(payload, def) {
|
|
|
2755
2784
|
if (payload.value === void 0) payload.value = def.defaultValue;
|
|
2756
2785
|
return payload;
|
|
2757
2786
|
}
|
|
2758
|
-
const $ZodPrefault =
|
|
2787
|
+
const $ZodPrefault = /*@__PURE__*/ $constructor("$ZodPrefault", (inst, def) => {
|
|
2759
2788
|
$ZodType.init(inst, def);
|
|
2760
2789
|
inst._zod.optin = "defaulted";
|
|
2761
2790
|
defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
|
|
@@ -2765,7 +2794,7 @@ const $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) =>
|
|
|
2765
2794
|
return def.innerType._zod.run(payload, ctx);
|
|
2766
2795
|
};
|
|
2767
2796
|
});
|
|
2768
|
-
const $ZodNonOptional =
|
|
2797
|
+
const $ZodNonOptional = /*@__PURE__*/ $constructor("$ZodNonOptional", (inst, def) => {
|
|
2769
2798
|
$ZodType.init(inst, def);
|
|
2770
2799
|
defineLazyInternal(inst, "values", (zod) => {
|
|
2771
2800
|
const v = zod.def.innerType._zod.values;
|
|
@@ -2773,7 +2802,7 @@ const $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, d
|
|
|
2773
2802
|
});
|
|
2774
2803
|
inst._zod.parse = (payload, ctx) => {
|
|
2775
2804
|
const result = def.innerType._zod.run(payload, ctx);
|
|
2776
|
-
if (result instanceof Promise) return result.then((result
|
|
2805
|
+
if (result instanceof Promise) return result.then((result) => handleNonOptionalResult(result, inst));
|
|
2777
2806
|
return handleNonOptionalResult(result, inst);
|
|
2778
2807
|
};
|
|
2779
2808
|
});
|
|
@@ -2800,7 +2829,7 @@ function handleCatchResult(payload, result, def, ctx) {
|
|
|
2800
2829
|
});
|
|
2801
2830
|
return payload;
|
|
2802
2831
|
}
|
|
2803
|
-
const $ZodCatch =
|
|
2832
|
+
const $ZodCatch = /*@__PURE__*/ $constructor("$ZodCatch", (inst, def) => {
|
|
2804
2833
|
$ZodType.init(inst, def);
|
|
2805
2834
|
defineLazyInternal(inst, "optin", (zod) => zod.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional");
|
|
2806
2835
|
defineLazyInternal(inst, "optout", (zod) => zod.def.innerType._zod.optout);
|
|
@@ -2811,11 +2840,11 @@ const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
|
2811
2840
|
value: payload.value,
|
|
2812
2841
|
issues: []
|
|
2813
2842
|
}, ctx);
|
|
2814
|
-
if (result instanceof Promise) return result.then((result
|
|
2843
|
+
if (result instanceof Promise) return result.then((result) => handleCatchResult(payload, result, def, ctx));
|
|
2815
2844
|
return handleCatchResult(payload, result, def, ctx);
|
|
2816
2845
|
};
|
|
2817
2846
|
});
|
|
2818
|
-
const $ZodPipe =
|
|
2847
|
+
const $ZodPipe = /*@__PURE__*/ $constructor("$ZodPipe", (inst, def) => {
|
|
2819
2848
|
$ZodType.init(inst, def);
|
|
2820
2849
|
defineLazyInternal(inst, "values", (zod) => zod.def.in._zod.values);
|
|
2821
2850
|
defineLazyInternal(inst, "optin", (zod) => zod.def.in._zod.optin);
|
|
@@ -2824,11 +2853,11 @@ const $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => {
|
|
|
2824
2853
|
inst._zod.parse = (payload, ctx) => {
|
|
2825
2854
|
if (ctx.direction === "backward") {
|
|
2826
2855
|
const right = def.out._zod.run(payload, ctx);
|
|
2827
|
-
if (right instanceof Promise) return right.then((right
|
|
2856
|
+
if (right instanceof Promise) return right.then((right) => handlePipeResult(right, def.in, ctx));
|
|
2828
2857
|
return handlePipeResult(right, def.in, ctx);
|
|
2829
2858
|
}
|
|
2830
2859
|
const left = def.in._zod.run(payload, ctx);
|
|
2831
|
-
if (left instanceof Promise) return left.then((left
|
|
2860
|
+
if (left instanceof Promise) return left.then((left) => handlePipeResult(left, def.out, ctx));
|
|
2832
2861
|
return handlePipeResult(left, def.out, ctx);
|
|
2833
2862
|
};
|
|
2834
2863
|
});
|
|
@@ -2842,7 +2871,7 @@ function handlePipeResult(left, next, ctx) {
|
|
|
2842
2871
|
issues: left.issues
|
|
2843
2872
|
}, ctx);
|
|
2844
2873
|
}
|
|
2845
|
-
const $ZodReadonly =
|
|
2874
|
+
const $ZodReadonly = /*@__PURE__*/ $constructor("$ZodReadonly", (inst, def) => {
|
|
2846
2875
|
$ZodType.init(inst, def);
|
|
2847
2876
|
defineLazyInternal(inst, "propValues", (zod) => zod.def.innerType._zod.propValues);
|
|
2848
2877
|
defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
|
|
@@ -2859,7 +2888,22 @@ function handleReadonlyResult(payload) {
|
|
|
2859
2888
|
if (!payload.memo) payload.value = Object.freeze(payload.value);
|
|
2860
2889
|
return payload;
|
|
2861
2890
|
}
|
|
2862
|
-
const $
|
|
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
|
+
});
|
|
2906
|
+
const $ZodCustom = /*@__PURE__*/ $constructor("$ZodCustom", (inst, def) => {
|
|
2863
2907
|
$ZodCheck.init(inst, def);
|
|
2864
2908
|
$ZodType.init(inst, def);
|
|
2865
2909
|
inst._zod.parse = (payload, _) => {
|
|
@@ -2868,9 +2912,8 @@ const $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
|
|
|
2868
2912
|
inst._zod.check = (payload) => {
|
|
2869
2913
|
const input = payload.value;
|
|
2870
2914
|
const r = def.fn(input);
|
|
2871
|
-
if (r instanceof Promise) return r.then((r
|
|
2915
|
+
if (r instanceof Promise) return r.then((r) => handleRefineResult(r, payload, input, inst));
|
|
2872
2916
|
handleRefineResult(r, payload, input, inst);
|
|
2873
|
-
return;
|
|
2874
2917
|
};
|
|
2875
2918
|
});
|
|
2876
2919
|
function handleRefineResult(result, payload, input, inst) {
|
|
@@ -2886,7 +2929,6 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
2886
2929
|
payload.issues.push(issue(_iss));
|
|
2887
2930
|
}
|
|
2888
2931
|
}
|
|
2889
|
-
|
|
2890
2932
|
//#endregion
|
|
2891
2933
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/memoizer.js
|
|
2892
2934
|
var $ZodCyclicError = class extends Error {
|
|
@@ -2907,15 +2949,15 @@ function cloneIssues(issues) {
|
|
|
2907
2949
|
path: iss.path.slice()
|
|
2908
2950
|
} : { ...iss });
|
|
2909
2951
|
}
|
|
2910
|
-
const recursive =
|
|
2952
|
+
const recursive = /*@__PURE__*/ new WeakMap();
|
|
2911
2953
|
/** What the walk established, in order of certainty: ordered so the strongest answer among children wins. */
|
|
2912
2954
|
const NONE = 0;
|
|
2913
2955
|
const ASSUMED = 1;
|
|
2914
2956
|
const PROVEN = 2;
|
|
2915
2957
|
/** Whether this schema's subtree contains a cycle, so one parse can re-enter it. */
|
|
2916
2958
|
function isRecursive(inst, stack, resolve) {
|
|
2917
|
-
const cached
|
|
2918
|
-
if (cached
|
|
2959
|
+
const cached = recursive.get(inst);
|
|
2960
|
+
if (cached !== void 0) return cached ? PROVEN : NONE;
|
|
2919
2961
|
if (stack.has(inst)) return PROVEN;
|
|
2920
2962
|
stack.add(inst);
|
|
2921
2963
|
let result = NONE;
|
|
@@ -2935,15 +2977,14 @@ function isRecursive(inst, stack, resolve) {
|
|
|
2935
2977
|
}
|
|
2936
2978
|
return answer;
|
|
2937
2979
|
};
|
|
2938
|
-
const merge
|
|
2980
|
+
const merge = (answer) => {
|
|
2939
2981
|
if (answer > result) result = answer;
|
|
2940
2982
|
};
|
|
2941
2983
|
const def = inst._zod.def;
|
|
2942
|
-
|
|
2943
|
-
switch (kind) {
|
|
2984
|
+
switch (def.type) {
|
|
2944
2985
|
case "object": {
|
|
2945
2986
|
const raw = rawShape(def);
|
|
2946
|
-
merge
|
|
2987
|
+
merge(raw ? shape(raw, true) : ASSUMED);
|
|
2947
2988
|
check(def.catchall);
|
|
2948
2989
|
break;
|
|
2949
2990
|
}
|
|
@@ -2990,7 +3031,7 @@ function isRecursive(inst, stack, resolve) {
|
|
|
2990
3031
|
break;
|
|
2991
3032
|
case "lazy": {
|
|
2992
3033
|
const inner = def._cachedInner ?? (resolve ? inst._zod.innerType : void 0);
|
|
2993
|
-
merge
|
|
3034
|
+
merge(inner ? isRecursive(inner, stack, false) : ASSUMED);
|
|
2994
3035
|
break;
|
|
2995
3036
|
}
|
|
2996
3037
|
case "template_literal":
|
|
@@ -3054,8 +3095,8 @@ const memo = {
|
|
|
3054
3095
|
return empty;
|
|
3055
3096
|
},
|
|
3056
3097
|
guard(inst) {
|
|
3057
|
-
var _a
|
|
3058
|
-
(_a
|
|
3098
|
+
var _a;
|
|
3099
|
+
(_a = inst._zod).deferred ?? (_a.deferred = []);
|
|
3059
3100
|
inst._zod.deferred.push(() => {
|
|
3060
3101
|
const base = inst._zod.parse;
|
|
3061
3102
|
const wrapped = (payload, ctx) => {
|
|
@@ -3067,12 +3108,12 @@ const memo = {
|
|
|
3067
3108
|
});
|
|
3068
3109
|
},
|
|
3069
3110
|
attach(inst) {
|
|
3070
|
-
var _a
|
|
3111
|
+
var _a;
|
|
3071
3112
|
let isRecursiveInst;
|
|
3072
3113
|
let rechecked = false;
|
|
3073
3114
|
let lastCtx;
|
|
3074
3115
|
let lastBucket;
|
|
3075
|
-
(_a
|
|
3116
|
+
(_a = inst._zod).deferred ?? (_a.deferred = []);
|
|
3076
3117
|
inst._zod.deferred.push(() => {
|
|
3077
3118
|
const base = inst._zod.parse;
|
|
3078
3119
|
const wrapped = (payload, ctx) => {
|
|
@@ -3141,7 +3182,6 @@ function isBackEdge(ctx, value) {
|
|
|
3141
3182
|
const backEdges = ctx[STATE]?.backEdges;
|
|
3142
3183
|
return backEdges !== void 0 && isRef(value) && backEdges.has(value);
|
|
3143
3184
|
}
|
|
3144
|
-
|
|
3145
3185
|
//#endregion
|
|
3146
3186
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/en.js
|
|
3147
3187
|
const error = () => {
|
|
@@ -3209,48 +3249,40 @@ const error = () => {
|
|
|
3209
3249
|
if (type === "number" && typeof input === "number" && !Number.isFinite(input)) return String(input);
|
|
3210
3250
|
return TypeDictionary[type] ?? type;
|
|
3211
3251
|
}
|
|
3212
|
-
return (issue
|
|
3213
|
-
switch (issue
|
|
3214
|
-
case "invalid_type": {
|
|
3215
|
-
const expected = getTypeName(issue$1.expected);
|
|
3216
|
-
const receivedType = parsedType(issue$1.input);
|
|
3217
|
-
const received = getTypeName(receivedType, issue$1.input);
|
|
3218
|
-
return `Invalid input: expected ${expected}, received ${received}`;
|
|
3219
|
-
}
|
|
3252
|
+
return (issue) => {
|
|
3253
|
+
switch (issue.code) {
|
|
3254
|
+
case "invalid_type": return `Invalid input: expected ${getTypeName(issue.expected)}, received ${getTypeName(parsedType(issue.input), issue.input)}`;
|
|
3220
3255
|
case "invalid_value":
|
|
3221
|
-
if (issue
|
|
3222
|
-
return `Invalid option: expected one of ${joinValues(issue
|
|
3256
|
+
if (issue.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue.values[0])}`;
|
|
3257
|
+
return `Invalid option: expected one of ${joinValues(issue.values, "|")}`;
|
|
3223
3258
|
case "too_big": {
|
|
3224
|
-
const adj = issue
|
|
3225
|
-
const sizing = getSizing(issue
|
|
3226
|
-
if (sizing) return `Too big: expected ${issue
|
|
3227
|
-
return `Too big: expected ${issue
|
|
3259
|
+
const adj = issue.exact ? "exactly " : issue.inclusive ? "<=" : "<";
|
|
3260
|
+
const sizing = getSizing(issue.origin);
|
|
3261
|
+
if (sizing) return `Too big: expected ${issue.origin ?? "value"} to have ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elements"}`;
|
|
3262
|
+
return `Too big: expected ${issue.origin ?? "value"} to be ${adj}${issue.maximum.toString()}`;
|
|
3228
3263
|
}
|
|
3229
3264
|
case "too_small": {
|
|
3230
|
-
const adj = issue
|
|
3231
|
-
const sizing = getSizing(issue
|
|
3232
|
-
if (sizing) return `Too small: expected ${issue
|
|
3233
|
-
return `Too small: expected ${issue
|
|
3265
|
+
const adj = issue.exact ? "exactly " : issue.inclusive ? ">=" : ">";
|
|
3266
|
+
const sizing = getSizing(issue.origin);
|
|
3267
|
+
if (sizing) return `Too small: expected ${issue.origin} to have ${adj}${issue.minimum.toString()} ${sizing.unit}`;
|
|
3268
|
+
return `Too small: expected ${issue.origin} to be ${adj}${issue.minimum.toString()}`;
|
|
3234
3269
|
}
|
|
3235
3270
|
case "invalid_format": {
|
|
3236
|
-
const _issue = issue
|
|
3271
|
+
const _issue = issue;
|
|
3237
3272
|
if (_issue.format === "starts_with") return `Invalid string: must start with "${_issue.prefix}"`;
|
|
3238
3273
|
if (_issue.format === "ends_with") return `Invalid string: must end with "${_issue.suffix}"`;
|
|
3239
3274
|
if (_issue.format === "includes") return `Invalid string: must include "${_issue.includes}"`;
|
|
3240
3275
|
if (_issue.format === "regex") return `Invalid string: must match pattern ${_issue.pattern}`;
|
|
3241
|
-
return `Invalid ${FormatDictionary[_issue.format] ?? issue
|
|
3276
|
+
return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;
|
|
3242
3277
|
}
|
|
3243
|
-
case "not_multiple_of": return `Invalid number: must be a multiple of ${issue
|
|
3244
|
-
case "unrecognized_keys": return `Unrecognized key${issue
|
|
3245
|
-
case "invalid_key": return `Invalid key in ${issue
|
|
3278
|
+
case "not_multiple_of": return `Invalid number: must be a multiple of ${issue.divisor}`;
|
|
3279
|
+
case "unrecognized_keys": return `Unrecognized key${issue.keys.length > 1 ? "s" : ""}: ${joinValues(issue.keys, ", ")}`;
|
|
3280
|
+
case "invalid_key": return `Invalid key in ${issue.origin}`;
|
|
3246
3281
|
case "invalid_union":
|
|
3247
|
-
if (issue
|
|
3248
|
-
|
|
3249
|
-
return `Invalid discriminator value. Expected ${opts}`;
|
|
3250
|
-
}
|
|
3251
|
-
if (issue$1.inclusive === false) return "Invalid input: more than one option matched";
|
|
3282
|
+
if (issue.options && Array.isArray(issue.options) && issue.options.length > 0) return `Invalid discriminator value. Expected ${issue.options.map((o) => `'${o}'`).join(" | ")}`;
|
|
3283
|
+
if (issue.inclusive === false) return "Invalid input: more than one option matched";
|
|
3252
3284
|
return "Invalid input";
|
|
3253
|
-
case "invalid_element": return `Invalid value in ${issue
|
|
3285
|
+
case "invalid_element": return `Invalid value in ${issue.origin}`;
|
|
3254
3286
|
default: return `Invalid input`;
|
|
3255
3287
|
}
|
|
3256
3288
|
};
|
|
@@ -3258,7 +3290,6 @@ const error = () => {
|
|
|
3258
3290
|
function en_default() {
|
|
3259
3291
|
return { localeError: error() };
|
|
3260
3292
|
}
|
|
3261
|
-
|
|
3262
3293
|
//#endregion
|
|
3263
3294
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/registries.js
|
|
3264
3295
|
var _a;
|
|
@@ -3268,9 +3299,9 @@ var $ZodRegistry = class {
|
|
|
3268
3299
|
this._idmap = /* @__PURE__ */ new Map();
|
|
3269
3300
|
}
|
|
3270
3301
|
add(schema, ..._meta) {
|
|
3271
|
-
const meta
|
|
3272
|
-
this._map.set(schema, meta
|
|
3273
|
-
if (meta
|
|
3302
|
+
const meta = _meta[0];
|
|
3303
|
+
this._map.set(schema, meta);
|
|
3304
|
+
if (meta && typeof meta === "object" && "id" in meta) this._idmap.set(meta.id, schema);
|
|
3274
3305
|
return this;
|
|
3275
3306
|
}
|
|
3276
3307
|
clear() {
|
|
@@ -3279,8 +3310,8 @@ var $ZodRegistry = class {
|
|
|
3279
3310
|
return this;
|
|
3280
3311
|
}
|
|
3281
3312
|
remove(schema) {
|
|
3282
|
-
const meta
|
|
3283
|
-
if (meta
|
|
3313
|
+
const meta = this._map.get(schema);
|
|
3314
|
+
if (meta && typeof meta === "object" && "id" in meta) this._idmap.delete(meta.id);
|
|
3284
3315
|
this._map.delete(schema);
|
|
3285
3316
|
return this;
|
|
3286
3317
|
}
|
|
@@ -3306,21 +3337,20 @@ function registry() {
|
|
|
3306
3337
|
}
|
|
3307
3338
|
(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
|
|
3308
3339
|
const globalRegistry = globalThis.__zod_globalRegistry;
|
|
3309
|
-
|
|
3310
3340
|
//#endregion
|
|
3311
3341
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/api.js
|
|
3312
3342
|
function snapshotChecks(def) {
|
|
3313
3343
|
if (def.checks) def.checks = [...def.checks];
|
|
3314
3344
|
return def;
|
|
3315
3345
|
}
|
|
3316
|
-
|
|
3346
|
+
// @__NO_SIDE_EFFECTS__
|
|
3317
3347
|
function _string(Class, params) {
|
|
3318
3348
|
return new Class(snapshotChecks({
|
|
3319
3349
|
type: "string",
|
|
3320
3350
|
...normalizeParams(params)
|
|
3321
3351
|
}));
|
|
3322
3352
|
}
|
|
3323
|
-
|
|
3353
|
+
// @__NO_SIDE_EFFECTS__
|
|
3324
3354
|
function _email(Class, params) {
|
|
3325
3355
|
return new Class({
|
|
3326
3356
|
type: "string",
|
|
@@ -3330,7 +3360,7 @@ function _email(Class, params) {
|
|
|
3330
3360
|
...normalizeParams(params)
|
|
3331
3361
|
});
|
|
3332
3362
|
}
|
|
3333
|
-
|
|
3363
|
+
// @__NO_SIDE_EFFECTS__
|
|
3334
3364
|
function _guid(Class, params) {
|
|
3335
3365
|
return new Class({
|
|
3336
3366
|
type: "string",
|
|
@@ -3340,7 +3370,7 @@ function _guid(Class, params) {
|
|
|
3340
3370
|
...normalizeParams(params)
|
|
3341
3371
|
});
|
|
3342
3372
|
}
|
|
3343
|
-
|
|
3373
|
+
// @__NO_SIDE_EFFECTS__
|
|
3344
3374
|
function _uuid(Class, params) {
|
|
3345
3375
|
return new Class({
|
|
3346
3376
|
type: "string",
|
|
@@ -3350,7 +3380,7 @@ function _uuid(Class, params) {
|
|
|
3350
3380
|
...normalizeParams(params)
|
|
3351
3381
|
});
|
|
3352
3382
|
}
|
|
3353
|
-
|
|
3383
|
+
// @__NO_SIDE_EFFECTS__
|
|
3354
3384
|
function _uuidv4(Class, params) {
|
|
3355
3385
|
return new Class({
|
|
3356
3386
|
type: "string",
|
|
@@ -3361,7 +3391,7 @@ function _uuidv4(Class, params) {
|
|
|
3361
3391
|
...normalizeParams(params)
|
|
3362
3392
|
});
|
|
3363
3393
|
}
|
|
3364
|
-
|
|
3394
|
+
// @__NO_SIDE_EFFECTS__
|
|
3365
3395
|
function _uuidv6(Class, params) {
|
|
3366
3396
|
return new Class({
|
|
3367
3397
|
type: "string",
|
|
@@ -3372,7 +3402,7 @@ function _uuidv6(Class, params) {
|
|
|
3372
3402
|
...normalizeParams(params)
|
|
3373
3403
|
});
|
|
3374
3404
|
}
|
|
3375
|
-
|
|
3405
|
+
// @__NO_SIDE_EFFECTS__
|
|
3376
3406
|
function _uuidv7(Class, params) {
|
|
3377
3407
|
return new Class({
|
|
3378
3408
|
type: "string",
|
|
@@ -3383,7 +3413,7 @@ function _uuidv7(Class, params) {
|
|
|
3383
3413
|
...normalizeParams(params)
|
|
3384
3414
|
});
|
|
3385
3415
|
}
|
|
3386
|
-
|
|
3416
|
+
// @__NO_SIDE_EFFECTS__
|
|
3387
3417
|
function _url(Class, params) {
|
|
3388
3418
|
return new Class({
|
|
3389
3419
|
type: "string",
|
|
@@ -3393,7 +3423,7 @@ function _url(Class, params) {
|
|
|
3393
3423
|
...normalizeParams(params)
|
|
3394
3424
|
});
|
|
3395
3425
|
}
|
|
3396
|
-
|
|
3426
|
+
// @__NO_SIDE_EFFECTS__
|
|
3397
3427
|
function _emoji(Class, params) {
|
|
3398
3428
|
return new Class({
|
|
3399
3429
|
type: "string",
|
|
@@ -3403,7 +3433,7 @@ function _emoji(Class, params) {
|
|
|
3403
3433
|
...normalizeParams(params)
|
|
3404
3434
|
});
|
|
3405
3435
|
}
|
|
3406
|
-
|
|
3436
|
+
// @__NO_SIDE_EFFECTS__
|
|
3407
3437
|
function _nanoid(Class, params) {
|
|
3408
3438
|
return new Class({
|
|
3409
3439
|
type: "string",
|
|
@@ -3418,7 +3448,7 @@ function _nanoid(Class, params) {
|
|
|
3418
3448
|
* (timestamps embedded in the id). Use {@link _cuid2} instead.
|
|
3419
3449
|
* See https://github.com/paralleldrive/cuid.
|
|
3420
3450
|
*/
|
|
3421
|
-
|
|
3451
|
+
// @__NO_SIDE_EFFECTS__
|
|
3422
3452
|
function _cuid(Class, params) {
|
|
3423
3453
|
return new Class({
|
|
3424
3454
|
type: "string",
|
|
@@ -3428,7 +3458,7 @@ function _cuid(Class, params) {
|
|
|
3428
3458
|
...normalizeParams(params)
|
|
3429
3459
|
});
|
|
3430
3460
|
}
|
|
3431
|
-
|
|
3461
|
+
// @__NO_SIDE_EFFECTS__
|
|
3432
3462
|
function _cuid2(Class, params) {
|
|
3433
3463
|
return new Class({
|
|
3434
3464
|
type: "string",
|
|
@@ -3438,7 +3468,7 @@ function _cuid2(Class, params) {
|
|
|
3438
3468
|
...normalizeParams(params)
|
|
3439
3469
|
});
|
|
3440
3470
|
}
|
|
3441
|
-
|
|
3471
|
+
// @__NO_SIDE_EFFECTS__
|
|
3442
3472
|
function _ulid(Class, params) {
|
|
3443
3473
|
return new Class({
|
|
3444
3474
|
type: "string",
|
|
@@ -3448,7 +3478,7 @@ function _ulid(Class, params) {
|
|
|
3448
3478
|
...normalizeParams(params)
|
|
3449
3479
|
});
|
|
3450
3480
|
}
|
|
3451
|
-
|
|
3481
|
+
// @__NO_SIDE_EFFECTS__
|
|
3452
3482
|
function _xid(Class, params) {
|
|
3453
3483
|
return new Class({
|
|
3454
3484
|
type: "string",
|
|
@@ -3458,7 +3488,7 @@ function _xid(Class, params) {
|
|
|
3458
3488
|
...normalizeParams(params)
|
|
3459
3489
|
});
|
|
3460
3490
|
}
|
|
3461
|
-
|
|
3491
|
+
// @__NO_SIDE_EFFECTS__
|
|
3462
3492
|
function _ksuid(Class, params) {
|
|
3463
3493
|
return new Class({
|
|
3464
3494
|
type: "string",
|
|
@@ -3468,7 +3498,7 @@ function _ksuid(Class, params) {
|
|
|
3468
3498
|
...normalizeParams(params)
|
|
3469
3499
|
});
|
|
3470
3500
|
}
|
|
3471
|
-
|
|
3501
|
+
// @__NO_SIDE_EFFECTS__
|
|
3472
3502
|
function _ipv4(Class, params) {
|
|
3473
3503
|
return new Class({
|
|
3474
3504
|
type: "string",
|
|
@@ -3478,7 +3508,7 @@ function _ipv4(Class, params) {
|
|
|
3478
3508
|
...normalizeParams(params)
|
|
3479
3509
|
});
|
|
3480
3510
|
}
|
|
3481
|
-
|
|
3511
|
+
// @__NO_SIDE_EFFECTS__
|
|
3482
3512
|
function _ipv6(Class, params) {
|
|
3483
3513
|
return new Class({
|
|
3484
3514
|
type: "string",
|
|
@@ -3488,7 +3518,7 @@ function _ipv6(Class, params) {
|
|
|
3488
3518
|
...normalizeParams(params)
|
|
3489
3519
|
});
|
|
3490
3520
|
}
|
|
3491
|
-
|
|
3521
|
+
// @__NO_SIDE_EFFECTS__
|
|
3492
3522
|
function _cidrv4(Class, params) {
|
|
3493
3523
|
return new Class({
|
|
3494
3524
|
type: "string",
|
|
@@ -3498,7 +3528,7 @@ function _cidrv4(Class, params) {
|
|
|
3498
3528
|
...normalizeParams(params)
|
|
3499
3529
|
});
|
|
3500
3530
|
}
|
|
3501
|
-
|
|
3531
|
+
// @__NO_SIDE_EFFECTS__
|
|
3502
3532
|
function _cidrv6(Class, params) {
|
|
3503
3533
|
return new Class({
|
|
3504
3534
|
type: "string",
|
|
@@ -3508,7 +3538,7 @@ function _cidrv6(Class, params) {
|
|
|
3508
3538
|
...normalizeParams(params)
|
|
3509
3539
|
});
|
|
3510
3540
|
}
|
|
3511
|
-
|
|
3541
|
+
// @__NO_SIDE_EFFECTS__
|
|
3512
3542
|
function _base64(Class, params) {
|
|
3513
3543
|
return new Class({
|
|
3514
3544
|
type: "string",
|
|
@@ -3518,7 +3548,7 @@ function _base64(Class, params) {
|
|
|
3518
3548
|
...normalizeParams(params)
|
|
3519
3549
|
});
|
|
3520
3550
|
}
|
|
3521
|
-
|
|
3551
|
+
// @__NO_SIDE_EFFECTS__
|
|
3522
3552
|
function _base64url(Class, params) {
|
|
3523
3553
|
return new Class({
|
|
3524
3554
|
type: "string",
|
|
@@ -3528,7 +3558,7 @@ function _base64url(Class, params) {
|
|
|
3528
3558
|
...normalizeParams(params)
|
|
3529
3559
|
});
|
|
3530
3560
|
}
|
|
3531
|
-
|
|
3561
|
+
// @__NO_SIDE_EFFECTS__
|
|
3532
3562
|
function _e164(Class, params) {
|
|
3533
3563
|
return new Class({
|
|
3534
3564
|
type: "string",
|
|
@@ -3538,7 +3568,7 @@ function _e164(Class, params) {
|
|
|
3538
3568
|
...normalizeParams(params)
|
|
3539
3569
|
});
|
|
3540
3570
|
}
|
|
3541
|
-
|
|
3571
|
+
// @__NO_SIDE_EFFECTS__
|
|
3542
3572
|
function _jwt(Class, params) {
|
|
3543
3573
|
return new Class({
|
|
3544
3574
|
type: "string",
|
|
@@ -3548,7 +3578,7 @@ function _jwt(Class, params) {
|
|
|
3548
3578
|
...normalizeParams(params)
|
|
3549
3579
|
});
|
|
3550
3580
|
}
|
|
3551
|
-
|
|
3581
|
+
// @__NO_SIDE_EFFECTS__
|
|
3552
3582
|
function _isoDateTime(Class, params) {
|
|
3553
3583
|
return new Class({
|
|
3554
3584
|
type: "string",
|
|
@@ -3560,7 +3590,7 @@ function _isoDateTime(Class, params) {
|
|
|
3560
3590
|
...normalizeParams(params)
|
|
3561
3591
|
});
|
|
3562
3592
|
}
|
|
3563
|
-
|
|
3593
|
+
// @__NO_SIDE_EFFECTS__
|
|
3564
3594
|
function _isoDate(Class, params) {
|
|
3565
3595
|
return new Class({
|
|
3566
3596
|
type: "string",
|
|
@@ -3569,7 +3599,7 @@ function _isoDate(Class, params) {
|
|
|
3569
3599
|
...normalizeParams(params)
|
|
3570
3600
|
});
|
|
3571
3601
|
}
|
|
3572
|
-
|
|
3602
|
+
// @__NO_SIDE_EFFECTS__
|
|
3573
3603
|
function _isoTime(Class, params) {
|
|
3574
3604
|
return new Class({
|
|
3575
3605
|
type: "string",
|
|
@@ -3579,7 +3609,7 @@ function _isoTime(Class, params) {
|
|
|
3579
3609
|
...normalizeParams(params)
|
|
3580
3610
|
});
|
|
3581
3611
|
}
|
|
3582
|
-
|
|
3612
|
+
// @__NO_SIDE_EFFECTS__
|
|
3583
3613
|
function _isoDuration(Class, params) {
|
|
3584
3614
|
return new Class({
|
|
3585
3615
|
type: "string",
|
|
@@ -3588,7 +3618,7 @@ function _isoDuration(Class, params) {
|
|
|
3588
3618
|
...normalizeParams(params)
|
|
3589
3619
|
});
|
|
3590
3620
|
}
|
|
3591
|
-
|
|
3621
|
+
// @__NO_SIDE_EFFECTS__
|
|
3592
3622
|
function _number(Class, params) {
|
|
3593
3623
|
return new Class(snapshotChecks({
|
|
3594
3624
|
type: "number",
|
|
@@ -3596,7 +3626,7 @@ function _number(Class, params) {
|
|
|
3596
3626
|
...normalizeParams(params)
|
|
3597
3627
|
}));
|
|
3598
3628
|
}
|
|
3599
|
-
|
|
3629
|
+
// @__NO_SIDE_EFFECTS__
|
|
3600
3630
|
function _int(Class, params) {
|
|
3601
3631
|
return new Class({
|
|
3602
3632
|
type: "number",
|
|
@@ -3606,25 +3636,25 @@ function _int(Class, params) {
|
|
|
3606
3636
|
...normalizeParams(params)
|
|
3607
3637
|
});
|
|
3608
3638
|
}
|
|
3609
|
-
|
|
3639
|
+
// @__NO_SIDE_EFFECTS__
|
|
3610
3640
|
function _boolean(Class, params) {
|
|
3611
3641
|
return new Class({
|
|
3612
3642
|
type: "boolean",
|
|
3613
3643
|
...normalizeParams(params)
|
|
3614
3644
|
});
|
|
3615
3645
|
}
|
|
3616
|
-
|
|
3646
|
+
// @__NO_SIDE_EFFECTS__
|
|
3617
3647
|
function _unknown(Class) {
|
|
3618
3648
|
return new Class({ type: "unknown" });
|
|
3619
3649
|
}
|
|
3620
|
-
|
|
3650
|
+
// @__NO_SIDE_EFFECTS__
|
|
3621
3651
|
function _never(Class, params) {
|
|
3622
3652
|
return new Class({
|
|
3623
3653
|
type: "never",
|
|
3624
3654
|
...normalizeParams(params)
|
|
3625
3655
|
});
|
|
3626
3656
|
}
|
|
3627
|
-
|
|
3657
|
+
// @__NO_SIDE_EFFECTS__
|
|
3628
3658
|
function _lt(value, params) {
|
|
3629
3659
|
return new $ZodCheckLessThan({
|
|
3630
3660
|
check: "less_than",
|
|
@@ -3633,7 +3663,7 @@ function _lt(value, params) {
|
|
|
3633
3663
|
inclusive: false
|
|
3634
3664
|
});
|
|
3635
3665
|
}
|
|
3636
|
-
|
|
3666
|
+
// @__NO_SIDE_EFFECTS__
|
|
3637
3667
|
function _lte(value, params) {
|
|
3638
3668
|
return new $ZodCheckLessThan({
|
|
3639
3669
|
check: "less_than",
|
|
@@ -3642,7 +3672,7 @@ function _lte(value, params) {
|
|
|
3642
3672
|
inclusive: true
|
|
3643
3673
|
});
|
|
3644
3674
|
}
|
|
3645
|
-
|
|
3675
|
+
// @__NO_SIDE_EFFECTS__
|
|
3646
3676
|
function _gt(value, params) {
|
|
3647
3677
|
return new $ZodCheckGreaterThan({
|
|
3648
3678
|
check: "greater_than",
|
|
@@ -3651,7 +3681,7 @@ function _gt(value, params) {
|
|
|
3651
3681
|
inclusive: false
|
|
3652
3682
|
});
|
|
3653
3683
|
}
|
|
3654
|
-
|
|
3684
|
+
// @__NO_SIDE_EFFECTS__
|
|
3655
3685
|
function _gte(value, params) {
|
|
3656
3686
|
return new $ZodCheckGreaterThan({
|
|
3657
3687
|
check: "greater_than",
|
|
@@ -3660,7 +3690,7 @@ function _gte(value, params) {
|
|
|
3660
3690
|
inclusive: true
|
|
3661
3691
|
});
|
|
3662
3692
|
}
|
|
3663
|
-
|
|
3693
|
+
// @__NO_SIDE_EFFECTS__
|
|
3664
3694
|
function _multipleOf(value, params) {
|
|
3665
3695
|
return new $ZodCheckMultipleOf({
|
|
3666
3696
|
check: "multiple_of",
|
|
@@ -3668,16 +3698,15 @@ function _multipleOf(value, params) {
|
|
|
3668
3698
|
value
|
|
3669
3699
|
});
|
|
3670
3700
|
}
|
|
3671
|
-
|
|
3701
|
+
// @__NO_SIDE_EFFECTS__
|
|
3672
3702
|
function _maxLength(maximum, params) {
|
|
3673
|
-
|
|
3703
|
+
return new $ZodCheckMaxLength({
|
|
3674
3704
|
check: "max_length",
|
|
3675
3705
|
...normalizeParams(params),
|
|
3676
3706
|
maximum
|
|
3677
3707
|
});
|
|
3678
|
-
return ch;
|
|
3679
3708
|
}
|
|
3680
|
-
|
|
3709
|
+
// @__NO_SIDE_EFFECTS__
|
|
3681
3710
|
function _minLength(minimum, params) {
|
|
3682
3711
|
return new $ZodCheckMinLength({
|
|
3683
3712
|
check: "min_length",
|
|
@@ -3685,7 +3714,7 @@ function _minLength(minimum, params) {
|
|
|
3685
3714
|
minimum
|
|
3686
3715
|
});
|
|
3687
3716
|
}
|
|
3688
|
-
|
|
3717
|
+
// @__NO_SIDE_EFFECTS__
|
|
3689
3718
|
function _length(length, params) {
|
|
3690
3719
|
return new $ZodCheckLengthEquals({
|
|
3691
3720
|
check: "length_equals",
|
|
@@ -3693,7 +3722,7 @@ function _length(length, params) {
|
|
|
3693
3722
|
length
|
|
3694
3723
|
});
|
|
3695
3724
|
}
|
|
3696
|
-
|
|
3725
|
+
// @__NO_SIDE_EFFECTS__
|
|
3697
3726
|
function _regex(pattern, params) {
|
|
3698
3727
|
return new $ZodCheckRegex({
|
|
3699
3728
|
check: "string_format",
|
|
@@ -3702,7 +3731,7 @@ function _regex(pattern, params) {
|
|
|
3702
3731
|
pattern
|
|
3703
3732
|
});
|
|
3704
3733
|
}
|
|
3705
|
-
|
|
3734
|
+
// @__NO_SIDE_EFFECTS__
|
|
3706
3735
|
function _lowercase(params) {
|
|
3707
3736
|
return new $ZodCheckLowerCase({
|
|
3708
3737
|
check: "string_format",
|
|
@@ -3710,7 +3739,7 @@ function _lowercase(params) {
|
|
|
3710
3739
|
...normalizeParams(params)
|
|
3711
3740
|
});
|
|
3712
3741
|
}
|
|
3713
|
-
|
|
3742
|
+
// @__NO_SIDE_EFFECTS__
|
|
3714
3743
|
function _uppercase(params) {
|
|
3715
3744
|
return new $ZodCheckUpperCase({
|
|
3716
3745
|
check: "string_format",
|
|
@@ -3718,7 +3747,7 @@ function _uppercase(params) {
|
|
|
3718
3747
|
...normalizeParams(params)
|
|
3719
3748
|
});
|
|
3720
3749
|
}
|
|
3721
|
-
|
|
3750
|
+
// @__NO_SIDE_EFFECTS__
|
|
3722
3751
|
function _includes(includes, params) {
|
|
3723
3752
|
return new $ZodCheckIncludes({
|
|
3724
3753
|
check: "string_format",
|
|
@@ -3727,7 +3756,7 @@ function _includes(includes, params) {
|
|
|
3727
3756
|
includes
|
|
3728
3757
|
});
|
|
3729
3758
|
}
|
|
3730
|
-
|
|
3759
|
+
// @__NO_SIDE_EFFECTS__
|
|
3731
3760
|
function _startsWith(prefix, params) {
|
|
3732
3761
|
return new $ZodCheckStartsWith({
|
|
3733
3762
|
check: "string_format",
|
|
@@ -3736,7 +3765,7 @@ function _startsWith(prefix, params) {
|
|
|
3736
3765
|
prefix
|
|
3737
3766
|
});
|
|
3738
3767
|
}
|
|
3739
|
-
|
|
3768
|
+
// @__NO_SIDE_EFFECTS__
|
|
3740
3769
|
function _endsWith(suffix, params) {
|
|
3741
3770
|
return new $ZodCheckEndsWith({
|
|
3742
3771
|
check: "string_format",
|
|
@@ -3745,34 +3774,34 @@ function _endsWith(suffix, params) {
|
|
|
3745
3774
|
suffix
|
|
3746
3775
|
});
|
|
3747
3776
|
}
|
|
3748
|
-
|
|
3777
|
+
// @__NO_SIDE_EFFECTS__
|
|
3749
3778
|
function _overwrite(tx) {
|
|
3750
3779
|
return new $ZodCheckOverwrite({
|
|
3751
3780
|
check: "overwrite",
|
|
3752
3781
|
tx
|
|
3753
3782
|
});
|
|
3754
3783
|
}
|
|
3755
|
-
|
|
3784
|
+
// @__NO_SIDE_EFFECTS__
|
|
3756
3785
|
function _normalize(form) {
|
|
3757
3786
|
return /* @__PURE__ */ _overwrite((input) => input.normalize(form));
|
|
3758
3787
|
}
|
|
3759
|
-
|
|
3788
|
+
// @__NO_SIDE_EFFECTS__
|
|
3760
3789
|
function _trim() {
|
|
3761
3790
|
return /* @__PURE__ */ _overwrite((input) => input.trim());
|
|
3762
3791
|
}
|
|
3763
|
-
|
|
3792
|
+
// @__NO_SIDE_EFFECTS__
|
|
3764
3793
|
function _toLowerCase() {
|
|
3765
3794
|
return /* @__PURE__ */ _overwrite((input) => input.toLowerCase());
|
|
3766
3795
|
}
|
|
3767
|
-
|
|
3796
|
+
// @__NO_SIDE_EFFECTS__
|
|
3768
3797
|
function _toUpperCase() {
|
|
3769
3798
|
return /* @__PURE__ */ _overwrite((input) => input.toUpperCase());
|
|
3770
3799
|
}
|
|
3771
|
-
|
|
3800
|
+
// @__NO_SIDE_EFFECTS__
|
|
3772
3801
|
function _slugify() {
|
|
3773
3802
|
return /* @__PURE__ */ _overwrite((input) => slugify(input));
|
|
3774
3803
|
}
|
|
3775
|
-
|
|
3804
|
+
// @__NO_SIDE_EFFECTS__
|
|
3776
3805
|
function _array(Class, element, params) {
|
|
3777
3806
|
return new Class({
|
|
3778
3807
|
type: "array",
|
|
@@ -3780,35 +3809,33 @@ function _array(Class, element, params) {
|
|
|
3780
3809
|
...normalizeParams(params)
|
|
3781
3810
|
});
|
|
3782
3811
|
}
|
|
3783
|
-
|
|
3812
|
+
// @__NO_SIDE_EFFECTS__
|
|
3784
3813
|
function _custom(Class, fn, _params) {
|
|
3785
3814
|
const norm = normalizeParams(_params);
|
|
3786
3815
|
norm.abort ?? (norm.abort = true);
|
|
3787
|
-
|
|
3816
|
+
return new Class({
|
|
3788
3817
|
type: "custom",
|
|
3789
3818
|
check: "custom",
|
|
3790
3819
|
fn,
|
|
3791
3820
|
...norm
|
|
3792
3821
|
});
|
|
3793
|
-
return schema;
|
|
3794
3822
|
}
|
|
3795
|
-
|
|
3823
|
+
// @__NO_SIDE_EFFECTS__
|
|
3796
3824
|
function _refine(Class, fn, _params) {
|
|
3797
|
-
|
|
3825
|
+
return new Class({
|
|
3798
3826
|
type: "custom",
|
|
3799
3827
|
check: "custom",
|
|
3800
3828
|
fn,
|
|
3801
3829
|
...normalizeParams(_params)
|
|
3802
3830
|
});
|
|
3803
|
-
return schema;
|
|
3804
3831
|
}
|
|
3805
|
-
|
|
3832
|
+
// @__NO_SIDE_EFFECTS__
|
|
3806
3833
|
function _superRefine(fn, params) {
|
|
3807
3834
|
const ch = /* @__PURE__ */ _check((payload) => {
|
|
3808
|
-
payload.addIssue = (issue$
|
|
3809
|
-
if (typeof issue$
|
|
3835
|
+
payload.addIssue = (issue$2) => {
|
|
3836
|
+
if (typeof issue$2 === "string") payload.issues.push(issue(issue$2, payload.value, ch._zod.def));
|
|
3810
3837
|
else {
|
|
3811
|
-
const _issue = issue$
|
|
3838
|
+
const _issue = issue$2;
|
|
3812
3839
|
if (_issue.fatal) _issue.continue = false;
|
|
3813
3840
|
_issue.code ?? (_issue.code = "custom");
|
|
3814
3841
|
if (!("input" in _issue)) _issue.input = payload.value;
|
|
@@ -3821,7 +3848,7 @@ function _superRefine(fn, params) {
|
|
|
3821
3848
|
}, params);
|
|
3822
3849
|
return ch;
|
|
3823
3850
|
}
|
|
3824
|
-
|
|
3851
|
+
// @__NO_SIDE_EFFECTS__
|
|
3825
3852
|
function _check(fn, params) {
|
|
3826
3853
|
const ch = new $ZodCheck({
|
|
3827
3854
|
check: "custom",
|
|
@@ -3830,33 +3857,6 @@ function _check(fn, params) {
|
|
|
3830
3857
|
ch._zod.check = fn;
|
|
3831
3858
|
return ch;
|
|
3832
3859
|
}
|
|
3833
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
3834
|
-
function describe$1(description) {
|
|
3835
|
-
const ch = new $ZodCheck({ check: "describe" });
|
|
3836
|
-
ch._zod.onattach = [(inst) => {
|
|
3837
|
-
const existing = globalRegistry.get(inst) ?? {};
|
|
3838
|
-
globalRegistry.add(inst, {
|
|
3839
|
-
...existing,
|
|
3840
|
-
description
|
|
3841
|
-
});
|
|
3842
|
-
}];
|
|
3843
|
-
ch._zod.check = () => {};
|
|
3844
|
-
return ch;
|
|
3845
|
-
}
|
|
3846
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
3847
|
-
function meta$1(metadata) {
|
|
3848
|
-
const ch = new $ZodCheck({ check: "meta" });
|
|
3849
|
-
ch._zod.onattach = [(inst) => {
|
|
3850
|
-
const existing = globalRegistry.get(inst) ?? {};
|
|
3851
|
-
globalRegistry.add(inst, {
|
|
3852
|
-
...existing,
|
|
3853
|
-
...metadata
|
|
3854
|
-
});
|
|
3855
|
-
}];
|
|
3856
|
-
ch._zod.check = () => {};
|
|
3857
|
-
return ch;
|
|
3858
|
-
}
|
|
3859
|
-
|
|
3860
3860
|
//#endregion
|
|
3861
3861
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/to-json-schema.js
|
|
3862
3862
|
function assignProps(target, ...sources) {
|
|
@@ -3905,13 +3905,12 @@ function processSchema(schema, ctx, _params = {
|
|
|
3905
3905
|
path: [],
|
|
3906
3906
|
schemaPath: []
|
|
3907
3907
|
}) {
|
|
3908
|
-
var _a
|
|
3908
|
+
var _a;
|
|
3909
3909
|
const def = schema._zod.def;
|
|
3910
3910
|
const seen = ctx.seen.get(schema);
|
|
3911
3911
|
if (seen) {
|
|
3912
3912
|
seen.count++;
|
|
3913
|
-
|
|
3914
|
-
if (isCycle) seen.cycle = _params.path;
|
|
3913
|
+
if (_params.schemaPath.includes(schema)) seen.cycle = _params.path;
|
|
3915
3914
|
return seen.schema;
|
|
3916
3915
|
}
|
|
3917
3916
|
const result = {
|
|
@@ -3945,16 +3944,15 @@ function processSchema(schema, ctx, _params = {
|
|
|
3945
3944
|
ctx.seen.get(parent).isParent = true;
|
|
3946
3945
|
}
|
|
3947
3946
|
}
|
|
3948
|
-
const meta
|
|
3949
|
-
if (meta
|
|
3947
|
+
const meta = ctx.metadataRegistry.get(schema);
|
|
3948
|
+
if (meta) assignProps(result.schema, meta);
|
|
3950
3949
|
if (ctx.io === "input" && isTransforming(schema)) {
|
|
3951
3950
|
delete result.schema.examples;
|
|
3952
3951
|
delete result.schema.default;
|
|
3953
3952
|
}
|
|
3954
|
-
if (ctx.io === "input" && "_prefault" in result.schema) (_a
|
|
3953
|
+
if (ctx.io === "input" && "_prefault" in result.schema) (_a = result.schema).default ?? (_a.default = result.schema._prefault);
|
|
3955
3954
|
delete result.schema._prefault;
|
|
3956
|
-
|
|
3957
|
-
return _result.schema;
|
|
3955
|
+
return ctx.seen.get(schema).schema;
|
|
3958
3956
|
}
|
|
3959
3957
|
function encodeJSONPointerSegment(segment) {
|
|
3960
3958
|
return segment.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
@@ -3976,7 +3974,7 @@ function extractDefs(ctx, schema) {
|
|
|
3976
3974
|
const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
3977
3975
|
if (ctx.external) {
|
|
3978
3976
|
const externalId = ctx.external.registry.get(entry[0])?.id;
|
|
3979
|
-
const uriGenerator = ctx.external.uri ?? ((id
|
|
3977
|
+
const uriGenerator = ctx.external.uri ?? ((id) => id);
|
|
3980
3978
|
if (externalId) return { ref: uriGenerator(externalId) };
|
|
3981
3979
|
const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;
|
|
3982
3980
|
entry[1].defId = id;
|
|
@@ -4000,9 +3998,9 @@ function extractDefs(ctx, schema) {
|
|
|
4000
3998
|
const { ref, defId } = makeURI(entry);
|
|
4001
3999
|
seen.def = { ...seen.schema };
|
|
4002
4000
|
if (defId) seen.defId = defId;
|
|
4003
|
-
const schema
|
|
4004
|
-
for (const key in schema
|
|
4005
|
-
schema
|
|
4001
|
+
const schema = seen.schema;
|
|
4002
|
+
for (const key in schema) delete schema[key];
|
|
4003
|
+
schema.$ref = ref;
|
|
4006
4004
|
};
|
|
4007
4005
|
if (ctx.cycles === "throw") for (const entry of ctx.seen.entries()) {
|
|
4008
4006
|
const seen = entry[1];
|
|
@@ -4023,8 +4021,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4023
4021
|
continue;
|
|
4024
4022
|
}
|
|
4025
4023
|
}
|
|
4026
|
-
|
|
4027
|
-
if (id) {
|
|
4024
|
+
if (ctx.metadataRegistry.get(entry[0])?.id) {
|
|
4028
4025
|
extractToDef(entry);
|
|
4029
4026
|
continue;
|
|
4030
4027
|
}
|
|
@@ -4060,7 +4057,7 @@ function compactTypeUnion(schema) {
|
|
|
4060
4057
|
/** Keywords `foldIntersection` knows how to combine. Anything else — `$ref`, `patternProperties`,
|
|
4061
4058
|
* an annotation like `description` — makes a member unfoldable, so a constraint this does not
|
|
4062
4059
|
* understand leaves the `allOf` alone instead of being silently dropped or misattributed. */
|
|
4063
|
-
const FOLDABLE_KEYS = new Set([
|
|
4060
|
+
const FOLDABLE_KEYS = /* @__PURE__ */ new Set([
|
|
4064
4061
|
"type",
|
|
4065
4062
|
"properties",
|
|
4066
4063
|
"required",
|
|
@@ -4074,17 +4071,17 @@ function undeclaredConstraint(member) {
|
|
|
4074
4071
|
return Object.keys(extra).length ? extra : null;
|
|
4075
4072
|
}
|
|
4076
4073
|
/** Combines object members into the single object they describe together, or returns `null` if any of them carries a keyword outside {@link FOLDABLE_KEYS}. */
|
|
4077
|
-
function foldObjects(members
|
|
4074
|
+
function foldObjects(members) {
|
|
4078
4075
|
const objects = [];
|
|
4079
|
-
for (const member of members
|
|
4076
|
+
for (const member of members) {
|
|
4080
4077
|
if (typeof member !== "object" || member.type !== "object") return null;
|
|
4081
4078
|
for (const key in member) if (!FOLDABLE_KEYS.has(key)) return null;
|
|
4082
4079
|
objects.push(member);
|
|
4083
4080
|
}
|
|
4084
4081
|
const properties = {};
|
|
4085
|
-
const required
|
|
4086
|
-
for (const object
|
|
4087
|
-
for (const key in object
|
|
4082
|
+
const required = /* @__PURE__ */ new Set();
|
|
4083
|
+
for (const object of objects) {
|
|
4084
|
+
for (const key in object.properties) {
|
|
4088
4085
|
if (Object.prototype.hasOwnProperty.call(properties, key)) continue;
|
|
4089
4086
|
const parts = [];
|
|
4090
4087
|
for (const other of objects) {
|
|
@@ -4092,21 +4089,20 @@ function foldObjects(members$1) {
|
|
|
4092
4089
|
if (part === null || part === void 0) continue;
|
|
4093
4090
|
if (!parts.some((seen) => JSON.stringify(seen) === JSON.stringify(part))) parts.push(part);
|
|
4094
4091
|
}
|
|
4095
|
-
|
|
4096
|
-
assignProp(properties, key, merged);
|
|
4092
|
+
assignProp(properties, key, parts.length === 1 ? parts[0] : foldObjects(parts) ?? { allOf: parts });
|
|
4097
4093
|
}
|
|
4098
|
-
for (const key of object
|
|
4094
|
+
for (const key of object.required ?? []) required.add(key);
|
|
4099
4095
|
}
|
|
4100
4096
|
const folded = {
|
|
4101
4097
|
type: "object",
|
|
4102
4098
|
properties
|
|
4103
4099
|
};
|
|
4104
|
-
if (required
|
|
4105
|
-
if (objects.every((object
|
|
4100
|
+
if (required.size) folded.required = [...required];
|
|
4101
|
+
if (objects.every((object) => object.additionalProperties === false)) folded.additionalProperties = false;
|
|
4106
4102
|
else {
|
|
4107
4103
|
const constraints = [];
|
|
4108
|
-
for (const object
|
|
4109
|
-
const constraint = undeclaredConstraint(object
|
|
4104
|
+
for (const object of objects) {
|
|
4105
|
+
const constraint = undeclaredConstraint(object);
|
|
4110
4106
|
if (constraint && !constraints.some((seen) => JSON.stringify(seen) === JSON.stringify(constraint))) constraints.push(constraint);
|
|
4111
4107
|
}
|
|
4112
4108
|
if (constraints.length === 1) folded.additionalProperties = constraints[0];
|
|
@@ -4131,11 +4127,11 @@ function foldIntersection(json) {
|
|
|
4131
4127
|
let folded = null;
|
|
4132
4128
|
if (!unions.length) folded = foldObjects(allOf);
|
|
4133
4129
|
else {
|
|
4134
|
-
const union
|
|
4135
|
-
const keyword = UNION_KEYS.find((k) => Array.isArray(union
|
|
4136
|
-
if (Object.keys(union
|
|
4137
|
-
const rest = allOf.filter((m) => m !== union
|
|
4138
|
-
const branches = union
|
|
4130
|
+
const union = unions[0];
|
|
4131
|
+
const keyword = UNION_KEYS.find((k) => Array.isArray(union[k]));
|
|
4132
|
+
if (Object.keys(union).length !== 1) return;
|
|
4133
|
+
const rest = allOf.filter((m) => m !== union);
|
|
4134
|
+
const branches = union[keyword].map((branch) => foldObjects([...rest, branch]));
|
|
4139
4135
|
if (branches.some((b) => !b)) return;
|
|
4140
4136
|
folded = { [keyword]: branches };
|
|
4141
4137
|
}
|
|
@@ -4149,8 +4145,8 @@ function finalize(ctx, schema) {
|
|
|
4149
4145
|
const flattenRef = (zodSchema) => {
|
|
4150
4146
|
const seen = ctx.seen.get(zodSchema);
|
|
4151
4147
|
if (seen.ref === null) return;
|
|
4152
|
-
const schema
|
|
4153
|
-
const _cached = { ...schema
|
|
4148
|
+
const schema = seen.def ?? seen.schema;
|
|
4149
|
+
const _cached = { ...schema };
|
|
4154
4150
|
const ref = seen.ref;
|
|
4155
4151
|
seen.ref = null;
|
|
4156
4152
|
if (ref) {
|
|
@@ -4158,18 +4154,17 @@ function finalize(ctx, schema) {
|
|
|
4158
4154
|
const refSeen = ctx.seen.get(ref);
|
|
4159
4155
|
const refSchema = refSeen.schema;
|
|
4160
4156
|
if (refSchema.$ref && (ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0")) {
|
|
4161
|
-
schema
|
|
4162
|
-
schema
|
|
4163
|
-
} else assignProps(schema
|
|
4164
|
-
assignProps(schema
|
|
4165
|
-
|
|
4166
|
-
if (isParentRef) for (const key in schema$1) {
|
|
4157
|
+
schema.allOf = schema.allOf ?? [];
|
|
4158
|
+
schema.allOf.push(refSchema);
|
|
4159
|
+
} else assignProps(schema, refSchema);
|
|
4160
|
+
assignProps(schema, _cached);
|
|
4161
|
+
if (zodSchema._zod.parent === ref) for (const key in schema) {
|
|
4167
4162
|
if (key === "$ref" || key === "allOf") continue;
|
|
4168
|
-
if (!(key in _cached)) delete schema
|
|
4163
|
+
if (!(key in _cached)) delete schema[key];
|
|
4169
4164
|
}
|
|
4170
|
-
if (refSchema.$ref && refSeen.def) for (const key in schema
|
|
4165
|
+
if (refSchema.$ref && refSeen.def) for (const key in schema) {
|
|
4171
4166
|
if (key === "$ref" || key === "allOf") continue;
|
|
4172
|
-
if (key in refSeen.def && JSON.stringify(schema
|
|
4167
|
+
if (key in refSeen.def && JSON.stringify(schema[key]) === JSON.stringify(refSeen.def[key])) delete schema[key];
|
|
4173
4168
|
}
|
|
4174
4169
|
}
|
|
4175
4170
|
const parent = zodSchema._zod.parent;
|
|
@@ -4177,16 +4172,16 @@ function finalize(ctx, schema) {
|
|
|
4177
4172
|
flattenRef(parent);
|
|
4178
4173
|
const parentSeen = ctx.seen.get(parent);
|
|
4179
4174
|
if (parentSeen?.schema.$ref) {
|
|
4180
|
-
schema
|
|
4181
|
-
if (parentSeen.def) for (const key in schema
|
|
4175
|
+
schema.$ref = parentSeen.schema.$ref;
|
|
4176
|
+
if (parentSeen.def) for (const key in schema) {
|
|
4182
4177
|
if (key === "$ref" || key === "allOf") continue;
|
|
4183
|
-
if (key in parentSeen.def && JSON.stringify(schema
|
|
4178
|
+
if (key in parentSeen.def && JSON.stringify(schema[key]) === JSON.stringify(parentSeen.def[key])) delete schema[key];
|
|
4184
4179
|
}
|
|
4185
4180
|
}
|
|
4186
4181
|
}
|
|
4187
4182
|
ctx.override({
|
|
4188
4183
|
zodSchema,
|
|
4189
|
-
jsonSchema: schema
|
|
4184
|
+
jsonSchema: schema,
|
|
4190
4185
|
path: seen.path ?? []
|
|
4191
4186
|
});
|
|
4192
4187
|
};
|
|
@@ -4228,8 +4223,10 @@ function finalize(ctx, schema) {
|
|
|
4228
4223
|
}
|
|
4229
4224
|
}
|
|
4230
4225
|
if (ctx.external) ctx.sharedEmitDoneFor = ctx.external;
|
|
4231
|
-
if (ctx.external) {} else if (Object.keys(defs).length > 0)
|
|
4232
|
-
|
|
4226
|
+
if (ctx.external) {} else if (Object.keys(defs).length > 0) {
|
|
4227
|
+
if (ctx.target === "draft-2020-12") result.$defs = defs;
|
|
4228
|
+
else result.definitions = defs;
|
|
4229
|
+
}
|
|
4233
4230
|
try {
|
|
4234
4231
|
const finalized = JSON.parse(JSON.stringify(result));
|
|
4235
4232
|
Object.defineProperty(finalized, "~standard", {
|
|
@@ -4304,7 +4301,6 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
|
|
|
4304
4301
|
extractDefs(ctx, schema);
|
|
4305
4302
|
return finalize(ctx, schema);
|
|
4306
4303
|
};
|
|
4307
|
-
|
|
4308
4304
|
//#endregion
|
|
4309
4305
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/json-schema-processors.js
|
|
4310
4306
|
const narrowMin = (agg, key, value) => {
|
|
@@ -4386,7 +4382,7 @@ const formatMap = {
|
|
|
4386
4382
|
json_string: "json-string",
|
|
4387
4383
|
regex: ""
|
|
4388
4384
|
};
|
|
4389
|
-
const exactPatterns = new Map([[base64Charset, base64], [base64urlCharset, base64url]]);
|
|
4385
|
+
const exactPatterns = /* @__PURE__ */ new Map([[base64Charset, base64], [base64urlCharset, base64url]]);
|
|
4390
4386
|
const exactPattern = (p) => exactPatterns.get(p) ?? p;
|
|
4391
4387
|
const stringProcessor = (schema, ctx, _json, _params) => {
|
|
4392
4388
|
const json = _json;
|
|
@@ -4416,16 +4412,18 @@ const numberProcessor = (schema, ctx, _json, params) => {
|
|
|
4416
4412
|
const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
|
|
4417
4413
|
const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
|
|
4418
4414
|
const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
|
|
4419
|
-
if (exMin)
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
if (
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4415
|
+
if (exMin) {
|
|
4416
|
+
if (legacy) {
|
|
4417
|
+
json.minimum = exclusiveMinimum;
|
|
4418
|
+
json.exclusiveMinimum = true;
|
|
4419
|
+
} else json.exclusiveMinimum = exclusiveMinimum;
|
|
4420
|
+
} else if (typeof minimum === "number") json.minimum = minimum;
|
|
4421
|
+
if (exMax) {
|
|
4422
|
+
if (legacy) {
|
|
4423
|
+
json.maximum = exclusiveMaximum;
|
|
4424
|
+
json.exclusiveMaximum = true;
|
|
4425
|
+
} else json.exclusiveMaximum = exclusiveMaximum;
|
|
4426
|
+
} else if (typeof maximum === "number") json.maximum = maximum;
|
|
4429
4427
|
if (multipleOf) {
|
|
4430
4428
|
const divisors = /* @__PURE__ */ new Set();
|
|
4431
4429
|
for (const divisor of multipleOf) if (Number.isFinite(divisor) && divisor !== 0) divisors.add(Math.abs(divisor));
|
|
@@ -4438,10 +4436,33 @@ const numberProcessor = (schema, ctx, _json, params) => {
|
|
|
4438
4436
|
const booleanProcessor = (_schema, _ctx, json, _params) => {
|
|
4439
4437
|
json.type = "boolean";
|
|
4440
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
|
+
};
|
|
4441
4458
|
const neverProcessor = (_schema, _ctx, json, _params) => {
|
|
4442
4459
|
json.not = {};
|
|
4443
4460
|
};
|
|
4461
|
+
const anyProcessor = (_schema, _ctx, _json, _params) => {};
|
|
4444
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
|
+
};
|
|
4445
4466
|
const enumProcessor = (schema, _ctx, json, _params) => {
|
|
4446
4467
|
const def = schema._zod.def;
|
|
4447
4468
|
const values = getEnumValues(def.entries);
|
|
@@ -4479,12 +4500,47 @@ const literalProcessor = (schema, ctx, json, params) => {
|
|
|
4479
4500
|
json.enum = vals;
|
|
4480
4501
|
}
|
|
4481
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
|
+
};
|
|
4482
4529
|
const customProcessor = (schema, ctx, json, params) => {
|
|
4483
4530
|
handleUnrepresentable(schema, ctx, json, params, "Custom types cannot be represented in JSON Schema");
|
|
4484
4531
|
};
|
|
4532
|
+
const functionProcessor = (schema, ctx, json, params) => {
|
|
4533
|
+
handleUnrepresentable(schema, ctx, json, params, "Function types cannot be represented in JSON Schema");
|
|
4534
|
+
};
|
|
4485
4535
|
const transformProcessor = (schema, ctx, json, params) => {
|
|
4486
4536
|
handleUnrepresentable(schema, ctx, json, params, "Transforms cannot be represented in JSON Schema");
|
|
4487
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
|
+
};
|
|
4488
4544
|
const arrayProcessor = (schema, ctx, _json, params) => {
|
|
4489
4545
|
const json = _json;
|
|
4490
4546
|
const def = schema._zod.def;
|
|
@@ -4507,8 +4563,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
4507
4563
|
const json = _json;
|
|
4508
4564
|
const def = schema._zod.def;
|
|
4509
4565
|
const shape = def.shape;
|
|
4510
|
-
|
|
4511
|
-
if (symbolKeys.length && handleUnrepresentable(schema, ctx, json, params, "Symbol keys cannot be represented in JSON Schema")) return;
|
|
4566
|
+
if (Object.getOwnPropertySymbols(shape).length && handleUnrepresentable(schema, ctx, json, params, "Symbol keys cannot be represented in JSON Schema")) return;
|
|
4512
4567
|
json.type = "object";
|
|
4513
4568
|
json.properties = {};
|
|
4514
4569
|
for (const key in shape) assignProp(json.properties, key, processSchema(shape[key], ctx, {
|
|
@@ -4570,6 +4625,58 @@ const intersectionProcessor = (schema, ctx, json, params) => {
|
|
|
4570
4625
|
json.allOf = allOf;
|
|
4571
4626
|
ctx.intersections.push(allOf);
|
|
4572
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
|
+
};
|
|
4573
4680
|
/** JSON object keys are always strings, so a numeric record key schema is re-expressed over the
|
|
4574
4681
|
* numeric-string form the record parser matches. Deferred to `finalize`, after the flatten: a key
|
|
4575
4682
|
* behind a wrapper only carries its own `type` before then, and a union key only has its branches.
|
|
@@ -4601,7 +4708,7 @@ function stringifyKeyNames(bySchema, json, visited) {
|
|
|
4601
4708
|
const numericType = !types.includes("string") && types.some((t) => t === "number" || t === "integer");
|
|
4602
4709
|
const values = json.enum ?? (json.const !== void 0 ? [json.const] : void 0);
|
|
4603
4710
|
if (!numericType && !values?.some((v) => typeof v === "number")) return json;
|
|
4604
|
-
const { minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, format, id
|
|
4711
|
+
const { minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, format, id, ...rest } = json;
|
|
4605
4712
|
if (rest.enum) rest.enum = rest.enum.map((v) => typeof v === "number" ? String(v) : v);
|
|
4606
4713
|
else if (typeof rest.const === "number") rest.const = String(rest.const);
|
|
4607
4714
|
if (!numericType) return rest;
|
|
@@ -4615,8 +4722,8 @@ function rewriteKeyNames(ctx) {
|
|
|
4615
4722
|
const bySchema = /* @__PURE__ */ new Map();
|
|
4616
4723
|
for (const entry of ctx.seen.values()) if (entry.def && !bySchema.has(entry.schema)) bySchema.set(entry.schema, entry);
|
|
4617
4724
|
const rewrites = /* @__PURE__ */ new Map();
|
|
4618
|
-
for (const record
|
|
4619
|
-
const seen = ctx.seen.get(record
|
|
4725
|
+
for (const record of pendingRecords.get(ctx) ?? []) {
|
|
4726
|
+
const seen = ctx.seen.get(record);
|
|
4620
4727
|
const names = (seen?.def ?? seen?.schema)?.propertyNames;
|
|
4621
4728
|
if (!names || names === true || rewrites.has(names)) continue;
|
|
4622
4729
|
const rewritten = stringifyKeyNames(bySchema, names, /* @__PURE__ */ new Set());
|
|
@@ -4747,13 +4854,99 @@ const readonlyProcessor = (schema, ctx, json, params) => {
|
|
|
4747
4854
|
seen.ref = def.innerType;
|
|
4748
4855
|
json.readOnly = true;
|
|
4749
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
|
+
};
|
|
4750
4863
|
const optionalProcessor = (schema, ctx, _json, params) => {
|
|
4751
4864
|
const def = schema._zod.def;
|
|
4752
4865
|
processSchema(def.innerType, ctx, params);
|
|
4753
4866
|
const seen = ctx.seen.get(schema);
|
|
4754
4867
|
seen.ref = def.innerType;
|
|
4755
4868
|
};
|
|
4756
|
-
|
|
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
|
+
}
|
|
4757
4950
|
//#endregion
|
|
4758
4951
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/errors.js
|
|
4759
4952
|
const _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
|
|
@@ -4787,12 +4980,12 @@ const initializer = (inst, issues) => {
|
|
|
4787
4980
|
_installedErrorProtos.add(proto);
|
|
4788
4981
|
_lazyMethod(proto, "format", (self) => (mapper) => formatError(self, mapper));
|
|
4789
4982
|
_lazyMethod(proto, "flatten", (self) => (mapper) => flattenError(self, mapper));
|
|
4790
|
-
_lazyMethod(proto, "addIssue", (self) => (issue
|
|
4791
|
-
self.issues.push(issue
|
|
4983
|
+
_lazyMethod(proto, "addIssue", (self) => (issue) => {
|
|
4984
|
+
self.issues.push(issue);
|
|
4792
4985
|
self.message = JSON.stringify(self.issues, jsonStringifyReplacer, 2);
|
|
4793
4986
|
});
|
|
4794
|
-
_lazyMethod(proto, "addIssues", (self) => (issues
|
|
4795
|
-
self.issues.push(...issues
|
|
4987
|
+
_lazyMethod(proto, "addIssues", (self) => (issues) => {
|
|
4988
|
+
self.issues.push(...issues);
|
|
4796
4989
|
self.message = JSON.stringify(self.issues, jsonStringifyReplacer, 2);
|
|
4797
4990
|
});
|
|
4798
4991
|
Object.defineProperty(proto, "isEmpty", {
|
|
@@ -4803,8 +4996,7 @@ const initializer = (inst, issues) => {
|
|
|
4803
4996
|
}
|
|
4804
4997
|
});
|
|
4805
4998
|
};
|
|
4806
|
-
const ZodRealError =
|
|
4807
|
-
|
|
4999
|
+
const ZodRealError = /*@__PURE__*/ $constructor("ZodError", initializer, void 0, { Parent: Error });
|
|
4808
5000
|
//#endregion
|
|
4809
5001
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/parse.js
|
|
4810
5002
|
const parse = /* @__PURE__ */ _parse(ZodRealError);
|
|
@@ -4819,7 +5011,6 @@ const safeEncode = /* @__PURE__ */ _safeEncode(ZodRealError);
|
|
|
4819
5011
|
const safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
4820
5012
|
const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
4821
5013
|
const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
4822
|
-
|
|
4823
5014
|
//#endregion
|
|
4824
5015
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/schemas.js
|
|
4825
5016
|
function _ensureDefaultLocale() {
|
|
@@ -4828,7 +5019,7 @@ function _ensureDefaultLocale() {
|
|
|
4828
5019
|
function _ensureDefaultMemoizer() {
|
|
4829
5020
|
if (!globalConfig.memoizer) config({ memoizer: memoizer() });
|
|
4830
5021
|
}
|
|
4831
|
-
const ZodType =
|
|
5022
|
+
const ZodType = /*@__PURE__*/ $constructor("ZodType", (inst, def) => {
|
|
4832
5023
|
_ensureDefaultLocale();
|
|
4833
5024
|
$ZodType.init(inst, def);
|
|
4834
5025
|
inst.def = def;
|
|
@@ -4852,8 +5043,8 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
4852
5043
|
brand() {
|
|
4853
5044
|
return this;
|
|
4854
5045
|
},
|
|
4855
|
-
register(reg, meta
|
|
4856
|
-
reg.add(this, meta
|
|
5046
|
+
register(reg, meta) {
|
|
5047
|
+
reg.add(this, meta);
|
|
4857
5048
|
return this;
|
|
4858
5049
|
},
|
|
4859
5050
|
refine(check, params) {
|
|
@@ -4863,7 +5054,7 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
4863
5054
|
return this.check(superRefine(refinement, params));
|
|
4864
5055
|
},
|
|
4865
5056
|
overwrite(fn) {
|
|
4866
|
-
return this.check(_overwrite(fn));
|
|
5057
|
+
return this.check(/* @__PURE__ */ _overwrite(fn));
|
|
4867
5058
|
},
|
|
4868
5059
|
optional() {
|
|
4869
5060
|
return optional(this);
|
|
@@ -4939,11 +5130,11 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
4939
5130
|
set "~standard"(value) {
|
|
4940
5131
|
own(this, "~standard", value);
|
|
4941
5132
|
},
|
|
4942
|
-
parse: function _parse
|
|
4943
|
-
return parse(this, data, params, { callee: _parse
|
|
5133
|
+
parse: function _parse(data, params) {
|
|
5134
|
+
return parse(this, data, params, { callee: _parse });
|
|
4944
5135
|
},
|
|
4945
|
-
parseAsync: async function _parseAsync
|
|
4946
|
-
return await parseAsync(this, data, params, { callee: _parseAsync
|
|
5136
|
+
parseAsync: async function _parseAsync(data, params) {
|
|
5137
|
+
return await parseAsync(this, data, params, { callee: _parseAsync });
|
|
4947
5138
|
},
|
|
4948
5139
|
safeParse(data, params) {
|
|
4949
5140
|
return safeParse(this, data, params);
|
|
@@ -4961,19 +5152,19 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
4961
5152
|
return validate(this, data, params);
|
|
4962
5153
|
},
|
|
4963
5154
|
validateAsync(data, params) {
|
|
4964
|
-
return validateAsync(this, data, params);
|
|
5155
|
+
return validateAsync$1(this, data, params);
|
|
4965
5156
|
},
|
|
4966
|
-
encode: function _encode
|
|
4967
|
-
return encode(this, data, params, { callee: _encode
|
|
5157
|
+
encode: function _encode(data, params) {
|
|
5158
|
+
return encode(this, data, params, { callee: _encode });
|
|
4968
5159
|
},
|
|
4969
|
-
decode: function _decode
|
|
4970
|
-
return decode(this, data, params, { callee: _decode
|
|
5160
|
+
decode: function _decode(data, params) {
|
|
5161
|
+
return decode(this, data, params, { callee: _decode });
|
|
4971
5162
|
},
|
|
4972
|
-
encodeAsync: async function _encodeAsync
|
|
4973
|
-
return await encodeAsync(this, data, params, { callee: _encodeAsync
|
|
5163
|
+
encodeAsync: async function _encodeAsync(data, params) {
|
|
5164
|
+
return await encodeAsync(this, data, params, { callee: _encodeAsync });
|
|
4974
5165
|
},
|
|
4975
|
-
decodeAsync: async function _decodeAsync
|
|
4976
|
-
return await decodeAsync(this, data, params, { callee: _decodeAsync
|
|
5166
|
+
decodeAsync: async function _decodeAsync(data, params) {
|
|
5167
|
+
return await decodeAsync(this, data, params, { callee: _decodeAsync });
|
|
4977
5168
|
},
|
|
4978
5169
|
safeEncode(data, params) {
|
|
4979
5170
|
return safeEncode(this, data, params);
|
|
@@ -4998,191 +5189,194 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
4998
5189
|
}
|
|
4999
5190
|
});
|
|
5000
5191
|
/** @internal */
|
|
5001
|
-
const _ZodString =
|
|
5192
|
+
const _ZodString = /*@__PURE__*/ $constructor("_ZodString", (inst, def) => {
|
|
5002
5193
|
$ZodString.init(inst, def);
|
|
5003
5194
|
ZodType.init(inst, def);
|
|
5004
5195
|
inst._zod.processJSONSchema = (ctx, json, params) => stringProcessor(inst, ctx, json, params);
|
|
5005
|
-
},
|
|
5196
|
+
}, /*@__PURE__*/ derived({
|
|
5006
5197
|
format: (inst) => aggregateChecks(inst).format ?? null,
|
|
5007
5198
|
minLength: (inst) => aggregateChecks(inst).minimum ?? null,
|
|
5008
5199
|
maxLength: (inst) => aggregateChecks(inst).maximum ?? null
|
|
5009
5200
|
}, {
|
|
5010
5201
|
regex(...args) {
|
|
5011
|
-
return this.check(_regex(...args));
|
|
5202
|
+
return this.check(/* @__PURE__ */ _regex(...args));
|
|
5012
5203
|
},
|
|
5013
5204
|
includes(...args) {
|
|
5014
|
-
return this.check(_includes(...args));
|
|
5205
|
+
return this.check(/* @__PURE__ */ _includes(...args));
|
|
5015
5206
|
},
|
|
5016
5207
|
startsWith(...args) {
|
|
5017
|
-
return this.check(_startsWith(...args));
|
|
5208
|
+
return this.check(/* @__PURE__ */ _startsWith(...args));
|
|
5018
5209
|
},
|
|
5019
5210
|
endsWith(...args) {
|
|
5020
|
-
return this.check(_endsWith(...args));
|
|
5211
|
+
return this.check(/* @__PURE__ */ _endsWith(...args));
|
|
5021
5212
|
},
|
|
5022
5213
|
min(...args) {
|
|
5023
|
-
return this.check(_minLength(...args));
|
|
5214
|
+
return this.check(/* @__PURE__ */ _minLength(...args));
|
|
5024
5215
|
},
|
|
5025
5216
|
max(...args) {
|
|
5026
|
-
return this.check(_maxLength(...args));
|
|
5217
|
+
return this.check(/* @__PURE__ */ _maxLength(...args));
|
|
5027
5218
|
},
|
|
5028
5219
|
length(...args) {
|
|
5029
|
-
return this.check(_length(...args));
|
|
5220
|
+
return this.check(/* @__PURE__ */ _length(...args));
|
|
5030
5221
|
},
|
|
5031
5222
|
nonempty(...args) {
|
|
5032
|
-
return this.check(_minLength(1, ...args));
|
|
5223
|
+
return this.check(/* @__PURE__ */ _minLength(1, ...args));
|
|
5033
5224
|
},
|
|
5034
5225
|
lowercase(params) {
|
|
5035
|
-
return this.check(_lowercase(params));
|
|
5226
|
+
return this.check(/* @__PURE__ */ _lowercase(params));
|
|
5036
5227
|
},
|
|
5037
5228
|
uppercase(params) {
|
|
5038
|
-
return this.check(_uppercase(params));
|
|
5229
|
+
return this.check(/* @__PURE__ */ _uppercase(params));
|
|
5039
5230
|
},
|
|
5040
5231
|
trim() {
|
|
5041
|
-
return this.check(_trim());
|
|
5232
|
+
return this.check(/* @__PURE__ */ _trim());
|
|
5042
5233
|
},
|
|
5043
5234
|
normalize(...args) {
|
|
5044
|
-
return this.check(_normalize(...args));
|
|
5235
|
+
return this.check(/* @__PURE__ */ _normalize(...args));
|
|
5045
5236
|
},
|
|
5046
5237
|
toLowerCase() {
|
|
5047
|
-
return this.check(_toLowerCase());
|
|
5238
|
+
return this.check(/* @__PURE__ */ _toLowerCase());
|
|
5048
5239
|
},
|
|
5049
5240
|
toUpperCase() {
|
|
5050
|
-
return this.check(_toUpperCase());
|
|
5241
|
+
return this.check(/* @__PURE__ */ _toUpperCase());
|
|
5051
5242
|
},
|
|
5052
5243
|
slugify() {
|
|
5053
|
-
return this.check(_slugify());
|
|
5244
|
+
return this.check(/* @__PURE__ */ _slugify());
|
|
5054
5245
|
}
|
|
5055
5246
|
}));
|
|
5056
|
-
const ZodString =
|
|
5247
|
+
const ZodString = /*@__PURE__*/ $constructor("ZodString", (inst, def) => {
|
|
5057
5248
|
$ZodString.init(inst, def);
|
|
5058
5249
|
_ZodString.init(inst, def);
|
|
5059
5250
|
}, {
|
|
5060
5251
|
email(params) {
|
|
5061
|
-
return this.check(_email(ZodEmail, params));
|
|
5252
|
+
return this.check(/* @__PURE__ */ _email(ZodEmail, params));
|
|
5062
5253
|
},
|
|
5063
5254
|
url(params) {
|
|
5064
|
-
return this.check(_url(ZodURL, params));
|
|
5255
|
+
return this.check(/* @__PURE__ */ _url(ZodURL, params));
|
|
5065
5256
|
},
|
|
5066
5257
|
jwt(params) {
|
|
5067
|
-
return this.check(_jwt(ZodJWT, params));
|
|
5258
|
+
return this.check(/* @__PURE__ */ _jwt(ZodJWT, params));
|
|
5068
5259
|
},
|
|
5069
5260
|
emoji(params) {
|
|
5070
|
-
return this.check(_emoji(ZodEmoji, params));
|
|
5261
|
+
return this.check(/* @__PURE__ */ _emoji(ZodEmoji, params));
|
|
5071
5262
|
},
|
|
5072
5263
|
guid(params) {
|
|
5073
|
-
return this.check(_guid(ZodGUID, params));
|
|
5264
|
+
return this.check(/* @__PURE__ */ _guid(ZodGUID, params));
|
|
5074
5265
|
},
|
|
5075
5266
|
uuid(params) {
|
|
5076
|
-
return this.check(_uuid(ZodUUID, params));
|
|
5267
|
+
return this.check(/* @__PURE__ */ _uuid(ZodUUID, params));
|
|
5077
5268
|
},
|
|
5078
5269
|
uuidv4(params) {
|
|
5079
|
-
return this.check(_uuidv4(ZodUUID, params));
|
|
5270
|
+
return this.check(/* @__PURE__ */ _uuidv4(ZodUUID, params));
|
|
5080
5271
|
},
|
|
5081
5272
|
uuidv6(params) {
|
|
5082
|
-
return this.check(_uuidv6(ZodUUID, params));
|
|
5273
|
+
return this.check(/* @__PURE__ */ _uuidv6(ZodUUID, params));
|
|
5083
5274
|
},
|
|
5084
5275
|
uuidv7(params) {
|
|
5085
|
-
return this.check(_uuidv7(ZodUUID, params));
|
|
5276
|
+
return this.check(/* @__PURE__ */ _uuidv7(ZodUUID, params));
|
|
5086
5277
|
},
|
|
5087
5278
|
nanoid(params) {
|
|
5088
|
-
return this.check(_nanoid(ZodNanoID, params));
|
|
5279
|
+
return this.check(/* @__PURE__ */ _nanoid(ZodNanoID, params));
|
|
5089
5280
|
},
|
|
5090
5281
|
cuid(params) {
|
|
5091
|
-
return this.check(_cuid(ZodCUID, params));
|
|
5282
|
+
return this.check(/* @__PURE__ */ _cuid(ZodCUID, params));
|
|
5092
5283
|
},
|
|
5093
5284
|
cuid2(params) {
|
|
5094
|
-
return this.check(_cuid2(ZodCUID2, params));
|
|
5285
|
+
return this.check(/* @__PURE__ */ _cuid2(ZodCUID2, params));
|
|
5095
5286
|
},
|
|
5096
5287
|
ulid(params) {
|
|
5097
|
-
return this.check(_ulid(ZodULID, params));
|
|
5288
|
+
return this.check(/* @__PURE__ */ _ulid(ZodULID, params));
|
|
5098
5289
|
},
|
|
5099
5290
|
base64(params) {
|
|
5100
|
-
return this.check(_base64(ZodBase64, params));
|
|
5291
|
+
return this.check(/* @__PURE__ */ _base64(ZodBase64, params));
|
|
5101
5292
|
},
|
|
5102
5293
|
base64url(params) {
|
|
5103
|
-
return this.check(_base64url(ZodBase64URL, params));
|
|
5294
|
+
return this.check(/* @__PURE__ */ _base64url(ZodBase64URL, params));
|
|
5104
5295
|
},
|
|
5105
5296
|
xid(params) {
|
|
5106
|
-
return this.check(_xid(ZodXID, params));
|
|
5297
|
+
return this.check(/* @__PURE__ */ _xid(ZodXID, params));
|
|
5107
5298
|
},
|
|
5108
5299
|
ksuid(params) {
|
|
5109
|
-
return this.check(_ksuid(ZodKSUID, params));
|
|
5300
|
+
return this.check(/* @__PURE__ */ _ksuid(ZodKSUID, params));
|
|
5110
5301
|
},
|
|
5111
5302
|
ipv4(params) {
|
|
5112
|
-
return this.check(_ipv4(ZodIPv4, params));
|
|
5303
|
+
return this.check(/* @__PURE__ */ _ipv4(ZodIPv4, params));
|
|
5113
5304
|
},
|
|
5114
5305
|
ipv6(params) {
|
|
5115
|
-
return this.check(_ipv6(ZodIPv6, params));
|
|
5306
|
+
return this.check(/* @__PURE__ */ _ipv6(ZodIPv6, params));
|
|
5116
5307
|
},
|
|
5117
5308
|
cidrv4(params) {
|
|
5118
|
-
return this.check(_cidrv4(ZodCIDRv4, params));
|
|
5309
|
+
return this.check(/* @__PURE__ */ _cidrv4(ZodCIDRv4, params));
|
|
5119
5310
|
},
|
|
5120
5311
|
cidrv6(params) {
|
|
5121
|
-
return this.check(_cidrv6(ZodCIDRv6, params));
|
|
5312
|
+
return this.check(/* @__PURE__ */ _cidrv6(ZodCIDRv6, params));
|
|
5122
5313
|
},
|
|
5123
5314
|
e164(params) {
|
|
5124
|
-
return this.check(_e164(ZodE164, params));
|
|
5315
|
+
return this.check(/* @__PURE__ */ _e164(ZodE164, params));
|
|
5125
5316
|
},
|
|
5126
5317
|
datetime(params) {
|
|
5127
|
-
return this.check(_isoDateTime(ZodISODateTime, params));
|
|
5318
|
+
return this.check(/* @__PURE__ */ _isoDateTime(ZodISODateTime, params));
|
|
5128
5319
|
},
|
|
5129
5320
|
date(params) {
|
|
5130
|
-
return this.check(_isoDate(ZodISODate, params));
|
|
5321
|
+
return this.check(/* @__PURE__ */ _isoDate(ZodISODate, params));
|
|
5131
5322
|
},
|
|
5132
5323
|
time(params) {
|
|
5133
|
-
return this.check(_isoTime(ZodISOTime, params));
|
|
5324
|
+
return this.check(/* @__PURE__ */ _isoTime(ZodISOTime, params));
|
|
5134
5325
|
},
|
|
5135
5326
|
duration(params) {
|
|
5136
|
-
return this.check(_isoDuration(ZodISODuration, params));
|
|
5327
|
+
return this.check(/* @__PURE__ */ _isoDuration(ZodISODuration, params));
|
|
5137
5328
|
}
|
|
5138
5329
|
});
|
|
5139
5330
|
function string(params) {
|
|
5140
|
-
return _string(ZodString, params);
|
|
5331
|
+
return /* @__PURE__ */ _string(ZodString, params);
|
|
5141
5332
|
}
|
|
5142
|
-
const ZodStringFormat =
|
|
5333
|
+
const ZodStringFormat = /*@__PURE__*/ $constructor("ZodStringFormat", (inst, def) => {
|
|
5143
5334
|
$ZodStringFormat.init(inst, def);
|
|
5144
5335
|
_ZodString.init(inst, def);
|
|
5145
5336
|
});
|
|
5146
|
-
const ZodISODateTime =
|
|
5337
|
+
const ZodISODateTime = /*@__PURE__*/ $constructor("ZodISODateTime", (inst, def) => {
|
|
5147
5338
|
$ZodISODateTime.init(inst, def);
|
|
5148
5339
|
ZodStringFormat.init(inst, def);
|
|
5149
5340
|
});
|
|
5150
|
-
const ZodISODate =
|
|
5341
|
+
const ZodISODate = /*@__PURE__*/ $constructor("ZodISODate", (inst, def) => {
|
|
5151
5342
|
$ZodISODate.init(inst, def);
|
|
5152
5343
|
ZodStringFormat.init(inst, def);
|
|
5153
5344
|
});
|
|
5154
|
-
const ZodISOTime =
|
|
5345
|
+
const ZodISOTime = /*@__PURE__*/ $constructor("ZodISOTime", (inst, def) => {
|
|
5155
5346
|
$ZodISOTime.init(inst, def);
|
|
5156
5347
|
ZodStringFormat.init(inst, def);
|
|
5157
5348
|
});
|
|
5158
|
-
const ZodISODuration =
|
|
5349
|
+
const ZodISODuration = /*@__PURE__*/ $constructor("ZodISODuration", (inst, def) => {
|
|
5159
5350
|
$ZodISODuration.init(inst, def);
|
|
5160
5351
|
ZodStringFormat.init(inst, def);
|
|
5161
5352
|
});
|
|
5162
|
-
const ZodEmail =
|
|
5353
|
+
const ZodEmail = /*@__PURE__*/ $constructor("ZodEmail", (inst, def) => {
|
|
5163
5354
|
$ZodEmail.init(inst, def);
|
|
5164
5355
|
ZodStringFormat.init(inst, def);
|
|
5165
5356
|
});
|
|
5166
|
-
|
|
5357
|
+
function email(params) {
|
|
5358
|
+
return /* @__PURE__ */ _email(ZodEmail, params);
|
|
5359
|
+
}
|
|
5360
|
+
const ZodGUID = /*@__PURE__*/ $constructor("ZodGUID", (inst, def) => {
|
|
5167
5361
|
$ZodGUID.init(inst, def);
|
|
5168
5362
|
ZodStringFormat.init(inst, def);
|
|
5169
5363
|
});
|
|
5170
|
-
const ZodUUID =
|
|
5364
|
+
const ZodUUID = /*@__PURE__*/ $constructor("ZodUUID", (inst, def) => {
|
|
5171
5365
|
$ZodUUID.init(inst, def);
|
|
5172
5366
|
ZodStringFormat.init(inst, def);
|
|
5173
5367
|
});
|
|
5174
|
-
const ZodURL =
|
|
5368
|
+
const ZodURL = /*@__PURE__*/ $constructor("ZodURL", (inst, def) => {
|
|
5175
5369
|
$ZodURL.init(inst, def);
|
|
5176
5370
|
ZodStringFormat.init(inst, def);
|
|
5177
5371
|
});
|
|
5178
5372
|
function url(params) {
|
|
5179
|
-
return _url(ZodURL, params);
|
|
5373
|
+
return /* @__PURE__ */ _url(ZodURL, params);
|
|
5180
5374
|
}
|
|
5181
|
-
const ZodEmoji =
|
|
5375
|
+
const ZodEmoji = /*@__PURE__*/ $constructor("ZodEmoji", (inst, def) => {
|
|
5182
5376
|
$ZodEmoji.init(inst, def);
|
|
5183
5377
|
ZodStringFormat.init(inst, def);
|
|
5184
5378
|
});
|
|
5185
|
-
const ZodNanoID =
|
|
5379
|
+
const ZodNanoID = /*@__PURE__*/ $constructor("ZodNanoID", (inst, def) => {
|
|
5186
5380
|
$ZodNanoID.init(inst, def);
|
|
5187
5381
|
ZodStringFormat.init(inst, def);
|
|
5188
5382
|
});
|
|
@@ -5191,64 +5385,64 @@ const ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => {
|
|
|
5191
5385
|
* (timestamps embedded in the id). Use {@link ZodCUID2} instead.
|
|
5192
5386
|
* See https://github.com/paralleldrive/cuid.
|
|
5193
5387
|
*/
|
|
5194
|
-
const ZodCUID =
|
|
5388
|
+
const ZodCUID = /*@__PURE__*/ $constructor("ZodCUID", (inst, def) => {
|
|
5195
5389
|
$ZodCUID.init(inst, def);
|
|
5196
5390
|
ZodStringFormat.init(inst, def);
|
|
5197
5391
|
});
|
|
5198
|
-
const ZodCUID2 =
|
|
5392
|
+
const ZodCUID2 = /*@__PURE__*/ $constructor("ZodCUID2", (inst, def) => {
|
|
5199
5393
|
$ZodCUID2.init(inst, def);
|
|
5200
5394
|
ZodStringFormat.init(inst, def);
|
|
5201
5395
|
});
|
|
5202
|
-
const ZodULID =
|
|
5396
|
+
const ZodULID = /*@__PURE__*/ $constructor("ZodULID", (inst, def) => {
|
|
5203
5397
|
$ZodULID.init(inst, def);
|
|
5204
5398
|
ZodStringFormat.init(inst, def);
|
|
5205
5399
|
});
|
|
5206
|
-
const ZodXID =
|
|
5400
|
+
const ZodXID = /*@__PURE__*/ $constructor("ZodXID", (inst, def) => {
|
|
5207
5401
|
$ZodXID.init(inst, def);
|
|
5208
5402
|
ZodStringFormat.init(inst, def);
|
|
5209
5403
|
});
|
|
5210
|
-
const ZodKSUID =
|
|
5404
|
+
const ZodKSUID = /*@__PURE__*/ $constructor("ZodKSUID", (inst, def) => {
|
|
5211
5405
|
$ZodKSUID.init(inst, def);
|
|
5212
5406
|
ZodStringFormat.init(inst, def);
|
|
5213
5407
|
});
|
|
5214
|
-
const ZodIPv4 =
|
|
5408
|
+
const ZodIPv4 = /*@__PURE__*/ $constructor("ZodIPv4", (inst, def) => {
|
|
5215
5409
|
$ZodIPv4.init(inst, def);
|
|
5216
5410
|
ZodStringFormat.init(inst, def);
|
|
5217
5411
|
});
|
|
5218
|
-
const ZodIPv6 =
|
|
5412
|
+
const ZodIPv6 = /*@__PURE__*/ $constructor("ZodIPv6", (inst, def) => {
|
|
5219
5413
|
$ZodIPv6.init(inst, def);
|
|
5220
5414
|
ZodStringFormat.init(inst, def);
|
|
5221
5415
|
});
|
|
5222
|
-
const ZodCIDRv4 =
|
|
5416
|
+
const ZodCIDRv4 = /*@__PURE__*/ $constructor("ZodCIDRv4", (inst, def) => {
|
|
5223
5417
|
$ZodCIDRv4.init(inst, def);
|
|
5224
5418
|
ZodStringFormat.init(inst, def);
|
|
5225
5419
|
});
|
|
5226
|
-
const ZodCIDRv6 =
|
|
5420
|
+
const ZodCIDRv6 = /*@__PURE__*/ $constructor("ZodCIDRv6", (inst, def) => {
|
|
5227
5421
|
$ZodCIDRv6.init(inst, def);
|
|
5228
5422
|
ZodStringFormat.init(inst, def);
|
|
5229
5423
|
});
|
|
5230
|
-
const ZodBase64 =
|
|
5424
|
+
const ZodBase64 = /*@__PURE__*/ $constructor("ZodBase64", (inst, def) => {
|
|
5231
5425
|
$ZodBase64.init(inst, def);
|
|
5232
5426
|
ZodStringFormat.init(inst, def);
|
|
5233
5427
|
});
|
|
5234
|
-
const ZodBase64URL =
|
|
5428
|
+
const ZodBase64URL = /*@__PURE__*/ $constructor("ZodBase64URL", (inst, def) => {
|
|
5235
5429
|
$ZodBase64URL.init(inst, def);
|
|
5236
5430
|
ZodStringFormat.init(inst, def);
|
|
5237
5431
|
});
|
|
5238
|
-
const ZodE164 =
|
|
5432
|
+
const ZodE164 = /*@__PURE__*/ $constructor("ZodE164", (inst, def) => {
|
|
5239
5433
|
$ZodE164.init(inst, def);
|
|
5240
5434
|
ZodStringFormat.init(inst, def);
|
|
5241
5435
|
});
|
|
5242
|
-
const ZodJWT =
|
|
5436
|
+
const ZodJWT = /*@__PURE__*/ $constructor("ZodJWT", (inst, def) => {
|
|
5243
5437
|
$ZodJWT.init(inst, def);
|
|
5244
5438
|
ZodStringFormat.init(inst, def);
|
|
5245
5439
|
});
|
|
5246
|
-
const ZodNumber =
|
|
5440
|
+
const ZodNumber = /*@__PURE__*/ $constructor("ZodNumber", (inst, def) => {
|
|
5247
5441
|
$ZodNumber.init(inst, def);
|
|
5248
5442
|
ZodType.init(inst, def);
|
|
5249
5443
|
inst._zod.processJSONSchema = (ctx, json, params) => numberProcessor(inst, ctx, json, params);
|
|
5250
5444
|
inst.isFinite = true;
|
|
5251
|
-
},
|
|
5445
|
+
}, /*@__PURE__*/ derived({
|
|
5252
5446
|
minValue: (inst) => {
|
|
5253
5447
|
const { minimum, exclusiveMinimum } = aggregateChecks(inst);
|
|
5254
5448
|
return Math.max(minimum ?? Number.NEGATIVE_INFINITY, exclusiveMinimum ?? Number.NEGATIVE_INFINITY);
|
|
@@ -5264,22 +5458,22 @@ const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
|
5264
5458
|
format: (inst) => aggregateChecks(inst).format ?? null
|
|
5265
5459
|
}, {
|
|
5266
5460
|
gt(value, params) {
|
|
5267
|
-
return this.check(_gt(value, params));
|
|
5461
|
+
return this.check(/* @__PURE__ */ _gt(value, params));
|
|
5268
5462
|
},
|
|
5269
5463
|
gte(value, params) {
|
|
5270
|
-
return this.check(_gte(value, params));
|
|
5464
|
+
return this.check(/* @__PURE__ */ _gte(value, params));
|
|
5271
5465
|
},
|
|
5272
5466
|
min(value, params) {
|
|
5273
|
-
return this.check(_gte(value, params));
|
|
5467
|
+
return this.check(/* @__PURE__ */ _gte(value, params));
|
|
5274
5468
|
},
|
|
5275
5469
|
lt(value, params) {
|
|
5276
|
-
return this.check(_lt(value, params));
|
|
5470
|
+
return this.check(/* @__PURE__ */ _lt(value, params));
|
|
5277
5471
|
},
|
|
5278
5472
|
lte(value, params) {
|
|
5279
|
-
return this.check(_lte(value, params));
|
|
5473
|
+
return this.check(/* @__PURE__ */ _lte(value, params));
|
|
5280
5474
|
},
|
|
5281
5475
|
max(value, params) {
|
|
5282
|
-
return this.check(_lte(value, params));
|
|
5476
|
+
return this.check(/* @__PURE__ */ _lte(value, params));
|
|
5283
5477
|
},
|
|
5284
5478
|
int(params) {
|
|
5285
5479
|
return this.check(int(params));
|
|
@@ -5288,62 +5482,62 @@ const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
|
5288
5482
|
return this.check(int(params));
|
|
5289
5483
|
},
|
|
5290
5484
|
positive(params) {
|
|
5291
|
-
return this.check(_gt(0, params));
|
|
5485
|
+
return this.check(/* @__PURE__ */ _gt(0, params));
|
|
5292
5486
|
},
|
|
5293
5487
|
nonnegative(params) {
|
|
5294
|
-
return this.check(_gte(0, params));
|
|
5488
|
+
return this.check(/* @__PURE__ */ _gte(0, params));
|
|
5295
5489
|
},
|
|
5296
5490
|
negative(params) {
|
|
5297
|
-
return this.check(_lt(0, params));
|
|
5491
|
+
return this.check(/* @__PURE__ */ _lt(0, params));
|
|
5298
5492
|
},
|
|
5299
5493
|
nonpositive(params) {
|
|
5300
|
-
return this.check(_lte(0, params));
|
|
5494
|
+
return this.check(/* @__PURE__ */ _lte(0, params));
|
|
5301
5495
|
},
|
|
5302
5496
|
multipleOf(value, params) {
|
|
5303
|
-
return this.check(_multipleOf(value, params));
|
|
5497
|
+
return this.check(/* @__PURE__ */ _multipleOf(value, params));
|
|
5304
5498
|
},
|
|
5305
5499
|
step(value, params) {
|
|
5306
|
-
return this.check(_multipleOf(value, params));
|
|
5500
|
+
return this.check(/* @__PURE__ */ _multipleOf(value, params));
|
|
5307
5501
|
},
|
|
5308
5502
|
finite() {
|
|
5309
5503
|
return this;
|
|
5310
5504
|
}
|
|
5311
5505
|
}));
|
|
5312
5506
|
function number(params) {
|
|
5313
|
-
return _number(ZodNumber, params);
|
|
5507
|
+
return /* @__PURE__ */ _number(ZodNumber, params);
|
|
5314
5508
|
}
|
|
5315
|
-
const ZodNumberFormat =
|
|
5509
|
+
const ZodNumberFormat = /*@__PURE__*/ $constructor("ZodNumberFormat", (inst, def) => {
|
|
5316
5510
|
$ZodNumberFormat.init(inst, def);
|
|
5317
5511
|
ZodNumber.init(inst, def);
|
|
5318
5512
|
});
|
|
5319
5513
|
function int(params) {
|
|
5320
|
-
return _int(ZodNumberFormat, params);
|
|
5514
|
+
return /* @__PURE__ */ _int(ZodNumberFormat, params);
|
|
5321
5515
|
}
|
|
5322
|
-
const ZodBoolean =
|
|
5516
|
+
const ZodBoolean = /*@__PURE__*/ $constructor("ZodBoolean", (inst, def) => {
|
|
5323
5517
|
$ZodBoolean.init(inst, def);
|
|
5324
5518
|
ZodType.init(inst, def);
|
|
5325
5519
|
inst._zod.processJSONSchema = (ctx, json, params) => booleanProcessor(inst, ctx, json, params);
|
|
5326
5520
|
});
|
|
5327
5521
|
function boolean(params) {
|
|
5328
|
-
return _boolean(ZodBoolean, params);
|
|
5522
|
+
return /* @__PURE__ */ _boolean(ZodBoolean, params);
|
|
5329
5523
|
}
|
|
5330
|
-
const ZodUnknown =
|
|
5524
|
+
const ZodUnknown = /*@__PURE__*/ $constructor("ZodUnknown", (inst, def) => {
|
|
5331
5525
|
$ZodUnknown.init(inst, def);
|
|
5332
5526
|
ZodType.init(inst, def);
|
|
5333
|
-
inst._zod.processJSONSchema = (ctx, json, params) =>
|
|
5527
|
+
inst._zod.processJSONSchema = (ctx, json, params) => void 0;
|
|
5334
5528
|
});
|
|
5335
5529
|
function unknown() {
|
|
5336
|
-
return _unknown(ZodUnknown);
|
|
5530
|
+
return /* @__PURE__ */ _unknown(ZodUnknown);
|
|
5337
5531
|
}
|
|
5338
|
-
const ZodNever =
|
|
5532
|
+
const ZodNever = /*@__PURE__*/ $constructor("ZodNever", (inst, def) => {
|
|
5339
5533
|
$ZodNever.init(inst, def);
|
|
5340
5534
|
ZodType.init(inst, def);
|
|
5341
5535
|
inst._zod.processJSONSchema = (ctx, json, params) => neverProcessor(inst, ctx, json, params);
|
|
5342
5536
|
});
|
|
5343
5537
|
function never(params) {
|
|
5344
|
-
return _never(ZodNever, params);
|
|
5538
|
+
return /* @__PURE__ */ _never(ZodNever, params);
|
|
5345
5539
|
}
|
|
5346
|
-
const ZodArray =
|
|
5540
|
+
const ZodArray = /*@__PURE__*/ $constructor("ZodArray", (inst, def) => {
|
|
5347
5541
|
_ensureDefaultMemoizer();
|
|
5348
5542
|
$ZodArray.init(inst, def);
|
|
5349
5543
|
ZodType.init(inst, def);
|
|
@@ -5351,25 +5545,25 @@ const ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
|
|
|
5351
5545
|
inst.element = def.element;
|
|
5352
5546
|
}, {
|
|
5353
5547
|
min(n, params) {
|
|
5354
|
-
return this.check(_minLength(n, params));
|
|
5548
|
+
return this.check(/* @__PURE__ */ _minLength(n, params));
|
|
5355
5549
|
},
|
|
5356
5550
|
nonempty(params) {
|
|
5357
|
-
return this.check(_minLength(1, params));
|
|
5551
|
+
return this.check(/* @__PURE__ */ _minLength(1, params));
|
|
5358
5552
|
},
|
|
5359
5553
|
max(n, params) {
|
|
5360
|
-
return this.check(_maxLength(n, params));
|
|
5554
|
+
return this.check(/* @__PURE__ */ _maxLength(n, params));
|
|
5361
5555
|
},
|
|
5362
5556
|
length(n, params) {
|
|
5363
|
-
return this.check(_length(n, params));
|
|
5557
|
+
return this.check(/* @__PURE__ */ _length(n, params));
|
|
5364
5558
|
},
|
|
5365
5559
|
unwrap() {
|
|
5366
5560
|
return this.element;
|
|
5367
5561
|
}
|
|
5368
5562
|
});
|
|
5369
5563
|
function array(element, params) {
|
|
5370
|
-
return _array(ZodArray, element, params);
|
|
5564
|
+
return /* @__PURE__ */ _array(ZodArray, element, params);
|
|
5371
5565
|
}
|
|
5372
|
-
const ZodObject =
|
|
5566
|
+
const ZodObject = /*@__PURE__*/ $constructor("ZodObject", (inst, def) => {
|
|
5373
5567
|
_ensureDefaultMemoizer();
|
|
5374
5568
|
$ZodObjectJIT.init(inst, def);
|
|
5375
5569
|
ZodType.init(inst, def);
|
|
@@ -5427,7 +5621,15 @@ function object(shape, params) {
|
|
|
5427
5621
|
};
|
|
5428
5622
|
return new ZodObject(def);
|
|
5429
5623
|
}
|
|
5430
|
-
|
|
5624
|
+
function looseObject(shape, params) {
|
|
5625
|
+
return new ZodObject({
|
|
5626
|
+
type: "object",
|
|
5627
|
+
shape,
|
|
5628
|
+
catchall: unknown(),
|
|
5629
|
+
...normalizeParams(params)
|
|
5630
|
+
});
|
|
5631
|
+
}
|
|
5632
|
+
const ZodUnion = /*@__PURE__*/ $constructor("ZodUnion", (inst, def) => {
|
|
5431
5633
|
$ZodUnion.init(inst, def);
|
|
5432
5634
|
ZodType.init(inst, def);
|
|
5433
5635
|
inst._zod.processJSONSchema = (ctx, json, params) => unionProcessor(inst, ctx, json, params);
|
|
@@ -5440,7 +5642,7 @@ function union(options, params) {
|
|
|
5440
5642
|
...normalizeParams(params)
|
|
5441
5643
|
});
|
|
5442
5644
|
}
|
|
5443
|
-
const ZodDiscriminatedUnion =
|
|
5645
|
+
const ZodDiscriminatedUnion = /*@__PURE__*/ $constructor("ZodDiscriminatedUnion", (inst, def) => {
|
|
5444
5646
|
ZodUnion.init(inst, def);
|
|
5445
5647
|
$ZodDiscriminatedUnion.init(inst, def);
|
|
5446
5648
|
});
|
|
@@ -5452,7 +5654,7 @@ function discriminatedUnion(discriminator, options, params) {
|
|
|
5452
5654
|
...normalizeParams(params)
|
|
5453
5655
|
});
|
|
5454
5656
|
}
|
|
5455
|
-
const ZodIntersection =
|
|
5657
|
+
const ZodIntersection = /*@__PURE__*/ $constructor("ZodIntersection", (inst, def) => {
|
|
5456
5658
|
$ZodIntersection.init(inst, def);
|
|
5457
5659
|
ZodType.init(inst, def);
|
|
5458
5660
|
inst._zod.processJSONSchema = (ctx, json, params) => intersectionProcessor(inst, ctx, json, params);
|
|
@@ -5464,7 +5666,40 @@ function intersection(left, right) {
|
|
|
5464
5666
|
right
|
|
5465
5667
|
});
|
|
5466
5668
|
}
|
|
5467
|
-
const
|
|
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
|
+
}
|
|
5702
|
+
const ZodRecord = /*@__PURE__*/ $constructor("ZodRecord", (inst, def) => {
|
|
5468
5703
|
_ensureDefaultMemoizer();
|
|
5469
5704
|
$ZodRecord.init(inst, def);
|
|
5470
5705
|
ZodType.init(inst, def);
|
|
@@ -5486,7 +5721,7 @@ function record(keyType, valueType, params) {
|
|
|
5486
5721
|
...normalizeParams(params)
|
|
5487
5722
|
});
|
|
5488
5723
|
}
|
|
5489
|
-
const ZodEnum =
|
|
5724
|
+
const ZodEnum = /*@__PURE__*/ $constructor("ZodEnum", (inst, def) => {
|
|
5490
5725
|
$ZodEnum.init(inst, def);
|
|
5491
5726
|
ZodType.init(inst, def);
|
|
5492
5727
|
inst._zod.processJSONSchema = (ctx, json, params) => enumProcessor(inst, ctx, json, params);
|
|
@@ -5524,7 +5759,7 @@ function _enum(values, params) {
|
|
|
5524
5759
|
...normalizeParams(params)
|
|
5525
5760
|
});
|
|
5526
5761
|
}
|
|
5527
|
-
const ZodLiteral =
|
|
5762
|
+
const ZodLiteral = /*@__PURE__*/ $constructor("ZodLiteral", (inst, def) => {
|
|
5528
5763
|
$ZodLiteral.init(inst, def);
|
|
5529
5764
|
ZodType.init(inst, def);
|
|
5530
5765
|
inst._zod.processJSONSchema = (ctx, json, params) => literalProcessor(inst, ctx, json, params);
|
|
@@ -5541,7 +5776,7 @@ function literal(value, params) {
|
|
|
5541
5776
|
...normalizeParams(params)
|
|
5542
5777
|
});
|
|
5543
5778
|
}
|
|
5544
|
-
const ZodTransform =
|
|
5779
|
+
const ZodTransform = /*@__PURE__*/ $constructor("ZodTransform", (inst, def) => {
|
|
5545
5780
|
_ensureDefaultMemoizer();
|
|
5546
5781
|
$ZodTransform.init(inst, def);
|
|
5547
5782
|
ZodType.init(inst, def);
|
|
@@ -5560,8 +5795,8 @@ const ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) =>
|
|
|
5560
5795
|
}
|
|
5561
5796
|
};
|
|
5562
5797
|
const output = def.transform(payload.value, payload);
|
|
5563
|
-
if (output instanceof Promise) return output.then((output
|
|
5564
|
-
payload.value = output
|
|
5798
|
+
if (output instanceof Promise) return output.then((output) => {
|
|
5799
|
+
payload.value = output;
|
|
5565
5800
|
return payload;
|
|
5566
5801
|
});
|
|
5567
5802
|
payload.value = output;
|
|
@@ -5574,7 +5809,7 @@ function transform(fn) {
|
|
|
5574
5809
|
transform: fn
|
|
5575
5810
|
});
|
|
5576
5811
|
}
|
|
5577
|
-
const ZodOptional =
|
|
5812
|
+
const ZodOptional = /*@__PURE__*/ $constructor("ZodOptional", (inst, def) => {
|
|
5578
5813
|
$ZodOptional.init(inst, def);
|
|
5579
5814
|
ZodType.init(inst, def);
|
|
5580
5815
|
inst._zod.processJSONSchema = (ctx, json, params) => optionalProcessor(inst, ctx, json, params);
|
|
@@ -5586,7 +5821,7 @@ function optional(innerType) {
|
|
|
5586
5821
|
innerType
|
|
5587
5822
|
});
|
|
5588
5823
|
}
|
|
5589
|
-
const ZodExactOptional =
|
|
5824
|
+
const ZodExactOptional = /*@__PURE__*/ $constructor("ZodExactOptional", (inst, def) => {
|
|
5590
5825
|
$ZodExactOptional.init(inst, def);
|
|
5591
5826
|
ZodType.init(inst, def);
|
|
5592
5827
|
inst._zod.processJSONSchema = (ctx, json, params) => optionalProcessor(inst, ctx, json, params);
|
|
@@ -5598,7 +5833,7 @@ function exactOptional(innerType) {
|
|
|
5598
5833
|
innerType
|
|
5599
5834
|
});
|
|
5600
5835
|
}
|
|
5601
|
-
const ZodNullable =
|
|
5836
|
+
const ZodNullable = /*@__PURE__*/ $constructor("ZodNullable", (inst, def) => {
|
|
5602
5837
|
$ZodNullable.init(inst, def);
|
|
5603
5838
|
ZodType.init(inst, def);
|
|
5604
5839
|
inst._zod.processJSONSchema = (ctx, json, params) => nullableProcessor(inst, ctx, json, params);
|
|
@@ -5610,7 +5845,7 @@ function nullable(innerType) {
|
|
|
5610
5845
|
innerType
|
|
5611
5846
|
});
|
|
5612
5847
|
}
|
|
5613
|
-
const ZodDefault =
|
|
5848
|
+
const ZodDefault = /*@__PURE__*/ $constructor("ZodDefault", (inst, def) => {
|
|
5614
5849
|
$ZodDefault.init(inst, def);
|
|
5615
5850
|
ZodType.init(inst, def);
|
|
5616
5851
|
inst._zod.processJSONSchema = (ctx, json, params) => defaultProcessor(inst, ctx, json, params);
|
|
@@ -5626,7 +5861,7 @@ function _default(innerType, defaultValue) {
|
|
|
5626
5861
|
}
|
|
5627
5862
|
});
|
|
5628
5863
|
}
|
|
5629
|
-
const ZodPrefault =
|
|
5864
|
+
const ZodPrefault = /*@__PURE__*/ $constructor("ZodPrefault", (inst, def) => {
|
|
5630
5865
|
$ZodPrefault.init(inst, def);
|
|
5631
5866
|
ZodType.init(inst, def);
|
|
5632
5867
|
inst._zod.processJSONSchema = (ctx, json, params) => prefaultProcessor(inst, ctx, json, params);
|
|
@@ -5641,7 +5876,7 @@ function prefault(innerType, defaultValue) {
|
|
|
5641
5876
|
}
|
|
5642
5877
|
});
|
|
5643
5878
|
}
|
|
5644
|
-
const ZodNonOptional =
|
|
5879
|
+
const ZodNonOptional = /*@__PURE__*/ $constructor("ZodNonOptional", (inst, def) => {
|
|
5645
5880
|
$ZodNonOptional.init(inst, def);
|
|
5646
5881
|
ZodType.init(inst, def);
|
|
5647
5882
|
inst._zod.processJSONSchema = (ctx, json, params) => nonoptionalProcessor(inst, ctx, json, params);
|
|
@@ -5654,7 +5889,7 @@ function nonoptional(innerType, params) {
|
|
|
5654
5889
|
...normalizeParams(params)
|
|
5655
5890
|
});
|
|
5656
5891
|
}
|
|
5657
|
-
const ZodCatch =
|
|
5892
|
+
const ZodCatch = /*@__PURE__*/ $constructor("ZodCatch", (inst, def) => {
|
|
5658
5893
|
$ZodCatch.init(inst, def);
|
|
5659
5894
|
ZodType.init(inst, def);
|
|
5660
5895
|
inst._zod.processJSONSchema = (ctx, json, params) => catchProcessor(inst, ctx, json, params);
|
|
@@ -5668,7 +5903,7 @@ function _catch(innerType, catchValue) {
|
|
|
5668
5903
|
catchValue: typeof catchValue === "function" ? catchValue : constantCatch(catchValue)
|
|
5669
5904
|
});
|
|
5670
5905
|
}
|
|
5671
|
-
const ZodPipe =
|
|
5906
|
+
const ZodPipe = /*@__PURE__*/ $constructor("ZodPipe", (inst, def) => {
|
|
5672
5907
|
$ZodPipe.init(inst, def);
|
|
5673
5908
|
ZodType.init(inst, def);
|
|
5674
5909
|
inst._zod.processJSONSchema = (ctx, json, params) => pipeProcessor(inst, ctx, json, params);
|
|
@@ -5682,7 +5917,7 @@ function pipe(in_, out) {
|
|
|
5682
5917
|
out
|
|
5683
5918
|
});
|
|
5684
5919
|
}
|
|
5685
|
-
const ZodReadonly =
|
|
5920
|
+
const ZodReadonly = /*@__PURE__*/ $constructor("ZodReadonly", (inst, def) => {
|
|
5686
5921
|
$ZodReadonly.init(inst, def);
|
|
5687
5922
|
ZodType.init(inst, def);
|
|
5688
5923
|
inst._zod.processJSONSchema = (ctx, json, params) => readonlyProcessor(inst, ctx, json, params);
|
|
@@ -5694,1126 +5929,33 @@ function readonly(innerType) {
|
|
|
5694
5929
|
innerType
|
|
5695
5930
|
});
|
|
5696
5931
|
}
|
|
5697
|
-
const
|
|
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
|
+
}
|
|
5944
|
+
const ZodCustom = /*@__PURE__*/ $constructor("ZodCustom", (inst, def) => {
|
|
5698
5945
|
$ZodCustom.init(inst, def);
|
|
5699
5946
|
ZodType.init(inst, def);
|
|
5700
5947
|
inst._zod.processJSONSchema = (ctx, json, params) => customProcessor(inst, ctx, json, params);
|
|
5701
5948
|
});
|
|
5702
5949
|
function custom(fn, _params) {
|
|
5703
|
-
return _custom(ZodCustom, fn ?? (() => true), _params);
|
|
5950
|
+
return /* @__PURE__ */ _custom(ZodCustom, fn ?? (() => true), _params);
|
|
5704
5951
|
}
|
|
5705
5952
|
function refine(fn, _params = {}) {
|
|
5706
|
-
return _refine(ZodCustom, fn, _params);
|
|
5953
|
+
return /* @__PURE__ */ _refine(ZodCustom, fn, _params);
|
|
5707
5954
|
}
|
|
5708
5955
|
function superRefine(fn, params) {
|
|
5709
|
-
return _superRefine(fn, params);
|
|
5956
|
+
return /* @__PURE__ */ _superRefine(fn, params);
|
|
5710
5957
|
}
|
|
5711
|
-
const describe = describe$1;
|
|
5712
|
-
const meta = meta$1;
|
|
5713
|
-
|
|
5714
5958
|
//#endregion
|
|
5715
|
-
|
|
5716
|
-
/**
|
|
5717
|
-
* What `gkm test` runs as. The CLI's own, so no project stage may take it:
|
|
5718
|
-
* its containers are torn down and rebuilt between runs.
|
|
5719
|
-
*/
|
|
5720
|
-
const TEST_STAGE = "test";
|
|
5721
|
-
/** A stage becomes part of every physical name, so it has to fit in one. */
|
|
5722
|
-
const STAGE_NAME = /^[a-z][a-z0-9-]*$/;
|
|
5723
|
-
/** Everything wrong with one stage name, or nothing. */
|
|
5724
|
-
function nameProblems(name) {
|
|
5725
|
-
const problems = [];
|
|
5726
|
-
if (!STAGE_NAME.test(name)) problems.push(`stage "${name}" must be lowercase letters, digits and hyphens, starting with a letter`);
|
|
5727
|
-
if (name === TEST_STAGE) problems.push(`stage "${TEST_STAGE}" is reserved for gkm test`);
|
|
5728
|
-
return problems;
|
|
5729
|
-
}
|
|
5730
|
-
/** Everything wrong with a list of deployed stages on its own. */
|
|
5731
|
-
function deployedProblems(deployed) {
|
|
5732
|
-
const problems = deployed.flatMap(nameProblems);
|
|
5733
|
-
const seen = /* @__PURE__ */ new Set();
|
|
5734
|
-
for (const name of deployed) {
|
|
5735
|
-
if (seen.has(name)) problems.push(`stage "${name}" is listed twice`);
|
|
5736
|
-
seen.add(name);
|
|
5737
|
-
}
|
|
5738
|
-
return problems;
|
|
5739
|
-
}
|
|
5740
|
-
/** Everything wrong with a stages block, or nothing. */
|
|
5741
|
-
function stageProblems(stages) {
|
|
5742
|
-
if (!stages) return ["`stages` is required, e.g. stages: { local: 'dev', deployed: ['prod'] }"];
|
|
5743
|
-
const { local, deployed, protected: kept = [] } = stages;
|
|
5744
|
-
const problems = [...nameProblems(local), ...deployedProblems(deployed)];
|
|
5745
|
-
if (deployed.includes(local)) problems.push(`"${local}" is both the local stage and a deployed one; they would share secrets`);
|
|
5746
|
-
for (const name of kept) if (!deployed.includes(name)) problems.push(`protected stage "${name}" is not a deployed stage`);
|
|
5747
|
-
return problems;
|
|
5748
|
-
}
|
|
5749
|
-
/** The stages block, or an error naming everything wrong with it. */
|
|
5750
|
-
function validateStages(stages) {
|
|
5751
|
-
const problems = stageProblems(stages);
|
|
5752
|
-
if (problems.length) throw new InvalidStages(problems);
|
|
5753
|
-
return stages;
|
|
5754
|
-
}
|
|
5755
|
-
/** Refuses a stage the project does not deploy to. */
|
|
5756
|
-
function assertDeployedStage(stages, stage) {
|
|
5757
|
-
if (!stages.deployed.includes(stage)) throw new UndeclaredStage(stage, stages.deployed);
|
|
5758
|
-
}
|
|
5759
|
-
/** A stages block — in gkm.config.ts or from `gkm init`'s flags — that breaks a rule. */
|
|
5760
|
-
var InvalidStages = class extends Error {
|
|
5761
|
-
constructor(problems) {
|
|
5762
|
-
super(`Invalid stages:\n ${problems.join("\n ")}`);
|
|
5763
|
-
this.problems = problems;
|
|
5764
|
-
this.name = "InvalidStages";
|
|
5765
|
-
}
|
|
5766
|
-
};
|
|
5767
|
-
/**
|
|
5768
|
-
* A stage the project does not deploy to. Refused before anything is
|
|
5769
|
-
* provisioned, so a typo does not become a second environment.
|
|
5770
|
-
*/
|
|
5771
|
-
var UndeclaredStage = class extends Error {
|
|
5772
|
-
constructor(stage, deployed) {
|
|
5773
|
-
super(`"${stage}" is not a deployed stage. gkm.config.ts deploys to: ${deployed.join(", ") || "nothing yet"}.`);
|
|
5774
|
-
this.stage = stage;
|
|
5775
|
-
this.deployed = deployed;
|
|
5776
|
-
this.name = "UndeclaredStage";
|
|
5777
|
-
}
|
|
5778
|
-
};
|
|
5959
|
+
export { url as _, discriminatedUnion as a, literal as c, object as d, record as f, unknown as g, union as h, custom as i, looseObject as l, tuple as m, array as n, email as o, string as p, boolean as r, lazy as s, _enum as t, number as u, toJSONSchema as v };
|
|
5779
5960
|
|
|
5780
|
-
//#
|
|
5781
|
-
//#region src/workspace/schema.ts
|
|
5782
|
-
/**
|
|
5783
|
-
* Routes can be a string glob, array of globs, or a partitioned config
|
|
5784
|
-
* with glob paths and a partition function.
|
|
5785
|
-
*/
|
|
5786
|
-
const RoutesSchema = union([
|
|
5787
|
-
string(),
|
|
5788
|
-
array(string()),
|
|
5789
|
-
object({
|
|
5790
|
-
paths: union([string(), array(string())]),
|
|
5791
|
-
partition: custom((val) => typeof val === "function")
|
|
5792
|
-
})
|
|
5793
|
-
]);
|
|
5794
|
-
/**
|
|
5795
|
-
* Telescope configuration schema.
|
|
5796
|
-
*/
|
|
5797
|
-
const TelescopeConfigSchema = object({
|
|
5798
|
-
enabled: boolean().optional(),
|
|
5799
|
-
port: number().optional(),
|
|
5800
|
-
path: string().optional(),
|
|
5801
|
-
ignore: array(string()).optional(),
|
|
5802
|
-
recordBody: boolean().optional(),
|
|
5803
|
-
maxEntries: number().optional(),
|
|
5804
|
-
websocket: boolean().optional()
|
|
5805
|
-
});
|
|
5806
|
-
/**
|
|
5807
|
-
* Studio configuration schema.
|
|
5808
|
-
*/
|
|
5809
|
-
const StudioConfigSchema = object({
|
|
5810
|
-
enabled: boolean().optional(),
|
|
5811
|
-
path: string().optional(),
|
|
5812
|
-
schema: string().optional()
|
|
5813
|
-
});
|
|
5814
|
-
/**
|
|
5815
|
-
* OpenAPI configuration schema.
|
|
5816
|
-
*/
|
|
5817
|
-
const OpenApiConfigSchema = object({
|
|
5818
|
-
enabled: boolean().optional(),
|
|
5819
|
-
title: string().optional(),
|
|
5820
|
-
version: string().optional(),
|
|
5821
|
-
description: string().optional()
|
|
5822
|
-
});
|
|
5823
|
-
/**
|
|
5824
|
-
* Hooks configuration schema.
|
|
5825
|
-
*/
|
|
5826
|
-
const HooksConfigSchema = object({ server: string().optional() });
|
|
5827
|
-
/**
|
|
5828
|
-
* Backend framework schema for non-gkm apps.
|
|
5829
|
-
*/
|
|
5830
|
-
const BackendFrameworkSchema = _enum([
|
|
5831
|
-
"hono",
|
|
5832
|
-
"better-auth",
|
|
5833
|
-
"express",
|
|
5834
|
-
"fastify"
|
|
5835
|
-
]);
|
|
5836
|
-
/**
|
|
5837
|
-
* Frontend framework schema.
|
|
5838
|
-
*/
|
|
5839
|
-
const FrontendFrameworkSchema = _enum([
|
|
5840
|
-
"nextjs",
|
|
5841
|
-
"remix",
|
|
5842
|
-
"vite",
|
|
5843
|
-
"tanstack-start"
|
|
5844
|
-
]);
|
|
5845
|
-
/**
|
|
5846
|
-
* Mobile framework schema.
|
|
5847
|
-
*/
|
|
5848
|
-
const MobileFrameworkSchema = _enum(["expo"]);
|
|
5849
|
-
/**
|
|
5850
|
-
* Combined framework schema (backend, frontend, or mobile).
|
|
5851
|
-
*/
|
|
5852
|
-
const FrameworkSchema = union([
|
|
5853
|
-
BackendFrameworkSchema,
|
|
5854
|
-
FrontendFrameworkSchema,
|
|
5855
|
-
MobileFrameworkSchema
|
|
5856
|
-
]);
|
|
5857
|
-
/** Frontend framework values, kept in sync with FrontendFrameworkSchema. */
|
|
5858
|
-
const FRONTEND_FRAMEWORKS = [
|
|
5859
|
-
"nextjs",
|
|
5860
|
-
"remix",
|
|
5861
|
-
"vite",
|
|
5862
|
-
"tanstack-start"
|
|
5863
|
-
];
|
|
5864
|
-
/** Mobile framework values, kept in sync with MobileFrameworkSchema. */
|
|
5865
|
-
const MOBILE_FRAMEWORKS = ["expo"];
|
|
5866
|
-
/**
|
|
5867
|
-
* Deploy target schema.
|
|
5868
|
-
* Currently only 'dokploy' is supported.
|
|
5869
|
-
* 'vercel' and 'cloudflare' are planned for Phase 2.
|
|
5870
|
-
*/
|
|
5871
|
-
const DeployTargetSchema = _enum([
|
|
5872
|
-
"dokploy",
|
|
5873
|
-
"vercel",
|
|
5874
|
-
"cloudflare"
|
|
5875
|
-
]);
|
|
5876
|
-
/**
|
|
5877
|
-
* Supported deploy targets (Phase 1).
|
|
5878
|
-
*/
|
|
5879
|
-
const SUPPORTED_DEPLOY_TARGETS = ["dokploy"];
|
|
5880
|
-
/**
|
|
5881
|
-
* Phase 2 deploy targets (not yet implemented).
|
|
5882
|
-
*/
|
|
5883
|
-
const PHASE_2_DEPLOY_TARGETS = ["vercel", "cloudflare"];
|
|
5884
|
-
/**
|
|
5885
|
-
* Check if a deploy target is supported.
|
|
5886
|
-
*/
|
|
5887
|
-
function isDeployTargetSupported(target) {
|
|
5888
|
-
return SUPPORTED_DEPLOY_TARGETS.includes(target);
|
|
5889
|
-
}
|
|
5890
|
-
/**
|
|
5891
|
-
* Check if a deploy target is planned for Phase 2.
|
|
5892
|
-
*/
|
|
5893
|
-
function isPhase2DeployTarget(target) {
|
|
5894
|
-
return PHASE_2_DEPLOY_TARGETS.includes(target);
|
|
5895
|
-
}
|
|
5896
|
-
/**
|
|
5897
|
-
* Get error message for unsupported deploy targets.
|
|
5898
|
-
*/
|
|
5899
|
-
function getDeployTargetError(target, appName) {
|
|
5900
|
-
if (isPhase2DeployTarget(target)) {
|
|
5901
|
-
const context = appName ? ` for app "${appName}"` : "";
|
|
5902
|
-
return `Deploy target "${target}"${context} is coming in Phase 2. Currently only "dokploy" is supported.`;
|
|
5903
|
-
}
|
|
5904
|
-
return `Unknown deploy target: ${target}. Supported: dokploy. Coming in Phase 2: vercel, cloudflare.`;
|
|
5905
|
-
}
|
|
5906
|
-
/**
|
|
5907
|
-
* Dokploy workspace configuration schema.
|
|
5908
|
-
* Supports either a single endpoint or per-stage endpoints.
|
|
5909
|
-
*/
|
|
5910
|
-
const DokployWorkspaceConfigSchema = object({
|
|
5911
|
-
endpoint: url("Dokploy endpoint must be a valid URL").optional(),
|
|
5912
|
-
endpoints: record(string(), url("Endpoint must be a valid URL")).optional(),
|
|
5913
|
-
registry: string().optional(),
|
|
5914
|
-
registryId: string().optional(),
|
|
5915
|
-
domains: record(string(), string()).optional()
|
|
5916
|
-
}).refine((data) => data.endpoint || data.endpoints, { message: "Either endpoint or endpoints must be provided" });
|
|
5917
|
-
/**
|
|
5918
|
-
* Valid AWS regions.
|
|
5919
|
-
*/
|
|
5920
|
-
const AwsRegionSchema = _enum([
|
|
5921
|
-
"us-east-1",
|
|
5922
|
-
"us-east-2",
|
|
5923
|
-
"us-west-1",
|
|
5924
|
-
"us-west-2",
|
|
5925
|
-
"af-south-1",
|
|
5926
|
-
"ap-east-1",
|
|
5927
|
-
"ap-south-1",
|
|
5928
|
-
"ap-south-2",
|
|
5929
|
-
"ap-southeast-1",
|
|
5930
|
-
"ap-southeast-2",
|
|
5931
|
-
"ap-southeast-3",
|
|
5932
|
-
"ap-southeast-4",
|
|
5933
|
-
"ap-northeast-1",
|
|
5934
|
-
"ap-northeast-2",
|
|
5935
|
-
"ap-northeast-3",
|
|
5936
|
-
"ca-central-1",
|
|
5937
|
-
"eu-central-1",
|
|
5938
|
-
"eu-central-2",
|
|
5939
|
-
"eu-west-1",
|
|
5940
|
-
"eu-west-2",
|
|
5941
|
-
"eu-west-3",
|
|
5942
|
-
"eu-south-1",
|
|
5943
|
-
"eu-south-2",
|
|
5944
|
-
"eu-north-1",
|
|
5945
|
-
"me-south-1",
|
|
5946
|
-
"me-central-1",
|
|
5947
|
-
"sa-east-1"
|
|
5948
|
-
]);
|
|
5949
|
-
/**
|
|
5950
|
-
* DNS record types supported across providers.
|
|
5951
|
-
*/
|
|
5952
|
-
const DnsRecordTypeSchema = _enum([
|
|
5953
|
-
"A",
|
|
5954
|
-
"AAAA",
|
|
5955
|
-
"CNAME",
|
|
5956
|
-
"MX",
|
|
5957
|
-
"TXT",
|
|
5958
|
-
"NS",
|
|
5959
|
-
"SRV",
|
|
5960
|
-
"CAA"
|
|
5961
|
-
]);
|
|
5962
|
-
/**
|
|
5963
|
-
* A DNS record as returned by the provider.
|
|
5964
|
-
*/
|
|
5965
|
-
const DnsRecordSchema = object({
|
|
5966
|
-
name: string(),
|
|
5967
|
-
type: DnsRecordTypeSchema,
|
|
5968
|
-
ttl: number().int().positive(),
|
|
5969
|
-
values: array(string())
|
|
5970
|
-
});
|
|
5971
|
-
/**
|
|
5972
|
-
* A DNS record to create or update.
|
|
5973
|
-
*/
|
|
5974
|
-
const UpsertDnsRecordSchema = object({
|
|
5975
|
-
name: string(),
|
|
5976
|
-
type: DnsRecordTypeSchema,
|
|
5977
|
-
ttl: number().int().positive(),
|
|
5978
|
-
value: string()
|
|
5979
|
-
});
|
|
5980
|
-
/**
|
|
5981
|
-
* Result of an upsert operation.
|
|
5982
|
-
*/
|
|
5983
|
-
const UpsertResultSchema = object({
|
|
5984
|
-
record: UpsertDnsRecordSchema,
|
|
5985
|
-
created: boolean(),
|
|
5986
|
-
unchanged: boolean()
|
|
5987
|
-
});
|
|
5988
|
-
/**
|
|
5989
|
-
* Hostinger DNS provider config (without domain - domain is the record key).
|
|
5990
|
-
*/
|
|
5991
|
-
const HostingerDnsProviderSchema = object({
|
|
5992
|
-
provider: literal("hostinger"),
|
|
5993
|
-
ttl: number().int().positive().optional()
|
|
5994
|
-
});
|
|
5995
|
-
/**
|
|
5996
|
-
* Route53 DNS provider config (without domain - domain is the record key).
|
|
5997
|
-
*/
|
|
5998
|
-
const Route53DnsProviderSchema = object({
|
|
5999
|
-
provider: literal("route53"),
|
|
6000
|
-
region: AwsRegionSchema.optional(),
|
|
6001
|
-
profile: string().optional(),
|
|
6002
|
-
hostedZoneId: string().optional(),
|
|
6003
|
-
ttl: number().int().positive().optional()
|
|
6004
|
-
});
|
|
6005
|
-
/**
|
|
6006
|
-
* Cloudflare DNS provider config (placeholder for future).
|
|
6007
|
-
*/
|
|
6008
|
-
const CloudflareDnsProviderSchema = object({
|
|
6009
|
-
provider: literal("cloudflare"),
|
|
6010
|
-
ttl: number().int().positive().optional()
|
|
6011
|
-
});
|
|
6012
|
-
/**
|
|
6013
|
-
* Manual DNS configuration (user handles DNS themselves).
|
|
6014
|
-
*/
|
|
6015
|
-
const ManualDnsProviderSchema = object({ provider: literal("manual") });
|
|
6016
|
-
/**
|
|
6017
|
-
* Custom DNS provider config (user-provided implementation).
|
|
6018
|
-
*/
|
|
6019
|
-
const CustomDnsProviderSchema = object({
|
|
6020
|
-
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" }),
|
|
6021
|
-
ttl: number().int().positive().optional()
|
|
6022
|
-
});
|
|
6023
|
-
/**
|
|
6024
|
-
* Built-in DNS provider config (discriminated union).
|
|
6025
|
-
*/
|
|
6026
|
-
const BuiltInDnsProviderSchema = discriminatedUnion("provider", [
|
|
6027
|
-
HostingerDnsProviderSchema,
|
|
6028
|
-
Route53DnsProviderSchema,
|
|
6029
|
-
CloudflareDnsProviderSchema,
|
|
6030
|
-
ManualDnsProviderSchema
|
|
6031
|
-
]);
|
|
6032
|
-
/**
|
|
6033
|
-
* Single DNS provider config (for one domain).
|
|
6034
|
-
*/
|
|
6035
|
-
const DnsProviderSchema = union([BuiltInDnsProviderSchema, CustomDnsProviderSchema]);
|
|
6036
|
-
/**
|
|
6037
|
-
* DNS configuration schema.
|
|
6038
|
-
*
|
|
6039
|
-
* Maps root domains to their DNS provider configuration.
|
|
6040
|
-
* Example:
|
|
6041
|
-
* ```
|
|
6042
|
-
* dns: {
|
|
6043
|
-
* 'geekmidas.dev': { provider: 'hostinger' },
|
|
6044
|
-
* 'geekmidas.com': { provider: 'route53' },
|
|
6045
|
-
* }
|
|
6046
|
-
* ```
|
|
6047
|
-
*
|
|
6048
|
-
* Supported providers:
|
|
6049
|
-
* - 'hostinger': Use Hostinger DNS API
|
|
6050
|
-
* - 'route53': Use AWS Route53
|
|
6051
|
-
* - 'cloudflare': Use Cloudflare DNS API (future)
|
|
6052
|
-
* - 'manual': Don't create records, just print required records
|
|
6053
|
-
* - Custom: Provide a DnsProvider implementation
|
|
6054
|
-
*/
|
|
6055
|
-
const DnsConfigSchema = record(string(), DnsProviderSchema);
|
|
6056
|
-
const HostingerDnsConfigSchema = HostingerDnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
|
|
6057
|
-
const Route53DnsConfigSchema = Route53DnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
|
|
6058
|
-
const CloudflareDnsConfigSchema = CloudflareDnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
|
|
6059
|
-
const ManualDnsConfigSchema = ManualDnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
|
|
6060
|
-
const CustomDnsConfigSchema = CustomDnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
|
|
6061
|
-
const BuiltInDnsConfigSchema = discriminatedUnion("provider", [
|
|
6062
|
-
HostingerDnsConfigSchema,
|
|
6063
|
-
Route53DnsConfigSchema,
|
|
6064
|
-
CloudflareDnsConfigSchema,
|
|
6065
|
-
ManualDnsConfigSchema
|
|
6066
|
-
]);
|
|
6067
|
-
const LegacyDnsConfigSchema = union([BuiltInDnsConfigSchema, CustomDnsConfigSchema]);
|
|
6068
|
-
/**
|
|
6069
|
-
* Combined DNS config that supports both new multi-domain and legacy single-domain formats.
|
|
6070
|
-
*/
|
|
6071
|
-
const DnsConfigWithLegacySchema = union([DnsConfigSchema, LegacyDnsConfigSchema]);
|
|
6072
|
-
/**
|
|
6073
|
-
* Backups configuration schema.
|
|
6074
|
-
*
|
|
6075
|
-
* Configures automatic backup destinations for database services.
|
|
6076
|
-
* On first deploy, creates S3 bucket with unique name and IAM credentials.
|
|
6077
|
-
*/
|
|
6078
|
-
const BackupsConfigSchema = object({
|
|
6079
|
-
type: literal("s3"),
|
|
6080
|
-
profile: string().optional(),
|
|
6081
|
-
region: AwsRegionSchema,
|
|
6082
|
-
schedule: string().optional(),
|
|
6083
|
-
retention: number().optional()
|
|
6084
|
-
});
|
|
6085
|
-
/**
|
|
6086
|
-
* Deploy configuration schema.
|
|
6087
|
-
*/
|
|
6088
|
-
const DeployConfigSchema = object({
|
|
6089
|
-
default: DeployTargetSchema.optional(),
|
|
6090
|
-
dokploy: DokployWorkspaceConfigSchema.optional(),
|
|
6091
|
-
dns: DnsConfigWithLegacySchema.optional(),
|
|
6092
|
-
backups: BackupsConfigSchema.optional()
|
|
6093
|
-
});
|
|
6094
|
-
/**
|
|
6095
|
-
* Models configuration schema.
|
|
6096
|
-
*/
|
|
6097
|
-
const ModelsConfigSchema = object({
|
|
6098
|
-
path: string().optional(),
|
|
6099
|
-
schema: _enum(["zod"]).optional()
|
|
6100
|
-
});
|
|
6101
|
-
/**
|
|
6102
|
-
* Shared configuration schema.
|
|
6103
|
-
*/
|
|
6104
|
-
const SharedConfigSchema = object({
|
|
6105
|
-
packages: array(string()).optional(),
|
|
6106
|
-
models: ModelsConfigSchema.optional()
|
|
6107
|
-
});
|
|
6108
|
-
/**
|
|
6109
|
-
* Secrets configuration schema.
|
|
6110
|
-
*/
|
|
6111
|
-
const StagesConfigSchema = object({
|
|
6112
|
-
local: string(),
|
|
6113
|
-
deployed: array(string()),
|
|
6114
|
-
protected: array(string()).optional()
|
|
6115
|
-
}).superRefine((stages, ctx) => {
|
|
6116
|
-
for (const message of stageProblems(stages)) ctx.addIssue({
|
|
6117
|
-
code: "custom",
|
|
6118
|
-
message
|
|
6119
|
-
});
|
|
6120
|
-
});
|
|
6121
|
-
const SecretsConfigSchema = object({
|
|
6122
|
-
enabled: boolean().optional(),
|
|
6123
|
-
algorithm: string().optional(),
|
|
6124
|
-
kdf: _enum(["scrypt", "pbkdf2"]).optional()
|
|
6125
|
-
});
|
|
6126
|
-
/**
|
|
6127
|
-
* Local state provider config.
|
|
6128
|
-
*/
|
|
6129
|
-
const LocalStateConfigSchema = object({ provider: literal("local") });
|
|
6130
|
-
/**
|
|
6131
|
-
* SSM state provider config (requires region).
|
|
6132
|
-
*/
|
|
6133
|
-
const SSMStateConfigSchema = object({
|
|
6134
|
-
provider: literal("ssm"),
|
|
6135
|
-
region: AwsRegionSchema,
|
|
6136
|
-
profile: string().optional()
|
|
6137
|
-
});
|
|
6138
|
-
/**
|
|
6139
|
-
* Custom state provider config (user-provided implementation).
|
|
6140
|
-
*/
|
|
6141
|
-
const CustomStateConfigSchema = object({ 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" }) });
|
|
6142
|
-
/**
|
|
6143
|
-
* Built-in state provider config (discriminated union).
|
|
6144
|
-
*/
|
|
6145
|
-
const BuiltInStateConfigSchema = discriminatedUnion("provider", [LocalStateConfigSchema, SSMStateConfigSchema]);
|
|
6146
|
-
/**
|
|
6147
|
-
* State configuration schema.
|
|
6148
|
-
*
|
|
6149
|
-
* Configures how deployment state is stored.
|
|
6150
|
-
* - 'local': Store in .gkm/deploy-{stage}.json (default)
|
|
6151
|
-
* - 'ssm': Store in AWS SSM Parameter Store (requires region)
|
|
6152
|
-
* - Custom: Provide a StateProvider implementation with read/write methods
|
|
6153
|
-
*/
|
|
6154
|
-
const StateConfigSchema = union([BuiltInStateConfigSchema, CustomStateConfigSchema]);
|
|
6155
|
-
/**
|
|
6156
|
-
* App configuration schema.
|
|
6157
|
-
*/
|
|
6158
|
-
const AppConfigSchema = object({
|
|
6159
|
-
type: _enum([
|
|
6160
|
-
"backend",
|
|
6161
|
-
"web",
|
|
6162
|
-
"mobile"
|
|
6163
|
-
]).optional().default("backend"),
|
|
6164
|
-
path: string().min(1, "App path is required"),
|
|
6165
|
-
port: number().int().positive("Port must be a positive integer"),
|
|
6166
|
-
dependencies: array(string()).optional(),
|
|
6167
|
-
deploy: DeployTargetSchema.optional(),
|
|
6168
|
-
constructs: RoutesSchema.optional(),
|
|
6169
|
-
routes: RoutesSchema.optional(),
|
|
6170
|
-
functions: RoutesSchema.optional(),
|
|
6171
|
-
crons: RoutesSchema.optional(),
|
|
6172
|
-
queues: RoutesSchema.optional(),
|
|
6173
|
-
topics: RoutesSchema.optional(),
|
|
6174
|
-
subscribers: RoutesSchema.optional(),
|
|
6175
|
-
envParser: string().optional(),
|
|
6176
|
-
logger: string().optional(),
|
|
6177
|
-
hooks: HooksConfigSchema.optional(),
|
|
6178
|
-
telescope: union([
|
|
6179
|
-
string(),
|
|
6180
|
-
boolean(),
|
|
6181
|
-
TelescopeConfigSchema
|
|
6182
|
-
]).optional(),
|
|
6183
|
-
studio: union([
|
|
6184
|
-
string(),
|
|
6185
|
-
boolean(),
|
|
6186
|
-
StudioConfigSchema
|
|
6187
|
-
]).optional(),
|
|
6188
|
-
openapi: union([boolean(), OpenApiConfigSchema]).optional(),
|
|
6189
|
-
runtime: _enum(["node", "bun"]).optional(),
|
|
6190
|
-
env: union([string(), array(string())]).optional(),
|
|
6191
|
-
entry: string().optional(),
|
|
6192
|
-
framework: FrameworkSchema.optional(),
|
|
6193
|
-
config: object({
|
|
6194
|
-
client: string().optional(),
|
|
6195
|
-
server: string().optional()
|
|
6196
|
-
}).optional()
|
|
6197
|
-
}).refine((data) => {
|
|
6198
|
-
if (data.type === "web") {
|
|
6199
|
-
if (!data.framework || !FRONTEND_FRAMEWORKS.includes(data.framework)) return false;
|
|
6200
|
-
}
|
|
6201
|
-
return true;
|
|
6202
|
-
}, {
|
|
6203
|
-
message: `Web apps must have a valid web framework (${FRONTEND_FRAMEWORKS.join(", ")})`,
|
|
6204
|
-
path: ["framework"]
|
|
6205
|
-
}).refine((data) => {
|
|
6206
|
-
if (data.type === "mobile") {
|
|
6207
|
-
if (!data.framework || !MOBILE_FRAMEWORKS.includes(data.framework)) return false;
|
|
6208
|
-
}
|
|
6209
|
-
return true;
|
|
6210
|
-
}, {
|
|
6211
|
-
message: `Mobile apps must have a valid mobile framework (${MOBILE_FRAMEWORKS.join(", ")})`,
|
|
6212
|
-
path: ["framework"]
|
|
6213
|
-
});
|
|
6214
|
-
/**
|
|
6215
|
-
* Workspace configuration schema.
|
|
6216
|
-
*/
|
|
6217
|
-
const WorkspaceConfigSchema = object({
|
|
6218
|
-
name: string().optional(),
|
|
6219
|
-
constructs: RoutesSchema.optional(),
|
|
6220
|
-
apps: record(string(), AppConfigSchema).optional(),
|
|
6221
|
-
shared: SharedConfigSchema.optional(),
|
|
6222
|
-
deploy: DeployConfigSchema.optional(),
|
|
6223
|
-
stages: StagesConfigSchema,
|
|
6224
|
-
secrets: SecretsConfigSchema.optional(),
|
|
6225
|
-
state: StateConfigSchema.optional()
|
|
6226
|
-
}).strict().refine((data) => {
|
|
6227
|
-
const appNames = Object.keys(data.apps ?? {});
|
|
6228
|
-
for (const [appName, app] of Object.entries(data.apps ?? {})) for (const dep of app.dependencies ?? []) {
|
|
6229
|
-
if (!appNames.includes(dep)) return false;
|
|
6230
|
-
if (dep === appName) return false;
|
|
6231
|
-
}
|
|
6232
|
-
return true;
|
|
6233
|
-
}, { message: "App dependencies must reference existing apps and cannot be self-referential" }).refine((data) => {
|
|
6234
|
-
const appNames = Object.keys(data.apps ?? {});
|
|
6235
|
-
const visited = /* @__PURE__ */ new Set();
|
|
6236
|
-
const recStack = /* @__PURE__ */ new Set();
|
|
6237
|
-
function hasCycle(app) {
|
|
6238
|
-
if (recStack.has(app)) return true;
|
|
6239
|
-
if (visited.has(app)) return false;
|
|
6240
|
-
visited.add(app);
|
|
6241
|
-
recStack.add(app);
|
|
6242
|
-
const deps = data.apps?.[app]?.dependencies ?? [];
|
|
6243
|
-
for (const dep of deps) if (hasCycle(dep)) return true;
|
|
6244
|
-
recStack.delete(app);
|
|
6245
|
-
return false;
|
|
6246
|
-
}
|
|
6247
|
-
for (const app of appNames) {
|
|
6248
|
-
visited.clear();
|
|
6249
|
-
recStack.clear();
|
|
6250
|
-
if (hasCycle(app)) return false;
|
|
6251
|
-
}
|
|
6252
|
-
return true;
|
|
6253
|
-
}, { message: "Circular dependencies detected between apps" }).superRefine((data, ctx) => {
|
|
6254
|
-
const defaultTarget = data.deploy?.default;
|
|
6255
|
-
if (defaultTarget && !isDeployTargetSupported(defaultTarget)) {
|
|
6256
|
-
ctx.addIssue({
|
|
6257
|
-
code: "custom",
|
|
6258
|
-
message: getDeployTargetError(defaultTarget),
|
|
6259
|
-
path: ["deploy", "default"]
|
|
6260
|
-
});
|
|
6261
|
-
return;
|
|
6262
|
-
}
|
|
6263
|
-
for (const [appName, app] of Object.entries(data.apps ?? {})) if (app.deploy && !isDeployTargetSupported(app.deploy)) {
|
|
6264
|
-
ctx.addIssue({
|
|
6265
|
-
code: "custom",
|
|
6266
|
-
message: getDeployTargetError(app.deploy, appName),
|
|
6267
|
-
path: [
|
|
6268
|
-
"apps",
|
|
6269
|
-
appName,
|
|
6270
|
-
"deploy"
|
|
6271
|
-
]
|
|
6272
|
-
});
|
|
6273
|
-
return;
|
|
6274
|
-
}
|
|
6275
|
-
if (data.state?.provider === "ssm" && !data.name) ctx.addIssue({
|
|
6276
|
-
code: "custom",
|
|
6277
|
-
message: "Workspace name is required when using SSM state provider. Add \"name\" to your gkm.config.ts.",
|
|
6278
|
-
path: ["name"]
|
|
6279
|
-
});
|
|
6280
|
-
});
|
|
6281
|
-
/**
|
|
6282
|
-
* Validate workspace configuration.
|
|
6283
|
-
* Throws ZodError with detailed messages on validation failure.
|
|
6284
|
-
*/
|
|
6285
|
-
function validateWorkspaceConfig(config$1) {
|
|
6286
|
-
return WorkspaceConfigSchema.parse(config$1);
|
|
6287
|
-
}
|
|
6288
|
-
/**
|
|
6289
|
-
* Safe validation that returns result instead of throwing.
|
|
6290
|
-
*/
|
|
6291
|
-
function safeValidateWorkspaceConfig(config$1) {
|
|
6292
|
-
const result = WorkspaceConfigSchema.safeParse(config$1);
|
|
6293
|
-
if (result.success) return {
|
|
6294
|
-
success: true,
|
|
6295
|
-
data: result.data
|
|
6296
|
-
};
|
|
6297
|
-
return {
|
|
6298
|
-
success: false,
|
|
6299
|
-
error: result.error
|
|
6300
|
-
};
|
|
6301
|
-
}
|
|
6302
|
-
/**
|
|
6303
|
-
* Format Zod errors into user-friendly messages.
|
|
6304
|
-
*/
|
|
6305
|
-
function formatValidationErrors(error$1) {
|
|
6306
|
-
const messages = error$1.issues.map((issue$1) => {
|
|
6307
|
-
const path = issue$1.path.join(".");
|
|
6308
|
-
return path ? ` - ${path}: ${issue$1.message}` : ` - ${issue$1.message}`;
|
|
6309
|
-
});
|
|
6310
|
-
return `Workspace configuration validation failed:\n${messages.join("\n")}`;
|
|
6311
|
-
}
|
|
6312
|
-
|
|
6313
|
-
//#endregion
|
|
6314
|
-
//#region src/workspace/types.ts
|
|
6315
|
-
/**
|
|
6316
|
-
* Type guard to check if a config is a WorkspaceConfig.
|
|
6317
|
-
*
|
|
6318
|
-
* @example
|
|
6319
|
-
* ```ts
|
|
6320
|
-
* const config = await loadConfig();
|
|
6321
|
-
* if (isWorkspaceConfig(config)) {
|
|
6322
|
-
* // config.apps is available
|
|
6323
|
-
* console.log(Object.keys(config.apps));
|
|
6324
|
-
* }
|
|
6325
|
-
* ```
|
|
6326
|
-
*/
|
|
6327
|
-
function isWorkspaceConfig(config$1) {
|
|
6328
|
-
if (typeof config$1 !== "object" || config$1 === null) return false;
|
|
6329
|
-
if ("apps" in config$1 && typeof config$1.apps === "object") return true;
|
|
6330
|
-
return "constructs" in config$1 && Object.keys(config$1).every((key) => WORKSPACE_KEYS.has(key));
|
|
6331
|
-
}
|
|
6332
|
-
/** Every top-level key a workspace config has — see `WorkspaceConfigSchema`. */
|
|
6333
|
-
const WORKSPACE_KEYS = new Set([
|
|
6334
|
-
"name",
|
|
6335
|
-
"constructs",
|
|
6336
|
-
"apps",
|
|
6337
|
-
"shared",
|
|
6338
|
-
"deploy",
|
|
6339
|
-
"stages",
|
|
6340
|
-
"secrets",
|
|
6341
|
-
"state"
|
|
6342
|
-
]);
|
|
6343
|
-
|
|
6344
|
-
//#endregion
|
|
6345
|
-
//#region src/workspace/index.ts
|
|
6346
|
-
/**
|
|
6347
|
-
* Validate that all dependencies reference existing apps.
|
|
6348
|
-
* Returns the config if valid, throws otherwise.
|
|
6349
|
-
*/
|
|
6350
|
-
function validateDependencies(apps) {
|
|
6351
|
-
const appNames = new Set(Object.keys(apps));
|
|
6352
|
-
for (const [appName, app] of Object.entries(apps)) for (const dep of app.dependencies ?? []) {
|
|
6353
|
-
if (!appNames.has(dep)) throw new Error(`Invalid dependency: App "${appName}" depends on "${dep}" which does not exist. Valid apps are: ${[...appNames].join(", ")}`);
|
|
6354
|
-
if (dep === appName) throw new Error(`Invalid dependency: App "${appName}" cannot depend on itself.`);
|
|
6355
|
-
}
|
|
6356
|
-
}
|
|
6357
|
-
/**
|
|
6358
|
-
* Define workspace configuration with full TypeScript support and type inference.
|
|
6359
|
-
*
|
|
6360
|
-
* Uses `const` type parameter to infer literal app names, providing:
|
|
6361
|
-
* - Autocomplete for app names in dependencies
|
|
6362
|
-
* - Type errors for invalid dependency references
|
|
6363
|
-
* - Full type inference for the returned config
|
|
6364
|
-
*
|
|
6365
|
-
* @example
|
|
6366
|
-
* ```ts
|
|
6367
|
-
* // gkm.config.ts
|
|
6368
|
-
* import { defineWorkspace } from '@geekmidas/cli';
|
|
6369
|
-
*
|
|
6370
|
-
* export default defineWorkspace({
|
|
6371
|
-
* name: 'my-saas',
|
|
6372
|
-
* apps: {
|
|
6373
|
-
* api: {
|
|
6374
|
-
* type: 'backend',
|
|
6375
|
-
* path: 'apps/api',
|
|
6376
|
-
* port: 3000,
|
|
6377
|
-
* routes: './src/endpoints/**\/*.ts',
|
|
6378
|
-
* envParser: './src/config/env',
|
|
6379
|
-
* logger: './src/logger',
|
|
6380
|
-
* },
|
|
6381
|
-
* web: {
|
|
6382
|
-
* type: 'web',
|
|
6383
|
-
* framework: 'nextjs',
|
|
6384
|
-
* path: 'apps/web',
|
|
6385
|
-
* port: 3001,
|
|
6386
|
-
* dependencies: ['api'], // <- autocomplete shows 'api' | 'web'
|
|
6387
|
-
* },
|
|
6388
|
-
* },
|
|
6389
|
-
* });
|
|
6390
|
-
*
|
|
6391
|
-
* // config.apps.api <- full type inference
|
|
6392
|
-
* // config.apps.foo <- TypeScript error
|
|
6393
|
-
* ```
|
|
6394
|
-
*/
|
|
6395
|
-
function defineWorkspace(config$1) {
|
|
6396
|
-
if (config$1.apps) validateDependencies(config$1.apps);
|
|
6397
|
-
const result = safeValidateWorkspaceConfig(config$1);
|
|
6398
|
-
if (!result.success && result.error) throw new Error(formatValidationErrors(result.error));
|
|
6399
|
-
return config$1;
|
|
6400
|
-
}
|
|
6401
|
-
/**
|
|
6402
|
-
* Get the package name from package.json in the given directory.
|
|
6403
|
-
*/
|
|
6404
|
-
function getPackageName(cwd) {
|
|
6405
|
-
try {
|
|
6406
|
-
const pkg = require(`${cwd}/package.json`);
|
|
6407
|
-
return pkg.name?.replace(/^@[^/]+\//, "");
|
|
6408
|
-
} catch {
|
|
6409
|
-
return void 0;
|
|
6410
|
-
}
|
|
6411
|
-
}
|
|
6412
|
-
/**
|
|
6413
|
-
* Normalize a workspace configuration with resolved defaults.
|
|
6414
|
-
*/
|
|
6415
|
-
function normalizeWorkspace(config$1, cwd) {
|
|
6416
|
-
const name = config$1.name ?? getPackageName(cwd) ?? (0, node_path.basename)(cwd);
|
|
6417
|
-
const defaultTarget = config$1.deploy?.default ?? "dokploy";
|
|
6418
|
-
const normalizedApps = {};
|
|
6419
|
-
for (const [appName, app] of Object.entries(config$1.apps ?? {})) normalizedApps[appName] = normalizeAppConfig(app, defaultTarget);
|
|
6420
|
-
return {
|
|
6421
|
-
name,
|
|
6422
|
-
root: cwd,
|
|
6423
|
-
...config$1.constructs ? { constructs: config$1.constructs } : {},
|
|
6424
|
-
apps: normalizedApps,
|
|
6425
|
-
deploy: config$1.deploy ?? { default: "dokploy" },
|
|
6426
|
-
shared: config$1.shared ?? { packages: ["packages/*"] },
|
|
6427
|
-
stages: validateStages(config$1.stages),
|
|
6428
|
-
secrets: config$1.secrets ?? {},
|
|
6429
|
-
state: config$1.state
|
|
6430
|
-
};
|
|
6431
|
-
}
|
|
6432
|
-
/**
|
|
6433
|
-
* Normalize an app configuration with resolved defaults.
|
|
6434
|
-
* @param app - App configuration
|
|
6435
|
-
* @param defaultTarget - Default deploy target from workspace config
|
|
6436
|
-
*/
|
|
6437
|
-
function normalizeAppConfig(app, defaultTarget) {
|
|
6438
|
-
return {
|
|
6439
|
-
...app,
|
|
6440
|
-
type: app.type ?? "backend",
|
|
6441
|
-
port: app.port,
|
|
6442
|
-
path: app.path,
|
|
6443
|
-
dependencies: app.dependencies ?? [],
|
|
6444
|
-
resolvedDeployTarget: app.deploy ?? defaultTarget
|
|
6445
|
-
};
|
|
6446
|
-
}
|
|
6447
|
-
/**
|
|
6448
|
-
* Wrap a single-app GkmConfig as a workspace.
|
|
6449
|
-
* This allows existing single-app configs to work seamlessly.
|
|
6450
|
-
*/
|
|
6451
|
-
function wrapSingleAppAsWorkspace(config$1, cwd) {
|
|
6452
|
-
const name = config$1.name ?? getPackageName(cwd) ?? (0, node_path.basename)(cwd);
|
|
6453
|
-
const app = {
|
|
6454
|
-
type: "backend",
|
|
6455
|
-
path: ".",
|
|
6456
|
-
port: (typeof config$1.providers?.server === "object" ? config$1.providers.server.port : void 0) ?? 3e3,
|
|
6457
|
-
dependencies: [],
|
|
6458
|
-
resolvedDeployTarget: config$1.deploy?.default ?? "dokploy",
|
|
6459
|
-
constructs: config$1.constructs,
|
|
6460
|
-
providers: config$1.providers,
|
|
6461
|
-
hooks: config$1.hooks,
|
|
6462
|
-
telescope: config$1.telescope,
|
|
6463
|
-
studio: config$1.studio,
|
|
6464
|
-
openapi: config$1.openapi,
|
|
6465
|
-
runtime: config$1.runtime,
|
|
6466
|
-
env: config$1.env
|
|
6467
|
-
};
|
|
6468
|
-
return {
|
|
6469
|
-
name,
|
|
6470
|
-
root: cwd,
|
|
6471
|
-
apps: { api: app },
|
|
6472
|
-
deploy: {
|
|
6473
|
-
default: "dokploy",
|
|
6474
|
-
...config$1.deploy
|
|
6475
|
-
},
|
|
6476
|
-
shared: { packages: [] },
|
|
6477
|
-
stages: validateStages(config$1.stages),
|
|
6478
|
-
secrets: {}
|
|
6479
|
-
};
|
|
6480
|
-
}
|
|
6481
|
-
/**
|
|
6482
|
-
* Process a loaded configuration (either single-app or workspace).
|
|
6483
|
-
* Returns a normalized workspace in both cases.
|
|
6484
|
-
*/
|
|
6485
|
-
function processConfig(config$1, cwd) {
|
|
6486
|
-
if (isWorkspaceConfig(config$1)) {
|
|
6487
|
-
const result = safeValidateWorkspaceConfig(config$1);
|
|
6488
|
-
if (!result.success && result.error) throw new Error(formatValidationErrors(result.error));
|
|
6489
|
-
return {
|
|
6490
|
-
type: "workspace",
|
|
6491
|
-
raw: config$1,
|
|
6492
|
-
workspace: normalizeWorkspace(config$1, cwd)
|
|
6493
|
-
};
|
|
6494
|
-
}
|
|
6495
|
-
return {
|
|
6496
|
-
type: "single",
|
|
6497
|
-
raw: config$1,
|
|
6498
|
-
workspace: wrapSingleAppAsWorkspace(config$1, cwd)
|
|
6499
|
-
};
|
|
6500
|
-
}
|
|
6501
|
-
/**
|
|
6502
|
-
* The workspace's own constructs globs, absolute.
|
|
6503
|
-
*
|
|
6504
|
-
* Infrastructure two apps share is a fact about the product, and declaring it
|
|
6505
|
-
* inside one of them makes moving that app a change to the other's database.
|
|
6506
|
-
*/
|
|
6507
|
-
function workspaceConstructGlobs(workspace) {
|
|
6508
|
-
return constructPatterns(workspace.constructs).map((pattern) => (0, node_path.isAbsolute)(pattern) ? pattern : (0, node_path.join)(workspace.root, pattern));
|
|
6509
|
-
}
|
|
6510
|
-
/**
|
|
6511
|
-
* Every constructs glob an app can see, absolute.
|
|
6512
|
-
*
|
|
6513
|
-
* The workspace's own first, then the app's. Absolute because the app builds
|
|
6514
|
-
* from its own directory while the workspace's constructs live above it —
|
|
6515
|
-
* a relative glob resolved from the app would look for the product's
|
|
6516
|
-
* infrastructure inside one of its consumers and find nothing.
|
|
6517
|
-
*
|
|
6518
|
-
* Additive, not overriding: an app that declares its own constructs still sees
|
|
6519
|
-
* the ones the workspace declared for everybody.
|
|
6520
|
-
*/
|
|
6521
|
-
function appConstructGlobs(workspace, appName) {
|
|
6522
|
-
const globs = workspaceConstructGlobs(workspace);
|
|
6523
|
-
const app = workspace.apps[appName];
|
|
6524
|
-
if (app) {
|
|
6525
|
-
const root = (0, node_path.isAbsolute)(app.path) ? app.path : (0, node_path.join)(workspace.root, app.path);
|
|
6526
|
-
for (const pattern of constructPatterns(app.constructs)) globs.push((0, node_path.isAbsolute)(pattern) ? pattern : (0, node_path.join)(root, pattern));
|
|
6527
|
-
}
|
|
6528
|
-
return globs;
|
|
6529
|
-
}
|
|
6530
|
-
/**
|
|
6531
|
-
* Every constructs glob in the workspace: its own, plus each app's.
|
|
6532
|
-
*
|
|
6533
|
-
* One list, so what a deploy provisions and what an app's entry point
|
|
6534
|
-
* registers drivers for are read off the same globs.
|
|
6535
|
-
*/
|
|
6536
|
-
function allConstructGlobs(workspace) {
|
|
6537
|
-
const globs = [...workspaceConstructGlobs(workspace), ...Object.keys(workspace.apps).flatMap((appName) => appConstructGlobs(workspace, appName))];
|
|
6538
|
-
return [...new Set(globs)];
|
|
6539
|
-
}
|
|
6540
|
-
/** A `Routes` in any of its accepted shapes, as a flat list of patterns. */
|
|
6541
|
-
function constructPatterns(routes) {
|
|
6542
|
-
if (!routes) return [];
|
|
6543
|
-
if (typeof routes === "string") return [routes];
|
|
6544
|
-
if (Array.isArray(routes)) return routes;
|
|
6545
|
-
const paths = routes.paths;
|
|
6546
|
-
if (!paths) return [];
|
|
6547
|
-
return Array.isArray(paths) ? paths : [paths];
|
|
6548
|
-
}
|
|
6549
|
-
/**
|
|
6550
|
-
* Get the GkmConfig for a specific app in a workspace.
|
|
6551
|
-
* Useful for running existing single-app commands on a specific app.
|
|
6552
|
-
*/
|
|
6553
|
-
function getAppGkmConfig(workspace, appName) {
|
|
6554
|
-
const app = workspace.apps[appName];
|
|
6555
|
-
if (!app || app.type !== "backend") return void 0;
|
|
6556
|
-
return {
|
|
6557
|
-
...workspace.deploy ? { deploy: workspace.deploy } : {},
|
|
6558
|
-
stages: workspace.stages,
|
|
6559
|
-
constructs: appConstructGlobs(workspace, appName),
|
|
6560
|
-
providers: app.providers,
|
|
6561
|
-
hooks: app.hooks,
|
|
6562
|
-
telescope: app.telescope,
|
|
6563
|
-
studio: app.studio,
|
|
6564
|
-
openapi: app.openapi,
|
|
6565
|
-
runtime: app.runtime,
|
|
6566
|
-
env: app.env
|
|
6567
|
-
};
|
|
6568
|
-
}
|
|
6569
|
-
/**
|
|
6570
|
-
* Get topologically sorted app names based on dependencies.
|
|
6571
|
-
* Apps with no dependencies come first, then apps that depend on them.
|
|
6572
|
-
*/
|
|
6573
|
-
function getAppBuildOrder(workspace) {
|
|
6574
|
-
const appNames = Object.keys(workspace.apps);
|
|
6575
|
-
const visited = /* @__PURE__ */ new Set();
|
|
6576
|
-
const result = [];
|
|
6577
|
-
function visit(name) {
|
|
6578
|
-
if (visited.has(name)) return;
|
|
6579
|
-
visited.add(name);
|
|
6580
|
-
const app = workspace.apps[name];
|
|
6581
|
-
if (app) for (const dep of app.dependencies) visit(dep);
|
|
6582
|
-
result.push(name);
|
|
6583
|
-
}
|
|
6584
|
-
for (const name of appNames) visit(name);
|
|
6585
|
-
return result;
|
|
6586
|
-
}
|
|
6587
|
-
/**
|
|
6588
|
-
* Generate environment variables for app dependencies.
|
|
6589
|
-
*
|
|
6590
|
-
* Each dependency gets the un-prefixed `{DEP}_URL` (for server-side use) and,
|
|
6591
|
-
* when the consuming app's framework supports a public-var prefix, also the
|
|
6592
|
-
* prefixed form (e.g. `NEXT_PUBLIC_{DEP}_URL` for Next.js, `VITE_{DEP}_URL`
|
|
6593
|
-
* for Vite/TanStack Start). The prefixed form is what gets bundled into the
|
|
6594
|
-
* client at build time.
|
|
6595
|
-
*/
|
|
6596
|
-
function getDependencyEnvVars(workspace, appName, urlPrefix = "http://localhost") {
|
|
6597
|
-
const app = workspace.apps[appName];
|
|
6598
|
-
if (!app) return {};
|
|
6599
|
-
const env = {};
|
|
6600
|
-
const publicPrefix = getPublicEnvPrefix(app.framework);
|
|
6601
|
-
for (const depName of app.dependencies) {
|
|
6602
|
-
const dep = workspace.apps[depName];
|
|
6603
|
-
if (dep) {
|
|
6604
|
-
const url$1 = `${urlPrefix}:${dep.port}`;
|
|
6605
|
-
const envKey = `${depName.toUpperCase()}_URL`;
|
|
6606
|
-
env[envKey] = url$1;
|
|
6607
|
-
if (publicPrefix) env[`${publicPrefix}${envKey}`] = url$1;
|
|
6608
|
-
}
|
|
6609
|
-
}
|
|
6610
|
-
return env;
|
|
6611
|
-
}
|
|
6612
|
-
/**
|
|
6613
|
-
* Resolve the Dokploy endpoint for a specific stage.
|
|
6614
|
-
*
|
|
6615
|
-
* Uses per-stage endpoint from `endpoints` if available,
|
|
6616
|
-
* otherwise falls back to the global `endpoint`.
|
|
6617
|
-
*
|
|
6618
|
-
* @param dokployConfig - Dokploy workspace configuration
|
|
6619
|
-
* @param stage - Deployment stage (e.g., 'development', 'production')
|
|
6620
|
-
* @returns The endpoint URL for the stage, or undefined if not configured
|
|
6621
|
-
*
|
|
6622
|
-
* @example
|
|
6623
|
-
* ```ts
|
|
6624
|
-
* // With per-stage endpoints
|
|
6625
|
-
* const config = {
|
|
6626
|
-
* endpoints: {
|
|
6627
|
-
* development: 'https://dev.dokploy.example.com:3000',
|
|
6628
|
-
* production: 'https://prod.dokploy.example.com:3000',
|
|
6629
|
-
* },
|
|
6630
|
-
* };
|
|
6631
|
-
* getEndpointForStage(config, 'production'); // => 'https://prod.dokploy.example.com:3000'
|
|
6632
|
-
*
|
|
6633
|
-
* // With single endpoint
|
|
6634
|
-
* const config = { endpoint: 'https://dokploy.example.com:3000' };
|
|
6635
|
-
* getEndpointForStage(config, 'production'); // => 'https://dokploy.example.com:3000'
|
|
6636
|
-
* ```
|
|
6637
|
-
*/
|
|
6638
|
-
function getEndpointForStage(dokployConfig, stage) {
|
|
6639
|
-
if (!dokployConfig) return void 0;
|
|
6640
|
-
if (dokployConfig.endpoints?.[stage]) return dokployConfig.endpoints[stage];
|
|
6641
|
-
return dokployConfig.endpoint;
|
|
6642
|
-
}
|
|
6643
|
-
|
|
6644
|
-
//#endregion
|
|
6645
|
-
Object.defineProperty(exports, 'InvalidStages', {
|
|
6646
|
-
enumerable: true,
|
|
6647
|
-
get: function () {
|
|
6648
|
-
return InvalidStages;
|
|
6649
|
-
}
|
|
6650
|
-
});
|
|
6651
|
-
Object.defineProperty(exports, 'PHASE_2_DEPLOY_TARGETS', {
|
|
6652
|
-
enumerable: true,
|
|
6653
|
-
get: function () {
|
|
6654
|
-
return PHASE_2_DEPLOY_TARGETS;
|
|
6655
|
-
}
|
|
6656
|
-
});
|
|
6657
|
-
Object.defineProperty(exports, 'PUBLIC_ENV_PREFIXES', {
|
|
6658
|
-
enumerable: true,
|
|
6659
|
-
get: function () {
|
|
6660
|
-
return PUBLIC_ENV_PREFIXES;
|
|
6661
|
-
}
|
|
6662
|
-
});
|
|
6663
|
-
Object.defineProperty(exports, 'SUPPORTED_DEPLOY_TARGETS', {
|
|
6664
|
-
enumerable: true,
|
|
6665
|
-
get: function () {
|
|
6666
|
-
return SUPPORTED_DEPLOY_TARGETS;
|
|
6667
|
-
}
|
|
6668
|
-
});
|
|
6669
|
-
Object.defineProperty(exports, 'WorkspaceConfigSchema', {
|
|
6670
|
-
enumerable: true,
|
|
6671
|
-
get: function () {
|
|
6672
|
-
return WorkspaceConfigSchema;
|
|
6673
|
-
}
|
|
6674
|
-
});
|
|
6675
|
-
Object.defineProperty(exports, 'allConstructGlobs', {
|
|
6676
|
-
enumerable: true,
|
|
6677
|
-
get: function () {
|
|
6678
|
-
return allConstructGlobs;
|
|
6679
|
-
}
|
|
6680
|
-
});
|
|
6681
|
-
Object.defineProperty(exports, 'appConstructGlobs', {
|
|
6682
|
-
enumerable: true,
|
|
6683
|
-
get: function () {
|
|
6684
|
-
return appConstructGlobs;
|
|
6685
|
-
}
|
|
6686
|
-
});
|
|
6687
|
-
Object.defineProperty(exports, 'assertDeployedStage', {
|
|
6688
|
-
enumerable: true,
|
|
6689
|
-
get: function () {
|
|
6690
|
-
return assertDeployedStage;
|
|
6691
|
-
}
|
|
6692
|
-
});
|
|
6693
|
-
Object.defineProperty(exports, 'constructPatterns', {
|
|
6694
|
-
enumerable: true,
|
|
6695
|
-
get: function () {
|
|
6696
|
-
return constructPatterns;
|
|
6697
|
-
}
|
|
6698
|
-
});
|
|
6699
|
-
Object.defineProperty(exports, 'defineWorkspace', {
|
|
6700
|
-
enumerable: true,
|
|
6701
|
-
get: function () {
|
|
6702
|
-
return defineWorkspace;
|
|
6703
|
-
}
|
|
6704
|
-
});
|
|
6705
|
-
Object.defineProperty(exports, 'deployedProblems', {
|
|
6706
|
-
enumerable: true,
|
|
6707
|
-
get: function () {
|
|
6708
|
-
return deployedProblems;
|
|
6709
|
-
}
|
|
6710
|
-
});
|
|
6711
|
-
Object.defineProperty(exports, 'formatValidationErrors', {
|
|
6712
|
-
enumerable: true,
|
|
6713
|
-
get: function () {
|
|
6714
|
-
return formatValidationErrors;
|
|
6715
|
-
}
|
|
6716
|
-
});
|
|
6717
|
-
Object.defineProperty(exports, 'getAppBuildOrder', {
|
|
6718
|
-
enumerable: true,
|
|
6719
|
-
get: function () {
|
|
6720
|
-
return getAppBuildOrder;
|
|
6721
|
-
}
|
|
6722
|
-
});
|
|
6723
|
-
Object.defineProperty(exports, 'getAppGkmConfig', {
|
|
6724
|
-
enumerable: true,
|
|
6725
|
-
get: function () {
|
|
6726
|
-
return getAppGkmConfig;
|
|
6727
|
-
}
|
|
6728
|
-
});
|
|
6729
|
-
Object.defineProperty(exports, 'getDependencyEnvVars', {
|
|
6730
|
-
enumerable: true,
|
|
6731
|
-
get: function () {
|
|
6732
|
-
return getDependencyEnvVars;
|
|
6733
|
-
}
|
|
6734
|
-
});
|
|
6735
|
-
Object.defineProperty(exports, 'getDeployTargetError', {
|
|
6736
|
-
enumerable: true,
|
|
6737
|
-
get: function () {
|
|
6738
|
-
return getDeployTargetError;
|
|
6739
|
-
}
|
|
6740
|
-
});
|
|
6741
|
-
Object.defineProperty(exports, 'getEndpointForStage', {
|
|
6742
|
-
enumerable: true,
|
|
6743
|
-
get: function () {
|
|
6744
|
-
return getEndpointForStage;
|
|
6745
|
-
}
|
|
6746
|
-
});
|
|
6747
|
-
Object.defineProperty(exports, 'getPublicEnvPrefix', {
|
|
6748
|
-
enumerable: true,
|
|
6749
|
-
get: function () {
|
|
6750
|
-
return getPublicEnvPrefix;
|
|
6751
|
-
}
|
|
6752
|
-
});
|
|
6753
|
-
Object.defineProperty(exports, 'isDeployTargetSupported', {
|
|
6754
|
-
enumerable: true,
|
|
6755
|
-
get: function () {
|
|
6756
|
-
return isDeployTargetSupported;
|
|
6757
|
-
}
|
|
6758
|
-
});
|
|
6759
|
-
Object.defineProperty(exports, 'isPhase2DeployTarget', {
|
|
6760
|
-
enumerable: true,
|
|
6761
|
-
get: function () {
|
|
6762
|
-
return isPhase2DeployTarget;
|
|
6763
|
-
}
|
|
6764
|
-
});
|
|
6765
|
-
Object.defineProperty(exports, 'isWorkspaceConfig', {
|
|
6766
|
-
enumerable: true,
|
|
6767
|
-
get: function () {
|
|
6768
|
-
return isWorkspaceConfig;
|
|
6769
|
-
}
|
|
6770
|
-
});
|
|
6771
|
-
Object.defineProperty(exports, 'normalizeWorkspace', {
|
|
6772
|
-
enumerable: true,
|
|
6773
|
-
get: function () {
|
|
6774
|
-
return normalizeWorkspace;
|
|
6775
|
-
}
|
|
6776
|
-
});
|
|
6777
|
-
Object.defineProperty(exports, 'processConfig', {
|
|
6778
|
-
enumerable: true,
|
|
6779
|
-
get: function () {
|
|
6780
|
-
return processConfig;
|
|
6781
|
-
}
|
|
6782
|
-
});
|
|
6783
|
-
Object.defineProperty(exports, 'safeValidateWorkspaceConfig', {
|
|
6784
|
-
enumerable: true,
|
|
6785
|
-
get: function () {
|
|
6786
|
-
return safeValidateWorkspaceConfig;
|
|
6787
|
-
}
|
|
6788
|
-
});
|
|
6789
|
-
Object.defineProperty(exports, 'stageProblems', {
|
|
6790
|
-
enumerable: true,
|
|
6791
|
-
get: function () {
|
|
6792
|
-
return stageProblems;
|
|
6793
|
-
}
|
|
6794
|
-
});
|
|
6795
|
-
Object.defineProperty(exports, 'stripPublicPrefix', {
|
|
6796
|
-
enumerable: true,
|
|
6797
|
-
get: function () {
|
|
6798
|
-
return stripPublicPrefix;
|
|
6799
|
-
}
|
|
6800
|
-
});
|
|
6801
|
-
Object.defineProperty(exports, 'validateWorkspaceConfig', {
|
|
6802
|
-
enumerable: true,
|
|
6803
|
-
get: function () {
|
|
6804
|
-
return validateWorkspaceConfig;
|
|
6805
|
-
}
|
|
6806
|
-
});
|
|
6807
|
-
Object.defineProperty(exports, 'workspaceConstructGlobs', {
|
|
6808
|
-
enumerable: true,
|
|
6809
|
-
get: function () {
|
|
6810
|
-
return workspaceConstructGlobs;
|
|
6811
|
-
}
|
|
6812
|
-
});
|
|
6813
|
-
Object.defineProperty(exports, 'wrapSingleAppAsWorkspace', {
|
|
6814
|
-
enumerable: true,
|
|
6815
|
-
get: function () {
|
|
6816
|
-
return wrapSingleAppAsWorkspace;
|
|
6817
|
-
}
|
|
6818
|
-
});
|
|
6819
|
-
//# sourceMappingURL=workspace-DPV7FtAv.cjs.map
|
|
5961
|
+
//# sourceMappingURL=schemas-BCwKKA42.mjs.map
|