@geekmidas/cli 10.0.0-alpha.4 → 10.0.0-alpha.40
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 +52 -74
- package/bin/adjacent-tsconfig.mjs +97 -0
- package/bin/gkm.mjs +7 -1
- package/dist/{HostingerProvider-h3EbEp-Z.cjs → HostingerProvider-BZFGYYVA.cjs} +21 -22
- package/dist/HostingerProvider-BZFGYYVA.cjs.map +1 -0
- package/dist/{HostingerProvider-Cft7lEYr.mjs → HostingerProvider-Bh6K7QYz.mjs} +20 -21
- package/dist/HostingerProvider-Bh6K7QYz.mjs.map +1 -0
- package/dist/{LocalStateProvider-Db9SEjyH.cjs → LocalStateProvider-7HR6SS2t.cjs} +11 -6
- package/dist/LocalStateProvider-7HR6SS2t.cjs.map +1 -0
- package/dist/{LocalStateProvider-Bn6tS-oL.mjs → LocalStateProvider-D7QyJoLM.mjs} +10 -4
- package/dist/LocalStateProvider-D7QyJoLM.mjs.map +1 -0
- package/dist/{openapi-CA0yJUTN.cjs → OpenApiTsGenerator-B4Kj_qNU.cjs} +142 -303
- package/dist/OpenApiTsGenerator-B4Kj_qNU.cjs.map +1 -0
- package/dist/{openapi-kkQbsRVj.mjs → OpenApiTsGenerator-CEh3EKN3.mjs} +113 -255
- package/dist/OpenApiTsGenerator-CEh3EKN3.mjs.map +1 -0
- package/dist/{Route53Provider-RdpUDJQk.mjs → Route53Provider-Cvj40A8I.mjs} +12 -12
- package/dist/Route53Provider-Cvj40A8I.mjs.map +1 -0
- package/dist/{Route53Provider-di2fMM5N.cjs → Route53Provider-DVILBsvV.cjs} +20 -21
- package/dist/Route53Provider-DVILBsvV.cjs.map +1 -0
- package/dist/{SSMStateProvider-BRt2py-A.mjs → SSMStateProvider-B0Hu1MKZ.mjs} +13 -4
- package/dist/SSMStateProvider-B0Hu1MKZ.mjs.map +1 -0
- package/dist/{SSMStateProvider-DyX8s9HI.cjs → SSMStateProvider-VrQ-yeqd.cjs} +17 -9
- package/dist/SSMStateProvider-VrQ-yeqd.cjs.map +1 -0
- package/dist/aws-DkHdTV-p.cjs +61 -0
- package/dist/aws-DkHdTV-p.cjs.map +1 -0
- package/dist/aws-DojzQnLd.mjs +61 -0
- package/dist/aws-DojzQnLd.mjs.map +1 -0
- package/dist/{backup-provisioner-BrsHwYG0.cjs → backup-provisioner-BmhIO_Yr.cjs} +21 -19
- package/dist/backup-provisioner-BmhIO_Yr.cjs.map +1 -0
- package/dist/{backup-provisioner-Bgj5Vi_L.mjs → backup-provisioner-DIVCbfee.mjs} +10 -7
- package/dist/backup-provisioner-DIVCbfee.mjs.map +1 -0
- package/dist/{bundler-Be8Zg4Wd.mjs → bundler--fyybf1N.mjs} +19 -30
- package/dist/bundler--fyybf1N.mjs.map +1 -0
- package/dist/{bundler-BY1OmV1e.cjs → bundler-By6_sXiL.cjs} +20 -32
- package/dist/bundler-By6_sXiL.cjs.map +1 -0
- package/dist/{config-WRdsQYZK.mjs → config-5watB1D0.mjs} +142 -154
- package/dist/config-5watB1D0.mjs.map +1 -0
- package/dist/{config-C21ocYNd.cjs → config-CJ-PAb7M.cjs} +209 -210
- package/dist/config-CJ-PAb7M.cjs.map +1 -0
- package/dist/config.cjs +9 -6
- package/dist/config.d.cts +62 -33
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.mts +62 -33
- package/dist/config.d.mts.map +1 -1
- package/dist/config.mjs +3 -5
- 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-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 +9 -2
- 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 +13 -2
- 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 +3 -3
- 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/{discover-DTmFeloL.cjs → discover-B0f_kuNN.cjs} +118 -66
- package/dist/discover-B0f_kuNN.cjs.map +1 -0
- package/dist/{discover-CAlFgYec.mjs → discover-BLhf7V_J.mjs} +67 -22
- package/dist/discover-BLhf7V_J.mjs.map +1 -0
- package/dist/{emit-CbcRolsa.cjs → emit-BdoPFjZf.cjs} +53 -36
- package/dist/emit-BdoPFjZf.cjs.map +1 -0
- package/dist/{emit-CiZS_5Ub.mjs → emit-Bzq7JsMP.mjs} +24 -6
- package/dist/emit-Bzq7JsMP.mjs.map +1 -0
- package/dist/github-BAr8WGkR.cjs +213 -0
- package/dist/github-BAr8WGkR.cjs.map +1 -0
- package/dist/github-D5MthUlR.mjs +213 -0
- package/dist/github-D5MthUlR.mjs.map +1 -0
- package/dist/{index-DCtipn2h.d.cts → index-B3PeGOQp.d.cts} +4 -23
- package/dist/index-B3PeGOQp.d.cts.map +1 -0
- package/dist/{index-BThUzEIp.d.mts → index-BOyaGcCm.d.mts} +4 -23
- package/dist/index-BOyaGcCm.d.mts.map +1 -0
- package/dist/index.cjs +7071 -4519
- 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 +7117 -4586
- package/dist/index.mjs.map +1 -1
- package/dist/migrate-BVI3yqcE.mjs +736 -0
- package/dist/migrate-BVI3yqcE.mjs.map +1 -0
- package/dist/migrate-CFOUApUt.cjs +743 -0
- package/dist/migrate-CFOUApUt.cjs.map +1 -0
- package/dist/openapi.cjs +197 -8
- package/dist/openapi.cjs.map +1 -0
- package/dist/openapi.d.cts +47 -14
- package/dist/openapi.d.cts.map +1 -1
- package/dist/openapi.d.mts +47 -14
- package/dist/openapi.d.mts.map +1 -1
- package/dist/openapi.mjs +191 -5
- package/dist/openapi.mjs.map +1 -0
- package/dist/ready-D8UXsP6q.mjs +516 -0
- package/dist/ready-D8UXsP6q.mjs.map +1 -0
- package/dist/ready-mcxamf73.cjs +563 -0
- package/dist/ready-mcxamf73.cjs.map +1 -0
- package/dist/reconcile/public.cjs +4 -4
- package/dist/reconcile/public.d.cts +27 -26
- package/dist/reconcile/public.d.cts.map +1 -1
- package/dist/reconcile/public.d.mts +27 -26
- package/dist/reconcile/public.d.mts.map +1 -1
- package/dist/reconcile/public.mjs +3 -4
- package/dist/{reconcile-CFs8C_1a.mjs → reconcile--I7V4Klj.mjs} +4 -7
- package/dist/reconcile--I7V4Klj.mjs.map +1 -0
- package/dist/{reconcile-D0pimNiy.cjs → reconcile-CuCQBa5-.cjs} +5 -8
- package/dist/reconcile-CuCQBa5-.cjs.map +1 -0
- package/dist/rolldown-runtime-BhDjJH2R.mjs +15 -0
- package/dist/{chunk-CUT6urMc.cjs → rolldown-runtime-C0BPl7ul.cjs} +23 -10
- package/dist/storage-BzaUxmqe.mjs +124 -0
- package/dist/storage-BzaUxmqe.mjs.map +1 -0
- package/dist/storage-CSGoC3bK.cjs +152 -0
- package/dist/storage-CSGoC3bK.cjs.map +1 -0
- package/dist/store-DQgxT_WR.cjs +211 -0
- package/dist/store-DQgxT_WR.cjs.map +1 -0
- package/dist/store-DeGATCS-.mjs +182 -0
- package/dist/store-DeGATCS-.mjs.map +1 -0
- package/dist/types-0R124hrY.d.mts +6324 -0
- package/dist/types-0R124hrY.d.mts.map +1 -0
- package/dist/types-DfdYe31u.d.cts +6325 -0
- package/dist/types-DfdYe31u.d.cts.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/workspace/index.cjs +3 -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/{credentials-G1JwBoXH.cjs → workspace-BIqeeqcR.cjs} +2248 -1809
- package/dist/workspace-BIqeeqcR.cjs.map +1 -0
- package/dist/{workspace-BFMrAKqI.mjs → workspace-DOmIhiau.mjs} +863 -952
- package/dist/workspace-DOmIhiau.mjs.map +1 -0
- package/dist/{credentials-BBIRJVp4.mjs → workspace-DwS1JK5u.mjs} +2114 -1706
- package/dist/workspace-DwS1JK5u.mjs.map +1 -0
- package/dist/{workspace-BcucjwvA.cjs → workspace-RYSYtHP7.cjs} +1032 -1098
- package/dist/workspace-RYSYtHP7.cjs.map +1 -0
- package/package.json +29 -20
- package/dist/CachedStateProvider-BLo7zv7S.cjs +0 -3
- package/dist/CachedStateProvider-BxoAm-B2.mjs +0 -3
- package/dist/CachedStateProvider-CqPdW7CB.cjs +0 -60
- package/dist/CachedStateProvider-CqPdW7CB.cjs.map +0 -1
- package/dist/CachedStateProvider-DTniehMP.mjs +0 -54
- package/dist/CachedStateProvider-DTniehMP.mjs.map +0 -1
- package/dist/HostingerProvider-Cft7lEYr.mjs.map +0 -1
- package/dist/HostingerProvider-h3EbEp-Z.cjs.map +0 -1
- package/dist/LocalStateProvider-Bn6tS-oL.mjs.map +0 -1
- package/dist/LocalStateProvider-Db9SEjyH.cjs.map +0 -1
- package/dist/Route53Provider-RdpUDJQk.mjs.map +0 -1
- package/dist/Route53Provider-di2fMM5N.cjs.map +0 -1
- package/dist/SSMStateProvider-BRt2py-A.mjs.map +0 -1
- package/dist/SSMStateProvider-DyX8s9HI.cjs.map +0 -1
- package/dist/backup-provisioner-Bgj5Vi_L.mjs.map +0 -1
- package/dist/backup-provisioner-BrsHwYG0.cjs.map +0 -1
- package/dist/bundler-BY1OmV1e.cjs.map +0 -1
- package/dist/bundler-Be8Zg4Wd.mjs.map +0 -1
- package/dist/chunk-Duj1WY3L.mjs +0 -7
- package/dist/config-C21ocYNd.cjs.map +0 -1
- package/dist/config-WRdsQYZK.mjs.map +0 -1
- package/dist/credentials-B5zRHdAl.mjs +0 -141
- package/dist/credentials-B5zRHdAl.mjs.map +0 -1
- package/dist/credentials-BBIRJVp4.mjs.map +0 -1
- package/dist/credentials-BapzjyV5.cjs +0 -195
- package/dist/credentials-BapzjyV5.cjs.map +0 -1
- package/dist/credentials-G1JwBoXH.cjs.map +0 -1
- package/dist/discover-CAlFgYec.mjs.map +0 -1
- package/dist/discover-DTmFeloL.cjs.map +0 -1
- package/dist/dokploy-api-BS2xnJLZ.mjs +0 -3
- package/dist/dokploy-api-BsVH0y_s.cjs +0 -718
- package/dist/dokploy-api-BsVH0y_s.cjs.map +0 -1
- package/dist/dokploy-api-BuxDRo3l.cjs +0 -3
- package/dist/dokploy-api-aTFPz7_4.mjs +0 -706
- package/dist/dokploy-api-aTFPz7_4.mjs.map +0 -1
- package/dist/emit-CbcRolsa.cjs.map +0 -1
- package/dist/emit-CiZS_5Ub.mjs.map +0 -1
- package/dist/encryption-C6jaU0hE.cjs +0 -54
- package/dist/encryption-C6jaU0hE.cjs.map +0 -1
- package/dist/encryption-CHzzeR8a.cjs +0 -4
- package/dist/encryption-CQUncu7v.mjs +0 -3
- package/dist/encryption-D-abyhZx.mjs +0 -42
- package/dist/encryption-D-abyhZx.mjs.map +0 -1
- package/dist/fullstack-secrets-C-GGohke.cjs +0 -111
- package/dist/fullstack-secrets-C-GGohke.cjs.map +0 -1
- package/dist/fullstack-secrets-D1o9-G5l.mjs +0 -87
- package/dist/fullstack-secrets-D1o9-G5l.mjs.map +0 -1
- package/dist/generator-CNzBw7g5.cjs +0 -289
- package/dist/generator-CNzBw7g5.cjs.map +0 -1
- package/dist/generator-VE2JrFlY.mjs +0 -253
- package/dist/generator-VE2JrFlY.mjs.map +0 -1
- package/dist/index-BThUzEIp.d.mts.map +0 -1
- package/dist/index-DCtipn2h.d.cts.map +0 -1
- package/dist/openapi-CA0yJUTN.cjs.map +0 -1
- package/dist/openapi-kkQbsRVj.mjs.map +0 -1
- package/dist/openapi-react-query-Byltvm_7.mjs +0 -167
- package/dist/openapi-react-query-Byltvm_7.mjs.map +0 -1
- package/dist/openapi-react-query-CmJ1xDbn.cjs +0 -173
- package/dist/openapi-react-query-CmJ1xDbn.cjs.map +0 -1
- package/dist/openapi-react-query.cjs +0 -4
- package/dist/openapi-react-query.d.cts +0 -11
- package/dist/openapi-react-query.d.cts.map +0 -1
- package/dist/openapi-react-query.d.mts +0 -11
- package/dist/openapi-react-query.d.mts.map +0 -1
- package/dist/openapi-react-query.mjs +0 -4
- package/dist/reconcile-CFs8C_1a.mjs.map +0 -1
- package/dist/reconcile-D0pimNiy.cjs.map +0 -1
- package/dist/setup-B5_oHHUj.cjs +0 -11
- package/dist/setup-Cm2UnAdh.cjs +0 -473
- package/dist/setup-Cm2UnAdh.cjs.map +0 -1
- package/dist/setup-DXvRLTZN.mjs +0 -443
- package/dist/setup-DXvRLTZN.mjs.map +0 -1
- package/dist/setup-ZijS4qeC.mjs +0 -11
- package/dist/storage-BJmzYxt8.cjs +0 -363
- package/dist/storage-BJmzYxt8.cjs.map +0 -1
- package/dist/storage-BM9hGpgv.cjs +0 -7
- package/dist/storage-Bi24WfoW.mjs +0 -297
- package/dist/storage-Bi24WfoW.mjs.map +0 -1
- package/dist/storage-CYlGwWTj.mjs +0 -3
- package/dist/sync-CmEuNZsB.mjs +0 -76
- package/dist/sync-CmEuNZsB.mjs.map +0 -1
- package/dist/sync-D306yOWu.cjs +0 -4
- package/dist/sync-SizaChmC.cjs +0 -93
- package/dist/sync-SizaChmC.cjs.map +0 -1
- package/dist/sync-hOqAWHR6.mjs +0 -3
- package/dist/types-BhIl-COG.d.cts +0 -2184
- package/dist/types-BhIl-COG.d.cts.map +0 -1
- package/dist/types-C-arnQ1r.d.mts +0 -2184
- package/dist/types-C-arnQ1r.d.mts.map +0 -1
- package/dist/workspace-BFMrAKqI.mjs.map +0 -1
- package/dist/workspace-BcucjwvA.cjs.map +0 -1
- package/dist/workspace-DdJss8I6.cjs +0 -9
- package/dist/workspace-k4l3rsFh.mjs +0 -8
|
@@ -1,61 +1,12 @@
|
|
|
1
|
-
import { __require } from "./
|
|
1
|
+
import { n as __require } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
2
2
|
import { basename, isAbsolute, join } from "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
3
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js
|
|
52
4
|
function getEnumValues(entries) {
|
|
53
5
|
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
|
|
54
|
-
|
|
55
|
-
return values;
|
|
6
|
+
return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
|
|
56
7
|
}
|
|
57
|
-
function joinValues(array
|
|
58
|
-
return array
|
|
8
|
+
function joinValues(array, separator = "|") {
|
|
9
|
+
return array.map((val) => stringifyPrimitive(val)).join(separator);
|
|
59
10
|
}
|
|
60
11
|
function jsonStringifyReplacer(_, value) {
|
|
61
12
|
if (typeof value === "bigint") return value.toString();
|
|
@@ -171,12 +122,11 @@ const captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace
|
|
|
171
122
|
function isObject(data) {
|
|
172
123
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
173
124
|
}
|
|
174
|
-
const allowsEval = /* @__PURE__
|
|
125
|
+
const allowsEval = /* @__PURE__*/ cached(() => {
|
|
175
126
|
if (globalConfig.jitless) return false;
|
|
176
127
|
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) return false;
|
|
177
128
|
try {
|
|
178
|
-
|
|
179
|
-
new F("");
|
|
129
|
+
new Function("");
|
|
180
130
|
return true;
|
|
181
131
|
} catch (_) {
|
|
182
132
|
return false;
|
|
@@ -199,7 +149,7 @@ function shallowClone(o) {
|
|
|
199
149
|
if (o instanceof Set) return new Set(o);
|
|
200
150
|
return o;
|
|
201
151
|
}
|
|
202
|
-
const propertyKeyTypes = /* @__PURE__
|
|
152
|
+
const propertyKeyTypes = /* @__PURE__*/ new Set([
|
|
203
153
|
"string",
|
|
204
154
|
"number",
|
|
205
155
|
"symbol"
|
|
@@ -237,7 +187,7 @@ function optionalKeys(shape) {
|
|
|
237
187
|
return shape[k]._zod.optin !== void 0 && shape[k]._zod.optout === "optional";
|
|
238
188
|
});
|
|
239
189
|
}
|
|
240
|
-
const NUMBER_FORMAT_RANGES =
|
|
190
|
+
const NUMBER_FORMAT_RANGES = /*@__PURE__*/ (() => ({
|
|
241
191
|
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
242
192
|
int32: [-2147483648, 2147483647],
|
|
243
193
|
uint32: [0, 4294967295],
|
|
@@ -245,14 +195,13 @@ const NUMBER_FORMAT_RANGES = /* @__PURE__ */ (() => ({
|
|
|
245
195
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
246
196
|
}))();
|
|
247
197
|
const BIGINT_FORMAT_RANGES = {
|
|
248
|
-
int64: [/* @__PURE__
|
|
249
|
-
uint64: [/* @__PURE__
|
|
198
|
+
int64: [/* @__PURE__*/ BigInt("-9223372036854775808"), /* @__PURE__*/ BigInt("9223372036854775807")],
|
|
199
|
+
uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt("18446744073709551615")]
|
|
250
200
|
};
|
|
251
201
|
function pick(schema, mask) {
|
|
252
202
|
const currDef = schema._zod.def;
|
|
253
203
|
const checks = currDef.checks;
|
|
254
|
-
|
|
255
|
-
if (hasChecks) throw new Error(".pick() cannot be used on object schemas containing refinements");
|
|
204
|
+
if (checks && checks.length > 0) throw new Error(".pick() cannot be used on object schemas containing refinements");
|
|
256
205
|
const newShape = {};
|
|
257
206
|
mirrorShape(newShape, schema, maskedKeys(schema, mask));
|
|
258
207
|
return clone(schema, mergeDefs(currDef, {
|
|
@@ -272,8 +221,7 @@ function maskedKeys(schema, mask) {
|
|
|
272
221
|
function omit(schema, mask) {
|
|
273
222
|
const currDef = schema._zod.def;
|
|
274
223
|
const checks = currDef.checks;
|
|
275
|
-
|
|
276
|
-
if (hasChecks) throw new Error(".omit() cannot be used on object schemas containing refinements");
|
|
224
|
+
if (checks && checks.length > 0) throw new Error(".omit() cannot be used on object schemas containing refinements");
|
|
277
225
|
const omitted = new Set(maskedKeys(schema, mask));
|
|
278
226
|
const newShape = {};
|
|
279
227
|
mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)).filter((key) => !omitted.has(key)));
|
|
@@ -285,8 +233,7 @@ function omit(schema, mask) {
|
|
|
285
233
|
function extend(schema, shape) {
|
|
286
234
|
if (!isPlainObject(shape)) throw new Error("Invalid input to extend: expected a plain object");
|
|
287
235
|
const checks = schema._zod.def.checks;
|
|
288
|
-
|
|
289
|
-
if (hasChecks) {
|
|
236
|
+
if (checks && checks.length > 0) {
|
|
290
237
|
const existingShape = sourceShape(schema);
|
|
291
238
|
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
239
|
}
|
|
@@ -308,20 +255,17 @@ function merge(a, b) {
|
|
|
308
255
|
const newShape = {};
|
|
309
256
|
mirrorShape(newShape, a, Reflect.ownKeys(sourceShape(a)));
|
|
310
257
|
mirrorShape(newShape, b, Reflect.ownKeys(sourceShape(b)));
|
|
311
|
-
|
|
258
|
+
return clone(a, mergeDefs(a._zod.def, {
|
|
312
259
|
shape: newShape,
|
|
313
260
|
get catchall() {
|
|
314
261
|
return b._zod.def.catchall;
|
|
315
262
|
},
|
|
316
263
|
checks: b._zod.def.checks ?? []
|
|
317
|
-
});
|
|
318
|
-
return clone(a, def);
|
|
264
|
+
}));
|
|
319
265
|
}
|
|
320
266
|
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`);
|
|
267
|
+
const checks = schema._zod.def.checks;
|
|
268
|
+
if (checks && checks.length > 0) throw new Error(`.${name}() cannot be used on object schemas containing refinements`);
|
|
325
269
|
const selected = mask ? new Set(maskedKeys(schema, mask)) : void 0;
|
|
326
270
|
const newShape = {};
|
|
327
271
|
mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), Class && ((value, key) => selected && !selected.has(key) ? value : new Class({
|
|
@@ -354,8 +298,8 @@ function explicitlyAborted(x, startIndex = 0) {
|
|
|
354
298
|
}
|
|
355
299
|
function prefixIssues(path, issues) {
|
|
356
300
|
return issues.map((iss) => {
|
|
357
|
-
var _a
|
|
358
|
-
(_a
|
|
301
|
+
var _a;
|
|
302
|
+
(_a = iss).path ?? (_a.path = []);
|
|
359
303
|
iss.path.unshift(path);
|
|
360
304
|
return iss;
|
|
361
305
|
});
|
|
@@ -364,16 +308,18 @@ function unwrapMessage(message) {
|
|
|
364
308
|
return typeof message === "string" ? message : message?.message;
|
|
365
309
|
}
|
|
366
310
|
function attachSchema(issues, start, inst) {
|
|
367
|
-
var _a
|
|
368
|
-
for (let i = start; i < issues.length; i++) (_a
|
|
311
|
+
var _a;
|
|
312
|
+
for (let i = start; i < issues.length; i++) (_a = issues[i]).schema ?? (_a.schema = inst);
|
|
369
313
|
}
|
|
370
|
-
function finalizeIssue(iss, ctx, config
|
|
371
|
-
var _a
|
|
314
|
+
function finalizeIssue(iss, ctx, config) {
|
|
315
|
+
var _a;
|
|
372
316
|
const traits = iss.inst?._zod?.traits;
|
|
373
|
-
if (traits?.has("$ZodType"))
|
|
374
|
-
|
|
317
|
+
if (traits?.has("$ZodType")) {
|
|
318
|
+
if (traits.has("$ZodCheck")) (_a = iss).schema ?? (_a.schema = iss.inst);
|
|
319
|
+
else iss.schema = iss.inst;
|
|
320
|
+
}
|
|
375
321
|
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
|
|
322
|
+
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
323
|
const full = {};
|
|
378
324
|
for (const k of Object.keys(iss)) {
|
|
379
325
|
if (k === "inst" || k === "schema" || k === "continue" || k === "input" || k === "__proto__") continue;
|
|
@@ -491,7 +437,6 @@ const breaker = {
|
|
|
491
437
|
configurable: true,
|
|
492
438
|
get() {
|
|
493
439
|
broke = true;
|
|
494
|
-
return void 0;
|
|
495
440
|
}
|
|
496
441
|
};
|
|
497
442
|
/**
|
|
@@ -577,7 +522,6 @@ function constantCatch(value) {
|
|
|
577
522
|
fn[CONSTANT_CATCH] = true;
|
|
578
523
|
return fn;
|
|
579
524
|
}
|
|
580
|
-
|
|
581
525
|
//#endregion
|
|
582
526
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/core.js
|
|
583
527
|
var _a$1;
|
|
@@ -606,7 +550,7 @@ function newError(Definition) {
|
|
|
606
550
|
}
|
|
607
551
|
return new Definition();
|
|
608
552
|
}
|
|
609
|
-
function $constructor(name, initializer
|
|
553
|
+
function $constructor(name, initializer, proto, params) {
|
|
610
554
|
const zodProto = {};
|
|
611
555
|
function Internals(def) {
|
|
612
556
|
this.def = def;
|
|
@@ -626,22 +570,22 @@ function $constructor(name, initializer$2, proto, params) {
|
|
|
626
570
|
}
|
|
627
571
|
} else if (inst._zod.traits.has(name)) return;
|
|
628
572
|
inst._zod.traits.add(name);
|
|
629
|
-
initializer
|
|
573
|
+
initializer(inst, def);
|
|
630
574
|
if (initialized) {
|
|
631
|
-
const own
|
|
575
|
+
const own = Object.getPrototypeOf(inst);
|
|
632
576
|
const ctorProto = inst._zod.constr.prototype;
|
|
633
|
-
let up = own
|
|
577
|
+
let up = own;
|
|
634
578
|
while (up && up !== ctorProto) up = Object.getPrototypeOf(up);
|
|
635
|
-
const target = up ?? own
|
|
579
|
+
const target = up ?? own;
|
|
636
580
|
if (!initialized.has(target)) {
|
|
637
581
|
initialized.add(target);
|
|
638
582
|
members(target, protoMembers);
|
|
639
583
|
}
|
|
640
584
|
}
|
|
641
|
-
const proto
|
|
642
|
-
for (const k in proto
|
|
643
|
-
if (!Object.prototype.hasOwnProperty.call(proto
|
|
644
|
-
if (!(k in inst)) inst[k] = proto
|
|
585
|
+
const proto = _.prototype;
|
|
586
|
+
for (const k in proto) {
|
|
587
|
+
if (!Object.prototype.hasOwnProperty.call(proto, k)) continue;
|
|
588
|
+
if (!(k in inst)) inst[k] = proto[k].bind(inst);
|
|
645
589
|
}
|
|
646
590
|
}
|
|
647
591
|
const Parent = params?.Parent ?? Object;
|
|
@@ -684,7 +628,6 @@ function config(newConfig) {
|
|
|
684
628
|
if (newConfig) Object.assign(globalConfig, newConfig);
|
|
685
629
|
return globalConfig;
|
|
686
630
|
}
|
|
687
|
-
|
|
688
631
|
//#endregion
|
|
689
632
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/errors.js
|
|
690
633
|
function _getMessage() {
|
|
@@ -738,39 +681,41 @@ const initializer$1 = (inst, def) => {
|
|
|
738
681
|
}
|
|
739
682
|
};
|
|
740
683
|
const $ZodError = $constructor("$ZodError", initializer$1);
|
|
741
|
-
|
|
684
|
+
$constructor("$ZodError", initializer$1, void 0, { Parent: Error });
|
|
742
685
|
/** Get-or-create `obj[key]` as an own data property. A path segment naming an inherited member
|
|
743
686
|
* ("toString", "constructor") would otherwise read through to the prototype, and assigning
|
|
744
687
|
* "__proto__" would hit the setter instead of creating a key. */
|
|
745
688
|
function node(obj, key, make) {
|
|
746
|
-
if (!Object.prototype.hasOwnProperty.call(obj, key))
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
689
|
+
if (!Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
690
|
+
if (key === "__proto__") Object.defineProperty(obj, key, {
|
|
691
|
+
value: make(),
|
|
692
|
+
writable: true,
|
|
693
|
+
enumerable: true,
|
|
694
|
+
configurable: true
|
|
695
|
+
});
|
|
696
|
+
else obj[key] = make();
|
|
697
|
+
}
|
|
753
698
|
return obj[key];
|
|
754
699
|
}
|
|
755
|
-
function flattenError(error
|
|
700
|
+
function flattenError(error, mapper = (issue) => issue.message) {
|
|
756
701
|
const fieldErrors = {};
|
|
757
702
|
const formErrors = [];
|
|
758
|
-
for (const sub of error
|
|
703
|
+
for (const sub of error.issues) if (sub.path.length > 0) node(fieldErrors, sub.path[0], () => []).push(mapper(sub));
|
|
759
704
|
else formErrors.push(mapper(sub));
|
|
760
705
|
return {
|
|
761
706
|
formErrors,
|
|
762
707
|
fieldErrors
|
|
763
708
|
};
|
|
764
709
|
}
|
|
765
|
-
function formatError(error
|
|
710
|
+
function formatError(error, mapper = (issue) => issue.message) {
|
|
766
711
|
const fieldErrors = { _errors: [] };
|
|
767
|
-
const processError = (error
|
|
768
|
-
for (const issue
|
|
769
|
-
else if (issue
|
|
770
|
-
else if (issue
|
|
712
|
+
const processError = (error, path = []) => {
|
|
713
|
+
for (const issue of error.issues) if (issue.code === "invalid_union" && issue.errors.length) issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));
|
|
714
|
+
else if (issue.code === "invalid_key") processError({ issues: issue.issues }, [...path, ...issue.path]);
|
|
715
|
+
else if (issue.code === "invalid_element") processError({ issues: issue.issues }, [...path, ...issue.path]);
|
|
771
716
|
else {
|
|
772
|
-
const fullpath = [...path, ...issue
|
|
773
|
-
if (fullpath.length === 0) fieldErrors._errors.push(mapper(issue
|
|
717
|
+
const fullpath = [...path, ...issue.path];
|
|
718
|
+
if (fullpath.length === 0) fieldErrors._errors.push(mapper(issue));
|
|
774
719
|
else {
|
|
775
720
|
let curr = fieldErrors;
|
|
776
721
|
let i = 0;
|
|
@@ -778,7 +723,7 @@ function formatError(error$1, mapper = (issue$1) => issue$1.message) {
|
|
|
778
723
|
const el = fullpath[i];
|
|
779
724
|
const terminal = i === fullpath.length - 1;
|
|
780
725
|
if (el === "_errors") {
|
|
781
|
-
if (terminal) curr._errors.push(mapper(issue
|
|
726
|
+
if (terminal) curr._errors.push(mapper(issue));
|
|
782
727
|
i++;
|
|
783
728
|
continue;
|
|
784
729
|
}
|
|
@@ -788,18 +733,17 @@ function formatError(error$1, mapper = (issue$1) => issue$1.message) {
|
|
|
788
733
|
writable: true,
|
|
789
734
|
configurable: true
|
|
790
735
|
});
|
|
791
|
-
const node
|
|
792
|
-
if (terminal) node
|
|
793
|
-
curr = node
|
|
736
|
+
const node = curr[el];
|
|
737
|
+
if (terminal) node._errors.push(mapper(issue));
|
|
738
|
+
curr = node;
|
|
794
739
|
i++;
|
|
795
740
|
}
|
|
796
741
|
}
|
|
797
742
|
}
|
|
798
743
|
};
|
|
799
|
-
processError(error
|
|
744
|
+
processError(error);
|
|
800
745
|
return fieldErrors;
|
|
801
746
|
}
|
|
802
|
-
|
|
803
747
|
//#endregion
|
|
804
748
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/parse.js
|
|
805
749
|
function finalizeParams(callee, params) {
|
|
@@ -820,7 +764,7 @@ const _parse = (_Err) => {
|
|
|
820
764
|
}, ctx);
|
|
821
765
|
if (result instanceof Promise) throw new $ZodAsyncError();
|
|
822
766
|
if (result.issues.length) {
|
|
823
|
-
const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
767
|
+
const e = new ((_params?.Err) ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
824
768
|
captureStackTrace(e, _params?.callee ?? fn);
|
|
825
769
|
throw e;
|
|
826
770
|
}
|
|
@@ -828,7 +772,6 @@ const _parse = (_Err) => {
|
|
|
828
772
|
};
|
|
829
773
|
return fn;
|
|
830
774
|
};
|
|
831
|
-
const parse$2 = /* @__PURE__ */ _parse($ZodRealError);
|
|
832
775
|
const _parseAsync = (_Err) => {
|
|
833
776
|
const fn = async (schema, value, _ctx, params) => {
|
|
834
777
|
const ctx = _ctx ? {
|
|
@@ -841,7 +784,7 @@ const _parseAsync = (_Err) => {
|
|
|
841
784
|
}, ctx);
|
|
842
785
|
if (result instanceof Promise) result = await result;
|
|
843
786
|
if (result.issues.length) {
|
|
844
|
-
const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
787
|
+
const e = new ((params?.Err) ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
845
788
|
captureStackTrace(e, params?.callee ?? fn);
|
|
846
789
|
throw e;
|
|
847
790
|
}
|
|
@@ -849,7 +792,6 @@ const _parseAsync = (_Err) => {
|
|
|
849
792
|
};
|
|
850
793
|
return fn;
|
|
851
794
|
};
|
|
852
|
-
const parseAsync$1 = /* @__PURE__ */ _parseAsync($ZodRealError);
|
|
853
795
|
const _safeParse = (_Err) => (schema, value, _ctx) => {
|
|
854
796
|
const ctx = _ctx ? {
|
|
855
797
|
..._ctx,
|
|
@@ -865,21 +807,20 @@ const _safeParse = (_Err) => (schema, value, _ctx) => {
|
|
|
865
807
|
data: result.value
|
|
866
808
|
};
|
|
867
809
|
};
|
|
868
|
-
const safeParse$1 = /* @__PURE__ */ _safeParse($ZodRealError);
|
|
869
810
|
function failure(Err, issues, ctx) {
|
|
870
|
-
let error
|
|
811
|
+
let error;
|
|
871
812
|
return {
|
|
872
813
|
success: false,
|
|
873
814
|
get error() {
|
|
874
|
-
if (!error
|
|
875
|
-
error
|
|
815
|
+
if (!error) {
|
|
816
|
+
error = new Err(issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
876
817
|
issues = void 0;
|
|
877
818
|
ctx = void 0;
|
|
878
819
|
}
|
|
879
|
-
return error
|
|
820
|
+
return error;
|
|
880
821
|
},
|
|
881
822
|
set error(e) {
|
|
882
|
-
error
|
|
823
|
+
error = e;
|
|
883
824
|
issues = void 0;
|
|
884
825
|
ctx = void 0;
|
|
885
826
|
}
|
|
@@ -900,17 +841,16 @@ const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
900
841
|
data: result.value
|
|
901
842
|
};
|
|
902
843
|
};
|
|
903
|
-
const safeParseAsync$1 = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
904
844
|
const COMPILE_INVALID = /* @__PURE__ */ Symbol.for("zod.compile.invalid");
|
|
905
845
|
const COMPILE_FALLBACK = /* @__PURE__ */ Symbol.for("zod.compile.fallback");
|
|
906
|
-
const validate = (schema, value, _ctx) => {
|
|
846
|
+
const validate = ((schema, value, _ctx) => {
|
|
907
847
|
const validator = schema._zod.bag.validator;
|
|
908
848
|
if (validator !== void 0) {
|
|
909
849
|
if (validator(value) !== COMPILE_INVALID) return true;
|
|
910
850
|
if (validator.definite === true && _ctx === void 0) return false;
|
|
911
851
|
}
|
|
912
852
|
return validateFallback(schema, value, _ctx);
|
|
913
|
-
};
|
|
853
|
+
});
|
|
914
854
|
function validateFallback(schema, value, _ctx) {
|
|
915
855
|
const ctx = _ctx ? {
|
|
916
856
|
..._ctx,
|
|
@@ -935,7 +875,7 @@ function validateFallback(schema, value, _ctx) {
|
|
|
935
875
|
if (result instanceof Promise) throw new $ZodAsyncError();
|
|
936
876
|
return result.issues.length === 0;
|
|
937
877
|
}
|
|
938
|
-
const validateAsync = async (schema, value, _ctx) => {
|
|
878
|
+
const validateAsync$1 = async (schema, value, _ctx) => {
|
|
939
879
|
const ctx = _ctx ? {
|
|
940
880
|
..._ctx,
|
|
941
881
|
async: true,
|
|
@@ -952,45 +892,41 @@ const validateAsync = async (schema, value, _ctx) => {
|
|
|
952
892
|
return result.issues.length === 0;
|
|
953
893
|
};
|
|
954
894
|
const _encode = (_Err) => {
|
|
955
|
-
const parse
|
|
895
|
+
const parse = _parse(_Err);
|
|
956
896
|
const fn = (schema, value, _ctx, _params) => {
|
|
957
897
|
const ctx = _ctx ? {
|
|
958
898
|
..._ctx,
|
|
959
899
|
direction: "backward"
|
|
960
900
|
} : { direction: "backward" };
|
|
961
|
-
return parse
|
|
901
|
+
return parse(schema, value, ctx, finalizeParams(fn, _params));
|
|
962
902
|
};
|
|
963
903
|
return fn;
|
|
964
904
|
};
|
|
965
|
-
const encode$1 = /* @__PURE__ */ _encode($ZodRealError);
|
|
966
905
|
const _decode = (_Err) => {
|
|
967
|
-
const parse
|
|
906
|
+
const parse = _parse(_Err);
|
|
968
907
|
const fn = (schema, value, _ctx, _params) => {
|
|
969
|
-
return parse
|
|
908
|
+
return parse(schema, value, _ctx, finalizeParams(fn, _params));
|
|
970
909
|
};
|
|
971
910
|
return fn;
|
|
972
911
|
};
|
|
973
|
-
const decode$1 = /* @__PURE__ */ _decode($ZodRealError);
|
|
974
912
|
const _encodeAsync = (_Err) => {
|
|
975
|
-
const parseAsync
|
|
913
|
+
const parseAsync = _parseAsync(_Err);
|
|
976
914
|
const fn = async (schema, value, _ctx, _params) => {
|
|
977
915
|
const ctx = _ctx ? {
|
|
978
916
|
..._ctx,
|
|
979
917
|
direction: "backward"
|
|
980
918
|
} : { direction: "backward" };
|
|
981
|
-
return await parseAsync
|
|
919
|
+
return await parseAsync(schema, value, ctx, finalizeParams(fn, _params));
|
|
982
920
|
};
|
|
983
921
|
return fn;
|
|
984
922
|
};
|
|
985
|
-
const encodeAsync$1 = /* @__PURE__ */ _encodeAsync($ZodRealError);
|
|
986
923
|
const _decodeAsync = (_Err) => {
|
|
987
|
-
const parseAsync
|
|
924
|
+
const parseAsync = _parseAsync(_Err);
|
|
988
925
|
const fn = async (schema, value, _ctx, _params) => {
|
|
989
|
-
return await parseAsync
|
|
926
|
+
return await parseAsync(schema, value, _ctx, finalizeParams(fn, _params));
|
|
990
927
|
};
|
|
991
928
|
return fn;
|
|
992
929
|
};
|
|
993
|
-
const decodeAsync$1 = /* @__PURE__ */ _decodeAsync($ZodRealError);
|
|
994
930
|
const _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
995
931
|
const ctx = _ctx ? {
|
|
996
932
|
..._ctx,
|
|
@@ -998,11 +934,9 @@ const _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
|
998
934
|
} : { direction: "backward" };
|
|
999
935
|
return _safeParse(_Err)(schema, value, ctx);
|
|
1000
936
|
};
|
|
1001
|
-
const safeEncode$1 = /* @__PURE__ */ _safeEncode($ZodRealError);
|
|
1002
937
|
const _safeDecode = (_Err) => (schema, value, _ctx) => {
|
|
1003
938
|
return _safeParse(_Err)(schema, value, _ctx);
|
|
1004
939
|
};
|
|
1005
|
-
const safeDecode$1 = /* @__PURE__ */ _safeDecode($ZodRealError);
|
|
1006
940
|
const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1007
941
|
const ctx = _ctx ? {
|
|
1008
942
|
..._ctx,
|
|
@@ -1010,12 +944,9 @@ const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
1010
944
|
} : { direction: "backward" };
|
|
1011
945
|
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
1012
946
|
};
|
|
1013
|
-
const safeEncodeAsync$1 = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
|
|
1014
947
|
const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1015
948
|
return _safeParseAsync(_Err)(schema, value, _ctx);
|
|
1016
949
|
};
|
|
1017
|
-
const safeDecodeAsync$1 = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
|
|
1018
|
-
|
|
1019
950
|
//#endregion
|
|
1020
951
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/regexes.js
|
|
1021
952
|
/**
|
|
@@ -1039,9 +970,9 @@ 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
970
|
/** Returns a regex for validating an RFC 9562/4122 UUID.
|
|
1040
971
|
*
|
|
1041
972
|
* @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
|
|
973
|
+
const uuid = (version) => {
|
|
974
|
+
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)$/;
|
|
975
|
+
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
976
|
};
|
|
1046
977
|
/** Practical email validation */
|
|
1047
978
|
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,}$/;
|
|
@@ -1064,11 +995,10 @@ const dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468
|
|
|
1064
995
|
function anchor(source) {
|
|
1065
996
|
return new RegExp(`^${source}$`);
|
|
1066
997
|
}
|
|
1067
|
-
const date =
|
|
998
|
+
const date = /*@__PURE__*/ anchor(dateSource);
|
|
1068
999
|
function timeSource(args) {
|
|
1069
1000
|
const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
|
|
1070
|
-
|
|
1071
|
-
return regex;
|
|
1001
|
+
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
1002
|
}
|
|
1073
1003
|
function time(args) {
|
|
1074
1004
|
return new RegExp(`^${timeSource(args)}$`);
|
|
@@ -1089,14 +1019,13 @@ const number$1 = /^-?\d+(?:\.\d+)?$/;
|
|
|
1089
1019
|
const boolean$1 = /^(?:true|false)$/i;
|
|
1090
1020
|
const lowercase = /^[^A-Z]*$/;
|
|
1091
1021
|
const uppercase = /^[^a-z]*$/;
|
|
1092
|
-
|
|
1093
1022
|
//#endregion
|
|
1094
1023
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/checks.js
|
|
1095
|
-
const $ZodCheck =
|
|
1096
|
-
var _a
|
|
1024
|
+
const $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => {
|
|
1025
|
+
var _a;
|
|
1097
1026
|
inst._zod ?? (inst._zod = {});
|
|
1098
1027
|
inst._zod.def = def;
|
|
1099
|
-
(_a
|
|
1028
|
+
(_a = inst._zod).onattach ?? (_a.onattach = []);
|
|
1100
1029
|
});
|
|
1101
1030
|
/** Default `when` for length-based checks: run only on non-nullish values with a `length`. */
|
|
1102
1031
|
const _whenHasLength = (payload) => {
|
|
@@ -1108,7 +1037,7 @@ const numericOriginMap = {
|
|
|
1108
1037
|
bigint: "bigint",
|
|
1109
1038
|
object: "date"
|
|
1110
1039
|
};
|
|
1111
|
-
const $ZodCheckLessThan =
|
|
1040
|
+
const $ZodCheckLessThan = /*@__PURE__*/ $constructor("$ZodCheckLessThan", (inst, def) => {
|
|
1112
1041
|
$ZodCheck.init(inst, def);
|
|
1113
1042
|
const origin = numericOriginMap[typeof def.value];
|
|
1114
1043
|
inst._zod.check = (payload) => {
|
|
@@ -1124,7 +1053,7 @@ const $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (ins
|
|
|
1124
1053
|
});
|
|
1125
1054
|
};
|
|
1126
1055
|
});
|
|
1127
|
-
const $ZodCheckGreaterThan =
|
|
1056
|
+
const $ZodCheckGreaterThan = /*@__PURE__*/ $constructor("$ZodCheckGreaterThan", (inst, def) => {
|
|
1128
1057
|
$ZodCheck.init(inst, def);
|
|
1129
1058
|
const origin = numericOriginMap[typeof def.value];
|
|
1130
1059
|
inst._zod.check = (payload) => {
|
|
@@ -1140,12 +1069,11 @@ const $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan"
|
|
|
1140
1069
|
});
|
|
1141
1070
|
};
|
|
1142
1071
|
});
|
|
1143
|
-
const $ZodCheckMultipleOf =
|
|
1072
|
+
const $ZodCheckMultipleOf = /*@__PURE__*/ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
1144
1073
|
$ZodCheck.init(inst, def);
|
|
1145
1074
|
inst._zod.check = (payload) => {
|
|
1146
1075
|
if (typeof payload.value !== typeof def.value) throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
1147
|
-
|
|
1148
|
-
if (isMultiple) return;
|
|
1076
|
+
if (typeof payload.value === "bigint" ? def.value !== BigInt(0) && payload.value % def.value === BigInt(0) : floatSafeRemainder(payload.value, def.value) === 0) return;
|
|
1149
1077
|
payload.issues.push({
|
|
1150
1078
|
origin: typeof payload.value,
|
|
1151
1079
|
code: "not_multiple_of",
|
|
@@ -1156,7 +1084,7 @@ const $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf",
|
|
|
1156
1084
|
});
|
|
1157
1085
|
};
|
|
1158
1086
|
});
|
|
1159
|
-
const $ZodCheckNumberFormat =
|
|
1087
|
+
const $ZodCheckNumberFormat = /*@__PURE__*/ $constructor("$ZodCheckNumberFormat", (inst, def) => {
|
|
1160
1088
|
$ZodCheck.init(inst, def);
|
|
1161
1089
|
def.format = def.format || "float64";
|
|
1162
1090
|
const isInt = def.format?.includes("int");
|
|
@@ -1220,15 +1148,14 @@ const $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberForma
|
|
|
1220
1148
|
});
|
|
1221
1149
|
};
|
|
1222
1150
|
});
|
|
1223
|
-
const $ZodCheckMaxLength =
|
|
1224
|
-
var _a
|
|
1151
|
+
const $ZodCheckMaxLength = /*@__PURE__*/ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
1152
|
+
var _a;
|
|
1225
1153
|
$ZodCheck.init(inst, def);
|
|
1226
|
-
(_a
|
|
1154
|
+
(_a = inst._zod.def).when ?? (_a.when = _whenHasLength);
|
|
1227
1155
|
inst._zod.check = (payload) => {
|
|
1228
1156
|
const input = payload.value;
|
|
1229
1157
|
const units = input.length;
|
|
1230
|
-
|
|
1231
|
-
if (length <= def.maximum) return;
|
|
1158
|
+
if ((typeof input === "string" && units > def.maximum ? codePointLength(input) : units) <= def.maximum) return;
|
|
1232
1159
|
const origin = getLengthableOrigin(input);
|
|
1233
1160
|
payload.issues.push({
|
|
1234
1161
|
origin,
|
|
@@ -1241,15 +1168,14 @@ const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (i
|
|
|
1241
1168
|
});
|
|
1242
1169
|
};
|
|
1243
1170
|
});
|
|
1244
|
-
const $ZodCheckMinLength =
|
|
1245
|
-
var _a
|
|
1171
|
+
const $ZodCheckMinLength = /*@__PURE__*/ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
1172
|
+
var _a;
|
|
1246
1173
|
$ZodCheck.init(inst, def);
|
|
1247
|
-
(_a
|
|
1174
|
+
(_a = inst._zod.def).when ?? (_a.when = _whenHasLength);
|
|
1248
1175
|
inst._zod.check = (payload) => {
|
|
1249
1176
|
const input = payload.value;
|
|
1250
1177
|
const units = input.length;
|
|
1251
|
-
|
|
1252
|
-
if (length >= def.minimum) return;
|
|
1178
|
+
if ((typeof input === "string" && units >= def.minimum && units < def.minimum * 2 ? codePointLength(input) : units) >= def.minimum) return;
|
|
1253
1179
|
const origin = getLengthableOrigin(input);
|
|
1254
1180
|
payload.issues.push({
|
|
1255
1181
|
origin,
|
|
@@ -1262,10 +1188,10 @@ const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (i
|
|
|
1262
1188
|
});
|
|
1263
1189
|
};
|
|
1264
1190
|
});
|
|
1265
|
-
const $ZodCheckLengthEquals =
|
|
1266
|
-
var _a
|
|
1191
|
+
const $ZodCheckLengthEquals = /*@__PURE__*/ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
1192
|
+
var _a;
|
|
1267
1193
|
$ZodCheck.init(inst, def);
|
|
1268
|
-
(_a
|
|
1194
|
+
(_a = inst._zod.def).when ?? (_a.when = _whenHasLength);
|
|
1269
1195
|
inst._zod.check = (payload) => {
|
|
1270
1196
|
const input = payload.value;
|
|
1271
1197
|
const units = input.length;
|
|
@@ -1290,10 +1216,10 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
|
|
|
1290
1216
|
});
|
|
1291
1217
|
};
|
|
1292
1218
|
});
|
|
1293
|
-
const $ZodCheckStringFormat =
|
|
1294
|
-
var _a
|
|
1219
|
+
const $ZodCheckStringFormat = /*@__PURE__*/ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
1220
|
+
var _a, _b;
|
|
1295
1221
|
$ZodCheck.init(inst, def);
|
|
1296
|
-
if (def.pattern) (_a
|
|
1222
|
+
if (def.pattern) (_a = inst._zod).check ?? (_a.check = (payload) => {
|
|
1297
1223
|
def.pattern.lastIndex = 0;
|
|
1298
1224
|
if (def.pattern.test(payload.value)) return;
|
|
1299
1225
|
payload.issues.push({
|
|
@@ -1308,7 +1234,7 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
|
|
|
1308
1234
|
});
|
|
1309
1235
|
else (_b = inst._zod).check ?? (_b.check = () => {});
|
|
1310
1236
|
});
|
|
1311
|
-
const $ZodCheckRegex =
|
|
1237
|
+
const $ZodCheckRegex = /*@__PURE__*/ $constructor("$ZodCheckRegex", (inst, def) => {
|
|
1312
1238
|
$ZodCheckStringFormat.init(inst, def);
|
|
1313
1239
|
inst._zod.check = (payload) => {
|
|
1314
1240
|
def.pattern.lastIndex = 0;
|
|
@@ -1324,19 +1250,18 @@ const $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def
|
|
|
1324
1250
|
});
|
|
1325
1251
|
};
|
|
1326
1252
|
});
|
|
1327
|
-
const $ZodCheckLowerCase =
|
|
1253
|
+
const $ZodCheckLowerCase = /*@__PURE__*/ $constructor("$ZodCheckLowerCase", (inst, def) => {
|
|
1328
1254
|
def.pattern ?? (def.pattern = lowercase);
|
|
1329
1255
|
$ZodCheckStringFormat.init(inst, def);
|
|
1330
1256
|
});
|
|
1331
|
-
const $ZodCheckUpperCase =
|
|
1257
|
+
const $ZodCheckUpperCase = /*@__PURE__*/ $constructor("$ZodCheckUpperCase", (inst, def) => {
|
|
1332
1258
|
def.pattern ?? (def.pattern = uppercase);
|
|
1333
1259
|
$ZodCheckStringFormat.init(inst, def);
|
|
1334
1260
|
});
|
|
1335
|
-
const $ZodCheckIncludes =
|
|
1261
|
+
const $ZodCheckIncludes = /*@__PURE__*/ $constructor("$ZodCheckIncludes", (inst, def) => {
|
|
1336
1262
|
$ZodCheck.init(inst, def);
|
|
1337
1263
|
const escapedRegex = escapeRegex(def.includes);
|
|
1338
|
-
|
|
1339
|
-
def.pattern = pattern;
|
|
1264
|
+
def.pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position},}${escapedRegex}` : escapedRegex);
|
|
1340
1265
|
inst._zod.check = (payload) => {
|
|
1341
1266
|
if (payload.value.includes(def.includes, def.position)) return;
|
|
1342
1267
|
payload.issues.push({
|
|
@@ -1350,7 +1275,7 @@ const $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (ins
|
|
|
1350
1275
|
});
|
|
1351
1276
|
};
|
|
1352
1277
|
});
|
|
1353
|
-
const $ZodCheckStartsWith =
|
|
1278
|
+
const $ZodCheckStartsWith = /*@__PURE__*/ $constructor("$ZodCheckStartsWith", (inst, def) => {
|
|
1354
1279
|
$ZodCheck.init(inst, def);
|
|
1355
1280
|
const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`);
|
|
1356
1281
|
def.pattern ?? (def.pattern = pattern);
|
|
@@ -1367,7 +1292,7 @@ const $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith",
|
|
|
1367
1292
|
});
|
|
1368
1293
|
};
|
|
1369
1294
|
});
|
|
1370
|
-
const $ZodCheckEndsWith =
|
|
1295
|
+
const $ZodCheckEndsWith = /*@__PURE__*/ $constructor("$ZodCheckEndsWith", (inst, def) => {
|
|
1371
1296
|
$ZodCheck.init(inst, def);
|
|
1372
1297
|
const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`);
|
|
1373
1298
|
def.pattern ?? (def.pattern = pattern);
|
|
@@ -1384,13 +1309,12 @@ const $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (ins
|
|
|
1384
1309
|
});
|
|
1385
1310
|
};
|
|
1386
1311
|
});
|
|
1387
|
-
const $ZodCheckOverwrite =
|
|
1312
|
+
const $ZodCheckOverwrite = /*@__PURE__*/ $constructor("$ZodCheckOverwrite", (inst, def) => {
|
|
1388
1313
|
$ZodCheck.init(inst, def);
|
|
1389
1314
|
inst._zod.check = (payload) => {
|
|
1390
1315
|
payload.value = def.tx(payload.value);
|
|
1391
1316
|
};
|
|
1392
1317
|
});
|
|
1393
|
-
|
|
1394
1318
|
//#endregion
|
|
1395
1319
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/doc.js
|
|
1396
1320
|
var Doc = class {
|
|
@@ -1414,8 +1338,7 @@ var Doc = class {
|
|
|
1414
1338
|
arg(this, { execution: "async" });
|
|
1415
1339
|
return;
|
|
1416
1340
|
}
|
|
1417
|
-
const
|
|
1418
|
-
const lines = content.split("\n").filter((x) => x);
|
|
1341
|
+
const lines = arg.split("\n").filter((x) => x);
|
|
1419
1342
|
const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));
|
|
1420
1343
|
const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x);
|
|
1421
1344
|
for (const line of dedented) this.content.push(line);
|
|
@@ -1423,11 +1346,9 @@ var Doc = class {
|
|
|
1423
1346
|
compile() {
|
|
1424
1347
|
const F = Function;
|
|
1425
1348
|
const content = this?.content ?? [``];
|
|
1426
|
-
|
|
1427
|
-
return factory(...Object.values(this.closed));
|
|
1349
|
+
return new F(...Object.keys(this.closed), `return function (${this.args.join(", ")}) {\n${content.join("\n")}\n};`)(...Object.values(this.closed));
|
|
1428
1350
|
}
|
|
1429
1351
|
};
|
|
1430
|
-
|
|
1431
1352
|
//#endregion
|
|
1432
1353
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/versions.js
|
|
1433
1354
|
const version = {
|
|
@@ -1435,11 +1356,10 @@ const version = {
|
|
|
1435
1356
|
minor: 6,
|
|
1436
1357
|
patch: 5
|
|
1437
1358
|
};
|
|
1438
|
-
|
|
1439
1359
|
//#endregion
|
|
1440
1360
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/schemas.js
|
|
1441
|
-
const $ZodType =
|
|
1442
|
-
var _a
|
|
1361
|
+
const $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
|
|
1362
|
+
var _a;
|
|
1443
1363
|
inst ?? (inst = {});
|
|
1444
1364
|
inst._zod.def = def;
|
|
1445
1365
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -1448,34 +1368,31 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
1448
1368
|
const checks = inst._zod.traits.has("$ZodCheck") ? [inst, ...defChecks ?? []] : defChecks?.length ? [...defChecks] : [];
|
|
1449
1369
|
for (const ch of checks) for (const fn of ch._zod.onattach) fn(inst);
|
|
1450
1370
|
if (checks.length === 0) {
|
|
1451
|
-
(_a
|
|
1371
|
+
(_a = inst._zod).deferred ?? (_a.deferred = []);
|
|
1452
1372
|
inst._zod.deferred?.push(() => {
|
|
1453
1373
|
inst._zod.run = inst._zod.parse;
|
|
1454
1374
|
});
|
|
1455
1375
|
} else {
|
|
1456
|
-
const runChecks = (payload, checks
|
|
1376
|
+
const runChecks = (payload, checks, ctx) => {
|
|
1457
1377
|
if (payload.memo) return payload;
|
|
1458
1378
|
let isAborted = aborted(payload);
|
|
1459
1379
|
let asyncResult;
|
|
1460
|
-
for (const ch of checks
|
|
1380
|
+
for (const ch of checks) {
|
|
1461
1381
|
if (ch._zod.def.when) {
|
|
1462
1382
|
if (explicitlyAborted(payload)) continue;
|
|
1463
|
-
|
|
1464
|
-
if (!shouldRun) continue;
|
|
1383
|
+
if (!ch._zod.def.when(payload)) continue;
|
|
1465
1384
|
} else if (isAborted) continue;
|
|
1466
1385
|
const currLen = payload.issues.length;
|
|
1467
1386
|
const _ = ch._zod.check(payload);
|
|
1468
1387
|
if (_ instanceof Promise && ctx?.async === false) throw new $ZodAsyncError();
|
|
1469
1388
|
if (asyncResult || _ instanceof Promise) asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
|
|
1470
1389
|
await _;
|
|
1471
|
-
|
|
1472
|
-
if (nextLen === currLen) return;
|
|
1390
|
+
if (payload.issues.length === currLen) return;
|
|
1473
1391
|
attachSchema(payload.issues, currLen, inst);
|
|
1474
1392
|
if (!isAborted) isAborted = aborted(payload, currLen);
|
|
1475
1393
|
});
|
|
1476
1394
|
else {
|
|
1477
|
-
|
|
1478
|
-
if (nextLen === currLen) continue;
|
|
1395
|
+
if (payload.issues.length === currLen) continue;
|
|
1479
1396
|
attachSchema(payload.issues, currLen, inst);
|
|
1480
1397
|
if (!isAborted) isAborted = aborted(payload, currLen);
|
|
1481
1398
|
}
|
|
@@ -1493,7 +1410,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
1493
1410
|
const checkResult = runChecks(payload, checks, ctx);
|
|
1494
1411
|
if (checkResult instanceof Promise) {
|
|
1495
1412
|
if (ctx.async === false) throw new $ZodAsyncError();
|
|
1496
|
-
return checkResult.then((checkResult
|
|
1413
|
+
return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));
|
|
1497
1414
|
}
|
|
1498
1415
|
return inst._zod.parse(checkResult, ctx);
|
|
1499
1416
|
};
|
|
@@ -1507,15 +1424,15 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
1507
1424
|
...ctx,
|
|
1508
1425
|
skipChecks: true
|
|
1509
1426
|
});
|
|
1510
|
-
if (canary instanceof Promise) return canary.then((canary
|
|
1511
|
-
return handleCanaryResult(canary
|
|
1427
|
+
if (canary instanceof Promise) return canary.then((canary) => {
|
|
1428
|
+
return handleCanaryResult(canary, payload, ctx);
|
|
1512
1429
|
});
|
|
1513
1430
|
return handleCanaryResult(canary, payload, ctx);
|
|
1514
1431
|
}
|
|
1515
1432
|
const result = inst._zod.parse(payload, ctx);
|
|
1516
1433
|
if (result instanceof Promise) {
|
|
1517
1434
|
if (ctx.async === false) throw new $ZodAsyncError();
|
|
1518
|
-
return result.then((result
|
|
1435
|
+
return result.then((result) => runChecks(result, checks, ctx));
|
|
1519
1436
|
}
|
|
1520
1437
|
return runChecks(result, checks, ctx);
|
|
1521
1438
|
};
|
|
@@ -1530,7 +1447,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
1530
1447
|
});
|
|
1531
1448
|
/** The Standard Schema surface for `inst`. Shared so wrappers can extend it without forcing it. */
|
|
1532
1449
|
const toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => finalizeIssue(iss, ctx, config())) } : { value: r.value };
|
|
1533
|
-
async function validateAsync
|
|
1450
|
+
async function validateAsync(inst, value) {
|
|
1534
1451
|
const ctx = { async: true };
|
|
1535
1452
|
return toStandardResult(await inst._zod.run({
|
|
1536
1453
|
value,
|
|
@@ -1548,19 +1465,19 @@ function standardProps(inst) {
|
|
|
1548
1465
|
}, ctx);
|
|
1549
1466
|
if (!(r instanceof Promise)) return toStandardResult(r, ctx);
|
|
1550
1467
|
} catch (_) {}
|
|
1551
|
-
return validateAsync
|
|
1468
|
+
return validateAsync(inst, value);
|
|
1552
1469
|
},
|
|
1553
1470
|
vendor: "zod",
|
|
1554
1471
|
version: 1
|
|
1555
1472
|
};
|
|
1556
1473
|
}
|
|
1557
|
-
const $ZodString =
|
|
1474
|
+
const $ZodString = /*@__PURE__*/ $constructor("$ZodString", (inst, def) => {
|
|
1558
1475
|
$ZodType.init(inst, def);
|
|
1559
1476
|
inst._zod.pattern = def.pattern ?? anyString;
|
|
1560
1477
|
inst._zod.parse = (payload, _) => {
|
|
1561
1478
|
if (def.coerce) try {
|
|
1562
1479
|
payload.value = String(payload.value);
|
|
1563
|
-
} catch (_
|
|
1480
|
+
} catch (_) {}
|
|
1564
1481
|
if (typeof payload.value === "string") return payload;
|
|
1565
1482
|
payload.issues.push({
|
|
1566
1483
|
expected: "string",
|
|
@@ -1571,17 +1488,17 @@ const $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
|
|
|
1571
1488
|
return payload;
|
|
1572
1489
|
};
|
|
1573
1490
|
});
|
|
1574
|
-
const $ZodStringFormat =
|
|
1491
|
+
const $ZodStringFormat = /*@__PURE__*/ $constructor("$ZodStringFormat", (inst, def) => {
|
|
1575
1492
|
$ZodCheckStringFormat.init(inst, def);
|
|
1576
1493
|
$ZodString.init(inst, def);
|
|
1577
1494
|
});
|
|
1578
|
-
const $ZodGUID =
|
|
1495
|
+
const $ZodGUID = /*@__PURE__*/ $constructor("$ZodGUID", (inst, def) => {
|
|
1579
1496
|
def.pattern ?? (def.pattern = guid);
|
|
1580
1497
|
$ZodStringFormat.init(inst, def);
|
|
1581
1498
|
});
|
|
1582
|
-
const $ZodUUID =
|
|
1499
|
+
const $ZodUUID = /*@__PURE__*/ $constructor("$ZodUUID", (inst, def) => {
|
|
1583
1500
|
if (def.version) {
|
|
1584
|
-
const
|
|
1501
|
+
const v = {
|
|
1585
1502
|
v1: 1,
|
|
1586
1503
|
v2: 2,
|
|
1587
1504
|
v3: 3,
|
|
@@ -1590,21 +1507,16 @@ const $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => {
|
|
|
1590
1507
|
v6: 6,
|
|
1591
1508
|
v7: 7,
|
|
1592
1509
|
v8: 8
|
|
1593
|
-
};
|
|
1594
|
-
const v = versionMap[def.version];
|
|
1510
|
+
}[def.version];
|
|
1595
1511
|
if (v === void 0) throw new Error(`Invalid UUID version: "${def.version}"`);
|
|
1596
1512
|
def.pattern ?? (def.pattern = uuid(v));
|
|
1597
1513
|
} else def.pattern ?? (def.pattern = uuid());
|
|
1598
1514
|
$ZodStringFormat.init(inst, def);
|
|
1599
1515
|
});
|
|
1600
|
-
const $ZodEmail =
|
|
1516
|
+
const $ZodEmail = /*@__PURE__*/ $constructor("$ZodEmail", (inst, def) => {
|
|
1601
1517
|
def.pattern ?? (def.pattern = email);
|
|
1602
1518
|
$ZodStringFormat.init(inst, def);
|
|
1603
1519
|
});
|
|
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
1520
|
function canParseURL(input) {
|
|
1609
1521
|
try {
|
|
1610
1522
|
if (typeof URL !== "undefined" && typeof URL.canParse === "function") return URL.canParse(input);
|
|
@@ -1615,20 +1527,20 @@ function canParseURL(input) {
|
|
|
1615
1527
|
}
|
|
1616
1528
|
}
|
|
1617
1529
|
function validateURL(trimmed, def) {
|
|
1618
|
-
if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) return canParseURL(trimmed) ||
|
|
1530
|
+
if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) return canParseURL(trimmed) || 2;
|
|
1619
1531
|
return parseURLObject(trimmed, def);
|
|
1620
1532
|
}
|
|
1621
1533
|
/** Parses a URL while preserving the non-normalizing HTTP guard. */
|
|
1622
1534
|
function parseURLObject(trimmed, def) {
|
|
1623
|
-
if (!def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(trimmed)) return
|
|
1535
|
+
if (!def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(trimmed)) return 1;
|
|
1624
1536
|
try {
|
|
1625
1537
|
if (typeof URL !== "undefined") {
|
|
1626
1538
|
const URLStatic = URL;
|
|
1627
|
-
if (typeof URLStatic.parse === "function") return URLStatic.parse(trimmed) ??
|
|
1539
|
+
if (typeof URLStatic.parse === "function") return URLStatic.parse(trimmed) ?? 2;
|
|
1628
1540
|
}
|
|
1629
1541
|
return new URL(trimmed);
|
|
1630
1542
|
} catch {
|
|
1631
|
-
return
|
|
1543
|
+
return 2;
|
|
1632
1544
|
}
|
|
1633
1545
|
}
|
|
1634
1546
|
const asciiTabOrNewline = /[\t\n\r]/g;
|
|
@@ -1636,21 +1548,21 @@ const asciiTabOrNewline = /[\t\n\r]/g;
|
|
|
1636
1548
|
function stripTabAndNewline(value) {
|
|
1637
1549
|
return value.replace(asciiTabOrNewline, "");
|
|
1638
1550
|
}
|
|
1639
|
-
function urlHostnameOk(url
|
|
1551
|
+
function urlHostnameOk(url, hostname) {
|
|
1640
1552
|
hostname.lastIndex = 0;
|
|
1641
|
-
return hostname.test(url
|
|
1553
|
+
return hostname.test(url.hostname);
|
|
1642
1554
|
}
|
|
1643
|
-
function urlProtocolOk(url
|
|
1555
|
+
function urlProtocolOk(url, protocol) {
|
|
1644
1556
|
protocol.lastIndex = 0;
|
|
1645
|
-
return protocol.test(url
|
|
1557
|
+
return protocol.test(url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol);
|
|
1646
1558
|
}
|
|
1647
|
-
const $ZodURL =
|
|
1559
|
+
const $ZodURL = /*@__PURE__*/ $constructor("$ZodURL", (inst, def) => {
|
|
1648
1560
|
$ZodStringFormat.init(inst, def);
|
|
1649
1561
|
inst._zod.check = (payload) => {
|
|
1650
1562
|
try {
|
|
1651
1563
|
const trimmed = payload.value.trim();
|
|
1652
|
-
const url
|
|
1653
|
-
if (url
|
|
1564
|
+
const url = validateURL(trimmed, def);
|
|
1565
|
+
if (url === 1) {
|
|
1654
1566
|
payload.issues.push({
|
|
1655
1567
|
code: "invalid_format",
|
|
1656
1568
|
format: "url",
|
|
@@ -1661,7 +1573,7 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
1661
1573
|
});
|
|
1662
1574
|
return;
|
|
1663
1575
|
}
|
|
1664
|
-
if (url
|
|
1576
|
+
if (url === 2) {
|
|
1665
1577
|
payload.issues.push({
|
|
1666
1578
|
code: "invalid_format",
|
|
1667
1579
|
format: "url",
|
|
@@ -1671,11 +1583,11 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
1671
1583
|
});
|
|
1672
1584
|
return;
|
|
1673
1585
|
}
|
|
1674
|
-
if (url
|
|
1586
|
+
if (url === true) {
|
|
1675
1587
|
payload.value = stripTabAndNewline(trimmed);
|
|
1676
1588
|
return;
|
|
1677
1589
|
}
|
|
1678
|
-
if (def.hostname && !urlHostnameOk(url
|
|
1590
|
+
if (def.hostname && !urlHostnameOk(url, def.hostname)) payload.issues.push({
|
|
1679
1591
|
code: "invalid_format",
|
|
1680
1592
|
format: "url",
|
|
1681
1593
|
note: "Invalid hostname",
|
|
@@ -1684,7 +1596,7 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
1684
1596
|
inst,
|
|
1685
1597
|
continue: !def.abort
|
|
1686
1598
|
});
|
|
1687
|
-
if (def.protocol && !urlProtocolOk(url
|
|
1599
|
+
if (def.protocol && !urlProtocolOk(url, def.protocol)) payload.issues.push({
|
|
1688
1600
|
code: "invalid_format",
|
|
1689
1601
|
format: "url",
|
|
1690
1602
|
note: "Invalid protocol",
|
|
@@ -1693,7 +1605,7 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
1693
1605
|
inst,
|
|
1694
1606
|
continue: !def.abort
|
|
1695
1607
|
});
|
|
1696
|
-
payload.value = def.normalize ? url
|
|
1608
|
+
payload.value = def.normalize ? url.href : stripTabAndNewline(trimmed);
|
|
1697
1609
|
return;
|
|
1698
1610
|
} catch (_) {
|
|
1699
1611
|
payload.issues.push({
|
|
@@ -1706,11 +1618,11 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
1706
1618
|
}
|
|
1707
1619
|
};
|
|
1708
1620
|
});
|
|
1709
|
-
const $ZodEmoji =
|
|
1621
|
+
const $ZodEmoji = /*@__PURE__*/ $constructor("$ZodEmoji", (inst, def) => {
|
|
1710
1622
|
def.pattern ?? (def.pattern = emoji());
|
|
1711
1623
|
$ZodStringFormat.init(inst, def);
|
|
1712
1624
|
});
|
|
1713
|
-
const $ZodNanoID =
|
|
1625
|
+
const $ZodNanoID = /*@__PURE__*/ $constructor("$ZodNanoID", (inst, def) => {
|
|
1714
1626
|
if (def.length !== void 0 && (!Number.isInteger(def.length) || def.length < 1)) throw new Error(`Invalid nanoid length: ${def.length}`);
|
|
1715
1627
|
def.pattern ?? (def.pattern = def.length === void 0 ? nanoid : nanoidOfLength(def.length));
|
|
1716
1628
|
$ZodStringFormat.init(inst, def);
|
|
@@ -1720,43 +1632,43 @@ const $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => {
|
|
|
1720
1632
|
* (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
|
|
1721
1633
|
* See https://github.com/paralleldrive/cuid.
|
|
1722
1634
|
*/
|
|
1723
|
-
const $ZodCUID =
|
|
1635
|
+
const $ZodCUID = /*@__PURE__*/ $constructor("$ZodCUID", (inst, def) => {
|
|
1724
1636
|
def.pattern ?? (def.pattern = cuid);
|
|
1725
1637
|
$ZodStringFormat.init(inst, def);
|
|
1726
1638
|
});
|
|
1727
|
-
const $ZodCUID2 =
|
|
1639
|
+
const $ZodCUID2 = /*@__PURE__*/ $constructor("$ZodCUID2", (inst, def) => {
|
|
1728
1640
|
def.pattern ?? (def.pattern = cuid2);
|
|
1729
1641
|
$ZodStringFormat.init(inst, def);
|
|
1730
1642
|
});
|
|
1731
|
-
const $ZodULID =
|
|
1643
|
+
const $ZodULID = /*@__PURE__*/ $constructor("$ZodULID", (inst, def) => {
|
|
1732
1644
|
def.pattern ?? (def.pattern = ulid);
|
|
1733
1645
|
$ZodStringFormat.init(inst, def);
|
|
1734
1646
|
});
|
|
1735
|
-
const $ZodXID =
|
|
1647
|
+
const $ZodXID = /*@__PURE__*/ $constructor("$ZodXID", (inst, def) => {
|
|
1736
1648
|
def.pattern ?? (def.pattern = xid);
|
|
1737
1649
|
$ZodStringFormat.init(inst, def);
|
|
1738
1650
|
});
|
|
1739
|
-
const $ZodKSUID =
|
|
1651
|
+
const $ZodKSUID = /*@__PURE__*/ $constructor("$ZodKSUID", (inst, def) => {
|
|
1740
1652
|
def.pattern ?? (def.pattern = ksuid);
|
|
1741
1653
|
$ZodStringFormat.init(inst, def);
|
|
1742
1654
|
});
|
|
1743
|
-
const $ZodISODateTime =
|
|
1655
|
+
const $ZodISODateTime = /*@__PURE__*/ $constructor("$ZodISODateTime", (inst, def) => {
|
|
1744
1656
|
def.pattern ?? (def.pattern = datetime(def));
|
|
1745
1657
|
$ZodStringFormat.init(inst, def);
|
|
1746
1658
|
});
|
|
1747
|
-
const $ZodISODate =
|
|
1659
|
+
const $ZodISODate = /*@__PURE__*/ $constructor("$ZodISODate", (inst, def) => {
|
|
1748
1660
|
def.pattern ?? (def.pattern = date);
|
|
1749
1661
|
$ZodStringFormat.init(inst, def);
|
|
1750
1662
|
});
|
|
1751
|
-
const $ZodISOTime =
|
|
1663
|
+
const $ZodISOTime = /*@__PURE__*/ $constructor("$ZodISOTime", (inst, def) => {
|
|
1752
1664
|
def.pattern ?? (def.pattern = time(def));
|
|
1753
1665
|
$ZodStringFormat.init(inst, def);
|
|
1754
1666
|
});
|
|
1755
|
-
const $ZodISODuration =
|
|
1667
|
+
const $ZodISODuration = /*@__PURE__*/ $constructor("$ZodISODuration", (inst, def) => {
|
|
1756
1668
|
def.pattern ?? (def.pattern = duration);
|
|
1757
1669
|
$ZodStringFormat.init(inst, def);
|
|
1758
1670
|
});
|
|
1759
|
-
const $ZodIPv4 =
|
|
1671
|
+
const $ZodIPv4 = /*@__PURE__*/ $constructor("$ZodIPv4", (inst, def) => {
|
|
1760
1672
|
def.pattern ?? (def.pattern = ipv4);
|
|
1761
1673
|
$ZodStringFormat.init(inst, def);
|
|
1762
1674
|
});
|
|
@@ -1766,7 +1678,7 @@ function isValidIPv6(value) {
|
|
|
1766
1678
|
if (!ipv6Alphabet.test(value)) return false;
|
|
1767
1679
|
return canParseURL(`http://[${value}]`);
|
|
1768
1680
|
}
|
|
1769
|
-
const $ZodIPv6 =
|
|
1681
|
+
const $ZodIPv6 = /*@__PURE__*/ $constructor("$ZodIPv6", (inst, def) => {
|
|
1770
1682
|
def.pattern ?? (def.pattern = ipv6);
|
|
1771
1683
|
$ZodStringFormat.init(inst, def);
|
|
1772
1684
|
inst._zod.check = (payload) => {
|
|
@@ -1779,7 +1691,7 @@ const $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
|
|
|
1779
1691
|
});
|
|
1780
1692
|
};
|
|
1781
1693
|
});
|
|
1782
|
-
const $ZodCIDRv4 =
|
|
1694
|
+
const $ZodCIDRv4 = /*@__PURE__*/ $constructor("$ZodCIDRv4", (inst, def) => {
|
|
1783
1695
|
def.pattern ?? (def.pattern = cidrv4);
|
|
1784
1696
|
$ZodStringFormat.init(inst, def);
|
|
1785
1697
|
});
|
|
@@ -1793,7 +1705,7 @@ function isValidCIDRv6(value) {
|
|
|
1793
1705
|
if (prefixNum < 0 || prefixNum > 128) return false;
|
|
1794
1706
|
return isValidIPv6(address);
|
|
1795
1707
|
}
|
|
1796
|
-
const $ZodCIDRv6 =
|
|
1708
|
+
const $ZodCIDRv6 = /*@__PURE__*/ $constructor("$ZodCIDRv6", (inst, def) => {
|
|
1797
1709
|
def.pattern ?? (def.pattern = cidrv6);
|
|
1798
1710
|
$ZodStringFormat.init(inst, def);
|
|
1799
1711
|
inst._zod.check = (payload) => {
|
|
@@ -1818,7 +1730,7 @@ function isValidBase64(data) {
|
|
|
1818
1730
|
}
|
|
1819
1731
|
}
|
|
1820
1732
|
const base64Charset = /^[0-9a-zA-Z+/]*={0,2}$/;
|
|
1821
|
-
const $ZodBase64 =
|
|
1733
|
+
const $ZodBase64 = /*@__PURE__*/ $constructor("$ZodBase64", (inst, def) => {
|
|
1822
1734
|
def.pattern ?? (def.pattern = base64Charset);
|
|
1823
1735
|
$ZodStringFormat.init(inst, def);
|
|
1824
1736
|
inst._zod.check = (payload) => {
|
|
@@ -1835,11 +1747,10 @@ const $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
|
|
|
1835
1747
|
const base64urlCharset = /^[A-Za-z0-9_-]*$/;
|
|
1836
1748
|
function isValidBase64URL(data) {
|
|
1837
1749
|
if (!base64urlCharset.test(data)) return false;
|
|
1838
|
-
const base64
|
|
1839
|
-
|
|
1840
|
-
return isValidBase64(padded);
|
|
1750
|
+
const base64 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
|
|
1751
|
+
return isValidBase64(base64.padEnd(Math.ceil(base64.length / 4) * 4, "="));
|
|
1841
1752
|
}
|
|
1842
|
-
const $ZodBase64URL =
|
|
1753
|
+
const $ZodBase64URL = /*@__PURE__*/ $constructor("$ZodBase64URL", (inst, def) => {
|
|
1843
1754
|
def.pattern ?? (def.pattern = base64urlCharset);
|
|
1844
1755
|
$ZodStringFormat.init(inst, def);
|
|
1845
1756
|
inst._zod.check = (payload) => {
|
|
@@ -1853,7 +1764,7 @@ const $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def)
|
|
|
1853
1764
|
});
|
|
1854
1765
|
};
|
|
1855
1766
|
});
|
|
1856
|
-
const $ZodE164 =
|
|
1767
|
+
const $ZodE164 = /*@__PURE__*/ $constructor("$ZodE164", (inst, def) => {
|
|
1857
1768
|
def.pattern ?? (def.pattern = e164);
|
|
1858
1769
|
$ZodStringFormat.init(inst, def);
|
|
1859
1770
|
});
|
|
@@ -1872,7 +1783,7 @@ function isValidJWT(token, algorithm = null) {
|
|
|
1872
1783
|
return false;
|
|
1873
1784
|
}
|
|
1874
1785
|
}
|
|
1875
|
-
const $ZodJWT =
|
|
1786
|
+
const $ZodJWT = /*@__PURE__*/ $constructor("$ZodJWT", (inst, def) => {
|
|
1876
1787
|
$ZodStringFormat.init(inst, def);
|
|
1877
1788
|
inst._zod.check = (payload) => {
|
|
1878
1789
|
if (isValidJWT(payload.value, def.alg)) return;
|
|
@@ -1885,7 +1796,7 @@ const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
|
|
|
1885
1796
|
});
|
|
1886
1797
|
};
|
|
1887
1798
|
});
|
|
1888
|
-
const $ZodNumber =
|
|
1799
|
+
const $ZodNumber = /*@__PURE__*/ $constructor("$ZodNumber", (inst, def) => {
|
|
1889
1800
|
$ZodType.init(inst, def);
|
|
1890
1801
|
inst._zod.pattern = number$1;
|
|
1891
1802
|
inst._zod.parse = (payload, _ctx) => {
|
|
@@ -1905,11 +1816,11 @@ const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
|
|
|
1905
1816
|
return payload;
|
|
1906
1817
|
};
|
|
1907
1818
|
});
|
|
1908
|
-
const $ZodNumberFormat =
|
|
1819
|
+
const $ZodNumberFormat = /*@__PURE__*/ $constructor("$ZodNumberFormat", (inst, def) => {
|
|
1909
1820
|
$ZodCheckNumberFormat.init(inst, def);
|
|
1910
1821
|
$ZodNumber.init(inst, def);
|
|
1911
1822
|
});
|
|
1912
|
-
const $ZodBoolean =
|
|
1823
|
+
const $ZodBoolean = /*@__PURE__*/ $constructor("$ZodBoolean", (inst, def) => {
|
|
1913
1824
|
$ZodType.init(inst, def);
|
|
1914
1825
|
inst._zod.pattern = boolean$1;
|
|
1915
1826
|
inst._zod.parse = (payload, _ctx) => {
|
|
@@ -1927,11 +1838,11 @@ const $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
|
|
|
1927
1838
|
return payload;
|
|
1928
1839
|
};
|
|
1929
1840
|
});
|
|
1930
|
-
const $ZodUnknown =
|
|
1841
|
+
const $ZodUnknown = /*@__PURE__*/ $constructor("$ZodUnknown", (inst, def) => {
|
|
1931
1842
|
$ZodType.init(inst, def);
|
|
1932
1843
|
inst._zod.parse = (payload) => payload;
|
|
1933
1844
|
});
|
|
1934
|
-
const $ZodNever =
|
|
1845
|
+
const $ZodNever = /*@__PURE__*/ $constructor("$ZodNever", (inst, def) => {
|
|
1935
1846
|
$ZodType.init(inst, def);
|
|
1936
1847
|
inst._zod.parse = (payload, _ctx) => {
|
|
1937
1848
|
payload.issues.push({
|
|
@@ -1947,10 +1858,10 @@ function handleArrayResult(result, final, index) {
|
|
|
1947
1858
|
if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
|
|
1948
1859
|
final.value[index] = result.value;
|
|
1949
1860
|
}
|
|
1950
|
-
const $ZodArray =
|
|
1861
|
+
const $ZodArray = /*@__PURE__*/ $constructor("$ZodArray", (inst, def) => {
|
|
1951
1862
|
$ZodType.init(inst, def);
|
|
1952
|
-
const memo
|
|
1953
|
-
memo
|
|
1863
|
+
const memo = globalConfig.memoizer;
|
|
1864
|
+
memo?.attach(inst);
|
|
1954
1865
|
inst._zod.parse = (payload, ctx) => {
|
|
1955
1866
|
const input = payload.value;
|
|
1956
1867
|
if (!Array.isArray(input)) {
|
|
@@ -1962,7 +1873,7 @@ const $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
1962
1873
|
});
|
|
1963
1874
|
return payload;
|
|
1964
1875
|
}
|
|
1965
|
-
payload.value = memo
|
|
1876
|
+
payload.value = memo ? memo.alloc(inst, payload, Array(input.length), ctx) : Array(input.length);
|
|
1966
1877
|
const proms = [];
|
|
1967
1878
|
const abortEarly = ctx?.abortEarly;
|
|
1968
1879
|
for (let i = 0; i < input.length; i++) {
|
|
@@ -1971,7 +1882,7 @@ const $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
1971
1882
|
value: item,
|
|
1972
1883
|
issues: []
|
|
1973
1884
|
}, ctx);
|
|
1974
|
-
if (result instanceof Promise) proms.push(result.then((result
|
|
1885
|
+
if (result instanceof Promise) proms.push(result.then((result) => handleArrayResult(result, payload, i)));
|
|
1975
1886
|
else {
|
|
1976
1887
|
handleArrayResult(result, payload, i);
|
|
1977
1888
|
if (abortEarly && result.issues.length !== 0 && aborted(result)) break;
|
|
@@ -2045,7 +1956,7 @@ function handleCatchall(proms, input, payload, ctx, def, inst, abortEarly) {
|
|
|
2045
1956
|
value: input[key],
|
|
2046
1957
|
issues: []
|
|
2047
1958
|
}, ctx);
|
|
2048
|
-
if (r instanceof Promise) proms.push(r.then((r
|
|
1959
|
+
if (r instanceof Promise) proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout)));
|
|
2049
1960
|
else handlePropertyResult(r, payload, key, input, optin, optout);
|
|
2050
1961
|
}
|
|
2051
1962
|
if (unrecognized.length) payload.issues.push({
|
|
@@ -2060,7 +1971,7 @@ function handleCatchall(proms, input, payload, ctx, def, inst, abortEarly) {
|
|
|
2060
1971
|
return payload;
|
|
2061
1972
|
});
|
|
2062
1973
|
}
|
|
2063
|
-
const $ZodObject =
|
|
1974
|
+
const $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => {
|
|
2064
1975
|
$ZodType.init(inst, def);
|
|
2065
1976
|
const desc = Object.getOwnPropertyDescriptor(def, "shape");
|
|
2066
1977
|
const sh = desc?.get ? desc.get.raw : def.shape ?? {};
|
|
@@ -2088,15 +1999,15 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
2088
1999
|
}
|
|
2089
2000
|
return propValues;
|
|
2090
2001
|
});
|
|
2091
|
-
const isObject$
|
|
2002
|
+
const isObject$2 = isObject;
|
|
2092
2003
|
const catchall = def.catchall;
|
|
2093
2004
|
let value;
|
|
2094
|
-
const memo
|
|
2095
|
-
memo
|
|
2005
|
+
const memo = globalConfig.memoizer;
|
|
2006
|
+
memo?.attach(inst);
|
|
2096
2007
|
inst._zod.parse = (payload, ctx) => {
|
|
2097
2008
|
value ?? (value = _normalized.value);
|
|
2098
2009
|
const input = payload.value;
|
|
2099
|
-
if (!isObject$
|
|
2010
|
+
if (!isObject$2(input)) {
|
|
2100
2011
|
payload.issues.push({
|
|
2101
2012
|
expected: "object",
|
|
2102
2013
|
code: "invalid_type",
|
|
@@ -2105,7 +2016,7 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
2105
2016
|
});
|
|
2106
2017
|
return payload;
|
|
2107
2018
|
}
|
|
2108
|
-
payload.value = memo
|
|
2019
|
+
payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
|
|
2109
2020
|
const proms = [];
|
|
2110
2021
|
const shape = value.shape;
|
|
2111
2022
|
const abortEarly = ctx?.abortEarly;
|
|
@@ -2123,25 +2034,25 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
2123
2034
|
value: input[key],
|
|
2124
2035
|
issues: []
|
|
2125
2036
|
}, ctx);
|
|
2126
|
-
if (r instanceof Promise) proms.push(r.then((r
|
|
2037
|
+
if (r instanceof Promise) proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout)));
|
|
2127
2038
|
else handlePropertyResult(r, payload, key, input, optin, optout);
|
|
2128
2039
|
}
|
|
2129
2040
|
if (!catchall) return proms.length ? Promise.all(proms).then(() => payload) : payload;
|
|
2130
2041
|
return handleCatchall(proms, input, payload, ctx, _normalized.value, inst, abortEarly === true);
|
|
2131
2042
|
};
|
|
2132
2043
|
});
|
|
2133
|
-
const $ZodObjectJIT =
|
|
2044
|
+
const $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) => {
|
|
2134
2045
|
$ZodObject.init(inst, def);
|
|
2135
2046
|
const superParse = inst._zod.parse;
|
|
2136
2047
|
const _normalized = cached(() => normalizeDef(def));
|
|
2137
|
-
const memo
|
|
2048
|
+
const memo = globalConfig.memoizer;
|
|
2138
2049
|
const generateFastpass = (shape) => {
|
|
2139
2050
|
const normalized = _normalized.value;
|
|
2140
2051
|
const syms = normalized.symbolKeys;
|
|
2141
2052
|
const doc = new Doc(["payload", "ctx"], {
|
|
2142
2053
|
shape,
|
|
2143
2054
|
inst,
|
|
2144
|
-
memo
|
|
2055
|
+
memo,
|
|
2145
2056
|
syms
|
|
2146
2057
|
});
|
|
2147
2058
|
const parseStr = (k) => `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
|
|
@@ -2161,7 +2072,7 @@ const $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def)
|
|
|
2161
2072
|
const ids = Object.create(null);
|
|
2162
2073
|
let counter = 0;
|
|
2163
2074
|
for (const key of normalized.allKeys) ids[key] = `key_${counter++}`;
|
|
2164
|
-
doc.write(memo
|
|
2075
|
+
doc.write(memo ? `const newResult = memo.alloc(inst, payload, {}, ctx);` : `const newResult = {};`);
|
|
2165
2076
|
for (const key of normalized.allKeys) {
|
|
2166
2077
|
if (key === "__proto__") continue;
|
|
2167
2078
|
const id = ids[key];
|
|
@@ -2228,8 +2139,7 @@ const $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def)
|
|
|
2228
2139
|
let fastpass;
|
|
2229
2140
|
const isObject$1 = isObject;
|
|
2230
2141
|
const jit = !globalConfig.jitless;
|
|
2231
|
-
const
|
|
2232
|
-
const fastEnabled = jit && allowsEval$1.value;
|
|
2142
|
+
const fastEnabled = jit && allowsEval.value;
|
|
2233
2143
|
const catchall = def.catchall;
|
|
2234
2144
|
let value;
|
|
2235
2145
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -2271,20 +2181,18 @@ function handleUnionResults(results, final, inst, ctx) {
|
|
|
2271
2181
|
});
|
|
2272
2182
|
return final;
|
|
2273
2183
|
}
|
|
2274
|
-
const $ZodUnion =
|
|
2184
|
+
const $ZodUnion = /*@__PURE__*/ $constructor("$ZodUnion", (inst, def) => {
|
|
2275
2185
|
$ZodType.init(inst, def);
|
|
2276
2186
|
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
2187
|
defineLazyInternal(inst, "optout", (zod) => zod.def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0);
|
|
2278
2188
|
defineLazyInternal(inst, "values", (zod) => {
|
|
2279
2189
|
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
2190
|
});
|
|
2282
2191
|
defineLazyInternal(inst, "pattern", (zod) => {
|
|
2283
2192
|
if (zod.def.options.every((o) => o._zod.pattern)) {
|
|
2284
2193
|
const patterns = zod.def.options.map((o) => o._zod.pattern);
|
|
2285
2194
|
return new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`);
|
|
2286
2195
|
}
|
|
2287
|
-
return void 0;
|
|
2288
2196
|
});
|
|
2289
2197
|
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
2290
2198
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -2305,8 +2213,8 @@ const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
|
2305
2213
|
}
|
|
2306
2214
|
}
|
|
2307
2215
|
if (!async) return handleUnionResults(results, payload, inst, ctx);
|
|
2308
|
-
return Promise.all(results).then((results
|
|
2309
|
-
return handleUnionResults(results
|
|
2216
|
+
return Promise.all(results).then((results) => {
|
|
2217
|
+
return handleUnionResults(results, payload, inst, ctx);
|
|
2310
2218
|
});
|
|
2311
2219
|
};
|
|
2312
2220
|
});
|
|
@@ -2322,7 +2230,7 @@ function discriminatorMap(def) {
|
|
|
2322
2230
|
}
|
|
2323
2231
|
return map;
|
|
2324
2232
|
}
|
|
2325
|
-
const $ZodDiscriminatedUnion =
|
|
2233
|
+
const $ZodDiscriminatedUnion = /*@__PURE__*/ $constructor("$ZodDiscriminatedUnion", (inst, def) => {
|
|
2326
2234
|
def.inclusive = false;
|
|
2327
2235
|
$ZodUnion.init(inst, def);
|
|
2328
2236
|
const _super = inst._zod.parse;
|
|
@@ -2366,7 +2274,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
|
|
|
2366
2274
|
errors: [],
|
|
2367
2275
|
note: "No matching discriminator",
|
|
2368
2276
|
discriminator: def.discriminator,
|
|
2369
|
-
options: Array.from(disc.value.keys()).filter((value
|
|
2277
|
+
options: Array.from(disc.value.keys()).filter((value) => disc.value.get(value) !== null),
|
|
2370
2278
|
input,
|
|
2371
2279
|
path: [def.discriminator],
|
|
2372
2280
|
inst
|
|
@@ -2374,7 +2282,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
|
|
|
2374
2282
|
return payload;
|
|
2375
2283
|
};
|
|
2376
2284
|
});
|
|
2377
|
-
const $ZodIntersection =
|
|
2285
|
+
const $ZodIntersection = /*@__PURE__*/ $constructor("$ZodIntersection", (inst, def) => {
|
|
2378
2286
|
$ZodType.init(inst, def);
|
|
2379
2287
|
inst._zod.parse = (payload, ctx) => {
|
|
2380
2288
|
const input = payload.value;
|
|
@@ -2386,9 +2294,8 @@ const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst,
|
|
|
2386
2294
|
value: input,
|
|
2387
2295
|
issues: []
|
|
2388
2296
|
}, ctx);
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
return handleIntersectionResults(payload, left$1, right$1);
|
|
2297
|
+
if (left instanceof Promise || right instanceof Promise) return Promise.all([left, right]).then(([left, right]) => {
|
|
2298
|
+
return handleIntersectionResults(payload, left, right);
|
|
2392
2299
|
});
|
|
2393
2300
|
return handleIntersectionResults(payload, left, right);
|
|
2394
2301
|
};
|
|
@@ -2489,10 +2396,10 @@ function handleIntersectionResults(result, left, right) {
|
|
|
2489
2396
|
result.value = merged.data;
|
|
2490
2397
|
return result;
|
|
2491
2398
|
}
|
|
2492
|
-
const $ZodRecord =
|
|
2399
|
+
const $ZodRecord = /*@__PURE__*/ $constructor("$ZodRecord", (inst, def) => {
|
|
2493
2400
|
$ZodType.init(inst, def);
|
|
2494
|
-
const memo
|
|
2495
|
-
memo
|
|
2401
|
+
const memo = globalConfig.memoizer;
|
|
2402
|
+
memo?.attach(inst);
|
|
2496
2403
|
inst._zod.parse = (payload, ctx) => {
|
|
2497
2404
|
const input = payload.value;
|
|
2498
2405
|
if (!isPlainObject(input)) {
|
|
@@ -2507,7 +2414,7 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
2507
2414
|
const proms = [];
|
|
2508
2415
|
const values = def.keyType._zod.values;
|
|
2509
2416
|
if (values && !def.partial) {
|
|
2510
|
-
payload.value = memo
|
|
2417
|
+
payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
|
|
2511
2418
|
const recordKeys = /* @__PURE__ */ new Set();
|
|
2512
2419
|
for (const key of values) if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
2513
2420
|
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
@@ -2534,9 +2441,9 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
2534
2441
|
value: input[key],
|
|
2535
2442
|
issues: []
|
|
2536
2443
|
}, ctx);
|
|
2537
|
-
if (result instanceof Promise) proms.push(result.then((result
|
|
2538
|
-
if (result
|
|
2539
|
-
payload.value[outKey] = result
|
|
2444
|
+
if (result instanceof Promise) proms.push(result.then((result) => {
|
|
2445
|
+
if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
|
|
2446
|
+
payload.value[outKey] = result.value;
|
|
2540
2447
|
}));
|
|
2541
2448
|
else {
|
|
2542
2449
|
if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
|
|
@@ -2544,12 +2451,14 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
2544
2451
|
}
|
|
2545
2452
|
}
|
|
2546
2453
|
let unrecognized;
|
|
2547
|
-
for (const key in input) if (!recordKeys.has(key))
|
|
2548
|
-
if (
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2454
|
+
for (const key in input) if (!recordKeys.has(key)) {
|
|
2455
|
+
if (def.mode === "loose") {
|
|
2456
|
+
if (key === "__proto__") continue;
|
|
2457
|
+
payload.value[key] = input[key];
|
|
2458
|
+
} else {
|
|
2459
|
+
unrecognized = unrecognized ?? [];
|
|
2460
|
+
unrecognized.push(key);
|
|
2461
|
+
}
|
|
2553
2462
|
}
|
|
2554
2463
|
if (unrecognized && unrecognized.length > 0) payload.issues.push({
|
|
2555
2464
|
code: "unrecognized_keys",
|
|
@@ -2559,7 +2468,7 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
2559
2468
|
continue: true
|
|
2560
2469
|
});
|
|
2561
2470
|
} else {
|
|
2562
|
-
payload.value = memo
|
|
2471
|
+
payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
|
|
2563
2472
|
let unrecognized;
|
|
2564
2473
|
for (const key of Reflect.ownKeys(input)) {
|
|
2565
2474
|
if (key === "__proto__") continue;
|
|
@@ -2569,8 +2478,7 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
2569
2478
|
issues: []
|
|
2570
2479
|
}, ctx);
|
|
2571
2480
|
if (keyResult instanceof Promise) throw new Error("Async schemas not supported in object keys currently");
|
|
2572
|
-
|
|
2573
|
-
if (checkNumericKey) {
|
|
2481
|
+
if (typeof key === "string" && number$1.test(key) && keyResult.issues.length) {
|
|
2574
2482
|
const retryResult = def.keyType._zod.run({
|
|
2575
2483
|
value: Number(key),
|
|
2576
2484
|
issues: []
|
|
@@ -2599,9 +2507,9 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
2599
2507
|
value: input[key],
|
|
2600
2508
|
issues: []
|
|
2601
2509
|
}, ctx);
|
|
2602
|
-
if (result instanceof Promise) proms.push(result.then((result
|
|
2603
|
-
if (result
|
|
2604
|
-
payload.value[outKey] = result
|
|
2510
|
+
if (result instanceof Promise) proms.push(result.then((result) => {
|
|
2511
|
+
if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
|
|
2512
|
+
payload.value[outKey] = result.value;
|
|
2605
2513
|
}));
|
|
2606
2514
|
else {
|
|
2607
2515
|
if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
|
|
@@ -2620,7 +2528,7 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
2620
2528
|
return payload;
|
|
2621
2529
|
};
|
|
2622
2530
|
});
|
|
2623
|
-
const $ZodEnum =
|
|
2531
|
+
const $ZodEnum = /*@__PURE__*/ $constructor("$ZodEnum", (inst, def) => {
|
|
2624
2532
|
$ZodType.init(inst, def);
|
|
2625
2533
|
const values = getEnumValues(def.entries);
|
|
2626
2534
|
const valuesSet = new Set(values);
|
|
@@ -2641,7 +2549,7 @@ const $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
|
|
|
2641
2549
|
return payload;
|
|
2642
2550
|
};
|
|
2643
2551
|
});
|
|
2644
|
-
const $ZodLiteral =
|
|
2552
|
+
const $ZodLiteral = /*@__PURE__*/ $constructor("$ZodLiteral", (inst, def) => {
|
|
2645
2553
|
$ZodType.init(inst, def);
|
|
2646
2554
|
const values = new Set(def.values);
|
|
2647
2555
|
inst._zod.values = values;
|
|
@@ -2661,20 +2569,17 @@ const $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
|
|
|
2661
2569
|
return payload;
|
|
2662
2570
|
};
|
|
2663
2571
|
});
|
|
2664
|
-
const $ZodTransform =
|
|
2572
|
+
const $ZodTransform = /*@__PURE__*/ $constructor("$ZodTransform", (inst, def) => {
|
|
2665
2573
|
$ZodType.init(inst, def);
|
|
2666
2574
|
inst._zod.optin = "optional";
|
|
2667
|
-
globalConfig.memoizer
|
|
2575
|
+
globalConfig.memoizer?.guard(inst);
|
|
2668
2576
|
inst._zod.parse = (payload, ctx) => {
|
|
2669
2577
|
if (ctx.direction === "backward") throw new $ZodEncodeError(inst.constructor.name);
|
|
2670
2578
|
const _out = def.transform(payload.value, payload);
|
|
2671
|
-
if (ctx.async) {
|
|
2672
|
-
|
|
2673
|
-
return
|
|
2674
|
-
|
|
2675
|
-
return payload;
|
|
2676
|
-
});
|
|
2677
|
-
}
|
|
2579
|
+
if (ctx.async) return (_out instanceof Promise ? _out : Promise.resolve(_out)).then((output) => {
|
|
2580
|
+
payload.value = output;
|
|
2581
|
+
return payload;
|
|
2582
|
+
});
|
|
2678
2583
|
if (_out instanceof Promise) throw new $ZodAsyncError();
|
|
2679
2584
|
payload.value = _out;
|
|
2680
2585
|
return payload;
|
|
@@ -2684,13 +2589,13 @@ function handleOptionalResult(payload, result) {
|
|
|
2684
2589
|
payload.value = result.issues.length ? void 0 : result.value;
|
|
2685
2590
|
return payload;
|
|
2686
2591
|
}
|
|
2687
|
-
const $ZodOptional =
|
|
2592
|
+
const $ZodOptional = /*@__PURE__*/ $constructor("$ZodOptional", (inst, def) => {
|
|
2688
2593
|
$ZodType.init(inst, def);
|
|
2689
2594
|
defineLazyInternal(inst, "optin", (zod) => zod.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional");
|
|
2690
2595
|
inst._zod.optout = "optional";
|
|
2691
2596
|
defineLazyInternal(inst, "values", (zod) => {
|
|
2692
2597
|
const values = zod.def.innerType._zod.values;
|
|
2693
|
-
return values ? new Set([...values, void 0]) : void 0;
|
|
2598
|
+
return values ? /* @__PURE__ */ new Set([...values, void 0]) : void 0;
|
|
2694
2599
|
});
|
|
2695
2600
|
defineLazyInternal(inst, "pattern", (zod) => {
|
|
2696
2601
|
const pattern = zod.def.innerType._zod.pattern;
|
|
@@ -2703,13 +2608,13 @@ const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) =>
|
|
|
2703
2608
|
value: payload.value,
|
|
2704
2609
|
issues: []
|
|
2705
2610
|
}, ctx);
|
|
2706
|
-
if (result instanceof Promise) return result.then((result
|
|
2611
|
+
if (result instanceof Promise) return result.then((result) => handleOptionalResult(payload, result));
|
|
2707
2612
|
return handleOptionalResult(payload, result);
|
|
2708
2613
|
}
|
|
2709
2614
|
return def.innerType._zod.run(payload, ctx);
|
|
2710
2615
|
};
|
|
2711
2616
|
});
|
|
2712
|
-
const $ZodExactOptional =
|
|
2617
|
+
const $ZodExactOptional = /*@__PURE__*/ $constructor("$ZodExactOptional", (inst, def) => {
|
|
2713
2618
|
$ZodOptional.init(inst, def);
|
|
2714
2619
|
defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
|
|
2715
2620
|
defineLazyInternal(inst, "pattern", (zod) => zod.def.innerType._zod.pattern);
|
|
@@ -2717,7 +2622,7 @@ const $ZodExactOptional = /* @__PURE__ */ $constructor("$ZodExactOptional", (ins
|
|
|
2717
2622
|
return def.innerType._zod.run(payload, ctx);
|
|
2718
2623
|
};
|
|
2719
2624
|
});
|
|
2720
|
-
const $ZodNullable =
|
|
2625
|
+
const $ZodNullable = /*@__PURE__*/ $constructor("$ZodNullable", (inst, def) => {
|
|
2721
2626
|
$ZodType.init(inst, def);
|
|
2722
2627
|
defineLazyInternal(inst, "optin", (zod) => zod.def.innerType._zod.optin);
|
|
2723
2628
|
defineLazyInternal(inst, "optout", (zod) => zod.def.innerType._zod.optout);
|
|
@@ -2726,14 +2631,14 @@ const $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) =>
|
|
|
2726
2631
|
return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0;
|
|
2727
2632
|
});
|
|
2728
2633
|
defineLazyInternal(inst, "values", (zod) => {
|
|
2729
|
-
return zod.def.innerType._zod.values ? new Set([...zod.def.innerType._zod.values, null]) : void 0;
|
|
2634
|
+
return zod.def.innerType._zod.values ? /* @__PURE__ */ new Set([...zod.def.innerType._zod.values, null]) : void 0;
|
|
2730
2635
|
});
|
|
2731
2636
|
inst._zod.parse = (payload, ctx) => {
|
|
2732
2637
|
if (payload.value === null) return payload;
|
|
2733
2638
|
return def.innerType._zod.run(payload, ctx);
|
|
2734
2639
|
};
|
|
2735
2640
|
});
|
|
2736
|
-
const $ZodDefault =
|
|
2641
|
+
const $ZodDefault = /*@__PURE__*/ $constructor("$ZodDefault", (inst, def) => {
|
|
2737
2642
|
$ZodType.init(inst, def);
|
|
2738
2643
|
inst._zod.optin = "defaulted";
|
|
2739
2644
|
defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
|
|
@@ -2747,7 +2652,7 @@ const $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => {
|
|
|
2747
2652
|
return payload;
|
|
2748
2653
|
}
|
|
2749
2654
|
const result = def.innerType._zod.run(payload, ctx);
|
|
2750
|
-
if (result instanceof Promise) return result.then((result
|
|
2655
|
+
if (result instanceof Promise) return result.then((result) => handleDefaultResult(result, def));
|
|
2751
2656
|
return handleDefaultResult(result, def);
|
|
2752
2657
|
};
|
|
2753
2658
|
});
|
|
@@ -2755,7 +2660,7 @@ function handleDefaultResult(payload, def) {
|
|
|
2755
2660
|
if (payload.value === void 0) payload.value = def.defaultValue;
|
|
2756
2661
|
return payload;
|
|
2757
2662
|
}
|
|
2758
|
-
const $ZodPrefault =
|
|
2663
|
+
const $ZodPrefault = /*@__PURE__*/ $constructor("$ZodPrefault", (inst, def) => {
|
|
2759
2664
|
$ZodType.init(inst, def);
|
|
2760
2665
|
inst._zod.optin = "defaulted";
|
|
2761
2666
|
defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
|
|
@@ -2765,7 +2670,7 @@ const $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) =>
|
|
|
2765
2670
|
return def.innerType._zod.run(payload, ctx);
|
|
2766
2671
|
};
|
|
2767
2672
|
});
|
|
2768
|
-
const $ZodNonOptional =
|
|
2673
|
+
const $ZodNonOptional = /*@__PURE__*/ $constructor("$ZodNonOptional", (inst, def) => {
|
|
2769
2674
|
$ZodType.init(inst, def);
|
|
2770
2675
|
defineLazyInternal(inst, "values", (zod) => {
|
|
2771
2676
|
const v = zod.def.innerType._zod.values;
|
|
@@ -2773,7 +2678,7 @@ const $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, d
|
|
|
2773
2678
|
});
|
|
2774
2679
|
inst._zod.parse = (payload, ctx) => {
|
|
2775
2680
|
const result = def.innerType._zod.run(payload, ctx);
|
|
2776
|
-
if (result instanceof Promise) return result.then((result
|
|
2681
|
+
if (result instanceof Promise) return result.then((result) => handleNonOptionalResult(result, inst));
|
|
2777
2682
|
return handleNonOptionalResult(result, inst);
|
|
2778
2683
|
};
|
|
2779
2684
|
});
|
|
@@ -2800,7 +2705,7 @@ function handleCatchResult(payload, result, def, ctx) {
|
|
|
2800
2705
|
});
|
|
2801
2706
|
return payload;
|
|
2802
2707
|
}
|
|
2803
|
-
const $ZodCatch =
|
|
2708
|
+
const $ZodCatch = /*@__PURE__*/ $constructor("$ZodCatch", (inst, def) => {
|
|
2804
2709
|
$ZodType.init(inst, def);
|
|
2805
2710
|
defineLazyInternal(inst, "optin", (zod) => zod.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional");
|
|
2806
2711
|
defineLazyInternal(inst, "optout", (zod) => zod.def.innerType._zod.optout);
|
|
@@ -2811,11 +2716,11 @@ const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
|
2811
2716
|
value: payload.value,
|
|
2812
2717
|
issues: []
|
|
2813
2718
|
}, ctx);
|
|
2814
|
-
if (result instanceof Promise) return result.then((result
|
|
2719
|
+
if (result instanceof Promise) return result.then((result) => handleCatchResult(payload, result, def, ctx));
|
|
2815
2720
|
return handleCatchResult(payload, result, def, ctx);
|
|
2816
2721
|
};
|
|
2817
2722
|
});
|
|
2818
|
-
const $ZodPipe =
|
|
2723
|
+
const $ZodPipe = /*@__PURE__*/ $constructor("$ZodPipe", (inst, def) => {
|
|
2819
2724
|
$ZodType.init(inst, def);
|
|
2820
2725
|
defineLazyInternal(inst, "values", (zod) => zod.def.in._zod.values);
|
|
2821
2726
|
defineLazyInternal(inst, "optin", (zod) => zod.def.in._zod.optin);
|
|
@@ -2824,11 +2729,11 @@ const $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => {
|
|
|
2824
2729
|
inst._zod.parse = (payload, ctx) => {
|
|
2825
2730
|
if (ctx.direction === "backward") {
|
|
2826
2731
|
const right = def.out._zod.run(payload, ctx);
|
|
2827
|
-
if (right instanceof Promise) return right.then((right
|
|
2732
|
+
if (right instanceof Promise) return right.then((right) => handlePipeResult(right, def.in, ctx));
|
|
2828
2733
|
return handlePipeResult(right, def.in, ctx);
|
|
2829
2734
|
}
|
|
2830
2735
|
const left = def.in._zod.run(payload, ctx);
|
|
2831
|
-
if (left instanceof Promise) return left.then((left
|
|
2736
|
+
if (left instanceof Promise) return left.then((left) => handlePipeResult(left, def.out, ctx));
|
|
2832
2737
|
return handlePipeResult(left, def.out, ctx);
|
|
2833
2738
|
};
|
|
2834
2739
|
});
|
|
@@ -2842,7 +2747,7 @@ function handlePipeResult(left, next, ctx) {
|
|
|
2842
2747
|
issues: left.issues
|
|
2843
2748
|
}, ctx);
|
|
2844
2749
|
}
|
|
2845
|
-
const $ZodReadonly =
|
|
2750
|
+
const $ZodReadonly = /*@__PURE__*/ $constructor("$ZodReadonly", (inst, def) => {
|
|
2846
2751
|
$ZodType.init(inst, def);
|
|
2847
2752
|
defineLazyInternal(inst, "propValues", (zod) => zod.def.innerType._zod.propValues);
|
|
2848
2753
|
defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
|
|
@@ -2859,7 +2764,7 @@ function handleReadonlyResult(payload) {
|
|
|
2859
2764
|
if (!payload.memo) payload.value = Object.freeze(payload.value);
|
|
2860
2765
|
return payload;
|
|
2861
2766
|
}
|
|
2862
|
-
const $ZodCustom =
|
|
2767
|
+
const $ZodCustom = /*@__PURE__*/ $constructor("$ZodCustom", (inst, def) => {
|
|
2863
2768
|
$ZodCheck.init(inst, def);
|
|
2864
2769
|
$ZodType.init(inst, def);
|
|
2865
2770
|
inst._zod.parse = (payload, _) => {
|
|
@@ -2868,9 +2773,8 @@ const $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
|
|
|
2868
2773
|
inst._zod.check = (payload) => {
|
|
2869
2774
|
const input = payload.value;
|
|
2870
2775
|
const r = def.fn(input);
|
|
2871
|
-
if (r instanceof Promise) return r.then((r
|
|
2776
|
+
if (r instanceof Promise) return r.then((r) => handleRefineResult(r, payload, input, inst));
|
|
2872
2777
|
handleRefineResult(r, payload, input, inst);
|
|
2873
|
-
return;
|
|
2874
2778
|
};
|
|
2875
2779
|
});
|
|
2876
2780
|
function handleRefineResult(result, payload, input, inst) {
|
|
@@ -2886,7 +2790,6 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
2886
2790
|
payload.issues.push(issue(_iss));
|
|
2887
2791
|
}
|
|
2888
2792
|
}
|
|
2889
|
-
|
|
2890
2793
|
//#endregion
|
|
2891
2794
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/memoizer.js
|
|
2892
2795
|
var $ZodCyclicError = class extends Error {
|
|
@@ -2907,21 +2810,21 @@ function cloneIssues(issues) {
|
|
|
2907
2810
|
path: iss.path.slice()
|
|
2908
2811
|
} : { ...iss });
|
|
2909
2812
|
}
|
|
2910
|
-
const recursive =
|
|
2813
|
+
const recursive = /*@__PURE__*/ new WeakMap();
|
|
2911
2814
|
/** What the walk established, in order of certainty: ordered so the strongest answer among children wins. */
|
|
2912
2815
|
const NONE = 0;
|
|
2913
2816
|
const ASSUMED = 1;
|
|
2914
2817
|
const PROVEN = 2;
|
|
2915
2818
|
/** Whether this schema's subtree contains a cycle, so one parse can re-enter it. */
|
|
2916
|
-
function isRecursive(inst, stack, resolve
|
|
2917
|
-
const cached
|
|
2918
|
-
if (cached
|
|
2819
|
+
function isRecursive(inst, stack, resolve) {
|
|
2820
|
+
const cached = recursive.get(inst);
|
|
2821
|
+
if (cached !== void 0) return cached ? PROVEN : NONE;
|
|
2919
2822
|
if (stack.has(inst)) return PROVEN;
|
|
2920
2823
|
stack.add(inst);
|
|
2921
2824
|
let result = NONE;
|
|
2922
2825
|
const check = (child) => {
|
|
2923
2826
|
if (result !== PROVEN && child?._zod) {
|
|
2924
|
-
const answer = isRecursive(child, stack, resolve
|
|
2827
|
+
const answer = isRecursive(child, stack, resolve);
|
|
2925
2828
|
if (answer > result) result = answer;
|
|
2926
2829
|
}
|
|
2927
2830
|
};
|
|
@@ -2930,20 +2833,19 @@ function isRecursive(inst, stack, resolve$1) {
|
|
|
2930
2833
|
for (const key of Reflect.ownKeys(sh)) {
|
|
2931
2834
|
const desc = Object.getOwnPropertyDescriptor(sh, key);
|
|
2932
2835
|
if (spread && !desc.enumerable) continue;
|
|
2933
|
-
const child = desc.get ? ASSUMED : desc.value?._zod ? isRecursive(desc.value, stack, resolve
|
|
2836
|
+
const child = desc.get ? ASSUMED : desc.value?._zod ? isRecursive(desc.value, stack, resolve) : NONE;
|
|
2934
2837
|
if (child > answer) answer = child;
|
|
2935
2838
|
}
|
|
2936
2839
|
return answer;
|
|
2937
2840
|
};
|
|
2938
|
-
const merge
|
|
2841
|
+
const merge = (answer) => {
|
|
2939
2842
|
if (answer > result) result = answer;
|
|
2940
2843
|
};
|
|
2941
2844
|
const def = inst._zod.def;
|
|
2942
|
-
|
|
2943
|
-
switch (kind) {
|
|
2845
|
+
switch (def.type) {
|
|
2944
2846
|
case "object": {
|
|
2945
2847
|
const raw = rawShape(def);
|
|
2946
|
-
merge
|
|
2848
|
+
merge(raw ? shape(raw, true) : ASSUMED);
|
|
2947
2849
|
check(def.catchall);
|
|
2948
2850
|
break;
|
|
2949
2851
|
}
|
|
@@ -2989,8 +2891,8 @@ function isRecursive(inst, stack, resolve$1) {
|
|
|
2989
2891
|
check(def.output);
|
|
2990
2892
|
break;
|
|
2991
2893
|
case "lazy": {
|
|
2992
|
-
const inner = def._cachedInner ?? (resolve
|
|
2993
|
-
merge
|
|
2894
|
+
const inner = def._cachedInner ?? (resolve ? inst._zod.innerType : void 0);
|
|
2895
|
+
merge(inner ? isRecursive(inner, stack, false) : ASSUMED);
|
|
2994
2896
|
break;
|
|
2995
2897
|
}
|
|
2996
2898
|
case "template_literal":
|
|
@@ -3054,8 +2956,8 @@ const memo = {
|
|
|
3054
2956
|
return empty;
|
|
3055
2957
|
},
|
|
3056
2958
|
guard(inst) {
|
|
3057
|
-
var _a
|
|
3058
|
-
(_a
|
|
2959
|
+
var _a;
|
|
2960
|
+
(_a = inst._zod).deferred ?? (_a.deferred = []);
|
|
3059
2961
|
inst._zod.deferred.push(() => {
|
|
3060
2962
|
const base = inst._zod.parse;
|
|
3061
2963
|
const wrapped = (payload, ctx) => {
|
|
@@ -3067,12 +2969,12 @@ const memo = {
|
|
|
3067
2969
|
});
|
|
3068
2970
|
},
|
|
3069
2971
|
attach(inst) {
|
|
3070
|
-
var _a
|
|
2972
|
+
var _a;
|
|
3071
2973
|
let isRecursiveInst;
|
|
3072
2974
|
let rechecked = false;
|
|
3073
2975
|
let lastCtx;
|
|
3074
2976
|
let lastBucket;
|
|
3075
|
-
(_a
|
|
2977
|
+
(_a = inst._zod).deferred ?? (_a.deferred = []);
|
|
3076
2978
|
inst._zod.deferred.push(() => {
|
|
3077
2979
|
const base = inst._zod.parse;
|
|
3078
2980
|
const wrapped = (payload, ctx) => {
|
|
@@ -3141,7 +3043,6 @@ function isBackEdge(ctx, value) {
|
|
|
3141
3043
|
const backEdges = ctx[STATE]?.backEdges;
|
|
3142
3044
|
return backEdges !== void 0 && isRef(value) && backEdges.has(value);
|
|
3143
3045
|
}
|
|
3144
|
-
|
|
3145
3046
|
//#endregion
|
|
3146
3047
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/en.js
|
|
3147
3048
|
const error = () => {
|
|
@@ -3209,48 +3110,40 @@ const error = () => {
|
|
|
3209
3110
|
if (type === "number" && typeof input === "number" && !Number.isFinite(input)) return String(input);
|
|
3210
3111
|
return TypeDictionary[type] ?? type;
|
|
3211
3112
|
}
|
|
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
|
-
}
|
|
3113
|
+
return (issue) => {
|
|
3114
|
+
switch (issue.code) {
|
|
3115
|
+
case "invalid_type": return `Invalid input: expected ${getTypeName(issue.expected)}, received ${getTypeName(parsedType(issue.input), issue.input)}`;
|
|
3220
3116
|
case "invalid_value":
|
|
3221
|
-
if (issue
|
|
3222
|
-
return `Invalid option: expected one of ${joinValues(issue
|
|
3117
|
+
if (issue.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue.values[0])}`;
|
|
3118
|
+
return `Invalid option: expected one of ${joinValues(issue.values, "|")}`;
|
|
3223
3119
|
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
|
|
3120
|
+
const adj = issue.exact ? "exactly " : issue.inclusive ? "<=" : "<";
|
|
3121
|
+
const sizing = getSizing(issue.origin);
|
|
3122
|
+
if (sizing) return `Too big: expected ${issue.origin ?? "value"} to have ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elements"}`;
|
|
3123
|
+
return `Too big: expected ${issue.origin ?? "value"} to be ${adj}${issue.maximum.toString()}`;
|
|
3228
3124
|
}
|
|
3229
3125
|
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
|
|
3126
|
+
const adj = issue.exact ? "exactly " : issue.inclusive ? ">=" : ">";
|
|
3127
|
+
const sizing = getSizing(issue.origin);
|
|
3128
|
+
if (sizing) return `Too small: expected ${issue.origin} to have ${adj}${issue.minimum.toString()} ${sizing.unit}`;
|
|
3129
|
+
return `Too small: expected ${issue.origin} to be ${adj}${issue.minimum.toString()}`;
|
|
3234
3130
|
}
|
|
3235
3131
|
case "invalid_format": {
|
|
3236
|
-
const _issue = issue
|
|
3132
|
+
const _issue = issue;
|
|
3237
3133
|
if (_issue.format === "starts_with") return `Invalid string: must start with "${_issue.prefix}"`;
|
|
3238
3134
|
if (_issue.format === "ends_with") return `Invalid string: must end with "${_issue.suffix}"`;
|
|
3239
3135
|
if (_issue.format === "includes") return `Invalid string: must include "${_issue.includes}"`;
|
|
3240
3136
|
if (_issue.format === "regex") return `Invalid string: must match pattern ${_issue.pattern}`;
|
|
3241
|
-
return `Invalid ${FormatDictionary[_issue.format] ?? issue
|
|
3137
|
+
return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;
|
|
3242
3138
|
}
|
|
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
|
|
3139
|
+
case "not_multiple_of": return `Invalid number: must be a multiple of ${issue.divisor}`;
|
|
3140
|
+
case "unrecognized_keys": return `Unrecognized key${issue.keys.length > 1 ? "s" : ""}: ${joinValues(issue.keys, ", ")}`;
|
|
3141
|
+
case "invalid_key": return `Invalid key in ${issue.origin}`;
|
|
3246
3142
|
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";
|
|
3143
|
+
if (issue.options && Array.isArray(issue.options) && issue.options.length > 0) return `Invalid discriminator value. Expected ${issue.options.map((o) => `'${o}'`).join(" | ")}`;
|
|
3144
|
+
if (issue.inclusive === false) return "Invalid input: more than one option matched";
|
|
3252
3145
|
return "Invalid input";
|
|
3253
|
-
case "invalid_element": return `Invalid value in ${issue
|
|
3146
|
+
case "invalid_element": return `Invalid value in ${issue.origin}`;
|
|
3254
3147
|
default: return `Invalid input`;
|
|
3255
3148
|
}
|
|
3256
3149
|
};
|
|
@@ -3258,7 +3151,6 @@ const error = () => {
|
|
|
3258
3151
|
function en_default() {
|
|
3259
3152
|
return { localeError: error() };
|
|
3260
3153
|
}
|
|
3261
|
-
|
|
3262
3154
|
//#endregion
|
|
3263
3155
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/registries.js
|
|
3264
3156
|
var _a;
|
|
@@ -3268,9 +3160,9 @@ var $ZodRegistry = class {
|
|
|
3268
3160
|
this._idmap = /* @__PURE__ */ new Map();
|
|
3269
3161
|
}
|
|
3270
3162
|
add(schema, ..._meta) {
|
|
3271
|
-
const meta
|
|
3272
|
-
this._map.set(schema, meta
|
|
3273
|
-
if (meta
|
|
3163
|
+
const meta = _meta[0];
|
|
3164
|
+
this._map.set(schema, meta);
|
|
3165
|
+
if (meta && typeof meta === "object" && "id" in meta) this._idmap.set(meta.id, schema);
|
|
3274
3166
|
return this;
|
|
3275
3167
|
}
|
|
3276
3168
|
clear() {
|
|
@@ -3279,8 +3171,8 @@ var $ZodRegistry = class {
|
|
|
3279
3171
|
return this;
|
|
3280
3172
|
}
|
|
3281
3173
|
remove(schema) {
|
|
3282
|
-
const meta
|
|
3283
|
-
if (meta
|
|
3174
|
+
const meta = this._map.get(schema);
|
|
3175
|
+
if (meta && typeof meta === "object" && "id" in meta) this._idmap.delete(meta.id);
|
|
3284
3176
|
this._map.delete(schema);
|
|
3285
3177
|
return this;
|
|
3286
3178
|
}
|
|
@@ -3306,21 +3198,20 @@ function registry() {
|
|
|
3306
3198
|
}
|
|
3307
3199
|
(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
|
|
3308
3200
|
const globalRegistry = globalThis.__zod_globalRegistry;
|
|
3309
|
-
|
|
3310
3201
|
//#endregion
|
|
3311
3202
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/api.js
|
|
3312
3203
|
function snapshotChecks(def) {
|
|
3313
3204
|
if (def.checks) def.checks = [...def.checks];
|
|
3314
3205
|
return def;
|
|
3315
3206
|
}
|
|
3316
|
-
|
|
3207
|
+
// @__NO_SIDE_EFFECTS__
|
|
3317
3208
|
function _string(Class, params) {
|
|
3318
3209
|
return new Class(snapshotChecks({
|
|
3319
3210
|
type: "string",
|
|
3320
3211
|
...normalizeParams(params)
|
|
3321
3212
|
}));
|
|
3322
3213
|
}
|
|
3323
|
-
|
|
3214
|
+
// @__NO_SIDE_EFFECTS__
|
|
3324
3215
|
function _email(Class, params) {
|
|
3325
3216
|
return new Class({
|
|
3326
3217
|
type: "string",
|
|
@@ -3330,7 +3221,7 @@ function _email(Class, params) {
|
|
|
3330
3221
|
...normalizeParams(params)
|
|
3331
3222
|
});
|
|
3332
3223
|
}
|
|
3333
|
-
|
|
3224
|
+
// @__NO_SIDE_EFFECTS__
|
|
3334
3225
|
function _guid(Class, params) {
|
|
3335
3226
|
return new Class({
|
|
3336
3227
|
type: "string",
|
|
@@ -3340,7 +3231,7 @@ function _guid(Class, params) {
|
|
|
3340
3231
|
...normalizeParams(params)
|
|
3341
3232
|
});
|
|
3342
3233
|
}
|
|
3343
|
-
|
|
3234
|
+
// @__NO_SIDE_EFFECTS__
|
|
3344
3235
|
function _uuid(Class, params) {
|
|
3345
3236
|
return new Class({
|
|
3346
3237
|
type: "string",
|
|
@@ -3350,7 +3241,7 @@ function _uuid(Class, params) {
|
|
|
3350
3241
|
...normalizeParams(params)
|
|
3351
3242
|
});
|
|
3352
3243
|
}
|
|
3353
|
-
|
|
3244
|
+
// @__NO_SIDE_EFFECTS__
|
|
3354
3245
|
function _uuidv4(Class, params) {
|
|
3355
3246
|
return new Class({
|
|
3356
3247
|
type: "string",
|
|
@@ -3361,7 +3252,7 @@ function _uuidv4(Class, params) {
|
|
|
3361
3252
|
...normalizeParams(params)
|
|
3362
3253
|
});
|
|
3363
3254
|
}
|
|
3364
|
-
|
|
3255
|
+
// @__NO_SIDE_EFFECTS__
|
|
3365
3256
|
function _uuidv6(Class, params) {
|
|
3366
3257
|
return new Class({
|
|
3367
3258
|
type: "string",
|
|
@@ -3372,7 +3263,7 @@ function _uuidv6(Class, params) {
|
|
|
3372
3263
|
...normalizeParams(params)
|
|
3373
3264
|
});
|
|
3374
3265
|
}
|
|
3375
|
-
|
|
3266
|
+
// @__NO_SIDE_EFFECTS__
|
|
3376
3267
|
function _uuidv7(Class, params) {
|
|
3377
3268
|
return new Class({
|
|
3378
3269
|
type: "string",
|
|
@@ -3383,7 +3274,7 @@ function _uuidv7(Class, params) {
|
|
|
3383
3274
|
...normalizeParams(params)
|
|
3384
3275
|
});
|
|
3385
3276
|
}
|
|
3386
|
-
|
|
3277
|
+
// @__NO_SIDE_EFFECTS__
|
|
3387
3278
|
function _url(Class, params) {
|
|
3388
3279
|
return new Class({
|
|
3389
3280
|
type: "string",
|
|
@@ -3393,7 +3284,7 @@ function _url(Class, params) {
|
|
|
3393
3284
|
...normalizeParams(params)
|
|
3394
3285
|
});
|
|
3395
3286
|
}
|
|
3396
|
-
|
|
3287
|
+
// @__NO_SIDE_EFFECTS__
|
|
3397
3288
|
function _emoji(Class, params) {
|
|
3398
3289
|
return new Class({
|
|
3399
3290
|
type: "string",
|
|
@@ -3403,7 +3294,7 @@ function _emoji(Class, params) {
|
|
|
3403
3294
|
...normalizeParams(params)
|
|
3404
3295
|
});
|
|
3405
3296
|
}
|
|
3406
|
-
|
|
3297
|
+
// @__NO_SIDE_EFFECTS__
|
|
3407
3298
|
function _nanoid(Class, params) {
|
|
3408
3299
|
return new Class({
|
|
3409
3300
|
type: "string",
|
|
@@ -3418,7 +3309,7 @@ function _nanoid(Class, params) {
|
|
|
3418
3309
|
* (timestamps embedded in the id). Use {@link _cuid2} instead.
|
|
3419
3310
|
* See https://github.com/paralleldrive/cuid.
|
|
3420
3311
|
*/
|
|
3421
|
-
|
|
3312
|
+
// @__NO_SIDE_EFFECTS__
|
|
3422
3313
|
function _cuid(Class, params) {
|
|
3423
3314
|
return new Class({
|
|
3424
3315
|
type: "string",
|
|
@@ -3428,7 +3319,7 @@ function _cuid(Class, params) {
|
|
|
3428
3319
|
...normalizeParams(params)
|
|
3429
3320
|
});
|
|
3430
3321
|
}
|
|
3431
|
-
|
|
3322
|
+
// @__NO_SIDE_EFFECTS__
|
|
3432
3323
|
function _cuid2(Class, params) {
|
|
3433
3324
|
return new Class({
|
|
3434
3325
|
type: "string",
|
|
@@ -3438,7 +3329,7 @@ function _cuid2(Class, params) {
|
|
|
3438
3329
|
...normalizeParams(params)
|
|
3439
3330
|
});
|
|
3440
3331
|
}
|
|
3441
|
-
|
|
3332
|
+
// @__NO_SIDE_EFFECTS__
|
|
3442
3333
|
function _ulid(Class, params) {
|
|
3443
3334
|
return new Class({
|
|
3444
3335
|
type: "string",
|
|
@@ -3448,7 +3339,7 @@ function _ulid(Class, params) {
|
|
|
3448
3339
|
...normalizeParams(params)
|
|
3449
3340
|
});
|
|
3450
3341
|
}
|
|
3451
|
-
|
|
3342
|
+
// @__NO_SIDE_EFFECTS__
|
|
3452
3343
|
function _xid(Class, params) {
|
|
3453
3344
|
return new Class({
|
|
3454
3345
|
type: "string",
|
|
@@ -3458,7 +3349,7 @@ function _xid(Class, params) {
|
|
|
3458
3349
|
...normalizeParams(params)
|
|
3459
3350
|
});
|
|
3460
3351
|
}
|
|
3461
|
-
|
|
3352
|
+
// @__NO_SIDE_EFFECTS__
|
|
3462
3353
|
function _ksuid(Class, params) {
|
|
3463
3354
|
return new Class({
|
|
3464
3355
|
type: "string",
|
|
@@ -3468,7 +3359,7 @@ function _ksuid(Class, params) {
|
|
|
3468
3359
|
...normalizeParams(params)
|
|
3469
3360
|
});
|
|
3470
3361
|
}
|
|
3471
|
-
|
|
3362
|
+
// @__NO_SIDE_EFFECTS__
|
|
3472
3363
|
function _ipv4(Class, params) {
|
|
3473
3364
|
return new Class({
|
|
3474
3365
|
type: "string",
|
|
@@ -3478,7 +3369,7 @@ function _ipv4(Class, params) {
|
|
|
3478
3369
|
...normalizeParams(params)
|
|
3479
3370
|
});
|
|
3480
3371
|
}
|
|
3481
|
-
|
|
3372
|
+
// @__NO_SIDE_EFFECTS__
|
|
3482
3373
|
function _ipv6(Class, params) {
|
|
3483
3374
|
return new Class({
|
|
3484
3375
|
type: "string",
|
|
@@ -3488,7 +3379,7 @@ function _ipv6(Class, params) {
|
|
|
3488
3379
|
...normalizeParams(params)
|
|
3489
3380
|
});
|
|
3490
3381
|
}
|
|
3491
|
-
|
|
3382
|
+
// @__NO_SIDE_EFFECTS__
|
|
3492
3383
|
function _cidrv4(Class, params) {
|
|
3493
3384
|
return new Class({
|
|
3494
3385
|
type: "string",
|
|
@@ -3498,7 +3389,7 @@ function _cidrv4(Class, params) {
|
|
|
3498
3389
|
...normalizeParams(params)
|
|
3499
3390
|
});
|
|
3500
3391
|
}
|
|
3501
|
-
|
|
3392
|
+
// @__NO_SIDE_EFFECTS__
|
|
3502
3393
|
function _cidrv6(Class, params) {
|
|
3503
3394
|
return new Class({
|
|
3504
3395
|
type: "string",
|
|
@@ -3508,7 +3399,7 @@ function _cidrv6(Class, params) {
|
|
|
3508
3399
|
...normalizeParams(params)
|
|
3509
3400
|
});
|
|
3510
3401
|
}
|
|
3511
|
-
|
|
3402
|
+
// @__NO_SIDE_EFFECTS__
|
|
3512
3403
|
function _base64(Class, params) {
|
|
3513
3404
|
return new Class({
|
|
3514
3405
|
type: "string",
|
|
@@ -3518,7 +3409,7 @@ function _base64(Class, params) {
|
|
|
3518
3409
|
...normalizeParams(params)
|
|
3519
3410
|
});
|
|
3520
3411
|
}
|
|
3521
|
-
|
|
3412
|
+
// @__NO_SIDE_EFFECTS__
|
|
3522
3413
|
function _base64url(Class, params) {
|
|
3523
3414
|
return new Class({
|
|
3524
3415
|
type: "string",
|
|
@@ -3528,7 +3419,7 @@ function _base64url(Class, params) {
|
|
|
3528
3419
|
...normalizeParams(params)
|
|
3529
3420
|
});
|
|
3530
3421
|
}
|
|
3531
|
-
|
|
3422
|
+
// @__NO_SIDE_EFFECTS__
|
|
3532
3423
|
function _e164(Class, params) {
|
|
3533
3424
|
return new Class({
|
|
3534
3425
|
type: "string",
|
|
@@ -3538,7 +3429,7 @@ function _e164(Class, params) {
|
|
|
3538
3429
|
...normalizeParams(params)
|
|
3539
3430
|
});
|
|
3540
3431
|
}
|
|
3541
|
-
|
|
3432
|
+
// @__NO_SIDE_EFFECTS__
|
|
3542
3433
|
function _jwt(Class, params) {
|
|
3543
3434
|
return new Class({
|
|
3544
3435
|
type: "string",
|
|
@@ -3548,7 +3439,7 @@ function _jwt(Class, params) {
|
|
|
3548
3439
|
...normalizeParams(params)
|
|
3549
3440
|
});
|
|
3550
3441
|
}
|
|
3551
|
-
|
|
3442
|
+
// @__NO_SIDE_EFFECTS__
|
|
3552
3443
|
function _isoDateTime(Class, params) {
|
|
3553
3444
|
return new Class({
|
|
3554
3445
|
type: "string",
|
|
@@ -3560,7 +3451,7 @@ function _isoDateTime(Class, params) {
|
|
|
3560
3451
|
...normalizeParams(params)
|
|
3561
3452
|
});
|
|
3562
3453
|
}
|
|
3563
|
-
|
|
3454
|
+
// @__NO_SIDE_EFFECTS__
|
|
3564
3455
|
function _isoDate(Class, params) {
|
|
3565
3456
|
return new Class({
|
|
3566
3457
|
type: "string",
|
|
@@ -3569,7 +3460,7 @@ function _isoDate(Class, params) {
|
|
|
3569
3460
|
...normalizeParams(params)
|
|
3570
3461
|
});
|
|
3571
3462
|
}
|
|
3572
|
-
|
|
3463
|
+
// @__NO_SIDE_EFFECTS__
|
|
3573
3464
|
function _isoTime(Class, params) {
|
|
3574
3465
|
return new Class({
|
|
3575
3466
|
type: "string",
|
|
@@ -3579,7 +3470,7 @@ function _isoTime(Class, params) {
|
|
|
3579
3470
|
...normalizeParams(params)
|
|
3580
3471
|
});
|
|
3581
3472
|
}
|
|
3582
|
-
|
|
3473
|
+
// @__NO_SIDE_EFFECTS__
|
|
3583
3474
|
function _isoDuration(Class, params) {
|
|
3584
3475
|
return new Class({
|
|
3585
3476
|
type: "string",
|
|
@@ -3588,7 +3479,7 @@ function _isoDuration(Class, params) {
|
|
|
3588
3479
|
...normalizeParams(params)
|
|
3589
3480
|
});
|
|
3590
3481
|
}
|
|
3591
|
-
|
|
3482
|
+
// @__NO_SIDE_EFFECTS__
|
|
3592
3483
|
function _number(Class, params) {
|
|
3593
3484
|
return new Class(snapshotChecks({
|
|
3594
3485
|
type: "number",
|
|
@@ -3596,7 +3487,7 @@ function _number(Class, params) {
|
|
|
3596
3487
|
...normalizeParams(params)
|
|
3597
3488
|
}));
|
|
3598
3489
|
}
|
|
3599
|
-
|
|
3490
|
+
// @__NO_SIDE_EFFECTS__
|
|
3600
3491
|
function _int(Class, params) {
|
|
3601
3492
|
return new Class({
|
|
3602
3493
|
type: "number",
|
|
@@ -3606,25 +3497,25 @@ function _int(Class, params) {
|
|
|
3606
3497
|
...normalizeParams(params)
|
|
3607
3498
|
});
|
|
3608
3499
|
}
|
|
3609
|
-
|
|
3500
|
+
// @__NO_SIDE_EFFECTS__
|
|
3610
3501
|
function _boolean(Class, params) {
|
|
3611
3502
|
return new Class({
|
|
3612
3503
|
type: "boolean",
|
|
3613
3504
|
...normalizeParams(params)
|
|
3614
3505
|
});
|
|
3615
3506
|
}
|
|
3616
|
-
|
|
3507
|
+
// @__NO_SIDE_EFFECTS__
|
|
3617
3508
|
function _unknown(Class) {
|
|
3618
3509
|
return new Class({ type: "unknown" });
|
|
3619
3510
|
}
|
|
3620
|
-
|
|
3511
|
+
// @__NO_SIDE_EFFECTS__
|
|
3621
3512
|
function _never(Class, params) {
|
|
3622
3513
|
return new Class({
|
|
3623
3514
|
type: "never",
|
|
3624
3515
|
...normalizeParams(params)
|
|
3625
3516
|
});
|
|
3626
3517
|
}
|
|
3627
|
-
|
|
3518
|
+
// @__NO_SIDE_EFFECTS__
|
|
3628
3519
|
function _lt(value, params) {
|
|
3629
3520
|
return new $ZodCheckLessThan({
|
|
3630
3521
|
check: "less_than",
|
|
@@ -3633,7 +3524,7 @@ function _lt(value, params) {
|
|
|
3633
3524
|
inclusive: false
|
|
3634
3525
|
});
|
|
3635
3526
|
}
|
|
3636
|
-
|
|
3527
|
+
// @__NO_SIDE_EFFECTS__
|
|
3637
3528
|
function _lte(value, params) {
|
|
3638
3529
|
return new $ZodCheckLessThan({
|
|
3639
3530
|
check: "less_than",
|
|
@@ -3642,7 +3533,7 @@ function _lte(value, params) {
|
|
|
3642
3533
|
inclusive: true
|
|
3643
3534
|
});
|
|
3644
3535
|
}
|
|
3645
|
-
|
|
3536
|
+
// @__NO_SIDE_EFFECTS__
|
|
3646
3537
|
function _gt(value, params) {
|
|
3647
3538
|
return new $ZodCheckGreaterThan({
|
|
3648
3539
|
check: "greater_than",
|
|
@@ -3651,7 +3542,7 @@ function _gt(value, params) {
|
|
|
3651
3542
|
inclusive: false
|
|
3652
3543
|
});
|
|
3653
3544
|
}
|
|
3654
|
-
|
|
3545
|
+
// @__NO_SIDE_EFFECTS__
|
|
3655
3546
|
function _gte(value, params) {
|
|
3656
3547
|
return new $ZodCheckGreaterThan({
|
|
3657
3548
|
check: "greater_than",
|
|
@@ -3660,7 +3551,7 @@ function _gte(value, params) {
|
|
|
3660
3551
|
inclusive: true
|
|
3661
3552
|
});
|
|
3662
3553
|
}
|
|
3663
|
-
|
|
3554
|
+
// @__NO_SIDE_EFFECTS__
|
|
3664
3555
|
function _multipleOf(value, params) {
|
|
3665
3556
|
return new $ZodCheckMultipleOf({
|
|
3666
3557
|
check: "multiple_of",
|
|
@@ -3668,16 +3559,15 @@ function _multipleOf(value, params) {
|
|
|
3668
3559
|
value
|
|
3669
3560
|
});
|
|
3670
3561
|
}
|
|
3671
|
-
|
|
3562
|
+
// @__NO_SIDE_EFFECTS__
|
|
3672
3563
|
function _maxLength(maximum, params) {
|
|
3673
|
-
|
|
3564
|
+
return new $ZodCheckMaxLength({
|
|
3674
3565
|
check: "max_length",
|
|
3675
3566
|
...normalizeParams(params),
|
|
3676
3567
|
maximum
|
|
3677
3568
|
});
|
|
3678
|
-
return ch;
|
|
3679
3569
|
}
|
|
3680
|
-
|
|
3570
|
+
// @__NO_SIDE_EFFECTS__
|
|
3681
3571
|
function _minLength(minimum, params) {
|
|
3682
3572
|
return new $ZodCheckMinLength({
|
|
3683
3573
|
check: "min_length",
|
|
@@ -3685,7 +3575,7 @@ function _minLength(minimum, params) {
|
|
|
3685
3575
|
minimum
|
|
3686
3576
|
});
|
|
3687
3577
|
}
|
|
3688
|
-
|
|
3578
|
+
// @__NO_SIDE_EFFECTS__
|
|
3689
3579
|
function _length(length, params) {
|
|
3690
3580
|
return new $ZodCheckLengthEquals({
|
|
3691
3581
|
check: "length_equals",
|
|
@@ -3693,7 +3583,7 @@ function _length(length, params) {
|
|
|
3693
3583
|
length
|
|
3694
3584
|
});
|
|
3695
3585
|
}
|
|
3696
|
-
|
|
3586
|
+
// @__NO_SIDE_EFFECTS__
|
|
3697
3587
|
function _regex(pattern, params) {
|
|
3698
3588
|
return new $ZodCheckRegex({
|
|
3699
3589
|
check: "string_format",
|
|
@@ -3702,7 +3592,7 @@ function _regex(pattern, params) {
|
|
|
3702
3592
|
pattern
|
|
3703
3593
|
});
|
|
3704
3594
|
}
|
|
3705
|
-
|
|
3595
|
+
// @__NO_SIDE_EFFECTS__
|
|
3706
3596
|
function _lowercase(params) {
|
|
3707
3597
|
return new $ZodCheckLowerCase({
|
|
3708
3598
|
check: "string_format",
|
|
@@ -3710,7 +3600,7 @@ function _lowercase(params) {
|
|
|
3710
3600
|
...normalizeParams(params)
|
|
3711
3601
|
});
|
|
3712
3602
|
}
|
|
3713
|
-
|
|
3603
|
+
// @__NO_SIDE_EFFECTS__
|
|
3714
3604
|
function _uppercase(params) {
|
|
3715
3605
|
return new $ZodCheckUpperCase({
|
|
3716
3606
|
check: "string_format",
|
|
@@ -3718,7 +3608,7 @@ function _uppercase(params) {
|
|
|
3718
3608
|
...normalizeParams(params)
|
|
3719
3609
|
});
|
|
3720
3610
|
}
|
|
3721
|
-
|
|
3611
|
+
// @__NO_SIDE_EFFECTS__
|
|
3722
3612
|
function _includes(includes, params) {
|
|
3723
3613
|
return new $ZodCheckIncludes({
|
|
3724
3614
|
check: "string_format",
|
|
@@ -3727,7 +3617,7 @@ function _includes(includes, params) {
|
|
|
3727
3617
|
includes
|
|
3728
3618
|
});
|
|
3729
3619
|
}
|
|
3730
|
-
|
|
3620
|
+
// @__NO_SIDE_EFFECTS__
|
|
3731
3621
|
function _startsWith(prefix, params) {
|
|
3732
3622
|
return new $ZodCheckStartsWith({
|
|
3733
3623
|
check: "string_format",
|
|
@@ -3736,7 +3626,7 @@ function _startsWith(prefix, params) {
|
|
|
3736
3626
|
prefix
|
|
3737
3627
|
});
|
|
3738
3628
|
}
|
|
3739
|
-
|
|
3629
|
+
// @__NO_SIDE_EFFECTS__
|
|
3740
3630
|
function _endsWith(suffix, params) {
|
|
3741
3631
|
return new $ZodCheckEndsWith({
|
|
3742
3632
|
check: "string_format",
|
|
@@ -3745,34 +3635,34 @@ function _endsWith(suffix, params) {
|
|
|
3745
3635
|
suffix
|
|
3746
3636
|
});
|
|
3747
3637
|
}
|
|
3748
|
-
|
|
3638
|
+
// @__NO_SIDE_EFFECTS__
|
|
3749
3639
|
function _overwrite(tx) {
|
|
3750
3640
|
return new $ZodCheckOverwrite({
|
|
3751
3641
|
check: "overwrite",
|
|
3752
3642
|
tx
|
|
3753
3643
|
});
|
|
3754
3644
|
}
|
|
3755
|
-
|
|
3645
|
+
// @__NO_SIDE_EFFECTS__
|
|
3756
3646
|
function _normalize(form) {
|
|
3757
3647
|
return /* @__PURE__ */ _overwrite((input) => input.normalize(form));
|
|
3758
3648
|
}
|
|
3759
|
-
|
|
3649
|
+
// @__NO_SIDE_EFFECTS__
|
|
3760
3650
|
function _trim() {
|
|
3761
3651
|
return /* @__PURE__ */ _overwrite((input) => input.trim());
|
|
3762
3652
|
}
|
|
3763
|
-
|
|
3653
|
+
// @__NO_SIDE_EFFECTS__
|
|
3764
3654
|
function _toLowerCase() {
|
|
3765
3655
|
return /* @__PURE__ */ _overwrite((input) => input.toLowerCase());
|
|
3766
3656
|
}
|
|
3767
|
-
|
|
3657
|
+
// @__NO_SIDE_EFFECTS__
|
|
3768
3658
|
function _toUpperCase() {
|
|
3769
3659
|
return /* @__PURE__ */ _overwrite((input) => input.toUpperCase());
|
|
3770
3660
|
}
|
|
3771
|
-
|
|
3661
|
+
// @__NO_SIDE_EFFECTS__
|
|
3772
3662
|
function _slugify() {
|
|
3773
3663
|
return /* @__PURE__ */ _overwrite((input) => slugify(input));
|
|
3774
3664
|
}
|
|
3775
|
-
|
|
3665
|
+
// @__NO_SIDE_EFFECTS__
|
|
3776
3666
|
function _array(Class, element, params) {
|
|
3777
3667
|
return new Class({
|
|
3778
3668
|
type: "array",
|
|
@@ -3780,35 +3670,33 @@ function _array(Class, element, params) {
|
|
|
3780
3670
|
...normalizeParams(params)
|
|
3781
3671
|
});
|
|
3782
3672
|
}
|
|
3783
|
-
|
|
3673
|
+
// @__NO_SIDE_EFFECTS__
|
|
3784
3674
|
function _custom(Class, fn, _params) {
|
|
3785
3675
|
const norm = normalizeParams(_params);
|
|
3786
3676
|
norm.abort ?? (norm.abort = true);
|
|
3787
|
-
|
|
3677
|
+
return new Class({
|
|
3788
3678
|
type: "custom",
|
|
3789
3679
|
check: "custom",
|
|
3790
3680
|
fn,
|
|
3791
3681
|
...norm
|
|
3792
3682
|
});
|
|
3793
|
-
return schema;
|
|
3794
3683
|
}
|
|
3795
|
-
|
|
3684
|
+
// @__NO_SIDE_EFFECTS__
|
|
3796
3685
|
function _refine(Class, fn, _params) {
|
|
3797
|
-
|
|
3686
|
+
return new Class({
|
|
3798
3687
|
type: "custom",
|
|
3799
3688
|
check: "custom",
|
|
3800
3689
|
fn,
|
|
3801
3690
|
...normalizeParams(_params)
|
|
3802
3691
|
});
|
|
3803
|
-
return schema;
|
|
3804
3692
|
}
|
|
3805
|
-
|
|
3693
|
+
// @__NO_SIDE_EFFECTS__
|
|
3806
3694
|
function _superRefine(fn, params) {
|
|
3807
3695
|
const ch = /* @__PURE__ */ _check((payload) => {
|
|
3808
|
-
payload.addIssue = (issue$
|
|
3809
|
-
if (typeof issue$
|
|
3696
|
+
payload.addIssue = (issue$2) => {
|
|
3697
|
+
if (typeof issue$2 === "string") payload.issues.push(issue(issue$2, payload.value, ch._zod.def));
|
|
3810
3698
|
else {
|
|
3811
|
-
const _issue = issue$
|
|
3699
|
+
const _issue = issue$2;
|
|
3812
3700
|
if (_issue.fatal) _issue.continue = false;
|
|
3813
3701
|
_issue.code ?? (_issue.code = "custom");
|
|
3814
3702
|
if (!("input" in _issue)) _issue.input = payload.value;
|
|
@@ -3821,7 +3709,7 @@ function _superRefine(fn, params) {
|
|
|
3821
3709
|
}, params);
|
|
3822
3710
|
return ch;
|
|
3823
3711
|
}
|
|
3824
|
-
|
|
3712
|
+
// @__NO_SIDE_EFFECTS__
|
|
3825
3713
|
function _check(fn, params) {
|
|
3826
3714
|
const ch = new $ZodCheck({
|
|
3827
3715
|
check: "custom",
|
|
@@ -3830,33 +3718,6 @@ function _check(fn, params) {
|
|
|
3830
3718
|
ch._zod.check = fn;
|
|
3831
3719
|
return ch;
|
|
3832
3720
|
}
|
|
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
3721
|
//#endregion
|
|
3861
3722
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/to-json-schema.js
|
|
3862
3723
|
function assignProps(target, ...sources) {
|
|
@@ -3905,13 +3766,12 @@ function processSchema(schema, ctx, _params = {
|
|
|
3905
3766
|
path: [],
|
|
3906
3767
|
schemaPath: []
|
|
3907
3768
|
}) {
|
|
3908
|
-
var _a
|
|
3769
|
+
var _a;
|
|
3909
3770
|
const def = schema._zod.def;
|
|
3910
3771
|
const seen = ctx.seen.get(schema);
|
|
3911
3772
|
if (seen) {
|
|
3912
3773
|
seen.count++;
|
|
3913
|
-
|
|
3914
|
-
if (isCycle) seen.cycle = _params.path;
|
|
3774
|
+
if (_params.schemaPath.includes(schema)) seen.cycle = _params.path;
|
|
3915
3775
|
return seen.schema;
|
|
3916
3776
|
}
|
|
3917
3777
|
const result = {
|
|
@@ -3945,16 +3805,15 @@ function processSchema(schema, ctx, _params = {
|
|
|
3945
3805
|
ctx.seen.get(parent).isParent = true;
|
|
3946
3806
|
}
|
|
3947
3807
|
}
|
|
3948
|
-
const meta
|
|
3949
|
-
if (meta
|
|
3808
|
+
const meta = ctx.metadataRegistry.get(schema);
|
|
3809
|
+
if (meta) assignProps(result.schema, meta);
|
|
3950
3810
|
if (ctx.io === "input" && isTransforming(schema)) {
|
|
3951
3811
|
delete result.schema.examples;
|
|
3952
3812
|
delete result.schema.default;
|
|
3953
3813
|
}
|
|
3954
|
-
if (ctx.io === "input" && "_prefault" in result.schema) (_a
|
|
3814
|
+
if (ctx.io === "input" && "_prefault" in result.schema) (_a = result.schema).default ?? (_a.default = result.schema._prefault);
|
|
3955
3815
|
delete result.schema._prefault;
|
|
3956
|
-
|
|
3957
|
-
return _result.schema;
|
|
3816
|
+
return ctx.seen.get(schema).schema;
|
|
3958
3817
|
}
|
|
3959
3818
|
function encodeJSONPointerSegment(segment) {
|
|
3960
3819
|
return segment.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
@@ -3976,7 +3835,7 @@ function extractDefs(ctx, schema) {
|
|
|
3976
3835
|
const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
3977
3836
|
if (ctx.external) {
|
|
3978
3837
|
const externalId = ctx.external.registry.get(entry[0])?.id;
|
|
3979
|
-
const uriGenerator = ctx.external.uri ?? ((id
|
|
3838
|
+
const uriGenerator = ctx.external.uri ?? ((id) => id);
|
|
3980
3839
|
if (externalId) return { ref: uriGenerator(externalId) };
|
|
3981
3840
|
const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;
|
|
3982
3841
|
entry[1].defId = id;
|
|
@@ -4000,9 +3859,9 @@ function extractDefs(ctx, schema) {
|
|
|
4000
3859
|
const { ref, defId } = makeURI(entry);
|
|
4001
3860
|
seen.def = { ...seen.schema };
|
|
4002
3861
|
if (defId) seen.defId = defId;
|
|
4003
|
-
const schema
|
|
4004
|
-
for (const key in schema
|
|
4005
|
-
schema
|
|
3862
|
+
const schema = seen.schema;
|
|
3863
|
+
for (const key in schema) delete schema[key];
|
|
3864
|
+
schema.$ref = ref;
|
|
4006
3865
|
};
|
|
4007
3866
|
if (ctx.cycles === "throw") for (const entry of ctx.seen.entries()) {
|
|
4008
3867
|
const seen = entry[1];
|
|
@@ -4023,8 +3882,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4023
3882
|
continue;
|
|
4024
3883
|
}
|
|
4025
3884
|
}
|
|
4026
|
-
|
|
4027
|
-
if (id) {
|
|
3885
|
+
if (ctx.metadataRegistry.get(entry[0])?.id) {
|
|
4028
3886
|
extractToDef(entry);
|
|
4029
3887
|
continue;
|
|
4030
3888
|
}
|
|
@@ -4060,7 +3918,7 @@ function compactTypeUnion(schema) {
|
|
|
4060
3918
|
/** Keywords `foldIntersection` knows how to combine. Anything else — `$ref`, `patternProperties`,
|
|
4061
3919
|
* an annotation like `description` — makes a member unfoldable, so a constraint this does not
|
|
4062
3920
|
* understand leaves the `allOf` alone instead of being silently dropped or misattributed. */
|
|
4063
|
-
const FOLDABLE_KEYS = new Set([
|
|
3921
|
+
const FOLDABLE_KEYS = /* @__PURE__ */ new Set([
|
|
4064
3922
|
"type",
|
|
4065
3923
|
"properties",
|
|
4066
3924
|
"required",
|
|
@@ -4074,17 +3932,17 @@ function undeclaredConstraint(member) {
|
|
|
4074
3932
|
return Object.keys(extra).length ? extra : null;
|
|
4075
3933
|
}
|
|
4076
3934
|
/** 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
|
|
3935
|
+
function foldObjects(members) {
|
|
4078
3936
|
const objects = [];
|
|
4079
|
-
for (const member of members
|
|
3937
|
+
for (const member of members) {
|
|
4080
3938
|
if (typeof member !== "object" || member.type !== "object") return null;
|
|
4081
3939
|
for (const key in member) if (!FOLDABLE_KEYS.has(key)) return null;
|
|
4082
3940
|
objects.push(member);
|
|
4083
3941
|
}
|
|
4084
3942
|
const properties = {};
|
|
4085
|
-
const required
|
|
4086
|
-
for (const object
|
|
4087
|
-
for (const key in object
|
|
3943
|
+
const required = /* @__PURE__ */ new Set();
|
|
3944
|
+
for (const object of objects) {
|
|
3945
|
+
for (const key in object.properties) {
|
|
4088
3946
|
if (Object.prototype.hasOwnProperty.call(properties, key)) continue;
|
|
4089
3947
|
const parts = [];
|
|
4090
3948
|
for (const other of objects) {
|
|
@@ -4092,21 +3950,20 @@ function foldObjects(members$1) {
|
|
|
4092
3950
|
if (part === null || part === void 0) continue;
|
|
4093
3951
|
if (!parts.some((seen) => JSON.stringify(seen) === JSON.stringify(part))) parts.push(part);
|
|
4094
3952
|
}
|
|
4095
|
-
|
|
4096
|
-
assignProp(properties, key, merged);
|
|
3953
|
+
assignProp(properties, key, parts.length === 1 ? parts[0] : foldObjects(parts) ?? { allOf: parts });
|
|
4097
3954
|
}
|
|
4098
|
-
for (const key of object
|
|
3955
|
+
for (const key of object.required ?? []) required.add(key);
|
|
4099
3956
|
}
|
|
4100
3957
|
const folded = {
|
|
4101
3958
|
type: "object",
|
|
4102
3959
|
properties
|
|
4103
3960
|
};
|
|
4104
|
-
if (required
|
|
4105
|
-
if (objects.every((object
|
|
3961
|
+
if (required.size) folded.required = [...required];
|
|
3962
|
+
if (objects.every((object) => object.additionalProperties === false)) folded.additionalProperties = false;
|
|
4106
3963
|
else {
|
|
4107
3964
|
const constraints = [];
|
|
4108
|
-
for (const object
|
|
4109
|
-
const constraint = undeclaredConstraint(object
|
|
3965
|
+
for (const object of objects) {
|
|
3966
|
+
const constraint = undeclaredConstraint(object);
|
|
4110
3967
|
if (constraint && !constraints.some((seen) => JSON.stringify(seen) === JSON.stringify(constraint))) constraints.push(constraint);
|
|
4111
3968
|
}
|
|
4112
3969
|
if (constraints.length === 1) folded.additionalProperties = constraints[0];
|
|
@@ -4131,11 +3988,11 @@ function foldIntersection(json) {
|
|
|
4131
3988
|
let folded = null;
|
|
4132
3989
|
if (!unions.length) folded = foldObjects(allOf);
|
|
4133
3990
|
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
|
|
3991
|
+
const union = unions[0];
|
|
3992
|
+
const keyword = UNION_KEYS.find((k) => Array.isArray(union[k]));
|
|
3993
|
+
if (Object.keys(union).length !== 1) return;
|
|
3994
|
+
const rest = allOf.filter((m) => m !== union);
|
|
3995
|
+
const branches = union[keyword].map((branch) => foldObjects([...rest, branch]));
|
|
4139
3996
|
if (branches.some((b) => !b)) return;
|
|
4140
3997
|
folded = { [keyword]: branches };
|
|
4141
3998
|
}
|
|
@@ -4149,8 +4006,8 @@ function finalize(ctx, schema) {
|
|
|
4149
4006
|
const flattenRef = (zodSchema) => {
|
|
4150
4007
|
const seen = ctx.seen.get(zodSchema);
|
|
4151
4008
|
if (seen.ref === null) return;
|
|
4152
|
-
const schema
|
|
4153
|
-
const _cached = { ...schema
|
|
4009
|
+
const schema = seen.def ?? seen.schema;
|
|
4010
|
+
const _cached = { ...schema };
|
|
4154
4011
|
const ref = seen.ref;
|
|
4155
4012
|
seen.ref = null;
|
|
4156
4013
|
if (ref) {
|
|
@@ -4158,18 +4015,17 @@ function finalize(ctx, schema) {
|
|
|
4158
4015
|
const refSeen = ctx.seen.get(ref);
|
|
4159
4016
|
const refSchema = refSeen.schema;
|
|
4160
4017
|
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) {
|
|
4018
|
+
schema.allOf = schema.allOf ?? [];
|
|
4019
|
+
schema.allOf.push(refSchema);
|
|
4020
|
+
} else assignProps(schema, refSchema);
|
|
4021
|
+
assignProps(schema, _cached);
|
|
4022
|
+
if (zodSchema._zod.parent === ref) for (const key in schema) {
|
|
4167
4023
|
if (key === "$ref" || key === "allOf") continue;
|
|
4168
|
-
if (!(key in _cached)) delete schema
|
|
4024
|
+
if (!(key in _cached)) delete schema[key];
|
|
4169
4025
|
}
|
|
4170
|
-
if (refSchema.$ref && refSeen.def) for (const key in schema
|
|
4026
|
+
if (refSchema.$ref && refSeen.def) for (const key in schema) {
|
|
4171
4027
|
if (key === "$ref" || key === "allOf") continue;
|
|
4172
|
-
if (key in refSeen.def && JSON.stringify(schema
|
|
4028
|
+
if (key in refSeen.def && JSON.stringify(schema[key]) === JSON.stringify(refSeen.def[key])) delete schema[key];
|
|
4173
4029
|
}
|
|
4174
4030
|
}
|
|
4175
4031
|
const parent = zodSchema._zod.parent;
|
|
@@ -4177,16 +4033,16 @@ function finalize(ctx, schema) {
|
|
|
4177
4033
|
flattenRef(parent);
|
|
4178
4034
|
const parentSeen = ctx.seen.get(parent);
|
|
4179
4035
|
if (parentSeen?.schema.$ref) {
|
|
4180
|
-
schema
|
|
4181
|
-
if (parentSeen.def) for (const key in schema
|
|
4036
|
+
schema.$ref = parentSeen.schema.$ref;
|
|
4037
|
+
if (parentSeen.def) for (const key in schema) {
|
|
4182
4038
|
if (key === "$ref" || key === "allOf") continue;
|
|
4183
|
-
if (key in parentSeen.def && JSON.stringify(schema
|
|
4039
|
+
if (key in parentSeen.def && JSON.stringify(schema[key]) === JSON.stringify(parentSeen.def[key])) delete schema[key];
|
|
4184
4040
|
}
|
|
4185
4041
|
}
|
|
4186
4042
|
}
|
|
4187
4043
|
ctx.override({
|
|
4188
4044
|
zodSchema,
|
|
4189
|
-
jsonSchema: schema
|
|
4045
|
+
jsonSchema: schema,
|
|
4190
4046
|
path: seen.path ?? []
|
|
4191
4047
|
});
|
|
4192
4048
|
};
|
|
@@ -4228,8 +4084,10 @@ function finalize(ctx, schema) {
|
|
|
4228
4084
|
}
|
|
4229
4085
|
}
|
|
4230
4086
|
if (ctx.external) ctx.sharedEmitDoneFor = ctx.external;
|
|
4231
|
-
if (ctx.external) {} else if (Object.keys(defs).length > 0)
|
|
4232
|
-
|
|
4087
|
+
if (ctx.external) {} else if (Object.keys(defs).length > 0) {
|
|
4088
|
+
if (ctx.target === "draft-2020-12") result.$defs = defs;
|
|
4089
|
+
else result.definitions = defs;
|
|
4090
|
+
}
|
|
4233
4091
|
try {
|
|
4234
4092
|
const finalized = JSON.parse(JSON.stringify(result));
|
|
4235
4093
|
Object.defineProperty(finalized, "~standard", {
|
|
@@ -4304,7 +4162,6 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
|
|
|
4304
4162
|
extractDefs(ctx, schema);
|
|
4305
4163
|
return finalize(ctx, schema);
|
|
4306
4164
|
};
|
|
4307
|
-
|
|
4308
4165
|
//#endregion
|
|
4309
4166
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/json-schema-processors.js
|
|
4310
4167
|
const narrowMin = (agg, key, value) => {
|
|
@@ -4386,7 +4243,7 @@ const formatMap = {
|
|
|
4386
4243
|
json_string: "json-string",
|
|
4387
4244
|
regex: ""
|
|
4388
4245
|
};
|
|
4389
|
-
const exactPatterns = new Map([[base64Charset, base64], [base64urlCharset, base64url]]);
|
|
4246
|
+
const exactPatterns = /* @__PURE__ */ new Map([[base64Charset, base64], [base64urlCharset, base64url]]);
|
|
4390
4247
|
const exactPattern = (p) => exactPatterns.get(p) ?? p;
|
|
4391
4248
|
const stringProcessor = (schema, ctx, _json, _params) => {
|
|
4392
4249
|
const json = _json;
|
|
@@ -4416,16 +4273,18 @@ const numberProcessor = (schema, ctx, _json, params) => {
|
|
|
4416
4273
|
const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
|
|
4417
4274
|
const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
|
|
4418
4275
|
const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
|
|
4419
|
-
if (exMin)
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
if (
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4276
|
+
if (exMin) {
|
|
4277
|
+
if (legacy) {
|
|
4278
|
+
json.minimum = exclusiveMinimum;
|
|
4279
|
+
json.exclusiveMinimum = true;
|
|
4280
|
+
} else json.exclusiveMinimum = exclusiveMinimum;
|
|
4281
|
+
} else if (typeof minimum === "number") json.minimum = minimum;
|
|
4282
|
+
if (exMax) {
|
|
4283
|
+
if (legacy) {
|
|
4284
|
+
json.maximum = exclusiveMaximum;
|
|
4285
|
+
json.exclusiveMaximum = true;
|
|
4286
|
+
} else json.exclusiveMaximum = exclusiveMaximum;
|
|
4287
|
+
} else if (typeof maximum === "number") json.maximum = maximum;
|
|
4429
4288
|
if (multipleOf) {
|
|
4430
4289
|
const divisors = /* @__PURE__ */ new Set();
|
|
4431
4290
|
for (const divisor of multipleOf) if (Number.isFinite(divisor) && divisor !== 0) divisors.add(Math.abs(divisor));
|
|
@@ -4441,7 +4300,6 @@ const booleanProcessor = (_schema, _ctx, json, _params) => {
|
|
|
4441
4300
|
const neverProcessor = (_schema, _ctx, json, _params) => {
|
|
4442
4301
|
json.not = {};
|
|
4443
4302
|
};
|
|
4444
|
-
const unknownProcessor = (_schema, _ctx, _json, _params) => {};
|
|
4445
4303
|
const enumProcessor = (schema, _ctx, json, _params) => {
|
|
4446
4304
|
const def = schema._zod.def;
|
|
4447
4305
|
const values = getEnumValues(def.entries);
|
|
@@ -4507,8 +4365,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
4507
4365
|
const json = _json;
|
|
4508
4366
|
const def = schema._zod.def;
|
|
4509
4367
|
const shape = def.shape;
|
|
4510
|
-
|
|
4511
|
-
if (symbolKeys.length && handleUnrepresentable(schema, ctx, json, params, "Symbol keys cannot be represented in JSON Schema")) return;
|
|
4368
|
+
if (Object.getOwnPropertySymbols(shape).length && handleUnrepresentable(schema, ctx, json, params, "Symbol keys cannot be represented in JSON Schema")) return;
|
|
4512
4369
|
json.type = "object";
|
|
4513
4370
|
json.properties = {};
|
|
4514
4371
|
for (const key in shape) assignProp(json.properties, key, processSchema(shape[key], ctx, {
|
|
@@ -4601,7 +4458,7 @@ function stringifyKeyNames(bySchema, json, visited) {
|
|
|
4601
4458
|
const numericType = !types.includes("string") && types.some((t) => t === "number" || t === "integer");
|
|
4602
4459
|
const values = json.enum ?? (json.const !== void 0 ? [json.const] : void 0);
|
|
4603
4460
|
if (!numericType && !values?.some((v) => typeof v === "number")) return json;
|
|
4604
|
-
const { minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, format, id
|
|
4461
|
+
const { minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, format, id, ...rest } = json;
|
|
4605
4462
|
if (rest.enum) rest.enum = rest.enum.map((v) => typeof v === "number" ? String(v) : v);
|
|
4606
4463
|
else if (typeof rest.const === "number") rest.const = String(rest.const);
|
|
4607
4464
|
if (!numericType) return rest;
|
|
@@ -4615,8 +4472,8 @@ function rewriteKeyNames(ctx) {
|
|
|
4615
4472
|
const bySchema = /* @__PURE__ */ new Map();
|
|
4616
4473
|
for (const entry of ctx.seen.values()) if (entry.def && !bySchema.has(entry.schema)) bySchema.set(entry.schema, entry);
|
|
4617
4474
|
const rewrites = /* @__PURE__ */ new Map();
|
|
4618
|
-
for (const record
|
|
4619
|
-
const seen = ctx.seen.get(record
|
|
4475
|
+
for (const record of pendingRecords.get(ctx) ?? []) {
|
|
4476
|
+
const seen = ctx.seen.get(record);
|
|
4620
4477
|
const names = (seen?.def ?? seen?.schema)?.propertyNames;
|
|
4621
4478
|
if (!names || names === true || rewrites.has(names)) continue;
|
|
4622
4479
|
const rewritten = stringifyKeyNames(bySchema, names, /* @__PURE__ */ new Set());
|
|
@@ -4753,7 +4610,6 @@ const optionalProcessor = (schema, ctx, _json, params) => {
|
|
|
4753
4610
|
const seen = ctx.seen.get(schema);
|
|
4754
4611
|
seen.ref = def.innerType;
|
|
4755
4612
|
};
|
|
4756
|
-
|
|
4757
4613
|
//#endregion
|
|
4758
4614
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/errors.js
|
|
4759
4615
|
const _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
|
|
@@ -4787,12 +4643,12 @@ const initializer = (inst, issues) => {
|
|
|
4787
4643
|
_installedErrorProtos.add(proto);
|
|
4788
4644
|
_lazyMethod(proto, "format", (self) => (mapper) => formatError(self, mapper));
|
|
4789
4645
|
_lazyMethod(proto, "flatten", (self) => (mapper) => flattenError(self, mapper));
|
|
4790
|
-
_lazyMethod(proto, "addIssue", (self) => (issue
|
|
4791
|
-
self.issues.push(issue
|
|
4646
|
+
_lazyMethod(proto, "addIssue", (self) => (issue) => {
|
|
4647
|
+
self.issues.push(issue);
|
|
4792
4648
|
self.message = JSON.stringify(self.issues, jsonStringifyReplacer, 2);
|
|
4793
4649
|
});
|
|
4794
|
-
_lazyMethod(proto, "addIssues", (self) => (issues
|
|
4795
|
-
self.issues.push(...issues
|
|
4650
|
+
_lazyMethod(proto, "addIssues", (self) => (issues) => {
|
|
4651
|
+
self.issues.push(...issues);
|
|
4796
4652
|
self.message = JSON.stringify(self.issues, jsonStringifyReplacer, 2);
|
|
4797
4653
|
});
|
|
4798
4654
|
Object.defineProperty(proto, "isEmpty", {
|
|
@@ -4803,8 +4659,7 @@ const initializer = (inst, issues) => {
|
|
|
4803
4659
|
}
|
|
4804
4660
|
});
|
|
4805
4661
|
};
|
|
4806
|
-
const ZodRealError =
|
|
4807
|
-
|
|
4662
|
+
const ZodRealError = /*@__PURE__*/ $constructor("ZodError", initializer, void 0, { Parent: Error });
|
|
4808
4663
|
//#endregion
|
|
4809
4664
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/parse.js
|
|
4810
4665
|
const parse$1 = /* @__PURE__ */ _parse(ZodRealError);
|
|
@@ -4819,7 +4674,6 @@ const safeEncode = /* @__PURE__ */ _safeEncode(ZodRealError);
|
|
|
4819
4674
|
const safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
4820
4675
|
const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
4821
4676
|
const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
4822
|
-
|
|
4823
4677
|
//#endregion
|
|
4824
4678
|
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/schemas.js
|
|
4825
4679
|
function _ensureDefaultLocale() {
|
|
@@ -4828,7 +4682,7 @@ function _ensureDefaultLocale() {
|
|
|
4828
4682
|
function _ensureDefaultMemoizer() {
|
|
4829
4683
|
if (!globalConfig.memoizer) config({ memoizer: memoizer() });
|
|
4830
4684
|
}
|
|
4831
|
-
const ZodType =
|
|
4685
|
+
const ZodType = /*@__PURE__*/ $constructor("ZodType", (inst, def) => {
|
|
4832
4686
|
_ensureDefaultLocale();
|
|
4833
4687
|
$ZodType.init(inst, def);
|
|
4834
4688
|
inst.def = def;
|
|
@@ -4852,8 +4706,8 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
4852
4706
|
brand() {
|
|
4853
4707
|
return this;
|
|
4854
4708
|
},
|
|
4855
|
-
register(reg, meta
|
|
4856
|
-
reg.add(this, meta
|
|
4709
|
+
register(reg, meta) {
|
|
4710
|
+
reg.add(this, meta);
|
|
4857
4711
|
return this;
|
|
4858
4712
|
},
|
|
4859
4713
|
refine(check, params) {
|
|
@@ -4863,7 +4717,7 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
4863
4717
|
return this.check(superRefine(refinement, params));
|
|
4864
4718
|
},
|
|
4865
4719
|
overwrite(fn) {
|
|
4866
|
-
return this.check(_overwrite(fn));
|
|
4720
|
+
return this.check(/* @__PURE__ */ _overwrite(fn));
|
|
4867
4721
|
},
|
|
4868
4722
|
optional() {
|
|
4869
4723
|
return optional(this);
|
|
@@ -4939,11 +4793,11 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
4939
4793
|
set "~standard"(value) {
|
|
4940
4794
|
own(this, "~standard", value);
|
|
4941
4795
|
},
|
|
4942
|
-
parse: function _parse
|
|
4943
|
-
return parse$1(this, data, params, { callee: _parse
|
|
4796
|
+
parse: function _parse(data, params) {
|
|
4797
|
+
return parse$1(this, data, params, { callee: _parse });
|
|
4944
4798
|
},
|
|
4945
|
-
parseAsync: async function _parseAsync
|
|
4946
|
-
return await parseAsync(this, data, params, { callee: _parseAsync
|
|
4799
|
+
parseAsync: async function _parseAsync(data, params) {
|
|
4800
|
+
return await parseAsync(this, data, params, { callee: _parseAsync });
|
|
4947
4801
|
},
|
|
4948
4802
|
safeParse(data, params) {
|
|
4949
4803
|
return safeParse(this, data, params);
|
|
@@ -4961,19 +4815,19 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
4961
4815
|
return validate(this, data, params);
|
|
4962
4816
|
},
|
|
4963
4817
|
validateAsync(data, params) {
|
|
4964
|
-
return validateAsync(this, data, params);
|
|
4818
|
+
return validateAsync$1(this, data, params);
|
|
4965
4819
|
},
|
|
4966
|
-
encode: function _encode
|
|
4967
|
-
return encode(this, data, params, { callee: _encode
|
|
4820
|
+
encode: function _encode(data, params) {
|
|
4821
|
+
return encode(this, data, params, { callee: _encode });
|
|
4968
4822
|
},
|
|
4969
|
-
decode: function _decode
|
|
4970
|
-
return decode(this, data, params, { callee: _decode
|
|
4823
|
+
decode: function _decode(data, params) {
|
|
4824
|
+
return decode(this, data, params, { callee: _decode });
|
|
4971
4825
|
},
|
|
4972
|
-
encodeAsync: async function _encodeAsync
|
|
4973
|
-
return await encodeAsync(this, data, params, { callee: _encodeAsync
|
|
4826
|
+
encodeAsync: async function _encodeAsync(data, params) {
|
|
4827
|
+
return await encodeAsync(this, data, params, { callee: _encodeAsync });
|
|
4974
4828
|
},
|
|
4975
|
-
decodeAsync: async function _decodeAsync
|
|
4976
|
-
return await decodeAsync(this, data, params, { callee: _decodeAsync
|
|
4829
|
+
decodeAsync: async function _decodeAsync(data, params) {
|
|
4830
|
+
return await decodeAsync(this, data, params, { callee: _decodeAsync });
|
|
4977
4831
|
},
|
|
4978
4832
|
safeEncode(data, params) {
|
|
4979
4833
|
return safeEncode(this, data, params);
|
|
@@ -4998,191 +4852,191 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
4998
4852
|
}
|
|
4999
4853
|
});
|
|
5000
4854
|
/** @internal */
|
|
5001
|
-
const _ZodString =
|
|
4855
|
+
const _ZodString = /*@__PURE__*/ $constructor("_ZodString", (inst, def) => {
|
|
5002
4856
|
$ZodString.init(inst, def);
|
|
5003
4857
|
ZodType.init(inst, def);
|
|
5004
4858
|
inst._zod.processJSONSchema = (ctx, json, params) => stringProcessor(inst, ctx, json, params);
|
|
5005
|
-
},
|
|
4859
|
+
}, /*@__PURE__*/ derived({
|
|
5006
4860
|
format: (inst) => aggregateChecks(inst).format ?? null,
|
|
5007
4861
|
minLength: (inst) => aggregateChecks(inst).minimum ?? null,
|
|
5008
4862
|
maxLength: (inst) => aggregateChecks(inst).maximum ?? null
|
|
5009
4863
|
}, {
|
|
5010
4864
|
regex(...args) {
|
|
5011
|
-
return this.check(_regex(...args));
|
|
4865
|
+
return this.check(/* @__PURE__ */ _regex(...args));
|
|
5012
4866
|
},
|
|
5013
4867
|
includes(...args) {
|
|
5014
|
-
return this.check(_includes(...args));
|
|
4868
|
+
return this.check(/* @__PURE__ */ _includes(...args));
|
|
5015
4869
|
},
|
|
5016
4870
|
startsWith(...args) {
|
|
5017
|
-
return this.check(_startsWith(...args));
|
|
4871
|
+
return this.check(/* @__PURE__ */ _startsWith(...args));
|
|
5018
4872
|
},
|
|
5019
4873
|
endsWith(...args) {
|
|
5020
|
-
return this.check(_endsWith(...args));
|
|
4874
|
+
return this.check(/* @__PURE__ */ _endsWith(...args));
|
|
5021
4875
|
},
|
|
5022
4876
|
min(...args) {
|
|
5023
|
-
return this.check(_minLength(...args));
|
|
4877
|
+
return this.check(/* @__PURE__ */ _minLength(...args));
|
|
5024
4878
|
},
|
|
5025
4879
|
max(...args) {
|
|
5026
|
-
return this.check(_maxLength(...args));
|
|
4880
|
+
return this.check(/* @__PURE__ */ _maxLength(...args));
|
|
5027
4881
|
},
|
|
5028
4882
|
length(...args) {
|
|
5029
|
-
return this.check(_length(...args));
|
|
4883
|
+
return this.check(/* @__PURE__ */ _length(...args));
|
|
5030
4884
|
},
|
|
5031
4885
|
nonempty(...args) {
|
|
5032
|
-
return this.check(_minLength(1, ...args));
|
|
4886
|
+
return this.check(/* @__PURE__ */ _minLength(1, ...args));
|
|
5033
4887
|
},
|
|
5034
4888
|
lowercase(params) {
|
|
5035
|
-
return this.check(_lowercase(params));
|
|
4889
|
+
return this.check(/* @__PURE__ */ _lowercase(params));
|
|
5036
4890
|
},
|
|
5037
4891
|
uppercase(params) {
|
|
5038
|
-
return this.check(_uppercase(params));
|
|
4892
|
+
return this.check(/* @__PURE__ */ _uppercase(params));
|
|
5039
4893
|
},
|
|
5040
4894
|
trim() {
|
|
5041
|
-
return this.check(_trim());
|
|
4895
|
+
return this.check(/* @__PURE__ */ _trim());
|
|
5042
4896
|
},
|
|
5043
4897
|
normalize(...args) {
|
|
5044
|
-
return this.check(_normalize(...args));
|
|
4898
|
+
return this.check(/* @__PURE__ */ _normalize(...args));
|
|
5045
4899
|
},
|
|
5046
4900
|
toLowerCase() {
|
|
5047
|
-
return this.check(_toLowerCase());
|
|
4901
|
+
return this.check(/* @__PURE__ */ _toLowerCase());
|
|
5048
4902
|
},
|
|
5049
4903
|
toUpperCase() {
|
|
5050
|
-
return this.check(_toUpperCase());
|
|
4904
|
+
return this.check(/* @__PURE__ */ _toUpperCase());
|
|
5051
4905
|
},
|
|
5052
4906
|
slugify() {
|
|
5053
|
-
return this.check(_slugify());
|
|
4907
|
+
return this.check(/* @__PURE__ */ _slugify());
|
|
5054
4908
|
}
|
|
5055
4909
|
}));
|
|
5056
|
-
const ZodString =
|
|
4910
|
+
const ZodString = /*@__PURE__*/ $constructor("ZodString", (inst, def) => {
|
|
5057
4911
|
$ZodString.init(inst, def);
|
|
5058
4912
|
_ZodString.init(inst, def);
|
|
5059
4913
|
}, {
|
|
5060
4914
|
email(params) {
|
|
5061
|
-
return this.check(_email(ZodEmail, params));
|
|
4915
|
+
return this.check(/* @__PURE__ */ _email(ZodEmail, params));
|
|
5062
4916
|
},
|
|
5063
4917
|
url(params) {
|
|
5064
|
-
return this.check(_url(ZodURL, params));
|
|
4918
|
+
return this.check(/* @__PURE__ */ _url(ZodURL, params));
|
|
5065
4919
|
},
|
|
5066
4920
|
jwt(params) {
|
|
5067
|
-
return this.check(_jwt(ZodJWT, params));
|
|
4921
|
+
return this.check(/* @__PURE__ */ _jwt(ZodJWT, params));
|
|
5068
4922
|
},
|
|
5069
4923
|
emoji(params) {
|
|
5070
|
-
return this.check(_emoji(ZodEmoji, params));
|
|
4924
|
+
return this.check(/* @__PURE__ */ _emoji(ZodEmoji, params));
|
|
5071
4925
|
},
|
|
5072
4926
|
guid(params) {
|
|
5073
|
-
return this.check(_guid(ZodGUID, params));
|
|
4927
|
+
return this.check(/* @__PURE__ */ _guid(ZodGUID, params));
|
|
5074
4928
|
},
|
|
5075
4929
|
uuid(params) {
|
|
5076
|
-
return this.check(_uuid(ZodUUID, params));
|
|
4930
|
+
return this.check(/* @__PURE__ */ _uuid(ZodUUID, params));
|
|
5077
4931
|
},
|
|
5078
4932
|
uuidv4(params) {
|
|
5079
|
-
return this.check(_uuidv4(ZodUUID, params));
|
|
4933
|
+
return this.check(/* @__PURE__ */ _uuidv4(ZodUUID, params));
|
|
5080
4934
|
},
|
|
5081
4935
|
uuidv6(params) {
|
|
5082
|
-
return this.check(_uuidv6(ZodUUID, params));
|
|
4936
|
+
return this.check(/* @__PURE__ */ _uuidv6(ZodUUID, params));
|
|
5083
4937
|
},
|
|
5084
4938
|
uuidv7(params) {
|
|
5085
|
-
return this.check(_uuidv7(ZodUUID, params));
|
|
4939
|
+
return this.check(/* @__PURE__ */ _uuidv7(ZodUUID, params));
|
|
5086
4940
|
},
|
|
5087
4941
|
nanoid(params) {
|
|
5088
|
-
return this.check(_nanoid(ZodNanoID, params));
|
|
4942
|
+
return this.check(/* @__PURE__ */ _nanoid(ZodNanoID, params));
|
|
5089
4943
|
},
|
|
5090
4944
|
cuid(params) {
|
|
5091
|
-
return this.check(_cuid(ZodCUID, params));
|
|
4945
|
+
return this.check(/* @__PURE__ */ _cuid(ZodCUID, params));
|
|
5092
4946
|
},
|
|
5093
4947
|
cuid2(params) {
|
|
5094
|
-
return this.check(_cuid2(ZodCUID2, params));
|
|
4948
|
+
return this.check(/* @__PURE__ */ _cuid2(ZodCUID2, params));
|
|
5095
4949
|
},
|
|
5096
4950
|
ulid(params) {
|
|
5097
|
-
return this.check(_ulid(ZodULID, params));
|
|
4951
|
+
return this.check(/* @__PURE__ */ _ulid(ZodULID, params));
|
|
5098
4952
|
},
|
|
5099
4953
|
base64(params) {
|
|
5100
|
-
return this.check(_base64(ZodBase64, params));
|
|
4954
|
+
return this.check(/* @__PURE__ */ _base64(ZodBase64, params));
|
|
5101
4955
|
},
|
|
5102
4956
|
base64url(params) {
|
|
5103
|
-
return this.check(_base64url(ZodBase64URL, params));
|
|
4957
|
+
return this.check(/* @__PURE__ */ _base64url(ZodBase64URL, params));
|
|
5104
4958
|
},
|
|
5105
4959
|
xid(params) {
|
|
5106
|
-
return this.check(_xid(ZodXID, params));
|
|
4960
|
+
return this.check(/* @__PURE__ */ _xid(ZodXID, params));
|
|
5107
4961
|
},
|
|
5108
4962
|
ksuid(params) {
|
|
5109
|
-
return this.check(_ksuid(ZodKSUID, params));
|
|
4963
|
+
return this.check(/* @__PURE__ */ _ksuid(ZodKSUID, params));
|
|
5110
4964
|
},
|
|
5111
4965
|
ipv4(params) {
|
|
5112
|
-
return this.check(_ipv4(ZodIPv4, params));
|
|
4966
|
+
return this.check(/* @__PURE__ */ _ipv4(ZodIPv4, params));
|
|
5113
4967
|
},
|
|
5114
4968
|
ipv6(params) {
|
|
5115
|
-
return this.check(_ipv6(ZodIPv6, params));
|
|
4969
|
+
return this.check(/* @__PURE__ */ _ipv6(ZodIPv6, params));
|
|
5116
4970
|
},
|
|
5117
4971
|
cidrv4(params) {
|
|
5118
|
-
return this.check(_cidrv4(ZodCIDRv4, params));
|
|
4972
|
+
return this.check(/* @__PURE__ */ _cidrv4(ZodCIDRv4, params));
|
|
5119
4973
|
},
|
|
5120
4974
|
cidrv6(params) {
|
|
5121
|
-
return this.check(_cidrv6(ZodCIDRv6, params));
|
|
4975
|
+
return this.check(/* @__PURE__ */ _cidrv6(ZodCIDRv6, params));
|
|
5122
4976
|
},
|
|
5123
4977
|
e164(params) {
|
|
5124
|
-
return this.check(_e164(ZodE164, params));
|
|
4978
|
+
return this.check(/* @__PURE__ */ _e164(ZodE164, params));
|
|
5125
4979
|
},
|
|
5126
4980
|
datetime(params) {
|
|
5127
|
-
return this.check(_isoDateTime(ZodISODateTime, params));
|
|
4981
|
+
return this.check(/* @__PURE__ */ _isoDateTime(ZodISODateTime, params));
|
|
5128
4982
|
},
|
|
5129
4983
|
date(params) {
|
|
5130
|
-
return this.check(_isoDate(ZodISODate, params));
|
|
4984
|
+
return this.check(/* @__PURE__ */ _isoDate(ZodISODate, params));
|
|
5131
4985
|
},
|
|
5132
4986
|
time(params) {
|
|
5133
|
-
return this.check(_isoTime(ZodISOTime, params));
|
|
4987
|
+
return this.check(/* @__PURE__ */ _isoTime(ZodISOTime, params));
|
|
5134
4988
|
},
|
|
5135
4989
|
duration(params) {
|
|
5136
|
-
return this.check(_isoDuration(ZodISODuration, params));
|
|
4990
|
+
return this.check(/* @__PURE__ */ _isoDuration(ZodISODuration, params));
|
|
5137
4991
|
}
|
|
5138
4992
|
});
|
|
5139
4993
|
function string(params) {
|
|
5140
|
-
return _string(ZodString, params);
|
|
4994
|
+
return /* @__PURE__ */ _string(ZodString, params);
|
|
5141
4995
|
}
|
|
5142
|
-
const ZodStringFormat =
|
|
4996
|
+
const ZodStringFormat = /*@__PURE__*/ $constructor("ZodStringFormat", (inst, def) => {
|
|
5143
4997
|
$ZodStringFormat.init(inst, def);
|
|
5144
4998
|
_ZodString.init(inst, def);
|
|
5145
4999
|
});
|
|
5146
|
-
const ZodISODateTime =
|
|
5000
|
+
const ZodISODateTime = /*@__PURE__*/ $constructor("ZodISODateTime", (inst, def) => {
|
|
5147
5001
|
$ZodISODateTime.init(inst, def);
|
|
5148
5002
|
ZodStringFormat.init(inst, def);
|
|
5149
5003
|
});
|
|
5150
|
-
const ZodISODate =
|
|
5004
|
+
const ZodISODate = /*@__PURE__*/ $constructor("ZodISODate", (inst, def) => {
|
|
5151
5005
|
$ZodISODate.init(inst, def);
|
|
5152
5006
|
ZodStringFormat.init(inst, def);
|
|
5153
5007
|
});
|
|
5154
|
-
const ZodISOTime =
|
|
5008
|
+
const ZodISOTime = /*@__PURE__*/ $constructor("ZodISOTime", (inst, def) => {
|
|
5155
5009
|
$ZodISOTime.init(inst, def);
|
|
5156
5010
|
ZodStringFormat.init(inst, def);
|
|
5157
5011
|
});
|
|
5158
|
-
const ZodISODuration =
|
|
5012
|
+
const ZodISODuration = /*@__PURE__*/ $constructor("ZodISODuration", (inst, def) => {
|
|
5159
5013
|
$ZodISODuration.init(inst, def);
|
|
5160
5014
|
ZodStringFormat.init(inst, def);
|
|
5161
5015
|
});
|
|
5162
|
-
const ZodEmail =
|
|
5016
|
+
const ZodEmail = /*@__PURE__*/ $constructor("ZodEmail", (inst, def) => {
|
|
5163
5017
|
$ZodEmail.init(inst, def);
|
|
5164
5018
|
ZodStringFormat.init(inst, def);
|
|
5165
5019
|
});
|
|
5166
|
-
const ZodGUID =
|
|
5020
|
+
const ZodGUID = /*@__PURE__*/ $constructor("ZodGUID", (inst, def) => {
|
|
5167
5021
|
$ZodGUID.init(inst, def);
|
|
5168
5022
|
ZodStringFormat.init(inst, def);
|
|
5169
5023
|
});
|
|
5170
|
-
const ZodUUID =
|
|
5024
|
+
const ZodUUID = /*@__PURE__*/ $constructor("ZodUUID", (inst, def) => {
|
|
5171
5025
|
$ZodUUID.init(inst, def);
|
|
5172
5026
|
ZodStringFormat.init(inst, def);
|
|
5173
5027
|
});
|
|
5174
|
-
const ZodURL =
|
|
5028
|
+
const ZodURL = /*@__PURE__*/ $constructor("ZodURL", (inst, def) => {
|
|
5175
5029
|
$ZodURL.init(inst, def);
|
|
5176
5030
|
ZodStringFormat.init(inst, def);
|
|
5177
5031
|
});
|
|
5178
5032
|
function url(params) {
|
|
5179
|
-
return _url(ZodURL, params);
|
|
5033
|
+
return /* @__PURE__ */ _url(ZodURL, params);
|
|
5180
5034
|
}
|
|
5181
|
-
const ZodEmoji =
|
|
5035
|
+
const ZodEmoji = /*@__PURE__*/ $constructor("ZodEmoji", (inst, def) => {
|
|
5182
5036
|
$ZodEmoji.init(inst, def);
|
|
5183
5037
|
ZodStringFormat.init(inst, def);
|
|
5184
5038
|
});
|
|
5185
|
-
const ZodNanoID =
|
|
5039
|
+
const ZodNanoID = /*@__PURE__*/ $constructor("ZodNanoID", (inst, def) => {
|
|
5186
5040
|
$ZodNanoID.init(inst, def);
|
|
5187
5041
|
ZodStringFormat.init(inst, def);
|
|
5188
5042
|
});
|
|
@@ -5191,64 +5045,64 @@ const ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => {
|
|
|
5191
5045
|
* (timestamps embedded in the id). Use {@link ZodCUID2} instead.
|
|
5192
5046
|
* See https://github.com/paralleldrive/cuid.
|
|
5193
5047
|
*/
|
|
5194
|
-
const ZodCUID =
|
|
5048
|
+
const ZodCUID = /*@__PURE__*/ $constructor("ZodCUID", (inst, def) => {
|
|
5195
5049
|
$ZodCUID.init(inst, def);
|
|
5196
5050
|
ZodStringFormat.init(inst, def);
|
|
5197
5051
|
});
|
|
5198
|
-
const ZodCUID2 =
|
|
5052
|
+
const ZodCUID2 = /*@__PURE__*/ $constructor("ZodCUID2", (inst, def) => {
|
|
5199
5053
|
$ZodCUID2.init(inst, def);
|
|
5200
5054
|
ZodStringFormat.init(inst, def);
|
|
5201
5055
|
});
|
|
5202
|
-
const ZodULID =
|
|
5056
|
+
const ZodULID = /*@__PURE__*/ $constructor("ZodULID", (inst, def) => {
|
|
5203
5057
|
$ZodULID.init(inst, def);
|
|
5204
5058
|
ZodStringFormat.init(inst, def);
|
|
5205
5059
|
});
|
|
5206
|
-
const ZodXID =
|
|
5060
|
+
const ZodXID = /*@__PURE__*/ $constructor("ZodXID", (inst, def) => {
|
|
5207
5061
|
$ZodXID.init(inst, def);
|
|
5208
5062
|
ZodStringFormat.init(inst, def);
|
|
5209
5063
|
});
|
|
5210
|
-
const ZodKSUID =
|
|
5064
|
+
const ZodKSUID = /*@__PURE__*/ $constructor("ZodKSUID", (inst, def) => {
|
|
5211
5065
|
$ZodKSUID.init(inst, def);
|
|
5212
5066
|
ZodStringFormat.init(inst, def);
|
|
5213
5067
|
});
|
|
5214
|
-
const ZodIPv4 =
|
|
5068
|
+
const ZodIPv4 = /*@__PURE__*/ $constructor("ZodIPv4", (inst, def) => {
|
|
5215
5069
|
$ZodIPv4.init(inst, def);
|
|
5216
5070
|
ZodStringFormat.init(inst, def);
|
|
5217
5071
|
});
|
|
5218
|
-
const ZodIPv6 =
|
|
5072
|
+
const ZodIPv6 = /*@__PURE__*/ $constructor("ZodIPv6", (inst, def) => {
|
|
5219
5073
|
$ZodIPv6.init(inst, def);
|
|
5220
5074
|
ZodStringFormat.init(inst, def);
|
|
5221
5075
|
});
|
|
5222
|
-
const ZodCIDRv4 =
|
|
5076
|
+
const ZodCIDRv4 = /*@__PURE__*/ $constructor("ZodCIDRv4", (inst, def) => {
|
|
5223
5077
|
$ZodCIDRv4.init(inst, def);
|
|
5224
5078
|
ZodStringFormat.init(inst, def);
|
|
5225
5079
|
});
|
|
5226
|
-
const ZodCIDRv6 =
|
|
5080
|
+
const ZodCIDRv6 = /*@__PURE__*/ $constructor("ZodCIDRv6", (inst, def) => {
|
|
5227
5081
|
$ZodCIDRv6.init(inst, def);
|
|
5228
5082
|
ZodStringFormat.init(inst, def);
|
|
5229
5083
|
});
|
|
5230
|
-
const ZodBase64 =
|
|
5084
|
+
const ZodBase64 = /*@__PURE__*/ $constructor("ZodBase64", (inst, def) => {
|
|
5231
5085
|
$ZodBase64.init(inst, def);
|
|
5232
5086
|
ZodStringFormat.init(inst, def);
|
|
5233
5087
|
});
|
|
5234
|
-
const ZodBase64URL =
|
|
5088
|
+
const ZodBase64URL = /*@__PURE__*/ $constructor("ZodBase64URL", (inst, def) => {
|
|
5235
5089
|
$ZodBase64URL.init(inst, def);
|
|
5236
5090
|
ZodStringFormat.init(inst, def);
|
|
5237
5091
|
});
|
|
5238
|
-
const ZodE164 =
|
|
5092
|
+
const ZodE164 = /*@__PURE__*/ $constructor("ZodE164", (inst, def) => {
|
|
5239
5093
|
$ZodE164.init(inst, def);
|
|
5240
5094
|
ZodStringFormat.init(inst, def);
|
|
5241
5095
|
});
|
|
5242
|
-
const ZodJWT =
|
|
5096
|
+
const ZodJWT = /*@__PURE__*/ $constructor("ZodJWT", (inst, def) => {
|
|
5243
5097
|
$ZodJWT.init(inst, def);
|
|
5244
5098
|
ZodStringFormat.init(inst, def);
|
|
5245
5099
|
});
|
|
5246
|
-
const ZodNumber =
|
|
5100
|
+
const ZodNumber = /*@__PURE__*/ $constructor("ZodNumber", (inst, def) => {
|
|
5247
5101
|
$ZodNumber.init(inst, def);
|
|
5248
5102
|
ZodType.init(inst, def);
|
|
5249
5103
|
inst._zod.processJSONSchema = (ctx, json, params) => numberProcessor(inst, ctx, json, params);
|
|
5250
5104
|
inst.isFinite = true;
|
|
5251
|
-
},
|
|
5105
|
+
}, /*@__PURE__*/ derived({
|
|
5252
5106
|
minValue: (inst) => {
|
|
5253
5107
|
const { minimum, exclusiveMinimum } = aggregateChecks(inst);
|
|
5254
5108
|
return Math.max(minimum ?? Number.NEGATIVE_INFINITY, exclusiveMinimum ?? Number.NEGATIVE_INFINITY);
|
|
@@ -5264,22 +5118,22 @@ const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
|
5264
5118
|
format: (inst) => aggregateChecks(inst).format ?? null
|
|
5265
5119
|
}, {
|
|
5266
5120
|
gt(value, params) {
|
|
5267
|
-
return this.check(_gt(value, params));
|
|
5121
|
+
return this.check(/* @__PURE__ */ _gt(value, params));
|
|
5268
5122
|
},
|
|
5269
5123
|
gte(value, params) {
|
|
5270
|
-
return this.check(_gte(value, params));
|
|
5124
|
+
return this.check(/* @__PURE__ */ _gte(value, params));
|
|
5271
5125
|
},
|
|
5272
5126
|
min(value, params) {
|
|
5273
|
-
return this.check(_gte(value, params));
|
|
5127
|
+
return this.check(/* @__PURE__ */ _gte(value, params));
|
|
5274
5128
|
},
|
|
5275
5129
|
lt(value, params) {
|
|
5276
|
-
return this.check(_lt(value, params));
|
|
5130
|
+
return this.check(/* @__PURE__ */ _lt(value, params));
|
|
5277
5131
|
},
|
|
5278
5132
|
lte(value, params) {
|
|
5279
|
-
return this.check(_lte(value, params));
|
|
5133
|
+
return this.check(/* @__PURE__ */ _lte(value, params));
|
|
5280
5134
|
},
|
|
5281
5135
|
max(value, params) {
|
|
5282
|
-
return this.check(_lte(value, params));
|
|
5136
|
+
return this.check(/* @__PURE__ */ _lte(value, params));
|
|
5283
5137
|
},
|
|
5284
5138
|
int(params) {
|
|
5285
5139
|
return this.check(int(params));
|
|
@@ -5288,62 +5142,62 @@ const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
|
5288
5142
|
return this.check(int(params));
|
|
5289
5143
|
},
|
|
5290
5144
|
positive(params) {
|
|
5291
|
-
return this.check(_gt(0, params));
|
|
5145
|
+
return this.check(/* @__PURE__ */ _gt(0, params));
|
|
5292
5146
|
},
|
|
5293
5147
|
nonnegative(params) {
|
|
5294
|
-
return this.check(_gte(0, params));
|
|
5148
|
+
return this.check(/* @__PURE__ */ _gte(0, params));
|
|
5295
5149
|
},
|
|
5296
5150
|
negative(params) {
|
|
5297
|
-
return this.check(_lt(0, params));
|
|
5151
|
+
return this.check(/* @__PURE__ */ _lt(0, params));
|
|
5298
5152
|
},
|
|
5299
5153
|
nonpositive(params) {
|
|
5300
|
-
return this.check(_lte(0, params));
|
|
5154
|
+
return this.check(/* @__PURE__ */ _lte(0, params));
|
|
5301
5155
|
},
|
|
5302
5156
|
multipleOf(value, params) {
|
|
5303
|
-
return this.check(_multipleOf(value, params));
|
|
5157
|
+
return this.check(/* @__PURE__ */ _multipleOf(value, params));
|
|
5304
5158
|
},
|
|
5305
5159
|
step(value, params) {
|
|
5306
|
-
return this.check(_multipleOf(value, params));
|
|
5160
|
+
return this.check(/* @__PURE__ */ _multipleOf(value, params));
|
|
5307
5161
|
},
|
|
5308
5162
|
finite() {
|
|
5309
5163
|
return this;
|
|
5310
5164
|
}
|
|
5311
5165
|
}));
|
|
5312
5166
|
function number(params) {
|
|
5313
|
-
return _number(ZodNumber, params);
|
|
5167
|
+
return /* @__PURE__ */ _number(ZodNumber, params);
|
|
5314
5168
|
}
|
|
5315
|
-
const ZodNumberFormat =
|
|
5169
|
+
const ZodNumberFormat = /*@__PURE__*/ $constructor("ZodNumberFormat", (inst, def) => {
|
|
5316
5170
|
$ZodNumberFormat.init(inst, def);
|
|
5317
5171
|
ZodNumber.init(inst, def);
|
|
5318
5172
|
});
|
|
5319
5173
|
function int(params) {
|
|
5320
|
-
return _int(ZodNumberFormat, params);
|
|
5174
|
+
return /* @__PURE__ */ _int(ZodNumberFormat, params);
|
|
5321
5175
|
}
|
|
5322
|
-
const ZodBoolean =
|
|
5176
|
+
const ZodBoolean = /*@__PURE__*/ $constructor("ZodBoolean", (inst, def) => {
|
|
5323
5177
|
$ZodBoolean.init(inst, def);
|
|
5324
5178
|
ZodType.init(inst, def);
|
|
5325
5179
|
inst._zod.processJSONSchema = (ctx, json, params) => booleanProcessor(inst, ctx, json, params);
|
|
5326
5180
|
});
|
|
5327
5181
|
function boolean(params) {
|
|
5328
|
-
return _boolean(ZodBoolean, params);
|
|
5182
|
+
return /* @__PURE__ */ _boolean(ZodBoolean, params);
|
|
5329
5183
|
}
|
|
5330
|
-
const ZodUnknown =
|
|
5184
|
+
const ZodUnknown = /*@__PURE__*/ $constructor("ZodUnknown", (inst, def) => {
|
|
5331
5185
|
$ZodUnknown.init(inst, def);
|
|
5332
5186
|
ZodType.init(inst, def);
|
|
5333
|
-
inst._zod.processJSONSchema = (ctx, json, params) =>
|
|
5187
|
+
inst._zod.processJSONSchema = (ctx, json, params) => void 0;
|
|
5334
5188
|
});
|
|
5335
5189
|
function unknown() {
|
|
5336
|
-
return _unknown(ZodUnknown);
|
|
5190
|
+
return /* @__PURE__ */ _unknown(ZodUnknown);
|
|
5337
5191
|
}
|
|
5338
|
-
const ZodNever =
|
|
5192
|
+
const ZodNever = /*@__PURE__*/ $constructor("ZodNever", (inst, def) => {
|
|
5339
5193
|
$ZodNever.init(inst, def);
|
|
5340
5194
|
ZodType.init(inst, def);
|
|
5341
5195
|
inst._zod.processJSONSchema = (ctx, json, params) => neverProcessor(inst, ctx, json, params);
|
|
5342
5196
|
});
|
|
5343
5197
|
function never(params) {
|
|
5344
|
-
return _never(ZodNever, params);
|
|
5198
|
+
return /* @__PURE__ */ _never(ZodNever, params);
|
|
5345
5199
|
}
|
|
5346
|
-
const ZodArray =
|
|
5200
|
+
const ZodArray = /*@__PURE__*/ $constructor("ZodArray", (inst, def) => {
|
|
5347
5201
|
_ensureDefaultMemoizer();
|
|
5348
5202
|
$ZodArray.init(inst, def);
|
|
5349
5203
|
ZodType.init(inst, def);
|
|
@@ -5351,25 +5205,25 @@ const ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
|
|
|
5351
5205
|
inst.element = def.element;
|
|
5352
5206
|
}, {
|
|
5353
5207
|
min(n, params) {
|
|
5354
|
-
return this.check(_minLength(n, params));
|
|
5208
|
+
return this.check(/* @__PURE__ */ _minLength(n, params));
|
|
5355
5209
|
},
|
|
5356
5210
|
nonempty(params) {
|
|
5357
|
-
return this.check(_minLength(1, params));
|
|
5211
|
+
return this.check(/* @__PURE__ */ _minLength(1, params));
|
|
5358
5212
|
},
|
|
5359
5213
|
max(n, params) {
|
|
5360
|
-
return this.check(_maxLength(n, params));
|
|
5214
|
+
return this.check(/* @__PURE__ */ _maxLength(n, params));
|
|
5361
5215
|
},
|
|
5362
5216
|
length(n, params) {
|
|
5363
|
-
return this.check(_length(n, params));
|
|
5217
|
+
return this.check(/* @__PURE__ */ _length(n, params));
|
|
5364
5218
|
},
|
|
5365
5219
|
unwrap() {
|
|
5366
5220
|
return this.element;
|
|
5367
5221
|
}
|
|
5368
5222
|
});
|
|
5369
5223
|
function array(element, params) {
|
|
5370
|
-
return _array(ZodArray, element, params);
|
|
5224
|
+
return /* @__PURE__ */ _array(ZodArray, element, params);
|
|
5371
5225
|
}
|
|
5372
|
-
const ZodObject =
|
|
5226
|
+
const ZodObject = /*@__PURE__*/ $constructor("ZodObject", (inst, def) => {
|
|
5373
5227
|
_ensureDefaultMemoizer();
|
|
5374
5228
|
$ZodObjectJIT.init(inst, def);
|
|
5375
5229
|
ZodType.init(inst, def);
|
|
@@ -5427,7 +5281,7 @@ function object(shape, params) {
|
|
|
5427
5281
|
};
|
|
5428
5282
|
return new ZodObject(def);
|
|
5429
5283
|
}
|
|
5430
|
-
const ZodUnion =
|
|
5284
|
+
const ZodUnion = /*@__PURE__*/ $constructor("ZodUnion", (inst, def) => {
|
|
5431
5285
|
$ZodUnion.init(inst, def);
|
|
5432
5286
|
ZodType.init(inst, def);
|
|
5433
5287
|
inst._zod.processJSONSchema = (ctx, json, params) => unionProcessor(inst, ctx, json, params);
|
|
@@ -5440,7 +5294,7 @@ function union(options, params) {
|
|
|
5440
5294
|
...normalizeParams(params)
|
|
5441
5295
|
});
|
|
5442
5296
|
}
|
|
5443
|
-
const ZodDiscriminatedUnion =
|
|
5297
|
+
const ZodDiscriminatedUnion = /*@__PURE__*/ $constructor("ZodDiscriminatedUnion", (inst, def) => {
|
|
5444
5298
|
ZodUnion.init(inst, def);
|
|
5445
5299
|
$ZodDiscriminatedUnion.init(inst, def);
|
|
5446
5300
|
});
|
|
@@ -5452,7 +5306,7 @@ function discriminatedUnion(discriminator, options, params) {
|
|
|
5452
5306
|
...normalizeParams(params)
|
|
5453
5307
|
});
|
|
5454
5308
|
}
|
|
5455
|
-
const ZodIntersection =
|
|
5309
|
+
const ZodIntersection = /*@__PURE__*/ $constructor("ZodIntersection", (inst, def) => {
|
|
5456
5310
|
$ZodIntersection.init(inst, def);
|
|
5457
5311
|
ZodType.init(inst, def);
|
|
5458
5312
|
inst._zod.processJSONSchema = (ctx, json, params) => intersectionProcessor(inst, ctx, json, params);
|
|
@@ -5464,7 +5318,7 @@ function intersection(left, right) {
|
|
|
5464
5318
|
right
|
|
5465
5319
|
});
|
|
5466
5320
|
}
|
|
5467
|
-
const ZodRecord =
|
|
5321
|
+
const ZodRecord = /*@__PURE__*/ $constructor("ZodRecord", (inst, def) => {
|
|
5468
5322
|
_ensureDefaultMemoizer();
|
|
5469
5323
|
$ZodRecord.init(inst, def);
|
|
5470
5324
|
ZodType.init(inst, def);
|
|
@@ -5486,7 +5340,7 @@ function record(keyType, valueType, params) {
|
|
|
5486
5340
|
...normalizeParams(params)
|
|
5487
5341
|
});
|
|
5488
5342
|
}
|
|
5489
|
-
const ZodEnum =
|
|
5343
|
+
const ZodEnum = /*@__PURE__*/ $constructor("ZodEnum", (inst, def) => {
|
|
5490
5344
|
$ZodEnum.init(inst, def);
|
|
5491
5345
|
ZodType.init(inst, def);
|
|
5492
5346
|
inst._zod.processJSONSchema = (ctx, json, params) => enumProcessor(inst, ctx, json, params);
|
|
@@ -5524,7 +5378,7 @@ function _enum(values, params) {
|
|
|
5524
5378
|
...normalizeParams(params)
|
|
5525
5379
|
});
|
|
5526
5380
|
}
|
|
5527
|
-
const ZodLiteral =
|
|
5381
|
+
const ZodLiteral = /*@__PURE__*/ $constructor("ZodLiteral", (inst, def) => {
|
|
5528
5382
|
$ZodLiteral.init(inst, def);
|
|
5529
5383
|
ZodType.init(inst, def);
|
|
5530
5384
|
inst._zod.processJSONSchema = (ctx, json, params) => literalProcessor(inst, ctx, json, params);
|
|
@@ -5541,7 +5395,7 @@ function literal(value, params) {
|
|
|
5541
5395
|
...normalizeParams(params)
|
|
5542
5396
|
});
|
|
5543
5397
|
}
|
|
5544
|
-
const ZodTransform =
|
|
5398
|
+
const ZodTransform = /*@__PURE__*/ $constructor("ZodTransform", (inst, def) => {
|
|
5545
5399
|
_ensureDefaultMemoizer();
|
|
5546
5400
|
$ZodTransform.init(inst, def);
|
|
5547
5401
|
ZodType.init(inst, def);
|
|
@@ -5560,8 +5414,8 @@ const ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) =>
|
|
|
5560
5414
|
}
|
|
5561
5415
|
};
|
|
5562
5416
|
const output = def.transform(payload.value, payload);
|
|
5563
|
-
if (output instanceof Promise) return output.then((output
|
|
5564
|
-
payload.value = output
|
|
5417
|
+
if (output instanceof Promise) return output.then((output) => {
|
|
5418
|
+
payload.value = output;
|
|
5565
5419
|
return payload;
|
|
5566
5420
|
});
|
|
5567
5421
|
payload.value = output;
|
|
@@ -5574,7 +5428,7 @@ function transform(fn) {
|
|
|
5574
5428
|
transform: fn
|
|
5575
5429
|
});
|
|
5576
5430
|
}
|
|
5577
|
-
const ZodOptional =
|
|
5431
|
+
const ZodOptional = /*@__PURE__*/ $constructor("ZodOptional", (inst, def) => {
|
|
5578
5432
|
$ZodOptional.init(inst, def);
|
|
5579
5433
|
ZodType.init(inst, def);
|
|
5580
5434
|
inst._zod.processJSONSchema = (ctx, json, params) => optionalProcessor(inst, ctx, json, params);
|
|
@@ -5586,7 +5440,7 @@ function optional(innerType) {
|
|
|
5586
5440
|
innerType
|
|
5587
5441
|
});
|
|
5588
5442
|
}
|
|
5589
|
-
const ZodExactOptional =
|
|
5443
|
+
const ZodExactOptional = /*@__PURE__*/ $constructor("ZodExactOptional", (inst, def) => {
|
|
5590
5444
|
$ZodExactOptional.init(inst, def);
|
|
5591
5445
|
ZodType.init(inst, def);
|
|
5592
5446
|
inst._zod.processJSONSchema = (ctx, json, params) => optionalProcessor(inst, ctx, json, params);
|
|
@@ -5598,7 +5452,7 @@ function exactOptional(innerType) {
|
|
|
5598
5452
|
innerType
|
|
5599
5453
|
});
|
|
5600
5454
|
}
|
|
5601
|
-
const ZodNullable =
|
|
5455
|
+
const ZodNullable = /*@__PURE__*/ $constructor("ZodNullable", (inst, def) => {
|
|
5602
5456
|
$ZodNullable.init(inst, def);
|
|
5603
5457
|
ZodType.init(inst, def);
|
|
5604
5458
|
inst._zod.processJSONSchema = (ctx, json, params) => nullableProcessor(inst, ctx, json, params);
|
|
@@ -5610,7 +5464,7 @@ function nullable(innerType) {
|
|
|
5610
5464
|
innerType
|
|
5611
5465
|
});
|
|
5612
5466
|
}
|
|
5613
|
-
const ZodDefault =
|
|
5467
|
+
const ZodDefault = /*@__PURE__*/ $constructor("ZodDefault", (inst, def) => {
|
|
5614
5468
|
$ZodDefault.init(inst, def);
|
|
5615
5469
|
ZodType.init(inst, def);
|
|
5616
5470
|
inst._zod.processJSONSchema = (ctx, json, params) => defaultProcessor(inst, ctx, json, params);
|
|
@@ -5626,7 +5480,7 @@ function _default(innerType, defaultValue) {
|
|
|
5626
5480
|
}
|
|
5627
5481
|
});
|
|
5628
5482
|
}
|
|
5629
|
-
const ZodPrefault =
|
|
5483
|
+
const ZodPrefault = /*@__PURE__*/ $constructor("ZodPrefault", (inst, def) => {
|
|
5630
5484
|
$ZodPrefault.init(inst, def);
|
|
5631
5485
|
ZodType.init(inst, def);
|
|
5632
5486
|
inst._zod.processJSONSchema = (ctx, json, params) => prefaultProcessor(inst, ctx, json, params);
|
|
@@ -5641,7 +5495,7 @@ function prefault(innerType, defaultValue) {
|
|
|
5641
5495
|
}
|
|
5642
5496
|
});
|
|
5643
5497
|
}
|
|
5644
|
-
const ZodNonOptional =
|
|
5498
|
+
const ZodNonOptional = /*@__PURE__*/ $constructor("ZodNonOptional", (inst, def) => {
|
|
5645
5499
|
$ZodNonOptional.init(inst, def);
|
|
5646
5500
|
ZodType.init(inst, def);
|
|
5647
5501
|
inst._zod.processJSONSchema = (ctx, json, params) => nonoptionalProcessor(inst, ctx, json, params);
|
|
@@ -5654,7 +5508,7 @@ function nonoptional(innerType, params) {
|
|
|
5654
5508
|
...normalizeParams(params)
|
|
5655
5509
|
});
|
|
5656
5510
|
}
|
|
5657
|
-
const ZodCatch =
|
|
5511
|
+
const ZodCatch = /*@__PURE__*/ $constructor("ZodCatch", (inst, def) => {
|
|
5658
5512
|
$ZodCatch.init(inst, def);
|
|
5659
5513
|
ZodType.init(inst, def);
|
|
5660
5514
|
inst._zod.processJSONSchema = (ctx, json, params) => catchProcessor(inst, ctx, json, params);
|
|
@@ -5668,7 +5522,7 @@ function _catch(innerType, catchValue) {
|
|
|
5668
5522
|
catchValue: typeof catchValue === "function" ? catchValue : constantCatch(catchValue)
|
|
5669
5523
|
});
|
|
5670
5524
|
}
|
|
5671
|
-
const ZodPipe =
|
|
5525
|
+
const ZodPipe = /*@__PURE__*/ $constructor("ZodPipe", (inst, def) => {
|
|
5672
5526
|
$ZodPipe.init(inst, def);
|
|
5673
5527
|
ZodType.init(inst, def);
|
|
5674
5528
|
inst._zod.processJSONSchema = (ctx, json, params) => pipeProcessor(inst, ctx, json, params);
|
|
@@ -5682,7 +5536,7 @@ function pipe(in_, out) {
|
|
|
5682
5536
|
out
|
|
5683
5537
|
});
|
|
5684
5538
|
}
|
|
5685
|
-
const ZodReadonly =
|
|
5539
|
+
const ZodReadonly = /*@__PURE__*/ $constructor("ZodReadonly", (inst, def) => {
|
|
5686
5540
|
$ZodReadonly.init(inst, def);
|
|
5687
5541
|
ZodType.init(inst, def);
|
|
5688
5542
|
inst._zod.processJSONSchema = (ctx, json, params) => readonlyProcessor(inst, ctx, json, params);
|
|
@@ -5694,23 +5548,88 @@ function readonly(innerType) {
|
|
|
5694
5548
|
innerType
|
|
5695
5549
|
});
|
|
5696
5550
|
}
|
|
5697
|
-
const ZodCustom =
|
|
5551
|
+
const ZodCustom = /*@__PURE__*/ $constructor("ZodCustom", (inst, def) => {
|
|
5698
5552
|
$ZodCustom.init(inst, def);
|
|
5699
5553
|
ZodType.init(inst, def);
|
|
5700
5554
|
inst._zod.processJSONSchema = (ctx, json, params) => customProcessor(inst, ctx, json, params);
|
|
5701
5555
|
});
|
|
5702
5556
|
function custom(fn, _params) {
|
|
5703
|
-
return _custom(ZodCustom, fn ?? (() => true), _params);
|
|
5557
|
+
return /* @__PURE__ */ _custom(ZodCustom, fn ?? (() => true), _params);
|
|
5704
5558
|
}
|
|
5705
5559
|
function refine(fn, _params = {}) {
|
|
5706
|
-
return _refine(ZodCustom, fn, _params);
|
|
5560
|
+
return /* @__PURE__ */ _refine(ZodCustom, fn, _params);
|
|
5707
5561
|
}
|
|
5708
5562
|
function superRefine(fn, params) {
|
|
5709
|
-
return _superRefine(fn, params);
|
|
5563
|
+
return /* @__PURE__ */ _superRefine(fn, params);
|
|
5710
5564
|
}
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5565
|
+
//#endregion
|
|
5566
|
+
//#region src/workspace/stages.ts
|
|
5567
|
+
/**
|
|
5568
|
+
* What `gkm test` runs as. The CLI's own, so no project stage may take it:
|
|
5569
|
+
* its containers are torn down and rebuilt between runs.
|
|
5570
|
+
*/
|
|
5571
|
+
const TEST_STAGE = "test";
|
|
5572
|
+
/** A stage becomes part of every physical name, so it has to fit in one. */
|
|
5573
|
+
const STAGE_NAME = /^[a-z][a-z0-9-]*$/;
|
|
5574
|
+
/** Everything wrong with one stage name, or nothing. */
|
|
5575
|
+
function nameProblems(name) {
|
|
5576
|
+
const problems = [];
|
|
5577
|
+
if (!STAGE_NAME.test(name)) problems.push(`stage "${name}" must be lowercase letters, digits and hyphens, starting with a letter`);
|
|
5578
|
+
if (name === "test") problems.push(`stage "${TEST_STAGE}" is reserved for gkm test`);
|
|
5579
|
+
return problems;
|
|
5580
|
+
}
|
|
5581
|
+
/** Everything wrong with a list of deployed stages on its own. */
|
|
5582
|
+
function deployedProblems(deployed) {
|
|
5583
|
+
const problems = deployed.flatMap(nameProblems);
|
|
5584
|
+
const seen = /* @__PURE__ */ new Set();
|
|
5585
|
+
for (const name of deployed) {
|
|
5586
|
+
if (seen.has(name)) problems.push(`stage "${name}" is listed twice`);
|
|
5587
|
+
seen.add(name);
|
|
5588
|
+
}
|
|
5589
|
+
return problems;
|
|
5590
|
+
}
|
|
5591
|
+
/** Everything wrong with a stages block, or nothing. */
|
|
5592
|
+
function stageProblems(stages) {
|
|
5593
|
+
if (!stages) return ["`stages` is required, e.g. stages: { local: 'dev', deployed: ['prod'] }"];
|
|
5594
|
+
const { local, deployed, protected: kept = [] } = stages;
|
|
5595
|
+
const problems = [...nameProblems(local), ...deployedProblems(deployed)];
|
|
5596
|
+
if (deployed.includes(local)) problems.push(`"${local}" is both the local stage and a deployed one; they would share secrets`);
|
|
5597
|
+
for (const name of kept) if (!deployed.includes(name)) problems.push(`protected stage "${name}" is not a deployed stage`);
|
|
5598
|
+
return problems;
|
|
5599
|
+
}
|
|
5600
|
+
/** The stages block, or an error naming everything wrong with it. */
|
|
5601
|
+
function validateStages(stages) {
|
|
5602
|
+
const problems = stageProblems(stages);
|
|
5603
|
+
if (problems.length) throw new InvalidStages(problems);
|
|
5604
|
+
return stages;
|
|
5605
|
+
}
|
|
5606
|
+
/** Refuses a stage the project does not deploy to. */
|
|
5607
|
+
function assertDeployedStage(stages, stage) {
|
|
5608
|
+
if (!stages.deployed.includes(stage)) throw new UndeclaredStage(stage, stages.deployed);
|
|
5609
|
+
}
|
|
5610
|
+
/** A stages block — in gkm.config.ts or from `gkm init`'s flags — that breaks a rule. */
|
|
5611
|
+
var InvalidStages = class extends Error {
|
|
5612
|
+
problems;
|
|
5613
|
+
constructor(problems) {
|
|
5614
|
+
super(`Invalid stages:\n ${problems.join("\n ")}`);
|
|
5615
|
+
this.problems = problems;
|
|
5616
|
+
this.name = "InvalidStages";
|
|
5617
|
+
}
|
|
5618
|
+
};
|
|
5619
|
+
/**
|
|
5620
|
+
* A stage the project does not deploy to. Refused before anything is
|
|
5621
|
+
* provisioned, so a typo does not become a second environment.
|
|
5622
|
+
*/
|
|
5623
|
+
var UndeclaredStage = class extends Error {
|
|
5624
|
+
stage;
|
|
5625
|
+
deployed;
|
|
5626
|
+
constructor(stage, deployed) {
|
|
5627
|
+
super(`"${stage}" is not a deployed stage. gkm.config.ts deploys to: ${deployed.join(", ") || "nothing yet"}.`);
|
|
5628
|
+
this.stage = stage;
|
|
5629
|
+
this.deployed = deployed;
|
|
5630
|
+
this.name = "UndeclaredStage";
|
|
5631
|
+
}
|
|
5632
|
+
};
|
|
5714
5633
|
//#endregion
|
|
5715
5634
|
//#region src/workspace/schema.ts
|
|
5716
5635
|
/**
|
|
@@ -5759,34 +5678,22 @@ const OpenApiConfigSchema = object({
|
|
|
5759
5678
|
*/
|
|
5760
5679
|
const HooksConfigSchema = object({ server: string().optional() });
|
|
5761
5680
|
/**
|
|
5762
|
-
* Backend framework schema for non-gkm apps.
|
|
5763
|
-
*/
|
|
5764
|
-
const BackendFrameworkSchema = _enum([
|
|
5765
|
-
"hono",
|
|
5766
|
-
"better-auth",
|
|
5767
|
-
"express",
|
|
5768
|
-
"fastify"
|
|
5769
|
-
]);
|
|
5770
|
-
/**
|
|
5771
|
-
* Frontend framework schema.
|
|
5772
|
-
*/
|
|
5773
|
-
const FrontendFrameworkSchema = _enum([
|
|
5774
|
-
"nextjs",
|
|
5775
|
-
"remix",
|
|
5776
|
-
"vite",
|
|
5777
|
-
"tanstack-start"
|
|
5778
|
-
]);
|
|
5779
|
-
/**
|
|
5780
|
-
* Mobile framework schema.
|
|
5781
|
-
*/
|
|
5782
|
-
const MobileFrameworkSchema = _enum(["expo"]);
|
|
5783
|
-
/**
|
|
5784
5681
|
* Combined framework schema (backend, frontend, or mobile).
|
|
5785
5682
|
*/
|
|
5786
5683
|
const FrameworkSchema = union([
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5684
|
+
_enum([
|
|
5685
|
+
"hono",
|
|
5686
|
+
"better-auth",
|
|
5687
|
+
"express",
|
|
5688
|
+
"fastify"
|
|
5689
|
+
]),
|
|
5690
|
+
_enum([
|
|
5691
|
+
"nextjs",
|
|
5692
|
+
"remix",
|
|
5693
|
+
"vite",
|
|
5694
|
+
"tanstack-start"
|
|
5695
|
+
]),
|
|
5696
|
+
_enum(["expo"])
|
|
5790
5697
|
]);
|
|
5791
5698
|
/** Frontend framework values, kept in sync with FrontendFrameworkSchema. */
|
|
5792
5699
|
const FRONTEND_FRAMEWORKS = [
|
|
@@ -5831,76 +5738,21 @@ function isPhase2DeployTarget(target) {
|
|
|
5831
5738
|
* Get error message for unsupported deploy targets.
|
|
5832
5739
|
*/
|
|
5833
5740
|
function getDeployTargetError(target, appName) {
|
|
5834
|
-
if (isPhase2DeployTarget(target)) {
|
|
5835
|
-
const context = appName ? ` for app "${appName}"` : "";
|
|
5836
|
-
return `Deploy target "${target}"${context} is coming in Phase 2. Currently only "dokploy" is supported.`;
|
|
5837
|
-
}
|
|
5741
|
+
if (isPhase2DeployTarget(target)) return `Deploy target "${target}"${appName ? ` for app "${appName}"` : ""} is coming in Phase 2. Currently only "dokploy" is supported.`;
|
|
5838
5742
|
return `Unknown deploy target: ${target}. Supported: dokploy. Coming in Phase 2: vercel, cloudflare.`;
|
|
5839
5743
|
}
|
|
5840
5744
|
/**
|
|
5841
|
-
* Service image configuration schema.
|
|
5842
|
-
*/
|
|
5843
|
-
const ServiceImageConfigSchema = object({
|
|
5844
|
-
version: string().optional(),
|
|
5845
|
-
image: string().optional()
|
|
5846
|
-
});
|
|
5847
|
-
/**
|
|
5848
|
-
* Mail service configuration schema.
|
|
5849
|
-
*/
|
|
5850
|
-
const MailServiceConfigSchema = ServiceImageConfigSchema.extend({ smtp: object({
|
|
5851
|
-
host: string(),
|
|
5852
|
-
port: number(),
|
|
5853
|
-
user: string().optional(),
|
|
5854
|
-
pass: string().optional()
|
|
5855
|
-
}).optional() });
|
|
5856
|
-
/**
|
|
5857
|
-
* Services configuration schema.
|
|
5858
|
-
*/
|
|
5859
|
-
const ServicesConfigSchema = object({
|
|
5860
|
-
db: union([boolean(), ServiceImageConfigSchema]).optional(),
|
|
5861
|
-
cache: union([
|
|
5862
|
-
boolean(),
|
|
5863
|
-
ServiceImageConfigSchema,
|
|
5864
|
-
_enum([
|
|
5865
|
-
"upstash",
|
|
5866
|
-
"elasticache",
|
|
5867
|
-
"db"
|
|
5868
|
-
])
|
|
5869
|
-
]).optional(),
|
|
5870
|
-
mail: union([
|
|
5871
|
-
boolean(),
|
|
5872
|
-
MailServiceConfigSchema,
|
|
5873
|
-
_enum([
|
|
5874
|
-
"resend",
|
|
5875
|
-
"ses",
|
|
5876
|
-
"smtp"
|
|
5877
|
-
])
|
|
5878
|
-
]).optional(),
|
|
5879
|
-
storage: union([
|
|
5880
|
-
boolean(),
|
|
5881
|
-
ServiceImageConfigSchema,
|
|
5882
|
-
_enum([
|
|
5883
|
-
"minio",
|
|
5884
|
-
"s3",
|
|
5885
|
-
"r2"
|
|
5886
|
-
])
|
|
5887
|
-
]).optional(),
|
|
5888
|
-
events: _enum([
|
|
5889
|
-
"pgboss",
|
|
5890
|
-
"sns",
|
|
5891
|
-
"rabbitmq"
|
|
5892
|
-
]).optional(),
|
|
5893
|
-
trustLocalCa: boolean().optional()
|
|
5894
|
-
});
|
|
5895
|
-
/**
|
|
5896
5745
|
* Dokploy workspace configuration schema.
|
|
5897
5746
|
* Supports either a single endpoint or per-stage endpoints.
|
|
5898
5747
|
*/
|
|
5899
5748
|
const DokployWorkspaceConfigSchema = object({
|
|
5749
|
+
/** Single endpoint for all stages */
|
|
5900
5750
|
endpoint: url("Dokploy endpoint must be a valid URL").optional(),
|
|
5751
|
+
/** Per-stage endpoints (stage name -> endpoint URL) */
|
|
5901
5752
|
endpoints: record(string(), url("Endpoint must be a valid URL")).optional(),
|
|
5902
5753
|
registry: string().optional(),
|
|
5903
5754
|
registryId: string().optional(),
|
|
5755
|
+
/** Per-stage domain configuration (stage name -> base domain) */
|
|
5904
5756
|
domains: record(string(), string()).optional()
|
|
5905
5757
|
}).refine((data) => data.endpoint || data.endpoints, { message: "Either endpoint or endpoints must be provided" });
|
|
5906
5758
|
/**
|
|
@@ -5948,30 +5800,31 @@ const DnsRecordTypeSchema = _enum([
|
|
|
5948
5800
|
"SRV",
|
|
5949
5801
|
"CAA"
|
|
5950
5802
|
]);
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
*/
|
|
5954
|
-
const DnsRecordSchema = object({
|
|
5803
|
+
object({
|
|
5804
|
+
/** Subdomain name (e.g., 'api' for api.example.com, '@' for root) */
|
|
5955
5805
|
name: string(),
|
|
5806
|
+
/** Record type */
|
|
5956
5807
|
type: DnsRecordTypeSchema,
|
|
5808
|
+
/** TTL in seconds */
|
|
5957
5809
|
ttl: number().int().positive(),
|
|
5810
|
+
/** Record values */
|
|
5958
5811
|
values: array(string())
|
|
5959
5812
|
});
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
/**
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
record: UpsertDnsRecordSchema,
|
|
5813
|
+
object({
|
|
5814
|
+
/** The record that was upserted */
|
|
5815
|
+
record: object({
|
|
5816
|
+
/** Subdomain name (e.g., 'api' for api.example.com, '@' for root) */
|
|
5817
|
+
name: string(),
|
|
5818
|
+
/** Record type */
|
|
5819
|
+
type: DnsRecordTypeSchema,
|
|
5820
|
+
/** TTL in seconds */
|
|
5821
|
+
ttl: number().int().positive(),
|
|
5822
|
+
/** Record value (IP address, hostname, etc.) */
|
|
5823
|
+
value: string()
|
|
5824
|
+
}),
|
|
5825
|
+
/** Whether the record was created (true) or updated (false) */
|
|
5974
5826
|
created: boolean(),
|
|
5827
|
+
/** Whether the record already existed with the same value */
|
|
5975
5828
|
unchanged: boolean()
|
|
5976
5829
|
});
|
|
5977
5830
|
/**
|
|
@@ -5979,6 +5832,7 @@ const UpsertResultSchema = object({
|
|
|
5979
5832
|
*/
|
|
5980
5833
|
const HostingerDnsProviderSchema = object({
|
|
5981
5834
|
provider: literal("hostinger"),
|
|
5835
|
+
/** TTL in seconds (default: 300) */
|
|
5982
5836
|
ttl: number().int().positive().optional()
|
|
5983
5837
|
});
|
|
5984
5838
|
/**
|
|
@@ -5986,9 +5840,13 @@ const HostingerDnsProviderSchema = object({
|
|
|
5986
5840
|
*/
|
|
5987
5841
|
const Route53DnsProviderSchema = object({
|
|
5988
5842
|
provider: literal("route53"),
|
|
5843
|
+
/** AWS region (optional - uses AWS_REGION env var if not provided) */
|
|
5989
5844
|
region: AwsRegionSchema.optional(),
|
|
5845
|
+
/** AWS profile name (optional - uses default credential chain if not provided) */
|
|
5990
5846
|
profile: string().optional(),
|
|
5847
|
+
/** Hosted zone ID (optional - auto-detected from domain if not provided) */
|
|
5991
5848
|
hostedZoneId: string().optional(),
|
|
5849
|
+
/** TTL in seconds (default: 300) */
|
|
5992
5850
|
ttl: number().int().positive().optional()
|
|
5993
5851
|
});
|
|
5994
5852
|
/**
|
|
@@ -5996,6 +5854,7 @@ const Route53DnsProviderSchema = object({
|
|
|
5996
5854
|
*/
|
|
5997
5855
|
const CloudflareDnsProviderSchema = object({
|
|
5998
5856
|
provider: literal("cloudflare"),
|
|
5857
|
+
/** TTL in seconds (default: 300) */
|
|
5999
5858
|
ttl: number().int().positive().optional()
|
|
6000
5859
|
});
|
|
6001
5860
|
/**
|
|
@@ -6006,22 +5865,20 @@ const ManualDnsProviderSchema = object({ provider: literal("manual") });
|
|
|
6006
5865
|
* Custom DNS provider config (user-provided implementation).
|
|
6007
5866
|
*/
|
|
6008
5867
|
const CustomDnsProviderSchema = object({
|
|
5868
|
+
/** Custom DnsProvider implementation */
|
|
6009
5869
|
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" }),
|
|
5870
|
+
/** TTL in seconds (default: 300) */
|
|
6010
5871
|
ttl: number().int().positive().optional()
|
|
6011
5872
|
});
|
|
6012
5873
|
/**
|
|
6013
|
-
*
|
|
5874
|
+
* Single DNS provider config (for one domain).
|
|
6014
5875
|
*/
|
|
6015
|
-
const
|
|
5876
|
+
const DnsProviderSchema = union([discriminatedUnion("provider", [
|
|
6016
5877
|
HostingerDnsProviderSchema,
|
|
6017
5878
|
Route53DnsProviderSchema,
|
|
6018
5879
|
CloudflareDnsProviderSchema,
|
|
6019
5880
|
ManualDnsProviderSchema
|
|
6020
|
-
]);
|
|
6021
|
-
/**
|
|
6022
|
-
* Single DNS provider config (for one domain).
|
|
6023
|
-
*/
|
|
6024
|
-
const DnsProviderSchema = union([BuiltInDnsProviderSchema, CustomDnsProviderSchema]);
|
|
5881
|
+
]), CustomDnsProviderSchema]);
|
|
6025
5882
|
/**
|
|
6026
5883
|
* DNS configuration schema.
|
|
6027
5884
|
*
|
|
@@ -6047,17 +5904,15 @@ const Route53DnsConfigSchema = Route53DnsProviderSchema.extend({ domain: string(
|
|
|
6047
5904
|
const CloudflareDnsConfigSchema = CloudflareDnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
|
|
6048
5905
|
const ManualDnsConfigSchema = ManualDnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
|
|
6049
5906
|
const CustomDnsConfigSchema = CustomDnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
|
|
6050
|
-
|
|
5907
|
+
/**
|
|
5908
|
+
* Combined DNS config that supports both new multi-domain and legacy single-domain formats.
|
|
5909
|
+
*/
|
|
5910
|
+
const DnsConfigWithLegacySchema = union([DnsConfigSchema, union([discriminatedUnion("provider", [
|
|
6051
5911
|
HostingerDnsConfigSchema,
|
|
6052
5912
|
Route53DnsConfigSchema,
|
|
6053
5913
|
CloudflareDnsConfigSchema,
|
|
6054
5914
|
ManualDnsConfigSchema
|
|
6055
|
-
]);
|
|
6056
|
-
const LegacyDnsConfigSchema = union([BuiltInDnsConfigSchema, CustomDnsConfigSchema]);
|
|
6057
|
-
/**
|
|
6058
|
-
* Combined DNS config that supports both new multi-domain and legacy single-domain formats.
|
|
6059
|
-
*/
|
|
6060
|
-
const DnsConfigWithLegacySchema = union([DnsConfigSchema, LegacyDnsConfigSchema]);
|
|
5915
|
+
]), CustomDnsConfigSchema])]);
|
|
6061
5916
|
/**
|
|
6062
5917
|
* Backups configuration schema.
|
|
6063
5918
|
*
|
|
@@ -6065,10 +5920,15 @@ const DnsConfigWithLegacySchema = union([DnsConfigSchema, LegacyDnsConfigSchema]
|
|
|
6065
5920
|
* On first deploy, creates S3 bucket with unique name and IAM credentials.
|
|
6066
5921
|
*/
|
|
6067
5922
|
const BackupsConfigSchema = object({
|
|
5923
|
+
/** Backup storage type (currently only 's3' supported) */
|
|
6068
5924
|
type: literal("s3"),
|
|
5925
|
+
/** AWS profile name for creating bucket/IAM resources */
|
|
6069
5926
|
profile: string().optional(),
|
|
5927
|
+
/** AWS region for the backup bucket */
|
|
6070
5928
|
region: AwsRegionSchema,
|
|
5929
|
+
/** Cron schedule for backups (default: '0 2 * * *' = 2 AM daily) */
|
|
6071
5930
|
schedule: string().optional(),
|
|
5931
|
+
/** Number of backups to retain (default: 30) */
|
|
6072
5932
|
retention: number().optional()
|
|
6073
5933
|
});
|
|
6074
5934
|
/**
|
|
@@ -6097,8 +5957,29 @@ const SharedConfigSchema = object({
|
|
|
6097
5957
|
/**
|
|
6098
5958
|
* Secrets configuration schema.
|
|
6099
5959
|
*/
|
|
5960
|
+
const StagesConfigSchema = object({
|
|
5961
|
+
local: string(),
|
|
5962
|
+
deployed: array(string()),
|
|
5963
|
+
protected: array(string()).optional()
|
|
5964
|
+
}).superRefine((stages, ctx) => {
|
|
5965
|
+
for (const message of stageProblems(stages)) ctx.addIssue({
|
|
5966
|
+
code: "custom",
|
|
5967
|
+
message
|
|
5968
|
+
});
|
|
5969
|
+
});
|
|
5970
|
+
const SecretsStoreSchema = union([
|
|
5971
|
+
literal("file"),
|
|
5972
|
+
object({
|
|
5973
|
+
provider: literal("ssm"),
|
|
5974
|
+
region: AwsRegionSchema
|
|
5975
|
+
}).strict(),
|
|
5976
|
+
object({
|
|
5977
|
+
/** Any backend: an object implementing SecretsStore */
|
|
5978
|
+
provider: custom((val) => typeof val === "object" && val !== null && typeof val.name === "string" && typeof val.read === "function" && typeof val.write === "function", { message: "a secrets store has a name, read() and write()" }) })
|
|
5979
|
+
]);
|
|
6100
5980
|
const SecretsConfigSchema = object({
|
|
6101
5981
|
enabled: boolean().optional(),
|
|
5982
|
+
store: SecretsStoreSchema.optional(),
|
|
6102
5983
|
algorithm: string().optional(),
|
|
6103
5984
|
kdf: _enum(["scrypt", "pbkdf2"]).optional()
|
|
6104
5985
|
});
|
|
@@ -6111,17 +5992,17 @@ const LocalStateConfigSchema = object({ provider: literal("local") });
|
|
|
6111
5992
|
*/
|
|
6112
5993
|
const SSMStateConfigSchema = object({
|
|
6113
5994
|
provider: literal("ssm"),
|
|
5995
|
+
/** AWS region (required for SSM provider) */
|
|
6114
5996
|
region: AwsRegionSchema,
|
|
5997
|
+
/** AWS profile name (optional - uses default credential chain if not provided) */
|
|
6115
5998
|
profile: string().optional()
|
|
6116
5999
|
});
|
|
6117
6000
|
/**
|
|
6118
6001
|
* Custom state provider config (user-provided implementation).
|
|
6119
6002
|
*/
|
|
6120
|
-
const CustomStateConfigSchema = object({
|
|
6121
|
-
/**
|
|
6122
|
-
|
|
6123
|
-
*/
|
|
6124
|
-
const BuiltInStateConfigSchema = discriminatedUnion("provider", [LocalStateConfigSchema, SSMStateConfigSchema]);
|
|
6003
|
+
const CustomStateConfigSchema = object({
|
|
6004
|
+
/** Custom StateProvider implementation */
|
|
6005
|
+
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" }) });
|
|
6125
6006
|
/**
|
|
6126
6007
|
* State configuration schema.
|
|
6127
6008
|
*
|
|
@@ -6130,7 +6011,7 @@ const BuiltInStateConfigSchema = discriminatedUnion("provider", [LocalStateConfi
|
|
|
6130
6011
|
* - 'ssm': Store in AWS SSM Parameter Store (requires region)
|
|
6131
6012
|
* - Custom: Provide a StateProvider implementation with read/write methods
|
|
6132
6013
|
*/
|
|
6133
|
-
const StateConfigSchema = union([
|
|
6014
|
+
const StateConfigSchema = union([discriminatedUnion("provider", [LocalStateConfigSchema, SSMStateConfigSchema]), CustomStateConfigSchema]);
|
|
6134
6015
|
/**
|
|
6135
6016
|
* App configuration schema.
|
|
6136
6017
|
*/
|
|
@@ -6190,19 +6071,41 @@ const AppConfigSchema = object({
|
|
|
6190
6071
|
message: `Mobile apps must have a valid mobile framework (${MOBILE_FRAMEWORKS.join(", ")})`,
|
|
6191
6072
|
path: ["framework"]
|
|
6192
6073
|
});
|
|
6074
|
+
/** What `gkm test` hands a feature test. */
|
|
6075
|
+
const TestConfigSchema = object({
|
|
6076
|
+
/** The folder of per-database factories; `test/factories` by default. */
|
|
6077
|
+
factories: string().optional() }).strict();
|
|
6193
6078
|
/**
|
|
6194
6079
|
* Workspace configuration schema.
|
|
6195
6080
|
*/
|
|
6196
6081
|
const WorkspaceConfigSchema = object({
|
|
6197
6082
|
name: string().optional(),
|
|
6083
|
+
/**
|
|
6084
|
+
* Where the workspace's own constructs live, relative to its root.
|
|
6085
|
+
*
|
|
6086
|
+
* Infrastructure is a fact about the product, not about the process that
|
|
6087
|
+
* happens to import it — so a database two apps share is declared once,
|
|
6088
|
+
* at the top, and both find it. An app-level glob still works and is
|
|
6089
|
+
* additive, for something only one app uses.
|
|
6090
|
+
*/
|
|
6198
6091
|
constructs: RoutesSchema.optional(),
|
|
6092
|
+
/**
|
|
6093
|
+
* Apps that nothing declares.
|
|
6094
|
+
*
|
|
6095
|
+
* Optional, and normally absent: a `site` is an app and so is a
|
|
6096
|
+
* `rest-api` that named one, so the list is read off the graph. This is
|
|
6097
|
+
* the escape hatch for what no construct describes — a mobile app, a
|
|
6098
|
+
* process someone runs by hand — and for overriding one field of a
|
|
6099
|
+
* derived app without restating it.
|
|
6100
|
+
*/
|
|
6199
6101
|
apps: record(string(), AppConfigSchema).optional(),
|
|
6200
6102
|
shared: SharedConfigSchema.optional(),
|
|
6201
6103
|
deploy: DeployConfigSchema.optional(),
|
|
6202
|
-
|
|
6104
|
+
stages: StagesConfigSchema,
|
|
6203
6105
|
secrets: SecretsConfigSchema.optional(),
|
|
6204
|
-
state: StateConfigSchema.optional()
|
|
6205
|
-
|
|
6106
|
+
state: StateConfigSchema.optional(),
|
|
6107
|
+
test: TestConfigSchema.optional()
|
|
6108
|
+
}).strict().refine((data) => {
|
|
6206
6109
|
const appNames = Object.keys(data.apps ?? {});
|
|
6207
6110
|
for (const [appName, app] of Object.entries(data.apps ?? {})) for (const dep of app.dependencies ?? []) {
|
|
6208
6111
|
if (!appNames.includes(dep)) return false;
|
|
@@ -6261,14 +6164,14 @@ const WorkspaceConfigSchema = object({
|
|
|
6261
6164
|
* Validate workspace configuration.
|
|
6262
6165
|
* Throws ZodError with detailed messages on validation failure.
|
|
6263
6166
|
*/
|
|
6264
|
-
function validateWorkspaceConfig(config
|
|
6265
|
-
return WorkspaceConfigSchema.parse(config
|
|
6167
|
+
function validateWorkspaceConfig(config) {
|
|
6168
|
+
return WorkspaceConfigSchema.parse(config);
|
|
6266
6169
|
}
|
|
6267
6170
|
/**
|
|
6268
6171
|
* Safe validation that returns result instead of throwing.
|
|
6269
6172
|
*/
|
|
6270
|
-
function safeValidateWorkspaceConfig(config
|
|
6271
|
-
const result = WorkspaceConfigSchema.safeParse(config
|
|
6173
|
+
function safeValidateWorkspaceConfig(config) {
|
|
6174
|
+
const result = WorkspaceConfigSchema.safeParse(config);
|
|
6272
6175
|
if (result.success) return {
|
|
6273
6176
|
success: true,
|
|
6274
6177
|
data: result.data
|
|
@@ -6281,14 +6184,12 @@ function safeValidateWorkspaceConfig(config$1) {
|
|
|
6281
6184
|
/**
|
|
6282
6185
|
* Format Zod errors into user-friendly messages.
|
|
6283
6186
|
*/
|
|
6284
|
-
function formatValidationErrors(error
|
|
6285
|
-
|
|
6286
|
-
const path = issue
|
|
6287
|
-
return path ? ` - ${path}: ${issue
|
|
6288
|
-
})
|
|
6289
|
-
return `Workspace configuration validation failed:\n${messages.join("\n")}`;
|
|
6187
|
+
function formatValidationErrors(error) {
|
|
6188
|
+
return `Workspace configuration validation failed:\n${error.issues.map((issue) => {
|
|
6189
|
+
const path = issue.path.join(".");
|
|
6190
|
+
return path ? ` - ${path}: ${issue.message}` : ` - ${issue.message}`;
|
|
6191
|
+
}).join("\n")}`;
|
|
6290
6192
|
}
|
|
6291
|
-
|
|
6292
6193
|
//#endregion
|
|
6293
6194
|
//#region src/workspace/types.ts
|
|
6294
6195
|
/**
|
|
@@ -6303,12 +6204,68 @@ function formatValidationErrors(error$1) {
|
|
|
6303
6204
|
* }
|
|
6304
6205
|
* ```
|
|
6305
6206
|
*/
|
|
6306
|
-
function isWorkspaceConfig(config
|
|
6307
|
-
if (typeof config
|
|
6308
|
-
if ("apps" in config
|
|
6309
|
-
return "constructs" in config
|
|
6207
|
+
function isWorkspaceConfig(config) {
|
|
6208
|
+
if (typeof config !== "object" || config === null) return false;
|
|
6209
|
+
if ("apps" in config && typeof config.apps === "object") return true;
|
|
6210
|
+
return "constructs" in config && Object.keys(config).every((key) => WORKSPACE_KEYS.has(key));
|
|
6211
|
+
}
|
|
6212
|
+
/** Every top-level key a workspace config has — see `WorkspaceConfigSchema`. */
|
|
6213
|
+
const WORKSPACE_KEYS = /* @__PURE__ */ new Set([
|
|
6214
|
+
"name",
|
|
6215
|
+
"constructs",
|
|
6216
|
+
"apps",
|
|
6217
|
+
"shared",
|
|
6218
|
+
"deploy",
|
|
6219
|
+
"stages",
|
|
6220
|
+
"secrets",
|
|
6221
|
+
"state"
|
|
6222
|
+
]);
|
|
6223
|
+
//#endregion
|
|
6224
|
+
//#region src/workspace/publicEnv.ts
|
|
6225
|
+
/**
|
|
6226
|
+
* All public env-var prefixes the toolbox understands.
|
|
6227
|
+
*
|
|
6228
|
+
* Used when resolving incoming var names back to a dependency
|
|
6229
|
+
* (e.g. `VITE_AUTH_URL` → `auth`). A var matching any of these
|
|
6230
|
+
* is considered safe to inline into a client bundle.
|
|
6231
|
+
*/
|
|
6232
|
+
const PUBLIC_ENV_PREFIXES = [
|
|
6233
|
+
"NEXT_PUBLIC_",
|
|
6234
|
+
"VITE_",
|
|
6235
|
+
"EXPO_PUBLIC_"
|
|
6236
|
+
];
|
|
6237
|
+
/**
|
|
6238
|
+
* Resolve the public env-var prefix that a frontend framework's bundler
|
|
6239
|
+
* inlines into client code at build time:
|
|
6240
|
+
*
|
|
6241
|
+
* - `nextjs` → `NEXT_PUBLIC_`
|
|
6242
|
+
* - `vite` → `VITE_`
|
|
6243
|
+
* - `tanstack-start` → `VITE_` (uses Vite under the hood)
|
|
6244
|
+
* - `expo` → `EXPO_PUBLIC_`
|
|
6245
|
+
* - `remix` → `''` (Remix exposes via loaders, no prefix convention)
|
|
6246
|
+
*
|
|
6247
|
+
* For backend frameworks or unspecified, falls back to `NEXT_PUBLIC_` to
|
|
6248
|
+
* preserve the historical default. Backend apps never read these vars
|
|
6249
|
+
* from a bundle, so the prefix only affects scaffolding/symmetry.
|
|
6250
|
+
*/
|
|
6251
|
+
function getPublicEnvPrefix(framework) {
|
|
6252
|
+
switch (framework) {
|
|
6253
|
+
case "vite":
|
|
6254
|
+
case "tanstack-start": return "VITE_";
|
|
6255
|
+
case "expo": return "EXPO_PUBLIC_";
|
|
6256
|
+
case "remix": return "";
|
|
6257
|
+
case "nextjs": return "NEXT_PUBLIC_";
|
|
6258
|
+
default: return "NEXT_PUBLIC_";
|
|
6259
|
+
}
|
|
6260
|
+
}
|
|
6261
|
+
/**
|
|
6262
|
+
* Strip a known public prefix from a var name.
|
|
6263
|
+
* Returns the un-prefixed name, or `null` if no prefix matched.
|
|
6264
|
+
*/
|
|
6265
|
+
function stripPublicPrefix(name) {
|
|
6266
|
+
for (const prefix of PUBLIC_ENV_PREFIXES) if (prefix && name.startsWith(prefix)) return name.slice(prefix.length);
|
|
6267
|
+
return null;
|
|
6310
6268
|
}
|
|
6311
|
-
|
|
6312
6269
|
//#endregion
|
|
6313
6270
|
//#region src/workspace/index.ts
|
|
6314
6271
|
/**
|
|
@@ -6354,51 +6311,47 @@ function validateDependencies(apps) {
|
|
|
6354
6311
|
* dependencies: ['api'], // <- autocomplete shows 'api' | 'web'
|
|
6355
6312
|
* },
|
|
6356
6313
|
* },
|
|
6357
|
-
* services: {
|
|
6358
|
-
* db: true,
|
|
6359
|
-
* cache: true,
|
|
6360
|
-
* },
|
|
6361
6314
|
* });
|
|
6362
6315
|
*
|
|
6363
6316
|
* // config.apps.api <- full type inference
|
|
6364
6317
|
* // config.apps.foo <- TypeScript error
|
|
6365
6318
|
* ```
|
|
6366
6319
|
*/
|
|
6367
|
-
function defineWorkspace(config
|
|
6368
|
-
if (config
|
|
6369
|
-
const result = safeValidateWorkspaceConfig(config
|
|
6320
|
+
function defineWorkspace(config) {
|
|
6321
|
+
if (config.apps) validateDependencies(config.apps);
|
|
6322
|
+
const result = safeValidateWorkspaceConfig(config);
|
|
6370
6323
|
if (!result.success && result.error) throw new Error(formatValidationErrors(result.error));
|
|
6371
|
-
return config
|
|
6324
|
+
return config;
|
|
6372
6325
|
}
|
|
6373
6326
|
/**
|
|
6374
6327
|
* Get the package name from package.json in the given directory.
|
|
6375
6328
|
*/
|
|
6376
6329
|
function getPackageName(cwd) {
|
|
6377
6330
|
try {
|
|
6378
|
-
|
|
6379
|
-
return pkg.name?.replace(/^@[^/]+\//, "");
|
|
6331
|
+
return __require(`${cwd}/package.json`).name?.replace(/^@[^/]+\//, "");
|
|
6380
6332
|
} catch {
|
|
6381
|
-
return
|
|
6333
|
+
return;
|
|
6382
6334
|
}
|
|
6383
6335
|
}
|
|
6384
6336
|
/**
|
|
6385
6337
|
* Normalize a workspace configuration with resolved defaults.
|
|
6386
6338
|
*/
|
|
6387
|
-
function normalizeWorkspace(config
|
|
6388
|
-
const name = config
|
|
6389
|
-
const defaultTarget = config
|
|
6339
|
+
function normalizeWorkspace(config, cwd) {
|
|
6340
|
+
const name = config.name ?? getPackageName(cwd) ?? basename(cwd);
|
|
6341
|
+
const defaultTarget = config.deploy?.default ?? "dokploy";
|
|
6390
6342
|
const normalizedApps = {};
|
|
6391
|
-
for (const [appName, app] of Object.entries(config
|
|
6343
|
+
for (const [appName, app] of Object.entries(config.apps ?? {})) normalizedApps[appName] = normalizeAppConfig(app, defaultTarget);
|
|
6392
6344
|
return {
|
|
6393
6345
|
name,
|
|
6394
6346
|
root: cwd,
|
|
6395
|
-
...config
|
|
6347
|
+
...config.constructs ? { constructs: config.constructs } : {},
|
|
6396
6348
|
apps: normalizedApps,
|
|
6397
|
-
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
secrets: config
|
|
6401
|
-
state: config
|
|
6349
|
+
deploy: config.deploy ?? { default: "dokploy" },
|
|
6350
|
+
shared: config.shared ?? { packages: ["packages/*"] },
|
|
6351
|
+
stages: validateStages(config.stages),
|
|
6352
|
+
secrets: config.secrets ?? {},
|
|
6353
|
+
state: config.state,
|
|
6354
|
+
test: config.test ?? {}
|
|
6402
6355
|
};
|
|
6403
6356
|
}
|
|
6404
6357
|
/**
|
|
@@ -6420,63 +6373,53 @@ function normalizeAppConfig(app, defaultTarget) {
|
|
|
6420
6373
|
* Wrap a single-app GkmConfig as a workspace.
|
|
6421
6374
|
* This allows existing single-app configs to work seamlessly.
|
|
6422
6375
|
*/
|
|
6423
|
-
function wrapSingleAppAsWorkspace(config
|
|
6424
|
-
const name = config$1.name ?? getPackageName(cwd) ?? basename(cwd);
|
|
6425
|
-
const normalizedServices = { ...config$1.services ?? {} };
|
|
6426
|
-
const app = {
|
|
6427
|
-
type: "backend",
|
|
6428
|
-
path: ".",
|
|
6429
|
-
port: (typeof config$1.providers?.server === "object" ? config$1.providers.server.port : void 0) ?? 3e3,
|
|
6430
|
-
dependencies: [],
|
|
6431
|
-
resolvedDeployTarget: config$1.deploy?.default ?? "dokploy",
|
|
6432
|
-
constructs: config$1.constructs,
|
|
6433
|
-
routes: config$1.routes,
|
|
6434
|
-
functions: config$1.functions,
|
|
6435
|
-
crons: config$1.crons,
|
|
6436
|
-
queues: config$1.queues,
|
|
6437
|
-
topics: config$1.topics,
|
|
6438
|
-
subscribers: config$1.subscribers,
|
|
6439
|
-
envParser: config$1.envParser,
|
|
6440
|
-
logger: config$1.logger,
|
|
6441
|
-
providers: config$1.providers,
|
|
6442
|
-
hooks: config$1.hooks,
|
|
6443
|
-
telescope: config$1.telescope,
|
|
6444
|
-
studio: config$1.studio,
|
|
6445
|
-
openapi: config$1.openapi,
|
|
6446
|
-
runtime: config$1.runtime,
|
|
6447
|
-
env: config$1.env
|
|
6448
|
-
};
|
|
6376
|
+
function wrapSingleAppAsWorkspace(config, cwd) {
|
|
6449
6377
|
return {
|
|
6450
|
-
name,
|
|
6378
|
+
name: config.name ?? getPackageName(cwd) ?? basename(cwd),
|
|
6451
6379
|
root: cwd,
|
|
6452
|
-
apps: { api:
|
|
6453
|
-
|
|
6380
|
+
apps: { api: {
|
|
6381
|
+
type: "backend",
|
|
6382
|
+
path: ".",
|
|
6383
|
+
port: (typeof config.providers?.server === "object" ? config.providers.server.port : void 0) ?? 3e3,
|
|
6384
|
+
dependencies: [],
|
|
6385
|
+
resolvedDeployTarget: config.deploy?.default ?? "dokploy",
|
|
6386
|
+
constructs: config.constructs,
|
|
6387
|
+
providers: config.providers,
|
|
6388
|
+
hooks: config.hooks,
|
|
6389
|
+
telescope: config.telescope,
|
|
6390
|
+
studio: config.studio,
|
|
6391
|
+
openapi: config.openapi,
|
|
6392
|
+
runtime: config.runtime,
|
|
6393
|
+
env: config.env
|
|
6394
|
+
} },
|
|
6454
6395
|
deploy: {
|
|
6455
6396
|
default: "dokploy",
|
|
6456
|
-
...config
|
|
6397
|
+
...config.deploy
|
|
6457
6398
|
},
|
|
6458
6399
|
shared: { packages: [] },
|
|
6459
|
-
|
|
6400
|
+
stages: validateStages(config.stages),
|
|
6401
|
+
secrets: config.secrets ?? {},
|
|
6402
|
+
test: config.test ?? {}
|
|
6460
6403
|
};
|
|
6461
6404
|
}
|
|
6462
6405
|
/**
|
|
6463
6406
|
* Process a loaded configuration (either single-app or workspace).
|
|
6464
6407
|
* Returns a normalized workspace in both cases.
|
|
6465
6408
|
*/
|
|
6466
|
-
function processConfig(config
|
|
6467
|
-
if (isWorkspaceConfig(config
|
|
6468
|
-
const result = safeValidateWorkspaceConfig(config
|
|
6409
|
+
function processConfig(config, cwd) {
|
|
6410
|
+
if (isWorkspaceConfig(config)) {
|
|
6411
|
+
const result = safeValidateWorkspaceConfig(config);
|
|
6469
6412
|
if (!result.success && result.error) throw new Error(formatValidationErrors(result.error));
|
|
6470
6413
|
return {
|
|
6471
6414
|
type: "workspace",
|
|
6472
|
-
raw: config
|
|
6473
|
-
workspace: normalizeWorkspace(config
|
|
6415
|
+
raw: config,
|
|
6416
|
+
workspace: normalizeWorkspace(config, cwd)
|
|
6474
6417
|
};
|
|
6475
6418
|
}
|
|
6476
6419
|
return {
|
|
6477
6420
|
type: "single",
|
|
6478
|
-
raw: config
|
|
6479
|
-
workspace: wrapSingleAppAsWorkspace(config
|
|
6421
|
+
raw: config,
|
|
6422
|
+
workspace: wrapSingleAppAsWorkspace(config, cwd)
|
|
6480
6423
|
};
|
|
6481
6424
|
}
|
|
6482
6425
|
/**
|
|
@@ -6533,18 +6476,11 @@ function constructPatterns(routes) {
|
|
|
6533
6476
|
*/
|
|
6534
6477
|
function getAppGkmConfig(workspace, appName) {
|
|
6535
6478
|
const app = workspace.apps[appName];
|
|
6536
|
-
if (!app || app.type !== "backend") return
|
|
6479
|
+
if (!app || app.type !== "backend") return;
|
|
6537
6480
|
return {
|
|
6538
|
-
|
|
6481
|
+
...workspace.deploy ? { deploy: workspace.deploy } : {},
|
|
6482
|
+
stages: workspace.stages,
|
|
6539
6483
|
constructs: appConstructGlobs(workspace, appName),
|
|
6540
|
-
routes: app.routes ?? "",
|
|
6541
|
-
functions: app.functions,
|
|
6542
|
-
crons: app.crons,
|
|
6543
|
-
queues: app.queues,
|
|
6544
|
-
topics: app.topics,
|
|
6545
|
-
subscribers: app.subscribers,
|
|
6546
|
-
envParser: app.envParser ?? "",
|
|
6547
|
-
logger: app.logger ?? "",
|
|
6548
6484
|
providers: app.providers,
|
|
6549
6485
|
hooks: app.hooks,
|
|
6550
6486
|
telescope: app.telescope,
|
|
@@ -6573,31 +6509,6 @@ function getAppBuildOrder(workspace) {
|
|
|
6573
6509
|
return result;
|
|
6574
6510
|
}
|
|
6575
6511
|
/**
|
|
6576
|
-
* Generate environment variables for app dependencies.
|
|
6577
|
-
*
|
|
6578
|
-
* Each dependency gets the un-prefixed `{DEP}_URL` (for server-side use) and,
|
|
6579
|
-
* when the consuming app's framework supports a public-var prefix, also the
|
|
6580
|
-
* prefixed form (e.g. `NEXT_PUBLIC_{DEP}_URL` for Next.js, `VITE_{DEP}_URL`
|
|
6581
|
-
* for Vite/TanStack Start). The prefixed form is what gets bundled into the
|
|
6582
|
-
* client at build time.
|
|
6583
|
-
*/
|
|
6584
|
-
function getDependencyEnvVars(workspace, appName, urlPrefix = "http://localhost") {
|
|
6585
|
-
const app = workspace.apps[appName];
|
|
6586
|
-
if (!app) return {};
|
|
6587
|
-
const env = {};
|
|
6588
|
-
const publicPrefix = getPublicEnvPrefix(app.framework);
|
|
6589
|
-
for (const depName of app.dependencies) {
|
|
6590
|
-
const dep = workspace.apps[depName];
|
|
6591
|
-
if (dep) {
|
|
6592
|
-
const url$1 = `${urlPrefix}:${dep.port}`;
|
|
6593
|
-
const envKey = `${depName.toUpperCase()}_URL`;
|
|
6594
|
-
env[envKey] = url$1;
|
|
6595
|
-
if (publicPrefix) env[`${publicPrefix}${envKey}`] = url$1;
|
|
6596
|
-
}
|
|
6597
|
-
}
|
|
6598
|
-
return env;
|
|
6599
|
-
}
|
|
6600
|
-
/**
|
|
6601
6512
|
* Resolve the Dokploy endpoint for a specific stage.
|
|
6602
6513
|
*
|
|
6603
6514
|
* Uses per-stage endpoint from `endpoints` if available,
|
|
@@ -6628,7 +6539,7 @@ function getEndpointForStage(dokployConfig, stage) {
|
|
|
6628
6539
|
if (dokployConfig.endpoints?.[stage]) return dokployConfig.endpoints[stage];
|
|
6629
6540
|
return dokployConfig.endpoint;
|
|
6630
6541
|
}
|
|
6631
|
-
|
|
6632
6542
|
//#endregion
|
|
6633
|
-
export {
|
|
6634
|
-
|
|
6543
|
+
export { safeValidateWorkspaceConfig as C, assertDeployedStage as D, TEST_STAGE as E, deployedProblems as O, isPhase2DeployTarget as S, InvalidStages as T, SUPPORTED_DEPLOY_TARGETS as _, getAppBuildOrder as a, getDeployTargetError as b, normalizeWorkspace as c, wrapSingleAppAsWorkspace as d, PUBLIC_ENV_PREFIXES as f, PHASE_2_DEPLOY_TARGETS as g, isWorkspaceConfig as h, defineWorkspace as i, stageProblems as k, processConfig as l, stripPublicPrefix as m, appConstructGlobs as n, getAppGkmConfig as o, getPublicEnvPrefix as p, constructPatterns as r, getEndpointForStage as s, allConstructGlobs as t, workspaceConstructGlobs as u, WorkspaceConfigSchema as v, validateWorkspaceConfig as w, isDeployTargetSupported as x, formatValidationErrors as y };
|
|
6544
|
+
|
|
6545
|
+
//# sourceMappingURL=workspace-DOmIhiau.mjs.map
|