@psnext/slingcli 3.0.20260820-2 → 3.1.20260904-1
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/node_modules/@aws-sdk/core/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-cjs/index.js +18 -6
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +3 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +1 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +3 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +2 -3
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +8 -1
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-http/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +12 -12
- package/node_modules/@aws-sdk/credential-provider-login/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +2 -0
- package/node_modules/@aws-sdk/credential-provider-node/dist-es/runtime/memoize-chain.js +2 -0
- package/node_modules/@aws-sdk/credential-provider-node/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-process/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +8 -4
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +8 -4
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +6 -6
- package/node_modules/@aws-sdk/eventstream-handler-node/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-eventstream/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-websocket/package.json +6 -6
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-cjs/index.js +18 -6
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +3 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +3 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +2 -3
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +8 -1
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json +3 -3
- package/node_modules/@aws-sdk/nested-clients/package.json +8 -8
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +3 -3
- package/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +3 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js +52 -41
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js +13 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js +14 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/index.js +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/search/index.js +2 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js +103 -0
- package/node_modules/@earendil-works/pi-agent-core/package.json +4 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +40 -12
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +9 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +135 -10
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js +159 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.js +125 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +24 -16
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js +29 -9
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +22 -14
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +8 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +6 -11
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +164 -90
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +4 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +6 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +17 -10
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/device-code.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.js +99 -32
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/kimi-coding.js +1 -14
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +45 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/anthropic.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cerebras.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-workers-ai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/deepseek.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/google-vertex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/google.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/kimi-coding.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/mistral.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-individual.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-ams.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-sgp.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xai.js +1 -5
- package/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.js +12 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/sleep.js +15 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/validation.js +34 -0
- package/node_modules/@earendil-works/pi-ai/package.json +3 -4
- package/node_modules/@earendil-works/pi-client/package.json +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/anthropic-messages-JWX2WP65.js +45 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/anthropic.js +75 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/azure-openai-responses-EW4T4LYK.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/bedrock-converse-stream.js +78 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-4L3WN2XY.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-6CYCI3EJ.js +12 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-6R7UI4IY.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-AXIIZGTV.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-DRQDKNXA.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-EO6LXATI.js +50 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-GIDHC5TV.js +25 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-GMWCTUPB.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-JUUC5AZY.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-L2ZPNLYD.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-MNAIPA3J.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-NBBFIJUL.js +11 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-PBNSMEG7.js +1551 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-PGXDEOVV.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-PJACZCIR.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-PRRNXB7S.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-TEPMHNKQ.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-TRDNDS6A.js +4 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-UAQELI3K.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-XDUWOHPL.js +6 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-XNGRGP62.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/dist-JDLGC5UC.js +13 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/github-copilot.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/google-generative-ai-PNH5IZXS.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/google-vertex-G37KRNYF.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/image-resize-worker.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/kimi-coding.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/lib-HGQMNYVT.js +9 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/mistral-conversations-YK73UAOZ.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/multipart-parser-SQ6GDJL7.js +3 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-codex-responses-GJVBJXLB.js +8 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-codex.js +75 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-completions-D6STZOVA.js +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-responses-PJOJMCZH.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openrouter-images-G6RND7TL.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openrouter.js +75 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/pi-messages-TPFH44NP.js +8 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/radius.js +75 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/src-UK77SYZE.js +4 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/xai.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli.js +3 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/client.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/index.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/rpc-entry.js +3 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js +40 -9
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/auth-command.js +5 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/file-processor.js +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.js +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/config.js +22 -14
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +229 -108
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js +6 -7
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.js +7 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js +59 -36
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/defaults.js +9 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/experimental.js +4 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.js +115 -48
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.js +3 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings.js +26 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-config.js +3 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js +14 -8
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/models-store.js +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js +22 -14
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/pi-manifest.js +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/remote-catalog-provider.js +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js +3 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js +12 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-export.js +32 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js +8 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-diagnostics.js +21 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js +65 -10
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/skills.js +51 -33
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/slash-commands.js +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js +11 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +38 -20
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit-diff.js +2 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.js +22 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/index.js +18 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/powershell.js +39 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.js +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/client.js +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/index.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/provider.js +29 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/index.js +5 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +25 -16
- package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.js +4 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/model-selector.js +58 -13
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +118 -56
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-submenu.js +165 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/thinking-selector.js +74 -17
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +10 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/external-editor.js +3 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +263 -149
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/model-catalog-refresh.js +34 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/session-share.js +188 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/dark.json +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/light.json +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-controller.js +25 -11
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-schema.json +9 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js +16 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/json-event.js +22 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.js +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js +3 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +187 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/server/create-harness.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/frontmatter.js +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/management-http.js +14 -10
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/shell.js +23 -9
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/syntax-highlight.js +60 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/text.js +9 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/tools-manager.js +14 -19
- package/node_modules/@earendil-works/pi-coding-agent/docs/designs/2026-08-24-smart-model-attribution-design.md +149 -0
- package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +24 -77
- package/node_modules/@earendil-works/pi-coding-agent/package.json +12 -14
- package/node_modules/@earendil-works/pi-protocol/package.json +1 -1
- package/node_modules/@earendil-works/pi-server/package.json +3 -3
- package/node_modules/@earendil-works/pi-telemetry/package.json +2 -2
- package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.js +122 -0
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +36 -3
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +9 -4
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js +23 -7
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +24 -4
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js +5 -4
- package/node_modules/@earendil-works/pi-tui/dist/index.js +2 -2
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +26 -2
- package/node_modules/@earendil-works/pi-tui/dist/latex.js +8 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +2 -8
- package/node_modules/@earendil-works/pi-tui/dist/native-module-path.js +19 -0
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +7 -2
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +37 -2
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +22 -11
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +274 -13
- package/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.js +105 -45
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +4 -0
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/node_modules/@smithy/core/dist-cjs/index.js +3 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +126 -39
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +14 -3
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +3 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +3 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +10 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +10 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +16 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +7 -0
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-decode.js +29 -13
- package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js +12 -4
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeDeserializer.js +9 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeSerializer.js +7 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeDeserializer2.js +44 -15
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeSerializer2.js +22 -4
- package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +5 -0
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js +6 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +7 -0
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +9 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +5 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.browser.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.native.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/transport/hasOwn.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/transport/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js +3 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.browser.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.native.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/transport/hasOwn.d.ts +4 -0
- package/node_modules/@smithy/core/dist-types/submodules/transport/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.browser.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.native.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/transport/hasOwn.d.ts +4 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/transport/index.d.ts +1 -0
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +2 -1
- package/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +2 -1
- package/node_modules/@smithy/fetch-http-handler/package.json +3 -3
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +19 -7
- package/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +4 -1
- package/node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js +4 -1
- package/node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js +4 -1
- package/node_modules/@smithy/signature-v4/dist-es/headerUtil.js +10 -3
- package/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +4 -1
- package/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +4 -1
- package/node_modules/@smithy/signature-v4/package.json +2 -2
- package/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts +14 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/http/httpHandlerInitialization.d.ts +14 -0
- package/node_modules/@smithy/types/package.json +1 -1
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/buffer.buffer.d.ts +10 -5
- package/node_modules/@types/node/crypto.d.ts +2 -4
- package/node_modules/@types/node/dgram.d.ts +119 -4
- package/node_modules/@types/node/ffi.d.ts +1 -1
- package/node_modules/@types/node/fs/promises.d.ts +61 -65
- package/node_modules/@types/node/fs.d.ts +86 -76
- package/node_modules/@types/node/http.d.ts +17 -1
- package/node_modules/@types/node/http2.d.ts +12 -4
- package/node_modules/@types/node/index.d.ts +1 -0
- package/node_modules/@types/node/inspector.d.ts +2 -1
- package/node_modules/@types/node/net.d.ts +108 -16
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/node/process.d.ts +52 -0
- package/node_modules/@types/node/quic.d.ts +246 -38
- package/node_modules/@types/node/sqlite.d.ts +6 -2
- package/node_modules/@types/node/stream/iter.d.ts +4 -4
- package/node_modules/@types/node/test.d.ts +36 -0
- package/node_modules/@types/node/tls.d.ts +24 -0
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +5 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +1 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +1 -0
- package/node_modules/@types/node/tty.d.ts +4 -3
- package/node_modules/@types/node/vfs.d.ts +210 -0
- package/node_modules/@types/node/vm.d.ts +1 -1
- package/node_modules/express-rate-limit/dist/index.cjs +6 -3
- package/node_modules/express-rate-limit/dist/index.d.cts +11 -0
- package/node_modules/express-rate-limit/dist/index.d.mts +11 -0
- package/node_modules/express-rate-limit/dist/index.d.ts +11 -0
- package/node_modules/express-rate-limit/dist/index.mjs +6 -3
- package/node_modules/express-rate-limit/license +21 -0
- package/node_modules/express-rate-limit/package.json +5 -5
- package/node_modules/express-rate-limit/readme.md +1 -0
- package/node_modules/fast-uri/index.js +215 -47
- package/node_modules/fast-uri/lib/schemes.js +9 -4
- package/node_modules/fast-uri/lib/utils.js +396 -92
- package/node_modules/fast-uri/package.json +1 -1
- package/node_modules/fast-uri/test/component-safe-serialization.test.js +163 -0
- package/node_modules/fast-uri/test/equal.test.js +31 -3
- package/node_modules/fast-uri/test/fixtures/uri-js-parse.json +2 -0
- package/node_modules/fast-uri/test/ipv6-canonical.test.js +34 -0
- package/node_modules/fast-uri/test/ipv6-validation.test.js +124 -0
- package/node_modules/fast-uri/test/malformed-percent.test.js +77 -0
- package/node_modules/fast-uri/test/malformed-urn.test.js +61 -0
- package/node_modules/fast-uri/test/parse.test.js +7 -3
- package/node_modules/fast-uri/test/query-fragment-normalization.test.js +33 -0
- package/node_modules/fast-uri/test/reserved-path-normalization.test.js +109 -0
- package/node_modules/fast-uri/test/scheme-validation.test.js +124 -0
- package/node_modules/fast-uri/test/security-normalization.test.js +101 -0
- package/node_modules/fast-uri/test/security.test.js +75 -3
- package/node_modules/fast-uri/test/urn-full-input.test.js +29 -0
- package/node_modules/fast-uri/test/websocket-query-preservation.test.js +24 -0
- package/node_modules/hono/dist/cjs/client/client.js +25 -11
- package/node_modules/hono/dist/cjs/client/utils.js +3 -0
- package/node_modules/hono/dist/cjs/helper/accepts/accepts.js +36 -2
- package/node_modules/hono/dist/cjs/helper/ssg/ssg.js +1 -1
- package/node_modules/hono/dist/cjs/helper/ssg/utils.js +30 -10
- package/node_modules/hono/dist/cjs/jsx/dom/render.js +2 -0
- package/node_modules/hono/dist/cjs/middleware/cache/index.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/etag/index.js +1 -1
- package/node_modules/hono/dist/cjs/request.js +8 -4
- package/node_modules/hono/dist/cjs/router/reg-exp-router/node.js +10 -3
- package/node_modules/hono/dist/cjs/router/reg-exp-router/router.js +47 -83
- package/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js +2 -1
- package/node_modules/hono/dist/cjs/router/trie-router/node.js +4 -3
- package/node_modules/hono/dist/cjs/router/utils.js +27 -0
- package/node_modules/hono/dist/cjs/utils/body.js +15 -3
- package/node_modules/hono/dist/cjs/utils/cookie.js +1 -1
- package/node_modules/hono/dist/cjs/utils/stream.js +7 -1
- package/node_modules/hono/dist/cjs/utils/url.js +9 -1
- package/node_modules/hono/dist/client/client.js +25 -11
- package/node_modules/hono/dist/client/utils.js +3 -0
- package/node_modules/hono/dist/helper/accepts/accepts.js +36 -2
- package/node_modules/hono/dist/helper/ssg/ssg.js +1 -1
- package/node_modules/hono/dist/helper/ssg/utils.js +30 -10
- package/node_modules/hono/dist/jsx/dom/render.js +2 -0
- package/node_modules/hono/dist/middleware/cache/index.js +1 -1
- package/node_modules/hono/dist/middleware/etag/index.js +1 -1
- package/node_modules/hono/dist/request.js +8 -4
- package/node_modules/hono/dist/router/reg-exp-router/node.js +6 -2
- package/node_modules/hono/dist/router/reg-exp-router/router.js +53 -84
- package/node_modules/hono/dist/router/reg-exp-router/trie.js +2 -1
- package/node_modules/hono/dist/router/trie-router/node.js +4 -3
- package/node_modules/hono/dist/router/utils.js +5 -0
- package/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts +3 -0
- package/node_modules/hono/dist/types/router/utils.d.ts +1 -0
- package/node_modules/hono/dist/types/utils/url.d.ts +4 -0
- package/node_modules/hono/dist/utils/body.js +15 -3
- package/node_modules/hono/dist/utils/cookie.js +1 -1
- package/node_modules/hono/dist/utils/stream.js +7 -1
- package/node_modules/hono/dist/utils/url.js +9 -1
- package/node_modules/hono/package.json +1 -1
- package/node_modules/ip-address/README.md +92 -82
- package/node_modules/ip-address/dist/common.d.ts +20 -0
- package/node_modules/ip-address/dist/common.js +36 -0
- package/node_modules/ip-address/dist/common.js.map +1 -1
- package/node_modules/ip-address/dist/ipv4.d.ts +50 -0
- package/node_modules/ip-address/dist/ipv4.js +75 -0
- package/node_modules/ip-address/dist/ipv4.js.map +1 -1
- package/node_modules/ip-address/dist/ipv6.d.ts +79 -10
- package/node_modules/ip-address/dist/ipv6.js +120 -30
- package/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/ip-address/dist/v4/constants.d.ts +12 -0
- package/node_modules/ip-address/dist/v4/constants.js +40 -1
- package/node_modules/ip-address/dist/v4/constants.js.map +1 -1
- package/node_modules/ip-address/dist/v6/constants.d.ts +14 -0
- package/node_modules/ip-address/dist/v6/constants.js +47 -1
- package/node_modules/ip-address/dist/v6/constants.js.map +1 -1
- package/node_modules/ip-address/package.json +1 -1
- package/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +7 -16
- package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +6 -17
- package/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +7 -16
- package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +11 -34
- package/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +7 -16
- package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +15 -35
- package/node_modules/jose/dist/types/jwk/embedded.d.ts +3 -8
- package/node_modules/jose/dist/types/jwk/thumbprint.d.ts +5 -5
- package/node_modules/jose/dist/types/jwks/local.d.ts +6 -10
- package/node_modules/jose/dist/types/jwks/remote.d.ts +17 -28
- package/node_modules/jose/dist/types/jws/compact/sign.d.ts +5 -10
- package/node_modules/jose/dist/types/jws/compact/verify.d.ts +9 -18
- package/node_modules/jose/dist/types/jws/flattened/sign.d.ts +7 -16
- package/node_modules/jose/dist/types/jws/flattened/verify.d.ts +9 -18
- package/node_modules/jose/dist/types/jws/general/sign.d.ts +11 -21
- package/node_modules/jose/dist/types/jws/general/verify.d.ts +12 -21
- package/node_modules/jose/dist/types/jwt/decrypt.d.ts +10 -20
- package/node_modules/jose/dist/types/jwt/encrypt.d.ts +13 -26
- package/node_modules/jose/dist/types/jwt/sign.d.ts +12 -19
- package/node_modules/jose/dist/types/jwt/unsecured.d.ts +17 -28
- package/node_modules/jose/dist/types/jwt/verify.d.ts +9 -19
- package/node_modules/jose/dist/types/key/export.d.ts +4 -4
- package/node_modules/jose/dist/types/key/generate_key_pair.d.ts +6 -8
- package/node_modules/jose/dist/types/key/generate_secret.d.ts +4 -11
- package/node_modules/jose/dist/types/key/import.d.ts +10 -17
- package/node_modules/jose/dist/types/types.d.ts +44 -84
- package/node_modules/jose/dist/types/util/base64url.d.ts +2 -2
- package/node_modules/jose/dist/types/util/decode_jwt.d.ts +3 -10
- package/node_modules/jose/dist/types/util/decode_protected_header.d.ts +4 -4
- package/node_modules/jose/dist/types/util/errors.d.ts +26 -53
- package/node_modules/jose/dist/webapi/index.js +70 -32
- package/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +7 -8
- package/node_modules/jose/dist/webapi/jwe/compact/encrypt.js +42 -26
- package/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +14 -10
- package/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +53 -71
- package/node_modules/jose/dist/webapi/jwe/general/decrypt.js +38 -49
- package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +121 -162
- package/node_modules/jose/dist/webapi/jwk/embedded.js +30 -18
- package/node_modules/jose/dist/webapi/jwk/thumbprint.js +54 -64
- package/node_modules/jose/dist/webapi/jwks/local.js +49 -74
- package/node_modules/jose/dist/webapi/jwks/remote.js +91 -160
- package/node_modules/jose/dist/webapi/jws/compact/sign.js +21 -20
- package/node_modules/jose/dist/webapi/jws/compact/verify.js +7 -8
- package/node_modules/jose/dist/webapi/jws/flattened/sign.js +29 -30
- package/node_modules/jose/dist/webapi/jws/flattened/verify.js +21 -23
- package/node_modules/jose/dist/webapi/jws/general/sign.js +61 -70
- package/node_modules/jose/dist/webapi/jws/general/verify.js +47 -41
- package/node_modules/jose/dist/webapi/jwt/decrypt.js +13 -22
- package/node_modules/jose/dist/webapi/jwt/encrypt.js +58 -100
- package/node_modules/jose/dist/webapi/jwt/sign.js +18 -50
- package/node_modules/jose/dist/webapi/jwt/unsecured.js +34 -63
- package/node_modules/jose/dist/webapi/jwt/verify.js +12 -14
- package/node_modules/jose/dist/webapi/key/export.js +32 -37
- package/node_modules/jose/dist/webapi/key/generate_key_pair.js +40 -44
- package/node_modules/jose/dist/webapi/key/generate_secret.js +35 -39
- package/node_modules/jose/dist/webapi/key/import.js +52 -52
- package/node_modules/jose/dist/webapi/lib/asn1.js +130 -164
- package/node_modules/jose/dist/webapi/lib/base64.js +18 -20
- package/node_modules/jose/dist/webapi/lib/buffer_utils.js +34 -38
- package/node_modules/jose/dist/webapi/lib/content_encryption.js +79 -123
- package/node_modules/jose/dist/webapi/lib/crypto_key.js +24 -25
- package/node_modules/jose/dist/webapi/lib/deflate.js +46 -40
- package/node_modules/jose/dist/webapi/lib/helpers.js +40 -37
- package/node_modules/jose/dist/webapi/lib/invalid_key_input.js +10 -24
- package/node_modules/jose/dist/webapi/lib/is_key_like.js +17 -15
- package/node_modules/jose/dist/webapi/lib/jwe_algorithms.js +106 -93
- package/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +210 -176
- package/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +104 -110
- package/node_modules/jose/dist/webapi/lib/jwk_metadata.js +19 -0
- package/node_modules/jose/dist/webapi/lib/jwk_to_key.js +9 -16
- package/node_modules/jose/dist/webapi/lib/jws_algorithms.js +62 -61
- package/node_modules/jose/dist/webapi/lib/jws_sign.js +58 -72
- package/node_modules/jose/dist/webapi/lib/jws_verify.js +90 -103
- package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +134 -185
- package/node_modules/jose/dist/webapi/lib/key.js +84 -121
- package/node_modules/jose/dist/webapi/lib/key_algorithm.js +13 -8
- package/node_modules/jose/dist/webapi/lib/key_descriptor.js +8 -6
- package/node_modules/jose/dist/webapi/lib/key_management.js +200 -225
- package/node_modules/jose/dist/webapi/lib/key_options.js +8 -0
- package/node_modules/jose/dist/webapi/lib/options.js +57 -44
- package/node_modules/jose/dist/webapi/lib/signing.js +18 -22
- package/node_modules/jose/dist/webapi/lib/type_checks.js +28 -33
- package/node_modules/jose/dist/webapi/util/base64url.js +26 -35
- package/node_modules/jose/dist/webapi/util/decode_jwt.js +32 -31
- package/node_modules/jose/dist/webapi/util/decode_protected_header.js +18 -23
- package/node_modules/jose/dist/webapi/util/errors.js +94 -84
- package/node_modules/jose/package.json +17 -81
- package/node_modules/negotiator/lib/accept.js +54 -0
- package/node_modules/negotiator/lib/charset.js +10 -34
- package/node_modules/negotiator/lib/encoding.js +9 -30
- package/node_modules/negotiator/lib/language.js +15 -36
- package/node_modules/negotiator/lib/mediaType.js +16 -134
- package/node_modules/negotiator/node_modules/content-type/LICENSE +22 -0
- package/node_modules/negotiator/node_modules/content-type/README.md +71 -0
- package/node_modules/negotiator/node_modules/content-type/dist/index.d.ts +46 -0
- package/node_modules/negotiator/node_modules/content-type/dist/index.js +176 -0
- package/node_modules/negotiator/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/negotiator/node_modules/content-type/package.json +52 -0
- package/node_modules/negotiator/package.json +16 -10
- package/node_modules/protobufjs/dist/light/protobuf.js +59 -6
- package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.js +22 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.js +59 -6
- package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/package.json +1 -1
- package/node_modules/protobufjs/src/decoder.js +32 -3
- package/node_modules/protobufjs/src/reader.js +20 -0
- package/node_modules/protobufjs/src/wrappers.js +5 -1
- package/node_modules/qs/.github/THREAT_MODEL.md +3 -3
- package/node_modules/qs/CHANGELOG.md +15 -0
- package/node_modules/qs/README.md +19 -1
- package/node_modules/qs/dist/qs.js +21 -21
- package/node_modules/qs/eslint.config.mjs +1 -1
- package/node_modules/qs/lib/parse.js +3 -4
- package/node_modules/qs/lib/stringify.js +23 -8
- package/node_modules/qs/lib/utils.js +10 -3
- package/node_modules/qs/package.json +4 -4
- package/node_modules/qs/test/parse.js +192 -3
- package/node_modules/qs/test/stringify.js +317 -0
- package/node_modules/qs/test/utils.js +12 -0
- package/node_modules/zod/README.md +27 -0
- package/node_modules/zod/compile.cjs +77 -0
- package/node_modules/zod/compile.d.cts +1 -0
- package/node_modules/zod/compile.d.ts +1 -0
- package/node_modules/zod/compile.js +52 -0
- package/node_modules/zod/index.cjs +2 -2
- package/node_modules/zod/index.d.cts +1 -2
- package/node_modules/zod/index.d.ts +1 -2
- package/node_modules/zod/index.js +5 -2
- package/node_modules/zod/package.json +13 -2
- package/node_modules/zod/src/compile.ts +56 -0
- package/node_modules/zod/src/index.ts +5 -2
- package/node_modules/zod/src/v3/ZodError.ts +22 -12
- package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
- package/node_modules/zod/src/v3/tests/object.test.ts +3 -6
- package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
- package/node_modules/zod/src/v3/tests/string.test.ts +6 -0
- package/node_modules/zod/src/v3/types.ts +5 -5
- package/node_modules/zod/src/v4/classic/checks.ts +1 -0
- package/node_modules/zod/src/v4/classic/compat.ts +26 -18
- package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
- package/node_modules/zod/src/v4/classic/errors.ts +59 -44
- package/node_modules/zod/src/v4/classic/external.ts +12 -9
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +140 -78
- package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
- package/node_modules/zod/src/v4/classic/index.ts +2 -2
- package/node_modules/zod/src/v4/classic/iso.ts +2 -72
- package/node_modules/zod/src/v4/classic/parse.ts +10 -4
- package/node_modules/zod/src/v4/classic/schemas.ts +452 -262
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +135 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +30 -1
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +278 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +2 -1
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +720 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +30 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +32 -18
- package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
- package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +46 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +31 -7
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +155 -13
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +11 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +112 -2
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +274 -6
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +425 -10
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +31 -0
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +2 -9
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +21 -2
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +281 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +47 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +136 -0
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +183 -0
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +3 -10
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +12 -1
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +12 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +46 -9
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +245 -12
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +234 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +49 -16
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +51 -4
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +20 -2
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +186 -18
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +33 -2
- package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +60 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +9 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +127 -5
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +18 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +11 -2
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1585 -173
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +45 -30
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +39 -2
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +76 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
- package/node_modules/zod/src/v4/core/api.ts +48 -12
- package/node_modules/zod/src/v4/core/checks.ts +57 -44
- package/node_modules/zod/src/v4/core/compile.ts +2188 -0
- package/node_modules/zod/src/v4/core/core.ts +98 -19
- package/node_modules/zod/src/v4/core/doc.ts +11 -7
- package/node_modules/zod/src/v4/core/errors.ts +115 -24
- package/node_modules/zod/src/v4/core/index.ts +3 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +6 -1
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +257 -93
- package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
- package/node_modules/zod/src/v4/core/memoizer.ts +284 -0
- package/node_modules/zod/src/v4/core/parse.ts +131 -38
- package/node_modules/zod/src/v4/core/regexes.ts +30 -13
- package/node_modules/zod/src/v4/core/registries.ts +2 -2
- package/node_modules/zod/src/v4/core/schemas.ts +759 -461
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +969 -0
- package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
- package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
- package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +1639 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +3 -3
- package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
- package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +31 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +275 -42
- package/node_modules/zod/src/v4/core/util.ts +268 -42
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/core/visit.ts +193 -0
- package/node_modules/zod/src/v4/index.ts +3 -3
- package/node_modules/zod/src/v4/locales/ar.ts +3 -0
- package/node_modules/zod/src/v4/locales/az.ts +3 -0
- package/node_modules/zod/src/v4/locales/be.ts +10 -0
- package/node_modules/zod/src/v4/locales/bg.ts +3 -0
- package/node_modules/zod/src/v4/locales/bn.ts +121 -0
- package/node_modules/zod/src/v4/locales/ca.ts +3 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +138 -0
- package/node_modules/zod/src/v4/locales/cs.ts +3 -0
- package/node_modules/zod/src/v4/locales/da.ts +5 -2
- package/node_modules/zod/src/v4/locales/de.ts +3 -0
- package/node_modules/zod/src/v4/locales/el.ts +1 -0
- package/node_modules/zod/src/v4/locales/en.ts +15 -4
- package/node_modules/zod/src/v4/locales/eo.ts +3 -0
- package/node_modules/zod/src/v4/locales/es.ts +2 -0
- package/node_modules/zod/src/v4/locales/fa.ts +3 -0
- package/node_modules/zod/src/v4/locales/fi.ts +3 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +3 -0
- package/node_modules/zod/src/v4/locales/fr.ts +19 -14
- package/node_modules/zod/src/v4/locales/gu.ts +121 -0
- package/node_modules/zod/src/v4/locales/he.ts +6 -1
- package/node_modules/zod/src/v4/locales/hi.ts +124 -0
- package/node_modules/zod/src/v4/locales/hr.ts +2 -0
- package/node_modules/zod/src/v4/locales/hu.ts +3 -0
- package/node_modules/zod/src/v4/locales/hy.ts +9 -0
- package/node_modules/zod/src/v4/locales/id.ts +3 -0
- package/node_modules/zod/src/v4/locales/index.ts +10 -0
- package/node_modules/zod/src/v4/locales/is.ts +3 -0
- package/node_modules/zod/src/v4/locales/it.ts +3 -0
- package/node_modules/zod/src/v4/locales/ja.ts +3 -0
- package/node_modules/zod/src/v4/locales/ka.ts +3 -0
- package/node_modules/zod/src/v4/locales/km.ts +3 -0
- package/node_modules/zod/src/v4/locales/kn.ts +124 -0
- package/node_modules/zod/src/v4/locales/ko.ts +3 -0
- package/node_modules/zod/src/v4/locales/lt.ts +2 -0
- package/node_modules/zod/src/v4/locales/mk.ts +3 -0
- package/node_modules/zod/src/v4/locales/ms.ts +3 -0
- package/node_modules/zod/src/v4/locales/ne.ts +126 -0
- package/node_modules/zod/src/v4/locales/nl.ts +3 -0
- package/node_modules/zod/src/v4/locales/nn.ts +119 -0
- package/node_modules/zod/src/v4/locales/no.ts +5 -2
- package/node_modules/zod/src/v4/locales/ota.ts +3 -0
- package/node_modules/zod/src/v4/locales/pl.ts +3 -0
- package/node_modules/zod/src/v4/locales/ps.ts +3 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +159 -0
- package/node_modules/zod/src/v4/locales/pt.ts +99 -58
- package/node_modules/zod/src/v4/locales/ro.ts +1 -0
- package/node_modules/zod/src/v4/locales/ru.ts +10 -0
- package/node_modules/zod/src/v4/locales/sk.ts +121 -0
- package/node_modules/zod/src/v4/locales/sl.ts +3 -0
- package/node_modules/zod/src/v4/locales/sv.ts +5 -2
- package/node_modules/zod/src/v4/locales/ta.ts +3 -0
- package/node_modules/zod/src/v4/locales/th.ts +3 -0
- package/node_modules/zod/src/v4/locales/tk.ts +111 -0
- package/node_modules/zod/src/v4/locales/tr.ts +3 -0
- package/node_modules/zod/src/v4/locales/uk.ts +3 -0
- package/node_modules/zod/src/v4/locales/ur.ts +3 -0
- package/node_modules/zod/src/v4/locales/uz.ts +1 -0
- package/node_modules/zod/src/v4/locales/vi.ts +3 -0
- package/node_modules/zod/src/v4/locales/yo.ts +3 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +3 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +3 -0
- package/node_modules/zod/src/v4/mini/checks.ts +1 -0
- package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
- package/node_modules/zod/src/v4/mini/external.ts +10 -1
- package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
- package/node_modules/zod/src/v4/mini/parse.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +135 -56
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +33 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +62 -1
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +35 -1
- package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
- package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +23 -4
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +9 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +72 -5
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +65 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +21 -0
- package/node_modules/zod/v3/ZodError.cjs +22 -12
- package/node_modules/zod/v3/ZodError.d.cts +1 -1
- package/node_modules/zod/v3/ZodError.d.ts +1 -1
- package/node_modules/zod/v3/ZodError.js +22 -12
- package/node_modules/zod/v3/types.cjs +7 -5
- package/node_modules/zod/v3/types.js +7 -5
- package/node_modules/zod/v4/classic/checks.cjs +2 -1
- package/node_modules/zod/v4/classic/checks.d.cts +1 -1
- package/node_modules/zod/v4/classic/checks.d.ts +1 -1
- package/node_modules/zod/v4/classic/checks.js +1 -1
- package/node_modules/zod/v4/classic/compat.d.cts +9 -11
- package/node_modules/zod/v4/classic/compat.d.ts +9 -11
- package/node_modules/zod/v4/classic/deep-partial.cjs +39 -0
- package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/node_modules/zod/v4/classic/errors.cjs +43 -34
- package/node_modules/zod/v4/classic/errors.d.cts +3 -4
- package/node_modules/zod/v4/classic/errors.d.ts +3 -4
- package/node_modules/zod/v4/classic/errors.js +43 -34
- package/node_modules/zod/v4/classic/external.cjs +30 -27
- package/node_modules/zod/v4/classic/external.d.cts +5 -2
- package/node_modules/zod/v4/classic/external.d.ts +5 -2
- package/node_modules/zod/v4/classic/external.js +5 -8
- package/node_modules/zod/v4/classic/from-json-schema.cjs +136 -75
- package/node_modules/zod/v4/classic/from-json-schema.js +136 -75
- package/node_modules/zod/v4/classic/in-out.cjs +63 -0
- package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
- package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
- package/node_modules/zod/v4/classic/in-out.js +36 -0
- package/node_modules/zod/v4/classic/index.cjs +2 -2
- package/node_modules/zod/v4/classic/index.d.cts +1 -2
- package/node_modules/zod/v4/classic/index.d.ts +1 -2
- package/node_modules/zod/v4/classic/index.js +2 -2
- package/node_modules/zod/v4/classic/iso.cjs +11 -22
- package/node_modules/zod/v4/classic/iso.d.cts +2 -17
- package/node_modules/zod/v4/classic/iso.d.ts +2 -17
- package/node_modules/zod/v4/classic/iso.js +2 -17
- package/node_modules/zod/v4/classic/parse.cjs +4 -1
- package/node_modules/zod/v4/classic/parse.d.cts +17 -4
- package/node_modules/zod/v4/classic/parse.d.ts +17 -4
- package/node_modules/zod/v4/classic/parse.js +1 -0
- package/node_modules/zod/v4/classic/schemas.cjs +498 -398
- package/node_modules/zod/v4/classic/schemas.d.cts +53 -18
- package/node_modules/zod/v4/classic/schemas.d.ts +53 -18
- package/node_modules/zod/v4/classic/schemas.js +492 -396
- package/node_modules/zod/v4/core/api.cjs +23 -4
- package/node_modules/zod/v4/core/api.d.cts +13 -9
- package/node_modules/zod/v4/core/api.d.ts +13 -9
- package/node_modules/zod/v4/core/api.js +21 -4
- package/node_modules/zod/v4/core/checks.cjs +37 -31
- package/node_modules/zod/v4/core/checks.d.cts +13 -13
- package/node_modules/zod/v4/core/checks.d.ts +13 -13
- package/node_modules/zod/v4/core/checks.js +37 -31
- package/node_modules/zod/v4/core/compile.cjs +1813 -0
- package/node_modules/zod/v4/core/compile.d.cts +51 -0
- package/node_modules/zod/v4/core/compile.d.ts +51 -0
- package/node_modules/zod/v4/core/compile.js +1783 -0
- package/node_modules/zod/v4/core/core.cjs +81 -18
- package/node_modules/zod/v4/core/core.d.cts +16 -4
- package/node_modules/zod/v4/core/core.d.ts +16 -4
- package/node_modules/zod/v4/core/core.js +82 -19
- package/node_modules/zod/v4/core/doc.cjs +5 -7
- package/node_modules/zod/v4/core/doc.d.cts +3 -1
- package/node_modules/zod/v4/core/doc.d.ts +3 -1
- package/node_modules/zod/v4/core/doc.js +5 -7
- package/node_modules/zod/v4/core/errors.cjs +110 -25
- package/node_modules/zod/v4/core/errors.d.cts +4 -0
- package/node_modules/zod/v4/core/errors.d.ts +4 -0
- package/node_modules/zod/v4/core/errors.js +110 -25
- package/node_modules/zod/v4/core/index.cjs +5 -1
- package/node_modules/zod/v4/core/index.d.cts +3 -0
- package/node_modules/zod/v4/core/index.d.ts +3 -0
- package/node_modules/zod/v4/core/index.js +3 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +4 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.js +4 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +264 -95
- package/node_modules/zod/v4/core/json-schema-processors.js +243 -97
- package/node_modules/zod/v4/core/json-schema.d.cts +2 -1
- package/node_modules/zod/v4/core/json-schema.d.ts +2 -1
- package/node_modules/zod/v4/core/memoizer.cjs +272 -0
- package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
- package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
- package/node_modules/zod/v4/core/memoizer.js +265 -0
- package/node_modules/zod/v4/core/parse.cjs +96 -34
- package/node_modules/zod/v4/core/parse.d.cts +14 -11
- package/node_modules/zod/v4/core/parse.d.ts +14 -11
- package/node_modules/zod/v4/core/parse.js +94 -33
- package/node_modules/zod/v4/core/regexes.cjs +27 -15
- package/node_modules/zod/v4/core/regexes.d.cts +2 -0
- package/node_modules/zod/v4/core/regexes.d.ts +2 -0
- package/node_modules/zod/v4/core/regexes.js +24 -13
- package/node_modules/zod/v4/core/registries.js +2 -2
- package/node_modules/zod/v4/core/schemas.cjs +537 -326
- package/node_modules/zod/v4/core/schemas.d.cts +100 -31
- package/node_modules/zod/v4/core/schemas.d.ts +100 -31
- package/node_modules/zod/v4/core/schemas.js +526 -325
- package/node_modules/zod/v4/core/to-json-schema.cjs +242 -39
- package/node_modules/zod/v4/core/to-json-schema.d.cts +42 -3
- package/node_modules/zod/v4/core/to-json-schema.d.ts +42 -3
- package/node_modules/zod/v4/core/to-json-schema.js +241 -39
- package/node_modules/zod/v4/core/util.cjs +212 -31
- package/node_modules/zod/v4/core/util.d.cts +58 -1
- package/node_modules/zod/v4/core/util.d.ts +58 -1
- package/node_modules/zod/v4/core/util.js +202 -30
- package/node_modules/zod/v4/core/versions.cjs +2 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +195 -0
- package/node_modules/zod/v4/core/visit.d.cts +30 -0
- package/node_modules/zod/v4/core/visit.d.ts +30 -0
- package/node_modules/zod/v4/core/visit.js +169 -0
- package/node_modules/zod/v4/index.cjs +15 -5
- package/node_modules/zod/v4/index.d.cts +2 -2
- package/node_modules/zod/v4/index.d.ts +2 -2
- package/node_modules/zod/v4/index.js +3 -2
- package/node_modules/zod/v4/locales/ar.cjs +3 -0
- package/node_modules/zod/v4/locales/ar.js +3 -0
- package/node_modules/zod/v4/locales/az.cjs +3 -0
- package/node_modules/zod/v4/locales/az.js +3 -0
- package/node_modules/zod/v4/locales/be.cjs +10 -0
- package/node_modules/zod/v4/locales/be.js +10 -0
- package/node_modules/zod/v4/locales/bg.cjs +3 -0
- package/node_modules/zod/v4/locales/bg.js +3 -0
- package/node_modules/zod/v4/locales/bn.cjs +138 -0
- package/node_modules/zod/v4/locales/bn.d.cts +5 -0
- package/node_modules/zod/v4/locales/bn.d.ts +4 -0
- package/node_modules/zod/v4/locales/bn.js +111 -0
- package/node_modules/zod/v4/locales/ca.cjs +3 -0
- package/node_modules/zod/v4/locales/ca.js +3 -0
- package/node_modules/zod/v4/locales/ckb.cjs +158 -0
- package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
- package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
- package/node_modules/zod/v4/locales/ckb.js +131 -0
- package/node_modules/zod/v4/locales/cs.cjs +3 -0
- package/node_modules/zod/v4/locales/cs.js +3 -0
- package/node_modules/zod/v4/locales/da.cjs +5 -2
- package/node_modules/zod/v4/locales/da.js +5 -2
- package/node_modules/zod/v4/locales/de.cjs +3 -0
- package/node_modules/zod/v4/locales/de.js +3 -0
- package/node_modules/zod/v4/locales/el.cjs +1 -0
- package/node_modules/zod/v4/locales/el.js +1 -0
- package/node_modules/zod/v4/locales/en.cjs +14 -4
- package/node_modules/zod/v4/locales/en.js +14 -4
- package/node_modules/zod/v4/locales/eo.cjs +3 -0
- package/node_modules/zod/v4/locales/eo.js +3 -0
- package/node_modules/zod/v4/locales/es.cjs +2 -0
- package/node_modules/zod/v4/locales/es.js +2 -0
- package/node_modules/zod/v4/locales/fa.cjs +3 -0
- package/node_modules/zod/v4/locales/fa.js +3 -0
- package/node_modules/zod/v4/locales/fi.cjs +3 -0
- package/node_modules/zod/v4/locales/fi.js +3 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +3 -0
- package/node_modules/zod/v4/locales/fr-CA.js +3 -0
- package/node_modules/zod/v4/locales/fr.cjs +16 -14
- package/node_modules/zod/v4/locales/fr.js +16 -14
- package/node_modules/zod/v4/locales/gu.cjs +138 -0
- package/node_modules/zod/v4/locales/gu.d.cts +5 -0
- package/node_modules/zod/v4/locales/gu.d.ts +4 -0
- package/node_modules/zod/v4/locales/gu.js +111 -0
- package/node_modules/zod/v4/locales/he.cjs +5 -0
- package/node_modules/zod/v4/locales/he.js +5 -0
- package/node_modules/zod/v4/locales/hi.cjs +136 -0
- package/node_modules/zod/v4/locales/hi.d.cts +5 -0
- package/node_modules/zod/v4/locales/hi.d.ts +4 -0
- package/node_modules/zod/v4/locales/hi.js +109 -0
- package/node_modules/zod/v4/locales/hr.cjs +2 -0
- package/node_modules/zod/v4/locales/hr.js +2 -0
- package/node_modules/zod/v4/locales/hu.cjs +3 -0
- package/node_modules/zod/v4/locales/hu.js +3 -0
- package/node_modules/zod/v4/locales/hy.cjs +9 -0
- package/node_modules/zod/v4/locales/hy.js +9 -0
- package/node_modules/zod/v4/locales/id.cjs +3 -0
- package/node_modules/zod/v4/locales/id.js +3 -0
- package/node_modules/zod/v4/locales/index.cjs +22 -2
- package/node_modules/zod/v4/locales/index.d.cts +10 -0
- package/node_modules/zod/v4/locales/index.d.ts +10 -0
- package/node_modules/zod/v4/locales/index.js +10 -0
- package/node_modules/zod/v4/locales/is.cjs +3 -0
- package/node_modules/zod/v4/locales/is.js +3 -0
- package/node_modules/zod/v4/locales/it.cjs +3 -0
- package/node_modules/zod/v4/locales/it.js +3 -0
- package/node_modules/zod/v4/locales/ja.cjs +3 -0
- package/node_modules/zod/v4/locales/ja.js +3 -0
- package/node_modules/zod/v4/locales/ka.cjs +3 -0
- package/node_modules/zod/v4/locales/ka.js +3 -0
- package/node_modules/zod/v4/locales/km.cjs +3 -0
- package/node_modules/zod/v4/locales/km.js +3 -0
- package/node_modules/zod/v4/locales/kn.cjs +141 -0
- package/node_modules/zod/v4/locales/kn.d.cts +5 -0
- package/node_modules/zod/v4/locales/kn.d.ts +4 -0
- package/node_modules/zod/v4/locales/kn.js +114 -0
- package/node_modules/zod/v4/locales/ko.cjs +3 -0
- package/node_modules/zod/v4/locales/ko.js +3 -0
- package/node_modules/zod/v4/locales/lt.cjs +2 -0
- package/node_modules/zod/v4/locales/lt.js +2 -0
- package/node_modules/zod/v4/locales/mk.cjs +3 -0
- package/node_modules/zod/v4/locales/mk.js +3 -0
- package/node_modules/zod/v4/locales/ms.cjs +3 -0
- package/node_modules/zod/v4/locales/ms.js +3 -0
- package/node_modules/zod/v4/locales/ne.cjs +136 -0
- package/node_modules/zod/v4/locales/ne.d.cts +5 -0
- package/node_modules/zod/v4/locales/ne.d.ts +4 -0
- package/node_modules/zod/v4/locales/ne.js +109 -0
- package/node_modules/zod/v4/locales/nl.cjs +3 -0
- package/node_modules/zod/v4/locales/nl.js +3 -0
- package/node_modules/zod/v4/locales/nn.cjs +138 -0
- package/node_modules/zod/v4/locales/nn.d.cts +5 -0
- package/node_modules/zod/v4/locales/nn.d.ts +4 -0
- package/node_modules/zod/v4/locales/nn.js +111 -0
- package/node_modules/zod/v4/locales/no.cjs +5 -2
- package/node_modules/zod/v4/locales/no.js +5 -2
- package/node_modules/zod/v4/locales/ota.cjs +3 -0
- package/node_modules/zod/v4/locales/ota.js +3 -0
- package/node_modules/zod/v4/locales/pl.cjs +3 -0
- package/node_modules/zod/v4/locales/pl.js +3 -0
- package/node_modules/zod/v4/locales/ps.cjs +3 -0
- package/node_modules/zod/v4/locales/ps.js +3 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +168 -0
- package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt-BR.js +141 -0
- package/node_modules/zod/v4/locales/pt.cjs +87 -55
- package/node_modules/zod/v4/locales/pt.js +87 -55
- package/node_modules/zod/v4/locales/ro.cjs +1 -0
- package/node_modules/zod/v4/locales/ro.js +1 -0
- package/node_modules/zod/v4/locales/ru.cjs +10 -0
- package/node_modules/zod/v4/locales/ru.js +10 -0
- package/node_modules/zod/v4/locales/sk.cjs +141 -0
- package/node_modules/zod/v4/locales/sk.d.cts +5 -0
- package/node_modules/zod/v4/locales/sk.d.ts +4 -0
- package/node_modules/zod/v4/locales/sk.js +114 -0
- package/node_modules/zod/v4/locales/sl.cjs +3 -0
- package/node_modules/zod/v4/locales/sl.js +3 -0
- package/node_modules/zod/v4/locales/sv.cjs +5 -2
- package/node_modules/zod/v4/locales/sv.js +5 -2
- package/node_modules/zod/v4/locales/ta.cjs +3 -0
- package/node_modules/zod/v4/locales/ta.js +3 -0
- package/node_modules/zod/v4/locales/th.cjs +3 -0
- package/node_modules/zod/v4/locales/th.js +3 -0
- package/node_modules/zod/v4/locales/tk.cjs +132 -0
- package/node_modules/zod/v4/locales/tk.d.cts +5 -0
- package/node_modules/zod/v4/locales/tk.d.ts +4 -0
- package/node_modules/zod/v4/locales/tk.js +105 -0
- package/node_modules/zod/v4/locales/tr.cjs +3 -0
- package/node_modules/zod/v4/locales/tr.js +3 -0
- package/node_modules/zod/v4/locales/uk.cjs +3 -0
- package/node_modules/zod/v4/locales/uk.js +3 -0
- package/node_modules/zod/v4/locales/ur.cjs +3 -0
- package/node_modules/zod/v4/locales/ur.js +3 -0
- package/node_modules/zod/v4/locales/uz.cjs +1 -0
- package/node_modules/zod/v4/locales/uz.js +1 -0
- package/node_modules/zod/v4/locales/vi.cjs +3 -0
- package/node_modules/zod/v4/locales/vi.js +3 -0
- package/node_modules/zod/v4/locales/yo.cjs +3 -0
- package/node_modules/zod/v4/locales/yo.js +3 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +3 -0
- package/node_modules/zod/v4/locales/zh-CN.js +3 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +3 -0
- package/node_modules/zod/v4/locales/zh-TW.js +3 -0
- package/node_modules/zod/v4/mini/checks.cjs +2 -1
- package/node_modules/zod/v4/mini/checks.d.cts +1 -1
- package/node_modules/zod/v4/mini/checks.d.ts +1 -1
- package/node_modules/zod/v4/mini/checks.js +1 -1
- package/node_modules/zod/v4/mini/deep-partial.cjs +39 -0
- package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.js +13 -0
- package/node_modules/zod/v4/mini/external.cjs +12 -1
- package/node_modules/zod/v4/mini/external.d.cts +5 -2
- package/node_modules/zod/v4/mini/external.d.ts +5 -2
- package/node_modules/zod/v4/mini/external.js +3 -1
- package/node_modules/zod/v4/mini/in-out.cjs +63 -0
- package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
- package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
- package/node_modules/zod/v4/mini/in-out.js +36 -0
- package/node_modules/zod/v4/mini/parse.cjs +3 -1
- package/node_modules/zod/v4/mini/parse.d.cts +1 -1
- package/node_modules/zod/v4/mini/parse.d.ts +1 -1
- package/node_modules/zod/v4/mini/parse.js +1 -1
- package/node_modules/zod/v4/mini/schemas.cjs +75 -47
- package/node_modules/zod/v4/mini/schemas.d.cts +43 -13
- package/node_modules/zod/v4/mini/schemas.d.ts +43 -13
- package/node_modules/zod/v4/mini/schemas.js +71 -45
- package/package.json +10 -9
- package/skills/context-management/SKILL.md +258 -0
- package/skills/figma-implement-design/SKILL.md +258 -0
- package/skills/orchestrator/SKILL.md +82 -0
- package/skills/s-help/SKILL.md +42 -0
- package/skills/s-help/resources/README.md +23 -0
- package/skills/s-help/resources/commands.json +78 -0
- package/skills/s-help/resources/s-acm.md +26 -0
- package/skills/s-help/resources/s-bash-mode.md +23 -0
- package/skills/s-help/resources/s-bash-reset.md +23 -0
- package/skills/s-help/resources/s-context.md +25 -0
- package/skills/s-help/resources/s-filechanges-accept.md +25 -0
- package/skills/s-help/resources/s-filechanges-decline.md +30 -0
- package/skills/s-help/resources/s-filechanges.md +38 -0
- package/skills/s-help/resources/s-footer.md +38 -0
- package/skills/s-help/resources/s-promptlib.md +28 -0
- package/skills/s-help/resources/s-skills-manager.md +31 -0
- package/skills/s-help/resources/s-stash-history.md +26 -0
- package/skills/screenshot/SKILL.md +267 -0
- package/skills/screenshot/scripts/ensure_macos_permissions.sh +54 -0
- package/skills/screenshot/scripts/macos_display_info.swift +22 -0
- package/skills/screenshot/scripts/macos_permissions.swift +40 -0
- package/skills/screenshot/scripts/macos_window_info.swift +126 -0
- package/skills/screenshot/scripts/take_screenshot.ps1 +163 -0
- package/skills/screenshot/scripts/take_screenshot.py +585 -0
- package/slingshot/index.js +359 -313
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search.js +0 -42
- package/node_modules/@opentelemetry/api/LICENSE +0 -201
- package/node_modules/@opentelemetry/api/README.md +0 -116
- package/node_modules/@opentelemetry/api/build/esm/api/context.d.ts +0 -41
- package/node_modules/@opentelemetry/api/build/esm/api/context.js +0 -110
- package/node_modules/@opentelemetry/api/build/esm/api/context.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/api/diag.d.ts +0 -30
- package/node_modules/@opentelemetry/api/build/esm/api/diag.js +0 -121
- package/node_modules/@opentelemetry/api/build/esm/api/diag.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/api/metrics.d.ts +0 -28
- package/node_modules/@opentelemetry/api/build/esm/api/metrics.js +0 -60
- package/node_modules/@opentelemetry/api/build/esm/api/metrics.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/api/propagation.d.ts +0 -49
- package/node_modules/@opentelemetry/api/build/esm/api/propagation.js +0 -89
- package/node_modules/@opentelemetry/api/build/esm/api/propagation.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/api/trace.d.ts +0 -40
- package/node_modules/@opentelemetry/api/build/esm/api/trace.js +0 -77
- package/node_modules/@opentelemetry/api/build/esm/api/trace.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/baggage/context-helpers.d.ts +0 -29
- package/node_modules/@opentelemetry/api/build/esm/baggage/context-helpers.js +0 -56
- package/node_modules/@opentelemetry/api/build/esm/baggage/context-helpers.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/baggage/internal/baggage-impl.d.ts +0 -12
- package/node_modules/@opentelemetry/api/build/esm/baggage/internal/baggage-impl.js +0 -98
- package/node_modules/@opentelemetry/api/build/esm/baggage/internal/baggage-impl.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/baggage/internal/symbol.d.ts +0 -5
- package/node_modules/@opentelemetry/api/build/esm/baggage/internal/symbol.js +0 -20
- package/node_modules/@opentelemetry/api/build/esm/baggage/internal/symbol.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/baggage/types.d.ts +0 -60
- package/node_modules/@opentelemetry/api/build/esm/baggage/types.js +0 -17
- package/node_modules/@opentelemetry/api/build/esm/baggage/types.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/baggage/utils.d.ts +0 -15
- package/node_modules/@opentelemetry/api/build/esm/baggage/utils.js +0 -47
- package/node_modules/@opentelemetry/api/build/esm/baggage/utils.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/common/Attributes.d.ts +0 -15
- package/node_modules/@opentelemetry/api/build/esm/common/Attributes.js +0 -17
- package/node_modules/@opentelemetry/api/build/esm/common/Attributes.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/common/Exception.d.ts +0 -26
- package/node_modules/@opentelemetry/api/build/esm/common/Exception.js +0 -17
- package/node_modules/@opentelemetry/api/build/esm/common/Exception.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/common/Time.d.ts +0 -20
- package/node_modules/@opentelemetry/api/build/esm/common/Time.js +0 -2
- package/node_modules/@opentelemetry/api/build/esm/common/Time.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.d.ts +0 -9
- package/node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.js +0 -67
- package/node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/context/context.d.ts +0 -6
- package/node_modules/@opentelemetry/api/build/esm/context/context.js +0 -52
- package/node_modules/@opentelemetry/api/build/esm/context/context.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/context/types.d.ts +0 -52
- package/node_modules/@opentelemetry/api/build/esm/context/types.js +0 -17
- package/node_modules/@opentelemetry/api/build/esm/context/types.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/context-api.d.ts +0 -4
- package/node_modules/@opentelemetry/api/build/esm/context-api.js +0 -21
- package/node_modules/@opentelemetry/api/build/esm/context-api.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.d.ts +0 -20
- package/node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js +0 -102
- package/node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/diag/consoleLogger.d.ts +0 -38
- package/node_modules/@opentelemetry/api/build/esm/diag/consoleLogger.js +0 -59
- package/node_modules/@opentelemetry/api/build/esm/diag/consoleLogger.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.d.ts +0 -3
- package/node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js +0 -41
- package/node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/diag/internal/noopLogger.d.ts +0 -8
- package/node_modules/@opentelemetry/api/build/esm/diag/internal/noopLogger.js +0 -31
- package/node_modules/@opentelemetry/api/build/esm/diag/internal/noopLogger.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/diag/types.d.ts +0 -100
- package/node_modules/@opentelemetry/api/build/esm/diag/types.js +0 -41
- package/node_modules/@opentelemetry/api/build/esm/diag/types.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/diag-api.d.ts +0 -9
- package/node_modules/@opentelemetry/api/build/esm/diag-api.js +0 -26
- package/node_modules/@opentelemetry/api/build/esm/diag-api.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/experimental/index.d.ts +0 -3
- package/node_modules/@opentelemetry/api/build/esm/experimental/index.js +0 -17
- package/node_modules/@opentelemetry/api/build/esm/experimental/index.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/experimental/trace/SugaredOptions.d.ts +0 -13
- package/node_modules/@opentelemetry/api/build/esm/experimental/trace/SugaredOptions.js +0 -17
- package/node_modules/@opentelemetry/api/build/esm/experimental/trace/SugaredOptions.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/experimental/trace/SugaredTracer.d.ts +0 -64
- package/node_modules/@opentelemetry/api/build/esm/experimental/trace/SugaredTracer.js +0 -92
- package/node_modules/@opentelemetry/api/build/esm/experimental/trace/SugaredTracer.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/index.d.ts +0 -54
- package/node_modules/@opentelemetry/api/build/esm/index.js +0 -53
- package/node_modules/@opentelemetry/api/build/esm/index.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/internal/global-utils.d.ts +0 -18
- package/node_modules/@opentelemetry/api/build/esm/internal/global-utils.js +0 -59
- package/node_modules/@opentelemetry/api/build/esm/internal/global-utils.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/internal/semver.d.ts +0 -34
- package/node_modules/@opentelemetry/api/build/esm/internal/semver.js +0 -118
- package/node_modules/@opentelemetry/api/build/esm/internal/semver.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/metrics/Meter.d.ts +0 -110
- package/node_modules/@opentelemetry/api/build/esm/metrics/Meter.js +0 -17
- package/node_modules/@opentelemetry/api/build/esm/metrics/Meter.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/metrics/MeterProvider.d.ts +0 -17
- package/node_modules/@opentelemetry/api/build/esm/metrics/MeterProvider.js +0 -17
- package/node_modules/@opentelemetry/api/build/esm/metrics/MeterProvider.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/metrics/Metric.d.ts +0 -115
- package/node_modules/@opentelemetry/api/build/esm/metrics/Metric.js +0 -22
- package/node_modules/@opentelemetry/api/build/esm/metrics/Metric.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/metrics/NoopMeter.d.ts +0 -82
- package/node_modules/@opentelemetry/api/build/esm/metrics/NoopMeter.js +0 -181
- package/node_modules/@opentelemetry/api/build/esm/metrics/NoopMeter.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/metrics/NoopMeterProvider.d.ts +0 -11
- package/node_modules/@opentelemetry/api/build/esm/metrics/NoopMeterProvider.js +0 -31
- package/node_modules/@opentelemetry/api/build/esm/metrics/NoopMeterProvider.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/metrics/ObservableResult.d.ts +0 -31
- package/node_modules/@opentelemetry/api/build/esm/metrics/ObservableResult.js +0 -17
- package/node_modules/@opentelemetry/api/build/esm/metrics/ObservableResult.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/metrics-api.d.ts +0 -4
- package/node_modules/@opentelemetry/api/build/esm/metrics-api.js +0 -21
- package/node_modules/@opentelemetry/api/build/esm/metrics-api.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/platform/browser/globalThis.d.ts +0 -10
- package/node_modules/@opentelemetry/api/build/esm/platform/browser/globalThis.js +0 -35
- package/node_modules/@opentelemetry/api/build/esm/platform/browser/globalThis.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/platform/browser/index.d.ts +0 -2
- package/node_modules/@opentelemetry/api/build/esm/platform/browser/index.js +0 -17
- package/node_modules/@opentelemetry/api/build/esm/platform/browser/index.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/platform/index.d.ts +0 -2
- package/node_modules/@opentelemetry/api/build/esm/platform/index.js +0 -17
- package/node_modules/@opentelemetry/api/build/esm/platform/index.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/platform/node/globalThis.d.ts +0 -3
- package/node_modules/@opentelemetry/api/build/esm/platform/node/globalThis.js +0 -19
- package/node_modules/@opentelemetry/api/build/esm/platform/node/globalThis.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/platform/node/index.d.ts +0 -2
- package/node_modules/@opentelemetry/api/build/esm/platform/node/index.js +0 -17
- package/node_modules/@opentelemetry/api/build/esm/platform/node/index.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/propagation/NoopTextMapPropagator.d.ts +0 -13
- package/node_modules/@opentelemetry/api/build/esm/propagation/NoopTextMapPropagator.js +0 -34
- package/node_modules/@opentelemetry/api/build/esm/propagation/NoopTextMapPropagator.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/propagation/TextMapPropagator.d.ts +0 -84
- package/node_modules/@opentelemetry/api/build/esm/propagation/TextMapPropagator.js +0 -38
- package/node_modules/@opentelemetry/api/build/esm/propagation/TextMapPropagator.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/propagation-api.d.ts +0 -4
- package/node_modules/@opentelemetry/api/build/esm/propagation-api.js +0 -21
- package/node_modules/@opentelemetry/api/build/esm/propagation-api.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/NonRecordingSpan.d.ts +0 -28
- package/node_modules/@opentelemetry/api/build/esm/trace/NonRecordingSpan.js +0 -68
- package/node_modules/@opentelemetry/api/build/esm/trace/NonRecordingSpan.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/NoopTracer.d.ts +0 -14
- package/node_modules/@opentelemetry/api/build/esm/trace/NoopTracer.js +0 -76
- package/node_modules/@opentelemetry/api/build/esm/trace/NoopTracer.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/NoopTracerProvider.d.ts +0 -13
- package/node_modules/@opentelemetry/api/build/esm/trace/NoopTracerProvider.js +0 -32
- package/node_modules/@opentelemetry/api/build/esm/trace/NoopTracerProvider.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracer.d.ts +0 -27
- package/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracer.js +0 -53
- package/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracer.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracerProvider.d.ts +0 -25
- package/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracerProvider.js +0 -54
- package/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracerProvider.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/Sampler.d.ts +0 -31
- package/node_modules/@opentelemetry/api/build/esm/trace/Sampler.js +0 -17
- package/node_modules/@opentelemetry/api/build/esm/trace/Sampler.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/SamplingResult.d.ts +0 -49
- package/node_modules/@opentelemetry/api/build/esm/trace/SamplingResult.js +0 -39
- package/node_modules/@opentelemetry/api/build/esm/trace/SamplingResult.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/SpanOptions.d.ts +0 -23
- package/node_modules/@opentelemetry/api/build/esm/trace/SpanOptions.js +0 -17
- package/node_modules/@opentelemetry/api/build/esm/trace/SpanOptions.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/attributes.d.ts +0 -10
- package/node_modules/@opentelemetry/api/build/esm/trace/attributes.js +0 -17
- package/node_modules/@opentelemetry/api/build/esm/trace/attributes.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/context-utils.d.ts +0 -41
- package/node_modules/@opentelemetry/api/build/esm/trace/context-utils.js +0 -73
- package/node_modules/@opentelemetry/api/build/esm/trace/context-utils.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-impl.d.ts +0 -22
- package/node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-impl.js +0 -102
- package/node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-impl.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-validators.d.ts +0 -15
- package/node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-validators.js +0 -41
- package/node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-validators.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/internal/utils.d.ts +0 -3
- package/node_modules/@opentelemetry/api/build/esm/trace/internal/utils.js +0 -20
- package/node_modules/@opentelemetry/api/build/esm/trace/internal/utils.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/invalid-span-constants.d.ts +0 -5
- package/node_modules/@opentelemetry/api/build/esm/trace/invalid-span-constants.js +0 -24
- package/node_modules/@opentelemetry/api/build/esm/trace/invalid-span-constants.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/link.d.ts +0 -26
- package/node_modules/@opentelemetry/api/build/esm/trace/link.js +0 -17
- package/node_modules/@opentelemetry/api/build/esm/trace/link.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/span.d.ts +0 -120
- package/node_modules/@opentelemetry/api/build/esm/trace/span.js +0 -17
- package/node_modules/@opentelemetry/api/build/esm/trace/span.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/span_context.d.ts +0 -53
- package/node_modules/@opentelemetry/api/build/esm/trace/span_context.js +0 -17
- package/node_modules/@opentelemetry/api/build/esm/trace/span_context.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/span_kind.d.ts +0 -27
- package/node_modules/@opentelemetry/api/build/esm/trace/span_kind.js +0 -43
- package/node_modules/@opentelemetry/api/build/esm/trace/span_kind.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/spancontext-utils.d.ts +0 -17
- package/node_modules/@opentelemetry/api/build/esm/trace/spancontext-utils.js +0 -42
- package/node_modules/@opentelemetry/api/build/esm/trace/spancontext-utils.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/status.d.ts +0 -25
- package/node_modules/@opentelemetry/api/build/esm/trace/status.js +0 -20
- package/node_modules/@opentelemetry/api/build/esm/trace/status.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/trace_flags.d.ts +0 -7
- package/node_modules/@opentelemetry/api/build/esm/trace/trace_flags.js +0 -23
- package/node_modules/@opentelemetry/api/build/esm/trace/trace_flags.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/trace_state.d.ts +0 -38
- package/node_modules/@opentelemetry/api/build/esm/trace/trace_state.js +0 -17
- package/node_modules/@opentelemetry/api/build/esm/trace/trace_state.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/tracer.d.ts +0 -71
- package/node_modules/@opentelemetry/api/build/esm/trace/tracer.js +0 -17
- package/node_modules/@opentelemetry/api/build/esm/trace/tracer.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/tracer_options.d.ts +0 -10
- package/node_modules/@opentelemetry/api/build/esm/trace/tracer_options.js +0 -17
- package/node_modules/@opentelemetry/api/build/esm/trace/tracer_options.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace/tracer_provider.d.ts +0 -21
- package/node_modules/@opentelemetry/api/build/esm/trace/tracer_provider.js +0 -17
- package/node_modules/@opentelemetry/api/build/esm/trace/tracer_provider.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/trace-api.d.ts +0 -4
- package/node_modules/@opentelemetry/api/build/esm/trace-api.js +0 -21
- package/node_modules/@opentelemetry/api/build/esm/trace-api.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esm/version.d.ts +0 -2
- package/node_modules/@opentelemetry/api/build/esm/version.js +0 -18
- package/node_modules/@opentelemetry/api/build/esm/version.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/api/context.d.ts +0 -41
- package/node_modules/@opentelemetry/api/build/esnext/api/context.js +0 -77
- package/node_modules/@opentelemetry/api/build/esnext/api/context.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/api/diag.d.ts +0 -30
- package/node_modules/@opentelemetry/api/build/esnext/api/diag.js +0 -89
- package/node_modules/@opentelemetry/api/build/esnext/api/diag.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/api/metrics.d.ts +0 -28
- package/node_modules/@opentelemetry/api/build/esnext/api/metrics.js +0 -57
- package/node_modules/@opentelemetry/api/build/esnext/api/metrics.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/api/propagation.d.ts +0 -49
- package/node_modules/@opentelemetry/api/build/esnext/api/propagation.js +0 -85
- package/node_modules/@opentelemetry/api/build/esnext/api/propagation.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/api/trace.d.ts +0 -40
- package/node_modules/@opentelemetry/api/build/esnext/api/trace.js +0 -75
- package/node_modules/@opentelemetry/api/build/esnext/api/trace.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/baggage/context-helpers.d.ts +0 -29
- package/node_modules/@opentelemetry/api/build/esnext/baggage/context-helpers.js +0 -56
- package/node_modules/@opentelemetry/api/build/esnext/baggage/context-helpers.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/baggage/internal/baggage-impl.d.ts +0 -12
- package/node_modules/@opentelemetry/api/build/esnext/baggage/internal/baggage-impl.js +0 -51
- package/node_modules/@opentelemetry/api/build/esnext/baggage/internal/baggage-impl.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/baggage/internal/symbol.d.ts +0 -5
- package/node_modules/@opentelemetry/api/build/esnext/baggage/internal/symbol.js +0 -20
- package/node_modules/@opentelemetry/api/build/esnext/baggage/internal/symbol.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/baggage/types.d.ts +0 -60
- package/node_modules/@opentelemetry/api/build/esnext/baggage/types.js +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/baggage/types.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/baggage/utils.d.ts +0 -15
- package/node_modules/@opentelemetry/api/build/esnext/baggage/utils.js +0 -46
- package/node_modules/@opentelemetry/api/build/esnext/baggage/utils.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/common/Attributes.d.ts +0 -15
- package/node_modules/@opentelemetry/api/build/esnext/common/Attributes.js +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/common/Attributes.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/common/Exception.d.ts +0 -26
- package/node_modules/@opentelemetry/api/build/esnext/common/Exception.js +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/common/Exception.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/common/Time.d.ts +0 -20
- package/node_modules/@opentelemetry/api/build/esnext/common/Time.js +0 -2
- package/node_modules/@opentelemetry/api/build/esnext/common/Time.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/context/NoopContextManager.d.ts +0 -9
- package/node_modules/@opentelemetry/api/build/esnext/context/NoopContextManager.js +0 -34
- package/node_modules/@opentelemetry/api/build/esnext/context/NoopContextManager.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/context/context.d.ts +0 -6
- package/node_modules/@opentelemetry/api/build/esnext/context/context.js +0 -51
- package/node_modules/@opentelemetry/api/build/esnext/context/context.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/context/types.d.ts +0 -52
- package/node_modules/@opentelemetry/api/build/esnext/context/types.js +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/context/types.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/context-api.d.ts +0 -4
- package/node_modules/@opentelemetry/api/build/esnext/context-api.js +0 -21
- package/node_modules/@opentelemetry/api/build/esnext/context-api.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/diag/ComponentLogger.d.ts +0 -20
- package/node_modules/@opentelemetry/api/build/esnext/diag/ComponentLogger.js +0 -55
- package/node_modules/@opentelemetry/api/build/esnext/diag/ComponentLogger.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/diag/consoleLogger.d.ts +0 -38
- package/node_modules/@opentelemetry/api/build/esnext/diag/consoleLogger.js +0 -53
- package/node_modules/@opentelemetry/api/build/esnext/diag/consoleLogger.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/diag/internal/logLevelLogger.d.ts +0 -3
- package/node_modules/@opentelemetry/api/build/esnext/diag/internal/logLevelLogger.js +0 -41
- package/node_modules/@opentelemetry/api/build/esnext/diag/internal/logLevelLogger.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/diag/internal/noopLogger.d.ts +0 -8
- package/node_modules/@opentelemetry/api/build/esnext/diag/internal/noopLogger.js +0 -31
- package/node_modules/@opentelemetry/api/build/esnext/diag/internal/noopLogger.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/diag/types.d.ts +0 -100
- package/node_modules/@opentelemetry/api/build/esnext/diag/types.js +0 -41
- package/node_modules/@opentelemetry/api/build/esnext/diag/types.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/diag-api.d.ts +0 -9
- package/node_modules/@opentelemetry/api/build/esnext/diag-api.js +0 -26
- package/node_modules/@opentelemetry/api/build/esnext/diag-api.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/experimental/index.d.ts +0 -3
- package/node_modules/@opentelemetry/api/build/esnext/experimental/index.js +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/experimental/index.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/experimental/trace/SugaredOptions.d.ts +0 -13
- package/node_modules/@opentelemetry/api/build/esnext/experimental/trace/SugaredOptions.js +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/experimental/trace/SugaredOptions.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/experimental/trace/SugaredTracer.d.ts +0 -64
- package/node_modules/@opentelemetry/api/build/esnext/experimental/trace/SugaredTracer.js +0 -88
- package/node_modules/@opentelemetry/api/build/esnext/experimental/trace/SugaredTracer.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/index.d.ts +0 -54
- package/node_modules/@opentelemetry/api/build/esnext/index.js +0 -53
- package/node_modules/@opentelemetry/api/build/esnext/index.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/internal/global-utils.d.ts +0 -18
- package/node_modules/@opentelemetry/api/build/esnext/internal/global-utils.js +0 -58
- package/node_modules/@opentelemetry/api/build/esnext/internal/global-utils.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/internal/semver.d.ts +0 -34
- package/node_modules/@opentelemetry/api/build/esnext/internal/semver.js +0 -118
- package/node_modules/@opentelemetry/api/build/esnext/internal/semver.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/metrics/Meter.d.ts +0 -110
- package/node_modules/@opentelemetry/api/build/esnext/metrics/Meter.js +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/metrics/Meter.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/metrics/MeterProvider.d.ts +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/metrics/MeterProvider.js +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/metrics/MeterProvider.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/metrics/Metric.d.ts +0 -115
- package/node_modules/@opentelemetry/api/build/esnext/metrics/Metric.js +0 -22
- package/node_modules/@opentelemetry/api/build/esnext/metrics/Metric.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/metrics/NoopMeter.d.ts +0 -82
- package/node_modules/@opentelemetry/api/build/esnext/metrics/NoopMeter.js +0 -113
- package/node_modules/@opentelemetry/api/build/esnext/metrics/NoopMeter.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/metrics/NoopMeterProvider.d.ts +0 -11
- package/node_modules/@opentelemetry/api/build/esnext/metrics/NoopMeterProvider.js +0 -27
- package/node_modules/@opentelemetry/api/build/esnext/metrics/NoopMeterProvider.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/metrics/ObservableResult.d.ts +0 -31
- package/node_modules/@opentelemetry/api/build/esnext/metrics/ObservableResult.js +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/metrics/ObservableResult.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/metrics-api.d.ts +0 -4
- package/node_modules/@opentelemetry/api/build/esnext/metrics-api.js +0 -21
- package/node_modules/@opentelemetry/api/build/esnext/metrics-api.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/platform/browser/globalThis.d.ts +0 -10
- package/node_modules/@opentelemetry/api/build/esnext/platform/browser/globalThis.js +0 -35
- package/node_modules/@opentelemetry/api/build/esnext/platform/browser/globalThis.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/platform/browser/index.d.ts +0 -2
- package/node_modules/@opentelemetry/api/build/esnext/platform/browser/index.js +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/platform/browser/index.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/platform/index.d.ts +0 -2
- package/node_modules/@opentelemetry/api/build/esnext/platform/index.js +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/platform/index.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/platform/node/globalThis.d.ts +0 -3
- package/node_modules/@opentelemetry/api/build/esnext/platform/node/globalThis.js +0 -19
- package/node_modules/@opentelemetry/api/build/esnext/platform/node/globalThis.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/platform/node/index.d.ts +0 -2
- package/node_modules/@opentelemetry/api/build/esnext/platform/node/index.js +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/platform/node/index.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/propagation/NoopTextMapPropagator.d.ts +0 -13
- package/node_modules/@opentelemetry/api/build/esnext/propagation/NoopTextMapPropagator.js +0 -30
- package/node_modules/@opentelemetry/api/build/esnext/propagation/NoopTextMapPropagator.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/propagation/TextMapPropagator.d.ts +0 -84
- package/node_modules/@opentelemetry/api/build/esnext/propagation/TextMapPropagator.js +0 -38
- package/node_modules/@opentelemetry/api/build/esnext/propagation/TextMapPropagator.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/propagation-api.d.ts +0 -4
- package/node_modules/@opentelemetry/api/build/esnext/propagation-api.js +0 -21
- package/node_modules/@opentelemetry/api/build/esnext/propagation-api.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/NonRecordingSpan.d.ts +0 -28
- package/node_modules/@opentelemetry/api/build/esnext/trace/NonRecordingSpan.js +0 -65
- package/node_modules/@opentelemetry/api/build/esnext/trace/NonRecordingSpan.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/NoopTracer.d.ts +0 -14
- package/node_modules/@opentelemetry/api/build/esnext/trace/NoopTracer.js +0 -71
- package/node_modules/@opentelemetry/api/build/esnext/trace/NoopTracer.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/NoopTracerProvider.d.ts +0 -13
- package/node_modules/@opentelemetry/api/build/esnext/trace/NoopTracerProvider.js +0 -28
- package/node_modules/@opentelemetry/api/build/esnext/trace/NoopTracerProvider.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/ProxyTracer.d.ts +0 -27
- package/node_modules/@opentelemetry/api/build/esnext/trace/ProxyTracer.js +0 -51
- package/node_modules/@opentelemetry/api/build/esnext/trace/ProxyTracer.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/ProxyTracerProvider.d.ts +0 -25
- package/node_modules/@opentelemetry/api/build/esnext/trace/ProxyTracerProvider.js +0 -50
- package/node_modules/@opentelemetry/api/build/esnext/trace/ProxyTracerProvider.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/Sampler.d.ts +0 -31
- package/node_modules/@opentelemetry/api/build/esnext/trace/Sampler.js +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/trace/Sampler.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/SamplingResult.d.ts +0 -49
- package/node_modules/@opentelemetry/api/build/esnext/trace/SamplingResult.js +0 -39
- package/node_modules/@opentelemetry/api/build/esnext/trace/SamplingResult.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/SpanOptions.d.ts +0 -23
- package/node_modules/@opentelemetry/api/build/esnext/trace/SpanOptions.js +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/trace/SpanOptions.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/attributes.d.ts +0 -10
- package/node_modules/@opentelemetry/api/build/esnext/trace/attributes.js +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/trace/attributes.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/context-utils.d.ts +0 -41
- package/node_modules/@opentelemetry/api/build/esnext/trace/context-utils.js +0 -73
- package/node_modules/@opentelemetry/api/build/esnext/trace/context-utils.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/internal/tracestate-impl.d.ts +0 -22
- package/node_modules/@opentelemetry/api/build/esnext/trace/internal/tracestate-impl.js +0 -99
- package/node_modules/@opentelemetry/api/build/esnext/trace/internal/tracestate-impl.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/internal/tracestate-validators.d.ts +0 -15
- package/node_modules/@opentelemetry/api/build/esnext/trace/internal/tracestate-validators.js +0 -41
- package/node_modules/@opentelemetry/api/build/esnext/trace/internal/tracestate-validators.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/internal/utils.d.ts +0 -3
- package/node_modules/@opentelemetry/api/build/esnext/trace/internal/utils.js +0 -20
- package/node_modules/@opentelemetry/api/build/esnext/trace/internal/utils.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/invalid-span-constants.d.ts +0 -5
- package/node_modules/@opentelemetry/api/build/esnext/trace/invalid-span-constants.js +0 -24
- package/node_modules/@opentelemetry/api/build/esnext/trace/invalid-span-constants.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/link.d.ts +0 -26
- package/node_modules/@opentelemetry/api/build/esnext/trace/link.js +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/trace/link.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/span.d.ts +0 -120
- package/node_modules/@opentelemetry/api/build/esnext/trace/span.js +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/trace/span.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/span_context.d.ts +0 -53
- package/node_modules/@opentelemetry/api/build/esnext/trace/span_context.js +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/trace/span_context.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/span_kind.d.ts +0 -27
- package/node_modules/@opentelemetry/api/build/esnext/trace/span_kind.js +0 -43
- package/node_modules/@opentelemetry/api/build/esnext/trace/span_kind.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/spancontext-utils.d.ts +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/trace/spancontext-utils.js +0 -42
- package/node_modules/@opentelemetry/api/build/esnext/trace/spancontext-utils.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/status.d.ts +0 -25
- package/node_modules/@opentelemetry/api/build/esnext/trace/status.js +0 -20
- package/node_modules/@opentelemetry/api/build/esnext/trace/status.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/trace_flags.d.ts +0 -7
- package/node_modules/@opentelemetry/api/build/esnext/trace/trace_flags.js +0 -23
- package/node_modules/@opentelemetry/api/build/esnext/trace/trace_flags.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/trace_state.d.ts +0 -38
- package/node_modules/@opentelemetry/api/build/esnext/trace/trace_state.js +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/trace/trace_state.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/tracer.d.ts +0 -71
- package/node_modules/@opentelemetry/api/build/esnext/trace/tracer.js +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/trace/tracer.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/tracer_options.d.ts +0 -10
- package/node_modules/@opentelemetry/api/build/esnext/trace/tracer_options.js +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/trace/tracer_options.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace/tracer_provider.d.ts +0 -21
- package/node_modules/@opentelemetry/api/build/esnext/trace/tracer_provider.js +0 -17
- package/node_modules/@opentelemetry/api/build/esnext/trace/tracer_provider.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/trace-api.d.ts +0 -4
- package/node_modules/@opentelemetry/api/build/esnext/trace-api.js +0 -21
- package/node_modules/@opentelemetry/api/build/esnext/trace-api.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/esnext/version.d.ts +0 -2
- package/node_modules/@opentelemetry/api/build/esnext/version.js +0 -18
- package/node_modules/@opentelemetry/api/build/esnext/version.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/api/context.d.ts +0 -41
- package/node_modules/@opentelemetry/api/build/src/api/context.js +0 -81
- package/node_modules/@opentelemetry/api/build/src/api/context.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/api/diag.d.ts +0 -30
- package/node_modules/@opentelemetry/api/build/src/api/diag.js +0 -93
- package/node_modules/@opentelemetry/api/build/src/api/diag.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/api/metrics.d.ts +0 -28
- package/node_modules/@opentelemetry/api/build/src/api/metrics.js +0 -61
- package/node_modules/@opentelemetry/api/build/src/api/metrics.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/api/propagation.d.ts +0 -49
- package/node_modules/@opentelemetry/api/build/src/api/propagation.js +0 -89
- package/node_modules/@opentelemetry/api/build/src/api/propagation.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/api/trace.d.ts +0 -40
- package/node_modules/@opentelemetry/api/build/src/api/trace.js +0 -79
- package/node_modules/@opentelemetry/api/build/src/api/trace.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/baggage/context-helpers.d.ts +0 -29
- package/node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js +0 -63
- package/node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.d.ts +0 -12
- package/node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js +0 -55
- package/node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.d.ts +0 -5
- package/node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js +0 -23
- package/node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/baggage/types.d.ts +0 -60
- package/node_modules/@opentelemetry/api/build/src/baggage/types.js +0 -18
- package/node_modules/@opentelemetry/api/build/src/baggage/types.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/baggage/utils.d.ts +0 -15
- package/node_modules/@opentelemetry/api/build/src/baggage/utils.js +0 -51
- package/node_modules/@opentelemetry/api/build/src/baggage/utils.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/common/Attributes.d.ts +0 -15
- package/node_modules/@opentelemetry/api/build/src/common/Attributes.js +0 -18
- package/node_modules/@opentelemetry/api/build/src/common/Attributes.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/common/Exception.d.ts +0 -26
- package/node_modules/@opentelemetry/api/build/src/common/Exception.js +0 -18
- package/node_modules/@opentelemetry/api/build/src/common/Exception.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/common/Time.d.ts +0 -20
- package/node_modules/@opentelemetry/api/build/src/common/Time.js +0 -3
- package/node_modules/@opentelemetry/api/build/src/common/Time.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/context/NoopContextManager.d.ts +0 -9
- package/node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js +0 -38
- package/node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/context/context.d.ts +0 -6
- package/node_modules/@opentelemetry/api/build/src/context/context.js +0 -55
- package/node_modules/@opentelemetry/api/build/src/context/context.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/context/types.d.ts +0 -52
- package/node_modules/@opentelemetry/api/build/src/context/types.js +0 -18
- package/node_modules/@opentelemetry/api/build/src/context/types.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/context-api.d.ts +0 -4
- package/node_modules/@opentelemetry/api/build/src/context-api.js +0 -24
- package/node_modules/@opentelemetry/api/build/src/context-api.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.d.ts +0 -20
- package/node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js +0 -59
- package/node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/diag/consoleLogger.d.ts +0 -38
- package/node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js +0 -57
- package/node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.d.ts +0 -3
- package/node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js +0 -45
- package/node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/diag/internal/noopLogger.d.ts +0 -8
- package/node_modules/@opentelemetry/api/build/src/diag/internal/noopLogger.js +0 -35
- package/node_modules/@opentelemetry/api/build/src/diag/internal/noopLogger.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/diag/types.d.ts +0 -100
- package/node_modules/@opentelemetry/api/build/src/diag/types.js +0 -44
- package/node_modules/@opentelemetry/api/build/src/diag/types.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/diag-api.d.ts +0 -9
- package/node_modules/@opentelemetry/api/build/src/diag-api.js +0 -29
- package/node_modules/@opentelemetry/api/build/src/diag-api.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/experimental/index.d.ts +0 -3
- package/node_modules/@opentelemetry/api/build/src/experimental/index.js +0 -22
- package/node_modules/@opentelemetry/api/build/src/experimental/index.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/experimental/trace/SugaredOptions.d.ts +0 -13
- package/node_modules/@opentelemetry/api/build/src/experimental/trace/SugaredOptions.js +0 -18
- package/node_modules/@opentelemetry/api/build/src/experimental/trace/SugaredOptions.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/experimental/trace/SugaredTracer.d.ts +0 -64
- package/node_modules/@opentelemetry/api/build/src/experimental/trace/SugaredTracer.js +0 -93
- package/node_modules/@opentelemetry/api/build/src/experimental/trace/SugaredTracer.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/index.d.ts +0 -54
- package/node_modules/@opentelemetry/api/build/src/index.js +0 -81
- package/node_modules/@opentelemetry/api/build/src/index.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/internal/global-utils.d.ts +0 -18
- package/node_modules/@opentelemetry/api/build/src/internal/global-utils.js +0 -64
- package/node_modules/@opentelemetry/api/build/src/internal/global-utils.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/internal/semver.d.ts +0 -34
- package/node_modules/@opentelemetry/api/build/src/internal/semver.js +0 -122
- package/node_modules/@opentelemetry/api/build/src/internal/semver.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/metrics/Meter.d.ts +0 -110
- package/node_modules/@opentelemetry/api/build/src/metrics/Meter.js +0 -18
- package/node_modules/@opentelemetry/api/build/src/metrics/Meter.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/metrics/MeterProvider.d.ts +0 -17
- package/node_modules/@opentelemetry/api/build/src/metrics/MeterProvider.js +0 -18
- package/node_modules/@opentelemetry/api/build/src/metrics/MeterProvider.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/metrics/Metric.d.ts +0 -115
- package/node_modules/@opentelemetry/api/build/src/metrics/Metric.js +0 -25
- package/node_modules/@opentelemetry/api/build/src/metrics/Metric.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.d.ts +0 -82
- package/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js +0 -127
- package/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.d.ts +0 -11
- package/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js +0 -31
- package/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/metrics/ObservableResult.d.ts +0 -31
- package/node_modules/@opentelemetry/api/build/src/metrics/ObservableResult.js +0 -18
- package/node_modules/@opentelemetry/api/build/src/metrics/ObservableResult.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/metrics-api.d.ts +0 -4
- package/node_modules/@opentelemetry/api/build/src/metrics-api.js +0 -24
- package/node_modules/@opentelemetry/api/build/src/metrics-api.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/platform/browser/globalThis.d.ts +0 -10
- package/node_modules/@opentelemetry/api/build/src/platform/browser/globalThis.js +0 -38
- package/node_modules/@opentelemetry/api/build/src/platform/browser/globalThis.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/platform/browser/index.d.ts +0 -2
- package/node_modules/@opentelemetry/api/build/src/platform/browser/index.js +0 -29
- package/node_modules/@opentelemetry/api/build/src/platform/browser/index.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/platform/index.d.ts +0 -2
- package/node_modules/@opentelemetry/api/build/src/platform/index.js +0 -29
- package/node_modules/@opentelemetry/api/build/src/platform/index.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/platform/node/globalThis.d.ts +0 -3
- package/node_modules/@opentelemetry/api/build/src/platform/node/globalThis.js +0 -22
- package/node_modules/@opentelemetry/api/build/src/platform/node/globalThis.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/platform/node/index.d.ts +0 -2
- package/node_modules/@opentelemetry/api/build/src/platform/node/index.js +0 -29
- package/node_modules/@opentelemetry/api/build/src/platform/node/index.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.d.ts +0 -13
- package/node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js +0 -34
- package/node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.d.ts +0 -84
- package/node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js +0 -41
- package/node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/propagation-api.d.ts +0 -4
- package/node_modules/@opentelemetry/api/build/src/propagation-api.js +0 -24
- package/node_modules/@opentelemetry/api/build/src/propagation-api.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.d.ts +0 -28
- package/node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js +0 -69
- package/node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.d.ts +0 -14
- package/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js +0 -75
- package/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.d.ts +0 -13
- package/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js +0 -32
- package/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.d.ts +0 -27
- package/node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js +0 -55
- package/node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.d.ts +0 -25
- package/node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js +0 -54
- package/node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/Sampler.d.ts +0 -31
- package/node_modules/@opentelemetry/api/build/src/trace/Sampler.js +0 -18
- package/node_modules/@opentelemetry/api/build/src/trace/Sampler.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/SamplingResult.d.ts +0 -49
- package/node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js +0 -42
- package/node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/SpanOptions.d.ts +0 -23
- package/node_modules/@opentelemetry/api/build/src/trace/SpanOptions.js +0 -18
- package/node_modules/@opentelemetry/api/build/src/trace/SpanOptions.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/attributes.d.ts +0 -10
- package/node_modules/@opentelemetry/api/build/src/trace/attributes.js +0 -18
- package/node_modules/@opentelemetry/api/build/src/trace/attributes.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/context-utils.d.ts +0 -41
- package/node_modules/@opentelemetry/api/build/src/trace/context-utils.js +0 -82
- package/node_modules/@opentelemetry/api/build/src/trace/context-utils.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.d.ts +0 -22
- package/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js +0 -103
- package/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.d.ts +0 -15
- package/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js +0 -46
- package/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/internal/utils.d.ts +0 -3
- package/node_modules/@opentelemetry/api/build/src/trace/internal/utils.js +0 -24
- package/node_modules/@opentelemetry/api/build/src/trace/internal/utils.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.d.ts +0 -5
- package/node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js +0 -27
- package/node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/link.d.ts +0 -26
- package/node_modules/@opentelemetry/api/build/src/trace/link.js +0 -18
- package/node_modules/@opentelemetry/api/build/src/trace/link.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/span.d.ts +0 -120
- package/node_modules/@opentelemetry/api/build/src/trace/span.js +0 -18
- package/node_modules/@opentelemetry/api/build/src/trace/span.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/span_context.d.ts +0 -53
- package/node_modules/@opentelemetry/api/build/src/trace/span_context.js +0 -18
- package/node_modules/@opentelemetry/api/build/src/trace/span_context.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/span_kind.d.ts +0 -27
- package/node_modules/@opentelemetry/api/build/src/trace/span_kind.js +0 -46
- package/node_modules/@opentelemetry/api/build/src/trace/span_kind.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.d.ts +0 -17
- package/node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js +0 -49
- package/node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/status.d.ts +0 -25
- package/node_modules/@opentelemetry/api/build/src/trace/status.js +0 -23
- package/node_modules/@opentelemetry/api/build/src/trace/status.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/trace_flags.d.ts +0 -7
- package/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js +0 -26
- package/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/trace_state.d.ts +0 -38
- package/node_modules/@opentelemetry/api/build/src/trace/trace_state.js +0 -18
- package/node_modules/@opentelemetry/api/build/src/trace/trace_state.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/tracer.d.ts +0 -71
- package/node_modules/@opentelemetry/api/build/src/trace/tracer.js +0 -18
- package/node_modules/@opentelemetry/api/build/src/trace/tracer.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/tracer_options.d.ts +0 -10
- package/node_modules/@opentelemetry/api/build/src/trace/tracer_options.js +0 -18
- package/node_modules/@opentelemetry/api/build/src/trace/tracer_options.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.d.ts +0 -21
- package/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.js +0 -18
- package/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/trace-api.d.ts +0 -4
- package/node_modules/@opentelemetry/api/build/src/trace-api.js +0 -24
- package/node_modules/@opentelemetry/api/build/src/trace-api.js.map +0 -1
- package/node_modules/@opentelemetry/api/build/src/version.d.ts +0 -2
- package/node_modules/@opentelemetry/api/build/src/version.js +0 -21
- package/node_modules/@opentelemetry/api/build/src/version.js.map +0 -1
- package/node_modules/@opentelemetry/api/package.json +0 -113
- package/node_modules/express-rate-limit/license.md +0 -20
- package/node_modules/glob/LICENSE.md +0 -63
- package/node_modules/glob/README.md +0 -1203
- package/node_modules/glob/dist/commonjs/glob.d.ts +0 -396
- package/node_modules/glob/dist/commonjs/glob.d.ts.map +0 -1
- package/node_modules/glob/dist/commonjs/glob.js +0 -248
- package/node_modules/glob/dist/commonjs/glob.js.map +0 -1
- package/node_modules/glob/dist/commonjs/has-magic.d.ts +0 -14
- package/node_modules/glob/dist/commonjs/has-magic.d.ts.map +0 -1
- package/node_modules/glob/dist/commonjs/has-magic.js +0 -27
- package/node_modules/glob/dist/commonjs/has-magic.js.map +0 -1
- package/node_modules/glob/dist/commonjs/ignore.d.ts +0 -24
- package/node_modules/glob/dist/commonjs/ignore.d.ts.map +0 -1
- package/node_modules/glob/dist/commonjs/ignore.js +0 -119
- package/node_modules/glob/dist/commonjs/ignore.js.map +0 -1
- package/node_modules/glob/dist/commonjs/index.d.ts +0 -97
- package/node_modules/glob/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/glob/dist/commonjs/index.js +0 -68
- package/node_modules/glob/dist/commonjs/index.js.map +0 -1
- package/node_modules/glob/dist/commonjs/index.min.js +0 -4
- package/node_modules/glob/dist/commonjs/index.min.js.map +0 -7
- package/node_modules/glob/dist/commonjs/package.json +0 -3
- package/node_modules/glob/dist/commonjs/pattern.d.ts +0 -79
- package/node_modules/glob/dist/commonjs/pattern.d.ts.map +0 -1
- package/node_modules/glob/dist/commonjs/pattern.js +0 -223
- package/node_modules/glob/dist/commonjs/pattern.js.map +0 -1
- package/node_modules/glob/dist/commonjs/processor.d.ts +0 -59
- package/node_modules/glob/dist/commonjs/processor.d.ts.map +0 -1
- package/node_modules/glob/dist/commonjs/processor.js +0 -301
- package/node_modules/glob/dist/commonjs/processor.js.map +0 -1
- package/node_modules/glob/dist/commonjs/walker.d.ts +0 -97
- package/node_modules/glob/dist/commonjs/walker.d.ts.map +0 -1
- package/node_modules/glob/dist/commonjs/walker.js +0 -387
- package/node_modules/glob/dist/commonjs/walker.js.map +0 -1
- package/node_modules/glob/dist/esm/glob.d.ts +0 -396
- package/node_modules/glob/dist/esm/glob.d.ts.map +0 -1
- package/node_modules/glob/dist/esm/glob.js +0 -244
- package/node_modules/glob/dist/esm/glob.js.map +0 -1
- package/node_modules/glob/dist/esm/has-magic.d.ts +0 -14
- package/node_modules/glob/dist/esm/has-magic.d.ts.map +0 -1
- package/node_modules/glob/dist/esm/has-magic.js +0 -23
- package/node_modules/glob/dist/esm/has-magic.js.map +0 -1
- package/node_modules/glob/dist/esm/ignore.d.ts +0 -24
- package/node_modules/glob/dist/esm/ignore.d.ts.map +0 -1
- package/node_modules/glob/dist/esm/ignore.js +0 -115
- package/node_modules/glob/dist/esm/ignore.js.map +0 -1
- package/node_modules/glob/dist/esm/index.d.ts +0 -97
- package/node_modules/glob/dist/esm/index.d.ts.map +0 -1
- package/node_modules/glob/dist/esm/index.js +0 -55
- package/node_modules/glob/dist/esm/index.js.map +0 -1
- package/node_modules/glob/dist/esm/index.min.js +0 -4
- package/node_modules/glob/dist/esm/index.min.js.map +0 -7
- package/node_modules/glob/dist/esm/package.json +0 -3
- package/node_modules/glob/dist/esm/pattern.d.ts +0 -79
- package/node_modules/glob/dist/esm/pattern.d.ts.map +0 -1
- package/node_modules/glob/dist/esm/pattern.js +0 -219
- package/node_modules/glob/dist/esm/pattern.js.map +0 -1
- package/node_modules/glob/dist/esm/processor.d.ts +0 -59
- package/node_modules/glob/dist/esm/processor.d.ts.map +0 -1
- package/node_modules/glob/dist/esm/processor.js +0 -294
- package/node_modules/glob/dist/esm/processor.js.map +0 -1
- package/node_modules/glob/dist/esm/walker.d.ts +0 -97
- package/node_modules/glob/dist/esm/walker.d.ts.map +0 -1
- package/node_modules/glob/dist/esm/walker.js +0 -381
- package/node_modules/glob/dist/esm/walker.js.map +0 -1
- package/node_modules/glob/package.json +0 -98
- package/node_modules/minipass/LICENSE.md +0 -55
- package/node_modules/minipass/README.md +0 -825
- package/node_modules/minipass/dist/commonjs/index.d.ts +0 -545
- package/node_modules/minipass/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/minipass/dist/commonjs/index.js +0 -1038
- package/node_modules/minipass/dist/commonjs/index.js.map +0 -1
- package/node_modules/minipass/dist/commonjs/package.json +0 -3
- package/node_modules/minipass/dist/esm/index.d.ts +0 -545
- package/node_modules/minipass/dist/esm/index.d.ts.map +0 -1
- package/node_modules/minipass/dist/esm/index.js +0 -1020
- package/node_modules/minipass/dist/esm/index.js.map +0 -1
- package/node_modules/minipass/dist/esm/package.json +0 -3
- package/node_modules/minipass/package.json +0 -77
- package/node_modules/negotiator/HISTORY.md +0 -114
- package/node_modules/path-scurry/LICENSE.md +0 -55
- package/node_modules/path-scurry/README.md +0 -636
- package/node_modules/path-scurry/dist/commonjs/index.d.ts +0 -1115
- package/node_modules/path-scurry/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/path-scurry/dist/commonjs/index.js +0 -2018
- package/node_modules/path-scurry/dist/commonjs/index.js.map +0 -1
- package/node_modules/path-scurry/dist/commonjs/package.json +0 -3
- package/node_modules/path-scurry/dist/esm/index.d.ts +0 -1115
- package/node_modules/path-scurry/dist/esm/index.d.ts.map +0 -1
- package/node_modules/path-scurry/dist/esm/index.js +0 -1983
- package/node_modules/path-scurry/dist/esm/index.js.map +0 -1
- package/node_modules/path-scurry/dist/esm/package.json +0 -3
- package/node_modules/path-scurry/package.json +0 -72
- package/node_modules/zod/src/v4/core/config.ts +0 -15
|
@@ -18,8 +18,7 @@ const validateOpenAPI30Schema = async (zodJSONSchema: Record<string, unknown>):
|
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
if (!res.valid) {
|
|
21
|
-
// `console.error` should make `vitest` trow an unhandled error
|
|
22
|
-
// printing the validation messages in consoles
|
|
21
|
+
// `console.error` should make `vitest` trow an unhandled error printing the validation messages in consoles
|
|
23
22
|
console.error(
|
|
24
23
|
`OpenAPI schema is not valid against ${openAPI30Validator.version}`,
|
|
25
24
|
JSON.stringify(res.errors, null, 2)
|
|
@@ -88,7 +87,7 @@ describe("toJSONSchema", () => {
|
|
|
88
87
|
{
|
|
89
88
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
90
89
|
"format": "date-time",
|
|
91
|
-
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d
|
|
90
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
|
|
92
91
|
"type": "string",
|
|
93
92
|
}
|
|
94
93
|
`);
|
|
@@ -100,6 +99,17 @@ describe("toJSONSchema", () => {
|
|
|
100
99
|
"type": "string",
|
|
101
100
|
}
|
|
102
101
|
`);
|
|
102
|
+
// only shapes keeping both an offset and seconds may advertise `date-time`, composed onto a string as well as constructed
|
|
103
|
+
expect(z.toJSONSchema(z.iso.datetime()).format).toEqual("date-time");
|
|
104
|
+
expect(z.toJSONSchema(z.iso.datetime({ offset: true })).format).toEqual("date-time");
|
|
105
|
+
expect(z.toJSONSchema(z.iso.datetime({ precision: 0 })).format).toEqual("date-time");
|
|
106
|
+
expect(z.toJSONSchema(z.iso.datetime({ local: true })).format).toEqual(undefined);
|
|
107
|
+
expect(z.toJSONSchema(z.iso.datetime({ precision: -1 })).format).toEqual(undefined);
|
|
108
|
+
expect(z.toJSONSchema(z.string().check(z.iso.datetime({ local: true }))).format).toEqual(undefined);
|
|
109
|
+
expect(z.toJSONSchema(z.string().check(z.iso.datetime())).format).toEqual("date-time");
|
|
110
|
+
// the pattern still describes what the schema accepts
|
|
111
|
+
expect(z.toJSONSchema(z.iso.datetime({ local: true })).pattern).toBeDefined();
|
|
112
|
+
|
|
103
113
|
expect(z.toJSONSchema(z.iso.time())).toMatchInlineSnapshot(`
|
|
104
114
|
{
|
|
105
115
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
@@ -221,7 +231,7 @@ describe("toJSONSchema", () => {
|
|
|
221
231
|
{
|
|
222
232
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
223
233
|
"format": "emoji",
|
|
224
|
-
"pattern": "^
|
|
234
|
+
"pattern": "^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$",
|
|
225
235
|
"type": "string",
|
|
226
236
|
}
|
|
227
237
|
`);
|
|
@@ -233,6 +243,14 @@ describe("toJSONSchema", () => {
|
|
|
233
243
|
"type": "string",
|
|
234
244
|
}
|
|
235
245
|
`);
|
|
246
|
+
expect(z.toJSONSchema(z.nanoid({ length: 64 }))).toMatchInlineSnapshot(`
|
|
247
|
+
{
|
|
248
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
249
|
+
"format": "nanoid",
|
|
250
|
+
"pattern": "^[a-zA-Z0-9_-]{64}$",
|
|
251
|
+
"type": "string",
|
|
252
|
+
}
|
|
253
|
+
`);
|
|
236
254
|
expect(z.toJSONSchema(z.cuid2())).toMatchInlineSnapshot(`
|
|
237
255
|
{
|
|
238
256
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
@@ -245,7 +263,7 @@ describe("toJSONSchema", () => {
|
|
|
245
263
|
{
|
|
246
264
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
247
265
|
"format": "ulid",
|
|
248
|
-
"pattern": "^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{
|
|
266
|
+
"pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
|
|
249
267
|
"type": "string",
|
|
250
268
|
}
|
|
251
269
|
`);
|
|
@@ -325,6 +343,12 @@ describe("toJSONSchema", () => {
|
|
|
325
343
|
// Dynamic catch values
|
|
326
344
|
const dynamicCatchSchema = z.string().catch((ctx) => `${ctx.issues.length}`);
|
|
327
345
|
expect(() => z.toJSONSchema(dynamicCatchSchema)).toThrow("Dynamic catch values are not supported in JSON Schema");
|
|
346
|
+
expect(z.toJSONSchema(dynamicCatchSchema, { unrepresentable: "any" })).toMatchInlineSnapshot(`
|
|
347
|
+
{
|
|
348
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
349
|
+
"type": "string",
|
|
350
|
+
}
|
|
351
|
+
`);
|
|
328
352
|
});
|
|
329
353
|
|
|
330
354
|
test("string formats", () => {
|
|
@@ -348,7 +372,7 @@ describe("toJSONSchema", () => {
|
|
|
348
372
|
{
|
|
349
373
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
350
374
|
"format": "date-time",
|
|
351
|
-
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d
|
|
375
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
|
|
352
376
|
"type": "string",
|
|
353
377
|
}
|
|
354
378
|
`);
|
|
@@ -480,7 +504,7 @@ describe("toJSONSchema", () => {
|
|
|
480
504
|
"pattern": "cruel",
|
|
481
505
|
},
|
|
482
506
|
{
|
|
483
|
-
"pattern": "^.{10}dark",
|
|
507
|
+
"pattern": "^.{10,}dark",
|
|
484
508
|
},
|
|
485
509
|
{
|
|
486
510
|
"pattern": ".*world$",
|
|
@@ -519,7 +543,7 @@ describe("toJSONSchema", () => {
|
|
|
519
543
|
"type": "string",
|
|
520
544
|
},
|
|
521
545
|
{
|
|
522
|
-
"pattern": "^.{10}dark",
|
|
546
|
+
"pattern": "^.{10,}dark",
|
|
523
547
|
"type": "string",
|
|
524
548
|
},
|
|
525
549
|
{
|
|
@@ -536,6 +560,19 @@ describe("toJSONSchema", () => {
|
|
|
536
560
|
`);
|
|
537
561
|
});
|
|
538
562
|
|
|
563
|
+
test("includes with position emits a pattern matching runtime semantics", () => {
|
|
564
|
+
// String.prototype.includes(sub, position) matches `sub` at `position` OR
|
|
565
|
+
// LATER, so the JSON Schema pattern must allow >= position leading chars.
|
|
566
|
+
const schema = z.string().includes("foo", { position: 2 });
|
|
567
|
+
const json = z.toJSONSchema(schema) as { pattern?: string };
|
|
568
|
+
expect(json.pattern).toBe("^.{2,}foo");
|
|
569
|
+
|
|
570
|
+
const re = new RegExp(json.pattern!);
|
|
571
|
+
for (const input of ["xxfoo", "xxxfoo", "xfoo", "ab"]) {
|
|
572
|
+
expect(re.test(input)).toBe(schema.safeParse(input).success);
|
|
573
|
+
}
|
|
574
|
+
});
|
|
575
|
+
|
|
539
576
|
test("number constraints", () => {
|
|
540
577
|
expect(z.toJSONSchema(z.number().min(5).max(10))).toMatchInlineSnapshot(
|
|
541
578
|
`
|
|
@@ -648,8 +685,7 @@ describe("toJSONSchema", () => {
|
|
|
648
685
|
});
|
|
649
686
|
|
|
650
687
|
test("number constraints intersection draft-04", () => {
|
|
651
|
-
// When both minimum (from .int()) and exclusiveMinimum (from .positive()) exist,
|
|
652
|
-
// the more restrictive constraint should be used
|
|
688
|
+
// When both minimum (from .int()) and exclusiveMinimum (from .positive()) exist, the more restrictive constraint should be used
|
|
653
689
|
expect(z.toJSONSchema(z.number().int().positive().lte(65535), { target: "draft-04" })).toMatchInlineSnapshot(`
|
|
654
690
|
{
|
|
655
691
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
@@ -690,6 +726,7 @@ describe("toJSONSchema", () => {
|
|
|
690
726
|
|
|
691
727
|
test("target normalization draft-04 and draft-07", () => {
|
|
692
728
|
// Test that both old (draft-4, draft-7) and new (draft-04, draft-07) target formats work
|
|
729
|
+
|
|
693
730
|
// Test draft-04 / draft-4
|
|
694
731
|
expect(z.toJSONSchema(z.number().gt(5), { target: "draft-04" })).toMatchInlineSnapshot(`
|
|
695
732
|
{
|
|
@@ -787,11 +824,159 @@ describe("toJSONSchema", () => {
|
|
|
787
824
|
|
|
788
825
|
test("unions", () => {
|
|
789
826
|
const schema = z.union([z.string(), z.number()]);
|
|
827
|
+
expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(`
|
|
828
|
+
{
|
|
829
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
830
|
+
"type": [
|
|
831
|
+
"string",
|
|
832
|
+
"number",
|
|
833
|
+
],
|
|
834
|
+
}
|
|
835
|
+
`);
|
|
836
|
+
});
|
|
837
|
+
|
|
838
|
+
test("nullable compacts to a type array", () => {
|
|
839
|
+
expect(z.toJSONSchema(z.string().nullable())).toMatchInlineSnapshot(`
|
|
840
|
+
{
|
|
841
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
842
|
+
"type": [
|
|
843
|
+
"string",
|
|
844
|
+
"null",
|
|
845
|
+
],
|
|
846
|
+
}
|
|
847
|
+
`);
|
|
848
|
+
|
|
849
|
+
// a nested union folds into the outer type array rather than leaving a mixed shape
|
|
850
|
+
expect(z.toJSONSchema(z.union([z.string(), z.number()]).nullable())).toMatchInlineSnapshot(`
|
|
851
|
+
{
|
|
852
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
853
|
+
"type": [
|
|
854
|
+
"string",
|
|
855
|
+
"number",
|
|
856
|
+
"null",
|
|
857
|
+
],
|
|
858
|
+
}
|
|
859
|
+
`);
|
|
860
|
+
|
|
861
|
+
// the null branch is bare but the object branch is not, so this stays an anyOf
|
|
862
|
+
expect(z.toJSONSchema(z.object({ a: z.string() }).nullable())).toMatchInlineSnapshot(`
|
|
863
|
+
{
|
|
864
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
865
|
+
"anyOf": [
|
|
866
|
+
{
|
|
867
|
+
"additionalProperties": false,
|
|
868
|
+
"properties": {
|
|
869
|
+
"a": {
|
|
870
|
+
"type": "string",
|
|
871
|
+
},
|
|
872
|
+
},
|
|
873
|
+
"required": [
|
|
874
|
+
"a",
|
|
875
|
+
],
|
|
876
|
+
"type": "object",
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
"type": "null",
|
|
880
|
+
},
|
|
881
|
+
],
|
|
882
|
+
}
|
|
883
|
+
`);
|
|
884
|
+
});
|
|
885
|
+
|
|
886
|
+
test("duplicate branches dedupe, single branch stays a bare type", () => {
|
|
887
|
+
// a `type` array must have unique members, so two branches that erase to the same bare type collapse
|
|
888
|
+
const refined = z.union([z.string().refine((s) => s.length > 2), z.string().refine((s) => s.length < 9)]);
|
|
889
|
+
expect(z.toJSONSchema(refined)).toMatchInlineSnapshot(`
|
|
890
|
+
{
|
|
891
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
892
|
+
"type": "string",
|
|
893
|
+
}
|
|
894
|
+
`);
|
|
895
|
+
expect(z.toJSONSchema(z.union([z.string()]))).toMatchInlineSnapshot(`
|
|
896
|
+
{
|
|
897
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
898
|
+
"type": "string",
|
|
899
|
+
}
|
|
900
|
+
`);
|
|
901
|
+
});
|
|
902
|
+
|
|
903
|
+
test("compaction runs after overrides and ref extraction", () => {
|
|
904
|
+
// an override decorates the string branch, so it is no longer a bare type and must survive in anyOf
|
|
905
|
+
const decorated = z.toJSONSchema(z.union([z.string(), z.number()]), {
|
|
906
|
+
override(ctx) {
|
|
907
|
+
if (ctx.zodSchema._zod.def.type === "string") ctx.jsonSchema.whatever = "sup";
|
|
908
|
+
},
|
|
909
|
+
});
|
|
910
|
+
expect(decorated).toMatchInlineSnapshot(`
|
|
911
|
+
{
|
|
912
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
913
|
+
"anyOf": [
|
|
914
|
+
{
|
|
915
|
+
"type": "string",
|
|
916
|
+
"whatever": "sup",
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
"type": "number",
|
|
920
|
+
},
|
|
921
|
+
],
|
|
922
|
+
}
|
|
923
|
+
`);
|
|
924
|
+
|
|
925
|
+
// a branch extracted into $defs is a $ref, not a bare type, so `reused` is not silently bypassed
|
|
926
|
+
const shared = z.string();
|
|
927
|
+
expect(
|
|
928
|
+
z.toJSONSchema(z.object({ a: shared, b: z.union([shared, z.null()]) }), { reused: "ref" })
|
|
929
|
+
).toMatchInlineSnapshot(`
|
|
930
|
+
{
|
|
931
|
+
"$defs": {
|
|
932
|
+
"__schema0": {
|
|
933
|
+
"type": "string",
|
|
934
|
+
},
|
|
935
|
+
},
|
|
936
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
937
|
+
"additionalProperties": false,
|
|
938
|
+
"properties": {
|
|
939
|
+
"a": {
|
|
940
|
+
"$ref": "#/$defs/__schema0",
|
|
941
|
+
},
|
|
942
|
+
"b": {
|
|
943
|
+
"anyOf": [
|
|
944
|
+
{
|
|
945
|
+
"$ref": "#/$defs/__schema0",
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
"type": "null",
|
|
949
|
+
},
|
|
950
|
+
],
|
|
951
|
+
},
|
|
952
|
+
},
|
|
953
|
+
"required": [
|
|
954
|
+
"a",
|
|
955
|
+
"b",
|
|
956
|
+
],
|
|
957
|
+
"type": "object",
|
|
958
|
+
}
|
|
959
|
+
`);
|
|
960
|
+
});
|
|
961
|
+
|
|
962
|
+
test("openapi-3.0 keeps a single-string type", () => {
|
|
963
|
+
// OpenAPI 3.0 has no type arrays; nullability is spelled with `nullable`
|
|
964
|
+
expect(z.toJSONSchema(z.string().nullable(), { target: "openapi-3.0" })).toMatchInlineSnapshot(`
|
|
965
|
+
{
|
|
966
|
+
"nullable": true,
|
|
967
|
+
"type": "string",
|
|
968
|
+
}
|
|
969
|
+
`);
|
|
970
|
+
});
|
|
971
|
+
|
|
972
|
+
test("union with constrained branch is not compacted", () => {
|
|
973
|
+
const schema = z.union([z.string().min(1), z.number()]);
|
|
790
974
|
expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(`
|
|
791
975
|
{
|
|
792
976
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
793
977
|
"anyOf": [
|
|
794
978
|
{
|
|
979
|
+
"minLength": 1,
|
|
795
980
|
"type": "string",
|
|
796
981
|
},
|
|
797
982
|
{
|
|
@@ -802,6 +987,25 @@ describe("toJSONSchema", () => {
|
|
|
802
987
|
`);
|
|
803
988
|
});
|
|
804
989
|
|
|
990
|
+
test("union of literals is not compacted", () => {
|
|
991
|
+
const schema = z.union([z.literal("a"), z.literal("b")]);
|
|
992
|
+
expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(`
|
|
993
|
+
{
|
|
994
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
995
|
+
"anyOf": [
|
|
996
|
+
{
|
|
997
|
+
"const": "a",
|
|
998
|
+
"type": "string",
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
"const": "b",
|
|
1002
|
+
"type": "string",
|
|
1003
|
+
},
|
|
1004
|
+
],
|
|
1005
|
+
}
|
|
1006
|
+
`);
|
|
1007
|
+
});
|
|
1008
|
+
|
|
805
1009
|
test("discriminated unions", () => {
|
|
806
1010
|
const schema = z.discriminatedUnion("type", [
|
|
807
1011
|
z.object({ type: z.literal("success"), data: z.string() }),
|
|
@@ -856,32 +1060,20 @@ describe("toJSONSchema", () => {
|
|
|
856
1060
|
expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(`
|
|
857
1061
|
{
|
|
858
1062
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
859
|
-
"
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
"
|
|
863
|
-
"name": {
|
|
864
|
-
"type": "string",
|
|
865
|
-
},
|
|
866
|
-
},
|
|
867
|
-
"required": [
|
|
868
|
-
"name",
|
|
869
|
-
],
|
|
870
|
-
"type": "object",
|
|
1063
|
+
"additionalProperties": false,
|
|
1064
|
+
"properties": {
|
|
1065
|
+
"age": {
|
|
1066
|
+
"type": "number",
|
|
871
1067
|
},
|
|
872
|
-
{
|
|
873
|
-
"
|
|
874
|
-
"properties": {
|
|
875
|
-
"age": {
|
|
876
|
-
"type": "number",
|
|
877
|
-
},
|
|
878
|
-
},
|
|
879
|
-
"required": [
|
|
880
|
-
"age",
|
|
881
|
-
],
|
|
882
|
-
"type": "object",
|
|
1068
|
+
"name": {
|
|
1069
|
+
"type": "string",
|
|
883
1070
|
},
|
|
1071
|
+
},
|
|
1072
|
+
"required": [
|
|
1073
|
+
"name",
|
|
1074
|
+
"age",
|
|
884
1075
|
],
|
|
1076
|
+
"type": "object",
|
|
885
1077
|
}
|
|
886
1078
|
`);
|
|
887
1079
|
});
|
|
@@ -941,7 +1133,23 @@ describe("toJSONSchema", () => {
|
|
|
941
1133
|
`);
|
|
942
1134
|
});
|
|
943
1135
|
|
|
944
|
-
test("record
|
|
1136
|
+
test("record with enum keys drops required for an optional-in value under io: input", () => {
|
|
1137
|
+
const schema = z.record(z.enum(["key1", "key2"]), z.number().default(0));
|
|
1138
|
+
|
|
1139
|
+
expect(z.toJSONSchema(schema, { io: "input" }).required).toBeUndefined();
|
|
1140
|
+
expect(z.toJSONSchema(schema).required).toEqual(["key1", "key2"]);
|
|
1141
|
+
expect(z.toJSONSchema(z.record(z.enum(["key1", "key2"]), z.number()), { io: "input" }).required).toEqual([
|
|
1142
|
+
"key1",
|
|
1143
|
+
"key2",
|
|
1144
|
+
]);
|
|
1145
|
+
// A caught value keeps required, matching the input type and z.object().
|
|
1146
|
+
expect(z.toJSONSchema(z.record(z.enum(["key1", "key2"]), z.number().catch(0)), { io: "input" }).required).toEqual([
|
|
1147
|
+
"key1",
|
|
1148
|
+
"key2",
|
|
1149
|
+
]);
|
|
1150
|
+
});
|
|
1151
|
+
|
|
1152
|
+
test("record stringifies numeric enum keys for propertyNames and required", () => {
|
|
945
1153
|
enum NumberEnum {
|
|
946
1154
|
Zero = 0,
|
|
947
1155
|
One = 1,
|
|
@@ -956,20 +1164,124 @@ describe("toJSONSchema", () => {
|
|
|
956
1164
|
},
|
|
957
1165
|
"propertyNames": {
|
|
958
1166
|
"enum": [
|
|
959
|
-
0,
|
|
960
|
-
1,
|
|
1167
|
+
"0",
|
|
1168
|
+
"1",
|
|
961
1169
|
],
|
|
962
|
-
"type": "
|
|
1170
|
+
"type": "string",
|
|
963
1171
|
},
|
|
964
1172
|
"required": [
|
|
965
|
-
0,
|
|
966
|
-
1,
|
|
1173
|
+
"0",
|
|
1174
|
+
"1",
|
|
967
1175
|
],
|
|
968
1176
|
"type": "object",
|
|
969
1177
|
}
|
|
970
1178
|
`);
|
|
971
1179
|
});
|
|
972
1180
|
|
|
1181
|
+
test("record with a numeric key emits propertyNames over the numeric-string form", () => {
|
|
1182
|
+
expect(z.toJSONSchema(z.record(z.number(), z.boolean())).propertyNames).toEqual({
|
|
1183
|
+
type: "string",
|
|
1184
|
+
pattern: "^-?\\d+(?:\\.\\d+)?$",
|
|
1185
|
+
});
|
|
1186
|
+
// range checks can't apply to a key, so only the integer shape survives
|
|
1187
|
+
expect(z.toJSONSchema(z.record(z.int32(), z.boolean())).propertyNames).toEqual({
|
|
1188
|
+
type: "string",
|
|
1189
|
+
pattern: "^-?\\d+$",
|
|
1190
|
+
});
|
|
1191
|
+
expect(z.toJSONSchema(z.record(z.literal([1, 2]), z.boolean()))).toMatchObject({
|
|
1192
|
+
propertyNames: { type: "string", enum: ["1", "2"] },
|
|
1193
|
+
required: ["1", "2"],
|
|
1194
|
+
});
|
|
1195
|
+
expect(z.toJSONSchema(z.record(z.literal(1), z.boolean())).propertyNames).toEqual({
|
|
1196
|
+
type: "string",
|
|
1197
|
+
const: "1",
|
|
1198
|
+
});
|
|
1199
|
+
});
|
|
1200
|
+
|
|
1201
|
+
test("record key rewrite reaches through wrappers and union branches", () => {
|
|
1202
|
+
const numericString = { type: "string", pattern: "^-?\\d+(?:\\.\\d+)?$" };
|
|
1203
|
+
// a wrapper only carries its inner type once the refs are flattened, so this is decided after the record itself is emitted
|
|
1204
|
+
expect(
|
|
1205
|
+
z.toJSONSchema(
|
|
1206
|
+
z.record(
|
|
1207
|
+
z.lazy(() => z.number()),
|
|
1208
|
+
z.boolean()
|
|
1209
|
+
)
|
|
1210
|
+
).propertyNames
|
|
1211
|
+
).toEqual(numericString);
|
|
1212
|
+
expect(z.toJSONSchema(z.record(z.number().pipe(z.number()), z.boolean())).propertyNames).toEqual(numericString);
|
|
1213
|
+
expect(z.toJSONSchema(z.record(z.number().readonly(), z.boolean())).propertyNames).toMatchObject(numericString);
|
|
1214
|
+
expect(z.toJSONSchema(z.record(z.union([z.literal("Tuna"), z.literal(21)]), z.string()))).toMatchObject({
|
|
1215
|
+
propertyNames: {
|
|
1216
|
+
anyOf: [
|
|
1217
|
+
{ type: "string", const: "Tuna" },
|
|
1218
|
+
{ type: "string", const: "21" },
|
|
1219
|
+
],
|
|
1220
|
+
},
|
|
1221
|
+
required: ["Tuna", "21"],
|
|
1222
|
+
});
|
|
1223
|
+
});
|
|
1224
|
+
|
|
1225
|
+
test("record with a numeric key inlines an extracted key, and leaves a string one referenced", () => {
|
|
1226
|
+
expect(z.toJSONSchema(z.record(z.number().meta({ id: "Num" }), z.boolean())).propertyNames).toEqual({
|
|
1227
|
+
type: "string",
|
|
1228
|
+
pattern: "^-?\\d+(?:\\.\\d+)?$",
|
|
1229
|
+
});
|
|
1230
|
+
expect(z.toJSONSchema(z.record(z.string().meta({ id: "Str" }), z.boolean())).propertyNames).toEqual({
|
|
1231
|
+
$ref: "#/$defs/Str",
|
|
1232
|
+
});
|
|
1233
|
+
// the value position still wants the number form, so the two cannot share one def
|
|
1234
|
+
const key = z.number().meta({ id: "Shared" });
|
|
1235
|
+
expect(z.toJSONSchema(z.object({ a: key, b: z.record(key, z.string()) }))).toMatchObject({
|
|
1236
|
+
properties: { a: { $ref: "#/$defs/Shared" }, b: { propertyNames: { type: "string" } } },
|
|
1237
|
+
$defs: { Shared: { type: "number" } },
|
|
1238
|
+
});
|
|
1239
|
+
});
|
|
1240
|
+
|
|
1241
|
+
test("record key rewrite reaches a wrapped record", () => {
|
|
1242
|
+
// the flatten copies a record's properties onto its wrapper by reference, so the rewrite has to find every copy
|
|
1243
|
+
expect(z.toJSONSchema(z.record(z.number(), z.boolean()).optional()).propertyNames).toEqual({
|
|
1244
|
+
type: "string",
|
|
1245
|
+
pattern: "^-?\\d+(?:\\.\\d+)?$",
|
|
1246
|
+
});
|
|
1247
|
+
expect(z.toJSONSchema(z.object({ a: z.record(z.literal([1, 2]), z.boolean()).optional() }))).toMatchObject({
|
|
1248
|
+
properties: { a: { propertyNames: { type: "string", enum: ["1", "2"] }, required: ["1", "2"] } },
|
|
1249
|
+
});
|
|
1250
|
+
});
|
|
1251
|
+
|
|
1252
|
+
test("record with a recursive key converts without looping", () => {
|
|
1253
|
+
const numeric: any = z.lazy(() => z.union([z.number(), numeric]));
|
|
1254
|
+
expect(z.toJSONSchema(z.record(numeric, z.boolean())).propertyNames).toMatchObject({
|
|
1255
|
+
anyOf: [{ type: "string", pattern: "^-?\\d+(?:\\.\\d+)?$" }, { $ref: "#/$defs/__schema0" }],
|
|
1256
|
+
});
|
|
1257
|
+
// a key with nothing to re-express keeps the reference it had
|
|
1258
|
+
const stringy: any = z.lazy(() => z.union([z.string(), stringy]));
|
|
1259
|
+
expect(z.toJSONSchema(z.record(stringy, z.boolean())).propertyNames).toEqual({ $ref: "#/$defs/__schema0" });
|
|
1260
|
+
expect(
|
|
1261
|
+
z.toJSONSchema(z.record(z.union([z.literal("a"), z.literal("b")]).meta({ id: "Keys" }), z.boolean()))
|
|
1262
|
+
.propertyNames
|
|
1263
|
+
).toEqual({ $ref: "#/$defs/Keys" });
|
|
1264
|
+
});
|
|
1265
|
+
|
|
1266
|
+
test("record with a heterogeneous key stringifies only its numeric members", () => {
|
|
1267
|
+
// a mixed key carries no `type`, so the numeric members are caught by value rather than by type
|
|
1268
|
+
expect(z.toJSONSchema(z.record(z.literal(["a", 1]), z.boolean()))).toMatchObject({
|
|
1269
|
+
propertyNames: { enum: ["a", "1"] },
|
|
1270
|
+
required: ["a", "1"],
|
|
1271
|
+
});
|
|
1272
|
+
// a member no key can spell is left as it was, since the parser only ever retries a key as a number
|
|
1273
|
+
expect(z.toJSONSchema(z.record(z.literal(["a", true]) as any, z.boolean())).propertyNames).toEqual({
|
|
1274
|
+
enum: ["a", true],
|
|
1275
|
+
});
|
|
1276
|
+
});
|
|
1277
|
+
|
|
1278
|
+
test("record stringifies required for every target", () => {
|
|
1279
|
+
const schema = z.record(z.literal([1, 2]), z.boolean());
|
|
1280
|
+
for (const target of ["draft-2020-12", "draft-7", "draft-4", "openapi-3.0"] as const) {
|
|
1281
|
+
expect(z.toJSONSchema(schema, { target }).required).toEqual(["1", "2"]);
|
|
1282
|
+
}
|
|
1283
|
+
});
|
|
1284
|
+
|
|
973
1285
|
test("strict record with regex key uses propertyNames", () => {
|
|
974
1286
|
const schema = z.record(z.string().regex(/^label:[a-z]{2}$/), z.string());
|
|
975
1287
|
|
|
@@ -1086,6 +1398,9 @@ describe("toJSONSchema", () => {
|
|
|
1086
1398
|
expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(`
|
|
1087
1399
|
{
|
|
1088
1400
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1401
|
+
"items": false,
|
|
1402
|
+
"maxItems": 2,
|
|
1403
|
+
"minItems": 2,
|
|
1089
1404
|
"prefixItems": [
|
|
1090
1405
|
{
|
|
1091
1406
|
"type": "string",
|
|
@@ -1107,6 +1422,7 @@ describe("toJSONSchema", () => {
|
|
|
1107
1422
|
"items": {
|
|
1108
1423
|
"type": "boolean",
|
|
1109
1424
|
},
|
|
1425
|
+
"minItems": 2,
|
|
1110
1426
|
"prefixItems": [
|
|
1111
1427
|
{
|
|
1112
1428
|
"type": "string",
|
|
@@ -1162,7 +1478,7 @@ describe("toJSONSchema", () => {
|
|
|
1162
1478
|
},
|
|
1163
1479
|
],
|
|
1164
1480
|
},
|
|
1165
|
-
"minItems":
|
|
1481
|
+
"minItems": 2,
|
|
1166
1482
|
"type": "array",
|
|
1167
1483
|
}
|
|
1168
1484
|
`);
|
|
@@ -1203,6 +1519,7 @@ describe("toJSONSchema", () => {
|
|
|
1203
1519
|
expect(z.toJSONSchema(schema, { target: "draft-7", io: "input" })).toMatchInlineSnapshot(`
|
|
1204
1520
|
{
|
|
1205
1521
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
1522
|
+
"additionalItems": false,
|
|
1206
1523
|
"items": [
|
|
1207
1524
|
{
|
|
1208
1525
|
"type": "string",
|
|
@@ -1211,6 +1528,8 @@ describe("toJSONSchema", () => {
|
|
|
1211
1528
|
"type": "number",
|
|
1212
1529
|
},
|
|
1213
1530
|
],
|
|
1531
|
+
"maxItems": 2,
|
|
1532
|
+
"minItems": 2,
|
|
1214
1533
|
"type": "array",
|
|
1215
1534
|
}
|
|
1216
1535
|
`);
|
|
@@ -1232,14 +1551,14 @@ describe("toJSONSchema", () => {
|
|
|
1232
1551
|
"type": "number",
|
|
1233
1552
|
},
|
|
1234
1553
|
],
|
|
1554
|
+
"minItems": 2,
|
|
1235
1555
|
"type": "array",
|
|
1236
1556
|
}
|
|
1237
1557
|
`);
|
|
1238
1558
|
});
|
|
1239
1559
|
|
|
1240
1560
|
test("tuple with rest draft-7 - issue #5151 regression test", () => {
|
|
1241
|
-
// This test addresses issue #5151: tuple with rest elements and ids
|
|
1242
|
-
// in draft-7 had incorrect internal path handling affecting complex scenarios
|
|
1561
|
+
// This test addresses issue #5151: tuple with rest elements and ids in draft-7 had incorrect internal path handling affecting complex scenarios
|
|
1243
1562
|
const primarySchema = z.string().meta({ id: "primary" });
|
|
1244
1563
|
const restSchema = z.number().meta({ id: "rest" });
|
|
1245
1564
|
const testSchema = z.tuple([primarySchema], restSchema);
|
|
@@ -1271,6 +1590,7 @@ describe("toJSONSchema", () => {
|
|
|
1271
1590
|
"$ref": "#/definitions/primary",
|
|
1272
1591
|
},
|
|
1273
1592
|
],
|
|
1593
|
+
"minItems": 1,
|
|
1274
1594
|
"type": "array",
|
|
1275
1595
|
}
|
|
1276
1596
|
`);
|
|
@@ -1285,6 +1605,88 @@ describe("toJSONSchema", () => {
|
|
|
1285
1605
|
expect(result.additionalItems).toBeDefined();
|
|
1286
1606
|
});
|
|
1287
1607
|
|
|
1608
|
+
test("closed tuple length constraints - issue #6193", () => {
|
|
1609
|
+
const schema = z.tuple([z.string(), z.string(), z.object({ lang: z.string() })]);
|
|
1610
|
+
|
|
1611
|
+
expect(schema.safeParse(["a", "b", { lang: "en" }, "extra"]).success).toBe(false);
|
|
1612
|
+
|
|
1613
|
+
const draft2020 = z.toJSONSchema(schema, { target: "draft-2020-12" });
|
|
1614
|
+
expect(draft2020.items).toBe(false);
|
|
1615
|
+
expect(draft2020.minItems).toBe(3);
|
|
1616
|
+
expect(draft2020.maxItems).toBe(3);
|
|
1617
|
+
|
|
1618
|
+
const draft7 = z.toJSONSchema(schema, { target: "draft-7", io: "input" });
|
|
1619
|
+
expect(draft7.additionalItems).toBe(false);
|
|
1620
|
+
expect(draft7.minItems).toBe(3);
|
|
1621
|
+
expect(draft7.maxItems).toBe(3);
|
|
1622
|
+
|
|
1623
|
+
const openapi = z.toJSONSchema(schema, { target: "openapi-3.0" });
|
|
1624
|
+
validateOpenAPI30Schema(openapi);
|
|
1625
|
+
expect(openapi.minItems).toBe(3);
|
|
1626
|
+
expect(openapi.maxItems).toBe(3);
|
|
1627
|
+
});
|
|
1628
|
+
|
|
1629
|
+
test("closed tuple with optional trailing items", () => {
|
|
1630
|
+
const schema = z.tuple([z.string(), z.number().optional()]);
|
|
1631
|
+
|
|
1632
|
+
const draft2020 = z.toJSONSchema(schema, { target: "draft-2020-12" });
|
|
1633
|
+
expect(draft2020.items).toBe(false);
|
|
1634
|
+
expect(draft2020.minItems).toBe(1);
|
|
1635
|
+
expect(draft2020.maxItems).toBe(2);
|
|
1636
|
+
|
|
1637
|
+
const draft7 = z.toJSONSchema(schema, { target: "draft-7", io: "input" });
|
|
1638
|
+
expect(draft7.additionalItems).toBe(false);
|
|
1639
|
+
expect(draft7.minItems).toBe(1);
|
|
1640
|
+
expect(draft7.maxItems).toBe(2);
|
|
1641
|
+
});
|
|
1642
|
+
|
|
1643
|
+
test("empty closed tuple rejects extra elements", () => {
|
|
1644
|
+
const schema = z.tuple([]);
|
|
1645
|
+
|
|
1646
|
+
const draft2020 = z.toJSONSchema(schema, { target: "draft-2020-12" });
|
|
1647
|
+
expect(draft2020.items).toBe(false);
|
|
1648
|
+
expect(draft2020.maxItems).toBe(0);
|
|
1649
|
+
|
|
1650
|
+
const draft7 = z.toJSONSchema(schema, { target: "draft-7", io: "input" });
|
|
1651
|
+
expect(draft7.additionalItems).toBe(false);
|
|
1652
|
+
expect(draft7.maxItems).toBe(0);
|
|
1653
|
+
|
|
1654
|
+
const openapi = z.toJSONSchema(schema, { target: "openapi-3.0" });
|
|
1655
|
+
validateOpenAPI30Schema(openapi);
|
|
1656
|
+
expect(openapi.maxItems).toBe(0);
|
|
1657
|
+
});
|
|
1658
|
+
|
|
1659
|
+
test("closed tuple length respects io direction with defaults", () => {
|
|
1660
|
+
const schema = z.tuple([z.string(), z.string().default("x")]);
|
|
1661
|
+
|
|
1662
|
+
const input = z.toJSONSchema(schema, { target: "draft-2020-12", io: "input" });
|
|
1663
|
+
expect(input.items).toBe(false);
|
|
1664
|
+
expect(input.minItems).toBe(1);
|
|
1665
|
+
expect(input.maxItems).toBe(2);
|
|
1666
|
+
|
|
1667
|
+
const output = z.toJSONSchema(schema, { target: "draft-2020-12", io: "output" });
|
|
1668
|
+
expect(output.items).toBe(false);
|
|
1669
|
+
expect(output.minItems).toBe(2);
|
|
1670
|
+
expect(output.maxItems).toBe(2);
|
|
1671
|
+
});
|
|
1672
|
+
|
|
1673
|
+
test("closed tuple length resolves input optionality past transform and catch", () => {
|
|
1674
|
+
const minItems = (schema: z.core.$ZodType, io: "input" | "output") =>
|
|
1675
|
+
z.toJSONSchema(schema, { target: "draft-2020-12", io }).minItems;
|
|
1676
|
+
|
|
1677
|
+
// Both let the parser observe an absent slot, but declare a required input.
|
|
1678
|
+
const pre = z.tuple([z.string(), z.preprocess((v) => v, z.string())]);
|
|
1679
|
+
expect(minItems(pre, "input")).toBe(2);
|
|
1680
|
+
expect(minItems(pre, "output")).toBe(2);
|
|
1681
|
+
|
|
1682
|
+
const caught = z.tuple([z.string(), z.string().catch("x")]);
|
|
1683
|
+
expect(minItems(caught, "input")).toBe(2);
|
|
1684
|
+
expect(minItems(caught, "output")).toBe(2);
|
|
1685
|
+
|
|
1686
|
+
// Resolution passes through the wrapper rather than stopping at it.
|
|
1687
|
+
expect(minItems(z.tuple([z.string(), z.string().optional().catch("x")]), "input")).toBe(1);
|
|
1688
|
+
});
|
|
1689
|
+
|
|
1288
1690
|
test("promise", () => {
|
|
1289
1691
|
const schema = z.promise(z.string());
|
|
1290
1692
|
expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(`
|
|
@@ -1904,13 +2306,9 @@ test("override execution order", () => {
|
|
|
1904
2306
|
|
|
1905
2307
|
expect(unionSchema).toMatchInlineSnapshot(`
|
|
1906
2308
|
{
|
|
1907
|
-
"
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
},
|
|
1911
|
-
{
|
|
1912
|
-
"type": "number",
|
|
1913
|
-
},
|
|
2309
|
+
"type": [
|
|
2310
|
+
"string",
|
|
2311
|
+
"number",
|
|
1914
2312
|
],
|
|
1915
2313
|
}
|
|
1916
2314
|
`);
|
|
@@ -2092,15 +2490,143 @@ test("extract schemas with id", () => {
|
|
|
2092
2490
|
`);
|
|
2093
2491
|
});
|
|
2094
2492
|
|
|
2095
|
-
test("
|
|
2096
|
-
const
|
|
2097
|
-
|
|
2493
|
+
test("escapes JSON Pointer reserved characters in $ref but not in $defs key", () => {
|
|
2494
|
+
const User = z.object({ name: z.string() }).meta({ id: "Shared/User~" });
|
|
2495
|
+
const result = z.toJSONSchema(z.object({ User }));
|
|
2496
|
+
// the $ref pointer escapes `/` -> `~1` and `~` -> `~0` (RFC 6901),
|
|
2497
|
+
// while the $defs key keeps the original id
|
|
2498
|
+
expect((result.properties!.User as any).$ref).toBe("#/$defs/Shared~1User~0");
|
|
2499
|
+
expect(Object.keys(result.$defs!)).toEqual(["Shared/User~"]);
|
|
2500
|
+
});
|
|
2501
|
+
|
|
2502
|
+
test("escapes JSON Pointer reserved characters in the root $ref", () => {
|
|
2503
|
+
const User = z.object({ name: z.string() }).meta({ id: "Shared/User~" });
|
|
2504
|
+
const result = z.toJSONSchema(User);
|
|
2505
|
+
expect(result.$ref).toBe("#/$defs/Shared~1User~0");
|
|
2506
|
+
expect(Object.keys(result.$defs!)).toEqual(["Shared/User~"]);
|
|
2507
|
+
});
|
|
2508
|
+
|
|
2509
|
+
test("a multipleOf divisor JSON Schema cannot express goes through `unrepresentable`", () => {
|
|
2510
|
+
// the keyword must be strictly greater than zero, and NaN/Infinity do not survive JSON at all
|
|
2511
|
+
for (const divisor of [0, Number.NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY]) {
|
|
2512
|
+
expect(() => z.toJSONSchema(z.number().multipleOf(divisor))).toThrow(/cannot be represented in JSON Schema/);
|
|
2513
|
+
expect(z.toJSONSchema(z.number().multipleOf(divisor), { unrepresentable: "any" })).toMatchObject({
|
|
2514
|
+
type: "number",
|
|
2515
|
+
});
|
|
2516
|
+
expect(z.toJSONSchema(z.number().multipleOf(divisor), { unrepresentable: "any" })).not.toHaveProperty("multipleOf");
|
|
2517
|
+
}
|
|
2518
|
+
|
|
2519
|
+
// a negative divisor accepts exactly what its absolute value accepts, so it still maps
|
|
2520
|
+
expect(z.number().multipleOf(-5).safeParse(10).success).toEqual(true);
|
|
2521
|
+
expect(z.number().multipleOf(-5).safeParse(13).success).toEqual(false);
|
|
2522
|
+
expect(z.toJSONSchema(z.number().multipleOf(-5))).toMatchObject({ multipleOf: 5 });
|
|
2523
|
+
expect(z.toJSONSchema(z.number().multipleOf(0.1))).toMatchObject({ multipleOf: 0.1 });
|
|
2524
|
+
});
|
|
2525
|
+
|
|
2526
|
+
test("unrepresentable default values go through `unrepresentable`", () => {
|
|
2527
|
+
// a bigint default has no reliable JSON encoding, so it is dropped rather than approximated
|
|
2528
|
+
expect(z.toJSONSchema(z.bigint().default(0n), { unrepresentable: "any" })).toMatchInlineSnapshot(`
|
|
2098
2529
|
{
|
|
2099
2530
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2531
|
+
}
|
|
2532
|
+
`);
|
|
2533
|
+
expect(z.toJSONSchema(z.bigint().prefault(2n), { io: "input", unrepresentable: "any" })).toMatchInlineSnapshot(`
|
|
2534
|
+
{
|
|
2535
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
2536
|
+
}
|
|
2537
|
+
`);
|
|
2538
|
+
// including when nested inside an otherwise representable default
|
|
2539
|
+
expect(
|
|
2540
|
+
z.toJSONSchema(z.object({ a: z.bigint() }).default({ a: 1n }), { unrepresentable: "any" })
|
|
2541
|
+
).toMatchInlineSnapshot(`
|
|
2542
|
+
{
|
|
2543
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
2544
|
+
"additionalProperties": false,
|
|
2545
|
+
"properties": {
|
|
2546
|
+
"a": {},
|
|
2547
|
+
},
|
|
2548
|
+
"required": [
|
|
2549
|
+
"a",
|
|
2550
|
+
],
|
|
2551
|
+
"type": "object",
|
|
2552
|
+
}
|
|
2553
|
+
`);
|
|
2554
|
+
|
|
2555
|
+
// under the default strict mode the inner type throws first; a representable inner type surfaces the default's own error rather than a raw `JSON.stringify` TypeError
|
|
2556
|
+
expect(() => z.toJSONSchema(z.bigint().default(0n))).toThrow("BigInt cannot be represented in JSON Schema");
|
|
2557
|
+
expect(() => z.toJSONSchema(z.unknown().default(1n))).toThrow("BigInt defaults cannot be represented in JSON Schema");
|
|
2558
|
+
|
|
2559
|
+
// representable defaults are untouched
|
|
2560
|
+
expect(z.toJSONSchema(z.object({ a: z.number() }).default({ a: 2 }))).toMatchInlineSnapshot(`
|
|
2561
|
+
{
|
|
2562
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
2563
|
+
"additionalProperties": false,
|
|
2564
|
+
"default": {
|
|
2565
|
+
"a": 2,
|
|
2566
|
+
},
|
|
2567
|
+
"properties": {
|
|
2568
|
+
"a": {
|
|
2569
|
+
"type": "number",
|
|
2570
|
+
},
|
|
2571
|
+
},
|
|
2572
|
+
"required": [
|
|
2573
|
+
"a",
|
|
2574
|
+
],
|
|
2575
|
+
"type": "object",
|
|
2576
|
+
}
|
|
2577
|
+
`);
|
|
2578
|
+
});
|
|
2579
|
+
|
|
2580
|
+
test("an `unrepresentable` handler can represent a bigint default", () => {
|
|
2581
|
+
// one handler covers both the type and its default, so no `unrepresentable: "any"` is needed and every other unrepresentable type still throws
|
|
2582
|
+
expect(
|
|
2583
|
+
z.toJSONSchema(z.object({ startAt: z.coerce.bigint().optional().default(0n) }), {
|
|
2584
|
+
io: "input",
|
|
2585
|
+
unrepresentable: ({ zodSchema }) => {
|
|
2586
|
+
const def = zodSchema._zod.def;
|
|
2587
|
+
if (def.type === "bigint") return { type: "integer", format: "int64" };
|
|
2588
|
+
if (def.type === "default") return { default: String(def.defaultValue) };
|
|
2589
|
+
return "throw";
|
|
2590
|
+
},
|
|
2591
|
+
})
|
|
2592
|
+
).toMatchInlineSnapshot(`
|
|
2593
|
+
{
|
|
2594
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
2595
|
+
"properties": {
|
|
2596
|
+
"startAt": {
|
|
2597
|
+
"default": "0",
|
|
2598
|
+
"format": "int64",
|
|
2599
|
+
"type": "integer",
|
|
2600
|
+
},
|
|
2601
|
+
},
|
|
2602
|
+
"type": "object",
|
|
2603
|
+
}
|
|
2604
|
+
`);
|
|
2605
|
+
|
|
2606
|
+
// a handler may also drop just the default while still representing the type
|
|
2607
|
+
expect(
|
|
2608
|
+
z.toJSONSchema(z.bigint().default(0n), {
|
|
2609
|
+
unrepresentable: ({ zodSchema }) =>
|
|
2610
|
+
zodSchema._zod.def.type === "bigint" ? { type: "integer", format: "int64" } : "any",
|
|
2611
|
+
})
|
|
2612
|
+
).toMatchInlineSnapshot(`
|
|
2613
|
+
{
|
|
2614
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
2615
|
+
"format": "int64",
|
|
2616
|
+
"type": "integer",
|
|
2617
|
+
}
|
|
2618
|
+
`);
|
|
2619
|
+
});
|
|
2620
|
+
|
|
2621
|
+
test("unrepresentable literal values are ignored", () => {
|
|
2622
|
+
const a = z.toJSONSchema(z.literal(["hello", null, 5, BigInt(1324), undefined]), { unrepresentable: "any" });
|
|
2623
|
+
expect(a).toMatchInlineSnapshot(`
|
|
2624
|
+
{
|
|
2625
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
2626
|
+
"enum": [
|
|
2627
|
+
"hello",
|
|
2628
|
+
null,
|
|
2629
|
+
5,
|
|
2104
2630
|
1324,
|
|
2105
2631
|
],
|
|
2106
2632
|
}
|
|
@@ -2168,8 +2694,7 @@ test("describe with id", () => {
|
|
|
2168
2694
|
});
|
|
2169
2695
|
|
|
2170
2696
|
test("id is stripped from $defs entries (draft-2020-12)", () => {
|
|
2171
|
-
// The `id` in `.meta()` is a registration tag — it determines the $defs key
|
|
2172
|
-
// but should not leak into the definition body, where it is redundant.
|
|
2697
|
+
// The `id` in `.meta()` is a registration tag — it determines the $defs key but should not leak into the definition body, where it is redundant.
|
|
2173
2698
|
const inner = z.string().meta({ id: "Inner" });
|
|
2174
2699
|
const result = z.toJSONSchema(z.object({ a: inner, b: inner }));
|
|
2175
2700
|
expect(result.$defs?.Inner).toEqual({ type: "string" });
|
|
@@ -2177,9 +2702,7 @@ test("id is stripped from $defs entries (draft-2020-12)", () => {
|
|
|
2177
2702
|
});
|
|
2178
2703
|
|
|
2179
2704
|
test("id is stripped from definitions entries (draft-04)", () => {
|
|
2180
|
-
// In draft-04, `id` is a reserved keyword that sets a base URI for the
|
|
2181
|
-
// subschema. Leaking Zod's registration tag here is semantically wrong, so
|
|
2182
|
-
// ensure it is stripped.
|
|
2705
|
+
// In draft-04, `id` is a reserved keyword that sets a base URI for the subschema. Leaking Zod's registration tag here is semantically wrong, so ensure it is stripped.
|
|
2183
2706
|
const inner = z.string().meta({ id: "Inner" });
|
|
2184
2707
|
const result = z.toJSONSchema(z.object({ a: inner, b: inner }), { target: "draft-04" }) as any;
|
|
2185
2708
|
expect(result.definitions?.Inner).toEqual({ type: "string" });
|
|
@@ -2193,9 +2716,52 @@ test("id is stripped from root schema", () => {
|
|
|
2193
2716
|
expect((result as any).id).toBeUndefined();
|
|
2194
2717
|
});
|
|
2195
2718
|
|
|
2719
|
+
test("root schema with id is hoisted into $defs", () => {
|
|
2720
|
+
const A = z.object({ name: z.string() }).meta({ id: "A" });
|
|
2721
|
+
const result = z.toJSONSchema(A);
|
|
2722
|
+
|
|
2723
|
+
expect(result).toEqual({
|
|
2724
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
2725
|
+
$ref: "#/$defs/A",
|
|
2726
|
+
$defs: {
|
|
2727
|
+
A: {
|
|
2728
|
+
type: "object",
|
|
2729
|
+
properties: {
|
|
2730
|
+
name: {
|
|
2731
|
+
type: "string",
|
|
2732
|
+
},
|
|
2733
|
+
},
|
|
2734
|
+
required: ["name"],
|
|
2735
|
+
additionalProperties: false,
|
|
2736
|
+
},
|
|
2737
|
+
},
|
|
2738
|
+
});
|
|
2739
|
+
});
|
|
2740
|
+
|
|
2741
|
+
test("root schema with id uses definitions on legacy targets", () => {
|
|
2742
|
+
const A = z.object({ name: z.string() }).meta({ id: "A" });
|
|
2743
|
+
const result = z.toJSONSchema(A, { target: "draft-07" });
|
|
2744
|
+
|
|
2745
|
+
expect(result).toEqual({
|
|
2746
|
+
$schema: "http://json-schema.org/draft-07/schema#",
|
|
2747
|
+
$ref: "#/definitions/A",
|
|
2748
|
+
definitions: {
|
|
2749
|
+
A: {
|
|
2750
|
+
type: "object",
|
|
2751
|
+
properties: {
|
|
2752
|
+
name: {
|
|
2753
|
+
type: "string",
|
|
2754
|
+
},
|
|
2755
|
+
},
|
|
2756
|
+
required: ["name"],
|
|
2757
|
+
additionalProperties: false,
|
|
2758
|
+
},
|
|
2759
|
+
},
|
|
2760
|
+
});
|
|
2761
|
+
});
|
|
2762
|
+
|
|
2196
2763
|
test("id is observable in override callback", () => {
|
|
2197
|
-
// The strip happens after override callbacks run, so userland override code
|
|
2198
|
-
// can still read `jsonSchema.id` if it wants to.
|
|
2764
|
+
// The strip happens after override callbacks run, so userland override code can still read `jsonSchema.id` if it wants to.
|
|
2199
2765
|
const inner = z.string().meta({ id: "Inner" });
|
|
2200
2766
|
const seenIds: Array<string | undefined> = [];
|
|
2201
2767
|
z.toJSONSchema(z.object({ a: inner }), {
|
|
@@ -2207,8 +2773,7 @@ test("id is observable in override callback", () => {
|
|
|
2207
2773
|
});
|
|
2208
2774
|
|
|
2209
2775
|
test("describe with id on wrapper", () => {
|
|
2210
|
-
// Test that $ref propagation works when processor sets a different ref (readonly -> innerType)
|
|
2211
|
-
// but parent was extracted due to having an id
|
|
2776
|
+
// Test that $ref propagation works when processor sets a different ref (readonly -> innerType) but parent was extracted due to having an id
|
|
2212
2777
|
const roJobId = z.string().readonly().meta({ id: "roJobId" });
|
|
2213
2778
|
|
|
2214
2779
|
const a = z.toJSONSchema(
|
|
@@ -2416,45 +2981,40 @@ test("top-level readonly", () => {
|
|
|
2416
2981
|
// .meta({ id: "B" });
|
|
2417
2982
|
|
|
2418
2983
|
const result = z.toJSONSchema(A);
|
|
2419
|
-
expect(result).
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2984
|
+
expect(result).toEqual({
|
|
2985
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
2986
|
+
$ref: "#/$defs/A",
|
|
2987
|
+
$defs: {
|
|
2988
|
+
A: {
|
|
2989
|
+
additionalProperties: false,
|
|
2990
|
+
properties: {
|
|
2991
|
+
b: {
|
|
2992
|
+
$ref: "#/$defs/B",
|
|
2993
|
+
},
|
|
2994
|
+
name: {
|
|
2995
|
+
type: "string",
|
|
2431
2996
|
},
|
|
2432
|
-
"readOnly": true,
|
|
2433
|
-
"required": [
|
|
2434
|
-
"name",
|
|
2435
|
-
"a",
|
|
2436
|
-
],
|
|
2437
|
-
"type": "object",
|
|
2438
2997
|
},
|
|
2998
|
+
readOnly: true,
|
|
2999
|
+
required: ["name", "b"],
|
|
3000
|
+
type: "object",
|
|
2439
3001
|
},
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
3002
|
+
B: {
|
|
3003
|
+
additionalProperties: false,
|
|
3004
|
+
properties: {
|
|
3005
|
+
a: {
|
|
3006
|
+
$ref: "#/$defs/A",
|
|
3007
|
+
},
|
|
3008
|
+
name: {
|
|
3009
|
+
type: "string",
|
|
3010
|
+
},
|
|
2448
3011
|
},
|
|
3012
|
+
readOnly: true,
|
|
3013
|
+
required: ["name", "a"],
|
|
3014
|
+
type: "object",
|
|
2449
3015
|
},
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
"name",
|
|
2453
|
-
"b",
|
|
2454
|
-
],
|
|
2455
|
-
"type": "object",
|
|
2456
|
-
}
|
|
2457
|
-
`);
|
|
3016
|
+
},
|
|
3017
|
+
});
|
|
2458
3018
|
});
|
|
2459
3019
|
|
|
2460
3020
|
test("basic registry", () => {
|
|
@@ -2531,6 +3091,192 @@ test("basic registry", () => {
|
|
|
2531
3091
|
`);
|
|
2532
3092
|
});
|
|
2533
3093
|
|
|
3094
|
+
test("large registry converts in linear time", () => {
|
|
3095
|
+
const count = 2000;
|
|
3096
|
+
const convert = (withIntersection: boolean) => {
|
|
3097
|
+
const registry = z.registry<{ id: string }>();
|
|
3098
|
+
for (let i = 0; i < count; i++) {
|
|
3099
|
+
registry.add(
|
|
3100
|
+
z.object({ id: z.string(), name: z.string(), count: z.number(), nested: z.object({ a: z.boolean() }) }),
|
|
3101
|
+
{ id: `Type${i}` }
|
|
3102
|
+
);
|
|
3103
|
+
}
|
|
3104
|
+
if (withIntersection) registry.add(z.object({ a: z.string() }).and(z.object({ b: z.string() })), { id: "Inter" });
|
|
3105
|
+
|
|
3106
|
+
const start = performance.now();
|
|
3107
|
+
const { schemas } = z.toJSONSchema(registry, { uri: (id) => `https://example.com/${id}.json` });
|
|
3108
|
+
return { schemas, elapsed: performance.now() - start };
|
|
3109
|
+
};
|
|
3110
|
+
|
|
3111
|
+
const plain = convert(false);
|
|
3112
|
+
expect(Object.keys(plain.schemas)).toHaveLength(count);
|
|
3113
|
+
expect(plain.schemas.Type0).toMatchObject({
|
|
3114
|
+
$id: "https://example.com/Type0.json",
|
|
3115
|
+
type: "object",
|
|
3116
|
+
properties: { nested: { type: "object" } },
|
|
3117
|
+
});
|
|
3118
|
+
expect(plain.schemas[`Type${count - 1}`]!.$id).toBe(`https://example.com/Type${count - 1}.json`);
|
|
3119
|
+
|
|
3120
|
+
// The whole-map passes in extractDefs/finalize used to re-run once per registered schema, which made this quadratic: ~9s of CPU at this size before the passes were hoisted, ~50ms after.
|
|
3121
|
+
expect(plain.elapsed).toBeLessThan(5000);
|
|
3122
|
+
|
|
3123
|
+
// The intersection fold walks the whole map as well, so it has to run inside the same guard. Hoisting it back out costs ~10x at this size. Comparing the two conversions rather than asserting a fixed budget keeps this independent of how fast the machine is.
|
|
3124
|
+
const folded = convert(true);
|
|
3125
|
+
expect(folded.schemas.Inter).toMatchObject({ type: "object", properties: { a: {}, b: {} } });
|
|
3126
|
+
expect(folded.elapsed).toBeLessThan(plain.elapsed * 4 + 100);
|
|
3127
|
+
});
|
|
3128
|
+
|
|
3129
|
+
test("a registry of records with numeric keys converts in linear time", () => {
|
|
3130
|
+
const count = 2000;
|
|
3131
|
+
const convert = (key: (i: number) => z.core.$ZodType) => {
|
|
3132
|
+
const registry = z.registry<{ id: string }>();
|
|
3133
|
+
for (let i = 0; i < count; i++) {
|
|
3134
|
+
registry.add(z.object({ m: z.record(key(i) as z.core.$ZodRecordKey, z.boolean()) }), { id: `Type${i}` });
|
|
3135
|
+
}
|
|
3136
|
+
const start = performance.now();
|
|
3137
|
+
const { schemas } = z.toJSONSchema(registry, { uri: (id) => `https://example.com/${id}.json` });
|
|
3138
|
+
return { schemas, elapsed: performance.now() - start };
|
|
3139
|
+
};
|
|
3140
|
+
|
|
3141
|
+
const string = convert(() => z.string());
|
|
3142
|
+
const numeric = convert(() => z.number());
|
|
3143
|
+
expect(numeric.schemas.Type0).toMatchObject({
|
|
3144
|
+
properties: { m: { propertyNames: { type: "string", pattern: "^-?\\d+(?:\\.\\d+)?$" } } },
|
|
3145
|
+
});
|
|
3146
|
+
|
|
3147
|
+
// The rewrite has to find every carrier the flatten copied `propertyNames` onto, which means a pass over the whole seen map. Running that once per record rather than once per conversion cost ~10x at this size. A string key needs no rewrite at all, so comparing against it keeps this independent of how fast the machine is.
|
|
3148
|
+
expect(numeric.elapsed).toBeLessThan(string.elapsed * 2 + 50);
|
|
3149
|
+
|
|
3150
|
+
// An extracted key resolves through a map built once per conversion rather than a search per reference. There is no stable timing control for that — extraction has its own $defs cost, which swamps the difference — so this only pins the shape.
|
|
3151
|
+
const extracted = convert((i) => z.number().meta({ id: `Key${i}` }));
|
|
3152
|
+
expect(extracted.schemas.Type0).toMatchObject({
|
|
3153
|
+
properties: { m: { propertyNames: { type: "string", pattern: "^-?\\d+(?:\\.\\d+)?$" } } },
|
|
3154
|
+
});
|
|
3155
|
+
});
|
|
3156
|
+
|
|
3157
|
+
test("registry extracts unregistered subschemas into __shared", () => {
|
|
3158
|
+
const registry = z.registry<{ id: string }>();
|
|
3159
|
+
const address = z.object({ street: z.string() }).meta({ id: "Address" });
|
|
3160
|
+
registry.add(z.object({ home: address, work: address }), { id: "Person" });
|
|
3161
|
+
registry.add(z.object({ hq: address }), { id: "Company" });
|
|
3162
|
+
|
|
3163
|
+
const { schemas } = z.toJSONSchema(registry, { uri: (id) => `https://example.com/${id}.json` });
|
|
3164
|
+
|
|
3165
|
+
expect(schemas.__shared).toMatchInlineSnapshot(`
|
|
3166
|
+
{
|
|
3167
|
+
"$defs": {
|
|
3168
|
+
"Address": {
|
|
3169
|
+
"additionalProperties": false,
|
|
3170
|
+
"properties": {
|
|
3171
|
+
"street": {
|
|
3172
|
+
"type": "string",
|
|
3173
|
+
},
|
|
3174
|
+
},
|
|
3175
|
+
"required": [
|
|
3176
|
+
"street",
|
|
3177
|
+
],
|
|
3178
|
+
"type": "object",
|
|
3179
|
+
},
|
|
3180
|
+
},
|
|
3181
|
+
}
|
|
3182
|
+
`);
|
|
3183
|
+
expect(schemas.Person).toMatchInlineSnapshot(`
|
|
3184
|
+
{
|
|
3185
|
+
"$id": "https://example.com/Person.json",
|
|
3186
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3187
|
+
"additionalProperties": false,
|
|
3188
|
+
"properties": {
|
|
3189
|
+
"home": {
|
|
3190
|
+
"$ref": "https://example.com/__shared.json#/$defs/Address",
|
|
3191
|
+
},
|
|
3192
|
+
"work": {
|
|
3193
|
+
"$ref": "https://example.com/__shared.json#/$defs/Address",
|
|
3194
|
+
},
|
|
3195
|
+
},
|
|
3196
|
+
"required": [
|
|
3197
|
+
"home",
|
|
3198
|
+
"work",
|
|
3199
|
+
],
|
|
3200
|
+
"type": "object",
|
|
3201
|
+
}
|
|
3202
|
+
`);
|
|
3203
|
+
// Company is emitted after Person, so it only resolves if the shared $defs built on the first finalize are still reachable — the pass that writes them no longer runs per schema.
|
|
3204
|
+
expect(schemas.Company!.properties!.hq).toEqual({
|
|
3205
|
+
$ref: "https://example.com/__shared.json#/$defs/Address",
|
|
3206
|
+
});
|
|
3207
|
+
});
|
|
3208
|
+
|
|
3209
|
+
test("registry extracts reused subschemas into __shared without an id", () => {
|
|
3210
|
+
const registry = z.registry<{ id: string }>();
|
|
3211
|
+
const shared = z.object({ q: z.string() });
|
|
3212
|
+
registry.add(z.object({ a: shared, b: shared }), { id: "First" });
|
|
3213
|
+
registry.add(z.object({ c: shared }), { id: "Second" });
|
|
3214
|
+
|
|
3215
|
+
const { schemas } = z.toJSONSchema(registry, { uri: (id) => `${id}.json`, reused: "ref" });
|
|
3216
|
+
|
|
3217
|
+
// The id is counter-generated, so this pins that ctx.counter is consumed exactly once.
|
|
3218
|
+
expect(Object.keys(schemas.__shared!.$defs!)).toEqual(["schema0"]);
|
|
3219
|
+
expect(schemas.First!.properties!.a).toEqual({ $ref: "__shared.json#/$defs/schema0" });
|
|
3220
|
+
expect(schemas.Second!.properties!.c).toEqual({ $ref: "__shared.json#/$defs/schema0" });
|
|
3221
|
+
});
|
|
3222
|
+
|
|
3223
|
+
test("JSONSchemaGenerator re-runs shared passes when emit params change", () => {
|
|
3224
|
+
const shared = z.object({ s: z.string() });
|
|
3225
|
+
const a = z.object({ x: shared, y: shared });
|
|
3226
|
+
const registry = z.registry<{ id: string }>();
|
|
3227
|
+
registry.add(a, { id: "A" });
|
|
3228
|
+
|
|
3229
|
+
const gen = new z.core.JSONSchemaGenerator({ target: "draft-2020-12" });
|
|
3230
|
+
gen.process(a);
|
|
3231
|
+
const defs: Record<string, any> = {};
|
|
3232
|
+
const external = { registry, uri: (id: string) => `${id}.json`, defs };
|
|
3233
|
+
|
|
3234
|
+
gen.emit(a, { external, reused: "inline" });
|
|
3235
|
+
// Same `external`, different `reused` — the second emit must still extract `shared`.
|
|
3236
|
+
const second: any = gen.emit(a, { external, reused: "ref" });
|
|
3237
|
+
|
|
3238
|
+
expect(Object.keys(defs)).toEqual(["schema0"]);
|
|
3239
|
+
expect(second.properties.x).toEqual({ $ref: "__shared.json#/$defs/schema0" });
|
|
3240
|
+
expect(second.properties.y).toEqual({ $ref: "__shared.json#/$defs/schema0" });
|
|
3241
|
+
});
|
|
3242
|
+
|
|
3243
|
+
test("JSONSchemaGenerator still throws on cycles when a later emit asks for it", () => {
|
|
3244
|
+
const Node: any = z.object({
|
|
3245
|
+
v: z.string(),
|
|
3246
|
+
get next() {
|
|
3247
|
+
return Node;
|
|
3248
|
+
},
|
|
3249
|
+
});
|
|
3250
|
+
const registry = z.registry<{ id: string }>();
|
|
3251
|
+
registry.add(Node, { id: "Node" });
|
|
3252
|
+
|
|
3253
|
+
const gen = new z.core.JSONSchemaGenerator({ target: "draft-2020-12" });
|
|
3254
|
+
gen.process(Node);
|
|
3255
|
+
const external = { registry, uri: (id: string) => `${id}.json`, defs: {} };
|
|
3256
|
+
|
|
3257
|
+
gen.emit(Node, { external, cycles: "ref" });
|
|
3258
|
+
expect(() => gen.emit(Node, { external, cycles: "throw" })).toThrow(/Cycle detected/);
|
|
3259
|
+
});
|
|
3260
|
+
|
|
3261
|
+
test("JSONSchemaGenerator re-runs shared passes on a no-params emit", () => {
|
|
3262
|
+
const shared = z.object({ s: z.string() });
|
|
3263
|
+
const a = z.object({ x: shared });
|
|
3264
|
+
const registry = z.registry<{ id: string }>();
|
|
3265
|
+
registry.add(a, { id: "A" });
|
|
3266
|
+
|
|
3267
|
+
const gen = new z.core.JSONSchemaGenerator({ target: "draft-2020-12" });
|
|
3268
|
+
gen.process(a);
|
|
3269
|
+
const defs: Record<string, any> = {};
|
|
3270
|
+
gen.emit(a, { external: { registry, uri: (id: string) => `${id}.json`, defs }, reused: "ref" });
|
|
3271
|
+
|
|
3272
|
+
// Re-processing an already-seen schema bumps `seen.count`, which `extractDefs` branches on under `reused: "ref"` — and it returns early, so it cannot clear the guards itself.
|
|
3273
|
+
gen.process(shared);
|
|
3274
|
+
const second: any = gen.emit(a);
|
|
3275
|
+
|
|
3276
|
+
expect(Object.keys(defs)).toEqual(["schema0"]);
|
|
3277
|
+
expect(second.properties.x).toEqual({ $ref: "__shared.json#/$defs/schema0" });
|
|
3278
|
+
});
|
|
3279
|
+
|
|
2534
3280
|
test("_ref", () => {
|
|
2535
3281
|
// const a = z.promise(z.string().describe("a"));
|
|
2536
3282
|
const a = z.toJSONSchema(z.promise(z.string().describe("a")));
|
|
@@ -2627,6 +3373,45 @@ test("defaults/prefaults", () => {
|
|
|
2627
3373
|
`);
|
|
2628
3374
|
});
|
|
2629
3375
|
|
|
3376
|
+
test("catch on a transforming schema", () => {
|
|
3377
|
+
const a = z
|
|
3378
|
+
.string()
|
|
3379
|
+
.transform((val) => val.length)
|
|
3380
|
+
.pipe(z.number())
|
|
3381
|
+
.catch(0);
|
|
3382
|
+
|
|
3383
|
+
expect(z.toJSONSchema(a)).toMatchInlineSnapshot(`
|
|
3384
|
+
{
|
|
3385
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3386
|
+
"default": 0,
|
|
3387
|
+
"type": "number",
|
|
3388
|
+
}
|
|
3389
|
+
`);
|
|
3390
|
+
// catch values are output-typed, so they are not valid input
|
|
3391
|
+
expect(z.toJSONSchema(a, { io: "input" })).toMatchInlineSnapshot(`
|
|
3392
|
+
{
|
|
3393
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3394
|
+
"type": "string",
|
|
3395
|
+
}
|
|
3396
|
+
`);
|
|
3397
|
+
|
|
3398
|
+
// the catch no longer hides the inner transform from ancestors, so their output-typed metadata is stripped too — matching a bare nested transform
|
|
3399
|
+
expect(z.toJSONSchema(z.object({ a }).meta({ examples: [{ a: 1 }] }), { io: "input" })).toMatchInlineSnapshot(`
|
|
3400
|
+
{
|
|
3401
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3402
|
+
"properties": {
|
|
3403
|
+
"a": {
|
|
3404
|
+
"type": "string",
|
|
3405
|
+
},
|
|
3406
|
+
},
|
|
3407
|
+
"required": [
|
|
3408
|
+
"a",
|
|
3409
|
+
],
|
|
3410
|
+
"type": "object",
|
|
3411
|
+
}
|
|
3412
|
+
`);
|
|
3413
|
+
});
|
|
3414
|
+
|
|
2630
3415
|
test("falsy prefaults (false, 0, empty string)", () => {
|
|
2631
3416
|
// boolean prefault false
|
|
2632
3417
|
const a = z.boolean().prefault(false);
|
|
@@ -2686,13 +3471,9 @@ test("input type", () => {
|
|
|
2686
3471
|
"type": "string",
|
|
2687
3472
|
},
|
|
2688
3473
|
"d": {
|
|
2689
|
-
"
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
},
|
|
2693
|
-
{
|
|
2694
|
-
"type": "null",
|
|
2695
|
-
},
|
|
3474
|
+
"type": [
|
|
3475
|
+
"string",
|
|
3476
|
+
"null",
|
|
2696
3477
|
],
|
|
2697
3478
|
},
|
|
2698
3479
|
"e": {
|
|
@@ -2718,19 +3499,13 @@ test("input type", () => {
|
|
|
2718
3499
|
],
|
|
2719
3500
|
},
|
|
2720
3501
|
"i": {
|
|
2721
|
-
"
|
|
2722
|
-
{
|
|
2723
|
-
"type": "string",
|
|
2724
|
-
},
|
|
2725
|
-
{
|
|
2726
|
-
"type": "string",
|
|
2727
|
-
},
|
|
2728
|
-
],
|
|
3502
|
+
"type": "string",
|
|
2729
3503
|
},
|
|
2730
3504
|
},
|
|
2731
3505
|
"required": [
|
|
2732
3506
|
"a",
|
|
2733
3507
|
"d",
|
|
3508
|
+
"f",
|
|
2734
3509
|
"g",
|
|
2735
3510
|
],
|
|
2736
3511
|
"type": "object",
|
|
@@ -2752,13 +3527,9 @@ test("input type", () => {
|
|
|
2752
3527
|
"type": "string",
|
|
2753
3528
|
},
|
|
2754
3529
|
"d": {
|
|
2755
|
-
"
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
},
|
|
2759
|
-
{
|
|
2760
|
-
"type": "null",
|
|
2761
|
-
},
|
|
3530
|
+
"type": [
|
|
3531
|
+
"string",
|
|
3532
|
+
"null",
|
|
2762
3533
|
],
|
|
2763
3534
|
},
|
|
2764
3535
|
"e": {
|
|
@@ -2783,14 +3554,7 @@ test("input type", () => {
|
|
|
2783
3554
|
],
|
|
2784
3555
|
},
|
|
2785
3556
|
"i": {
|
|
2786
|
-
"
|
|
2787
|
-
{
|
|
2788
|
-
"type": "string",
|
|
2789
|
-
},
|
|
2790
|
-
{
|
|
2791
|
-
"type": "string",
|
|
2792
|
-
},
|
|
2793
|
-
],
|
|
3557
|
+
"type": "string",
|
|
2794
3558
|
},
|
|
2795
3559
|
},
|
|
2796
3560
|
"required": [
|
|
@@ -2895,18 +3659,64 @@ test("use output type for preprocess", () => {
|
|
|
2895
3659
|
`);
|
|
2896
3660
|
});
|
|
2897
3661
|
|
|
2898
|
-
test("
|
|
2899
|
-
const
|
|
2900
|
-
|
|
2901
|
-
.
|
|
3662
|
+
test("object property with preprocess stays required in input JSON schema", () => {
|
|
3663
|
+
const schema = z.object({
|
|
3664
|
+
noPreprocess: z.string(),
|
|
3665
|
+
withPreprocess: z.preprocess((v) => v, z.string()),
|
|
3666
|
+
optionalPreprocess: z.preprocess((v) => v, z.string().optional()),
|
|
3667
|
+
});
|
|
2902
3668
|
|
|
2903
|
-
|
|
3669
|
+
// A preprocessed property is only optional when its inner schema is — the
|
|
3670
|
+
// transform wrapper must not make a required property optional in the input
|
|
3671
|
+
// JSON schema (matches runtime: `schema.parse({})` rejects `withPreprocess`).
|
|
3672
|
+
expect(z.toJSONSchema(schema, { io: "input" })).toMatchInlineSnapshot(`
|
|
2904
3673
|
{
|
|
2905
3674
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
2906
|
-
"
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
3675
|
+
"properties": {
|
|
3676
|
+
"noPreprocess": {
|
|
3677
|
+
"type": "string",
|
|
3678
|
+
},
|
|
3679
|
+
"optionalPreprocess": {
|
|
3680
|
+
"type": "string",
|
|
3681
|
+
},
|
|
3682
|
+
"withPreprocess": {
|
|
3683
|
+
"type": "string",
|
|
3684
|
+
},
|
|
3685
|
+
},
|
|
3686
|
+
"required": [
|
|
3687
|
+
"noPreprocess",
|
|
3688
|
+
"withPreprocess",
|
|
3689
|
+
],
|
|
3690
|
+
"type": "object",
|
|
3691
|
+
}
|
|
3692
|
+
`);
|
|
3693
|
+
});
|
|
3694
|
+
|
|
3695
|
+
test("input JSON schema resolves requiredness past transform and catch wrappers", () => {
|
|
3696
|
+
const required = (schema: z.ZodObject) =>
|
|
3697
|
+
(z.toJSONSchema(schema, { io: "input" }) as z.core.JSONSchema.ObjectSchema).required;
|
|
3698
|
+
const id = (v: unknown) => v;
|
|
3699
|
+
|
|
3700
|
+
// catch observes an absent key at runtime, but its declared input type stays required (#5003)
|
|
3701
|
+
expect(required(z.object({ a: z.string().catch("x") }))).toEqual(["a"]);
|
|
3702
|
+
expect(required(z.object({ a: z.string().optional().catch("x") }))).toBeUndefined();
|
|
3703
|
+
// nested preprocess and the legacy transform-pipe form both resolve through to the inner schema
|
|
3704
|
+
expect(required(z.object({ a: z.preprocess(id, z.preprocess(id, z.string())) }))).toEqual(["a"]);
|
|
3705
|
+
expect(required(z.object({ a: z.transform((v: unknown) => String(v)).pipe(z.string()) }))).toEqual(["a"]);
|
|
3706
|
+
});
|
|
3707
|
+
|
|
3708
|
+
test("strip output-side examples from input JSON schema for codec", () => {
|
|
3709
|
+
const codec = z
|
|
3710
|
+
.codec(z.string(), z.number(), { decode: (s) => Number(s), encode: (n) => String(n) })
|
|
3711
|
+
.meta({ examples: [42] });
|
|
3712
|
+
|
|
3713
|
+
expect(z.toJSONSchema(codec, { io: "input" })).toMatchInlineSnapshot(`
|
|
3714
|
+
{
|
|
3715
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3716
|
+
"type": "string",
|
|
3717
|
+
}
|
|
3718
|
+
`);
|
|
3719
|
+
expect(z.toJSONSchema(codec, { io: "output" })).toMatchInlineSnapshot(`
|
|
2910
3720
|
{
|
|
2911
3721
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
2912
3722
|
"examples": [
|
|
@@ -2968,45 +3778,25 @@ test("flatten simple intersections", () => {
|
|
|
2968
3778
|
expect(result).toMatchInlineSnapshot(`
|
|
2969
3779
|
{
|
|
2970
3780
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
2971
|
-
"
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
"type": "number",
|
|
2977
|
-
},
|
|
2978
|
-
},
|
|
2979
|
-
"required": [
|
|
2980
|
-
"testNum",
|
|
2981
|
-
],
|
|
2982
|
-
"type": "object",
|
|
3781
|
+
"additionalProperties": false,
|
|
3782
|
+
"description": "123",
|
|
3783
|
+
"properties": {
|
|
3784
|
+
"testBool": {
|
|
3785
|
+
"type": "boolean",
|
|
2983
3786
|
},
|
|
2984
|
-
{
|
|
2985
|
-
"
|
|
2986
|
-
"properties": {
|
|
2987
|
-
"testStr": {
|
|
2988
|
-
"type": "string",
|
|
2989
|
-
},
|
|
2990
|
-
},
|
|
2991
|
-
"required": [
|
|
2992
|
-
"testStr",
|
|
2993
|
-
],
|
|
2994
|
-
"type": "object",
|
|
3787
|
+
"testNum": {
|
|
3788
|
+
"type": "number",
|
|
2995
3789
|
},
|
|
2996
|
-
{
|
|
2997
|
-
"
|
|
2998
|
-
"properties": {
|
|
2999
|
-
"testBool": {
|
|
3000
|
-
"type": "boolean",
|
|
3001
|
-
},
|
|
3002
|
-
},
|
|
3003
|
-
"required": [
|
|
3004
|
-
"testBool",
|
|
3005
|
-
],
|
|
3006
|
-
"type": "object",
|
|
3790
|
+
"testStr": {
|
|
3791
|
+
"type": "string",
|
|
3007
3792
|
},
|
|
3793
|
+
},
|
|
3794
|
+
"required": [
|
|
3795
|
+
"testNum",
|
|
3796
|
+
"testStr",
|
|
3797
|
+
"testBool",
|
|
3008
3798
|
],
|
|
3009
|
-
"
|
|
3799
|
+
"type": "object",
|
|
3010
3800
|
}
|
|
3011
3801
|
`);
|
|
3012
3802
|
});
|
|
@@ -3123,3 +3913,625 @@ test("recursive lazy with describe does not stack overflow", () => {
|
|
|
3123
3913
|
expect(result).toBeDefined();
|
|
3124
3914
|
expect(result.$defs).toBeDefined();
|
|
3125
3915
|
});
|
|
3916
|
+
|
|
3917
|
+
test("__proto__ shape key is emitted as an own property", () => {
|
|
3918
|
+
const schema = z.object({ ["__proto__"]: z.literal("admin"), role: z.string() });
|
|
3919
|
+
const result = z.toJSONSchema(schema, { io: "input" });
|
|
3920
|
+
|
|
3921
|
+
expect(result.required).toEqual(["__proto__", "role"]);
|
|
3922
|
+
// every required key needs a matching entry in properties
|
|
3923
|
+
for (const key of result.required!) {
|
|
3924
|
+
expect(Object.prototype.hasOwnProperty.call(result.properties, key)).toBe(true);
|
|
3925
|
+
}
|
|
3926
|
+
expect(JSON.parse(JSON.stringify(result)).properties.__proto__).toEqual({ type: "string", const: "admin" });
|
|
3927
|
+
});
|
|
3928
|
+
|
|
3929
|
+
test("__proto__ registry id is emitted as an own entry", () => {
|
|
3930
|
+
const myRegistry = z.registry<{ id: string }>();
|
|
3931
|
+
myRegistry.add(z.object({ a: z.string() }), { id: "__proto__" });
|
|
3932
|
+
myRegistry.add(z.object({ b: z.string() }), { id: "normal" });
|
|
3933
|
+
|
|
3934
|
+
expect(Object.keys(z.toJSONSchema(myRegistry).schemas)).toEqual(["__proto__", "normal"]);
|
|
3935
|
+
});
|
|
3936
|
+
|
|
3937
|
+
test("__proto__ def id emits a resolvable $ref", () => {
|
|
3938
|
+
const myRegistry = z.registry<{ id: string }>();
|
|
3939
|
+
const Inner = z.object({ x: z.string() });
|
|
3940
|
+
myRegistry.add(Inner, { id: "__proto__" });
|
|
3941
|
+
|
|
3942
|
+
const json = JSON.parse(JSON.stringify(z.toJSONSchema(z.object({ a: Inner, b: Inner }), { metadata: myRegistry })));
|
|
3943
|
+
expect(json.properties.a.$ref).toBe("#/$defs/__proto__");
|
|
3944
|
+
expect(json.$defs.__proto__).toBeDefined();
|
|
3945
|
+
});
|
|
3946
|
+
|
|
3947
|
+
test("__proto__ patternProperties key is emitted as an own property", () => {
|
|
3948
|
+
const result = z.toJSONSchema(z.looseRecord(z.string().regex(/__proto__/), z.string()));
|
|
3949
|
+
|
|
3950
|
+
expect(Object.getPrototypeOf(result.patternProperties)).toBe(Object.prototype);
|
|
3951
|
+
expect(Object.prototype.hasOwnProperty.call(result.patternProperties, "__proto__")).toBe(true);
|
|
3952
|
+
expect(result.patternProperties?.__proto__).toEqual({ type: "string" });
|
|
3953
|
+
});
|
|
3954
|
+
|
|
3955
|
+
test("__proto__ metadata survives direct and wrapper metadata merges", () => {
|
|
3956
|
+
for (const schema of [z.string(), z.readonly(z.string())]) {
|
|
3957
|
+
const registry = z.registry<Record<string, unknown>>();
|
|
3958
|
+
registry.add(schema, Object.fromEntries([["__proto__", { marker: true }]]));
|
|
3959
|
+
|
|
3960
|
+
const result: any = z.toJSONSchema(schema, { metadata: registry });
|
|
3961
|
+
expect(Object.getPrototypeOf(result)).toBe(Object.prototype);
|
|
3962
|
+
expect(Object.prototype.hasOwnProperty.call(result, "__proto__")).toBe(true);
|
|
3963
|
+
expect(result.__proto__).toEqual({ marker: true });
|
|
3964
|
+
expect(JSON.parse(JSON.stringify(result)).__proto__).toEqual({ marker: true });
|
|
3965
|
+
}
|
|
3966
|
+
});
|
|
3967
|
+
|
|
3968
|
+
test("partialRecord does not require finite keys", () => {
|
|
3969
|
+
const result = z.toJSONSchema(z.partialRecord(z.enum(["__proto__", "b"]), z.string()));
|
|
3970
|
+
|
|
3971
|
+
expect(result.required).toBeUndefined();
|
|
3972
|
+
expect(result.propertyNames).toEqual({ type: "string", enum: ["__proto__", "b"] });
|
|
3973
|
+
expect(result.additionalProperties).toEqual({ type: "string" });
|
|
3974
|
+
});
|
|
3975
|
+
|
|
3976
|
+
describe("unrepresentable callback", () => {
|
|
3977
|
+
test("is consulted for every unrepresentable type", () => {
|
|
3978
|
+
const seen: string[] = [];
|
|
3979
|
+
const collect: z.core.UnrepresentableHandler<z.core.$ZodTypes> = ({ zodSchema }) => {
|
|
3980
|
+
seen.push(zodSchema._zod.def.type);
|
|
3981
|
+
return "any";
|
|
3982
|
+
};
|
|
3983
|
+
|
|
3984
|
+
const schemas = [
|
|
3985
|
+
z.bigint(),
|
|
3986
|
+
z.symbol(),
|
|
3987
|
+
z.undefined(),
|
|
3988
|
+
z.void(),
|
|
3989
|
+
z.date(),
|
|
3990
|
+
z.nan(),
|
|
3991
|
+
z.custom<string>(),
|
|
3992
|
+
z.map(z.string(), z.string()),
|
|
3993
|
+
z.set(z.string()),
|
|
3994
|
+
z.transform((x: unknown) => x),
|
|
3995
|
+
z.literal([undefined]),
|
|
3996
|
+
z.literal([1n]),
|
|
3997
|
+
z.string().catch(() => {
|
|
3998
|
+
throw new Error("dynamic");
|
|
3999
|
+
}),
|
|
4000
|
+
// z.function() is not a ZodType, but its processor is reachable through the same path
|
|
4001
|
+
z.function() as unknown as z.ZodType,
|
|
4002
|
+
];
|
|
4003
|
+
for (const schema of schemas) z.toJSONSchema(schema, { unrepresentable: collect });
|
|
4004
|
+
|
|
4005
|
+
expect(seen).toEqual([
|
|
4006
|
+
"bigint",
|
|
4007
|
+
"symbol",
|
|
4008
|
+
"undefined",
|
|
4009
|
+
"void",
|
|
4010
|
+
"date",
|
|
4011
|
+
"nan",
|
|
4012
|
+
"custom",
|
|
4013
|
+
"map",
|
|
4014
|
+
"set",
|
|
4015
|
+
"transform",
|
|
4016
|
+
"literal",
|
|
4017
|
+
"literal",
|
|
4018
|
+
"catch",
|
|
4019
|
+
"function",
|
|
4020
|
+
]);
|
|
4021
|
+
});
|
|
4022
|
+
|
|
4023
|
+
test("returned JSON Schema replaces the unrepresentable node", () => {
|
|
4024
|
+
// the motivating case: represent dates, keep throwing for everything else
|
|
4025
|
+
const params: z.core.ToJSONSchemaParams = {
|
|
4026
|
+
unrepresentable: ({ zodSchema }) =>
|
|
4027
|
+
zodSchema._zod.def.type === "date" ? { type: "string", format: "date-time" } : "throw",
|
|
4028
|
+
};
|
|
4029
|
+
expect(z.toJSONSchema(z.object({ when: z.date() }), params)).toMatchInlineSnapshot(`
|
|
4030
|
+
{
|
|
4031
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4032
|
+
"additionalProperties": false,
|
|
4033
|
+
"properties": {
|
|
4034
|
+
"when": {
|
|
4035
|
+
"format": "date-time",
|
|
4036
|
+
"type": "string",
|
|
4037
|
+
},
|
|
4038
|
+
},
|
|
4039
|
+
"required": [
|
|
4040
|
+
"when",
|
|
4041
|
+
],
|
|
4042
|
+
"type": "object",
|
|
4043
|
+
}
|
|
4044
|
+
`);
|
|
4045
|
+
expect(() => z.toJSONSchema(z.object({ id: z.bigint() }), params)).toThrow(
|
|
4046
|
+
"BigInt cannot be represented in JSON Schema"
|
|
4047
|
+
);
|
|
4048
|
+
});
|
|
4049
|
+
|
|
4050
|
+
test("`throw` and `undefined` returns produce the default error", () => {
|
|
4051
|
+
expect(() => z.toJSONSchema(z.date(), { unrepresentable: () => "throw" })).toThrow(
|
|
4052
|
+
"Date cannot be represented in JSON Schema"
|
|
4053
|
+
);
|
|
4054
|
+
expect(() => z.toJSONSchema(z.date(), { unrepresentable: () => undefined })).toThrow(
|
|
4055
|
+
"Date cannot be represented in JSON Schema"
|
|
4056
|
+
);
|
|
4057
|
+
});
|
|
4058
|
+
|
|
4059
|
+
test("`any` return matches the string option", () => {
|
|
4060
|
+
expect(z.toJSONSchema(z.date(), { unrepresentable: () => "any" })).toEqual(
|
|
4061
|
+
z.toJSONSchema(z.date(), { unrepresentable: "any" })
|
|
4062
|
+
);
|
|
4063
|
+
});
|
|
4064
|
+
|
|
4065
|
+
test("`message` distinguishes sites that share a schema", () => {
|
|
4066
|
+
const seen: string[] = [];
|
|
4067
|
+
expect(
|
|
4068
|
+
z.toJSONSchema(z.literal([undefined, 1n, "a"]), {
|
|
4069
|
+
unrepresentable: ({ zodSchema, message }) => {
|
|
4070
|
+
seen.push(`${zodSchema._zod.def.type}: ${message}`);
|
|
4071
|
+
return "any";
|
|
4072
|
+
},
|
|
4073
|
+
})
|
|
4074
|
+
).toMatchInlineSnapshot(`
|
|
4075
|
+
{
|
|
4076
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4077
|
+
"enum": [
|
|
4078
|
+
1,
|
|
4079
|
+
"a",
|
|
4080
|
+
],
|
|
4081
|
+
}
|
|
4082
|
+
`);
|
|
4083
|
+
// same `zodSchema`, different message -- the only way to tell the two literal sites apart
|
|
4084
|
+
expect(seen).toEqual([
|
|
4085
|
+
"literal: Literal `undefined` cannot be represented in JSON Schema",
|
|
4086
|
+
"literal: BigInt literals cannot be represented in JSON Schema",
|
|
4087
|
+
]);
|
|
4088
|
+
});
|
|
4089
|
+
|
|
4090
|
+
test("errors thrown by the callback propagate", () => {
|
|
4091
|
+
expect(() =>
|
|
4092
|
+
z.toJSONSchema(z.object({ when: z.date() }), {
|
|
4093
|
+
unrepresentable: ({ zodSchema, path }) => {
|
|
4094
|
+
throw new Error(`${zodSchema._zod.def.type} at /${path.join("/")}`);
|
|
4095
|
+
},
|
|
4096
|
+
})
|
|
4097
|
+
).toThrow("date at /properties/when");
|
|
4098
|
+
});
|
|
4099
|
+
|
|
4100
|
+
test("runs before `override`", () => {
|
|
4101
|
+
const order: string[] = [];
|
|
4102
|
+
expect(
|
|
4103
|
+
z.toJSONSchema(z.date(), {
|
|
4104
|
+
unrepresentable: () => {
|
|
4105
|
+
order.push("unrepresentable");
|
|
4106
|
+
return { type: "string" };
|
|
4107
|
+
},
|
|
4108
|
+
override: (ctx) => {
|
|
4109
|
+
order.push("override");
|
|
4110
|
+
if (ctx.jsonSchema.type === "string") ctx.jsonSchema.format = "date-time";
|
|
4111
|
+
},
|
|
4112
|
+
})
|
|
4113
|
+
).toMatchInlineSnapshot(`
|
|
4114
|
+
{
|
|
4115
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4116
|
+
"format": "date-time",
|
|
4117
|
+
"type": "string",
|
|
4118
|
+
}
|
|
4119
|
+
`);
|
|
4120
|
+
expect(order).toEqual(["unrepresentable", "override"]);
|
|
4121
|
+
});
|
|
4122
|
+
|
|
4123
|
+
test("a returned schema replaces the whole literal", () => {
|
|
4124
|
+
expect(
|
|
4125
|
+
z.toJSONSchema(z.literal(["a", 1n]), {
|
|
4126
|
+
unrepresentable: () => ({ type: "string", pattern: "^\\d+$" }),
|
|
4127
|
+
})
|
|
4128
|
+
).toMatchInlineSnapshot(`
|
|
4129
|
+
{
|
|
4130
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4131
|
+
"pattern": "^\\d+$",
|
|
4132
|
+
"type": "string",
|
|
4133
|
+
}
|
|
4134
|
+
`);
|
|
4135
|
+
|
|
4136
|
+
// "any" keeps the existing per-value behavior: undefined dropped, bigint coerced
|
|
4137
|
+
expect(z.toJSONSchema(z.literal(["a", 1n, undefined]), { unrepresentable: () => "any" })).toEqual(
|
|
4138
|
+
z.toJSONSchema(z.literal(["a", 1n, undefined]), { unrepresentable: "any" })
|
|
4139
|
+
);
|
|
4140
|
+
});
|
|
4141
|
+
|
|
4142
|
+
const dateToString: z.core.ToJSONSchemaParams["unrepresentable"] = ({ zodSchema }) =>
|
|
4143
|
+
zodSchema._zod.def.type === "date" ? { type: "string", format: "date-time" } : "throw";
|
|
4144
|
+
|
|
4145
|
+
test("emits a valid OpenAPI 3.0 schema", async () => {
|
|
4146
|
+
const jsonSchema = z.toJSONSchema(z.object({ start: z.date() }), {
|
|
4147
|
+
target: "openapi-3.0",
|
|
4148
|
+
unrepresentable: dateToString,
|
|
4149
|
+
});
|
|
4150
|
+
expect(jsonSchema).toMatchInlineSnapshot(`
|
|
4151
|
+
{
|
|
4152
|
+
"additionalProperties": false,
|
|
4153
|
+
"properties": {
|
|
4154
|
+
"start": {
|
|
4155
|
+
"format": "date-time",
|
|
4156
|
+
"type": "string",
|
|
4157
|
+
},
|
|
4158
|
+
},
|
|
4159
|
+
"required": [
|
|
4160
|
+
"start",
|
|
4161
|
+
],
|
|
4162
|
+
"type": "object",
|
|
4163
|
+
}
|
|
4164
|
+
`);
|
|
4165
|
+
await expect(validateOpenAPI30Schema(jsonSchema)).resolves.toBe(true);
|
|
4166
|
+
});
|
|
4167
|
+
|
|
4168
|
+
test("the returned schema survives extraction into $defs", () => {
|
|
4169
|
+
const When = z.date().meta({ id: "When" });
|
|
4170
|
+
expect(
|
|
4171
|
+
z.toJSONSchema(z.object({ start: When, end: When }), { unrepresentable: dateToString })
|
|
4172
|
+
).toMatchInlineSnapshot(`
|
|
4173
|
+
{
|
|
4174
|
+
"$defs": {
|
|
4175
|
+
"When": {
|
|
4176
|
+
"format": "date-time",
|
|
4177
|
+
"type": "string",
|
|
4178
|
+
},
|
|
4179
|
+
},
|
|
4180
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4181
|
+
"additionalProperties": false,
|
|
4182
|
+
"properties": {
|
|
4183
|
+
"end": {
|
|
4184
|
+
"$ref": "#/$defs/When",
|
|
4185
|
+
},
|
|
4186
|
+
"start": {
|
|
4187
|
+
"$ref": "#/$defs/When",
|
|
4188
|
+
},
|
|
4189
|
+
},
|
|
4190
|
+
"required": [
|
|
4191
|
+
"start",
|
|
4192
|
+
"end",
|
|
4193
|
+
],
|
|
4194
|
+
"type": "object",
|
|
4195
|
+
}
|
|
4196
|
+
`);
|
|
4197
|
+
});
|
|
4198
|
+
|
|
4199
|
+
test("applies to dynamic catch values", () => {
|
|
4200
|
+
const schema = z.string().catch(() => {
|
|
4201
|
+
throw new Error("dynamic");
|
|
4202
|
+
});
|
|
4203
|
+
expect(
|
|
4204
|
+
z.toJSONSchema(schema, {
|
|
4205
|
+
unrepresentable: () => ({ default: "fallback" }),
|
|
4206
|
+
})
|
|
4207
|
+
).toMatchInlineSnapshot(`
|
|
4208
|
+
{
|
|
4209
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4210
|
+
"default": "fallback",
|
|
4211
|
+
"type": "string",
|
|
4212
|
+
}
|
|
4213
|
+
`);
|
|
4214
|
+
});
|
|
4215
|
+
});
|
|
4216
|
+
|
|
4217
|
+
describe("intersection folding", () => {
|
|
4218
|
+
const TARGETS = ["draft-2020-12", "draft-07", "draft-04", "openapi-3.0"] as const;
|
|
4219
|
+
const body = (schema: z.ZodType, params?: Parameters<typeof z.toJSONSchema>[1]) => {
|
|
4220
|
+
const { $schema, ...rest } = z.toJSONSchema(schema, params) as Record<string, unknown>;
|
|
4221
|
+
return rest;
|
|
4222
|
+
};
|
|
4223
|
+
|
|
4224
|
+
test("two objects become one object", () => {
|
|
4225
|
+
expect(body(z.object({ name: z.string() }).and(z.object({ age: z.number() })))).toMatchInlineSnapshot(`
|
|
4226
|
+
{
|
|
4227
|
+
"additionalProperties": false,
|
|
4228
|
+
"properties": {
|
|
4229
|
+
"age": {
|
|
4230
|
+
"type": "number",
|
|
4231
|
+
},
|
|
4232
|
+
"name": {
|
|
4233
|
+
"type": "string",
|
|
4234
|
+
},
|
|
4235
|
+
},
|
|
4236
|
+
"required": [
|
|
4237
|
+
"name",
|
|
4238
|
+
"age",
|
|
4239
|
+
],
|
|
4240
|
+
"type": "object",
|
|
4241
|
+
}
|
|
4242
|
+
`);
|
|
4243
|
+
});
|
|
4244
|
+
|
|
4245
|
+
test("the folded shape is identical on every target", () => {
|
|
4246
|
+
const schema = z.object({ name: z.string() }).and(z.object({ age: z.number() }));
|
|
4247
|
+
const bodies = TARGETS.map((target) => body(schema, { target }));
|
|
4248
|
+
for (const emitted of bodies) expect(emitted).toEqual(bodies[0]);
|
|
4249
|
+
});
|
|
4250
|
+
|
|
4251
|
+
test("closed only when every member is closed", () => {
|
|
4252
|
+
expect(body(z.strictObject({ a: z.string() }).and(z.strictObject({ b: z.number() })))).toMatchObject({
|
|
4253
|
+
additionalProperties: false,
|
|
4254
|
+
});
|
|
4255
|
+
// A loose member keeps the intersection open, which is what the parser does: it merges both results, so the loose side's extra keys survive.
|
|
4256
|
+
expect(body(z.looseObject({ a: z.string() }).and(z.object({ b: z.number() })))).not.toHaveProperty(
|
|
4257
|
+
"additionalProperties"
|
|
4258
|
+
);
|
|
4259
|
+
});
|
|
4260
|
+
|
|
4261
|
+
test("chained and nested intersections fold flat", () => {
|
|
4262
|
+
const chained = z
|
|
4263
|
+
.object({ a: z.string() })
|
|
4264
|
+
.and(z.object({ b: z.string() }))
|
|
4265
|
+
.and(z.object({ c: z.string() }));
|
|
4266
|
+
expect(body(chained)).toMatchObject({ properties: { a: {}, b: {}, c: {} }, required: ["a", "b", "c"] });
|
|
4267
|
+
const nested = z.object({ a: z.string() }).and(z.object({ b: z.string() }).and(z.object({ c: z.string() })));
|
|
4268
|
+
expect(body(nested)).toEqual(body(chained));
|
|
4269
|
+
});
|
|
4270
|
+
|
|
4271
|
+
test("required is the union, and an optional key stays optional", () => {
|
|
4272
|
+
expect(body(z.object({ a: z.string().optional() }).and(z.object({ b: z.string() })))).toMatchObject({
|
|
4273
|
+
properties: { a: { type: "string" }, b: { type: "string" } },
|
|
4274
|
+
required: ["b"],
|
|
4275
|
+
});
|
|
4276
|
+
});
|
|
4277
|
+
|
|
4278
|
+
test("a key both members declare has to satisfy both", () => {
|
|
4279
|
+
// identical declarations collapse
|
|
4280
|
+
expect(body(z.object({ k: z.string() }).and(z.object({ k: z.string() })))).toMatchObject({
|
|
4281
|
+
properties: { k: { type: "string" } },
|
|
4282
|
+
});
|
|
4283
|
+
// object declarations fold, matching the parser's deep merge
|
|
4284
|
+
expect(
|
|
4285
|
+
body(z.object({ k: z.object({ a: z.string() }) }).and(z.object({ k: z.object({ b: z.string() }) })))
|
|
4286
|
+
).toMatchObject({
|
|
4287
|
+
properties: { k: { type: "object", properties: { a: {}, b: {} }, required: ["a", "b"] } },
|
|
4288
|
+
});
|
|
4289
|
+
// anything else stays an intersection one level down
|
|
4290
|
+
expect(body(z.object({ k: z.string() }).and(z.object({ k: z.number() })))).toMatchObject({
|
|
4291
|
+
properties: { k: { allOf: [{ type: "string" }, { type: "number" }] } },
|
|
4292
|
+
});
|
|
4293
|
+
});
|
|
4294
|
+
|
|
4295
|
+
test("an intersection distributes over a union", () => {
|
|
4296
|
+
const schema = z
|
|
4297
|
+
.object({ name: z.string() })
|
|
4298
|
+
.and(
|
|
4299
|
+
z.discriminatedUnion("type", [
|
|
4300
|
+
z.object({ type: z.literal("a"), value: z.string() }),
|
|
4301
|
+
z.object({ type: z.literal("b"), count: z.number() }),
|
|
4302
|
+
])
|
|
4303
|
+
);
|
|
4304
|
+
expect(body(schema)).toMatchObject({
|
|
4305
|
+
oneOf: [
|
|
4306
|
+
{ type: "object", properties: { name: {}, type: {}, value: {} }, additionalProperties: false },
|
|
4307
|
+
{ type: "object", properties: { name: {}, type: {}, count: {} }, additionalProperties: false },
|
|
4308
|
+
],
|
|
4309
|
+
});
|
|
4310
|
+
const inclusive = z
|
|
4311
|
+
.object({ name: z.string() })
|
|
4312
|
+
.and(z.union([z.object({ v: z.string() }), z.object({ c: z.number() })]));
|
|
4313
|
+
expect(body(inclusive)).toMatchObject({
|
|
4314
|
+
anyOf: [{ properties: { name: {}, v: {} } }, { properties: { name: {}, c: {} } }],
|
|
4315
|
+
});
|
|
4316
|
+
});
|
|
4317
|
+
|
|
4318
|
+
test("input conversion has nothing to close", () => {
|
|
4319
|
+
expect(body(z.object({ a: z.string() }).and(z.object({ b: z.string() })), { io: "input" })).toEqual({
|
|
4320
|
+
type: "object",
|
|
4321
|
+
properties: { a: { type: "string" }, b: { type: "string" } },
|
|
4322
|
+
required: ["a", "b"],
|
|
4323
|
+
});
|
|
4324
|
+
});
|
|
4325
|
+
|
|
4326
|
+
test("folds through a property and through z.lazy", () => {
|
|
4327
|
+
expect(body(z.object({ inner: z.object({ a: z.string() }).and(z.object({ b: z.string() })) }))).toMatchObject({
|
|
4328
|
+
properties: { inner: { type: "object", properties: { a: {}, b: {} } } },
|
|
4329
|
+
});
|
|
4330
|
+
const self: z.ZodType = z.lazy(() => z.object({ a: z.string() }).and(z.object({ next: z.optional(self) })));
|
|
4331
|
+
expect(body(self)).toMatchObject({ type: "object", properties: { a: {}, next: { $ref: "#" } } });
|
|
4332
|
+
});
|
|
4333
|
+
|
|
4334
|
+
test("metadata on the intersection itself survives", () => {
|
|
4335
|
+
expect(
|
|
4336
|
+
body(
|
|
4337
|
+
z
|
|
4338
|
+
.object({ a: z.string() })
|
|
4339
|
+
.and(z.object({ b: z.string() }))
|
|
4340
|
+
.meta({ title: "T" })
|
|
4341
|
+
)
|
|
4342
|
+
).toMatchObject({
|
|
4343
|
+
title: "T",
|
|
4344
|
+
type: "object",
|
|
4345
|
+
properties: { a: {}, b: {} },
|
|
4346
|
+
});
|
|
4347
|
+
});
|
|
4348
|
+
|
|
4349
|
+
test("a catchall constrains the sibling's keys too", () => {
|
|
4350
|
+
// The catchall member does not declare `b`, so its `additionalProperties` is what it demands of `b`. Folding `b` into `properties` has to carry that demand across, or the key would escape it.
|
|
4351
|
+
const schema = z
|
|
4352
|
+
.object({ a: z.string() })
|
|
4353
|
+
.catchall(z.number())
|
|
4354
|
+
.and(z.object({ b: z.string() }));
|
|
4355
|
+
expect(body(schema)).toEqual({
|
|
4356
|
+
type: "object",
|
|
4357
|
+
properties: { a: { type: "string" }, b: { allOf: [{ type: "number" }, { type: "string" }] } },
|
|
4358
|
+
required: ["a", "b"],
|
|
4359
|
+
additionalProperties: { type: "number" },
|
|
4360
|
+
});
|
|
4361
|
+
});
|
|
4362
|
+
|
|
4363
|
+
test("two catchalls both constrain the keys neither declares", () => {
|
|
4364
|
+
const schema = z
|
|
4365
|
+
.object({})
|
|
4366
|
+
.catchall(z.number())
|
|
4367
|
+
.and(z.object({}).catchall(z.number().min(0)));
|
|
4368
|
+
expect(body(schema)).toEqual({
|
|
4369
|
+
type: "object",
|
|
4370
|
+
properties: {},
|
|
4371
|
+
additionalProperties: { allOf: [{ type: "number" }, { type: "number", minimum: 0 }] },
|
|
4372
|
+
});
|
|
4373
|
+
expect(schema.safeParse({ zz: 5 }).success).toBe(true);
|
|
4374
|
+
expect(schema.safeParse({ zz: -1 }).success).toBe(false);
|
|
4375
|
+
});
|
|
4376
|
+
|
|
4377
|
+
test("the emitted openness agrees with the parser for every pair of object modes", () => {
|
|
4378
|
+
const modes = {
|
|
4379
|
+
strip: (shape: z.ZodRawShape) => z.object(shape),
|
|
4380
|
+
strict: (shape: z.ZodRawShape) => z.strictObject(shape),
|
|
4381
|
+
loose: (shape: z.ZodRawShape) => z.looseObject(shape),
|
|
4382
|
+
catchall: (shape: z.ZodRawShape) => z.object(shape).catchall(z.number()),
|
|
4383
|
+
};
|
|
4384
|
+
const grid: Record<string, unknown> = {};
|
|
4385
|
+
for (const [leftName, left] of Object.entries(modes)) {
|
|
4386
|
+
for (const [rightName, right] of Object.entries(modes)) {
|
|
4387
|
+
const schema = left({ a: z.string() }).and(right({ b: z.number() }));
|
|
4388
|
+
const emitted = body(schema) as { additionalProperties?: unknown };
|
|
4389
|
+
grid[`${leftName} & ${rightName}`] = emitted.additionalProperties ?? "open";
|
|
4390
|
+
|
|
4391
|
+
// Whatever the emitted keyword says, it has to agree with what the parser does with a key neither member declares.
|
|
4392
|
+
const parsed = schema.safeParse({ a: "s", b: 1, zz: 7 });
|
|
4393
|
+
const keepsUnknown = parsed.success && Object.prototype.hasOwnProperty.call(parsed.data, "zz");
|
|
4394
|
+
if (keepsUnknown) expect(emitted.additionalProperties).not.toBe(false);
|
|
4395
|
+
}
|
|
4396
|
+
}
|
|
4397
|
+
expect(grid).toMatchInlineSnapshot(`
|
|
4398
|
+
{
|
|
4399
|
+
"catchall & catchall": {
|
|
4400
|
+
"type": "number",
|
|
4401
|
+
},
|
|
4402
|
+
"catchall & loose": {
|
|
4403
|
+
"type": "number",
|
|
4404
|
+
},
|
|
4405
|
+
"catchall & strict": {
|
|
4406
|
+
"type": "number",
|
|
4407
|
+
},
|
|
4408
|
+
"catchall & strip": {
|
|
4409
|
+
"type": "number",
|
|
4410
|
+
},
|
|
4411
|
+
"loose & catchall": {
|
|
4412
|
+
"type": "number",
|
|
4413
|
+
},
|
|
4414
|
+
"loose & loose": "open",
|
|
4415
|
+
"loose & strict": "open",
|
|
4416
|
+
"loose & strip": "open",
|
|
4417
|
+
"strict & catchall": {
|
|
4418
|
+
"type": "number",
|
|
4419
|
+
},
|
|
4420
|
+
"strict & loose": "open",
|
|
4421
|
+
"strict & strict": false,
|
|
4422
|
+
"strict & strip": false,
|
|
4423
|
+
"strip & catchall": {
|
|
4424
|
+
"type": "number",
|
|
4425
|
+
},
|
|
4426
|
+
"strip & loose": "open",
|
|
4427
|
+
"strip & strict": false,
|
|
4428
|
+
"strip & strip": false,
|
|
4429
|
+
}
|
|
4430
|
+
`);
|
|
4431
|
+
});
|
|
4432
|
+
|
|
4433
|
+
test("a __proto__ key stays an own property", () => {
|
|
4434
|
+
const folded = body(z.object({ ["__proto__"]: z.string() }).and(z.object({ b: z.number() }))) as any;
|
|
4435
|
+
expect(Object.prototype.hasOwnProperty.call(folded.properties, "__proto__")).toBe(true);
|
|
4436
|
+
expect(folded.required).toEqual(["__proto__", "b"]);
|
|
4437
|
+
});
|
|
4438
|
+
});
|
|
4439
|
+
|
|
4440
|
+
describe("intersection folding declines", () => {
|
|
4441
|
+
// Every case here keeps the `allOf` it produces today. The fold only understands the four object keywords, so a member carrying anything else is left alone rather than having a constraint dropped or an annotation re-scoped.
|
|
4442
|
+
const allOf = (schema: z.ZodType, params?: Parameters<typeof z.toJSONSchema>[1]) =>
|
|
4443
|
+
(z.toJSONSchema(schema, params) as any).allOf;
|
|
4444
|
+
|
|
4445
|
+
test("a member that is a reference keeps its reference", () => {
|
|
4446
|
+
const named = z.object({ a: z.string() }).meta({ id: "Named" });
|
|
4447
|
+
expect(allOf(named.and(z.object({ b: z.string() })))[0]).toEqual({ $ref: "#/$defs/Named" });
|
|
4448
|
+
|
|
4449
|
+
const shared = z.object({ c: z.string() });
|
|
4450
|
+
const reused = z.toJSONSchema(z.object({ x: shared.and(z.object({ d: z.string() })), y: shared }), {
|
|
4451
|
+
reused: "ref",
|
|
4452
|
+
}) as any;
|
|
4453
|
+
expect(reused.properties.x.allOf[0]).toEqual({ $ref: "#/$defs/__schema0" });
|
|
4454
|
+
|
|
4455
|
+
const cyclic: any = z.object({
|
|
4456
|
+
get next() {
|
|
4457
|
+
return z.optional(cyclic);
|
|
4458
|
+
},
|
|
4459
|
+
n: z.string(),
|
|
4460
|
+
});
|
|
4461
|
+
expect(allOf(cyclic.and(z.object({ m: z.string() })))[0].$ref).toBe("#/$defs/__schema0");
|
|
4462
|
+
});
|
|
4463
|
+
|
|
4464
|
+
test("an annotated member keeps its place", () => {
|
|
4465
|
+
expect(
|
|
4466
|
+
allOf(
|
|
4467
|
+
z
|
|
4468
|
+
.object({ a: z.string() })
|
|
4469
|
+
.describe("A")
|
|
4470
|
+
.and(z.object({ b: z.string() }))
|
|
4471
|
+
)[0]
|
|
4472
|
+
).toMatchObject({
|
|
4473
|
+
description: "A",
|
|
4474
|
+
});
|
|
4475
|
+
});
|
|
4476
|
+
|
|
4477
|
+
test("members that are not plain objects are left alone", () => {
|
|
4478
|
+
expect(allOf(z.intersection(z.string().min(2), z.string().max(5)))).toHaveLength(2);
|
|
4479
|
+
expect(allOf(z.object({ a: z.string() }).and(z.nullable(z.object({ b: z.string() }))))).toHaveLength(2);
|
|
4480
|
+
expect(
|
|
4481
|
+
allOf(z.object({ label: z.string() }).and(z.looseRecord(z.string().regex(/^label:[a-z]{2}$/), z.string())))
|
|
4482
|
+
).toHaveLength(2);
|
|
4483
|
+
});
|
|
4484
|
+
|
|
4485
|
+
test("a shared member is never rewritten for its other uses", () => {
|
|
4486
|
+
const shared = z.object({ c: z.string() });
|
|
4487
|
+
const result = z.toJSONSchema(z.object({ x: shared.and(z.object({ d: z.string() })), y: shared })) as any;
|
|
4488
|
+
expect(result.properties.x).toMatchObject({ properties: { c: {}, d: {} }, additionalProperties: false });
|
|
4489
|
+
// `y` is the same Zod schema, emitted separately, and keeps the closedness it had on its own.
|
|
4490
|
+
expect(result.properties.y).toEqual({
|
|
4491
|
+
type: "object",
|
|
4492
|
+
properties: { c: { type: "string" } },
|
|
4493
|
+
required: ["c"],
|
|
4494
|
+
additionalProperties: false,
|
|
4495
|
+
});
|
|
4496
|
+
});
|
|
4497
|
+
|
|
4498
|
+
test("registry conversion keeps its cross-references", () => {
|
|
4499
|
+
const registry = z.registry<{ id: string }>();
|
|
4500
|
+
const left = z.object({ p: z.string() });
|
|
4501
|
+
const right = z.object({ q: z.string() });
|
|
4502
|
+
registry.add(left, { id: "P" });
|
|
4503
|
+
registry.add(right, { id: "Q" });
|
|
4504
|
+
registry.add(left.and(right), { id: "PQ" });
|
|
4505
|
+
expect((z.toJSONSchema(registry) as any).schemas.PQ.allOf).toEqual([{ $ref: "P" }, { $ref: "Q" }]);
|
|
4506
|
+
});
|
|
4507
|
+
|
|
4508
|
+
test("override still runs, and sees the intersection before it folds", () => {
|
|
4509
|
+
const schema = z.object({ a: z.string() }).and(z.object({ b: z.string() }));
|
|
4510
|
+
const result = z.toJSONSchema(schema, {
|
|
4511
|
+
override(ctx) {
|
|
4512
|
+
if ((ctx.jsonSchema as any).allOf) (ctx.jsonSchema as any).title = "intersection";
|
|
4513
|
+
},
|
|
4514
|
+
}) as any;
|
|
4515
|
+
expect(result).toMatchObject({ title: "intersection", type: "object", properties: { a: {}, b: {} } });
|
|
4516
|
+
});
|
|
4517
|
+
|
|
4518
|
+
test("an override that writes object keywords wins over the fold", () => {
|
|
4519
|
+
// The override runs first, so anything it puts on the intersection is deliberate. Folding would overwrite it silently, so the fold stands down instead.
|
|
4520
|
+
const result = z.toJSONSchema(z.object({ a: z.string() }).and(z.object({ b: z.string() })), {
|
|
4521
|
+
override(ctx) {
|
|
4522
|
+
if ((ctx.jsonSchema as any).allOf) (ctx.jsonSchema as any).additionalProperties = true;
|
|
4523
|
+
},
|
|
4524
|
+
}) as any;
|
|
4525
|
+
expect(result.additionalProperties).toBe(true);
|
|
4526
|
+
expect(result.allOf).toHaveLength(2);
|
|
4527
|
+
});
|
|
4528
|
+
|
|
4529
|
+
test("more than one union member is left alone rather than multiplied out", () => {
|
|
4530
|
+
// The second union lands among the members the first is distributed across, and a union is not an object, so every branch fails to fold and the whole intersection stands down.
|
|
4531
|
+
const schema = z
|
|
4532
|
+
.object({ a: z.string() })
|
|
4533
|
+
.and(z.union([z.object({ v: z.string() }), z.object({ w: z.string() })]))
|
|
4534
|
+
.and(z.union([z.object({ x: z.string() }), z.object({ y: z.string() })]));
|
|
4535
|
+
expect(allOf(schema)).toHaveLength(3);
|
|
4536
|
+
});
|
|
4537
|
+
});
|