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,143 @@
|
|
|
1
|
+
const unusable = (name, prop = 'algorithm.name') => new TypeError(`CryptoKey does not support this operation, its ${prop} must be ${name}`);
|
|
2
|
+
const isAlgorithm = (algorithm, name) => algorithm.name === name;
|
|
3
|
+
function getHashLength(hash) {
|
|
4
|
+
return parseInt(hash.name.slice(4), 10);
|
|
5
|
+
}
|
|
6
|
+
function getNamedCurve(alg) {
|
|
7
|
+
switch (alg) {
|
|
8
|
+
case 'ES256':
|
|
9
|
+
return 'P-256';
|
|
10
|
+
case 'ES384':
|
|
11
|
+
return 'P-384';
|
|
12
|
+
case 'ES512':
|
|
13
|
+
return 'P-521';
|
|
14
|
+
default:
|
|
15
|
+
throw new Error('unreachable');
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function checkUsage(key, usage) {
|
|
19
|
+
if (usage && !key.usages.includes(usage)) {
|
|
20
|
+
throw new TypeError(`CryptoKey does not support this operation, its usages must include ${usage}.`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export function checkSigCryptoKey(key, alg, usage) {
|
|
24
|
+
switch (alg) {
|
|
25
|
+
case 'HS256':
|
|
26
|
+
case 'HS384':
|
|
27
|
+
case 'HS512': {
|
|
28
|
+
if (!isAlgorithm(key.algorithm, 'HMAC'))
|
|
29
|
+
throw unusable('HMAC');
|
|
30
|
+
const expected = parseInt(alg.slice(2), 10);
|
|
31
|
+
const actual = getHashLength(key.algorithm.hash);
|
|
32
|
+
if (actual !== expected)
|
|
33
|
+
throw unusable(`SHA-${expected}`, 'algorithm.hash');
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
case 'RS256':
|
|
37
|
+
case 'RS384':
|
|
38
|
+
case 'RS512': {
|
|
39
|
+
if (!isAlgorithm(key.algorithm, 'RSASSA-PKCS1-v1_5'))
|
|
40
|
+
throw unusable('RSASSA-PKCS1-v1_5');
|
|
41
|
+
const expected = parseInt(alg.slice(2), 10);
|
|
42
|
+
const actual = getHashLength(key.algorithm.hash);
|
|
43
|
+
if (actual !== expected)
|
|
44
|
+
throw unusable(`SHA-${expected}`, 'algorithm.hash');
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
case 'PS256':
|
|
48
|
+
case 'PS384':
|
|
49
|
+
case 'PS512': {
|
|
50
|
+
if (!isAlgorithm(key.algorithm, 'RSA-PSS'))
|
|
51
|
+
throw unusable('RSA-PSS');
|
|
52
|
+
const expected = parseInt(alg.slice(2), 10);
|
|
53
|
+
const actual = getHashLength(key.algorithm.hash);
|
|
54
|
+
if (actual !== expected)
|
|
55
|
+
throw unusable(`SHA-${expected}`, 'algorithm.hash');
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
case 'Ed25519':
|
|
59
|
+
case 'EdDSA': {
|
|
60
|
+
if (!isAlgorithm(key.algorithm, 'Ed25519'))
|
|
61
|
+
throw unusable('Ed25519');
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
case 'ML-DSA-44':
|
|
65
|
+
case 'ML-DSA-65':
|
|
66
|
+
case 'ML-DSA-87': {
|
|
67
|
+
if (!isAlgorithm(key.algorithm, alg))
|
|
68
|
+
throw unusable(alg);
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
case 'ES256':
|
|
72
|
+
case 'ES384':
|
|
73
|
+
case 'ES512': {
|
|
74
|
+
if (!isAlgorithm(key.algorithm, 'ECDSA'))
|
|
75
|
+
throw unusable('ECDSA');
|
|
76
|
+
const expected = getNamedCurve(alg);
|
|
77
|
+
const actual = key.algorithm.namedCurve;
|
|
78
|
+
if (actual !== expected)
|
|
79
|
+
throw unusable(expected, 'algorithm.namedCurve');
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
default:
|
|
83
|
+
throw new TypeError('CryptoKey does not support this operation');
|
|
84
|
+
}
|
|
85
|
+
checkUsage(key, usage);
|
|
86
|
+
}
|
|
87
|
+
export function checkEncCryptoKey(key, alg, usage) {
|
|
88
|
+
switch (alg) {
|
|
89
|
+
case 'A128GCM':
|
|
90
|
+
case 'A192GCM':
|
|
91
|
+
case 'A256GCM': {
|
|
92
|
+
if (!isAlgorithm(key.algorithm, 'AES-GCM'))
|
|
93
|
+
throw unusable('AES-GCM');
|
|
94
|
+
const expected = parseInt(alg.slice(1, 4), 10);
|
|
95
|
+
const actual = key.algorithm.length;
|
|
96
|
+
if (actual !== expected)
|
|
97
|
+
throw unusable(expected, 'algorithm.length');
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
case 'A128KW':
|
|
101
|
+
case 'A192KW':
|
|
102
|
+
case 'A256KW': {
|
|
103
|
+
if (!isAlgorithm(key.algorithm, 'AES-KW'))
|
|
104
|
+
throw unusable('AES-KW');
|
|
105
|
+
const expected = parseInt(alg.slice(1, 4), 10);
|
|
106
|
+
const actual = key.algorithm.length;
|
|
107
|
+
if (actual !== expected)
|
|
108
|
+
throw unusable(expected, 'algorithm.length');
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
case 'ECDH': {
|
|
112
|
+
switch (key.algorithm.name) {
|
|
113
|
+
case 'ECDH':
|
|
114
|
+
case 'X25519':
|
|
115
|
+
break;
|
|
116
|
+
default:
|
|
117
|
+
throw unusable('ECDH or X25519');
|
|
118
|
+
}
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
case 'PBES2-HS256+A128KW':
|
|
122
|
+
case 'PBES2-HS384+A192KW':
|
|
123
|
+
case 'PBES2-HS512+A256KW':
|
|
124
|
+
if (!isAlgorithm(key.algorithm, 'PBKDF2'))
|
|
125
|
+
throw unusable('PBKDF2');
|
|
126
|
+
break;
|
|
127
|
+
case 'RSA-OAEP':
|
|
128
|
+
case 'RSA-OAEP-256':
|
|
129
|
+
case 'RSA-OAEP-384':
|
|
130
|
+
case 'RSA-OAEP-512': {
|
|
131
|
+
if (!isAlgorithm(key.algorithm, 'RSA-OAEP'))
|
|
132
|
+
throw unusable('RSA-OAEP');
|
|
133
|
+
const expected = parseInt(alg.slice(9), 10) || 1;
|
|
134
|
+
const actual = getHashLength(key.algorithm.hash);
|
|
135
|
+
if (actual !== expected)
|
|
136
|
+
throw unusable(`SHA-${expected}`, 'algorithm.hash');
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
default:
|
|
140
|
+
throw new TypeError('CryptoKey does not support this operation');
|
|
141
|
+
}
|
|
142
|
+
checkUsage(key, usage);
|
|
143
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { concat, uint64be } from './buffer_utils.js';
|
|
2
|
+
import { checkIvLength } from './check_iv_length.js';
|
|
3
|
+
import { checkCekLength } from './check_cek_length.js';
|
|
4
|
+
import { JOSENotSupported, JWEDecryptionFailed, JWEInvalid } from '../util/errors.js';
|
|
5
|
+
import { checkEncCryptoKey } from './crypto_key.js';
|
|
6
|
+
import { invalidKeyInput } from './invalid_key_input.js';
|
|
7
|
+
import { isCryptoKey } from './is_key_like.js';
|
|
8
|
+
async function timingSafeEqual(a, b) {
|
|
9
|
+
if (!(a instanceof Uint8Array)) {
|
|
10
|
+
throw new TypeError('First argument must be a buffer');
|
|
11
|
+
}
|
|
12
|
+
if (!(b instanceof Uint8Array)) {
|
|
13
|
+
throw new TypeError('Second argument must be a buffer');
|
|
14
|
+
}
|
|
15
|
+
const algorithm = { name: 'HMAC', hash: 'SHA-256' };
|
|
16
|
+
const key = (await crypto.subtle.generateKey(algorithm, false, ['sign']));
|
|
17
|
+
const aHmac = new Uint8Array(await crypto.subtle.sign(algorithm, key, a));
|
|
18
|
+
const bHmac = new Uint8Array(await crypto.subtle.sign(algorithm, key, b));
|
|
19
|
+
let out = 0;
|
|
20
|
+
let i = -1;
|
|
21
|
+
while (++i < 32) {
|
|
22
|
+
out |= aHmac[i] ^ bHmac[i];
|
|
23
|
+
}
|
|
24
|
+
return out === 0;
|
|
25
|
+
}
|
|
26
|
+
async function cbcDecrypt(enc, cek, ciphertext, iv, tag, aad) {
|
|
27
|
+
if (!(cek instanceof Uint8Array)) {
|
|
28
|
+
throw new TypeError(invalidKeyInput(cek, 'Uint8Array'));
|
|
29
|
+
}
|
|
30
|
+
const keySize = parseInt(enc.slice(1, 4), 10);
|
|
31
|
+
const encKey = await crypto.subtle.importKey('raw', cek.subarray(keySize >> 3), 'AES-CBC', false, ['decrypt']);
|
|
32
|
+
const macKey = await crypto.subtle.importKey('raw', cek.subarray(0, keySize >> 3), {
|
|
33
|
+
hash: `SHA-${keySize << 1}`,
|
|
34
|
+
name: 'HMAC',
|
|
35
|
+
}, false, ['sign']);
|
|
36
|
+
const macData = concat(aad, iv, ciphertext, uint64be(aad.length << 3));
|
|
37
|
+
const expectedTag = new Uint8Array((await crypto.subtle.sign('HMAC', macKey, macData)).slice(0, keySize >> 3));
|
|
38
|
+
let macCheckPassed;
|
|
39
|
+
try {
|
|
40
|
+
macCheckPassed = await timingSafeEqual(tag, expectedTag);
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
}
|
|
44
|
+
if (!macCheckPassed) {
|
|
45
|
+
throw new JWEDecryptionFailed();
|
|
46
|
+
}
|
|
47
|
+
let plaintext;
|
|
48
|
+
try {
|
|
49
|
+
plaintext = new Uint8Array(await crypto.subtle.decrypt({ iv: iv, name: 'AES-CBC' }, encKey, ciphertext));
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
}
|
|
53
|
+
if (!plaintext) {
|
|
54
|
+
throw new JWEDecryptionFailed();
|
|
55
|
+
}
|
|
56
|
+
return plaintext;
|
|
57
|
+
}
|
|
58
|
+
async function gcmDecrypt(enc, cek, ciphertext, iv, tag, aad) {
|
|
59
|
+
let encKey;
|
|
60
|
+
if (cek instanceof Uint8Array) {
|
|
61
|
+
encKey = await crypto.subtle.importKey('raw', cek, 'AES-GCM', false, ['decrypt']);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
checkEncCryptoKey(cek, enc, 'decrypt');
|
|
65
|
+
encKey = cek;
|
|
66
|
+
}
|
|
67
|
+
try {
|
|
68
|
+
return new Uint8Array(await crypto.subtle.decrypt({
|
|
69
|
+
additionalData: aad,
|
|
70
|
+
iv: iv,
|
|
71
|
+
name: 'AES-GCM',
|
|
72
|
+
tagLength: 128,
|
|
73
|
+
}, encKey, concat(ciphertext, tag)));
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
throw new JWEDecryptionFailed();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
export async function decrypt(enc, cek, ciphertext, iv, tag, aad) {
|
|
80
|
+
if (!isCryptoKey(cek) && !(cek instanceof Uint8Array)) {
|
|
81
|
+
throw new TypeError(invalidKeyInput(cek, 'CryptoKey', 'KeyObject', 'Uint8Array', 'JSON Web Key'));
|
|
82
|
+
}
|
|
83
|
+
if (!iv) {
|
|
84
|
+
throw new JWEInvalid('JWE Initialization Vector missing');
|
|
85
|
+
}
|
|
86
|
+
if (!tag) {
|
|
87
|
+
throw new JWEInvalid('JWE Authentication Tag missing');
|
|
88
|
+
}
|
|
89
|
+
checkIvLength(enc, iv);
|
|
90
|
+
switch (enc) {
|
|
91
|
+
case 'A128CBC-HS256':
|
|
92
|
+
case 'A192CBC-HS384':
|
|
93
|
+
case 'A256CBC-HS512':
|
|
94
|
+
if (cek instanceof Uint8Array)
|
|
95
|
+
checkCekLength(cek, parseInt(enc.slice(-3), 10));
|
|
96
|
+
return cbcDecrypt(enc, cek, ciphertext, iv, tag, aad);
|
|
97
|
+
case 'A128GCM':
|
|
98
|
+
case 'A192GCM':
|
|
99
|
+
case 'A256GCM':
|
|
100
|
+
if (cek instanceof Uint8Array)
|
|
101
|
+
checkCekLength(cek, parseInt(enc.slice(1, 4), 10));
|
|
102
|
+
return gcmDecrypt(enc, cek, ciphertext, iv, tag, aad);
|
|
103
|
+
default:
|
|
104
|
+
throw new JOSENotSupported('Unsupported JWE Content Encryption Algorithm');
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import * as aeskw from './aeskw.js';
|
|
2
|
+
import * as ecdhes from './ecdhes.js';
|
|
3
|
+
import * as pbes2kw from './pbes2kw.js';
|
|
4
|
+
import * as rsaes from './rsaes.js';
|
|
5
|
+
import { decode as b64u } from '../util/base64url.js';
|
|
6
|
+
import { JOSENotSupported, JWEInvalid } from '../util/errors.js';
|
|
7
|
+
import { cekLength } from '../lib/cek.js';
|
|
8
|
+
import { importJWK } from '../key/import.js';
|
|
9
|
+
import { isObject } from './is_object.js';
|
|
10
|
+
import { unwrap as aesGcmKw } from './aesgcmkw.js';
|
|
11
|
+
import { assertCryptoKey } from './is_key_like.js';
|
|
12
|
+
export async function decryptKeyManagement(alg, key, encryptedKey, joseHeader, options) {
|
|
13
|
+
switch (alg) {
|
|
14
|
+
case 'dir': {
|
|
15
|
+
if (encryptedKey !== undefined)
|
|
16
|
+
throw new JWEInvalid('Encountered unexpected JWE Encrypted Key');
|
|
17
|
+
return key;
|
|
18
|
+
}
|
|
19
|
+
case 'ECDH-ES':
|
|
20
|
+
if (encryptedKey !== undefined)
|
|
21
|
+
throw new JWEInvalid('Encountered unexpected JWE Encrypted Key');
|
|
22
|
+
case 'ECDH-ES+A128KW':
|
|
23
|
+
case 'ECDH-ES+A192KW':
|
|
24
|
+
case 'ECDH-ES+A256KW': {
|
|
25
|
+
if (!isObject(joseHeader.epk))
|
|
26
|
+
throw new JWEInvalid(`JOSE Header "epk" (Ephemeral Public Key) missing or invalid`);
|
|
27
|
+
assertCryptoKey(key);
|
|
28
|
+
if (!ecdhes.allowed(key))
|
|
29
|
+
throw new JOSENotSupported('ECDH with the provided key is not allowed or not supported by your javascript runtime');
|
|
30
|
+
const epk = await importJWK(joseHeader.epk, alg);
|
|
31
|
+
assertCryptoKey(epk);
|
|
32
|
+
let partyUInfo;
|
|
33
|
+
let partyVInfo;
|
|
34
|
+
if (joseHeader.apu !== undefined) {
|
|
35
|
+
if (typeof joseHeader.apu !== 'string')
|
|
36
|
+
throw new JWEInvalid(`JOSE Header "apu" (Agreement PartyUInfo) invalid`);
|
|
37
|
+
try {
|
|
38
|
+
partyUInfo = b64u(joseHeader.apu);
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
throw new JWEInvalid('Failed to base64url decode the apu');
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (joseHeader.apv !== undefined) {
|
|
45
|
+
if (typeof joseHeader.apv !== 'string')
|
|
46
|
+
throw new JWEInvalid(`JOSE Header "apv" (Agreement PartyVInfo) invalid`);
|
|
47
|
+
try {
|
|
48
|
+
partyVInfo = b64u(joseHeader.apv);
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
throw new JWEInvalid('Failed to base64url decode the apv');
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
const sharedSecret = await ecdhes.deriveKey(epk, key, alg === 'ECDH-ES' ? joseHeader.enc : alg, alg === 'ECDH-ES' ? cekLength(joseHeader.enc) : parseInt(alg.slice(-5, -2), 10), partyUInfo, partyVInfo);
|
|
55
|
+
if (alg === 'ECDH-ES')
|
|
56
|
+
return sharedSecret;
|
|
57
|
+
if (encryptedKey === undefined)
|
|
58
|
+
throw new JWEInvalid('JWE Encrypted Key missing');
|
|
59
|
+
return aeskw.unwrap(alg.slice(-6), sharedSecret, encryptedKey);
|
|
60
|
+
}
|
|
61
|
+
case 'RSA-OAEP':
|
|
62
|
+
case 'RSA-OAEP-256':
|
|
63
|
+
case 'RSA-OAEP-384':
|
|
64
|
+
case 'RSA-OAEP-512': {
|
|
65
|
+
if (encryptedKey === undefined)
|
|
66
|
+
throw new JWEInvalid('JWE Encrypted Key missing');
|
|
67
|
+
assertCryptoKey(key);
|
|
68
|
+
return rsaes.decrypt(alg, key, encryptedKey);
|
|
69
|
+
}
|
|
70
|
+
case 'PBES2-HS256+A128KW':
|
|
71
|
+
case 'PBES2-HS384+A192KW':
|
|
72
|
+
case 'PBES2-HS512+A256KW': {
|
|
73
|
+
if (encryptedKey === undefined)
|
|
74
|
+
throw new JWEInvalid('JWE Encrypted Key missing');
|
|
75
|
+
if (typeof joseHeader.p2c !== 'number')
|
|
76
|
+
throw new JWEInvalid(`JOSE Header "p2c" (PBES2 Count) missing or invalid`);
|
|
77
|
+
const p2cLimit = options?.maxPBES2Count || 10_000;
|
|
78
|
+
if (joseHeader.p2c > p2cLimit)
|
|
79
|
+
throw new JWEInvalid(`JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds`);
|
|
80
|
+
if (typeof joseHeader.p2s !== 'string')
|
|
81
|
+
throw new JWEInvalid(`JOSE Header "p2s" (PBES2 Salt) missing or invalid`);
|
|
82
|
+
let p2s;
|
|
83
|
+
try {
|
|
84
|
+
p2s = b64u(joseHeader.p2s);
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
throw new JWEInvalid('Failed to base64url decode the p2s');
|
|
88
|
+
}
|
|
89
|
+
return pbes2kw.unwrap(alg, key, encryptedKey, joseHeader.p2c, p2s);
|
|
90
|
+
}
|
|
91
|
+
case 'A128KW':
|
|
92
|
+
case 'A192KW':
|
|
93
|
+
case 'A256KW': {
|
|
94
|
+
if (encryptedKey === undefined)
|
|
95
|
+
throw new JWEInvalid('JWE Encrypted Key missing');
|
|
96
|
+
return aeskw.unwrap(alg, key, encryptedKey);
|
|
97
|
+
}
|
|
98
|
+
case 'A128GCMKW':
|
|
99
|
+
case 'A192GCMKW':
|
|
100
|
+
case 'A256GCMKW': {
|
|
101
|
+
if (encryptedKey === undefined)
|
|
102
|
+
throw new JWEInvalid('JWE Encrypted Key missing');
|
|
103
|
+
if (typeof joseHeader.iv !== 'string')
|
|
104
|
+
throw new JWEInvalid(`JOSE Header "iv" (Initialization Vector) missing or invalid`);
|
|
105
|
+
if (typeof joseHeader.tag !== 'string')
|
|
106
|
+
throw new JWEInvalid(`JOSE Header "tag" (Authentication Tag) missing or invalid`);
|
|
107
|
+
let iv;
|
|
108
|
+
try {
|
|
109
|
+
iv = b64u(joseHeader.iv);
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
throw new JWEInvalid('Failed to base64url decode the iv');
|
|
113
|
+
}
|
|
114
|
+
let tag;
|
|
115
|
+
try {
|
|
116
|
+
tag = b64u(joseHeader.tag);
|
|
117
|
+
}
|
|
118
|
+
catch {
|
|
119
|
+
throw new JWEInvalid('Failed to base64url decode the tag');
|
|
120
|
+
}
|
|
121
|
+
return aesGcmKw(alg, key, encryptedKey, iv, tag);
|
|
122
|
+
}
|
|
123
|
+
default: {
|
|
124
|
+
throw new JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value');
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { encode, concat, uint32be } from './buffer_utils.js';
|
|
2
|
+
import { checkEncCryptoKey } from './crypto_key.js';
|
|
3
|
+
import { digest } from './digest.js';
|
|
4
|
+
function lengthAndInput(input) {
|
|
5
|
+
return concat(uint32be(input.length), input);
|
|
6
|
+
}
|
|
7
|
+
async function concatKdf(Z, L, OtherInfo) {
|
|
8
|
+
const dkLen = L >> 3;
|
|
9
|
+
const hashLen = 32;
|
|
10
|
+
const reps = Math.ceil(dkLen / hashLen);
|
|
11
|
+
const dk = new Uint8Array(reps * hashLen);
|
|
12
|
+
for (let i = 1; i <= reps; i++) {
|
|
13
|
+
const hashInput = new Uint8Array(4 + Z.length + OtherInfo.length);
|
|
14
|
+
hashInput.set(uint32be(i), 0);
|
|
15
|
+
hashInput.set(Z, 4);
|
|
16
|
+
hashInput.set(OtherInfo, 4 + Z.length);
|
|
17
|
+
const hashResult = await digest('sha256', hashInput);
|
|
18
|
+
dk.set(hashResult, (i - 1) * hashLen);
|
|
19
|
+
}
|
|
20
|
+
return dk.slice(0, dkLen);
|
|
21
|
+
}
|
|
22
|
+
export async function deriveKey(publicKey, privateKey, algorithm, keyLength, apu = new Uint8Array(), apv = new Uint8Array()) {
|
|
23
|
+
checkEncCryptoKey(publicKey, 'ECDH');
|
|
24
|
+
checkEncCryptoKey(privateKey, 'ECDH', 'deriveBits');
|
|
25
|
+
const algorithmID = lengthAndInput(encode(algorithm));
|
|
26
|
+
const partyUInfo = lengthAndInput(apu);
|
|
27
|
+
const partyVInfo = lengthAndInput(apv);
|
|
28
|
+
const suppPubInfo = uint32be(keyLength);
|
|
29
|
+
const suppPrivInfo = new Uint8Array();
|
|
30
|
+
const otherInfo = concat(algorithmID, partyUInfo, partyVInfo, suppPubInfo, suppPrivInfo);
|
|
31
|
+
const Z = new Uint8Array(await crypto.subtle.deriveBits({
|
|
32
|
+
name: publicKey.algorithm.name,
|
|
33
|
+
public: publicKey,
|
|
34
|
+
}, privateKey, getEcdhBitLength(publicKey)));
|
|
35
|
+
return concatKdf(Z, keyLength, otherInfo);
|
|
36
|
+
}
|
|
37
|
+
function getEcdhBitLength(publicKey) {
|
|
38
|
+
if (publicKey.algorithm.name === 'X25519') {
|
|
39
|
+
return 256;
|
|
40
|
+
}
|
|
41
|
+
return (Math.ceil(parseInt(publicKey.algorithm.namedCurve.slice(-3), 10) / 8) << 3);
|
|
42
|
+
}
|
|
43
|
+
export function allowed(key) {
|
|
44
|
+
switch (key.algorithm.namedCurve) {
|
|
45
|
+
case 'P-256':
|
|
46
|
+
case 'P-384':
|
|
47
|
+
case 'P-521':
|
|
48
|
+
return true;
|
|
49
|
+
default:
|
|
50
|
+
return key.algorithm.name === 'X25519';
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { concat, uint64be } from './buffer_utils.js';
|
|
2
|
+
import { checkIvLength } from './check_iv_length.js';
|
|
3
|
+
import { checkCekLength } from './check_cek_length.js';
|
|
4
|
+
import { checkEncCryptoKey } from './crypto_key.js';
|
|
5
|
+
import { invalidKeyInput } from './invalid_key_input.js';
|
|
6
|
+
import { generateIv } from './iv.js';
|
|
7
|
+
import { JOSENotSupported } from '../util/errors.js';
|
|
8
|
+
import { isCryptoKey } from './is_key_like.js';
|
|
9
|
+
async function cbcEncrypt(enc, plaintext, cek, iv, aad) {
|
|
10
|
+
if (!(cek instanceof Uint8Array)) {
|
|
11
|
+
throw new TypeError(invalidKeyInput(cek, 'Uint8Array'));
|
|
12
|
+
}
|
|
13
|
+
const keySize = parseInt(enc.slice(1, 4), 10);
|
|
14
|
+
const encKey = await crypto.subtle.importKey('raw', cek.subarray(keySize >> 3), 'AES-CBC', false, ['encrypt']);
|
|
15
|
+
const macKey = await crypto.subtle.importKey('raw', cek.subarray(0, keySize >> 3), {
|
|
16
|
+
hash: `SHA-${keySize << 1}`,
|
|
17
|
+
name: 'HMAC',
|
|
18
|
+
}, false, ['sign']);
|
|
19
|
+
const ciphertext = new Uint8Array(await crypto.subtle.encrypt({
|
|
20
|
+
iv: iv,
|
|
21
|
+
name: 'AES-CBC',
|
|
22
|
+
}, encKey, plaintext));
|
|
23
|
+
const macData = concat(aad, iv, ciphertext, uint64be(aad.length << 3));
|
|
24
|
+
const tag = new Uint8Array((await crypto.subtle.sign('HMAC', macKey, macData)).slice(0, keySize >> 3));
|
|
25
|
+
return { ciphertext, tag, iv };
|
|
26
|
+
}
|
|
27
|
+
async function gcmEncrypt(enc, plaintext, cek, iv, aad) {
|
|
28
|
+
let encKey;
|
|
29
|
+
if (cek instanceof Uint8Array) {
|
|
30
|
+
encKey = await crypto.subtle.importKey('raw', cek, 'AES-GCM', false, ['encrypt']);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
checkEncCryptoKey(cek, enc, 'encrypt');
|
|
34
|
+
encKey = cek;
|
|
35
|
+
}
|
|
36
|
+
const encrypted = new Uint8Array(await crypto.subtle.encrypt({
|
|
37
|
+
additionalData: aad,
|
|
38
|
+
iv: iv,
|
|
39
|
+
name: 'AES-GCM',
|
|
40
|
+
tagLength: 128,
|
|
41
|
+
}, encKey, plaintext));
|
|
42
|
+
const tag = encrypted.slice(-16);
|
|
43
|
+
const ciphertext = encrypted.slice(0, -16);
|
|
44
|
+
return { ciphertext, tag, iv };
|
|
45
|
+
}
|
|
46
|
+
export async function encrypt(enc, plaintext, cek, iv, aad) {
|
|
47
|
+
if (!isCryptoKey(cek) && !(cek instanceof Uint8Array)) {
|
|
48
|
+
throw new TypeError(invalidKeyInput(cek, 'CryptoKey', 'KeyObject', 'Uint8Array', 'JSON Web Key'));
|
|
49
|
+
}
|
|
50
|
+
if (iv) {
|
|
51
|
+
checkIvLength(enc, iv);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
iv = generateIv(enc);
|
|
55
|
+
}
|
|
56
|
+
switch (enc) {
|
|
57
|
+
case 'A128CBC-HS256':
|
|
58
|
+
case 'A192CBC-HS384':
|
|
59
|
+
case 'A256CBC-HS512':
|
|
60
|
+
if (cek instanceof Uint8Array) {
|
|
61
|
+
checkCekLength(cek, parseInt(enc.slice(-3), 10));
|
|
62
|
+
}
|
|
63
|
+
return cbcEncrypt(enc, plaintext, cek, iv, aad);
|
|
64
|
+
case 'A128GCM':
|
|
65
|
+
case 'A192GCM':
|
|
66
|
+
case 'A256GCM':
|
|
67
|
+
if (cek instanceof Uint8Array) {
|
|
68
|
+
checkCekLength(cek, parseInt(enc.slice(1, 4), 10));
|
|
69
|
+
}
|
|
70
|
+
return gcmEncrypt(enc, plaintext, cek, iv, aad);
|
|
71
|
+
default:
|
|
72
|
+
throw new JOSENotSupported('Unsupported JWE Content Encryption Algorithm');
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import * as aeskw from './aeskw.js';
|
|
2
|
+
import * as ecdhes from './ecdhes.js';
|
|
3
|
+
import * as pbes2kw from './pbes2kw.js';
|
|
4
|
+
import * as rsaes from './rsaes.js';
|
|
5
|
+
import { encode as b64u } from '../util/base64url.js';
|
|
6
|
+
import { normalizeKey } from './normalize_key.js';
|
|
7
|
+
import { generateCek, cekLength } from '../lib/cek.js';
|
|
8
|
+
import { JOSENotSupported } from '../util/errors.js';
|
|
9
|
+
import { exportJWK } from '../key/export.js';
|
|
10
|
+
import { wrap as aesGcmKw } from './aesgcmkw.js';
|
|
11
|
+
import { assertCryptoKey } from './is_key_like.js';
|
|
12
|
+
export async function encryptKeyManagement(alg, enc, key, providedCek, providedParameters = {}) {
|
|
13
|
+
let encryptedKey;
|
|
14
|
+
let parameters;
|
|
15
|
+
let cek;
|
|
16
|
+
switch (alg) {
|
|
17
|
+
case 'dir': {
|
|
18
|
+
cek = key;
|
|
19
|
+
break;
|
|
20
|
+
}
|
|
21
|
+
case 'ECDH-ES':
|
|
22
|
+
case 'ECDH-ES+A128KW':
|
|
23
|
+
case 'ECDH-ES+A192KW':
|
|
24
|
+
case 'ECDH-ES+A256KW': {
|
|
25
|
+
assertCryptoKey(key);
|
|
26
|
+
if (!ecdhes.allowed(key)) {
|
|
27
|
+
throw new JOSENotSupported('ECDH with the provided key is not allowed or not supported by your javascript runtime');
|
|
28
|
+
}
|
|
29
|
+
const { apu, apv } = providedParameters;
|
|
30
|
+
let ephemeralKey;
|
|
31
|
+
if (providedParameters.epk) {
|
|
32
|
+
ephemeralKey = (await normalizeKey(providedParameters.epk, alg));
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
ephemeralKey = (await crypto.subtle.generateKey(key.algorithm, true, ['deriveBits'])).privateKey;
|
|
36
|
+
}
|
|
37
|
+
const { x, y, crv, kty } = await exportJWK(ephemeralKey);
|
|
38
|
+
const sharedSecret = await ecdhes.deriveKey(key, ephemeralKey, alg === 'ECDH-ES' ? enc : alg, alg === 'ECDH-ES' ? cekLength(enc) : parseInt(alg.slice(-5, -2), 10), apu, apv);
|
|
39
|
+
parameters = { epk: { x, crv, kty } };
|
|
40
|
+
if (kty === 'EC')
|
|
41
|
+
parameters.epk.y = y;
|
|
42
|
+
if (apu)
|
|
43
|
+
parameters.apu = b64u(apu);
|
|
44
|
+
if (apv)
|
|
45
|
+
parameters.apv = b64u(apv);
|
|
46
|
+
if (alg === 'ECDH-ES') {
|
|
47
|
+
cek = sharedSecret;
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
cek = providedCek || generateCek(enc);
|
|
51
|
+
const kwAlg = alg.slice(-6);
|
|
52
|
+
encryptedKey = await aeskw.wrap(kwAlg, sharedSecret, cek);
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
case 'RSA-OAEP':
|
|
56
|
+
case 'RSA-OAEP-256':
|
|
57
|
+
case 'RSA-OAEP-384':
|
|
58
|
+
case 'RSA-OAEP-512': {
|
|
59
|
+
cek = providedCek || generateCek(enc);
|
|
60
|
+
assertCryptoKey(key);
|
|
61
|
+
encryptedKey = await rsaes.encrypt(alg, key, cek);
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
case 'PBES2-HS256+A128KW':
|
|
65
|
+
case 'PBES2-HS384+A192KW':
|
|
66
|
+
case 'PBES2-HS512+A256KW': {
|
|
67
|
+
cek = providedCek || generateCek(enc);
|
|
68
|
+
const { p2c, p2s } = providedParameters;
|
|
69
|
+
({ encryptedKey, ...parameters } = await pbes2kw.wrap(alg, key, cek, p2c, p2s));
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
case 'A128KW':
|
|
73
|
+
case 'A192KW':
|
|
74
|
+
case 'A256KW': {
|
|
75
|
+
cek = providedCek || generateCek(enc);
|
|
76
|
+
encryptedKey = await aeskw.wrap(alg, key, cek);
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
case 'A128GCMKW':
|
|
80
|
+
case 'A192GCMKW':
|
|
81
|
+
case 'A256GCMKW': {
|
|
82
|
+
cek = providedCek || generateCek(enc);
|
|
83
|
+
const { iv } = providedParameters;
|
|
84
|
+
({ encryptedKey, ...parameters } = await aesGcmKw(alg, key, cek, iv));
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
default: {
|
|
88
|
+
throw new JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value');
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return { cek, encryptedKey, parameters };
|
|
92
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { checkSigCryptoKey } from './crypto_key.js';
|
|
2
|
+
import { invalidKeyInput } from './invalid_key_input.js';
|
|
3
|
+
export async function getSigKey(alg, key, usage) {
|
|
4
|
+
if (key instanceof Uint8Array) {
|
|
5
|
+
if (!alg.startsWith('HS')) {
|
|
6
|
+
throw new TypeError(invalidKeyInput(key, 'CryptoKey', 'KeyObject', 'JSON Web Key'));
|
|
7
|
+
}
|
|
8
|
+
return crypto.subtle.importKey('raw', key, { hash: `SHA-${alg.slice(-3)}`, name: 'HMAC' }, false, [usage]);
|
|
9
|
+
}
|
|
10
|
+
checkSigCryptoKey(key, alg, usage);
|
|
11
|
+
return key;
|
|
12
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
function message(msg, actual, ...types) {
|
|
2
|
+
types = types.filter(Boolean);
|
|
3
|
+
if (types.length > 2) {
|
|
4
|
+
const last = types.pop();
|
|
5
|
+
msg += `one of type ${types.join(', ')}, or ${last}.`;
|
|
6
|
+
}
|
|
7
|
+
else if (types.length === 2) {
|
|
8
|
+
msg += `one of type ${types[0]} or ${types[1]}.`;
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
msg += `of type ${types[0]}.`;
|
|
12
|
+
}
|
|
13
|
+
if (actual == null) {
|
|
14
|
+
msg += ` Received ${actual}`;
|
|
15
|
+
}
|
|
16
|
+
else if (typeof actual === 'function' && actual.name) {
|
|
17
|
+
msg += ` Received function ${actual.name}`;
|
|
18
|
+
}
|
|
19
|
+
else if (typeof actual === 'object' && actual != null) {
|
|
20
|
+
if (actual.constructor?.name) {
|
|
21
|
+
msg += ` Received an instance of ${actual.constructor.name}`;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return msg;
|
|
25
|
+
}
|
|
26
|
+
export const invalidKeyInput = (actual, ...types) => message('Key must be ', actual, ...types);
|
|
27
|
+
export const withAlg = (alg, actual, ...types) => message(`Key for the ${alg} algorithm must be `, actual, ...types);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export function isDisjoint(...headers) {
|
|
2
|
+
const sources = headers.filter(Boolean);
|
|
3
|
+
if (sources.length === 0 || sources.length === 1) {
|
|
4
|
+
return true;
|
|
5
|
+
}
|
|
6
|
+
let acc;
|
|
7
|
+
for (const header of sources) {
|
|
8
|
+
const parameters = Object.keys(header);
|
|
9
|
+
if (!acc || acc.size === 0) {
|
|
10
|
+
acc = new Set(parameters);
|
|
11
|
+
continue;
|
|
12
|
+
}
|
|
13
|
+
for (const parameter of parameters) {
|
|
14
|
+
if (acc.has(parameter)) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
acc.add(parameter);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { isObject } from './is_object.js';
|
|
2
|
+
export const isJWK = (key) => isObject(key) && typeof key.kty === 'string';
|
|
3
|
+
export const isPrivateJWK = (key) => key.kty !== 'oct' &&
|
|
4
|
+
((key.kty === 'AKP' && typeof key.priv === 'string') || typeof key.d === 'string');
|
|
5
|
+
export const isPublicJWK = (key) => key.kty !== 'oct' && key.d === undefined && key.priv === undefined;
|
|
6
|
+
export const isSecretJWK = (key) => key.kty === 'oct' && typeof key.k === 'string';
|