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,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base64URL encoding and decoding utilities
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
/** Decodes a Base64URL encoded input. */
|
|
7
|
+
export declare function decode(input: Uint8Array | string): Uint8Array;
|
|
8
|
+
/** Encodes an input using Base64URL with no padding. */
|
|
9
|
+
export declare function encode(input: Uint8Array | string): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JSON Web Token (JWT) Claims Set Decoding (no validation, no signature checking)
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import type * as types from '../types.d.ts';
|
|
7
|
+
/**
|
|
8
|
+
* Decodes a signed JSON Web Token payload. This does not validate the JWT Claims Set types or
|
|
9
|
+
* values. This does not validate the JWS Signature. For a proper Signed JWT Claims Set validation
|
|
10
|
+
* and JWS signature verification use `jose.jwtVerify()`. For an encrypted JWT Claims Set validation
|
|
11
|
+
* and JWE decryption use `jose.jwtDecrypt()`.
|
|
12
|
+
*
|
|
13
|
+
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
|
14
|
+
* as from its subpath export `'jose/jwt/decode'`.
|
|
15
|
+
*
|
|
16
|
+
* @param jwt JWT token in compact JWS serialization.
|
|
17
|
+
*/
|
|
18
|
+
export declare function decodeJwt<PayloadType = types.JWTPayload>(jwt: string): PayloadType & types.JWTPayload;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JOSE Protected Header Decoding (JWE, JWS, all serialization syntaxes)
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import type * as types from '../types.d.ts';
|
|
7
|
+
/** JWE and JWS Header Parameters */
|
|
8
|
+
export type ProtectedHeaderParameters = types.JWSHeaderParameters & types.JWEHeaderParameters;
|
|
9
|
+
/**
|
|
10
|
+
* Decodes the Protected Header of a JWE/JWS/JWT token utilizing any JOSE serialization.
|
|
11
|
+
*
|
|
12
|
+
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
|
13
|
+
* as from its subpath export `'jose/decode/protected_header'`.
|
|
14
|
+
*
|
|
15
|
+
* @param token JWE/JWS/JWT token in any JOSE serialization.
|
|
16
|
+
*/
|
|
17
|
+
export declare function decodeProtectedHeader(token: string | object): ProtectedHeaderParameters;
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JOSE module errors and error codes
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import type * as types from '../types.d.ts';
|
|
7
|
+
/**
|
|
8
|
+
* A generic Error that all other JOSE specific Error subclasses extend.
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
export declare class JOSEError extends Error {
|
|
12
|
+
/**
|
|
13
|
+
* A unique error code for the particular error subclass.
|
|
14
|
+
*
|
|
15
|
+
* @ignore
|
|
16
|
+
*/
|
|
17
|
+
static code: string;
|
|
18
|
+
/** A unique error code for {@link JOSEError}. */
|
|
19
|
+
code: string;
|
|
20
|
+
/** @ignore */
|
|
21
|
+
constructor(message?: string, options?: {
|
|
22
|
+
cause?: unknown;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* An error subclass thrown when a JWT Claim Set member validation fails.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
export declare class JWTClaimValidationFailed extends JOSEError {
|
|
30
|
+
/** @ignore */
|
|
31
|
+
static code: string;
|
|
32
|
+
/** A unique error code for {@link JWTClaimValidationFailed}. */
|
|
33
|
+
code: string;
|
|
34
|
+
/** The Claim for which the validation failed. */
|
|
35
|
+
claim: string;
|
|
36
|
+
/** Reason code for the validation failure. */
|
|
37
|
+
reason: string;
|
|
38
|
+
/**
|
|
39
|
+
* The parsed JWT Claims Set (aka payload). Other JWT claims may or may not have been verified at
|
|
40
|
+
* this point. The JSON Web Signature (JWS) or a JSON Web Encryption (JWE) structures' integrity
|
|
41
|
+
* has however been verified. Claims Set verification happens after the JWS Signature or JWE
|
|
42
|
+
* Decryption processes.
|
|
43
|
+
*/
|
|
44
|
+
payload: types.JWTPayload;
|
|
45
|
+
/** @ignore */
|
|
46
|
+
constructor(message: string, payload: types.JWTPayload, claim?: string, reason?: string);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* An error subclass thrown when a JWT is expired.
|
|
50
|
+
*
|
|
51
|
+
*/
|
|
52
|
+
export declare class JWTExpired extends JOSEError implements JWTClaimValidationFailed {
|
|
53
|
+
/** @ignore */
|
|
54
|
+
static code: string;
|
|
55
|
+
/** A unique error code for {@link JWTExpired}. */
|
|
56
|
+
code: string;
|
|
57
|
+
/** The Claim for which the validation failed. */
|
|
58
|
+
claim: string;
|
|
59
|
+
/** Reason code for the validation failure. */
|
|
60
|
+
reason: string;
|
|
61
|
+
/**
|
|
62
|
+
* The parsed JWT Claims Set (aka payload). Other JWT claims may or may not have been verified at
|
|
63
|
+
* this point. The JSON Web Signature (JWS) or a JSON Web Encryption (JWE) structures' integrity
|
|
64
|
+
* has however been verified. Claims Set verification happens after the JWS Signature or JWE
|
|
65
|
+
* Decryption processes.
|
|
66
|
+
*/
|
|
67
|
+
payload: types.JWTPayload;
|
|
68
|
+
/** @ignore */
|
|
69
|
+
constructor(message: string, payload: types.JWTPayload, claim?: string, reason?: string);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* An error subclass thrown when a JOSE Algorithm is not allowed per developer preference.
|
|
73
|
+
*
|
|
74
|
+
*/
|
|
75
|
+
export declare class JOSEAlgNotAllowed extends JOSEError {
|
|
76
|
+
/** @ignore */
|
|
77
|
+
static code: string;
|
|
78
|
+
/** A unique error code for {@link JOSEAlgNotAllowed}. */
|
|
79
|
+
code: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* An error subclass thrown when a particular feature or algorithm is not supported by this
|
|
83
|
+
* implementation or JOSE in general.
|
|
84
|
+
*
|
|
85
|
+
*/
|
|
86
|
+
export declare class JOSENotSupported extends JOSEError {
|
|
87
|
+
/** @ignore */
|
|
88
|
+
static code: string;
|
|
89
|
+
/** A unique error code for {@link JOSENotSupported}. */
|
|
90
|
+
code: string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* An error subclass thrown when a JWE ciphertext decryption fails.
|
|
94
|
+
*
|
|
95
|
+
*/
|
|
96
|
+
export declare class JWEDecryptionFailed extends JOSEError {
|
|
97
|
+
/** @ignore */
|
|
98
|
+
static code: string;
|
|
99
|
+
/** A unique error code for {@link JWEDecryptionFailed}. */
|
|
100
|
+
code: string;
|
|
101
|
+
/** @ignore */
|
|
102
|
+
constructor(message?: string, options?: {
|
|
103
|
+
cause?: unknown;
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* An error subclass thrown when a JWE is invalid.
|
|
108
|
+
*
|
|
109
|
+
*/
|
|
110
|
+
export declare class JWEInvalid extends JOSEError {
|
|
111
|
+
/** @ignore */
|
|
112
|
+
static code: string;
|
|
113
|
+
/** A unique error code for {@link JWEInvalid}. */
|
|
114
|
+
code: string;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* An error subclass thrown when a JWS is invalid.
|
|
118
|
+
*
|
|
119
|
+
*/
|
|
120
|
+
export declare class JWSInvalid extends JOSEError {
|
|
121
|
+
/** @ignore */
|
|
122
|
+
static code: string;
|
|
123
|
+
/** A unique error code for {@link JWSInvalid}. */
|
|
124
|
+
code: string;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* An error subclass thrown when a JWT is invalid.
|
|
128
|
+
*
|
|
129
|
+
*/
|
|
130
|
+
export declare class JWTInvalid extends JOSEError {
|
|
131
|
+
/** @ignore */
|
|
132
|
+
static code: string;
|
|
133
|
+
/** A unique error code for {@link JWTInvalid}. */
|
|
134
|
+
code: string;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* An error subclass thrown when a JWK is invalid.
|
|
138
|
+
*
|
|
139
|
+
*/
|
|
140
|
+
export declare class JWKInvalid extends JOSEError {
|
|
141
|
+
/** @ignore */
|
|
142
|
+
static code: string;
|
|
143
|
+
/** A unique error code for {@link JWKInvalid}. */
|
|
144
|
+
code: string;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* An error subclass thrown when a JWKS is invalid.
|
|
148
|
+
*
|
|
149
|
+
*/
|
|
150
|
+
export declare class JWKSInvalid extends JOSEError {
|
|
151
|
+
/** @ignore */
|
|
152
|
+
static code: string;
|
|
153
|
+
/** A unique error code for {@link JWKSInvalid}. */
|
|
154
|
+
code: string;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* An error subclass thrown when no keys match from a JWKS.
|
|
158
|
+
*
|
|
159
|
+
*/
|
|
160
|
+
export declare class JWKSNoMatchingKey extends JOSEError {
|
|
161
|
+
/** @ignore */
|
|
162
|
+
static code: string;
|
|
163
|
+
/** A unique error code for {@link JWKSNoMatchingKey}. */
|
|
164
|
+
code: string;
|
|
165
|
+
/** @ignore */
|
|
166
|
+
constructor(message?: string, options?: {
|
|
167
|
+
cause?: unknown;
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* An error subclass thrown when multiple keys match from a JWKS.
|
|
172
|
+
*
|
|
173
|
+
*/
|
|
174
|
+
export declare class JWKSMultipleMatchingKeys extends JOSEError {
|
|
175
|
+
/** @ignore */
|
|
176
|
+
[Symbol.asyncIterator]: () => AsyncIterableIterator<types.CryptoKey>;
|
|
177
|
+
/** @ignore */
|
|
178
|
+
static code: string;
|
|
179
|
+
/** A unique error code for {@link JWKSMultipleMatchingKeys}. */
|
|
180
|
+
code: string;
|
|
181
|
+
/** @ignore */
|
|
182
|
+
constructor(message?: string, options?: {
|
|
183
|
+
cause?: unknown;
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Timeout was reached when retrieving the JWKS response.
|
|
188
|
+
*
|
|
189
|
+
*/
|
|
190
|
+
export declare class JWKSTimeout extends JOSEError {
|
|
191
|
+
/** @ignore */
|
|
192
|
+
static code: string;
|
|
193
|
+
/** A unique error code for {@link JWKSTimeout}. */
|
|
194
|
+
code: string;
|
|
195
|
+
/** @ignore */
|
|
196
|
+
constructor(message?: string, options?: {
|
|
197
|
+
cause?: unknown;
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* An error subclass thrown when JWS signature verification fails.
|
|
202
|
+
*
|
|
203
|
+
*/
|
|
204
|
+
export declare class JWSSignatureVerificationFailed extends JOSEError {
|
|
205
|
+
/** @ignore */
|
|
206
|
+
static code: string;
|
|
207
|
+
/** A unique error code for {@link JWSSignatureVerificationFailed}. */
|
|
208
|
+
code: string;
|
|
209
|
+
/** @ignore */
|
|
210
|
+
constructor(message?: string, options?: {
|
|
211
|
+
cause?: unknown;
|
|
212
|
+
});
|
|
213
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export { compactDecrypt } from './jwe/compact/decrypt.js';
|
|
2
|
+
export { flattenedDecrypt } from './jwe/flattened/decrypt.js';
|
|
3
|
+
export { generalDecrypt } from './jwe/general/decrypt.js';
|
|
4
|
+
export { GeneralEncrypt } from './jwe/general/encrypt.js';
|
|
5
|
+
export { compactVerify } from './jws/compact/verify.js';
|
|
6
|
+
export { flattenedVerify } from './jws/flattened/verify.js';
|
|
7
|
+
export { generalVerify } from './jws/general/verify.js';
|
|
8
|
+
export { jwtVerify } from './jwt/verify.js';
|
|
9
|
+
export { jwtDecrypt } from './jwt/decrypt.js';
|
|
10
|
+
export { CompactEncrypt } from './jwe/compact/encrypt.js';
|
|
11
|
+
export { FlattenedEncrypt } from './jwe/flattened/encrypt.js';
|
|
12
|
+
export { CompactSign } from './jws/compact/sign.js';
|
|
13
|
+
export { FlattenedSign } from './jws/flattened/sign.js';
|
|
14
|
+
export { GeneralSign } from './jws/general/sign.js';
|
|
15
|
+
export { SignJWT } from './jwt/sign.js';
|
|
16
|
+
export { EncryptJWT } from './jwt/encrypt.js';
|
|
17
|
+
export { calculateJwkThumbprint, calculateJwkThumbprintUri } from './jwk/thumbprint.js';
|
|
18
|
+
export { EmbeddedJWK } from './jwk/embedded.js';
|
|
19
|
+
export { createLocalJWKSet } from './jwks/local.js';
|
|
20
|
+
export { createRemoteJWKSet, jwksCache, customFetch } from './jwks/remote.js';
|
|
21
|
+
export { UnsecuredJWT } from './jwt/unsecured.js';
|
|
22
|
+
export { exportPKCS8, exportSPKI, exportJWK } from './key/export.js';
|
|
23
|
+
export { importSPKI, importPKCS8, importX509, importJWK } from './key/import.js';
|
|
24
|
+
export { decodeProtectedHeader } from './util/decode_protected_header.js';
|
|
25
|
+
export { decodeJwt } from './util/decode_jwt.js';
|
|
26
|
+
import * as errors from './util/errors.js';
|
|
27
|
+
export { errors };
|
|
28
|
+
export { generateKeyPair } from './key/generate_key_pair.js';
|
|
29
|
+
export { generateSecret } from './key/generate_secret.js';
|
|
30
|
+
import * as base64url from './util/base64url.js';
|
|
31
|
+
export { base64url };
|
|
32
|
+
export const cryptoRuntime = 'WebCryptoAPI';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { flattenedDecrypt } from '../flattened/decrypt.js';
|
|
2
|
+
import { JWEInvalid } from '../../util/errors.js';
|
|
3
|
+
import { decoder } from '../../lib/buffer_utils.js';
|
|
4
|
+
export async function compactDecrypt(jwe, key, options) {
|
|
5
|
+
if (jwe instanceof Uint8Array) {
|
|
6
|
+
jwe = decoder.decode(jwe);
|
|
7
|
+
}
|
|
8
|
+
if (typeof jwe !== 'string') {
|
|
9
|
+
throw new JWEInvalid('Compact JWE must be a string or Uint8Array');
|
|
10
|
+
}
|
|
11
|
+
const { 0: protectedHeader, 1: encryptedKey, 2: iv, 3: ciphertext, 4: tag, length, } = jwe.split('.');
|
|
12
|
+
if (length !== 5) {
|
|
13
|
+
throw new JWEInvalid('Invalid Compact JWE');
|
|
14
|
+
}
|
|
15
|
+
const decrypted = await flattenedDecrypt({
|
|
16
|
+
ciphertext,
|
|
17
|
+
iv: iv || undefined,
|
|
18
|
+
protected: protectedHeader,
|
|
19
|
+
tag: tag || undefined,
|
|
20
|
+
encrypted_key: encryptedKey || undefined,
|
|
21
|
+
}, key, options);
|
|
22
|
+
const result = { plaintext: decrypted.plaintext, protectedHeader: decrypted.protectedHeader };
|
|
23
|
+
if (typeof key === 'function') {
|
|
24
|
+
return { ...result, key: decrypted.key };
|
|
25
|
+
}
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FlattenedEncrypt } from '../flattened/encrypt.js';
|
|
2
|
+
export class CompactEncrypt {
|
|
3
|
+
#flattened;
|
|
4
|
+
constructor(plaintext) {
|
|
5
|
+
this.#flattened = new FlattenedEncrypt(plaintext);
|
|
6
|
+
}
|
|
7
|
+
setContentEncryptionKey(cek) {
|
|
8
|
+
this.#flattened.setContentEncryptionKey(cek);
|
|
9
|
+
return this;
|
|
10
|
+
}
|
|
11
|
+
setInitializationVector(iv) {
|
|
12
|
+
this.#flattened.setInitializationVector(iv);
|
|
13
|
+
return this;
|
|
14
|
+
}
|
|
15
|
+
setProtectedHeader(protectedHeader) {
|
|
16
|
+
this.#flattened.setProtectedHeader(protectedHeader);
|
|
17
|
+
return this;
|
|
18
|
+
}
|
|
19
|
+
setKeyManagementParameters(parameters) {
|
|
20
|
+
this.#flattened.setKeyManagementParameters(parameters);
|
|
21
|
+
return this;
|
|
22
|
+
}
|
|
23
|
+
async encrypt(key, options) {
|
|
24
|
+
const jwe = await this.#flattened.encrypt(key, options);
|
|
25
|
+
return [jwe.protected, jwe.encrypted_key, jwe.iv, jwe.ciphertext, jwe.tag].join('.');
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { decode as b64u } from '../../util/base64url.js';
|
|
2
|
+
import { decrypt } from '../../lib/decrypt.js';
|
|
3
|
+
import { JOSEAlgNotAllowed, JOSENotSupported, JWEInvalid } from '../../util/errors.js';
|
|
4
|
+
import { isDisjoint } from '../../lib/is_disjoint.js';
|
|
5
|
+
import { isObject } from '../../lib/is_object.js';
|
|
6
|
+
import { decryptKeyManagement } from '../../lib/decrypt_key_management.js';
|
|
7
|
+
import { decoder, concat, encode } from '../../lib/buffer_utils.js';
|
|
8
|
+
import { generateCek } from '../../lib/cek.js';
|
|
9
|
+
import { validateCrit } from '../../lib/validate_crit.js';
|
|
10
|
+
import { validateAlgorithms } from '../../lib/validate_algorithms.js';
|
|
11
|
+
import { normalizeKey } from '../../lib/normalize_key.js';
|
|
12
|
+
import { checkKeyType } from '../../lib/check_key_type.js';
|
|
13
|
+
export async function flattenedDecrypt(jwe, key, options) {
|
|
14
|
+
if (!isObject(jwe)) {
|
|
15
|
+
throw new JWEInvalid('Flattened JWE must be an object');
|
|
16
|
+
}
|
|
17
|
+
if (jwe.protected === undefined && jwe.header === undefined && jwe.unprotected === undefined) {
|
|
18
|
+
throw new JWEInvalid('JOSE Header missing');
|
|
19
|
+
}
|
|
20
|
+
if (jwe.iv !== undefined && typeof jwe.iv !== 'string') {
|
|
21
|
+
throw new JWEInvalid('JWE Initialization Vector incorrect type');
|
|
22
|
+
}
|
|
23
|
+
if (typeof jwe.ciphertext !== 'string') {
|
|
24
|
+
throw new JWEInvalid('JWE Ciphertext missing or incorrect type');
|
|
25
|
+
}
|
|
26
|
+
if (jwe.tag !== undefined && typeof jwe.tag !== 'string') {
|
|
27
|
+
throw new JWEInvalid('JWE Authentication Tag incorrect type');
|
|
28
|
+
}
|
|
29
|
+
if (jwe.protected !== undefined && typeof jwe.protected !== 'string') {
|
|
30
|
+
throw new JWEInvalid('JWE Protected Header incorrect type');
|
|
31
|
+
}
|
|
32
|
+
if (jwe.encrypted_key !== undefined && typeof jwe.encrypted_key !== 'string') {
|
|
33
|
+
throw new JWEInvalid('JWE Encrypted Key incorrect type');
|
|
34
|
+
}
|
|
35
|
+
if (jwe.aad !== undefined && typeof jwe.aad !== 'string') {
|
|
36
|
+
throw new JWEInvalid('JWE AAD incorrect type');
|
|
37
|
+
}
|
|
38
|
+
if (jwe.header !== undefined && !isObject(jwe.header)) {
|
|
39
|
+
throw new JWEInvalid('JWE Shared Unprotected Header incorrect type');
|
|
40
|
+
}
|
|
41
|
+
if (jwe.unprotected !== undefined && !isObject(jwe.unprotected)) {
|
|
42
|
+
throw new JWEInvalid('JWE Per-Recipient Unprotected Header incorrect type');
|
|
43
|
+
}
|
|
44
|
+
let parsedProt;
|
|
45
|
+
if (jwe.protected) {
|
|
46
|
+
try {
|
|
47
|
+
const protectedHeader = b64u(jwe.protected);
|
|
48
|
+
parsedProt = JSON.parse(decoder.decode(protectedHeader));
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
throw new JWEInvalid('JWE Protected Header is invalid');
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (!isDisjoint(parsedProt, jwe.header, jwe.unprotected)) {
|
|
55
|
+
throw new JWEInvalid('JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint');
|
|
56
|
+
}
|
|
57
|
+
const joseHeader = {
|
|
58
|
+
...parsedProt,
|
|
59
|
+
...jwe.header,
|
|
60
|
+
...jwe.unprotected,
|
|
61
|
+
};
|
|
62
|
+
validateCrit(JWEInvalid, new Map(), options?.crit, parsedProt, joseHeader);
|
|
63
|
+
if (joseHeader.zip !== undefined) {
|
|
64
|
+
throw new JOSENotSupported('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');
|
|
65
|
+
}
|
|
66
|
+
const { alg, enc } = joseHeader;
|
|
67
|
+
if (typeof alg !== 'string' || !alg) {
|
|
68
|
+
throw new JWEInvalid('missing JWE Algorithm (alg) in JWE Header');
|
|
69
|
+
}
|
|
70
|
+
if (typeof enc !== 'string' || !enc) {
|
|
71
|
+
throw new JWEInvalid('missing JWE Encryption Algorithm (enc) in JWE Header');
|
|
72
|
+
}
|
|
73
|
+
const keyManagementAlgorithms = options && validateAlgorithms('keyManagementAlgorithms', options.keyManagementAlgorithms);
|
|
74
|
+
const contentEncryptionAlgorithms = options &&
|
|
75
|
+
validateAlgorithms('contentEncryptionAlgorithms', options.contentEncryptionAlgorithms);
|
|
76
|
+
if ((keyManagementAlgorithms && !keyManagementAlgorithms.has(alg)) ||
|
|
77
|
+
(!keyManagementAlgorithms && alg.startsWith('PBES2'))) {
|
|
78
|
+
throw new JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter value not allowed');
|
|
79
|
+
}
|
|
80
|
+
if (contentEncryptionAlgorithms && !contentEncryptionAlgorithms.has(enc)) {
|
|
81
|
+
throw new JOSEAlgNotAllowed('"enc" (Encryption Algorithm) Header Parameter value not allowed');
|
|
82
|
+
}
|
|
83
|
+
let encryptedKey;
|
|
84
|
+
if (jwe.encrypted_key !== undefined) {
|
|
85
|
+
try {
|
|
86
|
+
encryptedKey = b64u(jwe.encrypted_key);
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
throw new JWEInvalid('Failed to base64url decode the encrypted_key');
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
let resolvedKey = false;
|
|
93
|
+
if (typeof key === 'function') {
|
|
94
|
+
key = await key(parsedProt, jwe);
|
|
95
|
+
resolvedKey = true;
|
|
96
|
+
}
|
|
97
|
+
checkKeyType(alg === 'dir' ? enc : alg, key, 'decrypt');
|
|
98
|
+
const k = await normalizeKey(key, alg);
|
|
99
|
+
let cek;
|
|
100
|
+
try {
|
|
101
|
+
cek = await decryptKeyManagement(alg, k, encryptedKey, joseHeader, options);
|
|
102
|
+
}
|
|
103
|
+
catch (err) {
|
|
104
|
+
if (err instanceof TypeError || err instanceof JWEInvalid || err instanceof JOSENotSupported) {
|
|
105
|
+
throw err;
|
|
106
|
+
}
|
|
107
|
+
cek = generateCek(enc);
|
|
108
|
+
}
|
|
109
|
+
let iv;
|
|
110
|
+
let tag;
|
|
111
|
+
if (jwe.iv !== undefined) {
|
|
112
|
+
try {
|
|
113
|
+
iv = b64u(jwe.iv);
|
|
114
|
+
}
|
|
115
|
+
catch {
|
|
116
|
+
throw new JWEInvalid('Failed to base64url decode the iv');
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
if (jwe.tag !== undefined) {
|
|
120
|
+
try {
|
|
121
|
+
tag = b64u(jwe.tag);
|
|
122
|
+
}
|
|
123
|
+
catch {
|
|
124
|
+
throw new JWEInvalid('Failed to base64url decode the tag');
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
const protectedHeader = jwe.protected !== undefined ? encode(jwe.protected) : new Uint8Array();
|
|
128
|
+
let additionalData;
|
|
129
|
+
if (jwe.aad !== undefined) {
|
|
130
|
+
additionalData = concat(protectedHeader, encode('.'), encode(jwe.aad));
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
additionalData = protectedHeader;
|
|
134
|
+
}
|
|
135
|
+
let ciphertext;
|
|
136
|
+
try {
|
|
137
|
+
ciphertext = b64u(jwe.ciphertext);
|
|
138
|
+
}
|
|
139
|
+
catch {
|
|
140
|
+
throw new JWEInvalid('Failed to base64url decode the ciphertext');
|
|
141
|
+
}
|
|
142
|
+
const plaintext = await decrypt(enc, cek, ciphertext, iv, tag, additionalData);
|
|
143
|
+
const result = { plaintext };
|
|
144
|
+
if (jwe.protected !== undefined) {
|
|
145
|
+
result.protectedHeader = parsedProt;
|
|
146
|
+
}
|
|
147
|
+
if (jwe.aad !== undefined) {
|
|
148
|
+
try {
|
|
149
|
+
result.additionalAuthenticatedData = b64u(jwe.aad);
|
|
150
|
+
}
|
|
151
|
+
catch {
|
|
152
|
+
throw new JWEInvalid('Failed to base64url decode the aad');
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
if (jwe.unprotected !== undefined) {
|
|
156
|
+
result.sharedUnprotectedHeader = jwe.unprotected;
|
|
157
|
+
}
|
|
158
|
+
if (jwe.header !== undefined) {
|
|
159
|
+
result.unprotectedHeader = jwe.header;
|
|
160
|
+
}
|
|
161
|
+
if (resolvedKey) {
|
|
162
|
+
return { ...result, key: k };
|
|
163
|
+
}
|
|
164
|
+
return result;
|
|
165
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { encode as b64u } from '../../util/base64url.js';
|
|
2
|
+
import { unprotected } from '../../lib/private_symbols.js';
|
|
3
|
+
import { encrypt } from '../../lib/encrypt.js';
|
|
4
|
+
import { encryptKeyManagement } from '../../lib/encrypt_key_management.js';
|
|
5
|
+
import { JOSENotSupported, JWEInvalid } from '../../util/errors.js';
|
|
6
|
+
import { isDisjoint } from '../../lib/is_disjoint.js';
|
|
7
|
+
import { concat, encode } from '../../lib/buffer_utils.js';
|
|
8
|
+
import { validateCrit } from '../../lib/validate_crit.js';
|
|
9
|
+
import { normalizeKey } from '../../lib/normalize_key.js';
|
|
10
|
+
import { checkKeyType } from '../../lib/check_key_type.js';
|
|
11
|
+
export class FlattenedEncrypt {
|
|
12
|
+
#plaintext;
|
|
13
|
+
#protectedHeader;
|
|
14
|
+
#sharedUnprotectedHeader;
|
|
15
|
+
#unprotectedHeader;
|
|
16
|
+
#aad;
|
|
17
|
+
#cek;
|
|
18
|
+
#iv;
|
|
19
|
+
#keyManagementParameters;
|
|
20
|
+
constructor(plaintext) {
|
|
21
|
+
if (!(plaintext instanceof Uint8Array)) {
|
|
22
|
+
throw new TypeError('plaintext must be an instance of Uint8Array');
|
|
23
|
+
}
|
|
24
|
+
this.#plaintext = plaintext;
|
|
25
|
+
}
|
|
26
|
+
setKeyManagementParameters(parameters) {
|
|
27
|
+
if (this.#keyManagementParameters) {
|
|
28
|
+
throw new TypeError('setKeyManagementParameters can only be called once');
|
|
29
|
+
}
|
|
30
|
+
this.#keyManagementParameters = parameters;
|
|
31
|
+
return this;
|
|
32
|
+
}
|
|
33
|
+
setProtectedHeader(protectedHeader) {
|
|
34
|
+
if (this.#protectedHeader) {
|
|
35
|
+
throw new TypeError('setProtectedHeader can only be called once');
|
|
36
|
+
}
|
|
37
|
+
this.#protectedHeader = protectedHeader;
|
|
38
|
+
return this;
|
|
39
|
+
}
|
|
40
|
+
setSharedUnprotectedHeader(sharedUnprotectedHeader) {
|
|
41
|
+
if (this.#sharedUnprotectedHeader) {
|
|
42
|
+
throw new TypeError('setSharedUnprotectedHeader can only be called once');
|
|
43
|
+
}
|
|
44
|
+
this.#sharedUnprotectedHeader = sharedUnprotectedHeader;
|
|
45
|
+
return this;
|
|
46
|
+
}
|
|
47
|
+
setUnprotectedHeader(unprotectedHeader) {
|
|
48
|
+
if (this.#unprotectedHeader) {
|
|
49
|
+
throw new TypeError('setUnprotectedHeader can only be called once');
|
|
50
|
+
}
|
|
51
|
+
this.#unprotectedHeader = unprotectedHeader;
|
|
52
|
+
return this;
|
|
53
|
+
}
|
|
54
|
+
setAdditionalAuthenticatedData(aad) {
|
|
55
|
+
this.#aad = aad;
|
|
56
|
+
return this;
|
|
57
|
+
}
|
|
58
|
+
setContentEncryptionKey(cek) {
|
|
59
|
+
if (this.#cek) {
|
|
60
|
+
throw new TypeError('setContentEncryptionKey can only be called once');
|
|
61
|
+
}
|
|
62
|
+
this.#cek = cek;
|
|
63
|
+
return this;
|
|
64
|
+
}
|
|
65
|
+
setInitializationVector(iv) {
|
|
66
|
+
if (this.#iv) {
|
|
67
|
+
throw new TypeError('setInitializationVector can only be called once');
|
|
68
|
+
}
|
|
69
|
+
this.#iv = iv;
|
|
70
|
+
return this;
|
|
71
|
+
}
|
|
72
|
+
async encrypt(key, options) {
|
|
73
|
+
if (!this.#protectedHeader && !this.#unprotectedHeader && !this.#sharedUnprotectedHeader) {
|
|
74
|
+
throw new JWEInvalid('either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()');
|
|
75
|
+
}
|
|
76
|
+
if (!isDisjoint(this.#protectedHeader, this.#unprotectedHeader, this.#sharedUnprotectedHeader)) {
|
|
77
|
+
throw new JWEInvalid('JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint');
|
|
78
|
+
}
|
|
79
|
+
const joseHeader = {
|
|
80
|
+
...this.#protectedHeader,
|
|
81
|
+
...this.#unprotectedHeader,
|
|
82
|
+
...this.#sharedUnprotectedHeader,
|
|
83
|
+
};
|
|
84
|
+
validateCrit(JWEInvalid, new Map(), options?.crit, this.#protectedHeader, joseHeader);
|
|
85
|
+
if (joseHeader.zip !== undefined) {
|
|
86
|
+
throw new JOSENotSupported('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');
|
|
87
|
+
}
|
|
88
|
+
const { alg, enc } = joseHeader;
|
|
89
|
+
if (typeof alg !== 'string' || !alg) {
|
|
90
|
+
throw new JWEInvalid('JWE "alg" (Algorithm) Header Parameter missing or invalid');
|
|
91
|
+
}
|
|
92
|
+
if (typeof enc !== 'string' || !enc) {
|
|
93
|
+
throw new JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');
|
|
94
|
+
}
|
|
95
|
+
let encryptedKey;
|
|
96
|
+
if (this.#cek && (alg === 'dir' || alg === 'ECDH-ES')) {
|
|
97
|
+
throw new TypeError(`setContentEncryptionKey cannot be called with JWE "alg" (Algorithm) Header ${alg}`);
|
|
98
|
+
}
|
|
99
|
+
checkKeyType(alg === 'dir' ? enc : alg, key, 'encrypt');
|
|
100
|
+
let cek;
|
|
101
|
+
{
|
|
102
|
+
let parameters;
|
|
103
|
+
const k = await normalizeKey(key, alg);
|
|
104
|
+
({ cek, encryptedKey, parameters } = await encryptKeyManagement(alg, enc, k, this.#cek, this.#keyManagementParameters));
|
|
105
|
+
if (parameters) {
|
|
106
|
+
if (options && unprotected in options) {
|
|
107
|
+
if (!this.#unprotectedHeader) {
|
|
108
|
+
this.setUnprotectedHeader(parameters);
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
this.#unprotectedHeader = { ...this.#unprotectedHeader, ...parameters };
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
else if (!this.#protectedHeader) {
|
|
115
|
+
this.setProtectedHeader(parameters);
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
this.#protectedHeader = { ...this.#protectedHeader, ...parameters };
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
let additionalData;
|
|
123
|
+
let protectedHeaderS;
|
|
124
|
+
let protectedHeaderB;
|
|
125
|
+
let aadMember;
|
|
126
|
+
if (this.#protectedHeader) {
|
|
127
|
+
protectedHeaderS = b64u(JSON.stringify(this.#protectedHeader));
|
|
128
|
+
protectedHeaderB = encode(protectedHeaderS);
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
protectedHeaderS = '';
|
|
132
|
+
protectedHeaderB = new Uint8Array();
|
|
133
|
+
}
|
|
134
|
+
if (this.#aad) {
|
|
135
|
+
aadMember = b64u(this.#aad);
|
|
136
|
+
const aadMemberBytes = encode(aadMember);
|
|
137
|
+
additionalData = concat(protectedHeaderB, encode('.'), aadMemberBytes);
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
additionalData = protectedHeaderB;
|
|
141
|
+
}
|
|
142
|
+
const { ciphertext, tag, iv } = await encrypt(enc, this.#plaintext, cek, this.#iv, additionalData);
|
|
143
|
+
const jwe = {
|
|
144
|
+
ciphertext: b64u(ciphertext),
|
|
145
|
+
};
|
|
146
|
+
if (iv) {
|
|
147
|
+
jwe.iv = b64u(iv);
|
|
148
|
+
}
|
|
149
|
+
if (tag) {
|
|
150
|
+
jwe.tag = b64u(tag);
|
|
151
|
+
}
|
|
152
|
+
if (encryptedKey) {
|
|
153
|
+
jwe.encrypted_key = b64u(encryptedKey);
|
|
154
|
+
}
|
|
155
|
+
if (aadMember) {
|
|
156
|
+
jwe.aad = aadMember;
|
|
157
|
+
}
|
|
158
|
+
if (this.#protectedHeader) {
|
|
159
|
+
jwe.protected = protectedHeaderS;
|
|
160
|
+
}
|
|
161
|
+
if (this.#sharedUnprotectedHeader) {
|
|
162
|
+
jwe.unprotected = this.#sharedUnprotectedHeader;
|
|
163
|
+
}
|
|
164
|
+
if (this.#unprotectedHeader) {
|
|
165
|
+
jwe.header = this.#unprotectedHeader;
|
|
166
|
+
}
|
|
167
|
+
return jwe;
|
|
168
|
+
}
|
|
169
|
+
}
|