mcp-use 2.0.0-beta.2 → 2.0.0-beta.21
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/dist/.tsbuildinfo +1 -1
- package/dist/bin/args.d.ts +10 -0
- package/dist/bin/args.d.ts.map +1 -1
- package/dist/bin/main.d.ts +8 -0
- package/dist/bin/main.d.ts.map +1 -1
- package/dist/bin/start.d.ts.map +1 -1
- package/dist/bin.js +22 -6
- package/dist/bin.js.map +1 -1
- package/dist/branding.d.ts +82 -0
- package/dist/branding.d.ts.map +1 -0
- package/dist/chunk-22Y3WIJP.js +62 -0
- package/dist/chunk-22Y3WIJP.js.map +1 -0
- package/dist/chunk-EAPJUSK7.js +98 -0
- package/dist/chunk-EAPJUSK7.js.map +1 -0
- package/dist/chunk-FC2Z2VFO.js +99 -0
- package/dist/chunk-FC2Z2VFO.js.map +1 -0
- package/dist/{public-route-7IK5D7V7.js → chunk-G62AMJHS.js} +17 -12
- package/dist/chunk-G62AMJHS.js.map +1 -0
- package/dist/{chunk-UDLRVMML.js → chunk-IGVT7UV6.js} +94 -23
- package/dist/chunk-IGVT7UV6.js.map +1 -0
- package/dist/chunk-KIZ72TIK.js +38 -0
- package/dist/chunk-KIZ72TIK.js.map +1 -0
- package/dist/{chunk-Q4PUTBMV.js → chunk-QBAJXPRQ.js} +21 -1
- package/dist/chunk-QBAJXPRQ.js.map +1 -0
- package/dist/{chunk-SFI2T6TE.js → chunk-QUUANIE4.js} +34 -80
- package/dist/chunk-QUUANIE4.js.map +1 -0
- package/dist/{chunk-RQRT27Q3.js → chunk-RHITI5QM.js} +190 -16
- package/dist/chunk-RHITI5QM.js.map +1 -0
- package/dist/chunk-Z326HADF.js +82 -0
- package/dist/chunk-Z326HADF.js.map +1 -0
- package/dist/chunk-ZJJD33SF.js +741 -0
- package/dist/chunk-ZJJD33SF.js.map +1 -0
- package/dist/cli/build.d.ts +21 -15
- package/dist/cli/build.d.ts.map +1 -1
- package/dist/cli/dev.d.ts +4 -0
- package/dist/cli/dev.d.ts.map +1 -1
- package/dist/cli/entry.d.ts +1 -1
- package/dist/cli/entry.d.ts.map +1 -1
- package/dist/cli/mcp-env-declaration.d.ts +20 -0
- package/dist/cli/mcp-env-declaration.d.ts.map +1 -0
- package/dist/cli/next-compat.d.ts +21 -0
- package/dist/cli/next-compat.d.ts.map +1 -0
- package/dist/cli/next-server-shims.d.ts +52 -0
- package/dist/cli/next-server-shims.d.ts.map +1 -0
- package/dist/cli/port.d.ts.map +1 -1
- package/dist/cli/tunnel.d.ts.map +1 -1
- package/dist/cli/views-bindings.d.ts +9 -0
- package/dist/cli/views-bindings.d.ts.map +1 -1
- package/dist/cli/views-plugin.d.ts.map +1 -1
- package/dist/cli/views.d.ts +23 -8
- package/dist/cli/views.d.ts.map +1 -1
- package/dist/cli/workspace.d.ts +4 -9
- package/dist/cli/workspace.d.ts.map +1 -1
- package/dist/commands/build.js +171 -34
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/client.d.ts.map +1 -1
- package/dist/commands/client.js +1 -1
- package/dist/commands/dev.js +145 -40
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/load-client.d.ts +9 -2
- package/dist/commands/load-client.d.ts.map +1 -1
- package/dist/commands/screenshot.js +1 -1
- package/dist/commands/start.js +5 -1
- package/dist/commands/start.js.map +1 -1
- package/dist/completable.d.ts +9 -0
- package/dist/completable.d.ts.map +1 -1
- package/dist/config.d.ts +125 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/fetch-app.d.ts +43 -0
- package/dist/fetch-app.d.ts.map +1 -1
- package/dist/index.d.ts +20 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1318 -251
- package/dist/index.js.map +1 -1
- package/dist/inspector-shell.d.ts +19 -6
- package/dist/inspector-shell.d.ts.map +1 -1
- package/dist/internal/resource-completion.js +7 -0
- package/dist/internal/resource-completion.js.map +1 -0
- package/dist/landing-handler-WE66NIGB.js +37 -0
- package/dist/landing-handler-WE66NIGB.js.map +1 -0
- package/dist/landing-handler.d.ts +24 -0
- package/dist/landing-handler.d.ts.map +1 -0
- package/dist/landing.d.ts +67 -0
- package/dist/landing.d.ts.map +1 -0
- package/dist/landing.js +7 -0
- package/dist/landing.js.map +1 -0
- package/dist/mcp-proxy-5YQJJ4RT.js +282 -0
- package/dist/mcp-proxy-5YQJJ4RT.js.map +1 -0
- package/dist/mcp-proxy.d.ts +153 -0
- package/dist/mcp-proxy.d.ts.map +1 -0
- package/dist/middleware/cors.d.ts +11 -0
- package/dist/middleware/cors.d.ts.map +1 -0
- package/dist/middleware/mcp-middleware.d.ts +179 -0
- package/dist/middleware/mcp-middleware.d.ts.map +1 -0
- package/dist/mount-mcp.d.ts +0 -4
- package/dist/mount-mcp.d.ts.map +1 -1
- package/dist/next/config.d.ts +39 -0
- package/dist/next/config.d.ts.map +1 -0
- package/dist/next/handler.d.ts +17 -0
- package/dist/next/handler.d.ts.map +1 -0
- package/dist/next/index.d.ts +5 -0
- package/dist/next/index.d.ts.map +1 -0
- package/dist/next/index.js +172 -0
- package/dist/next/index.js.map +1 -0
- package/dist/next-server-shims.js +108 -0
- package/dist/next-server-shims.js.map +1 -0
- package/dist/oauth/better-auth.d.ts +29 -0
- package/dist/oauth/better-auth.d.ts.map +1 -0
- package/dist/oauth/better-auth.js +76 -0
- package/dist/oauth/better-auth.js.map +1 -0
- package/dist/oauth/index.js +2 -1
- package/dist/public-route-RWJVJQTX.js +9 -0
- package/dist/public-route-RWJVJQTX.js.map +1 -0
- package/dist/react/components/theme-provider.d.ts +3 -0
- package/dist/react/components/theme-provider.d.ts.map +1 -1
- package/dist/react/hooks/use-files.d.ts +25 -0
- package/dist/react/hooks/use-files.d.ts.map +1 -0
- package/dist/react/hooks/use-host-context.d.ts +5 -0
- package/dist/react/hooks/use-host-context.d.ts.map +1 -1
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +124 -3
- package/dist/react/index.js.map +1 -1
- package/dist/react/runtime/view-runtime.d.ts +23 -0
- package/dist/react/runtime/view-runtime.d.ts.map +1 -1
- package/dist/react/types/file-types.d.ts +16 -0
- package/dist/react/types/file-types.d.ts.map +1 -0
- package/dist/react/types/register.d.ts +1 -1
- package/dist/react/types/register.d.ts.map +1 -1
- package/dist/resource-completion.d.ts +12 -0
- package/dist/resource-completion.d.ts.map +1 -0
- package/dist/resources.d.ts +59 -4
- package/dist/resources.d.ts.map +1 -1
- package/dist/server.d.ts +120 -7
- package/dist/server.d.ts.map +1 -1
- package/dist/tools.d.ts +21 -10
- package/dist/tools.d.ts.map +1 -1
- package/dist/views/constants.d.ts +1 -1
- package/dist/views/csp-env.d.ts +37 -0
- package/dist/views/csp-env.d.ts.map +1 -0
- package/dist/views/document.d.ts +30 -13
- package/dist/views/document.d.ts.map +1 -1
- package/dist/views/index.d.ts +4 -3
- package/dist/views/index.d.ts.map +1 -1
- package/dist/views/origin.d.ts +37 -9
- package/dist/views/origin.d.ts.map +1 -1
- package/dist/views/public-route.d.ts +10 -4
- package/dist/views/public-route.d.ts.map +1 -1
- package/dist/views/register.d.ts +1 -1
- package/dist/views/routes.d.ts +20 -1
- package/dist/views/routes.d.ts.map +1 -1
- package/dist/views/types.d.ts +23 -14
- package/dist/views/types.d.ts.map +1 -1
- package/dist/views/wire.d.ts +26 -36
- package/dist/views/wire.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/client/LICENSE +216 -0
- package/node_modules/@modelcontextprotocol/client/README.md +26 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-Asx17_Co.mjs +7069 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-Asx17_Co.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-B7GnTXYx.d.mts +1054 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-B7GnTXYx.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-B_4czhCS.d.cts +1054 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-B_4czhCS.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-DNzBrkxq.cjs +7086 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-DNzBrkxq.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-D9GAttn8.d.cts +59 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-D9GAttn8.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-DbU8BxXO.mjs +970 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-DbU8BxXO.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-Djgwc46-.cjs +976 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-Djgwc46-.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-Xtj52JOa.d.mts +59 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-Xtj52JOa.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/chunk-Bnu9O96Y.cjs +60 -0
- package/node_modules/@modelcontextprotocol/client/dist/chunk-Br0eD_fh.mjs +42 -0
- package/node_modules/@modelcontextprotocol/client/dist/index-ZagFkUbt.d.mts +2675 -0
- package/node_modules/@modelcontextprotocol/client/dist/index-ZagFkUbt.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index-gN3EXmil.d.cts +2678 -0
- package/node_modules/@modelcontextprotocol/client/dist/index-gN3EXmil.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.cjs +5427 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.d.cts +3196 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.d.mts +3196 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.mjs +5224 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.cjs +14 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.cts +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.mts +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.mjs +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.cjs +14 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.cts +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.mts +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.mjs +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.cjs +21 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.cts +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.mts +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.mjs +20 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/src-BzzZSQyL.cjs +7331 -0
- package/node_modules/@modelcontextprotocol/client/dist/src-BzzZSQyL.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/src-DGeA9On3.mjs +6963 -0
- package/node_modules/@modelcontextprotocol/client/dist/src-DGeA9On3.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.cjs +181 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.d.cts +87 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.d.mts +87 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.mjs +176 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/types-BDNQEPSs.d.mts +1099 -0
- package/node_modules/@modelcontextprotocol/client/dist/types-BDNQEPSs.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/types-DsbMXNFL.d.cts +1099 -0
- package/node_modules/@modelcontextprotocol/client/dist/types-DsbMXNFL.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.cjs +5 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.d.cts +2 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.d.mts +2 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.mjs +3 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.cjs +3 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.d.cts +2 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.d.mts +2 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.mjs +3 -0
- package/node_modules/@modelcontextprotocol/client/package.json +166 -0
- package/node_modules/@modelcontextprotocol/core/LICENSE +216 -0
- package/node_modules/@modelcontextprotocol/core/README.md +40 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-BUWfrB3C.d.cts +8198 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-BUWfrB3C.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-CEFpHq32.cjs +2862 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-CEFpHq32.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-CNbu4K4a.d.mts +8198 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-CNbu4K4a.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-DFgbUATV.mjs +1653 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-DFgbUATV.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/index.cjs +174 -0
- package/node_modules/@modelcontextprotocol/core/dist/index.d.cts +2 -0
- package/node_modules/@modelcontextprotocol/core/dist/index.d.mts +2 -0
- package/node_modules/@modelcontextprotocol/core/dist/index.mjs +3 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.cjs +199 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.cts +87 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.mts +87 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.mjs +3 -0
- package/node_modules/@modelcontextprotocol/core/package.json +85 -0
- package/node_modules/jose/LICENSE.md +21 -0
- package/node_modules/jose/README.md +153 -0
- package/node_modules/jose/dist/types/index.d.ts +55 -0
- package/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +31 -0
- package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +65 -0
- package/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +31 -0
- package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +83 -0
- package/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +31 -0
- package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +74 -0
- package/node_modules/jose/dist/types/jwk/embedded.d.ts +17 -0
- package/node_modules/jose/dist/types/jwk/thumbprint.d.ts +32 -0
- package/node_modules/jose/dist/types/jwks/local.d.ts +29 -0
- package/node_modules/jose/dist/types/jwks/remote.d.ts +237 -0
- package/node_modules/jose/dist/types/jws/compact/sign.d.ts +36 -0
- package/node_modules/jose/dist/types/jws/compact/verify.d.ts +33 -0
- package/node_modules/jose/dist/types/jws/flattened/sign.d.ts +42 -0
- package/node_modules/jose/dist/types/jws/flattened/verify.d.ts +33 -0
- package/node_modules/jose/dist/types/jws/general/sign.d.ts +53 -0
- package/node_modules/jose/dist/types/jws/general/verify.d.ts +33 -0
- package/node_modules/jose/dist/types/jwt/decrypt.d.ts +35 -0
- package/node_modules/jose/dist/types/jwt/encrypt.d.ts +91 -0
- package/node_modules/jose/dist/types/jwt/sign.d.ts +43 -0
- package/node_modules/jose/dist/types/jwt/unsecured.d.ts +43 -0
- package/node_modules/jose/dist/types/jwt/verify.d.ts +37 -0
- package/node_modules/jose/dist/types/key/export.d.ts +33 -0
- package/node_modules/jose/dist/types/key/generate_key_pair.d.ts +47 -0
- package/node_modules/jose/dist/types/key/generate_secret.d.ts +35 -0
- package/node_modules/jose/dist/types/key/import.d.ts +83 -0
- package/node_modules/jose/dist/types/types.d.ts +841 -0
- package/node_modules/jose/dist/types/util/base64url.d.ts +9 -0
- package/node_modules/jose/dist/types/util/decode_jwt.d.ts +18 -0
- package/node_modules/jose/dist/types/util/decode_protected_header.d.ts +17 -0
- package/node_modules/jose/dist/types/util/errors.d.ts +213 -0
- package/node_modules/jose/dist/webapi/index.js +32 -0
- package/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +27 -0
- package/node_modules/jose/dist/webapi/jwe/compact/encrypt.js +27 -0
- package/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +165 -0
- package/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +169 -0
- package/node_modules/jose/dist/webapi/jwe/general/decrypt.js +31 -0
- package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +187 -0
- package/node_modules/jose/dist/webapi/jwk/embedded.js +17 -0
- package/node_modules/jose/dist/webapi/jwk/thumbprint.js +68 -0
- package/node_modules/jose/dist/webapi/jwks/local.js +119 -0
- package/node_modules/jose/dist/webapi/jwks/remote.js +179 -0
- package/node_modules/jose/dist/webapi/jws/compact/sign.js +18 -0
- package/node_modules/jose/dist/webapi/jws/compact/verify.js +21 -0
- package/node_modules/jose/dist/webapi/jws/flattened/sign.js +92 -0
- package/node_modules/jose/dist/webapi/jws/flattened/verify.js +120 -0
- package/node_modules/jose/dist/webapi/jws/general/sign.js +73 -0
- package/node_modules/jose/dist/webapi/jws/general/verify.js +24 -0
- package/node_modules/jose/dist/webapi/jwt/decrypt.js +23 -0
- package/node_modules/jose/dist/webapi/jwt/encrypt.js +108 -0
- package/node_modules/jose/dist/webapi/jwt/sign.js +52 -0
- package/node_modules/jose/dist/webapi/jwt/unsecured.js +63 -0
- package/node_modules/jose/dist/webapi/jwt/verify.js +15 -0
- package/node_modules/jose/dist/webapi/key/export.js +11 -0
- package/node_modules/jose/dist/webapi/key/generate_key_pair.js +97 -0
- package/node_modules/jose/dist/webapi/key/generate_secret.js +40 -0
- package/node_modules/jose/dist/webapi/key/import.js +57 -0
- package/node_modules/jose/dist/webapi/lib/aesgcmkw.js +16 -0
- package/node_modules/jose/dist/webapi/lib/aeskw.js +25 -0
- package/node_modules/jose/dist/webapi/lib/asn1.js +243 -0
- package/node_modules/jose/dist/webapi/lib/base64.js +22 -0
- package/node_modules/jose/dist/webapi/lib/buffer_utils.js +43 -0
- package/node_modules/jose/dist/webapi/lib/cek.js +19 -0
- package/node_modules/jose/dist/webapi/lib/check_cek_length.js +7 -0
- package/node_modules/jose/dist/webapi/lib/check_iv_length.js +7 -0
- package/node_modules/jose/dist/webapi/lib/check_key_length.js +8 -0
- package/node_modules/jose/dist/webapi/lib/check_key_type.js +122 -0
- package/node_modules/jose/dist/webapi/lib/crypto_key.js +143 -0
- package/node_modules/jose/dist/webapi/lib/decrypt.js +106 -0
- package/node_modules/jose/dist/webapi/lib/decrypt_key_management.js +127 -0
- package/node_modules/jose/dist/webapi/lib/digest.js +4 -0
- package/node_modules/jose/dist/webapi/lib/ecdhes.js +52 -0
- package/node_modules/jose/dist/webapi/lib/encrypt.js +74 -0
- package/node_modules/jose/dist/webapi/lib/encrypt_key_management.js +92 -0
- package/node_modules/jose/dist/webapi/lib/get_sign_verify_key.js +12 -0
- package/node_modules/jose/dist/webapi/lib/invalid_key_input.js +27 -0
- package/node_modules/jose/dist/webapi/lib/is_disjoint.js +21 -0
- package/node_modules/jose/dist/webapi/lib/is_jwk.js +6 -0
- package/node_modules/jose/dist/webapi/lib/is_key_like.js +17 -0
- package/node_modules/jose/dist/webapi/lib/is_object.js +14 -0
- package/node_modules/jose/dist/webapi/lib/iv.js +19 -0
- package/node_modules/jose/dist/webapi/lib/jwk_to_key.js +109 -0
- package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +238 -0
- package/node_modules/jose/dist/webapi/lib/key_to_jwk.js +31 -0
- package/node_modules/jose/dist/webapi/lib/normalize_key.js +176 -0
- package/node_modules/jose/dist/webapi/lib/pbes2kw.js +39 -0
- package/node_modules/jose/dist/webapi/lib/private_symbols.js +1 -0
- package/node_modules/jose/dist/webapi/lib/rsaes.js +24 -0
- package/node_modules/jose/dist/webapi/lib/sign.js +9 -0
- package/node_modules/jose/dist/webapi/lib/subtle_dsa.js +31 -0
- package/node_modules/jose/dist/webapi/lib/validate_algorithms.js +10 -0
- package/node_modules/jose/dist/webapi/lib/validate_crit.js +33 -0
- package/node_modules/jose/dist/webapi/lib/verify.js +14 -0
- package/node_modules/jose/dist/webapi/util/base64url.js +30 -0
- package/node_modules/jose/dist/webapi/util/decode_jwt.js +32 -0
- package/node_modules/jose/dist/webapi/util/decode_protected_header.js +34 -0
- package/node_modules/jose/dist/webapi/util/errors.js +99 -0
- package/node_modules/jose/package.json +200 -0
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +191 -0
- package/node_modules/zod/index.cjs +33 -0
- package/node_modules/zod/index.d.cts +4 -0
- package/node_modules/zod/index.d.ts +4 -0
- package/node_modules/zod/index.js +4 -0
- package/node_modules/zod/locales/index.cjs +17 -0
- package/node_modules/zod/locales/index.d.cts +1 -0
- package/node_modules/zod/locales/index.d.ts +1 -0
- package/node_modules/zod/locales/index.js +1 -0
- package/node_modules/zod/locales/package.json +7 -0
- package/node_modules/zod/mini/index.cjs +32 -0
- package/node_modules/zod/mini/index.d.cts +3 -0
- package/node_modules/zod/mini/index.d.ts +3 -0
- package/node_modules/zod/mini/index.js +3 -0
- package/node_modules/zod/mini/package.json +7 -0
- package/node_modules/zod/package.json +135 -0
- package/node_modules/zod/src/index.ts +4 -0
- package/node_modules/zod/src/locales/index.ts +1 -0
- package/node_modules/zod/src/mini/index.ts +3 -0
- package/node_modules/zod/src/v3/ZodError.ts +330 -0
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
- package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
- package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
- package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
- package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
- package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
- package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/node_modules/zod/src/v3/types.ts +5138 -0
- package/node_modules/zod/src/v4/classic/checks.ts +32 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +70 -0
- package/node_modules/zod/src/v4/classic/errors.ts +82 -0
- package/node_modules/zod/src/v4/classic/external.ts +52 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +659 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/node_modules/zod/src/v4/classic/parse.ts +82 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2672 -0
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +216 -0
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +326 -0
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +703 -0
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +62 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +409 -0
- package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +197 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +694 -0
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +807 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
- package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +895 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +360 -0
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +939 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +60 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +198 -0
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +46 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +330 -0
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +325 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +717 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +333 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +450 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +74 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +351 -0
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +717 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +631 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +633 -0
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +181 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +134 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +1224 -0
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +106 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +771 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +3125 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +378 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +496 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +273 -0
- package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/node_modules/zod/src/v4/core/api.ts +1823 -0
- package/node_modules/zod/src/v4/core/checks.ts +1293 -0
- package/node_modules/zod/src/v4/core/config.ts +15 -0
- package/node_modules/zod/src/v4/core/core.ts +153 -0
- package/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/node_modules/zod/src/v4/core/errors.ts +455 -0
- package/node_modules/zod/src/v4/core/index.ts +16 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +666 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +147 -0
- package/node_modules/zod/src/v4/core/parse.ts +195 -0
- package/node_modules/zod/src/v4/core/regexes.ts +190 -0
- package/node_modules/zod/src/v4/core/registries.ts +105 -0
- package/node_modules/zod/src/v4/core/schemas.ts +4730 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
- package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
- package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +215 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
- package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
- package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
- package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
- package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +622 -0
- package/node_modules/zod/src/v4/core/util.ts +983 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/zod/src/v4/locales/ar.ts +115 -0
- package/node_modules/zod/src/v4/locales/az.ts +111 -0
- package/node_modules/zod/src/v4/locales/be.ts +176 -0
- package/node_modules/zod/src/v4/locales/bg.ts +128 -0
- package/node_modules/zod/src/v4/locales/ca.ts +116 -0
- package/node_modules/zod/src/v4/locales/cs.ts +118 -0
- package/node_modules/zod/src/v4/locales/da.ts +123 -0
- package/node_modules/zod/src/v4/locales/de.ts +116 -0
- package/node_modules/zod/src/v4/locales/el.ts +121 -0
- package/node_modules/zod/src/v4/locales/en.ts +123 -0
- package/node_modules/zod/src/v4/locales/eo.ts +118 -0
- package/node_modules/zod/src/v4/locales/es.ts +141 -0
- package/node_modules/zod/src/v4/locales/fa.ts +126 -0
- package/node_modules/zod/src/v4/locales/fi.ts +121 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +116 -0
- package/node_modules/zod/src/v4/locales/fr.ts +132 -0
- package/node_modules/zod/src/v4/locales/he.ts +246 -0
- package/node_modules/zod/src/v4/locales/hr.ts +131 -0
- package/node_modules/zod/src/v4/locales/hu.ts +117 -0
- package/node_modules/zod/src/v4/locales/hy.ts +164 -0
- package/node_modules/zod/src/v4/locales/id.ts +115 -0
- package/node_modules/zod/src/v4/locales/index.ts +52 -0
- package/node_modules/zod/src/v4/locales/is.ts +119 -0
- package/node_modules/zod/src/v4/locales/it.ts +116 -0
- package/node_modules/zod/src/v4/locales/ja.ts +114 -0
- package/node_modules/zod/src/v4/locales/ka.ts +123 -0
- package/node_modules/zod/src/v4/locales/kh.ts +7 -0
- package/node_modules/zod/src/v4/locales/km.ts +119 -0
- package/node_modules/zod/src/v4/locales/ko.ts +121 -0
- package/node_modules/zod/src/v4/locales/lt.ts +239 -0
- package/node_modules/zod/src/v4/locales/mk.ts +118 -0
- package/node_modules/zod/src/v4/locales/ms.ts +115 -0
- package/node_modules/zod/src/v4/locales/nl.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +116 -0
- package/node_modules/zod/src/v4/locales/ota.ts +117 -0
- package/node_modules/zod/src/v4/locales/pl.ts +118 -0
- package/node_modules/zod/src/v4/locales/ps.ts +126 -0
- package/node_modules/zod/src/v4/locales/pt.ts +116 -0
- package/node_modules/zod/src/v4/locales/ro.ts +129 -0
- package/node_modules/zod/src/v4/locales/ru.ts +176 -0
- package/node_modules/zod/src/v4/locales/sl.ts +118 -0
- package/node_modules/zod/src/v4/locales/sv.ts +119 -0
- package/node_modules/zod/src/v4/locales/ta.ts +118 -0
- package/node_modules/zod/src/v4/locales/th.ts +119 -0
- package/node_modules/zod/src/v4/locales/tr.ts +111 -0
- package/node_modules/zod/src/v4/locales/ua.ts +7 -0
- package/node_modules/zod/src/v4/locales/uk.ts +117 -0
- package/node_modules/zod/src/v4/locales/ur.ts +119 -0
- package/node_modules/zod/src/v4/locales/uz.ts +117 -0
- package/node_modules/zod/src/v4/locales/vi.ts +117 -0
- package/node_modules/zod/src/v4/locales/yo.ts +124 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +116 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +115 -0
- package/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
- package/node_modules/zod/src/v4/mini/external.ts +41 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +66 -0
- package/node_modules/zod/src/v4/mini/parse.ts +14 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +1947 -0
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +548 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +5 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +993 -0
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +227 -0
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +325 -0
- package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +352 -0
- package/node_modules/zod/src/v4-mini/index.ts +3 -0
- package/node_modules/zod/v3/ZodError.cjs +138 -0
- package/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/node_modules/zod/v3/ZodError.js +133 -0
- package/node_modules/zod/v3/errors.cjs +17 -0
- package/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/zod/v3/errors.d.ts +5 -0
- package/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/zod/v3/external.cjs +22 -0
- package/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/zod/v3/external.js +6 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/v3/helpers/util.cjs +137 -0
- package/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/zod/v3/index.cjs +33 -0
- package/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/zod/v3/index.js +4 -0
- package/node_modules/zod/v3/locales/en.cjs +112 -0
- package/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/zod/v3/package.json +7 -0
- package/node_modules/zod/v3/standard-schema.cjs +2 -0
- package/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/zod/v3/types.cjs +3777 -0
- package/node_modules/zod/v3/types.d.cts +1034 -0
- package/node_modules/zod/v3/types.d.ts +1034 -0
- package/node_modules/zod/v3/types.js +3695 -0
- package/node_modules/zod/v4/classic/checks.cjs +33 -0
- package/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/zod/v4/classic/coerce.cjs +47 -0
- package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/zod/v4/classic/compat.cjs +61 -0
- package/node_modules/zod/v4/classic/compat.d.cts +50 -0
- package/node_modules/zod/v4/classic/compat.d.ts +50 -0
- package/node_modules/zod/v4/classic/compat.js +31 -0
- package/node_modules/zod/v4/classic/errors.cjs +74 -0
- package/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/node_modules/zod/v4/classic/errors.js +48 -0
- package/node_modules/zod/v4/classic/external.cjs +73 -0
- package/node_modules/zod/v4/classic/external.d.cts +16 -0
- package/node_modules/zod/v4/classic/external.d.ts +16 -0
- package/node_modules/zod/v4/classic/external.js +20 -0
- package/node_modules/zod/v4/classic/from-json-schema.cjs +625 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.js +599 -0
- package/node_modules/zod/v4/classic/index.cjs +33 -0
- package/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/node_modules/zod/v4/classic/iso.js +30 -0
- package/node_modules/zod/v4/classic/package.json +7 -0
- package/node_modules/zod/v4/classic/parse.cjs +41 -0
- package/node_modules/zod/v4/classic/parse.d.cts +31 -0
- package/node_modules/zod/v4/classic/parse.d.ts +31 -0
- package/node_modules/zod/v4/classic/parse.js +15 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1511 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +767 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +767 -0
- package/node_modules/zod/v4/classic/schemas.js +1395 -0
- package/node_modules/zod/v4/core/api.cjs +1227 -0
- package/node_modules/zod/v4/core/api.d.cts +325 -0
- package/node_modules/zod/v4/core/api.d.ts +325 -0
- package/node_modules/zod/v4/core/api.js +1087 -0
- package/node_modules/zod/v4/core/checks.cjs +601 -0
- package/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/node_modules/zod/v4/core/checks.js +575 -0
- package/node_modules/zod/v4/core/core.cjs +85 -0
- package/node_modules/zod/v4/core/core.d.cts +70 -0
- package/node_modules/zod/v4/core/core.d.ts +70 -0
- package/node_modules/zod/v4/core/core.js +78 -0
- package/node_modules/zod/v4/core/doc.cjs +39 -0
- package/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/node_modules/zod/v4/core/doc.js +35 -0
- package/node_modules/zod/v4/core/errors.cjs +216 -0
- package/node_modules/zod/v4/core/errors.d.cts +221 -0
- package/node_modules/zod/v4/core/errors.d.ts +221 -0
- package/node_modules/zod/v4/core/errors.js +185 -0
- package/node_modules/zod/v4/core/index.cjs +47 -0
- package/node_modules/zod/v4/core/index.d.cts +16 -0
- package/node_modules/zod/v4/core/index.d.ts +16 -0
- package/node_modules/zod/v4/core/index.js +16 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.js +95 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +644 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +601 -0
- package/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +88 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +88 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/package.json +7 -0
- package/node_modules/zod/v4/core/parse.cjs +131 -0
- package/node_modules/zod/v4/core/parse.d.cts +49 -0
- package/node_modules/zod/v4/core/parse.d.ts +49 -0
- package/node_modules/zod/v4/core/parse.js +93 -0
- package/node_modules/zod/v4/core/regexes.cjs +172 -0
- package/node_modules/zod/v4/core/regexes.d.cts +85 -0
- package/node_modules/zod/v4/core/regexes.d.ts +85 -0
- package/node_modules/zod/v4/core/regexes.js +139 -0
- package/node_modules/zod/v4/core/registries.cjs +56 -0
- package/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/zod/v4/core/schemas.cjs +2270 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1184 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1184 -0
- package/node_modules/zod/v4/core/schemas.js +2239 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +457 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +114 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +114 -0
- package/node_modules/zod/v4/core/to-json-schema.js +448 -0
- package/node_modules/zod/v4/core/util.cjs +734 -0
- package/node_modules/zod/v4/core/util.d.cts +200 -0
- package/node_modules/zod/v4/core/util.d.ts +200 -0
- package/node_modules/zod/v4/core/util.js +674 -0
- package/node_modules/zod/v4/core/versions.cjs +8 -0
- package/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/zod/v4/index.cjs +22 -0
- package/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +3 -0
- package/node_modules/zod/v4/locales/ar.cjs +133 -0
- package/node_modules/zod/v4/locales/ar.d.cts +5 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +106 -0
- package/node_modules/zod/v4/locales/az.cjs +132 -0
- package/node_modules/zod/v4/locales/az.d.cts +5 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +105 -0
- package/node_modules/zod/v4/locales/be.cjs +183 -0
- package/node_modules/zod/v4/locales/be.d.cts +5 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +156 -0
- package/node_modules/zod/v4/locales/bg.cjs +147 -0
- package/node_modules/zod/v4/locales/bg.d.cts +5 -0
- package/node_modules/zod/v4/locales/bg.d.ts +4 -0
- package/node_modules/zod/v4/locales/bg.js +120 -0
- package/node_modules/zod/v4/locales/ca.cjs +134 -0
- package/node_modules/zod/v4/locales/ca.d.cts +5 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +107 -0
- package/node_modules/zod/v4/locales/cs.cjs +138 -0
- package/node_modules/zod/v4/locales/cs.d.cts +5 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +111 -0
- package/node_modules/zod/v4/locales/da.cjs +142 -0
- package/node_modules/zod/v4/locales/da.d.cts +5 -0
- package/node_modules/zod/v4/locales/da.d.ts +4 -0
- package/node_modules/zod/v4/locales/da.js +115 -0
- package/node_modules/zod/v4/locales/de.cjs +135 -0
- package/node_modules/zod/v4/locales/de.d.cts +5 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +108 -0
- package/node_modules/zod/v4/locales/el.cjs +136 -0
- package/node_modules/zod/v4/locales/el.d.cts +5 -0
- package/node_modules/zod/v4/locales/el.d.ts +4 -0
- package/node_modules/zod/v4/locales/el.js +109 -0
- package/node_modules/zod/v4/locales/en.cjs +140 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +4 -0
- package/node_modules/zod/v4/locales/en.js +113 -0
- package/node_modules/zod/v4/locales/eo.cjs +136 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +4 -0
- package/node_modules/zod/v4/locales/eo.js +109 -0
- package/node_modules/zod/v4/locales/es.cjs +159 -0
- package/node_modules/zod/v4/locales/es.d.cts +5 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +132 -0
- package/node_modules/zod/v4/locales/fa.cjs +141 -0
- package/node_modules/zod/v4/locales/fa.d.cts +5 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +114 -0
- package/node_modules/zod/v4/locales/fi.cjs +139 -0
- package/node_modules/zod/v4/locales/fi.d.cts +5 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +112 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +134 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +107 -0
- package/node_modules/zod/v4/locales/fr.cjs +152 -0
- package/node_modules/zod/v4/locales/fr.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +125 -0
- package/node_modules/zod/v4/locales/he.cjs +241 -0
- package/node_modules/zod/v4/locales/he.d.cts +5 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +214 -0
- package/node_modules/zod/v4/locales/hr.cjs +149 -0
- package/node_modules/zod/v4/locales/hr.d.cts +5 -0
- package/node_modules/zod/v4/locales/hr.d.ts +4 -0
- package/node_modules/zod/v4/locales/hr.js +122 -0
- package/node_modules/zod/v4/locales/hu.cjs +135 -0
- package/node_modules/zod/v4/locales/hu.d.cts +5 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +108 -0
- package/node_modules/zod/v4/locales/hy.cjs +174 -0
- package/node_modules/zod/v4/locales/hy.d.cts +5 -0
- package/node_modules/zod/v4/locales/hy.d.ts +4 -0
- package/node_modules/zod/v4/locales/hy.js +147 -0
- package/node_modules/zod/v4/locales/id.cjs +133 -0
- package/node_modules/zod/v4/locales/id.d.cts +5 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +106 -0
- package/node_modules/zod/v4/locales/index.cjs +111 -0
- package/node_modules/zod/v4/locales/index.d.cts +52 -0
- package/node_modules/zod/v4/locales/index.d.ts +52 -0
- package/node_modules/zod/v4/locales/index.js +52 -0
- package/node_modules/zod/v4/locales/is.cjs +136 -0
- package/node_modules/zod/v4/locales/is.d.cts +5 -0
- package/node_modules/zod/v4/locales/is.d.ts +4 -0
- package/node_modules/zod/v4/locales/is.js +109 -0
- package/node_modules/zod/v4/locales/it.cjs +135 -0
- package/node_modules/zod/v4/locales/it.d.cts +5 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +108 -0
- package/node_modules/zod/v4/locales/ja.cjs +134 -0
- package/node_modules/zod/v4/locales/ja.d.cts +5 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +107 -0
- package/node_modules/zod/v4/locales/ka.cjs +139 -0
- package/node_modules/zod/v4/locales/ka.d.cts +5 -0
- package/node_modules/zod/v4/locales/ka.d.ts +4 -0
- package/node_modules/zod/v4/locales/ka.js +112 -0
- package/node_modules/zod/v4/locales/kh.cjs +12 -0
- package/node_modules/zod/v4/locales/kh.d.cts +5 -0
- package/node_modules/zod/v4/locales/kh.d.ts +5 -0
- package/node_modules/zod/v4/locales/kh.js +5 -0
- package/node_modules/zod/v4/locales/km.cjs +137 -0
- package/node_modules/zod/v4/locales/km.d.cts +5 -0
- package/node_modules/zod/v4/locales/km.d.ts +4 -0
- package/node_modules/zod/v4/locales/km.js +110 -0
- package/node_modules/zod/v4/locales/ko.cjs +138 -0
- package/node_modules/zod/v4/locales/ko.d.cts +5 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +111 -0
- package/node_modules/zod/v4/locales/lt.cjs +230 -0
- package/node_modules/zod/v4/locales/lt.d.cts +5 -0
- package/node_modules/zod/v4/locales/lt.d.ts +4 -0
- package/node_modules/zod/v4/locales/lt.js +203 -0
- package/node_modules/zod/v4/locales/mk.cjs +136 -0
- package/node_modules/zod/v4/locales/mk.d.cts +5 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +109 -0
- package/node_modules/zod/v4/locales/ms.cjs +134 -0
- package/node_modules/zod/v4/locales/ms.d.cts +5 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +107 -0
- package/node_modules/zod/v4/locales/nl.cjs +137 -0
- package/node_modules/zod/v4/locales/nl.d.cts +5 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +110 -0
- package/node_modules/zod/v4/locales/no.cjs +135 -0
- package/node_modules/zod/v4/locales/no.d.cts +5 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +108 -0
- package/node_modules/zod/v4/locales/ota.cjs +136 -0
- package/node_modules/zod/v4/locales/ota.d.cts +5 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +109 -0
- package/node_modules/zod/v4/locales/package.json +7 -0
- package/node_modules/zod/v4/locales/pl.cjs +136 -0
- package/node_modules/zod/v4/locales/pl.d.cts +5 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +109 -0
- package/node_modules/zod/v4/locales/ps.cjs +141 -0
- package/node_modules/zod/v4/locales/ps.d.cts +5 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +114 -0
- package/node_modules/zod/v4/locales/pt.cjs +135 -0
- package/node_modules/zod/v4/locales/pt.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +108 -0
- package/node_modules/zod/v4/locales/ro.cjs +146 -0
- package/node_modules/zod/v4/locales/ro.d.cts +5 -0
- package/node_modules/zod/v4/locales/ro.d.ts +4 -0
- package/node_modules/zod/v4/locales/ro.js +119 -0
- package/node_modules/zod/v4/locales/ru.cjs +183 -0
- package/node_modules/zod/v4/locales/ru.d.cts +5 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +156 -0
- package/node_modules/zod/v4/locales/sl.cjs +136 -0
- package/node_modules/zod/v4/locales/sl.d.cts +5 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +109 -0
- package/node_modules/zod/v4/locales/sv.cjs +137 -0
- package/node_modules/zod/v4/locales/sv.d.cts +5 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +110 -0
- package/node_modules/zod/v4/locales/ta.cjs +137 -0
- package/node_modules/zod/v4/locales/ta.d.cts +5 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +110 -0
- package/node_modules/zod/v4/locales/th.cjs +137 -0
- package/node_modules/zod/v4/locales/th.d.cts +5 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +110 -0
- package/node_modules/zod/v4/locales/tr.cjs +132 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +4 -0
- package/node_modules/zod/v4/locales/tr.js +105 -0
- package/node_modules/zod/v4/locales/ua.cjs +12 -0
- package/node_modules/zod/v4/locales/ua.d.cts +5 -0
- package/node_modules/zod/v4/locales/ua.d.ts +5 -0
- package/node_modules/zod/v4/locales/ua.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +135 -0
- package/node_modules/zod/v4/locales/uk.d.cts +5 -0
- package/node_modules/zod/v4/locales/uk.d.ts +4 -0
- package/node_modules/zod/v4/locales/uk.js +108 -0
- package/node_modules/zod/v4/locales/ur.cjs +137 -0
- package/node_modules/zod/v4/locales/ur.d.cts +5 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +110 -0
- package/node_modules/zod/v4/locales/uz.cjs +137 -0
- package/node_modules/zod/v4/locales/uz.d.cts +5 -0
- package/node_modules/zod/v4/locales/uz.d.ts +4 -0
- package/node_modules/zod/v4/locales/uz.js +110 -0
- package/node_modules/zod/v4/locales/vi.cjs +135 -0
- package/node_modules/zod/v4/locales/vi.d.cts +5 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +108 -0
- package/node_modules/zod/v4/locales/yo.cjs +134 -0
- package/node_modules/zod/v4/locales/yo.d.cts +5 -0
- package/node_modules/zod/v4/locales/yo.d.ts +4 -0
- package/node_modules/zod/v4/locales/yo.js +107 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +136 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +109 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +134 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +107 -0
- package/node_modules/zod/v4/mini/checks.cjs +34 -0
- package/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/zod/v4/mini/coerce.cjs +52 -0
- package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/v4/mini/coerce.js +22 -0
- package/node_modules/zod/v4/mini/external.cjs +63 -0
- package/node_modules/zod/v4/mini/external.d.cts +13 -0
- package/node_modules/zod/v4/mini/external.d.ts +13 -0
- package/node_modules/zod/v4/mini/external.js +14 -0
- package/node_modules/zod/v4/mini/index.cjs +32 -0
- package/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/zod/v4/mini/iso.cjs +64 -0
- package/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/v4/mini/iso.js +34 -0
- package/node_modules/zod/v4/mini/package.json +7 -0
- package/node_modules/zod/v4/mini/parse.cjs +16 -0
- package/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/zod/v4/mini/schemas.cjs +1083 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +445 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +445 -0
- package/node_modules/zod/v4/mini/schemas.js +961 -0
- package/node_modules/zod/v4/package.json +7 -0
- package/node_modules/zod/v4-mini/index.cjs +32 -0
- package/node_modules/zod/v4-mini/index.d.cts +3 -0
- package/node_modules/zod/v4-mini/index.d.ts +3 -0
- package/node_modules/zod/v4-mini/index.js +3 -0
- package/node_modules/zod/v4-mini/package.json +7 -0
- package/package.json +26 -10
- package/dist/chunk-Q4PUTBMV.js.map +0 -1
- package/dist/chunk-RQRT27Q3.js.map +0 -1
- package/dist/chunk-SFI2T6TE.js.map +0 -1
- package/dist/chunk-UDLRVMML.js.map +0 -1
- package/dist/public-route-7IK5D7V7.js.map +0 -1
|
@@ -0,0 +1,970 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/deep-compare-strict.js
|
|
2
|
+
function deepCompareStrict(a, b) {
|
|
3
|
+
const typeofa = typeof a;
|
|
4
|
+
if (typeofa !== typeof b) return false;
|
|
5
|
+
if (Array.isArray(a)) {
|
|
6
|
+
if (!Array.isArray(b)) return false;
|
|
7
|
+
const length = a.length;
|
|
8
|
+
if (length !== b.length) return false;
|
|
9
|
+
for (let i = 0; i < length; i++) if (!deepCompareStrict(a[i], b[i])) return false;
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
if (typeofa === "object") {
|
|
13
|
+
if (!a || !b) return a === b;
|
|
14
|
+
const aKeys = Object.keys(a);
|
|
15
|
+
const bKeys = Object.keys(b);
|
|
16
|
+
if (aKeys.length !== bKeys.length) return false;
|
|
17
|
+
for (const k of aKeys) if (!deepCompareStrict(a[k], b[k])) return false;
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
return a === b;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/pointer.js
|
|
25
|
+
function encodePointer(p) {
|
|
26
|
+
return encodeURI(escapePointer(p));
|
|
27
|
+
}
|
|
28
|
+
function escapePointer(p) {
|
|
29
|
+
return p.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/dereference.js
|
|
34
|
+
const schemaArrayKeyword = {
|
|
35
|
+
prefixItems: true,
|
|
36
|
+
items: true,
|
|
37
|
+
allOf: true,
|
|
38
|
+
anyOf: true,
|
|
39
|
+
oneOf: true
|
|
40
|
+
};
|
|
41
|
+
const schemaMapKeyword = {
|
|
42
|
+
$defs: true,
|
|
43
|
+
definitions: true,
|
|
44
|
+
properties: true,
|
|
45
|
+
patternProperties: true,
|
|
46
|
+
dependentSchemas: true
|
|
47
|
+
};
|
|
48
|
+
const ignoredKeyword = {
|
|
49
|
+
id: true,
|
|
50
|
+
$id: true,
|
|
51
|
+
$ref: true,
|
|
52
|
+
$schema: true,
|
|
53
|
+
$anchor: true,
|
|
54
|
+
$vocabulary: true,
|
|
55
|
+
$comment: true,
|
|
56
|
+
default: true,
|
|
57
|
+
enum: true,
|
|
58
|
+
const: true,
|
|
59
|
+
required: true,
|
|
60
|
+
type: true,
|
|
61
|
+
maximum: true,
|
|
62
|
+
minimum: true,
|
|
63
|
+
exclusiveMaximum: true,
|
|
64
|
+
exclusiveMinimum: true,
|
|
65
|
+
multipleOf: true,
|
|
66
|
+
maxLength: true,
|
|
67
|
+
minLength: true,
|
|
68
|
+
pattern: true,
|
|
69
|
+
format: true,
|
|
70
|
+
maxItems: true,
|
|
71
|
+
minItems: true,
|
|
72
|
+
uniqueItems: true,
|
|
73
|
+
maxProperties: true,
|
|
74
|
+
minProperties: true
|
|
75
|
+
};
|
|
76
|
+
let initialBaseURI = typeof self !== "undefined" && self.location && self.location.origin !== "null" ? new URL(self.location.origin + self.location.pathname + location.search) : new URL("https://github.com/cfworker");
|
|
77
|
+
function dereference(schema, lookup = Object.create(null), baseURI = initialBaseURI, basePointer = "") {
|
|
78
|
+
if (schema && typeof schema === "object" && !Array.isArray(schema)) {
|
|
79
|
+
const id = schema.$id || schema.id;
|
|
80
|
+
if (id) {
|
|
81
|
+
const url = new URL(id, baseURI.href);
|
|
82
|
+
if (url.hash.length > 1) lookup[url.href] = schema;
|
|
83
|
+
else {
|
|
84
|
+
url.hash = "";
|
|
85
|
+
if (basePointer === "") baseURI = url;
|
|
86
|
+
else dereference(schema, lookup, baseURI);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
} else if (schema !== true && schema !== false) return lookup;
|
|
90
|
+
const schemaURI = baseURI.href + (basePointer ? "#" + basePointer : "");
|
|
91
|
+
if (lookup[schemaURI] !== void 0) throw new Error(`Duplicate schema URI "${schemaURI}".`);
|
|
92
|
+
lookup[schemaURI] = schema;
|
|
93
|
+
if (schema === true || schema === false) return lookup;
|
|
94
|
+
if (schema.__absolute_uri__ === void 0) Object.defineProperty(schema, "__absolute_uri__", {
|
|
95
|
+
enumerable: false,
|
|
96
|
+
value: schemaURI
|
|
97
|
+
});
|
|
98
|
+
if (schema.$ref && schema.__absolute_ref__ === void 0) {
|
|
99
|
+
const url = new URL(schema.$ref, baseURI.href);
|
|
100
|
+
url.hash = url.hash;
|
|
101
|
+
Object.defineProperty(schema, "__absolute_ref__", {
|
|
102
|
+
enumerable: false,
|
|
103
|
+
value: url.href
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
if (schema.$recursiveRef && schema.__absolute_recursive_ref__ === void 0) {
|
|
107
|
+
const url = new URL(schema.$recursiveRef, baseURI.href);
|
|
108
|
+
url.hash = url.hash;
|
|
109
|
+
Object.defineProperty(schema, "__absolute_recursive_ref__", {
|
|
110
|
+
enumerable: false,
|
|
111
|
+
value: url.href
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
if (schema.$anchor) {
|
|
115
|
+
const url = new URL("#" + schema.$anchor, baseURI.href);
|
|
116
|
+
lookup[url.href] = schema;
|
|
117
|
+
}
|
|
118
|
+
for (let key in schema) {
|
|
119
|
+
if (ignoredKeyword[key]) continue;
|
|
120
|
+
const keyBase = `${basePointer}/${encodePointer(key)}`;
|
|
121
|
+
const subSchema = schema[key];
|
|
122
|
+
if (Array.isArray(subSchema)) {
|
|
123
|
+
if (schemaArrayKeyword[key]) {
|
|
124
|
+
const length = subSchema.length;
|
|
125
|
+
for (let i = 0; i < length; i++) dereference(subSchema[i], lookup, baseURI, `${keyBase}/${i}`);
|
|
126
|
+
}
|
|
127
|
+
} else if (schemaMapKeyword[key]) for (let subKey in subSchema) dereference(subSchema[subKey], lookup, baseURI, `${keyBase}/${encodePointer(subKey)}`);
|
|
128
|
+
else dereference(subSchema, lookup, baseURI, keyBase);
|
|
129
|
+
}
|
|
130
|
+
return lookup;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/format.js
|
|
135
|
+
const DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
|
|
136
|
+
const DAYS = [
|
|
137
|
+
0,
|
|
138
|
+
31,
|
|
139
|
+
28,
|
|
140
|
+
31,
|
|
141
|
+
30,
|
|
142
|
+
31,
|
|
143
|
+
30,
|
|
144
|
+
31,
|
|
145
|
+
31,
|
|
146
|
+
30,
|
|
147
|
+
31,
|
|
148
|
+
30,
|
|
149
|
+
31
|
|
150
|
+
];
|
|
151
|
+
const TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;
|
|
152
|
+
const HOSTNAME = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;
|
|
153
|
+
const URIREF = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
|
154
|
+
const URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;
|
|
155
|
+
const URL_ = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu;
|
|
156
|
+
const UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
|
|
157
|
+
const JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/;
|
|
158
|
+
const JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;
|
|
159
|
+
const RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;
|
|
160
|
+
const EMAIL = (input) => {
|
|
161
|
+
if (input[0] === "\"") return false;
|
|
162
|
+
const [name, host, ...rest] = input.split("@");
|
|
163
|
+
if (!name || !host || rest.length !== 0 || name.length > 64 || host.length > 253) return false;
|
|
164
|
+
if (name[0] === "." || name.endsWith(".") || name.includes("..")) return false;
|
|
165
|
+
if (!/^[a-z0-9.-]+$/i.test(host) || !/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(name)) return false;
|
|
166
|
+
return host.split(".").every((part) => /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(part));
|
|
167
|
+
};
|
|
168
|
+
const IPV4 = /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/;
|
|
169
|
+
const IPV6 = /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i;
|
|
170
|
+
const DURATION = (input) => input.length > 1 && input.length < 80 && (/^P\d+([.,]\d+)?W$/.test(input) || /^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(input) && /^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(input));
|
|
171
|
+
function bind(r) {
|
|
172
|
+
return r.test.bind(r);
|
|
173
|
+
}
|
|
174
|
+
const format = {
|
|
175
|
+
date,
|
|
176
|
+
time: time.bind(void 0, false),
|
|
177
|
+
"date-time": date_time,
|
|
178
|
+
duration: DURATION,
|
|
179
|
+
uri,
|
|
180
|
+
"uri-reference": bind(URIREF),
|
|
181
|
+
"uri-template": bind(URITEMPLATE),
|
|
182
|
+
url: bind(URL_),
|
|
183
|
+
email: EMAIL,
|
|
184
|
+
hostname: bind(HOSTNAME),
|
|
185
|
+
ipv4: bind(IPV4),
|
|
186
|
+
ipv6: bind(IPV6),
|
|
187
|
+
regex,
|
|
188
|
+
uuid: bind(UUID),
|
|
189
|
+
"json-pointer": bind(JSON_POINTER),
|
|
190
|
+
"json-pointer-uri-fragment": bind(JSON_POINTER_URI_FRAGMENT),
|
|
191
|
+
"relative-json-pointer": bind(RELATIVE_JSON_POINTER)
|
|
192
|
+
};
|
|
193
|
+
function isLeapYear(year) {
|
|
194
|
+
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
195
|
+
}
|
|
196
|
+
function date(str) {
|
|
197
|
+
const matches = str.match(DATE);
|
|
198
|
+
if (!matches) return false;
|
|
199
|
+
const year = +matches[1];
|
|
200
|
+
const month = +matches[2];
|
|
201
|
+
const day = +matches[3];
|
|
202
|
+
return month >= 1 && month <= 12 && day >= 1 && day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]);
|
|
203
|
+
}
|
|
204
|
+
function time(full, str) {
|
|
205
|
+
const matches = str.match(TIME);
|
|
206
|
+
if (!matches) return false;
|
|
207
|
+
const hour = +matches[1];
|
|
208
|
+
const minute = +matches[2];
|
|
209
|
+
const second = +matches[3];
|
|
210
|
+
const timeZone = !!matches[5];
|
|
211
|
+
return (hour <= 23 && minute <= 59 && second <= 59 || hour == 23 && minute == 59 && second == 60) && (!full || timeZone);
|
|
212
|
+
}
|
|
213
|
+
const DATE_TIME_SEPARATOR = /t|\s/i;
|
|
214
|
+
function date_time(str) {
|
|
215
|
+
const dateTime = str.split(DATE_TIME_SEPARATOR);
|
|
216
|
+
return dateTime.length == 2 && date(dateTime[0]) && time(true, dateTime[1]);
|
|
217
|
+
}
|
|
218
|
+
const NOT_URI_FRAGMENT = /\/|:/;
|
|
219
|
+
const URI_PATTERN = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
|
220
|
+
function uri(str) {
|
|
221
|
+
return NOT_URI_FRAGMENT.test(str) && URI_PATTERN.test(str);
|
|
222
|
+
}
|
|
223
|
+
const Z_ANCHOR = /[^\\]\\Z/;
|
|
224
|
+
function regex(str) {
|
|
225
|
+
if (Z_ANCHOR.test(str)) return false;
|
|
226
|
+
try {
|
|
227
|
+
new RegExp(str, "u");
|
|
228
|
+
return true;
|
|
229
|
+
} catch (e) {
|
|
230
|
+
return false;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
//#endregion
|
|
235
|
+
//#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/ucs2-length.js
|
|
236
|
+
function ucs2length(s) {
|
|
237
|
+
let result = 0;
|
|
238
|
+
let length = s.length;
|
|
239
|
+
let index = 0;
|
|
240
|
+
let charCode;
|
|
241
|
+
while (index < length) {
|
|
242
|
+
result++;
|
|
243
|
+
charCode = s.charCodeAt(index++);
|
|
244
|
+
if (charCode >= 55296 && charCode <= 56319 && index < length) {
|
|
245
|
+
charCode = s.charCodeAt(index);
|
|
246
|
+
if ((charCode & 64512) == 56320) index++;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return result;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
//#endregion
|
|
253
|
+
//#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/validate.js
|
|
254
|
+
function validate(instance, schema, draft = "2019-09", lookup = dereference(schema), shortCircuit = true, recursiveAnchor = null, instanceLocation = "#", schemaLocation = "#", evaluated = Object.create(null)) {
|
|
255
|
+
if (schema === true) return {
|
|
256
|
+
valid: true,
|
|
257
|
+
errors: []
|
|
258
|
+
};
|
|
259
|
+
if (schema === false) return {
|
|
260
|
+
valid: false,
|
|
261
|
+
errors: [{
|
|
262
|
+
instanceLocation,
|
|
263
|
+
keyword: "false",
|
|
264
|
+
keywordLocation: instanceLocation,
|
|
265
|
+
error: "False boolean schema."
|
|
266
|
+
}]
|
|
267
|
+
};
|
|
268
|
+
const rawInstanceType = typeof instance;
|
|
269
|
+
let instanceType;
|
|
270
|
+
switch (rawInstanceType) {
|
|
271
|
+
case "boolean":
|
|
272
|
+
case "number":
|
|
273
|
+
case "string":
|
|
274
|
+
instanceType = rawInstanceType;
|
|
275
|
+
break;
|
|
276
|
+
case "object":
|
|
277
|
+
if (instance === null) instanceType = "null";
|
|
278
|
+
else if (Array.isArray(instance)) instanceType = "array";
|
|
279
|
+
else instanceType = "object";
|
|
280
|
+
break;
|
|
281
|
+
default: throw new Error(`Instances of "${rawInstanceType}" type are not supported.`);
|
|
282
|
+
}
|
|
283
|
+
const { $ref, $recursiveRef, $recursiveAnchor, type: $type, const: $const, enum: $enum, required: $required, not: $not, anyOf: $anyOf, allOf: $allOf, oneOf: $oneOf, if: $if, then: $then, else: $else, format: $format, properties: $properties, patternProperties: $patternProperties, additionalProperties: $additionalProperties, unevaluatedProperties: $unevaluatedProperties, minProperties: $minProperties, maxProperties: $maxProperties, propertyNames: $propertyNames, dependentRequired: $dependentRequired, dependentSchemas: $dependentSchemas, dependencies: $dependencies, prefixItems: $prefixItems, items: $items, additionalItems: $additionalItems, unevaluatedItems: $unevaluatedItems, contains: $contains, minContains: $minContains, maxContains: $maxContains, minItems: $minItems, maxItems: $maxItems, uniqueItems: $uniqueItems, minimum: $minimum, maximum: $maximum, exclusiveMinimum: $exclusiveMinimum, exclusiveMaximum: $exclusiveMaximum, multipleOf: $multipleOf, minLength: $minLength, maxLength: $maxLength, pattern: $pattern, __absolute_ref__, __absolute_recursive_ref__ } = schema;
|
|
284
|
+
const errors = [];
|
|
285
|
+
if ($recursiveAnchor === true && recursiveAnchor === null) recursiveAnchor = schema;
|
|
286
|
+
if ($recursiveRef === "#") {
|
|
287
|
+
const refSchema = recursiveAnchor === null ? lookup[__absolute_recursive_ref__] : recursiveAnchor;
|
|
288
|
+
const keywordLocation = `${schemaLocation}/$recursiveRef`;
|
|
289
|
+
const result = validate(instance, recursiveAnchor === null ? schema : recursiveAnchor, draft, lookup, shortCircuit, refSchema, instanceLocation, keywordLocation, evaluated);
|
|
290
|
+
if (!result.valid) errors.push({
|
|
291
|
+
instanceLocation,
|
|
292
|
+
keyword: "$recursiveRef",
|
|
293
|
+
keywordLocation,
|
|
294
|
+
error: "A subschema had errors."
|
|
295
|
+
}, ...result.errors);
|
|
296
|
+
}
|
|
297
|
+
if ($ref !== void 0) {
|
|
298
|
+
const refSchema = lookup[__absolute_ref__ || $ref];
|
|
299
|
+
if (refSchema === void 0) {
|
|
300
|
+
let message = `Unresolved $ref "${$ref}".`;
|
|
301
|
+
if (__absolute_ref__ && __absolute_ref__ !== $ref) message += ` Absolute URI "${__absolute_ref__}".`;
|
|
302
|
+
message += `\nKnown schemas:\n- ${Object.keys(lookup).join("\n- ")}`;
|
|
303
|
+
throw new Error(message);
|
|
304
|
+
}
|
|
305
|
+
const keywordLocation = `${schemaLocation}/$ref`;
|
|
306
|
+
const result = validate(instance, refSchema, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation, evaluated);
|
|
307
|
+
if (!result.valid) errors.push({
|
|
308
|
+
instanceLocation,
|
|
309
|
+
keyword: "$ref",
|
|
310
|
+
keywordLocation,
|
|
311
|
+
error: "A subschema had errors."
|
|
312
|
+
}, ...result.errors);
|
|
313
|
+
if (draft === "4" || draft === "7") return {
|
|
314
|
+
valid: errors.length === 0,
|
|
315
|
+
errors
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
if (Array.isArray($type)) {
|
|
319
|
+
let length = $type.length;
|
|
320
|
+
let valid = false;
|
|
321
|
+
for (let i = 0; i < length; i++) if (instanceType === $type[i] || $type[i] === "integer" && instanceType === "number" && instance % 1 === 0 && instance === instance) {
|
|
322
|
+
valid = true;
|
|
323
|
+
break;
|
|
324
|
+
}
|
|
325
|
+
if (!valid) errors.push({
|
|
326
|
+
instanceLocation,
|
|
327
|
+
keyword: "type",
|
|
328
|
+
keywordLocation: `${schemaLocation}/type`,
|
|
329
|
+
error: `Instance type "${instanceType}" is invalid. Expected "${$type.join("\", \"")}".`
|
|
330
|
+
});
|
|
331
|
+
} else if ($type === "integer") {
|
|
332
|
+
if (instanceType !== "number" || instance % 1 || instance !== instance) errors.push({
|
|
333
|
+
instanceLocation,
|
|
334
|
+
keyword: "type",
|
|
335
|
+
keywordLocation: `${schemaLocation}/type`,
|
|
336
|
+
error: `Instance type "${instanceType}" is invalid. Expected "${$type}".`
|
|
337
|
+
});
|
|
338
|
+
} else if ($type !== void 0 && instanceType !== $type) errors.push({
|
|
339
|
+
instanceLocation,
|
|
340
|
+
keyword: "type",
|
|
341
|
+
keywordLocation: `${schemaLocation}/type`,
|
|
342
|
+
error: `Instance type "${instanceType}" is invalid. Expected "${$type}".`
|
|
343
|
+
});
|
|
344
|
+
if ($const !== void 0) {
|
|
345
|
+
if (instanceType === "object" || instanceType === "array") {
|
|
346
|
+
if (!deepCompareStrict(instance, $const)) errors.push({
|
|
347
|
+
instanceLocation,
|
|
348
|
+
keyword: "const",
|
|
349
|
+
keywordLocation: `${schemaLocation}/const`,
|
|
350
|
+
error: `Instance does not match ${JSON.stringify($const)}.`
|
|
351
|
+
});
|
|
352
|
+
} else if (instance !== $const) errors.push({
|
|
353
|
+
instanceLocation,
|
|
354
|
+
keyword: "const",
|
|
355
|
+
keywordLocation: `${schemaLocation}/const`,
|
|
356
|
+
error: `Instance does not match ${JSON.stringify($const)}.`
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
if ($enum !== void 0) {
|
|
360
|
+
if (instanceType === "object" || instanceType === "array") {
|
|
361
|
+
if (!$enum.some((value) => deepCompareStrict(instance, value))) errors.push({
|
|
362
|
+
instanceLocation,
|
|
363
|
+
keyword: "enum",
|
|
364
|
+
keywordLocation: `${schemaLocation}/enum`,
|
|
365
|
+
error: `Instance does not match any of ${JSON.stringify($enum)}.`
|
|
366
|
+
});
|
|
367
|
+
} else if (!$enum.some((value) => instance === value)) errors.push({
|
|
368
|
+
instanceLocation,
|
|
369
|
+
keyword: "enum",
|
|
370
|
+
keywordLocation: `${schemaLocation}/enum`,
|
|
371
|
+
error: `Instance does not match any of ${JSON.stringify($enum)}.`
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
if ($not !== void 0) {
|
|
375
|
+
const keywordLocation = `${schemaLocation}/not`;
|
|
376
|
+
if (validate(instance, $not, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation).valid) errors.push({
|
|
377
|
+
instanceLocation,
|
|
378
|
+
keyword: "not",
|
|
379
|
+
keywordLocation,
|
|
380
|
+
error: "Instance matched \"not\" schema."
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
let subEvaluateds = [];
|
|
384
|
+
if ($anyOf !== void 0) {
|
|
385
|
+
const keywordLocation = `${schemaLocation}/anyOf`;
|
|
386
|
+
const errorsLength = errors.length;
|
|
387
|
+
let anyValid = false;
|
|
388
|
+
for (let i = 0; i < $anyOf.length; i++) {
|
|
389
|
+
const subSchema = $anyOf[i];
|
|
390
|
+
const subEvaluated = Object.create(evaluated);
|
|
391
|
+
const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated);
|
|
392
|
+
errors.push(...result.errors);
|
|
393
|
+
anyValid = anyValid || result.valid;
|
|
394
|
+
if (result.valid) subEvaluateds.push(subEvaluated);
|
|
395
|
+
}
|
|
396
|
+
if (anyValid) errors.length = errorsLength;
|
|
397
|
+
else errors.splice(errorsLength, 0, {
|
|
398
|
+
instanceLocation,
|
|
399
|
+
keyword: "anyOf",
|
|
400
|
+
keywordLocation,
|
|
401
|
+
error: "Instance does not match any subschemas."
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
if ($allOf !== void 0) {
|
|
405
|
+
const keywordLocation = `${schemaLocation}/allOf`;
|
|
406
|
+
const errorsLength = errors.length;
|
|
407
|
+
let allValid = true;
|
|
408
|
+
for (let i = 0; i < $allOf.length; i++) {
|
|
409
|
+
const subSchema = $allOf[i];
|
|
410
|
+
const subEvaluated = Object.create(evaluated);
|
|
411
|
+
const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated);
|
|
412
|
+
errors.push(...result.errors);
|
|
413
|
+
allValid = allValid && result.valid;
|
|
414
|
+
if (result.valid) subEvaluateds.push(subEvaluated);
|
|
415
|
+
}
|
|
416
|
+
if (allValid) errors.length = errorsLength;
|
|
417
|
+
else errors.splice(errorsLength, 0, {
|
|
418
|
+
instanceLocation,
|
|
419
|
+
keyword: "allOf",
|
|
420
|
+
keywordLocation,
|
|
421
|
+
error: `Instance does not match every subschema.`
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
if ($oneOf !== void 0) {
|
|
425
|
+
const keywordLocation = `${schemaLocation}/oneOf`;
|
|
426
|
+
const errorsLength = errors.length;
|
|
427
|
+
const matches = $oneOf.filter((subSchema, i) => {
|
|
428
|
+
const subEvaluated = Object.create(evaluated);
|
|
429
|
+
const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated);
|
|
430
|
+
errors.push(...result.errors);
|
|
431
|
+
if (result.valid) subEvaluateds.push(subEvaluated);
|
|
432
|
+
return result.valid;
|
|
433
|
+
}).length;
|
|
434
|
+
if (matches === 1) errors.length = errorsLength;
|
|
435
|
+
else errors.splice(errorsLength, 0, {
|
|
436
|
+
instanceLocation,
|
|
437
|
+
keyword: "oneOf",
|
|
438
|
+
keywordLocation,
|
|
439
|
+
error: `Instance does not match exactly one subschema (${matches} matches).`
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
if (instanceType === "object" || instanceType === "array") Object.assign(evaluated, ...subEvaluateds);
|
|
443
|
+
if ($if !== void 0) {
|
|
444
|
+
const keywordLocation = `${schemaLocation}/if`;
|
|
445
|
+
if (validate(instance, $if, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation, evaluated).valid) {
|
|
446
|
+
if ($then !== void 0) {
|
|
447
|
+
const thenResult = validate(instance, $then, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${schemaLocation}/then`, evaluated);
|
|
448
|
+
if (!thenResult.valid) errors.push({
|
|
449
|
+
instanceLocation,
|
|
450
|
+
keyword: "if",
|
|
451
|
+
keywordLocation,
|
|
452
|
+
error: `Instance does not match "then" schema.`
|
|
453
|
+
}, ...thenResult.errors);
|
|
454
|
+
}
|
|
455
|
+
} else if ($else !== void 0) {
|
|
456
|
+
const elseResult = validate(instance, $else, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${schemaLocation}/else`, evaluated);
|
|
457
|
+
if (!elseResult.valid) errors.push({
|
|
458
|
+
instanceLocation,
|
|
459
|
+
keyword: "if",
|
|
460
|
+
keywordLocation,
|
|
461
|
+
error: `Instance does not match "else" schema.`
|
|
462
|
+
}, ...elseResult.errors);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
if (instanceType === "object") {
|
|
466
|
+
if ($required !== void 0) {
|
|
467
|
+
for (const key of $required) if (!(key in instance)) errors.push({
|
|
468
|
+
instanceLocation,
|
|
469
|
+
keyword: "required",
|
|
470
|
+
keywordLocation: `${schemaLocation}/required`,
|
|
471
|
+
error: `Instance does not have required property "${key}".`
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
const keys = Object.keys(instance);
|
|
475
|
+
if ($minProperties !== void 0 && keys.length < $minProperties) errors.push({
|
|
476
|
+
instanceLocation,
|
|
477
|
+
keyword: "minProperties",
|
|
478
|
+
keywordLocation: `${schemaLocation}/minProperties`,
|
|
479
|
+
error: `Instance does not have at least ${$minProperties} properties.`
|
|
480
|
+
});
|
|
481
|
+
if ($maxProperties !== void 0 && keys.length > $maxProperties) errors.push({
|
|
482
|
+
instanceLocation,
|
|
483
|
+
keyword: "maxProperties",
|
|
484
|
+
keywordLocation: `${schemaLocation}/maxProperties`,
|
|
485
|
+
error: `Instance does not have at least ${$maxProperties} properties.`
|
|
486
|
+
});
|
|
487
|
+
if ($propertyNames !== void 0) {
|
|
488
|
+
const keywordLocation = `${schemaLocation}/propertyNames`;
|
|
489
|
+
for (const key in instance) {
|
|
490
|
+
const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;
|
|
491
|
+
const result = validate(key, $propertyNames, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation);
|
|
492
|
+
if (!result.valid) errors.push({
|
|
493
|
+
instanceLocation,
|
|
494
|
+
keyword: "propertyNames",
|
|
495
|
+
keywordLocation,
|
|
496
|
+
error: `Property name "${key}" does not match schema.`
|
|
497
|
+
}, ...result.errors);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
if ($dependentRequired !== void 0) {
|
|
501
|
+
const keywordLocation = `${schemaLocation}/dependantRequired`;
|
|
502
|
+
for (const key in $dependentRequired) if (key in instance) {
|
|
503
|
+
const required = $dependentRequired[key];
|
|
504
|
+
for (const dependantKey of required) if (!(dependantKey in instance)) errors.push({
|
|
505
|
+
instanceLocation,
|
|
506
|
+
keyword: "dependentRequired",
|
|
507
|
+
keywordLocation,
|
|
508
|
+
error: `Instance has "${key}" but does not have "${dependantKey}".`
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
if ($dependentSchemas !== void 0) for (const key in $dependentSchemas) {
|
|
513
|
+
const keywordLocation = `${schemaLocation}/dependentSchemas`;
|
|
514
|
+
if (key in instance) {
|
|
515
|
+
const result = validate(instance, $dependentSchemas[key], draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${keywordLocation}/${encodePointer(key)}`, evaluated);
|
|
516
|
+
if (!result.valid) errors.push({
|
|
517
|
+
instanceLocation,
|
|
518
|
+
keyword: "dependentSchemas",
|
|
519
|
+
keywordLocation,
|
|
520
|
+
error: `Instance has "${key}" but does not match dependant schema.`
|
|
521
|
+
}, ...result.errors);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
if ($dependencies !== void 0) {
|
|
525
|
+
const keywordLocation = `${schemaLocation}/dependencies`;
|
|
526
|
+
for (const key in $dependencies) if (key in instance) {
|
|
527
|
+
const propsOrSchema = $dependencies[key];
|
|
528
|
+
if (Array.isArray(propsOrSchema)) {
|
|
529
|
+
for (const dependantKey of propsOrSchema) if (!(dependantKey in instance)) errors.push({
|
|
530
|
+
instanceLocation,
|
|
531
|
+
keyword: "dependencies",
|
|
532
|
+
keywordLocation,
|
|
533
|
+
error: `Instance has "${key}" but does not have "${dependantKey}".`
|
|
534
|
+
});
|
|
535
|
+
} else {
|
|
536
|
+
const result = validate(instance, propsOrSchema, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${keywordLocation}/${encodePointer(key)}`);
|
|
537
|
+
if (!result.valid) errors.push({
|
|
538
|
+
instanceLocation,
|
|
539
|
+
keyword: "dependencies",
|
|
540
|
+
keywordLocation,
|
|
541
|
+
error: `Instance has "${key}" but does not match dependant schema.`
|
|
542
|
+
}, ...result.errors);
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
const thisEvaluated = Object.create(null);
|
|
547
|
+
let stop = false;
|
|
548
|
+
if ($properties !== void 0) {
|
|
549
|
+
const keywordLocation = `${schemaLocation}/properties`;
|
|
550
|
+
for (const key in $properties) {
|
|
551
|
+
if (!(key in instance)) continue;
|
|
552
|
+
const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;
|
|
553
|
+
const result = validate(instance[key], $properties[key], draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, `${keywordLocation}/${encodePointer(key)}`);
|
|
554
|
+
if (result.valid) evaluated[key] = thisEvaluated[key] = true;
|
|
555
|
+
else {
|
|
556
|
+
stop = shortCircuit;
|
|
557
|
+
errors.push({
|
|
558
|
+
instanceLocation,
|
|
559
|
+
keyword: "properties",
|
|
560
|
+
keywordLocation,
|
|
561
|
+
error: `Property "${key}" does not match schema.`
|
|
562
|
+
}, ...result.errors);
|
|
563
|
+
if (stop) break;
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
if (!stop && $patternProperties !== void 0) {
|
|
568
|
+
const keywordLocation = `${schemaLocation}/patternProperties`;
|
|
569
|
+
for (const pattern in $patternProperties) {
|
|
570
|
+
const regex$1 = new RegExp(pattern, "u");
|
|
571
|
+
const subSchema = $patternProperties[pattern];
|
|
572
|
+
for (const key in instance) {
|
|
573
|
+
if (!regex$1.test(key)) continue;
|
|
574
|
+
const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;
|
|
575
|
+
const result = validate(instance[key], subSchema, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, `${keywordLocation}/${encodePointer(pattern)}`);
|
|
576
|
+
if (result.valid) evaluated[key] = thisEvaluated[key] = true;
|
|
577
|
+
else {
|
|
578
|
+
stop = shortCircuit;
|
|
579
|
+
errors.push({
|
|
580
|
+
instanceLocation,
|
|
581
|
+
keyword: "patternProperties",
|
|
582
|
+
keywordLocation,
|
|
583
|
+
error: `Property "${key}" matches pattern "${pattern}" but does not match associated schema.`
|
|
584
|
+
}, ...result.errors);
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
if (!stop && $additionalProperties !== void 0) {
|
|
590
|
+
const keywordLocation = `${schemaLocation}/additionalProperties`;
|
|
591
|
+
for (const key in instance) {
|
|
592
|
+
if (thisEvaluated[key]) continue;
|
|
593
|
+
const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;
|
|
594
|
+
const result = validate(instance[key], $additionalProperties, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation);
|
|
595
|
+
if (result.valid) evaluated[key] = true;
|
|
596
|
+
else {
|
|
597
|
+
stop = shortCircuit;
|
|
598
|
+
errors.push({
|
|
599
|
+
instanceLocation,
|
|
600
|
+
keyword: "additionalProperties",
|
|
601
|
+
keywordLocation,
|
|
602
|
+
error: `Property "${key}" does not match additional properties schema.`
|
|
603
|
+
}, ...result.errors);
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
} else if (!stop && $unevaluatedProperties !== void 0) {
|
|
607
|
+
const keywordLocation = `${schemaLocation}/unevaluatedProperties`;
|
|
608
|
+
for (const key in instance) if (!evaluated[key]) {
|
|
609
|
+
const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;
|
|
610
|
+
const result = validate(instance[key], $unevaluatedProperties, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation);
|
|
611
|
+
if (result.valid) evaluated[key] = true;
|
|
612
|
+
else errors.push({
|
|
613
|
+
instanceLocation,
|
|
614
|
+
keyword: "unevaluatedProperties",
|
|
615
|
+
keywordLocation,
|
|
616
|
+
error: `Property "${key}" does not match unevaluated properties schema.`
|
|
617
|
+
}, ...result.errors);
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
} else if (instanceType === "array") {
|
|
621
|
+
if ($maxItems !== void 0 && instance.length > $maxItems) errors.push({
|
|
622
|
+
instanceLocation,
|
|
623
|
+
keyword: "maxItems",
|
|
624
|
+
keywordLocation: `${schemaLocation}/maxItems`,
|
|
625
|
+
error: `Array has too many items (${instance.length} > ${$maxItems}).`
|
|
626
|
+
});
|
|
627
|
+
if ($minItems !== void 0 && instance.length < $minItems) errors.push({
|
|
628
|
+
instanceLocation,
|
|
629
|
+
keyword: "minItems",
|
|
630
|
+
keywordLocation: `${schemaLocation}/minItems`,
|
|
631
|
+
error: `Array has too few items (${instance.length} < ${$minItems}).`
|
|
632
|
+
});
|
|
633
|
+
const length = instance.length;
|
|
634
|
+
let i = 0;
|
|
635
|
+
let stop = false;
|
|
636
|
+
if ($prefixItems !== void 0) {
|
|
637
|
+
const keywordLocation = `${schemaLocation}/prefixItems`;
|
|
638
|
+
const length2 = Math.min($prefixItems.length, length);
|
|
639
|
+
for (; i < length2; i++) {
|
|
640
|
+
const result = validate(instance[i], $prefixItems[i], draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, `${keywordLocation}/${i}`);
|
|
641
|
+
evaluated[i] = true;
|
|
642
|
+
if (!result.valid) {
|
|
643
|
+
stop = shortCircuit;
|
|
644
|
+
errors.push({
|
|
645
|
+
instanceLocation,
|
|
646
|
+
keyword: "prefixItems",
|
|
647
|
+
keywordLocation,
|
|
648
|
+
error: `Items did not match schema.`
|
|
649
|
+
}, ...result.errors);
|
|
650
|
+
if (stop) break;
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
if ($items !== void 0) {
|
|
655
|
+
const keywordLocation = `${schemaLocation}/items`;
|
|
656
|
+
if (Array.isArray($items)) {
|
|
657
|
+
const length2 = Math.min($items.length, length);
|
|
658
|
+
for (; i < length2; i++) {
|
|
659
|
+
const result = validate(instance[i], $items[i], draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, `${keywordLocation}/${i}`);
|
|
660
|
+
evaluated[i] = true;
|
|
661
|
+
if (!result.valid) {
|
|
662
|
+
stop = shortCircuit;
|
|
663
|
+
errors.push({
|
|
664
|
+
instanceLocation,
|
|
665
|
+
keyword: "items",
|
|
666
|
+
keywordLocation,
|
|
667
|
+
error: `Items did not match schema.`
|
|
668
|
+
}, ...result.errors);
|
|
669
|
+
if (stop) break;
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
} else for (; i < length; i++) {
|
|
673
|
+
const result = validate(instance[i], $items, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation);
|
|
674
|
+
evaluated[i] = true;
|
|
675
|
+
if (!result.valid) {
|
|
676
|
+
stop = shortCircuit;
|
|
677
|
+
errors.push({
|
|
678
|
+
instanceLocation,
|
|
679
|
+
keyword: "items",
|
|
680
|
+
keywordLocation,
|
|
681
|
+
error: `Items did not match schema.`
|
|
682
|
+
}, ...result.errors);
|
|
683
|
+
if (stop) break;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
if (!stop && $additionalItems !== void 0) {
|
|
687
|
+
const keywordLocation$1 = `${schemaLocation}/additionalItems`;
|
|
688
|
+
for (; i < length; i++) {
|
|
689
|
+
const result = validate(instance[i], $additionalItems, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation$1);
|
|
690
|
+
evaluated[i] = true;
|
|
691
|
+
if (!result.valid) {
|
|
692
|
+
stop = shortCircuit;
|
|
693
|
+
errors.push({
|
|
694
|
+
instanceLocation,
|
|
695
|
+
keyword: "additionalItems",
|
|
696
|
+
keywordLocation: keywordLocation$1,
|
|
697
|
+
error: `Items did not match additional items schema.`
|
|
698
|
+
}, ...result.errors);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
if ($contains !== void 0) if (length === 0 && $minContains === void 0) errors.push({
|
|
704
|
+
instanceLocation,
|
|
705
|
+
keyword: "contains",
|
|
706
|
+
keywordLocation: `${schemaLocation}/contains`,
|
|
707
|
+
error: `Array is empty. It must contain at least one item matching the schema.`
|
|
708
|
+
});
|
|
709
|
+
else if ($minContains !== void 0 && length < $minContains) errors.push({
|
|
710
|
+
instanceLocation,
|
|
711
|
+
keyword: "minContains",
|
|
712
|
+
keywordLocation: `${schemaLocation}/minContains`,
|
|
713
|
+
error: `Array has less items (${length}) than minContains (${$minContains}).`
|
|
714
|
+
});
|
|
715
|
+
else {
|
|
716
|
+
const keywordLocation = `${schemaLocation}/contains`;
|
|
717
|
+
const errorsLength = errors.length;
|
|
718
|
+
let contained = 0;
|
|
719
|
+
for (let j = 0; j < length; j++) {
|
|
720
|
+
const result = validate(instance[j], $contains, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${j}`, keywordLocation);
|
|
721
|
+
if (result.valid) {
|
|
722
|
+
evaluated[j] = true;
|
|
723
|
+
contained++;
|
|
724
|
+
} else errors.push(...result.errors);
|
|
725
|
+
}
|
|
726
|
+
if (contained >= ($minContains || 0)) errors.length = errorsLength;
|
|
727
|
+
if ($minContains === void 0 && $maxContains === void 0 && contained === 0) errors.splice(errorsLength, 0, {
|
|
728
|
+
instanceLocation,
|
|
729
|
+
keyword: "contains",
|
|
730
|
+
keywordLocation,
|
|
731
|
+
error: `Array does not contain item matching schema.`
|
|
732
|
+
});
|
|
733
|
+
else if ($minContains !== void 0 && contained < $minContains) errors.push({
|
|
734
|
+
instanceLocation,
|
|
735
|
+
keyword: "minContains",
|
|
736
|
+
keywordLocation: `${schemaLocation}/minContains`,
|
|
737
|
+
error: `Array must contain at least ${$minContains} items matching schema. Only ${contained} items were found.`
|
|
738
|
+
});
|
|
739
|
+
else if ($maxContains !== void 0 && contained > $maxContains) errors.push({
|
|
740
|
+
instanceLocation,
|
|
741
|
+
keyword: "maxContains",
|
|
742
|
+
keywordLocation: `${schemaLocation}/maxContains`,
|
|
743
|
+
error: `Array may contain at most ${$maxContains} items matching schema. ${contained} items were found.`
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
if (!stop && $unevaluatedItems !== void 0) {
|
|
747
|
+
const keywordLocation = `${schemaLocation}/unevaluatedItems`;
|
|
748
|
+
for (; i < length; i++) {
|
|
749
|
+
if (evaluated[i]) continue;
|
|
750
|
+
const result = validate(instance[i], $unevaluatedItems, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation);
|
|
751
|
+
evaluated[i] = true;
|
|
752
|
+
if (!result.valid) errors.push({
|
|
753
|
+
instanceLocation,
|
|
754
|
+
keyword: "unevaluatedItems",
|
|
755
|
+
keywordLocation,
|
|
756
|
+
error: `Items did not match unevaluated items schema.`
|
|
757
|
+
}, ...result.errors);
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
if ($uniqueItems) for (let j = 0; j < length; j++) {
|
|
761
|
+
const a = instance[j];
|
|
762
|
+
const ao = typeof a === "object" && a !== null;
|
|
763
|
+
for (let k = 0; k < length; k++) {
|
|
764
|
+
if (j === k) continue;
|
|
765
|
+
const b = instance[k];
|
|
766
|
+
if (a === b || ao && typeof b === "object" && b !== null && deepCompareStrict(a, b)) {
|
|
767
|
+
errors.push({
|
|
768
|
+
instanceLocation,
|
|
769
|
+
keyword: "uniqueItems",
|
|
770
|
+
keywordLocation: `${schemaLocation}/uniqueItems`,
|
|
771
|
+
error: `Duplicate items at indexes ${j} and ${k}.`
|
|
772
|
+
});
|
|
773
|
+
j = Number.MAX_SAFE_INTEGER;
|
|
774
|
+
k = Number.MAX_SAFE_INTEGER;
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
} else if (instanceType === "number") {
|
|
779
|
+
if (draft === "4") {
|
|
780
|
+
if ($minimum !== void 0 && ($exclusiveMinimum === true && instance <= $minimum || instance < $minimum)) errors.push({
|
|
781
|
+
instanceLocation,
|
|
782
|
+
keyword: "minimum",
|
|
783
|
+
keywordLocation: `${schemaLocation}/minimum`,
|
|
784
|
+
error: `${instance} is less than ${$exclusiveMinimum ? "or equal to " : ""} ${$minimum}.`
|
|
785
|
+
});
|
|
786
|
+
if ($maximum !== void 0 && ($exclusiveMaximum === true && instance >= $maximum || instance > $maximum)) errors.push({
|
|
787
|
+
instanceLocation,
|
|
788
|
+
keyword: "maximum",
|
|
789
|
+
keywordLocation: `${schemaLocation}/maximum`,
|
|
790
|
+
error: `${instance} is greater than ${$exclusiveMaximum ? "or equal to " : ""} ${$maximum}.`
|
|
791
|
+
});
|
|
792
|
+
} else {
|
|
793
|
+
if ($minimum !== void 0 && instance < $minimum) errors.push({
|
|
794
|
+
instanceLocation,
|
|
795
|
+
keyword: "minimum",
|
|
796
|
+
keywordLocation: `${schemaLocation}/minimum`,
|
|
797
|
+
error: `${instance} is less than ${$minimum}.`
|
|
798
|
+
});
|
|
799
|
+
if ($maximum !== void 0 && instance > $maximum) errors.push({
|
|
800
|
+
instanceLocation,
|
|
801
|
+
keyword: "maximum",
|
|
802
|
+
keywordLocation: `${schemaLocation}/maximum`,
|
|
803
|
+
error: `${instance} is greater than ${$maximum}.`
|
|
804
|
+
});
|
|
805
|
+
if ($exclusiveMinimum !== void 0 && instance <= $exclusiveMinimum) errors.push({
|
|
806
|
+
instanceLocation,
|
|
807
|
+
keyword: "exclusiveMinimum",
|
|
808
|
+
keywordLocation: `${schemaLocation}/exclusiveMinimum`,
|
|
809
|
+
error: `${instance} is less than ${$exclusiveMinimum}.`
|
|
810
|
+
});
|
|
811
|
+
if ($exclusiveMaximum !== void 0 && instance >= $exclusiveMaximum) errors.push({
|
|
812
|
+
instanceLocation,
|
|
813
|
+
keyword: "exclusiveMaximum",
|
|
814
|
+
keywordLocation: `${schemaLocation}/exclusiveMaximum`,
|
|
815
|
+
error: `${instance} is greater than or equal to ${$exclusiveMaximum}.`
|
|
816
|
+
});
|
|
817
|
+
}
|
|
818
|
+
if ($multipleOf !== void 0) {
|
|
819
|
+
const remainder = instance % $multipleOf;
|
|
820
|
+
if (Math.abs(0 - remainder) >= 1.1920929e-7 && Math.abs($multipleOf - remainder) >= 1.1920929e-7) errors.push({
|
|
821
|
+
instanceLocation,
|
|
822
|
+
keyword: "multipleOf",
|
|
823
|
+
keywordLocation: `${schemaLocation}/multipleOf`,
|
|
824
|
+
error: `${instance} is not a multiple of ${$multipleOf}.`
|
|
825
|
+
});
|
|
826
|
+
}
|
|
827
|
+
} else if (instanceType === "string") {
|
|
828
|
+
const length = $minLength === void 0 && $maxLength === void 0 ? 0 : ucs2length(instance);
|
|
829
|
+
if ($minLength !== void 0 && length < $minLength) errors.push({
|
|
830
|
+
instanceLocation,
|
|
831
|
+
keyword: "minLength",
|
|
832
|
+
keywordLocation: `${schemaLocation}/minLength`,
|
|
833
|
+
error: `String is too short (${length} < ${$minLength}).`
|
|
834
|
+
});
|
|
835
|
+
if ($maxLength !== void 0 && length > $maxLength) errors.push({
|
|
836
|
+
instanceLocation,
|
|
837
|
+
keyword: "maxLength",
|
|
838
|
+
keywordLocation: `${schemaLocation}/maxLength`,
|
|
839
|
+
error: `String is too long (${length} > ${$maxLength}).`
|
|
840
|
+
});
|
|
841
|
+
if ($pattern !== void 0 && !new RegExp($pattern, "u").test(instance)) errors.push({
|
|
842
|
+
instanceLocation,
|
|
843
|
+
keyword: "pattern",
|
|
844
|
+
keywordLocation: `${schemaLocation}/pattern`,
|
|
845
|
+
error: `String does not match pattern.`
|
|
846
|
+
});
|
|
847
|
+
if ($format !== void 0 && format[$format] && !format[$format](instance)) errors.push({
|
|
848
|
+
instanceLocation,
|
|
849
|
+
keyword: "format",
|
|
850
|
+
keywordLocation: `${schemaLocation}/format`,
|
|
851
|
+
error: `String does not match format "${$format}".`
|
|
852
|
+
});
|
|
853
|
+
}
|
|
854
|
+
return {
|
|
855
|
+
valid: errors.length === 0,
|
|
856
|
+
errors
|
|
857
|
+
};
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
//#endregion
|
|
861
|
+
//#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/validator.js
|
|
862
|
+
var Validator = class {
|
|
863
|
+
schema;
|
|
864
|
+
draft;
|
|
865
|
+
shortCircuit;
|
|
866
|
+
lookup;
|
|
867
|
+
constructor(schema, draft = "2019-09", shortCircuit = true) {
|
|
868
|
+
this.schema = schema;
|
|
869
|
+
this.draft = draft;
|
|
870
|
+
this.shortCircuit = shortCircuit;
|
|
871
|
+
this.lookup = dereference(schema);
|
|
872
|
+
}
|
|
873
|
+
validate(instance) {
|
|
874
|
+
return validate(instance, this.schema, this.draft, this.lookup, this.shortCircuit);
|
|
875
|
+
}
|
|
876
|
+
addSchema(schema, id) {
|
|
877
|
+
if (id) schema = {
|
|
878
|
+
...schema,
|
|
879
|
+
$id: id
|
|
880
|
+
};
|
|
881
|
+
dereference(schema, this.lookup);
|
|
882
|
+
}
|
|
883
|
+
};
|
|
884
|
+
|
|
885
|
+
//#endregion
|
|
886
|
+
//#region ../core-internal/src/validators/cfWorkerProvider.ts
|
|
887
|
+
/**
|
|
888
|
+
* Cloudflare Worker-compatible JSON Schema validator provider
|
|
889
|
+
*
|
|
890
|
+
* This provider uses @cfworker/json-schema for validation without code generation,
|
|
891
|
+
* making it compatible with edge runtimes like Cloudflare Workers that restrict
|
|
892
|
+
* eval and new Function.
|
|
893
|
+
*
|
|
894
|
+
* @see {@linkcode AjvJsonSchemaValidator} for the Node.js alternative
|
|
895
|
+
*/
|
|
896
|
+
/**
|
|
897
|
+
* Canonical 2020-12 `$schema` URIs (http + https variants, trailing-`#` stripped). When a schema
|
|
898
|
+
* declares anything else and no `{draft}` is forced, the provider throws a plain `Error`.
|
|
899
|
+
*/
|
|
900
|
+
const DRAFT_2020_12_URIS = new Set(["https://json-schema.org/draft/2020-12/schema", "http://json-schema.org/draft/2020-12/schema"]);
|
|
901
|
+
/**
|
|
902
|
+
* `@cfworker/json-schema`-backed JSON Schema validator. See
|
|
903
|
+
* `@modelcontextprotocol/{client,server}/validators/cf-worker` for the customisation entry point.
|
|
904
|
+
*
|
|
905
|
+
* Default validates as **JSON Schema 2020-12** (SEP-1613). Schemas declaring a different
|
|
906
|
+
* `$schema` are rejected with a plain `Error`. Passing an explicit `draft` to the constructor
|
|
907
|
+
* overrides this — that draft is used for every schema regardless of `$schema`.
|
|
908
|
+
*
|
|
909
|
+
* @example Use with default configuration (2020-12, shortcircuit on)
|
|
910
|
+
* ```ts source="./cfWorkerProvider.examples.ts#CfWorkerJsonSchemaValidator_default"
|
|
911
|
+
* const validator = new CfWorkerJsonSchemaValidator();
|
|
912
|
+
* ```
|
|
913
|
+
*
|
|
914
|
+
* @example Use with custom configuration
|
|
915
|
+
* ```ts source="./cfWorkerProvider.examples.ts#CfWorkerJsonSchemaValidator_customConfig"
|
|
916
|
+
* const validator = new CfWorkerJsonSchemaValidator({
|
|
917
|
+
* draft: '2020-12',
|
|
918
|
+
* shortcircuit: false // Report all errors
|
|
919
|
+
* });
|
|
920
|
+
* ```
|
|
921
|
+
*/
|
|
922
|
+
var CfWorkerJsonSchemaValidator = class {
|
|
923
|
+
shortcircuit;
|
|
924
|
+
/** Caller-supplied draft; when set, the `$schema` check is skipped (caller owns dialect). */
|
|
925
|
+
draft;
|
|
926
|
+
/**
|
|
927
|
+
* Create a validator
|
|
928
|
+
*
|
|
929
|
+
* @param options - Configuration options
|
|
930
|
+
* @param options.shortcircuit - If `true`, stop validation after first error (default: `true`)
|
|
931
|
+
* @param options.draft - JSON Schema draft version to force for every schema. When set, the
|
|
932
|
+
* `$schema` check is skipped. When omitted, the provider validates as 2020-12 and rejects
|
|
933
|
+
* schemas declaring a different `$schema`.
|
|
934
|
+
*/
|
|
935
|
+
constructor(options) {
|
|
936
|
+
this.shortcircuit = options?.shortcircuit ?? true;
|
|
937
|
+
this.draft = options?.draft;
|
|
938
|
+
}
|
|
939
|
+
/**
|
|
940
|
+
* Create a validator for the given JSON Schema
|
|
941
|
+
*
|
|
942
|
+
* Unlike AJV, this validator is not cached internally
|
|
943
|
+
*
|
|
944
|
+
* @param schema - Standard JSON Schema object
|
|
945
|
+
* @returns A validator function that validates input data
|
|
946
|
+
*/
|
|
947
|
+
getValidator(schema) {
|
|
948
|
+
if (this.draft === void 0 && "$schema" in schema && typeof schema.$schema === "string" && !DRAFT_2020_12_URIS.has(schema.$schema.replace(/#$/, ""))) {
|
|
949
|
+
const declared = schema.$schema.slice(0, 200);
|
|
950
|
+
throw new Error(`JSON Schema declares an unsupported dialect ("$schema": "${declared}"). The default validator supports JSON Schema 2020-12 only; pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.`);
|
|
951
|
+
}
|
|
952
|
+
const validator = new Validator(schema, this.draft ?? "2020-12", this.shortcircuit);
|
|
953
|
+
return (input) => {
|
|
954
|
+
const result = validator.validate(input);
|
|
955
|
+
return result.valid ? {
|
|
956
|
+
valid: true,
|
|
957
|
+
data: input,
|
|
958
|
+
errorMessage: void 0
|
|
959
|
+
} : {
|
|
960
|
+
valid: false,
|
|
961
|
+
data: void 0,
|
|
962
|
+
errorMessage: result.errors.map((err) => `${err.instanceLocation}: ${err.error}`).join("; ")
|
|
963
|
+
};
|
|
964
|
+
};
|
|
965
|
+
}
|
|
966
|
+
};
|
|
967
|
+
|
|
968
|
+
//#endregion
|
|
969
|
+
export { CfWorkerJsonSchemaValidator as t };
|
|
970
|
+
//# sourceMappingURL=cfWorkerProvider-DbU8BxXO.mjs.map
|