@songtonyli/dsh-cli 0.1.91 → 0.1.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/dsh.mjs +1 -1
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +1 -4
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +1 -4
- package/node_modules/@aws-sdk/core/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-http/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
- package/node_modules/@aws-sdk/eventstream-handler-node/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-eventstream/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-websocket/package.json +4 -4
- 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 +8 -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/dist-es/submodules/signin/models/enums.js +7 -0
- package/node_modules/@aws-sdk/nested-clients/package.json +5 -5
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-client-modules/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-compaction-basic/README.i18n.yaml +18 -12
- package/node_modules/@deepseek-ai/dsh-compaction-basic/README.md +5 -5
- package/node_modules/@deepseek-ai/dsh-compaction-basic/README.zh.md +5 -5
- package/node_modules/@deepseek-ai/dsh-compaction-basic/lib/index.js +16 -8
- package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/index.js +18 -6
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/index.js +2 -1
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/roster.js +19 -4
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.i18n.yaml +14 -14
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.md +8 -8
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.zh.md +8 -8
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/lib/index.js +47 -1
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/package.json +1 -0
- package/node_modules/@deepseek-ai/dsh-llm-cursor/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-llm-cursor/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-llm-cursor/README.zh.md +3 -1
- package/node_modules/@deepseek-ai/dsh-llm-cursor/lib/index.js +27 -5
- package/node_modules/@deepseek-ai/dsh-subagent/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-subagent/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent/lib/index.js +7 -0
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/manager.js +7 -0
- package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +3 -2
- package/node_modules/@earendil-works/pi-ai/README.md +35 -35
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +59 -71
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +0 -6
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +125 -103
- package/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.js +51 -18
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +0 -6
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js +57 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +0 -6
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +17 -44
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +0 -5
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +42 -54
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +58 -57
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +0 -6
- package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +24 -9
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.js +4 -11
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/kimi-coding.js +4 -22
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/meta.js +1 -14
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/radius.js +9 -3
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/trusted-url.js +12 -0
- package/node_modules/@earendil-works/pi-ai/dist/cli.js +6 -2
- package/node_modules/@earendil-works/pi-ai/dist/index.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/ant-ling.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/baseten.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-workers-ai.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/compat-schema.js +144 -111
- 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.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/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/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/mistral.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai.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-codex.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/radius.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/deepseek.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +7 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/groq.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/huggingface.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/meta.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/minimax-cn.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/minimax.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/model-schema.js +41 -30
- package/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai-cn.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-cn.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/radius-config.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/radius.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/schema-builders.js +18 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/together.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/typesafe.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xai.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai-coding-cn.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/telemetry.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/openrouter-cost.js +34 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/streaming-json.js +513 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/{typebox-helpers.js → string-enum.js} +5 -6
- package/node_modules/@earendil-works/pi-ai/dist/utils/text.js +9 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/transcript.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/validation.js +27 -277
- package/node_modules/@earendil-works/pi-ai/dist/utils/version.js +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +6 -5
- package/node_modules/@earendil-works/pi-schema/CHANGELOG.md +13 -0
- package/node_modules/@earendil-works/pi-schema/README.md +296 -0
- package/node_modules/@earendil-works/pi-schema/dist/annotations.js +193 -0
- package/node_modules/@earendil-works/pi-schema/dist/builders.js +98 -0
- package/node_modules/@earendil-works/pi-schema/dist/checks.js +447 -0
- package/node_modules/@earendil-works/pi-schema/dist/coerce.js +585 -0
- package/node_modules/@earendil-works/pi-schema/dist/compiler.js +532 -0
- package/node_modules/@earendil-works/pi-schema/dist/explain.js +381 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/index.js +51 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/date.js +47 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/date_time.js +39 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/duration.js +36 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/email.js +36 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/hostname.js +38 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idn_email.js +36 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idn_hostname.js +39 -0
- package/node_modules/{typebox/build/format/idna/format/bidi.mjs → @earendil-works/pi-schema/dist/formats/typebox/idna/format/bidi.js} +49 -15
- package/node_modules/{typebox/build/format/idna/format/puny.mjs → @earendil-works/pi-schema/dist/formats/typebox/idna/format/puny.js} +36 -8
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/hostname.js +43 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/idn-hostname.js +71 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/index.js +30 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/label/ascii.js +37 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/label/puny.js +56 -0
- package/node_modules/{typebox/build/format/idna/label/unicode.mjs → @earendil-works/pi-schema/dist/formats/typebox/idna/label/unicode.js} +34 -6
- package/node_modules/{typebox/build/format/idna/pattern/pattern.mjs → @earendil-works/pi-schema/dist/formats/typebox/idna/pattern/pattern.js} +34 -6
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/ipv4.js +36 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/ipv6.js +36 -0
- package/node_modules/{typebox/build/format/iri.mjs → @earendil-works/pi-schema/dist/formats/typebox/iri.js} +30 -2
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/iri_reference.js +40 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/json_pointer.js +37 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/json_pointer_uri_fragment.js +37 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/regex.js +41 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/relative_json_pointer.js +37 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/time.js +60 -0
- package/node_modules/{typebox/build/format/uri.mjs → @earendil-works/pi-schema/dist/formats/typebox/uri.js} +28 -0
- package/node_modules/{typebox/build/format/uri_reference.mjs → @earendil-works/pi-schema/dist/formats/typebox/uri_reference.js} +28 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/uri_template.js +37 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/url.js +36 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/uuid.js +37 -0
- package/node_modules/@earendil-works/pi-schema/dist/index.js +5 -0
- package/node_modules/@earendil-works/pi-schema/dist/resolver.js +202 -0
- package/node_modules/@earendil-works/pi-schema/dist/shared.js +33 -0
- package/node_modules/@earendil-works/pi-schema/dist/typebox-static.js +5 -0
- package/node_modules/@earendil-works/pi-schema/dist/types.js +3 -0
- package/node_modules/@earendil-works/pi-schema/dist/validator.js +71 -0
- package/node_modules/@earendil-works/pi-schema/package.json +53 -0
- package/node_modules/@earendil-works/pi-telemetry/package.json +4 -2
- package/node_modules/@shikijs/core/dist/index.mjs +57 -43
- package/node_modules/@shikijs/core/package.json +5 -5
- package/node_modules/@shikijs/engine-javascript/dist/engine-compile.mjs +2 -3
- package/node_modules/@shikijs/engine-javascript/dist/engine-raw.mjs +2 -3
- package/node_modules/@shikijs/engine-javascript/dist/index.mjs +1 -1
- package/node_modules/@shikijs/engine-javascript/dist/{string-TLTPtCPs.mjs → string-CFc1qfdw.mjs} +2 -4
- package/node_modules/@shikijs/engine-javascript/package.json +3 -3
- package/node_modules/@shikijs/engine-oniguruma/dist/index.mjs +1 -1
- package/node_modules/@shikijs/engine-oniguruma/dist/wasm-inlined.mjs +6 -4
- package/node_modules/@shikijs/engine-oniguruma/package.json +3 -3
- package/node_modules/@shikijs/langs/package.json +2 -2
- package/node_modules/@shikijs/primitive/dist/index.mjs +30 -33
- package/node_modules/@shikijs/primitive/package.json +3 -3
- package/node_modules/@shikijs/themes/package.json +2 -2
- package/node_modules/@shikijs/types/dist/index.mjs +1 -2
- package/node_modules/@shikijs/types/package.json +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +10 -4
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js +10 -4
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +3 -2
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +3 -2
- package/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/http2-wrapper/package.json +2 -23
- package/node_modules/http2-wrapper/source/agent.js +70 -4
- package/node_modules/jose/dist/webapi/jwks/remote.js +3 -1
- package/node_modules/jose/dist/webapi/lib/deflate.js +2 -1
- package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +2 -1
- package/node_modules/jose/package.json +1 -1
- package/node_modules/semver/classes/range.js +2 -2
- package/node_modules/semver/internal/constants.js +30 -0
- package/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
- package/node_modules/semver/package.json +1 -1
- package/node_modules/shiki/dist/bundle-full.mjs +4 -5
- package/node_modules/shiki/dist/bundle-web.mjs +4 -6
- package/node_modules/shiki/dist/core-unwasm.mjs +1 -2
- package/node_modules/shiki/dist/core.mjs +1 -1
- package/node_modules/shiki/dist/engine-oniguruma-XLVxwJtN.mjs +6 -0
- package/node_modules/shiki/dist/engine-oniguruma.mjs +2 -7
- package/node_modules/shiki/dist/index.mjs +2 -2
- package/node_modules/shiki/dist/{langs-bundle-full-xQVO1Cek.mjs → langs-bundle-full-CSdmXkDy.mjs} +1 -2
- package/node_modules/shiki/dist/langs.mjs +1 -2
- package/node_modules/shiki/dist/{rolldown-runtime-BBjsoOtd.mjs → rolldown-runtime-782esTHO.mjs} +1 -2
- package/node_modules/shiki/dist/themes.mjs +1 -2
- package/node_modules/shiki/dist/wasm.mjs +1 -2
- package/node_modules/shiki/package.json +8 -8
- package/node_modules/tslib/README.md +3 -8
- package/node_modules/tslib/package.json +1 -1
- package/node_modules/tslib/tslib.es6.js +10 -1
- package/node_modules/tslib/tslib.es6.mjs +10 -1
- package/node_modules/tslib/tslib.js +10 -1
- package/package.json +34 -34
- package/node_modules/typebox/build/compile/code.mjs +0 -65
- package/node_modules/typebox/build/compile/compile.mjs +0 -12
- package/node_modules/typebox/build/compile/index.mjs +0 -14
- package/node_modules/typebox/build/compile/validator.mjs +0 -91
- package/node_modules/typebox/build/error/errors.mjs +0 -18
- package/node_modules/typebox/build/error/index.mjs +0 -1
- package/node_modules/typebox/build/format/_registry.mjs +0 -96
- package/node_modules/typebox/build/format/date.mjs +0 -19
- package/node_modules/typebox/build/format/date_time.mjs +0 -11
- package/node_modules/typebox/build/format/duration.mjs +0 -8
- package/node_modules/typebox/build/format/email.mjs +0 -8
- package/node_modules/typebox/build/format/format.mjs +0 -22
- package/node_modules/typebox/build/format/hostname.mjs +0 -10
- package/node_modules/typebox/build/format/idn_email.mjs +0 -8
- package/node_modules/typebox/build/format/idn_hostname.mjs +0 -11
- package/node_modules/typebox/build/format/idna/hostname.mjs +0 -16
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +0 -43
- package/node_modules/typebox/build/format/idna/index.mjs +0 -2
- package/node_modules/typebox/build/format/idna/label/ascii.mjs +0 -9
- package/node_modules/typebox/build/format/idna/label/puny.mjs +0 -28
- package/node_modules/typebox/build/format/index.mjs +0 -4
- package/node_modules/typebox/build/format/ipv4.mjs +0 -8
- package/node_modules/typebox/build/format/ipv6.mjs +0 -8
- package/node_modules/typebox/build/format/iri_reference.mjs +0 -14
- package/node_modules/typebox/build/format/json_pointer.mjs +0 -9
- package/node_modules/typebox/build/format/json_pointer_uri_fragment.mjs +0 -9
- package/node_modules/typebox/build/format/regex.mjs +0 -13
- package/node_modules/typebox/build/format/relative_json_pointer.mjs +0 -9
- package/node_modules/typebox/build/format/time.mjs +0 -32
- package/node_modules/typebox/build/format/uri_template.mjs +0 -9
- package/node_modules/typebox/build/format/url.mjs +0 -8
- package/node_modules/typebox/build/format/uuid.mjs +0 -9
- package/node_modules/typebox/build/guard/emit.mjs +0 -191
- package/node_modules/typebox/build/guard/globals.mjs +0 -90
- package/node_modules/typebox/build/guard/guard.mjs +0 -221
- package/node_modules/typebox/build/guard/index.mjs +0 -6
- package/node_modules/typebox/build/guard/native.mjs +0 -60
- package/node_modules/typebox/build/guard/string.mjs +0 -168
- package/node_modules/typebox/build/index.mjs +0 -14
- package/node_modules/typebox/build/schema/build.mjs +0 -118
- package/node_modules/typebox/build/schema/check.mjs +0 -14
- package/node_modules/typebox/build/schema/compile.mjs +0 -46
- package/node_modules/typebox/build/schema/engine/_context.mjs +0 -124
- package/node_modules/typebox/build/schema/engine/_exact_optional.mjs +0 -20
- package/node_modules/typebox/build/schema/engine/_externals.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/_functions.mjs +0 -65
- package/node_modules/typebox/build/schema/engine/_reducer.mjs +0 -45
- package/node_modules/typebox/build/schema/engine/_refine.mjs +0 -29
- package/node_modules/typebox/build/schema/engine/_regexp.mjs +0 -4
- package/node_modules/typebox/build/schema/engine/_stack.mjs +0 -209
- package/node_modules/typebox/build/schema/engine/_unique.mjs +0 -5
- package/node_modules/typebox/build/schema/engine/additionalItems.mjs +0 -60
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +0 -123
- package/node_modules/typebox/build/schema/engine/allOf.mjs +0 -47
- package/node_modules/typebox/build/schema/engine/anyOf.mjs +0 -52
- package/node_modules/typebox/build/schema/engine/boolean.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/const.mjs +0 -30
- package/node_modules/typebox/build/schema/engine/contains.mjs +0 -54
- package/node_modules/typebox/build/schema/engine/dependencies.mjs +0 -45
- package/node_modules/typebox/build/schema/engine/dependentRequired.mjs +0 -40
- package/node_modules/typebox/build/schema/engine/dependentSchemas.mjs +0 -38
- package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/enum.mjs +0 -33
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/format.mjs +0 -26
- package/node_modules/typebox/build/schema/engine/if.mjs +0 -47
- package/node_modules/typebox/build/schema/engine/index.mjs +0 -54
- package/node_modules/typebox/build/schema/engine/items.mjs +0 -88
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +0 -42
- package/node_modules/typebox/build/schema/engine/maxItems.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/maxLength.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/maxProperties.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/maximum.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/minContains.mjs +0 -51
- package/node_modules/typebox/build/schema/engine/minItems.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/minLength.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/minProperties.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/minimum.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/multipleOf.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/not.mjs +0 -39
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +0 -59
- package/node_modules/typebox/build/schema/engine/pattern.mjs +0 -29
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +0 -45
- package/node_modules/typebox/build/schema/engine/prefixItems.mjs +0 -35
- package/node_modules/typebox/build/schema/engine/properties.mjs +0 -75
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +0 -37
- package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/ref.mjs +0 -52
- package/node_modules/typebox/build/schema/engine/required.mjs +0 -32
- package/node_modules/typebox/build/schema/engine/schema.mjs +0 -362
- package/node_modules/typebox/build/schema/engine/type.mjs +0 -70
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +0 -51
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +0 -51
- package/node_modules/typebox/build/schema/engine/uniqueItems.mjs +0 -51
- package/node_modules/typebox/build/schema/errors.mjs +0 -18
- package/node_modules/typebox/build/schema/index.mjs +0 -9
- package/node_modules/typebox/build/schema/intern/index.mjs +0 -1
- package/node_modules/typebox/build/schema/intern/intern.mjs +0 -259
- package/node_modules/typebox/build/schema/parse.mjs +0 -32
- package/node_modules/typebox/build/schema/pointer/index.mjs +0 -2
- package/node_modules/typebox/build/schema/pointer/pointer.mjs +0 -106
- package/node_modules/typebox/build/schema/pointer/pointer_get.mjs +0 -2
- package/node_modules/typebox/build/schema/resolve/index.mjs +0 -1
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +0 -327
- package/node_modules/typebox/build/schema/schema.mjs +0 -11
- package/node_modules/typebox/build/schema/static/_canonical.mjs +0 -2
- package/node_modules/typebox/build/schema/static/_comparer.mjs +0 -2
- package/node_modules/typebox/build/schema/static/_elements.mjs +0 -2
- package/node_modules/typebox/build/schema/static/additionalProperties.mjs +0 -3
- package/node_modules/typebox/build/schema/static/allOf.mjs +0 -2
- package/node_modules/typebox/build/schema/static/anyOf.mjs +0 -2
- package/node_modules/typebox/build/schema/static/const.mjs +0 -2
- package/node_modules/typebox/build/schema/static/enum.mjs +0 -2
- package/node_modules/typebox/build/schema/static/if.mjs +0 -2
- package/node_modules/typebox/build/schema/static/index.mjs +0 -1
- package/node_modules/typebox/build/schema/static/items.mjs +0 -2
- package/node_modules/typebox/build/schema/static/oneOf.mjs +0 -2
- package/node_modules/typebox/build/schema/static/patternProperties.mjs +0 -2
- package/node_modules/typebox/build/schema/static/prefixItems.mjs +0 -2
- package/node_modules/typebox/build/schema/static/properties.mjs +0 -2
- package/node_modules/typebox/build/schema/static/propertyNames.mjs +0 -3
- package/node_modules/typebox/build/schema/static/ref.mjs +0 -3
- package/node_modules/typebox/build/schema/static/required.mjs +0 -3
- package/node_modules/typebox/build/schema/static/schema.mjs +0 -2
- package/node_modules/typebox/build/schema/static/static.mjs +0 -3
- package/node_modules/typebox/build/schema/static/type.mjs +0 -3
- package/node_modules/typebox/build/schema/static/unevaluatedProperties.mjs +0 -3
- package/node_modules/typebox/build/schema/types/_refine.mjs +0 -18
- package/node_modules/typebox/build/schema/types/additionalItems.mjs +0 -14
- package/node_modules/typebox/build/schema/types/additionalProperties.mjs +0 -14
- package/node_modules/typebox/build/schema/types/allOf.mjs +0 -15
- package/node_modules/typebox/build/schema/types/anchor.mjs +0 -12
- package/node_modules/typebox/build/schema/types/anyOf.mjs +0 -15
- package/node_modules/typebox/build/schema/types/const.mjs +0 -12
- package/node_modules/typebox/build/schema/types/contains.mjs +0 -14
- package/node_modules/typebox/build/schema/types/default.mjs +0 -12
- package/node_modules/typebox/build/schema/types/defs.mjs +0 -12
- package/node_modules/typebox/build/schema/types/dependencies.mjs +0 -16
- package/node_modules/typebox/build/schema/types/dependentRequired.mjs +0 -15
- package/node_modules/typebox/build/schema/types/dependentSchemas.mjs +0 -15
- package/node_modules/typebox/build/schema/types/dynamicAnchor.mjs +0 -12
- package/node_modules/typebox/build/schema/types/dynamicRef.mjs +0 -12
- package/node_modules/typebox/build/schema/types/else.mjs +0 -14
- package/node_modules/typebox/build/schema/types/enum.mjs +0 -13
- package/node_modules/typebox/build/schema/types/exclusiveMaximum.mjs +0 -13
- package/node_modules/typebox/build/schema/types/exclusiveMinimum.mjs +0 -13
- package/node_modules/typebox/build/schema/types/format.mjs +0 -13
- package/node_modules/typebox/build/schema/types/id.mjs +0 -13
- package/node_modules/typebox/build/schema/types/if.mjs +0 -14
- package/node_modules/typebox/build/schema/types/index.mjs +0 -57
- package/node_modules/typebox/build/schema/types/items.mjs +0 -26
- package/node_modules/typebox/build/schema/types/maxContains.mjs +0 -13
- package/node_modules/typebox/build/schema/types/maxItems.mjs +0 -13
- package/node_modules/typebox/build/schema/types/maxLength.mjs +0 -13
- package/node_modules/typebox/build/schema/types/maxProperties.mjs +0 -13
- package/node_modules/typebox/build/schema/types/maximum.mjs +0 -13
- package/node_modules/typebox/build/schema/types/minContains.mjs +0 -13
- package/node_modules/typebox/build/schema/types/minItems.mjs +0 -13
- package/node_modules/typebox/build/schema/types/minLength.mjs +0 -13
- package/node_modules/typebox/build/schema/types/minProperties.mjs +0 -13
- package/node_modules/typebox/build/schema/types/minimum.mjs +0 -13
- package/node_modules/typebox/build/schema/types/multipleOf.mjs +0 -13
- package/node_modules/typebox/build/schema/types/not.mjs +0 -14
- package/node_modules/typebox/build/schema/types/oneOf.mjs +0 -15
- package/node_modules/typebox/build/schema/types/pattern.mjs +0 -14
- package/node_modules/typebox/build/schema/types/patternProperties.mjs +0 -15
- package/node_modules/typebox/build/schema/types/prefixItems.mjs +0 -14
- package/node_modules/typebox/build/schema/types/properties.mjs +0 -15
- package/node_modules/typebox/build/schema/types/propertyNames.mjs +0 -15
- package/node_modules/typebox/build/schema/types/recursiveAnchor.mjs +0 -19
- package/node_modules/typebox/build/schema/types/recursiveRef.mjs +0 -12
- package/node_modules/typebox/build/schema/types/ref.mjs +0 -13
- package/node_modules/typebox/build/schema/types/required.mjs +0 -14
- package/node_modules/typebox/build/schema/types/schema.mjs +0 -14
- package/node_modules/typebox/build/schema/types/then.mjs +0 -14
- package/node_modules/typebox/build/schema/types/type.mjs +0 -15
- package/node_modules/typebox/build/schema/types/unevaluatedItems.mjs +0 -14
- package/node_modules/typebox/build/schema/types/unevaluatedProperties.mjs +0 -14
- package/node_modules/typebox/build/schema/types/uniqueItems.mjs +0 -13
- package/node_modules/typebox/build/system/arguments/arguments.mjs +0 -9
- package/node_modules/typebox/build/system/arguments/index.mjs +0 -1
- package/node_modules/typebox/build/system/environment/environment.mjs +0 -1
- package/node_modules/typebox/build/system/environment/evaluate.mjs +0 -37
- package/node_modules/typebox/build/system/environment/index.mjs +0 -1
- package/node_modules/typebox/build/system/hashing/hash.mjs +0 -232
- package/node_modules/typebox/build/system/hashing/index.mjs +0 -1
- package/node_modules/typebox/build/system/index.mjs +0 -4
- package/node_modules/typebox/build/system/locale/_config.mjs +0 -15
- package/node_modules/typebox/build/system/locale/_locale.mjs +0 -40
- package/node_modules/typebox/build/system/locale/ar_001.mjs +0 -40
- package/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -40
- package/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -40
- package/node_modules/typebox/build/system/locale/de_DE.mjs +0 -40
- package/node_modules/typebox/build/system/locale/el_GR.mjs +0 -40
- package/node_modules/typebox/build/system/locale/en_US.mjs +0 -39
- package/node_modules/typebox/build/system/locale/es_419.mjs +0 -40
- package/node_modules/typebox/build/system/locale/es_AR.mjs +0 -40
- package/node_modules/typebox/build/system/locale/es_ES.mjs +0 -40
- package/node_modules/typebox/build/system/locale/es_MX.mjs +0 -40
- package/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -40
- package/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -40
- package/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -40
- package/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -40
- package/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -40
- package/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -40
- package/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -40
- package/node_modules/typebox/build/system/locale/id_ID.mjs +0 -40
- package/node_modules/typebox/build/system/locale/index.mjs +0 -1
- package/node_modules/typebox/build/system/locale/it_IT.mjs +0 -40
- package/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -40
- package/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -40
- package/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -40
- package/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -40
- package/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -40
- package/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -40
- package/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -40
- package/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -40
- package/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -40
- package/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -40
- package/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -40
- package/node_modules/typebox/build/system/locale/th_TH.mjs +0 -40
- package/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -40
- package/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -40
- package/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -40
- package/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -40
- package/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -40
- package/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -40
- package/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -40
- package/node_modules/typebox/build/system/memory/assign.mjs +0 -12
- package/node_modules/typebox/build/system/memory/clone.mjs +0 -113
- package/node_modules/typebox/build/system/memory/create.mjs +0 -29
- package/node_modules/typebox/build/system/memory/discard.mjs +0 -18
- package/node_modules/typebox/build/system/memory/freeze.mjs +0 -6
- package/node_modules/typebox/build/system/memory/index.mjs +0 -1
- package/node_modules/typebox/build/system/memory/memory.mjs +0 -7
- package/node_modules/typebox/build/system/memory/metrics.mjs +0 -8
- package/node_modules/typebox/build/system/memory/update.mjs +0 -33
- package/node_modules/typebox/build/system/settings/index.mjs +0 -1
- package/node_modules/typebox/build/system/settings/settings.mjs +0 -36
- package/node_modules/typebox/build/system/system.mjs +0 -6
- package/node_modules/typebox/build/system/unreachable/index.mjs +0 -1
- package/node_modules/typebox/build/system/unreachable/unreachable.mjs +0 -6
- package/node_modules/typebox/build/type/action/_add_immutable.mjs +0 -11
- package/node_modules/typebox/build/type/action/_add_optional.mjs +0 -11
- package/node_modules/typebox/build/type/action/_add_readonly.mjs +0 -11
- package/node_modules/typebox/build/type/action/_remove_immutable.mjs +0 -11
- package/node_modules/typebox/build/type/action/_remove_optional.mjs +0 -11
- package/node_modules/typebox/build/type/action/_remove_readonly.mjs +0 -11
- package/node_modules/typebox/build/type/action/capitalize.mjs +0 -11
- package/node_modules/typebox/build/type/action/conditional.mjs +0 -13
- package/node_modules/typebox/build/type/action/constructor_parameters.mjs +0 -11
- package/node_modules/typebox/build/type/action/evaluate.mjs +0 -11
- package/node_modules/typebox/build/type/action/exclude.mjs +0 -11
- package/node_modules/typebox/build/type/action/extract.mjs +0 -11
- package/node_modules/typebox/build/type/action/index.mjs +0 -30
- package/node_modules/typebox/build/type/action/indexed.mjs +0 -14
- package/node_modules/typebox/build/type/action/instance_type.mjs +0 -11
- package/node_modules/typebox/build/type/action/interface.mjs +0 -22
- package/node_modules/typebox/build/type/action/keyof.mjs +0 -11
- package/node_modules/typebox/build/type/action/lowercase.mjs +0 -11
- package/node_modules/typebox/build/type/action/mapped.mjs +0 -13
- package/node_modules/typebox/build/type/action/module.mjs +0 -13
- package/node_modules/typebox/build/type/action/non_nullable.mjs +0 -11
- package/node_modules/typebox/build/type/action/omit.mjs +0 -14
- package/node_modules/typebox/build/type/action/parameters.mjs +0 -11
- package/node_modules/typebox/build/type/action/partial.mjs +0 -11
- package/node_modules/typebox/build/type/action/pick.mjs +0 -14
- package/node_modules/typebox/build/type/action/readonly_object.mjs +0 -19
- package/node_modules/typebox/build/type/action/required.mjs +0 -11
- package/node_modules/typebox/build/type/action/return_type.mjs +0 -11
- package/node_modules/typebox/build/type/action/uncapitalize.mjs +0 -11
- package/node_modules/typebox/build/type/action/uppercase.mjs +0 -11
- package/node_modules/typebox/build/type/action/with.mjs +0 -11
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +0 -66
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +0 -79
- package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +0 -33
- package/node_modules/typebox/build/type/engine/call/resolve_target.mjs +0 -27
- package/node_modules/typebox/build/type/engine/conditional/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/conditional/instantiate.mjs +0 -23
- package/node_modules/typebox/build/type/engine/constructor_parameters/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +0 -25
- package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +0 -16
- package/node_modules/typebox/build/type/engine/cyclic/check.mjs +0 -45
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +0 -47
- package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +0 -47
- package/node_modules/typebox/build/type/engine/cyclic/index.mjs +0 -6
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +0 -31
- package/node_modules/typebox/build/type/engine/cyclic/target.mjs +0 -16
- package/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/enum/typescript_enum_to_enum_values.mjs +0 -9
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +0 -37
- package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +0 -18
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +0 -60
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +0 -33
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +0 -56
- package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +0 -10
- package/node_modules/typebox/build/type/engine/evaluate/index.mjs +0 -8
- package/node_modules/typebox/build/type/engine/evaluate/instantiate.mjs +0 -12
- package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +0 -31
- package/node_modules/typebox/build/type/engine/exclude/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/exclude/instantiate.mjs +0 -16
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +0 -22
- package/node_modules/typebox/build/type/engine/extract/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/extract/instantiate.mjs +0 -16
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +0 -22
- package/node_modules/typebox/build/type/engine/helpers/index.mjs +0 -3
- package/node_modules/typebox/build/type/engine/helpers/keys.mjs +0 -8
- package/node_modules/typebox/build/type/engine/helpers/keys_to_indexer.mjs +0 -15
- package/node_modules/typebox/build/type/engine/helpers/union.mjs +0 -3
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +0 -14
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +0 -14
- package/node_modules/typebox/build/type/engine/index.mjs +0 -37
- package/node_modules/typebox/build/type/engine/indexable/from_cyclic.mjs +0 -8
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +0 -8
- package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +0 -8
- package/node_modules/typebox/build/type/engine/indexable/from_intersect.mjs +0 -8
- package/node_modules/typebox/build/type/engine/indexable/from_literal.mjs +0 -5
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +0 -8
- package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +0 -25
- package/node_modules/typebox/build/type/engine/indexable/from_union.mjs +0 -7
- package/node_modules/typebox/build/type/engine/indexable/to_indexable.mjs +0 -14
- package/node_modules/typebox/build/type/engine/indexable/to_indexable_keys.mjs +0 -12
- package/node_modules/typebox/build/type/engine/indexed/array_indexer.mjs +0 -18
- package/node_modules/typebox/build/type/engine/indexed/from_array.mjs +0 -35
- package/node_modules/typebox/build/type/engine/indexed/from_object.mjs +0 -40
- package/node_modules/typebox/build/type/engine/indexed/from_tuple.mjs +0 -35
- package/node_modules/typebox/build/type/engine/indexed/from_type.mjs +0 -14
- package/node_modules/typebox/build/type/engine/indexed/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +0 -28
- package/node_modules/typebox/build/type/engine/instance_type/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/instance_type/instantiate.mjs +0 -21
- package/node_modules/typebox/build/type/engine/instantiate.mjs +0 -158
- package/node_modules/typebox/build/type/engine/interface/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/interface/instantiate.mjs +0 -23
- package/node_modules/typebox/build/type/engine/intrinsics/from_literal.mjs +0 -9
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +0 -8
- package/node_modules/typebox/build/type/engine/intrinsics/from_type.mjs +0 -13
- package/node_modules/typebox/build/type/engine/intrinsics/from_union.mjs +0 -7
- package/node_modules/typebox/build/type/engine/intrinsics/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/intrinsics/instantiate.mjs +0 -52
- package/node_modules/typebox/build/type/engine/intrinsics/mapping.mjs +0 -4
- package/node_modules/typebox/build/type/engine/keyof/from_any.mjs +0 -8
- package/node_modules/typebox/build/type/engine/keyof/from_array.mjs +0 -5
- package/node_modules/typebox/build/type/engine/keyof/from_object.mjs +0 -20
- package/node_modules/typebox/build/type/engine/keyof/from_record.mjs +0 -5
- package/node_modules/typebox/build/type/engine/keyof/from_tuple.mjs +0 -7
- package/node_modules/typebox/build/type/engine/keyof/from_type.mjs +0 -23
- package/node_modules/typebox/build/type/engine/keyof/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +0 -29
- package/node_modules/typebox/build/type/engine/mapped/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/mapped/instantiate.mjs +0 -15
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +0 -42
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +0 -39
- package/node_modules/typebox/build/type/engine/module/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/module/instantiate.mjs +0 -36
- package/node_modules/typebox/build/type/engine/non_nullable/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/non_nullable/instantiate.mjs +0 -22
- package/node_modules/typebox/build/type/engine/object/collapse.mjs +0 -14
- package/node_modules/typebox/build/type/engine/object/from_cyclic.mjs +0 -8
- package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +0 -8
- package/node_modules/typebox/build/type/engine/object/from_intersect.mjs +0 -22
- package/node_modules/typebox/build/type/engine/object/from_object.mjs +0 -4
- package/node_modules/typebox/build/type/engine/object/from_tuple.mjs +0 -9
- package/node_modules/typebox/build/type/engine/object/from_type.mjs +0 -23
- package/node_modules/typebox/build/type/engine/object/from_union.mjs +0 -19
- package/node_modules/typebox/build/type/engine/object/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/omit/from_type.mjs +0 -18
- package/node_modules/typebox/build/type/engine/omit/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/omit/instantiate.mjs +0 -16
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +0 -14
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +0 -14
- package/node_modules/typebox/build/type/engine/parameters/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +0 -25
- package/node_modules/typebox/build/type/engine/partial/from_cyclic.mjs +0 -11
- package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +0 -8
- package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +0 -8
- package/node_modules/typebox/build/type/engine/partial/from_object.mjs +0 -11
- package/node_modules/typebox/build/type/engine/partial/from_type.mjs +0 -20
- package/node_modules/typebox/build/type/engine/partial/from_union.mjs +0 -7
- package/node_modules/typebox/build/type/engine/partial/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/partial/instantiate.mjs +0 -15
- package/node_modules/typebox/build/type/engine/patterns/index.mjs +0 -2
- package/node_modules/typebox/build/type/engine/patterns/pattern.mjs +0 -11
- package/node_modules/typebox/build/type/engine/patterns/template.mjs +0 -20
- package/node_modules/typebox/build/type/engine/pick/from_type.mjs +0 -20
- package/node_modules/typebox/build/type/engine/pick/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/pick/instantiate.mjs +0 -16
- package/node_modules/typebox/build/type/engine/priority/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +0 -27
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +0 -14
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +0 -14
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +0 -7
- package/node_modules/typebox/build/type/engine/readonly_object/from_cyclic.mjs +0 -11
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +0 -8
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +0 -8
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +0 -11
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +0 -7
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +0 -25
- package/node_modules/typebox/build/type/engine/readonly_object/from_union.mjs +0 -7
- package/node_modules/typebox/build/type/engine/readonly_object/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/readonly_object/instantiate.mjs +0 -15
- package/node_modules/typebox/build/type/engine/record/from_key.mjs +0 -40
- package/node_modules/typebox/build/type/engine/record/from_key_any.mjs +0 -6
- package/node_modules/typebox/build/type/engine/record/from_key_boolean.mjs +0 -5
- package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +0 -8
- package/node_modules/typebox/build/type/engine/record/from_key_integer.mjs +0 -7
- package/node_modules/typebox/build/type/engine/record/from_key_intersect.mjs +0 -8
- package/node_modules/typebox/build/type/engine/record/from_key_literal.mjs +0 -10
- package/node_modules/typebox/build/type/engine/record/from_key_number.mjs +0 -7
- package/node_modules/typebox/build/type/engine/record/from_key_string.mjs +0 -12
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +0 -12
- package/node_modules/typebox/build/type/engine/record/from_key_union.mjs +0 -39
- package/node_modules/typebox/build/type/engine/record/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/record/instantiate.mjs +0 -17
- package/node_modules/typebox/build/type/engine/record/record_create.mjs +0 -7
- package/node_modules/typebox/build/type/engine/ref/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +0 -10
- package/node_modules/typebox/build/type/engine/required/from_cyclic.mjs +0 -11
- package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +0 -8
- package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +0 -8
- package/node_modules/typebox/build/type/engine/required/from_object.mjs +0 -11
- package/node_modules/typebox/build/type/engine/required/from_type.mjs +0 -20
- package/node_modules/typebox/build/type/engine/required/from_union.mjs +0 -7
- package/node_modules/typebox/build/type/engine/required/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/required/instantiate.mjs +0 -15
- package/node_modules/typebox/build/type/engine/rest/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/rest/spread.mjs +0 -19
- package/node_modules/typebox/build/type/engine/return_type/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/return_type/instantiate.mjs +0 -21
- package/node_modules/typebox/build/type/engine/template_literal/create.mjs +0 -5
- package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +0 -81
- package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +0 -81
- package/node_modules/typebox/build/type/engine/template_literal/index.mjs +0 -6
- package/node_modules/typebox/build/type/engine/template_literal/instantiate.mjs +0 -15
- package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +0 -26
- package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +0 -10
- package/node_modules/typebox/build/type/engine/template_literal/static.mjs +0 -2
- package/node_modules/typebox/build/type/engine/this/expand_this.mjs +0 -26
- package/node_modules/typebox/build/type/engine/tuple/to_object.mjs +0 -14
- package/node_modules/typebox/build/type/engine/with/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/with/instantiate.mjs +0 -14
- package/node_modules/typebox/build/type/extends/any.mjs +0 -12
- package/node_modules/typebox/build/type/extends/array.mjs +0 -21
- package/node_modules/typebox/build/type/extends/bigint.mjs +0 -9
- package/node_modules/typebox/build/type/extends/boolean.mjs +0 -9
- package/node_modules/typebox/build/type/extends/constructor.mjs +0 -17
- package/node_modules/typebox/build/type/extends/dependent.mjs +0 -6
- package/node_modules/typebox/build/type/extends/enum.mjs +0 -7
- package/node_modules/typebox/build/type/extends/extends.mjs +0 -17
- package/node_modules/typebox/build/type/extends/extends_left.mjs +0 -80
- package/node_modules/typebox/build/type/extends/extends_right.mjs +0 -49
- package/node_modules/typebox/build/type/extends/function.mjs +0 -17
- package/node_modules/typebox/build/type/extends/index.mjs +0 -2
- package/node_modules/typebox/build/type/extends/inference.mjs +0 -62
- package/node_modules/typebox/build/type/extends/integer.mjs +0 -10
- package/node_modules/typebox/build/type/extends/intersect.mjs +0 -15
- package/node_modules/typebox/build/type/extends/literal.mjs +0 -44
- package/node_modules/typebox/build/type/extends/never.mjs +0 -9
- package/node_modules/typebox/build/type/extends/null.mjs +0 -9
- package/node_modules/typebox/build/type/extends/number.mjs +0 -9
- package/node_modules/typebox/build/type/extends/object.mjs +0 -109
- package/node_modules/typebox/build/type/extends/parameters.mjs +0 -28
- package/node_modules/typebox/build/type/extends/record.mjs +0 -23
- package/node_modules/typebox/build/type/extends/result.mjs +0 -36
- package/node_modules/typebox/build/type/extends/return_type.mjs +0 -9
- package/node_modules/typebox/build/type/extends/string.mjs +0 -9
- package/node_modules/typebox/build/type/extends/symbol.mjs +0 -9
- package/node_modules/typebox/build/type/extends/template_literal.mjs +0 -7
- package/node_modules/typebox/build/type/extends/tuple.mjs +0 -61
- package/node_modules/typebox/build/type/extends/undefined.mjs +0 -10
- package/node_modules/typebox/build/type/extends/union.mjs +0 -24
- package/node_modules/typebox/build/type/extends/unknown.mjs +0 -12
- package/node_modules/typebox/build/type/extends/void.mjs +0 -9
- package/node_modules/typebox/build/type/index.mjs +0 -5
- package/node_modules/typebox/build/type/script/index.mjs +0 -1
- package/node_modules/typebox/build/type/script/mapping.mjs +0 -528
- package/node_modules/typebox/build/type/script/parser.mjs +0 -140
- package/node_modules/typebox/build/type/script/script.mjs +0 -22
- package/node_modules/typebox/build/type/script/token/bigint.mjs +0 -14
- package/node_modules/typebox/build/type/script/token/const.mjs +0 -18
- package/node_modules/typebox/build/type/script/token/ident.mjs +0 -26
- package/node_modules/typebox/build/type/script/token/index.mjs +0 -12
- package/node_modules/typebox/build/type/script/token/integer.mjs +0 -19
- package/node_modules/typebox/build/type/script/token/internal/char.mjs +0 -26
- package/node_modules/typebox/build/type/script/token/internal/guard.mjs +0 -15
- package/node_modules/typebox/build/type/script/token/internal/many.mjs +0 -14
- package/node_modules/typebox/build/type/script/token/internal/match.mjs +0 -11
- package/node_modules/typebox/build/type/script/token/internal/optional.mjs +0 -9
- package/node_modules/typebox/build/type/script/token/internal/take.mjs +0 -30
- package/node_modules/typebox/build/type/script/token/internal/trim.mjs +0 -34
- package/node_modules/typebox/build/type/script/token/number.mjs +0 -19
- package/node_modules/typebox/build/type/script/token/rest.mjs +0 -9
- package/node_modules/typebox/build/type/script/token/span.mjs +0 -24
- package/node_modules/typebox/build/type/script/token/string.mjs +0 -20
- package/node_modules/typebox/build/type/script/token/unsigned_integer.mjs +0 -26
- package/node_modules/typebox/build/type/script/token/unsigned_number.mjs +0 -38
- package/node_modules/typebox/build/type/script/token/until.mjs +0 -21
- package/node_modules/typebox/build/type/script/token/until_1.mjs +0 -12
- package/node_modules/typebox/build/type/types/_codec.mjs +0 -60
- package/node_modules/typebox/build/type/types/_immutable.mjs +0 -18
- package/node_modules/typebox/build/type/types/_optional.mjs +0 -18
- package/node_modules/typebox/build/type/types/_readonly.mjs +0 -18
- package/node_modules/typebox/build/type/types/_refine.mjs +0 -36
- package/node_modules/typebox/build/type/types/any.mjs +0 -18
- package/node_modules/typebox/build/type/types/array.mjs +0 -25
- package/node_modules/typebox/build/type/types/bigint.mjs +0 -21
- package/node_modules/typebox/build/type/types/boolean.mjs +0 -17
- package/node_modules/typebox/build/type/types/call.mjs +0 -23
- package/node_modules/typebox/build/type/types/constructor.mjs +0 -24
- package/node_modules/typebox/build/type/types/cyclic.mjs +0 -29
- package/node_modules/typebox/build/type/types/deferred.mjs +0 -16
- package/node_modules/typebox/build/type/types/dependent.mjs +0 -24
- package/node_modules/typebox/build/type/types/enum.mjs +0 -22
- package/node_modules/typebox/build/type/types/function.mjs +0 -25
- package/node_modules/typebox/build/type/types/generic.mjs +0 -17
- package/node_modules/typebox/build/type/types/identifier.mjs +0 -17
- package/node_modules/typebox/build/type/types/index.mjs +0 -51
- package/node_modules/typebox/build/type/types/infer.mjs +0 -20
- package/node_modules/typebox/build/type/types/integer.mjs +0 -21
- package/node_modules/typebox/build/type/types/intersect.mjs +0 -24
- package/node_modules/typebox/build/type/types/literal.mjs +0 -62
- package/node_modules/typebox/build/type/types/never.mjs +0 -22
- package/node_modules/typebox/build/type/types/null.mjs +0 -17
- package/node_modules/typebox/build/type/types/number.mjs +0 -21
- package/node_modules/typebox/build/type/types/object.mjs +0 -28
- package/node_modules/typebox/build/type/types/parameter.mjs +0 -21
- package/node_modules/typebox/build/type/types/properties.mjs +0 -15
- package/node_modules/typebox/build/type/types/record.mjs +0 -66
- package/node_modules/typebox/build/type/types/ref.mjs +0 -18
- package/node_modules/typebox/build/type/types/rest.mjs +0 -17
- package/node_modules/typebox/build/type/types/schema.mjs +0 -15
- package/node_modules/typebox/build/type/types/static.mjs +0 -3
- package/node_modules/typebox/build/type/types/string.mjs +0 -22
- package/node_modules/typebox/build/type/types/symbol.mjs +0 -17
- package/node_modules/typebox/build/type/types/template_literal.mjs +0 -37
- package/node_modules/typebox/build/type/types/this.mjs +0 -17
- package/node_modules/typebox/build/type/types/tuple.mjs +0 -25
- package/node_modules/typebox/build/type/types/undefined.mjs +0 -17
- package/node_modules/typebox/build/type/types/union.mjs +0 -24
- package/node_modules/typebox/build/type/types/unknown.mjs +0 -17
- package/node_modules/typebox/build/type/types/unsafe.mjs +0 -20
- package/node_modules/typebox/build/type/types/void.mjs +0 -17
- package/node_modules/typebox/build/typebox.mjs +0 -85
- package/node_modules/typebox/build/value/assert/assert.mjs +0 -28
- package/node_modules/typebox/build/value/assert/index.mjs +0 -1
- package/node_modules/typebox/build/value/check/check.mjs +0 -11
- package/node_modules/typebox/build/value/check/index.mjs +0 -1
- package/node_modules/typebox/build/value/clean/additional.mjs +0 -6
- package/node_modules/typebox/build/value/clean/clean.mjs +0 -17
- package/node_modules/typebox/build/value/clean/from_array.mjs +0 -8
- package/node_modules/typebox/build/value/clean/from_cyclic.mjs +0 -6
- package/node_modules/typebox/build/value/clean/from_intersect.mjs +0 -26
- package/node_modules/typebox/build/value/clean/from_object.mjs +0 -31
- package/node_modules/typebox/build/value/clean/from_record.mjs +0 -32
- package/node_modules/typebox/build/value/clean/from_ref.mjs +0 -8
- package/node_modules/typebox/build/value/clean/from_tuple.mjs +0 -14
- package/node_modules/typebox/build/value/clean/from_type.mjs +0 -21
- package/node_modules/typebox/build/value/clean/from_union.mjs +0 -12
- package/node_modules/typebox/build/value/clean/index.mjs +0 -1
- package/node_modules/typebox/build/value/clone/clone.mjs +0 -12
- package/node_modules/typebox/build/value/clone/index.mjs +0 -1
- package/node_modules/typebox/build/value/codec/callback.mjs +0 -25
- package/node_modules/typebox/build/value/codec/decode.mjs +0 -52
- package/node_modules/typebox/build/value/codec/encode.mjs +0 -52
- package/node_modules/typebox/build/value/codec/from_array.mjs +0 -35
- package/node_modules/typebox/build/value/codec/from_cyclic.mjs +0 -8
- package/node_modules/typebox/build/value/codec/from_intersect.mjs +0 -58
- package/node_modules/typebox/build/value/codec/from_object.mjs +0 -42
- package/node_modules/typebox/build/value/codec/from_record.mjs +0 -39
- package/node_modules/typebox/build/value/codec/from_ref.mjs +0 -31
- package/node_modules/typebox/build/value/codec/from_tuple.mjs +0 -32
- package/node_modules/typebox/build/value/codec/from_type.mjs +0 -22
- package/node_modules/typebox/build/value/codec/from_union.mjs +0 -39
- package/node_modules/typebox/build/value/codec/has.mjs +0 -93
- package/node_modules/typebox/build/value/codec/index.mjs +0 -3
- package/node_modules/typebox/build/value/convert/convert.mjs +0 -15
- package/node_modules/typebox/build/value/convert/from_additional.mjs +0 -18
- package/node_modules/typebox/build/value/convert/from_array.mjs +0 -7
- package/node_modules/typebox/build/value/convert/from_bigint.mjs +0 -6
- package/node_modules/typebox/build/value/convert/from_boolean.mjs +0 -6
- package/node_modules/typebox/build/value/convert/from_cyclic.mjs +0 -6
- package/node_modules/typebox/build/value/convert/from_enum.mjs +0 -6
- package/node_modules/typebox/build/value/convert/from_integer.mjs +0 -6
- package/node_modules/typebox/build/value/convert/from_intersect.mjs +0 -8
- package/node_modules/typebox/build/value/convert/from_literal.mjs +0 -44
- package/node_modules/typebox/build/value/convert/from_null.mjs +0 -6
- package/node_modules/typebox/build/value/convert/from_number.mjs +0 -6
- package/node_modules/typebox/build/value/convert/from_object.mjs +0 -28
- package/node_modules/typebox/build/value/convert/from_record.mjs +0 -23
- package/node_modules/typebox/build/value/convert/from_ref.mjs +0 -8
- package/node_modules/typebox/build/value/convert/from_string.mjs +0 -6
- package/node_modules/typebox/build/value/convert/from_template_literal.mjs +0 -6
- package/node_modules/typebox/build/value/convert/from_tuple.mjs +0 -11
- package/node_modules/typebox/build/value/convert/from_type.mjs +0 -43
- package/node_modules/typebox/build/value/convert/from_undefined.mjs +0 -6
- package/node_modules/typebox/build/value/convert/from_union.mjs +0 -13
- package/node_modules/typebox/build/value/convert/from_void.mjs +0 -6
- package/node_modules/typebox/build/value/convert/index.mjs +0 -1
- package/node_modules/typebox/build/value/convert/try/index.mjs +0 -1
- package/node_modules/typebox/build/value/convert/try/try.mjs +0 -8
- package/node_modules/typebox/build/value/convert/try/try_array.mjs +0 -6
- package/node_modules/typebox/build/value/convert/try/try_bigint.mjs +0 -45
- package/node_modules/typebox/build/value/convert/try/try_boolean.mjs +0 -41
- package/node_modules/typebox/build/value/convert/try/try_null.mjs +0 -44
- package/node_modules/typebox/build/value/convert/try/try_number.mjs +0 -44
- package/node_modules/typebox/build/value/convert/try/try_result.mjs +0 -17
- package/node_modules/typebox/build/value/convert/try/try_string.mjs +0 -12
- package/node_modules/typebox/build/value/convert/try/try_undefined.mjs +0 -44
- package/node_modules/typebox/build/value/create/create.mjs +0 -11
- package/node_modules/typebox/build/value/create/error.mjs +0 -7
- package/node_modules/typebox/build/value/create/from_array.mjs +0 -10
- package/node_modules/typebox/build/value/create/from_bigint.mjs +0 -7
- package/node_modules/typebox/build/value/create/from_boolean.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_constructor.mjs +0 -10
- package/node_modules/typebox/build/value/create/from_cyclic.mjs +0 -6
- package/node_modules/typebox/build/value/create/from_default.mjs +0 -10
- package/node_modules/typebox/build/value/create/from_enum.mjs +0 -6
- package/node_modules/typebox/build/value/create/from_function.mjs +0 -6
- package/node_modules/typebox/build/value/create/from_integer.mjs +0 -8
- package/node_modules/typebox/build/value/create/from_intersect.mjs +0 -8
- package/node_modules/typebox/build/value/create/from_literal.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_never.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_null.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_number.mjs +0 -8
- package/node_modules/typebox/build/value/create/from_object.mjs +0 -9
- package/node_modules/typebox/build/value/create/from_record.mjs +0 -8
- package/node_modules/typebox/build/value/create/from_ref.mjs +0 -9
- package/node_modules/typebox/build/value/create/from_string.mjs +0 -9
- package/node_modules/typebox/build/value/create/from_symbol.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_template_literal.mjs +0 -11
- package/node_modules/typebox/build/value/create/from_tuple.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_type.mjs +0 -61
- package/node_modules/typebox/build/value/create/from_undefined.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_union.mjs +0 -9
- package/node_modules/typebox/build/value/create/from_void.mjs +0 -4
- package/node_modules/typebox/build/value/create/index.mjs +0 -2
- package/node_modules/typebox/build/value/default/default.mjs +0 -15
- package/node_modules/typebox/build/value/default/from_array.mjs +0 -12
- package/node_modules/typebox/build/value/default/from_cyclic.mjs +0 -7
- package/node_modules/typebox/build/value/default/from_default.mjs +0 -13
- package/node_modules/typebox/build/value/default/from_intersect.mjs +0 -9
- package/node_modules/typebox/build/value/default/from_object.mjs +0 -32
- package/node_modules/typebox/build/value/default/from_record.mjs +0 -26
- package/node_modules/typebox/build/value/default/from_ref.mjs +0 -9
- package/node_modules/typebox/build/value/default/from_tuple.mjs +0 -14
- package/node_modules/typebox/build/value/default/from_type.mjs +0 -25
- package/node_modules/typebox/build/value/default/from_union.mjs +0 -14
- package/node_modules/typebox/build/value/default/index.mjs +0 -1
- package/node_modules/typebox/build/value/delta/diff.mjs +0 -135
- package/node_modules/typebox/build/value/delta/edit.mjs +0 -17
- package/node_modules/typebox/build/value/delta/index.mjs +0 -3
- package/node_modules/typebox/build/value/delta/patch.mjs +0 -42
- package/node_modules/typebox/build/value/equal/equal.mjs +0 -6
- package/node_modules/typebox/build/value/equal/index.mjs +0 -1
- package/node_modules/typebox/build/value/errors/errors.mjs +0 -12
- package/node_modules/typebox/build/value/errors/index.mjs +0 -1
- package/node_modules/typebox/build/value/hash/hash.mjs +0 -10
- package/node_modules/typebox/build/value/hash/index.mjs +0 -1
- package/node_modules/typebox/build/value/index.mjs +0 -29
- package/node_modules/typebox/build/value/parse/index.mjs +0 -1
- package/node_modules/typebox/build/value/parse/parse.mjs +0 -47
- package/node_modules/typebox/build/value/pipeline/index.mjs +0 -1
- package/node_modules/typebox/build/value/pipeline/pipeline.mjs +0 -15
- package/node_modules/typebox/build/value/pointer/index.mjs +0 -1
- package/node_modules/typebox/build/value/repair/error.mjs +0 -8
- package/node_modules/typebox/build/value/repair/from_array.mjs +0 -39
- package/node_modules/typebox/build/value/repair/from_enum.mjs +0 -6
- package/node_modules/typebox/build/value/repair/from_intersect.mjs +0 -8
- package/node_modules/typebox/build/value/repair/from_object.mjs +0 -33
- package/node_modules/typebox/build/value/repair/from_record.mjs +0 -33
- package/node_modules/typebox/build/value/repair/from_ref.mjs +0 -9
- package/node_modules/typebox/build/value/repair/from_template_literal.mjs +0 -7
- package/node_modules/typebox/build/value/repair/from_tuple.mjs +0 -12
- package/node_modules/typebox/build/value/repair/from_type.mjs +0 -88
- package/node_modules/typebox/build/value/repair/from_union.mjs +0 -24
- package/node_modules/typebox/build/value/repair/from_unknown.mjs +0 -12
- package/node_modules/typebox/build/value/repair/index.mjs +0 -1
- package/node_modules/typebox/build/value/repair/repair.mjs +0 -20
- package/node_modules/typebox/build/value/shared/index.mjs +0 -4
- package/node_modules/typebox/build/value/shared/optional_undefined.mjs +0 -15
- package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +0 -72
- package/node_modules/typebox/build/value/shared/union_score_select.mjs +0 -51
- package/node_modules/typebox/build/value/value.mjs +0 -15
- package/node_modules/typebox/package.json +0 -87
- package/node_modules/typebox/readme.md +0 -371
- /package/node_modules/{typebox/license → @earendil-works/pi-schema/LICENSES/typebox-LICENSE} +0 -0
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
# @earendil-works/pi-schema
|
|
2
|
+
|
|
3
|
+
JSON Schema builders and validation without `eval`. A schema compiles once into plain closures, so it checks values
|
|
4
|
+
at close to the speed of validators that generate code, also under a strict Content Security Policy, and needs no
|
|
5
|
+
dependencies.
|
|
6
|
+
|
|
7
|
+
- Drafts 2020-12 and 7. Passes 2,222 of the 2,223 core tests of the official
|
|
8
|
+
[JSON-Schema-Test-Suite](https://github.com/json-schema-org/JSON-Schema-Test-Suite).
|
|
9
|
+
- Builders return plain JSON Schema typed with the values it accepts; a compiled check narrows to that type.
|
|
10
|
+
- Errors as JSON Pointer paths. A missing or unknown field is reported at the field.
|
|
11
|
+
- Never modifies a schema; frozen schemas work.
|
|
12
|
+
- 8.5 KB minified and gzipped. Format checks are an optional import.
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @earendil-works/pi-schema
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import { compile, int, obj, oneOf, opt, type Static, str } from "@earendil-works/pi-schema";
|
|
24
|
+
|
|
25
|
+
const Read = obj({
|
|
26
|
+
path: str({ description: "Path to the file", minLength: 1 }),
|
|
27
|
+
offset: opt(int({ minimum: 1 })),
|
|
28
|
+
mode: oneOf(["text", "binary"]),
|
|
29
|
+
});
|
|
30
|
+
type Read = Static<typeof Read>; // { path: string; mode: "text" | "binary"; offset?: number }
|
|
31
|
+
|
|
32
|
+
const read = compile(Read);
|
|
33
|
+
if (read.check(value)) value.path; // value: Read
|
|
34
|
+
|
|
35
|
+
read.errors({ offset: 0, extra: true });
|
|
36
|
+
// [
|
|
37
|
+
// { path: "/path", keyword: "required", message: "missing" },
|
|
38
|
+
// { path: "/mode", keyword: "required", message: "missing" },
|
|
39
|
+
// { path: "/offset", keyword: "minimum", message: "expected >= 1" },
|
|
40
|
+
// { path: "/extra", keyword: "additionalProperties", message: "unknown field" },
|
|
41
|
+
// ]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
`Read` is plain JSON Schema (`{ type: "object", properties: {...}, required: ["path", "mode"], additionalProperties:
|
|
45
|
+
false }`), ready for a tool definition or `JSON.stringify`. `compile` takes any JSON Schema, built with the builders
|
|
46
|
+
or not.
|
|
47
|
+
|
|
48
|
+
`check(value)` is the fast path: a boolean, no allocations for most schemas, and a plain function you can pass
|
|
49
|
+
around. `errors(value)` explains a failure and returns `[]` for a valid value. It is built on the first failure and
|
|
50
|
+
kept, so a schema whose values always pass never pays for it.
|
|
51
|
+
|
|
52
|
+
### Builders
|
|
53
|
+
|
|
54
|
+
| builder | schema | type |
|
|
55
|
+
|---|---|---|
|
|
56
|
+
| `str({ minLength, maxLength, pattern, format })` | `{ type: "string", ... }` | `string` |
|
|
57
|
+
| `num({ minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf })`, `int(...)` | `{ type: "number" }`, `{ type: "integer" }` | `number` |
|
|
58
|
+
| `bool()`, `nul()`, `unknown()` | `{ type: "boolean" }`, `{ type: "null" }`, `{}` | `boolean`, `null`, `unknown` |
|
|
59
|
+
| `lit(value)` | `{ const: value }` | the literal |
|
|
60
|
+
| `oneOf(["a", "b"])` | `{ enum: [...] }` | `"a" \| "b"` |
|
|
61
|
+
| `obj({ a: str(), b: opt(num()) }, { open })` | closed object; `open: true` allows other properties | `{ a: string; b?: number }` |
|
|
62
|
+
| `arr(items, { minItems, maxItems, uniqueItems })` | `{ type: "array", items }` | `T[]` |
|
|
63
|
+
| `tuple([str(), num()])` | `prefixItems`, no more items | `[string, number]` |
|
|
64
|
+
| `map(value)` | `{ type: "object", additionalProperties: value }` | `Record<string, T>` |
|
|
65
|
+
| `union([...])` | `{ anyOf: [...] }` | the union |
|
|
66
|
+
| `nullable(schema)` | `{ anyOf: [schema, { type: "null" }] }` | `T \| null` |
|
|
67
|
+
| `bytes({ minLength, maxLength })` | `{ type: "bytes", ... }` | `Uint8Array` |
|
|
68
|
+
|
|
69
|
+
Every builder also takes `title`, `description`, `examples`, `deprecated` and `default`. A `default` is an annotation;
|
|
70
|
+
validation never inserts it.
|
|
71
|
+
|
|
72
|
+
A union of objects tagged by a `lit()` property checks and reports by the tag: only the branch the tag selects runs.
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
const Block = union([obj({ kind: lit("text"), text: str() }), obj({ kind: lit("image"), width: int({ minimum: 0 }) })]);
|
|
76
|
+
compile(Block).errors({ kind: "video" });
|
|
77
|
+
// [{ path: "/kind", keyword: "anyOf", message: 'expected one of ["text","image"]' }]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
`Static` also types schemas built with TypeBox 1.x, read from TypeBox's type shapes (pi-schema does not import
|
|
81
|
+
TypeBox): `String`, `Number`, `Integer`, `Boolean`, `Null`, `Literal`, `Array`, `Object` (with `Type.Optional` and
|
|
82
|
+
`Type.Readonly` properties), `Union`, `Record`, `Unsafe`, `Unknown` and `Any` give TypeBox's own static type, so
|
|
83
|
+
`Static<typeof Type.Object({ path: Type.String() })>` is `{ path: string }`. Other TypeBox kinds (`Enum`, `Tuple`,
|
|
84
|
+
`Intersect`, `Cyclic`, ...) give `unknown` where they stand. Other JSON Schema objects give `unknown`.
|
|
85
|
+
|
|
86
|
+
### Options
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
import { formats } from "@earendil-works/pi-schema/formats";
|
|
90
|
+
|
|
91
|
+
const validator = compile(schema, {
|
|
92
|
+
draft: "7", // "2020-12" (default) or "7"
|
|
93
|
+
formats, // check `format`; without it `format` is an annotation, as 2020-12 specifies
|
|
94
|
+
schemas: { "https://example.com/point.json": point }, // documents for $refs to other documents, by URI
|
|
95
|
+
unresolvedRefs: "reject", // a $ref that names nothing rejects values at its place; default "throw"
|
|
96
|
+
coerce: true, // adds coerce() and parse(), see Coercion
|
|
97
|
+
});
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
`formats` has every format 2020-12 defines (`date-time`, `email`, `uri`, `uuid`, `ipv6`, ...), plus `url` and
|
|
101
|
+
`json-pointer-uri-fragment`, which TypeBox and ajv-formats also check. Pass your own map to check fewer formats, or
|
|
102
|
+
custom ones.
|
|
103
|
+
|
|
104
|
+
A `$ref` that names nothing (a missing definition, a document not in `schemas`) throws when the schema compiles. With
|
|
105
|
+
`unresolvedRefs: "reject"` it compiles as `false` instead: only values at that place fail, with the error
|
|
106
|
+
`unresolved reference <ref>`, and the rest of the schema works. Use it for schemas from other systems, such as MCP
|
|
107
|
+
servers, whose references may dangle.
|
|
108
|
+
|
|
109
|
+
### TypeBox schemas
|
|
110
|
+
|
|
111
|
+
TypeBox 1.x schemas are JSON Schema, so they compile as they are:
|
|
112
|
+
|
|
113
|
+
```typescript
|
|
114
|
+
import Type from "typebox";
|
|
115
|
+
|
|
116
|
+
const user = compile(Type.Object({ name: Type.String(), tags: Type.Array(Type.String()) }));
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
TypeBox's JavaScript-only types (`BigInt`, `Undefined`, `Function`, ...), refinements and codecs are not JSON Schema
|
|
120
|
+
and are not supported.
|
|
121
|
+
|
|
122
|
+
### Coercion
|
|
123
|
+
|
|
124
|
+
`compile(schema, { coerce: true })` adds `coerce()` and `parse()`, for loosely typed input such as a model's tool call
|
|
125
|
+
arguments. Without the option the validator has neither, and its `check` pays nothing for them: the coercion rules are
|
|
126
|
+
built on the first `coerce()` or `parse()`.
|
|
127
|
+
|
|
128
|
+
```typescript
|
|
129
|
+
const read = compile(Read, { coerce: true });
|
|
130
|
+
|
|
131
|
+
read.coerce({ path: "a.txt", offset: "10", mode: "text" }); // { path: "a.txt", offset: 10, mode: "text" }
|
|
132
|
+
|
|
133
|
+
const result = read.parse({ path: "a.txt", offset: "ten", mode: "text" });
|
|
134
|
+
if (result.ok) result.value.offset; // number
|
|
135
|
+
else result.errors; // [{ path: "/offset", keyword: "type", message: "expected integer, got string" }]
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
`coerce(value)` returns the coerced value. It copies only the paths it changes, returns `value` itself when nothing
|
|
139
|
+
changes, and never modifies `value`. A value no rule applies to stays as it is. `parse(value)` coerces, then checks:
|
|
140
|
+
`{ ok: true, value }` with the coerced value, or `{ ok: false, errors }` with the errors of the coerced value.
|
|
141
|
+
|
|
142
|
+
Three passes run in order:
|
|
143
|
+
|
|
144
|
+
1. **Optional nulls.** A `null` in an optional property whose schema rejects `null` is dropped, as if omitted.
|
|
145
|
+
2. **Conversions**, ported from TypeBox 1.3.27's `Value.Convert` and keyed on JSON Schema keywords (the first that
|
|
146
|
+
applies to a schema): `$ref` follows the reference; `const` and `enum` take the member the value converts to;
|
|
147
|
+
`anyOf`/`oneOf` keep a value one branch accepts, else take the first branch's conversion the whole schema
|
|
148
|
+
accepts; `allOf` converts with each member in turn; then by `type`:
|
|
149
|
+
- `string`: numbers and booleans to their text, `null` to `"null"`.
|
|
150
|
+
- `number`: numeric strings (`""` is 0), `"true"`/`"false"`, booleans to 1/0, `null` to 0.
|
|
151
|
+
- `integer`: as `number`, then truncated (`"3.5"` and `3.5` become 3).
|
|
152
|
+
- `boolean`: `"true"`/`"false"` (any case), `"1"`/`"0"`, 1/0, `null` to `false`.
|
|
153
|
+
- `null`: `"null"`, `"undefined"`, `""`, `"0"`, 0 and `false`.
|
|
154
|
+
- `array`: a single value becomes a one-item array, then each item converts; a tuple (`prefixItems` or an `items`
|
|
155
|
+
array) converts its items and never wraps.
|
|
156
|
+
- `object`: each property converts by `properties`, `patternProperties` or `additionalProperties`.
|
|
157
|
+
3. **Primitive coercion by type**, as Ajv's `coerceTypes`, for what pass 2 leaves (type arrays such as
|
|
158
|
+
`["integer", "null"]`): numbers from numeric strings and booleans, booleans from `"true"`/`"false"` and 1/0,
|
|
159
|
+
strings from numbers and booleans, `null` from `""`, 0 and `false`, and `null` to `""`, 0 or `false`. A value that
|
|
160
|
+
already has one of a type array's types stays.
|
|
161
|
+
|
|
162
|
+
Where passes 2 and 3 disagree, pass 2 wins: `null` for a required string becomes `"null"`, not `""`. A union's
|
|
163
|
+
branches convert in order and only until one is accepted; a union node that also declares properties converts them into
|
|
164
|
+
each branch's candidate before checking it. A recursive schema (a tree through `$ref`) that meets a value it cannot
|
|
165
|
+
convert leaves the value as it is, so `check` reports it, and results through a `$ref` are reused within one call, so a
|
|
166
|
+
recursive union does not convert (or explain) the same child once per branch.
|
|
167
|
+
|
|
168
|
+
Pass 1 drops optional nulls inside the values of `properties`, `patternProperties` and `additionalProperties` alike; a
|
|
169
|
+
pattern or additional key itself is never dropped. Items past a draft-7 `items` array (`additionalItems`) are not
|
|
170
|
+
coerced by any pass.
|
|
171
|
+
|
|
172
|
+
### Values
|
|
173
|
+
|
|
174
|
+
- A property whose value is `undefined` counts as absent, as in TypeBox.
|
|
175
|
+
- `{ type: "bytes", minLength, maxLength }` matches a `Uint8Array` of that length, an extension for values that never
|
|
176
|
+
pass through JSON.
|
|
177
|
+
|
|
178
|
+
## Supported keywords
|
|
179
|
+
|
|
180
|
+
- Every validation keyword of drafts 2020-12 and 7, including draft 7's `dependencies` and `items` arrays with
|
|
181
|
+
`additionalItems`.
|
|
182
|
+
- `$id`, `$anchor`, `$ref` (local, by anchor, relative and remote), `$dynamicRef` and `$dynamicAnchor`.
|
|
183
|
+
- `unevaluatedProperties` and `unevaluatedItems`.
|
|
184
|
+
- `pattern` and `patternProperties` are ECMAScript regular expressions with the `u` flag.
|
|
185
|
+
- Not supported: meta-schemas that switch vocabularies on or off (`$vocabulary`), `contentMediaType` and
|
|
186
|
+
`contentEncoding` assertions (optional in the spec), and draft 2019-09's `$recursiveRef`.
|
|
187
|
+
|
|
188
|
+
## Benchmarks
|
|
189
|
+
|
|
190
|
+
Node 24.4.1 on one core of an i9-13900. The other libraries:
|
|
191
|
+
|
|
192
|
+
- ata-validator 1.61.3: its generated code, and its eval-free interpreter chosen with `engine: "interpreter"`;
|
|
193
|
+
- Ajv 8.20.0, with ajv-formats 3.0.1 for the format tests;
|
|
194
|
+
- Zod 4.6.7: native Zod schemas for speed, setup and memory, and `z.fromJSONSchema` for the test suite;
|
|
195
|
+
- TypeBox 1.3.27;
|
|
196
|
+
- @cfworker/json-schema 4.1.1;
|
|
197
|
+
- @oh-my-pi/omptype 18.13.3, through `fromJsonSchema`.
|
|
198
|
+
|
|
199
|
+
| test suite (tests passed) | pi-schema | ata | ata interpreter | Ajv | Zod | TypeBox | cfworker | omptype |
|
|
200
|
+
|---|---:|---:|---:|---:|---:|---:|---:|---:|
|
|
201
|
+
| draft 2020-12 core (1,298) | 1,297 | 1,298 | 1,298 | 1,236 | 693 | 1,276 | 1,249 | 863 |
|
|
202
|
+
| draft 7 core (925) | 925 | 925 | 925 | 917 | 632 | 924 | 918 | 659 |
|
|
203
|
+
| draft 2020-12 format (895), with format checks | 895 | 814 | 814 | 750 | 412 | 895 | 740 | 412 |
|
|
204
|
+
|
|
205
|
+
| check, valid value | pi-schema | ata | ata interpreter | Ajv | Zod | TypeBox | cfworker | omptype |
|
|
206
|
+
|---|---:|---:|---:|---:|---:|---:|---:|---:|
|
|
207
|
+
| nested object with tagged unions | 410 ns | 180 ns | 836 ns | 627 ns | 1.3 µs | 475 ns | 43 µs | 730 ns |
|
|
208
|
+
| union of 5 messages | 86 ns | 37 ns | 212 ns | 70 ns | 297 ns | 95 ns | 11 µs | 96 ns |
|
|
209
|
+
| tool schema (read) | 31 ns | 10 ns | 41 ns | 13 ns | 41 ns | 9 ns | 2.0 µs | 9 ns |
|
|
210
|
+
| MCP tool schema with `$ref` | 161 ns | 64 ns | 314 ns | 136 ns | 927 ns | 87 ns | 15 µs | 1.9 µs |
|
|
211
|
+
| recursive `$ref` schema | 755 ns | 307 ns | 1.9 µs | 378 ns | 2.7 µs | 1.2 µs | 41 µs | 7.5 µs |
|
|
212
|
+
|
|
213
|
+
| same, without eval (strict CSP) | pi-schema | ata | ata interpreter | Ajv | Zod | TypeBox | cfworker | omptype |
|
|
214
|
+
|---|---:|---:|---:|---:|---:|---:|---:|---:|
|
|
215
|
+
| nested object with tagged unions | 411 ns | 1.6 µs | 844 ns | fails | 3.4 µs | 44 µs | 44 µs | 2.7 µs |
|
|
216
|
+
| union of 5 messages | 87 ns | 396 ns | 209 ns | fails | 652 ns | 10 µs | 11 µs | 501 ns |
|
|
217
|
+
| MCP tool schema with `$ref` | 164 ns | 484 ns | 326 ns | fails | 2.0 µs | 39 µs | 13 µs | 2.2 µs |
|
|
218
|
+
| recursive `$ref` schema | 746 ns | 2.8 µs | 1.9 µs | fails | 7.3 µs | 130 µs | 42 µs | 9.0 µs |
|
|
219
|
+
|
|
220
|
+
| cost | pi-schema | ata | ata interpreter | Ajv | Zod | TypeBox | cfworker | omptype |
|
|
221
|
+
|---|---:|---:|---:|---:|---:|---:|---:|---:|
|
|
222
|
+
| compile a new schema | 20 µs | 4.9 µs | 1.3 µs | 1.4 ms | 151 µs | 210 µs | 22 µs | 28 µs |
|
|
223
|
+
| its first check | 0.8 µs | 335 µs | 87 µs | 195 µs | 466 µs | 41 µs | 7.1 µs | 109 µs |
|
|
224
|
+
| memory, 3,200 distinct schemas | 7.1 MB | 36.0 MB | 51.3 MB | 59.7 MB | 170.8 MB | 54.7 MB | 7.6 MB | 19.9 MB |
|
|
225
|
+
| bundle, minified + gzip | 8.5 KB | 134.0 KB | 134.0 KB | 39.7 KB | 24.4 KB | 35.2 KB | 5.8 KB | 38.8 KB |
|
|
226
|
+
|
|
227
|
+
Where code generation is unavailable:
|
|
228
|
+
|
|
229
|
+
- **ata** answers through its interpreted engine without being told. That automatic fallback measured slower than the
|
|
230
|
+
engine chosen with `engine: "interpreter"`.
|
|
231
|
+
- **Ajv** cannot compile at all: `compile()` throws `EvalError`.
|
|
232
|
+
- **Zod** notices and parses objects without its generated code.
|
|
233
|
+
- **TypeBox** falls back to its interpreter.
|
|
234
|
+
- **omptype** throws `EvalError` once per schema, then validates through its interpreter.
|
|
235
|
+
|
|
236
|
+
ata, Zod and omptype compile on a schema's first check, so their compile cost shows there. ata's bundle is for the
|
|
237
|
+
browser without code splitting; with splitting, its first load is about 53 KB plus a 76 KB generator chunk loaded
|
|
238
|
+
later.
|
|
239
|
+
|
|
240
|
+
Zod is not a JSON Schema validator:
|
|
241
|
+
|
|
242
|
+
- **Speed, setup and memory:** Zod gets the same schemas written as native Zod schemas (`z.strictObject`,
|
|
243
|
+
`z.discriminatedUnion`, `z.lazy`), with `.describe()` for the corpus descriptions, and `safeParse` as the check.
|
|
244
|
+
Its memory includes building the schemas, which the other libraries receive as JSON. Without the descriptions it
|
|
245
|
+
is 131 MB.
|
|
246
|
+
- **Test suite:** through `z.fromJSONSchema`, which is semi-experimental. It refuses `unevaluatedProperties`,
|
|
247
|
+
`unevaluatedItems`, `dependentSchemas`, `dependentRequired`, `if`/`then`/`else`, `not`, and every `$ref` that is
|
|
248
|
+
not local. A refused schema fails all its tests: 405 of the 1,298 draft 2020-12 core tests and 107 of the 925 draft
|
|
249
|
+
7 core tests.
|
|
250
|
+
- **Bundle:** measured with Zod's documented `import * as z from "zod"`. A named `import { z }` keeps every locale
|
|
251
|
+
(about 90 KB gzipped), and `z.fromJSONSchema` brings it to 40.0 KB; `zod/mini` is about 6 KB.
|
|
252
|
+
|
|
253
|
+
Flat objects of simple types check in 13–80 ns, against 7–15 ns for TypeBox. Without code generation, reading a
|
|
254
|
+
property whose name comes from a list costs a few nanoseconds.
|
|
255
|
+
|
|
256
|
+
### Reproduce
|
|
257
|
+
|
|
258
|
+
`npm run bench` in `packages/schema` takes about 12 minutes. It runs every library through its fastest boolean path
|
|
259
|
+
(ata's `isValidObject()`) and keeps the object each returns. ata runs with `ATA_NO_NATIVE=1`: its optional native
|
|
260
|
+
addon only serves its buffer APIs. The scripts are in `test/bench/`.
|
|
261
|
+
|
|
262
|
+
- **Conformance:** every library on the vendored test suite, with the remote documents and meta-schemas the tests
|
|
263
|
+
reference (Zod through `z.fromJSONSchema`, which takes no remote documents). ata reads the draft only from `$schema`, so draft 7 schemas without one get it declared. ata's defaults
|
|
264
|
+
(`useDefaults`, `assertFormat`) are turned off to match the other libraries; formats are checked only in the
|
|
265
|
+
format tests, by each library's own checks.
|
|
266
|
+
- **Speed:** realistic schemas, in ns per check after warm-up. Each result is the median of 15 rounds, with the
|
|
267
|
+
libraries' order rotated in each round.
|
|
268
|
+
- **Speed without eval:** the same, run with `--disallow-code-generation-from-strings`.
|
|
269
|
+
- **Setup:** compiling 1,000 schemas a library has not seen, and their first checks.
|
|
270
|
+
- **Memory:** 3,200 distinct tool-like schemas, compiled and each checked 3 times, each library in its own process.
|
|
271
|
+
- **Size:** esbuild browser bundles of what a validator needs, minified and gzipped.
|
|
272
|
+
|
|
273
|
+
### Code generated at build time
|
|
274
|
+
|
|
275
|
+
Ajv (`ajv/dist/standalone`) and ata (`ata build`, `ata compile`, `toStandaloneModule()`) can also generate their
|
|
276
|
+
validation code when the app is built. The app then imports plain modules and evaluates nothing at run time, so those
|
|
277
|
+
checks run at code-generation speed under a strict CSP. This is not in the benchmark, because it is a different
|
|
278
|
+
deal:
|
|
279
|
+
|
|
280
|
+
- **A build step per schema.** Every schema must be known when the app is built. Schemas that arrive at run time
|
|
281
|
+
(MCP servers, extensions, user input) cannot be validated this way.
|
|
282
|
+
- **Code per schema.** In a separate measurement on the same 3,200 schemas:
|
|
283
|
+
- Ajv: 1.8 ms to build and 8.9 KB of JavaScript per schema;
|
|
284
|
+
- ata: 1.1 ms and 13 KB per schema, or 0.3–0.8 KB gzipped when only its `isValid` export is bundled;
|
|
285
|
+
- importing all 3,200 generated validators took 40 MB of heap (Ajv, one module) and 68 MB (ata, one module per
|
|
286
|
+
schema).
|
|
287
|
+
|
|
288
|
+
pi-schema compiles at run time in 25 µs per schema, generates no code, and covers schemas known at build time and
|
|
289
|
+
schemas that arrive later.
|
|
290
|
+
|
|
291
|
+
## Development
|
|
292
|
+
|
|
293
|
+
`npm test` runs the official test suite (drafts 2020-12 and 7, including the optional and format tests, vendored in
|
|
294
|
+
`test/fixtures/`) and the package's own tests.
|
|
295
|
+
|
|
296
|
+
The format checks are adapted from TypeBox 1.3.27 (MIT); its license is in `LICENSES/`.
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
// Annotation tracking for `unevaluatedProperties` and `unevaluatedItems`: annotating checks record which
|
|
2
|
+
// properties and items a schema evaluated. Only schemas that use those keywords compile into these closures.
|
|
3
|
+
import { isObject } from "./checks.js";
|
|
4
|
+
/** Empty annotations. */
|
|
5
|
+
export function newAnnotations() {
|
|
6
|
+
return { props: null, allProps: false, items: 0, allItems: false, indexes: null };
|
|
7
|
+
}
|
|
8
|
+
function merge(a, b) {
|
|
9
|
+
if (b.props !== null)
|
|
10
|
+
for (const k of b.props)
|
|
11
|
+
addProp(a, k);
|
|
12
|
+
a.allProps ||= b.allProps;
|
|
13
|
+
if (b.items > a.items)
|
|
14
|
+
a.items = b.items;
|
|
15
|
+
a.allItems ||= b.allItems;
|
|
16
|
+
if (b.indexes !== null)
|
|
17
|
+
for (const i of b.indexes)
|
|
18
|
+
addIndex(a, i);
|
|
19
|
+
}
|
|
20
|
+
function addProp(a, key) {
|
|
21
|
+
if (a.props === null)
|
|
22
|
+
a.props = new Set();
|
|
23
|
+
a.props.add(key);
|
|
24
|
+
}
|
|
25
|
+
function addIndex(a, index) {
|
|
26
|
+
if (a.indexes === null)
|
|
27
|
+
a.indexes = new Set();
|
|
28
|
+
a.indexes.add(index);
|
|
29
|
+
}
|
|
30
|
+
export const ANNOTATING_TRUE = () => true;
|
|
31
|
+
export const ANNOTATING_FALSE = () => false;
|
|
32
|
+
/** The indirection a recursive reference goes through. */
|
|
33
|
+
export function indirectAnnotating(slot) {
|
|
34
|
+
return (v, a) => slot.check(v, a);
|
|
35
|
+
}
|
|
36
|
+
/** A plain check in annotating position: it evaluates nothing that unevaluated* sees. */
|
|
37
|
+
export function ignoreAnnotations(check) {
|
|
38
|
+
return (v) => check(v);
|
|
39
|
+
}
|
|
40
|
+
/** An annotating check run as a plain check, with fresh annotations. */
|
|
41
|
+
export function withFreshAnnotations(check) {
|
|
42
|
+
return (v) => check(v, newAnnotations());
|
|
43
|
+
}
|
|
44
|
+
/** `check` with `uri` pushed onto the dynamic scope while it runs. */
|
|
45
|
+
export function scopedAnnotating(scope, uri, check) {
|
|
46
|
+
return (v, a) => {
|
|
47
|
+
scope.push(uri);
|
|
48
|
+
const ok = check(v, a);
|
|
49
|
+
scope.pop();
|
|
50
|
+
return ok;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/** unevaluated* sees only the annotations of its own schema, never those of its siblings in the parent. */
|
|
54
|
+
export function isolateAnnotations(check) {
|
|
55
|
+
return (v, a) => {
|
|
56
|
+
const b = newAnnotations();
|
|
57
|
+
if (!check(v, b))
|
|
58
|
+
return false;
|
|
59
|
+
merge(a, b);
|
|
60
|
+
return true;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
/** The non-annotating keywords, then each annotating part in order. */
|
|
64
|
+
export function annotateAll(plain, parts) {
|
|
65
|
+
return (v, a) => {
|
|
66
|
+
if (!plain(v))
|
|
67
|
+
return false;
|
|
68
|
+
for (let i = 0; i < parts.length; i++)
|
|
69
|
+
if (!parts[i](v, a))
|
|
70
|
+
return false;
|
|
71
|
+
return true;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/** `properties`, `patternProperties` and `additionalProperties`. */
|
|
75
|
+
export function annotateObject(props, patterns, additional) {
|
|
76
|
+
const declared = new Set(props.map(([k]) => k));
|
|
77
|
+
return (v, a) => {
|
|
78
|
+
if (!isObject(v))
|
|
79
|
+
return true;
|
|
80
|
+
const seen = [];
|
|
81
|
+
for (const [k, check] of props) {
|
|
82
|
+
if (!Object.hasOwn(v, k))
|
|
83
|
+
continue;
|
|
84
|
+
if (!check(v[k]))
|
|
85
|
+
return false;
|
|
86
|
+
seen.push(k);
|
|
87
|
+
}
|
|
88
|
+
for (const k of Object.keys(v)) {
|
|
89
|
+
let matched = declared.has(k);
|
|
90
|
+
for (const [re, check] of patterns) {
|
|
91
|
+
if (re.test(k)) {
|
|
92
|
+
if (!check(v[k]))
|
|
93
|
+
return false;
|
|
94
|
+
matched = true;
|
|
95
|
+
seen.push(k);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (!matched && additional !== undefined) {
|
|
99
|
+
if (!additional(v[k]))
|
|
100
|
+
return false;
|
|
101
|
+
seen.push(k);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
for (const k of seen)
|
|
105
|
+
addProp(a, k);
|
|
106
|
+
return true;
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
/** `prefixItems`/`items`/`additionalItems` and `contains` with its bounds. */
|
|
110
|
+
export function annotateArray(prefix, rest, contains, minContains, maxContains) {
|
|
111
|
+
return (v, a) => {
|
|
112
|
+
if (!Array.isArray(v))
|
|
113
|
+
return true;
|
|
114
|
+
const m = Math.min(v.length, prefix.length);
|
|
115
|
+
for (let i = 0; i < m; i++)
|
|
116
|
+
if (!prefix[i](v[i]))
|
|
117
|
+
return false;
|
|
118
|
+
if (rest !== undefined) {
|
|
119
|
+
for (let i = prefix.length; i < v.length; i++)
|
|
120
|
+
if (!rest(v[i]))
|
|
121
|
+
return false;
|
|
122
|
+
a.allItems = true;
|
|
123
|
+
}
|
|
124
|
+
if (m > a.items)
|
|
125
|
+
a.items = m;
|
|
126
|
+
if (contains !== undefined) {
|
|
127
|
+
let n = 0;
|
|
128
|
+
for (let i = 0; i < v.length; i++) {
|
|
129
|
+
if (contains(v[i])) {
|
|
130
|
+
n++;
|
|
131
|
+
addIndex(a, i);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
if (n < minContains || n > maxContains)
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
return true;
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
/** `anyOf` (or `oneOf` when `exactlyOne`): every passing branch contributes its annotations. */
|
|
141
|
+
export function annotateAny(branches, exactlyOne) {
|
|
142
|
+
return (v, a) => {
|
|
143
|
+
let n = 0;
|
|
144
|
+
for (const branch of branches) {
|
|
145
|
+
const b = newAnnotations();
|
|
146
|
+
if (branch(v, b)) {
|
|
147
|
+
n++;
|
|
148
|
+
merge(a, b);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
return exactlyOne ? n === 1 : n > 0;
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
/** `if`, `then` and `else`: a passing `if` contributes its annotations even without `then`. */
|
|
155
|
+
export function annotateIf(cond, then, otherwise) {
|
|
156
|
+
return (v, a) => {
|
|
157
|
+
const b = newAnnotations();
|
|
158
|
+
if (cond(v, b)) {
|
|
159
|
+
merge(a, b);
|
|
160
|
+
return then === undefined || then(v, a);
|
|
161
|
+
}
|
|
162
|
+
return otherwise === undefined || otherwise(v, a);
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
/** One `dependentSchemas` entry. */
|
|
166
|
+
export function annotateDependent(key, check) {
|
|
167
|
+
return (v, a) => !isObject(v) || !Object.hasOwn(v, key) || check(v, a);
|
|
168
|
+
}
|
|
169
|
+
/** `unevaluatedProperties`: every property no other keyword evaluated passes `check`. */
|
|
170
|
+
export function unevaluatedProperties(check) {
|
|
171
|
+
return (v, a) => {
|
|
172
|
+
if (!isObject(v) || a.allProps)
|
|
173
|
+
return true;
|
|
174
|
+
for (const k of Object.keys(v))
|
|
175
|
+
if (!(a.props?.has(k) ?? false) && !check(v[k]))
|
|
176
|
+
return false;
|
|
177
|
+
a.allProps = true;
|
|
178
|
+
return true;
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
/** `unevaluatedItems`: every item no other keyword evaluated passes `check`. */
|
|
182
|
+
export function unevaluatedItems(check) {
|
|
183
|
+
return (v, a) => {
|
|
184
|
+
if (!Array.isArray(v) || a.allItems)
|
|
185
|
+
return true;
|
|
186
|
+
for (let i = a.items; i < v.length; i++)
|
|
187
|
+
if (!(a.indexes?.has(i) ?? false) && !check(v[i]))
|
|
188
|
+
return false;
|
|
189
|
+
a.allItems = true;
|
|
190
|
+
return true;
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=annotations.js.map
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// Schema builders: short functions that return plain JSON Schema objects and carry the static type of the values
|
|
2
|
+
// they accept, so `Static<typeof schema>` is the TypeScript type a valid value has. The objects are ordinary data:
|
|
3
|
+
// they serialize with JSON.stringify and compile with compile() like any other schema.
|
|
4
|
+
/** A string, with optional length bounds (in code points), pattern and format. */
|
|
5
|
+
export function str(options = {}) {
|
|
6
|
+
return { type: "string", ...options };
|
|
7
|
+
}
|
|
8
|
+
/** A number within optional bounds. */
|
|
9
|
+
export function num(options = {}) {
|
|
10
|
+
return { type: "number", ...options };
|
|
11
|
+
}
|
|
12
|
+
/** An integer within optional bounds. */
|
|
13
|
+
export function int(options = {}) {
|
|
14
|
+
return { type: "integer", ...options };
|
|
15
|
+
}
|
|
16
|
+
/** A boolean. */
|
|
17
|
+
export function bool(options = {}) {
|
|
18
|
+
return { type: "boolean", ...options };
|
|
19
|
+
}
|
|
20
|
+
/** `null`. */
|
|
21
|
+
export function nul(options = {}) {
|
|
22
|
+
return { type: "null", ...options };
|
|
23
|
+
}
|
|
24
|
+
/** Any value. */
|
|
25
|
+
export function unknown(options = {}) {
|
|
26
|
+
return { ...options };
|
|
27
|
+
}
|
|
28
|
+
/** Exactly `value` (a string, number, boolean or null). */
|
|
29
|
+
export function lit(value, options = {}) {
|
|
30
|
+
return { const: value, ...options };
|
|
31
|
+
}
|
|
32
|
+
/** One of the given values. */
|
|
33
|
+
export function oneOf(values, options = {}) {
|
|
34
|
+
return { enum: values, ...options };
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Any of the given schemas. A union of objects tagged by a `lit()` property (`{ kind: lit("text"), ... }`) is checked
|
|
38
|
+
* by the tag: only the branch it selects runs, and its errors are the ones reported.
|
|
39
|
+
*/
|
|
40
|
+
export function union(schemas, options = {}) {
|
|
41
|
+
return { anyOf: schemas, ...options };
|
|
42
|
+
}
|
|
43
|
+
/** `schema` or `null`. */
|
|
44
|
+
export function nullable(schema, options = {}) {
|
|
45
|
+
return { anyOf: [schema, { type: "null" }], ...options };
|
|
46
|
+
}
|
|
47
|
+
/** An array of `items`, with optional length bounds and unique items. */
|
|
48
|
+
export function arr(items, options = {}) {
|
|
49
|
+
return { type: "array", items, ...options };
|
|
50
|
+
}
|
|
51
|
+
/** A fixed-length array whose items match `items` in order. */
|
|
52
|
+
export function tuple(items, options = {}) {
|
|
53
|
+
return { type: "array", prefixItems: items, items: false, minItems: items.length, ...options };
|
|
54
|
+
}
|
|
55
|
+
/** An object with string keys and values of `value` (a record). */
|
|
56
|
+
export function map(value, options = {}) {
|
|
57
|
+
return { type: "object", additionalProperties: value, ...options };
|
|
58
|
+
}
|
|
59
|
+
/** A Uint8Array with optional length bounds (an extension of JSON Schema for values that never pass through JSON). */
|
|
60
|
+
export function bytes(options = {}) {
|
|
61
|
+
return { type: "bytes", ...options };
|
|
62
|
+
}
|
|
63
|
+
/** An optional property of obj(): `{ name: opt(str()) }` may omit `name` or set it to undefined. */
|
|
64
|
+
export class Optional {
|
|
65
|
+
schema;
|
|
66
|
+
constructor(schema) {
|
|
67
|
+
this.schema = schema;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/** Marks an obj() property as optional. */
|
|
71
|
+
export function opt(schema) {
|
|
72
|
+
return new Optional(schema);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* A closed object: the given properties (required unless opt()) and no others. `open: true` allows other
|
|
76
|
+
* properties, as tool schemas from other systems often do.
|
|
77
|
+
*/
|
|
78
|
+
export function obj(properties, options = {}) {
|
|
79
|
+
const { open, ...annotations } = options;
|
|
80
|
+
const props = {};
|
|
81
|
+
const required = [];
|
|
82
|
+
for (const [name, property] of Object.entries(properties)) {
|
|
83
|
+
if (property instanceof Optional)
|
|
84
|
+
props[name] = property.schema;
|
|
85
|
+
else {
|
|
86
|
+
props[name] = property;
|
|
87
|
+
required.push(name);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
type: "object",
|
|
92
|
+
properties: props,
|
|
93
|
+
...(required.length > 0 ? { required } : {}),
|
|
94
|
+
...(open === true ? {} : { additionalProperties: false }),
|
|
95
|
+
...annotations,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=builders.js.map
|