@amplitude/ai 0.1.0
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/.cursor/skills/instrument-with-amplitude-ai/SKILL.md +50 -0
- package/AGENTS.md +79 -0
- package/LICENSE +21 -0
- package/README.md +2111 -0
- package/bin/amplitude-ai-completions.mjs +19 -0
- package/bin/amplitude-ai-doctor.mjs +26 -0
- package/bin/amplitude-ai-init.mjs +27 -0
- package/bin/amplitude-ai-instrument.mjs +52 -0
- package/bin/amplitude-ai-mcp.mjs +8 -0
- package/bin/amplitude-ai-register-catalog.mjs +156 -0
- package/bin/amplitude-ai-status.mjs +28 -0
- package/bin/amplitude-ai.mjs +43 -0
- package/bin/validate-catalog-constants.mjs +134 -0
- package/data/agent_event_catalog.json +1277 -0
- package/dist/_virtual/rolldown_runtime.js +31 -0
- package/dist/bound-agent.d.ts +56 -0
- package/dist/bound-agent.d.ts.map +1 -0
- package/dist/bound-agent.js +155 -0
- package/dist/bound-agent.js.map +1 -0
- package/dist/cli/doctor.d.ts +17 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +89 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/init.d.ts +14 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +40 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/providers.d.ts +32 -0
- package/dist/cli/providers.d.ts.map +1 -0
- package/dist/cli/providers.js +46 -0
- package/dist/cli/providers.js.map +1 -0
- package/dist/cli/status.d.ts +14 -0
- package/dist/cli/status.d.ts.map +1 -0
- package/dist/cli/status.js +38 -0
- package/dist/cli/status.js.map +1 -0
- package/dist/client.d.ts +246 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +369 -0
- package/dist/client.js.map +1 -0
- package/dist/config.d.ts +60 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +57 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +44 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +53 -0
- package/dist/context.js.map +1 -0
- package/dist/core/constants.d.ts +96 -0
- package/dist/core/constants.d.ts.map +1 -0
- package/dist/core/constants.js +105 -0
- package/dist/core/constants.js.map +1 -0
- package/dist/core/enrichments.d.ts +139 -0
- package/dist/core/enrichments.d.ts.map +1 -0
- package/dist/core/enrichments.js +177 -0
- package/dist/core/enrichments.js.map +1 -0
- package/dist/core/privacy.d.ts +53 -0
- package/dist/core/privacy.d.ts.map +1 -0
- package/dist/core/privacy.js +235 -0
- package/dist/core/privacy.js.map +1 -0
- package/dist/core/tracking.d.ts +242 -0
- package/dist/core/tracking.d.ts.map +1 -0
- package/dist/core/tracking.js +469 -0
- package/dist/core/tracking.js.map +1 -0
- package/dist/decorators.d.ts +109 -0
- package/dist/decorators.d.ts.map +1 -0
- package/dist/decorators.js +281 -0
- package/dist/decorators.js.map +1 -0
- package/dist/exceptions.d.ts +19 -0
- package/dist/exceptions.d.ts.map +1 -0
- package/dist/exceptions.js +35 -0
- package/dist/exceptions.js.map +1 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +38 -0
- package/dist/integrations/anthropic-tools.d.ts +38 -0
- package/dist/integrations/anthropic-tools.d.ts.map +1 -0
- package/dist/integrations/anthropic-tools.js +175 -0
- package/dist/integrations/anthropic-tools.js.map +1 -0
- package/dist/integrations/crewai.d.ts +14 -0
- package/dist/integrations/crewai.d.ts.map +1 -0
- package/dist/integrations/crewai.js +19 -0
- package/dist/integrations/crewai.js.map +1 -0
- package/dist/integrations/langchain.d.ts +37 -0
- package/dist/integrations/langchain.d.ts.map +1 -0
- package/dist/integrations/langchain.js +189 -0
- package/dist/integrations/langchain.js.map +1 -0
- package/dist/integrations/llamaindex.d.ts +44 -0
- package/dist/integrations/llamaindex.d.ts.map +1 -0
- package/dist/integrations/llamaindex.js +144 -0
- package/dist/integrations/llamaindex.js.map +1 -0
- package/dist/integrations/openai-agents.d.ts +35 -0
- package/dist/integrations/openai-agents.d.ts.map +1 -0
- package/dist/integrations/openai-agents.js +248 -0
- package/dist/integrations/openai-agents.js.map +1 -0
- package/dist/integrations/opentelemetry.d.ts +40 -0
- package/dist/integrations/opentelemetry.d.ts.map +1 -0
- package/dist/integrations/opentelemetry.js +146 -0
- package/dist/integrations/opentelemetry.js.map +1 -0
- package/dist/internals.d.ts +5 -0
- package/dist/internals.js +5 -0
- package/dist/mcp/contract.d.ts +27 -0
- package/dist/mcp/contract.d.ts.map +1 -0
- package/dist/mcp/contract.js +25 -0
- package/dist/mcp/contract.js.map +1 -0
- package/dist/mcp/index.d.ts +4 -0
- package/dist/mcp/index.js +5 -0
- package/dist/mcp/patterns.d.ts +11 -0
- package/dist/mcp/patterns.d.ts.map +1 -0
- package/dist/mcp/patterns.js +38 -0
- package/dist/mcp/patterns.js.map +1 -0
- package/dist/mcp/server.d.ts +10 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +241 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/validate-file.d.ts +20 -0
- package/dist/mcp/validate-file.d.ts.map +1 -0
- package/dist/mcp/validate-file.js +122 -0
- package/dist/mcp/validate-file.js.map +1 -0
- package/dist/middleware.d.ts +32 -0
- package/dist/middleware.d.ts.map +1 -0
- package/dist/middleware.js +67 -0
- package/dist/middleware.js.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js +54 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js +20 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js +34 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js +225 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js +22 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js +351 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js +634 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js +60 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js +122 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js +37 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +858 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js +32 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js +74 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js +1262 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js +83 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/formats.js +195 -0
- package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/formats.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/index.js +44 -0
- package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/limit.js +88 -0
- package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/limit.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/ajv.js +107 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/ajv.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.js +142 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/index.js +678 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/index.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/scope.js +145 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/errors.js +106 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/errors.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.js +227 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/names.js +33 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/names.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/ref_error.js +22 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/ref_error.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/resolve.js +137 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/resolve.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/rules.js +65 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/rules.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/util.js +150 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/util.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/applicability.js +27 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/boolSchema.js +52 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js +176 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/defaults.js +35 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/index.js +437 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/index.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/keyword.js +117 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/subschema.js +76 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.js +587 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/data.js +22 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/data.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-draft-07.js +145 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-draft-07.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/equal.js +16 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/equal.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/ucs2length.js +29 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/uri.js +16 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/uri.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/validation_error.js +20 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/validation_error.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +61 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +101 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js +34 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +21 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/contains.js +94 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +91 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/if.js +66 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/index.js +64 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items.js +63 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js +39 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/not.js +36 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +56 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +66 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +22 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/properties.js +57 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +46 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +22 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/code.js +134 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/code.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/id.js +19 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/index.js +27 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/ref.js +116 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/index.js +106 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/types.js +18 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft7.js +31 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/format.js +97 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/index.js +15 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/metadata.js +27 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/const.js +32 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/enum.js +54 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/index.js +53 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js +33 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js +38 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +52 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +33 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +32 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/pattern.js +43 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/required.js +77 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +75 -0
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -0
- package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js +37 -0
- package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js.map +1 -0
- package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js +240 -0
- package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js.map +1 -0
- package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js +194 -0
- package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js.map +1 -0
- package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js +286 -0
- package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js.map +1 -0
- package/dist/node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js +82 -0
- package/dist/node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js +37 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Refs.js +30 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Refs.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +16 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js +10 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseDef.js +57 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseDef.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +17 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/any.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +23 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +36 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +8 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +10 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +10 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +39 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +13 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +11 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +11 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +47 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +17 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +38 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +16 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +13 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +11 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +46 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +37 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +64 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +20 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +27 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +10 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +10 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +56 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +21 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +250 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +38 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +10 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +64 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +10 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/selectParser.js +78 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/selectParser.js.map +1 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +70 -0
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js +104 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js +11 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js +10 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js +110 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js +99 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js +84 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js +3160 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/errors.js +23 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/errors.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/iso.js +38 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/iso.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/parse.js +12 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/parse.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/schemas.js +611 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/schemas.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/api.js +437 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/api.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/checks.js +360 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/checks.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/core.js +50 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/core.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/doc.js +34 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/doc.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/errors.js +71 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/errors.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/parse.js +74 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/parse.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/regexes.js +63 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/regexes.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/registries.js +50 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/registries.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/schemas.js +1098 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/schemas.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/to-json-schema.js +599 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/to-json-schema.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/util.js +267 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/util.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/versions.js +10 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/versions.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/mini/schemas.js +50 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/mini/schemas.js.map +1 -0
- package/dist/patching.d.ts +59 -0
- package/dist/patching.d.ts.map +1 -0
- package/dist/patching.js +891 -0
- package/dist/patching.js.map +1 -0
- package/dist/propagation.d.ts +8 -0
- package/dist/propagation.d.ts.map +1 -0
- package/dist/propagation.js +46 -0
- package/dist/propagation.js.map +1 -0
- package/dist/providers/anthropic.d.ts +44 -0
- package/dist/providers/anthropic.d.ts.map +1 -0
- package/dist/providers/anthropic.js +287 -0
- package/dist/providers/anthropic.js.map +1 -0
- package/dist/providers/azure-openai.d.ts +32 -0
- package/dist/providers/azure-openai.d.ts.map +1 -0
- package/dist/providers/azure-openai.js +39 -0
- package/dist/providers/azure-openai.js.map +1 -0
- package/dist/providers/base.d.ts +70 -0
- package/dist/providers/base.d.ts.map +1 -0
- package/dist/providers/base.js +141 -0
- package/dist/providers/base.js.map +1 -0
- package/dist/providers/bedrock.d.ts +41 -0
- package/dist/providers/bedrock.d.ts.map +1 -0
- package/dist/providers/bedrock.js +229 -0
- package/dist/providers/bedrock.js.map +1 -0
- package/dist/providers/gemini.d.ts +34 -0
- package/dist/providers/gemini.d.ts.map +1 -0
- package/dist/providers/gemini.js +225 -0
- package/dist/providers/gemini.js.map +1 -0
- package/dist/providers/mistral.d.ts +32 -0
- package/dist/providers/mistral.d.ts.map +1 -0
- package/dist/providers/mistral.js +218 -0
- package/dist/providers/mistral.js.map +1 -0
- package/dist/providers/openai.d.ts +61 -0
- package/dist/providers/openai.d.ts.map +1 -0
- package/dist/providers/openai.js +530 -0
- package/dist/providers/openai.js.map +1 -0
- package/dist/register.d.ts +1 -0
- package/dist/register.js +46 -0
- package/dist/register.js.map +1 -0
- package/dist/session.d.ts +46 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +144 -0
- package/dist/session.js.map +1 -0
- package/dist/tenant.d.ts +30 -0
- package/dist/tenant.d.ts.map +1 -0
- package/dist/tenant.js +23 -0
- package/dist/tenant.js.map +1 -0
- package/dist/testing.d.ts +46 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +120 -0
- package/dist/testing.js.map +1 -0
- package/dist/types.d.ts +384 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +13 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/costs.d.ts +27 -0
- package/dist/utils/costs.d.ts.map +1 -0
- package/dist/utils/costs.js +63 -0
- package/dist/utils/costs.js.map +1 -0
- package/dist/utils/debug.d.ts +6 -0
- package/dist/utils/debug.d.ts.map +1 -0
- package/dist/utils/debug.js +73 -0
- package/dist/utils/debug.js.map +1 -0
- package/dist/utils/logger.d.ts +11 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +18 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/model-tiers.d.ts +8 -0
- package/dist/utils/model-tiers.d.ts.map +1 -0
- package/dist/utils/model-tiers.js +76 -0
- package/dist/utils/model-tiers.js.map +1 -0
- package/dist/utils/providers.d.ts +5 -0
- package/dist/utils/providers.d.ts.map +1 -0
- package/dist/utils/providers.js +20 -0
- package/dist/utils/providers.js.map +1 -0
- package/dist/utils/resolve-module.d.ts +5 -0
- package/dist/utils/resolve-module.d.ts.map +1 -0
- package/dist/utils/resolve-module.js +29 -0
- package/dist/utils/resolve-module.js.map +1 -0
- package/dist/utils/streaming.d.ts +55 -0
- package/dist/utils/streaming.d.ts.map +1 -0
- package/dist/utils/streaming.js +72 -0
- package/dist/utils/streaming.js.map +1 -0
- package/dist/utils/tokens.d.ts +16 -0
- package/dist/utils/tokens.d.ts.map +1 -0
- package/dist/utils/tokens.js +80 -0
- package/dist/utils/tokens.js.map +1 -0
- package/dist/wrappers.d.ts +37 -0
- package/dist/wrappers.d.ts.map +1 -0
- package/dist/wrappers.js +61 -0
- package/dist/wrappers.js.map +1 -0
- package/llms-full.txt +127 -0
- package/llms.txt +28 -0
- package/mcp.schema.json +18 -0
- package/package.json +189 -0
|
@@ -0,0 +1,1098 @@
|
|
|
1
|
+
import { $ZodAsyncError, $constructor, config, globalConfig } from "./core.js";
|
|
2
|
+
import { aborted, allowsEval, cached, cleanRegex, clone, defineLazy, esc, escapeRegex, finalizeIssue, getEnumValues, isObject, isPlainObject, issue, optionalKeys, prefixIssues, propertyKeyTypes } from "./util.js";
|
|
3
|
+
import { safeParse, safeParseAsync } from "./parse.js";
|
|
4
|
+
import { _null, base64, base64url, boolean, cidrv4, cidrv6, cuid, cuid2, date, datetime, duration, e164, email, emoji, guid, hostname, ipv4, ipv6, ksuid, nanoid, number, string, time, ulid, uuid, xid } from "./regexes.js";
|
|
5
|
+
import { $ZodCheck, $ZodCheckNumberFormat, $ZodCheckStringFormat } from "./checks.js";
|
|
6
|
+
import { Doc } from "./doc.js";
|
|
7
|
+
import { version } from "./versions.js";
|
|
8
|
+
|
|
9
|
+
//#region node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/schemas.js
|
|
10
|
+
const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
11
|
+
var _a;
|
|
12
|
+
inst ?? (inst = {});
|
|
13
|
+
inst._zod.def = def;
|
|
14
|
+
inst._zod.bag = inst._zod.bag || {};
|
|
15
|
+
inst._zod.version = version;
|
|
16
|
+
const checks = [...inst._zod.def.checks ?? []];
|
|
17
|
+
if (inst._zod.traits.has("$ZodCheck")) checks.unshift(inst);
|
|
18
|
+
for (const ch of checks) for (const fn of ch._zod.onattach) fn(inst);
|
|
19
|
+
if (checks.length === 0) {
|
|
20
|
+
(_a = inst._zod).deferred ?? (_a.deferred = []);
|
|
21
|
+
inst._zod.deferred?.push(() => {
|
|
22
|
+
inst._zod.run = inst._zod.parse;
|
|
23
|
+
});
|
|
24
|
+
} else {
|
|
25
|
+
const runChecks = (payload, checks$1, ctx) => {
|
|
26
|
+
let isAborted = aborted(payload);
|
|
27
|
+
let asyncResult;
|
|
28
|
+
for (const ch of checks$1) {
|
|
29
|
+
if (ch._zod.def.when) {
|
|
30
|
+
if (!ch._zod.def.when(payload)) continue;
|
|
31
|
+
} else if (isAborted) continue;
|
|
32
|
+
const currLen = payload.issues.length;
|
|
33
|
+
const _ = ch._zod.check(payload);
|
|
34
|
+
if (_ instanceof Promise && ctx?.async === false) throw new $ZodAsyncError();
|
|
35
|
+
if (asyncResult || _ instanceof Promise) asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
|
|
36
|
+
await _;
|
|
37
|
+
if (payload.issues.length === currLen) return;
|
|
38
|
+
if (!isAborted) isAborted = aborted(payload, currLen);
|
|
39
|
+
});
|
|
40
|
+
else {
|
|
41
|
+
if (payload.issues.length === currLen) continue;
|
|
42
|
+
if (!isAborted) isAborted = aborted(payload, currLen);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (asyncResult) return asyncResult.then(() => {
|
|
46
|
+
return payload;
|
|
47
|
+
});
|
|
48
|
+
return payload;
|
|
49
|
+
};
|
|
50
|
+
inst._zod.run = (payload, ctx) => {
|
|
51
|
+
const result = inst._zod.parse(payload, ctx);
|
|
52
|
+
if (result instanceof Promise) {
|
|
53
|
+
if (ctx.async === false) throw new $ZodAsyncError();
|
|
54
|
+
return result.then((result$1) => runChecks(result$1, checks, ctx));
|
|
55
|
+
}
|
|
56
|
+
return runChecks(result, checks, ctx);
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
inst["~standard"] = {
|
|
60
|
+
validate: (value) => {
|
|
61
|
+
try {
|
|
62
|
+
const r = safeParse(inst, value);
|
|
63
|
+
return r.success ? { value: r.data } : { issues: r.error?.issues };
|
|
64
|
+
} catch (_) {
|
|
65
|
+
return safeParseAsync(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues });
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
vendor: "zod",
|
|
69
|
+
version: 1
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
const $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
|
|
73
|
+
$ZodType.init(inst, def);
|
|
74
|
+
inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string(inst._zod.bag);
|
|
75
|
+
inst._zod.parse = (payload, _) => {
|
|
76
|
+
if (def.coerce) try {
|
|
77
|
+
payload.value = String(payload.value);
|
|
78
|
+
} catch (_$1) {}
|
|
79
|
+
if (typeof payload.value === "string") return payload;
|
|
80
|
+
payload.issues.push({
|
|
81
|
+
expected: "string",
|
|
82
|
+
code: "invalid_type",
|
|
83
|
+
input: payload.value,
|
|
84
|
+
inst
|
|
85
|
+
});
|
|
86
|
+
return payload;
|
|
87
|
+
};
|
|
88
|
+
});
|
|
89
|
+
const $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, def) => {
|
|
90
|
+
$ZodCheckStringFormat.init(inst, def);
|
|
91
|
+
$ZodString.init(inst, def);
|
|
92
|
+
});
|
|
93
|
+
const $ZodGUID = /* @__PURE__ */ $constructor("$ZodGUID", (inst, def) => {
|
|
94
|
+
def.pattern ?? (def.pattern = guid);
|
|
95
|
+
$ZodStringFormat.init(inst, def);
|
|
96
|
+
});
|
|
97
|
+
const $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => {
|
|
98
|
+
if (def.version) {
|
|
99
|
+
const v = {
|
|
100
|
+
v1: 1,
|
|
101
|
+
v2: 2,
|
|
102
|
+
v3: 3,
|
|
103
|
+
v4: 4,
|
|
104
|
+
v5: 5,
|
|
105
|
+
v6: 6,
|
|
106
|
+
v7: 7,
|
|
107
|
+
v8: 8
|
|
108
|
+
}[def.version];
|
|
109
|
+
if (v === void 0) throw new Error(`Invalid UUID version: "${def.version}"`);
|
|
110
|
+
def.pattern ?? (def.pattern = uuid(v));
|
|
111
|
+
} else def.pattern ?? (def.pattern = uuid());
|
|
112
|
+
$ZodStringFormat.init(inst, def);
|
|
113
|
+
});
|
|
114
|
+
const $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => {
|
|
115
|
+
def.pattern ?? (def.pattern = email);
|
|
116
|
+
$ZodStringFormat.init(inst, def);
|
|
117
|
+
});
|
|
118
|
+
const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
119
|
+
$ZodStringFormat.init(inst, def);
|
|
120
|
+
inst._zod.check = (payload) => {
|
|
121
|
+
try {
|
|
122
|
+
const orig = payload.value;
|
|
123
|
+
const url = new URL(orig);
|
|
124
|
+
const href = url.href;
|
|
125
|
+
if (def.hostname) {
|
|
126
|
+
def.hostname.lastIndex = 0;
|
|
127
|
+
if (!def.hostname.test(url.hostname)) payload.issues.push({
|
|
128
|
+
code: "invalid_format",
|
|
129
|
+
format: "url",
|
|
130
|
+
note: "Invalid hostname",
|
|
131
|
+
pattern: hostname.source,
|
|
132
|
+
input: payload.value,
|
|
133
|
+
inst,
|
|
134
|
+
continue: !def.abort
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
if (def.protocol) {
|
|
138
|
+
def.protocol.lastIndex = 0;
|
|
139
|
+
if (!def.protocol.test(url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol)) payload.issues.push({
|
|
140
|
+
code: "invalid_format",
|
|
141
|
+
format: "url",
|
|
142
|
+
note: "Invalid protocol",
|
|
143
|
+
pattern: def.protocol.source,
|
|
144
|
+
input: payload.value,
|
|
145
|
+
inst,
|
|
146
|
+
continue: !def.abort
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
if (!orig.endsWith("/") && href.endsWith("/")) payload.value = href.slice(0, -1);
|
|
150
|
+
else payload.value = href;
|
|
151
|
+
return;
|
|
152
|
+
} catch (_) {
|
|
153
|
+
payload.issues.push({
|
|
154
|
+
code: "invalid_format",
|
|
155
|
+
format: "url",
|
|
156
|
+
input: payload.value,
|
|
157
|
+
inst,
|
|
158
|
+
continue: !def.abort
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
});
|
|
163
|
+
const $ZodEmoji = /* @__PURE__ */ $constructor("$ZodEmoji", (inst, def) => {
|
|
164
|
+
def.pattern ?? (def.pattern = emoji());
|
|
165
|
+
$ZodStringFormat.init(inst, def);
|
|
166
|
+
});
|
|
167
|
+
const $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => {
|
|
168
|
+
def.pattern ?? (def.pattern = nanoid);
|
|
169
|
+
$ZodStringFormat.init(inst, def);
|
|
170
|
+
});
|
|
171
|
+
const $ZodCUID = /* @__PURE__ */ $constructor("$ZodCUID", (inst, def) => {
|
|
172
|
+
def.pattern ?? (def.pattern = cuid);
|
|
173
|
+
$ZodStringFormat.init(inst, def);
|
|
174
|
+
});
|
|
175
|
+
const $ZodCUID2 = /* @__PURE__ */ $constructor("$ZodCUID2", (inst, def) => {
|
|
176
|
+
def.pattern ?? (def.pattern = cuid2);
|
|
177
|
+
$ZodStringFormat.init(inst, def);
|
|
178
|
+
});
|
|
179
|
+
const $ZodULID = /* @__PURE__ */ $constructor("$ZodULID", (inst, def) => {
|
|
180
|
+
def.pattern ?? (def.pattern = ulid);
|
|
181
|
+
$ZodStringFormat.init(inst, def);
|
|
182
|
+
});
|
|
183
|
+
const $ZodXID = /* @__PURE__ */ $constructor("$ZodXID", (inst, def) => {
|
|
184
|
+
def.pattern ?? (def.pattern = xid);
|
|
185
|
+
$ZodStringFormat.init(inst, def);
|
|
186
|
+
});
|
|
187
|
+
const $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => {
|
|
188
|
+
def.pattern ?? (def.pattern = ksuid);
|
|
189
|
+
$ZodStringFormat.init(inst, def);
|
|
190
|
+
});
|
|
191
|
+
const $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => {
|
|
192
|
+
def.pattern ?? (def.pattern = datetime(def));
|
|
193
|
+
$ZodStringFormat.init(inst, def);
|
|
194
|
+
});
|
|
195
|
+
const $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => {
|
|
196
|
+
def.pattern ?? (def.pattern = date);
|
|
197
|
+
$ZodStringFormat.init(inst, def);
|
|
198
|
+
});
|
|
199
|
+
const $ZodISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => {
|
|
200
|
+
def.pattern ?? (def.pattern = time(def));
|
|
201
|
+
$ZodStringFormat.init(inst, def);
|
|
202
|
+
});
|
|
203
|
+
const $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => {
|
|
204
|
+
def.pattern ?? (def.pattern = duration);
|
|
205
|
+
$ZodStringFormat.init(inst, def);
|
|
206
|
+
});
|
|
207
|
+
const $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => {
|
|
208
|
+
def.pattern ?? (def.pattern = ipv4);
|
|
209
|
+
$ZodStringFormat.init(inst, def);
|
|
210
|
+
inst._zod.onattach.push((inst$1) => {
|
|
211
|
+
const bag = inst$1._zod.bag;
|
|
212
|
+
bag.format = `ipv4`;
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
const $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
|
|
216
|
+
def.pattern ?? (def.pattern = ipv6);
|
|
217
|
+
$ZodStringFormat.init(inst, def);
|
|
218
|
+
inst._zod.onattach.push((inst$1) => {
|
|
219
|
+
const bag = inst$1._zod.bag;
|
|
220
|
+
bag.format = `ipv6`;
|
|
221
|
+
});
|
|
222
|
+
inst._zod.check = (payload) => {
|
|
223
|
+
try {
|
|
224
|
+
new URL(`http://[${payload.value}]`);
|
|
225
|
+
} catch {
|
|
226
|
+
payload.issues.push({
|
|
227
|
+
code: "invalid_format",
|
|
228
|
+
format: "ipv6",
|
|
229
|
+
input: payload.value,
|
|
230
|
+
inst,
|
|
231
|
+
continue: !def.abort
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
});
|
|
236
|
+
const $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => {
|
|
237
|
+
def.pattern ?? (def.pattern = cidrv4);
|
|
238
|
+
$ZodStringFormat.init(inst, def);
|
|
239
|
+
});
|
|
240
|
+
const $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
|
|
241
|
+
def.pattern ?? (def.pattern = cidrv6);
|
|
242
|
+
$ZodStringFormat.init(inst, def);
|
|
243
|
+
inst._zod.check = (payload) => {
|
|
244
|
+
const [address, prefix] = payload.value.split("/");
|
|
245
|
+
try {
|
|
246
|
+
if (!prefix) throw new Error();
|
|
247
|
+
const prefixNum = Number(prefix);
|
|
248
|
+
if (`${prefixNum}` !== prefix) throw new Error();
|
|
249
|
+
if (prefixNum < 0 || prefixNum > 128) throw new Error();
|
|
250
|
+
new URL(`http://[${address}]`);
|
|
251
|
+
} catch {
|
|
252
|
+
payload.issues.push({
|
|
253
|
+
code: "invalid_format",
|
|
254
|
+
format: "cidrv6",
|
|
255
|
+
input: payload.value,
|
|
256
|
+
inst,
|
|
257
|
+
continue: !def.abort
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
});
|
|
262
|
+
function isValidBase64(data) {
|
|
263
|
+
if (data === "") return true;
|
|
264
|
+
if (data.length % 4 !== 0) return false;
|
|
265
|
+
try {
|
|
266
|
+
atob(data);
|
|
267
|
+
return true;
|
|
268
|
+
} catch {
|
|
269
|
+
return false;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
const $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
|
|
273
|
+
def.pattern ?? (def.pattern = base64);
|
|
274
|
+
$ZodStringFormat.init(inst, def);
|
|
275
|
+
inst._zod.onattach.push((inst$1) => {
|
|
276
|
+
inst$1._zod.bag.contentEncoding = "base64";
|
|
277
|
+
});
|
|
278
|
+
inst._zod.check = (payload) => {
|
|
279
|
+
if (isValidBase64(payload.value)) return;
|
|
280
|
+
payload.issues.push({
|
|
281
|
+
code: "invalid_format",
|
|
282
|
+
format: "base64",
|
|
283
|
+
input: payload.value,
|
|
284
|
+
inst,
|
|
285
|
+
continue: !def.abort
|
|
286
|
+
});
|
|
287
|
+
};
|
|
288
|
+
});
|
|
289
|
+
function isValidBase64URL(data) {
|
|
290
|
+
if (!base64url.test(data)) return false;
|
|
291
|
+
const base64$1 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
|
|
292
|
+
return isValidBase64(base64$1.padEnd(Math.ceil(base64$1.length / 4) * 4, "="));
|
|
293
|
+
}
|
|
294
|
+
const $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => {
|
|
295
|
+
def.pattern ?? (def.pattern = base64url);
|
|
296
|
+
$ZodStringFormat.init(inst, def);
|
|
297
|
+
inst._zod.onattach.push((inst$1) => {
|
|
298
|
+
inst$1._zod.bag.contentEncoding = "base64url";
|
|
299
|
+
});
|
|
300
|
+
inst._zod.check = (payload) => {
|
|
301
|
+
if (isValidBase64URL(payload.value)) return;
|
|
302
|
+
payload.issues.push({
|
|
303
|
+
code: "invalid_format",
|
|
304
|
+
format: "base64url",
|
|
305
|
+
input: payload.value,
|
|
306
|
+
inst,
|
|
307
|
+
continue: !def.abort
|
|
308
|
+
});
|
|
309
|
+
};
|
|
310
|
+
});
|
|
311
|
+
const $ZodE164 = /* @__PURE__ */ $constructor("$ZodE164", (inst, def) => {
|
|
312
|
+
def.pattern ?? (def.pattern = e164);
|
|
313
|
+
$ZodStringFormat.init(inst, def);
|
|
314
|
+
});
|
|
315
|
+
function isValidJWT(token, algorithm = null) {
|
|
316
|
+
try {
|
|
317
|
+
const tokensParts = token.split(".");
|
|
318
|
+
if (tokensParts.length !== 3) return false;
|
|
319
|
+
const [header] = tokensParts;
|
|
320
|
+
if (!header) return false;
|
|
321
|
+
const parsedHeader = JSON.parse(atob(header));
|
|
322
|
+
if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") return false;
|
|
323
|
+
if (!parsedHeader.alg) return false;
|
|
324
|
+
if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm)) return false;
|
|
325
|
+
return true;
|
|
326
|
+
} catch {
|
|
327
|
+
return false;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
|
|
331
|
+
$ZodStringFormat.init(inst, def);
|
|
332
|
+
inst._zod.check = (payload) => {
|
|
333
|
+
if (isValidJWT(payload.value, def.alg)) return;
|
|
334
|
+
payload.issues.push({
|
|
335
|
+
code: "invalid_format",
|
|
336
|
+
format: "jwt",
|
|
337
|
+
input: payload.value,
|
|
338
|
+
inst,
|
|
339
|
+
continue: !def.abort
|
|
340
|
+
});
|
|
341
|
+
};
|
|
342
|
+
});
|
|
343
|
+
const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
|
|
344
|
+
$ZodType.init(inst, def);
|
|
345
|
+
inst._zod.pattern = inst._zod.bag.pattern ?? number;
|
|
346
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
347
|
+
if (def.coerce) try {
|
|
348
|
+
payload.value = Number(payload.value);
|
|
349
|
+
} catch (_) {}
|
|
350
|
+
const input = payload.value;
|
|
351
|
+
if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) return payload;
|
|
352
|
+
const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0;
|
|
353
|
+
payload.issues.push({
|
|
354
|
+
expected: "number",
|
|
355
|
+
code: "invalid_type",
|
|
356
|
+
input,
|
|
357
|
+
inst,
|
|
358
|
+
...received ? { received } : {}
|
|
359
|
+
});
|
|
360
|
+
return payload;
|
|
361
|
+
};
|
|
362
|
+
});
|
|
363
|
+
const $ZodNumberFormat = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
|
|
364
|
+
$ZodCheckNumberFormat.init(inst, def);
|
|
365
|
+
$ZodNumber.init(inst, def);
|
|
366
|
+
});
|
|
367
|
+
const $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
|
|
368
|
+
$ZodType.init(inst, def);
|
|
369
|
+
inst._zod.pattern = boolean;
|
|
370
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
371
|
+
if (def.coerce) try {
|
|
372
|
+
payload.value = Boolean(payload.value);
|
|
373
|
+
} catch (_) {}
|
|
374
|
+
const input = payload.value;
|
|
375
|
+
if (typeof input === "boolean") return payload;
|
|
376
|
+
payload.issues.push({
|
|
377
|
+
expected: "boolean",
|
|
378
|
+
code: "invalid_type",
|
|
379
|
+
input,
|
|
380
|
+
inst
|
|
381
|
+
});
|
|
382
|
+
return payload;
|
|
383
|
+
};
|
|
384
|
+
});
|
|
385
|
+
const $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
|
|
386
|
+
$ZodType.init(inst, def);
|
|
387
|
+
inst._zod.pattern = _null;
|
|
388
|
+
inst._zod.values = new Set([null]);
|
|
389
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
390
|
+
const input = payload.value;
|
|
391
|
+
if (input === null) return payload;
|
|
392
|
+
payload.issues.push({
|
|
393
|
+
expected: "null",
|
|
394
|
+
code: "invalid_type",
|
|
395
|
+
input,
|
|
396
|
+
inst
|
|
397
|
+
});
|
|
398
|
+
return payload;
|
|
399
|
+
};
|
|
400
|
+
});
|
|
401
|
+
const $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => {
|
|
402
|
+
$ZodType.init(inst, def);
|
|
403
|
+
inst._zod.parse = (payload) => payload;
|
|
404
|
+
});
|
|
405
|
+
const $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
|
|
406
|
+
$ZodType.init(inst, def);
|
|
407
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
408
|
+
payload.issues.push({
|
|
409
|
+
expected: "never",
|
|
410
|
+
code: "invalid_type",
|
|
411
|
+
input: payload.value,
|
|
412
|
+
inst
|
|
413
|
+
});
|
|
414
|
+
return payload;
|
|
415
|
+
};
|
|
416
|
+
});
|
|
417
|
+
function handleArrayResult(result, final, index) {
|
|
418
|
+
if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
|
|
419
|
+
final.value[index] = result.value;
|
|
420
|
+
}
|
|
421
|
+
const $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
422
|
+
$ZodType.init(inst, def);
|
|
423
|
+
inst._zod.parse = (payload, ctx) => {
|
|
424
|
+
const input = payload.value;
|
|
425
|
+
if (!Array.isArray(input)) {
|
|
426
|
+
payload.issues.push({
|
|
427
|
+
expected: "array",
|
|
428
|
+
code: "invalid_type",
|
|
429
|
+
input,
|
|
430
|
+
inst
|
|
431
|
+
});
|
|
432
|
+
return payload;
|
|
433
|
+
}
|
|
434
|
+
payload.value = Array(input.length);
|
|
435
|
+
const proms = [];
|
|
436
|
+
for (let i = 0; i < input.length; i++) {
|
|
437
|
+
const item = input[i];
|
|
438
|
+
const result = def.element._zod.run({
|
|
439
|
+
value: item,
|
|
440
|
+
issues: []
|
|
441
|
+
}, ctx);
|
|
442
|
+
if (result instanceof Promise) proms.push(result.then((result$1) => handleArrayResult(result$1, payload, i)));
|
|
443
|
+
else handleArrayResult(result, payload, i);
|
|
444
|
+
}
|
|
445
|
+
if (proms.length) return Promise.all(proms).then(() => payload);
|
|
446
|
+
return payload;
|
|
447
|
+
};
|
|
448
|
+
});
|
|
449
|
+
function handleObjectResult(result, final, key) {
|
|
450
|
+
if (result.issues.length) final.issues.push(...prefixIssues(key, result.issues));
|
|
451
|
+
final.value[key] = result.value;
|
|
452
|
+
}
|
|
453
|
+
function handleOptionalObjectResult(result, final, key, input) {
|
|
454
|
+
if (result.issues.length) if (input[key] === void 0) if (key in input) final.value[key] = void 0;
|
|
455
|
+
else final.value[key] = result.value;
|
|
456
|
+
else final.issues.push(...prefixIssues(key, result.issues));
|
|
457
|
+
else if (result.value === void 0) {
|
|
458
|
+
if (key in input) final.value[key] = void 0;
|
|
459
|
+
} else final.value[key] = result.value;
|
|
460
|
+
}
|
|
461
|
+
const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
462
|
+
$ZodType.init(inst, def);
|
|
463
|
+
const _normalized = cached(() => {
|
|
464
|
+
const keys = Object.keys(def.shape);
|
|
465
|
+
for (const k of keys) if (!(def.shape[k] instanceof $ZodType)) throw new Error(`Invalid element at key "${k}": expected a Zod schema`);
|
|
466
|
+
const okeys = optionalKeys(def.shape);
|
|
467
|
+
return {
|
|
468
|
+
shape: def.shape,
|
|
469
|
+
keys,
|
|
470
|
+
keySet: new Set(keys),
|
|
471
|
+
numKeys: keys.length,
|
|
472
|
+
optionalKeys: new Set(okeys)
|
|
473
|
+
};
|
|
474
|
+
});
|
|
475
|
+
defineLazy(inst._zod, "propValues", () => {
|
|
476
|
+
const shape = def.shape;
|
|
477
|
+
const propValues = {};
|
|
478
|
+
for (const key in shape) {
|
|
479
|
+
const field = shape[key]._zod;
|
|
480
|
+
if (field.values) {
|
|
481
|
+
propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
|
|
482
|
+
for (const v of field.values) propValues[key].add(v);
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
return propValues;
|
|
486
|
+
});
|
|
487
|
+
const generateFastpass = (shape) => {
|
|
488
|
+
const doc = new Doc([
|
|
489
|
+
"shape",
|
|
490
|
+
"payload",
|
|
491
|
+
"ctx"
|
|
492
|
+
]);
|
|
493
|
+
const normalized = _normalized.value;
|
|
494
|
+
const parseStr = (key) => {
|
|
495
|
+
const k = esc(key);
|
|
496
|
+
return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
|
|
497
|
+
};
|
|
498
|
+
doc.write(`const input = payload.value;`);
|
|
499
|
+
const ids = Object.create(null);
|
|
500
|
+
let counter = 0;
|
|
501
|
+
for (const key of normalized.keys) ids[key] = `key_${counter++}`;
|
|
502
|
+
doc.write(`const newResult = {}`);
|
|
503
|
+
for (const key of normalized.keys) if (normalized.optionalKeys.has(key)) {
|
|
504
|
+
const id = ids[key];
|
|
505
|
+
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
506
|
+
const k = esc(key);
|
|
507
|
+
doc.write(`
|
|
508
|
+
if (${id}.issues.length) {
|
|
509
|
+
if (input[${k}] === undefined) {
|
|
510
|
+
if (${k} in input) {
|
|
511
|
+
newResult[${k}] = undefined;
|
|
512
|
+
}
|
|
513
|
+
} else {
|
|
514
|
+
payload.issues = payload.issues.concat(
|
|
515
|
+
${id}.issues.map((iss) => ({
|
|
516
|
+
...iss,
|
|
517
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}],
|
|
518
|
+
}))
|
|
519
|
+
);
|
|
520
|
+
}
|
|
521
|
+
} else if (${id}.value === undefined) {
|
|
522
|
+
if (${k} in input) newResult[${k}] = undefined;
|
|
523
|
+
} else {
|
|
524
|
+
newResult[${k}] = ${id}.value;
|
|
525
|
+
}
|
|
526
|
+
`);
|
|
527
|
+
} else {
|
|
528
|
+
const id = ids[key];
|
|
529
|
+
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
530
|
+
doc.write(`
|
|
531
|
+
if (${id}.issues.length) payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
532
|
+
...iss,
|
|
533
|
+
path: iss.path ? [${esc(key)}, ...iss.path] : [${esc(key)}]
|
|
534
|
+
})));`);
|
|
535
|
+
doc.write(`newResult[${esc(key)}] = ${id}.value`);
|
|
536
|
+
}
|
|
537
|
+
doc.write(`payload.value = newResult;`);
|
|
538
|
+
doc.write(`return payload;`);
|
|
539
|
+
const fn = doc.compile();
|
|
540
|
+
return (payload, ctx) => fn(shape, payload, ctx);
|
|
541
|
+
};
|
|
542
|
+
let fastpass;
|
|
543
|
+
const isObject$1 = isObject;
|
|
544
|
+
const jit = !globalConfig.jitless;
|
|
545
|
+
const allowsEval$1 = allowsEval;
|
|
546
|
+
const fastEnabled = jit && allowsEval$1.value;
|
|
547
|
+
const catchall = def.catchall;
|
|
548
|
+
let value;
|
|
549
|
+
inst._zod.parse = (payload, ctx) => {
|
|
550
|
+
value ?? (value = _normalized.value);
|
|
551
|
+
const input = payload.value;
|
|
552
|
+
if (!isObject$1(input)) {
|
|
553
|
+
payload.issues.push({
|
|
554
|
+
expected: "object",
|
|
555
|
+
code: "invalid_type",
|
|
556
|
+
input,
|
|
557
|
+
inst
|
|
558
|
+
});
|
|
559
|
+
return payload;
|
|
560
|
+
}
|
|
561
|
+
const proms = [];
|
|
562
|
+
if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {
|
|
563
|
+
if (!fastpass) fastpass = generateFastpass(def.shape);
|
|
564
|
+
payload = fastpass(payload, ctx);
|
|
565
|
+
} else {
|
|
566
|
+
payload.value = {};
|
|
567
|
+
const shape = value.shape;
|
|
568
|
+
for (const key of value.keys) {
|
|
569
|
+
const el = shape[key];
|
|
570
|
+
const r = el._zod.run({
|
|
571
|
+
value: input[key],
|
|
572
|
+
issues: []
|
|
573
|
+
}, ctx);
|
|
574
|
+
const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
|
|
575
|
+
if (r instanceof Promise) proms.push(r.then((r$1) => isOptional ? handleOptionalObjectResult(r$1, payload, key, input) : handleObjectResult(r$1, payload, key)));
|
|
576
|
+
else if (isOptional) handleOptionalObjectResult(r, payload, key, input);
|
|
577
|
+
else handleObjectResult(r, payload, key);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
if (!catchall) return proms.length ? Promise.all(proms).then(() => payload) : payload;
|
|
581
|
+
const unrecognized = [];
|
|
582
|
+
const keySet = value.keySet;
|
|
583
|
+
const _catchall = catchall._zod;
|
|
584
|
+
const t = _catchall.def.type;
|
|
585
|
+
for (const key of Object.keys(input)) {
|
|
586
|
+
if (keySet.has(key)) continue;
|
|
587
|
+
if (t === "never") {
|
|
588
|
+
unrecognized.push(key);
|
|
589
|
+
continue;
|
|
590
|
+
}
|
|
591
|
+
const r = _catchall.run({
|
|
592
|
+
value: input[key],
|
|
593
|
+
issues: []
|
|
594
|
+
}, ctx);
|
|
595
|
+
if (r instanceof Promise) proms.push(r.then((r$1) => handleObjectResult(r$1, payload, key)));
|
|
596
|
+
else handleObjectResult(r, payload, key);
|
|
597
|
+
}
|
|
598
|
+
if (unrecognized.length) payload.issues.push({
|
|
599
|
+
code: "unrecognized_keys",
|
|
600
|
+
keys: unrecognized,
|
|
601
|
+
input,
|
|
602
|
+
inst
|
|
603
|
+
});
|
|
604
|
+
if (!proms.length) return payload;
|
|
605
|
+
return Promise.all(proms).then(() => {
|
|
606
|
+
return payload;
|
|
607
|
+
});
|
|
608
|
+
};
|
|
609
|
+
});
|
|
610
|
+
function handleUnionResults(results, final, inst, ctx) {
|
|
611
|
+
for (const result of results) if (result.issues.length === 0) {
|
|
612
|
+
final.value = result.value;
|
|
613
|
+
return final;
|
|
614
|
+
}
|
|
615
|
+
final.issues.push({
|
|
616
|
+
code: "invalid_union",
|
|
617
|
+
input: final.value,
|
|
618
|
+
inst,
|
|
619
|
+
errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
|
|
620
|
+
});
|
|
621
|
+
return final;
|
|
622
|
+
}
|
|
623
|
+
const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
624
|
+
$ZodType.init(inst, def);
|
|
625
|
+
defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0);
|
|
626
|
+
defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0);
|
|
627
|
+
defineLazy(inst._zod, "values", () => {
|
|
628
|
+
if (def.options.every((o) => o._zod.values)) return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
|
|
629
|
+
});
|
|
630
|
+
defineLazy(inst._zod, "pattern", () => {
|
|
631
|
+
if (def.options.every((o) => o._zod.pattern)) {
|
|
632
|
+
const patterns = def.options.map((o) => o._zod.pattern);
|
|
633
|
+
return /* @__PURE__ */ new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`);
|
|
634
|
+
}
|
|
635
|
+
});
|
|
636
|
+
inst._zod.parse = (payload, ctx) => {
|
|
637
|
+
let async = false;
|
|
638
|
+
const results = [];
|
|
639
|
+
for (const option of def.options) {
|
|
640
|
+
const result = option._zod.run({
|
|
641
|
+
value: payload.value,
|
|
642
|
+
issues: []
|
|
643
|
+
}, ctx);
|
|
644
|
+
if (result instanceof Promise) {
|
|
645
|
+
results.push(result);
|
|
646
|
+
async = true;
|
|
647
|
+
} else {
|
|
648
|
+
if (result.issues.length === 0) return result;
|
|
649
|
+
results.push(result);
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
if (!async) return handleUnionResults(results, payload, inst, ctx);
|
|
653
|
+
return Promise.all(results).then((results$1) => {
|
|
654
|
+
return handleUnionResults(results$1, payload, inst, ctx);
|
|
655
|
+
});
|
|
656
|
+
};
|
|
657
|
+
});
|
|
658
|
+
const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => {
|
|
659
|
+
$ZodUnion.init(inst, def);
|
|
660
|
+
const _super = inst._zod.parse;
|
|
661
|
+
defineLazy(inst._zod, "propValues", () => {
|
|
662
|
+
const propValues = {};
|
|
663
|
+
for (const option of def.options) {
|
|
664
|
+
const pv = option._zod.propValues;
|
|
665
|
+
if (!pv || Object.keys(pv).length === 0) throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
|
|
666
|
+
for (const [k, v] of Object.entries(pv)) {
|
|
667
|
+
if (!propValues[k]) propValues[k] = /* @__PURE__ */ new Set();
|
|
668
|
+
for (const val of v) propValues[k].add(val);
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
return propValues;
|
|
672
|
+
});
|
|
673
|
+
const disc = cached(() => {
|
|
674
|
+
const opts = def.options;
|
|
675
|
+
const map = /* @__PURE__ */ new Map();
|
|
676
|
+
for (const o of opts) {
|
|
677
|
+
const values = o._zod.propValues[def.discriminator];
|
|
678
|
+
if (!values || values.size === 0) throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
|
|
679
|
+
for (const v of values) {
|
|
680
|
+
if (map.has(v)) throw new Error(`Duplicate discriminator value "${String(v)}"`);
|
|
681
|
+
map.set(v, o);
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
return map;
|
|
685
|
+
});
|
|
686
|
+
inst._zod.parse = (payload, ctx) => {
|
|
687
|
+
const input = payload.value;
|
|
688
|
+
if (!isObject(input)) {
|
|
689
|
+
payload.issues.push({
|
|
690
|
+
code: "invalid_type",
|
|
691
|
+
expected: "object",
|
|
692
|
+
input,
|
|
693
|
+
inst
|
|
694
|
+
});
|
|
695
|
+
return payload;
|
|
696
|
+
}
|
|
697
|
+
const opt = disc.value.get(input?.[def.discriminator]);
|
|
698
|
+
if (opt) return opt._zod.run(payload, ctx);
|
|
699
|
+
if (def.unionFallback) return _super(payload, ctx);
|
|
700
|
+
payload.issues.push({
|
|
701
|
+
code: "invalid_union",
|
|
702
|
+
errors: [],
|
|
703
|
+
note: "No matching discriminator",
|
|
704
|
+
input,
|
|
705
|
+
path: [def.discriminator],
|
|
706
|
+
inst
|
|
707
|
+
});
|
|
708
|
+
return payload;
|
|
709
|
+
};
|
|
710
|
+
});
|
|
711
|
+
const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
|
|
712
|
+
$ZodType.init(inst, def);
|
|
713
|
+
inst._zod.parse = (payload, ctx) => {
|
|
714
|
+
const input = payload.value;
|
|
715
|
+
const left = def.left._zod.run({
|
|
716
|
+
value: input,
|
|
717
|
+
issues: []
|
|
718
|
+
}, ctx);
|
|
719
|
+
const right = def.right._zod.run({
|
|
720
|
+
value: input,
|
|
721
|
+
issues: []
|
|
722
|
+
}, ctx);
|
|
723
|
+
if (left instanceof Promise || right instanceof Promise) return Promise.all([left, right]).then(([left$1, right$1]) => {
|
|
724
|
+
return handleIntersectionResults(payload, left$1, right$1);
|
|
725
|
+
});
|
|
726
|
+
return handleIntersectionResults(payload, left, right);
|
|
727
|
+
};
|
|
728
|
+
});
|
|
729
|
+
function mergeValues(a, b) {
|
|
730
|
+
if (a === b) return {
|
|
731
|
+
valid: true,
|
|
732
|
+
data: a
|
|
733
|
+
};
|
|
734
|
+
if (a instanceof Date && b instanceof Date && +a === +b) return {
|
|
735
|
+
valid: true,
|
|
736
|
+
data: a
|
|
737
|
+
};
|
|
738
|
+
if (isPlainObject(a) && isPlainObject(b)) {
|
|
739
|
+
const bKeys = Object.keys(b);
|
|
740
|
+
const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
|
|
741
|
+
const newObj = {
|
|
742
|
+
...a,
|
|
743
|
+
...b
|
|
744
|
+
};
|
|
745
|
+
for (const key of sharedKeys) {
|
|
746
|
+
const sharedValue = mergeValues(a[key], b[key]);
|
|
747
|
+
if (!sharedValue.valid) return {
|
|
748
|
+
valid: false,
|
|
749
|
+
mergeErrorPath: [key, ...sharedValue.mergeErrorPath]
|
|
750
|
+
};
|
|
751
|
+
newObj[key] = sharedValue.data;
|
|
752
|
+
}
|
|
753
|
+
return {
|
|
754
|
+
valid: true,
|
|
755
|
+
data: newObj
|
|
756
|
+
};
|
|
757
|
+
}
|
|
758
|
+
if (Array.isArray(a) && Array.isArray(b)) {
|
|
759
|
+
if (a.length !== b.length) return {
|
|
760
|
+
valid: false,
|
|
761
|
+
mergeErrorPath: []
|
|
762
|
+
};
|
|
763
|
+
const newArray = [];
|
|
764
|
+
for (let index = 0; index < a.length; index++) {
|
|
765
|
+
const itemA = a[index];
|
|
766
|
+
const itemB = b[index];
|
|
767
|
+
const sharedValue = mergeValues(itemA, itemB);
|
|
768
|
+
if (!sharedValue.valid) return {
|
|
769
|
+
valid: false,
|
|
770
|
+
mergeErrorPath: [index, ...sharedValue.mergeErrorPath]
|
|
771
|
+
};
|
|
772
|
+
newArray.push(sharedValue.data);
|
|
773
|
+
}
|
|
774
|
+
return {
|
|
775
|
+
valid: true,
|
|
776
|
+
data: newArray
|
|
777
|
+
};
|
|
778
|
+
}
|
|
779
|
+
return {
|
|
780
|
+
valid: false,
|
|
781
|
+
mergeErrorPath: []
|
|
782
|
+
};
|
|
783
|
+
}
|
|
784
|
+
function handleIntersectionResults(result, left, right) {
|
|
785
|
+
if (left.issues.length) result.issues.push(...left.issues);
|
|
786
|
+
if (right.issues.length) result.issues.push(...right.issues);
|
|
787
|
+
if (aborted(result)) return result;
|
|
788
|
+
const merged = mergeValues(left.value, right.value);
|
|
789
|
+
if (!merged.valid) throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`);
|
|
790
|
+
result.value = merged.data;
|
|
791
|
+
return result;
|
|
792
|
+
}
|
|
793
|
+
const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
794
|
+
$ZodType.init(inst, def);
|
|
795
|
+
inst._zod.parse = (payload, ctx) => {
|
|
796
|
+
const input = payload.value;
|
|
797
|
+
if (!isPlainObject(input)) {
|
|
798
|
+
payload.issues.push({
|
|
799
|
+
expected: "record",
|
|
800
|
+
code: "invalid_type",
|
|
801
|
+
input,
|
|
802
|
+
inst
|
|
803
|
+
});
|
|
804
|
+
return payload;
|
|
805
|
+
}
|
|
806
|
+
const proms = [];
|
|
807
|
+
if (def.keyType._zod.values) {
|
|
808
|
+
const values = def.keyType._zod.values;
|
|
809
|
+
payload.value = {};
|
|
810
|
+
for (const key of values) if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
811
|
+
const result = def.valueType._zod.run({
|
|
812
|
+
value: input[key],
|
|
813
|
+
issues: []
|
|
814
|
+
}, ctx);
|
|
815
|
+
if (result instanceof Promise) proms.push(result.then((result$1) => {
|
|
816
|
+
if (result$1.issues.length) payload.issues.push(...prefixIssues(key, result$1.issues));
|
|
817
|
+
payload.value[key] = result$1.value;
|
|
818
|
+
}));
|
|
819
|
+
else {
|
|
820
|
+
if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
|
|
821
|
+
payload.value[key] = result.value;
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
let unrecognized;
|
|
825
|
+
for (const key in input) if (!values.has(key)) {
|
|
826
|
+
unrecognized = unrecognized ?? [];
|
|
827
|
+
unrecognized.push(key);
|
|
828
|
+
}
|
|
829
|
+
if (unrecognized && unrecognized.length > 0) payload.issues.push({
|
|
830
|
+
code: "unrecognized_keys",
|
|
831
|
+
input,
|
|
832
|
+
inst,
|
|
833
|
+
keys: unrecognized
|
|
834
|
+
});
|
|
835
|
+
} else {
|
|
836
|
+
payload.value = {};
|
|
837
|
+
for (const key of Reflect.ownKeys(input)) {
|
|
838
|
+
if (key === "__proto__") continue;
|
|
839
|
+
const keyResult = def.keyType._zod.run({
|
|
840
|
+
value: key,
|
|
841
|
+
issues: []
|
|
842
|
+
}, ctx);
|
|
843
|
+
if (keyResult instanceof Promise) throw new Error("Async schemas not supported in object keys currently");
|
|
844
|
+
if (keyResult.issues.length) {
|
|
845
|
+
payload.issues.push({
|
|
846
|
+
origin: "record",
|
|
847
|
+
code: "invalid_key",
|
|
848
|
+
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
849
|
+
input: key,
|
|
850
|
+
path: [key],
|
|
851
|
+
inst
|
|
852
|
+
});
|
|
853
|
+
payload.value[keyResult.value] = keyResult.value;
|
|
854
|
+
continue;
|
|
855
|
+
}
|
|
856
|
+
const result = def.valueType._zod.run({
|
|
857
|
+
value: input[key],
|
|
858
|
+
issues: []
|
|
859
|
+
}, ctx);
|
|
860
|
+
if (result instanceof Promise) proms.push(result.then((result$1) => {
|
|
861
|
+
if (result$1.issues.length) payload.issues.push(...prefixIssues(key, result$1.issues));
|
|
862
|
+
payload.value[keyResult.value] = result$1.value;
|
|
863
|
+
}));
|
|
864
|
+
else {
|
|
865
|
+
if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
|
|
866
|
+
payload.value[keyResult.value] = result.value;
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
if (proms.length) return Promise.all(proms).then(() => payload);
|
|
871
|
+
return payload;
|
|
872
|
+
};
|
|
873
|
+
});
|
|
874
|
+
const $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
|
|
875
|
+
$ZodType.init(inst, def);
|
|
876
|
+
const values = getEnumValues(def.entries);
|
|
877
|
+
inst._zod.values = new Set(values);
|
|
878
|
+
inst._zod.pattern = /* @__PURE__ */ new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
|
|
879
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
880
|
+
const input = payload.value;
|
|
881
|
+
if (inst._zod.values.has(input)) return payload;
|
|
882
|
+
payload.issues.push({
|
|
883
|
+
code: "invalid_value",
|
|
884
|
+
values,
|
|
885
|
+
input,
|
|
886
|
+
inst
|
|
887
|
+
});
|
|
888
|
+
return payload;
|
|
889
|
+
};
|
|
890
|
+
});
|
|
891
|
+
const $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
|
|
892
|
+
$ZodType.init(inst, def);
|
|
893
|
+
inst._zod.values = new Set(def.values);
|
|
894
|
+
inst._zod.pattern = /* @__PURE__ */ new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? o.toString() : String(o)).join("|")})$`);
|
|
895
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
896
|
+
const input = payload.value;
|
|
897
|
+
if (inst._zod.values.has(input)) return payload;
|
|
898
|
+
payload.issues.push({
|
|
899
|
+
code: "invalid_value",
|
|
900
|
+
values: def.values,
|
|
901
|
+
input,
|
|
902
|
+
inst
|
|
903
|
+
});
|
|
904
|
+
return payload;
|
|
905
|
+
};
|
|
906
|
+
});
|
|
907
|
+
const $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
|
|
908
|
+
$ZodType.init(inst, def);
|
|
909
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
910
|
+
const _out = def.transform(payload.value, payload);
|
|
911
|
+
if (_ctx.async) return (_out instanceof Promise ? _out : Promise.resolve(_out)).then((output) => {
|
|
912
|
+
payload.value = output;
|
|
913
|
+
return payload;
|
|
914
|
+
});
|
|
915
|
+
if (_out instanceof Promise) throw new $ZodAsyncError();
|
|
916
|
+
payload.value = _out;
|
|
917
|
+
return payload;
|
|
918
|
+
};
|
|
919
|
+
});
|
|
920
|
+
const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
|
|
921
|
+
$ZodType.init(inst, def);
|
|
922
|
+
inst._zod.optin = "optional";
|
|
923
|
+
inst._zod.optout = "optional";
|
|
924
|
+
defineLazy(inst._zod, "values", () => {
|
|
925
|
+
return def.innerType._zod.values ? new Set([...def.innerType._zod.values, void 0]) : void 0;
|
|
926
|
+
});
|
|
927
|
+
defineLazy(inst._zod, "pattern", () => {
|
|
928
|
+
const pattern = def.innerType._zod.pattern;
|
|
929
|
+
return pattern ? /* @__PURE__ */ new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0;
|
|
930
|
+
});
|
|
931
|
+
inst._zod.parse = (payload, ctx) => {
|
|
932
|
+
if (def.innerType._zod.optin === "optional") return def.innerType._zod.run(payload, ctx);
|
|
933
|
+
if (payload.value === void 0) return payload;
|
|
934
|
+
return def.innerType._zod.run(payload, ctx);
|
|
935
|
+
};
|
|
936
|
+
});
|
|
937
|
+
const $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => {
|
|
938
|
+
$ZodType.init(inst, def);
|
|
939
|
+
defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
|
|
940
|
+
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
941
|
+
defineLazy(inst._zod, "pattern", () => {
|
|
942
|
+
const pattern = def.innerType._zod.pattern;
|
|
943
|
+
return pattern ? /* @__PURE__ */ new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0;
|
|
944
|
+
});
|
|
945
|
+
defineLazy(inst._zod, "values", () => {
|
|
946
|
+
return def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : void 0;
|
|
947
|
+
});
|
|
948
|
+
inst._zod.parse = (payload, ctx) => {
|
|
949
|
+
if (payload.value === null) return payload;
|
|
950
|
+
return def.innerType._zod.run(payload, ctx);
|
|
951
|
+
};
|
|
952
|
+
});
|
|
953
|
+
const $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => {
|
|
954
|
+
$ZodType.init(inst, def);
|
|
955
|
+
inst._zod.optin = "optional";
|
|
956
|
+
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
957
|
+
inst._zod.parse = (payload, ctx) => {
|
|
958
|
+
if (payload.value === void 0) {
|
|
959
|
+
payload.value = def.defaultValue;
|
|
960
|
+
/**
|
|
961
|
+
* $ZodDefault always returns the default value immediately.
|
|
962
|
+
* It doesn't pass the default value into the validator ("prefault"). There's no reason to pass the default value through validation. The validity of the default is enforced by TypeScript statically. Otherwise, it's the responsibility of the user to ensure the default is valid. In the case of pipes with divergent in/out types, you can specify the default on the `in` schema of your ZodPipe to set a "prefault" for the pipe. */
|
|
963
|
+
return payload;
|
|
964
|
+
}
|
|
965
|
+
const result = def.innerType._zod.run(payload, ctx);
|
|
966
|
+
if (result instanceof Promise) return result.then((result$1) => handleDefaultResult(result$1, def));
|
|
967
|
+
return handleDefaultResult(result, def);
|
|
968
|
+
};
|
|
969
|
+
});
|
|
970
|
+
function handleDefaultResult(payload, def) {
|
|
971
|
+
if (payload.value === void 0) payload.value = def.defaultValue;
|
|
972
|
+
return payload;
|
|
973
|
+
}
|
|
974
|
+
const $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => {
|
|
975
|
+
$ZodType.init(inst, def);
|
|
976
|
+
inst._zod.optin = "optional";
|
|
977
|
+
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
978
|
+
inst._zod.parse = (payload, ctx) => {
|
|
979
|
+
if (payload.value === void 0) payload.value = def.defaultValue;
|
|
980
|
+
return def.innerType._zod.run(payload, ctx);
|
|
981
|
+
};
|
|
982
|
+
});
|
|
983
|
+
const $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => {
|
|
984
|
+
$ZodType.init(inst, def);
|
|
985
|
+
defineLazy(inst._zod, "values", () => {
|
|
986
|
+
const v = def.innerType._zod.values;
|
|
987
|
+
return v ? new Set([...v].filter((x) => x !== void 0)) : void 0;
|
|
988
|
+
});
|
|
989
|
+
inst._zod.parse = (payload, ctx) => {
|
|
990
|
+
const result = def.innerType._zod.run(payload, ctx);
|
|
991
|
+
if (result instanceof Promise) return result.then((result$1) => handleNonOptionalResult(result$1, inst));
|
|
992
|
+
return handleNonOptionalResult(result, inst);
|
|
993
|
+
};
|
|
994
|
+
});
|
|
995
|
+
function handleNonOptionalResult(payload, inst) {
|
|
996
|
+
if (!payload.issues.length && payload.value === void 0) payload.issues.push({
|
|
997
|
+
code: "invalid_type",
|
|
998
|
+
expected: "nonoptional",
|
|
999
|
+
input: payload.value,
|
|
1000
|
+
inst
|
|
1001
|
+
});
|
|
1002
|
+
return payload;
|
|
1003
|
+
}
|
|
1004
|
+
const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
1005
|
+
$ZodType.init(inst, def);
|
|
1006
|
+
inst._zod.optin = "optional";
|
|
1007
|
+
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
1008
|
+
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
1009
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1010
|
+
const result = def.innerType._zod.run(payload, ctx);
|
|
1011
|
+
if (result instanceof Promise) return result.then((result$1) => {
|
|
1012
|
+
payload.value = result$1.value;
|
|
1013
|
+
if (result$1.issues.length) {
|
|
1014
|
+
payload.value = def.catchValue({
|
|
1015
|
+
...payload,
|
|
1016
|
+
error: { issues: result$1.issues.map((iss) => finalizeIssue(iss, ctx, config())) },
|
|
1017
|
+
input: payload.value
|
|
1018
|
+
});
|
|
1019
|
+
payload.issues = [];
|
|
1020
|
+
}
|
|
1021
|
+
return payload;
|
|
1022
|
+
});
|
|
1023
|
+
payload.value = result.value;
|
|
1024
|
+
if (result.issues.length) {
|
|
1025
|
+
payload.value = def.catchValue({
|
|
1026
|
+
...payload,
|
|
1027
|
+
error: { issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config())) },
|
|
1028
|
+
input: payload.value
|
|
1029
|
+
});
|
|
1030
|
+
payload.issues = [];
|
|
1031
|
+
}
|
|
1032
|
+
return payload;
|
|
1033
|
+
};
|
|
1034
|
+
});
|
|
1035
|
+
const $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => {
|
|
1036
|
+
$ZodType.init(inst, def);
|
|
1037
|
+
defineLazy(inst._zod, "values", () => def.in._zod.values);
|
|
1038
|
+
defineLazy(inst._zod, "optin", () => def.in._zod.optin);
|
|
1039
|
+
defineLazy(inst._zod, "optout", () => def.out._zod.optout);
|
|
1040
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1041
|
+
const left = def.in._zod.run(payload, ctx);
|
|
1042
|
+
if (left instanceof Promise) return left.then((left$1) => handlePipeResult(left$1, def, ctx));
|
|
1043
|
+
return handlePipeResult(left, def, ctx);
|
|
1044
|
+
};
|
|
1045
|
+
});
|
|
1046
|
+
function handlePipeResult(left, def, ctx) {
|
|
1047
|
+
if (aborted(left)) return left;
|
|
1048
|
+
return def.out._zod.run({
|
|
1049
|
+
value: left.value,
|
|
1050
|
+
issues: left.issues
|
|
1051
|
+
}, ctx);
|
|
1052
|
+
}
|
|
1053
|
+
const $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
1054
|
+
$ZodType.init(inst, def);
|
|
1055
|
+
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
1056
|
+
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
1057
|
+
defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
|
|
1058
|
+
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
1059
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1060
|
+
const result = def.innerType._zod.run(payload, ctx);
|
|
1061
|
+
if (result instanceof Promise) return result.then(handleReadonlyResult);
|
|
1062
|
+
return handleReadonlyResult(result);
|
|
1063
|
+
};
|
|
1064
|
+
});
|
|
1065
|
+
function handleReadonlyResult(payload) {
|
|
1066
|
+
payload.value = Object.freeze(payload.value);
|
|
1067
|
+
return payload;
|
|
1068
|
+
}
|
|
1069
|
+
const $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
|
|
1070
|
+
$ZodCheck.init(inst, def);
|
|
1071
|
+
$ZodType.init(inst, def);
|
|
1072
|
+
inst._zod.parse = (payload, _) => {
|
|
1073
|
+
return payload;
|
|
1074
|
+
};
|
|
1075
|
+
inst._zod.check = (payload) => {
|
|
1076
|
+
const input = payload.value;
|
|
1077
|
+
const r = def.fn(input);
|
|
1078
|
+
if (r instanceof Promise) return r.then((r$1) => handleRefineResult(r$1, payload, input, inst));
|
|
1079
|
+
handleRefineResult(r, payload, input, inst);
|
|
1080
|
+
};
|
|
1081
|
+
});
|
|
1082
|
+
function handleRefineResult(result, payload, input, inst) {
|
|
1083
|
+
if (!result) {
|
|
1084
|
+
const _iss = {
|
|
1085
|
+
code: "custom",
|
|
1086
|
+
input,
|
|
1087
|
+
inst,
|
|
1088
|
+
path: [...inst._zod.def.path ?? []],
|
|
1089
|
+
continue: !inst._zod.def.abort
|
|
1090
|
+
};
|
|
1091
|
+
if (inst._zod.def.params) _iss.params = inst._zod.def.params;
|
|
1092
|
+
payload.issues.push(issue(_iss));
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
//#endregion
|
|
1097
|
+
export { $ZodArray, $ZodBase64, $ZodBase64URL, $ZodBoolean, $ZodCIDRv4, $ZodCIDRv6, $ZodCUID, $ZodCUID2, $ZodCatch, $ZodCustom, $ZodDefault, $ZodDiscriminatedUnion, $ZodE164, $ZodEmail, $ZodEmoji, $ZodEnum, $ZodGUID, $ZodIPv4, $ZodIPv6, $ZodISODate, $ZodISODateTime, $ZodISODuration, $ZodISOTime, $ZodIntersection, $ZodJWT, $ZodKSUID, $ZodLiteral, $ZodNanoID, $ZodNever, $ZodNonOptional, $ZodNull, $ZodNullable, $ZodNumber, $ZodNumberFormat, $ZodObject, $ZodOptional, $ZodPipe, $ZodPrefault, $ZodReadonly, $ZodRecord, $ZodString, $ZodStringFormat, $ZodTransform, $ZodType, $ZodULID, $ZodURL, $ZodUUID, $ZodUnion, $ZodUnknown, $ZodXID };
|
|
1098
|
+
//# sourceMappingURL=schemas.js.map
|